@fctc/interface-logic 3.5.3 → 3.5.6
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 +6 -2
- package/dist/constants.d.ts +6 -2
- package/dist/constants.js +4 -0
- package/dist/constants.mjs +4 -0
- package/dist/hooks.d.mts +6 -646
- package/dist/hooks.d.ts +6 -646
- package/dist/hooks.js +142 -1
- package/dist/hooks.mjs +139 -1
- package/dist/provider.d.mts +3 -1
- package/dist/provider.d.ts +3 -1
- package/dist/provider.js +126 -23
- package/dist/provider.mjs +115 -12
- package/dist/services.d.mts +20 -1
- package/dist/services.d.ts +20 -1
- package/dist/services.js +89 -1
- package/dist/services.mjs +88 -1
- package/dist/use-get-pin-code-BJKKezWh.d.mts +662 -0
- package/dist/use-get-pin-code-CGkMoRxA.d.ts +662 -0
- package/package.json +1 -1
package/dist/services.mjs
CHANGED
|
@@ -39,6 +39,9 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
39
39
|
UriConstants2["EMENU_AUTH_TOKEN"] = "/emenu/auth/token";
|
|
40
40
|
UriConstants2["POS_ORDER_STATUS"] = "/pos-order/status";
|
|
41
41
|
UriConstants2["PAYMENT_QR"] = "/payment/qr";
|
|
42
|
+
UriConstants2["POS_DEVICE_PIN"] = "/pos_device/pin";
|
|
43
|
+
UriConstants2["GET_PIN_CODE"] = "/pos_device/get_pin_code";
|
|
44
|
+
UriConstants2["READ_GROUP"] = "read_group";
|
|
42
45
|
return UriConstants2;
|
|
43
46
|
})(UriConstants || {});
|
|
44
47
|
|
|
@@ -3113,6 +3116,15 @@ import { useMutation as useMutation74 } from "@tanstack/react-query";
|
|
|
3113
3116
|
// src/hooks/view/use-generate-payment-qr-info.ts
|
|
3114
3117
|
import { useMutation as useMutation75 } from "@tanstack/react-query";
|
|
3115
3118
|
|
|
3119
|
+
// src/hooks/view/use-save-pin-code.ts
|
|
3120
|
+
import { useMutation as useMutation76 } from "@tanstack/react-query";
|
|
3121
|
+
|
|
3122
|
+
// src/hooks/view/use-get-pin-code.ts
|
|
3123
|
+
import { useMutation as useMutation77 } from "@tanstack/react-query";
|
|
3124
|
+
|
|
3125
|
+
// src/hooks/chart/use-get-pie-chart.ts
|
|
3126
|
+
import { useQuery as useQuery24 } from "@tanstack/react-query";
|
|
3127
|
+
|
|
3116
3128
|
// src/provider/service-provider.tsx
|
|
3117
3129
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
3118
3130
|
var ServiceContext = createContext2(null);
|
|
@@ -5798,6 +5810,54 @@ function useViewService() {
|
|
|
5798
5810
|
},
|
|
5799
5811
|
[env]
|
|
5800
5812
|
);
|
|
5813
|
+
const savePinCode = useCallback10(
|
|
5814
|
+
({
|
|
5815
|
+
serialNumber,
|
|
5816
|
+
pinCode,
|
|
5817
|
+
xNode,
|
|
5818
|
+
service
|
|
5819
|
+
}) => {
|
|
5820
|
+
const jsonData = {
|
|
5821
|
+
serial_number: serialNumber,
|
|
5822
|
+
pin_code: pinCode
|
|
5823
|
+
};
|
|
5824
|
+
return env?.requests.put(
|
|
5825
|
+
"/pos_device/pin" /* POS_DEVICE_PIN */,
|
|
5826
|
+
jsonData,
|
|
5827
|
+
{
|
|
5828
|
+
headers: {
|
|
5829
|
+
"Content-Type": "application/json",
|
|
5830
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5831
|
+
}
|
|
5832
|
+
},
|
|
5833
|
+
service
|
|
5834
|
+
);
|
|
5835
|
+
},
|
|
5836
|
+
[env]
|
|
5837
|
+
);
|
|
5838
|
+
const getPinCode = useCallback10(
|
|
5839
|
+
({
|
|
5840
|
+
serialNumber,
|
|
5841
|
+
xNode,
|
|
5842
|
+
service
|
|
5843
|
+
}) => {
|
|
5844
|
+
const jsonData = {
|
|
5845
|
+
serial_number: serialNumber
|
|
5846
|
+
};
|
|
5847
|
+
return env?.requests.post(
|
|
5848
|
+
"/pos_device/get_pin_code" /* GET_PIN_CODE */,
|
|
5849
|
+
jsonData,
|
|
5850
|
+
{
|
|
5851
|
+
headers: {
|
|
5852
|
+
"Content-Type": "application/json",
|
|
5853
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5854
|
+
}
|
|
5855
|
+
},
|
|
5856
|
+
service
|
|
5857
|
+
);
|
|
5858
|
+
},
|
|
5859
|
+
[env]
|
|
5860
|
+
);
|
|
5801
5861
|
return {
|
|
5802
5862
|
getView,
|
|
5803
5863
|
getMenu,
|
|
@@ -5838,13 +5898,40 @@ function useViewService() {
|
|
|
5838
5898
|
changeOrderPreparaionState,
|
|
5839
5899
|
updateOrderStatus,
|
|
5840
5900
|
processOrder,
|
|
5841
|
-
generatePaymentQRInfo
|
|
5901
|
+
generatePaymentQRInfo,
|
|
5902
|
+
savePinCode,
|
|
5903
|
+
getPinCode
|
|
5842
5904
|
};
|
|
5843
5905
|
}
|
|
5906
|
+
|
|
5907
|
+
// src/services/dashboard-service/index.ts
|
|
5908
|
+
import { useCallback as useCallback11 } from "react";
|
|
5909
|
+
function useDashboardService() {
|
|
5910
|
+
const { env } = useEnv();
|
|
5911
|
+
const pieChart = useCallback11(
|
|
5912
|
+
async ({
|
|
5913
|
+
service,
|
|
5914
|
+
xNode,
|
|
5915
|
+
body
|
|
5916
|
+
}) => {
|
|
5917
|
+
return env.requests.post(
|
|
5918
|
+
"read_group" /* READ_GROUP */,
|
|
5919
|
+
body,
|
|
5920
|
+
{
|
|
5921
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
5922
|
+
},
|
|
5923
|
+
service
|
|
5924
|
+
);
|
|
5925
|
+
},
|
|
5926
|
+
[env]
|
|
5927
|
+
);
|
|
5928
|
+
return { pieChart };
|
|
5929
|
+
}
|
|
5844
5930
|
export {
|
|
5845
5931
|
useActionService,
|
|
5846
5932
|
useAuthService,
|
|
5847
5933
|
useCompanyService,
|
|
5934
|
+
useDashboardService,
|
|
5848
5935
|
useExcelService,
|
|
5849
5936
|
useFormService,
|
|
5850
5937
|
useKanbanService,
|