@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.
Files changed (238) hide show
  1. package/dist-lib/components/verkoop/AnalyticsCards.d.ts +1 -1
  2. package/dist-lib/components/verkoop/AnalyticsCards.d.ts.map +1 -1
  3. package/dist-lib/components/verkoop/CartAssignmentWizard.d.ts +1 -1
  4. package/dist-lib/components/verkoop/CartAssignmentWizard.d.ts.map +1 -1
  5. package/dist-lib/components/verkoop/CartLayersDialog.d.ts +1 -1
  6. package/dist-lib/components/verkoop/CartLayersDialog.d.ts.map +1 -1
  7. package/dist-lib/components/verkoop/ConfirmDialog.d.ts +1 -1
  8. package/dist-lib/components/verkoop/ConfirmDialog.d.ts.map +1 -1
  9. package/dist-lib/components/verkoop/CreateOrderPage.d.ts +1 -1
  10. package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
  11. package/dist-lib/components/verkoop/CreateOrderPage.js +60 -32
  12. package/dist-lib/components/verkoop/DiagnoseConnectionDialog.d.ts +1 -1
  13. package/dist-lib/components/verkoop/DiagnoseConnectionDialog.d.ts.map +1 -1
  14. package/dist-lib/components/verkoop/EditLocalOrderDialog.d.ts +1 -1
  15. package/dist-lib/components/verkoop/EditLocalOrderDialog.d.ts.map +1 -1
  16. package/dist-lib/components/verkoop/EngineActieButtons.d.ts +1 -1
  17. package/dist-lib/components/verkoop/EngineActieButtons.d.ts.map +1 -1
  18. package/dist-lib/components/verkoop/EngineBufferCard.d.ts +1 -1
  19. package/dist-lib/components/verkoop/EngineBufferCard.d.ts.map +1 -1
  20. package/dist-lib/components/verkoop/FloridayStageLine.d.ts +2 -2
  21. package/dist-lib/components/verkoop/FloridayStageLine.d.ts.map +1 -1
  22. package/dist-lib/components/verkoop/FloridaySyncSettings.d.ts +1 -1
  23. package/dist-lib/components/verkoop/FloridaySyncSettings.d.ts.map +1 -1
  24. package/dist-lib/components/verkoop/InvoiceSignoffSettings.d.ts +1 -1
  25. package/dist-lib/components/verkoop/InvoiceSignoffSettings.d.ts.map +1 -1
  26. package/dist-lib/components/verkoop/InvoiceTimingSettings.d.ts +1 -1
  27. package/dist-lib/components/verkoop/InvoiceTimingSettings.d.ts.map +1 -1
  28. package/dist-lib/components/verkoop/OrderAfleverbrievenCard.d.ts +1 -1
  29. package/dist-lib/components/verkoop/OrderAfleverbrievenCard.d.ts.map +1 -1
  30. package/dist-lib/components/verkoop/OrderCarrierPicker.d.ts +1 -1
  31. package/dist-lib/components/verkoop/OrderCarrierPicker.d.ts.map +1 -1
  32. package/dist-lib/components/verkoop/OrderControlStatusCard.d.ts +1 -1
  33. package/dist-lib/components/verkoop/OrderControlStatusCard.d.ts.map +1 -1
  34. package/dist-lib/components/verkoop/OrderInvoiceCard.d.ts +1 -1
  35. package/dist-lib/components/verkoop/OrderInvoiceCard.d.ts.map +1 -1
  36. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts +2 -2
  37. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts.map +1 -1
  38. package/dist-lib/components/verkoop/OrderLinePackingCard.d.ts +1 -1
  39. package/dist-lib/components/verkoop/OrderLinePackingCard.d.ts.map +1 -1
  40. package/dist-lib/components/verkoop/OrderPickupMomentPicker.d.ts +4 -2
  41. package/dist-lib/components/verkoop/OrderPickupMomentPicker.d.ts.map +1 -1
  42. package/dist-lib/components/verkoop/OrderPickupMomentPicker.js +2 -2
  43. package/dist-lib/components/verkoop/OrderShipmentsCard.d.ts +1 -1
  44. package/dist-lib/components/verkoop/OrderShipmentsCard.d.ts.map +1 -1
  45. package/dist-lib/components/verkoop/OrderTransportCard.d.ts +46 -0
  46. package/dist-lib/components/verkoop/OrderTransportCard.d.ts.map +1 -0
  47. package/dist-lib/components/verkoop/OrderTransportCard.js +98 -0
  48. package/dist-lib/components/verkoop/PickupLocationsSettings.d.ts +1 -1
  49. package/dist-lib/components/verkoop/PickupLocationsSettings.d.ts.map +1 -1
  50. package/dist-lib/components/verkoop/PlanCoverageBadge.d.ts +1 -1
  51. package/dist-lib/components/verkoop/PlanCoverageBadge.d.ts.map +1 -1
  52. package/dist-lib/components/verkoop/ProductDimensionsSettings.d.ts +1 -1
  53. package/dist-lib/components/verkoop/ProductDimensionsSettings.d.ts.map +1 -1
  54. package/dist-lib/components/verkoop/SalesOrderDetailPage.d.ts +1 -1
  55. package/dist-lib/components/verkoop/SalesOrderDetailPage.d.ts.map +1 -1
  56. package/dist-lib/components/verkoop/SalesOrderDetailPage.js +13 -12
  57. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts +1 -1
  58. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
  59. package/dist-lib/components/verkoop/SalesOrderDetailView.js +7 -4
  60. package/dist-lib/components/verkoop/SalesOrdersFilterPanel.d.ts +1 -1
  61. package/dist-lib/components/verkoop/SalesOrdersFilterPanel.d.ts.map +1 -1
  62. package/dist-lib/components/verkoop/SalesOrdersFilters.d.ts +7 -2
  63. package/dist-lib/components/verkoop/SalesOrdersFilters.d.ts.map +1 -1
  64. package/dist-lib/components/verkoop/SalesOrdersFilters.js +10 -4
  65. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts +1 -1
  66. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  67. package/dist-lib/components/verkoop/SalesOrdersTable.js +8 -1
  68. package/dist-lib/components/verkoop/SearchableSelect.js +1 -1
  69. package/dist-lib/components/verkoop/StockConsumptionAlertsBanner.d.ts +1 -1
  70. package/dist-lib/components/verkoop/StockConsumptionAlertsBanner.d.ts.map +1 -1
  71. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts +1 -1
  72. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  73. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +39 -17
  74. package/dist-lib/components/verkoop/WeekCalendar.d.ts +1 -1
  75. package/dist-lib/components/verkoop/WeekCalendar.d.ts.map +1 -1
  76. package/dist-lib/components/verkoop/klok/KlokNotice.d.ts +3 -0
  77. package/dist-lib/components/verkoop/klok/KlokNotice.d.ts.map +1 -0
  78. package/dist-lib/components/verkoop/klok/KlokNotice.js +12 -0
  79. package/dist-lib/components/verkoop/klok/KlokOrderPage.d.ts +2 -0
  80. package/dist-lib/components/verkoop/klok/KlokOrderPage.d.ts.map +1 -0
  81. package/dist-lib/components/verkoop/klok/KlokOrderPage.js +403 -0
  82. package/dist-lib/components/verkoop/klok/KlokOrdersList.d.ts +10 -0
  83. package/dist-lib/components/verkoop/klok/KlokOrdersList.d.ts.map +1 -0
  84. package/dist-lib/components/verkoop/klok/KlokOrdersList.js +120 -0
  85. package/dist-lib/components/verkoop/klok/KlokPage.d.ts +2 -0
  86. package/dist-lib/components/verkoop/klok/KlokPage.d.ts.map +1 -0
  87. package/dist-lib/components/verkoop/klok/KlokPage.js +82 -0
  88. package/dist-lib/components/verkoop/klok/KlokStatusBadge.d.ts +5 -0
  89. package/dist-lib/components/verkoop/klok/KlokStatusBadge.d.ts.map +1 -0
  90. package/dist-lib/components/verkoop/klok/KlokStatusBadge.js +20 -0
  91. package/dist-lib/components/verkoop/klok/useKlok.d.ts +17 -0
  92. package/dist-lib/components/verkoop/klok/useKlok.d.ts.map +1 -0
  93. package/dist-lib/components/verkoop/klok/useKlok.js +36 -0
  94. package/dist-lib/components/verkoop/v3/ArticlesHover.d.ts +1 -1
  95. package/dist-lib/components/verkoop/v3/ArticlesHover.d.ts.map +1 -1
  96. package/dist-lib/components/verkoop/v3/CustomerName.d.ts +1 -1
  97. package/dist-lib/components/verkoop/v3/CustomerName.d.ts.map +1 -1
  98. package/dist-lib/components/verkoop/v3/EmptyState.d.ts +1 -1
  99. package/dist-lib/components/verkoop/v3/EmptyState.d.ts.map +1 -1
  100. package/dist-lib/components/verkoop/v3/HoverTip.d.ts +1 -1
  101. package/dist-lib/components/verkoop/v3/HoverTip.d.ts.map +1 -1
  102. package/dist-lib/components/verkoop/v3/InfoCard.d.ts +3 -3
  103. package/dist-lib/components/verkoop/v3/InfoCard.d.ts.map +1 -1
  104. package/dist-lib/components/verkoop/v3/KpiTile.d.ts +1 -1
  105. package/dist-lib/components/verkoop/v3/KpiTile.d.ts.map +1 -1
  106. package/dist-lib/components/verkoop/v3/NavigationTooltip.d.ts +1 -1
  107. package/dist-lib/components/verkoop/v3/NavigationTooltip.d.ts.map +1 -1
  108. package/dist-lib/components/verkoop/v3/NoticeBar.d.ts +1 -1
  109. package/dist-lib/components/verkoop/v3/NoticeBar.d.ts.map +1 -1
  110. package/dist-lib/components/verkoop/v3/OrderProgress.d.ts +1 -1
  111. package/dist-lib/components/verkoop/v3/OrderProgress.d.ts.map +1 -1
  112. package/dist-lib/components/verkoop/v3/OrderStepper.d.ts +1 -1
  113. package/dist-lib/components/verkoop/v3/OrderStepper.d.ts.map +1 -1
  114. package/dist-lib/components/verkoop/v3/RowMenu.d.ts +1 -1
  115. package/dist-lib/components/verkoop/v3/RowMenu.d.ts.map +1 -1
  116. package/dist-lib/components/verkoop/v3/ShortcutHelp.d.ts +1 -1
  117. package/dist-lib/components/verkoop/v3/ShortcutHelp.d.ts.map +1 -1
  118. package/dist-lib/components/verkoop/v3/SourceIcon.d.ts +1 -1
  119. package/dist-lib/components/verkoop/v3/SourceIcon.d.ts.map +1 -1
  120. package/dist-lib/index.d.ts +2 -0
  121. package/dist-lib/index.d.ts.map +1 -1
  122. package/dist-lib/index.js +8 -1
  123. package/dist-lib/integrations/supabase/client.js +1 -1
  124. package/dist-lib/integrations/supabase/client.server.js +1 -1
  125. package/dist-lib/integrations/supabase/types.d.ts +1168 -0
  126. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  127. package/dist-lib/lib/all-rows.d.ts +11 -0
  128. package/dist-lib/lib/all-rows.d.ts.map +1 -0
  129. package/dist-lib/lib/all-rows.js +20 -0
  130. package/dist-lib/lib/belading.server.d.ts.map +1 -1
  131. package/dist-lib/lib/belading.server.js +20 -9
  132. package/dist-lib/lib/create-order-form.d.ts +45 -0
  133. package/dist-lib/lib/create-order-form.d.ts.map +1 -1
  134. package/dist-lib/lib/create-order-form.js +72 -0
  135. package/dist-lib/lib/create-order.functions.d.ts +21 -0
  136. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  137. package/dist-lib/lib/create-order.functions.js +63 -5
  138. package/dist-lib/lib/floriday-mirror.server.js +1 -1
  139. package/dist-lib/lib/klok-form.d.ts +59 -0
  140. package/dist-lib/lib/klok-form.d.ts.map +1 -0
  141. package/dist-lib/lib/klok-form.js +127 -0
  142. package/dist-lib/lib/klok-gateway.server.d.ts +35 -0
  143. package/dist-lib/lib/klok-gateway.server.d.ts.map +1 -0
  144. package/dist-lib/lib/klok-gateway.server.js +123 -0
  145. package/dist-lib/lib/klok-labels.d.ts +76 -0
  146. package/dist-lib/lib/klok-labels.d.ts.map +1 -0
  147. package/dist-lib/lib/klok-labels.js +175 -0
  148. package/dist-lib/lib/klok-payload.d.ts +34 -0
  149. package/dist-lib/lib/klok-payload.d.ts.map +1 -0
  150. package/dist-lib/lib/klok-payload.js +38 -0
  151. package/dist-lib/lib/klok-sales-row.d.ts +2 -0
  152. package/dist-lib/lib/klok-sales-row.d.ts.map +1 -0
  153. package/dist-lib/lib/klok-sales-row.js +5 -0
  154. package/dist-lib/lib/klok-sales.server.d.ts +5 -0
  155. package/dist-lib/lib/klok-sales.server.d.ts.map +1 -0
  156. package/dist-lib/lib/klok-sales.server.js +33 -0
  157. package/dist-lib/lib/klok.functions.d.ts +265 -0
  158. package/dist-lib/lib/klok.functions.d.ts.map +1 -0
  159. package/dist-lib/lib/klok.functions.js +355 -0
  160. package/dist-lib/lib/klok.server.d.ts +47 -0
  161. package/dist-lib/lib/klok.server.d.ts.map +1 -0
  162. package/dist-lib/lib/klok.server.js +369 -0
  163. package/dist-lib/lib/module-version.d.ts +1 -1
  164. package/dist-lib/lib/module-version.js +1 -1
  165. package/dist-lib/lib/order-cart-count.server.d.ts +8 -0
  166. package/dist-lib/lib/order-cart-count.server.d.ts.map +1 -0
  167. package/dist-lib/lib/order-cart-count.server.js +69 -0
  168. package/dist-lib/lib/order-search.d.ts +16 -0
  169. package/dist-lib/lib/order-search.d.ts.map +1 -1
  170. package/dist-lib/lib/order-search.js +16 -1
  171. package/dist-lib/lib/order-transport.functions.d.ts +50 -0
  172. package/dist-lib/lib/order-transport.functions.d.ts.map +1 -0
  173. package/dist-lib/lib/order-transport.functions.js +42 -0
  174. package/dist-lib/lib/order-transport.server.d.ts +17 -0
  175. package/dist-lib/lib/order-transport.server.d.ts.map +1 -0
  176. package/dist-lib/lib/order-transport.server.js +45 -0
  177. package/dist-lib/lib/own-transport.d.ts +45 -0
  178. package/dist-lib/lib/own-transport.d.ts.map +1 -1
  179. package/dist-lib/lib/own-transport.js +61 -0
  180. package/dist-lib/lib/salesorders-list.server.d.ts.map +1 -1
  181. package/dist-lib/lib/salesorders-list.server.js +20 -17
  182. package/dist-lib/lib/salesorders-mapping.d.ts +5 -0
  183. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  184. package/dist-lib/lib/salesorders-mapping.js +1 -0
  185. package/dist-lib/lib/tradeitems.functions.d.ts +1117 -12
  186. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  187. package/dist-lib/lib/useBufferCarts.d.ts +2 -2
  188. package/dist-lib/lib/useBufferCarts.d.ts.map +1 -1
  189. package/dist-lib/lib/useBufferEvents.d.ts +2 -2
  190. package/dist-lib/lib/useBufferEvents.d.ts.map +1 -1
  191. package/dist-lib/lib/useLocalSalesOrderDetailQuery.d.ts +2 -2
  192. package/dist-lib/lib/useLocalSalesOrderDetailQuery.d.ts.map +1 -1
  193. package/dist-lib/lib/usePickupMoment.d.ts +2 -2
  194. package/dist-lib/lib/usePickupMoment.d.ts.map +1 -1
  195. package/dist-lib/lib/useSalesOrderDetailQuery.d.ts +1 -1
  196. package/dist-lib/lib/useSalesOrderDetailQuery.d.ts.map +1 -1
  197. package/dist-lib/lib/useSalesOrdersQuery.d.ts +1 -1
  198. package/package.json +22 -4
  199. package/schema/verkoop.sql +213 -0
  200. package/dist-lib/components/floriday/FlorydaySyncHealthBanner.d.ts +0 -9
  201. package/dist-lib/components/floriday/FlorydaySyncHealthBanner.d.ts.map +0 -1
  202. package/dist-lib/components/floriday/FlorydaySyncHealthBanner.js +0 -26
  203. package/dist-lib/components/karindeling/AfmetingenTab.d.ts +0 -6
  204. package/dist-lib/components/karindeling/AfmetingenTab.d.ts.map +0 -1
  205. package/dist-lib/components/karindeling/AfmetingenTab.js +0 -128
  206. package/dist-lib/components/karindeling/KarindelingPage.d.ts +0 -2
  207. package/dist-lib/components/karindeling/KarindelingPage.d.ts.map +0 -1
  208. package/dist-lib/components/karindeling/KarindelingPage.js +0 -102
  209. package/dist-lib/components/ui/dropdown-menu.d.ts +0 -9
  210. package/dist-lib/components/ui/dropdown-menu.d.ts.map +0 -1
  211. package/dist-lib/components/ui/dropdown-menu.js +0 -14
  212. package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.d.ts +0 -4
  213. package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.d.ts.map +0 -1
  214. package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.js +0 -95
  215. package/dist-lib/components/verkoop/CreateOrderDialog.d.ts +0 -5
  216. package/dist-lib/components/verkoop/CreateOrderDialog.d.ts.map +0 -1
  217. package/dist-lib/components/verkoop/CreateOrderDialog.js +0 -33
  218. package/dist-lib/lib/cron/mirror-floriday-orders.d.ts +0 -4
  219. package/dist-lib/lib/cron/mirror-floriday-orders.d.ts.map +0 -1
  220. package/dist-lib/lib/cron/mirror-floriday-orders.js +0 -23
  221. package/dist-lib/lib/cron/push-order-statuses.d.ts +0 -4
  222. package/dist-lib/lib/cron/push-order-statuses.d.ts.map +0 -1
  223. package/dist-lib/lib/cron/push-order-statuses.js +0 -23
  224. package/dist-lib/lib/floriday/floriday.server.d.ts +0 -14
  225. package/dist-lib/lib/floriday/floriday.server.d.ts.map +0 -1
  226. package/dist-lib/lib/floriday/floriday.server.js +0 -92
  227. package/dist-lib/lib/floriday/sales-orders.functions.d.ts +0 -4736
  228. package/dist-lib/lib/floriday/sales-orders.functions.d.ts.map +0 -1
  229. package/dist-lib/lib/floriday/sales-orders.functions.js +0 -193
  230. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +0 -77581
  231. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +0 -1
  232. package/dist-lib/lib/floriday-auto-fulfillment.functions.js +0 -65
  233. package/dist-lib/lib/floriday-auto-fulfillment.server.d.ts +0 -21
  234. package/dist-lib/lib/floriday-auto-fulfillment.server.d.ts.map +0 -1
  235. package/dist-lib/lib/floriday-auto-fulfillment.server.js +0 -352
  236. package/dist-lib/lib/floriday-status-sync.server.d.ts +0 -14
  237. package/dist-lib/lib/floriday-status-sync.server.d.ts.map +0 -1
  238. package/dist-lib/lib/floriday-status-sync.server.js +0 -130
