@flowselections/pick-schermen-kwekers 1.0.2 → 1.0.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.
- package/dist-lib/components/PickPublicPage.d.ts +7 -0
- package/dist-lib/components/PickPublicPage.d.ts.map +1 -0
- package/dist-lib/components/PickPublicPage.js +19 -0
- package/dist-lib/components/PickstationsPage.d.ts.map +1 -1
- package/dist-lib/components/PickstationsPage.js +57 -14
- package/dist-lib/components/pick/LanguageTiles.d.ts +8 -0
- package/dist-lib/components/pick/LanguageTiles.d.ts.map +1 -0
- package/dist-lib/components/pick/LanguageTiles.js +11 -0
- package/dist-lib/components/pick/PickScherm.d.ts +6 -4
- package/dist-lib/components/pick/PickScherm.d.ts.map +1 -1
- package/dist-lib/components/pick/PickScherm.js +145 -61
- package/dist-lib/components/pick/QueueTable.d.ts +4 -1
- package/dist-lib/components/pick/QueueTable.d.ts.map +1 -1
- package/dist-lib/components/pick/QueueTable.js +11 -10
- package/dist-lib/hooks/usePickQueue.d.ts +7 -1
- package/dist-lib/hooks/usePickQueue.d.ts.map +1 -1
- package/dist-lib/hooks/usePickQueue.js +43 -6
- package/dist-lib/index.d.ts +5 -6
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/index.js +6 -12
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +8929 -5189
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +8929 -5189
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +8929 -5189
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +9245 -5437
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/layoutApi.d.ts +23 -0
- package/dist-lib/lib/layoutApi.d.ts.map +1 -0
- package/dist-lib/lib/layoutApi.js +94 -0
- package/dist-lib/lib/layoutMaker/documentProfiles.d.ts +50 -0
- package/dist-lib/lib/layoutMaker/documentProfiles.d.ts.map +1 -0
- package/dist-lib/lib/layoutMaker/documentProfiles.js +458 -0
- package/dist-lib/lib/layoutMaker/documentTypes.d.ts +123 -0
- package/dist-lib/lib/layoutMaker/documentTypes.d.ts.map +1 -0
- package/dist-lib/lib/layoutMaker/documentTypes.js +74 -0
- package/dist-lib/lib/layoutMaker/logoLibrary.d.ts +13 -0
- package/dist-lib/lib/layoutMaker/logoLibrary.d.ts.map +1 -0
- package/dist-lib/lib/layoutMaker/logoLibrary.js +54 -0
- package/dist-lib/lib/layoutMaker/pakbonBuilder.d.ts +196 -0
- package/dist-lib/lib/layoutMaker/pakbonBuilder.d.ts.map +1 -0
- package/dist-lib/lib/layoutMaker/pakbonBuilder.js +813 -0
- package/dist-lib/lib/layoutMaker/pakbonHtml.d.ts +48 -0
- package/dist-lib/lib/layoutMaker/pakbonHtml.d.ts.map +1 -0
- package/dist-lib/lib/layoutMaker/pakbonHtml.js +703 -0
- package/dist-lib/lib/layoutRenderer.d.ts +7 -0
- package/dist-lib/lib/layoutRenderer.d.ts.map +1 -0
- package/dist-lib/lib/layoutRenderer.js +233 -0
- package/dist-lib/lib/layoutTypes.d.ts +84 -0
- package/dist-lib/lib/layoutTypes.d.ts.map +1 -0
- package/dist-lib/lib/layoutTypes.js +25 -0
- package/dist-lib/lib/logisticsApi.d.ts +54 -0
- package/dist-lib/lib/logisticsApi.d.ts.map +1 -0
- package/dist-lib/lib/logisticsApi.js +72 -0
- package/dist-lib/lib/logisticsTypes.d.ts +34 -0
- package/dist-lib/lib/logisticsTypes.d.ts.map +1 -0
- package/dist-lib/lib/logisticsTypes.js +36 -0
- package/dist-lib/lib/orderContext.d.ts +50 -0
- package/dist-lib/lib/orderContext.d.ts.map +1 -0
- package/dist-lib/lib/orderContext.js +162 -0
- package/dist-lib/lib/pakbonOrderInput.d.ts +8 -0
- package/dist-lib/lib/pakbonOrderInput.d.ts.map +1 -0
- package/dist-lib/lib/pakbonOrderInput.js +150 -0
- package/dist-lib/lib/pickApi.d.ts +24 -1
- package/dist-lib/lib/pickApi.d.ts.map +1 -1
- package/dist-lib/lib/pickApi.js +46 -5
- package/dist-lib/lib/pickI18n.d.ts +14 -0
- package/dist-lib/lib/pickI18n.d.ts.map +1 -0
- package/dist-lib/lib/pickI18n.js +500 -0
- package/dist-lib/lib/pickPrint.d.ts +18 -0
- package/dist-lib/lib/pickPrint.d.ts.map +1 -0
- package/dist-lib/lib/pickPrint.js +184 -0
- package/dist-lib/lib/pickTypes.d.ts +1 -0
- package/dist-lib/lib/pickTypes.d.ts.map +1 -1
- package/package.json +5 -20
- package/dist-lib/components/PickBeheerPage.d.ts +0 -2
- package/dist-lib/components/PickBeheerPage.d.ts.map +0 -1
- package/dist-lib/components/PickBeheerPage.js +0 -84
- package/dist-lib/components/PickDashboardPage.d.ts +0 -2
- package/dist-lib/components/PickDashboardPage.d.ts.map +0 -1
- package/dist-lib/components/PickDashboardPage.js +0 -54
- package/dist-lib/components/PickKioskPage.d.ts +0 -7
- package/dist-lib/components/PickKioskPage.d.ts.map +0 -1
- package/dist-lib/components/PickKioskPage.js +0 -18
- package/dist-lib/components/PickstationDetailPage.d.ts +0 -6
- package/dist-lib/components/PickstationDetailPage.d.ts.map +0 -1
- package/dist-lib/components/PickstationDetailPage.js +0 -25
- package/dist-lib/components/pick/ConfigCrud.d.ts +0 -27
- package/dist-lib/components/pick/ConfigCrud.d.ts.map +0 -1
- package/dist-lib/components/pick/ConfigCrud.js +0 -64
- package/dist-lib/components/pick/CountryTiles.d.ts +0 -9
- package/dist-lib/components/pick/CountryTiles.d.ts.map +0 -1
- package/dist-lib/components/pick/CountryTiles.js +0 -13
|
@@ -19,10 +19,36 @@ export function usePickQueue(args) {
|
|
|
19
19
|
const queryClient = useQueryClient();
|
|
20
20
|
const { stationId, screenId, filters } = args;
|
|
21
21
|
const enabled = args.enabled !== false;
|
|
22
|
-
const
|
|
22
|
+
const syncQuery = useQuery({
|
|
23
|
+
queryKey: ["pick", "sync"],
|
|
24
|
+
enabled,
|
|
25
|
+
queryFn: async () => {
|
|
26
|
+
await pickApi.syncQueue();
|
|
27
|
+
return Date.now();
|
|
28
|
+
},
|
|
29
|
+
staleTime: 60000,
|
|
30
|
+
refetchInterval: 60000,
|
|
31
|
+
retry: false,
|
|
32
|
+
});
|
|
33
|
+
const pickDayQuery = useQuery({
|
|
34
|
+
queryKey: ["pick", "pickDay"],
|
|
35
|
+
enabled: enabled && !syncQuery.isLoading,
|
|
36
|
+
queryFn: () => pickApi.currentPickDay(),
|
|
37
|
+
staleTime: 30000,
|
|
38
|
+
});
|
|
39
|
+
const pickDay = pickDayQuery.data ?? null;
|
|
40
|
+
// Na een geslaagde synchronisatie opnieuw pickdag, wachtrij en tellers laden.
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (syncQuery.data === undefined)
|
|
43
|
+
return;
|
|
44
|
+
queryClient.invalidateQueries({ queryKey: ["pick", "pickDay"] });
|
|
45
|
+
queryClient.invalidateQueries({ queryKey: ["pick", "queue"] });
|
|
46
|
+
queryClient.invalidateQueries({ queryKey: ["pick", "dayCounts"] });
|
|
47
|
+
}, [syncQuery.data, queryClient]);
|
|
48
|
+
const key = useMemo(() => ["pick", "queue", stationId ?? "-", screenId ?? "-", pickDay ?? "-", filters], [stationId, screenId, pickDay, filters]);
|
|
23
49
|
const queueQuery = useQuery({
|
|
24
50
|
queryKey: key,
|
|
25
|
-
enabled,
|
|
51
|
+
enabled: enabled && !pickDayQuery.isLoading,
|
|
26
52
|
queryFn: () => pickApi.queue({
|
|
27
53
|
stationId,
|
|
28
54
|
screenId,
|
|
@@ -30,11 +56,18 @@ export function usePickQueue(args) {
|
|
|
30
56
|
search: filters.search.trim() || undefined,
|
|
31
57
|
documentTypeId: filters.documentTypeId,
|
|
32
58
|
urgentOnly: filters.urgentOnly,
|
|
59
|
+
includeDone: true,
|
|
60
|
+
pickDay,
|
|
33
61
|
sortRules: filters.sortRules,
|
|
34
62
|
page: filters.page,
|
|
35
63
|
pageSize: filters.pageSize,
|
|
36
64
|
}),
|
|
37
65
|
});
|
|
66
|
+
const countsQuery = useQuery({
|
|
67
|
+
queryKey: ["pick", "dayCounts", stationId ?? "-", screenId ?? "-", pickDay ?? "-"],
|
|
68
|
+
enabled: enabled && !pickDayQuery.isLoading,
|
|
69
|
+
queryFn: () => pickApi.dayCounts({ stationId, screenId, pickDay }),
|
|
70
|
+
});
|
|
38
71
|
const locksQuery = useQuery({
|
|
39
72
|
queryKey: ["pick", "locks", stationId ?? "-"],
|
|
40
73
|
enabled,
|
|
@@ -44,6 +77,7 @@ export function usePickQueue(args) {
|
|
|
44
77
|
const invalidate = useCallback(() => {
|
|
45
78
|
queryClient.invalidateQueries({ queryKey: ["pick", "queue"] });
|
|
46
79
|
queryClient.invalidateQueries({ queryKey: ["pick", "locks"] });
|
|
80
|
+
queryClient.invalidateQueries({ queryKey: ["pick", "dayCounts"] });
|
|
47
81
|
queryClient.invalidateQueries({ queryKey: ["pick", "countryCounts"] });
|
|
48
82
|
queryClient.invalidateQueries({ queryKey: ["pick", "dashboard"] });
|
|
49
83
|
}, [queryClient]);
|
|
@@ -63,6 +97,9 @@ export function usePickQueue(args) {
|
|
|
63
97
|
return {
|
|
64
98
|
items: safeArray(queueQuery.data?.items),
|
|
65
99
|
total: queueQuery.data?.total ?? 0,
|
|
100
|
+
pickDay,
|
|
101
|
+
pendingCount: countsQuery.data?.pending ?? 0,
|
|
102
|
+
printedCount: countsQuery.data?.printed ?? 0,
|
|
66
103
|
loading: queueQuery.isLoading,
|
|
67
104
|
error: queueQuery.error instanceof Error ? queueQuery.error.message : null,
|
|
68
105
|
lockedIds,
|
|
@@ -95,11 +132,11 @@ export function usePickHeartbeat(stationId, screenId, sessionId) {
|
|
|
95
132
|
}, [stationId, screenId, sessionId]);
|
|
96
133
|
return { online };
|
|
97
134
|
}
|
|
98
|
-
export function usePickCountryCounts(
|
|
135
|
+
export function usePickCountryCounts(args) {
|
|
99
136
|
return useQuery({
|
|
100
|
-
queryKey: ["pick", "countryCounts", screenId ?? "-"],
|
|
101
|
-
enabled: !!screenId,
|
|
102
|
-
queryFn: () => pickApi.countryCounts(
|
|
137
|
+
queryKey: ["pick", "countryCounts", args.stationId ?? "-", args.screenId ?? "-"],
|
|
138
|
+
enabled: !!(args.stationId || args.screenId),
|
|
139
|
+
queryFn: () => pickApi.countryCounts(args),
|
|
103
140
|
refetchInterval: 20000,
|
|
104
141
|
});
|
|
105
142
|
}
|
package/dist-lib/index.d.ts
CHANGED
|
@@ -5,16 +5,15 @@ export * from './components/TemplateModulePage';
|
|
|
5
5
|
export { TemplateModuleLogo } from './components/TemplateModuleLogo';
|
|
6
6
|
export * from './lib/pickTypes';
|
|
7
7
|
export * from './lib/pickApi';
|
|
8
|
+
export * from './lib/logisticsTypes';
|
|
9
|
+
export * from './lib/logisticsApi';
|
|
8
10
|
export * from './hooks/usePickConfig';
|
|
9
11
|
export * from './hooks/usePickQueue';
|
|
10
|
-
export {
|
|
12
|
+
export { LanguageTiles } from './components/pick/LanguageTiles';
|
|
13
|
+
export * from './lib/pickI18n';
|
|
11
14
|
export { QueueTable } from './components/pick/QueueTable';
|
|
12
15
|
export { PickScherm } from './components/pick/PickScherm';
|
|
13
|
-
export { ConfigCrud } from './components/pick/ConfigCrud';
|
|
14
16
|
export { PickstationsPage } from './components/PickstationsPage';
|
|
15
|
-
export {
|
|
16
|
-
export { PickDashboardPage } from './components/PickDashboardPage';
|
|
17
|
-
export { PickBeheerPage } from './components/PickBeheerPage';
|
|
18
|
-
export { PickKioskPage } from './components/PickKioskPage';
|
|
17
|
+
export { PickPublicPage } from './components/PickPublicPage';
|
|
19
18
|
export declare const pickSchermenModule: FlowModule;
|
|
20
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist-lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAO7D,eAAO,MAAM,kBAAkB,EAAE,UAYhC,CAAC"}
|
package/dist-lib/index.js
CHANGED
|
@@ -13,24 +13,23 @@
|
|
|
13
13
|
// 3. Add your nav item — use `children` if you need a dropdown
|
|
14
14
|
// 4. Done! You don't need to touch any other file for registration.
|
|
15
15
|
// ============================================================================
|
|
16
|
-
import {
|
|
16
|
+
import { Warehouse } from "lucide-react";
|
|
17
17
|
export * from './_core-safelist';
|
|
18
18
|
export * from './components/TemplatePage';
|
|
19
19
|
export * from './components/TemplateModulePage';
|
|
20
20
|
export { TemplateModuleLogo } from './components/TemplateModuleLogo';
|
|
21
21
|
export * from './lib/pickTypes';
|
|
22
22
|
export * from './lib/pickApi';
|
|
23
|
+
export * from './lib/logisticsTypes';
|
|
24
|
+
export * from './lib/logisticsApi';
|
|
23
25
|
export * from './hooks/usePickConfig';
|
|
24
26
|
export * from './hooks/usePickQueue';
|
|
25
|
-
export {
|
|
27
|
+
export { LanguageTiles } from './components/pick/LanguageTiles';
|
|
28
|
+
export * from './lib/pickI18n';
|
|
26
29
|
export { QueueTable } from './components/pick/QueueTable';
|
|
27
30
|
export { PickScherm } from './components/pick/PickScherm';
|
|
28
|
-
export { ConfigCrud } from './components/pick/ConfigCrud';
|
|
29
31
|
export { PickstationsPage } from './components/PickstationsPage';
|
|
30
|
-
export {
|
|
31
|
-
export { PickDashboardPage } from './components/PickDashboardPage';
|
|
32
|
-
export { PickBeheerPage } from './components/PickBeheerPage';
|
|
33
|
-
export { PickKioskPage } from './components/PickKioskPage';
|
|
32
|
+
export { PickPublicPage } from './components/PickPublicPage';
|
|
34
33
|
// Import your settings cards here (delete if you have none)
|
|
35
34
|
// import { MySettingsCard } from "./components/settings/MySettingsCard";
|
|
36
35
|
// ⚠️ HERNOEM naar een unieke naam, bijv. floridayVerkoopModule
|
|
@@ -43,11 +42,6 @@ export const pickSchermenModule = {
|
|
|
43
42
|
label: "Pickstations",
|
|
44
43
|
href: "/pickstations",
|
|
45
44
|
icon: Warehouse,
|
|
46
|
-
children: [
|
|
47
|
-
{ label: "Pickstations", href: "/pickstations", icon: Boxes },
|
|
48
|
-
{ label: "Live dashboard", href: "/pickstations/dashboard", icon: LayoutDashboard },
|
|
49
|
-
{ label: "Beheer", href: "/pickstations/beheer", icon: Settings2 },
|
|
50
|
-
],
|
|
51
45
|
},
|
|
52
46
|
settingsCards: [],
|
|
53
47
|
};
|