@flowselections/floriday-voorraad 1.0.94 → 1.0.97

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.
Files changed (31) hide show
  1. package/dist-lib/components/voorraad/ArtikelWizard.d.ts.map +1 -1
  2. package/dist-lib/components/voorraad/ArtikelWizard.js +21 -41
  3. package/dist-lib/components/voorraad/FloridayTakeoverPanel.d.ts.map +1 -1
  4. package/dist-lib/components/voorraad/FloridayTakeoverPanel.js +18 -1
  5. package/dist-lib/components/voorraad/StockBulkButtons.d.ts.map +1 -1
  6. package/dist-lib/components/voorraad/StockBulkButtons.js +59 -0
  7. package/dist-lib/components/voorraad/VoorraadTable.d.ts.map +1 -1
  8. package/dist-lib/components/voorraad/VoorraadTable.js +16 -1
  9. package/dist-lib/integrations/supabase/types.d.ts +294 -18
  10. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  11. package/dist-lib/lib/__tests__/product-packings.test.d.ts +2 -0
  12. package/dist-lib/lib/__tests__/product-packings.test.d.ts.map +1 -0
  13. package/dist-lib/lib/__tests__/product-packings.test.js +42 -0
  14. package/dist-lib/lib/ensure-article-codes.d.ts.map +1 -1
  15. package/dist-lib/lib/ensure-article-codes.js +2 -12
  16. package/dist-lib/lib/floriday-payload.d.ts +15 -0
  17. package/dist-lib/lib/floriday-payload.d.ts.map +1 -1
  18. package/dist-lib/lib/floriday-payload.js +36 -10
  19. package/dist-lib/lib/fusten.d.ts.map +1 -1
  20. package/dist-lib/lib/fusten.js +6 -1
  21. package/dist-lib/lib/product-packing.d.ts +8 -5
  22. package/dist-lib/lib/product-packing.d.ts.map +1 -1
  23. package/dist-lib/lib/product-packing.js +44 -36
  24. package/dist-lib/lib/product-packings.d.ts +33 -0
  25. package/dist-lib/lib/product-packings.d.ts.map +1 -0
  26. package/dist-lib/lib/product-packings.js +89 -0
  27. package/dist-lib/server-hooks/floriday-follow.d.ts.map +1 -1
  28. package/dist-lib/server-hooks/floriday-follow.js +11 -1
  29. package/package.json +1 -1
  30. package/sql/AGENTS.md +5 -0
  31. package/sql/floriday-voorraad-schema.sql +182 -5