@@ -1,5 +1,5 @@
1
1
  import type { SalesOrderDTO } from "../../lib/salesorders-mapping.js";
2
2
  export declare function OrderShipmentsCard({ order }: {
3
3
  order: SalesOrderDTO;
4
- }): import("react/jsx-runtime").JSX.Element | null;
4
+ }): import("react").JSX.Element | null;
5
5
  //# sourceMappingURL=OrderShipmentsCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OrderShipmentsCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderShipmentsCard.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AA6C/D,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,kDAQrE"}
1
+ {"version":3,"file":"OrderShipmentsCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderShipmentsCard.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AA6C/D,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,sCAQrE"}
@@ -0,0 +1,46 @@
1
+ import { type ReactNode } from "react";
2
+ import type { SalesOrderDTO } from "../../lib/salesorders-mapping.js";
3
+ export declare const orderTransportKey: (orderId: string) => readonly ["order-transport", string];
4
+ export declare function useOrderTransport(orderId: string | null | undefined, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
5
+ orderRowId: string;
6
+ deliveryDate: string | null;
7
+ carrier: import("../../lib/carrier-resolve.js").ResolvedCarrier;
8
+ carrierGln: string | null;
9
+ own: boolean;
10
+ ownKind: string | null;
11
+ ownPickup: {
12
+ date: string;
13
+ time: string;
14
+ } | null;
15
+ locked: boolean;
16
+ lockReason: import("../../lib/own-transport.js").PickupLockReason;
17
+ lockKnown: boolean;
18
+ }, Error>;
19
+ /** "do 29 okt 15:00" uit { date, time }. */
20
+ export declare function ownPickupText(p: {
21
+ date: string;
22
+ time: string;
23
+ } | null | undefined): string | null;
24
+ /** Ophaaltijd invullen/wijzigen bij eigen vervoer of klant haalt op. */
25
+ export declare function OwnPickupEditor({ orderId, kind, current, defaultDate, locked, lockedText }: {
26
+ orderId: string;
27
+ kind: string | null;
28
+ current: {
29
+ date: string;
30
+ time: string;
31
+ } | null;
32
+ defaultDate: string | null;
33
+ locked: boolean;
34
+ lockedText?: string;
35
+ }): import("react").JSX.Element;
36
+ /** Blok "Vervoer" op de orderpagina; ontbrekende velden worden weggelaten. */
37
+ export declare function OrderTransportCard({ order, groupSize, extra }: {
38
+ order: SalesOrderDTO;
39
+ groupSize?: number;
40
+ extra?: ReactNode;
41
+ }): import("react").JSX.Element;
42
+ /** Kopregel van een handmatige order: "Ophalen do 29 okt 15:00 · Levering vr 30 okt 08:00". */
43
+ export declare function PickupDeliveryLine({ order }: {
44
+ order: SalesOrderDTO;
45
+ }): import("react").JSX.Element | null;
46
+ //# sourceMappingURL=OrderTransportCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderTransportCard.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/OrderTransportCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAcjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAGnE,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,yCAA0C,CAAC;AAE5F,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,UAAO;;;;;;;;;;;;;;UAQnF;AAED,4CAA4C;AAC5C,wBAAgB,aAAa,CAAC,CAAC,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAIjG;AAED,wEAAwE;AACxE,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAmC,EAAE,EAAE;IACpH,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC/C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,+BAuCA;AAED,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,+BAsF9H;AAED,+FAA+F;AAC/F,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,sCAWrE"}
@@ -0,0 +1,98 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { useQuery, useQueryClient } from "@tanstack/react-query";
4
+ import { useServerFn } from "@tanstack/react-start";
5
+ import { AlertTriangle, Truck } from "lucide-react";
6
+ import { Badge, Button, Input } from "@flowselections/core";
7
+ import { InfoCard, InfoRow } from "./v3/InfoCard.js";
8
+ import { OrderCarrierPicker } from "./OrderCarrierPicker.js";
9
+ import { OrderPickupMomentPicker } from "./OrderPickupMomentPicker.js";
10
+ import { usePickupMoment } from "../../lib/usePickupMoment.js";
11
+ import { formatMoment } from "../../lib/order-departure.js";
12
+ import { dateWithWeekday } from "../../lib/create-order-form.js";
13
+ import { getOrderTransport, setOrderOwnPickupTime } from "../../lib/order-transport.functions.js";
14
+ import { OWN_PICKUP_LOCKED_TEXT, OWN_PICKUP_MISSING_TEXT, OWN_PICKUP_UNKNOWN_TEXT, ownPickupLabel, ownPickupPlannedText, ownPickupView } from "../../lib/own-transport.js";
15
+ import { formatLoadUnits } from "../../lib/load-carrier-labels.js";
16
+ import { formatDelivery, deliveryHasTimeFor, deliveryIsWallClockFor } from "../../lib/delivery-format.js";
17
+ export const orderTransportKey = (orderId) => ["order-transport", orderId];
18
+ export function useOrderTransport(orderId, enabled = true) {
19
+ const fetchT = useServerFn(getOrderTransport);
20
+ return useQuery({
21
+ queryKey: orderTransportKey(orderId ?? ""),
22
+ queryFn: () => fetchT({ data: { orderId: orderId } }),
23
+ enabled: !!orderId && enabled,
24
+ staleTime: 30000,
25
+ });
26
+ }
27
+ /** "do 29 okt 15:00" uit { date, time }. */
28
+ export function ownPickupText(p) {
29
+ if (!p)
30
+ return null;
31
+ const d = dateWithWeekday(p.date);
32
+ return d ? `${d.replace(/ \d{4}$/, "")} ${p.time}` : null;
33
+ }
34
+ /** Ophaaltijd invullen/wijzigen bij eigen vervoer of klant haalt op. */
35
+ export function OwnPickupEditor({ orderId, kind, current, defaultDate, locked, lockedText = OWN_PICKUP_LOCKED_TEXT }) {
36
+ const qc = useQueryClient();
37
+ const save = useServerFn(setOrderOwnPickupTime);
38
+ const [date, setDate] = useState(current?.date ?? defaultDate ?? "");
39
+ const [time, setTime] = useState(current?.time ?? "");
40
+ const [busy, setBusy] = useState(false);
41
+ const [error, setError] = useState(null);
42
+ const label = ownPickupLabel(kind);
43
+ const onSave = async () => {
44
+ setBusy(true);
45
+ setError(null);
46
+ try {
47
+ const res = await save({ data: { orderId, date, time } });
48
+ if (!res.ok) {
49
+ setError(res.reason);
50
+ return;
51
+ }
52
+ await Promise.all([
53
+ qc.invalidateQueries({ queryKey: ["order-transport"] }),
54
+ qc.invalidateQueries({ queryKey: ["order-pickup-moment"] }),
55
+ qc.invalidateQueries({ queryKey: ["sales-orders"] }),
56
+ ]);
57
+ }
58
+ catch (e) {
59
+ console.error("[vervoer] ophaaltijd opslaan", e);
60
+ setError("De ophaaltijd is niet opgeslagen. Probeer het opnieuw of neem contact op met de beheerder.");
61
+ }
62
+ finally {
63
+ setBusy(false);
64
+ }
65
+ };
66
+ return (_jsxs("div", { className: "space-y-1", title: locked ? lockedText : undefined, children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Input, { type: "date", "aria-label": `${label}: datum`, className: "h-9 w-40 [@media(pointer:coarse)]:h-11", value: date, disabled: locked || busy, onChange: (e) => setDate(e.target.value) }), _jsx(Input, { type: "time", "aria-label": label, className: "h-9 w-28 [@media(pointer:coarse)]:h-11", value: time, disabled: locked || busy, onChange: (e) => setTime(e.target.value) }), _jsx(Button, { size: "sm", variant: "outline", className: "[@media(pointer:coarse)]:h-11", disabled: locked || busy || !date || !time || (current?.date === date && current?.time === time), onClick: onSave, children: busy ? "Opslaan…" : "Opslaan" })] }), locked && _jsx("div", { className: "text-xs text-muted-foreground", children: lockedText }), error && _jsx("div", { className: "text-xs text-destructive", children: error })] }));
67
+ }
68
+ /** Blok "Vervoer" op de orderpagina; ontbrekende velden worden weggelaten. */
69
+ export function OrderTransportCard({ order, groupSize, extra }) {
70
+ const orderId = String(order.id);
71
+ const locked = !!order.isReservation;
72
+ const q = useOrderTransport(orderId, !locked);
73
+ const pm = usePickupMoment(orderId);
74
+ const [changing, setChanging] = useState(false);
75
+ const t = q.data;
76
+ const carrier = t?.carrier ?? null;
77
+ const hasCarrier = carrier?.state === "ok" && !!carrier.carrierName;
78
+ const manual = carrier?.source === "handmatig";
79
+ const view = ownPickupView({ own: !!t?.own, ownPickup: t?.ownPickup ?? null, lockReason: t?.lockReason ?? (t?.locked ? "onbekend" : null), plannedShort: pm.data?.view?.short ?? null });
80
+ const missingOwnTime = view.melding === "invullen";
81
+ const signup = !t?.own ? formatMoment(pm.data?.departure?.signupDeadline ?? null) : null;
82
+ const karren = Number(order.karCount ?? 0);
83
+ return (_jsxs(InfoCard, { icon: _jsx(Truck, {}), title: "Vervoer", attention: missingOwnTime, action: !locked ? (_jsx(Button, { size: "sm", variant: "ghost", className: "[@media(pointer:coarse)]:h-11", onClick: () => setChanging((v) => !v), "aria-expanded": changing, children: changing ? "Klaar" : "Vervoerder wijzigen" })) : undefined, children: [(groupSize ?? 0) > 1 && (_jsxs("div", { className: "mb-2 rounded-lg border border-warning/40 bg-warning-soft px-3 py-2 text-xs font-medium text-warning-soft-foreground", children: ["Vervoerder en ophaalmoment gelden voor alle ", groupSize, " orders in deze groep."] })), missingOwnTime && (_jsxs("div", { role: "status", className: "mb-2 flex items-start gap-2 rounded-lg border border-warning/40 bg-warning-soft px-3 py-2 text-xs font-medium text-warning-soft-foreground", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-3.5 w-3.5 shrink-0", "aria-hidden": true }), " ", OWN_PICKUP_MISSING_TEXT] })), view.melding === "onbekend" && !t?.ownPickup && (_jsx("div", { role: "status", className: "mb-2 rounded-lg border border-border bg-muted/40 px-3 py-2 text-xs text-muted-foreground", children: OWN_PICKUP_UNKNOWN_TEXT })), locked ? (_jsx(InfoRow, { label: "Vervoerder", children: _jsx(OrderCarrierPicker, { orderId: orderId, locked: true, compact: true }) })) : changing ? (_jsx(InfoRow, { label: "Vervoerder", children: _jsx(OrderCarrierPicker, { orderId: orderId, compact: true, groupSize: groupSize }) })) : q.isLoading ? (_jsx(InfoRow, { label: "Vervoerder", children: _jsx("span", { className: "text-sm text-muted-foreground", children: "Laden\u2026" }) })) : q.isError ? (_jsx(InfoRow, { label: "Vervoerder", children: _jsx("span", { className: "text-sm text-destructive", children: "Vervoer kon niet worden geladen. Ververs de pagina." }) })) : hasCarrier ? (_jsx(InfoRow, { label: "Vervoerder", children: _jsxs("span", { className: "inline-flex flex-wrap items-center gap-2", children: [_jsx("span", { children: carrier.carrierName }), _jsx(Badge, { variant: "outline", className: "text-xs", children: manual ? "Handmatig" : "Automatisch" })] }) })) : (_jsx(InfoRow, { label: "Vervoerder", children: _jsx("span", { className: "text-sm text-muted-foreground", children: "Nog geen vervoerder" }) })), !locked && t?.own && !view.editable && !t.ownPickup ? (_jsx(InfoRow, { label: ownPickupLabel(t.ownKind), children: _jsxs("div", { className: "space-y-0.5", children: [view.kopTijd && _jsx("div", { className: "tabular-nums", children: view.kopTijd }), view.melding === "planning" && _jsx("div", { className: "text-xs text-muted-foreground", children: ownPickupPlannedText(view.plannedTime) })] }) })) : !locked && t?.own ? (_jsx(InfoRow, { label: ownPickupLabel(t.ownKind), children: _jsx(OwnPickupEditor, { orderId: orderId, kind: t.ownKind, current: t.ownPickup, defaultDate: t.deliveryDate, locked: t.locked, lockedText: t.lockReason === "onbekend" ? OWN_PICKUP_UNKNOWN_TEXT : OWN_PICKUP_LOCKED_TEXT }, `${t.ownPickup?.date ?? ""}|${t.ownPickup?.time ?? ""}`) })) : !locked && t && !t.own ? (_jsx(InfoRow, { label: "Ophaalmoment", children: _jsx(OrderPickupMomentPicker, { orderId: orderId, pickupOnly: true, compact: true }) })) : null, signup && _jsx(InfoRow, { label: "Aanmelden v\u00F3\u00F3r", children: signup }), t?.carrierGln && _jsx(InfoRow, { label: "GLN vervoerder", children: t.carrierGln }), order.cartTypeName && _jsx(InfoRow, { label: "Ladingdrager", children: order.cartTypeName }), karren > 0 && _jsx(InfoRow, { label: "Karren", children: formatLoadUnits(karren, order.cartTypeName ?? null) }), extra] }));
84
+ }
85
+ /** Kopregel van een handmatige order: "Ophalen do 29 okt 15:00 · Levering vr 30 okt 08:00". */
86
+ export function PickupDeliveryLine({ order }) {
87
+ const orderId = String(order.id);
88
+ const t = useOrderTransport(orderId, !order.isReservation);
89
+ const pm = usePickupMoment(orderId);
90
+ // Zelfde bron als het blok Vervoer: eigen tijd, anders het moment uit de planning.
91
+ const pickup = (t.data?.own ? ownPickupText(t.data.ownPickup) : null) ?? pm.data?.view?.short ?? null;
92
+ const d = order.deliveryAt ? formatDelivery(order.deliveryAt, deliveryHasTimeFor(order), { wallClock: deliveryIsWallClockFor(order) }) : null;
93
+ const levering = d ? [d.date, d.time].filter(Boolean).join(" ") : null;
94
+ const parts = [pickup ? `Ophalen ${pickup}` : null, levering ? `Levering ${levering}` : null].filter(Boolean);
95
+ if (!parts.length)
96
+ return null;
97
+ return _jsx("p", { className: "text-sm font-medium tabular-nums text-foreground", children: parts.join(" · ") });
98
+ }
@@ -1,2 +1,2 @@
1
- export declare function PickupLocationsSettingsCard(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function PickupLocationsSettingsCard(): import("react").JSX.Element;
2
2
  //# sourceMappingURL=PickupLocationsSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PickupLocationsSettings.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/PickupLocationsSettings.tsx"],"names":[],"mappings":"AA4DA,wBAAgB,2BAA2B,4CAwM1C"}
1
+ {"version":3,"file":"PickupLocationsSettings.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/PickupLocationsSettings.tsx"],"names":[],"mappings":"AA4DA,wBAAgB,2BAA2B,gCAwM1C"}
@@ -2,5 +2,5 @@ import { type PlanCoverageSummary } from "../../lib/plan-coverage.js";
2
2
  export declare function PlanCoverageBadge({ coverage, showReason, }: {
3
3
  coverage: PlanCoverageSummary | null | undefined;
4
4
  showReason?: boolean;
5
- }): import("react/jsx-runtime").JSX.Element | null;
5
+ }): import("react").JSX.Element | null;
6
6
  //# sourceMappingURL=PlanCoverageBadge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlanCoverageBadge.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/PlanCoverageBadge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAGnF,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,UAAiB,GAClB,EAAE;IACD,QAAQ,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,kDAsCA"}
1
+ {"version":3,"file":"PlanCoverageBadge.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/PlanCoverageBadge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAGnF,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,UAAiB,GAClB,EAAE;IACD,QAAQ,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,sCAsCA"}
@@ -1,2 +1,2 @@
1
- export declare function ProductDimensionsSettingsCard(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function ProductDimensionsSettingsCard(): import("react").JSX.Element;
2
2
  //# sourceMappingURL=ProductDimensionsSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductDimensionsSettings.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/ProductDimensionsSettings.tsx"],"names":[],"mappings":"AA0BA,wBAAgB,6BAA6B,4CAoK5C"}
1
+ {"version":3,"file":"ProductDimensionsSettings.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/ProductDimensionsSettings.tsx"],"names":[],"mappings":"AA0BA,wBAAgB,6BAA6B,gCAoK5C"}
@@ -1,2 +1,2 @@
1
- export declare function SalesOrderDetailPage(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function SalesOrderDetailPage(): import("react").JSX.Element;
2
2
  //# sourceMappingURL=SalesOrderDetailPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SalesOrderDetailPage.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/SalesOrderDetailPage.tsx"],"names":[],"mappings":"AAwHA,wBAAgB,oBAAoB,4CAmWnC"}
1
+ {"version":3,"file":"SalesOrderDetailPage.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/SalesOrderDetailPage.tsx"],"names":[],"mappings":"AAyHA,wBAAgB,oBAAoB,gCAoWnC"}
@@ -8,14 +8,14 @@ import { useQuery, useQueryClient } from "@tanstack/react-query";
8
8
  import { useServerFn } from "@tanstack/react-start";
9
9
  import { Badge, Button, Skeleton } from "@flowselections/core";
10
10
  import { ArrowLeft, ChevronLeft, ChevronRight, ChevronDown, Pencil, Layers, ImageIcon, MapPin, Truck, Euro, Boxes, User, ReceiptText, AlertTriangle } from "lucide-react";
11
- import { SalesOrderDetailView } from "../../components/verkoop/SalesOrderDetailView.js";
11
+ import { SalesOrderDetailView } from "./SalesOrderDetailView.js";
12
12
  import { formatLoadUnits, mergeTypeNames } from "../../lib/load-carrier-labels.js";
13
- import { OrderKarindelingCard } from "../../components/verkoop/OrderKarindelingCard.js";
14
- import { EngineBufferCard } from "../../components/verkoop/EngineBufferCard.js";
15
- import { OrderCarrierPicker } from "../../components/verkoop/OrderCarrierPicker.js";
16
- import { OrderPickupMomentPicker } from "../../components/verkoop/OrderPickupMomentPicker.js";
17
- import { EditLocalOrderDialog } from "../../components/verkoop/EditLocalOrderDialog.js";
18
- import { OrderInvoiceCard } from "../../components/verkoop/OrderInvoiceCard.js";
13
+ import { OrderKarindelingCard } from "./OrderKarindelingCard.js";
14
+ import { EngineBufferCard } from "./EngineBufferCard.js";
15
+ import { OrderCarrierPicker } from "./OrderCarrierPicker.js";
16
+ import { OrderPickupMomentPicker } from "./OrderPickupMomentPicker.js";
17
+ import { EditLocalOrderDialog } from "./EditLocalOrderDialog.js";
18
+ import { OrderInvoiceCard } from "./OrderInvoiceCard.js";
19
19
  import { orderUuid } from "../../lib/order-price-lock.js";
20
20
  import { useBufferCarts } from "../../lib/useBufferCarts.js";
21
21
  import { ladingdragerSummary } from "../../lib/buffer-carts.js";
@@ -28,10 +28,11 @@ import { orderStageLabel, orderStageBadgeClass } from "../../lib/order-status.js
28
28
  import { useDetailProgressFallback } from "../../lib/useDetailProgressFallback.js";
29
29
  import { toProgressMember } from "../../lib/order-progress.js";
30
30
  import { listHref, markRestore, neighbours } from "../../lib/order-nav.js";
31
- import { SourceIcon, sourceLabel } from "../../components/verkoop/v3/SourceIcon.js";
32
- import { OrderStepper } from "../../components/verkoop/v3/OrderStepper.js";
33
- import { NavigationTooltip } from "../../components/verkoop/v3/NavigationTooltip.js";
34
- import { FactTile, InfoCard, InfoRow } from "../../components/verkoop/v3/InfoCard.js";
31
+ import { SourceIcon, sourceLabel } from "./v3/SourceIcon.js";
32
+ import { OrderStepper } from "./v3/OrderStepper.js";
33
+ import { NavigationTooltip } from "./v3/NavigationTooltip.js";
34
+ import { FactTile, InfoCard, InfoRow } from "./v3/InfoCard.js";
35
+ import { PickupDeliveryLine } from "./OrderTransportCard.js";
35
36
  const eur = new Intl.NumberFormat("nl-NL", { style: "currency", currency: "EUR", minimumFractionDigits: 2, maximumFractionDigits: 2 });
36
37
  function fmtDT(iso) {
37
38
  if (!iso)
@@ -244,7 +245,7 @@ export function SalesOrderDetailPage() {
244
245
  const fTotal = floridayMembers.reduce((s, m) => s + m.floridayTotal, 0);
245
246
  return (_jsxs("main", { className: "mx-auto w-full max-w-[1200px] space-y-4 p-4 pb-24 sm:p-6", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsx(NavigationTooltip, { label: "Terug naar verkooporders", shortcut: "Esc", children: _jsx(Button, { asChild: true, variant: "ghost", size: "sm", className: "-ml-2", children: backHref ? (_jsxs("a", { ref: backLink, href: backHref, onClick: () => markRestore(), "aria-keyshortcuts": "Escape", children: [_jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }), " Terug naar verkooporders"] })) : (_jsxs(Link, { ref: backLink, to: "/floriday-verkoop/verkooporders", "aria-keyshortcuts": "Escape", children: [_jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }), " Terug naar verkooporders"] })) }) }), nav && (nav.prev || nav.next) && (_jsxs("div", { className: "flex items-center gap-2", children: [nav.prev ? (_jsx(NavigationTooltip, { label: "Vorige order", shortcut: "\u2190", children: _jsx(Button, { asChild: true, variant: "outline", size: "sm", children: _jsxs(Link, { ref: previousLink, to: "/floriday-verkoop/verkooporders/$salesOrderId", params: { salesOrderId: nav.prev }, "aria-keyshortcuts": "ArrowLeft", children: [_jsx(ChevronLeft, { className: "mr-1 h-4 w-4" }), " Vorige"] }) }) })) : null, nav.next ? (_jsx(NavigationTooltip, { label: "Volgende order", shortcut: "\u2192", children: _jsx(Button, { asChild: true, variant: "outline", size: "sm", children: _jsxs(Link, { ref: nextLink, to: "/floriday-verkoop/verkooporders/$salesOrderId", params: { salesOrderId: nav.next }, "aria-keyshortcuts": "ArrowRight", children: ["Volgende ", _jsx(ChevronRight, { className: "ml-1 h-4 w-4" })] }) }) })) : null] }))] }), head && (_jsxs("header", { className: "flex flex-col gap-3 rounded-xl border border-border bg-card p-4 shadow-sm sm:flex-row sm:items-center sm:justify-between sm:p-5", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [_jsx("span", { className: "inline-flex h-14 w-14 shrink-0 items-center justify-center rounded-xl bg-primary/10", children: _jsx(SourceIcon, { sources: sources }) }), _jsxs("div", { className: "min-w-0 space-y-0.5", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("h1", { className: "truncate text-xl font-bold tracking-tight text-foreground sm:text-2xl", children: isBuffer ? `Samengevoegde order · ${bufferOrders.length} orders` : head.orderNumber || "Order" }), !isBuffer && (_jsx("span", { className: `rounded-full px-2 py-0.5 text-xs font-medium ${orderStageBadgeClass(head.stage ?? "incoming")}`, children: orderStageLabel(head.stage ?? (head.status?.isCancelled ? "cancelled" : "incoming")) }))] }), _jsx("p", { className: "text-sm text-muted-foreground", children: isBuffer
246
247
  ? head.customer.name
247
- : `${sourceLabel(sources[0])}-order` }), isBuffer && fTotal > 0 && (_jsxs("p", { className: "text-xs font-medium tabular-nums text-foreground", children: ["Afgemeld: ", fDone, " van ", fTotal] })), !isBuffer && fmtDT(head.orderedAt) && (_jsxs("p", { className: "text-xs text-muted-foreground", children: ["Ontvangen op ", fmtDT(head.orderedAt)] }))] })] }), rawLocalId && !isBuffer && (_jsxs(Button, { variant: "outline", size: "sm", onClick: () => setEditOpen(true), disabled: !primary, className: "w-full sm:w-auto", children: [_jsx(Pencil, { className: "mr-2 h-4 w-4" }), " Bestelling bewerken"] }))] })), singleInGroup && inGroup && primary && (_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2 rounded-xl border border-primary/30 bg-primary/5 px-4 py-3 text-sm", children: [_jsxs("span", { className: "inline-flex items-center gap-2 text-foreground", children: [_jsx(Layers, { className: "h-4 w-4 text-primary" }), " Onderdeel van een samengevoegde order met ", bufferOrders.length, " orders"] }), _jsx(Button, { asChild: true, variant: "outline", size: "sm", children: _jsx(Link, { to: "/floriday-verkoop/verkooporders/$salesOrderId", params: { salesOrderId }, children: "Naar samengevoegde weergave" }) })] })), primary && _jsx(OrderStepper, { members: membersFor(isBuffer ? bufferOrders : [primary]), features: features, invoiceLoad: invoiceLoad }), isLoading && !primary && _jsx(DetailSkeleton, {}), error && !primary && (() => {
248
+ : `${sourceLabel(sources[0])}-order` }), isBuffer && fTotal > 0 && (_jsxs("p", { className: "text-xs font-medium tabular-nums text-foreground", children: ["Afgemeld: ", fDone, " van ", fTotal] })), !isBuffer && isLocal && _jsx(PickupDeliveryLine, { order: head }), !isBuffer && fmtDT(head.orderedAt) && (_jsxs("p", { className: "text-xs text-muted-foreground", children: ["Ontvangen op ", fmtDT(head.orderedAt)] }))] })] }), rawLocalId && !isBuffer && (_jsxs(Button, { variant: "outline", size: "sm", onClick: () => setEditOpen(true), disabled: !primary, className: "w-full sm:w-auto", children: [_jsx(Pencil, { className: "mr-2 h-4 w-4" }), " Bestelling bewerken"] }))] })), singleInGroup && inGroup && primary && (_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2 rounded-xl border border-primary/30 bg-primary/5 px-4 py-3 text-sm", children: [_jsxs("span", { className: "inline-flex items-center gap-2 text-foreground", children: [_jsx(Layers, { className: "h-4 w-4 text-primary" }), " Onderdeel van een samengevoegde order met ", bufferOrders.length, " orders"] }), _jsx(Button, { asChild: true, variant: "outline", size: "sm", children: _jsx(Link, { to: "/floriday-verkoop/verkooporders/$salesOrderId", params: { salesOrderId }, children: "Naar samengevoegde weergave" }) })] })), primary && _jsx(OrderStepper, { members: membersFor(isBuffer ? bufferOrders : [primary]), features: features, invoiceLoad: invoiceLoad }), isLoading && !primary && _jsx(DetailSkeleton, {}), error && !primary && (() => {
248
249
  const f = friendlyLoadError(error);
249
250
  return (_jsxs("div", { role: "alert", className: "flex items-start gap-3 rounded-xl border border-destructive/30 bg-destructive-soft p-4 text-sm", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-5 w-5 shrink-0 text-destructive" }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "font-medium text-foreground", children: f.text }), _jsxs("details", { className: "mt-1 text-xs text-muted-foreground", children: [_jsx("summary", { className: "cursor-pointer", children: "Technische details" }), f.tech] })] }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => activeQuery.refetch(), children: "Opnieuw" })] }));
250
251
  })(), !isLoading && !error && !primary && (_jsx("div", { className: "rounded-xl border border-border bg-card p-8 text-center text-sm text-muted-foreground shadow-sm", children: "Order niet gevonden." })), primary && isBuffer && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-4", children: [_jsx(FactTile, { icon: _jsx(Euro, {}), label: "Totale omzet", value: eur.format(totals.revenue), sub: `${bufferOrders.length} orders` }), _jsx(FactTile, { icon: _jsx(Boxes, {}), label: "Karren", value: engineBuffer ? engineBuffer.karren : totals.karren == null ? "Nog niet bekend" : formatLoadUnits(totals.karren, totals.cartType), sub: engineBuffer && engineBuffer.ladingdragers.length > 0 ? ladingdragerSummary(engineBuffer) : undefined }), _jsx(FactTile, { icon: _jsx(Layers, {}), label: "Fust", value: formatLoadUnits(totals.fusten, totals.crateType) }), _jsx(FactTile, { icon: _jsx(User, {}), label: "Klant", value: primary.customer.name, sub: primary.customer.legalName ?? undefined })] }), _jsxs("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]", children: [_jsxs("div", { className: "min-w-0 space-y-4", children: [_jsx(InfoCard, { icon: _jsx(Layers, {}), title: `Orders in deze groep (${bufferOrders.length})`, children: _jsx("div", { className: "space-y-3", children: bufferOrders.map((o) => (_jsx(BufferOrderRow, { order: o, member: membersFor([o])[0], sellerFallback: sellerFallback }, o.id))) }) }), _jsxs("div", { children: [_jsx("div", { className: "mb-2 text-sm font-semibold text-foreground", children: "Gecombineerde karindeling" }), _jsx(OrderKarindelingCard, { order: primary, pickProgress: bufferPickProgress(engineBuffer, membersFor(bufferOrders).map((m) => m.pickProgress ?? null)) })] })] }), _jsxs("div", { className: "min-w-0 space-y-4", children: [_jsxs(InfoCard, { icon: _jsx(Truck, {}), title: "Vervoer en ophalen", children: [_jsx(InfoRow, { label: "Vervoerder", children: _jsx(OrderCarrierPicker, { orderId: primary.id, applyToBuffer: true, compact: true, groupSize: bufferOrders.length, locked: bufferOrders.every((o) => !!o.isReservation) }) }), _jsxs(InfoRow, { label: "Ophaalmoment", children: [_jsx(OrderPickupMomentPicker, { orderId: primary.id, readOnly: true, compact: true }), _jsxs("div", { className: "mt-1 text-xs font-medium text-warning-soft-foreground", children: ["Geldt voor alle ", bufferOrders.length, " orders in deze groep"] })] }), _jsx(BufferAddresses, { orderId: primary.id })] }), fTotal > 0 && (_jsxs(InfoCard, { icon: _jsx(ReceiptText, {}), title: "Floriday", children: [_jsx(InfoRow, { label: "Floriday-orders", children: _jsx("span", { className: "flex flex-wrap gap-1.5", children: bufferOrders.filter((o) => !o.isLocal && o.orderNumber).map((o) => (_jsx(Badge, { variant: "outline", className: "text-xs", children: o.orderNumber }, o.id))) }) }), _jsxs(InfoRow, { label: "Afgemeld", children: [fDone, " van ", fTotal] })] }))] })] })] })), inGroup && !singleInGroup && rawLocalId && _jsx(EngineBufferCard, { orderId: rawLocalId }), primary && !isBuffer && (_jsx(SalesOrderDetailView, { order: primary, sellerFallback: sellerFallback, members: membersFor([primary]), features: features, groupSize: inGroup ? bufferOrders.length : undefined })), rawLocalId && _jsx(EditLocalOrderDialog, { orderId: rawLocalId, open: editOpen, onOpenChange: setEditOpen })] }));
@@ -9,5 +9,5 @@ export declare function SalesOrderDetailView(props: {
9
9
  features?: ProgressFeatures;
10
10
  /** Alleen weergave: aantal orders in de groep waarvoor vervoerder/ophaalmoment gelden. */
11
11
  groupSize?: number;
12
- }): import("react/jsx-runtime").JSX.Element;
12
+ }): import("react").JSX.Element;
13
13
  //# sourceMappingURL=SalesOrderDetailView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SalesOrderDetailView.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/SalesOrderDetailView.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAmC,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAGvH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AA2JnE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,KAAK,EAAE,aAAa,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,+EAA+E;IAC/E,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAkBA"}
