@flowselections/floriday-voorraad 1.0.71 → 1.0.72

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":"FloridaySentCard.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/FloridaySentCard.tsx"],"names":[],"mappings":"AAWA,KAAK,GAAG,GAAG;IACT,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAUF,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,QAAQ,GAAG,cAAc,GAAG,aAAa,GAAG,YAAY,GAAG,YAAY,GAAG,aAAa,CAAC,GAAG,MAAM,CA0BxI;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,SAAS,EACT,WAAW,EACX,WAAW,GACZ,EAAE;IACD,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,+BAiIA"}
1
+ {"version":3,"file":"FloridaySentCard.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/FloridaySentCard.tsx"],"names":[],"mappings":"AAWA,KAAK,GAAG,GAAG;IACT,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAUF,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,QAAQ,GAAG,cAAc,GAAG,aAAa,GAAG,YAAY,GAAG,YAAY,GAAG,aAAa,CAAC,GAAG,MAAM,CA0BxI;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,SAAS,EACT,WAAW,EACX,WAAW,GACZ,EAAE;IACD,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,+BA+IA"}
@@ -48,6 +48,7 @@ export function resultText(r) {
48
48
  export function FloridaySentCard({ connectionId, productId, tradeItemId, productType, }) {
49
49
  const [rows, setRows] = useState([]);
50
50
  const [weekPrice, setWeekPrice] = useState({});
51
+ const [weekChange, setWeekChange] = useState({});
51
52
  const [reason, setReason] = useState(null);
52
53
  useEffect(() => {
53
54
  if (!connectionId || (!productId && !tradeItemId))
@@ -83,17 +84,22 @@ export function FloridaySentCard({ connectionId, productId, tradeItemId, product
83
84
  // (latere aantal-wijzigingen sturen geen prijs; die blijft in Floriday staan).
84
85
  const { data: priced } = await supabase
85
86
  .from("floriday_continuous_stock_queue")
86
- .select("target_year,target_week,price_sent,updated_at")
87
+ .select("target_year,target_week,price_sent,price_previous,updated_at")
87
88
  .eq("connection_id", connectionId)
88
89
  .or(ors)
89
90
  .not("price_sent", "is", null)
90
91
  .order("updated_at", { ascending: false })
91
92
  .limit(100);
92
93
  const wp = {};
94
+ const wc = {};
93
95
  for (const r of (priced ?? [])) {
94
96
  const k = `${r.target_year ?? ""}-${r.target_week ?? ""}`;
95
- if (!(k in wp))
97
+ if (!(k in wp)) {
96
98
  wp[k] = Number(r.price_sent);
99
+ // M27: het ERP heeft een andere prijs in Floriday overschreven.
100
+ if (r.price_previous != null && Math.abs(Number(r.price_previous) - Number(r.price_sent)) > 0.0005)
101
+ wc[k] = `Prijs in Floriday aangepast van € ${Number(r.price_previous).toFixed(2)} naar € ${Number(r.price_sent).toFixed(2)}`;
102
+ }
97
103
  }
98
104
  // M26: werkelijke reden bij "Prijs ontbreekt" uit het artikel zelf.
99
105
  let why = null;
@@ -106,6 +112,7 @@ export function FloridaySentCard({ connectionId, productId, tradeItemId, product
106
112
  if (cancelled)
107
113
  return;
108
114
  setWeekPrice(wp);
115
+ setWeekChange(wc);
109
116
  setReason(why);
110
117
  })();
111
118
  return () => {
@@ -115,5 +122,6 @@ export function FloridaySentCard({ connectionId, productId, tradeItemId, product
115
122
  return (_jsx(Card, { children: _jsxs(CardContent, { className: "space-y-3 p-4", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Send, { className: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium", children: "Laatst naar Floriday" })] }), _jsxs("p", { className: "text-xs text-muted-foreground break-all", children: ["Floriday-id: ", tradeItemId ? _jsx("span", { className: "font-mono", children: tradeItemId }) : "nog niet gekoppeld"] }), (productType === "GROUP" || productType === "SET" || productType === "COMPOSITION") && (_jsx("p", { className: "text-xs text-muted-foreground", children: "Productgroep (ERP): leden met eigen voorraad; alleen het totaal gaat naar Floriday. Set (Floriday): \u00E9\u00E9n artikel samengesteld uit onderdelen; de voorraad gaat pas naar Floriday na akkoord." })), rows.length === 0 ? (_jsx("p", { className: "text-sm text-muted-foreground", children: "Nog niets naar Floriday gestuurd." })) : (_jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { className: "w-full text-xs", children: [_jsx("thead", { className: "text-left text-muted-foreground", children: _jsxs("tr", { children: [_jsx("th", { className: "py-1 pr-3", children: "Week" }), _jsx("th", { className: "py-1 pr-3 text-right", children: "Aantal" }), _jsx("th", { className: "py-1 pr-3 text-right", children: "Prijs (excl. btw)" }), _jsx("th", { className: "py-1 pr-3", children: "Modus" }), _jsx("th", { className: "py-1 pr-3", children: "Tijd" }), _jsx("th", { className: "py-1", children: "Resultaat" })] }) }), _jsx("tbody", { children: rows.map((r) => (_jsxs("tr", { className: "border-t align-top", children: [_jsx("td", { className: "py-1 pr-3 whitespace-nowrap", children: r.target_week ? `${r.target_year}-${r.target_week}` : "—" }), _jsx("td", { className: "py-1 pr-3 text-right tabular-nums", children: r.number_of_pieces ?? "—" }), _jsx("td", { className: "py-1 pr-3 text-right tabular-nums", children: (() => {
116
123
  const p = r.price_sent ?? weekPrice[`${r.target_year ?? ""}-${r.target_week ?? ""}`];
117
124
  return p != null ? `€ ${Number(p).toFixed(2)}` : "—";
118
- })() }), _jsx("td", { className: "py-1 pr-3 whitespace-nowrap", children: r.stock_mode ? MODE_LABEL[r.stock_mode] ?? r.stock_mode : "—" }), _jsx("td", { className: "py-1 pr-3 whitespace-nowrap", children: new Date(r.sent_at ?? r.updated_at).toLocaleString("nl-NL") }), _jsxs("td", { className: "py-1", children: [r.status === "skipped_no_price" && reason ? reason : resultText(r), r.price_note && r.price_note !== resultText(r) && (_jsx("div", { className: "text-xs text-muted-foreground", children: r.price_note }))] })] }, r.id))) })] }) }))] }) }));
125
+ })() }), _jsx("td", { className: "py-1 pr-3 whitespace-nowrap", children: r.stock_mode ? MODE_LABEL[r.stock_mode] ?? r.stock_mode : "—" }), _jsx("td", { className: "py-1 pr-3 whitespace-nowrap", children: new Date(r.sent_at ?? r.updated_at).toLocaleString("nl-NL") }), _jsxs("td", { className: "py-1", children: [r.status === "skipped_no_price" && reason ? reason : resultText(r), weekChange[`${r.target_year ?? ""}-${r.target_week ?? ""}`] &&
126
+ weekChange[`${r.target_year ?? ""}-${r.target_week ?? ""}`] !== resultText(r) && (_jsx("div", { className: "text-xs text-muted-foreground", children: weekChange[`${r.target_year ?? ""}-${r.target_week ?? ""}`] })), r.price_note && r.price_note !== resultText(r) && (_jsx("div", { className: "text-xs text-muted-foreground", children: r.price_note }))] })] }, r.id))) })] }) }))] }) }));
119
127
  }
