@fctc/interface-logic 4.4.7 → 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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/services/action-service/index.ts
2
- import { useCallback as useCallback33 } from "react";
2
+ import { useCallback as useCallback35 } from "react";
3
3
 
4
4
  // src/constants/api/uri-constant.ts
5
5
  var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
@@ -102,6 +102,25 @@ var LoadDataModel = /* @__PURE__ */ ((LoadDataModel2) => {
102
102
  LoadDataModel2["POS_MAKE_PAYMENT"] = "pos.make.payment";
103
103
  return LoadDataModel2;
104
104
  })(LoadDataModel || {});
105
+ var MODEL_TO_TABLE = {
106
+ ["account.tax" /* ACCOUNT_TAX */]: "account_taxes" /* ACCOUNT_TAXES */,
107
+ ["res.company" /* RES_COMPANY */]: "companies" /* COMPANIES */,
108
+ ["res.partner" /* RES_PARTNER */]: "customers" /* CUSTOMERS */,
109
+ ["res.users" /* RES_USERS */]: "employees" /* EMPLOYEES */,
110
+ ["loyalty.program" /* LOYALTY_PROGRAM */]: "loyalty_programs" /* LOYALTY_PROGRAMS */,
111
+ ["loyalty.rule" /* LOYALTY_RULE */]: "loyalty_rules" /* LOYALTY_RULES */,
112
+ ["loyalty.reward" /* LOYALTY_REWARD */]: "loyalty_rewards" /* LOYALTY_REWARDS */,
113
+ ["pos.config" /* POS_CONFIG */]: "pos_configs" /* POS_CONFIGS */,
114
+ ["pos.session" /* POS_SESSION */]: "pos_sessions" /* POS_SESSIONS */,
115
+ ["pos.order.line" /* POS_ORDER_LINE */]: "order_lines" /* ORDER_LINES */,
116
+ ["pos.order" /* POS_ORDER */]: "orders" /* ORDERS */,
117
+ ["pos.payment.method" /* POS_PAYMENT_METHOD */]: "payment_methods" /* PAYMENT_METHODS */,
118
+ ["pos.payment" /* POS_PAYMENT */]: "payments" /* PAYMENTS */,
119
+ ["pos.category" /* POS_CATEGORY */]: "product_categories" /* PRODUCT_CATEGORIES */,
120
+ ["product.product" /* PRODUCT_PRODUCT */]: "products" /* PRODUCTS */,
121
+ ["restaurant.floor" /* RESTAURANT_FLOOR */]: "restaurant_floors" /* RESTAURANT_FLOORS */,
122
+ ["restaurant.table" /* RESTAURANT_TABLE */]: "restaurant_tables" /* RESTAURANT_TABLES */
123
+ };
105
124
 
106
125
  // src/utils/domain/py_tokenizer.ts
