@fctc/interface-logic 4.8.1 → 4.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/services.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/services/action-service/index.ts
2
- import { useCallback as useCallback50 } from "react";
2
+ import { useCallback as useCallback52 } from "react";
3
3
 
4
4
  // src/constants/api/uri-constant.ts
5
5
  var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
@@ -4917,6 +4917,81 @@ var addPaymentMethodSupabaseService = () => {
4917
4917
  };
4918
4918
  };
4919
4919
 
4920
+ // src/services/pos-service/supabase/update-session-payment-methods.ts
4921
+ import { useCallback as useCallback50 } from "react";
4922
+ var updateSessionPaymentMethodsSupabaseService = () => {
4923
+ const supabase = useSupabaseOptional();
4924
+ const updateSessionPaymentMethodsSupabase = useCallback50(
4925
+ async (values) => {
4926
+ if (!supabase) {
4927
+ console.error("Supabase client not initialized");
4928
+ return null;
4929
+ }
4930
+ try {
4931
+ const { data, error } = await supabase.from("pos_sessions" /* POS_SESSIONS */).update({
4932
+ payment_method_ids: values.payment_method_ids,
4933
+ updated_at: (/* @__PURE__ */ new Date()).toISOString()
4934
+ }).eq("id", values.session_id).select("id").single();
4935
+ if (error) {
4936
+ console.error("Error updating session payment methods:", error);
4937
+ return null;
4938
+ }
4939
+ return [data.id];
4940
+ } catch (error) {
4941
+ console.error("Error updating session payment methods:", error);
4942
+ return null;
4943
+ }
4944
+ },
4945
+ [supabase]
4946
+ );
4947
+ return {
4948
+ updateSessionPaymentMethodsSupabase
4949
+ };
4950
+ };
4951
+
4952
+ // src/services/pos-service/supabase/create-payment.ts
4953
+ import { useCallback as useCallback51 } from "react";
4954
+ var createPaymentSupabaseService = () => {
4955
+ const supabase = useSupabaseOptional();
4956
+ const createPaymentSupabase = useCallback51(
4957
+ async (values) => {
4958
+ if (!supabase) {
4959
+ console.error("Supabase client not initialized");
4960
+ return null;
4961
+ }
4962
+ try {
4963
+ const { data: paymentData, error: paymentError } = await supabase.from("payments" /* PAYMENTS */).insert({
4964
+ pos_order_id: values.pos_order_id,
4965
+ payment_method_id: values.payment_method_id,
4966
+ session_id: values.session_id,
4967
+ amount: values.amount
4968
+ }).select("id, amount").single();
4969
+ if (paymentError) {
4970
+ console.error("Error creating payment:", paymentError);
4971
+ return null;
4972
+ }
4973
+ const { data: orderData, error: orderError } = await supabase.from("orders" /* ORDERS */).select("amount_paid").eq("id", values.pos_order_id).single();
4974
+ if (orderError) {
4975
+ console.error("Error fetching order:", orderError);
4976
+ return null;
4977
+ }
4978
+ return {
4979
+ id: paymentData.id,
4980
+ amount: paymentData.amount,
4981
+ amount_paid: orderData.amount_paid
4982
+ };
4983
+ } catch (error) {
4984
+ console.error("Error creating payment:", error);
4985
+ return null;
4986
+ }
4987
+ },
4988
+ [supabase]
4989
+ );
4990
+ return {
4991
+ createPaymentSupabase
4992
+ };
4993
+ };
4994
+
4920
4995
  // src/services/pos-service/index.ts
