@fctc/interface-logic 4.6.9 → 4.7.1

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_react53 = 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_react51 = require("react");
2959
2959
 
2960
2960
  // src/hooks/auth/use-forgot-password.ts
2961
2961
  var import_react_query3 = require("@tanstack/react-query");
@@ -4591,6 +4591,59 @@ var deleteTableSupabaseService = () => {
4591
4591
  };
4592
4592
  };
4593
4593
 
4594
+ // src/services/pos-service/supabase/create-order.ts
4595
+ var import_react43 = require("react");
4596
+
4597
+ // src/services/pos-service/supabase/add-product-to-order.ts
4598
+ var import_react44 = require("react");
4599
+
4600
+ // src/services/pos-service/supabase/update-order-total-amount.ts
4601
+ var import_react45 = require("react");
4602
+
4603
+ // src/services/pos-service/supabase/update-order-line.ts
4604
+ var import_react46 = require("react");
4605
+
4606
+ // src/services/pos-service/supabase/update-order.ts
4607
+ var import_react47 = require("react");
4608
+
4609
+ // src/services/pos-service/supabase/delete-order.ts
4610
+ var import_react48 = require("react");
4611
+
4612
+ // src/services/pos-service/supabase/delete-order-line.ts
4613
+ var import_react49 = require("react");
4614
+
4615
+ // src/services/pos-service/supabase/add-category.ts
4616
+ var import_react50 = require("react");
4617
+ var addCategorySupabaseService = () => {
4618
+ const supabase = useSupabaseOptional();
4619
+ const addCategorySupabase = (0, import_react50.useCallback)(
4620
+ async (values) => {
4621
+ if (!supabase) {
4622
+ console.error("Supabase client not initialized");
4623
+ return null;
4624
+ }
4625
+ try {
4626
+ const { data, error } = await supabase.from("pos_categories" /* POS_CATEGORIES */).insert({
4627
+ name: values.name,
4628
+ id: values.id
4629
+ }).select("id, name").single();
4630
+ if (error) {
4631
+ console.error("Error adding Category:", error);
4632
+ return null;
4633
+ }
4634
+ return [[data.id, data.name]];
4635
+ } catch (error) {
4636
+ console.error("Error adding Category:", error);
4637
+ return null;
4638
+ }
4639
+ },
4640
+ [supabase]
4641
+ );
4642
+ return {
4643
+ addCategorySupabase
4644
+ };
4645
+ };
4646
+
4594
4647
  // src/services/pos-service/index.ts
