@fctc/interface-logic 4.7.4 → 4.7.6

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