4921
4996
  var serviceFactories = [
4922
4997
  addEntityService,
@@ -4965,7 +5040,9 @@ var serviceFactories = [
4965
5040
  deleteOrderLineSupabaseService,
4966
5041
  addProductSupabaseService,
4967
5042
  getFunctionalModulesService,
4968
- addPaymentMethodSupabaseService
5043
+ addPaymentMethodSupabaseService,
5044
+ updateSessionPaymentMethodsSupabaseService,
5045
+ createPaymentSupabaseService
4969
5046
  ];
4970
5047
  var usePosService = () => {
4971
5048
  const { env } = useEnv();
@@ -5115,6 +5192,12 @@ import { useMutation as useMutation103 } from "@tanstack/react-query";
5115
5192
  // src/hooks/pos/supabase/use-add-payment-method.ts
5116
5193
  import { useMutation as useMutation104 } from "@tanstack/react-query";
5117
5194
 
5195
+ // src/hooks/pos/supabase/use-update-session-payment-methods.ts
5196
+ import { useMutation as useMutation105 } from "@tanstack/react-query";
5197
+
5198
+ // src/hooks/pos/supabase/use-create-payment.ts
5199
+ import { useMutation as useMutation106 } from "@tanstack/react-query";
5200
+
5118
5201
  // src/provider/service-provider.tsx
5119
5202
  import { jsx as jsx7 } from "react/jsx-runtime";
5120
5203
  var ServiceContext = createContext3(null);
@@ -5126,7 +5209,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
5126
5209
  // src/services/action-service/index.ts
5127
5210
  function useActionService() {
5128
5211
  const { env } = useEnv();
5129
- const loadAction = useCallback50(
5212
+ const loadAction = useCallback52(
5130
5213
  async ({
5131
5214
  idAction,
5132
5215
  context,
@@ -5150,7 +5233,7 @@ function useActionService() {
5150
5233
  },
5151
5234
  [env]
5152
5235
  );
5153
- const callButton = useCallback50(
5236
+ const callButton = useCallback52(
5154
5237
  async ({
5155
5238
  model,
5156
5239
  ids = [],
@@ -5184,7 +5267,7 @@ function useActionService() {
5184
5267
  },
5185
5268
  [env]
5186
5269
  );
5187
- const removeRows = useCallback50(
5270
+ const removeRows = useCallback52(
5188
5271
  async ({
5189
5272
  model,
5190
5273
  ids,
@@ -5210,7 +5293,7 @@ function useActionService() {
5210
5293
  },
5211
5294
  [env]
5212
5295
  );
5213
- const duplicateRecord = useCallback50(
5296
+ const duplicateRecord = useCallback52(
5214
5297
  async ({
5215
5298
  model,
5216
5299
  id,
@@ -5236,7 +5319,7 @@ function useActionService() {
5236
5319
  },
5237
5320
  [env]
5238
5321
  );
5239
- const getPrintReportName = useCallback50(
5322
+ const getPrintReportName = useCallback52(
5240
5323
  async ({ id }) => {
5241
5324
  const jsonData = {
5242
5325
  model: "ir.actions.report",
@@ -5254,7 +5337,7 @@ function useActionService() {
5254
5337
  },
5255
5338
  [env]
5256
5339
  );
5257
- const print = useCallback50(
5340
+ const print = useCallback52(
5258
5341
  async ({ id, report, db }) => {
5259
5342
  const jsonData = {
5260
5343
  report,
@@ -5272,7 +5355,7 @@ function useActionService() {
5272
5355
  },
5273
5356
  [env]
5274
5357
  );
5275
- const runAction = useCallback50(
5358
+ const runAction = useCallback52(
5276
5359
  async ({
5277
5360
  idAction,
5278
5361
  context,
@@ -5299,7 +5382,7 @@ function useActionService() {
5299
5382
  },
5300
5383
  [env]
5301
5384
  );
5302
- const generateSerialNumber = useCallback50(
5385
+ const generateSerialNumber = useCallback52(
5303
5386
  async ({
5304
5387
  kwargs,
5305
5388
  context,
@@ -5337,11 +5420,11 @@ function useActionService() {
5337
5420
  }
5338
5421
 
5339
5422
  // src/services/auth-service/index.ts
5340
- import { useCallback as useCallback51 } from "react";
5423
+ import { useCallback as useCallback53 } from "react";
5341
5424
  function useAuthService() {
5342
5425
  const { env } = useEnv();
5343
5426
  const supabase = useSupabaseOptional();
5344
- const login = useCallback51(
5427
+ const login = useCallback53(
5345
5428
  async (body) => {
5346
5429
  const payload = Object.fromEntries(
5347
5430
  Object.entries({
@@ -5366,7 +5449,7 @@ function useAuthService() {
5366
5449
  },
5367
5450
  [env]
5368
5451
  );
5369
- const loginSupabase = useCallback51(
5452
+ const loginSupabase = useCallback53(
5370
5453
  async (body) => {
5371
5454
  if (!supabase) {
5372
5455
  return {
@@ -5382,7 +5465,7 @@ function useAuthService() {
5382
5465
  },
5383
5466
  [supabase]
5384
5467
  );
5385
- const forgotPassword = useCallback51(
5468
+ const forgotPassword = useCallback53(
5386
5469
  async (email) => {
5387
5470
  const bodyData = {
5388
5471
  login: email,
@@ -5396,7 +5479,7 @@ function useAuthService() {
5396
5479
  },
5397
5480
  [env]
5398
5481
  );
5399
- const forgotPasswordSSO = useCallback51(
5482
+ const forgotPasswordSSO = useCallback53(
5400
5483
  async ({
5401
5484
  email,
5402
5485
  with_context,
@@ -5419,7 +5502,7 @@ function useAuthService() {
5419
5502
  },
5420
5503
  [env]
5421
5504
  );
5422
- const resetPassword = useCallback51(
5505
+ const resetPassword = useCallback53(
5423
5506
  async (data, token) => {
5424
5507
  const bodyData = {
5425
5508
  token,
@@ -5434,7 +5517,7 @@ function useAuthService() {
5434
5517
  },
5435
5518
  [env]
5436
5519
  );
5437
- const resetPasswordSSO = useCallback51(
5520
+ const resetPasswordSSO = useCallback53(
5438
5521
  async ({
5439
5522
  method,
5440
5523
  password,
@@ -5457,7 +5540,7 @@ function useAuthService() {
5457
5540
  },
5458
5541
  [env]
5459
5542
  );
5460
- const updatePassword = useCallback51(
5543
+ const updatePassword = useCallback53(
5461
5544
  async (data, token) => {
5462
5545
  const bodyData = {
5463
5546
  token,
@@ -5472,7 +5555,7 @@ function useAuthService() {
5472
5555
  },
5473
5556
  [env]
5474
5557
  );
5475
- const isValidToken = useCallback51(
5558
+ const isValidToken = useCallback53(
5476
5559
  async (token) => {
5477
5560
  const bodyData = {
5478
5561
  token
@@ -5485,7 +5568,7 @@ function useAuthService() {
5485
5568
  },
5486
5569
  [env]
5487
5570
  );
5488
- const isValidActionToken = useCallback51(
5571
+ const isValidActionToken = useCallback53(
5489
5572
  async (actionToken) => {
5490
5573
  const bodyData = {};
5491
5574
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -5498,7 +5581,7 @@ function useAuthService() {
5498
5581
  },
5499
5582
  [env]
5500
5583
  );
5501
- const loginSocial = useCallback51(
5584
+ const loginSocial = useCallback53(
5502
5585
  async ({
5503
5586
  db,
5504
5587
  state,
@@ -5516,13 +5599,13 @@ function useAuthService() {
5516
5599
  },
5517
5600
  [env]
5518
5601
  );
5519
- const getProviders = useCallback51(
5602
+ const getProviders = useCallback53(
5520
5603
  async (db) => {
5521
5604
  return env?.requests?.get("/oauth/providers", { params: { db } });
5522
5605
  },
5523
5606
  [env]
5524
5607
  );
5525
- const getAccessByCode = useCallback51(
5608
+ const getAccessByCode = useCallback53(
5526
5609
  async (code) => {
5527
5610
  const data = new URLSearchParams();
5528
5611
  data.append("code", code);
@@ -5542,7 +5625,7 @@ function useAuthService() {
5542
5625
  },
5543
5626
  [env]
5544
5627
  );
5545
- const logout = useCallback51(
5628
+ const logout = useCallback53(
5546
5629
  async (service) => {
5547
5630
  return env?.requests?.post(
5548
5631
  "/logout" /* LOGOUT */,
@@ -5559,7 +5642,7 @@ function useAuthService() {
5559
5642
  },
5560
5643
  [env]
5561
5644
  );
5562
- const getTenantMapping = useCallback51(
5645
+ const getTenantMapping = useCallback53(
5563
5646
  async ({ shortName, service }) => {
5564
5647
  const bodyData = {
5565
5648
  short_name: shortName
@@ -5577,7 +5660,7 @@ function useAuthService() {
5577
5660
  },
5578
5661
  [env]
5579
5662
  );
5580
- const getToken = useCallback51(
5663
+ const getToken = useCallback53(
5581
5664
  async ({
5582
5665
  phone,
5583
5666
  name,
@@ -5622,10 +5705,10 @@ function useAuthService() {
5622
5705
  }
5623
5706
 
5624
5707
  // src/services/company-service/index.ts
5625
- import { useCallback as useCallback52 } from "react";
5708
+ import { useCallback as useCallback54 } from "react";
5626
5709
  function useCompanyService() {
5627
5710
  const { env } = useEnv();
5628
- const getCurrentCompany = useCallback52(
5711
+ const getCurrentCompany = useCallback54(
5629
5712
  async (service, extraHeaders) => {
5630
5713
  return await env.requests.get(
5631
5714
  "/company" /* COMPANY_PATH */,
@@ -5642,7 +5725,7 @@ function useCompanyService() {
5642
5725
  },
5643
5726
  [env]
5644
5727
  );
5645
- const getInfoCompany = useCallback52(
5728
+ const getInfoCompany = useCallback54(
5646
5729
  async (id, service) => {
5647
5730
  const jsonData = {
5648
5731
  ids: [id],
@@ -5678,10 +5761,10 @@ function useCompanyService() {
5678
5761
  }
5679
5762
 
5680
5763
  // src/services/excel-service/index.ts
5681
- import { useCallback as useCallback53 } from "react";
5764
+ import { useCallback as useCallback55 } from "react";
5682
5765
  function useExcelService() {
5683
5766
  const { env } = useEnv();
5684
- const uploadFileExcel = useCallback53(
5767
+ const uploadFileExcel = useCallback55(
5685
5768
  async ({
5686
5769
  formData,
5687
5770
  service,
@@ -5698,7 +5781,7 @@ function useExcelService() {
5698
5781
  },
5699
5782
  [env]
5700
5783
  );
5701
- const uploadIdFile = useCallback53(
5784
+ const uploadIdFile = useCallback55(
5702
5785
  async ({
5703
5786
  formData,
5704
5787
  service,
@@ -5715,7 +5798,7 @@ function useExcelService() {
5715
5798
  },
5716
5799
  [env]
5717
5800
  );
5718
- const parsePreview = useCallback53(
5801
+ const parsePreview = useCallback55(
5719
5802
  async ({
5720
5803
  id,
5721
5804
  selectedSheet,
@@ -5764,7 +5847,7 @@ function useExcelService() {
5764
5847
  },
5765
5848
  [env]
5766
5849
  );
5767
- const executeImport = useCallback53(
5850
+ const executeImport = useCallback55(
5768
5851
  async ({
5769
5852
  columns,
5770
5853
  fields,
@@ -5798,7 +5881,7 @@ function useExcelService() {
5798
5881
  },
5799
5882
  [env]
5800
5883
  );
5801
- const getFileExcel = useCallback53(
5884
+ const getFileExcel = useCallback55(
5802
5885
  async ({
5803
5886
  model,
5804
5887
  service,
@@ -5822,7 +5905,7 @@ function useExcelService() {
5822
5905
  },
5823
5906
  [env]
5824
5907
  );
5825
- const getFieldExport = useCallback53(
5908
+ const getFieldExport = useCallback55(
5826
5909
  async ({
5827
5910
  ids,
5828
5911
  model,
@@ -5862,7 +5945,7 @@ function useExcelService() {
5862
5945
  },
5863
5946
  [env]
5864
5947
  );
5865
- const exportExcel = useCallback53(
5948
+ const exportExcel = useCallback55(
5866
5949
  async ({
5867
5950
  model,
5868
5951
  domain,
@@ -5910,10 +5993,10 @@ function useExcelService() {
5910
5993
  }
5911
5994
 
5912
5995
  // src/services/form-service/index.ts
5913
- import { useCallback as useCallback54 } from "react";
5996
+ import { useCallback as useCallback56 } from "react";
5914
5997
  function useFormService() {
5915
5998
  const { env } = useEnv();
5916
- const getComment = useCallback54(
5999
+ const getComment = useCallback56(
5917
6000
  async ({ data }) => {
5918
6001
  const jsonData = {
5919
6002
  thread_id: data.thread_id,
@@ -5931,7 +6014,7 @@ function useFormService() {
5931
6014
  },
5932
6015
  [env]
5933
6016
  );
5934
- const getThreadData = useCallback54(
6017
+ const getThreadData = useCallback56(
5935
6018
  async ({
5936
6019
  data,
5937
6020
  xNode,
@@ -5958,7 +6041,7 @@ function useFormService() {
5958
6041
  },
5959
6042
  [env]
5960
6043
  );
5961
- const getThreadMessages = useCallback54(
6044
+ const getThreadMessages = useCallback56(
5962
6045
  async ({
5963
6046
  data,
5964
6047
  xNode,
@@ -5984,7 +6067,7 @@ function useFormService() {
5984
6067
  },
5985
6068
  [env]
5986
6069
  );
5987
- const sentComment = useCallback54(
6070
+ const sentComment = useCallback56(
5988
6071
  async ({ data }) => {
5989
6072
  const jsonData = {
5990
6073
  context: {
@@ -6012,7 +6095,7 @@ function useFormService() {
6012
6095
  },
6013
6096
  [env]
6014
6097
  );
6015
- const deleteComment = useCallback54(
6098
+ const deleteComment = useCallback56(
6016
6099
  async ({ data }) => {
6017
6100
  const jsonData = {
6018
6101
  attachment_ids: [],
@@ -6028,7 +6111,7 @@ function useFormService() {
6028
6111
  },
6029
6112
  [env]
6030
6113
  );
6031
- const getImage = useCallback54(
6114
+ const getImage = useCallback56(
6032
6115
  async ({ data }) => {
6033
6116
  return env.requests.get(
6034
6117
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -6041,7 +6124,7 @@ function useFormService() {
6041
6124
  },
6042
6125
  [env]
6043
6126
  );
6044
- const uploadImage = useCallback54(
6127
+ const uploadImage = useCallback56(
6045
6128
  async ({
6046
6129
  formData,
6047
6130
  service,
@@ -6060,7 +6143,7 @@ function useFormService() {
6060
6143
  },
6061
6144
  [env]
6062
6145
  );
6063
- const uploadFile = useCallback54(
6146
+ const uploadFile = useCallback56(
6064
6147
  async ({
6065
6148
  formData,
6066
6149
  service,
@@ -6080,7 +6163,7 @@ function useFormService() {
6080
6163
  },
6081
6164
  [env]
6082
6165
  );
6083
- const getFormView = useCallback54(
6166
+ const getFormView = useCallback56(
6084
6167
  async ({ data }) => {
6085
6168
  const jsonData = {
6086
6169
  model: data.model,
@@ -6096,7 +6179,7 @@ function useFormService() {
6096
6179
  },
6097
6180
  [env]
6098
6181
  );
6099
- const changeStatus = useCallback54(
6182
+ const changeStatus = useCallback56(
6100
6183
  async ({ data }) => {
6101
6184
  const vals = {
6102
6185
  [data.name]: data.stage_id
@@ -6125,7 +6208,7 @@ function useFormService() {
6125
6208
  },
6126
6209
  [env]
6127
6210
  );
6128
- const getExternalTab = useCallback54(
6211
+ const getExternalTab = useCallback56(
6129
6212
  async ({ method, context, service, xNode }) => {
6130
6213
  return env?.requests?.post(
6131
6214
  "/call" /* CALL_PATH */,
@@ -6160,10 +6243,10 @@ function useFormService() {
6160
6243
  }
6161
6244
 
6162
6245
  // src/services/kanban-service/index.ts
6163
- import { useCallback as useCallback55 } from "react";
6246
+ import { useCallback as useCallback57 } from "react";
6164
6247
  function useKanbanService() {
6165
6248
  const { env } = useEnv();
6166
- const getGroups = useCallback55(
6249
+ const getGroups = useCallback57(
6167
6250
  async ({ model, width_context }) => {
6168
6251
  const jsonData = {
6169
6252
  model,
@@ -6183,7 +6266,7 @@ function useKanbanService() {
6183
6266
  },
6184
6267
  [env]
6185
6268
  );
6186
- const getProgressBar = useCallback55(
6269
+ const getProgressBar = useCallback57(
6187
6270
  async ({ field, color, model, width_context }) => {
6188
6271
  const jsonData = {
6189
6272
  model,
@@ -6213,10 +6296,10 @@ function useKanbanService() {
6213
6296
  }
6214
6297
 
6215
6298
  // src/services/model-service/index.ts
6216
- import { useCallback as useCallback56 } from "react";
6299
+ import { useCallback as useCallback58 } from "react";
6217
6300
  function useModelService() {
6218
6301
  const { env } = useEnv();
6219
- const getListMyBankAccount = useCallback56(
6302
+ const getListMyBankAccount = useCallback58(
6220
6303
  async ({
6221
6304
  domain,
6222
6305
  spectification,
@@ -6240,7 +6323,7 @@ function useModelService() {
6240
6323
  },
6241
6324
  [env]
6242
6325
  );
6243
- const getCurrency = useCallback56(async () => {
6326
+ const getCurrency = useCallback58(async () => {
6244
6327
  const jsonData = {
6245
6328
  model: "res.currency",
6246
6329
  method: "web_search_read",
@@ -6260,7 +6343,7 @@ function useModelService() {
6260
6343
  }
6261
6344
  });
6262
6345
  }, [env]);
6263
- const getConversionRate = useCallback56(async () => {
6346
+ const getConversionRate = useCallback58(async () => {
6264
6347
  const jsonData = {
6265
6348
  model: "res.currency",
6266
6349
  method: "web_search_read",
@@ -6286,7 +6369,7 @@ function useModelService() {
6286
6369
  }
6287
6370
  });
6288
6371
  }, [env]);
6289
- const getAll = useCallback56(
6372
+ const getAll = useCallback58(
6290
6373
  async ({
6291
6374
  data,
6292
6375
  service,
@@ -6328,7 +6411,7 @@ function useModelService() {
6328
6411
  },
6329
6412
  [env]
6330
6413
  );
6331
- const getListCalendar = useCallback56(
6414
+ const getListCalendar = useCallback58(
6332
6415
  async ({ data }) => {
6333
6416
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
6334
6417
  fields: data.fields,
@@ -6359,7 +6442,7 @@ function useModelService() {
6359
6442
  },
6360
6443
  [env]
6361
6444
  );
6362
- const getList = useCallback56(
6445
+ const getList = useCallback58(
6363
6446
  async ({
6364
6447
  model,
6365
6448
  ids = [],
@@ -6391,7 +6474,7 @@ function useModelService() {
6391
6474
  },
6392
6475
  [env]
6393
6476
  );
6394
- const getDetail = useCallback56(
6477
+ const getDetail = useCallback58(
6395
6478
  async ({
6396
6479
  ids = [],
6397
6480
  model,
@@ -6423,7 +6506,7 @@ function useModelService() {
6423
6506
  },
6424
6507
  [env]
6425
6508
  );
6426
- const save = useCallback56(
6509
+ const save = useCallback58(
6427
6510
  async ({
6428
6511
  model,
6429
6512
  ids = [],
@@ -6458,7 +6541,7 @@ function useModelService() {
6458
6541
  },
6459
6542
  [env]
6460
6543
  );
6461
- const deleteApi = useCallback56(
6544
+ const deleteApi = useCallback58(
6462
6545
  async ({ ids = [], model, service }) => {
6463
6546
  const jsonData = {
6464
6547
  model,
@@ -6478,7 +6561,7 @@ function useModelService() {
6478
6561
  },
6479
6562
  [env]
6480
6563
  );
6481
- const onChange = useCallback56(
6564
+ const onChange = useCallback58(
6482
6565
  async ({
6483
6566
  ids = [],
6484
6567
  model,
@@ -6514,7 +6597,7 @@ function useModelService() {
6514
6597
  },
6515
6598
  [env]
6516
6599
  );
6517
- const getListFieldsOnchange = useCallback56(
6600
+ const getListFieldsOnchange = useCallback58(
6518
6601
  async ({
6519
6602
  model,
6520
6603
  service,
@@ -6538,7 +6621,7 @@ function useModelService() {
6538
6621
  },
6539
6622
  [env]
6540
6623
  );
6541
- const parseORMOdoo = useCallback56((data) => {
6624
+ const parseORMOdoo = useCallback58((data) => {
6542
6625
  for (const key in data) {
6543
6626
  if (key === "display_name") {
6544
6627
  delete data[key];
@@ -6549,7 +6632,7 @@ function useModelService() {
6549
6632
  }
6550
6633
  return { ...data };
6551
6634
  }, []);
6552
- const toDataJS = useCallback56(
6635
+ const toDataJS = useCallback58(
6553
6636
  (data, viewData, model) => {
6554
6637
  for (const key in data) {
6555
6638
  if (data[key] === false) {
@@ -6607,10 +6690,10 @@ function useModelService() {
6607
6690
  }
6608
6691
 
6609
6692
  // src/services/user-service/index.ts
6610
- import { useCallback as useCallback57 } from "react";
6693
+ import { useCallback as useCallback59 } from "react";
6611
6694
  function useUserService() {
6612
6695
  const { env } = useEnv();
6613
- const getProfile = useCallback57(
6696
+ const getProfile = useCallback59(
6614
6697
  async (service, path, extraHeaders) => {
6615
6698
  return env?.requests?.get(
6616
6699
  path || "/userinfo" /* PROFILE_PATH */,
@@ -6627,7 +6710,7 @@ function useUserService() {
6627
6710
  },
6628
6711
  [env]
6629
6712
  );
6630
- const getUser = useCallback57(
6713
+ const getUser = useCallback59(
6631
6714
  async ({ context, id }) => {
6632
6715
  const jsonData = {
6633
6716
  model: "res.users",
@@ -6665,7 +6748,7 @@ function useUserService() {
6665
6748
  },
6666
6749
  [env]
6667
6750
  );
6668
- const switchUserLocale = useCallback57(
6751
+ const switchUserLocale = useCallback59(
6669
6752
  async ({ id, values, service }) => {
6670
6753
  const jsonData = {
6671
6754
  model: "res.users",
@@ -6693,10 +6776,10 @@ function useUserService() {
6693
6776
  }
6694
6777
 
6695
6778
  // src/services/view-service/index.ts
6696
- import { useCallback as useCallback58 } from "react";
6779
+ import { useCallback as useCallback60 } from "react";
6697
6780
  function useViewService() {
6698
6781
  const { env } = useEnv();
6699
- const getView = useCallback58(
6782
+ const getView = useCallback60(
6700
6783
  async ({
6701
6784
  model,
6702
6785
  views,
@@ -6736,7 +6819,7 @@ function useViewService() {
6736
6819
  },
6737
6820
  [env]
6738
6821
  );
6739
- const getMenu = useCallback58(
6822
+ const getMenu = useCallback60(
6740
6823
  async (context, specification, domain, service) => {
6741
6824
  const jsonData = {
6742
6825
  model: "ir.ui.menu" /* MENU */,
@@ -6767,7 +6850,7 @@ function useViewService() {
6767
6850
  },
6768
6851
  [env]
6769
6852
  );
6770
- const getActionDetail = useCallback58(
6853
+ const getActionDetail = useCallback60(
6771
6854
  async (aid, context) => {
6772
6855
  const jsonData = {
6773
6856
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -6797,7 +6880,7 @@ function useViewService() {
6797
6880
  },
6798
6881
  [env]
6799
6882
  );
6800
- const getResequence = useCallback58(
6883
+ const getResequence = useCallback60(
6801
6884
  async ({
6802
6885
  model,
6803
6886
  ids,
@@ -6827,7 +6910,7 @@ function useViewService() {
6827
6910
  },
6828
6911
  [env]
6829
6912
  );
6830
- const getSelectionItem = useCallback58(
6913
+ const getSelectionItem = useCallback60(
6831
6914
  async ({
6832
6915
  data,
6833
6916
  service,
@@ -6864,7 +6947,7 @@ function useViewService() {
6864
6947
  },
6865
6948
  [env]
6866
6949
  );
6867
- const loadMessages = useCallback58(async () => {
6950
+ const loadMessages = useCallback60(async () => {
6868
6951
  return env.requests.post(
6869
6952
  "/load_message_failures" /* LOAD_MESSAGE */,
6870
6953
  {},
@@ -6875,14 +6958,14 @@ function useViewService() {
6875
6958
  }
6876
6959
  );
6877
6960
  }, [env]);
6878
- const getVersion = useCallback58(async () => {
6961
+ const getVersion = useCallback60(async () => {
6879
6962
  return env?.requests?.get("", {
6880
6963
  headers: {
6881
6964
  "Content-Type": "application/json"
6882
6965
  }
6883
6966
  });
6884
6967
  }, [env]);
6885
- const grantAccess = useCallback58(
6968
+ const grantAccess = useCallback60(
6886
6969
  async ({
6887
6970
  redirect_uri,
6888
6971
  state,
@@ -6909,7 +6992,7 @@ function useViewService() {
6909
6992
  },
6910
6993
  [env]
6911
6994
  );
6912
- const removeTotpSetUp = useCallback58(
6995
+ const removeTotpSetUp = useCallback60(
6913
6996
  async ({ method, token }) => {
6914
6997
  const jsonData = {
6915
6998
  method,
@@ -6930,7 +7013,7 @@ function useViewService() {
6930
7013
  },
6931
7014
  [env]
6932
7015
  );
6933
- const requestSetupTotp = useCallback58(
7016
+ const requestSetupTotp = useCallback60(
6934
7017
  async ({ method, token }) => {
6935
7018
  const jsonData = {
6936
7019
  method,
@@ -6949,7 +7032,7 @@ function useViewService() {
6949
7032
  },
6950
7033
  [env]
6951
7034
  );
6952
- const settingsWebRead2fa = useCallback58(
7035
+ const settingsWebRead2fa = useCallback60(
6953
7036
  async ({
6954
7037
  method,
6955
7038
  model,
@@ -6977,7 +7060,7 @@ function useViewService() {
6977
7060
  },
6978
7061
  [env]
6979
7062
  );
6980
- const signInSSO = useCallback58(
7063
+ const signInSSO = useCallback60(
6981
7064
  async ({
6982
7065
  redirect_uri,
6983
7066
  state,
@@ -7009,7 +7092,7 @@ function useViewService() {
7009
7092
  },
7010
7093
  [env]
7011
7094
  );
7012
- const verify2FA = useCallback58(
7095
+ const verify2FA = useCallback60(
7013
7096
  ({
7014
7097
  method,
7015
7098
  with_context,
@@ -7042,7 +7125,7 @@ function useViewService() {
7042
7125
  },
7043
7126
  [env]
7044
7127
  );
7045
- const get2FAMethods = useCallback58(
7128
+ const get2FAMethods = useCallback60(
7046
7129
  ({ method, with_context }) => {
7047
7130
  const jsonData = {
7048
7131
  method,
@@ -7061,7 +7144,7 @@ function useViewService() {
7061
7144
  },
7062
7145
  [env]
7063
7146
  );
7064
- const verifyTotp = useCallback58(
7147
+ const verifyTotp = useCallback60(
7065
7148
  ({
7066
7149
  method,
7067
7150
  action_token,
@@ -7086,7 +7169,7 @@ function useViewService() {
7086
7169
  },
7087
7170
  [env]
7088
7171
  );
7089
- const getNotifications = useCallback58(
7172
+ const getNotifications = useCallback60(
7090
7173
  async ({
7091
7174
  service,
7092
7175
  xNode,
@@ -7106,7 +7189,7 @@ function useViewService() {
7106
7189
  },
7107
7190
  [env]
7108
7191
  );
7109
- const getCountry = useCallback58(
7192
+ const getCountry = useCallback60(
7110
7193
  async ({
7111
7194
  service,
7112
7195
  xNode,
@@ -7133,7 +7216,7 @@ function useViewService() {
7133
7216
  },
7134
7217
  [env]
7135
7218
  );
7136
- const getCity = useCallback58(
7219
+ const getCity = useCallback60(
7137
7220
  async ({
7138
7221
  service,
7139
7222
  xNode,
@@ -7160,7 +7243,7 @@ function useViewService() {
7160
7243
  },
7161
7244
  [env]
7162
7245
  );
7163
- const getWard = useCallback58(
7246
+ const getWard = useCallback60(
7164
7247
  async ({
7165
7248
  service,
7166
7249
  xNode,
@@ -7185,7 +7268,7 @@ function useViewService() {
7185
7268
  },
7186
7269
  [env]
7187
7270
  );
7188
- const getPartnerTitle = useCallback58(
7271
+ const getPartnerTitle = useCallback60(
7189
7272
  async ({
7190
7273
  service,
7191
7274
  xNode,
@@ -7237,10 +7320,10 @@ function useViewService() {
7237
7320
  }
7238
7321
 
7239
7322
  // src/services/dashboard-service/index.ts
7240
- import { useCallback as useCallback59 } from "react";
7323
+ import { useCallback as useCallback61 } from "react";
7241
7324
  function useDashboardService() {
7242
7325
  const { env } = useEnv();
7243
- const readGroup = useCallback59(
7326
+ const readGroup = useCallback61(
7244
7327
  async ({
7245
7328
  service,
7246
7329
  xNode,
@@ -7257,7 +7340,7 @@ function useDashboardService() {
7257
7340
  },
7258
7341
  [env]
7259
7342
  );
7260
- const getDataChart = useCallback59(
7343
+ const getDataChart = useCallback61(
7261
7344
  async ({
7262
7345
  service,
7263
7346
  xNode,