@fctc/interface-logic 4.4.6 → 4.4.8

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/services.js CHANGED
@@ -45,7 +45,7 @@ __export(services_exports, {
45
45
  module.exports = __toCommonJS(services_exports);
46
46
 
47
47
  // src/services/action-service/index.ts
48
- var import_react39 = require("react");
48
+ var import_react41 = require("react");
49
49
 
50
50
  // src/constants/api/uri-constant.ts
51
51
  var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
@@ -142,11 +142,31 @@ var LoadDataModel = /* @__PURE__ */ ((LoadDataModel2) => {
142
142
  LoadDataModel2["UOM_UOM"] = "uom.uom";
143
143
  LoadDataModel2["LOYALTY_PROGRAM"] = "loyalty.program";
144
144
  LoadDataModel2["LOYALTY_RULE"] = "loyalty.rule";
145
+ LoadDataModel2["LOYALTY_REWARD"] = "loyalty.reward";
145
146
  LoadDataModel2["RESTAURANT_TABLE"] = "restaurant.table";
146
147
  LoadDataModel2["RESTAURANT_FLOOR"] = "restaurant.floor";
147
148
  LoadDataModel2["POS_MAKE_PAYMENT"] = "pos.make.payment";
148
149
  return LoadDataModel2;
149
150
  })(LoadDataModel || {});
151
+ var MODEL_TO_TABLE = {
152
+ ["account.tax" /* ACCOUNT_TAX */]: "account_taxes" /* ACCOUNT_TAXES */,
153
+ ["res.company" /* RES_COMPANY */]: "companies" /* COMPANIES */,
154
+ ["res.partner" /* RES_PARTNER */]: "customers" /* CUSTOMERS */,
155
+ ["res.users" /* RES_USERS */]: "employees" /* EMPLOYEES */,
156
+ ["loyalty.program" /* LOYALTY_PROGRAM */]: "loyalty_programs" /* LOYALTY_PROGRAMS */,
157
+ ["loyalty.rule" /* LOYALTY_RULE */]: "loyalty_rules" /* LOYALTY_RULES */,
158
+ ["loyalty.reward" /* LOYALTY_REWARD */]: "loyalty_rewards" /* LOYALTY_REWARDS */,
159
+ ["pos.config" /* POS_CONFIG */]: "pos_configs" /* POS_CONFIGS */,
160
+ ["pos.session" /* POS_SESSION */]: "pos_sessions" /* POS_SESSIONS */,
161
+ ["pos.order.line" /* POS_ORDER_LINE */]: "order_lines" /* ORDER_LINES */,
162
+ ["pos.order" /* POS_ORDER */]: "orders" /* ORDERS */,
163
+ ["pos.payment.method" /* POS_PAYMENT_METHOD */]: "payment_methods" /* PAYMENT_METHODS */,
164
+ ["pos.payment" /* POS_PAYMENT */]: "payments" /* PAYMENTS */,
165
+ ["pos.category" /* POS_CATEGORY */]: "product_categories" /* PRODUCT_CATEGORIES */,
166
+ ["product.product" /* PRODUCT_PRODUCT */]: "products" /* PRODUCTS */,
167
+ ["restaurant.floor" /* RESTAURANT_FLOOR */]: "restaurant_floors" /* RESTAURANT_FLOORS */,
168
+ ["restaurant.table" /* RESTAURANT_TABLE */]: "restaurant_tables" /* RESTAURANT_TABLES */
169
+ };
150
170
 
151
171
  // src/utils/domain/py_tokenizer.ts
152
172
  var TokenizerError = class extends Error {
@@ -2935,7 +2955,7 @@ function useEnv() {
2935
2955
  }
2936
2956
 
2937
2957
  // src/provider/service-provider.tsx
2938
- var import_react37 = require("react");
2958
+ var import_react39 = require("react");
2939
2959
 
2940
2960
  // src/hooks/auth/use-forgot-password.ts
2941
2961
  var import_react_query3 = require("@tanstack/react-query");
@@ -3249,8 +3269,13 @@ var addEntityService = (env) => {
3249
3269
  values,
3250
3270
  xNode,
3251
3271
  service,
3252
- isCreateEndpoint = false
3272
+ isCreateEndpoint = false,
3273
+ isSupa = false,
3274
+ supaCallback
3253
3275
  }) => {
3276
+ if (isSupa && supaCallback) {
3277
+ return supaCallback(values);
3278
+ }
3254
3279
  const jsonData = {
3255
3280
  model,
3256
3281
  values
@@ -3972,22 +3997,12 @@ var useSupabaseOptional = () => {
3972
3997
  };
3973
3998
 
3974
3999
  // src/services/pos-service/load-data-pos-session.ts
3975
- var MODEL_TO_TABLE = {
3976
- ["account.tax" /* ACCOUNT_TAX */]: "account_taxes",
3977
- ["res.company" /* RES_COMPANY */]: "companies",
3978
- ["res.partner" /* RES_PARTNER */]: "customers",
3979
- ["res.users" /* RES_USERS */]: "employees",
3980
- ["loyalty.program" /* LOYALTY_PROGRAM */]: "loyalty_programs",
3981
- ["loyalty.rule" /* LOYALTY_RULE */]: "loyalty_rules",
3982
- ["pos.order.line" /* POS_ORDER_LINE */]: "order_lines",
3983
- ["pos.order" /* POS_ORDER */]: "orders",
3984
- ["pos.payment.method" /* POS_PAYMENT_METHOD */]: "payment_methods",
3985
- ["pos.payment" /* POS_PAYMENT */]: "payments",
3986
- ["product.category" /* PRODUCT_CATEGORY */]: "product_categories",
3987
- ["product.product" /* PRODUCT_PRODUCT */]: "products",
3988
- ["restaurant.floor" /* RESTAURANT_FLOOR */]: "restaurant_floors",
3989
- ["restaurant.table" /* RESTAURANT_TABLE */]: "restaurant_tables"
3990
- };
4000
+ var createModelResult = (modelName, data = []) => ({
4001
+ modelName,
4002
+ data,
4003
+ fields: {},
4004
+ relations: {}
4005
+ });
3991
4006
  var loadDataPosSessionService = (env) => {
3992
4007
  const supabase = useSupabaseOptional();
3993
4008
  const loadDataPosSession = (0, import_react27.useCallback)(
@@ -4029,56 +4044,25 @@ var loadDataPosSessionService = (env) => {
4029
4044
  [env]
4030
4045
  );
4031
4046
  const loadDataPosSessionSupabase = (0, import_react27.useCallback)(async () => {
4047
+ if (!supabase) return {};
4032
4048
  try {
4033
4049
  const allModels = Object.values(LoadDataModel);
4034
- const promises = allModels.map(async (modelName) => {
4035
- const tableName = MODEL_TO_TABLE[modelName];
4036
- if (!tableName) {
4037
- return {
4038
- modelName,
4039
- data: [],
4040
- fields: {},
4041
- relations: {}
4042
- };
4043
- }
4044
- if (!supabase) {
4045
- return {
4046
- modelName,
4047
- data: [],
4048
- fields: {},
4049
- relations: {}
4050
- };
4051
- }
4052
- const { data, error } = await supabase.from(tableName).select("*");
4053
- if (error) {
4054
- console.error(`Error loading ${modelName}:`, error);
4055
- return {
4056
- modelName,
4057
- data: [],
4058
- fields: {},
4059
- relations: {}
4060
- };
4061
- }
4062
- return {
4063
- modelName,
4064
- data: data || [],
4065
- fields: {},
4066
- relations: {}
4067
- };
4068
- });
4069
- const results = await Promise.all(promises);
4070
- const response = results.reduce(
4071
- (acc, { modelName, data, fields, relations }) => {
4072
- acc[modelName] = {
4073
- data,
4074
- fields,
4075
- relations
4076
- };
4077
- return acc;
4078
- },
4079
- {}
4050
+ const results = await Promise.all(
4051
+ allModels.map(async (modelName) => {
4052
+ const tableName = MODEL_TO_TABLE[modelName];
4053
+ if (!tableName) return createModelResult(modelName);
4054
+ const { data, error } = await supabase.from(tableName).select("*");
4055
+ if (error) {
4056
+ console.error(`Error loading ${modelName}:`, error);
4057
+ return createModelResult(modelName);
4058
+ }
4059
+ return createModelResult(modelName, data || []);
4060
+ })
4080
4061
  );
4081
- return response;
4062
+ return results.reduce((acc, { modelName, ...rest }) => {
4063
+ acc[modelName] = rest;
4064
+ return acc;
4065
+ }, {});
4082
4066
  } catch (error) {
4083
4067
  console.error("Error loading data from Supabase:", error);
4084
4068
  return {};
@@ -4547,18 +4531,30 @@ var import_react_query113 = require("@tanstack/react-query");
4547
4531
  // src/hooks/pos/use-complete-current-stage.ts
4548
4532
  var import_react_query114 = require("@tanstack/react-query");
4549
4533
 
4534
+ // src/hooks/pos/supabase/use-add-floor.ts
4535
+ var import_react_query115 = require("@tanstack/react-query");
4536
+
4537
+ // src/services/pos-service/supabase/add-floor.ts
4538
+ var import_react37 = require("react");
4539
+
4540
+ // src/services/pos-service/supabase/add-table.ts
4541
+ var import_react38 = require("react");
4542
+
4543
+ // src/hooks/pos/supabase/use-add-table.ts
4544
+ var import_react_query116 = require("@tanstack/react-query");
4545
+
4550
4546
  // src/provider/service-provider.tsx
4551
4547
  var import_jsx_runtime7 = require("react/jsx-runtime");
4552
- var ServiceContext = (0, import_react37.createContext)(null);
4548
+ var ServiceContext = (0, import_react39.createContext)(null);
4553
4549
 
4554
4550
  // src/provider/meta-provider.tsx
4555
- var import_react38 = require("react");
4551
+ var import_react40 = require("react");
4556
4552
  var import_jsx_runtime8 = require("react/jsx-runtime");
4557
4553
 
4558
4554
  // src/services/action-service/index.ts
4559
4555
  function useActionService() {
4560
4556
  const { env } = useEnv();
4561
- const loadAction = (0, import_react39.useCallback)(
4557
+ const loadAction = (0, import_react41.useCallback)(
4562
4558
  async ({
4563
4559
  idAction,
4564
4560
  context,
@@ -4582,7 +4578,7 @@ function useActionService() {
4582
4578
  },
4583
4579
  [env]
4584
4580
  );
4585
- const callButton = (0, import_react39.useCallback)(
4581
+ const callButton = (0, import_react41.useCallback)(
4586
4582
  async ({
4587
4583
  model,
4588
4584
  ids = [],
@@ -4616,7 +4612,7 @@ function useActionService() {
4616
4612
  },
4617
4613
  [env]
4618
4614
  );
4619
- const removeRows = (0, import_react39.useCallback)(
4615
+ const removeRows = (0, import_react41.useCallback)(
4620
4616
  async ({
4621
4617
  model,
4622
4618
  ids,
@@ -4642,7 +4638,7 @@ function useActionService() {
4642
4638
  },
4643
4639
  [env]
4644
4640
  );
4645
- const duplicateRecord = (0, import_react39.useCallback)(
4641
+ const duplicateRecord = (0, import_react41.useCallback)(
4646
4642
  async ({
4647
4643
  model,
4648
4644
  id,
@@ -4668,7 +4664,7 @@ function useActionService() {
4668
4664
  },
4669
4665
  [env]
4670
4666
  );
4671
- const getPrintReportName = (0, import_react39.useCallback)(
4667
+ const getPrintReportName = (0, import_react41.useCallback)(
4672
4668
  async ({ id }) => {
4673
4669
  const jsonData = {
4674
4670
  model: "ir.actions.report",
@@ -4686,7 +4682,7 @@ function useActionService() {
4686
4682
  },
4687
4683
  [env]
4688
4684
  );
4689
- const print = (0, import_react39.useCallback)(
4685
+ const print = (0, import_react41.useCallback)(
4690
4686
  async ({ id, report, db }) => {
4691
4687
  const jsonData = {
4692
4688
  report,
@@ -4704,7 +4700,7 @@ function useActionService() {
4704
4700
  },
4705
4701
  [env]
4706
4702
  );
4707
- const runAction = (0, import_react39.useCallback)(
4703
+ const runAction = (0, import_react41.useCallback)(
4708
4704
  async ({
4709
4705
  idAction,
4710
4706
  context,
@@ -4731,7 +4727,7 @@ function useActionService() {
4731
4727
  },
4732
4728
  [env]
4733
4729
  );
4734
- const generateSerialNumber = (0, import_react39.useCallback)(
4730
+ const generateSerialNumber = (0, import_react41.useCallback)(
4735
4731
  async ({
4736
4732
  kwargs,
4737
4733
  context,
@@ -4769,11 +4765,11 @@ function useActionService() {
4769
4765
  }
4770
4766
 
4771
4767
  // src/services/auth-service/index.ts
4772
- var import_react40 = require("react");
4768
+ var import_react42 = require("react");
4773
4769
  function useAuthService() {
4774
4770
  const { env } = useEnv();
4775
4771
  const supabase = useSupabaseOptional();
4776
- const login = (0, import_react40.useCallback)(
4772
+ const login = (0, import_react42.useCallback)(
4777
4773
  async (body) => {
4778
4774
  const payload = Object.fromEntries(
4779
4775
  Object.entries({
@@ -4798,7 +4794,7 @@ function useAuthService() {
4798
4794
  },
4799
4795
  [env]
4800
4796
  );
4801
- const loginSupabase = (0, import_react40.useCallback)(
4797
+ const loginSupabase = (0, import_react42.useCallback)(
4802
4798
  async (body) => {
4803
4799
  if (!supabase) {
4804
4800
  return {
@@ -4814,7 +4810,7 @@ function useAuthService() {
4814
4810
  },
4815
4811
  [supabase]
4816
4812
  );
4817
- const forgotPassword = (0, import_react40.useCallback)(
4813
+ const forgotPassword = (0, import_react42.useCallback)(
4818
4814
  async (email) => {
4819
4815
  const bodyData = {
4820
4816
  login: email,
@@ -4828,7 +4824,7 @@ function useAuthService() {
4828
4824
  },
4829
4825
  [env]
4830
4826
  );
4831
- const forgotPasswordSSO = (0, import_react40.useCallback)(
4827
+ const forgotPasswordSSO = (0, import_react42.useCallback)(
4832
4828
  async ({
4833
4829
  email,
4834
4830
  with_context,
@@ -4851,7 +4847,7 @@ function useAuthService() {
4851
4847
  },
4852
4848
  [env]
4853
4849
  );
4854
- const resetPassword = (0, import_react40.useCallback)(
4850
+ const resetPassword = (0, import_react42.useCallback)(
4855
4851
  async (data, token) => {
4856
4852
  const bodyData = {
4857
4853
  token,
@@ -4866,7 +4862,7 @@ function useAuthService() {
4866
4862
  },
4867
4863
  [env]
4868
4864
  );
4869
- const resetPasswordSSO = (0, import_react40.useCallback)(
4865
+ const resetPasswordSSO = (0, import_react42.useCallback)(
4870
4866
  async ({
4871
4867
  method,
4872
4868
  password,
@@ -4889,7 +4885,7 @@ function useAuthService() {
4889
4885
  },
4890
4886
  [env]
4891
4887
  );
4892
- const updatePassword = (0, import_react40.useCallback)(
4888
+ const updatePassword = (0, import_react42.useCallback)(
4893
4889
  async (data, token) => {
4894
4890
  const bodyData = {
4895
4891
  token,
@@ -4904,7 +4900,7 @@ function useAuthService() {
4904
4900
  },
4905
4901
  [env]
4906
4902
  );
4907
- const isValidToken = (0, import_react40.useCallback)(
4903
+ const isValidToken = (0, import_react42.useCallback)(
4908
4904
  async (token) => {
4909
4905
  const bodyData = {
4910
4906
  token
@@ -4917,7 +4913,7 @@ function useAuthService() {
4917
4913
  },
4918
4914
  [env]
4919
4915
  );
4920
- const isValidActionToken = (0, import_react40.useCallback)(
4916
+ const isValidActionToken = (0, import_react42.useCallback)(
4921
4917
  async (actionToken) => {
4922
4918
  const bodyData = {};
4923
4919
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -4930,7 +4926,7 @@ function useAuthService() {
4930
4926
  },
4931
4927
  [env]
4932
4928
  );
4933
- const loginSocial = (0, import_react40.useCallback)(
4929
+ const loginSocial = (0, import_react42.useCallback)(
4934
4930
  async ({
4935
4931
  db,
4936
4932
  state,
@@ -4948,13 +4944,13 @@ function useAuthService() {
4948
4944
  },
4949
4945
  [env]
4950
4946
  );
4951
- const getProviders = (0, import_react40.useCallback)(
4947
+ const getProviders = (0, import_react42.useCallback)(
4952
4948
  async (db) => {
4953
4949
  return env?.requests?.get("/oauth/providers", { params: { db } });
4954
4950
  },
4955
4951
  [env]
4956
4952
  );
4957
- const getAccessByCode = (0, import_react40.useCallback)(
4953
+ const getAccessByCode = (0, import_react42.useCallback)(
4958
4954
  async (code) => {
4959
4955
  const data = new URLSearchParams();
4960
4956
  data.append("code", code);
@@ -4974,7 +4970,7 @@ function useAuthService() {
4974
4970
  },
4975
4971
  [env]
4976
4972
  );
4977
- const logout = (0, import_react40.useCallback)(
4973
+ const logout = (0, import_react42.useCallback)(
4978
4974
  async (service) => {
4979
4975
  return env?.requests?.post(
4980
4976
  "/logout" /* LOGOUT */,
@@ -4991,7 +4987,7 @@ function useAuthService() {
4991
4987
  },
4992
4988
  [env]
4993
4989
  );
4994
- const getTenantMapping = (0, import_react40.useCallback)(
4990
+ const getTenantMapping = (0, import_react42.useCallback)(
4995
4991
  async ({ shortName, service }) => {
4996
4992
  const bodyData = {
4997
4993
  short_name: shortName
@@ -5009,7 +5005,7 @@ function useAuthService() {
5009
5005
  },
5010
5006
  [env]
5011
5007
  );
5012
- const getToken = (0, import_react40.useCallback)(
5008
+ const getToken = (0, import_react42.useCallback)(
5013
5009
  async ({
5014
5010
  phone,
5015
5011
  name,
@@ -5054,10 +5050,10 @@ function useAuthService() {
5054
5050
  }
5055
5051
 
5056
5052
  // src/services/company-service/index.ts
5057
- var import_react41 = require("react");
5053
+ var import_react43 = require("react");
5058
5054
  function useCompanyService() {
5059
5055
  const { env } = useEnv();
5060
- const getCurrentCompany = (0, import_react41.useCallback)(
5056
+ const getCurrentCompany = (0, import_react43.useCallback)(
5061
5057
  async (service, extraHeaders) => {
5062
5058
  return await env.requests.get(
5063
5059
  "/company" /* COMPANY_PATH */,
@@ -5074,7 +5070,7 @@ function useCompanyService() {
5074
5070
  },
5075
5071
  [env]
5076
5072
  );
5077
- const getInfoCompany = (0, import_react41.useCallback)(
5073
+ const getInfoCompany = (0, import_react43.useCallback)(
5078
5074
  async (id, service) => {
5079
5075
  const jsonData = {
5080
5076
  ids: [id],
@@ -5110,10 +5106,10 @@ function useCompanyService() {
5110
5106
  }
5111
5107
 
5112
5108
  // src/services/excel-service/index.ts
5113
- var import_react42 = require("react");
5109
+ var import_react44 = require("react");
5114
5110
  function useExcelService() {
5115
5111
  const { env } = useEnv();
5116
- const uploadFileExcel = (0, import_react42.useCallback)(
5112
+ const uploadFileExcel = (0, import_react44.useCallback)(
5117
5113
  async ({
5118
5114
  formData,
5119
5115
  service,
@@ -5130,7 +5126,7 @@ function useExcelService() {
5130
5126
  },
5131
5127
  [env]
5132
5128
  );
5133
- const uploadIdFile = (0, import_react42.useCallback)(
5129
+ const uploadIdFile = (0, import_react44.useCallback)(
5134
5130
  async ({
5135
5131
  formData,
5136
5132
  service,
@@ -5147,7 +5143,7 @@ function useExcelService() {
5147
5143
  },
5148
5144
  [env]
5149
5145
  );
5150
- const parsePreview = (0, import_react42.useCallback)(
5146
+ const parsePreview = (0, import_react44.useCallback)(
5151
5147
  async ({
5152
5148
  id,
5153
5149
  selectedSheet,
@@ -5196,7 +5192,7 @@ function useExcelService() {
5196
5192
  },
5197
5193
  [env]
5198
5194
  );
5199
- const executeImport = (0, import_react42.useCallback)(
5195
+ const executeImport = (0, import_react44.useCallback)(
5200
5196
  async ({
5201
5197
  columns,
5202
5198
  fields,
@@ -5230,7 +5226,7 @@ function useExcelService() {
5230
5226
  },
5231
5227
  [env]
5232
5228
  );
5233
- const getFileExcel = (0, import_react42.useCallback)(
5229
+ const getFileExcel = (0, import_react44.useCallback)(
5234
5230
  async ({
5235
5231
  model,
5236
5232
  service,
@@ -5254,7 +5250,7 @@ function useExcelService() {
5254
5250
  },
5255
5251
  [env]
5256
5252
  );
5257
- const getFieldExport = (0, import_react42.useCallback)(
5253
+ const getFieldExport = (0, import_react44.useCallback)(
5258
5254
  async ({
5259
5255
  ids,
5260
5256
  model,
@@ -5294,7 +5290,7 @@ function useExcelService() {
5294
5290
  },
5295
5291
  [env]
5296
5292
  );
5297
- const exportExcel = (0, import_react42.useCallback)(
5293
+ const exportExcel = (0, import_react44.useCallback)(
5298
5294
  async ({
5299
5295
  model,
5300
5296
  domain,
@@ -5342,10 +5338,10 @@ function useExcelService() {
5342
5338
  }
5343
5339
 
5344
5340
  // src/services/form-service/index.ts
5345
- var import_react43 = require("react");
5341
+ var import_react45 = require("react");
5346
5342
  function useFormService() {
5347
5343
  const { env } = useEnv();
5348
- const getComment = (0, import_react43.useCallback)(
5344
+ const getComment = (0, import_react45.useCallback)(
5349
5345
  async ({ data }) => {
5350
5346
  const jsonData = {
5351
5347
  thread_id: data.thread_id,
@@ -5363,7 +5359,7 @@ function useFormService() {
5363
5359
  },
5364
5360
  [env]
5365
5361
  );
5366
- const getThreadData = (0, import_react43.useCallback)(
5362
+ const getThreadData = (0, import_react45.useCallback)(
5367
5363
  async ({
5368
5364
  data,
5369
5365
  xNode,
@@ -5390,7 +5386,7 @@ function useFormService() {
5390
5386
  },
5391
5387
  [env]
5392
5388
  );
5393
- const getThreadMessages = (0, import_react43.useCallback)(
5389
+ const getThreadMessages = (0, import_react45.useCallback)(
5394
5390
  async ({
5395
5391
  data,
5396
5392
  xNode,
@@ -5416,7 +5412,7 @@ function useFormService() {
5416
5412
  },
5417
5413
  [env]
5418
5414
  );
5419
- const sentComment = (0, import_react43.useCallback)(
5415
+ const sentComment = (0, import_react45.useCallback)(
5420
5416
  async ({ data }) => {
5421
5417
  const jsonData = {
5422
5418
  context: {
@@ -5444,7 +5440,7 @@ function useFormService() {
5444
5440
  },
5445
5441
  [env]
5446
5442
  );
5447
- const deleteComment = (0, import_react43.useCallback)(
5443
+ const deleteComment = (0, import_react45.useCallback)(
5448
5444
  async ({ data }) => {
5449
5445
  const jsonData = {
5450
5446
  attachment_ids: [],
@@ -5460,7 +5456,7 @@ function useFormService() {
5460
5456
  },
5461
5457
  [env]
5462
5458
  );
5463
- const getImage = (0, import_react43.useCallback)(
5459
+ const getImage = (0, import_react45.useCallback)(
5464
5460
  async ({ data }) => {
5465
5461
  return env.requests.get(
5466
5462
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -5473,7 +5469,7 @@ function useFormService() {
5473
5469
  },
5474
5470
  [env]
5475
5471
  );
5476
- const uploadImage = (0, import_react43.useCallback)(
5472
+ const uploadImage = (0, import_react45.useCallback)(
5477
5473
  async ({
5478
5474
  formData,
5479
5475
  service,
@@ -5492,7 +5488,7 @@ function useFormService() {
5492
5488
  },
5493
5489
  [env]
5494
5490
  );
5495
- const uploadFile = (0, import_react43.useCallback)(
5491
+ const uploadFile = (0, import_react45.useCallback)(
5496
5492
  async ({
5497
5493
  formData,
5498
5494
  service,
@@ -5512,7 +5508,7 @@ function useFormService() {
5512
5508
  },
5513
5509
  [env]
5514
5510
  );
5515
- const getFormView = (0, import_react43.useCallback)(
5511
+ const getFormView = (0, import_react45.useCallback)(
5516
5512
  async ({ data }) => {
5517
5513
  const jsonData = {
5518
5514
  model: data.model,
@@ -5528,7 +5524,7 @@ function useFormService() {
5528
5524
  },
5529
5525
  [env]
5530
5526
  );
5531
- const changeStatus = (0, import_react43.useCallback)(
5527
+ const changeStatus = (0, import_react45.useCallback)(
5532
5528
  async ({ data }) => {
5533
5529
  const vals = {
5534
5530
  [data.name]: data.stage_id
@@ -5557,7 +5553,7 @@ function useFormService() {
5557
5553
  },
5558
5554
  [env]
5559
5555
  );
5560
- const getExternalTab = (0, import_react43.useCallback)(
5556
+ const getExternalTab = (0, import_react45.useCallback)(
5561
5557
  async ({ method, context, service, xNode }) => {
5562
5558
  return env?.requests?.post(
5563
5559
  "/call" /* CALL_PATH */,
@@ -5592,10 +5588,10 @@ function useFormService() {
5592
5588
  }
5593
5589
 
5594
5590
  // src/services/kanban-service/index.ts
5595
- var import_react44 = require("react");
5591
+ var import_react46 = require("react");
5596
5592
  function useKanbanService() {
5597
5593
  const { env } = useEnv();
5598
- const getGroups = (0, import_react44.useCallback)(
5594
+ const getGroups = (0, import_react46.useCallback)(
5599
5595
  async ({ model, width_context }) => {
5600
5596
  const jsonData = {
5601
5597
  model,
@@ -5615,7 +5611,7 @@ function useKanbanService() {
5615
5611
  },
5616
5612
  [env]
5617
5613
  );
5618
- const getProgressBar = (0, import_react44.useCallback)(
5614
+ const getProgressBar = (0, import_react46.useCallback)(
5619
5615
  async ({ field, color, model, width_context }) => {
5620
5616
  const jsonData = {
5621
5617
  model,
@@ -5645,10 +5641,10 @@ function useKanbanService() {
5645
5641
  }
5646
5642
 
5647
5643
  // src/services/model-service/index.ts
5648
- var import_react45 = require("react");
5644
+ var import_react47 = require("react");
5649
5645
  function useModelService() {
5650
5646
  const { env } = useEnv();
5651
- const getListMyBankAccount = (0, import_react45.useCallback)(
5647
+ const getListMyBankAccount = (0, import_react47.useCallback)(
5652
5648
  async ({
5653
5649
  domain,
5654
5650
  spectification,
@@ -5672,7 +5668,7 @@ function useModelService() {
5672
5668
  },
5673
5669
  [env]
5674
5670
  );
5675
- const getCurrency = (0, import_react45.useCallback)(async () => {
5671
+ const getCurrency = (0, import_react47.useCallback)(async () => {
5676
5672
  const jsonData = {
5677
5673
  model: "res.currency",
5678
5674
  method: "web_search_read",
@@ -5692,7 +5688,7 @@ function useModelService() {
5692
5688
  }
5693
5689
  });
5694
5690
  }, [env]);
5695
- const getConversionRate = (0, import_react45.useCallback)(async () => {
5691
+ const getConversionRate = (0, import_react47.useCallback)(async () => {
5696
5692
  const jsonData = {
5697
5693
  model: "res.currency",
5698
5694
  method: "web_search_read",
@@ -5718,7 +5714,7 @@ function useModelService() {
5718
5714
  }
5719
5715
  });
5720
5716
  }, [env]);
5721
- const getAll = (0, import_react45.useCallback)(
5717
+ const getAll = (0, import_react47.useCallback)(
5722
5718
  async ({
5723
5719
  data,
5724
5720
  service,
@@ -5760,7 +5756,7 @@ function useModelService() {
5760
5756
  },
5761
5757
  [env]
5762
5758
  );
5763
- const getListCalendar = (0, import_react45.useCallback)(
5759
+ const getListCalendar = (0, import_react47.useCallback)(
5764
5760
  async ({ data }) => {
5765
5761
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
5766
5762
  fields: data.fields,
@@ -5791,7 +5787,7 @@ function useModelService() {
5791
5787
  },
5792
5788
  [env]
5793
5789
  );
5794
- const getList = (0, import_react45.useCallback)(
5790
+ const getList = (0, import_react47.useCallback)(
5795
5791
  async ({
5796
5792
  model,
5797
5793
  ids = [],
@@ -5823,7 +5819,7 @@ function useModelService() {
5823
5819
  },
5824
5820
  [env]
5825
5821
  );
5826
- const getDetail = (0, import_react45.useCallback)(
5822
+ const getDetail = (0, import_react47.useCallback)(
5827
5823
  async ({
5828
5824
  ids = [],
5829
5825
  model,
@@ -5855,7 +5851,7 @@ function useModelService() {
5855
5851
  },
5856
5852
  [env]
5857
5853
  );
5858
- const save = (0, import_react45.useCallback)(
5854
+ const save = (0, import_react47.useCallback)(
5859
5855
  async ({
5860
5856
  model,
5861
5857
  ids = [],
@@ -5890,7 +5886,7 @@ function useModelService() {
5890
5886
  },
5891
5887
  [env]
5892
5888
  );
5893
- const deleteApi = (0, import_react45.useCallback)(
5889
+ const deleteApi = (0, import_react47.useCallback)(
5894
5890
  async ({ ids = [], model, service }) => {
5895
5891
  const jsonData = {
5896
5892
  model,
@@ -5910,7 +5906,7 @@ function useModelService() {
5910
5906
  },
5911
5907
  [env]
5912
5908
  );
5913
- const onChange = (0, import_react45.useCallback)(
5909
+ const onChange = (0, import_react47.useCallback)(
5914
5910
  async ({
5915
5911
  ids = [],
5916
5912
  model,
@@ -5946,7 +5942,7 @@ function useModelService() {
5946
5942
  },
5947
5943
  [env]
5948
5944
  );
5949
- const getListFieldsOnchange = (0, import_react45.useCallback)(
5945
+ const getListFieldsOnchange = (0, import_react47.useCallback)(
5950
5946
  async ({
5951
5947
  model,
5952
5948
  service,
@@ -5970,7 +5966,7 @@ function useModelService() {
5970
5966
  },
5971
5967
  [env]
5972
5968
  );
5973
- const parseORMOdoo = (0, import_react45.useCallback)((data) => {
5969
+ const parseORMOdoo = (0, import_react47.useCallback)((data) => {
5974
5970
  for (const key in data) {
5975
5971
  if (key === "display_name") {
5976
5972
  delete data[key];
@@ -5981,7 +5977,7 @@ function useModelService() {
5981
5977
  }
5982
5978
  return { ...data };
5983
5979
  }, []);
5984
- const toDataJS = (0, import_react45.useCallback)(
5980
+ const toDataJS = (0, import_react47.useCallback)(
5985
5981
  (data, viewData, model) => {
5986
5982
  for (const key in data) {
5987
5983
  if (data[key] === false) {
@@ -6039,10 +6035,10 @@ function useModelService() {
6039
6035
  }
6040
6036
 
6041
6037
  // src/services/user-service/index.ts
6042
- var import_react46 = require("react");
6038
+ var import_react48 = require("react");
6043
6039
  function useUserService() {
6044
6040
  const { env } = useEnv();
6045
- const getProfile = (0, import_react46.useCallback)(
6041
+ const getProfile = (0, import_react48.useCallback)(
6046
6042
  async (service, path, extraHeaders) => {
6047
6043
  return env?.requests?.get(
6048
6044
  path || "/userinfo" /* PROFILE_PATH */,
@@ -6059,7 +6055,7 @@ function useUserService() {
6059
6055
  },
6060
6056
  [env]
6061
6057
  );
6062
- const getUser = (0, import_react46.useCallback)(
6058
+ const getUser = (0, import_react48.useCallback)(
6063
6059
  async ({ context, id }) => {
6064
6060
  const jsonData = {
6065
6061
  model: "res.users",
@@ -6097,7 +6093,7 @@ function useUserService() {
6097
6093
  },
6098
6094
  [env]
6099
6095
  );
6100
- const switchUserLocale = (0, import_react46.useCallback)(
6096
+ const switchUserLocale = (0, import_react48.useCallback)(
6101
6097
  async ({ id, values, service }) => {
6102
6098
  const jsonData = {
6103
6099
  model: "res.users",
@@ -6125,10 +6121,10 @@ function useUserService() {
6125
6121
  }
6126
6122
 
6127
6123
  // src/services/view-service/index.ts
6128
- var import_react47 = require("react");
6124
+ var import_react49 = require("react");
6129
6125
  function useViewService() {
6130
6126
  const { env } = useEnv();
6131
- const getView = (0, import_react47.useCallback)(
6127
+ const getView = (0, import_react49.useCallback)(
6132
6128
  async ({
6133
6129
  model,
6134
6130
  views,
@@ -6168,7 +6164,7 @@ function useViewService() {
6168
6164
  },
6169
6165
  [env]
6170
6166
  );
6171
- const getMenu = (0, import_react47.useCallback)(
6167
+ const getMenu = (0, import_react49.useCallback)(
6172
6168
  async (context, specification, domain, service) => {
6173
6169
  const jsonData = {
6174
6170
  model: "ir.ui.menu" /* MENU */,
@@ -6199,7 +6195,7 @@ function useViewService() {
6199
6195
  },
6200
6196
  [env]
6201
6197
  );
6202
- const getActionDetail = (0, import_react47.useCallback)(
6198
+ const getActionDetail = (0, import_react49.useCallback)(
6203
6199
  async (aid, context) => {
6204
6200
  const jsonData = {
6205
6201
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -6229,7 +6225,7 @@ function useViewService() {
6229
6225
  },
6230
6226
  [env]
6231
6227
  );
6232
- const getResequence = (0, import_react47.useCallback)(
6228
+ const getResequence = (0, import_react49.useCallback)(
6233
6229
  async ({
6234
6230
  model,
6235
6231
  ids,
@@ -6259,7 +6255,7 @@ function useViewService() {
6259
6255
  },
6260
6256
  [env]
6261
6257
  );
6262
- const getSelectionItem = (0, import_react47.useCallback)(
6258
+ const getSelectionItem = (0, import_react49.useCallback)(
6263
6259
  async ({
6264
6260
  data,
6265
6261
  service,
@@ -6296,7 +6292,7 @@ function useViewService() {
6296
6292
  },
6297
6293
  [env]
6298
6294
  );
6299
- const loadMessages = (0, import_react47.useCallback)(async () => {
6295
+ const loadMessages = (0, import_react49.useCallback)(async () => {
6300
6296
  return env.requests.post(
6301
6297
  "/load_message_failures" /* LOAD_MESSAGE */,
6302
6298
  {},
@@ -6307,14 +6303,14 @@ function useViewService() {
6307
6303
  }
6308
6304
  );
6309
6305
  }, [env]);
6310
- const getVersion = (0, import_react47.useCallback)(async () => {
6306
+ const getVersion = (0, import_react49.useCallback)(async () => {
6311
6307
  return env?.requests?.get("", {
6312
6308
  headers: {
6313
6309
  "Content-Type": "application/json"
6314
6310
  }
6315
6311
  });
6316
6312
  }, [env]);
6317
- const grantAccess = (0, import_react47.useCallback)(
6313
+ const grantAccess = (0, import_react49.useCallback)(
6318
6314
  async ({
6319
6315
  redirect_uri,
6320
6316
  state,
@@ -6341,7 +6337,7 @@ function useViewService() {
6341
6337
  },
6342
6338
  [env]
6343
6339
  );
6344
- const removeTotpSetUp = (0, import_react47.useCallback)(
6340
+ const removeTotpSetUp = (0, import_react49.useCallback)(
6345
6341
  async ({ method, token }) => {
6346
6342
  const jsonData = {
6347
6343
  method,
@@ -6362,7 +6358,7 @@ function useViewService() {
6362
6358
  },
6363
6359
  [env]
6364
6360
  );
6365
- const requestSetupTotp = (0, import_react47.useCallback)(
6361
+ const requestSetupTotp = (0, import_react49.useCallback)(
6366
6362
  async ({ method, token }) => {
6367
6363
  const jsonData = {
6368
6364
  method,
@@ -6381,7 +6377,7 @@ function useViewService() {
6381
6377
  },
6382
6378
  [env]
6383
6379
  );
6384
- const settingsWebRead2fa = (0, import_react47.useCallback)(
6380
+ const settingsWebRead2fa = (0, import_react49.useCallback)(
6385
6381
  async ({
6386
6382
  method,
6387
6383
  model,
@@ -6409,7 +6405,7 @@ function useViewService() {
6409
6405
  },
6410
6406
  [env]
6411
6407
  );
6412
- const signInSSO = (0, import_react47.useCallback)(
6408
+ const signInSSO = (0, import_react49.useCallback)(
6413
6409
  async ({
6414
6410
  redirect_uri,
6415
6411
  state,
@@ -6441,7 +6437,7 @@ function useViewService() {
6441
6437
  },
6442
6438
  [env]
6443
6439
  );
6444
- const verify2FA = (0, import_react47.useCallback)(
6440
+ const verify2FA = (0, import_react49.useCallback)(
6445
6441
  ({
6446
6442
  method,
6447
6443
  with_context,
@@ -6474,7 +6470,7 @@ function useViewService() {
6474
6470
  },
6475
6471
  [env]
6476
6472
  );
6477
- const get2FAMethods = (0, import_react47.useCallback)(
6473
+ const get2FAMethods = (0, import_react49.useCallback)(
6478
6474
  ({ method, with_context }) => {
6479
6475
  const jsonData = {
6480
6476
  method,
@@ -6493,7 +6489,7 @@ function useViewService() {
6493
6489
  },
6494
6490
  [env]
6495
6491
  );
6496
- const verifyTotp = (0, import_react47.useCallback)(
6492
+ const verifyTotp = (0, import_react49.useCallback)(
6497
6493
  ({
6498
6494
  method,
6499
6495
  action_token,
@@ -6518,7 +6514,7 @@ function useViewService() {
6518
6514
  },
6519
6515
  [env]
6520
6516
  );
6521
- const getNotifications = (0, import_react47.useCallback)(
6517
+ const getNotifications = (0, import_react49.useCallback)(
6522
6518
  async ({
6523
6519
  service,
6524
6520
  xNode,
@@ -6538,7 +6534,7 @@ function useViewService() {
6538
6534
  },
6539
6535
  [env]
6540
6536
  );
6541
- const getCountry = (0, import_react47.useCallback)(
6537
+ const getCountry = (0, import_react49.useCallback)(
6542
6538
  async ({
6543
6539
  service,
6544
6540
  xNode,
@@ -6565,7 +6561,7 @@ function useViewService() {
6565
6561
  },
6566
6562
  [env]
6567
6563
  );
6568
- const getCity = (0, import_react47.useCallback)(
6564
+ const getCity = (0, import_react49.useCallback)(
6569
6565
  async ({
6570
6566
  service,
6571
6567
  xNode,
@@ -6592,7 +6588,7 @@ function useViewService() {
6592
6588
  },
6593
6589
  [env]
6594
6590
  );
6595
- const getWard = (0, import_react47.useCallback)(
6591
+ const getWard = (0, import_react49.useCallback)(
6596
6592
  async ({
6597
6593
  service,
6598
6594
  xNode,
@@ -6617,7 +6613,7 @@ function useViewService() {
6617
6613
  },
6618
6614
  [env]
6619
6615
  );
6620
- const getPartnerTitle = (0, import_react47.useCallback)(
6616
+ const getPartnerTitle = (0, import_react49.useCallback)(
6621
6617
  async ({
6622
6618
  service,
6623
6619
  xNode,
@@ -6669,10 +6665,10 @@ function useViewService() {
6669
6665
  }
6670
6666
 
6671
6667
  // src/services/dashboard-service/index.ts
6672
- var import_react48 = require("react");
6668
+ var import_react50 = require("react");
6673
6669
  function useDashboardService() {
6674
6670
  const { env } = useEnv();
6675
- const readGroup = (0, import_react48.useCallback)(
6671
+ const readGroup = (0, import_react50.useCallback)(
6676
6672
  async ({
6677
6673
  service,
6678
6674
  xNode,
@@ -6689,7 +6685,7 @@ function useDashboardService() {
6689
6685
  },
6690
6686
  [env]
6691
6687
  );
6692
- const getDataChart = (0, import_react48.useCallback)(
6688
+ const getDataChart = (0, import_react50.useCallback)(
6693
6689
  async ({
6694
6690
  service,
6695
6691
  xNode,