1
+ {"version":3,"file":"SalesOrderDetailView.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/SalesOrderDetailView.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAmC,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAGvH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AA6JnE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,KAAK,EAAE,aAAa,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,+EAA+E;IAC/E,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAkBA"}
@@ -19,8 +19,7 @@ import { OrderShipmentsCard } from "./OrderShipmentsCard.js";
19
19
  import { OrderInvoiceCard } from "./OrderInvoiceCard.js";
20
20
  import { orderUuid } from "../../lib/order-price-lock.js";
21
21
  import { OrderControlStatusCard } from "./OrderControlStatusCard.js";
22
- import { OrderCarrierPicker } from "./OrderCarrierPicker.js";
23
- import { OrderPickupMomentPicker } from "./OrderPickupMomentPicker.js";
22
+ import { OrderTransportCard, ownPickupText, useOrderTransport } from "./OrderTransportCard.js";
24
23
  import { getFloridayStatusesForRows } from "../../lib/salesorders-list.functions.js";
25
24
  function AddressCard({ icon, lines, extra, }) {
26
25
  return (_jsxs("div", { className: "inline-flex max-w-xs items-start gap-3 rounded-md border border-border bg-card p-3", children: [_jsx("div", { className: "flex h-9 w-9 items-center justify-center rounded-md bg-primary/10 text-primary", children: icon }), _jsxs("div", { className: "text-sm", children: [lines.length > 0 ? lines.map((l, i) => _jsx("div", { children: l }, i)) : _jsx("div", { children: "\u2014" }), extra && _jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: extra })] })] }));
