@fctc/interface-logic 4.7.7 → 4.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/services.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/services/action-service/index.ts
2
- import { useCallback as useCallback46 } from "react";
2
+ import { useCallback as useCallback48 } from "react";
3
3
 
4
4
  // src/constants/api/uri-constant.ts
5
5
  var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
@@ -4787,6 +4787,84 @@ var deleteOrderLineSupabaseService = () => {
4787
4787
  };
4788
4788
  };
4789
4789
 
4790
+ // src/services/pos-service/supabase/add-category.ts
4791
+ import { useCallback as useCallback46 } from "react";
4792
+ var addCategorySupabaseService = () => {
4793
+ const supabase = useSupabaseOptional();
4794
+ const addCategorySupabase = useCallback46(
4795
+ async (values) => {
4796
+ if (!supabase) {
4797
+ console.error("Supabase client not initialized");
4798
+ return null;
4799
+ }
4800
+ try {
4801
+ const { data, error } = await supabase.from("pos_categories" /* POS_CATEGORIES */).insert({
4802
+ name: values.name
4803
+ }).select("id, name").single();
4804
+ if (error) {
4805
+ console.error("Error adding Category:", error);
4806
+ return null;
4807
+ }
4808
+ return [[data.id, data.name]];
4809
+ } catch (error) {
4810
+ console.error("Error adding Category:", error);
4811
+ return null;
4812
+ }
4813
+ },
4814
+ [supabase]
4815
+ );
4816
+ return {
4817
+ addCategorySupabase
4818
+ };
4819
+ };
4820
+
4821
+ // src/services/pos-service/supabase/add-product.ts
4822
+ import { useCallback as useCallback47 } from "react";
4823
+ var addProductSupabaseService = () => {
4824
+ const supabase = useSupabaseOptional();
4825
+ const addProductSupabase = useCallback47(
4826
+ async (values) => {
4827
+ if (!supabase) {
4828
+ console.error("Supabase client not initialized");
4829
+ return null;
4830
+ }
4831
+ const insertData = Object.fromEntries(
4832
+ Object.entries({
4833
+ name: values.name,
4834
+ product_tmpl_id: values.product_tmpl_id,
4835
+ product_template_variant_value_ids: values.product_template_variant_value_ids ?? [],
4836
+ combo_ids: values.combo_ids ?? [],
4837
+ categ_id: values.categ_id,
4838
+ pos_categ_ids: values.pos_categ_ids ?? [],
4839
+ display_name: values.display_name || values.name,
4840
+ default_code: values.default_code ?? "",
4841
+ description_sale: values.description_sale ?? "",
4842
+ lst_price: values.lst_price ?? 0,
4843
+ standard_price: values.standard_price ?? 0,
4844
+ barcode: values.barcode ?? "",
4845
+ image_url: values.image_url ?? "",
4846
+ active: values.active ?? true
4847
+ }).filter(([_, v]) => v !== void 0)
4848
+ );
4849
+ try {
4850
+ const { data, error } = await supabase.from("products" /* PRODUCTS */).insert(insertData).select("id, name").single();
4851
+ if (error) {
4852
+ console.error("Error adding product:", error);
4853
+ return null;
4854
+ }
4855
+ return [[data.id, data.name]];
4856
+ } catch (error) {
4857
+ console.error("Error adding product:", error);
4858
+ return null;
4859
+ }
4860
+ },
4861
+ [supabase]
4862
+ );
4863
+ return {
4864
+ addProductSupabase
4865
+ };
4866
+ };
4867
+
4790
4868
  // src/services/pos-service/index.ts
