remove customer mobile field
This commit is contained in:
@@ -170,27 +170,6 @@ const CreateCustomer = ({ defaultValues, editMode, id }: IProps) => {
|
|||||||
<p className="mt-1 text-sm text-red-500">{errors.phone.message}</p>
|
<p className="mt-1 text-sm text-red-500">{errors.phone.message}</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col gap-2">
|
|
||||||
<InputGroup
|
|
||||||
{...register("mobile", {
|
|
||||||
minLength: {
|
|
||||||
value: 10,
|
|
||||||
message: FormErrorMessages.minLength(10),
|
|
||||||
},
|
|
||||||
maxLength: {
|
|
||||||
value: 20,
|
|
||||||
message: FormErrorMessages.maxLength(20),
|
|
||||||
},
|
|
||||||
})}
|
|
||||||
name="mobile"
|
|
||||||
label="Mobile"
|
|
||||||
type="tel"
|
|
||||||
placeholder="Enter mobile"
|
|
||||||
/>
|
|
||||||
{errors.mobile && (
|
|
||||||
<p className="mt-1 text-sm text-red-500">{errors.mobile.message}</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<Select
|
<Select
|
||||||
@@ -219,8 +198,8 @@ const CreateCustomer = ({ defaultValues, editMode, id }: IProps) => {
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
{errors.mobile && (
|
{errors.type && (
|
||||||
<p className="mt-1 text-sm text-red-500">{errors.mobile.message}</p>
|
<p className="mt-1 text-sm text-red-500">{errors.type.message}</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ const createCustomerCredentials = z.object({
|
|||||||
full_name: z.string(),
|
full_name: z.string(),
|
||||||
is_primary: z.boolean(),
|
is_primary: z.boolean(),
|
||||||
last_name: z.string(),
|
last_name: z.string(),
|
||||||
mobile: z.string(),
|
|
||||||
phone: z.string(),
|
phone: z.string(),
|
||||||
position: z.string(),
|
position: z.string(),
|
||||||
})
|
})
|
||||||
@@ -84,7 +83,7 @@ const createCustomerCredentials = z.object({
|
|||||||
industry: z.string().min(2).max(100).optional(),
|
industry: z.string().min(2).max(100).optional(),
|
||||||
language: z.enum(["en", "ar", "fr", "es", "de", "zh", "ja", "ko"]).optional(),
|
language: z.enum(["en", "ar", "fr", "es", "de", "zh", "ja", "ko"]).optional(),
|
||||||
last_name: z.string().min(2).max(50).optional(),
|
last_name: z.string().min(2).max(50).optional(),
|
||||||
mobile: z.string().min(10).max(20).optional(),
|
|
||||||
password: z.string().min(8).max(128),
|
password: z.string().min(8).max(128),
|
||||||
phone: z.string().min(10).max(20).optional(),
|
phone: z.string().min(10).max(20).optional(),
|
||||||
registration_number: z.string().min(5).max(50).optional(),
|
registration_number: z.string().min(5).max(50).optional(),
|
||||||
|
|||||||
Reference in New Issue
Block a user