@@ -67,6 +66,7 @@ function pickStr(v) {
67
66
  const TRADE_INSTRUMENT_LABELS = {
68
67
  DIRECT_SALES: "Directe verkoop",
69
68
  DIRECT_SALE: "Directe verkoop",
69
+ CLOCK_SALES: "Klokverkoop",
70
70
  CLOCK_PRESALES: "Klokvoorverkoop",
71
71
  CLOCK_PRESALE: "Klokvoorverkoop",
72
72
  CONTRACT: "Contract",
@@ -313,7 +313,7 @@ function SalesOrderDetailViewInner({ floridayLoading, order, sellerFallback, hid
313
313
  ? (order.articleCount ?? 0) > 1 ? `Gemengd (${order.articleCount} artikelen)` : "Gemengd"
314
314
  : `Belading ${belading}` })] })] }) }), _jsx("td", { className: "px-2 py-3 font-semibold tabular-nums", children: numberOfPieces > 0 ? numberOfPieces.toLocaleString("nl-NL") : "—" }), _jsx("td", { className: "px-2 py-3 tabular-nums", children: formatLoadUnits(order.fustCount, order.mixedPacking ? null : order.crateTypeName) }), _jsxs("td", { className: "px-2 py-3 tabular-nums", children: [oldProductPrice !== null && _jsx("span", { className: "mr-1 text-destructive line-through", children: eurFlex.format(oldProductPrice) }), eurFlex.format(productUnit)] }), _jsx("td", { className: "px-4 py-3 font-semibold tabular-nums sm:px-5", children: eurFlex.format(totalAmount) })] }) })] }) }), _jsxs("div", { className: "mt-3 space-y-1.5 text-sm", children: [_jsxs("div", { className: "flex justify-between gap-3", children: [_jsx("span", { className: "text-muted-foreground", children: "Transportkosten per stuk" }), _jsx("span", { className: "tabular-nums", children: eurFlex.format(transportPerPiece) })] }), _jsxs("div", { className: "flex justify-between gap-3", children: [_jsx("span", { className: "text-muted-foreground", children: "Inkoopprijs per stuk" }), _jsx("span", { className: "tabular-nums", children: hasPurchase ? eurFlex.format(purchaseUnit) : "—" })] }), hasCorrection && (_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-muted-foreground", children: "Prijscorrectie" }), _jsxs("span", { className: "inline-flex items-center gap-1.5", children: [_jsx(CheckCircle2, { className: "h-4 w-4 text-primary" }), " Verwerkt"] })] })), _jsxs("div", { className: "flex items-baseline justify-between gap-3 border-t border-border pt-2 text-base font-semibold", children: [_jsx("span", { children: "Totaal" }), _jsxs("span", { className: "text-right tabular-nums", children: [totalBreakdown && _jsxs("span", { className: "mr-2 block text-xs font-normal text-muted-foreground sm:inline", children: ["(", totalBreakdown, ")"] }), eurFlex.format(totalAmount)] })] }), priceProblem && (_jsxs("div", { className: "rounded-lg border border-destructive/40 bg-destructive-soft px-3 py-2 text-xs text-destructive", children: ["Prijs ontbreekt: ", linesWithoutPrice || "een of meer", " regel(s) zonder prijs. Vul de prijs in voordat de order wordt bevestigd."] }))] })] }), _jsx(InfoCard, { icon: _jsx(MapPin, {}), title: "Aflever- en ophaalgegevens", children: _jsxs("div", { className: "grid grid-cols-1 gap-3 py-1 sm:grid-cols-2", children: [_jsx(AddressBox, { title: "Afleveradres", icon: _jsx(MapPin, {}), lines: deliveryLines }), _jsx(AddressBox, { title: "Ophaaladres", icon: _jsx(Truck, {}), lines: pickupLines })] }) }), _jsx(OrderShipmentsCard, { order: order }), _jsx(OrderLinePackingCard, { orderId: String(order.id) }), !hideKarindeling && _jsx(OrderKarindelingCard, { order: order, pickProgress: member?.pickProgress ?? null })] }), _jsxs("div", { className: "min-w-0 space-y-4", children: [_jsxs(InfoCard, { icon: _jsx(ClipboardList, {}), title: "Orderinformatie", children: [_jsx(InfoRow, { label: "Ordernummer", children: order.orderNumber || "—" }), _jsx(InfoRow, { label: "Status", children: _jsx("span", { className: `rounded-full px-2 py-0.5 text-xs font-medium ${orderStageBadgeClass(order.stage ?? "incoming")}`, children: bestellingLabel }) }), _jsx(InfoRow, { label: "Besteld op", children: fmtDateTime(order.orderedAt) }), _jsx(InfoRow, { label: "Klantreferentie", children: klantReferentie }), isFlorinOrder && _jsx(InfoRow, { label: "Verkoopkanaal", children: verkoopkanaal }), isFlorinOrder && _jsx(InfoRow, { label: "Verkoopwijze", children: verkoopwijze }), isFlorinOrder && _jsx(InfoRow, { label: "Floriday-referentie", children: floridayRef }), _jsx(InfoRow, { label: "Verkoper", children: sellerName ? (_jsxs("span", { className: "inline-flex items-center gap-2", children: [_jsx("span", { className: "inline-flex h-6 w-6 items-center justify-center rounded-full bg-muted text-[10px] font-semibold text-muted-foreground", children: initials(sellerName) }), sellerName] })) : "—" }), hasExternal && (_jsx(InfoRow, { label: "Afhandeling", children: order.floridayExternalFulfilledAt
315
315
  ? `Afgehandeld in Floriday · ${formatMoment(order.floridayExternalFulfilledAt)}`
316
- : `${order.floridayExternalFulfilledIds.length} bestelling(en) afgehandeld in Floriday; de rest loopt door` }))] }), _jsxs(InfoCard, { icon: _jsx(Truck, {}), title: "Vervoer", children: [(groupSize ?? 0) > 1 && (_jsxs("div", { className: "mb-2 rounded-lg border border-warning/40 bg-warning-soft px-3 py-2 text-xs font-medium text-warning-soft-foreground", children: ["Vervoerder en ophaalmoment gelden voor alle ", groupSize, " orders in deze groep."] })), _jsx(InfoRow, { label: "Vervoerder", children: _jsx(OrderCarrierPicker, { orderId: String(order.id), locked: !!order.isReservation, compact: true, groupSize: groupSize }) }), _jsxs(InfoRow, { label: "Ophaalmoment", children: [_jsx(OrderPickupMomentPicker, { orderId: String(order.id) }), (groupSize ?? 0) > 1 && (_jsxs("div", { className: "mt-1 text-xs font-medium text-warning-soft-foreground", children: ["Geldt voor alle ", groupSize, " orders in deze groep"] }))] }), showIncoterm && _jsx(InfoRow, { label: "Leveringsvoorwaarde", children: incoterm })] }), _jsx(InfoCard, { icon: _jsx(ReceiptText, {}), title: route === "floriday" ? "Factuur via Floriday" : "Factuur", attention: route === "erp" && priceProblem, children: route === "floriday" ? (_jsxs(_Fragment, { children: [_jsx(InfoRow, { label: "Stand", children: invoiceStandText(member, features) }), _jsx(InfoRow, { label: "Gefactureerd door", children: "Royal FloraHolland, via Floriday" }), member && (_jsxs(InfoRow, { label: "Afgemeld", children: [member.floridayDone, " van ", member.floridayTotal] })), member && member.stage === "shipped" && member.floridayDone < member.floridayTotal && (_jsx("div", { className: "mt-2 text-xs text-warning-soft-foreground", children: "De factuur volgt pas na afmelden bij Floriday." })), (() => {
316
+ : `${order.floridayExternalFulfilledIds.length} bestelling(en) afgehandeld in Floriday; de rest loopt door` }))] }), _jsx(OrderTransportCard, { order: order, groupSize: groupSize, extra: showIncoterm ? _jsx(InfoRow, { label: "Leveringsvoorwaarde", children: incoterm }) : undefined }), _jsx(InfoCard, { icon: _jsx(ReceiptText, {}), title: route === "floriday" ? "Factuur via Floriday" : "Factuur", attention: route === "erp" && priceProblem, children: route === "floriday" ? (_jsxs(_Fragment, { children: [_jsx(InfoRow, { label: "Stand", children: invoiceStandText(member, features) }), _jsx(InfoRow, { label: "Gefactureerd door", children: "Royal FloraHolland, via Floriday" }), member && (_jsxs(InfoRow, { label: "Afgemeld", children: [member.floridayDone, " van ", member.floridayTotal] })), member && member.stage === "shipped" && member.floridayDone < member.floridayTotal && (_jsx("div", { className: "mt-2 text-xs text-warning-soft-foreground", children: "De factuur volgt pas na afmelden bij Floriday." })), (() => {
317
317
  const line = floridayInvoiceLine(order.floridayRawStatus, member?.floridayDone ?? 0, member?.floridayTotal ?? 0);
318
318
  return line ? _jsx(InfoRow, { label: "Floriday", children: line }) : null;
319
319
  })(), (order.floridayExternalFulfilledIds?.length ?? 0) > 0 && (_jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: "Al afgehandeld in Floriday" }))] })) : (_jsxs(_Fragment, { children: [_jsxs(InfoRow, { label: "Stand", children: [invoiceStandText(member, features), !member?.erpInvoice && order.invoiceState ? (_jsxs("span", { className: "block text-xs text-muted-foreground", children: [order.invoiceState, order.invoiceNote ? ` · ${order.invoiceNote}` : ""] })) : null] }), order.missingPrice && order.stage !== "cancelled" && !member?.erpInvoice && (_jsx("div", { className: "mt-2 rounded-md bg-warning-soft px-3 py-2 text-xs text-warning-soft-foreground", children: "Prijs ontbreekt: vul de prijs in voordat er gefactureerd kan worden." })), member?.erpInvoice && (_jsxs(_Fragment, { children: [_jsx(InfoRow, { label: "Factuurnummer", children: member.erpInvoice.number ?? "—" }), _jsx(InfoRow, { label: "Status", children: member.erpInvoice.status ?? "—" }), _jsx(InfoRow, { label: "Verstuurd", children: member.erpInvoice.sentAt ? fmtDateTime(member.erpInvoice.sentAt) : "—" })] })), invoiceOrderId && _jsx(OrderInvoiceCard, { orderId: invoiceOrderId })] })) }), o?.salesOrderId ? (_jsxs(_Fragment, { children: [_jsx(OrderControlStatusCard, { floridayId: String(o.salesOrderId), isControlled: order.status.isControlled, controlledAt: order.status.controlledAt }), _jsx(OrderAfleverbrievenCard, { salesOrderId: String(o.salesOrderId), orderNumber: order.orderNumber ?? undefined })] })) : null, _jsxs(InfoCard, { icon: _jsx(User, {}), title: "Klant", children: [_jsxs(InfoRow, { label: "Naam", children: [_jsx("span", { className: "font-medium", children: customerName }), customerLegalName && _jsx("div", { className: "text-xs text-muted-foreground", children: customerLegalName })] }), _jsx(InfoRow, { label: "Telefoon", children: customerPhone }), _jsxs("details", { className: "group pt-2 text-sm", children: [_jsx("summary", { className: "cursor-pointer text-xs font-medium text-muted-foreground hover:text-foreground", children: "Meer klantgegevens" }), _jsx(InfoRow, { label: "GLN", children: customerGln }), _jsx(InfoRow, { label: "Administratienummer", children: customerAdmin }), deliveryGln && _jsx(InfoRow, { label: "GLN afleveradres", children: deliveryGln })] })] })] })] })] }));