107
126
  var TokenizerError = class extends Error {
@@ -3204,8 +3223,13 @@ var addEntityService = (env) => {
3204
3223
  values,
3205
3224
  xNode,
3206
3225
  service,
3207
- isCreateEndpoint = false
3226
+ isCreateEndpoint = false,
3227
+ isSupa = false,
3228
+ supaCallback
3208
3229
  }) => {
3230
+ if (isSupa && supaCallback) {
3231
+ return supaCallback(values);
3232
+ }
3209
3233
  const jsonData = {
3210
3234
  model,
3211
3235
  values
@@ -3927,25 +3951,12 @@ var useSupabaseOptional = () => {
3927
3951
  };
3928
3952
 
3929
3953
  // src/services/pos-service/load-data-pos-session.ts
3930
- var MODEL_TO_TABLE = {
3931
- ["account.tax" /* ACCOUNT_TAX */]: "account_taxes",
3932
- ["res.company" /* RES_COMPANY */]: "companies",
3933
- ["res.partner" /* RES_PARTNER */]: "customers",
3934
- ["res.users" /* RES_USERS */]: "employees",
3935
- ["loyalty.program" /* LOYALTY_PROGRAM */]: "loyalty_programs",
3936
- ["loyalty.rule" /* LOYALTY_RULE */]: "loyalty_rules",
3937
- ["loyalty.reward" /* LOYALTY_REWARD */]: "loyalty_rewards",
3938
- ["pos.config" /* POS_CONFIG */]: "pos_configs",
3939
- ["pos.session" /* POS_SESSION */]: "pos_sessions",
3940
- ["pos.order.line" /* POS_ORDER_LINE */]: "order_lines",
3941
- ["pos.order" /* POS_ORDER */]: "orders",
3942
- ["pos.payment.method" /* POS_PAYMENT_METHOD */]: "payment_methods",
3943
- ["pos.payment" /* POS_PAYMENT */]: "payments",
3944
- ["pos.category" /* POS_CATEGORY */]: "product_categories",
3945
- ["product.product" /* PRODUCT_PRODUCT */]: "products",
3946
- ["restaurant.floor" /* RESTAURANT_FLOOR */]: "restaurant_floors",
3947
- ["restaurant.table" /* RESTAURANT_TABLE */]: "restaurant_tables"
3948
- };
3954
+ var createModelResult = (modelName, data = []) => ({
3955
+ modelName,
3956
+ data,
3957
+ fields: {},
3958
+ relations: {}
3959
+ });
3949
3960
  var loadDataPosSessionService = (env) => {
3950
3961
  const supabase = useSupabaseOptional();
3951
3962
  const loadDataPosSession = useCallback23(
@@ -3987,56 +3998,25 @@ var loadDataPosSessionService = (env) => {
3987
3998
  [env]
3988
3999
  );
3989
4000
  const loadDataPosSessionSupabase = useCallback23(async () => {
4001
+ if (!supabase) return {};
3990
4002
  try {
3991
4003
  const allModels = Object.values(LoadDataModel);
3992
- const promises = allModels.map(async (modelName) => {
3993
- const tableName = MODEL_TO_TABLE[modelName];
3994
- if (!tableName) {
3995
- return {
3996
- modelName,
3997
- data: [],
3998
- fields: {},
3999
- relations: {}
4000
- };
4001
- }
4002
- if (!supabase) {
4003
- return {
4004
- modelName,
4005
- data: [],
4006
- fields: {},
4007
- relations: {}
4008
- };
4009
- }
4010
- const { data, error } = await supabase.from(tableName).select("*");
4011
- if (error) {
4012
- console.error(`Error loading ${modelName}:`, error);
4013
- return {
4014
- modelName,
4015
- data: [],
4016
- fields: {},
4017
- relations: {}
4018
- };
4019
- }
4020
- return {
4021
- modelName,
4022
- data: data || [],
4023
- fields: {},
4024
- relations: {}
4025
- };
4026
- });
4027
- const results = await Promise.all(promises);
4028
- const response = results.reduce(
4029
- (acc, { modelName, data, fields, relations }) => {
4030
- acc[modelName] = {
4031
- data,
4032
- fields,
4033
- relations
4034
- };
4035
- return acc;
4036
- },
4037
- {}
4004
+ const results = await Promise.all(
4005
+ allModels.map(async (modelName) => {
4006
+ const tableName = MODEL_TO_TABLE[modelName];
4007
+ if (!tableName) return createModelResult(modelName);
4008
+ const { data, error } = await supabase.from(tableName).select("*");
4009
+ if (error) {
4010
+ console.error(`Error loading ${modelName}:`, error);
4011
+ return createModelResult(modelName);
4012
+ }
4013
+ return createModelResult(modelName, data || []);
4014
+ })
4038
4015
  );
4039
- return response;
4016
+ return results.reduce((acc, { modelName, ...rest }) => {
4017
+ acc[modelName] = rest;
4018
+ return acc;
4019
+ }, {});
4040
4020
  } catch (error) {
4041
4021
  console.error("Error loading data from Supabase:", error);
4042
4022
  return {};
@@ -4505,6 +4485,18 @@ import { useMutation as useMutation86 } from "@tanstack/react-query";
4505
4485
  // src/hooks/pos/use-complete-current-stage.ts
4506
4486
  import { useMutation as useMutation87 } from "@tanstack/react-query";
4507
4487
 
4488
+ // src/hooks/pos/supabase/use-add-floor.ts
4489
+ import { useMutation as useMutation88 } from "@tanstack/react-query";
4490
+
4491
+ // src/services/pos-service/supabase/add-floor.ts
4492
+ import { useCallback as useCallback33 } from "react";
4493
+
4494
+ // src/services/pos-service/supabase/add-table.ts
4495
+ import { useCallback as useCallback34 } from "react";
4496
+
4497
+ // src/hooks/pos/supabase/use-add-table.ts
4498
+ import { useMutation as useMutation89 } from "@tanstack/react-query";
4499
+
4508
4500
  // src/provider/service-provider.tsx
4509
4501
  import { jsx as jsx7 } from "react/jsx-runtime";
4510
4502
  var ServiceContext = createContext3(null);
@@ -4516,7 +4508,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
4516
4508
  // src/services/action-service/index.ts
4517
4509
  function useActionService() {
4518
4510
  const { env } = useEnv();
4519
- const loadAction = useCallback33(
4511
+ const loadAction = useCallback35(
4520
4512
  async ({
4521
4513
  idAction,
4522
4514
  context,
@@ -4540,7 +4532,7 @@ function useActionService() {
4540
4532
  },
4541
4533
  [env]
4542
4534
  );
4543
- const callButton = useCallback33(
4535
+ const callButton = useCallback35(
4544
4536
  async ({
4545
4537
  model,
4546
4538
  ids = [],
@@ -4574,7 +4566,7 @@ function useActionService() {
4574
4566
  },
4575
4567
  [env]
4576
4568
  );
4577
- const removeRows = useCallback33(
4569
+ const removeRows = useCallback35(
4578
4570
  async ({
4579
4571
  model,
4580
4572
  ids,
@@ -4600,7 +4592,7 @@ function useActionService() {
4600
4592
  },
4601
4593
  [env]
4602
4594
  );
4603
- const duplicateRecord = useCallback33(
4595
+ const duplicateRecord = useCallback35(
4604
4596
  async ({
4605
4597
  model,
4606
4598
  id,
@@ -4626,7 +4618,7 @@ function useActionService() {
4626
4618
  },
4627
4619
  [env]
4628
4620
  );
4629
- const getPrintReportName = useCallback33(
4621
+ const getPrintReportName = useCallback35(
4630
4622
  async ({ id }) => {
4631
4623
  const jsonData = {
4632
4624
  model: "ir.actions.report",
@@ -4644,7 +4636,7 @@ function useActionService() {
4644
4636
  },
4645
4637
  [env]
4646
4638
  );
4647
- const print = useCallback33(
4639
+ const print = useCallback35(
4648
4640
  async ({ id, report, db }) => {
4649
4641
  const jsonData = {
4650
4642
  report,
@@ -4662,7 +4654,7 @@ function useActionService() {
4662
4654
  },
4663
4655
  [env]
4664
4656
  );
4665
- const runAction = useCallback33(
4657
+ const runAction = useCallback35(
4666
4658
  async ({
4667
4659
  idAction,
4668
4660
  context,
@@ -4689,7 +4681,7 @@ function useActionService() {
4689
4681
  },
4690
4682
  [env]
4691
4683
  );
4692
- const generateSerialNumber = useCallback33(
4684
+ const generateSerialNumber = useCallback35(
4693
4685
  async ({
4694
4686
  kwargs,
4695
4687
  context,
@@ -4727,11 +4719,11 @@ function useActionService() {
4727
4719
  }
4728
4720
 
4729
4721
  // src/services/auth-service/index.ts
4730
- import { useCallback as useCallback34 } from "react";
4722
+ import { useCallback as useCallback36 } from "react";
4731
4723
  function useAuthService() {
4732
4724
  const { env } = useEnv();
4733
4725
  const supabase = useSupabaseOptional();
4734
- const login = useCallback34(
4726
+ const login = useCallback36(
4735
4727
  async (body) => {
4736
4728
  const payload = Object.fromEntries(
4737
4729
  Object.entries({
@@ -4756,7 +4748,7 @@ function useAuthService() {
4756
4748
  },
4757
4749
  [env]
4758
4750
  );
4759
- const loginSupabase = useCallback34(
4751
+ const loginSupabase = useCallback36(
4760
4752
  async (body) => {
4761
4753
  if (!supabase) {
4762
4754
  return {
@@ -4772,7 +4764,7 @@ function useAuthService() {
4772
4764
  },
4773
4765
  [supabase]
4774
4766
  );
4775
- const forgotPassword = useCallback34(
4767
+ const forgotPassword = useCallback36(
4776
4768
  async (email) => {
4777
4769
  const bodyData = {
4778
4770
  login: email,
@@ -4786,7 +4778,7 @@ function useAuthService() {
4786
4778
  },
4787
4779
  [env]
4788
4780
  );
4789
- const forgotPasswordSSO = useCallback34(
4781
+ const forgotPasswordSSO = useCallback36(
4790
4782
  async ({
4791
4783
  email,
4792
4784
  with_context,
@@ -4809,7 +4801,7 @@ function useAuthService() {
4809
4801
  },
4810
4802
  [env]
4811
4803
  );
4812
- const resetPassword = useCallback34(
4804
+ const resetPassword = useCallback36(
4813
4805
  async (data, token) => {
4814
4806
  const bodyData = {
4815
4807
  token,
@@ -4824,7 +4816,7 @@ function useAuthService() {
4824
4816
  },
4825
4817
  [env]
4826
4818
  );
4827
- const resetPasswordSSO = useCallback34(
4819
+ const resetPasswordSSO = useCallback36(
4828
4820
  async ({
4829
4821
  method,
4830
4822
  password,
@@ -4847,7 +4839,7 @@ function useAuthService() {
4847
4839
  },
4848
4840
  [env]
4849
4841
  );
4850
- const updatePassword = useCallback34(
4842
+ const updatePassword = useCallback36(
4851
4843
  async (data, token) => {
4852
4844
  const bodyData = {
4853
4845
  token,
@@ -4862,7 +4854,7 @@ function useAuthService() {
4862
4854
  },
4863
4855
  [env]
4864
4856
  );
4865
- const isValidToken = useCallback34(
4857
+ const isValidToken = useCallback36(
4866
4858
  async (token) => {
4867
4859
  const bodyData = {
4868
4860
  token
@@ -4875,7 +4867,7 @@ function useAuthService() {
4875
4867
  },
4876
4868
  [env]
4877
4869
  );
4878
- const isValidActionToken = useCallback34(
4870
+ const isValidActionToken = useCallback36(
4879
4871
  async (actionToken) => {
4880
4872
  const bodyData = {};
4881
4873
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -4888,7 +4880,7 @@ function useAuthService() {
4888
4880
  },
4889
4881
  [env]
4890
4882
  );
4891
- const loginSocial = useCallback34(
4883
+ const loginSocial = useCallback36(
4892
4884
  async ({
4893
4885
  db,
4894
4886
  state,
@@ -4906,13 +4898,13 @@ function useAuthService() {
4906
4898
  },
4907
4899
  [env]
4908
4900
  );
4909
- const getProviders = useCallback34(
4901
+ const getProviders = useCallback36(
4910
4902
  async (db) => {
4911
4903
  return env?.requests?.get("/oauth/providers", { params: { db } });
4912
4904
  },
4913
4905
  [env]
4914
4906
  );
4915
- const getAccessByCode = useCallback34(
4907
+ const getAccessByCode = useCallback36(
4916
4908
  async (code) => {
4917
4909
  const data = new URLSearchParams();
4918
4910
  data.append("code", code);
@@ -4932,7 +4924,7 @@ function useAuthService() {
4932
4924
  },
4933
4925
  [env]
4934
4926
  );
4935
- const logout = useCallback34(
4927
+ const logout = useCallback36(
4936
4928
  async (service) => {
4937
4929
  return env?.requests?.post(
4938
4930
  "/logout" /* LOGOUT */,
@@ -4949,7 +4941,7 @@ function useAuthService() {
4949
4941
  },
4950
4942
  [env]
4951
4943
  );
4952
- const getTenantMapping = useCallback34(
4944
+ const getTenantMapping = useCallback36(
4953
4945
  async ({ shortName, service }) => {
4954
4946
  const bodyData = {
4955
4947
  short_name: shortName
@@ -4967,7 +4959,7 @@ function useAuthService() {
4967
4959
  },
4968
4960
  [env]
4969
4961
  );
4970
- const getToken = useCallback34(
4962
+ const getToken = useCallback36(
4971
4963
  async ({
4972
4964
  phone,
4973
4965
  name,
@@ -5012,10 +5004,10 @@ function useAuthService() {
5012
5004
  }
5013
5005
 
5014
5006
  // src/services/company-service/index.ts
5015
- import { useCallback as useCallback35 } from "react";
5007
+ import { useCallback as useCallback37 } from "react";
5016
5008
  function useCompanyService() {
5017
5009
  const { env } = useEnv();
5018
- const getCurrentCompany = useCallback35(
5010
+ const getCurrentCompany = useCallback37(
5019
5011
  async (service, extraHeaders) => {
5020
5012
  return await env.requests.get(
5021
5013
  "/company" /* COMPANY_PATH */,
@@ -5032,7 +5024,7 @@ function useCompanyService() {
5032
5024
  },
5033
5025
  [env]
5034
5026
  );
5035
- const getInfoCompany = useCallback35(
5027
+ const getInfoCompany = useCallback37(
5036
5028
  async (id, service) => {
5037
5029
  const jsonData = {
5038
5030
  ids: [id],
@@ -5068,10 +5060,10 @@ function useCompanyService() {
5068
5060
  }
5069
5061
 
5070
5062
  // src/services/excel-service/index.ts
5071
- import { useCallback as useCallback36 } from "react";
5063
+ import { useCallback as useCallback38 } from "react";
5072
5064
  function useExcelService() {
5073
5065
  const { env } = useEnv();
5074
- const uploadFileExcel = useCallback36(
5066
+ const uploadFileExcel = useCallback38(
5075
5067
  async ({
5076
5068
  formData,
5077
5069
  service,
@@ -5088,7 +5080,7 @@ function useExcelService() {
5088
5080
  },
5089
5081
  [env]
5090
5082
  );
5091
- const uploadIdFile = useCallback36(
5083
+ const uploadIdFile = useCallback38(
5092
5084
  async ({
5093
5085
  formData,
5094
5086
  service,
@@ -5105,7 +5097,7 @@ function useExcelService() {
5105
5097
  },
5106
5098
  [env]
5107
5099
  );
5108
- const parsePreview = useCallback36(
5100
+ const parsePreview = useCallback38(
5109
5101
  async ({
5110
5102
  id,
5111
5103
  selectedSheet,
@@ -5154,7 +5146,7 @@ function useExcelService() {
5154
5146
  },
5155
5147
  [env]
5156
5148
  );
5157
- const executeImport = useCallback36(
5149
+ const executeImport = useCallback38(
5158
5150
  async ({
5159
5151
  columns,
5160
5152
  fields,
@@ -5188,7 +5180,7 @@ function useExcelService() {
5188
5180
  },
5189
5181
  [env]
5190
5182
  );
5191
- const getFileExcel = useCallback36(
5183
+ const getFileExcel = useCallback38(
5192
5184
  async ({
5193
5185
  model,
5194
5186
  service,
@@ -5212,7 +5204,7 @@ function useExcelService() {
5212
5204
  },
5213
5205
  [env]
5214
5206
  );
5215
- const getFieldExport = useCallback36(
5207
+ const getFieldExport = useCallback38(
5216
5208
  async ({
5217
5209
  ids,
5218
5210
  model,
@@ -5252,7 +5244,7 @@ function useExcelService() {
5252
5244
  },
5253
5245
  [env]
5254
5246
  );
5255
- const exportExcel = useCallback36(
5247
+ const exportExcel = useCallback38(
5256
5248
  async ({
5257
5249
  model,
5258
5250
  domain,
@@ -5300,10 +5292,10 @@ function useExcelService() {
5300
5292
  }
5301
5293
 
5302
5294
  // src/services/form-service/index.ts
5303
- import { useCallback as useCallback37 } from "react";
5295
+ import { useCallback as useCallback39 } from "react";
5304
5296
  function useFormService() {
5305
5297
  const { env } = useEnv();
5306
- const getComment = useCallback37(
5298
+ const getComment = useCallback39(
5307
5299
  async ({ data }) => {
5308
5300
  const jsonData = {
5309
5301
  thread_id: data.thread_id,
@@ -5321,7 +5313,7 @@ function useFormService() {
5321
5313
  },
5322
5314
  [env]
5323
5315
  );
5324
- const getThreadData = useCallback37(
5316
+ const getThreadData = useCallback39(
5325
5317
  async ({
5326
5318
  data,
5327
5319
  xNode,
@@ -5348,7 +5340,7 @@ function useFormService() {
5348
5340
  },
5349
5341
  [env]
5350
5342
  );
5351
- const getThreadMessages = useCallback37(
5343
+ const getThreadMessages = useCallback39(
5352
5344
  async ({
5353
5345
  data,
5354
5346
  xNode,
@@ -5374,7 +5366,7 @@ function useFormService() {
5374
5366
  },
5375
5367
  [env]
5376
5368
  );
5377
- const sentComment = useCallback37(
5369
+ const sentComment = useCallback39(
5378
5370
  async ({ data }) => {
5379
5371
  const jsonData = {
5380
5372
  context: {
@@ -5402,7 +5394,7 @@ function useFormService() {
5402
5394
  },
5403
5395
  [env]
5404
5396
  );
5405
- const deleteComment = useCallback37(
5397
+ const deleteComment = useCallback39(
5406
5398
  async ({ data }) => {
5407
5399
  const jsonData = {
5408
5400
  attachment_ids: [],
@@ -5418,7 +5410,7 @@ function useFormService() {
5418
5410
  },
5419
5411
  [env]
5420
5412
  );
5421
- const getImage = useCallback37(
5413
+ const getImage = useCallback39(
5422
5414
  async ({ data }) => {
5423
5415
  return env.requests.get(
5424
5416
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -5431,7 +5423,7 @@ function useFormService() {
5431
5423
  },
5432
5424
  [env]
5433
5425
  );
5434
- const uploadImage = useCallback37(
5426
+ const uploadImage = useCallback39(
5435
5427
  async ({
5436
5428
  formData,
5437
5429
  service,
@@ -5450,7 +5442,7 @@ function useFormService() {
5450
5442
  },
5451
5443
  [env]
5452
5444
  );
5453
- const uploadFile = useCallback37(
5445
+ const uploadFile = useCallback39(
5454
5446
  async ({
5455
5447
  formData,
5456
5448
  service,
@@ -5470,7 +5462,7 @@ function useFormService() {
5470
5462
  },
5471
5463
  [env]
5472
5464
  );
5473
- const getFormView = useCallback37(
5465
+ const getFormView = useCallback39(
5474
5466
  async ({ data }) => {
5475
5467
  const jsonData = {
5476
5468
  model: data.model,
@@ -5486,7 +5478,7 @@ function useFormService() {
5486
5478
  },
5487
5479
  [env]
5488
5480
  );
5489
- const changeStatus = useCallback37(
5481
+ const changeStatus = useCallback39(
5490
5482
  async ({ data }) => {
5491
5483
  const vals = {
5492
5484
  [data.name]: data.stage_id
@@ -5515,7 +5507,7 @@ function useFormService() {
5515
5507
  },
5516
5508
  [env]
5517
5509
  );
5518
- const getExternalTab = useCallback37(
5510
+ const getExternalTab = useCallback39(
5519
5511
  async ({ method, context, service, xNode }) => {
5520
5512
  return env?.requests?.post(
5521
5513
  "/call" /* CALL_PATH */,
@@ -5550,10 +5542,10 @@ function useFormService() {
5550
5542
  }
5551
5543
 
5552
5544
  // src/services/kanban-service/index.ts
5553
- import { useCallback as useCallback38 } from "react";
5545
+ import { useCallback as useCallback40 } from "react";
5554
5546
  function useKanbanService() {
5555
5547
  const { env } = useEnv();
5556
- const getGroups = useCallback38(
5548
+ const getGroups = useCallback40(
5557
5549
  async ({ model, width_context }) => {
5558
5550
  const jsonData = {
5559
5551
  model,
@@ -5573,7 +5565,7 @@ function useKanbanService() {
5573
5565
  },
5574
5566
  [env]
5575
5567
  );
5576
- const getProgressBar = useCallback38(
5568
+ const getProgressBar = useCallback40(
5577
5569
  async ({ field, color, model, width_context }) => {
5578
5570
  const jsonData = {
5579
5571
  model,
@@ -5603,10 +5595,10 @@ function useKanbanService() {
5603
5595
  }
5604
5596
 
5605
5597
  // src/services/model-service/index.ts
5606
- import { useCallback as useCallback39 } from "react";
5598
+ import { useCallback as useCallback41 } from "react";
5607
5599
  function useModelService() {
5608
5600
  const { env } = useEnv();
5609
- const getListMyBankAccount = useCallback39(
5601
+ const getListMyBankAccount = useCallback41(
5610
5602
  async ({
5611
5603
  domain,
5612
5604
  spectification,
@@ -5630,7 +5622,7 @@ function useModelService() {
5630
5622
  },
5631
5623
  [env]
5632
5624
  );
5633
- const getCurrency = useCallback39(async () => {
5625
+ const getCurrency = useCallback41(async () => {
5634
5626
  const jsonData = {
5635
5627
  model: "res.currency",
5636
5628
  method: "web_search_read",
@@ -5650,7 +5642,7 @@ function useModelService() {
5650
5642
  }
5651
5643
  });
5652
5644
  }, [env]);
5653
- const getConversionRate = useCallback39(async () => {
5645
+ const getConversionRate = useCallback41(async () => {
5654
5646
  const jsonData = {
5655
5647
  model: "res.currency",
5656
5648
  method: "web_search_read",
@@ -5676,7 +5668,7 @@ function useModelService() {
5676
5668
  }
5677
5669
  });
5678
5670
  }, [env]);
5679
- const getAll = useCallback39(
5671
+ const getAll = useCallback41(
5680
5672
  async ({
5681
5673
  data,
5682
5674
  service,
@@ -5718,7 +5710,7 @@ function useModelService() {
5718
5710
  },
5719
5711
  [env]
5720
5712
  );
5721
- const getListCalendar = useCallback39(
5713
+ const getListCalendar = useCallback41(
5722
5714
  async ({ data }) => {
5723
5715
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
5724
5716
  fields: data.fields,
@@ -5749,7 +5741,7 @@ function useModelService() {
5749
5741
  },
5750
5742
  [env]
5751
5743
  );
5752
- const getList = useCallback39(
5744
+ const getList = useCallback41(
5753
5745
  async ({
5754
5746
  model,
5755
5747
  ids = [],
@@ -5781,7 +5773,7 @@ function useModelService() {
5781
5773
  },
5782
5774
  [env]
5783
5775
  );
5784
- const getDetail = useCallback39(
5776
+ const getDetail = useCallback41(
5785
5777
  async ({
5786
5778
  ids = [],
5787
5779
  model,
@@ -5813,7 +5805,7 @@ function useModelService() {
5813
5805
  },
5814
5806
  [env]
5815
5807
  );
5816
- const save = useCallback39(
5808
+ const save = useCallback41(
5817
5809
  async ({
5818
5810
  model,
5819
5811
  ids = [],
@@ -5848,7 +5840,7 @@ function useModelService() {
5848
5840
  },
5849
5841
  [env]
5850
5842
  );
5851
- const deleteApi = useCallback39(
5843
+ const deleteApi = useCallback41(
5852
5844
  async ({ ids = [], model, service }) => {
5853
5845
  const jsonData = {
5854
5846
  model,
@@ -5868,7 +5860,7 @@ function useModelService() {
5868
5860
  },
5869
5861
  [env]
5870
5862
  );
5871
- const onChange = useCallback39(
5863
+ const onChange = useCallback41(
5872
5864
  async ({
5873
5865
  ids = [],
5874
5866
  model,
@@ -5904,7 +5896,7 @@ function useModelService() {
5904
5896
  },
5905
5897
  [env]
5906
5898
  );
5907
- const getListFieldsOnchange = useCallback39(
5899
+ const getListFieldsOnchange = useCallback41(
5908
5900
  async ({
5909
5901
  model,
5910
5902
  service,
@@ -5928,7 +5920,7 @@ function useModelService() {
5928
5920
  },
5929
5921
  [env]
5930
5922
  );
5931
- const parseORMOdoo = useCallback39((data) => {
5923
+ const parseORMOdoo = useCallback41((data) => {
5932
5924
  for (const key in data) {
5933
5925
  if (key === "display_name") {
5934
5926
  delete data[key];
@@ -5939,7 +5931,7 @@ function useModelService() {
5939
5931
  }
5940
5932
  return { ...data };
5941
5933
  }, []);
5942
- const toDataJS = useCallback39(
5934
+ const toDataJS = useCallback41(
5943
5935
  (data, viewData, model) => {
5944
5936
  for (const key in data) {
5945
5937
  if (data[key] === false) {
@@ -5997,10 +5989,10 @@ function useModelService() {
5997
5989
  }
5998
5990
 
5999
5991
  // src/services/user-service/index.ts
6000
- import { useCallback as useCallback40 } from "react";
5992
+ import { useCallback as useCallback42 } from "react";
6001
5993
  function useUserService() {
6002
5994
  const { env } = useEnv();
6003
- const getProfile = useCallback40(
5995
+ const getProfile = useCallback42(
6004
5996
  async (service, path, extraHeaders) => {
6005
5997
  return env?.requests?.get(
6006
5998
  path || "/userinfo" /* PROFILE_PATH */,
@@ -6017,7 +6009,7 @@ function useUserService() {
6017
6009
  },
6018
6010
  [env]
6019
6011
  );
6020
- const getUser = useCallback40(
6012
+ const getUser = useCallback42(
6021
6013
  async ({ context, id }) => {
6022
6014
  const jsonData = {
6023
6015
  model: "res.users",
@@ -6055,7 +6047,7 @@ function useUserService() {
6055
6047
  },
6056
6048
  [env]
6057
6049
  );
6058
- const switchUserLocale = useCallback40(
6050
+ const switchUserLocale = useCallback42(
6059
6051
  async ({ id, values, service }) => {
6060
6052
  const jsonData = {
6061
6053
  model: "res.users",
@@ -6083,10 +6075,10 @@ function useUserService() {
6083
6075
  }
6084
6076
 
6085
6077
  // src/services/view-service/index.ts
6086
- import { useCallback as useCallback41 } from "react";
6078
+ import { useCallback as useCallback43 } from "react";
6087
6079
  function useViewService() {
6088
6080
  const { env } = useEnv();
6089
- const getView = useCallback41(
6081
+ const getView = useCallback43(
6090
6082
  async ({
6091
6083
  model,
6092
6084
  views,
@@ -6126,7 +6118,7 @@ function useViewService() {
6126
6118
  },
6127
6119
  [env]
6128
6120
  );
6129
- const getMenu = useCallback41(
6121
+ const getMenu = useCallback43(
6130
6122
  async (context, specification, domain, service) => {
6131
6123
  const jsonData = {
6132
6124
  model: "ir.ui.menu" /* MENU */,
@@ -6157,7 +6149,7 @@ function useViewService() {
6157
6149
  },
6158
6150
  [env]
6159
6151
  );
6160
- const getActionDetail = useCallback41(
6152
+ const getActionDetail = useCallback43(
6161
6153
  async (aid, context) => {
6162
6154
  const jsonData = {
6163
6155
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -6187,7 +6179,7 @@ function useViewService() {
6187
6179
  },
6188
6180
  [env]
6189
6181
  );
6190
- const getResequence = useCallback41(
6182
+ const getResequence = useCallback43(
6191
6183
  async ({
6192
6184
  model,
6193
6185
  ids,
@@ -6217,7 +6209,7 @@ function useViewService() {
6217
6209
  },
6218
6210
  [env]
6219
6211
  );
6220
- const getSelectionItem = useCallback41(
6212
+ const getSelectionItem = useCallback43(
6221
6213
  async ({
6222
6214
  data,
6223
6215
  service,
@@ -6254,7 +6246,7 @@ function useViewService() {
6254
6246
  },
6255
6247
  [env]
6256
6248
  );
6257
- const loadMessages = useCallback41(async () => {
6249
+ const loadMessages = useCallback43(async () => {
6258
6250
  return env.requests.post(
6259
6251
  "/load_message_failures" /* LOAD_MESSAGE */,
6260
6252
  {},
@@ -6265,14 +6257,14 @@ function useViewService() {
6265
6257
  }
6266
6258
  );
6267
6259
  }, [env]);
6268
- const getVersion = useCallback41(async () => {
6260
+ const getVersion = useCallback43(async () => {
6269
6261
  return env?.requests?.get("", {
6270
6262
  headers: {
6271
6263
  "Content-Type": "application/json"
6272
6264
  }
6273
6265
  });
6274
6266
  }, [env]);
6275
- const grantAccess = useCallback41(
6267
+ const grantAccess = useCallback43(
6276
6268
  async ({
6277
6269
  redirect_uri,
6278
6270
  state,
@@ -6299,7 +6291,7 @@ function useViewService() {
6299
6291
  },
6300
6292
  [env]
6301
6293
  );
6302
- const removeTotpSetUp = useCallback41(
6294
+ const removeTotpSetUp = useCallback43(
6303
6295
  async ({ method, token }) => {
6304
6296
  const jsonData = {
6305
6297
  method,
@@ -6320,7 +6312,7 @@ function useViewService() {
6320
6312
  },
6321
6313
  [env]
6322
6314
  );
6323
- const requestSetupTotp = useCallback41(
6315
+ const requestSetupTotp = useCallback43(
6324
6316
  async ({ method, token }) => {
6325
6317
  const jsonData = {
6326
6318
  method,
@@ -6339,7 +6331,7 @@ function useViewService() {
6339
6331
  },
6340
6332
  [env]
6341
6333
  );
6342
- const settingsWebRead2fa = useCallback41(
6334
+ const settingsWebRead2fa = useCallback43(
6343
6335
  async ({
6344
6336
  method,
6345
6337
  model,
@@ -6367,7 +6359,7 @@ function useViewService() {
6367
6359
  },
6368
6360
  [env]
6369
6361
  );
6370
- const signInSSO = useCallback41(
6362
+ const signInSSO = useCallback43(
6371
6363
  async ({
6372
6364
  redirect_uri,
6373
6365
  state,
@@ -6399,7 +6391,7 @@ function useViewService() {
6399
6391
  },
6400
6392
  [env]
6401
6393
  );
6402
- const verify2FA = useCallback41(
6394
+ const verify2FA = useCallback43(
6403
6395
  ({
6404
6396
  method,
6405
6397
  with_context,
@@ -6432,7 +6424,7 @@ function useViewService() {
6432
6424
  },
6433
6425
  [env]
6434
6426
  );
6435
- const get2FAMethods = useCallback41(
6427
+ const get2FAMethods = useCallback43(
6436
6428
  ({ method, with_context }) => {
6437
6429
  const jsonData = {
6438
6430
  method,
@@ -6451,7 +6443,7 @@ function useViewService() {
6451
6443
  },
6452
6444
  [env]
6453
6445
  );
6454
- const verifyTotp = useCallback41(
6446
+ const verifyTotp = useCallback43(
6455
6447
  ({
6456
6448
  method,
6457
6449
  action_token,
@@ -6476,7 +6468,7 @@ function useViewService() {
6476
6468
  },
6477
6469
  [env]
6478
6470
  );
6479
- const getNotifications = useCallback41(
6471
+ const getNotifications = useCallback43(
6480
6472
  async ({
6481
6473
  service,
6482
6474
  xNode,
@@ -6496,7 +6488,7 @@ function useViewService() {
6496
6488
  },
6497
6489
  [env]
6498
6490
  );
6499
- const getCountry = useCallback41(
6491
+ const getCountry = useCallback43(
6500
6492
  async ({
6501
6493
  service,
6502
6494
  xNode,
@@ -6523,7 +6515,7 @@ function useViewService() {
6523
6515
  },
6524
6516
  [env]
6525
6517
  );
6526
- const getCity = useCallback41(
6518
+ const getCity = useCallback43(
6527
6519
  async ({
6528
6520
  service,
6529
6521
  xNode,
@@ -6550,7 +6542,7 @@ function useViewService() {
6550
6542
  },
6551
6543
  [env]
6552
6544
  );
6553
- const getWard = useCallback41(
6545
+ const getWard = useCallback43(
6554
6546
  async ({
6555
6547
  service,
6556
6548
  xNode,
@@ -6575,7 +6567,7 @@ function useViewService() {
6575
6567
  },
6576
6568
  [env]
6577
6569
  );
6578
- const getPartnerTitle = useCallback41(
6570
+ const getPartnerTitle = useCallback43(
6579
6571
  async ({
6580
6572
  service,
6581
6573
  xNode,
@@ -6627,10 +6619,10 @@ function useViewService() {
6627
6619
  }
6628
6620
 
6629
6621
  // src/services/dashboard-service/index.ts
6630
- import { useCallback as useCallback42 } from "react";
6622
+ import { useCallback as useCallback44 } from "react";
6631
6623
  function useDashboardService() {
6632
6624
  const { env } = useEnv();
6633
- const readGroup = useCallback42(
6625
+ const readGroup = useCallback44(
6634
6626
  async ({
6635
6627
  service,
6636
6628
  xNode,
@@ -6647,7 +6639,7 @@ function useDashboardService() {
6647
6639
  },
6648
6640
  [env]
6649
6641
  );
6650
- const getDataChart = useCallback42(
6642
+ const getDataChart = useCallback44(
6651
6643
  async ({
6652
6644
  service,
6653
6645
  xNode,