@flowselections/floriday-verkoop-module 1.0.154 → 1.0.156
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/components/verkoop/AnalyticsCards.d.ts +1 -1
- package/dist-lib/components/verkoop/AnalyticsCards.d.ts.map +1 -1
- package/dist-lib/components/verkoop/CartAssignmentWizard.d.ts +1 -1
- package/dist-lib/components/verkoop/CartAssignmentWizard.d.ts.map +1 -1
- package/dist-lib/components/verkoop/CartLayersDialog.d.ts +1 -1
- package/dist-lib/components/verkoop/CartLayersDialog.d.ts.map +1 -1
- package/dist-lib/components/verkoop/ConfirmDialog.d.ts +1 -1
- package/dist-lib/components/verkoop/ConfirmDialog.d.ts.map +1 -1
- package/dist-lib/components/verkoop/CreateOrderPage.d.ts +1 -1
- package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
- package/dist-lib/components/verkoop/CreateOrderPage.js +60 -32
- package/dist-lib/components/verkoop/DiagnoseConnectionDialog.d.ts +1 -1
- package/dist-lib/components/verkoop/DiagnoseConnectionDialog.d.ts.map +1 -1
- package/dist-lib/components/verkoop/EditLocalOrderDialog.d.ts +1 -1
- package/dist-lib/components/verkoop/EditLocalOrderDialog.d.ts.map +1 -1
- package/dist-lib/components/verkoop/EngineActieButtons.d.ts +1 -1
- package/dist-lib/components/verkoop/EngineActieButtons.d.ts.map +1 -1
- package/dist-lib/components/verkoop/EngineBufferCard.d.ts +1 -1
- package/dist-lib/components/verkoop/EngineBufferCard.d.ts.map +1 -1
- package/dist-lib/components/verkoop/FloridayStageLine.d.ts +2 -2
- package/dist-lib/components/verkoop/FloridayStageLine.d.ts.map +1 -1
- package/dist-lib/components/verkoop/FloridaySyncSettings.d.ts +1 -1
- package/dist-lib/components/verkoop/FloridaySyncSettings.d.ts.map +1 -1
- package/dist-lib/components/verkoop/InvoiceSignoffSettings.d.ts +1 -1
- package/dist-lib/components/verkoop/InvoiceSignoffSettings.d.ts.map +1 -1
- package/dist-lib/components/verkoop/InvoiceTimingSettings.d.ts +1 -1
- package/dist-lib/components/verkoop/InvoiceTimingSettings.d.ts.map +1 -1
- package/dist-lib/components/verkoop/OrderAfleverbrievenCard.d.ts +1 -1
- package/dist-lib/components/verkoop/OrderAfleverbrievenCard.d.ts.map +1 -1
- package/dist-lib/components/verkoop/OrderCarrierPicker.d.ts +1 -1
- package/dist-lib/components/verkoop/OrderCarrierPicker.d.ts.map +1 -1
- package/dist-lib/components/verkoop/OrderControlStatusCard.d.ts +1 -1
- package/dist-lib/components/verkoop/OrderControlStatusCard.d.ts.map +1 -1
- package/dist-lib/components/verkoop/OrderInvoiceCard.d.ts +1 -1
- package/dist-lib/components/verkoop/OrderInvoiceCard.d.ts.map +1 -1
- package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts +2 -2
- package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts.map +1 -1
- package/dist-lib/components/verkoop/OrderLinePackingCard.d.ts +1 -1
- package/dist-lib/components/verkoop/OrderLinePackingCard.d.ts.map +1 -1
- package/dist-lib/components/verkoop/OrderPickupMomentPicker.d.ts +4 -2
- package/dist-lib/components/verkoop/OrderPickupMomentPicker.d.ts.map +1 -1
- package/dist-lib/components/verkoop/OrderPickupMomentPicker.js +2 -2
- package/dist-lib/components/verkoop/OrderShipmentsCard.d.ts +1 -1
- package/dist-lib/components/verkoop/OrderShipmentsCard.d.ts.map +1 -1
- package/dist-lib/components/verkoop/OrderTransportCard.d.ts +46 -0
- package/dist-lib/components/verkoop/OrderTransportCard.d.ts.map +1 -0
- package/dist-lib/components/verkoop/OrderTransportCard.js +98 -0
- package/dist-lib/components/verkoop/PickupLocationsSettings.d.ts +1 -1
- package/dist-lib/components/verkoop/PickupLocationsSettings.d.ts.map +1 -1
- package/dist-lib/components/verkoop/PlanCoverageBadge.d.ts +1 -1
- package/dist-lib/components/verkoop/PlanCoverageBadge.d.ts.map +1 -1
- package/dist-lib/components/verkoop/ProductDimensionsSettings.d.ts +1 -1
- package/dist-lib/components/verkoop/ProductDimensionsSettings.d.ts.map +1 -1
- package/dist-lib/components/verkoop/SalesOrderDetailPage.d.ts +1 -1
- package/dist-lib/components/verkoop/SalesOrderDetailPage.d.ts.map +1 -1
- package/dist-lib/components/verkoop/SalesOrderDetailPage.js +13 -12
- package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts +1 -1
- package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
- package/dist-lib/components/verkoop/SalesOrderDetailView.js +7 -4
- package/dist-lib/components/verkoop/SalesOrdersFilterPanel.d.ts +1 -1
- package/dist-lib/components/verkoop/SalesOrdersFilterPanel.d.ts.map +1 -1
- package/dist-lib/components/verkoop/SalesOrdersFilters.d.ts +7 -2
- package/dist-lib/components/verkoop/SalesOrdersFilters.d.ts.map +1 -1
- package/dist-lib/components/verkoop/SalesOrdersFilters.js +10 -4
- package/dist-lib/components/verkoop/SalesOrdersTable.d.ts +1 -1
- package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
- package/dist-lib/components/verkoop/SalesOrdersTable.js +8 -1
- package/dist-lib/components/verkoop/SearchableSelect.js +1 -1
- package/dist-lib/components/verkoop/StockConsumptionAlertsBanner.d.ts +1 -1
- package/dist-lib/components/verkoop/StockConsumptionAlertsBanner.d.ts.map +1 -1
- package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts +1 -1
- package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
- package/dist-lib/components/verkoop/VerkoopOrdersPage.js +39 -17
- package/dist-lib/components/verkoop/WeekCalendar.d.ts +1 -1
- package/dist-lib/components/verkoop/WeekCalendar.d.ts.map +1 -1
- package/dist-lib/components/verkoop/klok/KlokNotice.d.ts +3 -0
- package/dist-lib/components/verkoop/klok/KlokNotice.d.ts.map +1 -0
- package/dist-lib/components/verkoop/klok/KlokNotice.js +12 -0
- package/dist-lib/components/verkoop/klok/KlokOrderPage.d.ts +2 -0
- package/dist-lib/components/verkoop/klok/KlokOrderPage.d.ts.map +1 -0
- package/dist-lib/components/verkoop/klok/KlokOrderPage.js +403 -0
- package/dist-lib/components/verkoop/klok/KlokOrdersList.d.ts +10 -0
- package/dist-lib/components/verkoop/klok/KlokOrdersList.d.ts.map +1 -0
- package/dist-lib/components/verkoop/klok/KlokOrdersList.js +120 -0
- package/dist-lib/components/verkoop/klok/KlokPage.d.ts +2 -0
- package/dist-lib/components/verkoop/klok/KlokPage.d.ts.map +1 -0
- package/dist-lib/components/verkoop/klok/KlokPage.js +82 -0
- package/dist-lib/components/verkoop/klok/KlokStatusBadge.d.ts +5 -0
- package/dist-lib/components/verkoop/klok/KlokStatusBadge.d.ts.map +1 -0
- package/dist-lib/components/verkoop/klok/KlokStatusBadge.js +20 -0
- package/dist-lib/components/verkoop/klok/useKlok.d.ts +17 -0
- package/dist-lib/components/verkoop/klok/useKlok.d.ts.map +1 -0
- package/dist-lib/components/verkoop/klok/useKlok.js +36 -0
- package/dist-lib/components/verkoop/v3/ArticlesHover.d.ts +1 -1
- package/dist-lib/components/verkoop/v3/ArticlesHover.d.ts.map +1 -1
- package/dist-lib/components/verkoop/v3/CustomerName.d.ts +1 -1
- package/dist-lib/components/verkoop/v3/CustomerName.d.ts.map +1 -1
- package/dist-lib/components/verkoop/v3/EmptyState.d.ts +1 -1
- package/dist-lib/components/verkoop/v3/EmptyState.d.ts.map +1 -1
- package/dist-lib/components/verkoop/v3/HoverTip.d.ts +1 -1
- package/dist-lib/components/verkoop/v3/HoverTip.d.ts.map +1 -1
- package/dist-lib/components/verkoop/v3/InfoCard.d.ts +3 -3
- package/dist-lib/components/verkoop/v3/InfoCard.d.ts.map +1 -1
- package/dist-lib/components/verkoop/v3/KpiTile.d.ts +1 -1
- package/dist-lib/components/verkoop/v3/KpiTile.d.ts.map +1 -1
- package/dist-lib/components/verkoop/v3/NavigationTooltip.d.ts +1 -1
- package/dist-lib/components/verkoop/v3/NavigationTooltip.d.ts.map +1 -1
- package/dist-lib/components/verkoop/v3/NoticeBar.d.ts +1 -1
- package/dist-lib/components/verkoop/v3/NoticeBar.d.ts.map +1 -1
- package/dist-lib/components/verkoop/v3/OrderProgress.d.ts +1 -1
- package/dist-lib/components/verkoop/v3/OrderProgress.d.ts.map +1 -1
- package/dist-lib/components/verkoop/v3/OrderStepper.d.ts +1 -1
- package/dist-lib/components/verkoop/v3/OrderStepper.d.ts.map +1 -1
- package/dist-lib/components/verkoop/v3/RowMenu.d.ts +1 -1
- package/dist-lib/components/verkoop/v3/RowMenu.d.ts.map +1 -1
- package/dist-lib/components/verkoop/v3/ShortcutHelp.d.ts +1 -1
- package/dist-lib/components/verkoop/v3/ShortcutHelp.d.ts.map +1 -1
- package/dist-lib/components/verkoop/v3/SourceIcon.d.ts +1 -1
- package/dist-lib/components/verkoop/v3/SourceIcon.d.ts.map +1 -1
- package/dist-lib/index.d.ts +2 -0
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/index.js +8 -1
- package/dist-lib/integrations/supabase/client.js +1 -1
- package/dist-lib/integrations/supabase/client.server.js +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +1168 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/all-rows.d.ts +11 -0
- package/dist-lib/lib/all-rows.d.ts.map +1 -0
- package/dist-lib/lib/all-rows.js +20 -0
- package/dist-lib/lib/belading.server.d.ts.map +1 -1
- package/dist-lib/lib/belading.server.js +20 -9
- package/dist-lib/lib/create-order-form.d.ts +45 -0
- package/dist-lib/lib/create-order-form.d.ts.map +1 -1
- package/dist-lib/lib/create-order-form.js +72 -0
- package/dist-lib/lib/create-order.functions.d.ts +21 -0
- package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
- package/dist-lib/lib/create-order.functions.js +63 -5
- package/dist-lib/lib/floriday-mirror.server.js +1 -1
- package/dist-lib/lib/klok-form.d.ts +59 -0
- package/dist-lib/lib/klok-form.d.ts.map +1 -0
- package/dist-lib/lib/klok-form.js +127 -0
- package/dist-lib/lib/klok-gateway.server.d.ts +35 -0
- package/dist-lib/lib/klok-gateway.server.d.ts.map +1 -0
- package/dist-lib/lib/klok-gateway.server.js +123 -0
- package/dist-lib/lib/klok-labels.d.ts +76 -0
- package/dist-lib/lib/klok-labels.d.ts.map +1 -0
- package/dist-lib/lib/klok-labels.js +175 -0
- package/dist-lib/lib/klok-payload.d.ts +34 -0
- package/dist-lib/lib/klok-payload.d.ts.map +1 -0
- package/dist-lib/lib/klok-payload.js +38 -0
- package/dist-lib/lib/klok-sales-row.d.ts +2 -0
- package/dist-lib/lib/klok-sales-row.d.ts.map +1 -0
- package/dist-lib/lib/klok-sales-row.js +5 -0
- package/dist-lib/lib/klok-sales.server.d.ts +5 -0
- package/dist-lib/lib/klok-sales.server.d.ts.map +1 -0
- package/dist-lib/lib/klok-sales.server.js +33 -0
- package/dist-lib/lib/klok.functions.d.ts +265 -0
- package/dist-lib/lib/klok.functions.d.ts.map +1 -0
- package/dist-lib/lib/klok.functions.js +355 -0
- package/dist-lib/lib/klok.server.d.ts +47 -0
- package/dist-lib/lib/klok.server.d.ts.map +1 -0
- package/dist-lib/lib/klok.server.js +369 -0
- package/dist-lib/lib/module-version.d.ts +1 -1
- package/dist-lib/lib/module-version.js +1 -1
- package/dist-lib/lib/order-cart-count.server.d.ts +8 -0
- package/dist-lib/lib/order-cart-count.server.d.ts.map +1 -0
- package/dist-lib/lib/order-cart-count.server.js +69 -0
- package/dist-lib/lib/order-search.d.ts +16 -0
- package/dist-lib/lib/order-search.d.ts.map +1 -1
- package/dist-lib/lib/order-search.js +16 -1
- package/dist-lib/lib/order-transport.functions.d.ts +50 -0
- package/dist-lib/lib/order-transport.functions.d.ts.map +1 -0
- package/dist-lib/lib/order-transport.functions.js +42 -0
- package/dist-lib/lib/order-transport.server.d.ts +17 -0
- package/dist-lib/lib/order-transport.server.d.ts.map +1 -0
- package/dist-lib/lib/order-transport.server.js +45 -0
- package/dist-lib/lib/own-transport.d.ts +45 -0
- package/dist-lib/lib/own-transport.d.ts.map +1 -1
- package/dist-lib/lib/own-transport.js +61 -0
- package/dist-lib/lib/salesorders-list.server.d.ts.map +1 -1
- package/dist-lib/lib/salesorders-list.server.js +20 -17
- package/dist-lib/lib/salesorders-mapping.d.ts +5 -0
- package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
- package/dist-lib/lib/salesorders-mapping.js +1 -0
- package/dist-lib/lib/tradeitems.functions.d.ts +1117 -12
- package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
- package/dist-lib/lib/useBufferCarts.d.ts +2 -2
- package/dist-lib/lib/useBufferCarts.d.ts.map +1 -1
- package/dist-lib/lib/useBufferEvents.d.ts +2 -2
- package/dist-lib/lib/useBufferEvents.d.ts.map +1 -1
- package/dist-lib/lib/useLocalSalesOrderDetailQuery.d.ts +2 -2
- package/dist-lib/lib/useLocalSalesOrderDetailQuery.d.ts.map +1 -1
- package/dist-lib/lib/usePickupMoment.d.ts +2 -2
- package/dist-lib/lib/usePickupMoment.d.ts.map +1 -1
- package/dist-lib/lib/useSalesOrderDetailQuery.d.ts +1 -1
- package/dist-lib/lib/useSalesOrderDetailQuery.d.ts.map +1 -1
- package/dist-lib/lib/useSalesOrdersQuery.d.ts +1 -1
- package/package.json +22 -4
- package/schema/verkoop.sql +213 -0
- package/dist-lib/components/floriday/FlorydaySyncHealthBanner.d.ts +0 -9
- package/dist-lib/components/floriday/FlorydaySyncHealthBanner.d.ts.map +0 -1
- package/dist-lib/components/floriday/FlorydaySyncHealthBanner.js +0 -26
- package/dist-lib/components/karindeling/AfmetingenTab.d.ts +0 -6
- package/dist-lib/components/karindeling/AfmetingenTab.d.ts.map +0 -1
- package/dist-lib/components/karindeling/AfmetingenTab.js +0 -128
- package/dist-lib/components/karindeling/KarindelingPage.d.ts +0 -2
- package/dist-lib/components/karindeling/KarindelingPage.d.ts.map +0 -1
- package/dist-lib/components/karindeling/KarindelingPage.js +0 -102
- package/dist-lib/components/ui/dropdown-menu.d.ts +0 -9
- package/dist-lib/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist-lib/components/ui/dropdown-menu.js +0 -14
- package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.d.ts +0 -4
- package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.d.ts.map +0 -1
- package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.js +0 -95
- package/dist-lib/components/verkoop/CreateOrderDialog.d.ts +0 -5
- package/dist-lib/components/verkoop/CreateOrderDialog.d.ts.map +0 -1
- package/dist-lib/components/verkoop/CreateOrderDialog.js +0 -33
- package/dist-lib/lib/cron/mirror-floriday-orders.d.ts +0 -4
- package/dist-lib/lib/cron/mirror-floriday-orders.d.ts.map +0 -1
- package/dist-lib/lib/cron/mirror-floriday-orders.js +0 -23
- package/dist-lib/lib/cron/push-order-statuses.d.ts +0 -4
- package/dist-lib/lib/cron/push-order-statuses.d.ts.map +0 -1
- package/dist-lib/lib/cron/push-order-statuses.js +0 -23
- package/dist-lib/lib/floriday/floriday.server.d.ts +0 -14
- package/dist-lib/lib/floriday/floriday.server.d.ts.map +0 -1
- package/dist-lib/lib/floriday/floriday.server.js +0 -92
- package/dist-lib/lib/floriday/sales-orders.functions.d.ts +0 -4736
- package/dist-lib/lib/floriday/sales-orders.functions.d.ts.map +0 -1
- package/dist-lib/lib/floriday/sales-orders.functions.js +0 -193
- package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +0 -77581
- package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +0 -1
- package/dist-lib/lib/floriday-auto-fulfillment.functions.js +0 -65
- package/dist-lib/lib/floriday-auto-fulfillment.server.d.ts +0 -21
- package/dist-lib/lib/floriday-auto-fulfillment.server.d.ts.map +0 -1
- package/dist-lib/lib/floriday-auto-fulfillment.server.js +0 -352
- package/dist-lib/lib/floriday-status-sync.server.d.ts +0 -14
- package/dist-lib/lib/floriday-status-sync.server.d.ts.map +0 -1
- package/dist-lib/lib/floriday-status-sync.server.js +0 -130
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalyticsCards.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/AnalyticsCards.tsx"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB
|
|
1
|
+
{"version":3,"file":"AnalyticsCards.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/AnalyticsCards.tsx"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,+BAwBA"}
|
|
@@ -2,5 +2,5 @@ export declare function CartAssignmentWizard({ orderId, open, onClose, }: {
|
|
|
2
2
|
orderId: string | null;
|
|
3
3
|
open: boolean;
|
|
4
4
|
onClose: () => void;
|
|
5
|
-
}): import("react
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=CartAssignmentWizard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartAssignmentWizard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/CartAssignmentWizard.tsx"],"names":[],"mappings":"AA8CA,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EAAE,IAAI,EAAE,OAAO,GACvB,EAAE;IAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE
|
|
1
|
+
{"version":3,"file":"CartAssignmentWizard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/CartAssignmentWizard.tsx"],"names":[],"mappings":"AA8CA,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EAAE,IAAI,EAAE,OAAO,GACvB,EAAE;IAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,+BA4ThE"}
|
|
@@ -4,6 +4,6 @@ interface Props {
|
|
|
4
4
|
open: boolean;
|
|
5
5
|
onOpenChange: (open: boolean) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare function CartLayersDialog({ cartId, cartNumber, open, onOpenChange }: Props): import("react
|
|
7
|
+
export declare function CartLayersDialog({ cartId, cartNumber, open, onOpenChange }: Props): import("react").JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=CartLayersDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartLayersDialog.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/CartLayersDialog.tsx"],"names":[],"mappings":"AA4BA,UAAU,KAAK;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC;AA2ID,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,KAAK
|
|
1
|
+
{"version":3,"file":"CartLayersDialog.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/CartLayersDialog.tsx"],"names":[],"mappings":"AA4BA,UAAU,KAAK;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC;AA2ID,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,KAAK,+BAyMjF"}
|
|
@@ -7,5 +7,5 @@ export declare function ConfirmDialog({ open, onOpenChange, title, description,
|
|
|
7
7
|
cancelLabel?: string;
|
|
8
8
|
destructive?: boolean;
|
|
9
9
|
onConfirm: () => void;
|
|
10
|
-
}): import("react
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
11
|
//# sourceMappingURL=ConfirmDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/ConfirmDialog.tsx"],"names":[],"mappings":"AAaA,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,WAAW,EACX,YAAY,EACZ,WAAyB,EACzB,WAAmB,EACnB,SAAS,GACV,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/ConfirmDialog.tsx"],"names":[],"mappings":"AAaA,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,WAAW,EACX,YAAY,EACZ,WAAyB,EACzB,WAAmB,EACnB,SAAS,GACV,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,+BAuBA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function CreateOrderPage(): import("react
|
|
1
|
+
export declare function CreateOrderPage(): import("react").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=CreateOrderPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateOrderPage.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/CreateOrderPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CreateOrderPage.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/CreateOrderPage.tsx"],"names":[],"mappings":"AAsGA,wBAAgB,eAAe,gCAkxC9B"}
|
|
@@ -10,7 +10,8 @@ import { Button, Input, Label, Textarea, toast, } from "@flowselections/core";
|
|
|
10
10
|
import { Link, useBlocker, useNavigate } from "@tanstack/react-router";
|
|
11
11
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
12
12
|
import { AlertTriangle, ArrowLeft, CheckCircle2, ChevronUp, Loader2, Plus, Trash2 } from "lucide-react";
|
|
13
|
-
import {
|
|
13
|
+
import { isOwnTransportKind, ownPickupLabel, OWN_PICKUP_MISSING_TEXT } from "../../lib/own-transport.js";
|
|
14
|
+
import { missingItems, lineTotal, dateWithWeekday, eur, attentionItems, selectionKey, resetOnSelectionChange, applyFirstFeasible, prijsSleutel, PRIJS_FOUT_TEXT, PRIJS_ONBEKEND_TEXT, bekendePrijs, regelMistPrijs } from "../../lib/create-order-form.js";
|
|
14
15
|
import { useServerFn } from "@tanstack/react-start";
|
|
15
16
|
import { SearchableSelect } from "./SearchableSelect.js";
|
|
16
17
|
import { toISODate } from "../../lib/carrier-availability.js";
|
|
@@ -18,7 +19,7 @@ import { getDeparturePreview } from "../../lib/departure-preview.functions.js";
|
|
|
18
19
|
import { getProductPlannability } from "../../lib/product-plannable.functions.js";
|
|
19
20
|
import { decidePreview, momentLabel, firstDateText, LATE_CONFIRM } from "../../lib/departure-preview.js";
|
|
20
21
|
import { ConfirmDialog } from "./ConfirmDialog.js";
|
|
21
|
-
import { listCustomersForCreateOrder, ensureCustomerFromTwinfield, listProductsForCreateOrder, listCustomerStickerProducts, listDeliveryLocationsForCustomerCO, listPickupLocationsCO, getLastPickupLocationCO, listCarriersForCreateOrder, getOrderPickDaysCO, listBeladingOptionsForProducts, createManualOrder,
|
|
22
|
+
import { listCustomersForCreateOrder, ensureCustomerFromTwinfield, listProductsForCreateOrder, listCustomerStickerProducts, listDeliveryLocationsForCustomerCO, listPickupLocationsCO, getLastPickupLocationCO, listCarriersForCreateOrder, getOrderPickDaysCO, listBeladingOptionsForProducts, createManualOrder, getOrderPrices, } from "../../lib/create-order.functions.js";
|
|
22
23
|
import { checkOrderStockAllowed } from "../../lib/logistics-stock.functions.js";
|
|
23
24
|
import { useAllowedLoadCarriers } from "../../lib/useAllowedLoadCarriers.js";
|
|
24
25
|
const beladingKey = (b) => `${b.plants_per_crate}x${b.crates_per_layer}x${b.layers_per_cart}`;
|
|
@@ -44,7 +45,7 @@ export function CreateOrderPage() {
|
|
|
44
45
|
const qc = useQueryClient();
|
|
45
46
|
const fetchCustomers = useServerFn(listCustomersForCreateOrder);
|
|
46
47
|
const fetchProducts = useServerFn(listProductsForCreateOrder);
|
|
47
|
-
const
|
|
48
|
+
const fetchOrderPrices = useServerFn(getOrderPrices);
|
|
48
49
|
const fetchDeliveryLocations = useServerFn(listDeliveryLocationsForCustomerCO);
|
|
49
50
|
const fetchPickupLocations = useServerFn(listPickupLocationsCO);
|
|
50
51
|
const fetchCarriers = useServerFn(listCarriersForCreateOrder);
|
|
@@ -114,10 +115,52 @@ export function CreateOrderPage() {
|
|
|
114
115
|
const [customerReference, setCustomerReference] = useState("");
|
|
115
116
|
// Eigen vervoer / zelf afleveren: bewuste keuze, geen vervoerder.
|
|
116
117
|
const [ownTransport, setOwnTransport] = useState(false);
|
|
118
|
+
// Vertrek-/ophaaltijd bij eigen vervoer of klant haalt op (leeg = nog niet gekozen).
|
|
119
|
+
const [ownPickupTime, setOwnPickupTime] = useState("");
|
|
120
|
+
const ownKindValue = ownTransport
|
|
121
|
+
? "eigen_vervoer"
|
|
122
|
+
: (carriers.find((c) => c.id === carrierId && isOwnTransportKind(c.carrier_kind))?.carrier_kind ?? null);
|
|
123
|
+
const ownPickupKind = !!ownKindValue;
|
|
117
124
|
const [lateConfirmOpen, setLateConfirmOpen] = useState(false);
|
|
118
125
|
const [lines, setLines] = useState([
|
|
119
126
|
{ product_id: null, product_name: "", quantity: null, unit: "stuks", unit_price: null, belading: null },
|
|
120
127
|
]);
|
|
128
|
+
// Automatische prijs per regel via klanten_orderprijs. Opnieuw bij een andere
|
|
129
|
+
// klant, leverdatum, product of aantal; een zelf ingevulde prijs blijft staan.
|
|
130
|
+
const priceWanted = lines
|
|
131
|
+
.map((l, i) => ({ i, key: l.price_mode === "manual" ? null : prijsSleutel(customerId, l.product_id, deliveryDate, l.quantity), l }))
|
|
132
|
+
.filter((x) => x.key && x.key !== x.l.price_key);
|
|
133
|
+
const priceWantedKey = priceWanted.map((x) => `${x.i}:${x.key}`).join(",");
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
if (!priceWanted.length || !customerId)
|
|
136
|
+
return;
|
|
137
|
+
const todo = priceWanted.map((x) => ({ i: x.i, key: x.key, productId: x.l.product_id, quantity: Number(x.l.quantity ?? 0) || undefined }));
|
|
138
|
+
const t = setTimeout(() => {
|
|
139
|
+
const apply = (res) => {
|
|
140
|
+
setLines((cur) => {
|
|
141
|
+
const copy = [...cur];
|
|
142
|
+
todo.forEach((x, n) => {
|
|
143
|
+
const ln = copy[x.i];
|
|
144
|
+
if (!ln || ln.price_mode === "manual")
|
|
145
|
+
return;
|
|
146
|
+
if (prijsSleutel(customerId, ln.product_id, deliveryDate, ln.quantity) !== x.key)
|
|
147
|
+
return;
|
|
148
|
+
const r = res?.[n];
|
|
149
|
+
if (!r || !r.ok)
|
|
150
|
+
copy[x.i] = { ...ln, price_error: true, price_key: x.key, price_source: null, unit_price: null };
|
|
151
|
+
else
|
|
152
|
+
copy[x.i] = { ...ln, price_error: false, price_key: x.key, price_mode: "auto", price_zero_ok: false, ...bekendePrijs(r.prijs) };
|
|
153
|
+
});
|
|
154
|
+
return copy;
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
fetchOrderPrices({ data: { customerId, onDate: deliveryDate || undefined, lines: todo.map(({ productId, quantity }) => ({ productId, quantity })) } })
|
|
158
|
+
.then(apply)
|
|
159
|
+
.catch((e) => { console.error("[orderprijs]", e); apply(null); });
|
|
160
|
+
}, 300);
|
|
161
|
+
return () => clearTimeout(t);
|
|
162
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
163
|
+
}, [priceWantedKey, customerId, deliveryDate]);
|
|
121
164
|
// Standaard stickervinkje: aan als er voor deze klant + dit product een
|
|
122
165
|
// vaste klantsticker bestaat. Een zelf gezet vinkje blijft staan.
|
|
123
166
|
const stickerProductKey = Array.from(new Set(lines.map((l) => l.product_id).filter((v) => !!v))).sort();
|
|
@@ -474,6 +517,7 @@ export function CreateOrderPage() {
|
|
|
474
517
|
carrierId: isReservation || ownTransport ? null : carrierId,
|
|
475
518
|
momentKey: isReservation || ownTransport ? null : momentKey,
|
|
476
519
|
ownTransport: !isReservation && ownTransport,
|
|
520
|
+
ownPickupTime: !isReservation && ownPickupKind && ownPickupTime ? ownPickupTime : null,
|
|
477
521
|
customerReference: customerReference.trim() ? customerReference.trim() : null,
|
|
478
522
|
acceptLateSignup,
|
|
479
523
|
confirmZeroPrice: zeroPriceOkRef.current,
|
|
@@ -489,6 +533,7 @@ export function CreateOrderPage() {
|
|
|
489
533
|
quantity: l.quantity,
|
|
490
534
|
unit: l.unit ?? p?.unit ?? "stuks",
|
|
491
535
|
unit_price: l.unit_price ?? undefined,
|
|
536
|
+
price_zero_ok: l.price_zero_ok === true && Number(l.unit_price) === 0,
|
|
492
537
|
// Gekozen belading heeft voorrang op de productstandaard.
|
|
493
538
|
plants_per_crate: l.belading?.plants_per_crate ?? p?.plants_per_crate ?? undefined,
|
|
494
539
|
crates_per_layer: l.belading?.crates_per_layer ?? p?.crates_per_layer ?? undefined,
|
|
@@ -617,19 +662,22 @@ export function CreateOrderPage() {
|
|
|
617
662
|
: carrierId ? carrierName(carrierId) ?? "Onbekend"
|
|
618
663
|
: preview?.carrierId ? `Automatisch: ${carrierName(preview.carrierId) ?? "onbekend"}`
|
|
619
664
|
: "Automatisch";
|
|
620
|
-
const momentText = isReservation ? null : ownTransport ? "Eigen vervoer" : decision && (decision.kind === "ok" || decision.kind === "late") ? decision.text ?? null : null;
|
|
665
|
+
const momentText = isReservation ? null : ownPickupKind && ownPickupTime && deliveryDate ? `${ownPickupLabel(ownKindValue)} ${ownPickupTime}` : ownTransport ? "Eigen vervoer" : decision && (decision.kind === "ok" || decision.kind === "late") ? decision.text ?? null : null;
|
|
621
666
|
const missing = missingItems({
|
|
622
667
|
customerId, deliveryLocationId, pickupLocationId, isReservation, deliveryDate,
|
|
623
668
|
validLineCount: validLines.length,
|
|
624
669
|
linesWithoutBelading: lines.filter((l, i) => l.product_id && !lineInfo[i].eff).length,
|
|
625
670
|
stockBlocked,
|
|
671
|
+
linesWithoutPrice: lines.filter((l) => regelMistPrijs(l)).length,
|
|
626
672
|
previewPending: canPickDate && !isReservation && !decision,
|
|
627
673
|
previewBlockedReason: decision && (decision.kind === "blocked" || decision.kind === "departed") ? decision.reason : null,
|
|
628
674
|
});
|
|
629
|
-
const
|
|
630
|
-
linesWithoutPrice:
|
|
675
|
+
const attention0 = attentionItems({
|
|
676
|
+
linesWithoutPrice: 0, // blokkeert nu aanmaken (zie missingItems)
|
|
677
|
+
linesPriceError: lines.filter((l) => l.product_id && l.price_error).length,
|
|
631
678
|
linesOverStock: lines.filter((l) => l.product_id && shortageByProduct.has(l.product_id)).length,
|
|
632
679
|
});
|
|
680
|
+
const attention = !isReservation && ownPickupKind && !ownPickupTime ? [OWN_PICKUP_MISSING_TEXT, ...attention0] : attention0;
|
|
633
681
|
const canCreate = missing.length === 0 && !createMut.isPending && !stockQ.isFetching;
|
|
634
682
|
const submit = () => {
|
|
635
683
|
if (!canCreate)
|
|
@@ -659,7 +707,7 @@ export function CreateOrderPage() {
|
|
|
659
707
|
const fieldLabel = "text-[13px] font-medium text-foreground";
|
|
660
708
|
const summaryRows = (_jsxs("dl", { className: "space-y-3 text-sm", children: [_jsxs("div", { children: [_jsx("dt", { className: "text-xs text-muted-foreground", children: "Klant" }), _jsx("dd", { className: "font-medium text-foreground", children: selectedCustomer ? customerLabel(selectedCustomer) : "—" }), selectedCustomer && customerSub(selectedCustomer) && _jsx("dd", { className: "text-xs text-muted-foreground", children: customerSub(selectedCustomer) })] }), _jsxs("div", { className: "grid grid-cols-[minmax(0,1fr)_auto] gap-2", children: [_jsx("dt", { className: "text-muted-foreground", children: "Leverdatum" }), _jsx("dd", { className: "text-right tabular-nums text-foreground", children: isReservation ? "Reservering" : dateWithWeekday(deliveryDate) ?? "—" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("dt", { className: "text-muted-foreground", children: "Ophaalmoment" }), !isReservation && !ownTransport && preview && preview.moments.length > 1 && decision && (decision.kind === "ok" || decision.kind === "late") ? (_jsx("select", { className: "h-9 w-full rounded-md border border-input bg-background px-2 text-sm text-foreground", value: momentKey ?? decision.momentKey ?? "", onChange: (e) => setMomentKey(e.target.value || null), "aria-label": "Ophaalmoment kiezen", children: preview.moments.map((m) => (_jsxs("option", { value: m.momentKey, disabled: !m.feasible, children: [momentLabel(m), m.feasible ? "" : " (niet haalbaar)"] }, m.momentKey))) })) : (_jsx("dd", { className: "text-foreground", children: momentText ?? (canPickDate && !isReservation && !decision
|
|
661
709
|
? _jsx("span", { className: "inline-block h-4 w-40 animate-pulse rounded bg-muted align-middle", "aria-label": "Ophaalmoment laden" })
|
|
662
|
-
: "—") }))] }), _jsxs("div", { className: "grid
|
|
710
|
+
: "—") }))] }), _jsxs("div", { className: "grid min-w-0 gap-0.5", children: [_jsx("dt", { className: "text-muted-foreground", children: "Vervoerder" }), _jsx("dd", { className: "min-w-0 truncate text-foreground", title: carrierText, children: carrierText })] }), _jsxs("div", { className: "border-t border-border pt-3 grid grid-cols-[minmax(0,1fr)_auto] gap-y-1.5 gap-x-2 tabular-nums", children: [_jsx("dt", { className: "text-muted-foreground", children: "Regels" }), _jsx("dd", { className: "text-right", children: validLines.length }), _jsx("dt", { className: "text-muted-foreground", children: "Fusten" }), _jsx("dd", { className: "text-right", children: totals.crates }), _jsx("dt", { className: "text-muted-foreground", children: "Stuks" }), _jsx("dd", { className: "text-right", children: totals.stuks.toLocaleString("nl-NL") })] }), _jsxs("div", { className: "border-t border-border pt-3 grid grid-cols-[minmax(0,1fr)_auto] gap-2", children: [_jsx("dt", { className: "font-semibold text-foreground", children: "Totaal" }), _jsx("dd", { className: "text-right text-lg font-semibold tabular-nums text-foreground", children: eur(totals.amount) })] })] }));
|
|
663
711
|
const missingBlock = missing.length > 0 ? (_jsxs("div", { className: "rounded-lg border border-border bg-muted/40 p-3 text-sm", children: [_jsx("div", { className: "mb-1 font-medium text-foreground", children: "Ontbreekt nog" }), _jsx("ul", { className: "space-y-1 text-muted-foreground", children: missing.map((m) => (_jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "mt-2 h-1 w-1 shrink-0 rounded-full bg-muted-foreground" }), m] }, m))) })] })) : attention.length > 0 ? null : (_jsxs("div", { className: "flex items-center gap-2 rounded-lg bg-primary/10 p-3 text-sm font-medium text-primary", children: [_jsx(CheckCircle2, { className: "h-4 w-4 shrink-0" }), " Alles is compleet"] }));
|
|
664
712
|
const attentionBlock = attention.length > 0 ? (_jsxs("div", { className: "rounded-lg border border-warning/40 bg-warning-soft p-3 text-sm", children: [_jsxs("div", { className: "mb-1 flex items-center gap-2 font-medium text-foreground", children: [_jsx(AlertTriangle, { className: "h-4 w-4 shrink-0 text-warning-soft-foreground" }), "Aandachtspunten"] }), _jsx("ul", { className: "space-y-1 text-muted-foreground", children: attention.map((m) => (_jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "mt-2 h-1 w-1 shrink-0 rounded-full bg-muted-foreground" }), m] }, m))) })] })) : null;
|
|
665
713
|
const createButton = (cls = "") => (_jsx(Button, { className: `h-10 w-full [@media(pointer:coarse)]:h-11 ${cls}`, onClick: submit, disabled: !canCreate, title: stockBlocked ? "Onvoldoende voorraad; pas de aantallen aan." : undefined, children: createMut.isPending ? _jsxs(_Fragment, { children: [_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), "Bezig\u2026"] })
|
|
@@ -698,7 +746,7 @@ export function CreateOrderPage() {
|
|
|
698
746
|
setCarrierId(!v || v === "__auto__" ? null : v);
|
|
699
747
|
}
|
|
700
748
|
setMomentKey(null);
|
|
701
|
-
} }))] }), _jsxs("div", { className: "min-w-0 space-y-1.5 @[47.5rem]:col-span-2", children: [_jsxs(Label, { className: fieldLabel, children: ["Leverdatum ", !isReservation && _jsx("span", { className: "text-destructive", children: "*" })] }), _jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-center", children: [_jsx(Input, { type: "date", className: "h-9 sm:w-48 [@media(pointer:coarse)]:h-11", value: !isReservation && canPickDate ? deliveryDate : "", disabled: isReservation || !canPickDate, onChange: (e) => { setDeliveryDate(e.target.value || ""); setDateSource(e.target.value ? "user" : "auto"); setDateNotice(null); setMomentKey(null); } }), dateNotice && !deliveryDate && _jsx("span", { className: "text-sm text-warning-soft-foreground", children: dateNotice }), !isReservation && deliveryDate && canPickDate && (_jsx("span", { className: "text-sm font-medium text-foreground", children: dateWithWeekday(deliveryDate) }))] }), _jsxs("label", { className: "flex w-fit cursor-pointer items-center gap-2 text-sm text-muted-foreground [@media(pointer:coarse)]:min-h-11", children: [_jsx("input", { type: "checkbox", checked: isReservation, onChange: (e) => setIsReservation(e.target.checked), className: "h-4 w-4 rounded border-input accent-primary" }), "Reservering (nog geen vaste leverdatum)"] }), !isReservation && !canPickDate && (_jsx("div", { className: "text-xs text-muted-foreground", children: "Kies eerst klant, afleverlocatie en afhaallocatie." })), !isReservation && momentText && (_jsxs("div", { className: "text-xs text-muted-foreground md:hidden", children: ["Ophaalmoment: ", momentText] })), !isReservation && decision?.kind === "blocked" && (_jsx("div", { className: "text-xs text-destructive", children: decision.reason })), !isReservation && decision?.kind === "departed" && (_jsxs("div", { className: "space-y-2 rounded-lg border border-destructive/40 p-2.5 text-xs", children: [_jsx("div", { className: "text-destructive", children: decision.reason }), firstDateText(decision.firstDate, decision.next?.signupDeadline ?? null) && (_jsx("div", { className: "text-muted-foreground", children: firstDateText(decision.firstDate, decision.next?.signupDeadline ?? null) })), _jsxs("div", { className: "flex flex-wrap gap-2", children: [decision.firstDate && (_jsxs(Button, { type: "button", size: "sm", variant: "outline", onClick: () => { setDeliveryDate(decision.firstDate); setDateSource("user"); setMomentKey(null); }, children: ["Gebruik ", fmtDate(decision.firstDate)] })), _jsx(Button, { type: "button", size: "sm", variant: "outline", onClick: () => { setOwnTransport(true); setCarrierId(null); setMomentKey(null); }, children: "Eigen vervoer / zelf afleveren" })] })] })), !isReservation && decision?.kind === "late" && (_jsxs("div", { className: "space-y-2 rounded-lg border border-destructive/40 p-2.5 text-xs", children: [_jsx("div", { className: "text-destructive", children: decision.reason }), (firstDateText(decision.firstDate, preview?.nextFeasibleMoment?.signupDeadline ?? null) ?? decision.firstReason) && (_jsx("div", { className: "text-muted-foreground", children: firstDateText(decision.firstDate, preview?.nextFeasibleMoment?.signupDeadline ?? null) ?? decision.firstReason })), _jsxs("div", { className: "flex flex-wrap gap-2", children: [decision.firstDate && (_jsxs(Button, { type: "button", size: "sm", variant: "outline", onClick: () => { setDeliveryDate(decision.firstDate); setDateSource("user"); setMomentKey(null); }, children: ["Gebruik ", fmtDate(decision.firstDate)] })), _jsxs(Button, { type: "button", size: "sm", variant: "outline", disabled: createMut.isPending, onClick: () => setLateConfirmOpen(true), children: ["Toch aanmaken voor ", deliveryDate ? fmtDate(deliveryDate) : "de gekozen datum"] })] })] }))] })] })] }), _jsxs("section", { className: `${cardCls} @container`, children: [_jsx("div", { className: "flex items-center justify-between gap-3", children: _jsx("h2", { className: h2, children: "Bestelregels" }) }), _jsxs("div", { className: "mt-4 hidden grid-cols-[minmax(220px,1fr)_56px_minmax(120px,0.8fr)_80px_72px_minmax(88px,0.6fr)_92px_88px_44px] gap-2 px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground @[60rem]:grid", children: [_jsx("div", { children: "Product" }), _jsx("div", { className: "text-center", children: "Sticker" }), _jsx("div", { children: "Belading" }), _jsx("div", { children: "Fusten" }), _jsx("div", { className: "text-right", children: "Stuks" }), _jsx("div", { children: "Beschikbaar" }), _jsx("div", { children: "Prijs/st" }), _jsx("div", { className: "text-right", children: "Totaal" }), _jsx("div", {})] }), _jsx("div", { className: "mt-2 space-y-2 @[60rem]:space-y-0 @[60rem]:divide-y @[60rem]:divide-border", children: lines.map((line, idx) => {
|
|
749
|
+
} })), !isReservation && ownPickupKind && (_jsxs("div", { className: "space-y-1 pt-1", children: [_jsx(Label, { className: fieldLabel, htmlFor: "own-pickup-time", children: ownPickupLabel(ownKindValue) }), _jsx(Input, { id: "own-pickup-time", type: "time", className: "h-9 w-32 tabular-nums [@media(pointer:coarse)]:h-11", value: ownPickupTime, onChange: (e) => setOwnPickupTime(e.target.value) }), !ownPickupTime && _jsx("div", { className: "text-xs text-warning-soft-foreground", children: OWN_PICKUP_MISSING_TEXT })] }))] }), _jsxs("div", { className: "min-w-0 space-y-1.5 @[47.5rem]:col-span-2", children: [_jsxs(Label, { className: fieldLabel, children: ["Leverdatum ", !isReservation && _jsx("span", { className: "text-destructive", children: "*" })] }), _jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-center", children: [_jsx(Input, { type: "date", className: "h-9 sm:w-48 [@media(pointer:coarse)]:h-11", value: !isReservation && canPickDate ? deliveryDate : "", disabled: isReservation || !canPickDate, onChange: (e) => { setDeliveryDate(e.target.value || ""); setDateSource(e.target.value ? "user" : "auto"); setDateNotice(null); setMomentKey(null); } }), dateNotice && !deliveryDate && _jsx("span", { className: "text-sm text-warning-soft-foreground", children: dateNotice }), !isReservation && deliveryDate && canPickDate && (_jsx("span", { className: "text-sm font-medium text-foreground", children: dateWithWeekday(deliveryDate) }))] }), _jsxs("label", { className: "flex w-fit cursor-pointer items-center gap-2 text-sm text-muted-foreground [@media(pointer:coarse)]:min-h-11", children: [_jsx("input", { type: "checkbox", checked: isReservation, onChange: (e) => setIsReservation(e.target.checked), className: "h-4 w-4 rounded border-input accent-primary" }), "Reservering (nog geen vaste leverdatum)"] }), !isReservation && !canPickDate && (_jsx("div", { className: "text-xs text-muted-foreground", children: "Kies eerst klant, afleverlocatie en afhaallocatie." })), !isReservation && momentText && (_jsxs("div", { className: "text-xs text-muted-foreground md:hidden", children: ["Ophaalmoment: ", momentText] })), !isReservation && decision?.kind === "blocked" && (_jsx("div", { className: "text-xs text-destructive", children: decision.reason })), !isReservation && decision?.kind === "departed" && (_jsxs("div", { className: "space-y-2 rounded-lg border border-destructive/40 p-2.5 text-xs", children: [_jsx("div", { className: "text-destructive", children: decision.reason }), firstDateText(decision.firstDate, decision.next?.signupDeadline ?? null) && (_jsx("div", { className: "text-muted-foreground", children: firstDateText(decision.firstDate, decision.next?.signupDeadline ?? null) })), _jsxs("div", { className: "flex flex-wrap gap-2", children: [decision.firstDate && (_jsxs(Button, { type: "button", size: "sm", variant: "outline", onClick: () => { setDeliveryDate(decision.firstDate); setDateSource("user"); setMomentKey(null); }, children: ["Gebruik ", fmtDate(decision.firstDate)] })), _jsx(Button, { type: "button", size: "sm", variant: "outline", onClick: () => { setOwnTransport(true); setCarrierId(null); setMomentKey(null); }, children: "Eigen vervoer / zelf afleveren" })] })] })), !isReservation && decision?.kind === "late" && (_jsxs("div", { className: "space-y-2 rounded-lg border border-destructive/40 p-2.5 text-xs", children: [_jsx("div", { className: "text-destructive", children: decision.reason }), (firstDateText(decision.firstDate, preview?.nextFeasibleMoment?.signupDeadline ?? null) ?? decision.firstReason) && (_jsx("div", { className: "text-muted-foreground", children: firstDateText(decision.firstDate, preview?.nextFeasibleMoment?.signupDeadline ?? null) ?? decision.firstReason })), _jsxs("div", { className: "flex flex-wrap gap-2", children: [decision.firstDate && (_jsxs(Button, { type: "button", size: "sm", variant: "outline", onClick: () => { setDeliveryDate(decision.firstDate); setDateSource("user"); setMomentKey(null); }, children: ["Gebruik ", fmtDate(decision.firstDate)] })), _jsxs(Button, { type: "button", size: "sm", variant: "outline", disabled: createMut.isPending, onClick: () => setLateConfirmOpen(true), children: ["Toch aanmaken voor ", deliveryDate ? fmtDate(deliveryDate) : "de gekozen datum"] })] })] }))] })] })] }), _jsxs("section", { className: `${cardCls} @container`, children: [_jsx("div", { className: "flex items-center justify-between gap-3", children: _jsx("h2", { className: h2, children: "Bestelregels" }) }), _jsxs("div", { className: "mt-4 hidden grid-cols-[minmax(220px,1fr)_56px_minmax(120px,0.8fr)_80px_72px_minmax(88px,0.6fr)_92px_88px_44px] gap-2 px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground @[60rem]:grid", children: [_jsx("div", { children: "Product" }), _jsx("div", { className: "text-center", children: "Sticker" }), _jsx("div", { children: "Belading" }), _jsx("div", { children: "Fusten" }), _jsx("div", { className: "text-right", children: "Stuks" }), _jsx("div", { children: "Beschikbaar" }), _jsx("div", { children: "Prijs/st" }), _jsx("div", { className: "text-right", children: "Totaal" }), _jsx("div", {})] }), _jsx("div", { className: "mt-2 space-y-2 @[60rem]:space-y-0 @[60rem]:divide-y @[60rem]:divide-border", children: lines.map((line, idx) => {
|
|
702
750
|
const { product, eff: effBelading, ppc, crates } = lineInfo[idx];
|
|
703
751
|
const defaultBelading = completeBelading(product);
|
|
704
752
|
const plants = line.quantity ?? null;
|
|
@@ -721,7 +769,8 @@ export function CreateOrderPage() {
|
|
|
721
769
|
const available = product ? Number(product.available_stock ?? 0) : null;
|
|
722
770
|
const unit = product?.unit || "stuks";
|
|
723
771
|
const overStock = !!product && (plants ?? 0) > 0 && (shortage || (available != null && (plants ?? 0) > available));
|
|
724
|
-
const noPrice =
|
|
772
|
+
const noPrice = regelMistPrijs(line);
|
|
773
|
+
const pricePending = !!line.product_id && line.price_mode !== "manual" && !line.price_error && line.price_key !== prijsSleutel(customerId, line.product_id, deliveryDate, line.quantity);
|
|
725
774
|
const impossible = line.product_id ? impossibleByLine[String(idx)] : undefined;
|
|
726
775
|
const missingLine = line.product_id && !impossible ? (missingByLine[String(idx)] ?? missingByProduct[line.product_id]) : undefined;
|
|
727
776
|
const sizeText = product?.plant_height_cm ? `${product.plant_height_cm} cm` : null;
|
|
@@ -752,32 +801,11 @@ export function CreateOrderPage() {
|
|
|
752
801
|
next[idx] = {
|
|
753
802
|
...next[idx], product_id: v, product_name: p?.product ?? "",
|
|
754
803
|
unit: next[idx].unit ?? p?.unit ?? "stuks", quantity: normalizedQ, belading: b,
|
|
755
|
-
|
|
804
|
+
...(next[idx].price_mode === "manual" ? {} : { unit_price: null, price_source: null, price_error: false, price_key: null }),
|
|
756
805
|
};
|
|
757
806
|
focusNext.current = { kind: "crates", idx };
|
|
758
807
|
}
|
|
759
808
|
setLines(next);
|
|
760
|
-
if (v && customerId && !String(customerId).startsWith("twinfield:")) {
|
|
761
|
-
const lineIdx = idx;
|
|
762
|
-
const hadPrice = next[idx].unit_price;
|
|
763
|
-
fetchEffectivePrices({ data: { customerId, onDate: deliveryDate || undefined, lines: [{ productId: v, quantity: Number(next[idx].quantity ?? 0) || undefined }] } })
|
|
764
|
-
.then((res) => {
|
|
765
|
-
const hit = res?.[v];
|
|
766
|
-
if (!hit)
|
|
767
|
-
return;
|
|
768
|
-
setLines((cur) => {
|
|
769
|
-
const copy = [...cur];
|
|
770
|
-
const ln = copy[lineIdx];
|
|
771
|
-
if (!ln || ln.product_id !== v)
|
|
772
|
-
return cur;
|
|
773
|
-
if (ln.unit_price != null && ln.unit_price !== hadPrice)
|
|
774
|
-
return cur;
|
|
775
|
-
copy[lineIdx] = { ...ln, unit_price: hit.price };
|
|
776
|
-
return copy;
|
|
777
|
-
});
|
|
778
|
-
})
|
|
779
|
-
.catch(() => undefined);
|
|
780
|
-
}
|
|
781
809
|
} }), impossible && _jsxs("div", { className: "mt-1 text-xs text-destructive", children: ["Niet in te delen met deze belading: ", impossible] }), missingLine && _jsxs("div", { className: "mt-1 text-xs text-muted-foreground", children: ["Let op: ", missingLine] })] }), _jsxs("label", { className: "order-3 flex h-9 min-w-11 shrink-0 cursor-pointer items-center gap-2 [@media(pointer:coarse)]:h-11 @[60rem]:order-none @[60rem]:justify-center", children: [_jsx("input", { type: "checkbox", className: "h-4 w-4 accent-primary [@media(pointer:coarse)]:h-6 [@media(pointer:coarse)]:w-6", "aria-label": "Sticker nodig", title: "Sticker nodig", checked: line.needs_sticker === true, disabled: !line.product_id, onChange: (e) => { const next = [...lines]; next[idx] = { ...next[idx], needs_sticker: e.target.checked, sticker_manual_for: line.product_id }; setLines(next); } }), _jsx("span", { className: "text-sm @[60rem]:sr-only", children: "Sticker nodig" })] }), _jsxs("div", { className: "order-3 min-w-0 grow basis-[13rem] @[60rem]:order-none @[60rem]:basis-auto", children: [_jsx("div", { className: "mb-1 text-xs text-muted-foreground @[60rem]:sr-only", children: "Belading" }), _jsx(SearchableSelect, { value: effBelading ? beladingKey(effBelading) : null, placeholder: !line.product_id ? "Kies eerst product" : loadingBeladingen ? "Laden…" : noBeladingen ? "Geen belading" : "Kies belading…", disabled: !line.product_id || loadingBeladingen || noBeladingen, allowClear: false, emptyLabel: "Geen belading gekoppeld aan dit product", options: Array.from(optionMap.entries()).map(([key, b]) => ({
|
|
782
810
|
value: key,
|
|
783
811
|
label: beladingLabel(b),
|
|
@@ -807,6 +835,6 @@ export function CreateOrderPage() {
|
|
|
807
835
|
const cr = raw ? Math.max(1, Math.floor(Number(raw))) : null;
|
|
808
836
|
next[idx] = { ...next[idx], quantity: cr === null ? null : cr * ppc };
|
|
809
837
|
setLines(next);
|
|
810
|
-
}, placeholder: ppc === null ? "—" : "Fusten", title: ppc === null ? "Kies eerst een belading" : `${ppc} planten per fust` })] }), _jsxs("div", { className: "grow basis-[7.5rem] @[60rem]:basis-auto order-3 @[60rem]:order-none", children: [_jsx("span", { className: "mb-1 block text-xs text-muted-foreground @[60rem]:sr-only", children: "Stuks" }), _jsx("div", { className: "flex h-9 items-center text-sm tabular-nums text-foreground @[60rem]:justify-end", children: line.product_id && plants ? plants.toLocaleString("nl-NL") : "—" })] }), _jsxs("div", { className: "min-w-0 grow basis-[7.5rem] @[60rem]:basis-auto order-3 @[60rem]:order-none", children: [_jsx("span", { className: "mb-1 block text-xs text-muted-foreground @[60rem]:sr-only", children: "Beschikbaar" }), product ? (_jsxs("div", { className: `flex min-h-9 items-center gap-1 text-sm tabular-nums ${overStock ? (stockBlocked ? "text-destructive" : "text-warning-soft-foreground") : "text-foreground"}`, children: [overStock && _jsx(AlertTriangle, { className: "h-3.5 w-3.5 shrink-0" }), _jsxs("span", { className: "truncate", children: [(available ?? 0).toLocaleString("nl-NL"), " ", unit] })] })) : _jsx("div", { className: "flex h-9 items-center text-sm text-muted-foreground", children: "\u2014" }), overStock && (_jsx("div", { className: `text-xs ${stockBlocked ? "text-destructive" : "text-warning-soft-foreground"}`, children: shortage ? `Tekort ${shortage.missing.toLocaleString("nl-NL")}` : "Meer dan beschikbaar" }))] }), _jsxs("label", { className: "grow basis-[7.5rem] @[60rem]:basis-auto order-3 @[60rem]:order-none", children: [_jsx("span", { className: "mb-1 block text-xs text-muted-foreground @[60rem]:sr-only", children: "Prijs per stuk" }), _jsx(Input, { type: "number", min: 0, step: "0.01", inputMode: "decimal", className: "h-9 tabular-nums [@media(pointer:coarse)]:h-11", value: line.unit_price ?? "", onChange: (e) => { const next = [...lines]; next[idx] = { ...next[idx], unit_price: e.target.value === "" ? null : Number(e.target.value) }; setLines(next); }, placeholder: "\u20AC", "aria-invalid": noPrice }), noPrice &&
|
|
838
|
+
}, placeholder: ppc === null ? "—" : "Fusten", title: ppc === null ? "Kies eerst een belading" : `${ppc} planten per fust` })] }), _jsxs("div", { className: "grow basis-[7.5rem] @[60rem]:basis-auto order-3 @[60rem]:order-none", children: [_jsx("span", { className: "mb-1 block text-xs text-muted-foreground @[60rem]:sr-only", children: "Stuks" }), _jsx("div", { className: "flex h-9 items-center text-sm tabular-nums text-foreground @[60rem]:justify-end", children: line.product_id && plants ? plants.toLocaleString("nl-NL") : "—" })] }), _jsxs("div", { className: "min-w-0 grow basis-[7.5rem] @[60rem]:basis-auto order-3 @[60rem]:order-none", children: [_jsx("span", { className: "mb-1 block text-xs text-muted-foreground @[60rem]:sr-only", children: "Beschikbaar" }), product ? (_jsxs("div", { className: `flex min-h-9 items-center gap-1 text-sm tabular-nums ${overStock ? (stockBlocked ? "text-destructive" : "text-warning-soft-foreground") : "text-foreground"}`, children: [overStock && _jsx(AlertTriangle, { className: "h-3.5 w-3.5 shrink-0" }), _jsxs("span", { className: "truncate", children: [(available ?? 0).toLocaleString("nl-NL"), " ", unit] })] })) : _jsx("div", { className: "flex h-9 items-center text-sm text-muted-foreground", children: "\u2014" }), overStock && (_jsx("div", { className: `text-xs ${stockBlocked ? "text-destructive" : "text-warning-soft-foreground"}`, children: shortage ? `Tekort ${shortage.missing.toLocaleString("nl-NL")}` : "Meer dan beschikbaar" }))] }), _jsxs("label", { className: "grow basis-[7.5rem] @[60rem]:basis-auto order-3 @[60rem]:order-none", children: [_jsx("span", { className: "mb-1 block text-xs text-muted-foreground @[60rem]:sr-only", children: "Prijs per stuk" }), _jsx(Input, { type: "number", min: 0, step: "0.01", inputMode: "decimal", className: "h-9 tabular-nums [@media(pointer:coarse)]:h-11", value: line.unit_price ?? "", onChange: (e) => { const next = [...lines]; next[idx] = { ...next[idx], unit_price: e.target.value === "" ? null : Number(e.target.value), price_mode: "manual", price_source: "Handmatig", price_error: false, price_zero_ok: false }; setLines(next); }, placeholder: "\u20AC", "aria-invalid": noPrice || line.price_error }), line.price_error ? (_jsx("span", { className: "mt-1 block text-xs text-destructive", children: PRIJS_FOUT_TEXT })) : noPrice && !pricePending ? (_jsxs("span", { className: "mt-1 block text-xs text-destructive", children: [PRIJS_ONBEKEND_TEXT, line.unit_price != null && Number(line.unit_price) === 0 && (_jsxs("span", { className: "mt-1 flex items-center gap-1.5 text-foreground [@media(pointer:coarse)]:min-h-11", children: [_jsx("input", { type: "checkbox", className: "h-4 w-4", checked: !!line.price_zero_ok, onChange: (e) => { const next = [...lines]; next[idx] = { ...next[idx], price_zero_ok: e.target.checked }; setLines(next); } }), "Prijs 0 is juist"] }))] })) : line.price_zero_ok && Number(line.unit_price) === 0 ? (_jsx("span", { className: "mt-1 block text-xs text-muted-foreground", children: "Prijs 0 bevestigd" })) : line.price_source ? (_jsx("span", { className: "mt-1 block truncate text-xs text-muted-foreground", title: line.price_source, children: line.price_source })) : null, line.product_id && (line.price_mode === "manual" || line.price_error) && (_jsx("button", { type: "button", className: "mt-0.5 block text-xs font-medium text-primary hover:underline [@media(pointer:coarse)]:min-h-11", onClick: (e) => { e.preventDefault(); const next = [...lines]; next[idx] = { ...next[idx], price_mode: "auto", price_key: null, price_error: false }; setLines(next); }, children: "Prijs opnieuw ophalen" }))] }), _jsxs("div", { className: "grow basis-[7.5rem] @[60rem]:basis-auto order-3 @[60rem]:order-none", children: [_jsx("span", { className: "mb-1 block text-xs text-muted-foreground @[60rem]:sr-only", children: "Totaal" }), _jsx("div", { className: "flex h-9 items-center text-sm font-medium tabular-nums text-foreground @[60rem]:justify-end", children: line.product_id ? eur(lineInfo[idx].total) : "—" })] }), _jsx("div", { className: "order-2 flex shrink-0 justify-end @[60rem]:order-none", children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-9 w-9 [@media(pointer:coarse)]:h-11 [@media(pointer:coarse)]:w-11", onClick: () => setLines(lines.filter((_, i) => i !== idx)), "aria-label": "Regel verwijderen", children: _jsx(Trash2, { className: "h-4 w-4" }) }) })] }, idx));
|
|
811
839
|
}) }), _jsxs("div", { className: "mt-3 flex flex-col gap-3 border-t border-border pt-3 sm:flex-row sm:items-center sm:justify-between", children: [_jsxs(Button, { variant: "outline", className: "h-9 w-full sm:w-auto [@media(pointer:coarse)]:h-11", onClick: addLine, children: [_jsx(Plus, { className: "mr-1 h-4 w-4" }), " Regel toevoegen"] }), _jsxs("div", { className: "flex flex-wrap items-center gap-x-5 gap-y-1 text-sm tabular-nums", children: [_jsxs("span", { className: "text-muted-foreground", children: ["Fusten ", _jsx("span", { className: "font-medium text-foreground", children: totals.crates })] }), _jsxs("span", { className: "text-muted-foreground", children: ["Stuks ", _jsx("span", { className: "font-medium text-foreground", children: totals.stuks.toLocaleString("nl-NL") })] }), _jsxs("span", { className: "text-muted-foreground", children: ["Totaal ", _jsx("span", { className: "font-semibold text-foreground", children: eur(totals.amount) })] })] })] }), stockCheck && stockCheck.shortages.length > 0 && !stockBlocked && (_jsx("div", { className: "mt-3 rounded-lg bg-warning-soft p-2.5 text-xs text-warning-soft-foreground", children: "Uitleveren zonder voorraad staat aan: de bestelling kan met tekort worden aangemaakt." }))] }), _jsxs("section", { className: cardCls, children: [_jsx("h2", { className: h2, children: "Aanvullend" }), _jsxs("div", { className: "mt-4 grid gap-4", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { className: fieldLabel, children: "Referentie klant" }), _jsx(Input, { value: customerReference, maxLength: 100, className: "h-9 [@media(pointer:coarse)]:h-11", onChange: (e) => setCustomerReference(e.target.value), placeholder: "Optioneel, bijvoorbeeld het bestelnummer van je klant" })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { className: fieldLabel, children: "Opmerkingen" }), _jsx(Textarea, { value: notes, onChange: (e) => setNotes(e.target.value), placeholder: "Optionele notities bij deze bestelling", rows: 3 })] })] })] })] }), _jsx("aside", { className: "min-w-0", children: _jsxs("div", { className: `${cardCls} space-y-4 xl:sticky xl:top-4`, children: [_jsx("h2", { className: h2, children: "Samenvatting" }), summaryRows, missingBlock, attentionBlock, createButton(), _jsx(Button, { variant: "ghost", className: "h-9 w-full [@media(pointer:coarse)]:h-11", onClick: () => navigate({ to: "/floriday-verkoop/verkooporders" }), disabled: createMut.isPending, children: "Annuleren" })] }) })] }), _jsxs("div", { className: "sticky bottom-0 z-30 -mx-4 border-t border-border bg-background/95 px-4 pt-3 backdrop-blur sm:-mx-6 sm:px-6 xl:hidden", style: { paddingBottom: "max(12px, env(safe-area-inset-bottom))" }, children: [mobileSummaryOpen && (_jsxs("div", { className: "mb-3 max-h-[50vh] space-y-3 overflow-y-auto", children: [summaryRows, missingBlock, attentionBlock] })), _jsxs("button", { type: "button", className: "mb-2 flex w-full items-center justify-between gap-3 text-left [@media(pointer:coarse)]:min-h-11", onClick: () => setMobileSummaryOpen((o) => !o), "aria-expanded": mobileSummaryOpen, children: [_jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "block truncate text-xs text-muted-foreground", children: momentText ? `Ophalen: ${momentText.replace(/^ophalen /, "")}` : missing.length > 0 ? `${missing.length} ontbreekt nog` : attention.length > 0 ? `${attention.length} aandachtspunt${attention.length === 1 ? "" : "en"}` : "Alles is compleet" }), _jsx("span", { className: "block text-base font-semibold tabular-nums text-foreground", children: eur(totals.amount) })] }), _jsx(ChevronUp, { className: `h-5 w-5 shrink-0 text-muted-foreground transition-transform ${mobileSummaryOpen ? "" : "rotate-180"}` })] }), createButton("h-12")] }), _jsx(ConfirmDialog, { open: zeroConfirmOpen, onOpenChange: setZeroConfirmOpen, title: "Prijs \u20AC 0 bevestigen?", description: `${zeroPriceCount} regel(s) hebben prijs € 0. Deze regels worden zo gefactureerd. Weet je zeker dat dat klopt?`, confirmLabel: "Ja, prijs \u20AC 0 klopt", onConfirm: () => { zeroPriceOkRef.current = true; createMut.mutate(undefined); } }), _jsx(ConfirmDialog, { open: lateConfirmOpen, onOpenChange: setLateConfirmOpen, title: "Toch aanmaken na de aanmeldtijd?", description: LATE_CONFIRM, confirmLabel: "Toch aanmaken", onConfirm: () => createMut.mutate({ lateConfirmed: true }) })] }));
|
|
812
840
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiagnoseConnectionDialog.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/DiagnoseConnectionDialog.tsx"],"names":[],"mappings":"AAiBA,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,YAAY,GACb,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC
|
|
1
|
+
{"version":3,"file":"DiagnoseConnectionDialog.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/DiagnoseConnectionDialog.tsx"],"names":[],"mappings":"AAiBA,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,YAAY,GACb,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,+BAoMA"}
|
|
@@ -2,5 +2,5 @@ export declare function EditLocalOrderDialog({ orderId, open, onOpenChange, }: {
|
|
|
2
2
|
orderId: string;
|
|
3
3
|
open: boolean;
|
|
4
4
|
onOpenChange: (o: boolean) => void;
|
|
5
|
-
}): import("react
|
|
5
|
+
}): import("react").JSX.Element | null;
|
|
6
6
|
//# sourceMappingURL=EditLocalOrderDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditLocalOrderDialog.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/EditLocalOrderDialog.tsx"],"names":[],"mappings":"AAgDA,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,IAAI,EACJ,YAAY,GACb,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,
|
|
1
|
+
{"version":3,"file":"EditLocalOrderDialog.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/EditLocalOrderDialog.tsx"],"names":[],"mappings":"AAgDA,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,IAAI,EACJ,YAAY,GACb,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,sCA6mBA"}
|
|
@@ -3,5 +3,5 @@ export declare function EngineActieButtons({ orderId, acties, onDone }: {
|
|
|
3
3
|
orderId: string;
|
|
4
4
|
acties: EngineActie[];
|
|
5
5
|
onDone?: () => void;
|
|
6
|
-
}): import("react
|
|
6
|
+
}): import("react").JSX.Element | null;
|
|
7
7
|
//# sourceMappingURL=EngineActieButtons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineActieButtons.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/EngineActieButtons.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGtE,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,WAAW,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"EngineActieButtons.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/EngineActieButtons.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGtE,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,WAAW,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,sCAkB9H"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineBufferCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/EngineBufferCard.tsx"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"EngineBufferCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/EngineBufferCard.tsx"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,sCAkJvE"}
|
|
@@ -10,8 +10,8 @@ export declare function FloridayStageLine({ status, stage, floridayFulfilled, is
|
|
|
10
10
|
bufferSize?: number;
|
|
11
11
|
/** Stand wordt nog los nageladen. */
|
|
12
12
|
loading?: boolean;
|
|
13
|
-
}): import("react
|
|
13
|
+
}): import("react").JSX.Element | null;
|
|
14
14
|
export declare function MissingPriceBadge({ show }: {
|
|
15
15
|
show: boolean | undefined;
|
|
16
|
-
}): import("react
|
|
16
|
+
}): import("react").JSX.Element | null;
|
|
17
17
|
//# sourceMappingURL=FloridayStageLine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloridayStageLine.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/FloridayStageLine.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA8D,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC/H,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,uFAAuF;AACvF,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,KAAK,EACL,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,OAAO,GACR,EAAE;IACD,MAAM,EAAE,qBAAqB,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,KAAK,EAAE,UAAU,GAAG,SAAS,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,
|
|
1
|
+
{"version":3,"file":"FloridayStageLine.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/FloridayStageLine.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA8D,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC/H,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,uFAAuF;AACvF,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,KAAK,EACL,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,OAAO,GACR,EAAE;IACD,MAAM,EAAE,qBAAqB,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,KAAK,EAAE,UAAU,GAAG,SAAS,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,sCAkDA;AAED,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,sCAOxE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function FloridaySyncSettingsCard(): import("react
|
|
1
|
+
export declare function FloridaySyncSettingsCard(): import("react").JSX.Element | null;
|
|
2
2
|
//# sourceMappingURL=FloridaySyncSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloridaySyncSettings.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/FloridaySyncSettings.tsx"],"names":[],"mappings":"AAmBA,wBAAgB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"FloridaySyncSettings.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/FloridaySyncSettings.tsx"],"names":[],"mappings":"AAmBA,wBAAgB,wBAAwB,uCAuDvC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function InvoiceSignoffSettingsCard(): import("react
|
|
1
|
+
export declare function InvoiceSignoffSettingsCard(): import("react").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=InvoiceSignoffSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvoiceSignoffSettings.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/InvoiceSignoffSettings.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,0BAA0B,
|
|
1
|
+
{"version":3,"file":"InvoiceSignoffSettings.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/InvoiceSignoffSettings.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,0BAA0B,gCAkDzC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function InvoiceTimingSettingsCard(): import("react
|
|
1
|
+
export declare function InvoiceTimingSettingsCard(): import("react").JSX.Element;
|
|
2
2
|
export default InvoiceTimingSettingsCard;
|
|
3
3
|
//# sourceMappingURL=InvoiceTimingSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvoiceTimingSettings.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/InvoiceTimingSettings.tsx"],"names":[],"mappings":"AA+GA,wBAAgB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"InvoiceTimingSettings.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/InvoiceTimingSettings.tsx"],"names":[],"mappings":"AA+GA,wBAAgB,yBAAyB,gCA2GxC;AAED,eAAe,yBAAyB,CAAC"}
|
|
@@ -2,5 +2,5 @@ export declare function OrderAfleverbrievenCard({ salesOrderId, orderNumber, wer
|
|
|
2
2
|
salesOrderId: string;
|
|
3
3
|
orderNumber?: string;
|
|
4
4
|
werkplek?: string;
|
|
5
|
-
}): import("react
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=OrderAfleverbrievenCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderAfleverbrievenCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderAfleverbrievenCard.tsx"],"names":[],"mappings":"AAuCA,wBAAgB,uBAAuB,CAAC,EACtC,YAAY,EACZ,WAAW,EACX,QAAQ,GACT,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB
|
|
1
|
+
{"version":3,"file":"OrderAfleverbrievenCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderAfleverbrievenCard.tsx"],"names":[],"mappings":"AAuCA,wBAAgB,uBAAuB,CAAC,EACtC,YAAY,EACZ,WAAW,EACX,QAAQ,GACT,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,+BA4MA"}
|
|
@@ -11,5 +11,5 @@ export declare function OrderCarrierPicker({ orderId, applyToBuffer, compact, lo
|
|
|
11
11
|
applyToBuffer?: boolean;
|
|
12
12
|
compact?: boolean;
|
|
13
13
|
locked?: boolean;
|
|
14
|
-
}): import("react
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
15
|
//# sourceMappingURL=OrderCarrierPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderCarrierPicker.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderCarrierPicker.tsx"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,aAAqB,EACrB,OAAe,EACf,MAAc,EACd,SAAS,GACV,EAAE;IACD,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB
|
|
1
|
+
{"version":3,"file":"OrderCarrierPicker.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderCarrierPicker.tsx"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,aAAqB,EACrB,OAAe,EACf,MAAc,EACd,SAAS,GACV,EAAE;IACD,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,+BA2GA"}
|
|
@@ -2,5 +2,5 @@ export declare function OrderControlStatusCard({ floridayId, isControlled, contr
|
|
|
2
2
|
floridayId: string;
|
|
3
3
|
isControlled: boolean;
|
|
4
4
|
controlledAt: string | null;
|
|
5
|
-
}): import("react
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=OrderControlStatusCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderControlStatusCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderControlStatusCard.tsx"],"names":[],"mappings":"AAeA,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,YAAY,EACZ,YAAY,GACb,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B
|
|
1
|
+
{"version":3,"file":"OrderControlStatusCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderControlStatusCard.tsx"],"names":[],"mappings":"AAeA,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,YAAY,EACZ,YAAY,GACb,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,+BA+DA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderInvoiceCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderInvoiceCard.tsx"],"names":[],"mappings":"AAYA,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"OrderInvoiceCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderInvoiceCard.tsx"],"names":[],"mappings":"AAYA,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,sCA6EhE"}
|
|
@@ -7,9 +7,9 @@ export declare function OrderKarindelingCard({ order, pickProgress, }: {
|
|
|
7
7
|
cartsPrinted?: number | null;
|
|
8
8
|
cartsScanned?: number | null;
|
|
9
9
|
} | null;
|
|
10
|
-
}): import("react
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
11
|
/** Lange Engine-tekst volledig tonen; boven ±160 tekens inklapbaar. */
|
|
12
12
|
export declare function ExpandableText({ text }: {
|
|
13
13
|
text: string;
|
|
14
|
-
}): import("react
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
15
|
//# sourceMappingURL=OrderKarindelingCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderKarindelingCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderKarindelingCard.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AA2B/D,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,YAAY,GACb,EAAE;IACD,KAAK,EAAE,aAAa,CAAC;IACrB,2EAA2E;IAC3E,YAAY,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CAClH
|
|
1
|
+
{"version":3,"file":"OrderKarindelingCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderKarindelingCard.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AA2B/D,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,YAAY,GACb,EAAE;IACD,KAAK,EAAE,aAAa,CAAC;IACrB,2EAA2E;IAC3E,YAAY,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CAClH,+BAyRA;AAGD,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,+BAaxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderLinePackingCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderLinePackingCard.tsx"],"names":[],"mappings":"AAwOA,wBAAgB,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"OrderLinePackingCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderLinePackingCard.tsx"],"names":[],"mappings":"AAwOA,wBAAgB,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,sCA4CpE"}
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* Toont het ophaal- en aanmeldmoment zoals de planning het heeft berekend.
|
|
3
3
|
* Zonder `readOnly` kun je een ander moment van de vervoerder kiezen.
|
|
4
4
|
*/
|
|
5
|
-
export declare function OrderPickupMomentPicker({ orderId, readOnly, compact, }: {
|
|
5
|
+
export declare function OrderPickupMomentPicker({ orderId, readOnly, compact, pickupOnly, }: {
|
|
6
6
|
orderId: string;
|
|
7
7
|
readOnly?: boolean;
|
|
8
8
|
compact?: boolean;
|
|
9
|
-
|
|
9
|
+
/** Alleen het ophaalmoment tonen (aanmelden staat dan in een eigen regel). */
|
|
10
|
+
pickupOnly?: boolean;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
10
12
|
//# sourceMappingURL=OrderPickupMomentPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderPickupMomentPicker.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderPickupMomentPicker.tsx"],"names":[],"mappings":"AAQA;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,OAAO,EACP,QAAgB,EAChB,OAAe,
|
|
1
|
+
{"version":3,"file":"OrderPickupMomentPicker.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderPickupMomentPicker.tsx"],"names":[],"mappings":"AAQA;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,OAAO,EACP,QAAgB,EAChB,OAAe,EACf,UAAkB,GACnB,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,+BAwEA"}
|
|
@@ -10,7 +10,7 @@ import { formatMoment } from "../../lib/order-departure.js";
|
|
|
10
10
|
* Toont het ophaal- en aanmeldmoment zoals de planning het heeft berekend.
|
|
11
11
|
* Zonder `readOnly` kun je een ander moment van de vervoerder kiezen.
|
|
12
12
|
*/
|
|
13
|
-
export function OrderPickupMomentPicker({ orderId, readOnly = false, compact = false, }) {
|
|
13
|
+
export function OrderPickupMomentPicker({ orderId, readOnly = false, compact = false, pickupOnly = false, }) {
|
|
14
14
|
const qc = useQueryClient();
|
|
15
15
|
const saveMoment = useServerFn(setOrderPickupMoment);
|
|
16
16
|
const [saving, setSaving] = useState(false);
|
|
@@ -37,5 +37,5 @@ export function OrderPickupMomentPicker({ orderId, readOnly = false, compact = f
|
|
|
37
37
|
return _jsx("span", { className: "text-sm text-muted-foreground", children: "Laden\u2026" });
|
|
38
38
|
const view = data?.view;
|
|
39
39
|
const options = data?.options ?? [];
|
|
40
|
-
return (_jsxs("div", { className: compact ? "space-y-1" : "inline-flex flex-col gap-1", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2 text-sm text-foreground", children: [!compact && _jsx(Clock, { className: "h-4 w-4 text-muted-foreground" }), view?.text ? (_jsxs("span", { children: [view.text, data?.deliveryTime ? (_jsxs("span", { className: "text-muted-foreground", children: [" \u00B7 aanlevering ", data.deliveryTime] })) : null] })) : (_jsx("span", { className: "text-muted-foreground", children: view?.reason ?? "Geen ophaalmoment bekend" })), view?.lateSignup && (_jsx("span", { className: "rounded border border-destructive/40 px-1.5 py-0.5 text-xs text-destructive", children: "te laat aangemeld" }))] }), !readOnly && options.length > 1 && (_jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("select", { className: "h-9 min-w-[18rem] rounded-md border border-border bg-background px-2 text-sm text-foreground disabled:opacity-60", value: data?.selectedKey ?? "", disabled: saving, onChange: (e) => onChange(e.target.value), "aria-label": "Ander ophaalmoment kiezen", children: [!data?.selectedKey && _jsx("option", { value: "", children: "Ander ophaalmoment kiezen\u2026" }), options.map((o) => (_jsx("option", { value: o.key, children: o.label }, o.key)))] }), saving && _jsx("span", { className: "text-xs text-muted-foreground", children: "Opslaan\u2026" })] })), data?.lateOverride && (_jsxs("span", { className: "text-xs text-muted-foreground", children: ["Toch aangemaakt na de aanmeldtijd door ", data.lateOverride.by ?? "onbekend", data.lateOverride.at ? ` op ${formatMoment(data.lateOverride.at)}` : ""] })), error && _jsx("span", { className: "text-xs text-destructive", children: error })] }));
|
|
40
|
+
return (_jsxs("div", { className: compact ? "space-y-1" : "inline-flex flex-col gap-1", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2 text-sm text-foreground", children: [!compact && _jsx(Clock, { className: "h-4 w-4 text-muted-foreground" }), view?.text ? (_jsxs("span", { children: [pickupOnly ? view.short ?? view.text : view.text, !pickupOnly && data?.deliveryTime ? (_jsxs("span", { className: "text-muted-foreground", children: [" \u00B7 aanlevering ", data.deliveryTime] })) : null] })) : (_jsx("span", { className: "text-muted-foreground", children: view?.reason ?? "Geen ophaalmoment bekend" })), view?.lateSignup && (_jsx("span", { className: "rounded border border-destructive/40 px-1.5 py-0.5 text-xs text-destructive", children: "te laat aangemeld" }))] }), !readOnly && options.length > 1 && (_jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("select", { className: "h-9 min-w-[18rem] rounded-md border border-border bg-background px-2 text-sm text-foreground disabled:opacity-60", value: data?.selectedKey ?? "", disabled: saving, onChange: (e) => onChange(e.target.value), "aria-label": "Ander ophaalmoment kiezen", children: [!data?.selectedKey && _jsx("option", { value: "", children: "Ander ophaalmoment kiezen\u2026" }), options.map((o) => (_jsx("option", { value: o.key, children: o.label }, o.key)))] }), saving && _jsx("span", { className: "text-xs text-muted-foreground", children: "Opslaan\u2026" })] })), data?.lateOverride && (_jsxs("span", { className: "text-xs text-muted-foreground", children: ["Toch aangemaakt na de aanmeldtijd door ", data.lateOverride.by ?? "onbekend", data.lateOverride.at ? ` op ${formatMoment(data.lateOverride.at)}` : ""] })), error && _jsx("span", { className: "text-xs text-destructive", children: error })] }));
|
|
41
41
|
}
|