@fctc/interface-logic 4.7.0 → 4.7.2
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/hooks.d.mts +4 -4
- package/dist/hooks.d.ts +4 -4
- package/dist/hooks.js +19 -19
- package/dist/hooks.mjs +19 -19
- package/dist/provider.js +19 -19
- package/dist/provider.mjs +19 -19
- package/dist/services.d.mts +4 -4
- package/dist/services.d.ts +4 -4
- package/dist/services.js +19 -19
- package/dist/services.mjs +19 -19
- package/package.json +1 -1
package/dist/hooks.d.mts
CHANGED
|
@@ -784,7 +784,7 @@ declare const useAddTable: () => _tanstack_react_query.UseMutationResult<[number
|
|
|
784
784
|
parent_id?: number;
|
|
785
785
|
}, unknown>;
|
|
786
786
|
|
|
787
|
-
declare const useUpdateFloor: () => _tanstack_react_query.UseMutationResult<
|
|
787
|
+
declare const useUpdateFloor: () => _tanstack_react_query.UseMutationResult<number[], Error, {
|
|
788
788
|
id: number;
|
|
789
789
|
name?: string;
|
|
790
790
|
sequence?: number;
|
|
@@ -792,7 +792,7 @@ declare const useUpdateFloor: () => _tanstack_react_query.UseMutationResult<bool
|
|
|
792
792
|
table_ids?: number[];
|
|
793
793
|
}, unknown>;
|
|
794
794
|
|
|
795
|
-
declare const useUpdateTable: () => _tanstack_react_query.UseMutationResult<
|
|
795
|
+
declare const useUpdateTable: () => _tanstack_react_query.UseMutationResult<number[], Error, {
|
|
796
796
|
id: number;
|
|
797
797
|
floor_id?: number;
|
|
798
798
|
table_number?: number;
|
|
@@ -802,11 +802,11 @@ declare const useUpdateTable: () => _tanstack_react_query.UseMutationResult<bool
|
|
|
802
802
|
parent_id?: number;
|
|
803
803
|
}, unknown>;
|
|
804
804
|
|
|
805
|
-
declare const useDeleteFloor: () => _tanstack_react_query.UseMutationResult<
|
|
805
|
+
declare const useDeleteFloor: () => _tanstack_react_query.UseMutationResult<number[], Error, {
|
|
806
806
|
id: number;
|
|
807
807
|
}, unknown>;
|
|
808
808
|
|
|
809
|
-
declare const useDeleteTable: () => _tanstack_react_query.UseMutationResult<
|
|
809
|
+
declare const useDeleteTable: () => _tanstack_react_query.UseMutationResult<number[], Error, {
|
|
810
810
|
id: number;
|
|
811
811
|
}, unknown>;
|
|
812
812
|
|
package/dist/hooks.d.ts
CHANGED
|
@@ -784,7 +784,7 @@ declare const useAddTable: () => _tanstack_react_query.UseMutationResult<[number
|
|
|
784
784
|
parent_id?: number;
|
|
785
785
|
}, unknown>;
|
|
786
786
|
|
|
787
|
-
declare const useUpdateFloor: () => _tanstack_react_query.UseMutationResult<
|
|
787
|
+
declare const useUpdateFloor: () => _tanstack_react_query.UseMutationResult<number[], Error, {
|
|
788
788
|
id: number;
|
|
789
789
|
name?: string;
|
|
790
790
|
sequence?: number;
|
|
@@ -792,7 +792,7 @@ declare const useUpdateFloor: () => _tanstack_react_query.UseMutationResult<bool
|
|
|
792
792
|
table_ids?: number[];
|
|
793
793
|
}, unknown>;
|
|
794
794
|
|
|
795
|
-
declare const useUpdateTable: () => _tanstack_react_query.UseMutationResult<
|
|
795
|
+
declare const useUpdateTable: () => _tanstack_react_query.UseMutationResult<number[], Error, {
|
|
796
796
|
id: number;
|
|
797
797
|
floor_id?: number;
|
|
798
798
|
table_number?: number;
|
|
@@ -802,11 +802,11 @@ declare const useUpdateTable: () => _tanstack_react_query.UseMutationResult<bool
|
|
|
802
802
|
parent_id?: number;
|
|
803
803
|
}, unknown>;
|
|
804
804
|
|
|
805
|
-
declare const useDeleteFloor: () => _tanstack_react_query.UseMutationResult<
|
|
805
|
+
declare const useDeleteFloor: () => _tanstack_react_query.UseMutationResult<number[], Error, {
|
|
806
806
|
id: number;
|
|
807
807
|
}, unknown>;
|
|
808
808
|
|
|
809
|
-
declare const useDeleteTable: () => _tanstack_react_query.UseMutationResult<
|
|
809
|
+
declare const useDeleteTable: () => _tanstack_react_query.UseMutationResult<number[], Error, {
|
|
810
810
|
id: number;
|
|
811
811
|
}, unknown>;
|
|
812
812
|
|
package/dist/hooks.js
CHANGED
|
@@ -6537,19 +6537,19 @@ var updateFloorSupabaseService = () => {
|
|
|
6537
6537
|
async (values) => {
|
|
6538
6538
|
if (!supabase) {
|
|
6539
6539
|
console.error("Supabase client not initialized");
|
|
6540
|
-
return
|
|
6540
|
+
return [];
|
|
6541
6541
|
}
|
|
6542
6542
|
try {
|
|
6543
6543
|
const { id, ...updateData } = values;
|
|
6544
|
-
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id);
|
|
6544
|
+
const { error, data } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id).select("id").single();
|
|
6545
6545
|
if (error) {
|
|
6546
6546
|
console.error("Error updating floor:", error);
|
|
6547
|
-
return
|
|
6547
|
+
return [];
|
|
6548
6548
|
}
|
|
6549
|
-
return
|
|
6549
|
+
return [data.id];
|
|
6550
6550
|
} catch (error) {
|
|
6551
6551
|
console.error("Error updating floor:", error);
|
|
6552
|
-
return
|
|
6552
|
+
return [];
|
|
6553
6553
|
}
|
|
6554
6554
|
},
|
|
6555
6555
|
[supabase]
|
|
@@ -6567,19 +6567,19 @@ var updateTableSupabaseService = () => {
|
|
|
6567
6567
|
async (values) => {
|
|
6568
6568
|
if (!supabase) {
|
|
6569
6569
|
console.error("Supabase client not initialized");
|
|
6570
|
-
return
|
|
6570
|
+
return [];
|
|
6571
6571
|
}
|
|
6572
6572
|
try {
|
|
6573
6573
|
const { id, ...updateData } = values;
|
|
6574
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id);
|
|
6574
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id).select("id").single();
|
|
6575
6575
|
if (error) {
|
|
6576
6576
|
console.error("Error updating table:", error);
|
|
6577
|
-
return
|
|
6577
|
+
return [];
|
|
6578
6578
|
}
|
|
6579
|
-
return
|
|
6579
|
+
return [data.id];
|
|
6580
6580
|
} catch (error) {
|
|
6581
6581
|
console.error("Error updating table:", error);
|
|
6582
|
-
return
|
|
6582
|
+
return [];
|
|
6583
6583
|
}
|
|
6584
6584
|
},
|
|
6585
6585
|
[supabase]
|
|
@@ -6597,18 +6597,18 @@ var deleteFloorSupabaseService = () => {
|
|
|
6597
6597
|
async (values) => {
|
|
6598
6598
|
if (!supabase) {
|
|
6599
6599
|
console.error("Supabase client not initialized");
|
|
6600
|
-
return
|
|
6600
|
+
return [];
|
|
6601
6601
|
}
|
|
6602
6602
|
try {
|
|
6603
6603
|
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).delete().eq("id", values.id);
|
|
6604
6604
|
if (error) {
|
|
6605
6605
|
console.error("Error deleting floor:", error);
|
|
6606
|
-
return
|
|
6606
|
+
return [];
|
|
6607
6607
|
}
|
|
6608
|
-
return
|
|
6608
|
+
return [values.id];
|
|
6609
6609
|
} catch (error) {
|
|
6610
6610
|
console.error("Error deleting floor:", error);
|
|
6611
|
-
return
|
|
6611
|
+
return [];
|
|
6612
6612
|
}
|
|
6613
6613
|
},
|
|
6614
6614
|
[supabase]
|
|
@@ -6626,18 +6626,18 @@ var deleteTableSupabaseService = () => {
|
|
|
6626
6626
|
async (values) => {
|
|
6627
6627
|
if (!supabase) {
|
|
6628
6628
|
console.error("Supabase client not initialized");
|
|
6629
|
-
return
|
|
6629
|
+
return [];
|
|
6630
6630
|
}
|
|
6631
6631
|
try {
|
|
6632
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id);
|
|
6632
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id).select("id").single();
|
|
6633
6633
|
if (error) {
|
|
6634
6634
|
console.error("Error deleting table:", error);
|
|
6635
|
-
return
|
|
6635
|
+
return [];
|
|
6636
6636
|
}
|
|
6637
|
-
return
|
|
6637
|
+
return [data.id];
|
|
6638
6638
|
} catch (error) {
|
|
6639
6639
|
console.error("Error deleting table:", error);
|
|
6640
|
-
return
|
|
6640
|
+
return [];
|
|
6641
6641
|
}
|
|
6642
6642
|
},
|
|
6643
6643
|
[supabase]
|
package/dist/hooks.mjs
CHANGED
|
@@ -6381,19 +6381,19 @@ var updateFloorSupabaseService = () => {
|
|
|
6381
6381
|
async (values) => {
|
|
6382
6382
|
if (!supabase) {
|
|
6383
6383
|
console.error("Supabase client not initialized");
|
|
6384
|
-
return
|
|
6384
|
+
return [];
|
|
6385
6385
|
}
|
|
6386
6386
|
try {
|
|
6387
6387
|
const { id, ...updateData } = values;
|
|
6388
|
-
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id);
|
|
6388
|
+
const { error, data } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id).select("id").single();
|
|
6389
6389
|
if (error) {
|
|
6390
6390
|
console.error("Error updating floor:", error);
|
|
6391
|
-
return
|
|
6391
|
+
return [];
|
|
6392
6392
|
}
|
|
6393
|
-
return
|
|
6393
|
+
return [data.id];
|
|
6394
6394
|
} catch (error) {
|
|
6395
6395
|
console.error("Error updating floor:", error);
|
|
6396
|
-
return
|
|
6396
|
+
return [];
|
|
6397
6397
|
}
|
|
6398
6398
|
},
|
|
6399
6399
|
[supabase]
|
|
@@ -6411,19 +6411,19 @@ var updateTableSupabaseService = () => {
|
|
|
6411
6411
|
async (values) => {
|
|
6412
6412
|
if (!supabase) {
|
|
6413
6413
|
console.error("Supabase client not initialized");
|
|
6414
|
-
return
|
|
6414
|
+
return [];
|
|
6415
6415
|
}
|
|
6416
6416
|
try {
|
|
6417
6417
|
const { id, ...updateData } = values;
|
|
6418
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id);
|
|
6418
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id).select("id").single();
|
|
6419
6419
|
if (error) {
|
|
6420
6420
|
console.error("Error updating table:", error);
|
|
6421
|
-
return
|
|
6421
|
+
return [];
|
|
6422
6422
|
}
|
|
6423
|
-
return
|
|
6423
|
+
return [data.id];
|
|
6424
6424
|
} catch (error) {
|
|
6425
6425
|
console.error("Error updating table:", error);
|
|
6426
|
-
return
|
|
6426
|
+
return [];
|
|
6427
6427
|
}
|
|
6428
6428
|
},
|
|
6429
6429
|
[supabase]
|
|
@@ -6441,18 +6441,18 @@ var deleteFloorSupabaseService = () => {
|
|
|
6441
6441
|
async (values) => {
|
|
6442
6442
|
if (!supabase) {
|
|
6443
6443
|
console.error("Supabase client not initialized");
|
|
6444
|
-
return
|
|
6444
|
+
return [];
|
|
6445
6445
|
}
|
|
6446
6446
|
try {
|
|
6447
6447
|
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).delete().eq("id", values.id);
|
|
6448
6448
|
if (error) {
|
|
6449
6449
|
console.error("Error deleting floor:", error);
|
|
6450
|
-
return
|
|
6450
|
+
return [];
|
|
6451
6451
|
}
|
|
6452
|
-
return
|
|
6452
|
+
return [values.id];
|
|
6453
6453
|
} catch (error) {
|
|
6454
6454
|
console.error("Error deleting floor:", error);
|
|
6455
|
-
return
|
|
6455
|
+
return [];
|
|
6456
6456
|
}
|
|
6457
6457
|
},
|
|
6458
6458
|
[supabase]
|
|
@@ -6470,18 +6470,18 @@ var deleteTableSupabaseService = () => {
|
|
|
6470
6470
|
async (values) => {
|
|
6471
6471
|
if (!supabase) {
|
|
6472
6472
|
console.error("Supabase client not initialized");
|
|
6473
|
-
return
|
|
6473
|
+
return [];
|
|
6474
6474
|
}
|
|
6475
6475
|
try {
|
|
6476
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id);
|
|
6476
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id).select("id").single();
|
|
6477
6477
|
if (error) {
|
|
6478
6478
|
console.error("Error deleting table:", error);
|
|
6479
|
-
return
|
|
6479
|
+
return [];
|
|
6480
6480
|
}
|
|
6481
|
-
return
|
|
6481
|
+
return [data.id];
|
|
6482
6482
|
} catch (error) {
|
|
6483
6483
|
console.error("Error deleting table:", error);
|
|
6484
|
-
return
|
|
6484
|
+
return [];
|
|
6485
6485
|
}
|
|
6486
6486
|
},
|
|
6487
6487
|
[supabase]
|
package/dist/provider.js
CHANGED
|
@@ -6542,19 +6542,19 @@ var updateFloorSupabaseService = () => {
|
|
|
6542
6542
|
async (values) => {
|
|
6543
6543
|
if (!supabase) {
|
|
6544
6544
|
console.error("Supabase client not initialized");
|
|
6545
|
-
return
|
|
6545
|
+
return [];
|
|
6546
6546
|
}
|
|
6547
6547
|
try {
|
|
6548
6548
|
const { id, ...updateData } = values;
|
|
6549
|
-
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id);
|
|
6549
|
+
const { error, data } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id).select("id").single();
|
|
6550
6550
|
if (error) {
|
|
6551
6551
|
console.error("Error updating floor:", error);
|
|
6552
|
-
return
|
|
6552
|
+
return [];
|
|
6553
6553
|
}
|
|
6554
|
-
return
|
|
6554
|
+
return [data.id];
|
|
6555
6555
|
} catch (error) {
|
|
6556
6556
|
console.error("Error updating floor:", error);
|
|
6557
|
-
return
|
|
6557
|
+
return [];
|
|
6558
6558
|
}
|
|
6559
6559
|
},
|
|
6560
6560
|
[supabase]
|
|
@@ -6572,19 +6572,19 @@ var updateTableSupabaseService = () => {
|
|
|
6572
6572
|
async (values) => {
|
|
6573
6573
|
if (!supabase) {
|
|
6574
6574
|
console.error("Supabase client not initialized");
|
|
6575
|
-
return
|
|
6575
|
+
return [];
|
|
6576
6576
|
}
|
|
6577
6577
|
try {
|
|
6578
6578
|
const { id, ...updateData } = values;
|
|
6579
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id);
|
|
6579
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id).select("id").single();
|
|
6580
6580
|
if (error) {
|
|
6581
6581
|
console.error("Error updating table:", error);
|
|
6582
|
-
return
|
|
6582
|
+
return [];
|
|
6583
6583
|
}
|
|
6584
|
-
return
|
|
6584
|
+
return [data.id];
|
|
6585
6585
|
} catch (error) {
|
|
6586
6586
|
console.error("Error updating table:", error);
|
|
6587
|
-
return
|
|
6587
|
+
return [];
|
|
6588
6588
|
}
|
|
6589
6589
|
},
|
|
6590
6590
|
[supabase]
|
|
@@ -6602,18 +6602,18 @@ var deleteFloorSupabaseService = () => {
|
|
|
6602
6602
|
async (values) => {
|
|
6603
6603
|
if (!supabase) {
|
|
6604
6604
|
console.error("Supabase client not initialized");
|
|
6605
|
-
return
|
|
6605
|
+
return [];
|
|
6606
6606
|
}
|
|
6607
6607
|
try {
|
|
6608
6608
|
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).delete().eq("id", values.id);
|
|
6609
6609
|
if (error) {
|
|
6610
6610
|
console.error("Error deleting floor:", error);
|
|
6611
|
-
return
|
|
6611
|
+
return [];
|
|
6612
6612
|
}
|
|
6613
|
-
return
|
|
6613
|
+
return [values.id];
|
|
6614
6614
|
} catch (error) {
|
|
6615
6615
|
console.error("Error deleting floor:", error);
|
|
6616
|
-
return
|
|
6616
|
+
return [];
|
|
6617
6617
|
}
|
|
6618
6618
|
},
|
|
6619
6619
|
[supabase]
|
|
@@ -6631,18 +6631,18 @@ var deleteTableSupabaseService = () => {
|
|
|
6631
6631
|
async (values) => {
|
|
6632
6632
|
if (!supabase) {
|
|
6633
6633
|
console.error("Supabase client not initialized");
|
|
6634
|
-
return
|
|
6634
|
+
return [];
|
|
6635
6635
|
}
|
|
6636
6636
|
try {
|
|
6637
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id);
|
|
6637
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id).select("id").single();
|
|
6638
6638
|
if (error) {
|
|
6639
6639
|
console.error("Error deleting table:", error);
|
|
6640
|
-
return
|
|
6640
|
+
return [];
|
|
6641
6641
|
}
|
|
6642
|
-
return
|
|
6642
|
+
return [data.id];
|
|
6643
6643
|
} catch (error) {
|
|
6644
6644
|
console.error("Error deleting table:", error);
|
|
6645
|
-
return
|
|
6645
|
+
return [];
|
|
6646
6646
|
}
|
|
6647
6647
|
},
|
|
6648
6648
|
[supabase]
|
package/dist/provider.mjs
CHANGED
|
@@ -6497,19 +6497,19 @@ var updateFloorSupabaseService = () => {
|
|
|
6497
6497
|
async (values) => {
|
|
6498
6498
|
if (!supabase) {
|
|
6499
6499
|
console.error("Supabase client not initialized");
|
|
6500
|
-
return
|
|
6500
|
+
return [];
|
|
6501
6501
|
}
|
|
6502
6502
|
try {
|
|
6503
6503
|
const { id, ...updateData } = values;
|
|
6504
|
-
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id);
|
|
6504
|
+
const { error, data } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id).select("id").single();
|
|
6505
6505
|
if (error) {
|
|
6506
6506
|
console.error("Error updating floor:", error);
|
|
6507
|
-
return
|
|
6507
|
+
return [];
|
|
6508
6508
|
}
|
|
6509
|
-
return
|
|
6509
|
+
return [data.id];
|
|
6510
6510
|
} catch (error) {
|
|
6511
6511
|
console.error("Error updating floor:", error);
|
|
6512
|
-
return
|
|
6512
|
+
return [];
|
|
6513
6513
|
}
|
|
6514
6514
|
},
|
|
6515
6515
|
[supabase]
|
|
@@ -6527,19 +6527,19 @@ var updateTableSupabaseService = () => {
|
|
|
6527
6527
|
async (values) => {
|
|
6528
6528
|
if (!supabase) {
|
|
6529
6529
|
console.error("Supabase client not initialized");
|
|
6530
|
-
return
|
|
6530
|
+
return [];
|
|
6531
6531
|
}
|
|
6532
6532
|
try {
|
|
6533
6533
|
const { id, ...updateData } = values;
|
|
6534
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id);
|
|
6534
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id).select("id").single();
|
|
6535
6535
|
if (error) {
|
|
6536
6536
|
console.error("Error updating table:", error);
|
|
6537
|
-
return
|
|
6537
|
+
return [];
|
|
6538
6538
|
}
|
|
6539
|
-
return
|
|
6539
|
+
return [data.id];
|
|
6540
6540
|
} catch (error) {
|
|
6541
6541
|
console.error("Error updating table:", error);
|
|
6542
|
-
return
|
|
6542
|
+
return [];
|
|
6543
6543
|
}
|
|
6544
6544
|
},
|
|
6545
6545
|
[supabase]
|
|
@@ -6557,18 +6557,18 @@ var deleteFloorSupabaseService = () => {
|
|
|
6557
6557
|
async (values) => {
|
|
6558
6558
|
if (!supabase) {
|
|
6559
6559
|
console.error("Supabase client not initialized");
|
|
6560
|
-
return
|
|
6560
|
+
return [];
|
|
6561
6561
|
}
|
|
6562
6562
|
try {
|
|
6563
6563
|
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).delete().eq("id", values.id);
|
|
6564
6564
|
if (error) {
|
|
6565
6565
|
console.error("Error deleting floor:", error);
|
|
6566
|
-
return
|
|
6566
|
+
return [];
|
|
6567
6567
|
}
|
|
6568
|
-
return
|
|
6568
|
+
return [values.id];
|
|
6569
6569
|
} catch (error) {
|
|
6570
6570
|
console.error("Error deleting floor:", error);
|
|
6571
|
-
return
|
|
6571
|
+
return [];
|
|
6572
6572
|
}
|
|
6573
6573
|
},
|
|
6574
6574
|
[supabase]
|
|
@@ -6586,18 +6586,18 @@ var deleteTableSupabaseService = () => {
|
|
|
6586
6586
|
async (values) => {
|
|
6587
6587
|
if (!supabase) {
|
|
6588
6588
|
console.error("Supabase client not initialized");
|
|
6589
|
-
return
|
|
6589
|
+
return [];
|
|
6590
6590
|
}
|
|
6591
6591
|
try {
|
|
6592
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id);
|
|
6592
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id).select("id").single();
|
|
6593
6593
|
if (error) {
|
|
6594
6594
|
console.error("Error deleting table:", error);
|
|
6595
|
-
return
|
|
6595
|
+
return [];
|
|
6596
6596
|
}
|
|
6597
|
-
return
|
|
6597
|
+
return [data.id];
|
|
6598
6598
|
} catch (error) {
|
|
6599
6599
|
console.error("Error deleting table:", error);
|
|
6600
|
-
return
|
|
6600
|
+
return [];
|
|
6601
6601
|
}
|
|
6602
6602
|
},
|
|
6603
6603
|
[supabase]
|
package/dist/services.d.mts
CHANGED
|
@@ -667,7 +667,7 @@ declare const serviceFactories: readonly [(env: any) => {
|
|
|
667
667
|
sequence?: number;
|
|
668
668
|
pos_config_ids?: number[];
|
|
669
669
|
table_ids?: number[];
|
|
670
|
-
}) => Promise<
|
|
670
|
+
}) => Promise<number[]>;
|
|
671
671
|
}, () => {
|
|
672
672
|
updateTableSupabase: (values: {
|
|
673
673
|
id: number;
|
|
@@ -677,15 +677,15 @@ declare const serviceFactories: readonly [(env: any) => {
|
|
|
677
677
|
active?: boolean;
|
|
678
678
|
shape?: "square" | "round";
|
|
679
679
|
parent_id?: number;
|
|
680
|
-
}) => Promise<
|
|
680
|
+
}) => Promise<number[]>;
|
|
681
681
|
}, () => {
|
|
682
682
|
deleteFloorSupabase: (values: {
|
|
683
683
|
id: number;
|
|
684
|
-
}) => Promise<
|
|
684
|
+
}) => Promise<number[]>;
|
|
685
685
|
}, () => {
|
|
686
686
|
deleteTableSupabase: (values: {
|
|
687
687
|
id: number;
|
|
688
|
-
}) => Promise<
|
|
688
|
+
}) => Promise<number[]>;
|
|
689
689
|
}];
|
|
690
690
|
type ServiceFactories = (typeof serviceFactories)[number];
|
|
691
691
|
type ServiceReturn<T extends ServiceFactories> = ReturnType<T>;
|
package/dist/services.d.ts
CHANGED
|
@@ -667,7 +667,7 @@ declare const serviceFactories: readonly [(env: any) => {
|
|
|
667
667
|
sequence?: number;
|
|
668
668
|
pos_config_ids?: number[];
|
|
669
669
|
table_ids?: number[];
|
|
670
|
-
}) => Promise<
|
|
670
|
+
}) => Promise<number[]>;
|
|
671
671
|
}, () => {
|
|
672
672
|
updateTableSupabase: (values: {
|
|
673
673
|
id: number;
|
|
@@ -677,15 +677,15 @@ declare const serviceFactories: readonly [(env: any) => {
|
|
|
677
677
|
active?: boolean;
|
|
678
678
|
shape?: "square" | "round";
|
|
679
679
|
parent_id?: number;
|
|
680
|
-
}) => Promise<
|
|
680
|
+
}) => Promise<number[]>;
|
|
681
681
|
}, () => {
|
|
682
682
|
deleteFloorSupabase: (values: {
|
|
683
683
|
id: number;
|
|
684
|
-
}) => Promise<
|
|
684
|
+
}) => Promise<number[]>;
|
|
685
685
|
}, () => {
|
|
686
686
|
deleteTableSupabase: (values: {
|
|
687
687
|
id: number;
|
|
688
|
-
}) => Promise<
|
|
688
|
+
}) => Promise<number[]>;
|
|
689
689
|
}];
|
|
690
690
|
type ServiceFactories = (typeof serviceFactories)[number];
|
|
691
691
|
type ServiceReturn<T extends ServiceFactories> = ReturnType<T>;
|
package/dist/services.js
CHANGED
|
@@ -4481,19 +4481,19 @@ var updateFloorSupabaseService = () => {
|
|
|
4481
4481
|
async (values) => {
|
|
4482
4482
|
if (!supabase) {
|
|
4483
4483
|
console.error("Supabase client not initialized");
|
|
4484
|
-
return
|
|
4484
|
+
return [];
|
|
4485
4485
|
}
|
|
4486
4486
|
try {
|
|
4487
4487
|
const { id, ...updateData } = values;
|
|
4488
|
-
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id);
|
|
4488
|
+
const { error, data } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id).select("id").single();
|
|
4489
4489
|
if (error) {
|
|
4490
4490
|
console.error("Error updating floor:", error);
|
|
4491
|
-
return
|
|
4491
|
+
return [];
|
|
4492
4492
|
}
|
|
4493
|
-
return
|
|
4493
|
+
return [data.id];
|
|
4494
4494
|
} catch (error) {
|
|
4495
4495
|
console.error("Error updating floor:", error);
|
|
4496
|
-
return
|
|
4496
|
+
return [];
|
|
4497
4497
|
}
|
|
4498
4498
|
},
|
|
4499
4499
|
[supabase]
|
|
@@ -4511,19 +4511,19 @@ var updateTableSupabaseService = () => {
|
|
|
4511
4511
|
async (values) => {
|
|
4512
4512
|
if (!supabase) {
|
|
4513
4513
|
console.error("Supabase client not initialized");
|
|
4514
|
-
return
|
|
4514
|
+
return [];
|
|
4515
4515
|
}
|
|
4516
4516
|
try {
|
|
4517
4517
|
const { id, ...updateData } = values;
|
|
4518
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id);
|
|
4518
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id).select("id").single();
|
|
4519
4519
|
if (error) {
|
|
4520
4520
|
console.error("Error updating table:", error);
|
|
4521
|
-
return
|
|
4521
|
+
return [];
|
|
4522
4522
|
}
|
|
4523
|
-
return
|
|
4523
|
+
return [data.id];
|
|
4524
4524
|
} catch (error) {
|
|
4525
4525
|
console.error("Error updating table:", error);
|
|
4526
|
-
return
|
|
4526
|
+
return [];
|
|
4527
4527
|
}
|
|
4528
4528
|
},
|
|
4529
4529
|
[supabase]
|
|
@@ -4541,18 +4541,18 @@ var deleteFloorSupabaseService = () => {
|
|
|
4541
4541
|
async (values) => {
|
|
4542
4542
|
if (!supabase) {
|
|
4543
4543
|
console.error("Supabase client not initialized");
|
|
4544
|
-
return
|
|
4544
|
+
return [];
|
|
4545
4545
|
}
|
|
4546
4546
|
try {
|
|
4547
4547
|
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).delete().eq("id", values.id);
|
|
4548
4548
|
if (error) {
|
|
4549
4549
|
console.error("Error deleting floor:", error);
|
|
4550
|
-
return
|
|
4550
|
+
return [];
|
|
4551
4551
|
}
|
|
4552
|
-
return
|
|
4552
|
+
return [values.id];
|
|
4553
4553
|
} catch (error) {
|
|
4554
4554
|
console.error("Error deleting floor:", error);
|
|
4555
|
-
return
|
|
4555
|
+
return [];
|
|
4556
4556
|
}
|
|
4557
4557
|
},
|
|
4558
4558
|
[supabase]
|
|
@@ -4570,18 +4570,18 @@ var deleteTableSupabaseService = () => {
|
|
|
4570
4570
|
async (values) => {
|
|
4571
4571
|
if (!supabase) {
|
|
4572
4572
|
console.error("Supabase client not initialized");
|
|
4573
|
-
return
|
|
4573
|
+
return [];
|
|
4574
4574
|
}
|
|
4575
4575
|
try {
|
|
4576
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id);
|
|
4576
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id).select("id").single();
|
|
4577
4577
|
if (error) {
|
|
4578
4578
|
console.error("Error deleting table:", error);
|
|
4579
|
-
return
|
|
4579
|
+
return [];
|
|
4580
4580
|
}
|
|
4581
|
-
return
|
|
4581
|
+
return [data.id];
|
|
4582
4582
|
} catch (error) {
|
|
4583
4583
|
console.error("Error deleting table:", error);
|
|
4584
|
-
return
|
|
4584
|
+
return [];
|
|
4585
4585
|
}
|
|
4586
4586
|
},
|
|
4587
4587
|
[supabase]
|
package/dist/services.mjs
CHANGED
|
@@ -4435,19 +4435,19 @@ var updateFloorSupabaseService = () => {
|
|
|
4435
4435
|
async (values) => {
|
|
4436
4436
|
if (!supabase) {
|
|
4437
4437
|
console.error("Supabase client not initialized");
|
|
4438
|
-
return
|
|
4438
|
+
return [];
|
|
4439
4439
|
}
|
|
4440
4440
|
try {
|
|
4441
4441
|
const { id, ...updateData } = values;
|
|
4442
|
-
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id);
|
|
4442
|
+
const { error, data } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id).select("id").single();
|
|
4443
4443
|
if (error) {
|
|
4444
4444
|
console.error("Error updating floor:", error);
|
|
4445
|
-
return
|
|
4445
|
+
return [];
|
|
4446
4446
|
}
|
|
4447
|
-
return
|
|
4447
|
+
return [data.id];
|
|
4448
4448
|
} catch (error) {
|
|
4449
4449
|
console.error("Error updating floor:", error);
|
|
4450
|
-
return
|
|
4450
|
+
return [];
|
|
4451
4451
|
}
|
|
4452
4452
|
},
|
|
4453
4453
|
[supabase]
|
|
@@ -4465,19 +4465,19 @@ var updateTableSupabaseService = () => {
|
|
|
4465
4465
|
async (values) => {
|
|
4466
4466
|
if (!supabase) {
|
|
4467
4467
|
console.error("Supabase client not initialized");
|
|
4468
|
-
return
|
|
4468
|
+
return [];
|
|
4469
4469
|
}
|
|
4470
4470
|
try {
|
|
4471
4471
|
const { id, ...updateData } = values;
|
|
4472
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id);
|
|
4472
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id).select("id").single();
|
|
4473
4473
|
if (error) {
|
|
4474
4474
|
console.error("Error updating table:", error);
|
|
4475
|
-
return
|
|
4475
|
+
return [];
|
|
4476
4476
|
}
|
|
4477
|
-
return
|
|
4477
|
+
return [data.id];
|
|
4478
4478
|
} catch (error) {
|
|
4479
4479
|
console.error("Error updating table:", error);
|
|
4480
|
-
return
|
|
4480
|
+
return [];
|
|
4481
4481
|
}
|
|
4482
4482
|
},
|
|
4483
4483
|
[supabase]
|
|
@@ -4495,18 +4495,18 @@ var deleteFloorSupabaseService = () => {
|
|
|
4495
4495
|
async (values) => {
|
|
4496
4496
|
if (!supabase) {
|
|
4497
4497
|
console.error("Supabase client not initialized");
|
|
4498
|
-
return
|
|
4498
|
+
return [];
|
|
4499
4499
|
}
|
|
4500
4500
|
try {
|
|
4501
4501
|
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).delete().eq("id", values.id);
|
|
4502
4502
|
if (error) {
|
|
4503
4503
|
console.error("Error deleting floor:", error);
|
|
4504
|
-
return
|
|
4504
|
+
return [];
|
|
4505
4505
|
}
|
|
4506
|
-
return
|
|
4506
|
+
return [values.id];
|
|
4507
4507
|
} catch (error) {
|
|
4508
4508
|
console.error("Error deleting floor:", error);
|
|
4509
|
-
return
|
|
4509
|
+
return [];
|
|
4510
4510
|
}
|
|
4511
4511
|
},
|
|
4512
4512
|
[supabase]
|
|
@@ -4524,18 +4524,18 @@ var deleteTableSupabaseService = () => {
|
|
|
4524
4524
|
async (values) => {
|
|
4525
4525
|
if (!supabase) {
|
|
4526
4526
|
console.error("Supabase client not initialized");
|
|
4527
|
-
return
|
|
4527
|
+
return [];
|
|
4528
4528
|
}
|
|
4529
4529
|
try {
|
|
4530
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id);
|
|
4530
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id).select("id").single();
|
|
4531
4531
|
if (error) {
|
|
4532
4532
|
console.error("Error deleting table:", error);
|
|
4533
|
-
return
|
|
4533
|
+
return [];
|
|
4534
4534
|
}
|
|
4535
|
-
return
|
|
4535
|
+
return [data.id];
|
|
4536
4536
|
} catch (error) {
|
|
4537
4537
|
console.error("Error deleting table:", error);
|
|
4538
|
-
return
|
|
4538
|
+
return [];
|
|
4539
4539
|
}
|
|
4540
4540
|
},
|
|
4541
4541
|
[supabase]
|