@flowselections/floriday-afhandeling-module 1.0.54 → 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.
- package/dist-lib/components/afhandeling/NuVersturenButton.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/NuVersturenButton.js +3 -4
- package/dist-lib/integrations/supabase/types.d.ts +101 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/floridayFulfillmentSend.server.d.ts +3 -2
- package/dist-lib/lib/floridayFulfillmentSend.server.d.ts.map +1 -1
- package/dist-lib/lib/floridayFulfillmentSend.server.js +75 -7
- package/dist-lib/lib/floridayLoading.functions.d.ts +2 -0
- package/dist-lib/lib/floridayLoading.functions.d.ts.map +1 -1
- package/dist-lib/lib/floridayLoading.functions.js +111 -18
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NuVersturenButton.d.ts","sourceRoot":"","sources":["../../../src/components/afhandeling/NuVersturenButton.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,KAAsB,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,+
|
|
1
|
+
{"version":3,"file":"NuVersturenButton.d.ts","sourceRoot":"","sources":["../../../src/components/afhandeling/NuVersturenButton.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,KAAsB,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,+BAkH3G"}
|
|
@@ -43,11 +43,10 @@ export function NuVersturenButton({ orderRef, label = "Nu versturen" }) {
|
|
|
43
43
|
try {
|
|
44
44
|
const r = await send({ data: { orderRef } });
|
|
45
45
|
for (const x of r.results) {
|
|
46
|
-
const text = x.code === "created" || x.code === "already_fulfilled" ? x.message : `${x.code}: ${x.message}`;
|
|
47
46
|
if (x.code === "created" || x.code === "already_fulfilled")
|
|
48
|
-
toast.success(
|
|
47
|
+
toast.success(x.message);
|
|
49
48
|
else
|
|
50
|
-
|
|
49
|
+
meldFout(new Error(x.message), "Versturen mislukt");
|
|
51
50
|
}
|
|
52
51
|
await load();
|
|
53
52
|
}
|
|
@@ -60,7 +59,7 @@ export function NuVersturenButton({ orderRef, label = "Nu versturen" }) {
|
|
|
60
59
|
};
|
|
61
60
|
return (_jsxs(_Fragment, { children: [_jsxs(Button, { size: "sm", variant: "outline", onClick: open, disabled: loading, children: [loading ? _jsx(Loader2, { className: "h-3 w-3 mr-1 animate-spin" }) : _jsx(Send, { className: "h-3 w-3 mr-1" }), label] }), _jsx(AlertDialog, { open: !!preview, onOpenChange: (o) => !o && !sending && setPreview(null), children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: "Belading naar Floriday versturen?" }), _jsx(AlertDialogDescription, { children: "Een geaccepteerde opdracht start de verzendbrief, vooraankondiging, fust-administratie en afrekening, en is op productie niet terug te draaien." })] }), preview && (_jsxs("div", { className: "space-y-2 text-sm", children: [_jsxs("div", { children: [_jsx("span", { className: "text-muted-foreground", children: "Orders:" }), " ", preview.orderRefs.join(", ")] }), _jsxs("div", { children: [_jsx("span", { className: "text-muted-foreground", children: "Leveringen:" }), " ", preview.shipments.length] }), _jsxs("div", { children: [_jsx("span", { className: "text-muted-foreground", children: "Karren:" }), " ", preview.cartCount, preview.carriers.some((c) => c.shared) ? " (waarvan gedeeld)" : ""] }), _jsxs("div", { children: [_jsx("span", { className: "text-muted-foreground", children: "Regels:" }), " ", preview.lineCount] }), _jsx("ul", { className: "space-y-1", children: preview.orders.map((o) => (_jsxs("li", { className: "flex items-center gap-2", children: [o.controlled
|
|
62
61
|
? _jsx(CheckCircle2, { className: "h-3.5 w-3.5 text-primary" })
|
|
63
|
-
: _jsx(XCircle, { className: "h-3.5 w-3.5 text-destructive" }), _jsxs("span", { children: [o.orderRef, ": ", o.cartsControlled, " van ", o.cartsTotal, " karren goedgekeurd op de Scan-controle", o.controlled ? " — klaar voor verzending" : "", o.pickStatus ? ` · pickstatus: ${PICK_LABEL[o.pickStatus] ?? o.pickStatus}` : "", o.autoStatus ? ` · auto-verwerking: ${o.autoStatus}` : ""] })] }, o.orderRef))) }), preview.shipments.filter((sh) => sh.floridayStatus || preview.lastAttempts.some((a) => a.fulfillmentOrderId === sh.fulfillmentOrderId && (a.code === "created" || a.code === "already_fulfilled"))).map((sh) => (_jsxs("div", { className: "rounded border border-border p-2", children: ["Verzonden naar Floriday", sh.floridayStatus ? ` (Floriday: ${sh.floridayStatus})` : "", " \u00B7", " ", sh.deliveryNoteReady === true ? "verzendbrief klaar" : "verzendbrief volgt via de Engine"] }, sh.fulfillmentOrderId))), preview.lastAttempts.length > 0 && (_jsxs("div", { className: "rounded border border-border p-2", children: [_jsx("div", { className: "text-muted-foreground mb-1", children: "Laatste pogingen" }), preview.lastAttempts.slice(0, 4).map((a) => (_jsxs("div", { children: [new Date(a.createdAt).toLocaleString("nl-NL"), " \u00B7 versturen \u00B7 ", a.code] }, a.createdAt + a.step)))] })), preview.blockers.length > 0 && (_jsx("ul", { className: "list-disc pl-5 text-destructive", children: preview.blockers.map((b) => {
|
|
62
|
+
: _jsx(XCircle, { className: "h-3.5 w-3.5 text-destructive" }), _jsxs("span", { children: [o.orderRef, ": ", o.cartsControlled, " van ", o.cartsTotal, " karren goedgekeurd op de Scan-controle", o.controlled ? " — klaar voor verzending" : "", o.pickStatus ? ` · pickstatus: ${PICK_LABEL[o.pickStatus] ?? o.pickStatus}` : "", o.autoStatus ? ` · auto-verwerking: ${o.autoStatus}` : ""] })] }, o.orderRef))) }), preview.shipments.filter((sh) => sh.floridayStatus || preview.lastAttempts.some((a) => a.fulfillmentOrderId === sh.fulfillmentOrderId && (a.code === "created" || a.code === "already_fulfilled"))).map((sh) => (_jsxs("div", { className: "rounded border border-border p-2", children: ["Verzonden naar Floriday", sh.floridayStatus ? ` (Floriday: ${sh.floridayStatus})` : "", " \u00B7", " ", sh.deliveryNoteReady === true ? "verzendbrief klaar" : "verzendbrief volgt via de Engine"] }, sh.fulfillmentOrderId))), preview.lastAttempts.length > 0 && (_jsxs("div", { className: "rounded border border-border p-2", children: [_jsx("div", { className: "text-muted-foreground mb-1", children: "Laatste pogingen" }), preview.lastAttempts.slice(0, 4).map((a) => (_jsxs("div", { children: [new Date(a.createdAt).toLocaleString("nl-NL"), " \u00B7 versturen \u00B7 ", a.code === "created" || a.code === "already_fulfilled" ? "geaccepteerd" : (a.message ?? a.code)?.replace(/\s*\[[^\]]+\]$/, "")] }, a.createdAt + a.step)))] })), preview.blockers.length > 0 && (_jsx("ul", { className: "list-disc pl-5 text-destructive", children: preview.blockers.map((b) => {
|
|
64
63
|
// Begrijpelijke zin, technische code klein eronder.
|
|
65
64
|
const m = /^(.*?)\s*\[([^\]]+)\]$/s.exec(b);
|
|
66
65
|
return (_jsxs("li", { children: [m ? m[1] : b, m ? _jsx("div", { className: "text-xs text-muted-foreground", children: m[2] }) : null] }, b));
|
|
@@ -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;
|