@flowselections/floriday-afhandeling-module 1.0.52 → 1.0.56

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.
@@ -84,7 +84,7 @@ export function usePickAgenda(from, to) {
84
84
  // Orders die de Verkoop-module niet kent horen hier niet te staan, en orders
85
85
  // die de Engine ná hun leverdatum plant gaan terug naar hun eigen dag. De
86
86
  // dagtotalen worden opnieuw opgeteld uit wat overblijft.
87
- const { isKnownRef, isFulfilledRef } = useKnownOrders();
87
+ const { isKnownRef, isFulfilledRef, isCancelledRef } = useKnownOrders();
88
88
  const { correctPickDate } = useOrderPickDates(wideFrom, wideTo);
89
89
  const days = useMemo(() => {
90
90
  const perDay = new Map();
@@ -94,6 +94,9 @@ export function usePickAgenda(from, to) {
94
94
  for (const o of d.orders) {
95
95
  if (!isKnownRef(o.orderRef))
96
96
  continue;
97
+ // Geannuleerde orders tellen niet als open en niet mee in de dag.
98
+ if (isCancelledRef(o.orderRef) || /annul|cancel/i.test(o.status))
99
+ continue;
97
100
  const dag = correctPickDate(o.orderRef, d.pickDate);
98
101
  const list = perDay.get(dag) ?? [];
99
102
  list.push({ ...o, fulfilled: isFulfilledRef(o.orderRef) });
@@ -106,7 +109,8 @@ export function usePickAgenda(from, to) {
106
109
  continue;
107
110
  if (to && pickDate > to)
108
111
  continue;
109
- const doneCount = orders.filter((o) => o.fulfilled || o.status === "done" || o.status === "completed").length;
112
+ // "Afgehandeld" volgt uitsluitend de Engine (taak afgemeld), niet de Verkoop-status.
113
+ const doneCount = orders.filter((o) => o.status === "done" || o.status === "completed").length;
110
114
  const ready = orders.filter((o) => o.status === "ready" || o.status === "done").length;
111
115
  out.push({
112
116
  pickDate,
@@ -122,7 +126,7 @@ export function usePickAgenda(from, to) {
122
126
  }
123
127
  out.sort((a, b) => a.pickDate.localeCompare(b.pickDate));
124
128
  return out;
125
- }, [query.data, isKnownRef, isFulfilledRef, correctPickDate, from, to]);
129
+ }, [query.data, isKnownRef, isFulfilledRef, isCancelledRef, correctPickDate, from, to]);
126
130
  const byDate = new Map();
127
131
  for (const d of days)
128
132
  byDate.set(d.pickDate, d);
@@ -12572,6 +12572,27 @@ export type Database = {
12572
12572
  };
12573
12573
  Relationships: [];
12574
12574
  };
12575
+ logistics_order_pick_day: {
12576
+ Row: {
12577
+ order_id: string;
12578
+ pick_date: string;
12579
+ pinned_at: string;
12580
+ source: string;
12581
+ };
12582
+ Insert: {
12583
+ order_id: string;
12584
+ pick_date: string;
12585
+ pinned_at?: string;
12586
+ source?: string;
12587
+ };
12588
+ Update: {
12589
+ order_id?: string;
12590
+ pick_date?: string;
12591
+ pinned_at?: string;
12592
+ source?: string;
12593
+ };
12594
+ Relationships: [];
12595
+ };
12575
12596
  logistics_order_plan_exclusion: {
12576
12597
  Row: {
12577
12598
  created_at: string;
@@ -18640,6 +18661,36 @@ export type Database = {
18640
18661
  };
18641
18662
  Relationships: [];
18642
18663
  };
18664
+ print_computer_status: {
18665
+ Row: {
18666
+ bijgewerkt_op: string;
18667
+ created_at: string;
18668
+ extern_computer_id: string;
18669
+ naam: string | null;
18670
+ status: string | null;
18671
+ updated_at: string;
18672
+ verbonden: boolean;
18673
+ };
18674
+ Insert: {
18675
+ bijgewerkt_op?: string;
18676
+ created_at?: string;
18677
+ extern_computer_id: string;
18678
+ naam?: string | null;
18679
+ status?: string | null;
18680
+ updated_at?: string;
18681
+ verbonden?: boolean;
18682
+ };
18683
+ Update: {
18684
+ bijgewerkt_op?: string;
18685
+ created_at?: string;
18686
+ extern_computer_id?: string;
18687
+ naam?: string | null;
18688
+ status?: string | null;
18689
+ updated_at?: string;
18690
+ verbonden?: boolean;
18691
+ };
18692
+ Relationships: [];
18693
+ };
18643
18694
  print_dedupe_events: {
18644
18695
  Row: {
18645
18696
  bestaande_job_id: string | null;
@@ -18762,16 +18813,21 @@ export type Database = {
18762
18813
  lokale_pdf_print_plek_id: string | null;
18763
18814
  lokale_pdf_status: string | null;
18764
18815
  opgepakt_op: string | null;
18816
+ origineel_sleutel: string | null;
18765
18817
  paginas: number;
18766
18818
  payload: Json;
18767
18819
  pdf_base64: string | null;
18768
18820
  pdf_url: string | null;
18769
18821
  pogingen: number;
18770
18822
  printer_id: string | null;
18823
+ printnode_bericht: string | null;
18824
+ printnode_status: string | null;
18825
+ printnode_status_op: string | null;
18771
18826
  render_html: string | null;
18772
18827
  resultaat_pdf_base64: string | null;
18773
18828
  status: Database["public"]["Enums"]["print_job_status"];
18774
18829
  updated_at: string;
18830
+ verloopt_na_s: number | null;
18775
18831
  verwerkingsfase: string;
18776
18832
  volgende_poging: string | null;
18777
18833
  voltooid_op: string | null;
@@ -18811,16 +18867,21 @@ export type Database = {
18811
18867
  lokale_pdf_print_plek_id?: string | null;
18812
18868
  lokale_pdf_status?: string | null;
18813
18869
  opgepakt_op?: string | null;
18870
+ origineel_sleutel?: string | null;
18814
18871
  paginas?: number;
18815
18872
  payload?: Json;
18816
18873
  pdf_base64?: string | null;
18817
18874
  pdf_url?: string | null;
18818
18875
  pogingen?: number;
18819
18876
  printer_id?: string | null;
18877
+ printnode_bericht?: string | null;
18878
+ printnode_status?: string | null;
18879
+ printnode_status_op?: string | null;
18820
18880
  render_html?: string | null;
18821
18881
  resultaat_pdf_base64?: string | null;
18822
18882
  status?: Database["public"]["Enums"]["print_job_status"];
18823
18883
  updated_at?: string;
18884
+ verloopt_na_s?: number | null;
18824
18885
  verwerkingsfase?: string;
18825
18886
  volgende_poging?: string | null;
18826
18887
  voltooid_op?: string | null;
@@ -18860,16 +18921,21 @@ export type Database = {
18860
18921
  lokale_pdf_print_plek_id?: string | null;
18861
18922
  lokale_pdf_status?: string | null;
18862
18923
  opgepakt_op?: string | null;
18924
+ origineel_sleutel?: string | null;
18863
18925
  paginas?: number;
18864
18926
  payload?: Json;
18865
18927
  pdf_base64?: string | null;
18866
18928
  pdf_url?: string | null;
18867
18929
  pogingen?: number;
18868
18930
  printer_id?: string | null;
18931
+ printnode_bericht?: string | null;
18932
+ printnode_status?: string | null;
18933
+ printnode_status_op?: string | null;
18869
18934
  render_html?: string | null;
18870
18935
  resultaat_pdf_base64?: string | null;
18871
18936
  status?: Database["public"]["Enums"]["print_job_status"];
18872
18937
  updated_at?: string;
18938
+ verloopt_na_s?: number | null;
18873
18939
  verwerkingsfase?: string;
18874
18940
  volgende_poging?: string | null;
18875
18941
  voltooid_op?: string | null;
@@ -28029,16 +28095,21 @@ export type Database = {
28029
28095
  lokale_pdf_print_plek_id: string | null;
28030
28096
  lokale_pdf_status: string | null;
28031
28097
  opgepakt_op: string | null;
28098
+ origineel_sleutel: string | null;
28032
28099
  paginas: number;
28033
28100
  payload: Json;
28034
28101
  pdf_base64: string | null;
28035
28102
  pdf_url: string | null;
28036
28103
  pogingen: number;
28037
28104
  printer_id: string | null;
28105
+ printnode_bericht: string | null;
28106
+ printnode_status: string | null;
28107
+ printnode_status_op: string | null;
28038
28108
  render_html: string | null;
28039
28109
  resultaat_pdf_base64: string | null;
28040
28110
  status: Database["public"]["Enums"]["print_job_status"];
28041
28111
  updated_at: string;
28112
+ verloopt_na_s: number | null;
28042
28113
  verwerkingsfase: string;
28043
28114
  volgende_poging: string | null;
28044
28115
  voltooid_op: string | null;
@@ -28219,16 +28290,21 @@ export type Database = {
28219
28290
  lokale_pdf_print_plek_id: string | null;
28220
28291
  lokale_pdf_status: string | null;
28221
28292
  opgepakt_op: string | null;
28293
+ origineel_sleutel: string | null;
28222
28294
  paginas: number;
28223
28295
  payload: Json;
28224
28296
  pdf_base64: string | null;
28225
28297
  pdf_url: string | null;
28226
28298
  pogingen: number;
28227
28299
  printer_id: string | null;
28300
+ printnode_bericht: string | null;
28301
+ printnode_status: string | null;
28302
+ printnode_status_op: string | null;
28228
28303
  render_html: string | null;
28229
28304
  resultaat_pdf_base64: string | null;
28230
28305
  status: Database["public"]["Enums"]["print_job_status"];
28231
28306
  updated_at: string;
28307
+ verloopt_na_s: number | null;
28232
28308
  verwerkingsfase: string;
28233
28309
  volgende_poging: string | null;
28234
28310
  voltooid_op: string | null;
@@ -28280,16 +28356,21 @@ export type Database = {
28280
28356
  lokale_pdf_print_plek_id: string | null;
28281
28357
  lokale_pdf_status: string | null;
28282
28358
  opgepakt_op: string | null;
28359
+ origineel_sleutel: string | null;
28283
28360
  paginas: number;
28284
28361
  payload: Json;
28285
28362
  pdf_base64: string | null;
28286
28363
  pdf_url: string | null;
28287
28364
  pogingen: number;
28288
28365
  printer_id: string | null;
28366
+ printnode_bericht: string | null;
28367
+ printnode_status: string | null;
28368
+ printnode_status_op: string | null;
28289
28369
  render_html: string | null;
28290
28370
  resultaat_pdf_base64: string | null;
28291
28371
  status: Database["public"]["Enums"]["print_job_status"];
28292
28372
  updated_at: string;
28373
+ verloopt_na_s: number | null;
28293
28374
  verwerkingsfase: string;
28294
28375
  volgende_poging: string | null;
28295
28376
  voltooid_op: string | null;
@@ -29696,6 +29777,7 @@ export type Database = {
29696
29777
  _is_herprint?: boolean;
29697
29778
  _kopieen?: number;
29698
29779
  _layout_id?: string;
29780
+ _mislukt_reden?: string;
29699
29781
  _payload?: Json;
29700
29782
  _pdf_base64?: string;
29701
29783
  _pdf_url?: string;
@@ -30057,6 +30139,12 @@ export type Database = {
30057
30139
  };
30058
30140
  Returns: boolean;
30059
30141
  };
30142
+ logistics_cart_ids_frozen: {
30143
+ Args: {
30144
+ p_cart_ids: string[];
30145
+ };
30146
+ Returns: string[];
30147
+ };
30060
30148
  logistics_cart_index: {
30061
30149
  Args: {
30062
30150
  p_from?: string;
@@ -30083,6 +30171,12 @@ export type Database = {
30083
30171
  task_status: string;
30084
30172
  }[];
30085
30173
  };
30174
+ logistics_cart_is_frozen: {
30175
+ Args: {
30176
+ p_cart_id: string;
30177
+ };
30178
+ Returns: boolean;
30179
+ };
30086
30180
  logistics_cart_is_full: {
30087
30181
  Args: {
30088
30182
  p_cart_id: string;
@@ -32803,6 +32897,13 @@ export type Database = {
32803
32897
  };
32804
32898
  Returns: string;
32805
32899
  };
32900
+ pick_find_sent_elsewhere: {
32901
+ Args: {
32902
+ _cart_id: string;
32903
+ _queue_item_id: string;
32904
+ };
32905
+ Returns: Json;
32906
+ };
32806
32907
  pick_is_reference_admin: {
32807
32908
  Args: never;
32808
32909
  Returns: boolean;