@fctc/interface-logic 4.7.1 → 4.7.3

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,54 +4547,241 @@ 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
+ };
4550
4585
 
4551
4586
  // src/services/pos-service/supabase/add-product-to-order.ts
4552
4587
  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
+ };
4553
4625
 
4554
4626
  // src/services/pos-service/supabase/update-order-total-amount.ts
4555
4627
  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
+ };
4556
4658
 
4557
4659
  // src/services/pos-service/supabase/update-order-line.ts
4558
4660
  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
+ };
4559
4693
 
4560
4694
  // src/services/pos-service/supabase/update-order.ts
4561
4695
  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
+ };
4562
4729
 
4563
4730
  // src/services/pos-service/supabase/delete-order.ts
4564
4731
  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
+ };
4565
4758
 
4566
4759
  // src/services/pos-service/supabase/delete-order-line.ts
4567
4760
  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 = () => {
4761
+ var deleteOrderLineSupabaseService = () => {
4572
4762
  const supabase = useSupabaseOptional();
4573
- const addCategorySupabase = useCallback46(
4763
+ const deleteOrderLineSupabase = useCallback45(
4574
4764
  async (values) => {
4575
4765
  if (!supabase) {
4576
4766
  console.error("Supabase client not initialized");
4577
- return null;
4767
+ return [];
4578
4768
  }
4579
4769
  try {
4580
- const { data, error } = await supabase.from("pos_categories" /* POS_CATEGORIES */).insert({
4581
- name: values.name,
4582
- id: values.id
4583
- }).select("id, name").single();
4770
+ const { error, data } = await supabase.from("order_line" /* ORDER_LINE */).delete().eq("id", values.line_id).select("id").single();
4584
4771
  if (error) {
4585
- console.error("Error adding Category:", error);
4586
- return null;
4772
+ console.error("Error deleting order line:", error);
4773
+ return [];
4587
4774
  }
4588
- return [[data.id, data.name]];
4775
+ return [data.id];
4589
4776
  } catch (error) {
4590
- console.error("Error adding Category:", error);
4591
- return null;
4777
+ console.error("Error deleting order line:", error);
4778
+ return [];
4592
4779
  }
4593
4780
  },
4594
4781
  [supabase]
4595
4782
  );
4596
4783
  return {
4597
- addCategorySupabase
4784
+ deleteOrderLineSupabase
4598
4785
  };
4599
4786
  };
4600
4787
 
@@ -4636,7 +4823,13 @@ var serviceFactories = [
4636
4823
  updateTableSupabaseService,
4637
4824
  deleteFloorSupabaseService,
4638
4825
  deleteTableSupabaseService,
4639
- addCategorySupabaseService
4826
+ createOrderSupabaseService,
4827
+ addProductToOrderSupabaseService,
4828
+ updateOrderTotalAmountSupabaseService,
4829
+ updateOrderLineSupabaseService,
4830
+ updateOrderSupabaseService,
4831
+ deleteOrderSupabaseService,
4832
+ deleteOrderLineSupabaseService
4640
4833
  ];
4641
4834
  var usePosService = () => {
4642
4835
  const { env } = useEnv();
@@ -4756,9 +4949,24 @@ import { useMutation as useMutation93 } from "@tanstack/react-query";
4756
4949
  // src/hooks/pos/supabase/use-create-order.ts
4757
4950
  import { useMutation as useMutation94 } from "@tanstack/react-query";
4758
4951
 
4759
- // src/hooks/pos/supabase/use-add-category.ts
4952
+ // src/hooks/pos/supabase/use-add-product-to-order.ts
4760
4953
  import { useMutation as useMutation95 } from "@tanstack/react-query";
4761
4954
 
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
+
4762
4970
  // src/provider/service-provider.tsx
4763
4971
  import { jsx as jsx7 } from "react/jsx-runtime";
4764
4972
  var ServiceContext = createContext3(null);
@@ -4770,7 +4978,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
4770
4978
  // src/services/action-service/index.ts
4771
4979
  function useActionService() {
4772
4980
  const { env } = useEnv();
4773
- const loadAction = useCallback47(
4981
+ const loadAction = useCallback46(
4774
4982
  async ({
4775
4983
  idAction,
4776
4984
  context,
@@ -4794,7 +5002,7 @@ function useActionService() {
4794
5002
  },
4795
5003
  [env]
4796
5004
  );
4797
- const callButton = useCallback47(
5005
+ const callButton = useCallback46(
4798
5006
  async ({
4799
5007
  model,
4800
5008
  ids = [],
@@ -4828,7 +5036,7 @@ function useActionService() {
4828
5036
  },
4829
5037
  [env]
4830
5038
  );
4831
- const removeRows = useCallback47(
5039
+ const removeRows = useCallback46(
4832
5040
  async ({
4833
5041
  model,
4834
5042
  ids,
@@ -4854,7 +5062,7 @@ function useActionService() {
4854
5062
  },
4855
5063
  [env]
4856
5064
  );
4857
- const duplicateRecord = useCallback47(
5065
+ const duplicateRecord = useCallback46(
4858
5066
  async ({
4859
5067
  model,
4860
5068
  id,
@@ -4880,7 +5088,7 @@ function useActionService() {
4880
5088
  },
4881
5089
  [env]
4882
5090
  );
4883
- const getPrintReportName = useCallback47(
5091
+ const getPrintReportName = useCallback46(
4884
5092
  async ({ id }) => {
4885
5093
  const jsonData = {
4886
5094
  model: "ir.actions.report",
@@ -4898,7 +5106,7 @@ function useActionService() {
4898
5106
  },
4899
5107
  [env]
4900
5108
  );
4901
- const print = useCallback47(
5109
+ const print = useCallback46(
4902
5110
  async ({ id, report, db }) => {
4903
5111
  const jsonData = {
4904
5112
  report,
@@ -4916,7 +5124,7 @@ function useActionService() {
4916
5124
  },
4917
5125
  [env]
4918
5126
  );
4919
- const runAction = useCallback47(
5127
+ const runAction = useCallback46(
4920
5128
  async ({
4921
5129
  idAction,
4922
5130
  context,
@@ -4943,7 +5151,7 @@ function useActionService() {
4943
5151
  },
4944
5152
  [env]
4945
5153
  );
4946
- const generateSerialNumber = useCallback47(
5154
+ const generateSerialNumber = useCallback46(
4947
5155
  async ({
4948
5156
  kwargs,
4949
5157
  context,
@@ -4981,11 +5189,11 @@ function useActionService() {
4981
5189
  }
4982
5190
 
4983
5191
  // src/services/auth-service/index.ts
4984
- import { useCallback as useCallback48 } from "react";
5192
+ import { useCallback as useCallback47 } from "react";
4985
5193
  function useAuthService() {
4986
5194
  const { env } = useEnv();
4987
5195
  const supabase = useSupabaseOptional();
4988
- const login = useCallback48(
5196
+ const login = useCallback47(
4989
5197
  async (body) => {
4990
5198
  const payload = Object.fromEntries(
4991
5199
  Object.entries({
@@ -5010,7 +5218,7 @@ function useAuthService() {
5010
5218
  },
5011
5219
  [env]
5012
5220
  );
5013
- const loginSupabase = useCallback48(
5221
+ const loginSupabase = useCallback47(
5014
5222
  async (body) => {
5015
5223
  if (!supabase) {
5016
5224
  return {
@@ -5026,7 +5234,7 @@ function useAuthService() {
5026
5234
  },
5027
5235
  [supabase]
5028
5236
  );
5029
- const forgotPassword = useCallback48(
5237
+ const forgotPassword = useCallback47(
5030
5238
  async (email) => {
5031
5239
  const bodyData = {
5032
5240
  login: email,
@@ -5040,7 +5248,7 @@ function useAuthService() {
5040
5248
  },
5041
5249
  [env]
5042
5250
  );
5043
- const forgotPasswordSSO = useCallback48(
5251
+ const forgotPasswordSSO = useCallback47(
5044
5252
  async ({
5045
5253
  email,
5046
5254
  with_context,
@@ -5063,7 +5271,7 @@ function useAuthService() {
5063
5271
  },
5064
5272
  [env]
5065
5273
  );
5066
- const resetPassword = useCallback48(
5274
+ const resetPassword = useCallback47(
5067
5275
  async (data, token) => {
5068
5276
  const bodyData = {
5069
5277
  token,
@@ -5078,7 +5286,7 @@ function useAuthService() {
5078
5286
  },
5079
5287
  [env]
5080
5288
  );
5081
- const resetPasswordSSO = useCallback48(
5289
+ const resetPasswordSSO = useCallback47(
5082
5290
  async ({
5083
5291
  method,
5084
5292
  password,
@@ -5101,7 +5309,7 @@ function useAuthService() {
5101
5309
  },
5102
5310
  [env]
5103
5311
  );
5104
- const updatePassword = useCallback48(
5312
+ const updatePassword = useCallback47(
5105
5313
  async (data, token) => {
5106
5314
  const bodyData = {
5107
5315
  token,
@@ -5116,7 +5324,7 @@ function useAuthService() {
5116
5324
  },
5117
5325
  [env]
5118
5326
  );
5119
- const isValidToken = useCallback48(
5327
+ const isValidToken = useCallback47(
5120
5328
  async (token) => {
5121
5329
  const bodyData = {
5122
5330
  token
@@ -5129,7 +5337,7 @@ function useAuthService() {
5129
5337
  },
5130
5338
  [env]
5131
5339
  );
5132
- const isValidActionToken = useCallback48(
5340
+ const isValidActionToken = useCallback47(
5133
5341
  async (actionToken) => {
5134
5342
  const bodyData = {};
5135
5343
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -5142,7 +5350,7 @@ function useAuthService() {
5142
5350
  },
5143
5351
  [env]
5144
5352
  );
5145
- const loginSocial = useCallback48(
5353
+ const loginSocial = useCallback47(
5146
5354
  async ({
5147
5355
  db,
5148
5356
  state,
@@ -5160,13 +5368,13 @@ function useAuthService() {
5160
5368
  },
5161
5369
  [env]
5162
5370
  );
5163
- const getProviders = useCallback48(
5371
+ const getProviders = useCallback47(
5164
5372
  async (db) => {
5165
5373
  return env?.requests?.get("/oauth/providers", { params: { db } });
5166
5374
  },
5167
5375
  [env]
5168
5376
  );
5169
- const getAccessByCode = useCallback48(
5377
+ const getAccessByCode = useCallback47(
5170
5378
  async (code) => {
5171
5379
  const data = new URLSearchParams();
5172
5380
  data.append("code", code);
@@ -5186,7 +5394,7 @@ function useAuthService() {
5186
5394
  },
5187
5395
  [env]
5188
5396
  );
5189
- const logout = useCallback48(
5397
+ const logout = useCallback47(
5190
5398
  async (service) => {
5191
5399
  return env?.requests?.post(
5192
5400
  "/logout" /* LOGOUT */,
@@ -5203,7 +5411,7 @@ function useAuthService() {
5203
5411
  },
5204
5412
  [env]
5205
5413
  );
5206
- const getTenantMapping = useCallback48(
5414
+ const getTenantMapping = useCallback47(
5207
5415
  async ({ shortName, service }) => {
5208
5416
  const bodyData = {
5209
5417
  short_name: shortName
@@ -5221,7 +5429,7 @@ function useAuthService() {
5221
5429
  },
5222
5430
  [env]
5223
5431
  );
5224
- const getToken = useCallback48(
5432
+ const getToken = useCallback47(
5225
5433
  async ({
5226
5434
  phone,
5227
5435
  name,
@@ -5266,10 +5474,10 @@ function useAuthService() {
5266
5474
  }
5267
5475
 
5268
5476
  // src/services/company-service/index.ts
5269
- import { useCallback as useCallback49 } from "react";
5477
+ import { useCallback as useCallback48 } from "react";
5270
5478
  function useCompanyService() {
5271
5479
  const { env } = useEnv();
5272
- const getCurrentCompany = useCallback49(
5480
+ const getCurrentCompany = useCallback48(
5273
5481
  async (service, extraHeaders) => {
5274
5482
  return await env.requests.get(
5275
5483
  "/company" /* COMPANY_PATH */,
@@ -5286,7 +5494,7 @@ function useCompanyService() {
5286
5494
  },
5287
5495
  [env]
5288
5496
  );
5289
- const getInfoCompany = useCallback49(
5497
+ const getInfoCompany = useCallback48(
5290
5498
  async (id, service) => {
5291
5499
  const jsonData = {
5292
5500
  ids: [id],
@@ -5322,10 +5530,10 @@ function useCompanyService() {
5322
5530
  }
5323
5531
 
5324
5532
  // src/services/excel-service/index.ts
5325
- import { useCallback as useCallback50 } from "react";
5533
+ import { useCallback as useCallback49 } from "react";
5326
5534
  function useExcelService() {
5327
5535
  const { env } = useEnv();
5328
- const uploadFileExcel = useCallback50(
5536
+ const uploadFileExcel = useCallback49(
5329
5537
  async ({
5330
5538
  formData,
5331
5539
  service,
@@ -5342,7 +5550,7 @@ function useExcelService() {
5342
5550
  },
5343
5551
  [env]
5344
5552
  );
5345
- const uploadIdFile = useCallback50(
5553
+ const uploadIdFile = useCallback49(
5346
5554
  async ({
5347
5555
  formData,
5348
5556
  service,
@@ -5359,7 +5567,7 @@ function useExcelService() {
5359
5567
  },
5360
5568
  [env]
5361
5569
  );
5362
- const parsePreview = useCallback50(
5570
+ const parsePreview = useCallback49(
5363
5571
  async ({
5364
5572
  id,
5365
5573
  selectedSheet,
@@ -5408,7 +5616,7 @@ function useExcelService() {
5408
5616
  },
5409
5617
  [env]
5410
5618
  );
5411
- const executeImport = useCallback50(
5619
+ const executeImport = useCallback49(
5412
5620
  async ({
5413
5621
  columns,
5414
5622
  fields,
@@ -5442,7 +5650,7 @@ function useExcelService() {
5442
5650
  },
5443
5651
  [env]
5444
5652
  );
5445
- const getFileExcel = useCallback50(
5653
+ const getFileExcel = useCallback49(
5446
5654
  async ({
5447
5655
  model,
5448
5656
  service,
@@ -5466,7 +5674,7 @@ function useExcelService() {
5466
5674
  },
5467
5675
  [env]
5468
5676
  );
5469
- const getFieldExport = useCallback50(
5677
+ const getFieldExport = useCallback49(
5470
5678
  async ({
5471
5679
  ids,
5472
5680
  model,
@@ -5506,7 +5714,7 @@ function useExcelService() {
5506
5714
  },
5507
5715
  [env]
5508
5716
  );
5509
- const exportExcel = useCallback50(
5717
+ const exportExcel = useCallback49(
5510
5718
  async ({
5511
5719
  model,
5512
5720
  domain,
@@ -5554,10 +5762,10 @@ function useExcelService() {
5554
5762
  }
5555
5763
 
5556
5764
  // src/services/form-service/index.ts
5557
- import { useCallback as useCallback51 } from "react";
5765
+ import { useCallback as useCallback50 } from "react";
5558
5766
  function useFormService() {
5559
5767
  const { env } = useEnv();
5560
- const getComment = useCallback51(
5768
+ const getComment = useCallback50(
5561
5769
  async ({ data }) => {
5562
5770
  const jsonData = {
5563
5771
  thread_id: data.thread_id,
@@ -5575,7 +5783,7 @@ function useFormService() {
5575
5783
  },
5576
5784
  [env]
5577
5785
  );
5578
- const getThreadData = useCallback51(
5786
+ const getThreadData = useCallback50(
5579
5787
  async ({
5580
5788
  data,
5581
5789
  xNode,
@@ -5602,7 +5810,7 @@ function useFormService() {
5602
5810
  },
5603
5811
  [env]
5604
5812
  );
5605
- const getThreadMessages = useCallback51(
5813
+ const getThreadMessages = useCallback50(
5606
5814
  async ({
5607
5815
  data,
5608
5816
  xNode,
@@ -5628,7 +5836,7 @@ function useFormService() {
5628
5836
  },
5629
5837
  [env]
5630
5838
  );
5631
- const sentComment = useCallback51(
5839
+ const sentComment = useCallback50(
5632
5840
  async ({ data }) => {
5633
5841
  const jsonData = {
5634
5842
  context: {
@@ -5656,7 +5864,7 @@ function useFormService() {
5656
5864
  },
5657
5865
  [env]
5658
5866
  );
5659
- const deleteComment = useCallback51(
5867
+ const deleteComment = useCallback50(
5660
5868
  async ({ data }) => {
5661
5869
  const jsonData = {
5662
5870
  attachment_ids: [],
@@ -5672,7 +5880,7 @@ function useFormService() {
5672
5880
  },
5673
5881
  [env]
5674
5882
  );
5675
- const getImage = useCallback51(
5883
+ const getImage = useCallback50(
5676
5884
  async ({ data }) => {
5677
5885
  return env.requests.get(
5678
5886
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -5685,7 +5893,7 @@ function useFormService() {
5685
5893
  },
5686
5894
  [env]
5687
5895
  );
5688
- const uploadImage = useCallback51(
5896
+ const uploadImage = useCallback50(
5689
5897
  async ({
5690
5898
  formData,
5691
5899
  service,
@@ -5704,7 +5912,7 @@ function useFormService() {
5704
5912
  },
5705
5913
  [env]
5706
5914
  );
5707
- const uploadFile = useCallback51(
5915
+ const uploadFile = useCallback50(
5708
5916
  async ({
5709
5917
  formData,
5710
5918
  service,
@@ -5724,7 +5932,7 @@ function useFormService() {
5724
5932
  },
5725
5933
  [env]
5726
5934
  );
5727
- const getFormView = useCallback51(
5935
+ const getFormView = useCallback50(
5728
5936
  async ({ data }) => {
5729
5937
  const jsonData = {
5730
5938
  model: data.model,
@@ -5740,7 +5948,7 @@ function useFormService() {
5740
5948
  },
5741
5949
  [env]
5742
5950
  );
5743
- const changeStatus = useCallback51(
5951
+ const changeStatus = useCallback50(
5744
5952
  async ({ data }) => {
5745
5953
  const vals = {
5746
5954
  [data.name]: data.stage_id
@@ -5769,7 +5977,7 @@ function useFormService() {
5769
5977
  },
5770
5978
  [env]
5771
5979
  );
5772
- const getExternalTab = useCallback51(
5980
+ const getExternalTab = useCallback50(
5773
5981
  async ({ method, context, service, xNode }) => {
5774
5982
  return env?.requests?.post(
5775
5983
  "/call" /* CALL_PATH */,
@@ -5804,10 +6012,10 @@ function useFormService() {
5804
6012
  }
5805
6013
 
5806
6014
  // src/services/kanban-service/index.ts
5807
- import { useCallback as useCallback52 } from "react";
6015
+ import { useCallback as useCallback51 } from "react";
5808
6016
  function useKanbanService() {
5809
6017
  const { env } = useEnv();
5810
- const getGroups = useCallback52(
6018
+ const getGroups = useCallback51(
5811
6019
  async ({ model, width_context }) => {
5812
6020
  const jsonData = {
5813
6021
  model,
@@ -5827,7 +6035,7 @@ function useKanbanService() {
5827
6035
  },
5828
6036
  [env]
5829
6037
  );
5830
- const getProgressBar = useCallback52(
6038
+ const getProgressBar = useCallback51(
5831
6039
  async ({ field, color, model, width_context }) => {
5832
6040
  const jsonData = {
5833
6041
  model,
@@ -5857,10 +6065,10 @@ function useKanbanService() {
5857
6065
  }
5858
6066
 
5859
6067
  // src/services/model-service/index.ts
5860
- import { useCallback as useCallback53 } from "react";
6068
+ import { useCallback as useCallback52 } from "react";
5861
6069
  function useModelService() {
5862
6070
  const { env } = useEnv();
5863
- const getListMyBankAccount = useCallback53(
6071
+ const getListMyBankAccount = useCallback52(
5864
6072
  async ({
5865
6073
  domain,
5866
6074
  spectification,
@@ -5884,7 +6092,7 @@ function useModelService() {
5884
6092
  },
5885
6093
  [env]
5886
6094
  );
5887
- const getCurrency = useCallback53(async () => {
6095
+ const getCurrency = useCallback52(async () => {
5888
6096
  const jsonData = {
5889
6097
  model: "res.currency",
5890
6098
  method: "web_search_read",
@@ -5904,7 +6112,7 @@ function useModelService() {
5904
6112
  }
5905
6113
  });
5906
6114
  }, [env]);
5907
- const getConversionRate = useCallback53(async () => {
6115
+ const getConversionRate = useCallback52(async () => {
5908
6116
  const jsonData = {
5909
6117
  model: "res.currency",
5910
6118
  method: "web_search_read",
@@ -5930,7 +6138,7 @@ function useModelService() {
5930
6138
  }
5931
6139
  });
5932
6140
  }, [env]);
5933
- const getAll = useCallback53(
6141
+ const getAll = useCallback52(
5934
6142
  async ({
5935
6143
  data,
5936
6144
  service,
@@ -5972,7 +6180,7 @@ function useModelService() {
5972
6180
  },
5973
6181
  [env]
5974
6182
  );
5975
- const getListCalendar = useCallback53(
6183
+ const getListCalendar = useCallback52(
5976
6184
  async ({ data }) => {
5977
6185
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
5978
6186
  fields: data.fields,
@@ -6003,7 +6211,7 @@ function useModelService() {
6003
6211
  },
6004
6212
  [env]
6005
6213
  );
6006
- const getList = useCallback53(
6214
+ const getList = useCallback52(
6007
6215
  async ({
6008
6216
  model,
6009
6217
  ids = [],
@@ -6035,7 +6243,7 @@ function useModelService() {
6035
6243
  },
6036
6244
  [env]
6037
6245
  );
6038
- const getDetail = useCallback53(
6246
+ const getDetail = useCallback52(
6039
6247
  async ({
6040
6248
  ids = [],
6041
6249
  model,
@@ -6067,7 +6275,7 @@ function useModelService() {
6067
6275
  },
6068
6276
  [env]
6069
6277
  );
6070
- const save = useCallback53(
6278
+ const save = useCallback52(
6071
6279
  async ({
6072
6280
  model,
6073
6281
  ids = [],
@@ -6102,7 +6310,7 @@ function useModelService() {
6102
6310
  },
6103
6311
  [env]
6104
6312
  );
6105
- const deleteApi = useCallback53(
6313
+ const deleteApi = useCallback52(
6106
6314
  async ({ ids = [], model, service }) => {
6107
6315
  const jsonData = {
6108
6316
  model,
@@ -6122,7 +6330,7 @@ function useModelService() {
6122
6330
  },
6123
6331
  [env]
6124
6332
  );
6125
- const onChange = useCallback53(
6333
+ const onChange = useCallback52(
6126
6334
  async ({
6127
6335
  ids = [],
6128
6336
  model,
@@ -6158,7 +6366,7 @@ function useModelService() {
6158
6366
  },
6159
6367
  [env]
6160
6368
  );
6161
- const getListFieldsOnchange = useCallback53(
6369
+ const getListFieldsOnchange = useCallback52(
6162
6370
  async ({
6163
6371
  model,
6164
6372
  service,
@@ -6182,7 +6390,7 @@ function useModelService() {
6182
6390
  },
6183
6391
  [env]
6184
6392
  );
6185
- const parseORMOdoo = useCallback53((data) => {
6393
+ const parseORMOdoo = useCallback52((data) => {
6186
6394
  for (const key in data) {
6187
6395
  if (key === "display_name") {
6188
6396
  delete data[key];
@@ -6193,7 +6401,7 @@ function useModelService() {
6193
6401
  }
6194
6402
  return { ...data };
6195
6403
  }, []);
6196
- const toDataJS = useCallback53(
6404
+ const toDataJS = useCallback52(
6197
6405
  (data, viewData, model) => {
6198
6406
  for (const key in data) {
6199
6407
  if (data[key] === false) {
@@ -6251,10 +6459,10 @@ function useModelService() {
6251
6459
  }
6252
6460
 
6253
6461
  // src/services/user-service/index.ts
6254
- import { useCallback as useCallback54 } from "react";
6462
+ import { useCallback as useCallback53 } from "react";
6255
6463
  function useUserService() {
6256
6464
  const { env } = useEnv();
6257
- const getProfile = useCallback54(
6465
+ const getProfile = useCallback53(
6258
6466
  async (service, path, extraHeaders) => {
6259
6467
  return env?.requests?.get(
6260
6468
  path || "/userinfo" /* PROFILE_PATH */,
@@ -6271,7 +6479,7 @@ function useUserService() {
6271
6479
  },
6272
6480
  [env]
6273
6481
  );
6274
- const getUser = useCallback54(
6482
+ const getUser = useCallback53(
6275
6483
  async ({ context, id }) => {
6276
6484
  const jsonData = {
6277
6485
  model: "res.users",
@@ -6309,7 +6517,7 @@ function useUserService() {
6309
6517
  },
6310
6518
  [env]
6311
6519
  );
6312
- const switchUserLocale = useCallback54(
6520
+ const switchUserLocale = useCallback53(
6313
6521
  async ({ id, values, service }) => {
6314
6522
  const jsonData = {
6315
6523
  model: "res.users",
@@ -6337,10 +6545,10 @@ function useUserService() {
6337
6545
  }
6338
6546
 
6339
6547
  // src/services/view-service/index.ts
6340
- import { useCallback as useCallback55 } from "react";
6548
+ import { useCallback as useCallback54 } from "react";
6341
6549
  function useViewService() {
6342
6550
  const { env } = useEnv();
6343
- const getView = useCallback55(
6551
+ const getView = useCallback54(
6344
6552
  async ({
6345
6553
  model,
6346
6554
  views,
@@ -6380,7 +6588,7 @@ function useViewService() {
6380
6588
  },
6381
6589
  [env]
6382
6590
  );
6383
- const getMenu = useCallback55(
6591
+ const getMenu = useCallback54(
6384
6592
  async (context, specification, domain, service) => {
6385
6593
  const jsonData = {
6386
6594
  model: "ir.ui.menu" /* MENU */,
@@ -6411,7 +6619,7 @@ function useViewService() {
6411
6619
  },
6412
6620
  [env]
6413
6621
  );
6414
- const getActionDetail = useCallback55(
6622
+ const getActionDetail = useCallback54(
6415
6623
  async (aid, context) => {
6416
6624
  const jsonData = {
6417
6625
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -6441,7 +6649,7 @@ function useViewService() {
6441
6649
  },
6442
6650
  [env]
6443
6651
  );
6444
- const getResequence = useCallback55(
6652
+ const getResequence = useCallback54(
6445
6653
  async ({
6446
6654
  model,
6447
6655
  ids,
@@ -6471,7 +6679,7 @@ function useViewService() {
6471
6679
  },
6472
6680
  [env]
6473
6681
  );
6474
- const getSelectionItem = useCallback55(
6682
+ const getSelectionItem = useCallback54(
6475
6683
  async ({
6476
6684
  data,
6477
6685
  service,
@@ -6508,7 +6716,7 @@ function useViewService() {
6508
6716
  },
6509
6717
  [env]
6510
6718
  );
6511
- const loadMessages = useCallback55(async () => {
6719
+ const loadMessages = useCallback54(async () => {
6512
6720
  return env.requests.post(
6513
6721
  "/load_message_failures" /* LOAD_MESSAGE */,
6514
6722
  {},
@@ -6519,14 +6727,14 @@ function useViewService() {
6519
6727
  }
6520
6728
  );
6521
6729
  }, [env]);
6522
- const getVersion = useCallback55(async () => {
6730
+ const getVersion = useCallback54(async () => {
6523
6731
  return env?.requests?.get("", {
6524
6732
  headers: {
6525
6733
  "Content-Type": "application/json"
6526
6734
  }
6527
6735
  });
6528
6736
  }, [env]);
6529
- const grantAccess = useCallback55(
6737
+ const grantAccess = useCallback54(
6530
6738
  async ({
6531
6739
  redirect_uri,
6532
6740
  state,
@@ -6553,7 +6761,7 @@ function useViewService() {
6553
6761
  },
6554
6762
  [env]
6555
6763
  );
6556
- const removeTotpSetUp = useCallback55(
6764
+ const removeTotpSetUp = useCallback54(
6557
6765
  async ({ method, token }) => {
6558
6766
  const jsonData = {
6559
6767
  method,
@@ -6574,7 +6782,7 @@ function useViewService() {
6574
6782
  },
6575
6783
  [env]
6576
6784
  );
6577
- const requestSetupTotp = useCallback55(
6785
+ const requestSetupTotp = useCallback54(
6578
6786
  async ({ method, token }) => {
6579
6787
  const jsonData = {
6580
6788
  method,
@@ -6593,7 +6801,7 @@ function useViewService() {
6593
6801
  },
6594
6802
  [env]
6595
6803
  );
6596
- const settingsWebRead2fa = useCallback55(
6804
+ const settingsWebRead2fa = useCallback54(
6597
6805
  async ({
6598
6806
  method,
6599
6807
  model,
@@ -6621,7 +6829,7 @@ function useViewService() {
6621
6829
  },
6622
6830
  [env]
6623
6831
  );
6624
- const signInSSO = useCallback55(
6832
+ const signInSSO = useCallback54(
6625
6833
  async ({
6626
6834
  redirect_uri,
6627
6835
  state,
@@ -6653,7 +6861,7 @@ function useViewService() {
6653
6861
  },
6654
6862
  [env]
6655
6863
  );
6656
- const verify2FA = useCallback55(
6864
+ const verify2FA = useCallback54(
6657
6865
  ({
6658
6866
  method,
6659
6867
  with_context,
@@ -6686,7 +6894,7 @@ function useViewService() {
6686
6894
  },
6687
6895
  [env]
6688
6896
  );
6689
- const get2FAMethods = useCallback55(
6897
+ const get2FAMethods = useCallback54(
6690
6898
  ({ method, with_context }) => {
6691
6899
  const jsonData = {
6692
6900
  method,
@@ -6705,7 +6913,7 @@ function useViewService() {
6705
6913
  },
6706
6914
  [env]
6707
6915
  );
6708
- const verifyTotp = useCallback55(
6916
+ const verifyTotp = useCallback54(
6709
6917
  ({
6710
6918
  method,
6711
6919
  action_token,
@@ -6730,7 +6938,7 @@ function useViewService() {
6730
6938
  },
6731
6939
  [env]
6732
6940
  );
6733
- const getNotifications = useCallback55(
6941
+ const getNotifications = useCallback54(
6734
6942
  async ({
6735
6943
  service,
6736
6944
  xNode,
@@ -6750,7 +6958,7 @@ function useViewService() {
6750
6958
  },
6751
6959
  [env]
6752
6960
  );
6753
- const getCountry = useCallback55(
6961
+ const getCountry = useCallback54(
6754
6962
  async ({
6755
6963
  service,
6756
6964
  xNode,
@@ -6777,7 +6985,7 @@ function useViewService() {
6777
6985
  },
6778
6986
  [env]
6779
6987
  );
6780
- const getCity = useCallback55(
6988
+ const getCity = useCallback54(
6781
6989
  async ({
6782
6990
  service,
6783
6991
  xNode,
@@ -6804,7 +7012,7 @@ function useViewService() {
6804
7012
  },
6805
7013
  [env]
6806
7014
  );
6807
- const getWard = useCallback55(
7015
+ const getWard = useCallback54(
6808
7016
  async ({
6809
7017
  service,
6810
7018
  xNode,
@@ -6829,7 +7037,7 @@ function useViewService() {
6829
7037
  },
6830
7038
  [env]
6831
7039
  );
6832
- const getPartnerTitle = useCallback55(
7040
+ const getPartnerTitle = useCallback54(
6833
7041
  async ({
6834
7042
  service,
6835
7043
  xNode,
@@ -6881,10 +7089,10 @@ function useViewService() {
6881
7089
  }
6882
7090
 
6883
7091
  // src/services/dashboard-service/index.ts
6884
- import { useCallback as useCallback56 } from "react";
7092
+ import { useCallback as useCallback55 } from "react";
6885
7093
  function useDashboardService() {
6886
7094
  const { env } = useEnv();
6887
- const readGroup = useCallback56(
7095
+ const readGroup = useCallback55(
6888
7096
  async ({
6889
7097
  service,
6890
7098
  xNode,
@@ -6901,7 +7109,7 @@ function useDashboardService() {
6901
7109
  },
6902
7110
  [env]
6903
7111
  );
6904
- const getDataChart = useCallback56(
7112
+ const getDataChart = useCallback55(
6905
7113
  async ({
6906
7114
  service,
6907
7115
  xNode,