updates
This commit is contained in:
@@ -22,7 +22,7 @@ import {
|
||||
creditNoteFormSchema,
|
||||
type CreditNoteFormValues,
|
||||
} from "./credit-note.schema"
|
||||
import { CREDIT_NOTE_ROUTES, DEPARTMENT_ROUTES } from "@garage/api"
|
||||
import { CREDIT_NOTE_ROUTES, DEPARTMENT_ROUTES, CreditNoteStatus } from "@garage/api"
|
||||
import { RhfCustomerSelectField } from "@/modules/customers/rhf-customer-select-field"
|
||||
|
||||
// ── Shared mapOption for async selects ──
|
||||
@@ -36,12 +36,10 @@ const STORE_OBJECT = { getOptionValue: (o: any) => o, getOptionLabel: (o: any) =
|
||||
|
||||
// ── Constants ──
|
||||
|
||||
const STATUS_OPTIONS = [
|
||||
{ value: "draft", label: "Draft" },
|
||||
{ value: "open", label: "Open" },
|
||||
{ value: "applied", label: "Applied" },
|
||||
{ value: "void", label: "Void" },
|
||||
]
|
||||
const STATUS_OPTIONS = CreditNoteStatus.map((v) => ({
|
||||
value: v,
|
||||
label: v.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase()),
|
||||
}))
|
||||
|
||||
// ── Props ──
|
||||
|
||||
|
||||
Reference in New Issue
Block a user