@@ -1531,6 +1531,7 @@ export type Database = {
1531
1531
  cart_numbers: {
1532
1532
  Row: {
1533
1533
  assigned_at: string;
1534
+ cart_id: string | null;
1534
1535
  cart_index: number;
1535
1536
  cart_number: string;
1536
1537
  day_seq: number | null;
@@ -1544,6 +1545,7 @@ export type Database = {
1544
1545
  };
1545
1546
  Insert: {
1546
1547
  assigned_at?: string;
1548
+ cart_id?: string | null;
1547
1549
  cart_index: number;
1548
1550
  cart_number: string;
1549
1551
  day_seq?: number | null;
@@ -1557,6 +1559,7 @@ export type Database = {
1557
1559
  };
1558
1560
  Update: {
1559
1561
  assigned_at?: string;
1562
+ cart_id?: string | null;
1560
1563
  cart_index?: number;
1561
1564
  cart_number?: string;
1562
1565
  day_seq?: number | null;
@@ -8206,6 +8209,53 @@ export type Database = {
8206
8209
  };
8207
8210
  Relationships: [];
8208
8211
  };
8212
+ floriday_packing_mismatches: {
8213
+ Row: {
8214
+ api_value: Json | null;
8215
+ cache_value: Json | null;
8216
+ connection_id: string;
8217
+ details: string | null;
8218
+ detected_at: string;
8219
+ entity: string;
8220
+ floriday_id: string;
8221
+ id: string;
8222
+ last_checked_at: string;
8223
+ resolved_at: string | null;
8224
+ };
8225
+ Insert: {
8226
+ api_value?: Json | null;
8227
+ cache_value?: Json | null;
8228
+ connection_id: string;
8229
+ details?: string | null;
8230
+ detected_at?: string;
8231
+ entity: string;
8232
+ floriday_id: string;
8233
+ id?: string;
8234
+ last_checked_at?: string;
8235
+ resolved_at?: string | null;
8236
+ };
8237
+ Update: {
8238
+ api_value?: Json | null;
8239
+ cache_value?: Json | null;
8240
+ connection_id?: string;
8241
+ details?: string | null;
8242
+ detected_at?: string;
8243
+ entity?: string;
8244
+ floriday_id?: string;
8245
+ id?: string;
8246
+ last_checked_at?: string;
8247
+ resolved_at?: string | null;
8248
+ };
8249
+ Relationships: [
8250
+ {
8251
+ foreignKeyName: "floriday_packing_mismatches_connection_id_fkey";
8252
+ columns: ["connection_id"];
8253
+ isOneToOne: false;
8254
+ referencedRelation: "floriday_connections";
8255
+ referencedColumns: ["id"];
8256
+ }
8257
+ ];
8258
+ };
8209
8259
  floriday_packings_cache: {
8210
8260
  Row: {
8211
8261
  connection_id: string;
@@ -12149,6 +12199,36 @@ export type Database = {
12149
12199
  };
12150
12200
  Relationships: [];
12151
12201
  };
12202
+ logistics_belading_bevestigingen: {
12203
+ Row: {
12204
+ bevestigd_door: string | null;
12205
+ bevestigd_op: string;
12206
+ created_at: string;
12207
+ id: string;
12208
+ order_id: string;
12209
+ redenen: string[];
12210
+ verpakking_sleutel: string;
12211
+ };
12212
+ Insert: {
12213
+ bevestigd_door?: string | null;
12214
+ bevestigd_op?: string;
12215
+ created_at?: string;
12216
+ id?: string;
12217
+ order_id: string;
12218
+ redenen?: string[];
12219
+ verpakking_sleutel: string;
12220
+ };
12221
+ Update: {
12222
+ bevestigd_door?: string | null;
12223
+ bevestigd_op?: string;
12224
+ created_at?: string;
12225
+ id?: string;
12226
+ order_id?: string;
12227
+ redenen?: string[];
12228
+ verpakking_sleutel?: string;
12229
+ };
12230
+ Relationships: [];
12231
+ };
12152
12232
  logistics_capacity_alerts: {
12153
12233
  Row: {
12154
12234
  available_minutes: number;
@@ -17519,60 +17599,72 @@ export type Database = {
17519
17599
  created_at: string;
17520
17600
  id: string;
17521
17601
  layers_per_cart: number | null;
17602
+ load_carrier_type: string | null;
17522
17603
  needs_sticker: boolean;
17523
17604
  order_id: string;
17524
17605
  packing_locked_at: string | null;
17525
17606
  packing_locked_by: string | null;
17607
+ packing_source: string | null;
17526
17608
  plants_per_crate: number | null;
17527
17609
  product_id: string | null;
17528
17610
  product_name: string;
17529
17611
  quantity: number;
17612
+ quantity_crates: number | null;
17530
17613
  quarantine_reason: string | null;
17531
17614
  quarantined_at: string | null;
17532
17615
  quarantined_into_order_id: string | null;
17533
17616
  source_line_key: string | null;
17534
17617
  unit: string;
17535
17618
  unit_price: number | null;
17619
+ vbn_package_code: string | null;
17536
17620
  };
17537
17621
  Insert: {
17538
17622
  crates_per_layer?: number | null;
17539
17623
  created_at?: string;
17540
17624
  id?: string;
17541
17625
  layers_per_cart?: number | null;
17626
+ load_carrier_type?: string | null;
17542
17627
  needs_sticker?: boolean;
17543
17628
  order_id: string;
17544
17629
  packing_locked_at?: string | null;
17545
17630
  packing_locked_by?: string | null;
17631
+ packing_source?: string | null;
17546
17632
  plants_per_crate?: number | null;
17547
17633
  product_id?: string | null;
17548
17634
  product_name: string;
17549
17635
  quantity?: number;
17636
+ quantity_crates?: number | null;
17550
17637
  quarantine_reason?: string | null;
17551
17638
  quarantined_at?: string | null;
17552
17639
  quarantined_into_order_id?: string | null;
17553
17640
  source_line_key?: string | null;
17554
17641
  unit?: string;
17555
17642
  unit_price?: number | null;
17643
+ vbn_package_code?: string | null;
17556
17644
  };
17557
17645
  Update: {
17558
17646
  crates_per_layer?: number | null;
17559
17647
  created_at?: string;
17560
17648
  id?: string;
17561
17649
  layers_per_cart?: number | null;
17650
+ load_carrier_type?: string | null;
17562
17651
  needs_sticker?: boolean;
17563
17652
  order_id?: string;
17564
17653
  packing_locked_at?: string | null;
17565
17654
  packing_locked_by?: string | null;
17655
+ packing_source?: string | null;
17566
17656
  plants_per_crate?: number | null;
17567
17657
  product_id?: string | null;
17568
17658
  product_name?: string;
17569
17659
  quantity?: number;
17660
+ quantity_crates?: number | null;
17570
17661
  quarantine_reason?: string | null;
17571
17662
  quarantined_at?: string | null;
17572
17663
  quarantined_into_order_id?: string | null;
17573
17664
  source_line_key?: string | null;
17574
17665
  unit?: string;
17575
17666
  unit_price?: number | null;
17667
+ vbn_package_code?: string | null;
17576
17668
  };
17577
17669
  Relationships: [
17578
17670
  {
@@ -21442,6 +21534,85 @@ export type Database = {
21442
21534
  };
21443
21535
  Relationships: [];
21444
21536
  };
21537
+ product_packings: {
21538
+ Row: {
21539
+ created_at: string;
21540
+ custom_package_id: string | null;
21541
+ customer_organization_ids: string[];
21542
+ floriday_packing_id: string | null;
21543
+ fust_type_id: string | null;
21544
+ id: string;
21545
+ is_primary: boolean;
21546
+ layers_per_load_carrier: number | null;
21547
+ load_carrier: string | null;
21548
+ packages_per_layer: number | null;
21549
+ pieces_per_package: number | null;
21550
+ product_id: string;
21551
+ sort_order: number;
21552
+ source: string;
21553
+ updated_at: string;
21554
+ vbn_package_code: number | null;
21555
+ };
21556
+ Insert: {
21557
+ created_at?: string;
21558
+ custom_package_id?: string | null;
21559
+ customer_organization_ids?: string[];
21560
+ floriday_packing_id?: string | null;
21561
+ fust_type_id?: string | null;
21562
+ id?: string;
21563
+ is_primary?: boolean;
21564
+ layers_per_load_carrier?: number | null;
21565
+ load_carrier?: string | null;
21566
+ packages_per_layer?: number | null;
21567
+ pieces_per_package?: number | null;
21568
+ product_id: string;
21569
+ sort_order?: number;
21570
+ source?: string;
21571
+ updated_at?: string;
21572
+ vbn_package_code?: number | null;
21573
+ };
21574
+ Update: {
21575
+ created_at?: string;
21576
+ custom_package_id?: string | null;
21577
+ customer_organization_ids?: string[];
21578
+ floriday_packing_id?: string | null;
21579
+ fust_type_id?: string | null;
21580
+ id?: string;
21581
+ is_primary?: boolean;
21582
+ layers_per_load_carrier?: number | null;
21583
+ load_carrier?: string | null;
21584
+ packages_per_layer?: number | null;
21585
+ pieces_per_package?: number | null;
21586
+ product_id?: string;
21587
+ sort_order?: number;
21588
+ source?: string;
21589
+ updated_at?: string;
21590
+ vbn_package_code?: number | null;
21591
+ };
21592
+ Relationships: [
21593
+ {
21594
+ foreignKeyName: "product_packings_fust_type_id_fkey";
21595
+ columns: ["fust_type_id"];
21596
+ isOneToOne: false;
21597
+ referencedRelation: "fust_types";
21598
+ referencedColumns: ["id"];
21599
+ },
21600
+ {
21601
+ foreignKeyName: "product_packings_product_id_fkey";
21602
+ columns: ["product_id"];
21603
+ isOneToOne: false;
21604
+ referencedRelation: "logistics_product_dimensions";
21605
+ referencedColumns: ["product_id"];
21606
+ },
21607
+ {
21608
+ foreignKeyName: "product_packings_product_id_fkey";
21609
+ columns: ["product_id"];
21610
+ isOneToOne: false;
21611
+ referencedRelation: "products";
21612
+ referencedColumns: ["id"];
21613
+ }
21614
+ ];
21615
+ };
21445
21616
  product_suppliers: {
21446
21617
  Row: {
21447
21618
  created_at: string;
@@ -29622,6 +29793,15 @@ export type Database = {
29622
29793
  };
29623
29794
  Returns: Json;
29624
29795
  };
29796
+ afh_resolve_cart_id: {
29797
+ Args: {
29798
+ p_cart_index: number;
29799
+ p_given: string;
29800
+ p_order: string;
29801
+ p_source: string;
29802
+ };
29803
+ Returns: string;
29804
+ };
29625
29805
  afh_signup_config: {
29626
29806
  Args: never;
29627
29807
  Returns: Json;
@@ -30453,6 +30633,8 @@ export type Database = {
30453
30633
  cart_index: number;
30454
30634
  cart_number: string;
30455
30635
  cart_number_id: string;
30636
+ country_code: string;
30637
+ crates_on_cart: number;
30456
30638
  order_id: string;
30457
30639
  order_number: string;
30458
30640
  order_source: string;
@@ -31975,6 +32157,13 @@ export type Database = {
31975
32157
  Args: never;
31976
32158
  Returns: Json;
31977
32159
  };
32160
+ layout_voor_document: {
32161
+ Args: {
32162
+ p_documenttype: string;
32163
+ p_order_id: string;
32164
+ };
32165
+ Returns: Json;
32166
+ };
31978
32167
  layout_zorg_systeemlayouts: {
31979
32168
  Args: never;
31980
32169
  Returns: number;
@@ -32261,6 +32450,14 @@ export type Database = {
32261
32450
  Args: never;
32262
32451
  Returns: number;
32263
32452
  };
32453
+ logistics_belading_bevestig: {
32454
+ Args: {
32455
+ p_order_id: string;
32456
+ p_redenen?: string[];
32457
+ p_sleutel: string;
32458
+ };
32459
+ Returns: Json;
32460
+ };
32264
32461
  logistics_belading_verstuurder: {
32265
32462
  Args: never;
32266
32463
  Returns: string;
@@ -32647,6 +32844,16 @@ export type Database = {
32647
32844
  order_uuid: string;
32648
32845
  }[];
32649
32846
  };
32847
+ logistics_cart_seq_dubbel: {
32848
+ Args: {
32849
+ p_order_uuid?: string;
32850
+ };
32851
+ Returns: {
32852
+ cart_ids: string[];
32853
+ cart_index: number;
32854
+ order_uuid: string;
32855
+ }[];
32856
+ };
32650
32857
  logistics_cart_slip_plan: {
32651
32858
  Args: {
32652
32859
  p_order_id: string;
@@ -33398,6 +33605,12 @@ export type Database = {
33398
33605
  Args: never;
33399
33606
  Returns: Json;
33400
33607
  };
33608
+ logistics_floriday_shipping_document: {
33609
+ Args: {
33610
+ p_order_id: string;
33611
+ };
33612
+ Returns: Json;
33613
+ };
33401
33614
  logistics_floriday_status_updates_enabled: {
33402
33615
  Args: never;
33403
33616
  Returns: boolean;
@@ -33911,6 +34124,15 @@ export type Database = {
33911
34124
  Args: never;
33912
34125
  Returns: Json;
33913
34126
  };
34127
+ logistics_own_sticker_count: {
34128
+ Args: {
34129
+ p_ppc_product: number;
34130
+ p_ppc_regel: number;
34131
+ p_quantity: number;
34132
+ p_unit: string;
34133
+ };
34134
+ Returns: number;
34135
+ };
33914
34136
  logistics_own_sticker_sync: {
33915
34137
  Args: {
33916
34138
  p_limit?: number;
@@ -33924,6 +34146,18 @@ export type Database = {
33924
34146
  };
33925
34147
  Returns: Json;
33926
34148
  };
34149
+ logistics_own_traysticker_payload: {
34150
+ Args: {
34151
+ p_id: string;
34152
+ };
34153
+ Returns: Json;
34154
+ };
34155
+ logistics_own_traysticker_sync: {
34156
+ Args: {
34157
+ p_limit?: number;
34158
+ };
34159
+ Returns: Json;
34160
+ };
33927
34161
  logistics_packing_autofix: {
33928
34162
  Args: {
33929
34163
  p_limit?: number;
@@ -34224,6 +34458,15 @@ export type Database = {
34224
34458
  Args: never;
34225
34459
  Returns: number;
34226
34460
  };
34461
+ logistics_plan_queue_dubbel: {
34462
+ Args: never;
34463
+ Returns: {
34464
+ nieuwste: string;
34465
+ open_opdrachten: number;
34466
+ order_id: string;
34467
+ oudste: string;
34468
+ }[];
34469
+ };
34227
34470
  logistics_plan_queue_list: {
34228
34471
  Args: {
34229
34472
  p_limit?: number;
@@ -34265,6 +34508,13 @@ export type Database = {
34265
34508
  };
34266
34509
  Returns: number;
34267
34510
  };
34511
+ logistics_plan_retry_later: {
34512
+ Args: {
34513
+ p_id: string;
34514
+ p_seconds?: number;
34515
+ };
34516
+ Returns: undefined;
34517
+ };
34268
34518
  logistics_plan_setting: {
34269
34519
  Args: {
34270
34520
  p_default: number;
@@ -35299,6 +35549,15 @@ export type Database = {
35299
35549
  };
35300
35550
  Returns: Json;
35301
35551
  };
35552
+ logistics_tray_plants: {
35553
+ Args: {
35554
+ p_fust: number;
35555
+ p_fusten: number;
35556
+ p_ppc: number;
35557
+ p_regel_totaal: number;
35558
+ };
35559
+ Returns: number;
35560
+ };
35302
35561
  logistics_try_uuid: {
35303
35562
  Args: {
35304
35563
  p: string;
@@ -36303,6 +36562,13 @@ export type Database = {
36303
36562
  };
36304
36563
  Returns: Json;
36305
36564
  };
36565
+ pickstation_document_for_order: {
36566
+ Args: {
36567
+ p_queue_item_id: string;
36568
+ p_slug: string;
36569
+ };
36570
+ Returns: Json;
36571
+ };
36306
36572
  pickstation_get_orders_raw: {
36307
36573
  Args: never;
36308
36574
  Returns: Json;
@@ -36669,6 +36935,34 @@ export type Database = {
36669
36935
  };
36670
36936
  Returns: Record<string, unknown>;
36671
36937
  };
36938
+ product_packings_derive: {
36939
+ Args: {
36940
+ p_product_id: string;
36941
+ };
36942
+ Returns: undefined;
36943
+ };
36944
+ product_packings_replace: {
36945
+ Args: {
36946
+ p_packings: Json;
36947
+ p_product_id: string;
36948
+ p_source: string;
36949
+ };
36950
+ Returns: number;
36951
+ };
36952
+ product_packings_sync_from_floriday: {
36953
+ Args: {
36954
+ p_connection_id: string;
36955
+ p_only_existing?: boolean;
36956
+ p_product_ids: string[];
36957
+ };
36958
+ Returns: Json;
36959
+ };
36960
+ product_primary_pieces: {
36961
+ Args: {
36962
+ p_product_id: string;
36963
+ };
36964
+ Returns: number;
36965
+ };
36672
36966
  product_set_depth_above: {
36673
36967
  Args: {
36674
36968
  p_path?: string[];
@@ -37892,12 +38186,6 @@ export type Database = {
37892
38186
  Args: never;
37893
38187
  Returns: undefined;
37894
38188
  };
37895
- sync_cached_packing_from_product: {
37896
- Args: {
37897
- p_product_id: string;
37898
- };
37899
- Returns: undefined;
37900
- };
37901
38189
  sync_floriday_prices_into_price_groups: {
37902
38190
  Args: never;
37903
38191
  Returns: number;
@@ -37908,12 +38196,6 @@ export type Database = {
37908
38196
  };
37909
38197
  Returns: undefined;
37910
38198
  };
37911
- sync_order_cart_item_packing_from_product: {
37912
- Args: {
37913
- p_product_id: string;
37914
- };
37915
- Returns: undefined;
37916
- };
37917
38199
  sync_order_item_fusten: {
37918
38200
  Args: {
37919
38201
  _order_item_id: string;
@@ -37926,12 +38208,6 @@ export type Database = {
37926
38208
  };
37927
38209
  Returns: undefined;
37928
38210
  };
37929
- sync_product_packing_from_floriday_cache: {
37930
- Args: {
37931
- p_floriday_id: string;
37932
- };
37933
- Returns: undefined;
37934
- };
37935
38211
  sync_sick_time_off: {
37936
38212
  Args: {
37937
38213
  _period_id: string;