@fctc/interface-logic 4.8.0 → 4.8.2

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 useCallback51 } 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,72 @@ 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
+
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
+
4892
4952
  // src/services/pos-service/index.ts
4893
4953
  var serviceFactories = [
4894
4954
  addEntityService,
@@ -4936,7 +4996,9 @@ var serviceFactories = [
4936
4996
  deleteOrderSupabaseService,
4937
4997
  deleteOrderLineSupabaseService,
4938
4998
  addProductSupabaseService,
4939
- getFunctionalModulesService
4999
+ getFunctionalModulesService,
5000
+ addPaymentMethodSupabaseService,
5001
+ updateSessionPaymentMethodsSupabaseService
4940
5002
  ];
4941
5003
  var usePosService = () => {
4942
5004
  const { env } = useEnv();
@@ -5083,6 +5145,12 @@ import { useMutation as useMutation102 } from "@tanstack/react-query";
5083
5145
  // src/hooks/pos/use-get-functional-modules.ts
5084
5146
  import { useMutation as useMutation103 } from "@tanstack/react-query";
5085
5147
 
5148
+ // src/hooks/pos/supabase/use-add-payment-method.ts
5149
+ import { useMutation as useMutation104 } from "@tanstack/react-query";
5150
+
5151
+ // src/hooks/pos/supabase/use-update-session-payment-methods.ts
5152
+ import { useMutation as useMutation105 } from "@tanstack/react-query";
5153
+
5086
5154
  // src/provider/service-provider.tsx
5087
5155
  import { jsx as jsx7 } from "react/jsx-runtime";
5088
5156
  var ServiceContext = createContext3(null);
@@ -5094,7 +5162,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
5094
5162
  // src/services/action-service/index.ts
5095
5163
  function useActionService() {
5096
5164
  const { env } = useEnv();
5097
- const loadAction = useCallback49(
5165
+ const loadAction = useCallback51(
5098
5166
  async ({
5099
5167
  idAction,
5100
5168
  context,
@@ -5118,7 +5186,7 @@ function useActionService() {
5118
5186
  },
5119
5187
  [env]
5120
5188
  );
5121
- const callButton = useCallback49(
5189
+ const callButton = useCallback51(
5122
5190
  async ({
5123
5191
  model,
5124
5192
  ids = [],
@@ -5152,7 +5220,7 @@ function useActionService() {
5152
5220
  },
5153
5221
  [env]
5154
5222
  );
5155
- const removeRows = useCallback49(
5223
+ const removeRows = useCallback51(
5156
5224
  async ({
5157
5225
  model,
5158
5226
  ids,
@@ -5178,7 +5246,7 @@ function useActionService() {
5178
5246
  },
5179
5247
  [env]
5180
5248
  );
5181
- const duplicateRecord = useCallback49(
5249
+ const duplicateRecord = useCallback51(
5182
5250
  async ({
5183
5251
  model,
5184
5252
  id,
@@ -5204,7 +5272,7 @@ function useActionService() {
5204
5272
  },
5205
5273
  [env]
5206
5274
  );
5207
- const getPrintReportName = useCallback49(
5275
+ const getPrintReportName = useCallback51(
5208
5276
  async ({ id }) => {
5209
5277
  const jsonData = {
5210
5278
  model: "ir.actions.report",
@@ -5222,7 +5290,7 @@ function useActionService() {
5222
5290
  },
5223
5291
  [env]
5224
5292
  );
5225
- const print = useCallback49(
5293
+ const print = useCallback51(
5226
5294
  async ({ id, report, db }) => {
5227
5295
  const jsonData = {
5228
5296
  report,
@@ -5240,7 +5308,7 @@ function useActionService() {
5240
5308
  },
5241
5309
  [env]
5242
5310
  );
5243
- const runAction = useCallback49(
5311
+ const runAction = useCallback51(
5244
5312
  async ({
5245
5313
  idAction,
5246
5314
  context,
@@ -5267,7 +5335,7 @@ function useActionService() {
5267
5335
  },
5268
5336
  [env]
5269
5337
  );
5270
- const generateSerialNumber = useCallback49(
5338
+ const generateSerialNumber = useCallback51(
5271
5339
  async ({
5272
5340
  kwargs,
5273
5341
  context,
@@ -5305,11 +5373,11 @@ function useActionService() {
5305
5373
  }
5306
5374
 
5307
5375
  // src/services/auth-service/index.ts
5308
- import { useCallback as useCallback50 } from "react";
5376
+ import { useCallback as useCallback52 } from "react";
5309
5377
  function useAuthService() {
5310
5378
  const { env } = useEnv();
5311
5379
  const supabase = useSupabaseOptional();
5312
- const login = useCallback50(
5380
+ const login = useCallback52(
5313
5381
  async (body) => {
5314
5382
  const payload = Object.fromEntries(
5315
5383
  Object.entries({
@@ -5334,7 +5402,7 @@ function useAuthService() {
5334
5402
  },
5335
5403
  [env]
5336
5404
  );
5337
- const loginSupabase = useCallback50(
5405
+ const loginSupabase = useCallback52(
5338
5406
  async (body) => {
5339
5407
  if (!supabase) {
5340
5408
  return {
@@ -5350,7 +5418,7 @@ function useAuthService() {
5350
5418
  },
5351
5419
  [supabase]
5352
5420
  );
5353
- const forgotPassword = useCallback50(
5421
+ const forgotPassword = useCallback52(
5354
5422
  async (email) => {
5355
5423
  const bodyData = {
5356
5424
  login: email,
@@ -5364,7 +5432,7 @@ function useAuthService() {
5364
5432
  },
5365
5433
  [env]
5366
5434
  );
5367
- const forgotPasswordSSO = useCallback50(
5435
+ const forgotPasswordSSO = useCallback52(
5368
5436
  async ({
5369
5437
  email,
5370
5438
  with_context,
@@ -5387,7 +5455,7 @@ function useAuthService() {
5387
5455
  },
5388
5456
  [env]
5389
5457
  );
5390
- const resetPassword = useCallback50(
5458
+ const resetPassword = useCallback52(
5391
5459
  async (data, token) => {
5392
5460
  const bodyData = {
5393
5461
  token,
@@ -5402,7 +5470,7 @@ function useAuthService() {
5402
5470
  },
5403
5471
  [env]
5404
5472
  );
5405
- const resetPasswordSSO = useCallback50(
5473
+ const resetPasswordSSO = useCallback52(
5406
5474
  async ({
5407
5475
  method,
5408
5476
  password,
@@ -5425,7 +5493,7 @@ function useAuthService() {
5425
5493
  },
5426
5494
  [env]
5427
5495
  );
5428
- const updatePassword = useCallback50(
5496
+ const updatePassword = useCallback52(
5429
5497
  async (data, token) => {
5430
5498
  const bodyData = {
5431
5499
  token,
@@ -5440,7 +5508,7 @@ function useAuthService() {
5440
5508
  },
5441
5509
  [env]
5442
5510
  );
5443
- const isValidToken = useCallback50(
5511
+ const isValidToken = useCallback52(
5444
5512
  async (token) => {
5445
5513
  const bodyData = {
5446
5514
  token
@@ -5453,7 +5521,7 @@ function useAuthService() {
5453
5521
  },
5454
5522
  [env]
5455
5523
  );
5456
- const isValidActionToken = useCallback50(
5524
+ const isValidActionToken = useCallback52(
5457
5525
  async (actionToken) => {
5458
5526
  const bodyData = {};
5459
5527
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -5466,7 +5534,7 @@ function useAuthService() {
5466
5534
  },
5467
5535
  [env]
5468
5536
  );
5469
- const loginSocial = useCallback50(
5537
+ const loginSocial = useCallback52(
5470
5538
  async ({
5471
5539
  db,
5472
5540
  state,
@@ -5484,13 +5552,13 @@ function useAuthService() {
5484
5552
  },
5485
5553
  [env]
5486
5554
  );
5487
- const getProviders = useCallback50(
5555
+ const getProviders = useCallback52(
5488
5556
  async (db) => {
5489
5557
  return env?.requests?.get("/oauth/providers", { params: { db } });
5490
5558
  },
5491
5559
  [env]
5492
5560
  );
5493
- const getAccessByCode = useCallback50(
5561
+ const getAccessByCode = useCallback52(
5494
5562
  async (code) => {
5495
5563
  const data = new URLSearchParams();
5496
5564
  data.append("code", code);
@@ -5510,7 +5578,7 @@ function useAuthService() {
5510
5578
  },
5511
5579
  [env]
5512
5580
  );
5513
- const logout = useCallback50(
5581
+ const logout = useCallback52(
5514
5582
  async (service) => {
5515
5583
  return env?.requests?.post(
5516
5584
  "/logout" /* LOGOUT */,
@@ -5527,7 +5595,7 @@ function useAuthService() {
5527
5595
  },
5528
5596
  [env]
5529
5597
  );
5530
- const getTenantMapping = useCallback50(
5598
+ const getTenantMapping = useCallback52(
5531
5599
  async ({ shortName, service }) => {
5532
5600
  const bodyData = {
5533
5601
  short_name: shortName
@@ -5545,7 +5613,7 @@ function useAuthService() {
5545
5613
  },
5546
5614
  [env]
5547
5615
  );
5548
- const getToken = useCallback50(
5616
+ const getToken = useCallback52(
5549
5617
  async ({
5550
5618
  phone,
5551
5619
  name,
@@ -5590,10 +5658,10 @@ function useAuthService() {
5590
5658
  }
5591
5659
 
5592
5660
  // src/services/company-service/index.ts
5593
- import { useCallback as useCallback51 } from "react";
5661
+ import { useCallback as useCallback53 } from "react";
5594
5662
  function useCompanyService() {
5595
5663
  const { env } = useEnv();
5596
- const getCurrentCompany = useCallback51(
5664
+ const getCurrentCompany = useCallback53(
5597
5665
  async (service, extraHeaders) => {
5598
5666
  return await env.requests.get(
5599
5667
  "/company" /* COMPANY_PATH */,
@@ -5610,7 +5678,7 @@ function useCompanyService() {
5610
5678
  },
5611
5679
  [env]
5612
5680
  );
5613
- const getInfoCompany = useCallback51(
5681
+ const getInfoCompany = useCallback53(
5614
5682
  async (id, service) => {
5615
5683
  const jsonData = {
5616
5684
  ids: [id],
@@ -5646,10 +5714,10 @@ function useCompanyService() {
5646
5714
  }
5647
5715
 
5648
5716
  // src/services/excel-service/index.ts
5649
- import { useCallback as useCallback52 } from "react";
5717
+ import { useCallback as useCallback54 } from "react";
5650
5718
  function useExcelService() {
5651
5719
  const { env } = useEnv();
5652
- const uploadFileExcel = useCallback52(
5720
+ const uploadFileExcel = useCallback54(
5653
5721
  async ({
5654
5722
  formData,
5655
5723
  service,
@@ -5666,7 +5734,7 @@ function useExcelService() {
5666
5734
  },
5667
5735
  [env]
5668
5736
  );
5669
- const uploadIdFile = useCallback52(
5737
+ const uploadIdFile = useCallback54(
5670
5738
  async ({
5671
5739
  formData,
5672
5740
  service,
@@ -5683,7 +5751,7 @@ function useExcelService() {
5683
5751
  },
5684
5752
  [env]
5685
5753
  );
5686
- const parsePreview = useCallback52(
5754
+ const parsePreview = useCallback54(
5687
5755
  async ({
5688
5756
  id,
5689
5757
  selectedSheet,
@@ -5732,7 +5800,7 @@ function useExcelService() {
5732
5800
  },
5733
5801
  [env]
5734
5802
  );
5735
- const executeImport = useCallback52(
5803
+ const executeImport = useCallback54(
5736
5804
  async ({
5737
5805
  columns,
5738
5806
  fields,
@@ -5766,7 +5834,7 @@ function useExcelService() {
5766
5834
  },
5767
5835
  [env]
5768
5836
  );
5769
- const getFileExcel = useCallback52(
5837
+ const getFileExcel = useCallback54(
5770
5838
  async ({
5771
5839
  model,
5772
5840
  service,
@@ -5790,7 +5858,7 @@ function useExcelService() {
5790
5858
  },
5791
5859
  [env]
5792
5860
  );
5793
- const getFieldExport = useCallback52(
5861
+ const getFieldExport = useCallback54(
5794
5862
  async ({
5795
5863
  ids,
5796
5864
  model,
@@ -5830,7 +5898,7 @@ function useExcelService() {
5830
5898
  },
5831
5899
  [env]
5832
5900
  );
5833
- const exportExcel = useCallback52(
5901
+ const exportExcel = useCallback54(
5834
5902
  async ({
5835
5903
  model,
5836
5904
  domain,
@@ -5878,10 +5946,10 @@ function useExcelService() {
5878
5946
  }
5879
5947
 
5880
5948
  // src/services/form-service/index.ts
5881
- import { useCallback as useCallback53 } from "react";
5949
+ import { useCallback as useCallback55 } from "react";
5882
5950
  function useFormService() {
5883
5951
  const { env } = useEnv();
5884
- const getComment = useCallback53(
5952
+ const getComment = useCallback55(
5885
5953
  async ({ data }) => {
5886
5954
  const jsonData = {
5887
5955
  thread_id: data.thread_id,
@@ -5899,7 +5967,7 @@ function useFormService() {
5899
5967
  },
5900
5968
  [env]
5901
5969
  );
5902
- const getThreadData = useCallback53(
5970
+ const getThreadData = useCallback55(
5903
5971
  async ({
5904
5972
  data,
5905
5973
  xNode,
@@ -5926,7 +5994,7 @@ function useFormService() {
5926
5994
  },
5927
5995
  [env]
5928
5996
  );
5929
- const getThreadMessages = useCallback53(
5997
+ const getThreadMessages = useCallback55(
5930
5998
  async ({
5931
5999
  data,
5932
6000
  xNode,
@@ -5952,7 +6020,7 @@ function useFormService() {
5952
6020
  },
5953
6021
  [env]
5954
6022
  );
5955
- const sentComment = useCallback53(
6023
+ const sentComment = useCallback55(
5956
6024
  async ({ data }) => {
5957
6025
  const jsonData = {
5958
6026
  context: {
@@ -5980,7 +6048,7 @@ function useFormService() {
5980
6048
  },
5981
6049
  [env]
5982
6050
  );
5983
- const deleteComment = useCallback53(
6051
+ const deleteComment = useCallback55(
5984
6052
  async ({ data }) => {
5985
6053
  const jsonData = {
5986
6054
  attachment_ids: [],
@@ -5996,7 +6064,7 @@ function useFormService() {
5996
6064
  },
5997
6065
  [env]
5998
6066
  );
5999
- const getImage = useCallback53(
6067
+ const getImage = useCallback55(
6000
6068
  async ({ data }) => {
6001
6069
  return env.requests.get(
6002
6070
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -6009,7 +6077,7 @@ function useFormService() {
6009
6077
  },
6010
6078
  [env]
6011
6079
  );
6012
- const uploadImage = useCallback53(
6080
+ const uploadImage = useCallback55(
6013
6081
  async ({
6014
6082
  formData,
6015
6083
  service,
@@ -6028,7 +6096,7 @@ function useFormService() {
6028
6096
  },
6029
6097
  [env]
6030
6098
  );
6031
- const uploadFile = useCallback53(
6099
+ const uploadFile = useCallback55(
6032
6100
  async ({
6033
6101
  formData,
6034
6102
  service,
@@ -6048,7 +6116,7 @@ function useFormService() {
6048
6116
  },
6049
6117
  [env]
6050
6118
  );
6051
- const getFormView = useCallback53(
6119
+ const getFormView = useCallback55(
6052
6120
  async ({ data }) => {
6053
6121
  const jsonData = {
6054
6122
  model: data.model,
@@ -6064,7 +6132,7 @@ function useFormService() {
6064
6132
  },
6065
6133
  [env]
6066
6134
  );
6067
- const changeStatus = useCallback53(
6135
+ const changeStatus = useCallback55(
6068
6136
  async ({ data }) => {
6069
6137
  const vals = {
6070
6138
  [data.name]: data.stage_id
@@ -6093,7 +6161,7 @@ function useFormService() {
6093
6161
  },
6094
6162
  [env]
6095
6163
  );
6096
- const getExternalTab = useCallback53(
6164
+ const getExternalTab = useCallback55(
6097
6165
  async ({ method, context, service, xNode }) => {
6098
6166
  return env?.requests?.post(
6099
6167
  "/call" /* CALL_PATH */,
@@ -6128,10 +6196,10 @@ function useFormService() {
6128
6196
  }
6129
6197
 
6130
6198
  // src/services/kanban-service/index.ts
6131
- import { useCallback as useCallback54 } from "react";
6199
+ import { useCallback as useCallback56 } from "react";
6132
6200
  function useKanbanService() {
6133
6201
  const { env } = useEnv();
6134
- const getGroups = useCallback54(
6202
+ const getGroups = useCallback56(
6135
6203
  async ({ model, width_context }) => {
6136
6204
  const jsonData = {
6137
6205
  model,
@@ -6151,7 +6219,7 @@ function useKanbanService() {
6151
6219
  },
6152
6220
  [env]
6153
6221
  );
6154
- const getProgressBar = useCallback54(
6222
+ const getProgressBar = useCallback56(
6155
6223
  async ({ field, color, model, width_context }) => {
6156
6224
  const jsonData = {
6157
6225
  model,
@@ -6181,10 +6249,10 @@ function useKanbanService() {
6181
6249
  }
6182
6250
 
6183
6251
  // src/services/model-service/index.ts
6184
- import { useCallback as useCallback55 } from "react";
6252
+ import { useCallback as useCallback57 } from "react";
6185
6253
  function useModelService() {
6186
6254
  const { env } = useEnv();
6187
- const getListMyBankAccount = useCallback55(
6255
+ const getListMyBankAccount = useCallback57(
6188
6256
  async ({
6189
6257
  domain,
6190
6258
  spectification,
@@ -6208,7 +6276,7 @@ function useModelService() {
6208
6276
  },
6209
6277
  [env]
6210
6278
  );
6211
- const getCurrency = useCallback55(async () => {
6279
+ const getCurrency = useCallback57(async () => {
6212
6280
  const jsonData = {
6213
6281
  model: "res.currency",
6214
6282
  method: "web_search_read",
@@ -6228,7 +6296,7 @@ function useModelService() {
6228
6296
  }
6229
6297
  });
6230
6298
  }, [env]);
6231
- const getConversionRate = useCallback55(async () => {
6299
+ const getConversionRate = useCallback57(async () => {
6232
6300
  const jsonData = {
6233
6301
  model: "res.currency",
6234
6302
  method: "web_search_read",
@@ -6254,7 +6322,7 @@ function useModelService() {
6254
6322
  }
6255
6323
  });
6256
6324
  }, [env]);
6257
- const getAll = useCallback55(
6325
+ const getAll = useCallback57(
6258
6326
  async ({
6259
6327
  data,
6260
6328
  service,
@@ -6296,7 +6364,7 @@ function useModelService() {
6296
6364
  },
6297
6365
  [env]
6298
6366
  );
6299
- const getListCalendar = useCallback55(
6367
+ const getListCalendar = useCallback57(
6300
6368
  async ({ data }) => {
6301
6369
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
6302
6370
  fields: data.fields,
@@ -6327,7 +6395,7 @@ function useModelService() {
6327
6395
  },
6328
6396
  [env]
6329
6397
  );
6330
- const getList = useCallback55(
6398
+ const getList = useCallback57(
6331
6399
  async ({
6332
6400
  model,
6333
6401
  ids = [],
@@ -6359,7 +6427,7 @@ function useModelService() {
6359
6427
  },
6360
6428
  [env]
6361
6429
  );
6362
- const getDetail = useCallback55(
6430
+ const getDetail = useCallback57(
6363
6431
  async ({
6364
6432
  ids = [],
6365
6433
  model,
@@ -6391,7 +6459,7 @@ function useModelService() {
6391
6459
  },
6392
6460
  [env]
6393
6461
  );
6394
- const save = useCallback55(
6462
+ const save = useCallback57(
6395
6463
  async ({
6396
6464
  model,
6397
6465
  ids = [],
@@ -6426,7 +6494,7 @@ function useModelService() {
6426
6494
  },
6427
6495
  [env]
6428
6496
  );
6429
- const deleteApi = useCallback55(
6497
+ const deleteApi = useCallback57(
6430
6498
  async ({ ids = [], model, service }) => {
6431
6499
  const jsonData = {
6432
6500
  model,
@@ -6446,7 +6514,7 @@ function useModelService() {
6446
6514
  },
6447
6515
  [env]
6448
6516
  );
6449
- const onChange = useCallback55(
6517
+ const onChange = useCallback57(
6450
6518
  async ({
6451
6519
  ids = [],
6452
6520
  model,
@@ -6482,7 +6550,7 @@ function useModelService() {
6482
6550
  },
6483
6551
  [env]
6484
6552
  );
6485
- const getListFieldsOnchange = useCallback55(
6553
+ const getListFieldsOnchange = useCallback57(
6486
6554
  async ({
6487
6555
  model,
6488
6556
  service,
@@ -6506,7 +6574,7 @@ function useModelService() {
6506
6574
  },
6507
6575
  [env]
6508
6576
  );
6509
- const parseORMOdoo = useCallback55((data) => {
6577
+ const parseORMOdoo = useCallback57((data) => {
6510
6578
  for (const key in data) {
6511
6579
  if (key === "display_name") {
6512
6580
  delete data[key];
@@ -6517,7 +6585,7 @@ function useModelService() {
6517
6585
  }
6518
6586
  return { ...data };
6519
6587
  }, []);
6520
- const toDataJS = useCallback55(
6588
+ const toDataJS = useCallback57(
6521
6589
  (data, viewData, model) => {
6522
6590
  for (const key in data) {
6523
6591
  if (data[key] === false) {
@@ -6575,10 +6643,10 @@ function useModelService() {
6575
6643
  }
6576
6644
 
6577
6645
  // src/services/user-service/index.ts
6578
- import { useCallback as useCallback56 } from "react";
6646
+ import { useCallback as useCallback58 } from "react";
6579
6647
  function useUserService() {
6580
6648
  const { env } = useEnv();
6581
- const getProfile = useCallback56(
6649
+ const getProfile = useCallback58(
6582
6650
  async (service, path, extraHeaders) => {
6583
6651
  return env?.requests?.get(
6584
6652
  path || "/userinfo" /* PROFILE_PATH */,
@@ -6595,7 +6663,7 @@ function useUserService() {
6595
6663
  },
6596
6664
  [env]
6597
6665
  );
6598
- const getUser = useCallback56(
6666
+ const getUser = useCallback58(
6599
6667
  async ({ context, id }) => {
6600
6668
  const jsonData = {
6601
6669
  model: "res.users",
@@ -6633,7 +6701,7 @@ function useUserService() {
6633
6701
  },
6634
6702
  [env]
6635
6703
  );
6636
- const switchUserLocale = useCallback56(
6704
+ const switchUserLocale = useCallback58(
6637
6705
  async ({ id, values, service }) => {
6638
6706
  const jsonData = {
6639
6707
  model: "res.users",
@@ -6661,10 +6729,10 @@ function useUserService() {
6661
6729
  }
6662
6730
 
6663
6731
  // src/services/view-service/index.ts
6664
- import { useCallback as useCallback57 } from "react";
6732
+ import { useCallback as useCallback59 } from "react";
6665
6733
  function useViewService() {
6666
6734
  const { env } = useEnv();
6667
- const getView = useCallback57(
6735
+ const getView = useCallback59(
6668
6736
  async ({
6669
6737
  model,
6670
6738
  views,
@@ -6704,7 +6772,7 @@ function useViewService() {
6704
6772
  },
6705
6773
  [env]
6706
6774
  );
6707
- const getMenu = useCallback57(
6775
+ const getMenu = useCallback59(
6708
6776
  async (context, specification, domain, service) => {
6709
6777
  const jsonData = {
6710
6778
  model: "ir.ui.menu" /* MENU */,
@@ -6735,7 +6803,7 @@ function useViewService() {
6735
6803
  },
6736
6804
  [env]
6737
6805
  );
6738
- const getActionDetail = useCallback57(
6806
+ const getActionDetail = useCallback59(
6739
6807
  async (aid, context) => {
6740
6808
  const jsonData = {
6741
6809
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -6765,7 +6833,7 @@ function useViewService() {
6765
6833
  },
6766
6834
  [env]
6767
6835
  );
6768
- const getResequence = useCallback57(
6836
+ const getResequence = useCallback59(
6769
6837
  async ({
6770
6838
  model,
6771
6839
  ids,
@@ -6795,7 +6863,7 @@ function useViewService() {
6795
6863
  },
6796
6864
  [env]
6797
6865
  );
6798
- const getSelectionItem = useCallback57(
6866
+ const getSelectionItem = useCallback59(
6799
6867
  async ({
6800
6868
  data,
6801
6869
  service,
@@ -6832,7 +6900,7 @@ function useViewService() {
6832
6900
  },
6833
6901
  [env]
6834
6902
  );
6835
- const loadMessages = useCallback57(async () => {
6903
+ const loadMessages = useCallback59(async () => {
6836
6904
  return env.requests.post(
6837
6905
  "/load_message_failures" /* LOAD_MESSAGE */,
6838
6906
  {},
@@ -6843,14 +6911,14 @@ function useViewService() {
6843
6911
  }
6844
6912
  );
6845
6913
  }, [env]);
6846
- const getVersion = useCallback57(async () => {
6914
+ const getVersion = useCallback59(async () => {
6847
6915
  return env?.requests?.get("", {
6848
6916
  headers: {
6849
6917
  "Content-Type": "application/json"
6850
6918
  }
6851
6919
  });
6852
6920
  }, [env]);
6853
- const grantAccess = useCallback57(
6921
+ const grantAccess = useCallback59(
6854
6922
  async ({
6855
6923
  redirect_uri,
6856
6924
  state,
@@ -6877,7 +6945,7 @@ function useViewService() {
6877
6945
  },
6878
6946
  [env]
6879
6947
  );
6880
- const removeTotpSetUp = useCallback57(
6948
+ const removeTotpSetUp = useCallback59(
6881
6949
  async ({ method, token }) => {
6882
6950
  const jsonData = {
6883
6951
  method,
@@ -6898,7 +6966,7 @@ function useViewService() {
6898
6966
  },
6899
6967
  [env]
6900
6968
  );
6901
- const requestSetupTotp = useCallback57(
6969
+ const requestSetupTotp = useCallback59(
6902
6970
  async ({ method, token }) => {
6903
6971
  const jsonData = {
6904
6972
  method,
@@ -6917,7 +6985,7 @@ function useViewService() {
6917
6985
  },
6918
6986
  [env]
6919
6987
  );
6920
- const settingsWebRead2fa = useCallback57(
6988
+ const settingsWebRead2fa = useCallback59(
6921
6989
  async ({
6922
6990
  method,
6923
6991
  model,
@@ -6945,7 +7013,7 @@ function useViewService() {
6945
7013
  },
6946
7014
  [env]
6947
7015
  );
6948
- const signInSSO = useCallback57(
7016
+ const signInSSO = useCallback59(
6949
7017
  async ({
6950
7018
  redirect_uri,
6951
7019
  state,
@@ -6977,7 +7045,7 @@ function useViewService() {
6977
7045
  },
6978
7046
  [env]
6979
7047
  );
6980
- const verify2FA = useCallback57(
7048
+ const verify2FA = useCallback59(
6981
7049
  ({
6982
7050
  method,
6983
7051
  with_context,
@@ -7010,7 +7078,7 @@ function useViewService() {
7010
7078
  },
7011
7079
  [env]
7012
7080
  );
7013
- const get2FAMethods = useCallback57(
7081
+ const get2FAMethods = useCallback59(
7014
7082
  ({ method, with_context }) => {
7015
7083
  const jsonData = {
7016
7084
  method,
@@ -7029,7 +7097,7 @@ function useViewService() {
7029
7097
  },
7030
7098
  [env]
7031
7099
  );
7032
- const verifyTotp = useCallback57(
7100
+ const verifyTotp = useCallback59(
7033
7101
  ({
7034
7102
  method,
7035
7103
  action_token,
@@ -7054,7 +7122,7 @@ function useViewService() {
7054
7122
  },
7055
7123
  [env]
7056
7124
  );
7057
- const getNotifications = useCallback57(
7125
+ const getNotifications = useCallback59(
7058
7126
  async ({
7059
7127
  service,
7060
7128
  xNode,
@@ -7074,7 +7142,7 @@ function useViewService() {
7074
7142
  },
7075
7143
  [env]
7076
7144
  );
7077
- const getCountry = useCallback57(
7145
+ const getCountry = useCallback59(
7078
7146
  async ({
7079
7147
  service,
7080
7148
  xNode,
@@ -7101,7 +7169,7 @@ function useViewService() {
7101
7169
  },
7102
7170
  [env]
7103
7171
  );
7104
- const getCity = useCallback57(
7172
+ const getCity = useCallback59(
7105
7173
  async ({
7106
7174
  service,
7107
7175
  xNode,
@@ -7128,7 +7196,7 @@ function useViewService() {
7128
7196
  },
7129
7197
  [env]
7130
7198
  );
7131
- const getWard = useCallback57(
7199
+ const getWard = useCallback59(
7132
7200
  async ({
7133
7201
  service,
7134
7202
  xNode,
@@ -7153,7 +7221,7 @@ function useViewService() {
7153
7221
  },
7154
7222
  [env]
7155
7223
  );
7156
- const getPartnerTitle = useCallback57(
7224
+ const getPartnerTitle = useCallback59(
7157
7225
  async ({
7158
7226
  service,
7159
7227
  xNode,
@@ -7205,10 +7273,10 @@ function useViewService() {
7205
7273
  }
7206
7274
 
7207
7275
  // src/services/dashboard-service/index.ts
7208
- import { useCallback as useCallback58 } from "react";
7276
+ import { useCallback as useCallback60 } from "react";
7209
7277
  function useDashboardService() {
7210
7278
  const { env } = useEnv();
7211
- const readGroup = useCallback58(
7279
+ const readGroup = useCallback60(
7212
7280
  async ({
7213
7281
  service,
7214
7282
  xNode,
@@ -7225,7 +7293,7 @@ function useDashboardService() {
7225
7293
  },
7226
7294
  [env]
7227
7295
  );
7228
- const getDataChart = useCallback58(
7296
+ const getDataChart = useCallback60(
7229
7297
  async ({
7230
7298
  service,
7231
7299
  xNode,