@flowselections/logistiek-engine 1.0.17 → 1.0.18
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/README.md +24 -24
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +158 -1515
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/moduleClient.d.ts.map +1 -1
- package/dist-lib/lib/floridayDocuments.functions.d.ts.map +1 -1
- package/dist-lib/lib/floridayPush.functions.d.ts.map +1 -1
- package/dist-lib/lib/loadCarrierPlanning.functions.d.ts +30 -5
- package/dist-lib/lib/loadCarrierPlanning.functions.d.ts.map +1 -1
- package/dist-lib/lib/logisticsRecalcJob.functions.d.ts.map +1 -1
- package/dist-lib/lib/logisticsRecalculate.functions.d.ts.map +1 -1
- package/dist-lib/lib/modulePrompts.d.ts.map +1 -1
- package/dist-lib/lib/modulePrompts.js +1147 -1091
- package/dist-lib/lib/planQueue.server.d.ts.map +1 -1
- package/dist-lib/lib/planQueue.server.js +12 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planQueue.server.d.ts","sourceRoot":"","sources":["../../src/lib/planQueue.server.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI5D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,2FAA2F;IAC3F,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAwBD,wFAAwF;AACxF,wBAAsB,YAAY,CAChC,EAAE,EAAE,cAAc,EAClB,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAO,GAC3D,OAAO,CAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"planQueue.server.d.ts","sourceRoot":"","sources":["../../src/lib/planQueue.server.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI5D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,2FAA2F;IAC3F,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAwBD,wFAAwF;AACxF,wBAAsB,YAAY,CAChC,EAAE,EAAE,cAAc,EAClB,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAO,GAC3D,OAAO,CAAC,eAAe,CAAC,CAsG1B;AAmCD,4EAA4E;AAE5E,wBAAsB,cAAc,CAAC,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtE"}
|
|
@@ -115,6 +115,11 @@ export async function runPlanQueue(sb, options = {}) {
|
|
|
115
115
|
if (result.planned > 0) {
|
|
116
116
|
await runDayLevelSteps(sb, touchedDates, result);
|
|
117
117
|
}
|
|
118
|
+
else {
|
|
119
|
+
// De pickwachtrij is een reconciliatie tussen orders en pick_queue en mag
|
|
120
|
+
// niet afhangen van of er deze minuut iets gepland is.
|
|
121
|
+
await syncPickQueue(sb, result);
|
|
122
|
+
}
|
|
118
123
|
return result;
|
|
119
124
|
}
|
|
120
125
|
/** Dagniveau-stappen: taken inplannen, tellingen bijwerken en capaciteit controleren. */
|
|
@@ -136,6 +141,13 @@ async function runDayLevelSteps(sb, dates, result) {
|
|
|
136
141
|
result.errors.push(`${call.fn}: ${error.message}`);
|
|
137
142
|
}
|
|
138
143
|
}
|
|
144
|
+
/** Werkt alleen de pickwachtrij bij, ook als er niets te plannen viel. */
|
|
145
|
+
async function syncPickQueue(sb, result) {
|
|
146
|
+
const { error } = await sb.rpc("logistics_sync_pick_queue", {});
|
|
147
|
+
if (error && result.errors.length < 10) {
|
|
148
|
+
result.errors.push(`logistics_sync_pick_queue: ${error.message}`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
139
151
|
/** Ruimt afgeronde wachtrijrijen op volgens de ingestelde bewaartermijn. */
|
|
140
152
|
export async function prunePlanQueue(sb) {
|
|
141
153
|
await sb.rpc("logistics_plan_prune");
|