@fctc/interface-logic 4.2.3 → 4.2.5
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 +2 -1
- package/dist/constants.d.ts +2 -1
- package/dist/constants.js +1 -0
- package/dist/constants.mjs +1 -0
- package/dist/hooks.d.mts +16 -9
- package/dist/hooks.d.ts +16 -9
- package/dist/hooks.js +145 -92
- package/dist/hooks.mjs +142 -90
- package/dist/provider.d.mts +2 -1
- package/dist/provider.d.ts +2 -1
- package/dist/provider.js +166 -114
- package/dist/provider.mjs +153 -101
- package/dist/services.d.mts +6 -7
- package/dist/services.d.ts +6 -7
- package/dist/services.js +177 -170
- package/dist/services.mjs +174 -167
- package/package.json +1 -1
package/dist/provider.mjs
CHANGED
|
@@ -5149,32 +5149,6 @@ function useViewService() {
|
|
|
5149
5149
|
},
|
|
5150
5150
|
[env]
|
|
5151
5151
|
);
|
|
5152
|
-
const addEntity = useCallback9(
|
|
5153
|
-
({
|
|
5154
|
-
model,
|
|
5155
|
-
values,
|
|
5156
|
-
xNode,
|
|
5157
|
-
service,
|
|
5158
|
-
isCreateEndpoint = false
|
|
5159
|
-
}) => {
|
|
5160
|
-
const jsonData = {
|
|
5161
|
-
model,
|
|
5162
|
-
values
|
|
5163
|
-
};
|
|
5164
|
-
return env?.requests.post(
|
|
5165
|
-
isCreateEndpoint ? "/create" /* CREATE_PATH */ : "/call" /* CALL_PATH */,
|
|
5166
|
-
jsonData,
|
|
5167
|
-
{
|
|
5168
|
-
headers: {
|
|
5169
|
-
"Content-Type": "application/json",
|
|
5170
|
-
...xNode ? { "X-Node": xNode } : {}
|
|
5171
|
-
}
|
|
5172
|
-
},
|
|
5173
|
-
service
|
|
5174
|
-
);
|
|
5175
|
-
},
|
|
5176
|
-
[env]
|
|
5177
|
-
);
|
|
5178
5152
|
const getList = useCallback9(
|
|
5179
5153
|
({
|
|
5180
5154
|
model,
|
|
@@ -5872,6 +5846,33 @@ function useViewService() {
|
|
|
5872
5846
|
},
|
|
5873
5847
|
[env]
|
|
5874
5848
|
);
|
|
5849
|
+
const getPartnerTitle = useCallback9(
|
|
5850
|
+
async ({
|
|
5851
|
+
service,
|
|
5852
|
+
xNode,
|
|
5853
|
+
kwargs,
|
|
5854
|
+
withContext
|
|
5855
|
+
}) => {
|
|
5856
|
+
const body = {
|
|
5857
|
+
model: "res.partner.title" /* RES_PARTNER_TITLE */,
|
|
5858
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
5859
|
+
kwargs,
|
|
5860
|
+
with_context: withContext
|
|
5861
|
+
};
|
|
5862
|
+
return env?.requests?.post(
|
|
5863
|
+
"/call" /* CALL_PATH */,
|
|
5864
|
+
body,
|
|
5865
|
+
{
|
|
5866
|
+
headers: {
|
|
5867
|
+
"Content-Type": "application/json",
|
|
5868
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5869
|
+
}
|
|
5870
|
+
},
|
|
5871
|
+
service
|
|
5872
|
+
);
|
|
5873
|
+
},
|
|
5874
|
+
[env]
|
|
5875
|
+
);
|
|
5875
5876
|
return {
|
|
5876
5877
|
getView,
|
|
5877
5878
|
getMenu,
|
|
@@ -5902,7 +5903,6 @@ function useViewService() {
|
|
|
5902
5903
|
manageOnChange,
|
|
5903
5904
|
getOrderLine,
|
|
5904
5905
|
getProductImage,
|
|
5905
|
-
addEntity,
|
|
5906
5906
|
checkPayment,
|
|
5907
5907
|
handleCloseSession,
|
|
5908
5908
|
handleClosingDetailSession,
|
|
@@ -5920,7 +5920,8 @@ function useViewService() {
|
|
|
5920
5920
|
getCurrentUser,
|
|
5921
5921
|
getCountry,
|
|
5922
5922
|
getCity,
|
|
5923
|
-
getWard
|
|
5923
|
+
getWard,
|
|
5924
|
+
getPartnerTitle
|
|
5924
5925
|
};
|
|
5925
5926
|
}
|
|
5926
5927
|
|
|
@@ -5980,6 +5981,48 @@ function useDashboardService() {
|
|
|
5980
5981
|
return { readGroup, getDataChart };
|
|
5981
5982
|
}
|
|
5982
5983
|
|
|
5984
|
+
// src/services/pos-service/add-entity.ts
|
|
5985
|
+
import { useCallback as useCallback11 } from "react";
|
|
5986
|
+
var addEntityService = (env) => {
|
|
5987
|
+
const addEntity = useCallback11(
|
|
5988
|
+
({
|
|
5989
|
+
model,
|
|
5990
|
+
values,
|
|
5991
|
+
xNode,
|
|
5992
|
+
service,
|
|
5993
|
+
isCreateEndpoint = false
|
|
5994
|
+
}) => {
|
|
5995
|
+
const jsonData = {
|
|
5996
|
+
model,
|
|
5997
|
+
values
|
|
5998
|
+
};
|
|
5999
|
+
return env?.requests.post(
|
|
6000
|
+
isCreateEndpoint ? "/create" /* CREATE_PATH */ : "/call" /* CALL_PATH */,
|
|
6001
|
+
jsonData,
|
|
6002
|
+
{
|
|
6003
|
+
headers: {
|
|
6004
|
+
"Content-Type": "application/json",
|
|
6005
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
6006
|
+
}
|
|
6007
|
+
},
|
|
6008
|
+
service
|
|
6009
|
+
);
|
|
6010
|
+
},
|
|
6011
|
+
[env]
|
|
6012
|
+
);
|
|
6013
|
+
return {
|
|
6014
|
+
addEntity
|
|
6015
|
+
};
|
|
6016
|
+
};
|
|
6017
|
+
|
|
6018
|
+
// src/services/pos-service/index.ts
|
|
6019
|
+
var usePosService = () => {
|
|
6020
|
+
const { env } = useEnv();
|
|
6021
|
+
return {
|
|
6022
|
+
addEntity: addEntityService(env).addEntity
|
|
6023
|
+
};
|
|
6024
|
+
};
|
|
6025
|
+
|
|
5983
6026
|
// src/provider/version-gate-provider.tsx
|
|
5984
6027
|
import { Fragment, jsx as jsx4 } from "react/jsx-runtime";
|
|
5985
6028
|
var VersionGate = ({ children }) => {
|
|
@@ -6017,7 +6060,7 @@ var VersionGate = ({ children }) => {
|
|
|
6017
6060
|
};
|
|
6018
6061
|
|
|
6019
6062
|
// src/provider/env-provider.tsx
|
|
6020
|
-
import { createContext, useContext, useState as useState4, useCallback as
|
|
6063
|
+
import { createContext, useContext, useState as useState4, useCallback as useCallback12 } from "react";
|
|
6021
6064
|
|
|
6022
6065
|
// src/configs/axios-client.ts
|
|
6023
6066
|
import axios from "axios";
|
|
@@ -6380,7 +6423,7 @@ function EnvProvider({
|
|
|
6380
6423
|
localStorageUtils: localStorageUtil,
|
|
6381
6424
|
sessionStorageUtils: sessionStorageUtil
|
|
6382
6425
|
});
|
|
6383
|
-
const setupEnv =
|
|
6426
|
+
const setupEnv = useCallback12(
|
|
6384
6427
|
(envConfig) => {
|
|
6385
6428
|
const updatedEnv = {
|
|
6386
6429
|
...env,
|
|
@@ -6394,31 +6437,31 @@ function EnvProvider({
|
|
|
6394
6437
|
},
|
|
6395
6438
|
[env, localStorageUtil, sessionStorageUtil]
|
|
6396
6439
|
);
|
|
6397
|
-
const setUid2 =
|
|
6440
|
+
const setUid2 = useCallback12((uid) => {
|
|
6398
6441
|
setEnvState((prev) => ({
|
|
6399
6442
|
...prev,
|
|
6400
6443
|
context: { ...prev.context, uid }
|
|
6401
6444
|
}));
|
|
6402
6445
|
}, []);
|
|
6403
|
-
const setLang2 =
|
|
6446
|
+
const setLang2 = useCallback12((lang) => {
|
|
6404
6447
|
setEnvState((prev) => ({
|
|
6405
6448
|
...prev,
|
|
6406
6449
|
context: { ...prev.context, lang }
|
|
6407
6450
|
}));
|
|
6408
6451
|
}, []);
|
|
6409
|
-
const setAllowCompanies2 =
|
|
6452
|
+
const setAllowCompanies2 = useCallback12((allowed_company_ids) => {
|
|
6410
6453
|
setEnvState((prev) => ({
|
|
6411
6454
|
...prev,
|
|
6412
6455
|
context: { ...prev.context, allowed_company_ids }
|
|
6413
6456
|
}));
|
|
6414
6457
|
}, []);
|
|
6415
|
-
const setCompanies2 =
|
|
6458
|
+
const setCompanies2 = useCallback12((companies) => {
|
|
6416
6459
|
setEnvState((prev) => ({
|
|
6417
6460
|
...prev,
|
|
6418
6461
|
companies
|
|
6419
6462
|
}));
|
|
6420
6463
|
}, []);
|
|
6421
|
-
const setDefaultCompany2 =
|
|
6464
|
+
const setDefaultCompany2 = useCallback12(
|
|
6422
6465
|
(defaultCompany) => {
|
|
6423
6466
|
setEnvState((prev) => ({
|
|
6424
6467
|
...prev,
|
|
@@ -6427,19 +6470,19 @@ function EnvProvider({
|
|
|
6427
6470
|
},
|
|
6428
6471
|
[]
|
|
6429
6472
|
);
|
|
6430
|
-
const setUserInfo =
|
|
6473
|
+
const setUserInfo = useCallback12((user) => {
|
|
6431
6474
|
setEnvState((prev) => ({
|
|
6432
6475
|
...prev,
|
|
6433
6476
|
user
|
|
6434
6477
|
}));
|
|
6435
6478
|
}, []);
|
|
6436
|
-
const setConfig2 =
|
|
6479
|
+
const setConfig2 = useCallback12((config) => {
|
|
6437
6480
|
setEnvState((prev) => ({
|
|
6438
6481
|
...prev,
|
|
6439
6482
|
config
|
|
6440
6483
|
}));
|
|
6441
6484
|
}, []);
|
|
6442
|
-
const setEnvFile2 =
|
|
6485
|
+
const setEnvFile2 = useCallback12((envFile) => {
|
|
6443
6486
|
setEnvState((prev) => ({
|
|
6444
6487
|
...prev,
|
|
6445
6488
|
envFile
|
|
@@ -7345,9 +7388,9 @@ var BaseModel = class {
|
|
|
7345
7388
|
};
|
|
7346
7389
|
|
|
7347
7390
|
// src/hooks/model/use-model.ts
|
|
7348
|
-
import { useCallback as
|
|
7391
|
+
import { useCallback as useCallback13 } from "react";
|
|
7349
7392
|
var useModel = () => {
|
|
7350
|
-
const initModel =
|
|
7393
|
+
const initModel = useCallback13((modelData) => {
|
|
7351
7394
|
switch (modelData?.name) {
|
|
7352
7395
|
default:
|
|
7353
7396
|
return new BaseModel(modelData);
|
|
@@ -8357,35 +8400,11 @@ var useGetProductImage = () => {
|
|
|
8357
8400
|
};
|
|
8358
8401
|
var use_get_product_image_default = useGetProductImage;
|
|
8359
8402
|
|
|
8360
|
-
// src/hooks/view/use-add-entity.ts
|
|
8361
|
-
import { useMutation as useMutation66 } from "@tanstack/react-query";
|
|
8362
|
-
var useAddEntity = () => {
|
|
8363
|
-
const { addEntity } = useViewService();
|
|
8364
|
-
return useMutation66({
|
|
8365
|
-
mutationFn: ({
|
|
8366
|
-
model,
|
|
8367
|
-
values,
|
|
8368
|
-
xNode,
|
|
8369
|
-
service,
|
|
8370
|
-
isCreateEndpoint = false
|
|
8371
|
-
}) => {
|
|
8372
|
-
return addEntity({
|
|
8373
|
-
model,
|
|
8374
|
-
values,
|
|
8375
|
-
xNode,
|
|
8376
|
-
service,
|
|
8377
|
-
isCreateEndpoint
|
|
8378
|
-
});
|
|
8379
|
-
}
|
|
8380
|
-
});
|
|
8381
|
-
};
|
|
8382
|
-
var use_add_entity_default = useAddEntity;
|
|
8383
|
-
|
|
8384
8403
|
// src/hooks/view/use-check-payment.ts
|
|
8385
|
-
import { useMutation as
|
|
8404
|
+
import { useMutation as useMutation66 } from "@tanstack/react-query";
|
|
8386
8405
|
var useCheckPayment = () => {
|
|
8387
8406
|
const { checkPayment } = useViewService();
|
|
8388
|
-
return
|
|
8407
|
+
return useMutation66({
|
|
8389
8408
|
mutationFn: ({
|
|
8390
8409
|
model,
|
|
8391
8410
|
ids,
|
|
@@ -8406,10 +8425,10 @@ var useCheckPayment = () => {
|
|
|
8406
8425
|
var use_check_payment_default = useCheckPayment;
|
|
8407
8426
|
|
|
8408
8427
|
// src/hooks/view/use-handle-close-session.ts
|
|
8409
|
-
import { useMutation as
|
|
8428
|
+
import { useMutation as useMutation67 } from "@tanstack/react-query";
|
|
8410
8429
|
var useHandleCloseSession = () => {
|
|
8411
8430
|
const { handleCloseSession } = useViewService();
|
|
8412
|
-
return
|
|
8431
|
+
return useMutation67({
|
|
8413
8432
|
mutationFn: ({
|
|
8414
8433
|
model,
|
|
8415
8434
|
ids,
|
|
@@ -8430,10 +8449,10 @@ var useHandleCloseSession = () => {
|
|
|
8430
8449
|
var use_handle_close_session_default = useHandleCloseSession;
|
|
8431
8450
|
|
|
8432
8451
|
// src/hooks/view/use-handle-closing-detail-session.ts
|
|
8433
|
-
import { useMutation as
|
|
8452
|
+
import { useMutation as useMutation68 } from "@tanstack/react-query";
|
|
8434
8453
|
var useHandleClosingDetailSession = () => {
|
|
8435
8454
|
const { handleClosingDetailSession } = useViewService();
|
|
8436
|
-
return
|
|
8455
|
+
return useMutation68({
|
|
8437
8456
|
mutationFn: ({
|
|
8438
8457
|
model,
|
|
8439
8458
|
ids,
|
|
@@ -8456,10 +8475,10 @@ var useHandleClosingDetailSession = () => {
|
|
|
8456
8475
|
var use_handle_closing_detail_session_default = useHandleClosingDetailSession;
|
|
8457
8476
|
|
|
8458
8477
|
// src/hooks/view/use-create-pos-config.ts
|
|
8459
|
-
import { useMutation as
|
|
8478
|
+
import { useMutation as useMutation69 } from "@tanstack/react-query";
|
|
8460
8479
|
var useCreatePosConfig = () => {
|
|
8461
8480
|
const { createPosConfig } = useViewService();
|
|
8462
|
-
return
|
|
8481
|
+
return useMutation69({
|
|
8463
8482
|
mutationFn: ({
|
|
8464
8483
|
model,
|
|
8465
8484
|
name,
|
|
@@ -8480,10 +8499,10 @@ var useCreatePosConfig = () => {
|
|
|
8480
8499
|
var use_create_pos_config_default = useCreatePosConfig;
|
|
8481
8500
|
|
|
8482
8501
|
// src/hooks/view/use-search-journal.ts
|
|
8483
|
-
import { useMutation as
|
|
8502
|
+
import { useMutation as useMutation70 } from "@tanstack/react-query";
|
|
8484
8503
|
var useSearchJournal = () => {
|
|
8485
8504
|
const { searchJournal } = useViewService();
|
|
8486
|
-
return
|
|
8505
|
+
return useMutation70({
|
|
8487
8506
|
mutationFn: ({
|
|
8488
8507
|
model,
|
|
8489
8508
|
method,
|
|
@@ -8506,10 +8525,10 @@ var useSearchJournal = () => {
|
|
|
8506
8525
|
var use_search_journal_default = useSearchJournal;
|
|
8507
8526
|
|
|
8508
8527
|
// src/hooks/view/useGetPreparaionDisplayData.ts
|
|
8509
|
-
import { useMutation as
|
|
8528
|
+
import { useMutation as useMutation71 } from "@tanstack/react-query";
|
|
8510
8529
|
var useGetPreparationDisplayData = () => {
|
|
8511
8530
|
const { getPreparationDisplayData } = useViewService();
|
|
8512
|
-
return
|
|
8531
|
+
return useMutation71({
|
|
8513
8532
|
mutationFn: ({
|
|
8514
8533
|
ids,
|
|
8515
8534
|
service,
|
|
@@ -8528,10 +8547,10 @@ var useGetPreparationDisplayData = () => {
|
|
|
8528
8547
|
var useGetPreparaionDisplayData_default = useGetPreparationDisplayData;
|
|
8529
8548
|
|
|
8530
8549
|
// src/hooks/view/useChangeOrderPreparaionState.ts
|
|
8531
|
-
import { useMutation as
|
|
8550
|
+
import { useMutation as useMutation72 } from "@tanstack/react-query";
|
|
8532
8551
|
var useChangeOrderPreparationState = () => {
|
|
8533
8552
|
const { changeOrderPreparaionState } = useViewService();
|
|
8534
|
-
return
|
|
8553
|
+
return useMutation72({
|
|
8535
8554
|
mutationFn: ({
|
|
8536
8555
|
orderId,
|
|
8537
8556
|
stageId,
|
|
@@ -8552,10 +8571,10 @@ var useChangeOrderPreparationState = () => {
|
|
|
8552
8571
|
var useChangeOrderPreparaionState_default = useChangeOrderPreparationState;
|
|
8553
8572
|
|
|
8554
8573
|
// src/hooks/view/use-update-order-status.ts
|
|
8555
|
-
import { useMutation as
|
|
8574
|
+
import { useMutation as useMutation73 } from "@tanstack/react-query";
|
|
8556
8575
|
var useUpdateOrderStatus = () => {
|
|
8557
8576
|
const { updateOrderStatus } = useViewService();
|
|
8558
|
-
return
|
|
8577
|
+
return useMutation73({
|
|
8559
8578
|
mutationFn: ({
|
|
8560
8579
|
orderId,
|
|
8561
8580
|
state,
|
|
@@ -8574,10 +8593,10 @@ var useUpdateOrderStatus = () => {
|
|
|
8574
8593
|
var use_update_order_status_default = useUpdateOrderStatus;
|
|
8575
8594
|
|
|
8576
8595
|
// src/hooks/view/use-process-order.ts
|
|
8577
|
-
import { useMutation as
|
|
8596
|
+
import { useMutation as useMutation74 } from "@tanstack/react-query";
|
|
8578
8597
|
var useProcessOrder = () => {
|
|
8579
8598
|
const { processOrder } = useViewService();
|
|
8580
|
-
return
|
|
8599
|
+
return useMutation74({
|
|
8581
8600
|
mutationFn: ({
|
|
8582
8601
|
orderId,
|
|
8583
8602
|
xNode,
|
|
@@ -8592,10 +8611,10 @@ var useProcessOrder = () => {
|
|
|
8592
8611
|
var use_process_order_default = useProcessOrder;
|
|
8593
8612
|
|
|
8594
8613
|
// src/hooks/view/use-generate-payment-qr-info.ts
|
|
8595
|
-
import { useMutation as
|
|
8614
|
+
import { useMutation as useMutation75 } from "@tanstack/react-query";
|
|
8596
8615
|
var useGeneratePaymentQrInfo = () => {
|
|
8597
8616
|
const { generatePaymentQRInfo } = useViewService();
|
|
8598
|
-
return
|
|
8617
|
+
return useMutation75({
|
|
8599
8618
|
mutationFn: ({
|
|
8600
8619
|
orderId,
|
|
8601
8620
|
amount,
|
|
@@ -8616,10 +8635,10 @@ var useGeneratePaymentQrInfo = () => {
|
|
|
8616
8635
|
var use_generate_payment_qr_info_default = useGeneratePaymentQrInfo;
|
|
8617
8636
|
|
|
8618
8637
|
// src/hooks/view/use-save-pin-code.ts
|
|
8619
|
-
import { useMutation as
|
|
8638
|
+
import { useMutation as useMutation76 } from "@tanstack/react-query";
|
|
8620
8639
|
var useSavePinCode = () => {
|
|
8621
8640
|
const { savePinCode } = useViewService();
|
|
8622
|
-
return
|
|
8641
|
+
return useMutation76({
|
|
8623
8642
|
mutationFn: ({
|
|
8624
8643
|
serialNumber,
|
|
8625
8644
|
pinCode,
|
|
@@ -8638,10 +8657,10 @@ var useSavePinCode = () => {
|
|
|
8638
8657
|
var use_save_pin_code_default = useSavePinCode;
|
|
8639
8658
|
|
|
8640
8659
|
// src/hooks/view/use-get-pin-code.ts
|
|
8641
|
-
import { useMutation as
|
|
8660
|
+
import { useMutation as useMutation77 } from "@tanstack/react-query";
|
|
8642
8661
|
var useGetPinCode = () => {
|
|
8643
8662
|
const { getPinCode } = useViewService();
|
|
8644
|
-
return
|
|
8663
|
+
return useMutation77({
|
|
8645
8664
|
mutationFn: ({
|
|
8646
8665
|
serialNumber,
|
|
8647
8666
|
xNode,
|
|
@@ -8679,10 +8698,10 @@ var useGetNotifications = ({
|
|
|
8679
8698
|
var use_get_notifications_default = useGetNotifications;
|
|
8680
8699
|
|
|
8681
8700
|
// src/hooks/view/use-get-version.ts
|
|
8682
|
-
import { useMutation as
|
|
8701
|
+
import { useMutation as useMutation78 } from "@tanstack/react-query";
|
|
8683
8702
|
var useGetVersion = () => {
|
|
8684
8703
|
const { getVersion } = useViewService();
|
|
8685
|
-
return
|
|
8704
|
+
return useMutation78({
|
|
8686
8705
|
mutationFn: () => {
|
|
8687
8706
|
return getVersion();
|
|
8688
8707
|
}
|
|
@@ -8691,10 +8710,10 @@ var useGetVersion = () => {
|
|
|
8691
8710
|
var use_get_version_default = useGetVersion;
|
|
8692
8711
|
|
|
8693
8712
|
// src/hooks/view/use-create-e-invoice.ts
|
|
8694
|
-
import { useMutation as
|
|
8713
|
+
import { useMutation as useMutation79 } from "@tanstack/react-query";
|
|
8695
8714
|
var useCreateEInvoice = () => {
|
|
8696
8715
|
const { createEInvoice } = useViewService();
|
|
8697
|
-
return
|
|
8716
|
+
return useMutation79({
|
|
8698
8717
|
mutationFn: ({
|
|
8699
8718
|
service,
|
|
8700
8719
|
xNode,
|
|
@@ -8715,10 +8734,10 @@ var useCreateEInvoice = () => {
|
|
|
8715
8734
|
var use_create_e_invoice_default = useCreateEInvoice;
|
|
8716
8735
|
|
|
8717
8736
|
// src/hooks/view/use-get-current-user.ts
|
|
8718
|
-
import { useMutation as
|
|
8737
|
+
import { useMutation as useMutation80 } from "@tanstack/react-query";
|
|
8719
8738
|
var useGetCurrentUser = () => {
|
|
8720
8739
|
const { getCurrentUser } = useViewService();
|
|
8721
|
-
return
|
|
8740
|
+
return useMutation80({
|
|
8722
8741
|
mutationFn: ({
|
|
8723
8742
|
service,
|
|
8724
8743
|
xNode,
|
|
@@ -8732,10 +8751,10 @@ var useGetCurrentUser = () => {
|
|
|
8732
8751
|
var use_get_current_user_default = useGetCurrentUser;
|
|
8733
8752
|
|
|
8734
8753
|
// src/hooks/view/use-get-ward.ts
|
|
8735
|
-
import { useMutation as
|
|
8754
|
+
import { useMutation as useMutation81 } from "@tanstack/react-query";
|
|
8736
8755
|
var useGetWard = () => {
|
|
8737
8756
|
const { getWard } = useViewService();
|
|
8738
|
-
return
|
|
8757
|
+
return useMutation81({
|
|
8739
8758
|
mutationFn: ({
|
|
8740
8759
|
service,
|
|
8741
8760
|
xNode,
|
|
@@ -8752,10 +8771,10 @@ var useGetWard = () => {
|
|
|
8752
8771
|
var use_get_ward_default = useGetWard;
|
|
8753
8772
|
|
|
8754
8773
|
// src/hooks/view/use-get-city.ts
|
|
8755
|
-
import { useMutation as
|
|
8774
|
+
import { useMutation as useMutation82 } from "@tanstack/react-query";
|
|
8756
8775
|
var useGetCity = () => {
|
|
8757
8776
|
const { getCity } = useViewService();
|
|
8758
|
-
return
|
|
8777
|
+
return useMutation82({
|
|
8759
8778
|
mutationFn: ({
|
|
8760
8779
|
service,
|
|
8761
8780
|
xNode,
|
|
@@ -8774,10 +8793,10 @@ var useGetCity = () => {
|
|
|
8774
8793
|
var use_get_city_default = useGetCity;
|
|
8775
8794
|
|
|
8776
8795
|
// src/hooks/view/use-get-country.ts
|
|
8777
|
-
import { useMutation as
|
|
8796
|
+
import { useMutation as useMutation83 } from "@tanstack/react-query";
|
|
8778
8797
|
var useGetCountry = () => {
|
|
8779
8798
|
const { getCountry } = useViewService();
|
|
8780
|
-
return
|
|
8799
|
+
return useMutation83({
|
|
8781
8800
|
mutationFn: ({
|
|
8782
8801
|
service,
|
|
8783
8802
|
xNode,
|
|
@@ -8795,6 +8814,28 @@ var useGetCountry = () => {
|
|
|
8795
8814
|
};
|
|
8796
8815
|
var use_get_country_default = useGetCountry;
|
|
8797
8816
|
|
|
8817
|
+
// src/hooks/view/use-get-partner-title.ts
|
|
8818
|
+
import { useMutation as useMutation84 } from "@tanstack/react-query";
|
|
8819
|
+
var useGetPartnerTitle = () => {
|
|
8820
|
+
const { getPartnerTitle } = useViewService();
|
|
8821
|
+
return useMutation84({
|
|
8822
|
+
mutationFn: ({
|
|
8823
|
+
service,
|
|
8824
|
+
xNode,
|
|
8825
|
+
kwargs,
|
|
8826
|
+
withContext
|
|
8827
|
+
}) => {
|
|
8828
|
+
return getPartnerTitle({
|
|
8829
|
+
service,
|
|
8830
|
+
xNode,
|
|
8831
|
+
kwargs,
|
|
8832
|
+
withContext
|
|
8833
|
+
});
|
|
8834
|
+
}
|
|
8835
|
+
});
|
|
8836
|
+
};
|
|
8837
|
+
var use_get_partner_title_default = useGetPartnerTitle;
|
|
8838
|
+
|
|
8798
8839
|
// src/hooks/chart/use-read-group.ts
|
|
8799
8840
|
import { useQuery as useQuery24 } from "@tanstack/react-query";
|
|
8800
8841
|
var useReadGroup = (services, xNode, body, enabled) => {
|
|
@@ -8831,6 +8872,16 @@ var useGetDataChart = (services, xNode, body, enabled, path, method, queryKey) =
|
|
|
8831
8872
|
};
|
|
8832
8873
|
var use_get_data_chart_default = useGetDataChart;
|
|
8833
8874
|
|
|
8875
|
+
// src/hooks/pos/use-add-entity.ts
|
|
8876
|
+
import { useMutation as useMutation85 } from "@tanstack/react-query";
|
|
8877
|
+
var useAddEntity = () => {
|
|
8878
|
+
const { addEntity } = usePosService();
|
|
8879
|
+
return useMutation85({
|
|
8880
|
+
mutationFn: addEntity
|
|
8881
|
+
});
|
|
8882
|
+
};
|
|
8883
|
+
var use_add_entity_default = useAddEntity;
|
|
8884
|
+
|
|
8834
8885
|
// src/provider/service-provider.tsx
|
|
8835
8886
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
8836
8887
|
var ServiceContext = createContext2(null);
|
|
@@ -8948,7 +8999,8 @@ var ServiceProvider = ({
|
|
|
8948
8999
|
useGetCurrentUser: use_get_current_user_default,
|
|
8949
9000
|
useGetCity: use_get_city_default,
|
|
8950
9001
|
useGetWard: use_get_ward_default,
|
|
8951
|
-
useGetCountry: use_get_country_default
|
|
9002
|
+
useGetCountry: use_get_country_default,
|
|
9003
|
+
useGetPartnerTitle: use_get_partner_title_default
|
|
8952
9004
|
};
|
|
8953
9005
|
return /* @__PURE__ */ jsx6(ServiceContext.Provider, { value: services, children });
|
|
8954
9006
|
};
|
package/dist/services.d.mts
CHANGED
|
@@ -431,13 +431,6 @@ declare function useViewService(): {
|
|
|
431
431
|
xNode?: string;
|
|
432
432
|
searchParams?: Record<string, string | number | boolean>;
|
|
433
433
|
}) => any;
|
|
434
|
-
addEntity: ({ model, values, xNode, service, isCreateEndpoint, }: {
|
|
435
|
-
model: string;
|
|
436
|
-
values: any;
|
|
437
|
-
service?: string;
|
|
438
|
-
xNode?: string;
|
|
439
|
-
isCreateEndpoint?: boolean;
|
|
440
|
-
}) => any;
|
|
441
434
|
checkPayment: ({ model, ids, withContext, xNode, service, }: {
|
|
442
435
|
model: string;
|
|
443
436
|
ids: any;
|
|
@@ -552,6 +545,12 @@ declare function useViewService(): {
|
|
|
552
545
|
xNode?: string;
|
|
553
546
|
kwargs: any;
|
|
554
547
|
}) => Promise<any>;
|
|
548
|
+
getPartnerTitle: ({ service, xNode, kwargs, withContext, }: {
|
|
549
|
+
service?: string;
|
|
550
|
+
xNode?: string;
|
|
551
|
+
kwargs: any;
|
|
552
|
+
withContext?: any;
|
|
553
|
+
}) => Promise<any>;
|
|
555
554
|
};
|
|
556
555
|
|
|
557
556
|
declare function useDashboardService(): {
|
package/dist/services.d.ts
CHANGED
|
@@ -431,13 +431,6 @@ declare function useViewService(): {
|
|
|
431
431
|
xNode?: string;
|
|
432
432
|
searchParams?: Record<string, string | number | boolean>;
|
|
433
433
|
}) => any;
|
|
434
|
-
addEntity: ({ model, values, xNode, service, isCreateEndpoint, }: {
|
|
435
|
-
model: string;
|
|
436
|
-
values: any;
|
|
437
|
-
service?: string;
|
|
438
|
-
xNode?: string;
|
|
439
|
-
isCreateEndpoint?: boolean;
|
|
440
|
-
}) => any;
|
|
441
434
|
checkPayment: ({ model, ids, withContext, xNode, service, }: {
|
|
442
435
|
model: string;
|
|
443
436
|
ids: any;
|
|
@@ -552,6 +545,12 @@ declare function useViewService(): {
|
|
|
552
545
|
xNode?: string;
|
|
553
546
|
kwargs: any;
|
|
554
547
|
}) => Promise<any>;
|
|
548
|
+
getPartnerTitle: ({ service, xNode, kwargs, withContext, }: {
|
|
549
|
+
service?: string;
|
|
550
|
+
xNode?: string;
|
|
551
|
+
kwargs: any;
|
|
552
|
+
withContext?: any;
|
|
553
|
+
}) => Promise<any>;
|
|
555
554
|
};
|
|
556
555
|
|
|
557
556
|
declare function useDashboardService(): {
|