update
This commit is contained in:
@@ -37,7 +37,6 @@ export const columns: ColumnDef<any>[] = [
|
||||
},
|
||||
accessorKey: "quantity",
|
||||
cell: ({ row }) => {
|
||||
console.log(row.original);
|
||||
if (row.original.source === "log") {
|
||||
return (
|
||||
<span>
|
||||
|
||||
@@ -41,7 +41,8 @@ export default function KitchenTransfersPage() {
|
||||
|
||||
const combinedData = useMemo(() => {
|
||||
if (!transfersQuery.data || !logsQuery.data) return [];
|
||||
|
||||
console.log("Transfers Data:", transfersQuery.data);
|
||||
console.log("Logs Data:", logsQuery.data);
|
||||
const formattedTransfers = transfersQuery.data.map((entry: any) => ({
|
||||
timestamp: entry.created_at,
|
||||
source: "system",
|
||||
|
||||
@@ -139,6 +139,7 @@ export const columns: ColumnDef<KitchenInventory>[] = [
|
||||
table.options.meta.refetch();
|
||||
form.setValue("quantity", 0);
|
||||
form.setValue("toKitchenId", "");
|
||||
form.reset();
|
||||
setOpen(false);
|
||||
},
|
||||
});
|
||||
@@ -182,7 +183,10 @@ export const columns: ColumnDef<KitchenInventory>[] = [
|
||||
control={form.control}
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>Transfer beteen Kitchens</FormLabel>
|
||||
<FormLabel>
|
||||
{/* @ts-ignore */}
|
||||
Transfer {row.original.name} between Kitchens
|
||||
</FormLabel>
|
||||
<div className="flex gap-5 items-center justify-between">
|
||||
<Input
|
||||
value={row.original.kitchen.name}
|
||||
|
||||
Reference in New Issue
Block a user