@fctc/interface-logic 4.8.0 → 4.8.1

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 useCallback49 } from "react";
2
+ import { useCallback as useCallback50 } from "react";
3
3
 
4
4
  // src/constants/api/uri-constant.ts
5
5
  var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
@@ -4581,7 +4581,6 @@ var createOrderSupabaseService = () => {
4581
4581
  }
4582
4582
  try {
4583
4583
  const { data, error } = await supabase.from("orders" /* ORDERS */).insert({
4584
- name: values.pos_reference,
4585
4584
  session_id: values.session_id,
4586
4585
  pos_reference: values.pos_reference,
4587
4586
  amount_tax: values.amount_tax,
@@ -4589,8 +4588,7 @@ var createOrderSupabaseService = () => {
4589
4588
  amount_paid: values.amount_paid,
4590
4589
  amount_return: values.amount_return,
4591
4590
  table_id: values.table_id,
4592
- partner_id: values.partner_id,
4593
- date_order: (/* @__PURE__ */ new Date()).toISOString()
4591
+ partner_id: values.partner_id
4594
4592
  }).select("id, pos_reference").single();
4595
4593
  if (error) {
4596
4594
  console.error("Error creating order:", error);
@@ -4728,12 +4726,10 @@ var updateOrderSupabaseService = () => {
4728
4726
  return [];
4729
4727
  }
4730
4728
  const { order_id, ...rest } = values;
4731
- const updateData = Object.fromEntries(
4732
- Object.entries({
4733
- ...rest,
4734
- updated_at: (/* @__PURE__ */ new Date()).toISOString()
4735
- }).filter(([_, v]) => v !== void 0)
4736
- );
4729
+ const updateData = cleanObject({
4730
+ ...rest,
4731
+ updated_at: (/* @__PURE__ */ new Date()).toISOString()
4732
+ });
4737
4733
  try {
4738
4734
  const { error, data } = await supabase.from("orders" /* ORDERS */).update(updateData).eq("id", order_id).select("id").single();
4739
4735
  if (error) {
@@ -4852,24 +4848,22 @@ var addProductSupabaseService = () => {
4852
4848
  console.error("Supabase client not initialized");
4853
4849
  return null;
4854
4850
  }
4855
- const insertData = Object.fromEntries(
4856
- Object.entries({
4857
- name: values.name,
4858
- product_tmpl_id: values.product_tmpl_id,
4859
- product_template_variant_value_ids: values.product_template_variant_value_ids ?? [],
4860
- combo_ids: values.combo_ids ?? [],
4861
- categ_id: values.categ_id,
4862
- pos_categ_ids: values.pos_categ_ids ?? [],
4863
- display_name: values.display_name || values.name,
4864
- default_code: values.default_code ?? "",
4865
- description_sale: values.description_sale ?? "",
4866
- lst_price: values.lst_price ?? 0,
4867
- standard_price: values.standard_price ?? 0,
4868
- barcode: values.barcode ?? "",
4869
- image_url: values.image_url ?? "",
4870
- active: values.active ?? true
4871
- }).filter(([_, v]) => v !== void 0)
4872
- );
4851
+ const insertData = cleanObject({
4852
+ name: values.name,
4853
+ product_tmpl_id: values.product_tmpl_id,
4854
+ product_template_variant_value_ids: values.product_template_variant_value_ids ?? [],
4855
+ combo_ids: values.combo_ids ?? [],
4856
+ categ_id: values.categ_id,
4857
+ pos_categ_ids: values.pos_categ_ids ?? [],
4858
+ display_name: values.display_name || values.name,
4859
+ default_code: values.default_code ?? "",
4860
+ description_sale: values.description_sale ?? "",
4861
+ lst_price: values.lst_price ?? 0,
4862
+ standard_price: values.standard_price ?? 0,
4863
+ barcode: values.barcode ?? "",
4864
+ image_url: values.image_url ?? "",
4865
+ active: values.active ?? true
4866
+ });
4873
4867
  try {
4874
4868
  const { data, error } = await supabase.from("products" /* PRODUCTS */).insert(insertData).select("id, name").single();
4875
4869
  if (error) {
@@ -4889,6 +4883,40 @@ var addProductSupabaseService = () => {
4889
4883
  };
4890
4884
  };
4891
4885
 
4886
+ // src/services/pos-service/supabase/add-payment-method.ts
4887
+ import { useCallback as useCallback49 } from "react";
4888
+ var addPaymentMethodSupabaseService = () => {
4889
+ const supabase = useSupabaseOptional();
4890
+ const addPaymentMethodSupabase = useCallback49(
4891
+ async (values) => {
4892
+ if (!supabase) {
4893
+ console.error("Supabase client not initialized");
4894
+ return null;
4895
+ }
4896
+ const { name, ...rest } = values;
4897
+ const insertData = cleanObject({
4898
+ name,
4899
+ ...rest
4900
+ });
4901
+ try {
4902
+ const { data, error } = await supabase.from("payment_methods" /* PAYMENT_METHODS */).insert(insertData).select("id, name").single();
4903
+ if (error) {
4904
+ console.error("Error adding payment method:", error);
4905
+ return null;
4906
+ }
4907
+ return [[data.id, data.name]];
4908
+ } catch (error) {
4909
+ console.error("Error adding payment method:", error);
4910
+ return null;
4911
+ }
4912
+ },
4913
+ [supabase]
4914
+ );
4915
+ return {
4916
+ addPaymentMethodSupabase
4917
+ };
4918
+ };
4919
+
4892
4920
  // src/services/pos-service/index.ts
4893
4921
  var serviceFactories = [
4894
4922
  addEntityService,
@@ -4936,7 +4964,8 @@ var serviceFactories = [
4936
4964
  deleteOrderSupabaseService,
4937
4965
  deleteOrderLineSupabaseService,
4938
4966
  addProductSupabaseService,
4939
- getFunctionalModulesService
4967
+ getFunctionalModulesService,
4968
+ addPaymentMethodSupabaseService
4940
4969
  ];
4941
4970
  var usePosService = () => {
4942
4971
  const { env } = useEnv();
@@ -5083,6 +5112,9 @@ import { useMutation as useMutation102 } from "@tanstack/react-query";
5083
5112
  // src/hooks/pos/use-get-functional-modules.ts
5084
5113
  import { useMutation as useMutation103 } from "@tanstack/react-query";
5085
5114
 
5115
+ // src/hooks/pos/supabase/use-add-payment-method.ts
5116
+ import { useMutation as useMutation104 } from "@tanstack/react-query";
5117
+
5086
5118
  // src/provider/service-provider.tsx
5087
5119
  import { jsx as jsx7 } from "react/jsx-runtime";
5088
5120
  var ServiceContext = createContext3(null);
@@ -5094,7 +5126,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
5094
5126
  // src/services/action-service/index.ts
5095
5127
  function useActionService() {
5096
5128
  const { env } = useEnv();
5097
- const loadAction = useCallback49(
5129
+ const loadAction = useCallback50(
5098
5130
  async ({
5099
5131
  idAction,
5100
5132
  context,
@@ -5118,7 +5150,7 @@ function useActionService() {
5118
5150
  },
5119
5151
  [env]
5120
5152
  );
5121
- const callButton = useCallback49(
5153
+ const callButton = useCallback50(
5122
5154
  async ({
5123
5155
  model,
5124
5156
  ids = [],
@@ -5152,7 +5184,7 @@ function useActionService() {
5152
5184
  },
5153
5185
  [env]
5154
5186
  );
5155
- const removeRows = useCallback49(
5187
+ const removeRows = useCallback50(
5156
5188
  async ({
5157
5189
  model,
5158
5190
  ids,
@@ -5178,7 +5210,7 @@ function useActionService() {
5178
5210
  },
5179
5211
  [env]
5180
5212
  );
5181
- const duplicateRecord = useCallback49(
5213
+ const duplicateRecord = useCallback50(
5182
5214
  async ({
5183
5215
  model,
5184
5216
  id,
@@ -5204,7 +5236,7 @@ function useActionService() {
5204
5236
  },
5205
5237
  [env]
5206
5238
  );
5207
- const getPrintReportName = useCallback49(
5239
+ const getPrintReportName = useCallback50(
5208
5240
  async ({ id }) => {
5209
5241
  const jsonData = {
5210
5242
  model: "ir.actions.report",
@@ -5222,7 +5254,7 @@ function useActionService() {
5222
5254
  },
5223
5255
  [env]
5224
5256
  );
5225
- const print = useCallback49(
5257
+ const print = useCallback50(
5226
5258
  async ({ id, report, db }) => {
5227
5259
  const jsonData = {
5228
5260
  report,
@@ -5240,7 +5272,7 @@ function useActionService() {
5240
5272
  },
5241
5273
  [env]
5242
5274
  );
5243
- const runAction = useCallback49(
5275
+ const runAction = useCallback50(
5244
5276
  async ({
5245
5277
  idAction,
5246
5278
  context,
@@ -5267,7 +5299,7 @@ function useActionService() {
5267
5299
  },
5268
5300
  [env]
5269
5301
  );
5270
- const generateSerialNumber = useCallback49(
5302
+ const generateSerialNumber = useCallback50(
5271
5303
  async ({
5272
5304
  kwargs,
5273
5305
  context,
@@ -5305,11 +5337,11 @@ function useActionService() {
5305
5337
  }
5306
5338
 
5307
5339
  // src/services/auth-service/index.ts
5308
- import { useCallback as useCallback50 } from "react";
5340
+ import { useCallback as useCallback51 } from "react";
5309
5341
  function useAuthService() {
5310
5342
  const { env } = useEnv();
5311
5343
  const supabase = useSupabaseOptional();
5312
- const login = useCallback50(
5344
+ const login = useCallback51(
5313
5345
  async (body) => {
5314
5346
  const payload = Object.fromEntries(
5315
5347
  Object.entries({
@@ -5334,7 +5366,7 @@ function useAuthService() {
5334
5366
  },
5335
5367
  [env]
5336
5368
  );
5337
- const loginSupabase = useCallback50(
5369
+ const loginSupabase = useCallback51(
5338
5370
  async (body) => {
5339
5371
  if (!supabase) {
5340
5372
  return {
@@ -5350,7 +5382,7 @@ function useAuthService() {
5350
5382
  },
5351
5383
  [supabase]
5352
5384
  );
5353
- const forgotPassword = useCallback50(
5385
+ const forgotPassword = useCallback51(
5354
5386
  async (email) => {
5355
5387
  const bodyData = {
5356
5388
  login: email,
@@ -5364,7 +5396,7 @@ function useAuthService() {
5364
5396
  },
5365
5397
  [env]
5366
5398
  );
5367
- const forgotPasswordSSO = useCallback50(
5399
+ const forgotPasswordSSO = useCallback51(
5368
5400
  async ({
5369
5401
  email,
5370
5402
  with_context,
@@ -5387,7 +5419,7 @@ function useAuthService() {
5387
5419
  },
5388
5420
  [env]
5389
5421
  );
5390
- const resetPassword = useCallback50(
5422
+ const resetPassword = useCallback51(
5391
5423
  async (data, token) => {
5392
5424
  const bodyData = {
5393
5425
  token,
@@ -5402,7 +5434,7 @@ function useAuthService() {
5402
5434
  },
5403
5435
  [env]
5404
5436
  );
5405
- const resetPasswordSSO = useCallback50(
5437
+ const resetPasswordSSO = useCallback51(
5406
5438
  async ({
5407
5439
  method,
5408
5440
  password,
@@ -5425,7 +5457,7 @@ function useAuthService() {
5425
5457
  },
5426
5458
  [env]
5427
5459
  );
5428
- const updatePassword = useCallback50(
5460
+ const updatePassword = useCallback51(
5429
5461
  async (data, token) => {
5430
5462
  const bodyData = {
5431
5463
  token,
@@ -5440,7 +5472,7 @@ function useAuthService() {
5440
5472
  },
5441
5473
  [env]
5442
5474
  );
5443
- const isValidToken = useCallback50(
5475
+ const isValidToken = useCallback51(
5444
5476
  async (token) => {
5445
5477
  const bodyData = {
5446
5478
  token
@@ -5453,7 +5485,7 @@ function useAuthService() {
5453
5485
  },
5454
5486
  [env]
5455
5487
  );
5456
- const isValidActionToken = useCallback50(
5488
+ const isValidActionToken = useCallback51(
5457
5489
  async (actionToken) => {
5458
5490
  const bodyData = {};
5459
5491
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -5466,7 +5498,7 @@ function useAuthService() {
5466
5498
  },
5467
5499
  [env]
5468
5500
  );
5469
- const loginSocial = useCallback50(
5501
+ const loginSocial = useCallback51(
5470
5502
  async ({
5471
5503
  db,
5472
5504
  state,
@@ -5484,13 +5516,13 @@ function useAuthService() {
5484
5516
  },
5485
5517
  [env]
5486
5518
  );
5487
- const getProviders = useCallback50(
5519
+ const getProviders = useCallback51(
5488
5520
  async (db) => {
5489
5521
  return env?.requests?.get("/oauth/providers", { params: { db } });
5490
5522
  },
5491
5523
  [env]
5492
5524
  );
5493
- const getAccessByCode = useCallback50(
5525
+ const getAccessByCode = useCallback51(
5494
5526
  async (code) => {
5495
5527
  const data = new URLSearchParams();
5496
5528
  data.append("code", code);
@@ -5510,7 +5542,7 @@ function useAuthService() {
5510
5542
  },
5511
5543
  [env]
5512
5544
  );
5513
- const logout = useCallback50(
5545
+ const logout = useCallback51(
5514
5546
  async (service) => {
5515
5547
  return env?.requests?.post(
5516
5548
  "/logout" /* LOGOUT */,
@@ -5527,7 +5559,7 @@ function useAuthService() {
5527
5559
  },
5528
5560
  [env]
5529
5561
  );
5530
- const getTenantMapping = useCallback50(
5562
+ const getTenantMapping = useCallback51(
5531
5563
  async ({ shortName, service }) => {
5532
5564
  const bodyData = {
5533
5565
  short_name: shortName
@@ -5545,7 +5577,7 @@ function useAuthService() {
5545
5577
  },
5546
5578
  [env]
5547
5579
  );
5548
- const getToken = useCallback50(
5580
+ const getToken = useCallback51(
5549
5581
  async ({
5550
5582
  phone,
5551
5583
  name,
@@ -5590,10 +5622,10 @@ function useAuthService() {
5590
5622
  }
5591
5623
 
5592
5624
  // src/services/company-service/index.ts
5593
- import { useCallback as useCallback51 } from "react";
5625
+ import { useCallback as useCallback52 } from "react";
5594
5626
  function useCompanyService() {
5595
5627
  const { env } = useEnv();
5596
- const getCurrentCompany = useCallback51(
5628
+ const getCurrentCompany = useCallback52(
5597
5629
  async (service, extraHeaders) => {
5598
5630
  return await env.requests.get(
5599
5631
  "/company" /* COMPANY_PATH */,
@@ -5610,7 +5642,7 @@ function useCompanyService() {
5610
5642
  },
5611
5643
  [env]
5612
5644
  );
5613
- const getInfoCompany = useCallback51(
5645
+ const getInfoCompany = useCallback52(
5614
5646
  async (id, service) => {
5615
5647
  const jsonData = {
5616
5648
  ids: [id],
@@ -5646,10 +5678,10 @@ function useCompanyService() {
5646
5678
  }
5647
5679
 
5648
5680
  // src/services/excel-service/index.ts
5649
- import { useCallback as useCallback52 } from "react";
5681
+ import { useCallback as useCallback53 } from "react";
5650
5682
  function useExcelService() {
5651
5683
  const { env } = useEnv();
5652
- const uploadFileExcel = useCallback52(
5684
+ const uploadFileExcel = useCallback53(
5653
5685
  async ({
5654
5686
  formData,
5655
5687
  service,
@@ -5666,7 +5698,7 @@ function useExcelService() {
5666
5698
  },
5667
5699
  [env]
5668
5700
  );
5669
- const uploadIdFile = useCallback52(
5701
+ const uploadIdFile = useCallback53(
5670
5702
  async ({
5671
5703
  formData,
5672
5704
  service,
@@ -5683,7 +5715,7 @@ function useExcelService() {
5683
5715
  },
5684
5716
  [env]
5685
5717
  );
5686
- const parsePreview = useCallback52(
5718
+ const parsePreview = useCallback53(
5687
5719
  async ({
5688
5720
  id,
5689
5721
  selectedSheet,
@@ -5732,7 +5764,7 @@ function useExcelService() {
5732
5764
  },
5733
5765
  [env]
5734
5766
  );
5735
- const executeImport = useCallback52(
5767
+ const executeImport = useCallback53(
5736
5768
  async ({
5737
5769
  columns,
5738
5770
  fields,
@@ -5766,7 +5798,7 @@ function useExcelService() {
5766
5798
  },
5767
5799
  [env]
5768
5800
  );
5769
- const getFileExcel = useCallback52(
5801
+ const getFileExcel = useCallback53(
5770
5802
  async ({
5771
5803
  model,
5772
5804
  service,
@@ -5790,7 +5822,7 @@ function useExcelService() {
5790
5822
  },
5791
5823
  [env]
5792
5824
  );
5793
- const getFieldExport = useCallback52(
5825
+ const getFieldExport = useCallback53(
5794
5826
  async ({
5795
5827
  ids,
5796
5828
  model,
@@ -5830,7 +5862,7 @@ function useExcelService() {
5830
5862
  },
5831
5863
  [env]
5832
5864
  );
5833
- const exportExcel = useCallback52(
5865
+ const exportExcel = useCallback53(
5834
5866
  async ({
5835
5867
  model,
5836
5868
  domain,
@@ -5878,10 +5910,10 @@ function useExcelService() {
5878
5910
  }
5879
5911
 
5880
5912
  // src/services/form-service/index.ts
5881
- import { useCallback as useCallback53 } from "react";
5913
+ import { useCallback as useCallback54 } from "react";
5882
5914
  function useFormService() {
5883
5915
  const { env } = useEnv();
5884
- const getComment = useCallback53(
5916
+ const getComment = useCallback54(
5885
5917
  async ({ data }) => {
5886
5918
  const jsonData = {
5887
5919
  thread_id: data.thread_id,
@@ -5899,7 +5931,7 @@ function useFormService() {
5899
5931
  },
5900
5932
  [env]
5901
5933
  );
5902
- const getThreadData = useCallback53(
5934
+ const getThreadData = useCallback54(
5903
5935
  async ({
5904
5936
  data,
5905
5937
  xNode,
@@ -5926,7 +5958,7 @@ function useFormService() {
5926
5958
  },
5927
5959
  [env]
5928
5960
  );
5929
- const getThreadMessages = useCallback53(
5961
+ const getThreadMessages = useCallback54(
5930
5962
  async ({
5931
5963
  data,
5932
5964
  xNode,
@@ -5952,7 +5984,7 @@ function useFormService() {
5952
5984
  },
5953
5985
  [env]
5954
5986
  );
5955
- const sentComment = useCallback53(
5987
+ const sentComment = useCallback54(
5956
5988
  async ({ data }) => {
5957
5989
  const jsonData = {
5958
5990
  context: {
@@ -5980,7 +6012,7 @@ function useFormService() {
5980
6012
  },
5981
6013
  [env]
5982
6014
  );
5983
- const deleteComment = useCallback53(
6015
+ const deleteComment = useCallback54(
5984
6016
  async ({ data }) => {
5985
6017
  const jsonData = {
5986
6018
  attachment_ids: [],
@@ -5996,7 +6028,7 @@ function useFormService() {
5996
6028
  },
5997
6029
  [env]
5998
6030
  );
5999
- const getImage = useCallback53(
6031
+ const getImage = useCallback54(
6000
6032
  async ({ data }) => {
6001
6033
  return env.requests.get(
6002
6034
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -6009,7 +6041,7 @@ function useFormService() {
6009
6041
  },
6010
6042
  [env]
6011
6043
  );
6012
- const uploadImage = useCallback53(
6044
+ const uploadImage = useCallback54(
6013
6045
  async ({
6014
6046
  formData,
6015
6047
  service,
@@ -6028,7 +6060,7 @@ function useFormService() {
6028
6060
  },
6029
6061
  [env]
6030
6062
  );
6031
- const uploadFile = useCallback53(
6063
+ const uploadFile = useCallback54(
6032
6064
  async ({
6033
6065
  formData,
6034
6066
  service,
@@ -6048,7 +6080,7 @@ function useFormService() {
6048
6080
  },
6049
6081
  [env]
6050
6082
  );
6051
- const getFormView = useCallback53(
6083
+ const getFormView = useCallback54(
6052
6084
  async ({ data }) => {
6053
6085
  const jsonData = {
6054
6086
  model: data.model,
@@ -6064,7 +6096,7 @@ function useFormService() {
6064
6096
  },
6065
6097
  [env]
6066
6098
  );
6067
- const changeStatus = useCallback53(
6099
+ const changeStatus = useCallback54(
6068
6100
  async ({ data }) => {
6069
6101
  const vals = {
6070
6102
  [data.name]: data.stage_id
@@ -6093,7 +6125,7 @@ function useFormService() {
6093
6125
  },
6094
6126
  [env]
6095
6127
  );
6096
- const getExternalTab = useCallback53(
6128
+ const getExternalTab = useCallback54(
6097
6129
  async ({ method, context, service, xNode }) => {
6098
6130
  return env?.requests?.post(
6099
6131
  "/call" /* CALL_PATH */,
@@ -6128,10 +6160,10 @@ function useFormService() {
6128
6160
  }
6129
6161
 
6130
6162
  // src/services/kanban-service/index.ts
6131
- import { useCallback as useCallback54 } from "react";
6163
+ import { useCallback as useCallback55 } from "react";
6132
6164
  function useKanbanService() {
6133
6165
  const { env } = useEnv();
6134
- const getGroups = useCallback54(
6166
+ const getGroups = useCallback55(
6135
6167
  async ({ model, width_context }) => {
6136
6168
  const jsonData = {
6137
6169
  model,
@@ -6151,7 +6183,7 @@ function useKanbanService() {
6151
6183
  },
6152
6184
  [env]
6153
6185
  );
6154
- const getProgressBar = useCallback54(
6186
+ const getProgressBar = useCallback55(
6155
6187
  async ({ field, color, model, width_context }) => {
6156
6188
  const jsonData = {
6157
6189
  model,
@@ -6181,10 +6213,10 @@ function useKanbanService() {
6181
6213
  }
6182
6214
 
6183
6215
  // src/services/model-service/index.ts
6184
- import { useCallback as useCallback55 } from "react";
6216
+ import { useCallback as useCallback56 } from "react";
6185
6217
  function useModelService() {
6186
6218
  const { env } = useEnv();
6187
- const getListMyBankAccount = useCallback55(
6219
+ const getListMyBankAccount = useCallback56(
6188
6220
  async ({
6189
6221
  domain,
6190
6222
  spectification,
@@ -6208,7 +6240,7 @@ function useModelService() {
6208
6240
  },
6209
6241
  [env]
6210
6242
  );
6211
- const getCurrency = useCallback55(async () => {
6243
+ const getCurrency = useCallback56(async () => {
6212
6244
  const jsonData = {
6213
6245
  model: "res.currency",
6214
6246
  method: "web_search_read",
@@ -6228,7 +6260,7 @@ function useModelService() {
6228
6260
  }
6229
6261
  });
6230
6262
  }, [env]);
6231
- const getConversionRate = useCallback55(async () => {
6263
+ const getConversionRate = useCallback56(async () => {
6232
6264
  const jsonData = {
6233
6265
  model: "res.currency",
6234
6266
  method: "web_search_read",
@@ -6254,7 +6286,7 @@ function useModelService() {
6254
6286
  }
6255
6287
  });
6256
6288
  }, [env]);
6257
- const getAll = useCallback55(
6289
+ const getAll = useCallback56(
6258
6290
  async ({
6259
6291
  data,
6260
6292
  service,
@@ -6296,7 +6328,7 @@ function useModelService() {
6296
6328
  },
6297
6329
  [env]
6298
6330
  );
6299
- const getListCalendar = useCallback55(
6331
+ const getListCalendar = useCallback56(
6300
6332
  async ({ data }) => {
6301
6333
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
6302
6334
  fields: data.fields,
@@ -6327,7 +6359,7 @@ function useModelService() {
6327
6359
  },
6328
6360
  [env]
6329
6361
  );
6330
- const getList = useCallback55(
6362
+ const getList = useCallback56(
6331
6363
  async ({
6332
6364
  model,
6333
6365
  ids = [],
@@ -6359,7 +6391,7 @@ function useModelService() {
6359
6391
  },
6360
6392
  [env]
6361
6393
  );
6362
- const getDetail = useCallback55(
6394
+ const getDetail = useCallback56(
6363
6395
  async ({
6364
6396
  ids = [],
6365
6397
  model,
@@ -6391,7 +6423,7 @@ function useModelService() {
6391
6423
  },
6392
6424
  [env]
6393
6425
  );
6394
- const save = useCallback55(
6426
+ const save = useCallback56(
6395
6427
  async ({
6396
6428
  model,
6397
6429
  ids = [],
@@ -6426,7 +6458,7 @@ function useModelService() {
6426
6458
  },
6427
6459
  [env]
6428
6460
  );
6429
- const deleteApi = useCallback55(
6461
+ const deleteApi = useCallback56(
6430
6462
  async ({ ids = [], model, service }) => {
6431
6463
  const jsonData = {
6432
6464
  model,
@@ -6446,7 +6478,7 @@ function useModelService() {
6446
6478
  },
6447
6479
  [env]
6448
6480
  );
6449
- const onChange = useCallback55(
6481
+ const onChange = useCallback56(
6450
6482
  async ({
6451
6483
  ids = [],
6452
6484
  model,
@@ -6482,7 +6514,7 @@ function useModelService() {
6482
6514
  },
6483
6515
  [env]
6484
6516
  );
6485
- const getListFieldsOnchange = useCallback55(
6517
+ const getListFieldsOnchange = useCallback56(
6486
6518
  async ({
6487
6519
  model,
6488
6520
  service,
@@ -6506,7 +6538,7 @@ function useModelService() {
6506
6538
  },
6507
6539
  [env]
6508
6540
  );
6509
- const parseORMOdoo = useCallback55((data) => {
6541
+ const parseORMOdoo = useCallback56((data) => {
6510
6542
  for (const key in data) {
6511
6543
  if (key === "display_name") {
6512
6544
  delete data[key];
@@ -6517,7 +6549,7 @@ function useModelService() {
6517
6549
  }
6518
6550
  return { ...data };
6519
6551
  }, []);
6520
- const toDataJS = useCallback55(
6552
+ const toDataJS = useCallback56(
6521
6553
  (data, viewData, model) => {
6522
6554
  for (const key in data) {
6523
6555
  if (data[key] === false) {
@@ -6575,10 +6607,10 @@ function useModelService() {
6575
6607
  }
6576
6608
 
6577
6609
  // src/services/user-service/index.ts
6578
- import { useCallback as useCallback56 } from "react";
6610
+ import { useCallback as useCallback57 } from "react";
6579
6611
  function useUserService() {
6580
6612
  const { env } = useEnv();
6581
- const getProfile = useCallback56(
6613
+ const getProfile = useCallback57(
6582
6614
  async (service, path, extraHeaders) => {
6583
6615
  return env?.requests?.get(
6584
6616
  path || "/userinfo" /* PROFILE_PATH */,
@@ -6595,7 +6627,7 @@ function useUserService() {
6595
6627
  },
6596
6628
  [env]
6597
6629
  );
6598
- const getUser = useCallback56(
6630
+ const getUser = useCallback57(
6599
6631
  async ({ context, id }) => {
6600
6632
  const jsonData = {
6601
6633
  model: "res.users",
@@ -6633,7 +6665,7 @@ function useUserService() {
6633
6665
  },
6634
6666
  [env]
6635
6667
  );
6636
- const switchUserLocale = useCallback56(
6668
+ const switchUserLocale = useCallback57(
6637
6669
  async ({ id, values, service }) => {
6638
6670
  const jsonData = {
6639
6671
  model: "res.users",
@@ -6661,10 +6693,10 @@ function useUserService() {
6661
6693
  }
6662
6694
 
6663
6695
  // src/services/view-service/index.ts
6664
- import { useCallback as useCallback57 } from "react";
6696
+ import { useCallback as useCallback58 } from "react";
6665
6697
  function useViewService() {
6666
6698
  const { env } = useEnv();
6667
- const getView = useCallback57(
6699
+ const getView = useCallback58(
6668
6700
  async ({
6669
6701
  model,
6670
6702
  views,
@@ -6704,7 +6736,7 @@ function useViewService() {
6704
6736
  },
6705
6737
  [env]
6706
6738
  );
6707
- const getMenu = useCallback57(
6739
+ const getMenu = useCallback58(
6708
6740
  async (context, specification, domain, service) => {
6709
6741
  const jsonData = {
6710
6742
  model: "ir.ui.menu" /* MENU */,
@@ -6735,7 +6767,7 @@ function useViewService() {
6735
6767
  },
6736
6768
  [env]
6737
6769
  );
6738
- const getActionDetail = useCallback57(
6770
+ const getActionDetail = useCallback58(
6739
6771
  async (aid, context) => {
6740
6772
  const jsonData = {
6741
6773
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -6765,7 +6797,7 @@ function useViewService() {
6765
6797
  },
6766
6798
  [env]
6767
6799
  );
6768
- const getResequence = useCallback57(
6800
+ const getResequence = useCallback58(
6769
6801
  async ({
6770
6802
  model,
6771
6803
  ids,
@@ -6795,7 +6827,7 @@ function useViewService() {
6795
6827
  },
6796
6828
  [env]
6797
6829
  );
6798
- const getSelectionItem = useCallback57(
6830
+ const getSelectionItem = useCallback58(
6799
6831
  async ({
6800
6832
  data,
6801
6833
  service,
@@ -6832,7 +6864,7 @@ function useViewService() {
6832
6864
  },
6833
6865
  [env]
6834
6866
  );
6835
- const loadMessages = useCallback57(async () => {
6867
+ const loadMessages = useCallback58(async () => {
6836
6868
  return env.requests.post(
6837
6869
  "/load_message_failures" /* LOAD_MESSAGE */,
6838
6870
  {},
@@ -6843,14 +6875,14 @@ function useViewService() {
6843
6875
  }
6844
6876
  );
6845
6877
  }, [env]);
6846
- const getVersion = useCallback57(async () => {
6878
+ const getVersion = useCallback58(async () => {
6847
6879
  return env?.requests?.get("", {
6848
6880
  headers: {
6849
6881
  "Content-Type": "application/json"
6850
6882
  }
6851
6883
  });
6852
6884
  }, [env]);
6853
- const grantAccess = useCallback57(
6885
+ const grantAccess = useCallback58(
6854
6886
  async ({
6855
6887
  redirect_uri,
6856
6888
  state,
@@ -6877,7 +6909,7 @@ function useViewService() {
6877
6909
  },
6878
6910
  [env]
6879
6911
  );
6880
- const removeTotpSetUp = useCallback57(
6912
+ const removeTotpSetUp = useCallback58(
6881
6913
  async ({ method, token }) => {
6882
6914
  const jsonData = {
6883
6915
  method,
@@ -6898,7 +6930,7 @@ function useViewService() {
6898
6930
  },
6899
6931
  [env]
6900
6932
  );
6901
- const requestSetupTotp = useCallback57(
6933
+ const requestSetupTotp = useCallback58(
6902
6934
  async ({ method, token }) => {
6903
6935
  const jsonData = {
6904
6936
  method,
@@ -6917,7 +6949,7 @@ function useViewService() {
6917
6949
  },
6918
6950
  [env]
6919
6951
  );
6920
- const settingsWebRead2fa = useCallback57(
6952
+ const settingsWebRead2fa = useCallback58(
6921
6953
  async ({
6922
6954
  method,
6923
6955
  model,
@@ -6945,7 +6977,7 @@ function useViewService() {
6945
6977
  },
6946
6978
  [env]
6947
6979
  );
6948
- const signInSSO = useCallback57(
6980
+ const signInSSO = useCallback58(
6949
6981
  async ({
6950
6982
  redirect_uri,
6951
6983
  state,
@@ -6977,7 +7009,7 @@ function useViewService() {
6977
7009
  },
6978
7010
  [env]
6979
7011
  );
6980
- const verify2FA = useCallback57(
7012
+ const verify2FA = useCallback58(
6981
7013
  ({
6982
7014
  method,
6983
7015
  with_context,
@@ -7010,7 +7042,7 @@ function useViewService() {
7010
7042
  },
7011
7043
  [env]
7012
7044
  );
7013
- const get2FAMethods = useCallback57(
7045
+ const get2FAMethods = useCallback58(
7014
7046
  ({ method, with_context }) => {
7015
7047
  const jsonData = {
7016
7048
  method,
@@ -7029,7 +7061,7 @@ function useViewService() {
7029
7061
  },
7030
7062
  [env]
7031
7063
  );
7032
- const verifyTotp = useCallback57(
7064
+ const verifyTotp = useCallback58(
7033
7065
  ({
7034
7066
  method,
7035
7067
  action_token,
@@ -7054,7 +7086,7 @@ function useViewService() {
7054
7086
  },
7055
7087
  [env]
7056
7088
  );
7057
- const getNotifications = useCallback57(
7089
+ const getNotifications = useCallback58(
7058
7090
  async ({
7059
7091
  service,
7060
7092
  xNode,
@@ -7074,7 +7106,7 @@ function useViewService() {
7074
7106
  },
7075
7107
  [env]
7076
7108
  );
7077
- const getCountry = useCallback57(
7109
+ const getCountry = useCallback58(
7078
7110
  async ({
7079
7111
  service,
7080
7112
  xNode,
@@ -7101,7 +7133,7 @@ function useViewService() {
7101
7133
  },
7102
7134
  [env]
7103
7135
  );
7104
- const getCity = useCallback57(
7136
+ const getCity = useCallback58(
7105
7137
  async ({
7106
7138
  service,
7107
7139
  xNode,
@@ -7128,7 +7160,7 @@ function useViewService() {
7128
7160
  },
7129
7161
  [env]
7130
7162
  );
7131
- const getWard = useCallback57(
7163
+ const getWard = useCallback58(
7132
7164
  async ({
7133
7165
  service,
7134
7166
  xNode,
@@ -7153,7 +7185,7 @@ function useViewService() {
7153
7185
  },
7154
7186
  [env]
7155
7187
  );
7156
- const getPartnerTitle = useCallback57(
7188
+ const getPartnerTitle = useCallback58(
7157
7189
  async ({
7158
7190
  service,
7159
7191
  xNode,
@@ -7205,10 +7237,10 @@ function useViewService() {
7205
7237
  }
7206
7238
 
7207
7239
  // src/services/dashboard-service/index.ts
7208
- import { useCallback as useCallback58 } from "react";
7240
+ import { useCallback as useCallback59 } from "react";
7209
7241
  function useDashboardService() {
7210
7242
  const { env } = useEnv();
7211
- const readGroup = useCallback58(
7243
+ const readGroup = useCallback59(
7212
7244
  async ({
7213
7245
  service,
7214
7246
  xNode,
@@ -7225,7 +7257,7 @@ function useDashboardService() {
7225
7257
  },
7226
7258
  [env]
7227
7259
  );
7228
- const getDataChart = useCallback58(
7260
+ const getDataChart = useCallback59(
7229
7261
  async ({
7230
7262
  service,
7231
7263
  xNode,