Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -835,7 +835,7 @@ function AddressModal({ open, onClose, existing, doctorUuid, onSaved }: {
|
||||
footer={
|
||||
<>
|
||||
<button type="button" onClick={onClose} className="cp-btn-secondary px-5">لغو</button>
|
||||
<button form="addr-form" type="submit" disabled={saveMut.isPending} className="cp-btn-primary">
|
||||
<button form="addr-form" type="submit" disabled={saveMut.isPending} className="btn primary sm">
|
||||
{saveMut.isPending ? 'در حال ذخیره...' : 'ذخیره'}
|
||||
</button>
|
||||
</>
|
||||
@@ -847,7 +847,7 @@ function AddressModal({ open, onClose, existing, doctorUuid, onSaved }: {
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1.5">نام مطب / کلینیک</label>
|
||||
<input type="text" className="cp-input" placeholder="مثال: کلینیک مهر" {...register('name')} />
|
||||
<input type="text" className="input" placeholder="مثال: کلینیک مهر" {...register('name')} />
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1.5">تلفن</label>
|
||||
@@ -1364,7 +1364,7 @@ function DateOverrideModal({ open, onClose, existing, doctorUuid, onSaved }: {
|
||||
<>
|
||||
<button type="button" onClick={onClose} className="cp-btn-secondary px-5">لغو</button>
|
||||
<button type="button" onClick={() => saveMut.mutate()} disabled={saveMut.isPending || !dateStr}
|
||||
className="cp-btn-primary">
|
||||
className="btn primary sm">
|
||||
{saveMut.isPending ? 'در حال ذخیره...' : 'ذخیره'}
|
||||
</button>
|
||||
</>
|
||||
@@ -1405,7 +1405,7 @@ function DateOverrideModal({ open, onClose, existing, doctorUuid, onSaved }: {
|
||||
<label className="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1.5">دلیل (اختیاری)</label>
|
||||
<input type="text" value={reason} onChange={e => setReason(e.target.value)}
|
||||
placeholder={overrideType === 'closed' ? 'مثال: سفر، مریضی، کنگره...' : 'مثال: شیفت اضطراری، ویزیت خاص...'}
|
||||
className="cp-input" />
|
||||
className="input" />
|
||||
</div>
|
||||
|
||||
{overrideType === 'custom' && (
|
||||
@@ -1555,7 +1555,7 @@ function HolidayModal({ open, onClose, existing, doctorUuid, onSaved }: {
|
||||
<>
|
||||
<button type="button" onClick={onClose} className="cp-btn-secondary px-5">لغو</button>
|
||||
<button type="button" onClick={() => saveMut.mutate()} disabled={saveMut.isPending || invalid}
|
||||
className="cp-btn-primary">
|
||||
className="btn primary sm">
|
||||
{saveMut.isPending ? 'در حال ذخیره...' : 'ذخیره'}
|
||||
</button>
|
||||
</>
|
||||
@@ -1578,7 +1578,7 @@ function HolidayModal({ open, onClose, existing, doctorUuid, onSaved }: {
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1.5">دلیل (اختیاری)</label>
|
||||
<input type="text" value={reason} onChange={e => setReason(e.target.value)}
|
||||
placeholder="مثال: سفر، کنگره پزشکی..." className="cp-input" />
|
||||
placeholder="مثال: سفر، کنگره پزشکی..." className="input" />
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
@@ -2174,7 +2174,7 @@ export default function DoctorDetailPage() {
|
||||
footer={
|
||||
<>
|
||||
<button onClick={() => setEditOpen(false)} className="cp-btn-secondary px-5">لغو</button>
|
||||
<button form="edit-doctor-form" type="submit" disabled={updateMut.isPending} className="cp-btn-primary">
|
||||
<button form="edit-doctor-form" type="submit" disabled={updateMut.isPending} className="btn primary sm">
|
||||
{updateMut.isPending ? 'در حال ذخیره...' : 'ذخیره تغییرات'}
|
||||
</button>
|
||||
</>
|
||||
@@ -2185,7 +2185,7 @@ export default function DoctorDetailPage() {
|
||||
<p className="text-xs font-semibold text-slate-400 uppercase tracking-wide">اطلاعات پایه</p>
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1.5">نام کامل *</label>
|
||||
<input type="text" className="cp-input" {...register('name')} />
|
||||
<input type="text" className="input" {...register('name')} />
|
||||
</div>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user