@fctc/interface-logic 4.7.1 → 4.7.2

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_react53 = require("react");
48
+ var import_react52 = require("react");
49
49
 
50
50
  // src/constants/api/uri-constant.ts
51
51
  var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
@@ -2955,7 +2955,7 @@ function useEnv() {
2955
2955
  }
2956
2956
 
2957
2957
  // src/provider/service-provider.tsx
2958
- var import_react51 = 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");
@@ -4481,19 +4481,19 @@ var updateFloorSupabaseService = () => {
4481
4481
  async (values) => {
4482
4482
  if (!supabase) {
4483
4483
  console.error("Supabase client not initialized");
4484
- return false;
4484
+ return [];
4485
4485
  }
4486
4486
  try {
4487
4487
  const { id, ...updateData } = values;
4488
- const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id);
4488
+ const { error, data } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id).select("id").single();
4489
4489
  if (error) {
4490
4490
  console.error("Error updating floor:", error);
4491
- return false;
4491
+ return [];
4492
4492
  }
4493
- return true;
4493
+ return [data.id];
4494
4494
  } catch (error) {
4495
4495
  console.error("Error updating floor:", error);
4496
- return false;
4496
+ return [];
4497
4497
  }
4498
4498
  },
4499
4499
  [supabase]
@@ -4511,19 +4511,19 @@ var updateTableSupabaseService = () => {
4511
4511
  async (values) => {
4512
4512
  if (!supabase) {
4513
4513
  console.error("Supabase client not initialized");
4514
- return false;
4514
+ return [];
4515
4515
  }
4516
4516
  try {
4517
4517
  const { id, ...updateData } = values;
4518
- const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id);
4518
+ const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id).select("id").single();
4519
4519
  if (error) {
4520
4520
  console.error("Error updating table:", error);
4521
- return false;
4521
+ return [];
4522
4522
  }
4523
- return true;
4523
+ return [data.id];
4524
4524
  } catch (error) {
4525
4525
  console.error("Error updating table:", error);
4526
- return false;
4526
+ return [];
4527
4527
  }
4528
4528
  },
4529
4529
  [supabase]
@@ -4541,18 +4541,18 @@ var deleteFloorSupabaseService = () => {
4541
4541
  async (values) => {
4542
4542
  if (!supabase) {
4543
4543
  console.error("Supabase client not initialized");
4544
- return false;
4544
+ return [];
4545
4545
  }
4546
4546
  try {
4547
4547
  const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).delete().eq("id", values.id);
4548
4548
  if (error) {
4549
4549
  console.error("Error deleting floor:", error);
4550
- return false;
4550
+ return [];
4551
4551
  }
4552
- return true;
4552
+ return [values.id];
4553
4553
  } catch (error) {
4554
4554
  console.error("Error deleting floor:", error);
4555
- return false;
4555
+ return [];
4556
4556
  }
4557
4557
  },
4558
4558
  [supabase]
@@ -4570,18 +4570,18 @@ var deleteTableSupabaseService = () => {
4570
4570
  async (values) => {
4571
4571
  if (!supabase) {
4572
4572
  console.error("Supabase client not initialized");
4573
- return false;
4573
+ return [];
4574
4574
  }
4575
4575
  try {
4576
- const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id);
4576
+ const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id).select("id").single();
4577
4577
  if (error) {
4578
4578
  console.error("Error deleting table:", error);
4579
- return false;
4579
+ return [];
4580
4580
  }
4581
- return true;
4581
+ return [data.id];
4582
4582
  } catch (error) {
4583
4583
  console.error("Error deleting table:", error);
4584
- return false;
4584
+ return [];
4585
4585
  }
4586
4586
  },
4587
4587
  [supabase]
@@ -4591,59 +4591,6 @@ 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
-
4647
4594
  // src/services/pos-service/index.ts
