[dyad] Corrected customer name mapping in BookOutForm - wrote 1 file(s)
This commit is contained in:
parent
b5ae31b1dd
commit
22dbfc3884
1 changed files with 2 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ type StockItem = {
|
|||
// Define the type for a customer
|
||||
type Customer = {
|
||||
id: string
|
||||
name: string
|
||||
name: string // This will be the label in the combobox
|
||||
}
|
||||
|
||||
export function BookOutForm({ setOpen, refreshData }: BookOutFormProps) {
|
||||
|
|
@ -90,7 +90,7 @@ export function BookOutForm({ setOpen, refreshData }: BookOutFormProps) {
|
|||
});
|
||||
const formattedCustomers: Customer[] = records.items.map((item: any) => ({
|
||||
id: item.id,
|
||||
name: item.company_name, // Assuming 'company_name' is the field for customer name
|
||||
name: item.company_name, // Assuming 'company_name' is the field for customer name in PocketBase
|
||||
}));
|
||||
setCustomers(formattedCustomers);
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue