@fctc/interface-logic 4.7.3 → 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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/services/action-service/index.ts
2
- import { useCallback as useCallback46 } from "react";
2
+ import { useCallback as useCallback47 } from "react";
3
3
 
4
4
  // src/constants/api/uri-constant.ts
5
5
  var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
@@ -4435,19 +4435,19 @@ var updateFloorSupabaseService = () => {
4435
4435
  async (values) => {
4436
4436
  if (!supabase) {
4437
4437
  console.error("Supabase client not initialized");
4438
- return [];
4438
+ return false;
4439
4439
  }
4440
4440
  try {
4441
4441
  const { id, ...updateData } = values;
4442
- const { error, data } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id).select("id").single();
4442
+ const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id);
4443
4443
  if (error) {
4444
4444
  console.error("Error updating floor:", error);
4445
- return [];
4445
+ return false;
4446
4446
  }
4447
- return [data.id];
4447
+ return true;
4448
4448
  } catch (error) {
4449
4449
  console.error("Error updating floor:", error);
4450
- return [];
4450
+ return false;
4451
4451
  }
4452
4452
  },
4453
4453
  [supabase]
@@ -4465,19 +4465,19 @@ var updateTableSupabaseService = () => {
4465
4465
  async (values) => {
4466
4466
  if (!supabase) {
4467
4467
  console.error("Supabase client not initialized");
4468
- return [];
4468
+ return false;
4469
4469
  }
4470
4470
  try {
4471
4471
  const { id, ...updateData } = values;
4472
- const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id).select("id").single();
4472
+ const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id);
4473
4473
  if (error) {
4474
4474
  console.error("Error updating table:", error);
4475
- return [];
4475
+ return false;
4476
4476
  }
4477
- return [data.id];
4477
+ return true;
4478
4478
  } catch (error) {
4479
4479
  console.error("Error updating table:", error);
4480
- return [];
4480
+ return false;
4481
4481
  }
4482
4482
  },
4483
4483
  [supabase]
@@ -4495,18 +4495,18 @@ var deleteFloorSupabaseService = () => {
4495
4495
  async (values) => {
4496
4496
  if (!supabase) {
4497
4497
  console.error("Supabase client not initialized");
4498
- return [];
4498
+ return false;
4499
4499
  }
4500
4500
  try {
4501
4501
  const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).delete().eq("id", values.id);
4502
4502
  if (error) {
4503
4503
  console.error("Error deleting floor:", error);
4504
- return [];
4504
+ return false;
4505
4505
  }
4506
- return [values.id];
4506
+ return true;
4507
4507
  } catch (error) {
4508
4508
  console.error("Error deleting floor:", error);
4509
- return [];
4509
+ return false;
4510
4510
  }
4511
4511
  },
4512
4512
  [supabase]
@@ -4524,18 +4524,18 @@ var deleteTableSupabaseService = () => {
4524
4524
  async (values) => {
4525
4525
  if (!supabase) {
4526
4526
  console.error("Supabase client not initialized");
4527
- return [];
4527
+ return false;
4528
4528
  }
4529
4529
  try {
4530
- const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id).select("id").single();
4530
+ const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id);
4531
4531
  if (error) {
4532
4532
  console.error("Error deleting table:", error);
4533
- return [];
4533
+ return false;
4534
4534
  }
4535
- return [data.id];
4535
+ return true;
4536
4536
  } catch (error) {
4537
4537
  console.error("Error deleting table:", error);
4538
- return [];
4538
+ return false;
4539
4539
  }
4540
4540
  },
4541
4541
  [supabase]