4648
4595
  var serviceFactories = [
4649
4596
  addEntityService,
@@ -4681,8 +4628,7 @@ var serviceFactories = [
4681
4628
  updateFloorSupabaseService,
4682
4629
  updateTableSupabaseService,
4683
4630
  deleteFloorSupabaseService,
4684
- deleteTableSupabaseService,
4685
- addCategorySupabaseService
4631
+ deleteTableSupabaseService
4686
4632
  ];
4687
4633
  var usePosService = () => {
4688
4634
  const { env } = useEnv();
@@ -4784,6 +4730,27 @@ var import_react_query114 = require("@tanstack/react-query");
4784
4730
  // src/hooks/pos/supabase/use-add-floor.ts
4785
4731
  var import_react_query115 = require("@tanstack/react-query");
4786
4732
 
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
+ // 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
+
4787
4754
  // src/hooks/pos/supabase/use-add-table.ts
4788
4755
  var import_react_query116 = require("@tanstack/react-query");
4789
4756
 
@@ -4802,21 +4769,18 @@ var import_react_query120 = require("@tanstack/react-query");
4802
4769
  // src/hooks/pos/supabase/use-create-order.ts
4803
4770
  var import_react_query121 = require("@tanstack/react-query");
4804
4771
 
4805
- // src/hooks/pos/supabase/use-add-category.ts
4806
- var import_react_query122 = require("@tanstack/react-query");
4807
-
4808
4772
  // src/provider/service-provider.tsx
4809
4773
  var import_jsx_runtime7 = require("react/jsx-runtime");
4810
- var ServiceContext = (0, import_react51.createContext)(null);
4774
+ var ServiceContext = (0, import_react50.createContext)(null);
4811
4775
 
4812
4776
  // src/provider/meta-provider.tsx
4813
- var import_react52 = require("react");
4777
+ var import_react51 = require("react");
4814
4778
  var import_jsx_runtime8 = require("react/jsx-runtime");
4815
4779
 
4816
4780
  // src/services/action-service/index.ts
4817
4781
  function useActionService() {
4818
4782
  const { env } = useEnv();
4819
- const loadAction = (0, import_react53.useCallback)(
4783
+ const loadAction = (0, import_react52.useCallback)(
4820
4784
  async ({
4821
4785
  idAction,
4822
4786
  context,
@@ -4840,7 +4804,7 @@ function useActionService() {
4840
4804
  },
4841
4805
  [env]
4842
4806
  );
4843
- const callButton = (0, import_react53.useCallback)(
4807
+ const callButton = (0, import_react52.useCallback)(
4844
4808
  async ({
4845
4809
  model,
4846
4810
  ids = [],
@@ -4874,7 +4838,7 @@ function useActionService() {
4874
4838
  },
4875
4839
  [env]
4876
4840
  );
4877
- const removeRows = (0, import_react53.useCallback)(
4841
+ const removeRows = (0, import_react52.useCallback)(
4878
4842
  async ({
4879
4843
  model,
4880
4844
  ids,
@@ -4900,7 +4864,7 @@ function useActionService() {
4900
4864
  },
4901
4865
  [env]
4902
4866
  );
4903
- const duplicateRecord = (0, import_react53.useCallback)(
4867
+ const duplicateRecord = (0, import_react52.useCallback)(
4904
4868
  async ({
4905
4869
  model,
4906
4870
  id,
@@ -4926,7 +4890,7 @@ function useActionService() {
4926
4890
  },
4927
4891
  [env]
4928
4892
  );
4929
- const getPrintReportName = (0, import_react53.useCallback)(
4893
+ const getPrintReportName = (0, import_react52.useCallback)(
4930
4894
  async ({ id }) => {
4931
4895
  const jsonData = {
4932
4896
  model: "ir.actions.report",
@@ -4944,7 +4908,7 @@ function useActionService() {
4944
4908
  },
4945
4909
  [env]
4946
4910
  );
4947
- const print = (0, import_react53.useCallback)(
4911
+ const print = (0, import_react52.useCallback)(
4948
4912
  async ({ id, report, db }) => {
4949
4913
  const jsonData = {
4950
4914
  report,
@@ -4962,7 +4926,7 @@ function useActionService() {
4962
4926
  },
4963
4927
  [env]
4964
4928
  );
4965
- const runAction = (0, import_react53.useCallback)(
4929
+ const runAction = (0, import_react52.useCallback)(
4966
4930
  async ({
4967
4931
  idAction,
4968
4932
  context,
@@ -4989,7 +4953,7 @@ function useActionService() {
4989
4953
  },
4990
4954
  [env]
4991
4955
  );
4992
- const generateSerialNumber = (0, import_react53.useCallback)(
4956
+ const generateSerialNumber = (0, import_react52.useCallback)(
4993
4957
  async ({
4994
4958
  kwargs,
4995
4959
  context,
@@ -5027,11 +4991,11 @@ function useActionService() {
5027
4991
  }
5028
4992
 
5029
4993
  // src/services/auth-service/index.ts
5030
- var import_react54 = require("react");
4994
+ var import_react53 = require("react");
5031
4995
  function useAuthService() {
5032
4996
  const { env } = useEnv();
5033
4997
  const supabase = useSupabaseOptional();
5034
- const login = (0, import_react54.useCallback)(
4998
+ const login = (0, import_react53.useCallback)(
5035
4999
  async (body) => {
5036
5000
  const payload = Object.fromEntries(
5037
5001
  Object.entries({
@@ -5056,7 +5020,7 @@ function useAuthService() {
5056
5020
  },
5057
5021
  [env]
5058
5022
  );
5059
- const loginSupabase = (0, import_react54.useCallback)(
5023
+ const loginSupabase = (0, import_react53.useCallback)(
5060
5024
  async (body) => {
5061
5025
  if (!supabase) {
5062
5026
  return {
@@ -5072,7 +5036,7 @@ function useAuthService() {
5072
5036
  },
5073
5037
  [supabase]
5074
5038
  );
5075
- const forgotPassword = (0, import_react54.useCallback)(
5039
+ const forgotPassword = (0, import_react53.useCallback)(
5076
5040
  async (email) => {
5077
5041
  const bodyData = {
5078
5042
  login: email,
@@ -5086,7 +5050,7 @@ function useAuthService() {
5086
5050
  },
5087
5051
  [env]
5088
5052
  );
5089
- const forgotPasswordSSO = (0, import_react54.useCallback)(
5053
+ const forgotPasswordSSO = (0, import_react53.useCallback)(
5090
5054
  async ({
5091
5055
  email,
5092
5056
  with_context,
@@ -5109,7 +5073,7 @@ function useAuthService() {
5109
5073
  },
5110
5074
  [env]
5111
5075
  );
5112
- const resetPassword = (0, import_react54.useCallback)(
5076
+ const resetPassword = (0, import_react53.useCallback)(
5113
5077
  async (data, token) => {
5114
5078
  const bodyData = {
5115
5079
  token,
@@ -5124,7 +5088,7 @@ function useAuthService() {
5124
5088
  },
5125
5089
  [env]
5126
5090
  );
5127
- const resetPasswordSSO = (0, import_react54.useCallback)(
5091
+ const resetPasswordSSO = (0, import_react53.useCallback)(
5128
5092
  async ({
5129
5093
  method,
5130
5094
  password,
@@ -5147,7 +5111,7 @@ function useAuthService() {
5147
5111
  },
5148
5112
  [env]
5149
5113
  );
5150
- const updatePassword = (0, import_react54.useCallback)(
5114
+ const updatePassword = (0, import_react53.useCallback)(
5151
5115
  async (data, token) => {
5152
5116
  const bodyData = {
5153
5117
  token,
@@ -5162,7 +5126,7 @@ function useAuthService() {
5162
5126
  },
5163
5127
  [env]
5164
5128
  );
5165
- const isValidToken = (0, import_react54.useCallback)(
5129
+ const isValidToken = (0, import_react53.useCallback)(
5166
5130
  async (token) => {
5167
5131
  const bodyData = {
5168
5132
  token
@@ -5175,7 +5139,7 @@ function useAuthService() {
5175
5139
  },
5176
5140
  [env]
5177
5141
  );
5178
- const isValidActionToken = (0, import_react54.useCallback)(
5142
+ const isValidActionToken = (0, import_react53.useCallback)(
5179
5143
  async (actionToken) => {
5180
5144
  const bodyData = {};
5181
5145
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -5188,7 +5152,7 @@ function useAuthService() {
5188
5152
  },
5189
5153
  [env]
5190
5154
  );
5191
- const loginSocial = (0, import_react54.useCallback)(
5155
+ const loginSocial = (0, import_react53.useCallback)(
5192
5156
  async ({
5193
5157
  db,
5194
5158
  state,
@@ -5206,13 +5170,13 @@ function useAuthService() {
5206
5170
  },
5207
5171
  [env]
5208
5172
  );
5209
- const getProviders = (0, import_react54.useCallback)(
5173
+ const getProviders = (0, import_react53.useCallback)(
5210
5174
  async (db) => {
5211
5175
  return env?.requests?.get("/oauth/providers", { params: { db } });
5212
5176
  },
5213
5177
  [env]
5214
5178
  );
5215
- const getAccessByCode = (0, import_react54.useCallback)(
5179
+ const getAccessByCode = (0, import_react53.useCallback)(
5216
5180
  async (code) => {
5217
5181
  const data = new URLSearchParams();
5218
5182
  data.append("code", code);
@@ -5232,7 +5196,7 @@ function useAuthService() {
5232
5196
  },
5233
5197
  [env]
5234
5198
  );
5235
- const logout = (0, import_react54.useCallback)(
5199
+ const logout = (0, import_react53.useCallback)(
5236
5200
  async (service) => {
5237
5201
  return env?.requests?.post(
5238
5202
  "/logout" /* LOGOUT */,
@@ -5249,7 +5213,7 @@ function useAuthService() {
5249
5213
  },
5250
5214
  [env]
5251
5215
  );
5252
- const getTenantMapping = (0, import_react54.useCallback)(
5216
+ const getTenantMapping = (0, import_react53.useCallback)(
5253
5217
  async ({ shortName, service }) => {
5254
5218
  const bodyData = {
5255
5219
  short_name: shortName
@@ -5267,7 +5231,7 @@ function useAuthService() {
5267
5231
  },
5268
5232
  [env]
5269
5233
  );
5270
- const getToken = (0, import_react54.useCallback)(
5234
+ const getToken = (0, import_react53.useCallback)(
5271
5235
  async ({
5272
5236
  phone,
5273
5237
  name,
@@ -5312,10 +5276,10 @@ function useAuthService() {
5312
5276
  }
5313
5277
 
5314
5278
  // src/services/company-service/index.ts
5315
- var import_react55 = require("react");
5279
+ var import_react54 = require("react");
5316
5280
  function useCompanyService() {
5317
5281
  const { env } = useEnv();
5318
- const getCurrentCompany = (0, import_react55.useCallback)(
5282
+ const getCurrentCompany = (0, import_react54.useCallback)(
5319
5283
  async (service, extraHeaders) => {
5320
5284
  return await env.requests.get(
5321
5285
  "/company" /* COMPANY_PATH */,
@@ -5332,7 +5296,7 @@ function useCompanyService() {
5332
5296
  },
5333
5297
  [env]
5334
5298
  );
5335
- const getInfoCompany = (0, import_react55.useCallback)(
5299
+ const getInfoCompany = (0, import_react54.useCallback)(
5336
5300
  async (id, service) => {
5337
5301
  const jsonData = {
5338
5302
  ids: [id],
@@ -5368,10 +5332,10 @@ function useCompanyService() {
5368
5332
  }
5369
5333
 
5370
5334
  // src/services/excel-service/index.ts
5371
- var import_react56 = require("react");
5335
+ var import_react55 = require("react");
5372
5336
  function useExcelService() {
5373
5337
  const { env } = useEnv();
5374
- const uploadFileExcel = (0, import_react56.useCallback)(
5338
+ const uploadFileExcel = (0, import_react55.useCallback)(
5375
5339
  async ({
5376
5340
  formData,
5377
5341
  service,
@@ -5388,7 +5352,7 @@ function useExcelService() {
5388
5352
  },
5389
5353
  [env]
5390
5354
  );
5391
- const uploadIdFile = (0, import_react56.useCallback)(
5355
+ const uploadIdFile = (0, import_react55.useCallback)(
5392
5356
  async ({
5393
5357
  formData,
5394
5358
  service,
@@ -5405,7 +5369,7 @@ function useExcelService() {
5405
5369
  },
5406
5370
  [env]
5407
5371
  );
5408
- const parsePreview = (0, import_react56.useCallback)(
5372
+ const parsePreview = (0, import_react55.useCallback)(
5409
5373
  async ({
5410
5374
  id,
5411
5375
  selectedSheet,
@@ -5454,7 +5418,7 @@ function useExcelService() {
5454
5418
  },
5455
5419
  [env]
5456
5420
  );
5457
- const executeImport = (0, import_react56.useCallback)(
5421
+ const executeImport = (0, import_react55.useCallback)(
5458
5422
  async ({
5459
5423
  columns,
5460
5424
  fields,
@@ -5488,7 +5452,7 @@ function useExcelService() {
5488
5452
  },
5489
5453
  [env]
5490
5454
  );
5491
- const getFileExcel = (0, import_react56.useCallback)(
5455
+ const getFileExcel = (0, import_react55.useCallback)(
5492
5456
  async ({
5493
5457
  model,
5494
5458
  service,
@@ -5512,7 +5476,7 @@ function useExcelService() {
5512
5476
  },
5513
5477
  [env]
5514
5478
  );
5515
- const getFieldExport = (0, import_react56.useCallback)(
5479
+ const getFieldExport = (0, import_react55.useCallback)(
5516
5480
  async ({
5517
5481
  ids,
5518
5482
  model,
@@ -5552,7 +5516,7 @@ function useExcelService() {
5552
5516
  },
5553
5517
  [env]
5554
5518
  );
5555
- const exportExcel = (0, import_react56.useCallback)(
5519
+ const exportExcel = (0, import_react55.useCallback)(
5556
5520
  async ({
5557
5521
  model,
5558
5522
  domain,
@@ -5600,10 +5564,10 @@ function useExcelService() {
5600
5564
  }
5601
5565
 
5602
5566
  // src/services/form-service/index.ts
5603
- var import_react57 = require("react");
5567
+ var import_react56 = require("react");
5604
5568
  function useFormService() {
5605
5569
  const { env } = useEnv();
5606
- const getComment = (0, import_react57.useCallback)(
5570
+ const getComment = (0, import_react56.useCallback)(
5607
5571
  async ({ data }) => {
5608
5572
  const jsonData = {
5609
5573
  thread_id: data.thread_id,
@@ -5621,7 +5585,7 @@ function useFormService() {
5621
5585
  },
5622
5586
  [env]
5623
5587
  );
5624
- const getThreadData = (0, import_react57.useCallback)(
5588
+ const getThreadData = (0, import_react56.useCallback)(
5625
5589
  async ({
5626
5590
  data,
5627
5591
  xNode,
@@ -5648,7 +5612,7 @@ function useFormService() {
5648
5612
  },
5649
5613
  [env]
5650
5614
  );
5651
- const getThreadMessages = (0, import_react57.useCallback)(
5615
+ const getThreadMessages = (0, import_react56.useCallback)(
5652
5616
  async ({
5653
5617
  data,
5654
5618
  xNode,
@@ -5674,7 +5638,7 @@ function useFormService() {
5674
5638
  },
5675
5639
  [env]
5676
5640
  );
5677
- const sentComment = (0, import_react57.useCallback)(
5641
+ const sentComment = (0, import_react56.useCallback)(
5678
5642
  async ({ data }) => {
5679
5643
  const jsonData = {
5680
5644
  context: {
@@ -5702,7 +5666,7 @@ function useFormService() {
5702
5666
  },
5703
5667
  [env]
5704
5668
  );
5705
- const deleteComment = (0, import_react57.useCallback)(
5669
+ const deleteComment = (0, import_react56.useCallback)(
5706
5670
  async ({ data }) => {
5707
5671
  const jsonData = {
5708
5672
  attachment_ids: [],
@@ -5718,7 +5682,7 @@ function useFormService() {
5718
5682
  },
5719
5683
  [env]
5720
5684
  );
5721
- const getImage = (0, import_react57.useCallback)(
5685
+ const getImage = (0, import_react56.useCallback)(
5722
5686
  async ({ data }) => {
5723
5687
  return env.requests.get(
5724
5688
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -5731,7 +5695,7 @@ function useFormService() {
5731
5695
  },
5732
5696
  [env]
5733
5697
  );
5734
- const uploadImage = (0, import_react57.useCallback)(
5698
+ const uploadImage = (0, import_react56.useCallback)(
5735
5699
  async ({
5736
5700
  formData,
5737
5701
  service,
@@ -5750,7 +5714,7 @@ function useFormService() {
5750
5714
  },
5751
5715
  [env]
5752
5716
  );
5753
- const uploadFile = (0, import_react57.useCallback)(
5717
+ const uploadFile = (0, import_react56.useCallback)(
5754
5718
  async ({
5755
5719
  formData,
5756
5720
  service,
@@ -5770,7 +5734,7 @@ function useFormService() {
5770
5734
  },
5771
5735
  [env]
5772
5736
  );
5773
- const getFormView = (0, import_react57.useCallback)(
5737
+ const getFormView = (0, import_react56.useCallback)(
5774
5738
  async ({ data }) => {
5775
5739
  const jsonData = {
5776
5740
  model: data.model,
@@ -5786,7 +5750,7 @@ function useFormService() {
5786
5750
  },
5787
5751
  [env]
5788
5752
  );
5789
- const changeStatus = (0, import_react57.useCallback)(
5753
+ const changeStatus = (0, import_react56.useCallback)(
5790
5754
  async ({ data }) => {
5791
5755
  const vals = {
5792
5756
  [data.name]: data.stage_id
@@ -5815,7 +5779,7 @@ function useFormService() {
5815
5779
  },
5816
5780
  [env]
5817
5781
  );
5818
- const getExternalTab = (0, import_react57.useCallback)(
5782
+ const getExternalTab = (0, import_react56.useCallback)(
5819
5783
  async ({ method, context, service, xNode }) => {
5820
5784
  return env?.requests?.post(
5821
5785
  "/call" /* CALL_PATH */,
@@ -5850,10 +5814,10 @@ function useFormService() {
5850
5814
  }
5851
5815
 
5852
5816
  // src/services/kanban-service/index.ts
5853
- var import_react58 = require("react");
5817
+ var import_react57 = require("react");
5854
5818
  function useKanbanService() {
5855
5819
  const { env } = useEnv();
5856
- const getGroups = (0, import_react58.useCallback)(
5820
+ const getGroups = (0, import_react57.useCallback)(
5857
5821
  async ({ model, width_context }) => {
5858
5822
  const jsonData = {
5859
5823
  model,
@@ -5873,7 +5837,7 @@ function useKanbanService() {
5873
5837
  },
5874
5838
  [env]
5875
5839
  );
5876
- const getProgressBar = (0, import_react58.useCallback)(
5840
+ const getProgressBar = (0, import_react57.useCallback)(
5877
5841
  async ({ field, color, model, width_context }) => {
5878
5842
  const jsonData = {
5879
5843
  model,
@@ -5903,10 +5867,10 @@ function useKanbanService() {
5903
5867
  }
5904
5868
 
5905
5869
  // src/services/model-service/index.ts
5906
- var import_react59 = require("react");
5870
+ var import_react58 = require("react");
5907
5871
  function useModelService() {
5908
5872
  const { env } = useEnv();
5909
- const getListMyBankAccount = (0, import_react59.useCallback)(
5873
+ const getListMyBankAccount = (0, import_react58.useCallback)(
5910
5874
  async ({
5911
5875
  domain,
5912
5876
  spectification,
@@ -5930,7 +5894,7 @@ function useModelService() {
5930
5894
  },
5931
5895
  [env]
5932
5896
  );
5933
- const getCurrency = (0, import_react59.useCallback)(async () => {
5897
+ const getCurrency = (0, import_react58.useCallback)(async () => {
5934
5898
  const jsonData = {
5935
5899
  model: "res.currency",
5936
5900
  method: "web_search_read",
@@ -5950,7 +5914,7 @@ function useModelService() {
5950
5914
  }
5951
5915
  });
5952
5916
  }, [env]);
5953
- const getConversionRate = (0, import_react59.useCallback)(async () => {
5917
+ const getConversionRate = (0, import_react58.useCallback)(async () => {
5954
5918
  const jsonData = {
5955
5919
  model: "res.currency",
5956
5920
  method: "web_search_read",
@@ -5976,7 +5940,7 @@ function useModelService() {
5976
5940
  }
5977
5941
  });
5978
5942
  }, [env]);
5979
- const getAll = (0, import_react59.useCallback)(
5943
+ const getAll = (0, import_react58.useCallback)(
5980
5944
  async ({
5981
5945
  data,
5982
5946
  service,
@@ -6018,7 +5982,7 @@ function useModelService() {
6018
5982
  },
6019
5983
  [env]
6020
5984
  );
6021
- const getListCalendar = (0, import_react59.useCallback)(
5985
+ const getListCalendar = (0, import_react58.useCallback)(
6022
5986
  async ({ data }) => {
6023
5987
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
6024
5988
  fields: data.fields,
@@ -6049,7 +6013,7 @@ function useModelService() {
6049
6013
  },
6050
6014
  [env]
6051
6015
  );
6052
- const getList = (0, import_react59.useCallback)(
6016
+ const getList = (0, import_react58.useCallback)(
6053
6017
  async ({
6054
6018
  model,
6055
6019
  ids = [],
@@ -6081,7 +6045,7 @@ function useModelService() {
6081
6045
  },
6082
6046
  [env]
6083
6047
  );
6084
- const getDetail = (0, import_react59.useCallback)(
6048
+ const getDetail = (0, import_react58.useCallback)(
6085
6049
  async ({
6086
6050
  ids = [],
6087
6051
  model,
@@ -6113,7 +6077,7 @@ function useModelService() {
6113
6077
  },
6114
6078
  [env]
6115
6079
  );
6116
- const save = (0, import_react59.useCallback)(
6080
+ const save = (0, import_react58.useCallback)(
6117
6081
  async ({
6118
6082
  model,
6119
6083
  ids = [],
@@ -6148,7 +6112,7 @@ function useModelService() {
6148
6112
  },
6149
6113
  [env]
6150
6114
  );
6151
- const deleteApi = (0, import_react59.useCallback)(
6115
+ const deleteApi = (0, import_react58.useCallback)(
6152
6116
  async ({ ids = [], model, service }) => {
6153
6117
  const jsonData = {
6154
6118
  model,
@@ -6168,7 +6132,7 @@ function useModelService() {
6168
6132
  },
6169
6133
  [env]
6170
6134
  );
6171
- const onChange = (0, import_react59.useCallback)(
6135
+ const onChange = (0, import_react58.useCallback)(
6172
6136
  async ({
6173
6137
  ids = [],
6174
6138
  model,
@@ -6204,7 +6168,7 @@ function useModelService() {
6204
6168
  },
6205
6169
  [env]
6206
6170
  );
6207
- const getListFieldsOnchange = (0, import_react59.useCallback)(
6171
+ const getListFieldsOnchange = (0, import_react58.useCallback)(
6208
6172
  async ({
6209
6173
  model,
6210
6174
  service,
@@ -6228,7 +6192,7 @@ function useModelService() {
6228
6192
  },
6229
6193
  [env]
6230
6194
  );
6231
- const parseORMOdoo = (0, import_react59.useCallback)((data) => {
6195
+ const parseORMOdoo = (0, import_react58.useCallback)((data) => {
6232
6196
  for (const key in data) {
6233
6197
  if (key === "display_name") {
6234
6198
  delete data[key];
@@ -6239,7 +6203,7 @@ function useModelService() {
6239
6203
  }
6240
6204
  return { ...data };
6241
6205
  }, []);
6242
- const toDataJS = (0, import_react59.useCallback)(
6206
+ const toDataJS = (0, import_react58.useCallback)(
6243
6207
  (data, viewData, model) => {
6244
6208
  for (const key in data) {
6245
6209
  if (data[key] === false) {
@@ -6297,10 +6261,10 @@ function useModelService() {
6297
6261
  }
6298
6262
 
6299
6263
  // src/services/user-service/index.ts
6300
- var import_react60 = require("react");
6264
+ var import_react59 = require("react");
6301
6265
  function useUserService() {
6302
6266
  const { env } = useEnv();
6303
- const getProfile = (0, import_react60.useCallback)(
6267
+ const getProfile = (0, import_react59.useCallback)(
6304
6268
  async (service, path, extraHeaders) => {
6305
6269
  return env?.requests?.get(
6306
6270
  path || "/userinfo" /* PROFILE_PATH */,
@@ -6317,7 +6281,7 @@ function useUserService() {
6317
6281
  },
6318
6282
  [env]
6319
6283
  );
6320
- const getUser = (0, import_react60.useCallback)(
6284
+ const getUser = (0, import_react59.useCallback)(
6321
6285
  async ({ context, id }) => {
6322
6286
  const jsonData = {
6323
6287
  model: "res.users",
@@ -6355,7 +6319,7 @@ function useUserService() {
6355
6319
  },
6356
6320
  [env]
6357
6321
  );
6358
- const switchUserLocale = (0, import_react60.useCallback)(
6322
+ const switchUserLocale = (0, import_react59.useCallback)(
6359
6323
  async ({ id, values, service }) => {
6360
6324
  const jsonData = {
6361
6325
  model: "res.users",
@@ -6383,10 +6347,10 @@ function useUserService() {
6383
6347
  }
6384
6348
 
6385
6349
  // src/services/view-service/index.ts
6386
- var import_react61 = require("react");
6350
+ var import_react60 = require("react");
6387
6351
  function useViewService() {
6388
6352
  const { env } = useEnv();
6389
- const getView = (0, import_react61.useCallback)(
6353
+ const getView = (0, import_react60.useCallback)(
6390
6354
  async ({
6391
6355
  model,
6392
6356
  views,
@@ -6426,7 +6390,7 @@ function useViewService() {
6426
6390
  },
6427
6391
  [env]
6428
6392
  );
6429
- const getMenu = (0, import_react61.useCallback)(
6393
+ const getMenu = (0, import_react60.useCallback)(
6430
6394
  async (context, specification, domain, service) => {
6431
6395
  const jsonData = {
6432
6396
  model: "ir.ui.menu" /* MENU */,
@@ -6457,7 +6421,7 @@ function useViewService() {
6457
6421
  },
6458
6422
  [env]
6459
6423
  );
6460
- const getActionDetail = (0, import_react61.useCallback)(
6424
+ const getActionDetail = (0, import_react60.useCallback)(
6461
6425
  async (aid, context) => {
6462
6426
  const jsonData = {
6463
6427
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -6487,7 +6451,7 @@ function useViewService() {
6487
6451
  },
6488
6452
  [env]
6489
6453
  );
6490
- const getResequence = (0, import_react61.useCallback)(
6454
+ const getResequence = (0, import_react60.useCallback)(
6491
6455
  async ({
6492
6456
  model,
6493
6457
  ids,
@@ -6517,7 +6481,7 @@ function useViewService() {
6517
6481
  },
6518
6482
  [env]
6519
6483
  );
6520
- const getSelectionItem = (0, import_react61.useCallback)(
6484
+ const getSelectionItem = (0, import_react60.useCallback)(
6521
6485
  async ({
6522
6486
  data,
6523
6487
  service,
@@ -6554,7 +6518,7 @@ function useViewService() {
6554
6518
  },
6555
6519
  [env]
6556
6520
  );
6557
- const loadMessages = (0, import_react61.useCallback)(async () => {
6521
+ const loadMessages = (0, import_react60.useCallback)(async () => {
6558
6522
  return env.requests.post(
6559
6523
  "/load_message_failures" /* LOAD_MESSAGE */,
6560
6524
  {},
@@ -6565,14 +6529,14 @@ function useViewService() {
6565
6529
  }
6566
6530
  );
6567
6531
  }, [env]);
6568
- const getVersion = (0, import_react61.useCallback)(async () => {
6532
+ const getVersion = (0, import_react60.useCallback)(async () => {
6569
6533
  return env?.requests?.get("", {
6570
6534
  headers: {
6571
6535
  "Content-Type": "application/json"
6572
6536
  }
6573
6537
  });
6574
6538
  }, [env]);
6575
- const grantAccess = (0, import_react61.useCallback)(
6539
+ const grantAccess = (0, import_react60.useCallback)(
6576
6540
  async ({
6577
6541
  redirect_uri,
6578
6542
  state,
@@ -6599,7 +6563,7 @@ function useViewService() {
6599
6563
  },
6600
6564
  [env]
6601
6565
  );
6602
- const removeTotpSetUp = (0, import_react61.useCallback)(
6566
+ const removeTotpSetUp = (0, import_react60.useCallback)(
6603
6567
  async ({ method, token }) => {
6604
6568
  const jsonData = {
6605
6569
  method,
@@ -6620,7 +6584,7 @@ function useViewService() {
6620
6584
  },
6621
6585
  [env]
6622
6586
  );
6623
- const requestSetupTotp = (0, import_react61.useCallback)(
6587
+ const requestSetupTotp = (0, import_react60.useCallback)(
6624
6588
  async ({ method, token }) => {
6625
6589
  const jsonData = {
6626
6590
  method,
@@ -6639,7 +6603,7 @@ function useViewService() {
6639
6603
  },
6640
6604
  [env]
6641
6605
  );
6642
- const settingsWebRead2fa = (0, import_react61.useCallback)(
6606
+ const settingsWebRead2fa = (0, import_react60.useCallback)(
6643
6607
  async ({
6644
6608
  method,
6645
6609
  model,
@@ -6667,7 +6631,7 @@ function useViewService() {
6667
6631
  },
6668
6632
  [env]
6669
6633
  );
6670
- const signInSSO = (0, import_react61.useCallback)(
6634
+ const signInSSO = (0, import_react60.useCallback)(
6671
6635
  async ({
6672
6636
  redirect_uri,
6673
6637
  state,
@@ -6699,7 +6663,7 @@ function useViewService() {
6699
6663
  },
6700
6664
  [env]
6701
6665
  );
6702
- const verify2FA = (0, import_react61.useCallback)(
6666
+ const verify2FA = (0, import_react60.useCallback)(
6703
6667
  ({
6704
6668
  method,
6705
6669
  with_context,
@@ -6732,7 +6696,7 @@ function useViewService() {
6732
6696
  },
6733
6697
  [env]
6734
6698
  );
6735
- const get2FAMethods = (0, import_react61.useCallback)(
6699
+ const get2FAMethods = (0, import_react60.useCallback)(
6736
6700
  ({ method, with_context }) => {
6737
6701
  const jsonData = {
6738
6702
  method,
@@ -6751,7 +6715,7 @@ function useViewService() {
6751
6715
  },
6752
6716
  [env]
6753
6717
  );
6754
- const verifyTotp = (0, import_react61.useCallback)(
6718
+ const verifyTotp = (0, import_react60.useCallback)(
6755
6719
  ({
6756
6720
  method,
6757
6721
  action_token,
@@ -6776,7 +6740,7 @@ function useViewService() {
6776
6740
  },
6777
6741
  [env]
6778
6742
  );
6779
- const getNotifications = (0, import_react61.useCallback)(
6743
+ const getNotifications = (0, import_react60.useCallback)(
6780
6744
  async ({
6781
6745
  service,
6782
6746
  xNode,
@@ -6796,7 +6760,7 @@ function useViewService() {
6796
6760
  },
6797
6761
  [env]
6798
6762
  );
6799
- const getCountry = (0, import_react61.useCallback)(
6763
+ const getCountry = (0, import_react60.useCallback)(
6800
6764
  async ({
6801
6765
  service,
6802
6766
  xNode,
@@ -6823,7 +6787,7 @@ function useViewService() {
6823
6787
  },
6824
6788
  [env]
6825
6789
  );
6826
- const getCity = (0, import_react61.useCallback)(
6790
+ const getCity = (0, import_react60.useCallback)(
6827
6791
  async ({
6828
6792
  service,
6829
6793
  xNode,
@@ -6850,7 +6814,7 @@ function useViewService() {
6850
6814
  },
6851
6815
  [env]
6852
6816
  );
6853
- const getWard = (0, import_react61.useCallback)(
6817
+ const getWard = (0, import_react60.useCallback)(
6854
6818
  async ({
6855
6819
  service,
6856
6820
  xNode,
@@ -6875,7 +6839,7 @@ function useViewService() {
6875
6839
  },
6876
6840
  [env]
6877
6841
  );
6878
- const getPartnerTitle = (0, import_react61.useCallback)(
6842
+ const getPartnerTitle = (0, import_react60.useCallback)(
6879
6843
  async ({
6880
6844
  service,
6881
6845
  xNode,
@@ -6927,10 +6891,10 @@ function useViewService() {
6927
6891
  }
6928
6892
 
6929
6893
  // src/services/dashboard-service/index.ts
6930
- var import_react62 = require("react");
6894
+ var import_react61 = require("react");
6931
6895
  function useDashboardService() {
6932
6896
  const { env } = useEnv();
6933
- const readGroup = (0, import_react62.useCallback)(
6897
+ const readGroup = (0, import_react61.useCallback)(
6934
6898
  async ({
6935
6899
  service,
6936
6900
  xNode,
@@ -6947,7 +6911,7 @@ function useDashboardService() {
6947
6911
  },
6948
6912
  [env]
6949
6913
  );
6950
- const getDataChart = (0, import_react62.useCallback)(
6914
+ const getDataChart = (0, import_react61.useCallback)(
6951
6915
  async ({
6952
6916
  service,
6953
6917
  xNode,