refactor: rename phone field to telephone in ClinicsPage and update related types
- Updated the form schema in ClinicsPage to change the field name from 'phone' to 'telephone'. - Adjusted the input registration to reflect the new field name. - Added a new interface ClinicDetail to define detailed clinic information including phone and other attributes. - Modified the ClinicController to use null-safe access for province ID retrieval.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@ const HUES_LIST = [256, 205, 162, 295, 272];
|
||||
|
||||
const addSchema = z.object({
|
||||
name: z.string().min(2, 'نام الزامی است'),
|
||||
phone: z.string().optional(),
|
||||
telephone: z.string().optional(),
|
||||
});
|
||||
type AddForm = z.infer<typeof addSchema>;
|
||||
|
||||
@@ -248,7 +248,7 @@ export default function ClinicsPage() {
|
||||
<label style={{ fontSize: 13, fontWeight: 600, marginBottom: 6, display: 'block' }}>
|
||||
تلفن (اختیاری)
|
||||
</label>
|
||||
<input className="input" placeholder="مثال: 021-12345678" dir="ltr" {...addForm.register('phone')} />
|
||||
<input className="input" placeholder="مثال: 021-12345678" dir="ltr" {...addForm.register('telephone')} />
|
||||
</div>
|
||||
</div>
|
||||
<div className="modal-foot">
|
||||
|
||||
Reference in New Issue
Block a user