@flowselections/logistiek-engine 1.0.17 → 1.0.19

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.
@@ -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,CAiG1B;AA2BD,4EAA4E;AAC5E,wBAAsB,cAAc,CAAC,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtE"}
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");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowselections/logistiek-engine",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "flowselections": {
5
5
  "moduleId": "logistiek-engine",
6
6
  "pages": [