@fctc/interface-logic 4.7.4 → 4.7.5

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