4791
4869
  var serviceFactories = [
4792
4870
  addEntityService,
@@ -4825,13 +4903,15 @@ var serviceFactories = [
4825
4903
  updateTableSupabaseService,
4826
4904
  deleteFloorSupabaseService,
4827
4905
  deleteTableSupabaseService,
4906
+ addCategorySupabaseService,
4828
4907
  createOrderSupabaseService,
4829
4908
  addProductToOrderSupabaseService,
4830
4909
  updateOrderTotalAmountSupabaseService,
4831
4910
  updateOrderLineSupabaseService,
4832
4911
  updateOrderSupabaseService,
4833
4912
  deleteOrderSupabaseService,
4834
- deleteOrderLineSupabaseService
4913
+ deleteOrderLineSupabaseService,
4914
+ addProductSupabaseService
4835
4915
  ];
4836
4916
  var usePosService = () => {
4837
4917
  const { env } = useEnv();
@@ -4951,24 +5031,30 @@ import { useMutation as useMutation93 } from "@tanstack/react-query";
4951
5031
  // src/hooks/pos/supabase/use-create-order.ts
4952
5032
  import { useMutation as useMutation94 } from "@tanstack/react-query";
4953
5033
 
4954
- // src/hooks/pos/supabase/use-add-product-to-order.ts
5034
+ // src/hooks/pos/supabase/use-add-category.ts
4955
5035
  import { useMutation as useMutation95 } from "@tanstack/react-query";
4956
5036
 
4957
- // src/hooks/pos/supabase/use-update-order-total-amount.ts
5037
+ // src/hooks/pos/supabase/use-add-product-to-order.ts
4958
5038
  import { useMutation as useMutation96 } from "@tanstack/react-query";
4959
5039
 
4960
- // src/hooks/pos/supabase/use-update-order-line.ts
5040
+ // src/hooks/pos/supabase/use-update-order-total-amount.ts
4961
5041
  import { useMutation as useMutation97 } from "@tanstack/react-query";
4962
5042
 
4963
- // src/hooks/pos/supabase/use-update-order.ts
5043
+ // src/hooks/pos/supabase/use-update-order-line.ts
4964
5044
  import { useMutation as useMutation98 } from "@tanstack/react-query";
4965
5045
 
4966
- // src/hooks/pos/supabase/use-delete-order.ts
5046
+ // src/hooks/pos/supabase/use-update-order.ts
4967
5047
  import { useMutation as useMutation99 } from "@tanstack/react-query";
4968
5048
 
4969
- // src/hooks/pos/supabase/use-delete-order-line.ts
5049
+ // src/hooks/pos/supabase/use-delete-order.ts
4970
5050
  import { useMutation as useMutation100 } from "@tanstack/react-query";
4971
5051
 
5052
+ // src/hooks/pos/supabase/use-delete-order-line.ts
5053
+ import { useMutation as useMutation101 } from "@tanstack/react-query";
5054
+
5055
+ // src/hooks/pos/supabase/use-add-product.ts
5056
+ import { useMutation as useMutation102 } from "@tanstack/react-query";
5057
+
4972
5058
  // src/provider/service-provider.tsx
4973
5059
  import { jsx as jsx7 } from "react/jsx-runtime";
4974
5060
  var ServiceContext = createContext3(null);
@@ -4980,7 +5066,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
4980
5066
  // src/services/action-service/index.ts
4981
5067
  function useActionService() {
4982
5068
  const { env } = useEnv();
4983
- const loadAction = useCallback46(
5069
+ const loadAction = useCallback48(
4984
5070
  async ({
4985
5071
  idAction,
4986
5072
  context,
@@ -5004,7 +5090,7 @@ function useActionService() {
5004
5090
  },
5005
5091
  [env]
5006
5092
  );
5007
- const callButton = useCallback46(
5093
+ const callButton = useCallback48(
5008
5094
  async ({
5009
5095
  model,
5010
5096
  ids = [],
@@ -5038,7 +5124,7 @@ function useActionService() {
5038
5124
  },
5039
5125
  [env]
5040
5126
  );
5041
- const removeRows = useCallback46(
5127
+ const removeRows = useCallback48(
5042
5128
  async ({
5043
5129
  model,
5044
5130
  ids,
@@ -5064,7 +5150,7 @@ function useActionService() {
5064
5150
  },
5065
5151
  [env]
5066
5152
  );
5067
- const duplicateRecord = useCallback46(
5153
+ const duplicateRecord = useCallback48(
5068
5154
  async ({
5069
5155
  model,
5070
5156
  id,
@@ -5090,7 +5176,7 @@ function useActionService() {
5090
5176
  },
5091
5177
  [env]
5092
5178
  );
5093
- const getPrintReportName = useCallback46(
5179
+ const getPrintReportName = useCallback48(
5094
5180
  async ({ id }) => {
5095
5181
  const jsonData = {
5096
5182
  model: "ir.actions.report",
@@ -5108,7 +5194,7 @@ function useActionService() {
5108
5194
  },
5109
5195
  [env]
5110
5196
  );
5111
- const print = useCallback46(
5197
+ const print = useCallback48(
5112
5198
  async ({ id, report, db }) => {
5113
5199
  const jsonData = {
5114
5200
  report,
@@ -5126,7 +5212,7 @@ function useActionService() {
5126
5212
  },
5127
5213
  [env]
5128
5214
  );
5129
- const runAction = useCallback46(
5215
+ const runAction = useCallback48(
5130
5216
  async ({
5131
5217
  idAction,
5132
5218
  context,
@@ -5153,7 +5239,7 @@ function useActionService() {
5153
5239
  },
5154
5240
  [env]
5155
5241
  );
5156
- const generateSerialNumber = useCallback46(
5242
+ const generateSerialNumber = useCallback48(
5157
5243
  async ({
5158
5244
  kwargs,
5159
5245
  context,
@@ -5191,11 +5277,11 @@ function useActionService() {
5191
5277
  }
5192
5278
 
5193
5279
  // src/services/auth-service/index.ts
5194
- import { useCallback as useCallback47 } from "react";
5280
+ import { useCallback as useCallback49 } from "react";
5195
5281
  function useAuthService() {
5196
5282
  const { env } = useEnv();
5197
5283
  const supabase = useSupabaseOptional();
5198
- const login = useCallback47(
5284
+ const login = useCallback49(
5199
5285
  async (body) => {
5200
5286
  const payload = Object.fromEntries(
5201
5287
  Object.entries({
@@ -5220,7 +5306,7 @@ function useAuthService() {
5220
5306
  },
5221
5307
  [env]
5222
5308
  );
5223
- const loginSupabase = useCallback47(
5309
+ const loginSupabase = useCallback49(
5224
5310
  async (body) => {
5225
5311
  if (!supabase) {
5226
5312
  return {
@@ -5236,7 +5322,7 @@ function useAuthService() {
5236
5322
  },
5237
5323
  [supabase]
5238
5324
  );
5239
- const forgotPassword = useCallback47(
5325
+ const forgotPassword = useCallback49(
5240
5326
  async (email) => {
5241
5327
  const bodyData = {
5242
5328
  login: email,
@@ -5250,7 +5336,7 @@ function useAuthService() {
5250
5336
  },
5251
5337
  [env]
5252
5338
  );
5253
- const forgotPasswordSSO = useCallback47(
5339
+ const forgotPasswordSSO = useCallback49(
5254
5340
  async ({
5255
5341
  email,
5256
5342
  with_context,
@@ -5273,7 +5359,7 @@ function useAuthService() {
5273
5359
  },
5274
5360
  [env]
5275
5361
  );
5276
- const resetPassword = useCallback47(
5362
+ const resetPassword = useCallback49(
5277
5363
  async (data, token) => {
5278
5364
  const bodyData = {
5279
5365
  token,
@@ -5288,7 +5374,7 @@ function useAuthService() {
5288
5374
  },
5289
5375
  [env]
5290
5376
  );
5291
- const resetPasswordSSO = useCallback47(
5377
+ const resetPasswordSSO = useCallback49(
5292
5378
  async ({
5293
5379
  method,
5294
5380
  password,
@@ -5311,7 +5397,7 @@ function useAuthService() {
5311
5397
  },
5312
5398
  [env]
5313
5399
  );
5314
- const updatePassword = useCallback47(
5400
+ const updatePassword = useCallback49(
5315
5401
  async (data, token) => {
5316
5402
  const bodyData = {
5317
5403
  token,
@@ -5326,7 +5412,7 @@ function useAuthService() {
5326
5412
  },
5327
5413
  [env]
5328
5414
  );
5329
- const isValidToken = useCallback47(
5415
+ const isValidToken = useCallback49(
5330
5416
  async (token) => {
5331
5417
  const bodyData = {
5332
5418
  token
@@ -5339,7 +5425,7 @@ function useAuthService() {
5339
5425
  },
5340
5426
  [env]
5341
5427
  );
5342
- const isValidActionToken = useCallback47(
5428
+ const isValidActionToken = useCallback49(
5343
5429
  async (actionToken) => {
5344
5430
  const bodyData = {};
5345
5431
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -5352,7 +5438,7 @@ function useAuthService() {
5352
5438
  },
5353
5439
  [env]
5354
5440
  );
5355
- const loginSocial = useCallback47(
5441
+ const loginSocial = useCallback49(
5356
5442
  async ({
5357
5443
  db,
5358
5444
  state,
@@ -5370,13 +5456,13 @@ function useAuthService() {
5370
5456
  },
5371
5457
  [env]
5372
5458
  );
5373
- const getProviders = useCallback47(
5459
+ const getProviders = useCallback49(
5374
5460
  async (db) => {
5375
5461
  return env?.requests?.get("/oauth/providers", { params: { db } });
5376
5462
  },
5377
5463
  [env]
5378
5464
  );
5379
- const getAccessByCode = useCallback47(
5465
+ const getAccessByCode = useCallback49(
5380
5466
  async (code) => {
5381
5467
  const data = new URLSearchParams();
5382
5468
  data.append("code", code);
@@ -5396,7 +5482,7 @@ function useAuthService() {
5396
5482
  },
5397
5483
  [env]
5398
5484
  );
5399
- const logout = useCallback47(
5485
+ const logout = useCallback49(
5400
5486
  async (service) => {
5401
5487
  return env?.requests?.post(
5402
5488
  "/logout" /* LOGOUT */,
@@ -5413,7 +5499,7 @@ function useAuthService() {
5413
5499
  },
5414
5500
  [env]
5415
5501
  );
5416
- const getTenantMapping = useCallback47(
5502
+ const getTenantMapping = useCallback49(
5417
5503
  async ({ shortName, service }) => {
5418
5504
  const bodyData = {
5419
5505
  short_name: shortName
@@ -5431,7 +5517,7 @@ function useAuthService() {
5431
5517
  },
5432
5518
  [env]
5433
5519
  );
5434
- const getToken = useCallback47(
5520
+ const getToken = useCallback49(
5435
5521
  async ({
5436
5522
  phone,
5437
5523
  name,
@@ -5476,10 +5562,10 @@ function useAuthService() {
5476
5562
  }
5477
5563
 
5478
5564
  // src/services/company-service/index.ts
5479
- import { useCallback as useCallback48 } from "react";
5565
+ import { useCallback as useCallback50 } from "react";
5480
5566
  function useCompanyService() {
5481
5567
  const { env } = useEnv();
5482
- const getCurrentCompany = useCallback48(
5568
+ const getCurrentCompany = useCallback50(
5483
5569
  async (service, extraHeaders) => {
5484
5570
  return await env.requests.get(
5485
5571
  "/company" /* COMPANY_PATH */,
@@ -5496,7 +5582,7 @@ function useCompanyService() {
5496
5582
  },
5497
5583
  [env]
5498
5584
  );
5499
- const getInfoCompany = useCallback48(
5585
+ const getInfoCompany = useCallback50(
5500
5586
  async (id, service) => {
5501
5587
  const jsonData = {
5502
5588
  ids: [id],
@@ -5532,10 +5618,10 @@ function useCompanyService() {
5532
5618
  }
5533
5619
 
5534
5620
  // src/services/excel-service/index.ts
5535
- import { useCallback as useCallback49 } from "react";
5621
+ import { useCallback as useCallback51 } from "react";
5536
5622
  function useExcelService() {
5537
5623
  const { env } = useEnv();
5538
- const uploadFileExcel = useCallback49(
5624
+ const uploadFileExcel = useCallback51(
5539
5625
  async ({
5540
5626
  formData,
5541
5627
  service,
@@ -5552,7 +5638,7 @@ function useExcelService() {
5552
5638
  },
5553
5639
  [env]
5554
5640
  );
5555
- const uploadIdFile = useCallback49(
5641
+ const uploadIdFile = useCallback51(
5556
5642
  async ({
5557
5643
  formData,
5558
5644
  service,
@@ -5569,7 +5655,7 @@ function useExcelService() {
5569
5655
  },
5570
5656
  [env]
5571
5657
  );
5572
- const parsePreview = useCallback49(
5658
+ const parsePreview = useCallback51(
5573
5659
  async ({
5574
5660
  id,
5575
5661
  selectedSheet,
@@ -5618,7 +5704,7 @@ function useExcelService() {
5618
5704
  },
5619
5705
  [env]
5620
5706
  );
5621
- const executeImport = useCallback49(
5707
+ const executeImport = useCallback51(
5622
5708
  async ({
5623
5709
  columns,
5624
5710
  fields,
@@ -5652,7 +5738,7 @@ function useExcelService() {
5652
5738
  },
5653
5739
  [env]
5654
5740
  );
5655
- const getFileExcel = useCallback49(
5741
+ const getFileExcel = useCallback51(
5656
5742
  async ({
5657
5743
  model,
5658
5744
  service,
@@ -5676,7 +5762,7 @@ function useExcelService() {
5676
5762
  },
5677
5763
  [env]
5678
5764
  );
5679
- const getFieldExport = useCallback49(
5765
+ const getFieldExport = useCallback51(
5680
5766
  async ({
5681
5767
  ids,
5682
5768
  model,
@@ -5716,7 +5802,7 @@ function useExcelService() {
5716
5802
  },
5717
5803
  [env]
5718
5804
  );
5719
- const exportExcel = useCallback49(
5805
+ const exportExcel = useCallback51(
5720
5806
  async ({
5721
5807
  model,
5722
5808
  domain,
@@ -5764,10 +5850,10 @@ function useExcelService() {
5764
5850
  }
5765
5851
 
5766
5852
  // src/services/form-service/index.ts
5767
- import { useCallback as useCallback50 } from "react";
5853
+ import { useCallback as useCallback52 } from "react";
5768
5854
  function useFormService() {
5769
5855
  const { env } = useEnv();
5770
- const getComment = useCallback50(
5856
+ const getComment = useCallback52(
5771
5857
  async ({ data }) => {
5772
5858
  const jsonData = {
5773
5859
  thread_id: data.thread_id,
@@ -5785,7 +5871,7 @@ function useFormService() {
5785
5871
  },
5786
5872
  [env]
5787
5873
  );
5788
- const getThreadData = useCallback50(
5874
+ const getThreadData = useCallback52(
5789
5875
  async ({
5790
5876
  data,
5791
5877
  xNode,
@@ -5812,7 +5898,7 @@ function useFormService() {
5812
5898
  },
5813
5899
  [env]
5814
5900
  );
5815
- const getThreadMessages = useCallback50(
5901
+ const getThreadMessages = useCallback52(
5816
5902
  async ({
5817
5903
  data,
5818
5904
  xNode,
@@ -5838,7 +5924,7 @@ function useFormService() {
5838
5924
  },
5839
5925
  [env]
5840
5926
  );
5841
- const sentComment = useCallback50(
5927
+ const sentComment = useCallback52(
5842
5928
  async ({ data }) => {
5843
5929
  const jsonData = {
5844
5930
  context: {
@@ -5866,7 +5952,7 @@ function useFormService() {
5866
5952
  },
5867
5953
  [env]
5868
5954
  );
5869
- const deleteComment = useCallback50(
5955
+ const deleteComment = useCallback52(
5870
5956
  async ({ data }) => {
5871
5957
  const jsonData = {
5872
5958
  attachment_ids: [],
@@ -5882,7 +5968,7 @@ function useFormService() {
5882
5968
  },
5883
5969
  [env]
5884
5970
  );
5885
- const getImage = useCallback50(
5971
+ const getImage = useCallback52(
5886
5972
  async ({ data }) => {
5887
5973
  return env.requests.get(
5888
5974
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -5895,7 +5981,7 @@ function useFormService() {
5895
5981
  },
5896
5982
  [env]
5897
5983
  );
5898
- const uploadImage = useCallback50(
5984
+ const uploadImage = useCallback52(
5899
5985
  async ({
5900
5986
  formData,
5901
5987
  service,
@@ -5914,7 +6000,7 @@ function useFormService() {
5914
6000
  },
5915
6001
  [env]
5916
6002
  );
5917
- const uploadFile = useCallback50(
6003
+ const uploadFile = useCallback52(
5918
6004
  async ({
5919
6005
  formData,
5920
6006
  service,
@@ -5934,7 +6020,7 @@ function useFormService() {
5934
6020
  },
5935
6021
  [env]
5936
6022
  );
5937
- const getFormView = useCallback50(
6023
+ const getFormView = useCallback52(
5938
6024
  async ({ data }) => {
5939
6025
  const jsonData = {
5940
6026
  model: data.model,
@@ -5950,7 +6036,7 @@ function useFormService() {
5950
6036
  },
5951
6037
  [env]
5952
6038
  );
5953
- const changeStatus = useCallback50(
6039
+ const changeStatus = useCallback52(
5954
6040
  async ({ data }) => {
5955
6041
  const vals = {
5956
6042
  [data.name]: data.stage_id
@@ -5979,7 +6065,7 @@ function useFormService() {
5979
6065
  },
5980
6066
  [env]
5981
6067
  );
5982
- const getExternalTab = useCallback50(
6068
+ const getExternalTab = useCallback52(
5983
6069
  async ({ method, context, service, xNode }) => {
5984
6070
  return env?.requests?.post(
5985
6071
  "/call" /* CALL_PATH */,
@@ -6014,10 +6100,10 @@ function useFormService() {
6014
6100
  }
6015
6101
 
6016
6102
  // src/services/kanban-service/index.ts
6017
- import { useCallback as useCallback51 } from "react";
6103
+ import { useCallback as useCallback53 } from "react";
6018
6104
  function useKanbanService() {
6019
6105
  const { env } = useEnv();
6020
- const getGroups = useCallback51(
6106
+ const getGroups = useCallback53(
6021
6107
  async ({ model, width_context }) => {
6022
6108
  const jsonData = {
6023
6109
  model,
@@ -6037,7 +6123,7 @@ function useKanbanService() {
6037
6123
  },
6038
6124
  [env]
6039
6125
  );
6040
- const getProgressBar = useCallback51(
6126
+ const getProgressBar = useCallback53(
6041
6127
  async ({ field, color, model, width_context }) => {
6042
6128
  const jsonData = {
6043
6129
  model,
@@ -6067,10 +6153,10 @@ function useKanbanService() {
6067
6153
  }
6068
6154
 
6069
6155
  // src/services/model-service/index.ts
6070
- import { useCallback as useCallback52 } from "react";
6156
+ import { useCallback as useCallback54 } from "react";
6071
6157
  function useModelService() {
6072
6158
  const { env } = useEnv();
6073
- const getListMyBankAccount = useCallback52(
6159
+ const getListMyBankAccount = useCallback54(
6074
6160
  async ({
6075
6161
  domain,
6076
6162
  spectification,
@@ -6094,7 +6180,7 @@ function useModelService() {
6094
6180
  },
6095
6181
  [env]
6096
6182
  );
6097
- const getCurrency = useCallback52(async () => {
6183
+ const getCurrency = useCallback54(async () => {
6098
6184
  const jsonData = {
6099
6185
  model: "res.currency",
6100
6186
  method: "web_search_read",
@@ -6114,7 +6200,7 @@ function useModelService() {
6114
6200
  }
6115
6201
  });
6116
6202
  }, [env]);
6117
- const getConversionRate = useCallback52(async () => {
6203
+ const getConversionRate = useCallback54(async () => {
6118
6204
  const jsonData = {
6119
6205
  model: "res.currency",
6120
6206
  method: "web_search_read",
@@ -6140,7 +6226,7 @@ function useModelService() {
6140
6226
  }
6141
6227
  });
6142
6228
  }, [env]);
6143
- const getAll = useCallback52(
6229
+ const getAll = useCallback54(
6144
6230
  async ({
6145
6231
  data,
6146
6232
  service,
@@ -6182,7 +6268,7 @@ function useModelService() {
6182
6268
  },
6183
6269
  [env]
6184
6270
  );
6185
- const getListCalendar = useCallback52(
6271
+ const getListCalendar = useCallback54(
6186
6272
  async ({ data }) => {
6187
6273
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
6188
6274
  fields: data.fields,
@@ -6213,7 +6299,7 @@ function useModelService() {
6213
6299
  },
6214
6300
  [env]
6215
6301
  );
6216
- const getList = useCallback52(
6302
+ const getList = useCallback54(
6217
6303
  async ({
6218
6304
  model,
6219
6305
  ids = [],
@@ -6245,7 +6331,7 @@ function useModelService() {
6245
6331
  },
6246
6332
  [env]
6247
6333
  );
6248
- const getDetail = useCallback52(
6334
+ const getDetail = useCallback54(
6249
6335
  async ({
6250
6336
  ids = [],
6251
6337
  model,
@@ -6277,7 +6363,7 @@ function useModelService() {
6277
6363
  },
6278
6364
  [env]
6279
6365
  );
6280
- const save = useCallback52(
6366
+ const save = useCallback54(
6281
6367
  async ({
6282
6368
  model,
6283
6369
  ids = [],
@@ -6312,7 +6398,7 @@ function useModelService() {
6312
6398
  },
6313
6399
  [env]
6314
6400
  );
6315
- const deleteApi = useCallback52(
6401
+ const deleteApi = useCallback54(
6316
6402
  async ({ ids = [], model, service }) => {
6317
6403
  const jsonData = {
6318
6404
  model,
@@ -6332,7 +6418,7 @@ function useModelService() {
6332
6418
  },
6333
6419
  [env]
6334
6420
  );
6335
- const onChange = useCallback52(
6421
+ const onChange = useCallback54(
6336
6422
  async ({
6337
6423
  ids = [],
6338
6424
  model,
@@ -6368,7 +6454,7 @@ function useModelService() {
6368
6454
  },
6369
6455
  [env]
6370
6456
  );
6371
- const getListFieldsOnchange = useCallback52(
6457
+ const getListFieldsOnchange = useCallback54(
6372
6458
  async ({
6373
6459
  model,
6374
6460
  service,
@@ -6392,7 +6478,7 @@ function useModelService() {
6392
6478
  },
6393
6479
  [env]
6394
6480
  );
6395
- const parseORMOdoo = useCallback52((data) => {
6481
+ const parseORMOdoo = useCallback54((data) => {
6396
6482
  for (const key in data) {
6397
6483
  if (key === "display_name") {
6398
6484
  delete data[key];
@@ -6403,7 +6489,7 @@ function useModelService() {
6403
6489
  }
6404
6490
  return { ...data };
6405
6491
  }, []);
6406
- const toDataJS = useCallback52(
6492
+ const toDataJS = useCallback54(
6407
6493
  (data, viewData, model) => {
6408
6494
  for (const key in data) {
6409
6495
  if (data[key] === false) {
@@ -6461,10 +6547,10 @@ function useModelService() {
6461
6547
  }
6462
6548
 
6463
6549
  // src/services/user-service/index.ts
6464
- import { useCallback as useCallback53 } from "react";
6550
+ import { useCallback as useCallback55 } from "react";
6465
6551
  function useUserService() {
6466
6552
  const { env } = useEnv();
6467
- const getProfile = useCallback53(
6553
+ const getProfile = useCallback55(
6468
6554
  async (service, path, extraHeaders) => {
6469
6555
  return env?.requests?.get(
6470
6556
  path || "/userinfo" /* PROFILE_PATH */,
@@ -6481,7 +6567,7 @@ function useUserService() {
6481
6567
  },
6482
6568
  [env]
6483
6569
  );
6484
- const getUser = useCallback53(
6570
+ const getUser = useCallback55(
6485
6571
  async ({ context, id }) => {
6486
6572
  const jsonData = {
6487
6573
  model: "res.users",
@@ -6519,7 +6605,7 @@ function useUserService() {
6519
6605
  },
6520
6606
  [env]
6521
6607
  );
6522
- const switchUserLocale = useCallback53(
6608
+ const switchUserLocale = useCallback55(
6523
6609
  async ({ id, values, service }) => {
6524
6610
  const jsonData = {
6525
6611
  model: "res.users",
@@ -6547,10 +6633,10 @@ function useUserService() {
6547
6633
  }
6548
6634
 
6549
6635
  // src/services/view-service/index.ts
6550
- import { useCallback as useCallback54 } from "react";
6636
+ import { useCallback as useCallback56 } from "react";
6551
6637
  function useViewService() {
6552
6638
  const { env } = useEnv();
6553
- const getView = useCallback54(
6639
+ const getView = useCallback56(
6554
6640
  async ({
6555
6641
  model,
6556
6642
  views,
@@ -6590,7 +6676,7 @@ function useViewService() {
6590
6676
  },
6591
6677
  [env]
6592
6678
  );
6593
- const getMenu = useCallback54(
6679
+ const getMenu = useCallback56(
6594
6680
  async (context, specification, domain, service) => {
6595
6681
  const jsonData = {
6596
6682
  model: "ir.ui.menu" /* MENU */,
@@ -6621,7 +6707,7 @@ function useViewService() {
6621
6707
  },
6622
6708
  [env]
6623
6709
  );
6624
- const getActionDetail = useCallback54(
6710
+ const getActionDetail = useCallback56(
6625
6711
  async (aid, context) => {
6626
6712
  const jsonData = {
6627
6713
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -6651,7 +6737,7 @@ function useViewService() {
6651
6737
  },
6652
6738
  [env]
6653
6739
  );
6654
- const getResequence = useCallback54(
6740
+ const getResequence = useCallback56(
6655
6741
  async ({
6656
6742
  model,
6657
6743
  ids,
@@ -6681,7 +6767,7 @@ function useViewService() {
6681
6767
  },
6682
6768
  [env]
6683
6769
  );
6684
- const getSelectionItem = useCallback54(
6770
+ const getSelectionItem = useCallback56(
6685
6771
  async ({
6686
6772
  data,
6687
6773
  service,
@@ -6718,7 +6804,7 @@ function useViewService() {
6718
6804
  },
6719
6805
  [env]
6720
6806
  );
6721
- const loadMessages = useCallback54(async () => {
6807
+ const loadMessages = useCallback56(async () => {
6722
6808
  return env.requests.post(
6723
6809
  "/load_message_failures" /* LOAD_MESSAGE */,
6724
6810
  {},
@@ -6729,14 +6815,14 @@ function useViewService() {
6729
6815
  }
6730
6816
  );
6731
6817
  }, [env]);
6732
- const getVersion = useCallback54(async () => {
6818
+ const getVersion = useCallback56(async () => {
6733
6819
  return env?.requests?.get("", {
6734
6820
  headers: {
6735
6821
  "Content-Type": "application/json"
6736
6822
  }
6737
6823
  });
6738
6824
  }, [env]);
6739
- const grantAccess = useCallback54(
6825
+ const grantAccess = useCallback56(
6740
6826
  async ({
6741
6827
  redirect_uri,
6742
6828
  state,
@@ -6763,7 +6849,7 @@ function useViewService() {
6763
6849
  },
6764
6850
  [env]
6765
6851
  );
6766
- const removeTotpSetUp = useCallback54(
6852
+ const removeTotpSetUp = useCallback56(
6767
6853
  async ({ method, token }) => {
6768
6854
  const jsonData = {
6769
6855
  method,
@@ -6784,7 +6870,7 @@ function useViewService() {
6784
6870
  },
6785
6871
  [env]
6786
6872
  );
6787
- const requestSetupTotp = useCallback54(
6873
+ const requestSetupTotp = useCallback56(
6788
6874
  async ({ method, token }) => {
6789
6875
  const jsonData = {
6790
6876
  method,
@@ -6803,7 +6889,7 @@ function useViewService() {
6803
6889
  },
6804
6890
  [env]
6805
6891
  );
6806
- const settingsWebRead2fa = useCallback54(
6892
+ const settingsWebRead2fa = useCallback56(
6807
6893
  async ({
6808
6894
  method,
6809
6895
  model,
@@ -6831,7 +6917,7 @@ function useViewService() {
6831
6917
  },
6832
6918
  [env]
6833
6919
  );
6834
- const signInSSO = useCallback54(
6920
+ const signInSSO = useCallback56(
6835
6921
  async ({
6836
6922
  redirect_uri,
6837
6923
  state,
@@ -6863,7 +6949,7 @@ function useViewService() {
6863
6949
  },
6864
6950
  [env]
6865
6951
  );
6866
- const verify2FA = useCallback54(
6952
+ const verify2FA = useCallback56(
6867
6953
  ({
6868
6954
  method,
6869
6955
  with_context,
@@ -6896,7 +6982,7 @@ function useViewService() {
6896
6982
  },
6897
6983
  [env]
6898
6984
  );
6899
- const get2FAMethods = useCallback54(
6985
+ const get2FAMethods = useCallback56(
6900
6986
  ({ method, with_context }) => {
6901
6987
  const jsonData = {
6902
6988
  method,
@@ -6915,7 +7001,7 @@ function useViewService() {
6915
7001
  },
6916
7002
  [env]
6917
7003
  );
6918
- const verifyTotp = useCallback54(
7004
+ const verifyTotp = useCallback56(
6919
7005
  ({
6920
7006
  method,
6921
7007
  action_token,
@@ -6940,7 +7026,7 @@ function useViewService() {
6940
7026
  },
6941
7027
  [env]
6942
7028
  );
6943
- const getNotifications = useCallback54(
7029
+ const getNotifications = useCallback56(
6944
7030
  async ({
6945
7031
  service,
6946
7032
  xNode,
@@ -6960,7 +7046,7 @@ function useViewService() {
6960
7046
  },
6961
7047
  [env]
6962
7048
  );
6963
- const getCountry = useCallback54(
7049
+ const getCountry = useCallback56(
6964
7050
  async ({
6965
7051
  service,
6966
7052
  xNode,
@@ -6987,7 +7073,7 @@ function useViewService() {
6987
7073
  },
6988
7074
  [env]
6989
7075
  );
6990
- const getCity = useCallback54(
7076
+ const getCity = useCallback56(
6991
7077
  async ({
6992
7078
  service,
6993
7079
  xNode,
@@ -7014,7 +7100,7 @@ function useViewService() {
7014
7100
  },
7015
7101
  [env]
7016
7102
  );
7017
- const getWard = useCallback54(
7103
+ const getWard = useCallback56(
7018
7104
  async ({
7019
7105
  service,
7020
7106
  xNode,
@@ -7039,7 +7125,7 @@ function useViewService() {
7039
7125
  },
7040
7126
  [env]
7041
7127
  );
7042
- const getPartnerTitle = useCallback54(
7128
+ const getPartnerTitle = useCallback56(
7043
7129
  async ({
7044
7130
  service,
7045
7131
  xNode,
@@ -7091,10 +7177,10 @@ function useViewService() {
7091
7177
  }
7092
7178
 
7093
7179
  // src/services/dashboard-service/index.ts
7094
- import { useCallback as useCallback55 } from "react";
7180
+ import { useCallback as useCallback57 } from "react";
7095
7181
  function useDashboardService() {
7096
7182
  const { env } = useEnv();
7097
- const readGroup = useCallback55(
7183
+ const readGroup = useCallback57(
7098
7184
  async ({
7099
7185
  service,
7100
7186
  xNode,
@@ -7111,7 +7197,7 @@ function useDashboardService() {
7111
7197
  },
7112
7198
  [env]
7113
7199
  );
7114
- const getDataChart = useCallback55(
7200
+ const getDataChart = useCallback57(
7115
7201
  async ({
7116
7202
  service,
7117
7203
  xNode,