fix(quotes): lock status on arrived quotes + trim modal helper copy
- Edit modal: for arrived (رسیده) quotes the status select is disabled with «به دلیل ثبت ورود اقلام به انبار، امکان تغییر وضعیت پیشنهاد وجود ندارد.» so no rollback to accepted/offered is possible; metadata stays editable. - Remove superfluous helper subtexts: parenthetical after «فاکتور رسمی» (wizard step 1) and the MinIO upload explanations under the invoice/proforma sections (Edit + Accept modals).
This commit is contained in:
@@ -380,9 +380,6 @@ export function AcceptModal({ quoteId, onClose }: AcceptModalProps) {
|
|||||||
{/* فاکتورهای اصلی */}
|
{/* فاکتورهای اصلی */}
|
||||||
<div className="border-t border-line pt-3">
|
<div className="border-t border-line pt-3">
|
||||||
<div className="mb-1 text-[13px] font-bold">فاکتورهای اصلی (چند فایل):</div>
|
<div className="mb-1 text-[13px] font-bold">فاکتورهای اصلی (چند فایل):</div>
|
||||||
<div className="mb-2 text-[11.5px] text-muted">
|
|
||||||
چند فاکتور را با هم انتخاب کنید؛ هر فایل همان لحظه روی سرور (MinIO) ذخیره میشود.
|
|
||||||
</div>
|
|
||||||
<FileList
|
<FileList
|
||||||
files={invoices}
|
files={invoices}
|
||||||
onChange={setInvoices}
|
onChange={setInvoices}
|
||||||
@@ -400,9 +397,6 @@ export function AcceptModal({ quoteId, onClose }: AcceptModalProps) {
|
|||||||
{/* پیشفاکتورها */}
|
{/* پیشفاکتورها */}
|
||||||
<div className="border-t border-line pt-3">
|
<div className="border-t border-line pt-3">
|
||||||
<div className="mb-1 text-[13px] font-bold">پیشفاکتورها (چند فایل):</div>
|
<div className="mb-1 text-[13px] font-bold">پیشفاکتورها (چند فایل):</div>
|
||||||
<div className="mb-2 text-[11.5px] text-muted">
|
|
||||||
پیشفاکتورهای دریافتی از تأمینکننده؛ هر فایل همان لحظه روی سرور (MinIO) ذخیره میشود.
|
|
||||||
</div>
|
|
||||||
<FileList
|
<FileList
|
||||||
files={proformas}
|
files={proformas}
|
||||||
onChange={setProformas}
|
onChange={setProformas}
|
||||||
|
|||||||
@@ -589,9 +589,6 @@ export function EditModal({ quoteId, onClose }: EditModalProps) {
|
|||||||
{/* فاکتورها */}
|
{/* فاکتورها */}
|
||||||
<div className="border-t border-line pt-3">
|
<div className="border-t border-line pt-3">
|
||||||
<div className="mb-1 text-[13px] font-bold">فاکتورهای اصلی (چند فایل):</div>
|
<div className="mb-1 text-[13px] font-bold">فاکتورهای اصلی (چند فایل):</div>
|
||||||
<div className="mb-2 text-[11.5px] text-muted">
|
|
||||||
چند فاکتور را با هم انتخاب کنید؛ هر فایل همان لحظه روی سرور (MinIO) ذخیره میشود.
|
|
||||||
</div>
|
|
||||||
<FileList
|
<FileList
|
||||||
files={invoices}
|
files={invoices}
|
||||||
onChange={setInvoices}
|
onChange={setInvoices}
|
||||||
@@ -629,8 +626,9 @@ export function EditModal({ quoteId, onClose }: EditModalProps) {
|
|||||||
<div className="field col-span-2">
|
<div className="field col-span-2">
|
||||||
<label>وضعیت (فقط بازگشت به مرحلههای قبل)</label>
|
<label>وضعیت (فقط بازگشت به مرحلههای قبل)</label>
|
||||||
<select
|
<select
|
||||||
className="h-9 w-full rounded-lg border border-line bg-panel px-3 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40"
|
className="h-9 w-full rounded-lg border border-line bg-panel px-3 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 disabled:cursor-not-allowed disabled:opacity-60"
|
||||||
value={status}
|
value={status}
|
||||||
|
disabled={q.status === "arrived"}
|
||||||
onChange={(e) => setStatus(e.target.value)}
|
onChange={(e) => setStatus(e.target.value)}
|
||||||
>
|
>
|
||||||
{statusOptionsFor(q.status).map((st) => (
|
{statusOptionsFor(q.status).map((st) => (
|
||||||
@@ -639,6 +637,11 @@ export function EditModal({ quoteId, onClose }: EditModalProps) {
|
|||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
|
{q.status === "arrived" && (
|
||||||
|
<div className="mt-1.5 rounded-md bg-amber-bg px-2.5 py-1.5 text-[11.5px] font-medium text-amber">
|
||||||
|
به دلیل ثبت ورود اقلام به انبار، امکان تغییر وضعیت پیشنهاد وجود ندارد.
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -171,9 +171,6 @@ export function Step1TopicSupplier({
|
|||||||
onChange={(e) => onOfficial(e.target.checked)}
|
onChange={(e) => onOfficial(e.target.checked)}
|
||||||
/>
|
/>
|
||||||
فاکتور رسمی
|
فاکتور رسمی
|
||||||
<span className="text-[11px] text-muted">
|
|
||||||
(تأمینکننده برای این معامله فاکتور رسمی صادر میکند — نه فقط توافق تلفنی)
|
|
||||||
</span>
|
|
||||||
</label>
|
</label>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user