4595
4648
  var serviceFactories = [
4596
4649
  addEntityService,
@@ -4628,7 +4681,8 @@ var serviceFactories = [
4628
4681
  updateFloorSupabaseService,
4629
4682
  updateTableSupabaseService,
4630
4683
  deleteFloorSupabaseService,
4631
- deleteTableSupabaseService
4684
+ deleteTableSupabaseService,
4685
+ addCategorySupabaseService
4632
4686
  ];
4633
4687
  var usePosService = () => {
4634
4688
  const { env } = useEnv();
@@ -4730,15 +4784,6 @@ var import_react_query114 = require("@tanstack/react-query");
4730
4784
  // src/hooks/pos/supabase/use-add-floor.ts
4731
4785
  var import_react_query115 = require("@tanstack/react-query");
4732
4786
 
4733
- // src/services/pos-service/supabase/create-order.ts
4734
- var import_react43 = require("react");
4735
-
4736
- // src/services/pos-service/supabase/add-product-to-order.ts
4737
- var import_react44 = require("react");
4738
-
4739
- // src/services/pos-service/supabase/update-order-total-amount.ts
4740
- var import_react45 = require("react");
4741
-
4742
4787
  // src/hooks/pos/supabase/use-add-table.ts
4743
4788
  var import_react_query116 = require("@tanstack/react-query");
4744
4789
 
@@ -4757,18 +4802,21 @@ var import_react_query120 = require("@tanstack/react-query");
4757
4802
  // src/hooks/pos/supabase/use-create-order.ts
4758
4803
  var import_react_query121 = require("@tanstack/react-query");
4759
4804
 
4805
+ // src/hooks/pos/supabase/use-add-category.ts
4806
+ var import_react_query122 = require("@tanstack/react-query");
4807
+
4760
4808
  // src/provider/service-provider.tsx
4761
4809
  var import_jsx_runtime7 = require("react/jsx-runtime");
4762
- var ServiceContext = (0, import_react46.createContext)(null);
4810
+ var ServiceContext = (0, import_react51.createContext)(null);
4763
4811
 
4764
4812
  // src/provider/meta-provider.tsx
4765
- var import_react47 = require("react");
4813
+ var import_react52 = require("react");
4766
4814
  var import_jsx_runtime8 = require("react/jsx-runtime");
4767
4815
 
4768
4816
  // src/services/action-service/index.ts
4769
4817
  function useActionService() {
4770
4818
  const { env } = useEnv();
4771
- const loadAction = (0, import_react48.useCallback)(
4819
+ const loadAction = (0, import_react53.useCallback)(
4772
4820
  async ({
4773
4821
  idAction,
4774
4822
  context,
@@ -4792,7 +4840,7 @@ function useActionService() {
4792
4840
  },
4793
4841
  [env]
4794
4842
  );
4795
- const callButton = (0, import_react48.useCallback)(
4843
+ const callButton = (0, import_react53.useCallback)(
4796
4844
  async ({
4797
4845
  model,
4798
4846
  ids = [],
@@ -4826,7 +4874,7 @@ function useActionService() {
4826
4874
  },
4827
4875
  [env]
4828
4876
  );
4829
- const removeRows = (0, import_react48.useCallback)(
4877
+ const removeRows = (0, import_react53.useCallback)(
4830
4878
  async ({
4831
4879
  model,
4832
4880
  ids,
@@ -4852,7 +4900,7 @@ function useActionService() {
4852
4900
  },
4853
4901
  [env]
4854
4902
  );
4855
- const duplicateRecord = (0, import_react48.useCallback)(
4903
+ const duplicateRecord = (0, import_react53.useCallback)(
4856
4904
  async ({
4857
4905
  model,
4858
4906
  id,
@@ -4878,7 +4926,7 @@ function useActionService() {
4878
4926
  },
4879
4927
  [env]
4880
4928
  );
4881
- const getPrintReportName = (0, import_react48.useCallback)(
4929
+ const getPrintReportName = (0, import_react53.useCallback)(
4882
4930
  async ({ id }) => {
4883
4931
  const jsonData = {
4884
4932
  model: "ir.actions.report",
@@ -4896,7 +4944,7 @@ function useActionService() {
4896
4944
  },
4897
4945
  [env]
4898
4946
  );
4899
- const print = (0, import_react48.useCallback)(
4947
+ const print = (0, import_react53.useCallback)(
4900
4948
  async ({ id, report, db }) => {
4901
4949
  const jsonData = {
4902
4950
  report,
@@ -4914,7 +4962,7 @@ function useActionService() {
4914
4962
  },
4915
4963
  [env]
4916
4964
  );
4917
- const runAction = (0, import_react48.useCallback)(
4965
+ const runAction = (0, import_react53.useCallback)(
4918
4966
  async ({
4919
4967
  idAction,
4920
4968
  context,
@@ -4941,7 +4989,7 @@ function useActionService() {
4941
4989
  },
4942
4990
  [env]
4943
4991
  );
4944
- const generateSerialNumber = (0, import_react48.useCallback)(
4992
+ const generateSerialNumber = (0, import_react53.useCallback)(
4945
4993
  async ({
4946
4994
  kwargs,
4947
4995
  context,
@@ -4979,11 +5027,11 @@ function useActionService() {
4979
5027
  }
4980
5028
 
4981
5029
  // src/services/auth-service/index.ts
4982
- var import_react49 = require("react");
5030
+ var import_react54 = require("react");
4983
5031
  function useAuthService() {
4984
5032
  const { env } = useEnv();
4985
5033
  const supabase = useSupabaseOptional();
4986
- const login = (0, import_react49.useCallback)(
5034
+ const login = (0, import_react54.useCallback)(
4987
5035
  async (body) => {
4988
5036
  const payload = Object.fromEntries(
4989
5037
  Object.entries({
@@ -5008,7 +5056,7 @@ function useAuthService() {
5008
5056
  },
5009
5057
  [env]
5010
5058
  );
5011
- const loginSupabase = (0, import_react49.useCallback)(
5059
+ const loginSupabase = (0, import_react54.useCallback)(
5012
5060
  async (body) => {
5013
5061
  if (!supabase) {
5014
5062
  return {
@@ -5024,7 +5072,7 @@ function useAuthService() {
5024
5072
  },
5025
5073
  [supabase]
5026
5074
  );
5027
- const forgotPassword = (0, import_react49.useCallback)(
5075
+ const forgotPassword = (0, import_react54.useCallback)(
5028
5076
  async (email) => {
5029
5077
  const bodyData = {
5030
5078
  login: email,
@@ -5038,7 +5086,7 @@ function useAuthService() {
5038
5086
  },
5039
5087
  [env]
5040
5088
  );
5041
- const forgotPasswordSSO = (0, import_react49.useCallback)(
5089
+ const forgotPasswordSSO = (0, import_react54.useCallback)(
5042
5090
  async ({
5043
5091
  email,
5044
5092
  with_context,
@@ -5061,7 +5109,7 @@ function useAuthService() {
5061
5109
  },
5062
5110
  [env]
5063
5111
  );
5064
- const resetPassword = (0, import_react49.useCallback)(
5112
+ const resetPassword = (0, import_react54.useCallback)(
5065
5113
  async (data, token) => {
5066
5114
  const bodyData = {
5067
5115
  token,
@@ -5076,7 +5124,7 @@ function useAuthService() {
5076
5124
  },
5077
5125
  [env]
5078
5126
  );
5079
- const resetPasswordSSO = (0, import_react49.useCallback)(
5127
+ const resetPasswordSSO = (0, import_react54.useCallback)(
5080
5128
  async ({
5081
5129
  method,
5082
5130
  password,
@@ -5099,7 +5147,7 @@ function useAuthService() {
5099
5147
  },
5100
5148
  [env]
5101
5149
  );
5102
- const updatePassword = (0, import_react49.useCallback)(
5150
+ const updatePassword = (0, import_react54.useCallback)(
5103
5151
  async (data, token) => {
5104
5152
  const bodyData = {
5105
5153
  token,
@@ -5114,7 +5162,7 @@ function useAuthService() {
5114
5162
  },
5115
5163
  [env]
5116
5164
  );
5117
- const isValidToken = (0, import_react49.useCallback)(
5165
+ const isValidToken = (0, import_react54.useCallback)(
5118
5166
  async (token) => {
5119
5167
  const bodyData = {
5120
5168
  token
@@ -5127,7 +5175,7 @@ function useAuthService() {
5127
5175
  },
5128
5176
  [env]
5129
5177
  );
5130
- const isValidActionToken = (0, import_react49.useCallback)(
5178
+ const isValidActionToken = (0, import_react54.useCallback)(
5131
5179
  async (actionToken) => {
5132
5180
  const bodyData = {};
5133
5181
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -5140,7 +5188,7 @@ function useAuthService() {
5140
5188
  },
5141
5189
  [env]
5142
5190
  );
5143
- const loginSocial = (0, import_react49.useCallback)(
5191
+ const loginSocial = (0, import_react54.useCallback)(
5144
5192
  async ({
5145
5193
  db,
5146
5194
  state,
@@ -5158,13 +5206,13 @@ function useAuthService() {
5158
5206
  },
5159
5207
  [env]
5160
5208
  );
5161
- const getProviders = (0, import_react49.useCallback)(
5209
+ const getProviders = (0, import_react54.useCallback)(
5162
5210
  async (db) => {
5163
5211
  return env?.requests?.get("/oauth/providers", { params: { db } });
5164
5212
  },
5165
5213
  [env]
5166
5214
  );
5167
- const getAccessByCode = (0, import_react49.useCallback)(
5215
+ const getAccessByCode = (0, import_react54.useCallback)(
5168
5216
  async (code) => {
5169
5217
  const data = new URLSearchParams();
5170
5218
  data.append("code", code);
@@ -5184,7 +5232,7 @@ function useAuthService() {
5184
5232
  },
5185
5233
  [env]
5186
5234
  );
5187
- const logout = (0, import_react49.useCallback)(
5235
+ const logout = (0, import_react54.useCallback)(
5188
5236
  async (service) => {
5189
5237
  return env?.requests?.post(
5190
5238
  "/logout" /* LOGOUT */,
@@ -5201,7 +5249,7 @@ function useAuthService() {
5201
5249
  },
5202
5250
  [env]
5203
5251
  );
5204
- const getTenantMapping = (0, import_react49.useCallback)(
5252
+ const getTenantMapping = (0, import_react54.useCallback)(
5205
5253
  async ({ shortName, service }) => {
5206
5254
  const bodyData = {
5207
5255
  short_name: shortName
@@ -5219,7 +5267,7 @@ function useAuthService() {
5219
5267
  },
5220
5268
  [env]
5221
5269
  );
5222
- const getToken = (0, import_react49.useCallback)(
5270
+ const getToken = (0, import_react54.useCallback)(
5223
5271
  async ({
5224
5272
  phone,
5225
5273
  name,
@@ -5264,10 +5312,10 @@ function useAuthService() {
5264
5312
  }
5265
5313
 
5266
5314
  // src/services/company-service/index.ts
5267
- var import_react50 = require("react");
5315
+ var import_react55 = require("react");
5268
5316
  function useCompanyService() {
5269
5317
  const { env } = useEnv();
5270
- const getCurrentCompany = (0, import_react50.useCallback)(
5318
+ const getCurrentCompany = (0, import_react55.useCallback)(
5271
5319
  async (service, extraHeaders) => {
5272
5320
  return await env.requests.get(
5273
5321
  "/company" /* COMPANY_PATH */,
@@ -5284,7 +5332,7 @@ function useCompanyService() {
5284
5332
  },
5285
5333
  [env]
5286
5334
  );
5287
- const getInfoCompany = (0, import_react50.useCallback)(
5335
+ const getInfoCompany = (0, import_react55.useCallback)(
5288
5336
  async (id, service) => {
5289
5337
  const jsonData = {
5290
5338
  ids: [id],
@@ -5320,10 +5368,10 @@ function useCompanyService() {
5320
5368
  }
5321
5369
 
5322
5370
  // src/services/excel-service/index.ts
5323
- var import_react51 = require("react");
5371
+ var import_react56 = require("react");
5324
5372
  function useExcelService() {
5325
5373
  const { env } = useEnv();
5326
- const uploadFileExcel = (0, import_react51.useCallback)(
5374
+ const uploadFileExcel = (0, import_react56.useCallback)(
5327
5375
  async ({
5328
5376
  formData,
5329
5377
  service,
@@ -5340,7 +5388,7 @@ function useExcelService() {
5340
5388
  },
5341
5389
  [env]
5342
5390
  );
5343
- const uploadIdFile = (0, import_react51.useCallback)(
5391
+ const uploadIdFile = (0, import_react56.useCallback)(
5344
5392
  async ({
5345
5393
  formData,
5346
5394
  service,
@@ -5357,7 +5405,7 @@ function useExcelService() {
5357
5405
  },
5358
5406
  [env]
5359
5407
  );
5360
- const parsePreview = (0, import_react51.useCallback)(
5408
+ const parsePreview = (0, import_react56.useCallback)(
5361
5409
  async ({
5362
5410
  id,
5363
5411
  selectedSheet,
@@ -5406,7 +5454,7 @@ function useExcelService() {
5406
5454
  },
5407
5455
  [env]
5408
5456
  );
5409
- const executeImport = (0, import_react51.useCallback)(
5457
+ const executeImport = (0, import_react56.useCallback)(
5410
5458
  async ({
5411
5459
  columns,
5412
5460
  fields,
@@ -5440,7 +5488,7 @@ function useExcelService() {
5440
5488
  },
5441
5489
  [env]
5442
5490
  );
5443
- const getFileExcel = (0, import_react51.useCallback)(
5491
+ const getFileExcel = (0, import_react56.useCallback)(
5444
5492
  async ({
5445
5493
  model,
5446
5494
  service,
@@ -5464,7 +5512,7 @@ function useExcelService() {
5464
5512
  },
5465
5513
  [env]
5466
5514
  );
5467
- const getFieldExport = (0, import_react51.useCallback)(
5515
+ const getFieldExport = (0, import_react56.useCallback)(
5468
5516
  async ({
5469
5517
  ids,
5470
5518
  model,
@@ -5504,7 +5552,7 @@ function useExcelService() {
5504
5552
  },
5505
5553
  [env]
5506
5554
  );
5507
- const exportExcel = (0, import_react51.useCallback)(
5555
+ const exportExcel = (0, import_react56.useCallback)(
5508
5556
  async ({
5509
5557
  model,
5510
5558
  domain,
@@ -5552,10 +5600,10 @@ function useExcelService() {
5552
5600
  }
5553
5601
 
5554
5602
  // src/services/form-service/index.ts
5555
- var import_react52 = require("react");
5603
+ var import_react57 = require("react");
5556
5604
  function useFormService() {
5557
5605
  const { env } = useEnv();
5558
- const getComment = (0, import_react52.useCallback)(
5606
+ const getComment = (0, import_react57.useCallback)(
5559
5607
  async ({ data }) => {
5560
5608
  const jsonData = {
5561
5609
  thread_id: data.thread_id,
@@ -5573,7 +5621,7 @@ function useFormService() {
5573
5621
  },
5574
5622
  [env]
5575
5623
  );
5576
- const getThreadData = (0, import_react52.useCallback)(
5624
+ const getThreadData = (0, import_react57.useCallback)(
5577
5625
  async ({
5578
5626
  data,
5579
5627
  xNode,
@@ -5600,7 +5648,7 @@ function useFormService() {
5600
5648
  },
5601
5649
  [env]
5602
5650
  );
5603
- const getThreadMessages = (0, import_react52.useCallback)(
5651
+ const getThreadMessages = (0, import_react57.useCallback)(
5604
5652
  async ({
5605
5653
  data,
5606
5654
  xNode,
@@ -5626,7 +5674,7 @@ function useFormService() {
5626
5674
  },
5627
5675
  [env]
5628
5676
  );
5629
- const sentComment = (0, import_react52.useCallback)(
5677
+ const sentComment = (0, import_react57.useCallback)(
5630
5678
  async ({ data }) => {
5631
5679
  const jsonData = {
5632
5680
  context: {
@@ -5654,7 +5702,7 @@ function useFormService() {
5654
5702
  },
5655
5703
  [env]
5656
5704
  );
5657
- const deleteComment = (0, import_react52.useCallback)(
5705
+ const deleteComment = (0, import_react57.useCallback)(
5658
5706
  async ({ data }) => {
5659
5707
  const jsonData = {
5660
5708
  attachment_ids: [],
@@ -5670,7 +5718,7 @@ function useFormService() {
5670
5718
  },
5671
5719
  [env]
5672
5720
  );
5673
- const getImage = (0, import_react52.useCallback)(
5721
+ const getImage = (0, import_react57.useCallback)(
5674
5722
  async ({ data }) => {
5675
5723
  return env.requests.get(
5676
5724
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -5683,7 +5731,7 @@ function useFormService() {
5683
5731
  },
5684
5732
  [env]
5685
5733
  );
5686
- const uploadImage = (0, import_react52.useCallback)(
5734
+ const uploadImage = (0, import_react57.useCallback)(
5687
5735
  async ({
5688
5736
  formData,
5689
5737
  service,
@@ -5702,7 +5750,7 @@ function useFormService() {
5702
5750
  },
5703
5751
  [env]
5704
5752
  );
5705
- const uploadFile = (0, import_react52.useCallback)(
5753
+ const uploadFile = (0, import_react57.useCallback)(
5706
5754
  async ({
5707
5755
  formData,
5708
5756
  service,
@@ -5722,7 +5770,7 @@ function useFormService() {
5722
5770
  },
5723
5771
  [env]
5724
5772
  );
5725
- const getFormView = (0, import_react52.useCallback)(
5773
+ const getFormView = (0, import_react57.useCallback)(
5726
5774
  async ({ data }) => {
5727
5775
  const jsonData = {
5728
5776
  model: data.model,
@@ -5738,7 +5786,7 @@ function useFormService() {
5738
5786
  },
5739
5787
  [env]
5740
5788
  );
5741
- const changeStatus = (0, import_react52.useCallback)(
5789
+ const changeStatus = (0, import_react57.useCallback)(
5742
5790
  async ({ data }) => {
5743
5791
  const vals = {
5744
5792
  [data.name]: data.stage_id
@@ -5767,7 +5815,7 @@ function useFormService() {
5767
5815
  },
5768
5816
  [env]
5769
5817
  );
5770
- const getExternalTab = (0, import_react52.useCallback)(
5818
+ const getExternalTab = (0, import_react57.useCallback)(
5771
5819
  async ({ method, context, service, xNode }) => {
5772
5820
  return env?.requests?.post(
5773
5821
  "/call" /* CALL_PATH */,
@@ -5802,10 +5850,10 @@ function useFormService() {
5802
5850
  }
5803
5851
 
5804
5852
  // src/services/kanban-service/index.ts
5805
- var import_react53 = require("react");
5853
+ var import_react58 = require("react");
5806
5854
  function useKanbanService() {
5807
5855
  const { env } = useEnv();
5808
- const getGroups = (0, import_react53.useCallback)(
5856
+ const getGroups = (0, import_react58.useCallback)(
5809
5857
  async ({ model, width_context }) => {
5810
5858
  const jsonData = {
5811
5859
  model,
@@ -5825,7 +5873,7 @@ function useKanbanService() {
5825
5873
  },
5826
5874
  [env]
5827
5875
  );
5828
- const getProgressBar = (0, import_react53.useCallback)(
5876
+ const getProgressBar = (0, import_react58.useCallback)(
5829
5877
  async ({ field, color, model, width_context }) => {
5830
5878
  const jsonData = {
5831
5879
  model,
@@ -5855,10 +5903,10 @@ function useKanbanService() {
5855
5903
  }
5856
5904
 
5857
5905
  // src/services/model-service/index.ts
5858
- var import_react54 = require("react");
5906
+ var import_react59 = require("react");
5859
5907
  function useModelService() {
5860
5908
  const { env } = useEnv();
5861
- const getListMyBankAccount = (0, import_react54.useCallback)(
5909
+ const getListMyBankAccount = (0, import_react59.useCallback)(
5862
5910
  async ({
5863
5911
  domain,
5864
5912
  spectification,
@@ -5882,7 +5930,7 @@ function useModelService() {
5882
5930
  },
5883
5931
  [env]
5884
5932
  );
5885
- const getCurrency = (0, import_react54.useCallback)(async () => {
5933
+ const getCurrency = (0, import_react59.useCallback)(async () => {
5886
5934
  const jsonData = {
5887
5935
  model: "res.currency",
5888
5936
  method: "web_search_read",
@@ -5902,7 +5950,7 @@ function useModelService() {
5902
5950
  }
5903
5951
  });
5904
5952
  }, [env]);
5905
- const getConversionRate = (0, import_react54.useCallback)(async () => {
5953
+ const getConversionRate = (0, import_react59.useCallback)(async () => {
5906
5954
  const jsonData = {
5907
5955
  model: "res.currency",
5908
5956
  method: "web_search_read",
@@ -5928,7 +5976,7 @@ function useModelService() {
5928
5976
  }
5929
5977
  });
5930
5978
  }, [env]);
5931
- const getAll = (0, import_react54.useCallback)(
5979
+ const getAll = (0, import_react59.useCallback)(
5932
5980
  async ({
5933
5981
  data,
5934
5982
  service,
@@ -5970,7 +6018,7 @@ function useModelService() {
5970
6018
  },
5971
6019
  [env]
5972
6020
  );
5973
- const getListCalendar = (0, import_react54.useCallback)(
6021
+ const getListCalendar = (0, import_react59.useCallback)(
5974
6022
  async ({ data }) => {
5975
6023
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
5976
6024
  fields: data.fields,
@@ -6001,7 +6049,7 @@ function useModelService() {
6001
6049
  },
6002
6050
  [env]
6003
6051
  );
6004
- const getList = (0, import_react54.useCallback)(
6052
+ const getList = (0, import_react59.useCallback)(
6005
6053
  async ({
6006
6054
  model,
6007
6055
  ids = [],
@@ -6033,7 +6081,7 @@ function useModelService() {
6033
6081
  },
6034
6082
  [env]
6035
6083
  );
6036
- const getDetail = (0, import_react54.useCallback)(
6084
+ const getDetail = (0, import_react59.useCallback)(
6037
6085
  async ({
6038
6086
  ids = [],
6039
6087
  model,
@@ -6065,7 +6113,7 @@ function useModelService() {
6065
6113
  },
6066
6114
  [env]
6067
6115
  );
6068
- const save = (0, import_react54.useCallback)(
6116
+ const save = (0, import_react59.useCallback)(
6069
6117
  async ({
6070
6118
  model,
6071
6119
  ids = [],
@@ -6100,7 +6148,7 @@ function useModelService() {
6100
6148
  },
6101
6149
  [env]
6102
6150
  );
6103
- const deleteApi = (0, import_react54.useCallback)(
6151
+ const deleteApi = (0, import_react59.useCallback)(
6104
6152
  async ({ ids = [], model, service }) => {
6105
6153
  const jsonData = {
6106
6154
  model,
@@ -6120,7 +6168,7 @@ function useModelService() {
6120
6168
  },
6121
6169
  [env]
6122
6170
  );
6123
- const onChange = (0, import_react54.useCallback)(
6171
+ const onChange = (0, import_react59.useCallback)(
6124
6172
  async ({
6125
6173
  ids = [],
6126
6174
  model,
@@ -6156,7 +6204,7 @@ function useModelService() {
6156
6204
  },
6157
6205
  [env]
6158
6206
  );
6159
- const getListFieldsOnchange = (0, import_react54.useCallback)(
6207
+ const getListFieldsOnchange = (0, import_react59.useCallback)(
6160
6208
  async ({
6161
6209
  model,
6162
6210
  service,
@@ -6180,7 +6228,7 @@ function useModelService() {
6180
6228
  },
6181
6229
  [env]
6182
6230
  );
6183
- const parseORMOdoo = (0, import_react54.useCallback)((data) => {
6231
+ const parseORMOdoo = (0, import_react59.useCallback)((data) => {
6184
6232
  for (const key in data) {
6185
6233
  if (key === "display_name") {
6186
6234
  delete data[key];
@@ -6191,7 +6239,7 @@ function useModelService() {
6191
6239
  }
6192
6240
  return { ...data };
6193
6241
  }, []);
6194
- const toDataJS = (0, import_react54.useCallback)(
6242
+ const toDataJS = (0, import_react59.useCallback)(
6195
6243
  (data, viewData, model) => {
6196
6244
  for (const key in data) {
6197
6245
  if (data[key] === false) {
@@ -6249,10 +6297,10 @@ function useModelService() {
6249
6297
  }
6250
6298
 
6251
6299
  // src/services/user-service/index.ts
6252
- var import_react55 = require("react");
6300
+ var import_react60 = require("react");
6253
6301
  function useUserService() {
6254
6302
  const { env } = useEnv();
6255
- const getProfile = (0, import_react55.useCallback)(
6303
+ const getProfile = (0, import_react60.useCallback)(
6256
6304
  async (service, path, extraHeaders) => {
6257
6305
  return env?.requests?.get(
6258
6306
  path || "/userinfo" /* PROFILE_PATH */,
@@ -6269,7 +6317,7 @@ function useUserService() {
6269
6317
  },
6270
6318
  [env]
6271
6319
  );
6272
- const getUser = (0, import_react55.useCallback)(
6320
+ const getUser = (0, import_react60.useCallback)(
6273
6321
  async ({ context, id }) => {
6274
6322
  const jsonData = {
6275
6323
  model: "res.users",
@@ -6307,7 +6355,7 @@ function useUserService() {
6307
6355
  },
6308
6356
  [env]
6309
6357
  );
6310
- const switchUserLocale = (0, import_react55.useCallback)(
6358
+ const switchUserLocale = (0, import_react60.useCallback)(
6311
6359
  async ({ id, values, service }) => {
6312
6360
  const jsonData = {
6313
6361
  model: "res.users",
@@ -6335,10 +6383,10 @@ function useUserService() {
6335
6383
  }
6336
6384
 
6337
6385
  // src/services/view-service/index.ts
6338
- var import_react56 = require("react");
6386
+ var import_react61 = require("react");
6339
6387
  function useViewService() {
6340
6388
  const { env } = useEnv();
6341
- const getView = (0, import_react56.useCallback)(
6389
+ const getView = (0, import_react61.useCallback)(
6342
6390
  async ({
6343
6391
  model,
6344
6392
  views,
@@ -6378,7 +6426,7 @@ function useViewService() {
6378
6426
  },
6379
6427
  [env]
6380
6428
  );
6381
- const getMenu = (0, import_react56.useCallback)(
6429
+ const getMenu = (0, import_react61.useCallback)(
6382
6430
  async (context, specification, domain, service) => {
6383
6431
  const jsonData = {
6384
6432
  model: "ir.ui.menu" /* MENU */,
@@ -6409,7 +6457,7 @@ function useViewService() {
6409
6457
  },
6410
6458
  [env]
6411
6459
  );
6412
- const getActionDetail = (0, import_react56.useCallback)(
6460
+ const getActionDetail = (0, import_react61.useCallback)(
6413
6461
  async (aid, context) => {
6414
6462
  const jsonData = {
6415
6463
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -6439,7 +6487,7 @@ function useViewService() {
6439
6487
  },
6440
6488
  [env]
6441
6489
  );
6442
- const getResequence = (0, import_react56.useCallback)(
6490
+ const getResequence = (0, import_react61.useCallback)(
6443
6491
  async ({
6444
6492
  model,
6445
6493
  ids,
@@ -6469,7 +6517,7 @@ function useViewService() {
6469
6517
  },
6470
6518
  [env]
6471
6519
  );
6472
- const getSelectionItem = (0, import_react56.useCallback)(
6520
+ const getSelectionItem = (0, import_react61.useCallback)(
6473
6521
  async ({
6474
6522
  data,
6475
6523
  service,
@@ -6506,7 +6554,7 @@ function useViewService() {
6506
6554
  },
6507
6555
  [env]
6508
6556
  );
6509
- const loadMessages = (0, import_react56.useCallback)(async () => {
6557
+ const loadMessages = (0, import_react61.useCallback)(async () => {
6510
6558
  return env.requests.post(
6511
6559
  "/load_message_failures" /* LOAD_MESSAGE */,
6512
6560
  {},
@@ -6517,14 +6565,14 @@ function useViewService() {
6517
6565
  }
6518
6566
  );
6519
6567
  }, [env]);
6520
- const getVersion = (0, import_react56.useCallback)(async () => {
6568
+ const getVersion = (0, import_react61.useCallback)(async () => {
6521
6569
  return env?.requests?.get("", {
6522
6570
  headers: {
6523
6571
  "Content-Type": "application/json"
6524
6572
  }
6525
6573
  });
6526
6574
  }, [env]);
6527
- const grantAccess = (0, import_react56.useCallback)(
6575
+ const grantAccess = (0, import_react61.useCallback)(
6528
6576
  async ({
6529
6577
  redirect_uri,
6530
6578
  state,
@@ -6551,7 +6599,7 @@ function useViewService() {
6551
6599
  },
6552
6600
  [env]
6553
6601
  );
6554
- const removeTotpSetUp = (0, import_react56.useCallback)(
6602
+ const removeTotpSetUp = (0, import_react61.useCallback)(
6555
6603
  async ({ method, token }) => {
6556
6604
  const jsonData = {
6557
6605
  method,
@@ -6572,7 +6620,7 @@ function useViewService() {
6572
6620
  },
6573
6621
  [env]
6574
6622
  );
6575
- const requestSetupTotp = (0, import_react56.useCallback)(
6623
+ const requestSetupTotp = (0, import_react61.useCallback)(
6576
6624
  async ({ method, token }) => {
6577
6625
  const jsonData = {
6578
6626
  method,
@@ -6591,7 +6639,7 @@ function useViewService() {
6591
6639
  },
6592
6640
  [env]
6593
6641
  );
6594
- const settingsWebRead2fa = (0, import_react56.useCallback)(
6642
+ const settingsWebRead2fa = (0, import_react61.useCallback)(
6595
6643
  async ({
6596
6644
  method,
6597
6645
  model,
@@ -6619,7 +6667,7 @@ function useViewService() {
6619
6667
  },
6620
6668
  [env]
6621
6669
  );
6622
- const signInSSO = (0, import_react56.useCallback)(
6670
+ const signInSSO = (0, import_react61.useCallback)(
6623
6671
  async ({
6624
6672
  redirect_uri,
6625
6673
  state,
@@ -6651,7 +6699,7 @@ function useViewService() {
6651
6699
  },
6652
6700
  [env]
6653
6701
  );
6654
- const verify2FA = (0, import_react56.useCallback)(
6702
+ const verify2FA = (0, import_react61.useCallback)(
6655
6703
  ({
6656
6704
  method,
6657
6705
  with_context,
@@ -6684,7 +6732,7 @@ function useViewService() {
6684
6732
  },
6685
6733
  [env]
6686
6734
  );
6687
- const get2FAMethods = (0, import_react56.useCallback)(
6735
+ const get2FAMethods = (0, import_react61.useCallback)(
6688
6736
  ({ method, with_context }) => {
6689
6737
  const jsonData = {
6690
6738
  method,
@@ -6703,7 +6751,7 @@ function useViewService() {
6703
6751
  },
6704
6752
  [env]
6705
6753
  );
6706
- const verifyTotp = (0, import_react56.useCallback)(
6754
+ const verifyTotp = (0, import_react61.useCallback)(
6707
6755
  ({
6708
6756
  method,
6709
6757
  action_token,
@@ -6728,7 +6776,7 @@ function useViewService() {
6728
6776
  },
6729
6777
  [env]
6730
6778
  );
6731
- const getNotifications = (0, import_react56.useCallback)(
6779
+ const getNotifications = (0, import_react61.useCallback)(
6732
6780
  async ({
6733
6781
  service,
6734
6782
  xNode,
@@ -6748,7 +6796,7 @@ function useViewService() {
6748
6796
  },
6749
6797
  [env]
6750
6798
  );
6751
- const getCountry = (0, import_react56.useCallback)(
6799
+ const getCountry = (0, import_react61.useCallback)(
6752
6800
  async ({
6753
6801
  service,
6754
6802
  xNode,
@@ -6775,7 +6823,7 @@ function useViewService() {
6775
6823
  },
6776
6824
  [env]
6777
6825
  );
6778
- const getCity = (0, import_react56.useCallback)(
6826
+ const getCity = (0, import_react61.useCallback)(
6779
6827
  async ({
6780
6828
  service,
6781
6829
  xNode,
@@ -6802,7 +6850,7 @@ function useViewService() {
6802
6850
  },
6803
6851
  [env]
6804
6852
  );
6805
- const getWard = (0, import_react56.useCallback)(
6853
+ const getWard = (0, import_react61.useCallback)(
6806
6854
  async ({
6807
6855
  service,
6808
6856
  xNode,
@@ -6827,7 +6875,7 @@ function useViewService() {
6827
6875
  },
6828
6876
  [env]
6829
6877
  );
6830
- const getPartnerTitle = (0, import_react56.useCallback)(
6878
+ const getPartnerTitle = (0, import_react61.useCallback)(
6831
6879
  async ({
6832
6880
  service,
6833
6881
  xNode,
@@ -6879,10 +6927,10 @@ function useViewService() {
6879
6927
  }
6880
6928
 
6881
6929
  // src/services/dashboard-service/index.ts
6882
- var import_react57 = require("react");
6930
+ var import_react62 = require("react");
6883
6931
  function useDashboardService() {
6884
6932
  const { env } = useEnv();
6885
- const readGroup = (0, import_react57.useCallback)(
6933
+ const readGroup = (0, import_react62.useCallback)(
6886
6934
  async ({
6887
6935
  service,
6888
6936
  xNode,
@@ -6899,7 +6947,7 @@ function useDashboardService() {
6899
6947
  },
6900
6948
  [env]
6901
6949
  );
6902
- const getDataChart = (0, import_react57.useCallback)(
6950
+ const getDataChart = (0, import_react62.useCallback)(
6903
6951
  async ({
6904
6952
  service,
6905
6953
  xNode,