@burdenoff/microfe-movethewheels 2026.1031.2 → 2026.1031.3

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 (29) hide show
  1. package/dist/MoveTheWheelsRoot.js +144 -136
  2. package/dist/MoveTheWheelsRoutes.js +61 -57
  3. package/dist/generated/tracking-quality-operations.d.ts +84 -0
  4. package/dist/hooks/useEntityImport.js +68 -0
  5. package/dist/movethewheels/hooks/useEntityImport.d.ts +19 -0
  6. package/dist/movethewheels/pages/ImportExportPage.d.ts +9 -0
  7. package/dist/movethewheels/utils/entityImport.d.ts +109 -0
  8. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-down-up.js +22 -0
  9. package/dist/node_modules/lucide-react/dist/esm/icons/file-spreadsheet.js +30 -0
  10. package/dist/node_modules/lucide-react/dist/esm/icons/file-up.js +22 -0
  11. package/dist/pages/CustomersPage.js +88 -79
  12. package/dist/pages/DriversPage.js +115 -106
  13. package/dist/pages/ImportExportPage.js +435 -0
  14. package/dist/pages/ProductsPage.js +85 -76
  15. package/dist/pages/VehiclesPage.js +99 -90
  16. package/dist/pages/WarehousesPage.js +97 -88
  17. package/dist/utils/entityImport.js +73 -0
  18. package/package.json +3 -2
  19. package/src/generated/tracking-quality-operations.ts +122 -0
  20. package/src/movethewheels/MoveTheWheelsRoot.tsx +8 -0
  21. package/src/movethewheels/MoveTheWheelsRoutes.tsx +4 -0
  22. package/src/movethewheels/hooks/useEntityImport.ts +108 -0
  23. package/src/movethewheels/pages/CustomersPage.tsx +6 -1
  24. package/src/movethewheels/pages/DriversPage.tsx +6 -0
  25. package/src/movethewheels/pages/ImportExportPage.tsx +483 -0
  26. package/src/movethewheels/pages/ProductsPage.tsx +14 -1
  27. package/src/movethewheels/pages/VehiclesPage.tsx +6 -0
  28. package/src/movethewheels/pages/WarehousesPage.tsx +6 -1
  29. package/src/movethewheels/utils/entityImport.ts +239 -0
@@ -0,0 +1,30 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/file-spreadsheet.js
3
+ var t = e("FileSpreadsheet", [
4
+ ["path", {
5
+ d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",
6
+ key: "1rqfz7"
7
+ }],
8
+ ["path", {
9
+ d: "M14 2v4a2 2 0 0 0 2 2h4",
10
+ key: "tnqrlb"
11
+ }],
12
+ ["path", {
13
+ d: "M8 13h2",
14
+ key: "yr2amv"
15
+ }],
16
+ ["path", {
17
+ d: "M14 13h2",
18
+ key: "un5t4a"
19
+ }],
20
+ ["path", {
21
+ d: "M8 17h2",
22
+ key: "2yhykz"
23
+ }],
24
+ ["path", {
25
+ d: "M14 17h2",
26
+ key: "10kma7"
27
+ }]
28
+ ]);
29
+ //#endregion
30
+ export { t as FileSpreadsheet };
@@ -0,0 +1,22 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/file-up.js
3
+ var t = e("FileUp", [
4
+ ["path", {
5
+ d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",
6
+ key: "1rqfz7"
7
+ }],
8
+ ["path", {
9
+ d: "M14 2v4a2 2 0 0 0 2 2h4",
10
+ key: "tnqrlb"
11
+ }],
12
+ ["path", {
13
+ d: "M12 12v6",
14
+ key: "3ahymv"
15
+ }],
16
+ ["path", {
17
+ d: "m15 15-3-3-3 3",
18
+ key: "15xj92"
19
+ }]
20
+ ]);
21
+ //#endregion
22
+ export { t as FileUp };
@@ -3,97 +3,106 @@ import { Download as t } from "../node_modules/lucide-react/dist/esm/icons/downl
3
3
  import { Plus as n } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
4
4
  import { RefreshCw as r } from "../node_modules/lucide-react/dist/esm/icons/refresh-cw.js";
5
5
  import { Star as i } from "../node_modules/lucide-react/dist/esm/icons/star.js";
