@fctc/interface-logic 5.0.9 → 5.1.0
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/constants.d.mts +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/constants.mjs +1 -0
- package/dist/hooks.d.mts +7 -1
- package/dist/hooks.d.ts +7 -1
- package/dist/hooks.js +214 -152
- package/dist/hooks.mjs +213 -152
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +216 -152
- package/dist/index.mjs +215 -152
- package/dist/provider.d.mts +2 -1
- package/dist/provider.d.ts +2 -1
- package/dist/provider.js +234 -173
- package/dist/provider.mjs +223 -162
- package/dist/services.d.mts +6 -0
- package/dist/services.d.ts +6 -0
- package/dist/services.js +264 -211
- package/dist/services.mjs +261 -208
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -451,6 +451,7 @@ var ModelConstants = /* @__PURE__ */ ((ModelConstants2) => {
|
|
|
451
451
|
ModelConstants2["POS_PREPARATION_ORDER_LINE"] = "pos_preparation_display.orderline";
|
|
452
452
|
ModelConstants2["POS_ORDER"] = "pos.order";
|
|
453
453
|
ModelConstants2["COUNTRY"] = "res.country";
|
|
454
|
+
ModelConstants2["RES_COMPANY"] = "res.company";
|
|
454
455
|
ModelConstants2["COUNTRY_STATE"] = "res.country.state";
|
|
455
456
|
ModelConstants2["COUNTRY_WARD"] = "res.country.ward";
|
|
456
457
|
ModelConstants2["RES_PARTNER_TITLE"] = "res.partner.title";
|
|
@@ -4748,6 +4749,7 @@ var ServiceProvider = ({
|
|
|
4748
4749
|
useGetCountry: use_get_country_default,
|
|
4749
4750
|
useGetPartnerTitle: use_get_partner_title_default,
|
|
4750
4751
|
useCompleteCurrentStage: use_complete_current_stage_default,
|
|
4752
|
+
useGetEInvoiceInfo: use_get_e_invoice_info_default,
|
|
4751
4753
|
useAppAuthenticate: use_app_authenticate_default,
|
|
4752
4754
|
useApplyVoucher: use_apply_voucher_default,
|
|
4753
4755
|
useRemoveVoucher: use_remove_voucher_default,
|
|
@@ -8278,10 +8280,59 @@ var completeCurrentStageService = (env2) => {
|
|
|
8278
8280
|
};
|
|
8279
8281
|
};
|
|
8280
8282
|
|
|
8281
|
-
// src/services/pos-service/get-
|
|
8283
|
+
// src/services/pos-service/get-e-invoice-info.ts
|
|
8282
8284
|
import { useCallback as useCallback42 } from "react";
|
|
8285
|
+
var getEInvoiceInfoService = (env2) => {
|
|
8286
|
+
const getEInvoiceInfo = useCallback42(
|
|
8287
|
+
async ({ xNode, service, uid }) => {
|
|
8288
|
+
const body = {
|
|
8289
|
+
model: "res.company" /* RES_COMPANY */,
|
|
8290
|
+
method: "web_read" /* WEB_READ */,
|
|
8291
|
+
ids: [1],
|
|
8292
|
+
with_context: {
|
|
8293
|
+
uid,
|
|
8294
|
+
lang: "vi_VN",
|
|
8295
|
+
tz: "Asia/Saigon"
|
|
8296
|
+
},
|
|
8297
|
+
kwargs: {
|
|
8298
|
+
specification: {
|
|
8299
|
+
display_name: {},
|
|
8300
|
+
access_token_e_invoice: {},
|
|
8301
|
+
vat: {},
|
|
8302
|
+
partner_gid: {},
|
|
8303
|
+
provider_e_invoice_id: {
|
|
8304
|
+
fields: {
|
|
8305
|
+
id: {},
|
|
8306
|
+
display_name: {}
|
|
8307
|
+
}
|
|
8308
|
+
},
|
|
8309
|
+
sign_serial_e_invoice: {}
|
|
8310
|
+
}
|
|
8311
|
+
}
|
|
8312
|
+
};
|
|
8313
|
+
return env2?.requests.post(
|
|
8314
|
+
"/call" /* CALL_PATH */,
|
|
8315
|
+
body,
|
|
8316
|
+
{
|
|
8317
|
+
headers: {
|
|
8318
|
+
"Content-Type": "application/json",
|
|
8319
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
8320
|
+
}
|
|
8321
|
+
},
|
|
8322
|
+
service
|
|
8323
|
+
);
|
|
8324
|
+
},
|
|
8325
|
+
[env2]
|
|
8326
|
+
);
|
|
8327
|
+
return {
|
|
8328
|
+
getEInvoiceInfo
|
|
8329
|
+
};
|
|
8330
|
+
};
|
|
8331
|
+
|
|
8332
|
+
// src/services/pos-service/get-functional-modules.ts
|
|
8333
|
+
import { useCallback as useCallback43 } from "react";
|
|
8283
8334
|
var getFunctionalModulesService = (env2) => {
|
|
8284
|
-
const getFunctionalModules =
|
|
8335
|
+
const getFunctionalModules = useCallback43(
|
|
8285
8336
|
async ({ xNode, service }) => {
|
|
8286
8337
|
return env2?.requests.get(
|
|
8287
8338
|
"/functional-modules" /* FUNCTIONAL_MODULES */,
|
|
@@ -8302,9 +8353,9 @@ var getFunctionalModulesService = (env2) => {
|
|
|
8302
8353
|
};
|
|
8303
8354
|
|
|
8304
8355
|
// src/services/pos-service/app-authenticate.ts
|
|
8305
|
-
import { useCallback as
|
|
8356
|
+
import { useCallback as useCallback44 } from "react";
|
|
8306
8357
|
var appAuthenticateService = (env2) => {
|
|
8307
|
-
const appAuthenticate =
|
|
8358
|
+
const appAuthenticate = useCallback44(
|
|
8308
8359
|
({
|
|
8309
8360
|
xNode,
|
|
8310
8361
|
service,
|
|
@@ -8339,9 +8390,9 @@ var appAuthenticateService = (env2) => {
|
|
|
8339
8390
|
};
|
|
8340
8391
|
|
|
8341
8392
|
// src/services/pos-service/apply-voucher.ts
|
|
8342
|
-
import { useCallback as
|
|
8393
|
+
import { useCallback as useCallback45 } from "react";
|
|
8343
8394
|
var applyVoucherService = (env2) => {
|
|
8344
|
-
const applyVoucher =
|
|
8395
|
+
const applyVoucher = useCallback45(
|
|
8345
8396
|
({ xNode, service, ids, voucherCode }) => {
|
|
8346
8397
|
const jsonData = {
|
|
8347
8398
|
model: "pos.order" /* POS_ORDER */,
|
|
@@ -8371,9 +8422,9 @@ var applyVoucherService = (env2) => {
|
|
|
8371
8422
|
};
|
|
8372
8423
|
|
|
8373
8424
|
// src/services/pos-service/remove-voucher.ts
|
|
8374
|
-
import { useCallback as
|
|
8425
|
+
import { useCallback as useCallback46 } from "react";
|
|
8375
8426
|
var removeVoucherService = (env2) => {
|
|
8376
|
-
const removeVoucher =
|
|
8427
|
+
const removeVoucher = useCallback46(
|
|
8377
8428
|
({ xNode, service, ids, programId }) => {
|
|
8378
8429
|
const jsonData = {
|
|
8379
8430
|
model: "pos.order" /* POS_ORDER */,
|
|
@@ -8403,9 +8454,9 @@ var removeVoucherService = (env2) => {
|
|
|
8403
8454
|
};
|
|
8404
8455
|
|
|
8405
8456
|
// src/services/pos-service/sync-from-ui.ts
|
|
8406
|
-
import { useCallback as
|
|
8457
|
+
import { useCallback as useCallback47 } from "react";
|
|
8407
8458
|
var syncFromUiService = (env2) => {
|
|
8408
|
-
const syncFromUi =
|
|
8459
|
+
const syncFromUi = useCallback47(
|
|
8409
8460
|
({ xNode, service, orders }) => {
|
|
8410
8461
|
const jsonData = {
|
|
8411
8462
|
method: "sync_from_ui" /* SYNC_FROM_UI */,
|
|
@@ -8434,10 +8485,10 @@ var syncFromUiService = (env2) => {
|
|
|
8434
8485
|
};
|
|
8435
8486
|
|
|
8436
8487
|
// src/services/pos-service/supabase/add-floor.ts
|
|
8437
|
-
import { useCallback as
|
|
8488
|
+
import { useCallback as useCallback48 } from "react";
|
|
8438
8489
|
var addFloorSupabaseService = () => {
|
|
8439
8490
|
const supabase = useSupabaseOptional();
|
|
8440
|
-
const addFloorSupabase =
|
|
8491
|
+
const addFloorSupabase = useCallback48(
|
|
8441
8492
|
async (values) => {
|
|
8442
8493
|
if (!supabase) {
|
|
8443
8494
|
console.error("Supabase client not initialized");
|
|
@@ -8468,10 +8519,10 @@ var addFloorSupabaseService = () => {
|
|
|
8468
8519
|
};
|
|
8469
8520
|
|
|
8470
8521
|
// src/services/pos-service/supabase/add-table.ts
|
|
8471
|
-
import { useCallback as
|
|
8522
|
+
import { useCallback as useCallback49 } from "react";
|
|
8472
8523
|
var addTableSupabaseService = () => {
|
|
8473
8524
|
const supabase = useSupabaseOptional();
|
|
8474
|
-
const addTableSupabase =
|
|
8525
|
+
const addTableSupabase = useCallback49(
|
|
8475
8526
|
async (values) => {
|
|
8476
8527
|
if (!supabase) {
|
|
8477
8528
|
console.error("Supabase client not initialized");
|
|
@@ -8501,10 +8552,10 @@ var addTableSupabaseService = () => {
|
|
|
8501
8552
|
};
|
|
8502
8553
|
|
|
8503
8554
|
// src/services/pos-service/supabase/update-floor.ts
|
|
8504
|
-
import { useCallback as
|
|
8555
|
+
import { useCallback as useCallback50 } from "react";
|
|
8505
8556
|
var updateFloorSupabaseService = () => {
|
|
8506
8557
|
const supabase = useSupabaseOptional();
|
|
8507
|
-
const updateFloorSupabase =
|
|
8558
|
+
const updateFloorSupabase = useCallback50(
|
|
8508
8559
|
async (values) => {
|
|
8509
8560
|
if (!supabase) {
|
|
8510
8561
|
console.error("Supabase client not initialized");
|
|
@@ -8531,10 +8582,10 @@ var updateFloorSupabaseService = () => {
|
|
|
8531
8582
|
};
|
|
8532
8583
|
|
|
8533
8584
|
// src/services/pos-service/supabase/update-table.ts
|
|
8534
|
-
import { useCallback as
|
|
8585
|
+
import { useCallback as useCallback51 } from "react";
|
|
8535
8586
|
var updateTableSupabaseService = () => {
|
|
8536
8587
|
const supabase = useSupabaseOptional();
|
|
8537
|
-
const updateTableSupabase =
|
|
8588
|
+
const updateTableSupabase = useCallback51(
|
|
8538
8589
|
async (values) => {
|
|
8539
8590
|
if (!supabase) {
|
|
8540
8591
|
console.error("Supabase client not initialized");
|
|
@@ -8561,10 +8612,10 @@ var updateTableSupabaseService = () => {
|
|
|
8561
8612
|
};
|
|
8562
8613
|
|
|
8563
8614
|
// src/services/pos-service/supabase/delete-floor.ts
|
|
8564
|
-
import { useCallback as
|
|
8615
|
+
import { useCallback as useCallback52 } from "react";
|
|
8565
8616
|
var deleteFloorSupabaseService = () => {
|
|
8566
8617
|
const supabase = useSupabaseOptional();
|
|
8567
|
-
const deleteFloorSupabase =
|
|
8618
|
+
const deleteFloorSupabase = useCallback52(
|
|
8568
8619
|
async (values) => {
|
|
8569
8620
|
if (!supabase) {
|
|
8570
8621
|
console.error("Supabase client not initialized");
|
|
@@ -8590,10 +8641,10 @@ var deleteFloorSupabaseService = () => {
|
|
|
8590
8641
|
};
|
|
8591
8642
|
|
|
8592
8643
|
// src/services/pos-service/supabase/delete-table.ts
|
|
8593
|
-
import { useCallback as
|
|
8644
|
+
import { useCallback as useCallback53 } from "react";
|
|
8594
8645
|
var deleteTableSupabaseService = () => {
|
|
8595
8646
|
const supabase = useSupabaseOptional();
|
|
8596
|
-
const deleteTableSupabase =
|
|
8647
|
+
const deleteTableSupabase = useCallback53(
|
|
8597
8648
|
async (values) => {
|
|
8598
8649
|
if (!supabase) {
|
|
8599
8650
|
console.error("Supabase client not initialized");
|
|
@@ -8619,10 +8670,10 @@ var deleteTableSupabaseService = () => {
|
|
|
8619
8670
|
};
|
|
8620
8671
|
|
|
8621
8672
|
// src/services/pos-service/supabase/create-order.ts
|
|
8622
|
-
import { useCallback as
|
|
8673
|
+
import { useCallback as useCallback54 } from "react";
|
|
8623
8674
|
var createOrderSupabaseService = () => {
|
|
8624
8675
|
const supabase = useSupabaseOptional();
|
|
8625
|
-
const createOrderSupabase =
|
|
8676
|
+
const createOrderSupabase = useCallback54(
|
|
8626
8677
|
async (values) => {
|
|
8627
8678
|
if (!supabase) {
|
|
8628
8679
|
console.error("Supabase client not initialized");
|
|
@@ -8657,10 +8708,10 @@ var createOrderSupabaseService = () => {
|
|
|
8657
8708
|
};
|
|
8658
8709
|
|
|
8659
8710
|
// src/services/pos-service/supabase/add-product-to-order.ts
|
|
8660
|
-
import { useCallback as
|
|
8711
|
+
import { useCallback as useCallback55 } from "react";
|
|
8661
8712
|
var addProductToOrderSupabaseService = () => {
|
|
8662
8713
|
const supabase = useSupabaseOptional();
|
|
8663
|
-
const addProductToOrderSupabase =
|
|
8714
|
+
const addProductToOrderSupabase = useCallback55(
|
|
8664
8715
|
async (values) => {
|
|
8665
8716
|
if (!supabase) {
|
|
8666
8717
|
console.error("Supabase client not initialized");
|
|
@@ -8697,10 +8748,10 @@ var addProductToOrderSupabaseService = () => {
|
|
|
8697
8748
|
};
|
|
8698
8749
|
|
|
8699
8750
|
// src/services/pos-service/supabase/update-order-total-amount.ts
|
|
8700
|
-
import { useCallback as
|
|
8751
|
+
import { useCallback as useCallback56 } from "react";
|
|
8701
8752
|
var updateOrderTotalAmountSupabaseService = () => {
|
|
8702
8753
|
const supabase = useSupabaseOptional();
|
|
8703
|
-
const updateOrderTotalAmountSupabase =
|
|
8754
|
+
const updateOrderTotalAmountSupabase = useCallback56(
|
|
8704
8755
|
async (values) => {
|
|
8705
8756
|
if (!supabase) {
|
|
8706
8757
|
console.error("Supabase client not initialized");
|
|
@@ -8730,10 +8781,10 @@ var updateOrderTotalAmountSupabaseService = () => {
|
|
|
8730
8781
|
};
|
|
8731
8782
|
|
|
8732
8783
|
// src/services/pos-service/supabase/update-order-line.ts
|
|
8733
|
-
import { useCallback as
|
|
8784
|
+
import { useCallback as useCallback57 } from "react";
|
|
8734
8785
|
var updateOrderLineSupabaseService = () => {
|
|
8735
8786
|
const supabase = useSupabaseOptional();
|
|
8736
|
-
const updateOrderLineSupabase =
|
|
8787
|
+
const updateOrderLineSupabase = useCallback57(
|
|
8737
8788
|
async (values) => {
|
|
8738
8789
|
if (!supabase) {
|
|
8739
8790
|
console.error("Supabase client not initialized");
|
|
@@ -8765,10 +8816,10 @@ var updateOrderLineSupabaseService = () => {
|
|
|
8765
8816
|
};
|
|
8766
8817
|
|
|
8767
8818
|
// src/services/pos-service/supabase/update-order.ts
|
|
8768
|
-
import { useCallback as
|
|
8819
|
+
import { useCallback as useCallback58 } from "react";
|
|
8769
8820
|
var updateOrderSupabaseService = () => {
|
|
8770
8821
|
const supabase = useSupabaseOptional();
|
|
8771
|
-
const updateOrderSupabase =
|
|
8822
|
+
const updateOrderSupabase = useCallback58(
|
|
8772
8823
|
async (values) => {
|
|
8773
8824
|
if (!supabase) {
|
|
8774
8825
|
console.error("Supabase client not initialized");
|
|
@@ -8802,10 +8853,10 @@ var updateOrderSupabaseService = () => {
|
|
|
8802
8853
|
};
|
|
8803
8854
|
|
|
8804
8855
|
// src/services/pos-service/supabase/delete-order.ts
|
|
8805
|
-
import { useCallback as
|
|
8856
|
+
import { useCallback as useCallback59 } from "react";
|
|
8806
8857
|
var deleteOrderSupabaseService = () => {
|
|
8807
8858
|
const supabase = useSupabaseOptional();
|
|
8808
|
-
const deleteOrderSupabase =
|
|
8859
|
+
const deleteOrderSupabase = useCallback59(
|
|
8809
8860
|
async (values) => {
|
|
8810
8861
|
if (!supabase) {
|
|
8811
8862
|
console.error("Supabase client not initialized");
|
|
@@ -8831,10 +8882,10 @@ var deleteOrderSupabaseService = () => {
|
|
|
8831
8882
|
};
|
|
8832
8883
|
|
|
8833
8884
|
// src/services/pos-service/supabase/delete-order-line.ts
|
|
8834
|
-
import { useCallback as
|
|
8885
|
+
import { useCallback as useCallback60 } from "react";
|
|
8835
8886
|
var deleteOrderLineSupabaseService = () => {
|
|
8836
8887
|
const supabase = useSupabaseOptional();
|
|
8837
|
-
const deleteOrderLineSupabase =
|
|
8888
|
+
const deleteOrderLineSupabase = useCallback60(
|
|
8838
8889
|
async (values) => {
|
|
8839
8890
|
if (!supabase) {
|
|
8840
8891
|
console.error("Supabase client not initialized");
|
|
@@ -8860,10 +8911,10 @@ var deleteOrderLineSupabaseService = () => {
|
|
|
8860
8911
|
};
|
|
8861
8912
|
|
|
8862
8913
|
// src/services/pos-service/supabase/add-category.ts
|
|
8863
|
-
import { useCallback as
|
|
8914
|
+
import { useCallback as useCallback61 } from "react";
|
|
8864
8915
|
var addCategorySupabaseService = () => {
|
|
8865
8916
|
const supabase = useSupabaseOptional();
|
|
8866
|
-
const addCategorySupabase =
|
|
8917
|
+
const addCategorySupabase = useCallback61(
|
|
8867
8918
|
async (values) => {
|
|
8868
8919
|
if (!supabase) {
|
|
8869
8920
|
console.error("Supabase client not initialized");
|
|
@@ -8891,10 +8942,10 @@ var addCategorySupabaseService = () => {
|
|
|
8891
8942
|
};
|
|
8892
8943
|
|
|
8893
8944
|
// src/services/pos-service/supabase/add-product.ts
|
|
8894
|
-
import { useCallback as
|
|
8945
|
+
import { useCallback as useCallback62 } from "react";
|
|
8895
8946
|
var addProductSupabaseService = () => {
|
|
8896
8947
|
const supabase = useSupabaseOptional();
|
|
8897
|
-
const addProductSupabase =
|
|
8948
|
+
const addProductSupabase = useCallback62(
|
|
8898
8949
|
async (values) => {
|
|
8899
8950
|
if (!supabase) {
|
|
8900
8951
|
console.error("Supabase client not initialized");
|
|
@@ -8936,10 +8987,10 @@ var addProductSupabaseService = () => {
|
|
|
8936
8987
|
};
|
|
8937
8988
|
|
|
8938
8989
|
// src/services/pos-service/supabase/add-payment-method.ts
|
|
8939
|
-
import { useCallback as
|
|
8990
|
+
import { useCallback as useCallback63 } from "react";
|
|
8940
8991
|
var addPaymentMethodSupabaseService = () => {
|
|
8941
8992
|
const supabase = useSupabaseOptional();
|
|
8942
|
-
const addPaymentMethodSupabase =
|
|
8993
|
+
const addPaymentMethodSupabase = useCallback63(
|
|
8943
8994
|
async (values) => {
|
|
8944
8995
|
if (!supabase) {
|
|
8945
8996
|
console.error("Supabase client not initialized");
|
|
@@ -8970,10 +9021,10 @@ var addPaymentMethodSupabaseService = () => {
|
|
|
8970
9021
|
};
|
|
8971
9022
|
|
|
8972
9023
|
// src/services/pos-service/supabase/update-session-payment-methods.ts
|
|
8973
|
-
import { useCallback as
|
|
9024
|
+
import { useCallback as useCallback64 } from "react";
|
|
8974
9025
|
var updateSessionPaymentMethodsSupabaseService = () => {
|
|
8975
9026
|
const supabase = useSupabaseOptional();
|
|
8976
|
-
const updateSessionPaymentMethodsSupabase =
|
|
9027
|
+
const updateSessionPaymentMethodsSupabase = useCallback64(
|
|
8977
9028
|
async (values) => {
|
|
8978
9029
|
if (!supabase) {
|
|
8979
9030
|
console.error("Supabase client not initialized");
|
|
@@ -9002,10 +9053,10 @@ var updateSessionPaymentMethodsSupabaseService = () => {
|
|
|
9002
9053
|
};
|
|
9003
9054
|
|
|
9004
9055
|
// src/services/pos-service/supabase/create-payment.ts
|
|
9005
|
-
import { useCallback as
|
|
9056
|
+
import { useCallback as useCallback65 } from "react";
|
|
9006
9057
|
var createPaymentSupabaseService = () => {
|
|
9007
9058
|
const supabase = useSupabaseOptional();
|
|
9008
|
-
const createPaymentSupabase =
|
|
9059
|
+
const createPaymentSupabase = useCallback65(
|
|
9009
9060
|
async (values) => {
|
|
9010
9061
|
if (!supabase) {
|
|
9011
9062
|
console.error("Supabase client not initialized");
|
|
@@ -9046,10 +9097,10 @@ var createPaymentSupabaseService = () => {
|
|
|
9046
9097
|
};
|
|
9047
9098
|
|
|
9048
9099
|
// src/services/pos-service/supabase/create-customer.ts
|
|
9049
|
-
import { useCallback as
|
|
9100
|
+
import { useCallback as useCallback66 } from "react";
|
|
9050
9101
|
var createCustomerSupabaseService = () => {
|
|
9051
9102
|
const supabase = useSupabaseOptional();
|
|
9052
|
-
const createCustomerSupabase =
|
|
9103
|
+
const createCustomerSupabase = useCallback66(
|
|
9053
9104
|
async (values) => {
|
|
9054
9105
|
if (!supabase) {
|
|
9055
9106
|
console.error("Supabase client not initialized");
|
|
@@ -9087,10 +9138,10 @@ var createCustomerSupabaseService = () => {
|
|
|
9087
9138
|
};
|
|
9088
9139
|
|
|
9089
9140
|
// src/services/pos-service/supabase/update-customer.ts
|
|
9090
|
-
import { useCallback as
|
|
9141
|
+
import { useCallback as useCallback67 } from "react";
|
|
9091
9142
|
var updateCustomerSupabaseService = () => {
|
|
9092
9143
|
const supabase = useSupabaseOptional();
|
|
9093
|
-
const updateCustomerSupabase =
|
|
9144
|
+
const updateCustomerSupabase = useCallback67(
|
|
9094
9145
|
async (values) => {
|
|
9095
9146
|
if (!supabase) {
|
|
9096
9147
|
console.error("Supabase client not initialized");
|
|
@@ -9121,10 +9172,10 @@ var updateCustomerSupabaseService = () => {
|
|
|
9121
9172
|
};
|
|
9122
9173
|
|
|
9123
9174
|
// src/services/pos-service/supabase/delete-customer.ts
|
|
9124
|
-
import { useCallback as
|
|
9175
|
+
import { useCallback as useCallback68 } from "react";
|
|
9125
9176
|
var deleteCustomerSupabaseService = () => {
|
|
9126
9177
|
const supabase = useSupabaseOptional();
|
|
9127
|
-
const deleteCustomerSupabase =
|
|
9178
|
+
const deleteCustomerSupabase = useCallback68(
|
|
9128
9179
|
async (values) => {
|
|
9129
9180
|
if (!supabase) {
|
|
9130
9181
|
console.error("Supabase client not initialized");
|
|
@@ -9150,10 +9201,10 @@ var deleteCustomerSupabaseService = () => {
|
|
|
9150
9201
|
};
|
|
9151
9202
|
|
|
9152
9203
|
// src/services/pos-service/supabase/upload-image.ts
|
|
9153
|
-
import { useCallback as
|
|
9204
|
+
import { useCallback as useCallback69 } from "react";
|
|
9154
9205
|
var uploadImageSupabaseService = () => {
|
|
9155
9206
|
const supabase = useSupabaseOptional();
|
|
9156
|
-
const uploadImageSupabase =
|
|
9207
|
+
const uploadImageSupabase = useCallback69(
|
|
9157
9208
|
async (file, tenantId) => {
|
|
9158
9209
|
if (!supabase) {
|
|
9159
9210
|
console.error("Supabase client not initialized");
|
|
@@ -9188,9 +9239,9 @@ var uploadImageSupabaseService = () => {
|
|
|
9188
9239
|
};
|
|
9189
9240
|
|
|
9190
9241
|
// src/services/pos-service/supabase/get-list-users.ts
|
|
9191
|
-
import { useCallback as
|
|
9242
|
+
import { useCallback as useCallback70 } from "react";
|
|
9192
9243
|
var getListUsersService = (env2) => {
|
|
9193
|
-
const getListUsers =
|
|
9244
|
+
const getListUsers = useCallback70(
|
|
9194
9245
|
({ tenantId }) => {
|
|
9195
9246
|
const jsonData = {
|
|
9196
9247
|
model: "tenant.users",
|
|
@@ -9211,9 +9262,9 @@ var getListUsersService = (env2) => {
|
|
|
9211
9262
|
};
|
|
9212
9263
|
|
|
9213
9264
|
// src/services/pos-service/supabase/get-list-roles.ts
|
|
9214
|
-
import { useCallback as
|
|
9265
|
+
import { useCallback as useCallback71 } from "react";
|
|
9215
9266
|
var getListRolesService = (env2) => {
|
|
9216
|
-
const getListRoles =
|
|
9267
|
+
const getListRoles = useCallback71(
|
|
9217
9268
|
({ tenantId }) => {
|
|
9218
9269
|
const jsonData = {
|
|
9219
9270
|
model: "tenant.roles",
|
|
@@ -9234,9 +9285,9 @@ var getListRolesService = (env2) => {
|
|
|
9234
9285
|
};
|
|
9235
9286
|
|
|
9236
9287
|
// src/services/pos-service/supabase/assign-role.ts
|
|
9237
|
-
import { useCallback as
|
|
9288
|
+
import { useCallback as useCallback72 } from "react";
|
|
9238
9289
|
var assignRoleService = (env2) => {
|
|
9239
|
-
const assignRole =
|
|
9290
|
+
const assignRole = useCallback72(
|
|
9240
9291
|
({
|
|
9241
9292
|
tenantId,
|
|
9242
9293
|
userId,
|
|
@@ -9265,10 +9316,10 @@ var assignRoleService = (env2) => {
|
|
|
9265
9316
|
};
|
|
9266
9317
|
|
|
9267
9318
|
// src/services/pos-service/supabase/get-states.ts
|
|
9268
|
-
import { useCallback as
|
|
9319
|
+
import { useCallback as useCallback73 } from "react";
|
|
9269
9320
|
var getStatesSupabaseService = () => {
|
|
9270
9321
|
const supabase = useSupabaseOptional();
|
|
9271
|
-
const getStatesSupabase =
|
|
9322
|
+
const getStatesSupabase = useCallback73(async () => {
|
|
9272
9323
|
if (!supabase) return { length: 0, records: [] };
|
|
9273
9324
|
const { data, error } = await supabase.from("states" /* STATES */).select("*");
|
|
9274
9325
|
if (error) {
|
|
@@ -9284,10 +9335,10 @@ var getStatesSupabaseService = () => {
|
|
|
9284
9335
|
};
|
|
9285
9336
|
|
|
9286
9337
|
// src/services/pos-service/supabase/get-wards.ts
|
|
9287
|
-
import { useCallback as
|
|
9338
|
+
import { useCallback as useCallback74 } from "react";
|
|
9288
9339
|
var getWardsSupabaseService = () => {
|
|
9289
9340
|
const supabase = useSupabaseOptional();
|
|
9290
|
-
const getWardsSupabase =
|
|
9341
|
+
const getWardsSupabase = useCallback74(async () => {
|
|
9291
9342
|
if (!supabase) return { length: 0, records: [] };
|
|
9292
9343
|
const { data, error } = await supabase.from("wards" /* WARDS */).select("*");
|
|
9293
9344
|
if (error) {
|
|
@@ -9303,10 +9354,10 @@ var getWardsSupabaseService = () => {
|
|
|
9303
9354
|
};
|
|
9304
9355
|
|
|
9305
9356
|
// src/services/pos-service/supabase/get-partner-titles.ts
|
|
9306
|
-
import { useCallback as
|
|
9357
|
+
import { useCallback as useCallback75 } from "react";
|
|
9307
9358
|
var getPartnerTitlesSupabaseService = () => {
|
|
9308
9359
|
const supabase = useSupabaseOptional();
|
|
9309
|
-
const getPartnerTitlesSupabase =
|
|
9360
|
+
const getPartnerTitlesSupabase = useCallback75(async () => {
|
|
9310
9361
|
if (!supabase) return { length: 0, records: [] };
|
|
9311
9362
|
const { data, error } = await supabase.from("partner_titles" /* PARTNER_TITLES */).select("*");
|
|
9312
9363
|
if (error) {
|
|
@@ -9322,9 +9373,9 @@ var getPartnerTitlesSupabaseService = () => {
|
|
|
9322
9373
|
};
|
|
9323
9374
|
|
|
9324
9375
|
// src/services/pos-service/supabase/get-supa-current-user.ts
|
|
9325
|
-
import { useCallback as
|
|
9376
|
+
import { useCallback as useCallback76 } from "react";
|
|
9326
9377
|
var getSupaCurrentUser = (env2) => {
|
|
9327
|
-
const getSupaCurrentUser2 =
|
|
9378
|
+
const getSupaCurrentUser2 = useCallback76(
|
|
9328
9379
|
({ tenantId }) => {
|
|
9329
9380
|
return env2?.requests.get("/api/v2/auth/me" /* SUPABASE_CURRENT_USER */, {
|
|
9330
9381
|
headers: {
|
|
@@ -9341,10 +9392,10 @@ var getSupaCurrentUser = (env2) => {
|
|
|
9341
9392
|
};
|
|
9342
9393
|
|
|
9343
9394
|
// src/services/pos-service/supabase/update-category.ts
|
|
9344
|
-
import { useCallback as
|
|
9395
|
+
import { useCallback as useCallback77 } from "react";
|
|
9345
9396
|
var updateCategorySupabaseService = () => {
|
|
9346
9397
|
const supabase = useSupabaseOptional();
|
|
9347
|
-
const updateCategorySupabase =
|
|
9398
|
+
const updateCategorySupabase = useCallback77(
|
|
9348
9399
|
async (values) => {
|
|
9349
9400
|
if (!supabase) {
|
|
9350
9401
|
console.error("Supabase client not initialized");
|
|
@@ -9371,10 +9422,10 @@ var updateCategorySupabaseService = () => {
|
|
|
9371
9422
|
};
|
|
9372
9423
|
|
|
9373
9424
|
// src/services/pos-service/supabase/delete-category.ts
|
|
9374
|
-
import { useCallback as
|
|
9425
|
+
import { useCallback as useCallback78 } from "react";
|
|
9375
9426
|
var deleteCategorySupabaseService = () => {
|
|
9376
9427
|
const supabase = useSupabaseOptional();
|
|
9377
|
-
const deleteCategorySupabase =
|
|
9428
|
+
const deleteCategorySupabase = useCallback78(
|
|
9378
9429
|
async (values) => {
|
|
9379
9430
|
if (!supabase) {
|
|
9380
9431
|
console.error("Supabase client not initialized");
|
|
@@ -9400,10 +9451,10 @@ var deleteCategorySupabaseService = () => {
|
|
|
9400
9451
|
};
|
|
9401
9452
|
|
|
9402
9453
|
// src/services/pos-service/supabase/update-product.ts
|
|
9403
|
-
import { useCallback as
|
|
9454
|
+
import { useCallback as useCallback79 } from "react";
|
|
9404
9455
|
var updateProductSupabaseService = () => {
|
|
9405
9456
|
const supabase = useSupabaseOptional();
|
|
9406
|
-
const updateProductSupabase =
|
|
9457
|
+
const updateProductSupabase = useCallback79(
|
|
9407
9458
|
async (values) => {
|
|
9408
9459
|
if (!supabase) {
|
|
9409
9460
|
console.error("Supabase client not initialized");
|
|
@@ -9431,10 +9482,10 @@ var updateProductSupabaseService = () => {
|
|
|
9431
9482
|
};
|
|
9432
9483
|
|
|
9433
9484
|
// src/services/pos-service/supabase/delete-product.ts
|
|
9434
|
-
import { useCallback as
|
|
9485
|
+
import { useCallback as useCallback80 } from "react";
|
|
9435
9486
|
var deleteProductSupabaseService = () => {
|
|
9436
9487
|
const supabase = useSupabaseOptional();
|
|
9437
|
-
const deleteProductSupabase =
|
|
9488
|
+
const deleteProductSupabase = useCallback80(
|
|
9438
9489
|
async (values) => {
|
|
9439
9490
|
if (!supabase) {
|
|
9440
9491
|
console.error("Supabase client not initialized");
|
|
@@ -9460,10 +9511,10 @@ var deleteProductSupabaseService = () => {
|
|
|
9460
9511
|
};
|
|
9461
9512
|
|
|
9462
9513
|
// src/services/pos-service/supabase/toggle-pos-restaurant.ts
|
|
9463
|
-
import { useCallback as
|
|
9514
|
+
import { useCallback as useCallback81 } from "react";
|
|
9464
9515
|
var togglePosRestaurantSupabaseService = () => {
|
|
9465
9516
|
const supabase = useSupabaseOptional();
|
|
9466
|
-
const togglePosRestaurantSupabase =
|
|
9517
|
+
const togglePosRestaurantSupabase = useCallback81(
|
|
9467
9518
|
async (values) => {
|
|
9468
9519
|
if (!supabase) {
|
|
9469
9520
|
console.error("Supabase client not initialized");
|
|
@@ -9520,6 +9571,7 @@ var serviceFactories = [
|
|
|
9520
9571
|
updateEntityService,
|
|
9521
9572
|
updateOrderStatusService,
|
|
9522
9573
|
completeCurrentStageService,
|
|
9574
|
+
getEInvoiceInfoService,
|
|
9523
9575
|
appAuthenticateService,
|
|
9524
9576
|
applyVoucherService,
|
|
9525
9577
|
removeVoucherService,
|
|
@@ -10455,9 +10507,9 @@ var BaseModel = class {
|
|
|
10455
10507
|
};
|
|
10456
10508
|
|
|
10457
10509
|
// src/hooks/model/use-model.ts
|
|
10458
|
-
import { useCallback as
|
|
10510
|
+
import { useCallback as useCallback82 } from "react";
|
|
10459
10511
|
var useModel = () => {
|
|
10460
|
-
const initModel =
|
|
10512
|
+
const initModel = useCallback82((modelData) => {
|
|
10461
10513
|
switch (modelData?.name) {
|
|
10462
10514
|
default:
|
|
10463
10515
|
return new BaseModel(modelData);
|
|
@@ -11587,361 +11639,371 @@ var useCompleteCurrentStage = () => {
|
|
|
11587
11639
|
};
|
|
11588
11640
|
var use_complete_current_stage_default = useCompleteCurrentStage;
|
|
11589
11641
|
|
|
11590
|
-
// src/hooks/pos/use-
|
|
11642
|
+
// src/hooks/pos/use-get-e-invoice-info.ts
|
|
11591
11643
|
import { useMutation as useMutation89 } from "@tanstack/react-query";
|
|
11592
|
-
var
|
|
11644
|
+
var useGetEInvoiceInfo = () => {
|
|
11593
11645
|
const pos = usePosService();
|
|
11594
11646
|
return useMutation89({
|
|
11647
|
+
mutationFn: pos.getEInvoiceInfo
|
|
11648
|
+
});
|
|
11649
|
+
};
|
|
11650
|
+
var use_get_e_invoice_info_default = useGetEInvoiceInfo;
|
|
11651
|
+
|
|
11652
|
+
// src/hooks/pos/use-app-authenticate.ts
|
|
11653
|
+
import { useMutation as useMutation90 } from "@tanstack/react-query";
|
|
11654
|
+
var useAppAuthenticate = () => {
|
|
11655
|
+
const pos = usePosService();
|
|
11656
|
+
return useMutation90({
|
|
11595
11657
|
mutationFn: pos.appAuthenticate
|
|
11596
11658
|
});
|
|
11597
11659
|
};
|
|
11598
11660
|
var use_app_authenticate_default = useAppAuthenticate;
|
|
11599
11661
|
|
|
11600
11662
|
// src/hooks/pos/use-apply-voucher.ts
|
|
11601
|
-
import { useMutation as
|
|
11663
|
+
import { useMutation as useMutation91 } from "@tanstack/react-query";
|
|
11602
11664
|
var useApplyVoucher = () => {
|
|
11603
11665
|
const pos = usePosService();
|
|
11604
|
-
return
|
|
11666
|
+
return useMutation91({
|
|
11605
11667
|
mutationFn: pos.applyVoucher
|
|
11606
11668
|
});
|
|
11607
11669
|
};
|
|
11608
11670
|
var use_apply_voucher_default = useApplyVoucher;
|
|
11609
11671
|
|
|
11610
11672
|
// src/hooks/pos/use-remove-voucher.ts
|
|
11611
|
-
import { useMutation as
|
|
11673
|
+
import { useMutation as useMutation92 } from "@tanstack/react-query";
|
|
11612
11674
|
var useRemoveVoucher = () => {
|
|
11613
11675
|
const pos = usePosService();
|
|
11614
|
-
return
|
|
11676
|
+
return useMutation92({
|
|
11615
11677
|
mutationFn: pos.removeVoucher
|
|
11616
11678
|
});
|
|
11617
11679
|
};
|
|
11618
11680
|
var use_remove_voucher_default = useRemoveVoucher;
|
|
11619
11681
|
|
|
11620
11682
|
// src/hooks/pos/use-sync-from-ui.ts
|
|
11621
|
-
import { useMutation as
|
|
11683
|
+
import { useMutation as useMutation93 } from "@tanstack/react-query";
|
|
11622
11684
|
var useSyncFromUi = () => {
|
|
11623
11685
|
const pos = usePosService();
|
|
11624
|
-
return
|
|
11686
|
+
return useMutation93({
|
|
11625
11687
|
mutationFn: pos.syncFromUi
|
|
11626
11688
|
});
|
|
11627
11689
|
};
|
|
11628
11690
|
var use_sync_from_ui_default = useSyncFromUi;
|
|
11629
11691
|
|
|
11630
11692
|
// src/hooks/pos/supabase/use-add-floor.ts
|
|
11631
|
-
import { useMutation as
|
|
11693
|
+
import { useMutation as useMutation94 } from "@tanstack/react-query";
|
|
11632
11694
|
var useAddFloor = () => {
|
|
11633
11695
|
const { addFloorSupabase } = addFloorSupabaseService();
|
|
11634
|
-
return
|
|
11696
|
+
return useMutation94({
|
|
11635
11697
|
mutationFn: addFloorSupabase
|
|
11636
11698
|
});
|
|
11637
11699
|
};
|
|
11638
11700
|
var use_add_floor_default = useAddFloor;
|
|
11639
11701
|
|
|
11640
11702
|
// src/hooks/pos/supabase/use-add-table.ts
|
|
11641
|
-
import { useMutation as
|
|
11703
|
+
import { useMutation as useMutation95 } from "@tanstack/react-query";
|
|
11642
11704
|
var useAddTable = () => {
|
|
11643
11705
|
const { addTableSupabase } = addTableSupabaseService();
|
|
11644
|
-
return
|
|
11706
|
+
return useMutation95({
|
|
11645
11707
|
mutationFn: addTableSupabase
|
|
11646
11708
|
});
|
|
11647
11709
|
};
|
|
11648
11710
|
var use_add_table_default = useAddTable;
|
|
11649
11711
|
|
|
11650
11712
|
// src/hooks/pos/supabase/use-update-floor.ts
|
|
11651
|
-
import { useMutation as
|
|
11713
|
+
import { useMutation as useMutation96 } from "@tanstack/react-query";
|
|
11652
11714
|
var useUpdateFloor = () => {
|
|
11653
11715
|
const { updateFloorSupabase } = updateFloorSupabaseService();
|
|
11654
|
-
return
|
|
11716
|
+
return useMutation96({
|
|
11655
11717
|
mutationFn: updateFloorSupabase
|
|
11656
11718
|
});
|
|
11657
11719
|
};
|
|
11658
11720
|
var use_update_floor_default = useUpdateFloor;
|
|
11659
11721
|
|
|
11660
11722
|
// src/hooks/pos/supabase/use-update-table.ts
|
|
11661
|
-
import { useMutation as
|
|
11723
|
+
import { useMutation as useMutation97 } from "@tanstack/react-query";
|
|
11662
11724
|
var useUpdateTable = () => {
|
|
11663
11725
|
const { updateTableSupabase } = updateTableSupabaseService();
|
|
11664
|
-
return
|
|
11726
|
+
return useMutation97({
|
|
11665
11727
|
mutationFn: updateTableSupabase
|
|
11666
11728
|
});
|
|
11667
11729
|
};
|
|
11668
11730
|
var use_update_table_default = useUpdateTable;
|
|
11669
11731
|
|
|
11670
11732
|
// src/hooks/pos/supabase/use-delete-floor.ts
|
|
11671
|
-
import { useMutation as
|
|
11733
|
+
import { useMutation as useMutation98 } from "@tanstack/react-query";
|
|
11672
11734
|
var useDeleteFloor = () => {
|
|
11673
11735
|
const { deleteFloorSupabase } = deleteFloorSupabaseService();
|
|
11674
|
-
return
|
|
11736
|
+
return useMutation98({
|
|
11675
11737
|
mutationFn: deleteFloorSupabase
|
|
11676
11738
|
});
|
|
11677
11739
|
};
|
|
11678
11740
|
var use_delete_floor_default = useDeleteFloor;
|
|
11679
11741
|
|
|
11680
11742
|
// src/hooks/pos/supabase/use-delete-table.ts
|
|
11681
|
-
import { useMutation as
|
|
11743
|
+
import { useMutation as useMutation99 } from "@tanstack/react-query";
|
|
11682
11744
|
var useDeleteTable = () => {
|
|
11683
11745
|
const { deleteTableSupabase } = deleteTableSupabaseService();
|
|
11684
|
-
return
|
|
11746
|
+
return useMutation99({
|
|
11685
11747
|
mutationFn: deleteTableSupabase
|
|
11686
11748
|
});
|
|
11687
11749
|
};
|
|
11688
11750
|
var use_delete_table_default = useDeleteTable;
|
|
11689
11751
|
|
|
11690
11752
|
// src/hooks/pos/supabase/use-create-order.ts
|
|
11691
|
-
import { useMutation as
|
|
11753
|
+
import { useMutation as useMutation100 } from "@tanstack/react-query";
|
|
11692
11754
|
var useCreateOrder = () => {
|
|
11693
11755
|
const { createOrderSupabase } = createOrderSupabaseService();
|
|
11694
|
-
return
|
|
11756
|
+
return useMutation100({
|
|
11695
11757
|
mutationFn: createOrderSupabase
|
|
11696
11758
|
});
|
|
11697
11759
|
};
|
|
11698
11760
|
var use_create_order_default = useCreateOrder;
|
|
11699
11761
|
|
|
11700
11762
|
// src/hooks/pos/supabase/use-add-category.ts
|
|
11701
|
-
import { useMutation as
|
|
11763
|
+
import { useMutation as useMutation101 } from "@tanstack/react-query";
|
|
11702
11764
|
var useAddCategory = () => {
|
|
11703
11765
|
const { addCategorySupabase } = addCategorySupabaseService();
|
|
11704
|
-
return
|
|
11766
|
+
return useMutation101({
|
|
11705
11767
|
mutationFn: addCategorySupabase
|
|
11706
11768
|
});
|
|
11707
11769
|
};
|
|
11708
11770
|
var use_add_category_default = useAddCategory;
|
|
11709
11771
|
|
|
11710
11772
|
// src/hooks/pos/supabase/use-add-product-to-order.ts
|
|
11711
|
-
import { useMutation as
|
|
11773
|
+
import { useMutation as useMutation102 } from "@tanstack/react-query";
|
|
11712
11774
|
var useAddProductToOrder = () => {
|
|
11713
11775
|
const { addProductToOrderSupabase } = addProductToOrderSupabaseService();
|
|
11714
|
-
return
|
|
11776
|
+
return useMutation102({
|
|
11715
11777
|
mutationFn: addProductToOrderSupabase
|
|
11716
11778
|
});
|
|
11717
11779
|
};
|
|
11718
11780
|
var use_add_product_to_order_default = useAddProductToOrder;
|
|
11719
11781
|
|
|
11720
11782
|
// src/hooks/pos/supabase/use-update-order-total-amount.ts
|
|
11721
|
-
import { useMutation as
|
|
11783
|
+
import { useMutation as useMutation103 } from "@tanstack/react-query";
|
|
11722
11784
|
var useUpdateOrderTotalAmount = () => {
|
|
11723
11785
|
const { updateOrderTotalAmountSupabase } = updateOrderTotalAmountSupabaseService();
|
|
11724
|
-
return
|
|
11786
|
+
return useMutation103({
|
|
11725
11787
|
mutationFn: updateOrderTotalAmountSupabase
|
|
11726
11788
|
});
|
|
11727
11789
|
};
|
|
11728
11790
|
var use_update_order_total_amount_default = useUpdateOrderTotalAmount;
|
|
11729
11791
|
|
|
11730
11792
|
// src/hooks/pos/supabase/use-update-order-line.ts
|
|
11731
|
-
import { useMutation as
|
|
11793
|
+
import { useMutation as useMutation104 } from "@tanstack/react-query";
|
|
11732
11794
|
var useUpdateOrderLine = () => {
|
|
11733
11795
|
const { updateOrderLineSupabase } = updateOrderLineSupabaseService();
|
|
11734
|
-
return
|
|
11796
|
+
return useMutation104({
|
|
11735
11797
|
mutationFn: updateOrderLineSupabase
|
|
11736
11798
|
});
|
|
11737
11799
|
};
|
|
11738
11800
|
var use_update_order_line_default = useUpdateOrderLine;
|
|
11739
11801
|
|
|
11740
11802
|
// src/hooks/pos/supabase/use-update-order.ts
|
|
11741
|
-
import { useMutation as
|
|
11803
|
+
import { useMutation as useMutation105 } from "@tanstack/react-query";
|
|
11742
11804
|
var useUpdateOrder = () => {
|
|
11743
11805
|
const { updateOrderSupabase } = updateOrderSupabaseService();
|
|
11744
|
-
return
|
|
11806
|
+
return useMutation105({
|
|
11745
11807
|
mutationFn: updateOrderSupabase
|
|
11746
11808
|
});
|
|
11747
11809
|
};
|
|
11748
11810
|
var use_update_order_default = useUpdateOrder;
|
|
11749
11811
|
|
|
11750
11812
|
// src/hooks/pos/supabase/use-delete-order.ts
|
|
11751
|
-
import { useMutation as
|
|
11813
|
+
import { useMutation as useMutation106 } from "@tanstack/react-query";
|
|
11752
11814
|
var useDeleteOrder = () => {
|
|
11753
11815
|
const { deleteOrderSupabase } = deleteOrderSupabaseService();
|
|
11754
|
-
return
|
|
11816
|
+
return useMutation106({
|
|
11755
11817
|
mutationFn: deleteOrderSupabase
|
|
11756
11818
|
});
|
|
11757
11819
|
};
|
|
11758
11820
|
var use_delete_order_default = useDeleteOrder;
|
|
11759
11821
|
|
|
11760
11822
|
// src/hooks/pos/supabase/use-delete-order-line.ts
|
|
11761
|
-
import { useMutation as
|
|
11823
|
+
import { useMutation as useMutation107 } from "@tanstack/react-query";
|
|
11762
11824
|
var useDeleteOrderLine = () => {
|
|
11763
11825
|
const { deleteOrderLineSupabase } = deleteOrderLineSupabaseService();
|
|
11764
|
-
return
|
|
11826
|
+
return useMutation107({
|
|
11765
11827
|
mutationFn: deleteOrderLineSupabase
|
|
11766
11828
|
});
|
|
11767
11829
|
};
|
|
11768
11830
|
var use_delete_order_line_default = useDeleteOrderLine;
|
|
11769
11831
|
|
|
11770
11832
|
// src/hooks/pos/supabase/use-add-product.ts
|
|
11771
|
-
import { useMutation as
|
|
11833
|
+
import { useMutation as useMutation108 } from "@tanstack/react-query";
|
|
11772
11834
|
var useAddProduct = () => {
|
|
11773
11835
|
const { addProductSupabase } = addProductSupabaseService();
|
|
11774
|
-
return
|
|
11836
|
+
return useMutation108({
|
|
11775
11837
|
mutationFn: addProductSupabase
|
|
11776
11838
|
});
|
|
11777
11839
|
};
|
|
11778
11840
|
var use_add_product_default = useAddProduct;
|
|
11779
11841
|
|
|
11780
11842
|
// src/hooks/pos/use-get-functional-modules.ts
|
|
11781
|
-
import { useMutation as
|
|
11843
|
+
import { useMutation as useMutation109 } from "@tanstack/react-query";
|
|
11782
11844
|
var useGetFunctionalModules = () => {
|
|
11783
11845
|
const pos = usePosService();
|
|
11784
|
-
return
|
|
11846
|
+
return useMutation109({
|
|
11785
11847
|
mutationFn: pos.getFunctionalModules
|
|
11786
11848
|
});
|
|
11787
11849
|
};
|
|
11788
11850
|
var use_get_functional_modules_default = useGetFunctionalModules;
|
|
11789
11851
|
|
|
11790
11852
|
// src/hooks/pos/supabase/use-add-payment-method.ts
|
|
11791
|
-
import { useMutation as
|
|
11853
|
+
import { useMutation as useMutation110 } from "@tanstack/react-query";
|
|
11792
11854
|
var useAddPaymentMethod = () => {
|
|
11793
11855
|
const { addPaymentMethodSupabase } = addPaymentMethodSupabaseService();
|
|
11794
|
-
return
|
|
11856
|
+
return useMutation110({
|
|
11795
11857
|
mutationFn: addPaymentMethodSupabase
|
|
11796
11858
|
});
|
|
11797
11859
|
};
|
|
11798
11860
|
var use_add_payment_method_default = useAddPaymentMethod;
|
|
11799
11861
|
|
|
11800
11862
|
// src/hooks/pos/supabase/use-update-session-payment-methods.ts
|
|
11801
|
-
import { useMutation as
|
|
11863
|
+
import { useMutation as useMutation111 } from "@tanstack/react-query";
|
|
11802
11864
|
var useUpdateSessionPaymentMethods = () => {
|
|
11803
11865
|
const { updateSessionPaymentMethodsSupabase } = updateSessionPaymentMethodsSupabaseService();
|
|
11804
|
-
return
|
|
11866
|
+
return useMutation111({
|
|
11805
11867
|
mutationFn: updateSessionPaymentMethodsSupabase
|
|
11806
11868
|
});
|
|
11807
11869
|
};
|
|
11808
11870
|
var use_update_session_payment_methods_default = useUpdateSessionPaymentMethods;
|
|
11809
11871
|
|
|
11810
11872
|
// src/hooks/pos/supabase/use-create-payment.ts
|
|
11811
|
-
import { useMutation as
|
|
11873
|
+
import { useMutation as useMutation112 } from "@tanstack/react-query";
|
|
11812
11874
|
var useCreatePayment = () => {
|
|
11813
11875
|
const { createPaymentSupabase } = createPaymentSupabaseService();
|
|
11814
|
-
return
|
|
11876
|
+
return useMutation112({
|
|
11815
11877
|
mutationFn: createPaymentSupabase
|
|
11816
11878
|
});
|
|
11817
11879
|
};
|
|
11818
11880
|
var use_create_payment_default = useCreatePayment;
|
|
11819
11881
|
|
|
11820
11882
|
// src/hooks/pos/supabase/use-create-customer.ts
|
|
11821
|
-
import { useMutation as
|
|
11883
|
+
import { useMutation as useMutation113 } from "@tanstack/react-query";
|
|
11822
11884
|
var useCreateCustomer = () => {
|
|
11823
11885
|
const { createCustomerSupabase } = createCustomerSupabaseService();
|
|
11824
|
-
return
|
|
11886
|
+
return useMutation113({
|
|
11825
11887
|
mutationFn: createCustomerSupabase
|
|
11826
11888
|
});
|
|
11827
11889
|
};
|
|
11828
11890
|
var use_create_customer_default = useCreateCustomer;
|
|
11829
11891
|
|
|
11830
11892
|
// src/hooks/pos/supabase/use-update-customer.ts
|
|
11831
|
-
import { useMutation as
|
|
11893
|
+
import { useMutation as useMutation114 } from "@tanstack/react-query";
|
|
11832
11894
|
var useUpdateCustomer = () => {
|
|
11833
11895
|
const { updateCustomerSupabase } = updateCustomerSupabaseService();
|
|
11834
|
-
return
|
|
11896
|
+
return useMutation114({
|
|
11835
11897
|
mutationFn: updateCustomerSupabase
|
|
11836
11898
|
});
|
|
11837
11899
|
};
|
|
11838
11900
|
var use_update_customer_default = useUpdateCustomer;
|
|
11839
11901
|
|
|
11840
11902
|
// src/hooks/pos/supabase/use-delete-customer.ts
|
|
11841
|
-
import { useMutation as
|
|
11903
|
+
import { useMutation as useMutation115 } from "@tanstack/react-query";
|
|
11842
11904
|
var useDeleteCustomer = () => {
|
|
11843
11905
|
const { deleteCustomerSupabase } = deleteCustomerSupabaseService();
|
|
11844
|
-
return
|
|
11906
|
+
return useMutation115({
|
|
11845
11907
|
mutationFn: deleteCustomerSupabase
|
|
11846
11908
|
});
|
|
11847
11909
|
};
|
|
11848
11910
|
var use_delete_customer_default = useDeleteCustomer;
|
|
11849
11911
|
|
|
11850
11912
|
// src/hooks/pos/supabase/use-supa-upload-image.ts
|
|
11851
|
-
import { useMutation as
|
|
11913
|
+
import { useMutation as useMutation116 } from "@tanstack/react-query";
|
|
11852
11914
|
var useSupaUploadImage = () => {
|
|
11853
11915
|
const { uploadImageSupabase } = uploadImageSupabaseService();
|
|
11854
|
-
return
|
|
11916
|
+
return useMutation116({
|
|
11855
11917
|
mutationFn: ({ file, tenantId }) => uploadImageSupabase(file, tenantId)
|
|
11856
11918
|
});
|
|
11857
11919
|
};
|
|
11858
11920
|
var use_supa_upload_image_default = useSupaUploadImage;
|
|
11859
11921
|
|
|
11860
11922
|
// src/hooks/pos/supabase/use-get-list-users.ts
|
|
11861
|
-
import { useMutation as
|
|
11923
|
+
import { useMutation as useMutation117 } from "@tanstack/react-query";
|
|
11862
11924
|
var useGetListUsers = () => {
|
|
11863
11925
|
const pos = usePosService();
|
|
11864
|
-
return
|
|
11926
|
+
return useMutation117({
|
|
11865
11927
|
mutationFn: pos.getListUsers
|
|
11866
11928
|
});
|
|
11867
11929
|
};
|
|
11868
11930
|
var use_get_list_users_default = useGetListUsers;
|
|
11869
11931
|
|
|
11870
11932
|
// src/hooks/pos/supabase/use-get-list-roles.ts
|
|
11871
|
-
import { useMutation as
|
|
11933
|
+
import { useMutation as useMutation118 } from "@tanstack/react-query";
|
|
11872
11934
|
var useGetListRoles = () => {
|
|
11873
11935
|
const pos = usePosService();
|
|
11874
|
-
return
|
|
11936
|
+
return useMutation118({
|
|
11875
11937
|
mutationFn: pos.getListRoles
|
|
11876
11938
|
});
|
|
11877
11939
|
};
|
|
11878
11940
|
var use_get_list_roles_default = useGetListRoles;
|
|
11879
11941
|
|
|
11880
11942
|
// src/hooks/pos/supabase/use-assign-role.ts
|
|
11881
|
-
import { useMutation as
|
|
11943
|
+
import { useMutation as useMutation119 } from "@tanstack/react-query";
|
|
11882
11944
|
var useAssignRole = () => {
|
|
11883
11945
|
const pos = usePosService();
|
|
11884
|
-
return
|
|
11946
|
+
return useMutation119({
|
|
11885
11947
|
mutationFn: pos.assignRole
|
|
11886
11948
|
});
|
|
11887
11949
|
};
|
|
11888
11950
|
var use_assign_role_default = useAssignRole;
|
|
11889
11951
|
|
|
11890
11952
|
// src/hooks/pos/supabase/use-get-supa-current-user.ts
|
|
11891
|
-
import { useMutation as
|
|
11953
|
+
import { useMutation as useMutation120 } from "@tanstack/react-query";
|
|
11892
11954
|
var useGetSupaCurrentUser = () => {
|
|
11893
11955
|
const pos = usePosService();
|
|
11894
|
-
return
|
|
11956
|
+
return useMutation120({
|
|
11895
11957
|
mutationFn: pos.getSupaCurrentUser
|
|
11896
11958
|
});
|
|
11897
11959
|
};
|
|
11898
11960
|
var use_get_supa_current_user_default = useGetSupaCurrentUser;
|
|
11899
11961
|
|
|
11900
11962
|
// src/hooks/pos/supabase/use-update-category.ts
|
|
11901
|
-
import { useMutation as
|
|
11963
|
+
import { useMutation as useMutation121 } from "@tanstack/react-query";
|
|
11902
11964
|
var useUpdateCategory = () => {
|
|
11903
11965
|
const pos = usePosService();
|
|
11904
|
-
return
|
|
11966
|
+
return useMutation121({
|
|
11905
11967
|
mutationFn: pos.updateCategorySupabase
|
|
11906
11968
|
});
|
|
11907
11969
|
};
|
|
11908
11970
|
var use_update_category_default = useUpdateCategory;
|
|
11909
11971
|
|
|
11910
11972
|
// src/hooks/pos/supabase/use-delete-category.ts
|
|
11911
|
-
import { useMutation as
|
|
11973
|
+
import { useMutation as useMutation122 } from "@tanstack/react-query";
|
|
11912
11974
|
var useDeleteCategory = () => {
|
|
11913
11975
|
const pos = usePosService();
|
|
11914
|
-
return
|
|
11976
|
+
return useMutation122({
|
|
11915
11977
|
mutationFn: pos.deleteCategorySupabase
|
|
11916
11978
|
});
|
|
11917
11979
|
};
|
|
11918
11980
|
var use_delete_category_default = useDeleteCategory;
|
|
11919
11981
|
|
|
11920
11982
|
// src/hooks/pos/supabase/use-update-product.ts
|
|
11921
|
-
import { useMutation as
|
|
11983
|
+
import { useMutation as useMutation123 } from "@tanstack/react-query";
|
|
11922
11984
|
var useUpdateProduct = () => {
|
|
11923
11985
|
const pos = usePosService();
|
|
11924
|
-
return
|
|
11986
|
+
return useMutation123({
|
|
11925
11987
|
mutationFn: pos.updateProductSupabase
|
|
11926
11988
|
});
|
|
11927
11989
|
};
|
|
11928
11990
|
var use_update_product_default = useUpdateProduct;
|
|
11929
11991
|
|
|
11930
11992
|
// src/hooks/pos/supabase/use-delete-product.ts
|
|
11931
|
-
import { useMutation as
|
|
11993
|
+
import { useMutation as useMutation124 } from "@tanstack/react-query";
|
|
11932
11994
|
var useDeleteProduct = () => {
|
|
11933
11995
|
const pos = usePosService();
|
|
11934
|
-
return
|
|
11996
|
+
return useMutation124({
|
|
11935
11997
|
mutationFn: pos.deleteProductSupabase
|
|
11936
11998
|
});
|
|
11937
11999
|
};
|
|
11938
12000
|
var use_delete_product_default = useDeleteProduct;
|
|
11939
12001
|
|
|
11940
12002
|
// src/hooks/pos/supabase/use-toggle-pos-restaurant.ts
|
|
11941
|
-
import { useMutation as
|
|
12003
|
+
import { useMutation as useMutation125 } from "@tanstack/react-query";
|
|
11942
12004
|
var useTogglePosRestaurant = () => {
|
|
11943
12005
|
const pos = usePosService();
|
|
11944
|
-
return
|
|
12006
|
+
return useMutation125({
|
|
11945
12007
|
mutationFn: pos.togglePosRestaurantSupabase
|
|
11946
12008
|
});
|
|
11947
12009
|
};
|
|
@@ -12149,6 +12211,7 @@ export {
|
|
|
12149
12211
|
use_get_current_user_default as useGetCurrentUser,
|
|
12150
12212
|
use_get_data_chart_default as useGetDataChart,
|
|
12151
12213
|
use_get_detail_default as useGetDetail,
|
|
12214
|
+
use_get_e_invoice_info_default as useGetEInvoiceInfo,
|
|
12152
12215
|
use_get_external_tabs_default as useGetExternalTabs,
|
|
12153
12216
|
use_get_field_export_default as useGetFieldExport,
|
|
12154
12217
|
use_get_field_onchange_default as useGetFieldOnChange,
|