Skip to content

Commit 2f05f7b

Browse files
committed
chore: disable image proof payment and phone number
1 parent feaa1af commit 2f05f7b

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/domains/Events.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@ export type EventType = z.infer<typeof eventSchema>;
4747
export const registrationSchema = z.object({
4848
name: z.string().optional(),
4949
email: z.string().optional(),
50-
phone_number: z
51-
.string({ required_error: "Phone number is required" })
52-
.min(10, "Phone number must be at least 10 digits"),
53-
image_proof_payment: z.union([
54-
z
55-
.instanceof(File)
56-
.refine((file) => ["image/png", "image/jpeg", "image/jpg", "image/svg+xml", "image/gif"].includes(file.type), {
57-
message: "Invalid image file type",
58-
}),
59-
z.string().min(1, "Image proof payment is required"),
60-
]),
50+
// phone_number: z
51+
// .string({ required_error: "Phone number is required" })
52+
// .min(10, "Phone number must be at least 10 digits"),
53+
// image_proof_payment: z.union([
54+
// z
55+
// .instanceof(File)
56+
// .refine((file) => ["image/png", "image/jpeg", "image/jpg", "image/svg+xml", "image/gif"].includes(file.type), {
57+
// message: "Invalid image file type",
58+
// }),
59+
// z.string().min(1, "Image proof payment is required"),
60+
// ]),
6161
});
6262

6363
export type RegistrationForm = z.infer<typeof registrationSchema>;

src/features/events/components/EventFormRegistration.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const EventFormRegistration = ({ data }: { data: EventType }) => {
2828
defaultValues: {
2929
name: "",
3030
email: "",
31-
phone_number: "",
31+
// phone_number: "",
3232
},
3333
});
3434

@@ -45,7 +45,7 @@ const EventFormRegistration = ({ data }: { data: EventType }) => {
4545
form.reset({
4646
name: user.username || "",
4747
email: user.email || "",
48-
phone_number: "",
48+
// phone_number: "",
4949
});
5050
}
5151
}, [user, form]);
@@ -71,7 +71,7 @@ const EventFormRegistration = ({ data }: { data: EventType }) => {
7171
<FormItem>
7272
<FormLabel>{t("EventRegistration.name.label")}</FormLabel>
7373
<FormControl>
74-
<Input {...field} placeholder={t("EventRegistration.name.placeholder")} />
74+
<Input {...field} placeholder={t("EventRegistration.name.placeholder")} readOnly />
7575
</FormControl>
7676
<FormMessage />
7777
</FormItem>
@@ -84,13 +84,13 @@ const EventFormRegistration = ({ data }: { data: EventType }) => {
8484
<FormItem>
8585
<FormLabel>{t("EventRegistration.email.label")}</FormLabel>
8686
<FormControl>
87-
<Input {...field} placeholder={t("EventRegistration.email.placeholder")} />
87+
<Input {...field} placeholder={t("EventRegistration.email.placeholder")} readOnly />
8888
</FormControl>
8989
<FormMessage />
9090
</FormItem>
9191
)}
9292
/>
93-
<FormField
93+
{/* <FormField
9494
name="phone_number"
9595
control={form.control}
9696
render={({ field }) => (
@@ -120,7 +120,7 @@ const EventFormRegistration = ({ data }: { data: EventType }) => {
120120
<FormMessage />
121121
</FormItem>
122122
)}
123-
/>
123+
/> */}
124124
</form>
125125
</Form>
126126
</div>

0 commit comments

Comments
 (0)