@fctc/interface-logic 4.2.5 → 4.2.7
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 +130 -129
- package/dist/hooks.d.ts +130 -129
- package/dist/hooks.js +1047 -1206
- package/dist/hooks.mjs +1039 -1198
- package/dist/provider.d.mts +2 -2
- package/dist/provider.d.ts +2 -2
- package/dist/provider.js +1062 -1221
- package/dist/provider.mjs +1049 -1208
- package/dist/services.d.mts +166 -123
- package/dist/services.d.ts +166 -123
- package/dist/services.js +2244 -1973
- package/dist/services.mjs +2237 -1967
- package/package.json +90 -90
package/dist/provider.mjs
CHANGED
|
@@ -4905,38 +4905,15 @@ function useViewService() {
|
|
|
4905
4905
|
},
|
|
4906
4906
|
[env]
|
|
4907
4907
|
);
|
|
4908
|
-
const
|
|
4908
|
+
const getNotifications = useCallback9(
|
|
4909
4909
|
async ({
|
|
4910
|
-
model,
|
|
4911
|
-
args,
|
|
4912
|
-
domain,
|
|
4913
4910
|
service,
|
|
4914
|
-
xNode
|
|
4911
|
+
xNode,
|
|
4912
|
+
body
|
|
4915
4913
|
}) => {
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
args,
|
|
4920
|
-
kwargs: {
|
|
4921
|
-
domain: [domain],
|
|
4922
|
-
specification: {
|
|
4923
|
-
name: {},
|
|
4924
|
-
user_id: {},
|
|
4925
|
-
config_id: {},
|
|
4926
|
-
start_at: {},
|
|
4927
|
-
stop_at: {},
|
|
4928
|
-
sequence_number: {},
|
|
4929
|
-
login_number: {},
|
|
4930
|
-
payment_method_ids: {},
|
|
4931
|
-
state: {},
|
|
4932
|
-
update_stock_at_closing: {},
|
|
4933
|
-
cash_register_balance_start: {}
|
|
4934
|
-
}
|
|
4935
|
-
}
|
|
4936
|
-
};
|
|
4937
|
-
return env?.requests.post(
|
|
4938
|
-
"/call" /* CALL_PATH */,
|
|
4939
|
-
jsonData,
|
|
4914
|
+
return env?.requests?.post(
|
|
4915
|
+
`${"/mail/data" /* GET_NOTIFICATION */}`,
|
|
4916
|
+
body,
|
|
4940
4917
|
{
|
|
4941
4918
|
headers: {
|
|
4942
4919
|
"Content-Type": "application/json",
|
|
@@ -4948,22 +4925,22 @@ function useViewService() {
|
|
|
4948
4925
|
},
|
|
4949
4926
|
[env]
|
|
4950
4927
|
);
|
|
4951
|
-
const
|
|
4952
|
-
({
|
|
4953
|
-
model,
|
|
4954
|
-
domain,
|
|
4955
|
-
values,
|
|
4928
|
+
const getCountry = useCallback9(
|
|
4929
|
+
async ({
|
|
4956
4930
|
service,
|
|
4957
|
-
xNode
|
|
4931
|
+
xNode,
|
|
4932
|
+
ids,
|
|
4933
|
+
kwargs
|
|
4958
4934
|
}) => {
|
|
4959
|
-
const
|
|
4960
|
-
model
|
|
4961
|
-
|
|
4962
|
-
|
|
4935
|
+
const body = {
|
|
4936
|
+
model: "res.country" /* COUNTRY */,
|
|
4937
|
+
ids,
|
|
4938
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
4939
|
+
kwargs
|
|
4963
4940
|
};
|
|
4964
|
-
return env?.requests
|
|
4965
|
-
"/
|
|
4966
|
-
|
|
4941
|
+
return env?.requests?.post(
|
|
4942
|
+
"/call" /* CALL_PATH */,
|
|
4943
|
+
body,
|
|
4967
4944
|
{
|
|
4968
4945
|
headers: {
|
|
4969
4946
|
"Content-Type": "application/json",
|
|
@@ -4975,26 +4952,22 @@ function useViewService() {
|
|
|
4975
4952
|
},
|
|
4976
4953
|
[env]
|
|
4977
4954
|
);
|
|
4978
|
-
const
|
|
4979
|
-
({
|
|
4980
|
-
|
|
4981
|
-
method,
|
|
4982
|
-
ids,
|
|
4983
|
-
args,
|
|
4984
|
-
kwargs,
|
|
4955
|
+
const getCity = useCallback9(
|
|
4956
|
+
async ({
|
|
4957
|
+
service,
|
|
4985
4958
|
xNode,
|
|
4986
|
-
|
|
4959
|
+
ids,
|
|
4960
|
+
kwargs
|
|
4987
4961
|
}) => {
|
|
4988
|
-
const
|
|
4989
|
-
model
|
|
4990
|
-
method,
|
|
4962
|
+
const body = {
|
|
4963
|
+
model: "res.country.state" /* COUNTRY_STATE */,
|
|
4991
4964
|
ids,
|
|
4992
|
-
|
|
4965
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
4993
4966
|
kwargs
|
|
4994
4967
|
};
|
|
4995
|
-
return env?.requests
|
|
4968
|
+
return env?.requests?.post(
|
|
4996
4969
|
"/call" /* CALL_PATH */,
|
|
4997
|
-
|
|
4970
|
+
body,
|
|
4998
4971
|
{
|
|
4999
4972
|
headers: {
|
|
5000
4973
|
"Content-Type": "application/json",
|
|
@@ -5006,24 +4979,20 @@ function useViewService() {
|
|
|
5006
4979
|
},
|
|
5007
4980
|
[env]
|
|
5008
4981
|
);
|
|
5009
|
-
const
|
|
5010
|
-
({
|
|
5011
|
-
|
|
5012
|
-
method,
|
|
5013
|
-
ids,
|
|
5014
|
-
kwargs,
|
|
4982
|
+
const getWard = useCallback9(
|
|
4983
|
+
async ({
|
|
4984
|
+
service,
|
|
5015
4985
|
xNode,
|
|
5016
|
-
|
|
4986
|
+
kwargs
|
|
5017
4987
|
}) => {
|
|
5018
|
-
const
|
|
5019
|
-
model
|
|
5020
|
-
method
|
|
5021
|
-
ids,
|
|
4988
|
+
const body = {
|
|
4989
|
+
model: "res.country.ward" /* COUNTRY_WARD */,
|
|
4990
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
5022
4991
|
kwargs
|
|
5023
4992
|
};
|
|
5024
|
-
return env?.requests
|
|
4993
|
+
return env?.requests?.post(
|
|
5025
4994
|
"/call" /* CALL_PATH */,
|
|
5026
|
-
|
|
4995
|
+
body,
|
|
5027
4996
|
{
|
|
5028
4997
|
headers: {
|
|
5029
4998
|
"Content-Type": "application/json",
|
|
@@ -5035,25 +5004,22 @@ function useViewService() {
|
|
|
5035
5004
|
},
|
|
5036
5005
|
[env]
|
|
5037
5006
|
);
|
|
5038
|
-
const
|
|
5039
|
-
({
|
|
5040
|
-
|
|
5041
|
-
configId,
|
|
5007
|
+
const getPartnerTitle = useCallback9(
|
|
5008
|
+
async ({
|
|
5009
|
+
service,
|
|
5042
5010
|
xNode,
|
|
5043
|
-
|
|
5011
|
+
kwargs,
|
|
5012
|
+
withContext
|
|
5044
5013
|
}) => {
|
|
5045
|
-
const
|
|
5046
|
-
model
|
|
5047
|
-
method: "
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
config_id: configId
|
|
5051
|
-
}
|
|
5052
|
-
]
|
|
5014
|
+
const body = {
|
|
5015
|
+
model: "res.partner.title" /* RES_PARTNER_TITLE */,
|
|
5016
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
5017
|
+
kwargs,
|
|
5018
|
+
with_context: withContext
|
|
5053
5019
|
};
|
|
5054
|
-
return env?.requests
|
|
5020
|
+
return env?.requests?.post(
|
|
5055
5021
|
"/call" /* CALL_PATH */,
|
|
5056
|
-
|
|
5022
|
+
body,
|
|
5057
5023
|
{
|
|
5058
5024
|
headers: {
|
|
5059
5025
|
"Content-Type": "application/json",
|
|
@@ -5065,47 +5031,115 @@ function useViewService() {
|
|
|
5065
5031
|
},
|
|
5066
5032
|
[env]
|
|
5067
5033
|
);
|
|
5068
|
-
|
|
5069
|
-
|
|
5034
|
+
return {
|
|
5035
|
+
getView,
|
|
5036
|
+
getMenu,
|
|
5037
|
+
getActionDetail,
|
|
5038
|
+
getResequence,
|
|
5039
|
+
getSelectionItem,
|
|
5040
|
+
loadMessages,
|
|
5041
|
+
getVersion,
|
|
5042
|
+
grantAccess,
|
|
5043
|
+
removeTotpSetUp,
|
|
5044
|
+
requestSetupTotp,
|
|
5045
|
+
settingsWebRead2fa,
|
|
5046
|
+
signInSSO,
|
|
5047
|
+
verify2FA,
|
|
5048
|
+
get2FAMethods,
|
|
5049
|
+
verifyTotp,
|
|
5050
|
+
getNotifications,
|
|
5051
|
+
getCountry,
|
|
5052
|
+
getCity,
|
|
5053
|
+
getWard,
|
|
5054
|
+
getPartnerTitle
|
|
5055
|
+
};
|
|
5056
|
+
}
|
|
5057
|
+
|
|
5058
|
+
// src/services/dashboard-service/index.ts
|
|
5059
|
+
import { useCallback as useCallback10 } from "react";
|
|
5060
|
+
function useDashboardService() {
|
|
5061
|
+
const { env } = useEnv();
|
|
5062
|
+
const readGroup = useCallback10(
|
|
5063
|
+
async ({
|
|
5064
|
+
service,
|
|
5065
|
+
xNode,
|
|
5066
|
+
body
|
|
5067
|
+
}) => {
|
|
5068
|
+
return env.requests.post(
|
|
5069
|
+
"/read_group" /* READ_GROUP */,
|
|
5070
|
+
body,
|
|
5071
|
+
{
|
|
5072
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
5073
|
+
},
|
|
5074
|
+
service
|
|
5075
|
+
);
|
|
5076
|
+
},
|
|
5077
|
+
[env]
|
|
5078
|
+
);
|
|
5079
|
+
const getDataChart = useCallback10(
|
|
5080
|
+
async ({
|
|
5081
|
+
service,
|
|
5082
|
+
xNode,
|
|
5083
|
+
body,
|
|
5084
|
+
path,
|
|
5085
|
+
method = "POST"
|
|
5086
|
+
}) => {
|
|
5087
|
+
const headers = {
|
|
5088
|
+
"Content-Type": "application/json",
|
|
5089
|
+
"X-Node": xNode
|
|
5090
|
+
};
|
|
5091
|
+
if (method === "GET") {
|
|
5092
|
+
return env.requests.get(
|
|
5093
|
+
path,
|
|
5094
|
+
{
|
|
5095
|
+
headers
|
|
5096
|
+
},
|
|
5097
|
+
service
|
|
5098
|
+
);
|
|
5099
|
+
}
|
|
5100
|
+
return env.requests.post(
|
|
5101
|
+
path,
|
|
5102
|
+
body,
|
|
5103
|
+
{
|
|
5104
|
+
headers
|
|
5105
|
+
},
|
|
5106
|
+
service
|
|
5107
|
+
);
|
|
5108
|
+
},
|
|
5109
|
+
[env]
|
|
5110
|
+
);
|
|
5111
|
+
return { readGroup, getDataChart };
|
|
5112
|
+
}
|
|
5113
|
+
|
|
5114
|
+
// src/services/pos-service/get-a-session.ts
|
|
5115
|
+
import { useCallback as useCallback11 } from "react";
|
|
5116
|
+
var getASessionService = (env) => {
|
|
5117
|
+
const getASession = useCallback11(
|
|
5118
|
+
async ({
|
|
5070
5119
|
model,
|
|
5071
5120
|
args,
|
|
5072
5121
|
domain,
|
|
5073
|
-
|
|
5074
|
-
|
|
5122
|
+
service,
|
|
5123
|
+
xNode
|
|
5075
5124
|
}) => {
|
|
5076
5125
|
const jsonData = {
|
|
5077
5126
|
model,
|
|
5078
5127
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
5079
5128
|
args,
|
|
5080
5129
|
kwargs: {
|
|
5081
|
-
domain,
|
|
5130
|
+
domain: [domain],
|
|
5082
5131
|
specification: {
|
|
5083
|
-
cash_control: {},
|
|
5084
|
-
current_session_id: {
|
|
5085
|
-
fields: {
|
|
5086
|
-
display_name: {}
|
|
5087
|
-
}
|
|
5088
|
-
},
|
|
5089
|
-
current_session_state: {},
|
|
5090
|
-
pos_session_state: {},
|
|
5091
|
-
pos_session_duration: {},
|
|
5092
|
-
currency_id: {
|
|
5093
|
-
fields: {
|
|
5094
|
-
display_name: {}
|
|
5095
|
-
}
|
|
5096
|
-
},
|
|
5097
5132
|
name: {},
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
},
|
|
5107
|
-
|
|
5108
|
-
module_pos_restaurant: {}
|
|
5133
|
+
user_id: {},
|
|
5134
|
+
config_id: {},
|
|
5135
|
+
start_at: {},
|
|
5136
|
+
stop_at: {},
|
|
5137
|
+
sequence_number: {},
|
|
5138
|
+
login_number: {},
|
|
5139
|
+
payment_method_ids: {},
|
|
5140
|
+
state: {},
|
|
5141
|
+
update_stock_at_closing: {},
|
|
5142
|
+
cash_register_balance_start: {}
|
|
5109
5143
|
}
|
|
5110
5144
|
}
|
|
5111
5145
|
};
|
|
@@ -5123,20 +5157,28 @@ function useViewService() {
|
|
|
5123
5157
|
},
|
|
5124
5158
|
[env]
|
|
5125
5159
|
);
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5160
|
+
return {
|
|
5161
|
+
getASession
|
|
5162
|
+
};
|
|
5163
|
+
};
|
|
5164
|
+
|
|
5165
|
+
// src/services/pos-service/add-entity.ts
|
|
5166
|
+
import { useCallback as useCallback12 } from "react";
|
|
5167
|
+
var addEntityService = (env) => {
|
|
5168
|
+
const addEntity = useCallback12(
|
|
5169
|
+
({
|
|
5170
|
+
model,
|
|
5171
|
+
values,
|
|
5130
5172
|
xNode,
|
|
5131
|
-
service
|
|
5173
|
+
service,
|
|
5174
|
+
isCreateEndpoint = false
|
|
5132
5175
|
}) => {
|
|
5133
5176
|
const jsonData = {
|
|
5134
5177
|
model,
|
|
5135
|
-
|
|
5136
|
-
args
|
|
5178
|
+
values
|
|
5137
5179
|
};
|
|
5138
5180
|
return env?.requests.post(
|
|
5139
|
-
"/call" /* CALL_PATH */,
|
|
5181
|
+
isCreateEndpoint ? "/create" /* CREATE_PATH */ : "/call" /* CALL_PATH */,
|
|
5140
5182
|
jsonData,
|
|
5141
5183
|
{
|
|
5142
5184
|
headers: {
|
|
@@ -5149,25 +5191,30 @@ function useViewService() {
|
|
|
5149
5191
|
},
|
|
5150
5192
|
[env]
|
|
5151
5193
|
);
|
|
5152
|
-
|
|
5194
|
+
return {
|
|
5195
|
+
addEntity
|
|
5196
|
+
};
|
|
5197
|
+
};
|
|
5198
|
+
|
|
5199
|
+
// src/services/pos-service/change-order-preparation-state.ts
|
|
5200
|
+
import { useCallback as useCallback13 } from "react";
|
|
5201
|
+
var changOrderPreparationStateService = (env) => {
|
|
5202
|
+
const changeOrderPreparationState = useCallback13(
|
|
5153
5203
|
({
|
|
5154
|
-
|
|
5155
|
-
|
|
5204
|
+
orderId,
|
|
5205
|
+
stageId,
|
|
5206
|
+
preparationDisplayId,
|
|
5156
5207
|
xNode,
|
|
5157
|
-
service
|
|
5158
|
-
specification,
|
|
5159
|
-
offset,
|
|
5160
|
-
limit
|
|
5208
|
+
service
|
|
5161
5209
|
}) => {
|
|
5162
5210
|
const jsonData = {
|
|
5163
|
-
model
|
|
5164
|
-
method: "
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
})
|
|
5211
|
+
model: "pos_preparation_display.order" /* POS_PREPARATION_ORDER */,
|
|
5212
|
+
method: "change_order_stage" /* CHANGE_ORDER_STAGE */,
|
|
5213
|
+
ids: orderId,
|
|
5214
|
+
kwargs: {
|
|
5215
|
+
stage_id: stageId,
|
|
5216
|
+
preparation_display_id: preparationDisplayId
|
|
5217
|
+
}
|
|
5171
5218
|
};
|
|
5172
5219
|
return env?.requests.post(
|
|
5173
5220
|
"/call" /* CALL_PATH */,
|
|
@@ -5183,22 +5230,30 @@ function useViewService() {
|
|
|
5183
5230
|
},
|
|
5184
5231
|
[env]
|
|
5185
5232
|
);
|
|
5186
|
-
|
|
5233
|
+
return {
|
|
5234
|
+
changeOrderPreparationState
|
|
5235
|
+
};
|
|
5236
|
+
};
|
|
5237
|
+
|
|
5238
|
+
// src/services/pos-service/check-payment.ts
|
|
5239
|
+
import { useCallback as useCallback14 } from "react";
|
|
5240
|
+
var checkPaymentService = (env) => {
|
|
5241
|
+
const checkPayment = useCallback14(
|
|
5187
5242
|
({
|
|
5188
5243
|
model,
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
isCreateEndpoint = true,
|
|
5244
|
+
ids,
|
|
5245
|
+
withContext,
|
|
5192
5246
|
xNode,
|
|
5193
5247
|
service
|
|
5194
5248
|
}) => {
|
|
5195
5249
|
const jsonData = {
|
|
5196
5250
|
model,
|
|
5197
|
-
|
|
5198
|
-
|
|
5251
|
+
method: "check" /* CHECK */,
|
|
5252
|
+
ids,
|
|
5253
|
+
with_context: withContext
|
|
5199
5254
|
};
|
|
5200
5255
|
return env?.requests.post(
|
|
5201
|
-
|
|
5256
|
+
"/call" /* CALL_PATH */,
|
|
5202
5257
|
jsonData,
|
|
5203
5258
|
{
|
|
5204
5259
|
headers: {
|
|
@@ -5211,22 +5266,32 @@ function useViewService() {
|
|
|
5211
5266
|
},
|
|
5212
5267
|
[env]
|
|
5213
5268
|
);
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5269
|
+
return {
|
|
5270
|
+
checkPayment
|
|
5271
|
+
};
|
|
5272
|
+
};
|
|
5273
|
+
|
|
5274
|
+
// src/services/pos-service/create-e-invoice.ts
|
|
5275
|
+
import { useCallback as useCallback15 } from "react";
|
|
5276
|
+
var createEInvoiceService = (env) => {
|
|
5277
|
+
const createEInvoice = useCallback15(
|
|
5278
|
+
async ({
|
|
5219
5279
|
service,
|
|
5220
|
-
|
|
5280
|
+
xNode,
|
|
5281
|
+
kwargs,
|
|
5282
|
+
ids,
|
|
5283
|
+
withContext
|
|
5221
5284
|
}) => {
|
|
5222
|
-
const
|
|
5223
|
-
model
|
|
5285
|
+
const body = {
|
|
5286
|
+
model: "pos.order" /* POS_ORDER */,
|
|
5287
|
+
method: "create_e_invoice" /* CREATE_E_INVOICE */,
|
|
5288
|
+
kwargs,
|
|
5224
5289
|
ids,
|
|
5225
|
-
|
|
5290
|
+
with_context: withContext
|
|
5226
5291
|
};
|
|
5227
|
-
return env?.requests
|
|
5228
|
-
"/call" /* CALL_PATH
|
|
5229
|
-
|
|
5292
|
+
return env?.requests?.post(
|
|
5293
|
+
`${"/call" /* CALL_PATH */}`,
|
|
5294
|
+
body,
|
|
5230
5295
|
{
|
|
5231
5296
|
headers: {
|
|
5232
5297
|
"Content-Type": "application/json",
|
|
@@ -5238,32 +5303,28 @@ function useViewService() {
|
|
|
5238
5303
|
},
|
|
5239
5304
|
[env]
|
|
5240
5305
|
);
|
|
5241
|
-
|
|
5306
|
+
return {
|
|
5307
|
+
createEInvoice
|
|
5308
|
+
};
|
|
5309
|
+
};
|
|
5310
|
+
|
|
5311
|
+
// src/services/pos-service/create-entity.ts
|
|
5312
|
+
import { useCallback as useCallback16 } from "react";
|
|
5313
|
+
var createEntityService = (env) => {
|
|
5314
|
+
const createEntity = useCallback16(
|
|
5242
5315
|
({
|
|
5243
5316
|
model,
|
|
5244
|
-
|
|
5317
|
+
args,
|
|
5245
5318
|
xNode,
|
|
5246
|
-
service
|
|
5247
|
-
withContext,
|
|
5248
|
-
modelsToLoad = [],
|
|
5249
|
-
searchParams
|
|
5319
|
+
service
|
|
5250
5320
|
}) => {
|
|
5251
5321
|
const jsonData = {
|
|
5252
5322
|
model,
|
|
5253
|
-
method: "
|
|
5254
|
-
|
|
5255
|
-
with_context: withContext ? withContext : {
|
|
5256
|
-
uid: 37,
|
|
5257
|
-
lang: "vi_VN",
|
|
5258
|
-
tz: "Asia/Saigon"
|
|
5259
|
-
},
|
|
5260
|
-
kwargs: {
|
|
5261
|
-
models_to_load: modelsToLoad
|
|
5262
|
-
}
|
|
5323
|
+
method: "create" /* CREATE */,
|
|
5324
|
+
args
|
|
5263
5325
|
};
|
|
5264
|
-
const url = searchParams ? `${"/call" /* CALL_PATH */}?${toQueryString(searchParams)}` : "/call" /* CALL_PATH */;
|
|
5265
5326
|
return env?.requests.post(
|
|
5266
|
-
|
|
5327
|
+
"/call" /* CALL_PATH */,
|
|
5267
5328
|
jsonData,
|
|
5268
5329
|
{
|
|
5269
5330
|
headers: {
|
|
@@ -5276,21 +5337,31 @@ function useViewService() {
|
|
|
5276
5337
|
},
|
|
5277
5338
|
[env]
|
|
5278
5339
|
);
|
|
5279
|
-
|
|
5340
|
+
return {
|
|
5341
|
+
createEntity
|
|
5342
|
+
};
|
|
5343
|
+
};
|
|
5344
|
+
|
|
5345
|
+
// src/services/pos-service/create-pos-config.ts
|
|
5346
|
+
import { useCallback as useCallback17 } from "react";
|
|
5347
|
+
var createPosConfigService = (env) => {
|
|
5348
|
+
const createPosConfig = useCallback17(
|
|
5280
5349
|
({
|
|
5281
|
-
|
|
5350
|
+
model,
|
|
5351
|
+
name,
|
|
5352
|
+
modulePosRestaurant,
|
|
5282
5353
|
xNode,
|
|
5283
|
-
service
|
|
5284
|
-
withContext
|
|
5354
|
+
service
|
|
5285
5355
|
}) => {
|
|
5286
5356
|
const jsonData = {
|
|
5287
|
-
model
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5357
|
+
model,
|
|
5358
|
+
values: {
|
|
5359
|
+
name,
|
|
5360
|
+
module_pos_restaurant: modulePosRestaurant
|
|
5361
|
+
}
|
|
5291
5362
|
};
|
|
5292
5363
|
return env?.requests.post(
|
|
5293
|
-
"/
|
|
5364
|
+
"/create" /* CREATE_PATH */,
|
|
5294
5365
|
jsonData,
|
|
5295
5366
|
{
|
|
5296
5367
|
headers: {
|
|
@@ -5303,19 +5374,29 @@ function useViewService() {
|
|
|
5303
5374
|
},
|
|
5304
5375
|
[env]
|
|
5305
5376
|
);
|
|
5306
|
-
|
|
5377
|
+
return {
|
|
5378
|
+
createPosConfig
|
|
5379
|
+
};
|
|
5380
|
+
};
|
|
5381
|
+
|
|
5382
|
+
// src/services/pos-service/create-session.ts
|
|
5383
|
+
import { useCallback as useCallback18 } from "react";
|
|
5384
|
+
var createSessionService = (env) => {
|
|
5385
|
+
const createSession = useCallback18(
|
|
5307
5386
|
({
|
|
5308
5387
|
model,
|
|
5309
|
-
|
|
5310
|
-
args,
|
|
5388
|
+
configId,
|
|
5311
5389
|
xNode,
|
|
5312
5390
|
service
|
|
5313
5391
|
}) => {
|
|
5314
5392
|
const jsonData = {
|
|
5315
5393
|
model,
|
|
5316
|
-
method: "
|
|
5317
|
-
|
|
5318
|
-
|
|
5394
|
+
method: "create" /* CREATE */,
|
|
5395
|
+
args: [
|
|
5396
|
+
{
|
|
5397
|
+
config_id: configId
|
|
5398
|
+
}
|
|
5399
|
+
]
|
|
5319
5400
|
};
|
|
5320
5401
|
return env?.requests.post(
|
|
5321
5402
|
"/call" /* CALL_PATH */,
|
|
@@ -5331,21 +5412,26 @@ function useViewService() {
|
|
|
5331
5412
|
},
|
|
5332
5413
|
[env]
|
|
5333
5414
|
);
|
|
5334
|
-
|
|
5415
|
+
return {
|
|
5416
|
+
createSession
|
|
5417
|
+
};
|
|
5418
|
+
};
|
|
5419
|
+
|
|
5420
|
+
// src/services/pos-service/delete-entity.ts
|
|
5421
|
+
import { useCallback as useCallback19 } from "react";
|
|
5422
|
+
var deleteEntityService = (env) => {
|
|
5423
|
+
const deleteEntity = useCallback19(
|
|
5335
5424
|
({
|
|
5336
5425
|
model,
|
|
5337
5426
|
ids,
|
|
5338
|
-
specification,
|
|
5339
5427
|
xNode,
|
|
5340
|
-
service
|
|
5428
|
+
service,
|
|
5429
|
+
method
|
|
5341
5430
|
}) => {
|
|
5342
5431
|
const jsonData = {
|
|
5343
5432
|
model,
|
|
5344
|
-
method: "web_read" /* WEB_READ */,
|
|
5345
5433
|
ids,
|
|
5346
|
-
|
|
5347
|
-
specification
|
|
5348
|
-
}
|
|
5434
|
+
method
|
|
5349
5435
|
};
|
|
5350
5436
|
return env?.requests.post(
|
|
5351
5437
|
"/call" /* CALL_PATH */,
|
|
@@ -5361,27 +5447,29 @@ function useViewService() {
|
|
|
5361
5447
|
},
|
|
5362
5448
|
[env]
|
|
5363
5449
|
);
|
|
5364
|
-
|
|
5450
|
+
return {
|
|
5451
|
+
deleteEntity
|
|
5452
|
+
};
|
|
5453
|
+
};
|
|
5454
|
+
|
|
5455
|
+
// src/services/pos-service/generate-payment-qr-info.ts
|
|
5456
|
+
import { useCallback as useCallback20 } from "react";
|
|
5457
|
+
var generatePaymentQrInfoService = (env) => {
|
|
5458
|
+
const generatePaymentQRInfo = useCallback20(
|
|
5365
5459
|
({
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
offset,
|
|
5370
|
-
domain,
|
|
5460
|
+
orderId,
|
|
5461
|
+
amount,
|
|
5462
|
+
posSessionId,
|
|
5371
5463
|
xNode,
|
|
5372
|
-
service
|
|
5373
|
-
searchParams
|
|
5464
|
+
service
|
|
5374
5465
|
}) => {
|
|
5375
5466
|
const jsonData = {
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
offset,
|
|
5380
|
-
domain
|
|
5467
|
+
order_id: orderId,
|
|
5468
|
+
amount,
|
|
5469
|
+
pos_session_id: posSessionId
|
|
5381
5470
|
};
|
|
5382
|
-
const url = searchParams ? `${"/search_read" /* SEARCH_READ */}?${toQueryString(searchParams)}` : "/search_read" /* SEARCH_READ */;
|
|
5383
5471
|
return env?.requests.post(
|
|
5384
|
-
|
|
5472
|
+
"/payment/qr" /* PAYMENT_QR */,
|
|
5385
5473
|
jsonData,
|
|
5386
5474
|
{
|
|
5387
5475
|
headers: {
|
|
@@ -5394,25 +5482,29 @@ function useViewService() {
|
|
|
5394
5482
|
},
|
|
5395
5483
|
[env]
|
|
5396
5484
|
);
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5485
|
+
return {
|
|
5486
|
+
generatePaymentQRInfo
|
|
5487
|
+
};
|
|
5488
|
+
};
|
|
5489
|
+
|
|
5490
|
+
// src/services/pos-service/get-current-user.ts
|
|
5491
|
+
import { useCallback as useCallback21 } from "react";
|
|
5492
|
+
var getCurrentUserService = (env) => {
|
|
5493
|
+
const getCurrentUser = useCallback21(
|
|
5494
|
+
async ({
|
|
5495
|
+
service,
|
|
5402
5496
|
xNode,
|
|
5403
|
-
|
|
5497
|
+
oauthUid,
|
|
5498
|
+
extraHeaders
|
|
5404
5499
|
}) => {
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
method: "check" /* CHECK */,
|
|
5408
|
-
ids,
|
|
5409
|
-
with_context: withContext
|
|
5410
|
-
};
|
|
5411
|
-
return env?.requests.post(
|
|
5412
|
-
"/call" /* CALL_PATH */,
|
|
5413
|
-
jsonData,
|
|
5500
|
+
return env?.requests?.get(
|
|
5501
|
+
`${"/public/user/info" /* PUBLIC_USER_INFO */}/${oauthUid}`,
|
|
5414
5502
|
{
|
|
5415
|
-
headers: {
|
|
5503
|
+
headers: extraHeaders ? {
|
|
5504
|
+
...extraHeaders,
|
|
5505
|
+
"Content-Type": "application/json",
|
|
5506
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5507
|
+
} : {
|
|
5416
5508
|
"Content-Type": "application/json",
|
|
5417
5509
|
...xNode ? { "X-Node": xNode } : {}
|
|
5418
5510
|
}
|
|
@@ -5422,18 +5514,33 @@ function useViewService() {
|
|
|
5422
5514
|
},
|
|
5423
5515
|
[env]
|
|
5424
5516
|
);
|
|
5425
|
-
|
|
5517
|
+
return {
|
|
5518
|
+
getCurrentUser
|
|
5519
|
+
};
|
|
5520
|
+
};
|
|
5521
|
+
|
|
5522
|
+
// src/services/pos-service/get-list.ts
|
|
5523
|
+
import { useCallback as useCallback22 } from "react";
|
|
5524
|
+
var getListService = (env) => {
|
|
5525
|
+
const getList = useCallback22(
|
|
5426
5526
|
({
|
|
5427
5527
|
model,
|
|
5428
|
-
|
|
5528
|
+
domain,
|
|
5429
5529
|
xNode,
|
|
5430
5530
|
service,
|
|
5431
|
-
|
|
5531
|
+
specification,
|
|
5532
|
+
offset,
|
|
5533
|
+
limit
|
|
5432
5534
|
}) => {
|
|
5433
5535
|
const jsonData = {
|
|
5434
5536
|
model,
|
|
5435
|
-
|
|
5436
|
-
|
|
5537
|
+
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
5538
|
+
kwargs: cleanObject({
|
|
5539
|
+
domain,
|
|
5540
|
+
offset,
|
|
5541
|
+
limit,
|
|
5542
|
+
specification
|
|
5543
|
+
})
|
|
5437
5544
|
};
|
|
5438
5545
|
return env?.requests.post(
|
|
5439
5546
|
"/call" /* CALL_PATH */,
|
|
@@ -5449,20 +5556,29 @@ function useViewService() {
|
|
|
5449
5556
|
},
|
|
5450
5557
|
[env]
|
|
5451
5558
|
);
|
|
5452
|
-
|
|
5559
|
+
return {
|
|
5560
|
+
getList
|
|
5561
|
+
};
|
|
5562
|
+
};
|
|
5563
|
+
|
|
5564
|
+
// src/services/pos-service/get-order-line.ts
|
|
5565
|
+
import { useCallback as useCallback23 } from "react";
|
|
5566
|
+
var getOrderLineService = (env) => {
|
|
5567
|
+
const getOrderLine = useCallback23(
|
|
5453
5568
|
({
|
|
5454
5569
|
model,
|
|
5455
5570
|
ids,
|
|
5456
|
-
|
|
5571
|
+
specification,
|
|
5457
5572
|
xNode,
|
|
5458
|
-
service
|
|
5459
|
-
kwargs
|
|
5573
|
+
service
|
|
5460
5574
|
}) => {
|
|
5461
5575
|
const jsonData = {
|
|
5462
5576
|
model,
|
|
5577
|
+
method: "web_read" /* WEB_READ */,
|
|
5463
5578
|
ids,
|
|
5464
|
-
|
|
5465
|
-
|
|
5579
|
+
kwargs: {
|
|
5580
|
+
specification
|
|
5581
|
+
}
|
|
5466
5582
|
};
|
|
5467
5583
|
return env?.requests.post(
|
|
5468
5584
|
"/call" /* CALL_PATH */,
|
|
@@ -5478,23 +5594,25 @@ function useViewService() {
|
|
|
5478
5594
|
},
|
|
5479
5595
|
[env]
|
|
5480
5596
|
);
|
|
5481
|
-
|
|
5597
|
+
return {
|
|
5598
|
+
getOrderLine
|
|
5599
|
+
};
|
|
5600
|
+
};
|
|
5601
|
+
|
|
5602
|
+
// src/services/pos-service/get-pin-code.ts
|
|
5603
|
+
import { useCallback as useCallback24 } from "react";
|
|
5604
|
+
var getPinCodeService = (env) => {
|
|
5605
|
+
const getPinCode = useCallback24(
|
|
5482
5606
|
({
|
|
5483
|
-
|
|
5484
|
-
name,
|
|
5485
|
-
modulePosRestaurant,
|
|
5607
|
+
serialNumber,
|
|
5486
5608
|
xNode,
|
|
5487
5609
|
service
|
|
5488
5610
|
}) => {
|
|
5489
5611
|
const jsonData = {
|
|
5490
|
-
|
|
5491
|
-
values: {
|
|
5492
|
-
name,
|
|
5493
|
-
module_pos_restaurant: modulePosRestaurant
|
|
5494
|
-
}
|
|
5612
|
+
serial_number: serialNumber
|
|
5495
5613
|
};
|
|
5496
5614
|
return env?.requests.post(
|
|
5497
|
-
"/
|
|
5615
|
+
"/pos_device/get_pin_code" /* GET_PIN_CODE */,
|
|
5498
5616
|
jsonData,
|
|
5499
5617
|
{
|
|
5500
5618
|
headers: {
|
|
@@ -5507,20 +5625,57 @@ function useViewService() {
|
|
|
5507
5625
|
},
|
|
5508
5626
|
[env]
|
|
5509
5627
|
);
|
|
5510
|
-
|
|
5628
|
+
return {
|
|
5629
|
+
getPinCode
|
|
5630
|
+
};
|
|
5631
|
+
};
|
|
5632
|
+
|
|
5633
|
+
// src/services/pos-service/get-pos.ts
|
|
5634
|
+
import { useCallback as useCallback25 } from "react";
|
|
5635
|
+
var getPosService = (env) => {
|
|
5636
|
+
const getPOS = useCallback25(
|
|
5511
5637
|
({
|
|
5512
5638
|
model,
|
|
5513
|
-
method,
|
|
5514
5639
|
args,
|
|
5515
|
-
|
|
5640
|
+
domain,
|
|
5516
5641
|
xNode,
|
|
5517
5642
|
service
|
|
5518
5643
|
}) => {
|
|
5519
5644
|
const jsonData = {
|
|
5520
5645
|
model,
|
|
5521
|
-
method
|
|
5646
|
+
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
5522
5647
|
args,
|
|
5523
|
-
kwargs
|
|
5648
|
+
kwargs: {
|
|
5649
|
+
domain,
|
|
5650
|
+
specification: {
|
|
5651
|
+
cash_control: {},
|
|
5652
|
+
current_session_id: {
|
|
5653
|
+
fields: {
|
|
5654
|
+
display_name: {}
|
|
5655
|
+
}
|
|
5656
|
+
},
|
|
5657
|
+
current_session_state: {},
|
|
5658
|
+
pos_session_state: {},
|
|
5659
|
+
pos_session_duration: {},
|
|
5660
|
+
currency_id: {
|
|
5661
|
+
fields: {
|
|
5662
|
+
display_name: {}
|
|
5663
|
+
}
|
|
5664
|
+
},
|
|
5665
|
+
name: {},
|
|
5666
|
+
pos_session_username: {},
|
|
5667
|
+
last_session_closing_date: {},
|
|
5668
|
+
last_session_closing_cash: {},
|
|
5669
|
+
number_of_rescue_session: {},
|
|
5670
|
+
current_user_id: {
|
|
5671
|
+
fields: {
|
|
5672
|
+
display_name: {}
|
|
5673
|
+
}
|
|
5674
|
+
},
|
|
5675
|
+
customer_display_type: {},
|
|
5676
|
+
module_pos_restaurant: {}
|
|
5677
|
+
}
|
|
5678
|
+
}
|
|
5524
5679
|
};
|
|
5525
5680
|
return env?.requests.post(
|
|
5526
5681
|
"/call" /* CALL_PATH */,
|
|
@@ -5536,22 +5691,26 @@ function useViewService() {
|
|
|
5536
5691
|
},
|
|
5537
5692
|
[env]
|
|
5538
5693
|
);
|
|
5539
|
-
|
|
5694
|
+
return {
|
|
5695
|
+
getPOS
|
|
5696
|
+
};
|
|
5697
|
+
};
|
|
5698
|
+
|
|
5699
|
+
// src/services/pos-service/get-preparation-display-data.ts
|
|
5700
|
+
import { useCallback as useCallback26 } from "react";
|
|
5701
|
+
var getPreparationDisplayDataService = (env) => {
|
|
5702
|
+
const getPreparationDisplayData = useCallback26(
|
|
5540
5703
|
({
|
|
5541
|
-
|
|
5542
|
-
stageId,
|
|
5543
|
-
preparationDisplayId,
|
|
5704
|
+
ids,
|
|
5544
5705
|
xNode,
|
|
5545
|
-
service
|
|
5706
|
+
service,
|
|
5707
|
+
withContext
|
|
5546
5708
|
}) => {
|
|
5547
5709
|
const jsonData = {
|
|
5548
|
-
model: "pos_preparation_display.
|
|
5549
|
-
method: "
|
|
5550
|
-
ids
|
|
5551
|
-
|
|
5552
|
-
stage_id: stageId,
|
|
5553
|
-
preparation_display_id: preparationDisplayId
|
|
5554
|
-
}
|
|
5710
|
+
model: "pos_preparation_display.display" /* POS_PREPARATION_DISPLAY */,
|
|
5711
|
+
method: "get_preparation_display_data" /* GET_PREPARATION_DISPLAY_DATA */,
|
|
5712
|
+
ids,
|
|
5713
|
+
with_context: withContext
|
|
5555
5714
|
};
|
|
5556
5715
|
return env?.requests.post(
|
|
5557
5716
|
"/call" /* CALL_PATH */,
|
|
@@ -5567,19 +5726,35 @@ function useViewService() {
|
|
|
5567
5726
|
},
|
|
5568
5727
|
[env]
|
|
5569
5728
|
);
|
|
5570
|
-
|
|
5729
|
+
return {
|
|
5730
|
+
getPreparationDisplayData
|
|
5731
|
+
};
|
|
5732
|
+
};
|
|
5733
|
+
|
|
5734
|
+
// src/services/pos-service/get-product-image.ts
|
|
5735
|
+
import { useCallback as useCallback27 } from "react";
|
|
5736
|
+
var getProductImageService = (env) => {
|
|
5737
|
+
const getProductImage = useCallback27(
|
|
5571
5738
|
({
|
|
5572
|
-
|
|
5573
|
-
|
|
5739
|
+
model,
|
|
5740
|
+
fields,
|
|
5741
|
+
limit,
|
|
5742
|
+
offset,
|
|
5743
|
+
domain,
|
|
5574
5744
|
xNode,
|
|
5575
|
-
service
|
|
5745
|
+
service,
|
|
5746
|
+
searchParams
|
|
5576
5747
|
}) => {
|
|
5577
5748
|
const jsonData = {
|
|
5578
|
-
|
|
5579
|
-
|
|
5749
|
+
model,
|
|
5750
|
+
fields,
|
|
5751
|
+
limit,
|
|
5752
|
+
offset,
|
|
5753
|
+
domain
|
|
5580
5754
|
};
|
|
5581
|
-
|
|
5582
|
-
|
|
5755
|
+
const url = searchParams ? `${"/search_read" /* SEARCH_READ */}?${toQueryString(searchParams)}` : "/search_read" /* SEARCH_READ */;
|
|
5756
|
+
return env?.requests.post(
|
|
5757
|
+
url,
|
|
5583
5758
|
jsonData,
|
|
5584
5759
|
{
|
|
5585
5760
|
headers: {
|
|
@@ -5592,18 +5767,26 @@ function useViewService() {
|
|
|
5592
5767
|
},
|
|
5593
5768
|
[env]
|
|
5594
5769
|
);
|
|
5595
|
-
|
|
5770
|
+
return {
|
|
5771
|
+
getProductImage
|
|
5772
|
+
};
|
|
5773
|
+
};
|
|
5774
|
+
|
|
5775
|
+
// src/services/pos-service/handle-close-session.ts
|
|
5776
|
+
import { useCallback as useCallback28 } from "react";
|
|
5777
|
+
var handleCloseSessionService = (env) => {
|
|
5778
|
+
const handleCloseSession = useCallback28(
|
|
5596
5779
|
({
|
|
5597
|
-
|
|
5780
|
+
model,
|
|
5781
|
+
ids,
|
|
5598
5782
|
xNode,
|
|
5599
|
-
service
|
|
5783
|
+
service,
|
|
5784
|
+
method
|
|
5600
5785
|
}) => {
|
|
5601
5786
|
const jsonData = {
|
|
5602
|
-
model
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
order_id: orderId
|
|
5606
|
-
}
|
|
5787
|
+
model,
|
|
5788
|
+
ids,
|
|
5789
|
+
method
|
|
5607
5790
|
};
|
|
5608
5791
|
return env?.requests.post(
|
|
5609
5792
|
"/call" /* CALL_PATH */,
|
|
@@ -5619,21 +5802,31 @@ function useViewService() {
|
|
|
5619
5802
|
},
|
|
5620
5803
|
[env]
|
|
5621
5804
|
);
|
|
5622
|
-
|
|
5805
|
+
return {
|
|
5806
|
+
handleCloseSession
|
|
5807
|
+
};
|
|
5808
|
+
};
|
|
5809
|
+
|
|
5810
|
+
// src/services/pos-service/handle-closing-detail-session.ts
|
|
5811
|
+
import { useCallback as useCallback29 } from "react";
|
|
5812
|
+
var handleClosingDetailSessionService = (env) => {
|
|
5813
|
+
const handleClosingDetailSession = useCallback29(
|
|
5623
5814
|
({
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5815
|
+
model,
|
|
5816
|
+
ids,
|
|
5817
|
+
method,
|
|
5627
5818
|
xNode,
|
|
5628
|
-
service
|
|
5819
|
+
service,
|
|
5820
|
+
kwargs
|
|
5629
5821
|
}) => {
|
|
5630
5822
|
const jsonData = {
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5823
|
+
model,
|
|
5824
|
+
ids,
|
|
5825
|
+
method,
|
|
5826
|
+
kwargs
|
|
5634
5827
|
};
|
|
5635
5828
|
return env?.requests.post(
|
|
5636
|
-
"/
|
|
5829
|
+
"/call" /* CALL_PATH */,
|
|
5637
5830
|
jsonData,
|
|
5638
5831
|
{
|
|
5639
5832
|
headers: {
|
|
@@ -5646,19 +5839,31 @@ function useViewService() {
|
|
|
5646
5839
|
},
|
|
5647
5840
|
[env]
|
|
5648
5841
|
);
|
|
5649
|
-
|
|
5842
|
+
return {
|
|
5843
|
+
handleClosingDetailSession
|
|
5844
|
+
};
|
|
5845
|
+
};
|
|
5846
|
+
|
|
5847
|
+
// src/services/pos-service/handle-closing-session.ts
|
|
5848
|
+
import { useCallback as useCallback30 } from "react";
|
|
5849
|
+
var handleClosingSessionService = (env) => {
|
|
5850
|
+
const handleClosingSession = useCallback30(
|
|
5650
5851
|
({
|
|
5651
|
-
|
|
5652
|
-
|
|
5852
|
+
model,
|
|
5853
|
+
method,
|
|
5854
|
+
ids,
|
|
5855
|
+
kwargs,
|
|
5653
5856
|
xNode,
|
|
5654
5857
|
service
|
|
5655
5858
|
}) => {
|
|
5656
5859
|
const jsonData = {
|
|
5657
|
-
|
|
5658
|
-
|
|
5860
|
+
model,
|
|
5861
|
+
method,
|
|
5862
|
+
ids,
|
|
5863
|
+
kwargs
|
|
5659
5864
|
};
|
|
5660
|
-
return env?.requests.
|
|
5661
|
-
"/
|
|
5865
|
+
return env?.requests.post(
|
|
5866
|
+
"/call" /* CALL_PATH */,
|
|
5662
5867
|
jsonData,
|
|
5663
5868
|
{
|
|
5664
5869
|
headers: {
|
|
@@ -5671,17 +5876,40 @@ function useViewService() {
|
|
|
5671
5876
|
},
|
|
5672
5877
|
[env]
|
|
5673
5878
|
);
|
|
5674
|
-
|
|
5879
|
+
return {
|
|
5880
|
+
handleClosingSession
|
|
5881
|
+
};
|
|
5882
|
+
};
|
|
5883
|
+
|
|
5884
|
+
// src/services/pos-service/load-data-pos-session.ts
|
|
5885
|
+
import { useCallback as useCallback31 } from "react";
|
|
5886
|
+
var loadDataPosSessionService = (env) => {
|
|
5887
|
+
const loadDataPosSession = useCallback31(
|
|
5675
5888
|
({
|
|
5676
|
-
|
|
5889
|
+
model,
|
|
5890
|
+
ids,
|
|
5677
5891
|
xNode,
|
|
5678
|
-
service
|
|
5892
|
+
service,
|
|
5893
|
+
withContext,
|
|
5894
|
+
modelsToLoad = [],
|
|
5895
|
+
searchParams
|
|
5679
5896
|
}) => {
|
|
5680
5897
|
const jsonData = {
|
|
5681
|
-
|
|
5898
|
+
model,
|
|
5899
|
+
method: "load_data" /* LOAD_DATA */,
|
|
5900
|
+
ids,
|
|
5901
|
+
with_context: withContext ? withContext : {
|
|
5902
|
+
uid: 37,
|
|
5903
|
+
lang: "vi_VN",
|
|
5904
|
+
tz: "Asia/Saigon"
|
|
5905
|
+
},
|
|
5906
|
+
kwargs: {
|
|
5907
|
+
models_to_load: modelsToLoad
|
|
5908
|
+
}
|
|
5682
5909
|
};
|
|
5910
|
+
const url = searchParams ? `${"/call" /* CALL_PATH */}?${toQueryString(searchParams)}` : "/call" /* CALL_PATH */;
|
|
5683
5911
|
return env?.requests.post(
|
|
5684
|
-
|
|
5912
|
+
url,
|
|
5685
5913
|
jsonData,
|
|
5686
5914
|
{
|
|
5687
5915
|
headers: {
|
|
@@ -5694,15 +5922,31 @@ function useViewService() {
|
|
|
5694
5922
|
},
|
|
5695
5923
|
[env]
|
|
5696
5924
|
);
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5925
|
+
return {
|
|
5926
|
+
loadDataPosSession
|
|
5927
|
+
};
|
|
5928
|
+
};
|
|
5929
|
+
|
|
5930
|
+
// src/services/pos-service/manage-onchange.ts
|
|
5931
|
+
import { useCallback as useCallback32 } from "react";
|
|
5932
|
+
var manageOnchangeService = (env) => {
|
|
5933
|
+
const manageOnChange = useCallback32(
|
|
5934
|
+
({
|
|
5935
|
+
model,
|
|
5936
|
+
ids,
|
|
5937
|
+
args,
|
|
5700
5938
|
xNode,
|
|
5701
|
-
|
|
5939
|
+
service
|
|
5702
5940
|
}) => {
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5941
|
+
const jsonData = {
|
|
5942
|
+
model,
|
|
5943
|
+
method: "onchange" /* ONCHANGE */,
|
|
5944
|
+
ids,
|
|
5945
|
+
args
|
|
5946
|
+
};
|
|
5947
|
+
return env?.requests.post(
|
|
5948
|
+
"/call" /* CALL_PATH */,
|
|
5949
|
+
jsonData,
|
|
5706
5950
|
{
|
|
5707
5951
|
headers: {
|
|
5708
5952
|
"Content-Type": "application/json",
|
|
@@ -5714,24 +5958,34 @@ function useViewService() {
|
|
|
5714
5958
|
},
|
|
5715
5959
|
[env]
|
|
5716
5960
|
);
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5961
|
+
return {
|
|
5962
|
+
manageOnChange
|
|
5963
|
+
};
|
|
5964
|
+
};
|
|
5965
|
+
|
|
5966
|
+
// src/services/pos-service/manage-session.ts
|
|
5967
|
+
import { useCallback as useCallback33 } from "react";
|
|
5968
|
+
var manageSessionService = (env) => {
|
|
5969
|
+
const manageSession = useCallback33(
|
|
5970
|
+
({
|
|
5971
|
+
model,
|
|
5972
|
+
method,
|
|
5722
5973
|
ids,
|
|
5723
|
-
|
|
5974
|
+
args,
|
|
5975
|
+
kwargs,
|
|
5976
|
+
xNode,
|
|
5977
|
+
service
|
|
5724
5978
|
}) => {
|
|
5725
|
-
const
|
|
5726
|
-
model
|
|
5727
|
-
method
|
|
5728
|
-
kwargs,
|
|
5979
|
+
const jsonData = {
|
|
5980
|
+
model,
|
|
5981
|
+
method,
|
|
5729
5982
|
ids,
|
|
5730
|
-
|
|
5983
|
+
args,
|
|
5984
|
+
kwargs
|
|
5731
5985
|
};
|
|
5732
|
-
return env?.requests
|
|
5733
|
-
|
|
5734
|
-
|
|
5986
|
+
return env?.requests.post(
|
|
5987
|
+
"/call" /* CALL_PATH */,
|
|
5988
|
+
jsonData,
|
|
5735
5989
|
{
|
|
5736
5990
|
headers: {
|
|
5737
5991
|
"Content-Type": "application/json",
|
|
@@ -5743,46 +5997,30 @@ function useViewService() {
|
|
|
5743
5997
|
},
|
|
5744
5998
|
[env]
|
|
5745
5999
|
);
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
...extraHeaders,
|
|
5758
|
-
"Content-Type": "application/json",
|
|
5759
|
-
...xNode ? { "X-Node": xNode } : {}
|
|
5760
|
-
} : {
|
|
5761
|
-
"Content-Type": "application/json",
|
|
5762
|
-
...xNode ? { "X-Node": xNode } : {}
|
|
5763
|
-
}
|
|
5764
|
-
},
|
|
5765
|
-
service
|
|
5766
|
-
);
|
|
5767
|
-
},
|
|
5768
|
-
[env]
|
|
5769
|
-
);
|
|
5770
|
-
const getCountry = useCallback9(
|
|
5771
|
-
async ({
|
|
5772
|
-
service,
|
|
6000
|
+
return {
|
|
6001
|
+
manageSession
|
|
6002
|
+
};
|
|
6003
|
+
};
|
|
6004
|
+
|
|
6005
|
+
// src/services/pos-service/process-order.ts
|
|
6006
|
+
import { useCallback as useCallback34 } from "react";
|
|
6007
|
+
var processOrderService = (env) => {
|
|
6008
|
+
const processOrder = useCallback34(
|
|
6009
|
+
({
|
|
6010
|
+
orderId,
|
|
5773
6011
|
xNode,
|
|
5774
|
-
|
|
5775
|
-
kwargs
|
|
6012
|
+
service
|
|
5776
6013
|
}) => {
|
|
5777
|
-
const
|
|
5778
|
-
model: "
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
6014
|
+
const jsonData = {
|
|
6015
|
+
model: "pos_preparation_display.order" /* POS_PREPARATION_ORDER */,
|
|
6016
|
+
method: "process_order" /* PROCESS_ORDER */,
|
|
6017
|
+
kwargs: {
|
|
6018
|
+
order_id: orderId
|
|
6019
|
+
}
|
|
5782
6020
|
};
|
|
5783
|
-
return env?.requests
|
|
6021
|
+
return env?.requests.post(
|
|
5784
6022
|
"/call" /* CALL_PATH */,
|
|
5785
|
-
|
|
6023
|
+
jsonData,
|
|
5786
6024
|
{
|
|
5787
6025
|
headers: {
|
|
5788
6026
|
"Content-Type": "application/json",
|
|
@@ -5794,22 +6032,28 @@ function useViewService() {
|
|
|
5794
6032
|
},
|
|
5795
6033
|
[env]
|
|
5796
6034
|
);
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
6035
|
+
return {
|
|
6036
|
+
processOrder
|
|
6037
|
+
};
|
|
6038
|
+
};
|
|
6039
|
+
|
|
6040
|
+
// src/services/pos-service/save-pin-code.ts
|
|
6041
|
+
import { useCallback as useCallback35 } from "react";
|
|
6042
|
+
var savePinCodeService = (env) => {
|
|
6043
|
+
const savePinCode = useCallback35(
|
|
6044
|
+
({
|
|
6045
|
+
serialNumber,
|
|
6046
|
+
pinCode,
|
|
5800
6047
|
xNode,
|
|
5801
|
-
|
|
5802
|
-
kwargs
|
|
6048
|
+
service
|
|
5803
6049
|
}) => {
|
|
5804
|
-
const
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
5808
|
-
kwargs
|
|
6050
|
+
const jsonData = {
|
|
6051
|
+
serial_number: serialNumber,
|
|
6052
|
+
pin_code: pinCode
|
|
5809
6053
|
};
|
|
5810
|
-
return env?.requests
|
|
5811
|
-
"/
|
|
5812
|
-
|
|
6054
|
+
return env?.requests.put(
|
|
6055
|
+
"/pos_device/pin" /* POS_DEVICE_PIN */,
|
|
6056
|
+
jsonData,
|
|
5813
6057
|
{
|
|
5814
6058
|
headers: {
|
|
5815
6059
|
"Content-Type": "application/json",
|
|
@@ -5821,20 +6065,32 @@ function useViewService() {
|
|
|
5821
6065
|
},
|
|
5822
6066
|
[env]
|
|
5823
6067
|
);
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
6068
|
+
return {
|
|
6069
|
+
savePinCode
|
|
6070
|
+
};
|
|
6071
|
+
};
|
|
6072
|
+
|
|
6073
|
+
// src/services/pos-service/search-journal.ts
|
|
6074
|
+
import { useCallback as useCallback36 } from "react";
|
|
6075
|
+
var searchJournalService = (env) => {
|
|
6076
|
+
const searchJournal = useCallback36(
|
|
6077
|
+
({
|
|
6078
|
+
model,
|
|
6079
|
+
method,
|
|
6080
|
+
args,
|
|
6081
|
+
kwargs,
|
|
5827
6082
|
xNode,
|
|
5828
|
-
|
|
6083
|
+
service
|
|
5829
6084
|
}) => {
|
|
5830
|
-
const
|
|
5831
|
-
model
|
|
5832
|
-
method
|
|
6085
|
+
const jsonData = {
|
|
6086
|
+
model,
|
|
6087
|
+
method,
|
|
6088
|
+
args,
|
|
5833
6089
|
kwargs
|
|
5834
6090
|
};
|
|
5835
|
-
return env?.requests
|
|
6091
|
+
return env?.requests.post(
|
|
5836
6092
|
"/call" /* CALL_PATH */,
|
|
5837
|
-
|
|
6093
|
+
jsonData,
|
|
5838
6094
|
{
|
|
5839
6095
|
headers: {
|
|
5840
6096
|
"Content-Type": "application/json",
|
|
@@ -5846,22 +6102,30 @@ function useViewService() {
|
|
|
5846
6102
|
},
|
|
5847
6103
|
[env]
|
|
5848
6104
|
);
|
|
5849
|
-
|
|
5850
|
-
|
|
6105
|
+
return {
|
|
6106
|
+
searchJournal
|
|
6107
|
+
};
|
|
6108
|
+
};
|
|
6109
|
+
|
|
6110
|
+
// src/services/pos-service/update-closed-session.ts
|
|
6111
|
+
import { useCallback as useCallback37 } from "react";
|
|
6112
|
+
var updateClosedSessionService = (env) => {
|
|
6113
|
+
const updateClosedSession = useCallback37(
|
|
6114
|
+
({
|
|
6115
|
+
model,
|
|
6116
|
+
domain,
|
|
6117
|
+
values,
|
|
5851
6118
|
service,
|
|
5852
|
-
xNode
|
|
5853
|
-
kwargs,
|
|
5854
|
-
withContext
|
|
6119
|
+
xNode
|
|
5855
6120
|
}) => {
|
|
5856
|
-
const
|
|
5857
|
-
model
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
with_context: withContext
|
|
6121
|
+
const jsonData = {
|
|
6122
|
+
model,
|
|
6123
|
+
domain,
|
|
6124
|
+
values
|
|
5861
6125
|
};
|
|
5862
|
-
return env?.requests
|
|
5863
|
-
"/
|
|
5864
|
-
|
|
6126
|
+
return env?.requests.post(
|
|
6127
|
+
"/create_update" /* CREATE_UPDATE */,
|
|
6128
|
+
jsonData,
|
|
5865
6129
|
{
|
|
5866
6130
|
headers: {
|
|
5867
6131
|
"Content-Type": "application/json",
|
|
@@ -5874,130 +6138,62 @@ function useViewService() {
|
|
|
5874
6138
|
[env]
|
|
5875
6139
|
);
|
|
5876
6140
|
return {
|
|
5877
|
-
|
|
5878
|
-
getMenu,
|
|
5879
|
-
getActionDetail,
|
|
5880
|
-
getResequence,
|
|
5881
|
-
getSelectionItem,
|
|
5882
|
-
loadMessages,
|
|
5883
|
-
getVersion,
|
|
5884
|
-
grantAccess,
|
|
5885
|
-
removeTotpSetUp,
|
|
5886
|
-
requestSetupTotp,
|
|
5887
|
-
settingsWebRead2fa,
|
|
5888
|
-
signInSSO,
|
|
5889
|
-
verify2FA,
|
|
5890
|
-
get2FAMethods,
|
|
5891
|
-
verifyTotp,
|
|
5892
|
-
getASession,
|
|
5893
|
-
updateClosedSession,
|
|
5894
|
-
manageSession,
|
|
5895
|
-
handleClosingSession,
|
|
5896
|
-
createSession,
|
|
5897
|
-
getPOS,
|
|
5898
|
-
createEntity,
|
|
5899
|
-
getList,
|
|
5900
|
-
updateEntity,
|
|
5901
|
-
deleteEntity,
|
|
5902
|
-
loadDataPosSession,
|
|
5903
|
-
manageOnChange,
|
|
5904
|
-
getOrderLine,
|
|
5905
|
-
getProductImage,
|
|
5906
|
-
checkPayment,
|
|
5907
|
-
handleCloseSession,
|
|
5908
|
-
handleClosingDetailSession,
|
|
5909
|
-
createPosConfig,
|
|
5910
|
-
searchJournal,
|
|
5911
|
-
getPreparationDisplayData,
|
|
5912
|
-
changeOrderPreparaionState,
|
|
5913
|
-
updateOrderStatus,
|
|
5914
|
-
processOrder,
|
|
5915
|
-
generatePaymentQRInfo,
|
|
5916
|
-
savePinCode,
|
|
5917
|
-
getPinCode,
|
|
5918
|
-
getNotifications,
|
|
5919
|
-
createEInvoice,
|
|
5920
|
-
getCurrentUser,
|
|
5921
|
-
getCountry,
|
|
5922
|
-
getCity,
|
|
5923
|
-
getWard,
|
|
5924
|
-
getPartnerTitle
|
|
6141
|
+
updateClosedSession
|
|
5925
6142
|
};
|
|
5926
|
-
}
|
|
6143
|
+
};
|
|
5927
6144
|
|
|
5928
|
-
// src/services/
|
|
5929
|
-
import { useCallback as
|
|
5930
|
-
|
|
5931
|
-
const
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
}) => {
|
|
5938
|
-
return env.requests.post(
|
|
5939
|
-
"/read_group" /* READ_GROUP */,
|
|
5940
|
-
body,
|
|
5941
|
-
{
|
|
5942
|
-
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
5943
|
-
},
|
|
5944
|
-
service
|
|
5945
|
-
);
|
|
5946
|
-
},
|
|
5947
|
-
[env]
|
|
5948
|
-
);
|
|
5949
|
-
const getDataChart = useCallback10(
|
|
5950
|
-
async ({
|
|
5951
|
-
service,
|
|
6145
|
+
// src/services/pos-service/update-entity.ts
|
|
6146
|
+
import { useCallback as useCallback38 } from "react";
|
|
6147
|
+
var updateEntityService = (env) => {
|
|
6148
|
+
const updateEntity = useCallback38(
|
|
6149
|
+
({
|
|
6150
|
+
model,
|
|
6151
|
+
domain,
|
|
6152
|
+
values,
|
|
6153
|
+
isCreateEndpoint = true,
|
|
5952
6154
|
xNode,
|
|
5953
|
-
|
|
5954
|
-
path,
|
|
5955
|
-
method = "POST"
|
|
6155
|
+
service
|
|
5956
6156
|
}) => {
|
|
5957
|
-
const
|
|
5958
|
-
|
|
5959
|
-
|
|
6157
|
+
const jsonData = {
|
|
6158
|
+
model,
|
|
6159
|
+
domain,
|
|
6160
|
+
values
|
|
5960
6161
|
};
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
{
|
|
5965
|
-
headers
|
|
5966
|
-
},
|
|
5967
|
-
service
|
|
5968
|
-
);
|
|
5969
|
-
}
|
|
5970
|
-
return env.requests.post(
|
|
5971
|
-
path,
|
|
5972
|
-
body,
|
|
6162
|
+
return env?.requests.post(
|
|
6163
|
+
isCreateEndpoint ? "/create_update" /* CREATE_UPDATE */ : "/call" /* CALL_PATH */,
|
|
6164
|
+
jsonData,
|
|
5973
6165
|
{
|
|
5974
|
-
headers
|
|
6166
|
+
headers: {
|
|
6167
|
+
"Content-Type": "application/json",
|
|
6168
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
6169
|
+
}
|
|
5975
6170
|
},
|
|
5976
6171
|
service
|
|
5977
6172
|
);
|
|
5978
6173
|
},
|
|
5979
6174
|
[env]
|
|
5980
6175
|
);
|
|
5981
|
-
return {
|
|
5982
|
-
|
|
6176
|
+
return {
|
|
6177
|
+
updateEntity
|
|
6178
|
+
};
|
|
6179
|
+
};
|
|
5983
6180
|
|
|
5984
|
-
// src/services/pos-service/
|
|
5985
|
-
import { useCallback as
|
|
5986
|
-
var
|
|
5987
|
-
const
|
|
6181
|
+
// src/services/pos-service/update-order-status.ts
|
|
6182
|
+
import { useCallback as useCallback39 } from "react";
|
|
6183
|
+
var updateOrderStatusService = (env) => {
|
|
6184
|
+
const updateOrderStatus = useCallback39(
|
|
5988
6185
|
({
|
|
5989
|
-
|
|
5990
|
-
|
|
6186
|
+
orderId,
|
|
6187
|
+
state,
|
|
5991
6188
|
xNode,
|
|
5992
|
-
service
|
|
5993
|
-
isCreateEndpoint = false
|
|
6189
|
+
service
|
|
5994
6190
|
}) => {
|
|
5995
6191
|
const jsonData = {
|
|
5996
|
-
|
|
5997
|
-
|
|
6192
|
+
order_id: orderId,
|
|
6193
|
+
state
|
|
5998
6194
|
};
|
|
5999
|
-
return env?.requests.
|
|
6000
|
-
|
|
6195
|
+
return env?.requests.put(
|
|
6196
|
+
"/pos-order/status" /* POS_ORDER_STATUS */,
|
|
6001
6197
|
jsonData,
|
|
6002
6198
|
{
|
|
6003
6199
|
headers: {
|
|
@@ -6011,16 +6207,50 @@ var addEntityService = (env) => {
|
|
|
6011
6207
|
[env]
|
|
6012
6208
|
);
|
|
6013
6209
|
return {
|
|
6014
|
-
|
|
6210
|
+
updateOrderStatus
|
|
6015
6211
|
};
|
|
6016
6212
|
};
|
|
6017
6213
|
|
|
6018
6214
|
// src/services/pos-service/index.ts
|
|
6215
|
+
var serviceFactories = [
|
|
6216
|
+
addEntityService,
|
|
6217
|
+
getASessionService,
|
|
6218
|
+
changOrderPreparationStateService,
|
|
6219
|
+
checkPaymentService,
|
|
6220
|
+
createEInvoiceService,
|
|
6221
|
+
createEntityService,
|
|
6222
|
+
createPosConfigService,
|
|
6223
|
+
createSessionService,
|
|
6224
|
+
deleteEntityService,
|
|
6225
|
+
generatePaymentQrInfoService,
|
|
6226
|
+
getCurrentUserService,
|
|
6227
|
+
getListService,
|
|
6228
|
+
getOrderLineService,
|
|
6229
|
+
getPinCodeService,
|
|
6230
|
+
getPosService,
|
|
6231
|
+
getPreparationDisplayDataService,
|
|
6232
|
+
getProductImageService,
|
|
6233
|
+
handleCloseSessionService,
|
|
6234
|
+
handleClosingDetailSessionService,
|
|
6235
|
+
handleClosingSessionService,
|
|
6236
|
+
loadDataPosSessionService,
|
|
6237
|
+
manageOnchangeService,
|
|
6238
|
+
manageSessionService,
|
|
6239
|
+
processOrderService,
|
|
6240
|
+
savePinCodeService,
|
|
6241
|
+
searchJournalService,
|
|
6242
|
+
updateClosedSessionService,
|
|
6243
|
+
updateEntityService,
|
|
6244
|
+
updateOrderStatusService
|
|
6245
|
+
];
|
|
6019
6246
|
var usePosService = () => {
|
|
6020
6247
|
const { env } = useEnv();
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6248
|
+
const service = {};
|
|
6249
|
+
for (const factory of serviceFactories) {
|
|
6250
|
+
const instance = factory(env);
|
|
6251
|
+
Object.assign(service, instance);
|
|
6252
|
+
}
|
|
6253
|
+
return service;
|
|
6024
6254
|
};
|
|
6025
6255
|
|
|
6026
6256
|
// src/provider/version-gate-provider.tsx
|
|
@@ -6060,7 +6290,7 @@ var VersionGate = ({ children }) => {
|
|
|
6060
6290
|
};
|
|
6061
6291
|
|
|
6062
6292
|
// src/provider/env-provider.tsx
|
|
6063
|
-
import { createContext, useContext, useState as useState4, useCallback as
|
|
6293
|
+
import { createContext, useContext, useState as useState4, useCallback as useCallback40 } from "react";
|
|
6064
6294
|
|
|
6065
6295
|
// src/configs/axios-client.ts
|
|
6066
6296
|
import axios from "axios";
|
|
@@ -6423,7 +6653,7 @@ function EnvProvider({
|
|
|
6423
6653
|
localStorageUtils: localStorageUtil,
|
|
6424
6654
|
sessionStorageUtils: sessionStorageUtil
|
|
6425
6655
|
});
|
|
6426
|
-
const setupEnv =
|
|
6656
|
+
const setupEnv = useCallback40(
|
|
6427
6657
|
(envConfig) => {
|
|
6428
6658
|
const updatedEnv = {
|
|
6429
6659
|
...env,
|
|
@@ -6437,31 +6667,31 @@ function EnvProvider({
|
|
|
6437
6667
|
},
|
|
6438
6668
|
[env, localStorageUtil, sessionStorageUtil]
|
|
6439
6669
|
);
|
|
6440
|
-
const setUid2 =
|
|
6670
|
+
const setUid2 = useCallback40((uid) => {
|
|
6441
6671
|
setEnvState((prev) => ({
|
|
6442
6672
|
...prev,
|
|
6443
6673
|
context: { ...prev.context, uid }
|
|
6444
6674
|
}));
|
|
6445
6675
|
}, []);
|
|
6446
|
-
const setLang2 =
|
|
6676
|
+
const setLang2 = useCallback40((lang) => {
|
|
6447
6677
|
setEnvState((prev) => ({
|
|
6448
6678
|
...prev,
|
|
6449
6679
|
context: { ...prev.context, lang }
|
|
6450
6680
|
}));
|
|
6451
6681
|
}, []);
|
|
6452
|
-
const setAllowCompanies2 =
|
|
6682
|
+
const setAllowCompanies2 = useCallback40((allowed_company_ids) => {
|
|
6453
6683
|
setEnvState((prev) => ({
|
|
6454
6684
|
...prev,
|
|
6455
6685
|
context: { ...prev.context, allowed_company_ids }
|
|
6456
6686
|
}));
|
|
6457
6687
|
}, []);
|
|
6458
|
-
const setCompanies2 =
|
|
6688
|
+
const setCompanies2 = useCallback40((companies) => {
|
|
6459
6689
|
setEnvState((prev) => ({
|
|
6460
6690
|
...prev,
|
|
6461
6691
|
companies
|
|
6462
6692
|
}));
|
|
6463
6693
|
}, []);
|
|
6464
|
-
const setDefaultCompany2 =
|
|
6694
|
+
const setDefaultCompany2 = useCallback40(
|
|
6465
6695
|
(defaultCompany) => {
|
|
6466
6696
|
setEnvState((prev) => ({
|
|
6467
6697
|
...prev,
|
|
@@ -6470,19 +6700,19 @@ function EnvProvider({
|
|
|
6470
6700
|
},
|
|
6471
6701
|
[]
|
|
6472
6702
|
);
|
|
6473
|
-
const setUserInfo =
|
|
6703
|
+
const setUserInfo = useCallback40((user) => {
|
|
6474
6704
|
setEnvState((prev) => ({
|
|
6475
6705
|
...prev,
|
|
6476
6706
|
user
|
|
6477
6707
|
}));
|
|
6478
6708
|
}, []);
|
|
6479
|
-
const setConfig2 =
|
|
6709
|
+
const setConfig2 = useCallback40((config) => {
|
|
6480
6710
|
setEnvState((prev) => ({
|
|
6481
6711
|
...prev,
|
|
6482
6712
|
config
|
|
6483
6713
|
}));
|
|
6484
6714
|
}, []);
|
|
6485
|
-
const setEnvFile2 =
|
|
6715
|
+
const setEnvFile2 = useCallback40((envFile) => {
|
|
6486
6716
|
setEnvState((prev) => ({
|
|
6487
6717
|
...prev,
|
|
6488
6718
|
envFile
|
|
@@ -7388,9 +7618,9 @@ var BaseModel = class {
|
|
|
7388
7618
|
};
|
|
7389
7619
|
|
|
7390
7620
|
// src/hooks/model/use-model.ts
|
|
7391
|
-
import { useCallback as
|
|
7621
|
+
import { useCallback as useCallback41 } from "react";
|
|
7392
7622
|
var useModel = () => {
|
|
7393
|
-
const initModel =
|
|
7623
|
+
const initModel = useCallback41((modelData) => {
|
|
7394
7624
|
switch (modelData?.name) {
|
|
7395
7625
|
default:
|
|
7396
7626
|
return new BaseModel(modelData);
|
|
@@ -8026,655 +8256,27 @@ var useVerifyTotp = () => {
|
|
|
8026
8256
|
};
|
|
8027
8257
|
var use_verify_totp_default = useVerifyTotp;
|
|
8028
8258
|
|
|
8029
|
-
// src/hooks/view/use-
|
|
8259
|
+
// src/hooks/view/use-gen-serial-number.ts
|
|
8030
8260
|
import { useMutation as useMutation51 } from "@tanstack/react-query";
|
|
8031
|
-
var
|
|
8032
|
-
const {
|
|
8261
|
+
var useGenSerialNumber = () => {
|
|
8262
|
+
const { generateSerialNumber } = useActionService();
|
|
8033
8263
|
return useMutation51({
|
|
8034
8264
|
mutationFn: ({
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
domain,
|
|
8038
|
-
service,
|
|
8039
|
-
xNode
|
|
8040
|
-
}) => {
|
|
8041
|
-
return getASession({
|
|
8042
|
-
model,
|
|
8043
|
-
args,
|
|
8044
|
-
domain,
|
|
8045
|
-
service,
|
|
8046
|
-
xNode
|
|
8047
|
-
});
|
|
8048
|
-
}
|
|
8049
|
-
});
|
|
8050
|
-
};
|
|
8051
|
-
var use_get_a_session_default = useGetASession;
|
|
8052
|
-
|
|
8053
|
-
// src/hooks/view/use-update-closed-session.ts
|
|
8054
|
-
import { useMutation as useMutation52 } from "@tanstack/react-query";
|
|
8055
|
-
var useUpdateClosedSession = () => {
|
|
8056
|
-
const { updateClosedSession } = useViewService();
|
|
8057
|
-
return useMutation52({
|
|
8058
|
-
mutationFn: ({
|
|
8059
|
-
model,
|
|
8060
|
-
domain,
|
|
8061
|
-
values,
|
|
8062
|
-
service,
|
|
8063
|
-
xNode
|
|
8064
|
-
}) => {
|
|
8065
|
-
return updateClosedSession({
|
|
8066
|
-
model,
|
|
8067
|
-
domain,
|
|
8068
|
-
values,
|
|
8069
|
-
service,
|
|
8070
|
-
xNode
|
|
8071
|
-
});
|
|
8072
|
-
}
|
|
8073
|
-
});
|
|
8074
|
-
};
|
|
8075
|
-
var use_update_closed_session_default = useUpdateClosedSession;
|
|
8076
|
-
|
|
8077
|
-
// src/hooks/view/use-manage-session.ts
|
|
8078
|
-
import { useMutation as useMutation53 } from "@tanstack/react-query";
|
|
8079
|
-
var useManageSession = () => {
|
|
8080
|
-
const { manageSession } = useViewService();
|
|
8081
|
-
return useMutation53({
|
|
8082
|
-
mutationFn: ({
|
|
8083
|
-
model,
|
|
8084
|
-
ids,
|
|
8085
|
-
args,
|
|
8086
|
-
kwargs,
|
|
8087
|
-
service,
|
|
8088
|
-
xNode,
|
|
8089
|
-
method
|
|
8090
|
-
}) => {
|
|
8091
|
-
return manageSession({
|
|
8092
|
-
model,
|
|
8093
|
-
method,
|
|
8094
|
-
ids,
|
|
8095
|
-
args,
|
|
8096
|
-
kwargs,
|
|
8097
|
-
service,
|
|
8098
|
-
xNode
|
|
8099
|
-
});
|
|
8100
|
-
}
|
|
8101
|
-
});
|
|
8102
|
-
};
|
|
8103
|
-
var use_manage_session_default = useManageSession;
|
|
8104
|
-
|
|
8105
|
-
// src/hooks/view/use-handle-closing-session.ts
|
|
8106
|
-
import { useMutation as useMutation54 } from "@tanstack/react-query";
|
|
8107
|
-
var useHandleClosingSession = () => {
|
|
8108
|
-
const { handleClosingSession } = useViewService();
|
|
8109
|
-
return useMutation54({
|
|
8110
|
-
mutationFn: ({
|
|
8111
|
-
model,
|
|
8112
|
-
method,
|
|
8113
|
-
ids,
|
|
8114
|
-
kwargs,
|
|
8115
|
-
xNode,
|
|
8116
|
-
service
|
|
8117
|
-
}) => {
|
|
8118
|
-
return handleClosingSession({
|
|
8119
|
-
model,
|
|
8120
|
-
method,
|
|
8121
|
-
ids,
|
|
8122
|
-
kwargs,
|
|
8123
|
-
service,
|
|
8124
|
-
xNode
|
|
8125
|
-
});
|
|
8126
|
-
}
|
|
8127
|
-
});
|
|
8128
|
-
};
|
|
8129
|
-
var use_handle_closing_session_default = useHandleClosingSession;
|
|
8130
|
-
|
|
8131
|
-
// src/hooks/view/use-create-session.ts
|
|
8132
|
-
import { useMutation as useMutation55 } from "@tanstack/react-query";
|
|
8133
|
-
var useCreateSession = () => {
|
|
8134
|
-
const { createSession } = useViewService();
|
|
8135
|
-
return useMutation55({
|
|
8136
|
-
mutationFn: ({
|
|
8137
|
-
model,
|
|
8138
|
-
configId,
|
|
8139
|
-
service,
|
|
8140
|
-
xNode
|
|
8141
|
-
}) => {
|
|
8142
|
-
return createSession({
|
|
8143
|
-
model,
|
|
8144
|
-
configId,
|
|
8145
|
-
service,
|
|
8146
|
-
xNode
|
|
8147
|
-
});
|
|
8148
|
-
}
|
|
8149
|
-
});
|
|
8150
|
-
};
|
|
8151
|
-
var use_create_session_default = useCreateSession;
|
|
8152
|
-
|
|
8153
|
-
// src/hooks/view/use-get-pos.ts
|
|
8154
|
-
import { useMutation as useMutation56 } from "@tanstack/react-query";
|
|
8155
|
-
var useGetPos = () => {
|
|
8156
|
-
const { getPOS } = useViewService();
|
|
8157
|
-
return useMutation56({
|
|
8158
|
-
mutationFn: ({
|
|
8159
|
-
model,
|
|
8160
|
-
args,
|
|
8161
|
-
domain,
|
|
8162
|
-
service,
|
|
8163
|
-
xNode
|
|
8164
|
-
}) => {
|
|
8165
|
-
return getPOS({
|
|
8166
|
-
model,
|
|
8167
|
-
args,
|
|
8168
|
-
domain,
|
|
8169
|
-
service,
|
|
8170
|
-
xNode
|
|
8171
|
-
});
|
|
8172
|
-
}
|
|
8173
|
-
});
|
|
8174
|
-
};
|
|
8175
|
-
var use_get_pos_default = useGetPos;
|
|
8176
|
-
|
|
8177
|
-
// src/hooks/view/use-create-entity.ts
|
|
8178
|
-
import { useMutation as useMutation57 } from "@tanstack/react-query";
|
|
8179
|
-
var useCreateEntity = () => {
|
|
8180
|
-
const { createEntity } = useViewService();
|
|
8181
|
-
return useMutation57({
|
|
8182
|
-
mutationFn: ({
|
|
8183
|
-
model,
|
|
8184
|
-
args,
|
|
8185
|
-
xNode,
|
|
8186
|
-
service
|
|
8187
|
-
}) => {
|
|
8188
|
-
return createEntity({
|
|
8189
|
-
model,
|
|
8190
|
-
args,
|
|
8191
|
-
xNode,
|
|
8192
|
-
service
|
|
8193
|
-
});
|
|
8194
|
-
}
|
|
8195
|
-
});
|
|
8196
|
-
};
|
|
8197
|
-
var use_create_entity_default = useCreateEntity;
|
|
8198
|
-
|
|
8199
|
-
// src/hooks/view/use-get-list.ts
|
|
8200
|
-
import { useMutation as useMutation58 } from "@tanstack/react-query";
|
|
8201
|
-
var useGetList = () => {
|
|
8202
|
-
const { getList } = useViewService();
|
|
8203
|
-
return useMutation58({
|
|
8204
|
-
mutationFn: ({
|
|
8205
|
-
model,
|
|
8206
|
-
domain,
|
|
8207
|
-
xNode,
|
|
8208
|
-
service,
|
|
8209
|
-
specification,
|
|
8210
|
-
offset,
|
|
8211
|
-
limit
|
|
8212
|
-
}) => {
|
|
8213
|
-
return getList({
|
|
8214
|
-
model,
|
|
8215
|
-
domain,
|
|
8216
|
-
service,
|
|
8217
|
-
xNode,
|
|
8218
|
-
specification,
|
|
8219
|
-
offset,
|
|
8220
|
-
limit
|
|
8221
|
-
});
|
|
8222
|
-
}
|
|
8223
|
-
});
|
|
8224
|
-
};
|
|
8225
|
-
var use_get_list_default = useGetList;
|
|
8226
|
-
|
|
8227
|
-
// src/hooks/view/use-update-entity.ts
|
|
8228
|
-
import { useMutation as useMutation59 } from "@tanstack/react-query";
|
|
8229
|
-
var useUpdateEntity = () => {
|
|
8230
|
-
const { updateEntity } = useViewService();
|
|
8231
|
-
return useMutation59({
|
|
8232
|
-
mutationFn: ({
|
|
8233
|
-
model,
|
|
8234
|
-
domain,
|
|
8235
|
-
values,
|
|
8236
|
-
xNode,
|
|
8237
|
-
service
|
|
8238
|
-
}) => {
|
|
8239
|
-
return updateEntity({
|
|
8240
|
-
model,
|
|
8241
|
-
domain,
|
|
8242
|
-
values,
|
|
8243
|
-
xNode,
|
|
8244
|
-
service
|
|
8245
|
-
});
|
|
8246
|
-
}
|
|
8247
|
-
});
|
|
8248
|
-
};
|
|
8249
|
-
var use_update_entity_default = useUpdateEntity;
|
|
8250
|
-
|
|
8251
|
-
// src/hooks/view/use-delete-entity.ts
|
|
8252
|
-
import { useMutation as useMutation60 } from "@tanstack/react-query";
|
|
8253
|
-
var useDeleteEntity = () => {
|
|
8254
|
-
const { deleteEntity } = useViewService();
|
|
8255
|
-
return useMutation60({
|
|
8256
|
-
mutationFn: ({
|
|
8257
|
-
model,
|
|
8258
|
-
ids,
|
|
8259
|
-
xNode,
|
|
8260
|
-
service,
|
|
8261
|
-
method
|
|
8262
|
-
}) => {
|
|
8263
|
-
return deleteEntity({
|
|
8264
|
-
model,
|
|
8265
|
-
ids,
|
|
8266
|
-
xNode,
|
|
8267
|
-
service,
|
|
8268
|
-
method
|
|
8269
|
-
});
|
|
8270
|
-
}
|
|
8271
|
-
});
|
|
8272
|
-
};
|
|
8273
|
-
var use_delete_entity_default = useDeleteEntity;
|
|
8274
|
-
|
|
8275
|
-
// src/hooks/view/use-load-data-pos-session.ts
|
|
8276
|
-
import { useMutation as useMutation61 } from "@tanstack/react-query";
|
|
8277
|
-
var useLoadDataPosSession = () => {
|
|
8278
|
-
const { loadDataPosSession } = useViewService();
|
|
8279
|
-
return useMutation61({
|
|
8280
|
-
mutationFn: ({
|
|
8281
|
-
model,
|
|
8282
|
-
ids,
|
|
8283
|
-
xNode,
|
|
8284
|
-
service,
|
|
8285
|
-
withContext,
|
|
8286
|
-
modelsToLoad,
|
|
8287
|
-
searchParams
|
|
8288
|
-
}) => {
|
|
8289
|
-
return loadDataPosSession({
|
|
8290
|
-
model,
|
|
8291
|
-
ids,
|
|
8292
|
-
xNode,
|
|
8293
|
-
service,
|
|
8294
|
-
withContext,
|
|
8295
|
-
modelsToLoad,
|
|
8296
|
-
searchParams
|
|
8297
|
-
});
|
|
8298
|
-
}
|
|
8299
|
-
});
|
|
8300
|
-
};
|
|
8301
|
-
var use_load_data_pos_session_default = useLoadDataPosSession;
|
|
8302
|
-
|
|
8303
|
-
// src/hooks/view/use-manage-on-change.ts
|
|
8304
|
-
import { useMutation as useMutation62 } from "@tanstack/react-query";
|
|
8305
|
-
var useManageOnChange = () => {
|
|
8306
|
-
const { manageOnChange } = useViewService();
|
|
8307
|
-
return useMutation62({
|
|
8308
|
-
mutationFn: ({
|
|
8309
|
-
model,
|
|
8310
|
-
ids,
|
|
8311
|
-
args,
|
|
8312
|
-
service,
|
|
8313
|
-
xNode
|
|
8314
|
-
}) => {
|
|
8315
|
-
return manageOnChange({
|
|
8316
|
-
model,
|
|
8317
|
-
ids,
|
|
8318
|
-
args,
|
|
8319
|
-
service,
|
|
8320
|
-
xNode
|
|
8321
|
-
});
|
|
8322
|
-
}
|
|
8323
|
-
});
|
|
8324
|
-
};
|
|
8325
|
-
var use_manage_on_change_default = useManageOnChange;
|
|
8326
|
-
|
|
8327
|
-
// src/hooks/view/use-gen-serial-number.ts
|
|
8328
|
-
import { useMutation as useMutation63 } from "@tanstack/react-query";
|
|
8329
|
-
var useGenSerialNumber = () => {
|
|
8330
|
-
const { generateSerialNumber } = useActionService();
|
|
8331
|
-
return useMutation63({
|
|
8332
|
-
mutationFn: ({
|
|
8333
|
-
kwargs,
|
|
8334
|
-
context,
|
|
8265
|
+
kwargs,
|
|
8266
|
+
context,
|
|
8335
8267
|
service,
|
|
8336
8268
|
xNode
|
|
8337
8269
|
}) => {
|
|
8338
8270
|
return generateSerialNumber({
|
|
8339
8271
|
kwargs,
|
|
8340
8272
|
context,
|
|
8341
|
-
service,
|
|
8342
|
-
xNode
|
|
8343
|
-
});
|
|
8344
|
-
}
|
|
8345
|
-
});
|
|
8346
|
-
};
|
|
8347
|
-
var use_gen_serial_number_default = useGenSerialNumber;
|
|
8348
|
-
|
|
8349
|
-
// src/hooks/view/use-get-order-line.ts
|
|
8350
|
-
import { useMutation as useMutation64 } from "@tanstack/react-query";
|
|
8351
|
-
var useGetOrderLine = () => {
|
|
8352
|
-
const { getOrderLine } = useViewService();
|
|
8353
|
-
return useMutation64({
|
|
8354
|
-
mutationFn: ({
|
|
8355
|
-
model,
|
|
8356
|
-
ids,
|
|
8357
|
-
specification,
|
|
8358
|
-
xNode,
|
|
8359
|
-
service
|
|
8360
|
-
}) => {
|
|
8361
|
-
return getOrderLine({
|
|
8362
|
-
model,
|
|
8363
|
-
ids,
|
|
8364
|
-
specification,
|
|
8365
|
-
xNode,
|
|
8366
|
-
service
|
|
8367
|
-
});
|
|
8368
|
-
}
|
|
8369
|
-
});
|
|
8370
|
-
};
|
|
8371
|
-
var use_get_order_line_default = useGetOrderLine;
|
|
8372
|
-
|
|
8373
|
-
// src/hooks/view/use-get-product-image.ts
|
|
8374
|
-
import { useMutation as useMutation65 } from "@tanstack/react-query";
|
|
8375
|
-
var useGetProductImage = () => {
|
|
8376
|
-
const { getProductImage } = useViewService();
|
|
8377
|
-
return useMutation65({
|
|
8378
|
-
mutationFn: ({
|
|
8379
|
-
model,
|
|
8380
|
-
fields,
|
|
8381
|
-
limit,
|
|
8382
|
-
offset,
|
|
8383
|
-
domain,
|
|
8384
|
-
xNode,
|
|
8385
|
-
service,
|
|
8386
|
-
searchParams
|
|
8387
|
-
}) => {
|
|
8388
|
-
return getProductImage({
|
|
8389
|
-
model,
|
|
8390
|
-
fields,
|
|
8391
|
-
limit,
|
|
8392
|
-
offset,
|
|
8393
|
-
domain,
|
|
8394
|
-
xNode,
|
|
8395
|
-
service,
|
|
8396
|
-
searchParams
|
|
8397
|
-
});
|
|
8398
|
-
}
|
|
8399
|
-
});
|
|
8400
|
-
};
|
|
8401
|
-
var use_get_product_image_default = useGetProductImage;
|
|
8402
|
-
|
|
8403
|
-
// src/hooks/view/use-check-payment.ts
|
|
8404
|
-
import { useMutation as useMutation66 } from "@tanstack/react-query";
|
|
8405
|
-
var useCheckPayment = () => {
|
|
8406
|
-
const { checkPayment } = useViewService();
|
|
8407
|
-
return useMutation66({
|
|
8408
|
-
mutationFn: ({
|
|
8409
|
-
model,
|
|
8410
|
-
ids,
|
|
8411
|
-
withContext,
|
|
8412
|
-
xNode,
|
|
8413
|
-
service
|
|
8414
|
-
}) => {
|
|
8415
|
-
return checkPayment({
|
|
8416
|
-
model,
|
|
8417
|
-
ids,
|
|
8418
|
-
withContext,
|
|
8419
|
-
xNode,
|
|
8420
|
-
service
|
|
8421
|
-
});
|
|
8422
|
-
}
|
|
8423
|
-
});
|
|
8424
|
-
};
|
|
8425
|
-
var use_check_payment_default = useCheckPayment;
|
|
8426
|
-
|
|
8427
|
-
// src/hooks/view/use-handle-close-session.ts
|
|
8428
|
-
import { useMutation as useMutation67 } from "@tanstack/react-query";
|
|
8429
|
-
var useHandleCloseSession = () => {
|
|
8430
|
-
const { handleCloseSession } = useViewService();
|
|
8431
|
-
return useMutation67({
|
|
8432
|
-
mutationFn: ({
|
|
8433
|
-
model,
|
|
8434
|
-
ids,
|
|
8435
|
-
xNode,
|
|
8436
|
-
service,
|
|
8437
|
-
method
|
|
8438
|
-
}) => {
|
|
8439
|
-
return handleCloseSession({
|
|
8440
|
-
model,
|
|
8441
|
-
ids,
|
|
8442
|
-
xNode,
|
|
8443
|
-
service,
|
|
8444
|
-
method
|
|
8445
|
-
});
|
|
8446
|
-
}
|
|
8447
|
-
});
|
|
8448
|
-
};
|
|
8449
|
-
var use_handle_close_session_default = useHandleCloseSession;
|
|
8450
|
-
|
|
8451
|
-
// src/hooks/view/use-handle-closing-detail-session.ts
|
|
8452
|
-
import { useMutation as useMutation68 } from "@tanstack/react-query";
|
|
8453
|
-
var useHandleClosingDetailSession = () => {
|
|
8454
|
-
const { handleClosingDetailSession } = useViewService();
|
|
8455
|
-
return useMutation68({
|
|
8456
|
-
mutationFn: ({
|
|
8457
|
-
model,
|
|
8458
|
-
ids,
|
|
8459
|
-
method,
|
|
8460
|
-
xNode,
|
|
8461
|
-
service,
|
|
8462
|
-
kwargs
|
|
8463
|
-
}) => {
|
|
8464
|
-
return handleClosingDetailSession({
|
|
8465
|
-
model,
|
|
8466
|
-
ids,
|
|
8467
|
-
method,
|
|
8468
|
-
xNode,
|
|
8469
|
-
service,
|
|
8470
|
-
kwargs
|
|
8471
|
-
});
|
|
8472
|
-
}
|
|
8473
|
-
});
|
|
8474
|
-
};
|
|
8475
|
-
var use_handle_closing_detail_session_default = useHandleClosingDetailSession;
|
|
8476
|
-
|
|
8477
|
-
// src/hooks/view/use-create-pos-config.ts
|
|
8478
|
-
import { useMutation as useMutation69 } from "@tanstack/react-query";
|
|
8479
|
-
var useCreatePosConfig = () => {
|
|
8480
|
-
const { createPosConfig } = useViewService();
|
|
8481
|
-
return useMutation69({
|
|
8482
|
-
mutationFn: ({
|
|
8483
|
-
model,
|
|
8484
|
-
name,
|
|
8485
|
-
modulePosRestaurant,
|
|
8486
|
-
xNode,
|
|
8487
|
-
service
|
|
8488
|
-
}) => {
|
|
8489
|
-
return createPosConfig({
|
|
8490
|
-
model,
|
|
8491
|
-
name,
|
|
8492
|
-
modulePosRestaurant,
|
|
8493
|
-
xNode,
|
|
8494
|
-
service
|
|
8495
|
-
});
|
|
8496
|
-
}
|
|
8497
|
-
});
|
|
8498
|
-
};
|
|
8499
|
-
var use_create_pos_config_default = useCreatePosConfig;
|
|
8500
|
-
|
|
8501
|
-
// src/hooks/view/use-search-journal.ts
|
|
8502
|
-
import { useMutation as useMutation70 } from "@tanstack/react-query";
|
|
8503
|
-
var useSearchJournal = () => {
|
|
8504
|
-
const { searchJournal } = useViewService();
|
|
8505
|
-
return useMutation70({
|
|
8506
|
-
mutationFn: ({
|
|
8507
|
-
model,
|
|
8508
|
-
method,
|
|
8509
|
-
args,
|
|
8510
|
-
kwargs,
|
|
8511
|
-
xNode,
|
|
8512
|
-
service
|
|
8513
|
-
}) => {
|
|
8514
|
-
return searchJournal({
|
|
8515
|
-
model,
|
|
8516
|
-
method,
|
|
8517
|
-
args,
|
|
8518
|
-
kwargs,
|
|
8519
|
-
xNode,
|
|
8520
|
-
service
|
|
8521
|
-
});
|
|
8522
|
-
}
|
|
8523
|
-
});
|
|
8524
|
-
};
|
|
8525
|
-
var use_search_journal_default = useSearchJournal;
|
|
8526
|
-
|
|
8527
|
-
// src/hooks/view/useGetPreparaionDisplayData.ts
|
|
8528
|
-
import { useMutation as useMutation71 } from "@tanstack/react-query";
|
|
8529
|
-
var useGetPreparationDisplayData = () => {
|
|
8530
|
-
const { getPreparationDisplayData } = useViewService();
|
|
8531
|
-
return useMutation71({
|
|
8532
|
-
mutationFn: ({
|
|
8533
|
-
ids,
|
|
8534
|
-
service,
|
|
8535
|
-
xNode,
|
|
8536
|
-
withContext
|
|
8537
|
-
}) => {
|
|
8538
|
-
return getPreparationDisplayData({
|
|
8539
|
-
ids,
|
|
8540
|
-
service,
|
|
8541
|
-
xNode,
|
|
8542
|
-
withContext
|
|
8543
|
-
});
|
|
8544
|
-
}
|
|
8545
|
-
});
|
|
8546
|
-
};
|
|
8547
|
-
var useGetPreparaionDisplayData_default = useGetPreparationDisplayData;
|
|
8548
|
-
|
|
8549
|
-
// src/hooks/view/useChangeOrderPreparaionState.ts
|
|
8550
|
-
import { useMutation as useMutation72 } from "@tanstack/react-query";
|
|
8551
|
-
var useChangeOrderPreparationState = () => {
|
|
8552
|
-
const { changeOrderPreparaionState } = useViewService();
|
|
8553
|
-
return useMutation72({
|
|
8554
|
-
mutationFn: ({
|
|
8555
|
-
orderId,
|
|
8556
|
-
stageId,
|
|
8557
|
-
preparationDisplayId,
|
|
8558
|
-
service,
|
|
8559
|
-
xNode
|
|
8560
|
-
}) => {
|
|
8561
|
-
return changeOrderPreparaionState({
|
|
8562
|
-
orderId,
|
|
8563
|
-
stageId,
|
|
8564
|
-
preparationDisplayId,
|
|
8565
|
-
service,
|
|
8566
|
-
xNode
|
|
8567
|
-
});
|
|
8568
|
-
}
|
|
8569
|
-
});
|
|
8570
|
-
};
|
|
8571
|
-
var useChangeOrderPreparaionState_default = useChangeOrderPreparationState;
|
|
8572
|
-
|
|
8573
|
-
// src/hooks/view/use-update-order-status.ts
|
|
8574
|
-
import { useMutation as useMutation73 } from "@tanstack/react-query";
|
|
8575
|
-
var useUpdateOrderStatus = () => {
|
|
8576
|
-
const { updateOrderStatus } = useViewService();
|
|
8577
|
-
return useMutation73({
|
|
8578
|
-
mutationFn: ({
|
|
8579
|
-
orderId,
|
|
8580
|
-
state,
|
|
8581
|
-
service,
|
|
8582
|
-
xNode
|
|
8583
|
-
}) => {
|
|
8584
|
-
return updateOrderStatus({
|
|
8585
|
-
orderId,
|
|
8586
|
-
state,
|
|
8587
|
-
service,
|
|
8588
|
-
xNode
|
|
8589
|
-
});
|
|
8590
|
-
}
|
|
8591
|
-
});
|
|
8592
|
-
};
|
|
8593
|
-
var use_update_order_status_default = useUpdateOrderStatus;
|
|
8594
|
-
|
|
8595
|
-
// src/hooks/view/use-process-order.ts
|
|
8596
|
-
import { useMutation as useMutation74 } from "@tanstack/react-query";
|
|
8597
|
-
var useProcessOrder = () => {
|
|
8598
|
-
const { processOrder } = useViewService();
|
|
8599
|
-
return useMutation74({
|
|
8600
|
-
mutationFn: ({
|
|
8601
|
-
orderId,
|
|
8602
|
-
xNode,
|
|
8603
|
-
service
|
|
8604
|
-
}) => processOrder({
|
|
8605
|
-
orderId,
|
|
8606
|
-
xNode,
|
|
8607
|
-
service
|
|
8608
|
-
})
|
|
8609
|
-
});
|
|
8610
|
-
};
|
|
8611
|
-
var use_process_order_default = useProcessOrder;
|
|
8612
|
-
|
|
8613
|
-
// src/hooks/view/use-generate-payment-qr-info.ts
|
|
8614
|
-
import { useMutation as useMutation75 } from "@tanstack/react-query";
|
|
8615
|
-
var useGeneratePaymentQrInfo = () => {
|
|
8616
|
-
const { generatePaymentQRInfo } = useViewService();
|
|
8617
|
-
return useMutation75({
|
|
8618
|
-
mutationFn: ({
|
|
8619
|
-
orderId,
|
|
8620
|
-
amount,
|
|
8621
|
-
posSessionId,
|
|
8622
|
-
xNode,
|
|
8623
|
-
service
|
|
8624
|
-
}) => {
|
|
8625
|
-
return generatePaymentQRInfo({
|
|
8626
|
-
orderId,
|
|
8627
|
-
amount,
|
|
8628
|
-
posSessionId,
|
|
8629
|
-
xNode,
|
|
8630
|
-
service
|
|
8631
|
-
});
|
|
8632
|
-
}
|
|
8633
|
-
});
|
|
8634
|
-
};
|
|
8635
|
-
var use_generate_payment_qr_info_default = useGeneratePaymentQrInfo;
|
|
8636
|
-
|
|
8637
|
-
// src/hooks/view/use-save-pin-code.ts
|
|
8638
|
-
import { useMutation as useMutation76 } from "@tanstack/react-query";
|
|
8639
|
-
var useSavePinCode = () => {
|
|
8640
|
-
const { savePinCode } = useViewService();
|
|
8641
|
-
return useMutation76({
|
|
8642
|
-
mutationFn: ({
|
|
8643
|
-
serialNumber,
|
|
8644
|
-
pinCode,
|
|
8645
|
-
xNode,
|
|
8646
|
-
service
|
|
8647
|
-
}) => {
|
|
8648
|
-
return savePinCode({
|
|
8649
|
-
serialNumber,
|
|
8650
|
-
pinCode,
|
|
8651
|
-
xNode,
|
|
8652
|
-
service
|
|
8653
|
-
});
|
|
8654
|
-
}
|
|
8655
|
-
});
|
|
8656
|
-
};
|
|
8657
|
-
var use_save_pin_code_default = useSavePinCode;
|
|
8658
|
-
|
|
8659
|
-
// src/hooks/view/use-get-pin-code.ts
|
|
8660
|
-
import { useMutation as useMutation77 } from "@tanstack/react-query";
|
|
8661
|
-
var useGetPinCode = () => {
|
|
8662
|
-
const { getPinCode } = useViewService();
|
|
8663
|
-
return useMutation77({
|
|
8664
|
-
mutationFn: ({
|
|
8665
|
-
serialNumber,
|
|
8666
|
-
xNode,
|
|
8667
|
-
service
|
|
8668
|
-
}) => {
|
|
8669
|
-
return getPinCode({
|
|
8670
|
-
serialNumber,
|
|
8671
|
-
xNode,
|
|
8672
|
-
service
|
|
8273
|
+
service,
|
|
8274
|
+
xNode
|
|
8673
8275
|
});
|
|
8674
8276
|
}
|
|
8675
8277
|
});
|
|
8676
8278
|
};
|
|
8677
|
-
var
|
|
8279
|
+
var use_gen_serial_number_default = useGenSerialNumber;
|
|
8678
8280
|
|
|
8679
8281
|
// src/hooks/view/use-get-notifications.ts
|
|
8680
8282
|
import { useQuery as useQuery23 } from "@tanstack/react-query";
|
|
@@ -8698,10 +8300,10 @@ var useGetNotifications = ({
|
|
|
8698
8300
|
var use_get_notifications_default = useGetNotifications;
|
|
8699
8301
|
|
|
8700
8302
|
// src/hooks/view/use-get-version.ts
|
|
8701
|
-
import { useMutation as
|
|
8303
|
+
import { useMutation as useMutation52 } from "@tanstack/react-query";
|
|
8702
8304
|
var useGetVersion = () => {
|
|
8703
8305
|
const { getVersion } = useViewService();
|
|
8704
|
-
return
|
|
8306
|
+
return useMutation52({
|
|
8705
8307
|
mutationFn: () => {
|
|
8706
8308
|
return getVersion();
|
|
8707
8309
|
}
|
|
@@ -8709,52 +8311,11 @@ var useGetVersion = () => {
|
|
|
8709
8311
|
};
|
|
8710
8312
|
var use_get_version_default = useGetVersion;
|
|
8711
8313
|
|
|
8712
|
-
// src/hooks/view/use-create-e-invoice.ts
|
|
8713
|
-
import { useMutation as useMutation79 } from "@tanstack/react-query";
|
|
8714
|
-
var useCreateEInvoice = () => {
|
|
8715
|
-
const { createEInvoice } = useViewService();
|
|
8716
|
-
return useMutation79({
|
|
8717
|
-
mutationFn: ({
|
|
8718
|
-
service,
|
|
8719
|
-
xNode,
|
|
8720
|
-
kwargs,
|
|
8721
|
-
ids,
|
|
8722
|
-
withContext
|
|
8723
|
-
}) => {
|
|
8724
|
-
return createEInvoice({
|
|
8725
|
-
kwargs,
|
|
8726
|
-
ids,
|
|
8727
|
-
xNode,
|
|
8728
|
-
service,
|
|
8729
|
-
withContext
|
|
8730
|
-
});
|
|
8731
|
-
}
|
|
8732
|
-
});
|
|
8733
|
-
};
|
|
8734
|
-
var use_create_e_invoice_default = useCreateEInvoice;
|
|
8735
|
-
|
|
8736
|
-
// src/hooks/view/use-get-current-user.ts
|
|
8737
|
-
import { useMutation as useMutation80 } from "@tanstack/react-query";
|
|
8738
|
-
var useGetCurrentUser = () => {
|
|
8739
|
-
const { getCurrentUser } = useViewService();
|
|
8740
|
-
return useMutation80({
|
|
8741
|
-
mutationFn: ({
|
|
8742
|
-
service,
|
|
8743
|
-
xNode,
|
|
8744
|
-
oauthUid,
|
|
8745
|
-
extraHeaders
|
|
8746
|
-
}) => {
|
|
8747
|
-
return getCurrentUser({ service, xNode, oauthUid, extraHeaders });
|
|
8748
|
-
}
|
|
8749
|
-
});
|
|
8750
|
-
};
|
|
8751
|
-
var use_get_current_user_default = useGetCurrentUser;
|
|
8752
|
-
|
|
8753
8314
|
// src/hooks/view/use-get-ward.ts
|
|
8754
|
-
import { useMutation as
|
|
8315
|
+
import { useMutation as useMutation53 } from "@tanstack/react-query";
|
|
8755
8316
|
var useGetWard = () => {
|
|
8756
8317
|
const { getWard } = useViewService();
|
|
8757
|
-
return
|
|
8318
|
+
return useMutation53({
|
|
8758
8319
|
mutationFn: ({
|
|
8759
8320
|
service,
|
|
8760
8321
|
xNode,
|
|
@@ -8771,10 +8332,10 @@ var useGetWard = () => {
|
|
|
8771
8332
|
var use_get_ward_default = useGetWard;
|
|
8772
8333
|
|
|
8773
8334
|
// src/hooks/view/use-get-city.ts
|
|
8774
|
-
import { useMutation as
|
|
8335
|
+
import { useMutation as useMutation54 } from "@tanstack/react-query";
|
|
8775
8336
|
var useGetCity = () => {
|
|
8776
8337
|
const { getCity } = useViewService();
|
|
8777
|
-
return
|
|
8338
|
+
return useMutation54({
|
|
8778
8339
|
mutationFn: ({
|
|
8779
8340
|
service,
|
|
8780
8341
|
xNode,
|
|
@@ -8793,10 +8354,10 @@ var useGetCity = () => {
|
|
|
8793
8354
|
var use_get_city_default = useGetCity;
|
|
8794
8355
|
|
|
8795
8356
|
// src/hooks/view/use-get-country.ts
|
|
8796
|
-
import { useMutation as
|
|
8357
|
+
import { useMutation as useMutation55 } from "@tanstack/react-query";
|
|
8797
8358
|
var useGetCountry = () => {
|
|
8798
8359
|
const { getCountry } = useViewService();
|
|
8799
|
-
return
|
|
8360
|
+
return useMutation55({
|
|
8800
8361
|
mutationFn: ({
|
|
8801
8362
|
service,
|
|
8802
8363
|
xNode,
|
|
@@ -8815,10 +8376,10 @@ var useGetCountry = () => {
|
|
|
8815
8376
|
var use_get_country_default = useGetCountry;
|
|
8816
8377
|
|
|
8817
8378
|
// src/hooks/view/use-get-partner-title.ts
|
|
8818
|
-
import { useMutation as
|
|
8379
|
+
import { useMutation as useMutation56 } from "@tanstack/react-query";
|
|
8819
8380
|
var useGetPartnerTitle = () => {
|
|
8820
8381
|
const { getPartnerTitle } = useViewService();
|
|
8821
|
-
return
|
|
8382
|
+
return useMutation56({
|
|
8822
8383
|
mutationFn: ({
|
|
8823
8384
|
service,
|
|
8824
8385
|
xNode,
|
|
@@ -8873,15 +8434,295 @@ var useGetDataChart = (services, xNode, body, enabled, path, method, queryKey) =
|
|
|
8873
8434
|
var use_get_data_chart_default = useGetDataChart;
|
|
8874
8435
|
|
|
8875
8436
|
// src/hooks/pos/use-add-entity.ts
|
|
8876
|
-
import { useMutation as
|
|
8437
|
+
import { useMutation as useMutation57 } from "@tanstack/react-query";
|
|
8877
8438
|
var useAddEntity = () => {
|
|
8878
8439
|
const { addEntity } = usePosService();
|
|
8879
|
-
return
|
|
8440
|
+
return useMutation57({
|
|
8880
8441
|
mutationFn: addEntity
|
|
8881
8442
|
});
|
|
8882
8443
|
};
|
|
8883
8444
|
var use_add_entity_default = useAddEntity;
|
|
8884
8445
|
|
|
8446
|
+
// src/hooks/pos/use-get-a-session.ts
|
|
8447
|
+
import { useMutation as useMutation58 } from "@tanstack/react-query";
|
|
8448
|
+
var useGetASession = () => {
|
|
8449
|
+
const pos = usePosService();
|
|
8450
|
+
return useMutation58({
|
|
8451
|
+
mutationFn: pos.getASession
|
|
8452
|
+
});
|
|
8453
|
+
};
|
|
8454
|
+
var use_get_a_session_default = useGetASession;
|
|
8455
|
+
|
|
8456
|
+
// src/hooks/pos/use-change-order-preparation-state.ts
|
|
8457
|
+
import { useMutation as useMutation59 } from "@tanstack/react-query";
|
|
8458
|
+
var useChangeOrderPreparationState = () => {
|
|
8459
|
+
const pos = usePosService();
|
|
8460
|
+
return useMutation59({
|
|
8461
|
+
mutationFn: pos.changeOrderPreparationState
|
|
8462
|
+
});
|
|
8463
|
+
};
|
|
8464
|
+
var use_change_order_preparation_state_default = useChangeOrderPreparationState;
|
|
8465
|
+
|
|
8466
|
+
// src/hooks/pos/use-check-payment.ts
|
|
8467
|
+
import { useMutation as useMutation60 } from "@tanstack/react-query";
|
|
8468
|
+
var useCheckPayment = () => {
|
|
8469
|
+
const pos = usePosService();
|
|
8470
|
+
return useMutation60({
|
|
8471
|
+
mutationFn: pos.checkPayment
|
|
8472
|
+
});
|
|
8473
|
+
};
|
|
8474
|
+
var use_check_payment_default = useCheckPayment;
|
|
8475
|
+
|
|
8476
|
+
// src/hooks/pos/use-create-e-invoice.ts
|
|
8477
|
+
import { useMutation as useMutation61 } from "@tanstack/react-query";
|
|
8478
|
+
var useCreateEInvoice = () => {
|
|
8479
|
+
const pos = usePosService();
|
|
8480
|
+
return useMutation61({
|
|
8481
|
+
mutationFn: pos.createEInvoice
|
|
8482
|
+
});
|
|
8483
|
+
};
|
|
8484
|
+
var use_create_e_invoice_default = useCreateEInvoice;
|
|
8485
|
+
|
|
8486
|
+
// src/hooks/pos/use-create-entity.ts
|
|
8487
|
+
import { useMutation as useMutation62 } from "@tanstack/react-query";
|
|
8488
|
+
var useCreateEntity = () => {
|
|
8489
|
+
const pos = usePosService();
|
|
8490
|
+
return useMutation62({
|
|
8491
|
+
mutationFn: pos.createEntity
|
|
8492
|
+
});
|
|
8493
|
+
};
|
|
8494
|
+
var use_create_entity_default = useCreateEntity;
|
|
8495
|
+
|
|
8496
|
+
// src/hooks/pos/use-create-pos-config.ts
|
|
8497
|
+
import { useMutation as useMutation63 } from "@tanstack/react-query";
|
|
8498
|
+
var useCreatePosConfig = () => {
|
|
8499
|
+
const pos = usePosService();
|
|
8500
|
+
return useMutation63({
|
|
8501
|
+
mutationFn: pos.createPosConfig
|
|
8502
|
+
});
|
|
8503
|
+
};
|
|
8504
|
+
var use_create_pos_config_default = useCreatePosConfig;
|
|
8505
|
+
|
|
8506
|
+
// src/hooks/pos/use-create-session.ts
|
|
8507
|
+
import { useMutation as useMutation64 } from "@tanstack/react-query";
|
|
8508
|
+
var useCreateSession = () => {
|
|
8509
|
+
const pos = usePosService();
|
|
8510
|
+
return useMutation64({
|
|
8511
|
+
mutationFn: pos.createSession
|
|
8512
|
+
});
|
|
8513
|
+
};
|
|
8514
|
+
var use_create_session_default = useCreateSession;
|
|
8515
|
+
|
|
8516
|
+
// src/hooks/pos/use-delete-entity.ts
|
|
8517
|
+
import { useMutation as useMutation65 } from "@tanstack/react-query";
|
|
8518
|
+
var useDeleteEntity = () => {
|
|
8519
|
+
const pos = usePosService();
|
|
8520
|
+
return useMutation65({
|
|
8521
|
+
mutationFn: pos.deleteEntity
|
|
8522
|
+
});
|
|
8523
|
+
};
|
|
8524
|
+
var use_delete_entity_default = useDeleteEntity;
|
|
8525
|
+
|
|
8526
|
+
// src/hooks/pos/use-generate-payment-qr-info.ts
|
|
8527
|
+
import { useMutation as useMutation66 } from "@tanstack/react-query";
|
|
8528
|
+
var useGeneratePaymentQrInfo = () => {
|
|
8529
|
+
const pos = usePosService();
|
|
8530
|
+
return useMutation66({
|
|
8531
|
+
mutationFn: pos.generatePaymentQRInfo
|
|
8532
|
+
});
|
|
8533
|
+
};
|
|
8534
|
+
var use_generate_payment_qr_info_default = useGeneratePaymentQrInfo;
|
|
8535
|
+
|
|
8536
|
+
// src/hooks/pos/use-get-current-user.ts
|
|
8537
|
+
import { useMutation as useMutation67 } from "@tanstack/react-query";
|
|
8538
|
+
var useGetCurrentUser = () => {
|
|
8539
|
+
const pos = usePosService();
|
|
8540
|
+
return useMutation67({
|
|
8541
|
+
mutationFn: pos.getCurrentUser
|
|
8542
|
+
});
|
|
8543
|
+
};
|
|
8544
|
+
var use_get_current_user_default = useGetCurrentUser;
|
|
8545
|
+
|
|
8546
|
+
// src/hooks/pos/use-get-list.ts
|
|
8547
|
+
import { useMutation as useMutation68 } from "@tanstack/react-query";
|
|
8548
|
+
var useGetList = () => {
|
|
8549
|
+
const pos = usePosService();
|
|
8550
|
+
return useMutation68({
|
|
8551
|
+
mutationFn: pos.getList
|
|
8552
|
+
});
|
|
8553
|
+
};
|
|
8554
|
+
var use_get_list_default = useGetList;
|
|
8555
|
+
|
|
8556
|
+
// src/hooks/pos/use-get-order-line.ts
|
|
8557
|
+
import { useMutation as useMutation69 } from "@tanstack/react-query";
|
|
8558
|
+
var useGetOrderLine = () => {
|
|
8559
|
+
const pos = usePosService();
|
|
8560
|
+
return useMutation69({
|
|
8561
|
+
mutationFn: pos.getOrderLine
|
|
8562
|
+
});
|
|
8563
|
+
};
|
|
8564
|
+
var use_get_order_line_default = useGetOrderLine;
|
|
8565
|
+
|
|
8566
|
+
// src/hooks/pos/use-get-pin-code.ts
|
|
8567
|
+
import { useMutation as useMutation70 } from "@tanstack/react-query";
|
|
8568
|
+
var useGetPinCode = () => {
|
|
8569
|
+
const pos = usePosService();
|
|
8570
|
+
return useMutation70({
|
|
8571
|
+
mutationFn: pos.getPinCode
|
|
8572
|
+
});
|
|
8573
|
+
};
|
|
8574
|
+
var use_get_pin_code_default = useGetPinCode;
|
|
8575
|
+
|
|
8576
|
+
// src/hooks/pos/use-get-pos.ts
|
|
8577
|
+
import { useMutation as useMutation71 } from "@tanstack/react-query";
|
|
8578
|
+
var useGetPos = () => {
|
|
8579
|
+
const pos = usePosService();
|
|
8580
|
+
return useMutation71({
|
|
8581
|
+
mutationFn: pos.getPOS
|
|
8582
|
+
});
|
|
8583
|
+
};
|
|
8584
|
+
var use_get_pos_default = useGetPos;
|
|
8585
|
+
|
|
8586
|
+
// src/hooks/pos/use-get-preparation-display-data.ts
|
|
8587
|
+
import { useMutation as useMutation72 } from "@tanstack/react-query";
|
|
8588
|
+
var useGetPreparationDisplayData = () => {
|
|
8589
|
+
const pos = usePosService();
|
|
8590
|
+
return useMutation72({
|
|
8591
|
+
mutationFn: pos.getPreparationDisplayData
|
|
8592
|
+
});
|
|
8593
|
+
};
|
|
8594
|
+
var use_get_preparation_display_data_default = useGetPreparationDisplayData;
|
|
8595
|
+
|
|
8596
|
+
// src/hooks/pos/use-get-product-image.ts
|
|
8597
|
+
import { useMutation as useMutation73 } from "@tanstack/react-query";
|
|
8598
|
+
var useGetProductImage = () => {
|
|
8599
|
+
const pos = usePosService();
|
|
8600
|
+
return useMutation73({
|
|
8601
|
+
mutationFn: pos.getProductImage
|
|
8602
|
+
});
|
|
8603
|
+
};
|
|
8604
|
+
var use_get_product_image_default = useGetProductImage;
|
|
8605
|
+
|
|
8606
|
+
// src/hooks/pos/use-handle-close-session.ts
|
|
8607
|
+
import { useMutation as useMutation74 } from "@tanstack/react-query";
|
|
8608
|
+
var useHandleCloseSession = () => {
|
|
8609
|
+
const pos = usePosService();
|
|
8610
|
+
return useMutation74({
|
|
8611
|
+
mutationFn: pos.handleCloseSession
|
|
8612
|
+
});
|
|
8613
|
+
};
|
|
8614
|
+
var use_handle_close_session_default = useHandleCloseSession;
|
|
8615
|
+
|
|
8616
|
+
// src/hooks/pos/use-handle-closing-detail-session.ts
|
|
8617
|
+
import { useMutation as useMutation75 } from "@tanstack/react-query";
|
|
8618
|
+
var useHandleClosingDetailSession = () => {
|
|
8619
|
+
const pos = usePosService();
|
|
8620
|
+
return useMutation75({
|
|
8621
|
+
mutationFn: pos.handleClosingDetailSession
|
|
8622
|
+
});
|
|
8623
|
+
};
|
|
8624
|
+
var use_handle_closing_detail_session_default = useHandleClosingDetailSession;
|
|
8625
|
+
|
|
8626
|
+
// src/hooks/pos/use-handle-closing-session.ts
|
|
8627
|
+
import { useMutation as useMutation76 } from "@tanstack/react-query";
|
|
8628
|
+
var useHandleClosingSession = () => {
|
|
8629
|
+
const pos = usePosService();
|
|
8630
|
+
return useMutation76({
|
|
8631
|
+
mutationFn: pos.handleClosingSession
|
|
8632
|
+
});
|
|
8633
|
+
};
|
|
8634
|
+
var use_handle_closing_session_default = useHandleClosingSession;
|
|
8635
|
+
|
|
8636
|
+
// src/hooks/pos/use-load-data-pos-session.ts
|
|
8637
|
+
import { useMutation as useMutation77 } from "@tanstack/react-query";
|
|
8638
|
+
var useLoadDataPosSession = () => {
|
|
8639
|
+
const pos = usePosService();
|
|
8640
|
+
return useMutation77({
|
|
8641
|
+
mutationFn: pos.loadDataPosSession
|
|
8642
|
+
});
|
|
8643
|
+
};
|
|
8644
|
+
var use_load_data_pos_session_default = useLoadDataPosSession;
|
|
8645
|
+
|
|
8646
|
+
// src/hooks/pos/use-manage-onchange.ts
|
|
8647
|
+
import { useMutation as useMutation78 } from "@tanstack/react-query";
|
|
8648
|
+
var useManageOnChange = () => {
|
|
8649
|
+
const pos = usePosService();
|
|
8650
|
+
return useMutation78({
|
|
8651
|
+
mutationFn: pos.manageOnChange
|
|
8652
|
+
});
|
|
8653
|
+
};
|
|
8654
|
+
var use_manage_onchange_default = useManageOnChange;
|
|
8655
|
+
|
|
8656
|
+
// src/hooks/pos/use-manage-session.ts
|
|
8657
|
+
import { useMutation as useMutation79 } from "@tanstack/react-query";
|
|
8658
|
+
var useManageSession = () => {
|
|
8659
|
+
const pos = usePosService();
|
|
8660
|
+
return useMutation79({
|
|
8661
|
+
mutationFn: pos.manageSession
|
|
8662
|
+
});
|
|
8663
|
+
};
|
|
8664
|
+
var use_manage_session_default = useManageSession;
|
|
8665
|
+
|
|
8666
|
+
// src/hooks/pos/use-process-order.ts
|
|
8667
|
+
import { useMutation as useMutation80 } from "@tanstack/react-query";
|
|
8668
|
+
var useProcessOrder = () => {
|
|
8669
|
+
const pos = usePosService();
|
|
8670
|
+
return useMutation80({
|
|
8671
|
+
mutationFn: pos.processOrder
|
|
8672
|
+
});
|
|
8673
|
+
};
|
|
8674
|
+
var use_process_order_default = useProcessOrder;
|
|
8675
|
+
|
|
8676
|
+
// src/hooks/pos/use-save-pin-code.ts
|
|
8677
|
+
import { useMutation as useMutation81 } from "@tanstack/react-query";
|
|
8678
|
+
var useSavePinCode = () => {
|
|
8679
|
+
const pos = usePosService();
|
|
8680
|
+
return useMutation81({
|
|
8681
|
+
mutationFn: pos.savePinCode
|
|
8682
|
+
});
|
|
8683
|
+
};
|
|
8684
|
+
var use_save_pin_code_default = useSavePinCode;
|
|
8685
|
+
|
|
8686
|
+
// src/hooks/pos/use-search-journal.ts
|
|
8687
|
+
import { useMutation as useMutation82 } from "@tanstack/react-query";
|
|
8688
|
+
var useSearchJournal = () => {
|
|
8689
|
+
const pos = usePosService();
|
|
8690
|
+
return useMutation82({
|
|
8691
|
+
mutationFn: pos.searchJournal
|
|
8692
|
+
});
|
|
8693
|
+
};
|
|
8694
|
+
var use_search_journal_default = useSearchJournal;
|
|
8695
|
+
|
|
8696
|
+
// src/hooks/pos/use-update-closed-session.ts
|
|
8697
|
+
import { useMutation as useMutation83 } from "@tanstack/react-query";
|
|
8698
|
+
var useUpdateClosedSession = () => {
|
|
8699
|
+
const pos = usePosService();
|
|
8700
|
+
return useMutation83({
|
|
8701
|
+
mutationFn: pos.updateClosedSession
|
|
8702
|
+
});
|
|
8703
|
+
};
|
|
8704
|
+
var use_update_closed_session_default = useUpdateClosedSession;
|
|
8705
|
+
|
|
8706
|
+
// src/hooks/pos/use-update-entity.ts
|
|
8707
|
+
import { useMutation as useMutation84 } from "@tanstack/react-query";
|
|
8708
|
+
var useUpdateEntity = () => {
|
|
8709
|
+
const pos = usePosService();
|
|
8710
|
+
return useMutation84({
|
|
8711
|
+
mutationFn: pos.updateEntity
|
|
8712
|
+
});
|
|
8713
|
+
};
|
|
8714
|
+
var use_update_entity_default = useUpdateEntity;
|
|
8715
|
+
|
|
8716
|
+
// src/hooks/pos/use-update-order-status.ts
|
|
8717
|
+
import { useMutation as useMutation85 } from "@tanstack/react-query";
|
|
8718
|
+
var useUpdateOrderStatus = () => {
|
|
8719
|
+
const pos = usePosService();
|
|
8720
|
+
return useMutation85({
|
|
8721
|
+
mutationFn: pos.updateOrderStatus
|
|
8722
|
+
});
|
|
8723
|
+
};
|
|
8724
|
+
var use_update_order_status_default = useUpdateOrderStatus;
|
|
8725
|
+
|
|
8885
8726
|
// src/provider/service-provider.tsx
|
|
8886
8727
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
8887
8728
|
var ServiceContext = createContext2(null);
|
|
@@ -8969,7 +8810,7 @@ var ServiceProvider = ({
|
|
|
8969
8810
|
useUpdateClosedSession: use_update_closed_session_default,
|
|
8970
8811
|
useUpdateEntity: use_update_entity_default,
|
|
8971
8812
|
useLoadDataPosSession: use_load_data_pos_session_default,
|
|
8972
|
-
useManageOnChange:
|
|
8813
|
+
useManageOnChange: use_manage_onchange_default,
|
|
8973
8814
|
useGenSerialNumber: use_gen_serial_number_default,
|
|
8974
8815
|
useGetOrderLine: use_get_order_line_default,
|
|
8975
8816
|
useGetProductImage: use_get_product_image_default,
|
|
@@ -8981,8 +8822,8 @@ var ServiceProvider = ({
|
|
|
8981
8822
|
useSearchJournal: use_search_journal_default,
|
|
8982
8823
|
useGetTenantMapping: use_get_tenant_mapping_default,
|
|
8983
8824
|
useGetToken: use_get_token_default,
|
|
8984
|
-
useGetPreparationDisplayData:
|
|
8985
|
-
|
|
8825
|
+
useGetPreparationDisplayData: use_get_preparation_display_data_default,
|
|
8826
|
+
useChangeOrderPreparationState: use_change_order_preparation_state_default,
|
|
8986
8827
|
useUpdateOrderStatus: use_update_order_status_default,
|
|
8987
8828
|
useGetThreadData: use_get_thread_data_default,
|
|
8988
8829
|
useGetThreadMessages: use_get_thread_messages_default,
|