@appcorp/fusion-storybook 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -429,7 +429,7 @@ export const useTeacherModule = () => {
|
|
|
429
429
|
payload: { key: "avatarUploading", value: false },
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
|
-
}, [state.id, dispatch, showToast
|
|
432
|
+
}, [state.id, dispatch, showToast]);
|
|
433
433
|
const applyFilters = useCallback(() => {
|
|
434
434
|
dispatch({
|
|
435
435
|
type: TEACHER_ACTION_TYPES.SET_CURRENT_PAGE,
|
|
@@ -14,39 +14,35 @@ export const teacherFormValidation = z.object({
|
|
|
14
14
|
city: z.string().optional().nullable(),
|
|
15
15
|
country: z.string().optional().nullable(),
|
|
16
16
|
dateOfBirth: z.string().optional().nullable(),
|
|
17
|
-
emergencyPhone: z
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
}),
|
|
17
|
+
emergencyPhone: z.string().nullable().optional(),
|
|
18
|
+
// .superRefine((val, ctx) => {
|
|
19
|
+
// if (!val) return; // null, undefined, or empty string are OK
|
|
20
|
+
// if (
|
|
21
|
+
// !/^([+]?[\s0-9]+)?(\d{3}|[(]?[0-9]+[)]?)?([-]?[\s]?[0-9])+$/.test(val)
|
|
22
|
+
// ) {
|
|
23
|
+
// ctx.addIssue({
|
|
24
|
+
// code: z.ZodIssueCode.custom,
|
|
25
|
+
// message: "Invalid phone number format",
|
|
26
|
+
// });
|
|
27
|
+
// }
|
|
28
|
+
// }),
|
|
31
29
|
experience: z.number().optional().nullable(),
|
|
32
30
|
firstName: z.string().min(1, "First name is required"),
|
|
33
31
|
gender: z.string().optional().nullable(),
|
|
34
32
|
joiningDate: z.string(),
|
|
35
33
|
lastName: z.string().min(1, "Last name is required"),
|
|
36
|
-
phone: z
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
}),
|
|
34
|
+
phone: z.string().nullable().optional(),
|
|
35
|
+
// .superRefine((val, ctx) => {
|
|
36
|
+
// if (!val) return; // null, undefined, or empty string are OK
|
|
37
|
+
// if (
|
|
38
|
+
// !/^([+]?[\s0-9]+)?(\d{3}|[(]?[0-9]+[)]?)?([-]?[\s]?[0-9])+$/.test(val)
|
|
39
|
+
// ) {
|
|
40
|
+
// ctx.addIssue({
|
|
41
|
+
// code: z.ZodIssueCode.custom,
|
|
42
|
+
// message: "Invalid phone number format",
|
|
43
|
+
// });
|
|
44
|
+
// }
|
|
45
|
+
// }),
|
|
50
46
|
postalCode: z.string().optional().nullable(),
|
|
51
47
|
qualification: z.string().optional().nullable(),
|
|
52
48
|
specialization: z.string().optional().nullable(),
|