@fctc/interface-logic 4.7.2 → 4.7.4

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