@@ -6842,6 +6842,7 @@ export type Database = {
6842
6842
  next_attempt_at: string;
6843
6843
  number_of_pieces: number;
6844
6844
  price_note: string | null;
6845
+ price_previous: number | null;
6845
6846
  price_sent: number | null;
6846
6847
  price_status: string | null;
6847
6848
  product_id: string | null;
@@ -6875,6 +6876,7 @@ export type Database = {
6875
6876
  next_attempt_at?: string;
6876
6877
  number_of_pieces?: number;
6877
6878
  price_note?: string | null;
6879
+ price_previous?: number | null;
6878
6880
  price_sent?: number | null;
6879
6881
  price_status?: string | null;
6880
6882
  product_id?: string | null;
@@ -6908,6 +6910,7 @@ export type Database = {
6908
6910
  next_attempt_at?: string;
6909
6911
  number_of_pieces?: number;
6910
6912
  price_note?: string | null;
6913
+ price_previous?: number | null;
6911
6914
  price_sent?: number | null;
6912
6915
  price_status?: string | null;
6913
6916
  product_id?: string | null;
@@ -12572,6 +12575,27 @@ export type Database = {
12572
12575
  };
12573
12576
  Relationships: [];
12574
12577
  };
12578
+ logistics_order_pick_day: {
12579
+ Row: {
12580
+ order_id: string;
12581
+ pick_date: string;
12582
+ pinned_at: string;
12583
+ source: string;
12584
+ };
12585
+ Insert: {
12586
+ order_id: string;
12587
+ pick_date: string;
12588
+ pinned_at?: string;
12589
+ source?: string;
12590
+ };
12591
+ Update: {
12592
+ order_id?: string;
12593
+ pick_date?: string;
12594
+ pinned_at?: string;
12595
+ source?: string;
12596
+ };
12597
+ Relationships: [];
12598
+ };
12575
12599
  logistics_order_plan_exclusion: {
12576
12600
  Row: {
12577
12601
  created_at: string;
@@ -18640,6 +18664,36 @@ export type Database = {
18640
18664
  };
18641
18665
  Relationships: [];
18642
18666
  };
18667
+ print_computer_status: {
18668
+ Row: {
18669
+ bijgewerkt_op: string;
18670
+ created_at: string;
18671
+ extern_computer_id: string;
18672
+ naam: string | null;
18673
+ status: string | null;
18674
+ updated_at: string;
18675
+ verbonden: boolean;
18676
+ };
18677
+ Insert: {
18678
+ bijgewerkt_op?: string;
18679
+ created_at?: string;
18680
+ extern_computer_id: string;
18681
+ naam?: string | null;
18682
+ status?: string | null;
18683
+ updated_at?: string;
18684
+ verbonden?: boolean;
18685
+ };
18686
+ Update: {
18687
+ bijgewerkt_op?: string;
18688
+ created_at?: string;
18689
+ extern_computer_id?: string;
18690
+ naam?: string | null;
18691
+ status?: string | null;
18692
+ updated_at?: string;
18693
+ verbonden?: boolean;
18694
+ };
18695
+ Relationships: [];
18696
+ };
18643
18697
  print_dedupe_events: {
18644
18698
  Row: {
18645
18699
  bestaande_job_id: string | null;
@@ -18762,16 +18816,21 @@ export type Database = {
18762
18816
  lokale_pdf_print_plek_id: string | null;
18763
18817
  lokale_pdf_status: string | null;
18764
18818
  opgepakt_op: string | null;
18819
+ origineel_sleutel: string | null;
18765
18820
  paginas: number;
18766
18821
  payload: Json;
18767
18822
  pdf_base64: string | null;
18768
18823
  pdf_url: string | null;
18769
18824
  pogingen: number;
18770
18825
  printer_id: string | null;
18826
+ printnode_bericht: string | null;
18827
+ printnode_status: string | null;
18828
+ printnode_status_op: string | null;
18771
18829
  render_html: string | null;
18772
18830
  resultaat_pdf_base64: string | null;
18773
18831
  status: Database["public"]["Enums"]["print_job_status"];
18774
18832
  updated_at: string;
18833
+ verloopt_na_s: number | null;
18775
18834
  verwerkingsfase: string;
18776
18835
  volgende_poging: string | null;
18777
18836
  voltooid_op: string | null;
@@ -18811,16 +18870,21 @@ export type Database = {
18811
18870
  lokale_pdf_print_plek_id?: string | null;
18812
18871
  lokale_pdf_status?: string | null;
18813
18872
  opgepakt_op?: string | null;
18873
+ origineel_sleutel?: string | null;
18814
18874
  paginas?: number;
18815
18875
  payload?: Json;
18816
18876
  pdf_base64?: string | null;
18817
18877
  pdf_url?: string | null;
18818
18878
  pogingen?: number;
18819
18879
  printer_id?: string | null;
18880
+ printnode_bericht?: string | null;
18881
+ printnode_status?: string | null;
18882
+ printnode_status_op?: string | null;
18820
18883
  render_html?: string | null;
18821
18884
  resultaat_pdf_base64?: string | null;
18822
18885
  status?: Database["public"]["Enums"]["print_job_status"];
18823
18886
  updated_at?: string;
18887
+ verloopt_na_s?: number | null;
18824
18888
  verwerkingsfase?: string;
18825
18889
  volgende_poging?: string | null;
18826
18890
  voltooid_op?: string | null;
@@ -18860,16 +18924,21 @@ export type Database = {
18860
18924
  lokale_pdf_print_plek_id?: string | null;
18861
18925
  lokale_pdf_status?: string | null;
18862
18926
  opgepakt_op?: string | null;
18927
+ origineel_sleutel?: string | null;
18863
18928
  paginas?: number;
18864
18929
  payload?: Json;
18865
18930
  pdf_base64?: string | null;
18866
18931
  pdf_url?: string | null;
18867
18932
  pogingen?: number;
18868
18933
  printer_id?: string | null;
18934
+ printnode_bericht?: string | null;
18935
+ printnode_status?: string | null;
18936
+ printnode_status_op?: string | null;
18869
18937
  render_html?: string | null;
18870
18938
  resultaat_pdf_base64?: string | null;
18871
18939
  status?: Database["public"]["Enums"]["print_job_status"];
18872
18940
  updated_at?: string;
18941
+ verloopt_na_s?: number | null;
18873
18942
  verwerkingsfase?: string;
18874
18943
  volgende_poging?: string | null;
18875
18944
  voltooid_op?: string | null;
@@ -28029,16 +28098,21 @@ export type Database = {
28029
28098
  lokale_pdf_print_plek_id: string | null;
28030
28099
  lokale_pdf_status: string | null;
28031
28100
  opgepakt_op: string | null;
28101
+ origineel_sleutel: string | null;
28032
28102
  paginas: number;
28033
28103
  payload: Json;
28034
28104
  pdf_base64: string | null;
28035
28105
  pdf_url: string | null;
28036
28106
  pogingen: number;
28037
28107
  printer_id: string | null;
28108
+ printnode_bericht: string | null;
28109
+ printnode_status: string | null;
28110
+ printnode_status_op: string | null;
28038
28111
  render_html: string | null;
28039
28112
  resultaat_pdf_base64: string | null;
28040
28113
  status: Database["public"]["Enums"]["print_job_status"];
28041
28114
  updated_at: string;
28115
+ verloopt_na_s: number | null;
28042
28116
  verwerkingsfase: string;
28043
28117
  volgende_poging: string | null;
28044
28118
  voltooid_op: string | null;
@@ -28090,6 +28164,7 @@ export type Database = {
28090
28164
  next_attempt_at: string;
28091
28165
  number_of_pieces: number;
28092
28166
  price_note: string | null;
28167
+ price_previous: number | null;
28093
28168
  price_sent: number | null;
28094
28169
  price_status: string | null;
28095
28170
  product_id: string | null;
@@ -28219,16 +28294,21 @@ export type Database = {
28219
28294
  lokale_pdf_print_plek_id: string | null;
28220
28295
  lokale_pdf_status: string | null;
28221
28296
  opgepakt_op: string | null;
28297
+ origineel_sleutel: string | null;
28222
28298
  paginas: number;
28223
28299
  payload: Json;
28224
28300
  pdf_base64: string | null;
28225
28301
  pdf_url: string | null;
28226
28302
  pogingen: number;
28227
28303
  printer_id: string | null;
28304
+ printnode_bericht: string | null;
28305
+ printnode_status: string | null;
28306
+ printnode_status_op: string | null;
28228
28307
  render_html: string | null;
28229
28308
  resultaat_pdf_base64: string | null;
28230
28309
  status: Database["public"]["Enums"]["print_job_status"];
28231
28310
  updated_at: string;
28311
+ verloopt_na_s: number | null;
28232
28312
  verwerkingsfase: string;
28233
28313
  volgende_poging: string | null;
28234
28314
  voltooid_op: string | null;
@@ -28280,16 +28360,21 @@ export type Database = {
28280
28360
  lokale_pdf_print_plek_id: string | null;
28281
28361
  lokale_pdf_status: string | null;
28282
28362
  opgepakt_op: string | null;
28363
+ origineel_sleutel: string | null;
28283
28364
  paginas: number;
28284
28365
  payload: Json;
28285
28366
  pdf_base64: string | null;
28286
28367
  pdf_url: string | null;
28287
28368
  pogingen: number;
28288
28369
  printer_id: string | null;
28370
+ printnode_bericht: string | null;
28371
+ printnode_status: string | null;
28372
+ printnode_status_op: string | null;
28289
28373
  render_html: string | null;
28290
28374
  resultaat_pdf_base64: string | null;
28291
28375
  status: Database["public"]["Enums"]["print_job_status"];
28292
28376
  updated_at: string;
28377
+ verloopt_na_s: number | null;
28293
28378
  verwerkingsfase: string;
28294
28379
  volgende_poging: string | null;
28295
28380
  voltooid_op: string | null;
@@ -29696,6 +29781,7 @@ export type Database = {
29696
29781
  _is_herprint?: boolean;
29697
29782
  _kopieen?: number;
29698
29783
  _layout_id?: string;
29784
+ _mislukt_reden?: string;
29699
29785
  _payload?: Json;
29700
29786
  _pdf_base64?: string;
29701
29787
  _pdf_url?: string;
@@ -30057,6 +30143,12 @@ export type Database = {
30057
30143
  };
30058
30144
  Returns: boolean;
30059
30145
  };
30146
+ logistics_cart_ids_frozen: {
30147
+ Args: {
30148
+ p_cart_ids: string[];
30149
+ };
30150
+ Returns: string[];
30151
+ };
30060
30152
  logistics_cart_index: {
30061
30153
  Args: {
30062
30154
  p_from?: string;
@@ -30083,6 +30175,12 @@ export type Database = {
30083
30175
  task_status: string;
30084
30176
  }[];
30085
30177
  };
30178
+ logistics_cart_is_frozen: {
30179
+ Args: {
30180
+ p_cart_id: string;
30181
+ };
30182
+ Returns: boolean;
30183
+ };
30086
30184
  logistics_cart_is_full: {
30087
30185
  Args: {
30088
30186
  p_cart_id: string;
@@ -32803,6 +32901,13 @@ export type Database = {
32803
32901
  };
32804
32902
  Returns: string;
32805
32903
  };
32904
+ pick_find_sent_elsewhere: {
32905
+ Args: {
32906
+ _cart_id: string;
32907
+ _queue_item_id: string;
32908
+ };
32909
+ Returns: Json;
32910
+ };
32806
32911
  pick_is_reference_admin: {
32807
32912
  Args: never;
32808
32913
  Returns: boolean;