@fctc/interface-logic 4.6.9 → 4.7.0

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_react48 = require("react");
48
+ var import_react52 = require("react");
49
49
 
50
50
  // src/constants/api/uri-constant.ts
51
51
  var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
@@ -162,7 +162,7 @@ var MODEL_TO_TABLE = {
162
162
  ["pos.order" /* POS_ORDER */]: "orders" /* ORDERS */,
163
163
  ["pos.payment.method" /* POS_PAYMENT_METHOD */]: "payment_methods" /* PAYMENT_METHODS */,
164
164
  ["pos.payment" /* POS_PAYMENT */]: "payments" /* PAYMENTS */,
165
- ["pos.category" /* POS_CATEGORY */]: "product_categories" /* PRODUCT_CATEGORIES */,
165
+ ["pos.category" /* POS_CATEGORY */]: "pos_categories" /* POS_CATEGORIES */,
166
166
  ["product.product" /* PRODUCT_PRODUCT */]: "products" /* PRODUCTS */,
167
167
  ["restaurant.floor" /* RESTAURANT_FLOOR */]: "restaurant_floors" /* RESTAURANT_FLOORS */,
168
168
  ["restaurant.table" /* RESTAURANT_TABLE */]: "restaurant_tables" /* RESTAURANT_TABLES */
@@ -2955,7 +2955,7 @@ function useEnv() {
2955
2955
  }
2956
2956
 
2957
2957
  // src/provider/service-provider.tsx
2958
- var import_react46 = require("react");
2958
+ var import_react50 = require("react");
2959
2959
 
2960
2960
  // src/hooks/auth/use-forgot-password.ts
2961
2961
  var import_react_query3 = require("@tanstack/react-query");
@@ -4739,6 +4739,18 @@ var import_react44 = require("react");
4739
4739
  // src/services/pos-service/supabase/update-order-total-amount.ts
4740
4740
  var import_react45 = require("react");
4741
4741
 
4742
+ // src/services/pos-service/supabase/update-order-line.ts
4743
+ var import_react46 = require("react");
4744
+
4745
+ // src/services/pos-service/supabase/update-order.ts
4746
+ var import_react47 = require("react");
4747
+
4748
+ // src/services/pos-service/supabase/delete-order.ts
4749
+ var import_react48 = require("react");
4750
+
4751
+ // src/services/pos-service/supabase/delete-order-line.ts
4752
+ var import_react49 = require("react");
4753
+
4742
4754
  // src/hooks/pos/supabase/use-add-table.ts
4743
4755
  var import_react_query116 = require("@tanstack/react-query");
4744
4756
 
@@ -4759,16 +4771,16 @@ var import_react_query121 = require("@tanstack/react-query");
4759
4771
 
4760
4772
  // src/provider/service-provider.tsx
4761
4773
  var import_jsx_runtime7 = require("react/jsx-runtime");
4762
- var ServiceContext = (0, import_react46.createContext)(null);
4774
+ var ServiceContext = (0, import_react50.createContext)(null);
4763
4775
 
4764
4776
  // src/provider/meta-provider.tsx
4765
- var import_react47 = require("react");
4777
+ var import_react51 = require("react");
4766
4778
  var import_jsx_runtime8 = require("react/jsx-runtime");
4767
4779
 
4768
4780
  // src/services/action-service/index.ts
4769
4781
  function useActionService() {
4770
4782
  const { env } = useEnv();
4771
- const loadAction = (0, import_react48.useCallback)(
4783
+ const loadAction = (0, import_react52.useCallback)(
4772
4784
  async ({
4773
4785
  idAction,
4774
4786
  context,
@@ -4792,7 +4804,7 @@ function useActionService() {
4792
4804
  },
4793
4805
  [env]
4794
4806
  );
4795
- const callButton = (0, import_react48.useCallback)(
4807
+ const callButton = (0, import_react52.useCallback)(
4796
4808
  async ({
4797
4809
  model,
4798
4810
  ids = [],
@@ -4826,7 +4838,7 @@ function useActionService() {
4826
4838
  },
4827
4839
  [env]
4828
4840
  );
4829
- const removeRows = (0, import_react48.useCallback)(
4841
+ const removeRows = (0, import_react52.useCallback)(
4830
4842
  async ({
4831
4843
  model,
4832
4844
  ids,
@@ -4852,7 +4864,7 @@ function useActionService() {
4852
4864
  },
4853
4865
  [env]
4854
4866
  );
4855
- const duplicateRecord = (0, import_react48.useCallback)(
4867
+ const duplicateRecord = (0, import_react52.useCallback)(
4856
4868
  async ({
4857
4869
  model,
4858
4870
  id,
@@ -4878,7 +4890,7 @@ function useActionService() {
4878
4890
  },
4879
4891
  [env]
4880
4892
  );
4881
- const getPrintReportName = (0, import_react48.useCallback)(
4893
+ const getPrintReportName = (0, import_react52.useCallback)(
4882
4894
  async ({ id }) => {
4883
4895
  const jsonData = {
4884
4896
  model: "ir.actions.report",
@@ -4896,7 +4908,7 @@ function useActionService() {
4896
4908
  },
4897
4909
  [env]
4898
4910
  );
4899
- const print = (0, import_react48.useCallback)(
4911
+ const print = (0, import_react52.useCallback)(
4900
4912
  async ({ id, report, db }) => {
4901
4913
  const jsonData = {
4902
4914
  report,
@@ -4914,7 +4926,7 @@ function useActionService() {
4914
4926
  },
4915
4927
  [env]
4916
4928
  );
4917
- const runAction = (0, import_react48.useCallback)(
4929
+ const runAction = (0, import_react52.useCallback)(
4918
4930
  async ({
4919
4931
  idAction,
4920
4932
  context,
@@ -4941,7 +4953,7 @@ function useActionService() {
4941
4953
  },
4942
4954
  [env]
4943
4955
  );
4944
- const generateSerialNumber = (0, import_react48.useCallback)(
4956
+ const generateSerialNumber = (0, import_react52.useCallback)(
4945
4957
  async ({
4946
4958
  kwargs,
4947
4959
  context,
@@ -4979,11 +4991,11 @@ function useActionService() {
4979
4991
  }
4980
4992
 
4981
4993
  // src/services/auth-service/index.ts
4982
- var import_react49 = require("react");
4994
+ var import_react53 = require("react");
4983
4995
  function useAuthService() {
4984
4996
  const { env } = useEnv();
4985
4997
  const supabase = useSupabaseOptional();
4986
- const login = (0, import_react49.useCallback)(
4998
+ const login = (0, import_react53.useCallback)(
4987
4999
  async (body) => {
4988
5000
  const payload = Object.fromEntries(
4989
5001
  Object.entries({
@@ -5008,7 +5020,7 @@ function useAuthService() {
5008
5020
  },
5009
5021
  [env]
5010
5022
  );
5011
- const loginSupabase = (0, import_react49.useCallback)(
5023
+ const loginSupabase = (0, import_react53.useCallback)(
5012
5024
  async (body) => {
5013
5025
  if (!supabase) {
5014
5026
  return {
@@ -5024,7 +5036,7 @@ function useAuthService() {
5024
5036
  },
5025
5037
  [supabase]
5026
5038
  );
5027
- const forgotPassword = (0, import_react49.useCallback)(
5039
+ const forgotPassword = (0, import_react53.useCallback)(
5028
5040
  async (email) => {
5029
5041
  const bodyData = {
5030
5042
  login: email,
@@ -5038,7 +5050,7 @@ function useAuthService() {
5038
5050
  },
5039
5051
  [env]
5040
5052
  );
5041
- const forgotPasswordSSO = (0, import_react49.useCallback)(
5053
+ const forgotPasswordSSO = (0, import_react53.useCallback)(
5042
5054
  async ({
5043
5055
  email,
5044
5056
  with_context,
@@ -5061,7 +5073,7 @@ function useAuthService() {
5061
5073
  },
5062
5074
  [env]
5063
5075
  );
5064
- const resetPassword = (0, import_react49.useCallback)(
5076
+ const resetPassword = (0, import_react53.useCallback)(
5065
5077
  async (data, token) => {
5066
5078
  const bodyData = {
5067
5079
  token,
@@ -5076,7 +5088,7 @@ function useAuthService() {
5076
5088
  },
5077
5089
  [env]
5078
5090
  );
5079
- const resetPasswordSSO = (0, import_react49.useCallback)(
5091
+ const resetPasswordSSO = (0, import_react53.useCallback)(
5080
5092
  async ({
5081
5093
  method,
5082
5094
  password,
@@ -5099,7 +5111,7 @@ function useAuthService() {
5099
5111
  },
5100
5112
  [env]
5101
5113
  );
5102
- const updatePassword = (0, import_react49.useCallback)(
5114
+ const updatePassword = (0, import_react53.useCallback)(
5103
5115
  async (data, token) => {
5104
5116
  const bodyData = {
5105
5117
  token,
@@ -5114,7 +5126,7 @@ function useAuthService() {
5114
5126
  },
5115
5127
  [env]
5116
5128
  );
5117
- const isValidToken = (0, import_react49.useCallback)(
5129
+ const isValidToken = (0, import_react53.useCallback)(
5118
5130
  async (token) => {
5119
5131
  const bodyData = {
5120
5132
  token
@@ -5127,7 +5139,7 @@ function useAuthService() {
5127
5139
  },
5128
5140
  [env]
5129
5141
  );
5130
- const isValidActionToken = (0, import_react49.useCallback)(
5142
+ const isValidActionToken = (0, import_react53.useCallback)(
5131
5143
  async (actionToken) => {
5132
5144
  const bodyData = {};
5133
5145
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -5140,7 +5152,7 @@ function useAuthService() {
5140
5152
  },
5141
5153
  [env]
5142
5154
  );
5143
- const loginSocial = (0, import_react49.useCallback)(
5155
+ const loginSocial = (0, import_react53.useCallback)(
5144
5156
  async ({
5145
5157
  db,
5146
5158
  state,
@@ -5158,13 +5170,13 @@ function useAuthService() {
5158
5170
  },
5159
5171
  [env]
5160
5172
  );
5161
- const getProviders = (0, import_react49.useCallback)(
5173
+ const getProviders = (0, import_react53.useCallback)(
5162
5174
  async (db) => {
5163
5175
  return env?.requests?.get("/oauth/providers", { params: { db } });
5164
5176
  },
5165
5177
  [env]
5166
5178
  );
5167
- const getAccessByCode = (0, import_react49.useCallback)(
5179
+ const getAccessByCode = (0, import_react53.useCallback)(
5168
5180
  async (code) => {
5169
5181
  const data = new URLSearchParams();
5170
5182
  data.append("code", code);
@@ -5184,7 +5196,7 @@ function useAuthService() {
5184
5196
  },
5185
5197
  [env]
5186
5198
  );
5187
- const logout = (0, import_react49.useCallback)(
5199
+ const logout = (0, import_react53.useCallback)(
5188
5200
  async (service) => {
5189
5201
  return env?.requests?.post(
5190
5202
  "/logout" /* LOGOUT */,
@@ -5201,7 +5213,7 @@ function useAuthService() {
5201
5213
  },
5202
5214
  [env]
5203
5215
  );
5204
- const getTenantMapping = (0, import_react49.useCallback)(
5216
+ const getTenantMapping = (0, import_react53.useCallback)(
5205
5217
  async ({ shortName, service }) => {
5206
5218
  const bodyData = {
5207
5219
  short_name: shortName
@@ -5219,7 +5231,7 @@ function useAuthService() {
5219
5231
  },
5220
5232
  [env]
5221
5233
  );
5222
- const getToken = (0, import_react49.useCallback)(
5234
+ const getToken = (0, import_react53.useCallback)(
5223
5235
  async ({
5224
5236
  phone,
5225
5237
  name,
@@ -5264,10 +5276,10 @@ function useAuthService() {
5264
5276
  }
5265
5277
 
5266
5278
  // src/services/company-service/index.ts
5267
- var import_react50 = require("react");
5279
+ var import_react54 = require("react");
5268
5280
  function useCompanyService() {
5269
5281
  const { env } = useEnv();
5270
- const getCurrentCompany = (0, import_react50.useCallback)(
5282
+ const getCurrentCompany = (0, import_react54.useCallback)(
5271
5283
  async (service, extraHeaders) => {
5272
5284
  return await env.requests.get(
5273
5285
  "/company" /* COMPANY_PATH */,
@@ -5284,7 +5296,7 @@ function useCompanyService() {
5284
5296
  },
5285
5297
  [env]
5286
5298
  );
5287
- const getInfoCompany = (0, import_react50.useCallback)(
5299
+ const getInfoCompany = (0, import_react54.useCallback)(
5288
5300
  async (id, service) => {
5289
5301
  const jsonData = {
5290
5302
  ids: [id],
@@ -5320,10 +5332,10 @@ function useCompanyService() {
5320
5332
  }
5321
5333
 
5322
5334
  // src/services/excel-service/index.ts
5323
- var import_react51 = require("react");
5335
+ var import_react55 = require("react");
5324
5336
  function useExcelService() {
5325
5337
  const { env } = useEnv();
5326
- const uploadFileExcel = (0, import_react51.useCallback)(
5338
+ const uploadFileExcel = (0, import_react55.useCallback)(
5327
5339
  async ({
5328
5340
  formData,
5329
5341
  service,
@@ -5340,7 +5352,7 @@ function useExcelService() {
5340
5352
  },
5341
5353
  [env]
5342
5354
  );
5343
- const uploadIdFile = (0, import_react51.useCallback)(
5355
+ const uploadIdFile = (0, import_react55.useCallback)(
5344
5356
  async ({
5345
5357
  formData,
5346
5358
  service,
@@ -5357,7 +5369,7 @@ function useExcelService() {
5357
5369
  },
5358
5370
  [env]
5359
5371
  );
5360
- const parsePreview = (0, import_react51.useCallback)(
5372
+ const parsePreview = (0, import_react55.useCallback)(
5361
5373
  async ({
5362
5374
  id,
5363
5375
  selectedSheet,
@@ -5406,7 +5418,7 @@ function useExcelService() {
5406
5418
  },
5407
5419
  [env]
5408
5420
  );
5409
- const executeImport = (0, import_react51.useCallback)(
5421
+ const executeImport = (0, import_react55.useCallback)(
5410
5422
  async ({
5411
5423
  columns,
5412
5424
  fields,
@@ -5440,7 +5452,7 @@ function useExcelService() {
5440
5452
  },
5441
5453
  [env]
5442
5454
  );
5443
- const getFileExcel = (0, import_react51.useCallback)(
5455
+ const getFileExcel = (0, import_react55.useCallback)(
5444
5456
  async ({
5445
5457
  model,
5446
5458
  service,
@@ -5464,7 +5476,7 @@ function useExcelService() {
5464
5476
  },
5465
5477
  [env]
5466
5478
  );
5467
- const getFieldExport = (0, import_react51.useCallback)(
5479
+ const getFieldExport = (0, import_react55.useCallback)(
5468
5480
  async ({
5469
5481
  ids,
5470
5482
  model,
@@ -5504,7 +5516,7 @@ function useExcelService() {
5504
5516
  },
5505
5517
  [env]
5506
5518
  );
5507
- const exportExcel = (0, import_react51.useCallback)(
5519
+ const exportExcel = (0, import_react55.useCallback)(
5508
5520
  async ({
5509
5521
  model,
5510
5522
  domain,
@@ -5552,10 +5564,10 @@ function useExcelService() {
5552
5564
  }
5553
5565
 
5554
5566
  // src/services/form-service/index.ts
5555
- var import_react52 = require("react");
5567
+ var import_react56 = require("react");
5556
5568
  function useFormService() {
5557
5569
  const { env } = useEnv();
5558
- const getComment = (0, import_react52.useCallback)(
5570
+ const getComment = (0, import_react56.useCallback)(
5559
5571
  async ({ data }) => {
5560
5572
  const jsonData = {
5561
5573
  thread_id: data.thread_id,
@@ -5573,7 +5585,7 @@ function useFormService() {
5573
5585
  },
5574
5586
  [env]
5575
5587
  );
5576
- const getThreadData = (0, import_react52.useCallback)(
5588
+ const getThreadData = (0, import_react56.useCallback)(
5577
5589
  async ({
5578
5590
  data,
5579
5591
  xNode,
@@ -5600,7 +5612,7 @@ function useFormService() {
5600
5612
  },
5601
5613
  [env]
5602
5614
  );
5603
- const getThreadMessages = (0, import_react52.useCallback)(
5615
+ const getThreadMessages = (0, import_react56.useCallback)(
5604
5616
  async ({
5605
5617
  data,
5606
5618
  xNode,
@@ -5626,7 +5638,7 @@ function useFormService() {
5626
5638
  },
5627
5639
  [env]
5628
5640
  );
5629
- const sentComment = (0, import_react52.useCallback)(
5641
+ const sentComment = (0, import_react56.useCallback)(
5630
5642
  async ({ data }) => {
5631
5643
  const jsonData = {
5632
5644
  context: {
@@ -5654,7 +5666,7 @@ function useFormService() {
5654
5666
  },
5655
5667
  [env]
5656
5668
  );
5657
- const deleteComment = (0, import_react52.useCallback)(
5669
+ const deleteComment = (0, import_react56.useCallback)(
5658
5670
  async ({ data }) => {
5659
5671
  const jsonData = {
5660
5672
  attachment_ids: [],
@@ -5670,7 +5682,7 @@ function useFormService() {
5670
5682
  },
5671
5683
  [env]
5672
5684
  );
5673
- const getImage = (0, import_react52.useCallback)(
5685
+ const getImage = (0, import_react56.useCallback)(
5674
5686
  async ({ data }) => {
5675
5687
  return env.requests.get(
5676
5688
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -5683,7 +5695,7 @@ function useFormService() {
5683
5695
  },
5684
5696
  [env]
5685
5697
  );
5686
- const uploadImage = (0, import_react52.useCallback)(
5698
+ const uploadImage = (0, import_react56.useCallback)(
5687
5699
  async ({
5688
5700
  formData,
5689
5701
  service,
@@ -5702,7 +5714,7 @@ function useFormService() {
5702
5714
  },
5703
5715
  [env]
5704
5716
  );
5705
- const uploadFile = (0, import_react52.useCallback)(
5717
+ const uploadFile = (0, import_react56.useCallback)(
5706
5718
  async ({
5707
5719
  formData,
5708
5720
  service,
@@ -5722,7 +5734,7 @@ function useFormService() {
5722
5734
  },
5723
5735
  [env]
5724
5736
  );
5725
- const getFormView = (0, import_react52.useCallback)(
5737
+ const getFormView = (0, import_react56.useCallback)(
5726
5738
  async ({ data }) => {
5727
5739
  const jsonData = {
5728
5740
  model: data.model,
@@ -5738,7 +5750,7 @@ function useFormService() {
5738
5750
  },
5739
5751
  [env]
5740
5752
  );
5741
- const changeStatus = (0, import_react52.useCallback)(
5753
+ const changeStatus = (0, import_react56.useCallback)(
5742
5754
  async ({ data }) => {
5743
5755
  const vals = {
5744
5756
  [data.name]: data.stage_id
@@ -5767,7 +5779,7 @@ function useFormService() {
5767
5779
  },
5768
5780
  [env]
5769
5781
  );
5770
- const getExternalTab = (0, import_react52.useCallback)(
5782
+ const getExternalTab = (0, import_react56.useCallback)(
5771
5783
  async ({ method, context, service, xNode }) => {
5772
5784
  return env?.requests?.post(
5773
5785
  "/call" /* CALL_PATH */,
@@ -5802,10 +5814,10 @@ function useFormService() {
5802
5814
  }
5803
5815
 
5804
5816
  // src/services/kanban-service/index.ts
5805
- var import_react53 = require("react");
5817
+ var import_react57 = require("react");
5806
5818
  function useKanbanService() {
5807
5819
  const { env } = useEnv();
5808
- const getGroups = (0, import_react53.useCallback)(
5820
+ const getGroups = (0, import_react57.useCallback)(
5809
5821
  async ({ model, width_context }) => {
5810
5822
  const jsonData = {
5811
5823
  model,
@@ -5825,7 +5837,7 @@ function useKanbanService() {
5825
5837
  },
5826
5838
  [env]
5827
5839
  );
5828
- const getProgressBar = (0, import_react53.useCallback)(
5840
+ const getProgressBar = (0, import_react57.useCallback)(
5829
5841
  async ({ field, color, model, width_context }) => {
5830
5842
  const jsonData = {
5831
5843
  model,
@@ -5855,10 +5867,10 @@ function useKanbanService() {
5855
5867
  }
5856
5868
 
5857
5869
  // src/services/model-service/index.ts
5858
- var import_react54 = require("react");
5870
+ var import_react58 = require("react");
5859
5871
  function useModelService() {
5860
5872
  const { env } = useEnv();
5861
- const getListMyBankAccount = (0, import_react54.useCallback)(
5873
+ const getListMyBankAccount = (0, import_react58.useCallback)(
5862
5874
  async ({
5863
5875
  domain,
5864
5876
  spectification,
@@ -5882,7 +5894,7 @@ function useModelService() {
5882
5894
  },
5883
5895
  [env]
5884
5896
  );
5885
- const getCurrency = (0, import_react54.useCallback)(async () => {
5897
+ const getCurrency = (0, import_react58.useCallback)(async () => {
5886
5898
  const jsonData = {
5887
5899
  model: "res.currency",
5888
5900
  method: "web_search_read",
@@ -5902,7 +5914,7 @@ function useModelService() {
5902
5914
  }
5903
5915
  });
5904
5916
  }, [env]);
5905
- const getConversionRate = (0, import_react54.useCallback)(async () => {
5917
+ const getConversionRate = (0, import_react58.useCallback)(async () => {
5906
5918
  const jsonData = {
5907
5919
  model: "res.currency",
5908
5920
  method: "web_search_read",
@@ -5928,7 +5940,7 @@ function useModelService() {
5928
5940
  }
5929
5941
  });
5930
5942
  }, [env]);
5931
- const getAll = (0, import_react54.useCallback)(
5943
+ const getAll = (0, import_react58.useCallback)(
5932
5944
  async ({
5933
5945
  data,
5934
5946
  service,
@@ -5970,7 +5982,7 @@ function useModelService() {
5970
5982
  },
5971
5983
  [env]
5972
5984
  );
5973
- const getListCalendar = (0, import_react54.useCallback)(
5985
+ const getListCalendar = (0, import_react58.useCallback)(
5974
5986
  async ({ data }) => {
5975
5987
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
5976
5988
  fields: data.fields,
@@ -6001,7 +6013,7 @@ function useModelService() {
6001
6013
  },
6002
6014
  [env]
6003
6015
  );
6004
- const getList = (0, import_react54.useCallback)(
6016
+ const getList = (0, import_react58.useCallback)(
6005
6017
  async ({
6006
6018
  model,
6007
6019
  ids = [],
@@ -6033,7 +6045,7 @@ function useModelService() {
6033
6045
  },
6034
6046
  [env]
6035
6047
  );
6036
- const getDetail = (0, import_react54.useCallback)(
6048
+ const getDetail = (0, import_react58.useCallback)(
6037
6049
  async ({
6038
6050
  ids = [],
6039
6051
  model,
@@ -6065,7 +6077,7 @@ function useModelService() {
6065
6077
  },
6066
6078
  [env]
6067
6079
  );
6068
- const save = (0, import_react54.useCallback)(
6080
+ const save = (0, import_react58.useCallback)(
6069
6081
  async ({
6070
6082
  model,
6071
6083
  ids = [],
@@ -6100,7 +6112,7 @@ function useModelService() {
6100
6112
  },
6101
6113
  [env]
6102
6114
  );
6103
- const deleteApi = (0, import_react54.useCallback)(
6115
+ const deleteApi = (0, import_react58.useCallback)(
6104
6116
  async ({ ids = [], model, service }) => {
6105
6117
  const jsonData = {
6106
6118
  model,
@@ -6120,7 +6132,7 @@ function useModelService() {
6120
6132
  },
6121
6133
  [env]
6122
6134
  );
6123
- const onChange = (0, import_react54.useCallback)(
6135
+ const onChange = (0, import_react58.useCallback)(
6124
6136
  async ({
6125
6137
  ids = [],
6126
6138
  model,
@@ -6156,7 +6168,7 @@ function useModelService() {
6156
6168
  },
6157
6169
  [env]
6158
6170
  );
6159
- const getListFieldsOnchange = (0, import_react54.useCallback)(
6171
+ const getListFieldsOnchange = (0, import_react58.useCallback)(
6160
6172
  async ({
6161
6173
  model,
6162
6174
  service,
@@ -6180,7 +6192,7 @@ function useModelService() {
6180
6192
  },
6181
6193
  [env]
6182
6194
  );
6183
- const parseORMOdoo = (0, import_react54.useCallback)((data) => {
6195
+ const parseORMOdoo = (0, import_react58.useCallback)((data) => {
6184
6196
  for (const key in data) {
6185
6197
  if (key === "display_name") {
6186
6198
  delete data[key];
@@ -6191,7 +6203,7 @@ function useModelService() {
6191
6203
  }
6192
6204
  return { ...data };
6193
6205
  }, []);
6194
- const toDataJS = (0, import_react54.useCallback)(
6206
+ const toDataJS = (0, import_react58.useCallback)(
6195
6207
  (data, viewData, model) => {
6196
6208
  for (const key in data) {
6197
6209
  if (data[key] === false) {
@@ -6249,10 +6261,10 @@ function useModelService() {
6249
6261
  }
6250
6262
 
6251
6263
  // src/services/user-service/index.ts
6252
- var import_react55 = require("react");
6264
+ var import_react59 = require("react");
6253
6265
  function useUserService() {
6254
6266
  const { env } = useEnv();
6255
- const getProfile = (0, import_react55.useCallback)(
6267
+ const getProfile = (0, import_react59.useCallback)(
6256
6268
  async (service, path, extraHeaders) => {
6257
6269
  return env?.requests?.get(
6258
6270
  path || "/userinfo" /* PROFILE_PATH */,
@@ -6269,7 +6281,7 @@ function useUserService() {
6269
6281
  },
6270
6282
  [env]
6271
6283
  );
6272
- const getUser = (0, import_react55.useCallback)(
6284
+ const getUser = (0, import_react59.useCallback)(
6273
6285
  async ({ context, id }) => {
6274
6286
  const jsonData = {
6275
6287
  model: "res.users",
@@ -6307,7 +6319,7 @@ function useUserService() {
6307
6319
  },
6308
6320
  [env]
6309
6321
  );
6310
- const switchUserLocale = (0, import_react55.useCallback)(
6322
+ const switchUserLocale = (0, import_react59.useCallback)(
6311
6323
  async ({ id, values, service }) => {
6312
6324
  const jsonData = {
6313
6325
  model: "res.users",
@@ -6335,10 +6347,10 @@ function useUserService() {
6335
6347
  }
6336
6348
 
6337
6349
  // src/services/view-service/index.ts
6338
- var import_react56 = require("react");
6350
+ var import_react60 = require("react");
6339
6351
  function useViewService() {
6340
6352
  const { env } = useEnv();
6341
- const getView = (0, import_react56.useCallback)(
6353
+ const getView = (0, import_react60.useCallback)(
6342
6354
  async ({
6343
6355
  model,
6344
6356
  views,
@@ -6378,7 +6390,7 @@ function useViewService() {
6378
6390
  },
6379
6391
  [env]
6380
6392
  );
6381
- const getMenu = (0, import_react56.useCallback)(
6393
+ const getMenu = (0, import_react60.useCallback)(
6382
6394
  async (context, specification, domain, service) => {
6383
6395
  const jsonData = {
6384
6396
  model: "ir.ui.menu" /* MENU */,
@@ -6409,7 +6421,7 @@ function useViewService() {
6409
6421
  },
6410
6422
  [env]
6411
6423
  );
6412
- const getActionDetail = (0, import_react56.useCallback)(
6424
+ const getActionDetail = (0, import_react60.useCallback)(
6413
6425
  async (aid, context) => {
6414
6426
  const jsonData = {
6415
6427
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -6439,7 +6451,7 @@ function useViewService() {
6439
6451
  },
6440
6452
  [env]
6441
6453
  );
6442
- const getResequence = (0, import_react56.useCallback)(
6454
+ const getResequence = (0, import_react60.useCallback)(
6443
6455
  async ({
6444
6456
  model,
6445
6457
  ids,
@@ -6469,7 +6481,7 @@ function useViewService() {
6469
6481
  },
6470
6482
  [env]
6471
6483
  );
6472
- const getSelectionItem = (0, import_react56.useCallback)(
6484
+ const getSelectionItem = (0, import_react60.useCallback)(
6473
6485
  async ({
6474
6486
  data,
6475
6487
  service,
@@ -6506,7 +6518,7 @@ function useViewService() {
6506
6518
  },
6507
6519
  [env]
6508
6520
  );
6509
- const loadMessages = (0, import_react56.useCallback)(async () => {
6521
+ const loadMessages = (0, import_react60.useCallback)(async () => {
6510
6522
  return env.requests.post(
6511
6523
  "/load_message_failures" /* LOAD_MESSAGE */,
6512
6524
  {},
@@ -6517,14 +6529,14 @@ function useViewService() {
6517
6529
  }
6518
6530
  );
6519
6531
  }, [env]);
6520
- const getVersion = (0, import_react56.useCallback)(async () => {
6532
+ const getVersion = (0, import_react60.useCallback)(async () => {
6521
6533
  return env?.requests?.get("", {
6522
6534
  headers: {
6523
6535
  "Content-Type": "application/json"
6524
6536
  }
6525
6537
  });
6526
6538
  }, [env]);
6527
- const grantAccess = (0, import_react56.useCallback)(
6539
+ const grantAccess = (0, import_react60.useCallback)(
6528
6540
  async ({
6529
6541
  redirect_uri,
6530
6542
  state,
@@ -6551,7 +6563,7 @@ function useViewService() {
6551
6563
  },
6552
6564
  [env]
6553
6565
  );
6554
- const removeTotpSetUp = (0, import_react56.useCallback)(
6566
+ const removeTotpSetUp = (0, import_react60.useCallback)(
6555
6567
  async ({ method, token }) => {
6556
6568
  const jsonData = {
6557
6569
  method,
@@ -6572,7 +6584,7 @@ function useViewService() {
6572
6584
  },
6573
6585
  [env]
6574
6586
  );
6575
- const requestSetupTotp = (0, import_react56.useCallback)(
6587
+ const requestSetupTotp = (0, import_react60.useCallback)(
6576
6588
  async ({ method, token }) => {
6577
6589
  const jsonData = {
6578
6590
  method,
@@ -6591,7 +6603,7 @@ function useViewService() {
6591
6603
  },
6592
6604
  [env]
6593
6605
  );
6594
- const settingsWebRead2fa = (0, import_react56.useCallback)(
6606
+ const settingsWebRead2fa = (0, import_react60.useCallback)(
6595
6607
  async ({
6596
6608
  method,
6597
6609
  model,
@@ -6619,7 +6631,7 @@ function useViewService() {
6619
6631
  },
6620
6632
  [env]
6621
6633
  );
6622
- const signInSSO = (0, import_react56.useCallback)(
6634
+ const signInSSO = (0, import_react60.useCallback)(
6623
6635
  async ({
6624
6636
  redirect_uri,
6625
6637
  state,
@@ -6651,7 +6663,7 @@ function useViewService() {
6651
6663
  },
6652
6664
  [env]
6653
6665
  );
6654
- const verify2FA = (0, import_react56.useCallback)(
6666
+ const verify2FA = (0, import_react60.useCallback)(
6655
6667
  ({
6656
6668
  method,
6657
6669
  with_context,
@@ -6684,7 +6696,7 @@ function useViewService() {
6684
6696
  },
6685
6697
  [env]
6686
6698
  );
6687
- const get2FAMethods = (0, import_react56.useCallback)(
6699
+ const get2FAMethods = (0, import_react60.useCallback)(
6688
6700
  ({ method, with_context }) => {
6689
6701
  const jsonData = {
6690
6702
  method,
@@ -6703,7 +6715,7 @@ function useViewService() {
6703
6715
  },
6704
6716
  [env]
6705
6717
  );
6706
- const verifyTotp = (0, import_react56.useCallback)(
6718
+ const verifyTotp = (0, import_react60.useCallback)(
6707
6719
  ({
6708
6720
  method,
6709
6721
  action_token,
@@ -6728,7 +6740,7 @@ function useViewService() {
6728
6740
  },
6729
6741
  [env]
6730
6742
  );
6731
- const getNotifications = (0, import_react56.useCallback)(
6743
+ const getNotifications = (0, import_react60.useCallback)(
6732
6744
  async ({
6733
6745
  service,
6734
6746
  xNode,
@@ -6748,7 +6760,7 @@ function useViewService() {
6748
6760
  },
6749
6761
  [env]
6750
6762
  );
6751
- const getCountry = (0, import_react56.useCallback)(
6763
+ const getCountry = (0, import_react60.useCallback)(
6752
6764
  async ({
6753
6765
  service,
6754
6766
  xNode,
@@ -6775,7 +6787,7 @@ function useViewService() {
6775
6787
  },
6776
6788
  [env]
6777
6789
  );
6778
- const getCity = (0, import_react56.useCallback)(
6790
+ const getCity = (0, import_react60.useCallback)(
6779
6791
  async ({
6780
6792
  service,
6781
6793
  xNode,
@@ -6802,7 +6814,7 @@ function useViewService() {
6802
6814
  },
6803
6815
  [env]
6804
6816
  );
6805
- const getWard = (0, import_react56.useCallback)(
6817
+ const getWard = (0, import_react60.useCallback)(
6806
6818
  async ({
6807
6819
  service,
6808
6820
  xNode,
@@ -6827,7 +6839,7 @@ function useViewService() {
6827
6839
  },
6828
6840
  [env]
6829
6841
  );
6830
- const getPartnerTitle = (0, import_react56.useCallback)(
6842
+ const getPartnerTitle = (0, import_react60.useCallback)(
6831
6843
  async ({
6832
6844
  service,
6833
6845
  xNode,
@@ -6879,10 +6891,10 @@ function useViewService() {
6879
6891
  }
6880
6892
 
6881
6893
  // src/services/dashboard-service/index.ts
6882
- var import_react57 = require("react");
6894
+ var import_react61 = require("react");
6883
6895
  function useDashboardService() {
6884
6896
  const { env } = useEnv();
6885
- const readGroup = (0, import_react57.useCallback)(
6897
+ const readGroup = (0, import_react61.useCallback)(
6886
6898
  async ({
6887
6899
  service,
6888
6900
  xNode,
@@ -6899,7 +6911,7 @@ function useDashboardService() {
6899
6911
  },
6900
6912
  [env]
6901
6913
  );
6902
- const getDataChart = (0, import_react57.useCallback)(
6914
+ const getDataChart = (0, import_react61.useCallback)(
6903
6915
  async ({
6904
6916
  service,
6905
6917
  xNode,