@@ -4547,241 +4547,53 @@ var deleteTableSupabaseService = () => {
4547
4547
 
4548
4548
  // src/services/pos-service/supabase/create-order.ts
4549
4549
  import { useCallback as useCallback39 } from "react";
4550
- var createOrderSupabaseService = () => {
4551
- const supabase = useSupabaseOptional();
4552
- const createOrderSupabase = useCallback39(
4553
- async (values) => {
4554
- if (!supabase) {
4555
- console.error("Supabase client not initialized");
4556
- return null;
4557
- }
4558
- try {
4559
- const { data, error } = await supabase.from("orders" /* ORDERS */).insert({
4560
- session_id: values.session_id,
4561
- pos_reference: values.pos_reference,
4562
- amount_tax: values.amount_tax,
4563
- amount_total: values.amount_total,
4564
- amount_paid: values.amount_paid,
4565
- amount_return: values.amount_return,
4566
- table_id: values.table_id,
4567
- partner_id: values.partner_id
4568
- }).select("id, pos_reference").single();
4569
- if (error) {
4570
- console.error("Error creating order:", error);
4571
- return null;
4572
- }
4573
- return [[data.id, data.pos_reference]];
4574
- } catch (error) {
4575
- console.error("Error creating order:", error);
4576
- return null;
4577
- }
4578
- },
4579
- [supabase]
4580
- );
4581
- return {
4582
- createOrderSupabase
4583
- };
4584
- };
4585
4550
 
4586
4551
  // src/services/pos-service/supabase/add-product-to-order.ts
4587
4552
  import { useCallback as useCallback40 } from "react";
4588
- var addProductToOrderSupabaseService = () => {
4589
- const supabase = useSupabaseOptional();
4590
- const addProductToOrderSupabase = useCallback40(
4591
- async (values) => {
4592
- if (!supabase) {
4593
- console.error("Supabase client not initialized");
4594
- return null;
4595
- }
4596
- try {
4597
- const { data, error } = await supabase.from("order_line" /* ORDER_LINE */).insert({
4598
- order_id: values.order_id,
4599
- product_id: values.product_id,
4600
- qty: values.qty,
4601
- price_unit: values.price_unit,
4602
- price_subtotal: values.price_subtotal,
4603
- price_subtotal_incl: values.price_subtotal_incl,
4604
- tax_ids: values.tax_ids ?? [],
4605
- uuid: values.uuid,
4606
- attribute_value_ids: values.attribute_value_ids ?? [],
4607
- note: values.note
4608
- }).select("id").single();
4609
- if (error) {
4610
- console.error("Error adding product to order:", error);
4611
- return null;
4612
- }
4613
- return [data.id];
4614
- } catch (error) {
4615
- console.error("Error adding product to order:", error);
4616
- return null;
4617
- }
4618
- },
4619
- [supabase]
4620
- );
4621
- return {
4622
- addProductToOrderSupabase
4623
- };
4624
- };
4625
4553
 
4626
4554
  // src/services/pos-service/supabase/update-order-total-amount.ts
4627
4555
  import { useCallback as useCallback41 } from "react";
4628
- var updateOrderTotalAmountSupabaseService = () => {
4629
- const supabase = useSupabaseOptional();
4630
- const updateOrderTotalAmountSupabase = useCallback41(
4631
- async (values) => {
4632
- if (!supabase) {
4633
- console.error("Supabase client not initialized");
4634
- return [];
4635
- }
4636
- try {
4637
- const { error } = await supabase.from("orders" /* ORDERS */).update({
4638
- amount_tax: values.amount_tax,
4639
- amount_total: values.amount_total,
4640
- note: values.note
4641
- }).eq("id", values.order_id);
4642
- if (error) {
4643
- console.error("Error updating order total amount:", error);
4644
- return [];
4645
- }
4646
- return [values.order_id];
4647
- } catch (error) {
4648
- console.error("Error updating order total amount:", error);
4649
- return [];
4650
- }
4651
- },
4652
- [supabase]
4653
- );
4654
- return {
4655
- updateOrderTotalAmountSupabase
4656
- };
4657
- };
4658
4556
 
4659
4557
  // src/services/pos-service/supabase/update-order-line.ts
4660
4558
  import { useCallback as useCallback42 } from "react";
4661
- var updateOrderLineSupabaseService = () => {
4662
- const supabase = useSupabaseOptional();
4663
- const updateOrderLineSupabase = useCallback42(
4664
- async (values) => {
4665
- if (!supabase) {
4666
- console.error("Supabase client not initialized");
4667
- return [];
4668
- }
4669
- try {
4670
- const { error, data } = await supabase.from("order_line" /* ORDER_LINE */).update({
4671
- order_id: values.order_id,
4672
- qty: values.qty,
4673
- price_subtotal: values.price_subtotal,
4674
- price_subtotal_incl: values.price_subtotal_incl,
4675
- attribute_value_ids: values.attribute_value_ids ?? []
4676
- }).eq("id", values.order_line_id).select("id").single();
4677
- if (error) {
4678
- console.error("Error updating order line:", error);
4679
- return [];
4680
- }
4681
- return [data.id];
4682
- } catch (error) {
4683
- console.error("Error updating order line:", error);
4684
- return [];
4685
- }
4686
- },
4687
- [supabase]
4688
- );
4689
- return {
4690
- updateOrderLineSupabase
4691
- };
4692
- };
4693
4559
 
4694
4560
  // src/services/pos-service/supabase/update-order.ts
4695
4561
  import { useCallback as useCallback43 } from "react";
4696
- var updateOrderSupabaseService = () => {
4697
- const supabase = useSupabaseOptional();
4698
- const updateOrderSupabase = useCallback43(
4699
- async (values) => {
4700
- if (!supabase) {
4701
- console.error("Supabase client not initialized");
4702
- return [];
4703
- }
4704
- const { order_id, ...rest } = values;
4705
- const updateData = Object.fromEntries(
4706
- Object.entries({
4707
- ...rest,
4708
- updated_at: (/* @__PURE__ */ new Date()).toISOString()
4709
- }).filter(([_, v]) => v !== void 0)
4710
- );
4711
- try {
4712
- const { error, data } = await supabase.from("orders" /* ORDERS */).update(updateData).eq("id", order_id).select("id").single();
4713
- if (error) {
4714
- console.error("Error updating order:", error);
4715
- return [];
4716
- }
4717
- return [data.id];
4718
- } catch (error) {
4719
- console.error("Error updating order:", error);
4720
- return [];
4721
- }
4722
- },
4723
- [supabase]
4724
- );
4725
- return {
4726
- updateOrderSupabase
4727
- };
4728
- };
4729
4562
 
4730
4563
  // src/services/pos-service/supabase/delete-order.ts
4731
4564
  import { useCallback as useCallback44 } from "react";
4732
- var deleteOrderSupabaseService = () => {
4733
- const supabase = useSupabaseOptional();
4734
- const deleteOrderSupabase = useCallback44(
4735
- async (values) => {
4736
- if (!supabase) {
4737
- console.error("Supabase client not initialized");
4738
- return [];
4739
- }
4740
- try {
4741
- const { error, data } = await supabase.from("orders" /* ORDERS */).delete().eq("id", values.id).select("id").single();
4742
- if (error) {
4743
- console.error("Error deleting order:", error);
4744
- return [];
4745
- }
4746
- return [data.id];
4747
- } catch (error) {
4748
- console.error("Error deleting order:", error);
4749
- return [];
4750
- }
4751
- },
4752
- [supabase]
4753
- );
4754
- return {
4755
- deleteOrderSupabase
4756
- };
4757
- };
4758
4565
 
4759
4566
  // src/services/pos-service/supabase/delete-order-line.ts
4760
4567
  import { useCallback as useCallback45 } from "react";
4761
- var deleteOrderLineSupabaseService = () => {
4568
+
4569
+ // src/services/pos-service/supabase/add-category.ts
4570
+ import { useCallback as useCallback46 } from "react";
4571
+ var addCategorySupabaseService = () => {
4762
4572
  const supabase = useSupabaseOptional();
4763
- const deleteOrderLineSupabase = useCallback45(
4573
+ const addCategorySupabase = useCallback46(
4764
4574
  async (values) => {
4765
4575
  if (!supabase) {
4766
4576
  console.error("Supabase client not initialized");
4767
- return [];
4577
+ return null;
4768
4578
  }
4769
4579
  try {
4770
- const { error, data } = await supabase.from("order_line" /* ORDER_LINE */).delete().eq("id", values.line_id).select("id").single();
4580
+ const { data, error } = await supabase.from("pos_categories" /* POS_CATEGORIES */).insert({
4581
+ name: values.name
4582
+ }).select("id, name").single();
4771
4583
  if (error) {
4772
- console.error("Error deleting order line:", error);
4773
- return [];
4584
+ console.error("Error adding Category:", error);
4585
+ return null;
4774
4586
  }
4775
- return [data.id];
4587
+ return [[data.id, data.name]];
4776
4588
  } catch (error) {
4777
- console.error("Error deleting order line:", error);
4778
- return [];
4589
+ console.error("Error adding Category:", error);
4590
+ return null;
4779
4591
  }
4780
4592
  },
4781
4593
  [supabase]
4782
4594
  );
4783
4595
  return {
4784
- deleteOrderLineSupabase
4596
+ addCategorySupabase
4785
4597
  };
4786
4598
  };
4787
4599
 
@@ -4823,13 +4635,7 @@ var serviceFactories = [
4823
4635
  updateTableSupabaseService,
4824
4636
  deleteFloorSupabaseService,
4825
4637
  deleteTableSupabaseService,
4826
- createOrderSupabaseService,
4827
- addProductToOrderSupabaseService,
4828
- updateOrderTotalAmountSupabaseService,
4829
- updateOrderLineSupabaseService,
4830
- updateOrderSupabaseService,
4831
- deleteOrderSupabaseService,
4832
- deleteOrderLineSupabaseService
4638
+ addCategorySupabaseService
4833
4639
  ];
4834
4640
  var usePosService = () => {
4835
4641
  const { env } = useEnv();
@@ -4949,24 +4755,9 @@ import { useMutation as useMutation93 } from "@tanstack/react-query";
4949
4755
  // src/hooks/pos/supabase/use-create-order.ts
4950
4756
  import { useMutation as useMutation94 } from "@tanstack/react-query";
4951
4757
 
4952
- // src/hooks/pos/supabase/use-add-product-to-order.ts
4758
+ // src/hooks/pos/supabase/use-add-category.ts
4953
4759
  import { useMutation as useMutation95 } from "@tanstack/react-query";
4954
4760
 
4955
- // src/hooks/pos/supabase/use-update-order-total-amount.ts
4956
- import { useMutation as useMutation96 } from "@tanstack/react-query";
4957
-
4958
- // src/hooks/pos/supabase/use-update-order-line.ts
4959
- import { useMutation as useMutation97 } from "@tanstack/react-query";
4960
-
4961
- // src/hooks/pos/supabase/use-update-order.ts
4962
- import { useMutation as useMutation98 } from "@tanstack/react-query";
4963
-
4964
- // src/hooks/pos/supabase/use-delete-order.ts
4965
- import { useMutation as useMutation99 } from "@tanstack/react-query";
4966
-
4967
- // src/hooks/pos/supabase/use-delete-order-line.ts
4968
- import { useMutation as useMutation100 } from "@tanstack/react-query";
4969
-
4970
4761
  // src/provider/service-provider.tsx
4971
4762
  import { jsx as jsx7 } from "react/jsx-runtime";
4972
4763
  var ServiceContext = createContext3(null);
@@ -4978,7 +4769,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
4978
4769
  // src/services/action-service/index.ts
4979
4770
  function useActionService() {
4980
4771
  const { env } = useEnv();
4981
- const loadAction = useCallback46(
4772
+ const loadAction = useCallback47(
4982
4773
  async ({
4983
4774
  idAction,
4984
4775
  context,
@@ -5002,7 +4793,7 @@ function useActionService() {
5002
4793
  },
5003
4794
  [env]
5004
4795
  );
5005
- const callButton = useCallback46(
4796
+ const callButton = useCallback47(
5006
4797
  async ({
5007
4798
  model,
5008
4799
  ids = [],
@@ -5036,7 +4827,7 @@ function useActionService() {
5036
4827
  },
5037
4828
  [env]
5038
4829
  );
5039
- const removeRows = useCallback46(
4830
+ const removeRows = useCallback47(
5040
4831
  async ({
5041
4832
  model,
5042
4833
  ids,
@@ -5062,7 +4853,7 @@ function useActionService() {
5062
4853
  },
5063
4854
  [env]
5064
4855
  );
5065
- const duplicateRecord = useCallback46(
4856
+ const duplicateRecord = useCallback47(
5066
4857
  async ({
5067
4858
  model,
5068
4859
  id,
@@ -5088,7 +4879,7 @@ function useActionService() {
5088
4879
  },
5089
4880
  [env]
5090
4881
  );
5091
- const getPrintReportName = useCallback46(
4882
+ const getPrintReportName = useCallback47(
5092
4883
  async ({ id }) => {
5093
4884
  const jsonData = {
5094
4885
  model: "ir.actions.report",
@@ -5106,7 +4897,7 @@ function useActionService() {
5106
4897
  },
5107
4898
  [env]
5108
4899
  );
5109
- const print = useCallback46(
4900
+ const print = useCallback47(
5110
4901
  async ({ id, report, db }) => {
5111
4902
  const jsonData = {
5112
4903
  report,
@@ -5124,7 +4915,7 @@ function useActionService() {
5124
4915
  },
5125
4916
  [env]
5126
4917
  );
5127
- const runAction = useCallback46(
4918
+ const runAction = useCallback47(
5128
4919
  async ({
5129
4920
  idAction,
5130
4921
  context,
@@ -5151,7 +4942,7 @@ function useActionService() {
5151
4942
  },
5152
4943
  [env]
5153
4944
  );
5154
- const generateSerialNumber = useCallback46(
4945
+ const generateSerialNumber = useCallback47(
5155
4946
  async ({
5156
4947
  kwargs,
5157
4948
  context,
@@ -5189,11 +4980,11 @@ function useActionService() {
5189
4980
  }
5190
4981
 
5191
4982
  // src/services/auth-service/index.ts
5192
- import { useCallback as useCallback47 } from "react";
4983
+ import { useCallback as useCallback48 } from "react";
5193
4984
  function useAuthService() {
5194
4985
  const { env } = useEnv();
5195
4986
  const supabase = useSupabaseOptional();
5196
- const login = useCallback47(
4987
+ const login = useCallback48(
5197
4988
  async (body) => {
5198
4989
  const payload = Object.fromEntries(
5199
4990
  Object.entries({
@@ -5218,7 +5009,7 @@ function useAuthService() {
5218
5009
  },
5219
5010
  [env]
5220
5011
  );
5221
- const loginSupabase = useCallback47(
5012
+ const loginSupabase = useCallback48(
5222
5013
  async (body) => {
5223
5014
  if (!supabase) {
5224
5015
  return {
@@ -5234,7 +5025,7 @@ function useAuthService() {
5234
5025
  },
5235
5026
  [supabase]
5236
5027
  );
5237
- const forgotPassword = useCallback47(
5028
+ const forgotPassword = useCallback48(
5238
5029
  async (email) => {
5239
5030
  const bodyData = {
5240
5031
  login: email,
@@ -5248,7 +5039,7 @@ function useAuthService() {
5248
5039
  },
5249
5040
  [env]
5250
5041
  );
5251
- const forgotPasswordSSO = useCallback47(
5042
+ const forgotPasswordSSO = useCallback48(
5252
5043
  async ({
5253
5044
  email,
5254
5045
  with_context,
@@ -5271,7 +5062,7 @@ function useAuthService() {
5271
5062
  },
5272
5063
  [env]
5273
5064
  );
5274
- const resetPassword = useCallback47(
5065
+ const resetPassword = useCallback48(
5275
5066
  async (data, token) => {
5276
5067
  const bodyData = {
5277
5068
  token,
@@ -5286,7 +5077,7 @@ function useAuthService() {
5286
5077
  },
5287
5078
  [env]
5288
5079
  );
5289
- const resetPasswordSSO = useCallback47(
5080
+ const resetPasswordSSO = useCallback48(
5290
5081
  async ({
5291
5082
  method,
5292
5083
  password,
@@ -5309,7 +5100,7 @@ function useAuthService() {
5309
5100
  },
5310
5101
  [env]
5311
5102
  );
5312
- const updatePassword = useCallback47(
5103
+ const updatePassword = useCallback48(
5313
5104
  async (data, token) => {
5314
5105
  const bodyData = {
5315
5106
  token,
@@ -5324,7 +5115,7 @@ function useAuthService() {
5324
5115
  },
5325
5116
  [env]
5326
5117
  );
5327
- const isValidToken = useCallback47(
5118
+ const isValidToken = useCallback48(
5328
5119
  async (token) => {
5329
5120
  const bodyData = {
5330
5121
  token
@@ -5337,7 +5128,7 @@ function useAuthService() {
5337
5128
  },
5338
5129
  [env]
5339
5130
  );
5340
- const isValidActionToken = useCallback47(
5131
+ const isValidActionToken = useCallback48(
5341
5132
  async (actionToken) => {
5342
5133
  const bodyData = {};
5343
5134
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -5350,7 +5141,7 @@ function useAuthService() {
5350
5141
  },
5351
5142
  [env]
5352
5143
  );
5353
- const loginSocial = useCallback47(
5144
+ const loginSocial = useCallback48(
5354
5145
  async ({
5355
5146
  db,
5356
5147
  state,
@@ -5368,13 +5159,13 @@ function useAuthService() {
5368
5159
  },
5369
5160
  [env]
5370
5161
  );
5371
- const getProviders = useCallback47(
5162
+ const getProviders = useCallback48(
5372
5163
  async (db) => {
5373
5164
  return env?.requests?.get("/oauth/providers", { params: { db } });
5374
5165
  },
5375
5166
  [env]
5376
5167
  );
5377
- const getAccessByCode = useCallback47(
5168
+ const getAccessByCode = useCallback48(
5378
5169
  async (code) => {
5379
5170
  const data = new URLSearchParams();
5380
5171
  data.append("code", code);
@@ -5394,7 +5185,7 @@ function useAuthService() {
5394
5185
  },
5395
5186
  [env]
5396
5187
  );
5397
- const logout = useCallback47(
5188
+ const logout = useCallback48(
5398
5189
  async (service) => {
5399
5190
  return env?.requests?.post(
5400
5191
  "/logout" /* LOGOUT */,
@@ -5411,7 +5202,7 @@ function useAuthService() {
5411
5202
  },
5412
5203
  [env]
5413
5204
  );
5414
- const getTenantMapping = useCallback47(
5205
+ const getTenantMapping = useCallback48(
5415
5206
  async ({ shortName, service }) => {
5416
5207
  const bodyData = {
5417
5208
  short_name: shortName
@@ -5429,7 +5220,7 @@ function useAuthService() {
5429
5220
  },
5430
5221
  [env]
5431
5222
  );
5432
- const getToken = useCallback47(
5223
+ const getToken = useCallback48(
5433
5224
  async ({
5434
5225
  phone,
5435
5226
  name,
@@ -5474,10 +5265,10 @@ function useAuthService() {
5474
5265
  }
5475
5266
 
5476
5267
  // src/services/company-service/index.ts
5477
- import { useCallback as useCallback48 } from "react";
5268
+ import { useCallback as useCallback49 } from "react";
5478
5269
  function useCompanyService() {
5479
5270
  const { env } = useEnv();
5480
- const getCurrentCompany = useCallback48(
5271
+ const getCurrentCompany = useCallback49(
5481
5272
  async (service, extraHeaders) => {
5482
5273
  return await env.requests.get(
5483
5274
  "/company" /* COMPANY_PATH */,
@@ -5494,7 +5285,7 @@ function useCompanyService() {
5494
5285
  },
5495
5286
  [env]
5496
5287
  );
5497
- const getInfoCompany = useCallback48(
5288
+ const getInfoCompany = useCallback49(
5498
5289
  async (id, service) => {
5499
5290
  const jsonData = {
5500
5291
  ids: [id],
@@ -5530,10 +5321,10 @@ function useCompanyService() {
5530
5321
  }
5531
5322
 
5532
5323
  // src/services/excel-service/index.ts
5533
- import { useCallback as useCallback49 } from "react";
5324
+ import { useCallback as useCallback50 } from "react";
5534
5325
  function useExcelService() {
5535
5326
  const { env } = useEnv();
5536
- const uploadFileExcel = useCallback49(
5327
+ const uploadFileExcel = useCallback50(
5537
5328
  async ({
5538
5329
  formData,
5539
5330
  service,
@@ -5550,7 +5341,7 @@ function useExcelService() {
5550
5341
  },
5551
5342
  [env]
5552
5343
  );
5553
- const uploadIdFile = useCallback49(
5344
+ const uploadIdFile = useCallback50(
5554
5345
  async ({
5555
5346
  formData,
5556
5347
  service,
@@ -5567,7 +5358,7 @@ function useExcelService() {
5567
5358
  },
5568
5359
  [env]
5569
5360
  );
5570
- const parsePreview = useCallback49(
5361
+ const parsePreview = useCallback50(
5571
5362
  async ({
5572
5363
  id,
5573
5364
  selectedSheet,
@@ -5616,7 +5407,7 @@ function useExcelService() {
5616
5407
  },
5617
5408
  [env]
5618
5409
  );
5619
- const executeImport = useCallback49(
5410
+ const executeImport = useCallback50(
5620
5411
  async ({
5621
5412
  columns,
5622
5413
  fields,
@@ -5650,7 +5441,7 @@ function useExcelService() {
5650
5441
  },
5651
5442
  [env]
5652
5443
  );
5653
- const getFileExcel = useCallback49(
5444
+ const getFileExcel = useCallback50(
5654
5445
  async ({
5655
5446
  model,
5656
5447
  service,
@@ -5674,7 +5465,7 @@ function useExcelService() {
5674
5465
  },
5675
5466
  [env]
5676
5467
  );
5677
- const getFieldExport = useCallback49(
5468
+ const getFieldExport = useCallback50(
5678
5469
  async ({
5679
5470
  ids,
5680
5471
  model,
@@ -5714,7 +5505,7 @@ function useExcelService() {
5714
5505
  },
5715
5506
  [env]
5716
5507
  );
5717
- const exportExcel = useCallback49(
5508
+ const exportExcel = useCallback50(
5718
5509
  async ({
5719
5510
  model,
5720
5511
  domain,
@@ -5762,10 +5553,10 @@ function useExcelService() {
5762
5553
  }
5763
5554
 
5764
5555
  // src/services/form-service/index.ts
5765
- import { useCallback as useCallback50 } from "react";
5556
+ import { useCallback as useCallback51 } from "react";
5766
5557
  function useFormService() {
5767
5558
  const { env } = useEnv();
5768
- const getComment = useCallback50(
5559
+ const getComment = useCallback51(
5769
5560
  async ({ data }) => {
5770
5561
  const jsonData = {
5771
5562
  thread_id: data.thread_id,
@@ -5783,7 +5574,7 @@ function useFormService() {
5783
5574
  },
5784
5575
  [env]
5785
5576
  );
5786
- const getThreadData = useCallback50(
5577
+ const getThreadData = useCallback51(
5787
5578
  async ({
5788
5579
  data,
5789
5580
  xNode,
@@ -5810,7 +5601,7 @@ function useFormService() {
5810
5601
  },
5811
5602
  [env]
5812
5603
  );
5813
- const getThreadMessages = useCallback50(
5604
+ const getThreadMessages = useCallback51(
5814
5605
  async ({
5815
5606
  data,
5816
5607
  xNode,
@@ -5836,7 +5627,7 @@ function useFormService() {
5836
5627
  },
5837
5628
  [env]
5838
5629
  );
5839
- const sentComment = useCallback50(
5630
+ const sentComment = useCallback51(
5840
5631
  async ({ data }) => {
5841
5632
  const jsonData = {
5842
5633
  context: {
@@ -5864,7 +5655,7 @@ function useFormService() {
5864
5655
  },
5865
5656
  [env]
5866
5657
  );
5867
- const deleteComment = useCallback50(
5658
+ const deleteComment = useCallback51(
5868
5659
  async ({ data }) => {
5869
5660
  const jsonData = {
5870
5661
  attachment_ids: [],
@@ -5880,7 +5671,7 @@ function useFormService() {
5880
5671
  },
5881
5672
  [env]
5882
5673
  );
5883
- const getImage = useCallback50(
5674
+ const getImage = useCallback51(
5884
5675
  async ({ data }) => {
5885
5676
  return env.requests.get(
5886
5677
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -5893,7 +5684,7 @@ function useFormService() {
5893
5684
  },
5894
5685
  [env]
5895
5686
  );
5896
- const uploadImage = useCallback50(
5687
+ const uploadImage = useCallback51(
5897
5688
  async ({
5898
5689
  formData,
5899
5690
  service,
@@ -5912,7 +5703,7 @@ function useFormService() {
5912
5703
  },
5913
5704
  [env]
5914
5705
  );
5915
- const uploadFile = useCallback50(
5706
+ const uploadFile = useCallback51(
5916
5707
  async ({
5917
5708
  formData,
5918
5709
  service,
@@ -5932,7 +5723,7 @@ function useFormService() {
5932
5723
  },
5933
5724
  [env]
5934
5725
  );
5935
- const getFormView = useCallback50(
5726
+ const getFormView = useCallback51(
5936
5727
  async ({ data }) => {
5937
5728
  const jsonData = {
5938
5729
  model: data.model,
@@ -5948,7 +5739,7 @@ function useFormService() {
5948
5739
  },
5949
5740
  [env]
5950
5741
  );
5951
- const changeStatus = useCallback50(
5742
+ const changeStatus = useCallback51(
5952
5743
  async ({ data }) => {
5953
5744
  const vals = {
5954
5745
  [data.name]: data.stage_id
@@ -5977,7 +5768,7 @@ function useFormService() {
5977
5768
  },
5978
5769
  [env]
5979
5770
  );
5980
- const getExternalTab = useCallback50(
5771
+ const getExternalTab = useCallback51(
5981
5772
  async ({ method, context, service, xNode }) => {
5982
5773
  return env?.requests?.post(
5983
5774
  "/call" /* CALL_PATH */,
@@ -6012,10 +5803,10 @@ function useFormService() {
6012
5803
  }
6013
5804
 
6014
5805
  // src/services/kanban-service/index.ts
6015
- import { useCallback as useCallback51 } from "react";
5806
+ import { useCallback as useCallback52 } from "react";
6016
5807
  function useKanbanService() {
6017
5808
  const { env } = useEnv();
6018
- const getGroups = useCallback51(
5809
+ const getGroups = useCallback52(
6019
5810
  async ({ model, width_context }) => {
6020
5811
  const jsonData = {
6021
5812
  model,
@@ -6035,7 +5826,7 @@ function useKanbanService() {
6035
5826
  },
6036
5827
  [env]
6037
5828
  );
6038
- const getProgressBar = useCallback51(
5829
+ const getProgressBar = useCallback52(
6039
5830
  async ({ field, color, model, width_context }) => {
6040
5831
  const jsonData = {
6041
5832
  model,
@@ -6065,10 +5856,10 @@ function useKanbanService() {
6065
5856
  }
6066
5857
 
6067
5858
  // src/services/model-service/index.ts
6068
- import { useCallback as useCallback52 } from "react";
5859
+ import { useCallback as useCallback53 } from "react";
6069
5860
  function useModelService() {
6070
5861
  const { env } = useEnv();
6071
- const getListMyBankAccount = useCallback52(
5862
+ const getListMyBankAccount = useCallback53(
6072
5863
  async ({
6073
5864
  domain,
6074
5865
  spectification,
@@ -6092,7 +5883,7 @@ function useModelService() {
6092
5883
  },
6093
5884
  [env]
6094
5885
  );
6095
- const getCurrency = useCallback52(async () => {
5886
+ const getCurrency = useCallback53(async () => {
6096
5887
  const jsonData = {
6097
5888
  model: "res.currency",
6098
5889
  method: "web_search_read",
@@ -6112,7 +5903,7 @@ function useModelService() {
6112
5903
  }
6113
5904
  });
6114
5905
  }, [env]);
6115
- const getConversionRate = useCallback52(async () => {
5906
+ const getConversionRate = useCallback53(async () => {
6116
5907
  const jsonData = {
6117
5908
  model: "res.currency",
6118
5909
  method: "web_search_read",
@@ -6138,7 +5929,7 @@ function useModelService() {
6138
5929
  }
6139
5930
  });
6140
5931
  }, [env]);
6141
- const getAll = useCallback52(
5932
+ const getAll = useCallback53(
6142
5933
  async ({
6143
5934
  data,
6144
5935
  service,
@@ -6180,7 +5971,7 @@ function useModelService() {
6180
5971
  },
6181
5972
  [env]
6182
5973
  );
6183
- const getListCalendar = useCallback52(
5974
+ const getListCalendar = useCallback53(
6184
5975
  async ({ data }) => {
6185
5976
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
6186
5977
  fields: data.fields,
@@ -6211,7 +6002,7 @@ function useModelService() {
6211
6002
  },
6212
6003
  [env]
6213
6004
  );
6214
- const getList = useCallback52(
6005
+ const getList = useCallback53(
6215
6006
  async ({
6216
6007
  model,
6217
6008
  ids = [],
@@ -6243,7 +6034,7 @@ function useModelService() {
6243
6034
  },
6244
6035
  [env]
6245
6036
  );
6246
- const getDetail = useCallback52(
6037
+ const getDetail = useCallback53(
6247
6038
  async ({
6248
6039
  ids = [],
6249
6040
  model,
@@ -6275,7 +6066,7 @@ function useModelService() {
6275
6066
  },
6276
6067
  [env]
6277
6068
  );
6278
- const save = useCallback52(
6069
+ const save = useCallback53(
6279
6070
  async ({
6280
6071
  model,
6281
6072
  ids = [],
@@ -6310,7 +6101,7 @@ function useModelService() {
6310
6101
  },
6311
6102
  [env]
6312
6103
  );
6313
- const deleteApi = useCallback52(
6104
+ const deleteApi = useCallback53(
6314
6105
  async ({ ids = [], model, service }) => {
6315
6106
  const jsonData = {
6316
6107
  model,
@@ -6330,7 +6121,7 @@ function useModelService() {
6330
6121
  },
6331
6122
  [env]
6332
6123
  );
6333
- const onChange = useCallback52(
6124
+ const onChange = useCallback53(
6334
6125
  async ({
6335
6126
  ids = [],
6336
6127
  model,
@@ -6366,7 +6157,7 @@ function useModelService() {
6366
6157
  },
6367
6158
  [env]
6368
6159
  );
6369
- const getListFieldsOnchange = useCallback52(
6160
+ const getListFieldsOnchange = useCallback53(
6370
6161
  async ({
6371
6162
  model,
6372
6163
  service,
@@ -6390,7 +6181,7 @@ function useModelService() {
6390
6181
  },
6391
6182
  [env]
6392
6183
  );
6393
- const parseORMOdoo = useCallback52((data) => {
6184
+ const parseORMOdoo = useCallback53((data) => {
6394
6185
  for (const key in data) {
6395
6186
  if (key === "display_name") {
6396
6187
  delete data[key];
@@ -6401,7 +6192,7 @@ function useModelService() {
6401
6192
  }
6402
6193
  return { ...data };
6403
6194
  }, []);
6404
- const toDataJS = useCallback52(
6195
+ const toDataJS = useCallback53(
6405
6196
  (data, viewData, model) => {
6406
6197
  for (const key in data) {
6407
6198
  if (data[key] === false) {
@@ -6459,10 +6250,10 @@ function useModelService() {
6459
6250
  }
6460
6251
 
6461
6252
  // src/services/user-service/index.ts
6462
- import { useCallback as useCallback53 } from "react";
6253
+ import { useCallback as useCallback54 } from "react";
6463
6254
  function useUserService() {
6464
6255
  const { env } = useEnv();
6465
- const getProfile = useCallback53(
6256
+ const getProfile = useCallback54(
6466
6257
  async (service, path, extraHeaders) => {
6467
6258
  return env?.requests?.get(
6468
6259
  path || "/userinfo" /* PROFILE_PATH */,
@@ -6479,7 +6270,7 @@ function useUserService() {
6479
6270
  },
6480
6271
  [env]
6481
6272
  );
6482
- const getUser = useCallback53(
6273
+ const getUser = useCallback54(
6483
6274
  async ({ context, id }) => {
6484
6275
  const jsonData = {
6485
6276
  model: "res.users",
@@ -6517,7 +6308,7 @@ function useUserService() {
6517
6308
  },
6518
6309
  [env]
6519
6310
  );
6520
- const switchUserLocale = useCallback53(
6311
+ const switchUserLocale = useCallback54(
6521
6312
  async ({ id, values, service }) => {
6522
6313
  const jsonData = {
6523
6314
  model: "res.users",
@@ -6545,10 +6336,10 @@ function useUserService() {
6545
6336
  }
6546
6337
 
6547
6338
  // src/services/view-service/index.ts
6548
- import { useCallback as useCallback54 } from "react";
6339
+ import { useCallback as useCallback55 } from "react";
6549
6340
  function useViewService() {
6550
6341
  const { env } = useEnv();
6551
- const getView = useCallback54(
6342
+ const getView = useCallback55(
6552
6343
  async ({
6553
6344
  model,
6554
6345
  views,
@@ -6588,7 +6379,7 @@ function useViewService() {
6588
6379
  },
6589
6380
  [env]
6590
6381
  );
6591
- const getMenu = useCallback54(
6382
+ const getMenu = useCallback55(
6592
6383
  async (context, specification, domain, service) => {
6593
6384
  const jsonData = {
6594
6385
  model: "ir.ui.menu" /* MENU */,
@@ -6619,7 +6410,7 @@ function useViewService() {
6619
6410
  },
6620
6411
  [env]
6621
6412
  );
6622
- const getActionDetail = useCallback54(
6413
+ const getActionDetail = useCallback55(
6623
6414
  async (aid, context) => {
6624
6415
  const jsonData = {
6625
6416
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -6649,7 +6440,7 @@ function useViewService() {
6649
6440
  },
6650
6441
  [env]
6651
6442
  );
6652
- const getResequence = useCallback54(
6443
+ const getResequence = useCallback55(
6653
6444
  async ({
6654
6445
  model,
6655
6446
  ids,
@@ -6679,7 +6470,7 @@ function useViewService() {
6679
6470
  },
6680
6471
  [env]
6681
6472
  );
6682
- const getSelectionItem = useCallback54(
6473
+ const getSelectionItem = useCallback55(
6683
6474
  async ({
6684
6475
  data,
6685
6476
  service,
@@ -6716,7 +6507,7 @@ function useViewService() {
6716
6507
  },
6717
6508
  [env]
6718
6509
  );
6719
- const loadMessages = useCallback54(async () => {
6510
+ const loadMessages = useCallback55(async () => {
6720
6511
  return env.requests.post(
6721
6512
  "/load_message_failures" /* LOAD_MESSAGE */,
6722
6513
  {},
@@ -6727,14 +6518,14 @@ function useViewService() {
6727
6518
  }
6728
6519
  );
6729
6520
  }, [env]);
6730
- const getVersion = useCallback54(async () => {
6521
+ const getVersion = useCallback55(async () => {
6731
6522
  return env?.requests?.get("", {
6732
6523
  headers: {
6733
6524
  "Content-Type": "application/json"
6734
6525
  }
6735
6526
  });
6736
6527
  }, [env]);
6737
- const grantAccess = useCallback54(
6528
+ const grantAccess = useCallback55(
6738
6529
  async ({
6739
6530
  redirect_uri,
6740
6531
  state,
@@ -6761,7 +6552,7 @@ function useViewService() {
6761
6552
  },
6762
6553
  [env]
6763
6554
  );
6764
- const removeTotpSetUp = useCallback54(
6555
+ const removeTotpSetUp = useCallback55(
6765
6556
  async ({ method, token }) => {
6766
6557
  const jsonData = {
6767
6558
  method,
@@ -6782,7 +6573,7 @@ function useViewService() {
6782
6573
  },
6783
6574
  [env]
6784
6575
  );
6785
- const requestSetupTotp = useCallback54(
6576
+ const requestSetupTotp = useCallback55(
6786
6577
  async ({ method, token }) => {
6787
6578
  const jsonData = {
6788
6579
  method,
@@ -6801,7 +6592,7 @@ function useViewService() {
6801
6592
  },
6802
6593
  [env]
6803
6594
  );
6804
- const settingsWebRead2fa = useCallback54(
6595
+ const settingsWebRead2fa = useCallback55(
6805
6596
  async ({
6806
6597
  method,
6807
6598
  model,
@@ -6829,7 +6620,7 @@ function useViewService() {
6829
6620
  },
6830
6621
  [env]
6831
6622
  );
6832
- const signInSSO = useCallback54(
6623
+ const signInSSO = useCallback55(
6833
6624
  async ({
6834
6625
  redirect_uri,
6835
6626
  state,
@@ -6861,7 +6652,7 @@ function useViewService() {
6861
6652
  },
6862
6653
  [env]
6863
6654
  );
6864
- const verify2FA = useCallback54(
6655
+ const verify2FA = useCallback55(
6865
6656
  ({
6866
6657
  method,
6867
6658
  with_context,
@@ -6894,7 +6685,7 @@ function useViewService() {
6894
6685
  },
6895
6686
  [env]
6896
6687
  );
6897
- const get2FAMethods = useCallback54(
6688
+ const get2FAMethods = useCallback55(
6898
6689
  ({ method, with_context }) => {
6899
6690
  const jsonData = {
6900
6691
  method,
@@ -6913,7 +6704,7 @@ function useViewService() {
6913
6704
  },
6914
6705
  [env]
6915
6706
  );
6916
- const verifyTotp = useCallback54(
6707
+ const verifyTotp = useCallback55(
6917
6708
  ({
6918
6709
  method,
6919
6710
  action_token,
@@ -6938,7 +6729,7 @@ function useViewService() {
6938
6729
  },
6939
6730
  [env]
6940
6731
  );
6941
- const getNotifications = useCallback54(
6732
+ const getNotifications = useCallback55(
6942
6733
  async ({
6943
6734
  service,
6944
6735
  xNode,
@@ -6958,7 +6749,7 @@ function useViewService() {
6958
6749
  },
6959
6750
  [env]
6960
6751
  );
6961
- const getCountry = useCallback54(
6752
+ const getCountry = useCallback55(
6962
6753
  async ({
6963
6754
  service,
6964
6755
  xNode,
@@ -6985,7 +6776,7 @@ function useViewService() {
6985
6776
  },
6986
6777
  [env]
6987
6778
  );
6988
- const getCity = useCallback54(
6779
+ const getCity = useCallback55(
6989
6780
  async ({
6990
6781
  service,
6991
6782
  xNode,
@@ -7012,7 +6803,7 @@ function useViewService() {
7012
6803
  },
7013
6804
  [env]
7014
6805
  );
7015
- const getWard = useCallback54(
6806
+ const getWard = useCallback55(
7016
6807
  async ({
7017
6808
  service,
7018
6809
  xNode,
@@ -7037,7 +6828,7 @@ function useViewService() {
7037
6828
  },
7038
6829
  [env]
7039
6830
  );
7040
- const getPartnerTitle = useCallback54(
6831
+ const getPartnerTitle = useCallback55(
7041
6832
  async ({
7042
6833
  service,
7043
6834
  xNode,
@@ -7089,10 +6880,10 @@ function useViewService() {
7089
6880
  }
7090
6881
 
7091
6882
  // src/services/dashboard-service/index.ts
7092
- import { useCallback as useCallback55 } from "react";
6883
+ import { useCallback as useCallback56 } from "react";
7093
6884
  function useDashboardService() {
7094
6885
  const { env } = useEnv();
7095
- const readGroup = useCallback55(
6886
+ const readGroup = useCallback56(
7096
6887
  async ({
7097
6888
  service,
7098
6889
  xNode,
@@ -7109,7 +6900,7 @@ function useDashboardService() {
7109
6900
  },
7110
6901
  [env]
7111
6902
  );
7112
- const getDataChart = useCallback55(
6903
+ const getDataChart = useCallback56(
7113
6904
  async ({
7114
6905
  service,
7115
6906
  xNode,