@@ -347,8 +347,11 @@ function Notice({ tone, title, children }) {
347
347
  function DeliveryTileSub({ order }) {
348
348
  const pm = usePickupMoment(String(order.id));
349
349
  const t = order.deliveryAt ? formatDelivery(order.deliveryAt, deliveryHasTimeFor(order), { wallClock: deliveryIsWallClockFor(order) }).time : "";
350
+ // Zelfde tijd als het blok Vervoer: eigen ophaaltijd (eigen vervoer/klant haalt op), anders de planning.
351
+ const tr = useOrderTransport(String(order.id), !order.isReservation);
352
+ const own = tr.data?.own ? ownPickupText(tr.data.ownPickup) : null;
350
353
  const short = pm.data ? (pm.data.view?.short ?? null) : null;
351
- const pickup = pm.data ? short : (order.pickupLabel && order.pickupLabel !== "onbekend" ? order.pickupLabel : null);
354
+ const pickup = own ?? (pm.data ? short : (order.pickupLabel && order.pickupLabel !== "onbekend" ? order.pickupLabel : null));
352
355
  const showSlot = pm.isPending && !pickup;
353
356
  if (!t && !pickup && !showSlot)
354
357
  return null;
@@ -5,5 +5,5 @@ export declare function SalesOrdersFilterPanel({ open, onOpenChange, value, onCh
5
5
  onOpenChange: (open: boolean) => void;
6
6
  value: Filters;
7
7
  onChange: (next: Filters) => void;
8
- }): import("react/jsx-runtime").JSX.Element;
8
+ }): import("react").JSX.Element;
9
9
  //# sourceMappingURL=SalesOrdersFilterPanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SalesOrdersFilterPanel.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/SalesOrdersFilterPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAYrD;AAED,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC,2CA6OA"}
