feat: convert deposit amounts from toman to rials in appointment handling
This commit is contained in:
@@ -100,7 +100,7 @@ export default function AppointmentCreatePage() {
|
||||
|
||||
// ── بیعانه / وضعیت / توضیحات
|
||||
const [depositRequired, setDepositRequired] = useState(false);
|
||||
const [depositRials, setDepositRials] = useState(0);
|
||||
const [depositToman, setDepositToman] = useState(0);
|
||||
const [status, setStatus] = useState('pending');
|
||||
const [note, setNote] = useState('');
|
||||
|
||||
@@ -145,7 +145,7 @@ export default function AppointmentCreatePage() {
|
||||
...(selectedServices.length ? { service_item_uuids: selectedServices.map(s => s.uuid) } : {}),
|
||||
}),
|
||||
...(staffUuid ? { staff_uuid: staffUuid } : {}),
|
||||
...(depositRequired ? { deposit_required: true, deposit_amount_rials: depositRials } : {}),
|
||||
...(depositRequired ? { deposit_required: true, deposit_amount_rials: tomanToRial(depositToman) } : {}),
|
||||
...(visitPriceToman > 0 ? { visit_price_rials: tomanToRial(visitPriceToman) } : {}),
|
||||
...(note.trim() ? { note: note.trim() } : {}),
|
||||
};
|
||||
@@ -468,7 +468,7 @@ export default function AppointmentCreatePage() {
|
||||
<div style={{ display: 'flex', flexWrap: 'wrap', alignItems: 'flex-end', gap: 12, margin: '12px 0' }}>
|
||||
<div style={{ width: 300, maxWidth: '100%' }}>
|
||||
<label style={label}>مبلغ بیعانه (تومان)</label>
|
||||
<div className="field" style={{ marginTop: 6, height: 44 }}><PriceInput value={depositRials} onChange={setDepositRials} /></div>
|
||||
<div className="field" style={{ marginTop: 6, height: 44 }}><PriceInput value={depositToman} onChange={setDepositToman} /></div>
|
||||
</div>
|
||||
<WalletChargeLink mobile={effectiveMobile} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user