6
- import { Users as a } from "../node_modules/lucide-react/dist/esm/icons/users.js";
7
- import { joinPath as o } from "../utils/navigation.js";
8
- import { useMoveTheWheels as s } from "../providers/MoveTheWheelsProvider.js";
9
- import { useCustomerStats as c, useCustomers as l } from "../hooks/useCustomers.js";
10
- import { Avatar as u, AvatarFallback as d, Button as f } from "../components/ui.js";
11
- import { PageLayout as p } from "../components/PageLayout.js";
12
- import { MetricCard as m, MetricGrid as h } from "../components/MetricCard.js";
13
- import { TypeBadge as g } from "../components/StatusBadge.js";
14
- import { DataTable as _ } from "../components/DataTable.js";
15
- import { formatDate as v } from "../utils/formatters.js";
16
- import { useDebouncedValue as y } from "../hooks/useDebouncedValue.js";
17
- import { useEntityExport as b } from "../hooks/useEntityExport.js";
18
- import { ExportStatusBanner as x } from "../components/ExportStatusBanner.js";
19
- import { useState as S } from "react";
20
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
21
- import { CTAOverflowMenu as T, PagePurpose as E } from "@burdenoff/fe-libs/ui";
6
+ import { Upload as a } from "../node_modules/lucide-react/dist/esm/icons/upload.js";
7
+ import { Users as o } from "../node_modules/lucide-react/dist/esm/icons/users.js";
8
+ import { joinPath as s } from "../utils/navigation.js";
9
+ import { useMoveTheWheels as c } from "../providers/MoveTheWheelsProvider.js";
10
+ import { useCustomerStats as l, useCustomers as u } from "../hooks/useCustomers.js";
11
+ import { Avatar as d, AvatarFallback as f, Button as p } from "../components/ui.js";
12
+ import { PageLayout as m } from "../components/PageLayout.js";
13
+ import { MetricCard as h, MetricGrid as g } from "../components/MetricCard.js";
14
+ import { TypeBadge as _ } from "../components/StatusBadge.js";
15
+ import { DataTable as v } from "../components/DataTable.js";
16
+ import { formatDate as y } from "../utils/formatters.js";
17
+ import { useDebouncedValue as b } from "../hooks/useDebouncedValue.js";
18
+ import { useEntityExport as x } from "../hooks/useEntityExport.js";
19
+ import { ExportStatusBanner as S } from "../components/ExportStatusBanner.js";
20
+ import { useState as C } from "react";
21
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
22
+ import { CTAOverflowMenu as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
22
23
  //#region src/movethewheels/pages/CustomersPage.tsx
23
- function D() {
24
- let { basePath: D, navigate: O } = s(), { state: k, isExporting: A, startExport: j, dismiss: M } = b("customers", "customer"), [N, P] = S(0), [F, I] = S(25), [L, R] = S(""), z = y(L), { customers: B, totalCustomers: V, hasMore: H, isLoading: U, error: W, refetch: G } = l({
25
- limit: F,
26
- offset: N * F,
27
- filters: { search: z }
28
- }), { stats: K } = c(), q = (e) => O?.(o(D, e));
29
- return /* @__PURE__ */ w(p, {
24
+ function O() {
25
+ let { basePath: O, navigate: k } = c(), { state: A, isExporting: j, startExport: M, dismiss: N } = x("customers", "customer"), [P, F] = C(0), [I, L] = C(25), [R, z] = C(""), B = b(R), { customers: V, totalCustomers: H, hasMore: U, isLoading: W, error: G, refetch: K } = u({
26
+ limit: I,
27
+ offset: P * I,
28
+ filters: { search: B }
29
+ }), { stats: q } = l(), J = (e) => k?.(s(O, e));
30
+ return /* @__PURE__ */ T(m, {
30
31
  title: "Customers",
31
- subtitle: `${K.total} customers`,
32
- icon: /* @__PURE__ */ C(a, { size: 24 }),
33
- headerActions: /* @__PURE__ */ C(T, {
32
+ subtitle: `${q.total} customers`,
33
+ icon: /* @__PURE__ */ w(o, { size: 24 }),
34
+ headerActions: /* @__PURE__ */ w(E, {
34
35
  primary: {
35
36
  label: "Add Customer",
36
- icon: /* @__PURE__ */ C(n, { size: 16 }),
37
- onSelect: () => q("customers/new")
37
+ icon: /* @__PURE__ */ w(n, { size: 16 }),
38
+ onSelect: () => J("customers/new")
38
39
  },
39
- actions: [{
40
- label: "Refresh",
41
- icon: /* @__PURE__ */ C(r, { size: 16 }),
42
- onSelect: () => G()
43
- }, {
44
- label: A ? "Exporting…" : "Export",
45
- icon: /* @__PURE__ */ C(t, { size: 16 }),
46
- onSelect: j
47
- }]
40
+ actions: [
41
+ {
42
+ label: "Refresh",
43
+ icon: /* @__PURE__ */ w(r, { size: 16 }),
44
+ onSelect: () => K()
45
+ },
46
+ {
47
+ label: "Import",
48
+ icon: /* @__PURE__ */ w(a, { size: 16 }),
49
+ onSelect: () => J("import-export?entity=CUSTOMER")
50
+ },
51
+ {
52
+ label: j ? "Exporting…" : "Export",
53
+ icon: /* @__PURE__ */ w(t, { size: 16 }),
54
+ onSelect: M
55
+ }
56
+ ]
48
57
  }),
49
58
  children: [
50
- /* @__PURE__ */ C(E, {
51
- icon: /* @__PURE__ */ C(a, { size: 18 }),
59
+ /* @__PURE__ */ w(D, {
60
+ icon: /* @__PURE__ */ w(o, { size: 18 }),
52
61
  children: "The businesses and individuals you deliver for. Keep contact details, locations and satisfaction ratings here, and open a customer to see their order history before booking the next shipment."
53
62
  }),
54
- /* @__PURE__ */ C(x, {
55
- state: k,
56
- onDismiss: M
63
+ /* @__PURE__ */ w(S, {
64
+ state: A,
65
+ onDismiss: N
57
66
  }),
58
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
67
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
59
68
  className: "mb-3 text-sm font-medium text-text-secondary",
60
69
  children: "Customer base at a glance"
61
- }), /* @__PURE__ */ w(h, {
70
+ }), /* @__PURE__ */ T(g, {
62
71
  columns: 3,
63
72
  children: [
64
- /* @__PURE__ */ C(m, {
73
+ /* @__PURE__ */ w(h, {
65
74
  label: "Total customers",
66
- value: K.total,
67
- icon: /* @__PURE__ */ C(a, { size: 20 }),
75
+ value: q.total,
76
+ icon: /* @__PURE__ */ w(o, { size: 20 }),
68
77
  accent: "brand"
69
78
  }),
70
- /* @__PURE__ */ C(m, {
79
+ /* @__PURE__ */ w(h, {
71
80
  label: "Avg. rating",
72
- value: K.avgRating > 0 ? K.avgRating.toFixed(1) : "—",
73
- icon: /* @__PURE__ */ C(i, { size: 20 }),
81
+ value: q.avgRating > 0 ? q.avgRating.toFixed(1) : "—",
82
+ icon: /* @__PURE__ */ w(i, { size: 20 }),
74
83
  accent: "success",
75
84
  subtitle: "Across all customers"
76
85
  }),
77
- /* @__PURE__ */ C(m, {
86
+ /* @__PURE__ */ w(h, {
78
87
  label: "Business accounts",
79
- value: K.b2b,
80
- icon: /* @__PURE__ */ C(e, { size: 20 }),
88
+ value: q.b2b,
89
+ icon: /* @__PURE__ */ w(e, { size: 20 }),
81
90
  accent: "blue",
82
91
  subtitle: "B2B relationships"
83
92
  })
84
93
  ]
85
94
  })] }),
86
- /* @__PURE__ */ C(_, {
95
+ /* @__PURE__ */ w(v, {
87
96
  columns: [
88
97
  {
89
98
  id: "customer",
90
99
  header: "Customer",
91
- cell: (e) => /* @__PURE__ */ w("div", {
100
+ cell: (e) => /* @__PURE__ */ T("div", {
92
101
  className: "flex items-center gap-3",
93
- children: [/* @__PURE__ */ C(u, { children: /* @__PURE__ */ C(d, { children: e.name.split(" ").map((e) => e[0]).join("") }) }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
102
+ children: [/* @__PURE__ */ w(d, { children: /* @__PURE__ */ w(f, { children: e.name.split(" ").map((e) => e[0]).join("") }) }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
94
103
  className: "font-medium",
95
104
  children: e.name
96
- }), /* @__PURE__ */ C("p", {
105
+ }), /* @__PURE__ */ w("p", {
97
106
  className: "text-sm text-text-secondary",
98
107
  children: e.email
99
108
  })] })]
@@ -103,7 +112,7 @@ function D() {
103
112
  id: "type",
104
113
  header: "Type",
105
114
  accessorKey: "type",
106
- cell: (e) => /* @__PURE__ */ C(g, { type: e.type })
115
+ cell: (e) => /* @__PURE__ */ w(_, { type: e.type })
107
116
  },
108
117
  {
109
118
  id: "company",
@@ -124,12 +133,12 @@ function D() {
124
133
  {
125
134
  id: "rating",
126
135
  header: "Rating",
127
- cell: (e) => /* @__PURE__ */ w("div", {
136
+ cell: (e) => /* @__PURE__ */ T("div", {
128
137
  className: "flex items-center gap-1",
129
- children: [/* @__PURE__ */ C(i, {
138
+ children: [/* @__PURE__ */ w(i, {
130
139
  size: 14,
131
140
  className: "text-status-warning-text fill-current"
132
- }), /* @__PURE__ */ C("span", { children: e.rating === void 0 ? "Not provided" : e.rating.toFixed(1) })]
141
+ }), /* @__PURE__ */ w("span", { children: e.rating === void 0 ? "Not provided" : e.rating.toFixed(1) })]
133
142
  })
134
143
  },
135
144
  {
@@ -137,13 +146,13 @@ function D() {
137
146
  header: "Created",
138
147
  accessorKey: "createdAt",
139
148
  sortable: !0,
140
- cell: (e) => v(e.createdAt, "short")
149
+ cell: (e) => y(e.createdAt, "short")
141
150
  }
142
151
  ],
143
- data: B,
144
- isLoading: U,
145
- error: W,
146
- onRetry: G,
152
+ data: V,
153
+ isLoading: W,
154
+ error: G,
155
+ onRetry: K,
147
156
  searchable: !0,
148
157
  searchPlaceholder: "Search customers...",
149
158
  searchFields: [
@@ -151,26 +160,26 @@ function D() {
151
160
  "email",
152
161
  "company"
153
162
  ],
154
- searchQuery: L,
163
+ searchQuery: R,
155
164
  onSearchQueryChange: (e) => {
156
- R(e), P(0);
165
+ z(e), F(0);
157
166
  },
158
- onRowClick: (e) => q(`customers/${e.id}`),
167
+ onRowClick: (e) => J(`customers/${e.id}`),
159
168
  getRowId: (e) => e.id,
160
- pageIndex: N,
161
- pageSize: F,
162
- onPageChange: P,
169
+ pageIndex: P,
170
+ pageSize: I,
171
+ onPageChange: F,
163
172
  onPageSizeChange: (e) => {
164
- I(e), P(0);
173
+ L(e), F(0);
165
174
  },
166
- totalItems: V,
167
- hasNextPage: H,
175
+ totalItems: H,
176
+ hasNextPage: U,
168
177
  emptyIllustration: "empty-people",
169
178
  emptyTitle: "No customers yet",
170
179
  emptyDescription: "Add your first customer to start booking deliveries for them.",
171
- emptyAction: /* @__PURE__ */ w(f, {
172
- onClick: () => q("customers/new"),
173
- children: [/* @__PURE__ */ C(n, {
180
+ emptyAction: /* @__PURE__ */ T(p, {
181
+ onClick: () => J("customers/new"),
182
+ children: [/* @__PURE__ */ w(n, {
174
183
  size: 16,
175
184
  className: "mr-1.5"
176
185
  }), "Add Customer"]
@@ -180,4 +189,4 @@ function D() {
180
189
  });
181
190
  }
182
191
  //#endregion
183
- export { D as default };
192
+ export { O as default };