1
+ {"version":3,"file":"SalesOrdersFilterPanel.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/SalesOrdersFilterPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAYrD;AAED,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC,+BA6OA"}
@@ -22,12 +22,17 @@ export interface Filters {
22
22
  dateField?: "ordered" | "delivery";
23
23
  period?: "week" | "month" | "day" | "last7" | "last30" | "custom";
24
24
  }
25
- export declare function SalesOrdersFilters({ value, onChange, part, busy, }: {
25
+ export declare function SalesOrdersFilters({ value, onChange, part, busy, alle, }: {
26
26
  value: Filters;
27
27
  onChange: (next: Filters) => void;
28
28
  /** Alleen de periodekeuze, alleen het zoekveld, of beide (standaard). */
29
29
  part?: "both" | "period" | "search";
30
30
  /** Server bevestigt de zoekterm nog (klein laadstreepje). */
31
31
  busy?: boolean;
32
- }): import("react/jsx-runtime").JSX.Element;
32
+ /** Optioneel "Alle" in het periodemenu (zonder datumgrens), bv. op de pagina Klok. */
33
+ alle?: {
34
+ active: boolean;
35
+ onChange: (active: boolean) => void;
36
+ };
37
+ }): import("react").JSX.Element;
33
38
  //# sourceMappingURL=SalesOrdersFilters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SalesOrdersFilters.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/SalesOrdersFilters.tsx"],"names":[],"mappings":"AA8BA,MAAM,WAAW,OAAO;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;CACnE;AA6BD,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,IAAa,EACb,IAAY,GACb,EAAE;IACD,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACpC,6DAA6D;IAC7D,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,2CA6TA"}
1
+ {"version":3,"file":"SalesOrdersFilters.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/SalesOrdersFilters.tsx"],"names":[],"mappings":"AA8BA,MAAM,WAAW,OAAO;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;CACnE;AA6BD,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,IAAa,EACb,IAAY,EACZ,IAAI,GACL,EAAE;IACD,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACpC,6DAA6D;IAC7D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,sFAAsF;IACtF,IAAI,CAAC,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;KAAE,CAAC;CACjE,+BAwUA"}
@@ -27,7 +27,7 @@ function generateMonthOptions() {
27
27
  }
28
28
  return options;
29
29
  }
30
- export function SalesOrdersFilters({ value, onChange, part = "both", busy = false, }) {
30
+ export function SalesOrdersFilters({ value, onChange, part = "both", busy = false, alle, }) {
31
31
  const currentWeek = getCurrentWeek();
32
32
  const week = value.week ?? currentWeek.week;
33
33
  const year = value.year ?? currentWeek.year;
@@ -144,11 +144,17 @@ export function SalesOrdersFilters({ value, onChange, part = "both", busy = fals
144
144
  return "Aangepast tijdsbestek";
145
145
  return `Week ${week}, ${year}`;
146
146
  };
147
- const showArrows = period === "week" || period === "month" || period === "day";
148
- return (_jsxs("div", { className: "flex w-full flex-wrap items-center gap-2 sm:w-auto", children: [part !== "search" && (_jsxs("div", { className: "flex h-10 w-full items-center justify-between gap-1 rounded-md border border-border bg-card px-1 sm:h-9 sm:w-auto sm:justify-start", children: [showArrows && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", onClick: () => shiftPeriod(-1), className: "inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground", "aria-label": "Vorige", children: _jsx(ChevronLeft, { className: "h-4 w-4" }) }), _jsx("button", { type: "button", onClick: () => shiftPeriod(1), className: "inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground", "aria-label": "Volgende", children: _jsx(ChevronRight, { className: "h-4 w-4" }) })] })), period === "month" ? (_jsxs(Select, { value: `${monthYear}-${month}`, onValueChange: (v) => {
147
+ const alleActief = !!alle?.active;
148
+ const showArrows = !alleActief && (period === "week" || period === "month" || period === "day");
149
+ return (_jsxs("div", { className: "flex w-full flex-wrap items-center gap-2 sm:w-auto", children: [part !== "search" && (_jsxs("div", { className: "flex h-10 w-full items-center justify-between gap-1 rounded-md border border-border bg-card px-1 sm:h-9 sm:w-auto sm:justify-start", children: [showArrows && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", onClick: () => shiftPeriod(-1), className: "inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground", "aria-label": "Vorige", children: _jsx(ChevronLeft, { className: "h-4 w-4" }) }), _jsx("button", { type: "button", onClick: () => shiftPeriod(1), className: "inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground", "aria-label": "Volgende", children: _jsx(ChevronRight, { className: "h-4 w-4" }) })] })), alleActief ? (_jsx("span", { className: "px-2 text-sm font-medium text-foreground whitespace-nowrap", children: "Alle" })) : period === "month" ? (_jsxs(Select, { value: `${monthYear}-${month}`, onValueChange: (v) => {
149
150
  const [y, m] = v.split("-").map(Number);
150
151
  onChange({ ...value, month: m, monthYear: y });
151
- }, children: [_jsx(SelectTrigger, { className: "h-7 w-36 border-0 bg-transparent px-2 text-sm font-medium text-foreground shadow-none focus:ring-0", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: monthOptions.map((opt) => (_jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value))) })] })) : period === "day" ? (_jsx(Input, { type: "date", value: day, onChange: (e) => onChange({ ...value, day: e.target.value }), className: "h-7 w-40 border-0 bg-transparent px-2 text-sm font-medium text-foreground shadow-none focus-visible:ring-0" })) : period === "custom" ? (_jsxs("div", { className: "flex items-center gap-1 px-2", children: [_jsx(Input, { type: "date", value: value.customFrom ?? todayYmd, onChange: (e) => onChange({ ...value, customFrom: e.target.value }), className: "h-7 w-36 border-0 bg-transparent px-1 text-sm font-medium text-foreground shadow-none focus-visible:ring-0" }), _jsx("span", { className: "text-muted-foreground", children: "\u2013" }), _jsx(Input, { type: "date", value: value.customTo ?? todayYmd, onChange: (e) => onChange({ ...value, customTo: e.target.value }), className: "h-7 w-36 border-0 bg-transparent px-1 text-sm font-medium text-foreground shadow-none focus-visible:ring-0" })] })) : period === "last7" || period === "last30" ? (_jsx("span", { className: "px-2 text-sm font-medium text-foreground whitespace-nowrap", children: period === "last7" ? "Afgelopen 7 dagen" : "Afgelopen 30 dagen" })) : (_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { type: "button", className: "px-2 text-sm font-medium text-foreground whitespace-nowrap rounded hover:bg-accent h-7", "aria-label": "Kies week", children: ["Week ", week, " - ", year] }) }), _jsx(PopoverContent, { className: "w-auto p-0 pointer-events-auto", align: "start", children: _jsx(WeekCalendar, { week: week, year: year, onSelect: (w, y) => onChange({ ...value, week: w, year: y }) }) })] })), (value.dateField ?? "delivery") === "ordered" && (_jsx("span", { className: "pr-1 text-sm text-muted-foreground whitespace-nowrap", "aria-label": "Periode op besteldatum", children: "\u00B7 besteldatum" })), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx("button", { type: "button", className: "inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground", "aria-label": "Periode-opties", children: _jsx(MoreVertical, { className: "h-4 w-4" }) }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-56", children: [_jsxs(DropdownMenuRadioGroup, { value: period, onValueChange: (v) => handlePeriodChange(v), children: [_jsx(DropdownMenuRadioItem, { value: "day", children: "Dag" }), _jsx(DropdownMenuRadioItem, { value: "week", children: "Week" }), _jsx(DropdownMenuRadioItem, { value: "month", children: "Maand" }), _jsx(DropdownMenuRadioItem, { value: "last7", children: "Afgelopen 7 dagen" }), _jsx(DropdownMenuRadioItem, { value: "last30", children: "Afgelopen 30 dagen" }), _jsx(DropdownMenuRadioItem, { value: "custom", children: "Aangepast tijdsbestek" })] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuRadioGroup, { value: value.dateField ?? "delivery", onValueChange: (v) => onChange({ ...value, dateField: v === "ordered" ? "ordered" : "delivery" }), children: [_jsx(DropdownMenuRadioItem, { value: "delivery", children: "Op leverdatum" }), _jsx(DropdownMenuRadioItem, { value: "ordered", children: "Op besteldatum" })] }), _jsx(DropdownMenuSeparator, {}), _jsxs("div", { className: "px-2 py-1.5 text-sm text-muted-foreground inline-flex items-center gap-1", children: [periodLabel(), (value.dateField ?? "delivery") === "ordered" ? " · besteldatum" : "", _jsx(ChevronDown, { className: "h-3.5 w-3.5" })] })] })] })] })), part !== "period" && (_jsxs("div", { className: "group relative flex h-10 sm:h-9 w-full items-center overflow-hidden rounded-md border border-border bg-card " +
152
+ }, children: [_jsx(SelectTrigger, { className: "h-7 w-36 border-0 bg-transparent px-2 text-sm font-medium text-foreground shadow-none focus:ring-0", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: monthOptions.map((opt) => (_jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value))) })] })) : period === "day" ? (_jsx(Input, { type: "date", value: day, onChange: (e) => onChange({ ...value, day: e.target.value }), className: "h-7 w-40 border-0 bg-transparent px-2 text-sm font-medium text-foreground shadow-none focus-visible:ring-0" })) : period === "custom" ? (_jsxs("div", { className: "flex items-center gap-1 px-2", children: [_jsx(Input, { type: "date", value: value.customFrom ?? todayYmd, onChange: (e) => onChange({ ...value, customFrom: e.target.value }), className: "h-7 w-36 border-0 bg-transparent px-1 text-sm font-medium text-foreground shadow-none focus-visible:ring-0" }), _jsx("span", { className: "text-muted-foreground", children: "\u2013" }), _jsx(Input, { type: "date", value: value.customTo ?? todayYmd, onChange: (e) => onChange({ ...value, customTo: e.target.value }), className: "h-7 w-36 border-0 bg-transparent px-1 text-sm font-medium text-foreground shadow-none focus-visible:ring-0" })] })) : period === "last7" || period === "last30" ? (_jsx("span", { className: "px-2 text-sm font-medium text-foreground whitespace-nowrap", children: period === "last7" ? "Afgelopen 7 dagen" : "Afgelopen 30 dagen" })) : (_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { type: "button", className: "px-2 text-sm font-medium text-foreground whitespace-nowrap rounded hover:bg-accent h-7", "aria-label": "Kies week", children: ["Week ", week, " - ", year] }) }), _jsx(PopoverContent, { className: "w-auto p-0 pointer-events-auto", align: "start", children: _jsx(WeekCalendar, { week: week, year: year, onSelect: (w, y) => onChange({ ...value, week: w, year: y }) }) })] })), (value.dateField ?? "delivery") === "ordered" && (_jsx("span", { className: "pr-1 text-sm text-muted-foreground whitespace-nowrap", "aria-label": "Periode op besteldatum", children: "\u00B7 besteldatum" })), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx("button", { type: "button", className: "inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground", "aria-label": "Periode-opties", children: _jsx(MoreVertical, { className: "h-4 w-4" }) }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-56", children: [_jsxs(DropdownMenuRadioGroup, { value: alleActief ? "__alle" : period, onValueChange: (v) => {
153
+ if (v === "__alle")
154
+ return alle?.onChange(true);
155
+ alle?.onChange(false);
156
+ handlePeriodChange(v);
157
+ }, children: [alle && _jsx(DropdownMenuRadioItem, { value: "__alle", children: "Alle" }), _jsx(DropdownMenuRadioItem, { value: "day", children: "Dag" }), _jsx(DropdownMenuRadioItem, { value: "week", children: "Week" }), _jsx(DropdownMenuRadioItem, { value: "month", children: "Maand" }), _jsx(DropdownMenuRadioItem, { value: "last7", children: "Afgelopen 7 dagen" }), _jsx(DropdownMenuRadioItem, { value: "last30", children: "Afgelopen 30 dagen" }), _jsx(DropdownMenuRadioItem, { value: "custom", children: "Aangepast tijdsbestek" })] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuRadioGroup, { value: value.dateField ?? "delivery", onValueChange: (v) => onChange({ ...value, dateField: v === "ordered" ? "ordered" : "delivery" }), children: [_jsx(DropdownMenuRadioItem, { value: "delivery", children: "Op leverdatum" }), _jsx(DropdownMenuRadioItem, { value: "ordered", children: "Op besteldatum" })] }), _jsx(DropdownMenuSeparator, {}), _jsxs("div", { className: "px-2 py-1.5 text-sm text-muted-foreground inline-flex items-center gap-1", children: [alleActief ? "Alle" : periodLabel(), (value.dateField ?? "delivery") === "ordered" ? " · besteldatum" : "", _jsx(ChevronDown, { className: "h-3.5 w-3.5" })] })] })] })] })), part !== "period" && (_jsxs("div", { className: "group relative flex h-10 sm:h-9 w-full items-center overflow-hidden rounded-md border border-border bg-card " +
152
158
  "transition-[box-shadow,border-color,width] duration-[180ms] ease-out motion-reduce:transition-none " +
153
159
  "focus-within:border-primary focus-within:ring-[3px] focus-within:ring-ring/20 " +
154
160
  (part === "search" ? "sm:w-80 sm:focus-within:w-[400px]" : ""), children: [_jsx(Search, { className: "ml-3 h-4 w-4 shrink-0 text-muted-foreground transition-colors duration-[120ms] group-focus-within:text-primary", "aria-hidden": true }), _jsx("input", { ref: inputRef, type: "search", placeholder: part === "search" ? "Zoek op ordernummer, klant, artikel of referentie" : "Op briefnummer zoeken", "aria-label": "Zoeken", value: search, maxLength: 100, autoComplete: "off", spellCheck: false, onChange: (e) => setSearch(e.target.value), onKeyDown: (e) => {
@@ -32,5 +32,5 @@ export declare function SalesOrdersTable({ orders, loading, onSelectOrder, onDel
32
32
  focusedId?: string | null;
33
33
  /** Rijhoogte in px (60 comfortabel, 48 compact). */
34
34
  rowHeight?: number;
35
- }): import("react/jsx-runtime").JSX.Element;
35
+ }): import("react").JSX.Element;
36
36
  //# sourceMappingURL=SalesOrdersTable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SalesOrdersTable.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/SalesOrdersTable.tsx"],"names":[],"mappings":"AACA,OAAO,EAA8C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAWnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAGL,KAAK,gBAAgB,EAEtB,MAAM,0BAA0B,CAAC;AAuBlC,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAG1D;AAuXD,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,OAAO,EACP,aAAa,EACb,aAAa,EACb,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,QAA2B,EAC3B,SAAmC,EACnC,cAAc,EACd,YAAgB,EAChB,OAAO,EACP,KAAa,EACb,YAAY,EACZ,OAAO,EACP,SAAS,EACT,SAAS,EACT,SAAc,GACf,EAAE;IACD,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC/C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8FAA8F;IAC9F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,gDAAgD;IAChD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAmJA"}
1
+ {"version":3,"file":"SalesOrdersTable.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/SalesOrdersTable.tsx"],"names":[],"mappings":"AACA,OAAO,EAA8C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAWnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAGL,KAAK,gBAAgB,EAEtB,MAAM,0BAA0B,CAAC;AAwBlC,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAG1D;AAqZD,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,OAAO,EACP,aAAa,EACb,aAAa,EACb,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,QAA2B,EAC3B,SAAmC,EACnC,cAAc,EACd,YAAgB,EAChB,OAAO,EACP,KAAa,EACb,YAAY,EACZ,OAAO,EACP,SAAS,EACT,SAAS,EACT,SAAc,GACf,EAAE;IACD,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC/C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8FAA8F;IAC9F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,gDAAgD;IAChD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAmJA"}
@@ -11,6 +11,7 @@ import { RowMenu } from "./v3/RowMenu.js";
11
11
  import { CustomerName, useHasCustomerRoute } from "./v3/CustomerName.js";
12
12
  import { HoverTip } from "./v3/HoverTip.js";
13
13
  import { ArticlesHover } from "./v3/ArticlesHover.js";
14
+ import { articleNamesText } from "../../lib/order-search.js";
14
15
  const amount = (n) => (n ?? 0).toLocaleString("nl-NL", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
15
16
  function fmtOrdered(iso) {
16
17
  if (!iso)
@@ -44,6 +45,12 @@ function Line({ text, className = "" }) {
44
45
  const t = text || "";
45
46
  return (_jsx("div", { className: "truncate " + className, title: t || undefined, children: t || "\u00a0" }));
46
47
  }
48
+ /** Alle regelnamen (max. 2 regels, afgekapt) met een ballon "aantal × naam" per regel. */
49
+ function ArticleNames({ row }) {
50
+ const lines = row.articleLines ?? [];
51
+ const text = articleNamesText(lines);
52
+ return (_jsx(HoverTip, { label: `Artikelen: ${text}`, align: "start", className: "!flex w-full max-w-full !justify-start rounded-sm text-left", content: _jsxs("ul", { className: "max-w-72 space-y-1 text-sm", children: [lines.map((l, i) => (_jsxs("li", { className: "flex gap-2", children: [_jsxs("span", { className: "shrink-0 tabular-nums text-muted-foreground", children: [l.quantity.toLocaleString("nl-NL"), " \u00D7"] }), _jsx("span", { className: "min-w-0 text-foreground", children: l.name })] }, i))), _jsxs("li", { className: "border-t border-border pt-1 text-xs text-muted-foreground", children: [row.fustCount, " fust"] })] }), children: _jsx("span", { className: "line-clamp-2 break-words text-sm leading-snug text-foreground", children: text }) }));
53
+ }
47
54
  /** "+n"-chip van een buffer met de ordernummers in de tooltip. */
48
55
  function BufferChip({ row }) {
49
56
  const size = row.bufferSize ?? 1;
@@ -98,7 +105,7 @@ const DesktopRow = memo(function DesktopRow({ row, rowId, selected, leaving, hig
98
105
  e.stopPropagation();
99
106
  handlers.current.onSelectOrder?.(row);
100
107
  }, className: "min-w-0 truncate rounded-sm font-medium tabular-nums focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring " +
101
- (cancelled ? "line-through" : "text-foreground"), children: row.orderNumber || "—" }), _jsx("span", { className: "shrink-0", children: _jsx(BufferChip, { row: row }) })] }), row.customerReference ? (_jsx(Line, { text: `Ref. ${row.customerReference}`, className: "text-xs text-muted-foreground" })) : null] }), _jsx(TableCell, { className: "min-w-0 py-0", children: _jsxs("div", { className: "flex min-w-0 items-center gap-2.5", children: [_jsx("span", { "aria-hidden": true, className: "hidden h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary/10 text-[11px] font-semibold text-primary lg:inline-flex", children: initials(row.customer.name) }), _jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "truncate font-medium", title: row.customer.name || undefined, children: _jsx(CustomerName, { name: row.customer.name, customerId: row.customerId, linkable: linkable }) }), _jsx(Line, { text: place, className: "text-xs text-muted-foreground" })] })] }) }), _jsxs(TableCell, { className: "py-0", children: [_jsx(Line, { text: ordered.date, className: "text-sm text-foreground" }), _jsx(Line, { text: ordered.time, className: "text-xs text-muted-foreground tabular-nums" })] }), _jsxs(TableCell, { className: "py-0 text-left", children: [_jsx(ArticlesHover, { ids: row.bufferOrderIds?.length ? row.bufferOrderIds : [row.id], count: row.articleCount ?? 1, children: _jsx("span", { className: "text-sm text-foreground", children: `${articlesLabel(row.articleCount ?? 1)} · ${row.fustCount} fust` }) }), _jsx("div", { className: "text-xs text-muted-foreground", children: _jsx(Money, { value: row.revenue ?? 0 }) })] }), _jsxs(TableCell, { className: "py-0", children: [_jsx(Line, { text: delivery.date, className: "text-sm text-foreground" }), d2.text ? (_jsxs("div", { className: "flex min-w-0 items-center gap-1 text-xs tabular-nums " + (d2.late ? "font-medium text-destructive" : "text-muted-foreground"), children: [d2.late ? _jsx(AlertCircle, { className: "h-3 w-3 shrink-0", "aria-hidden": true }) : _jsx(Clock, { className: "h-3 w-3 shrink-0", "aria-hidden": true }), _jsx("span", { className: "truncate", children: d2.text })] })) : (_jsx("div", { children: "\u00a0" }))] }), _jsx(TableCell, { className: "py-0", onClick: (e) => e.stopPropagation(), children: _jsx(OrderProgress, { members: members, features: features }) }), _jsx(TableCell, { className: "py-0", onClick: (e) => e.stopPropagation(), children: _jsxs("div", { className: "flex items-center justify-end gap-0.5", children: [_jsx("button", { type: "button", "aria-label": `Open ${row.orderNumber || "order"}`, title: "Openen", onClick: () => handlers.current.onSelectOrder?.(row), className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-opacity hover:bg-muted hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring group-hover:opacity-100 " +
108
+ (cancelled ? "line-through" : "text-foreground"), children: row.orderNumber || "—" }), _jsx("span", { className: "shrink-0", children: _jsx(BufferChip, { row: row }) })] }), row.customerReference ? (_jsx(Line, { text: `Ref. ${row.customerReference}`, className: "text-xs text-muted-foreground" })) : null] }), _jsx(TableCell, { className: "min-w-0 py-0", children: _jsxs("div", { className: "flex min-w-0 items-center gap-2.5", children: [_jsx("span", { "aria-hidden": true, className: "hidden h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary/10 text-[11px] font-semibold text-primary lg:inline-flex", children: initials(row.customer.name) }), _jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "truncate font-medium", title: row.customer.name || undefined, children: _jsx(CustomerName, { name: row.customer.name, customerId: row.customerId, linkable: linkable }) }), _jsx(Line, { text: place, className: "text-xs text-muted-foreground" })] })] }) }), _jsxs(TableCell, { className: "py-0", children: [_jsx(Line, { text: ordered.date, className: "text-sm text-foreground" }), _jsx(Line, { text: ordered.time, className: "text-xs text-muted-foreground tabular-nums" })] }), _jsxs(TableCell, { className: "py-0 text-left", children: [row.articleLines?.length ? (_jsx(ArticleNames, { row: row })) : (_jsx(ArticlesHover, { ids: row.bufferOrderIds?.length ? row.bufferOrderIds : [row.id], count: row.articleCount ?? 1, children: _jsx("span", { className: "text-sm text-foreground", children: `${articlesLabel(row.articleCount ?? 1)} · ${row.fustCount} fust` }) })), _jsx("div", { className: "text-xs text-muted-foreground", children: _jsx(Money, { value: row.revenue ?? 0 }) })] }), _jsxs(TableCell, { className: "py-0", children: [_jsx(Line, { text: delivery.date, className: "text-sm text-foreground" }), d2.text ? (_jsxs("div", { className: "flex min-w-0 items-center gap-1 text-xs tabular-nums " + (d2.late ? "font-medium text-destructive" : "text-muted-foreground"), children: [d2.late ? _jsx(AlertCircle, { className: "h-3 w-3 shrink-0", "aria-hidden": true }) : _jsx(Clock, { className: "h-3 w-3 shrink-0", "aria-hidden": true }), _jsx("span", { className: "truncate", children: d2.text })] })) : (_jsx("div", { children: "\u00a0" }))] }), _jsx(TableCell, { className: "py-0", onClick: (e) => e.stopPropagation(), children: _jsx(OrderProgress, { members: members, features: features }) }), _jsx(TableCell, { className: "py-0", onClick: (e) => e.stopPropagation(), children: _jsxs("div", { className: "flex items-center justify-end gap-0.5", children: [_jsx("button", { type: "button", "aria-label": `Open ${row.orderNumber || "order"}`, title: "Openen", onClick: () => handlers.current.onSelectOrder?.(row), className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-opacity hover:bg-muted hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring group-hover:opacity-100 " +
102
109
  (focused ? "opacity-100" : "opacity-0"), children: _jsx(Eye, { className: "h-4 w-4", "aria-hidden": true }) }), _jsx(RowMenu, { row: row, rowId: rowId, isBuffer: isBuffer, fulfillingId: fulfillingId, onEdit: h.onEditOrder ? (o) => handlers.current.onEditOrder?.(o) : undefined, onDetails: h.onSelectOrder ? (o) => handlers.current.onSelectOrder?.(o) : undefined, onFulfill: h.onFulfillOrder ? (o) => handlers.current.onFulfillOrder?.(o) : undefined, onDelete: h.onDeleteOrder ? (o) => handlers.current.onDeleteOrder?.(o) : undefined })] }) })] }));
103
110
  });
104
111
  const MobileCard = memo(function MobileCard({ row, rowId, selected, leaving, highlight, features, linkable, fulfillingId, handlers, }) {
@@ -26,5 +26,5 @@ export const SearchableSelect = forwardRef(function SearchableSelect({ value, op
26
26
  onChange(filtered[0].value);
27
27
  setOpen(false);
28
28
  }
29
- }, placeholder: `Zoek in ${options.length} ${options.length === 1 ? "item" : "items"}…`, className: "pl-8 h-9" })] }) }), _jsxs("div", { className: "max-h-64 overflow-y-auto py-1", children: [allowClear && (_jsxs("button", { type: "button", className: "w-full text-left text-sm px-3 py-2 hover:bg-accent flex items-center gap-2", onClick: () => { onChange(null); setOpen(false); }, children: [value === null && _jsx(Check, { className: "h-3 w-3" }), _jsx("span", { className: "text-muted-foreground italic", children: clearLabel })] })), filtered.length === 0 ? (_jsx("div", { className: "px-3 py-6 text-sm text-muted-foreground text-center", children: emptyLabel })) : (filtered.map((o) => (_jsxs("button", { type: "button", className: "w-full text-left text-sm px-3 py-2 hover:bg-accent flex items-start gap-2", onClick: () => { onChange(o.value); setOpen(false); }, children: [_jsx(Check, { className: `h-3 w-3 mt-1 shrink-0 ${value === o.value ? "" : "invisible"}` }), showImages && _jsx(Thumb, { src: o.image }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: `truncate ${o.muted ? "text-muted-foreground" : ""}`, children: o.label }), o.badge && _jsx("span", { className: "shrink-0 rounded-full bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground", children: o.badge })] }), o.hint && _jsx("div", { className: `text-xs truncate ${o.muted ? "text-muted-foreground/70" : "text-muted-foreground"}`, children: o.hint })] })] }, o.value)))), filtered.length === 200 && (_jsx("div", { className: "px-3 py-2 text-xs text-muted-foreground text-center border-t", children: "Toon eerste 200 resultaten \u2014 verfijn je zoekopdracht" }))] })] })] }));
29
+ }, placeholder: "Zoeken\u2026", className: "pl-8 h-9" })] }) }), _jsxs("div", { className: "max-h-64 overflow-y-auto py-1", children: [allowClear && (_jsxs("button", { type: "button", className: "w-full text-left text-sm px-3 py-2 hover:bg-accent flex items-center gap-2", onClick: () => { onChange(null); setOpen(false); }, children: [value === null && _jsx(Check, { className: "h-3 w-3" }), _jsx("span", { className: "text-muted-foreground italic", children: clearLabel })] })), filtered.length === 0 ? (_jsx("div", { className: "px-3 py-6 text-sm text-muted-foreground text-center", children: emptyLabel })) : (filtered.map((o) => (_jsxs("button", { type: "button", className: "w-full text-left text-sm px-3 py-2 hover:bg-accent flex items-start gap-2", onClick: () => { onChange(o.value); setOpen(false); }, children: [_jsx(Check, { className: `h-3 w-3 mt-1 shrink-0 ${value === o.value ? "" : "invisible"}` }), showImages && _jsx(Thumb, { src: o.image }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: `truncate ${o.muted ? "text-muted-foreground" : ""}`, children: o.label }), o.badge && _jsx("span", { className: "shrink-0 rounded-full bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground", children: o.badge })] }), o.hint && _jsx("div", { className: `text-xs truncate ${o.muted ? "text-muted-foreground/70" : "text-muted-foreground"}`, children: o.hint })] })] }, o.value)))), filtered.length === 200 && (_jsx("div", { className: "px-3 py-2 text-xs text-muted-foreground text-center border-t", children: "Toon eerste 200 resultaten \u2014 verfijn je zoekopdracht" }))] })] })] }));
30
30
  });
@@ -2,5 +2,5 @@
2
2
  * Toont voorraadafboekingen die zijn overgeslagen (product niet gekoppeld) of
3
3
  * geblokkeerd (statusovergang zonder bewijs van vertrek).
4
4
  */
5
- export declare function StockConsumptionAlertsBanner(): import("react/jsx-runtime").JSX.Element | null;
5
+ export declare function StockConsumptionAlertsBanner(): import("react").JSX.Element | null;
6
6
  //# sourceMappingURL=StockConsumptionAlertsBanner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StockConsumptionAlertsBanner.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/StockConsumptionAlertsBanner.tsx"],"names":[],"mappings":"AAQA;;;GAGG;AACH,wBAAgB,4BAA4B,mDA6C3C"}
1
+ {"version":3,"file":"StockConsumptionAlertsBanner.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/StockConsumptionAlertsBanner.tsx"],"names":[],"mappings":"AAQA;;;GAGG;AACH,wBAAgB,4BAA4B,uCA6C3C"}
@@ -1,2 +1,2 @@
1
- export declare function VerkoopOrdersPage(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function VerkoopOrdersPage(): import("react").JSX.Element;
2
2
  //# sourceMappingURL=VerkoopOrdersPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VerkoopOrdersPage.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/VerkoopOrdersPage.tsx"],"names":[],"mappings":"AAyPA,wBAAgB,iBAAiB,4CAy+BhC"}
1
+ {"version":3,"file":"VerkoopOrdersPage.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/VerkoopOrdersPage.tsx"],"names":[],"mappings":"AA8RA,wBAAgB,iBAAiB,gCAwhChC"}