@fctc/interface-logic 4.8.4 → 4.8.6

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 useCallback52 } from "react";
2
+ import { useCallback as useCallback55 } from "react";
3
3
 
4
4
  // src/constants/api/uri-constant.ts
5
5
  var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
@@ -4970,42 +4970,16 @@ var createPaymentSupabaseService = () => {
4970
4970
  console.error("Error creating payment:", paymentError);
4971
4971
  return null;
4972
4972
  }
4973
- const { data: orderData, error: orderError } = await supabase.from("orders" /* ORDERS */).select("amount_paid, state").eq("id", values.pos_order_id).single();
4974
- if (orderError) {
4975
- console.error("Error fetching order:", orderError);
4976
- return null;
4977
- }
4978
- const amountPaid = orderData.amount_paid;
4979
- const isComplete = amountPaid >= values.order_total;
4980
- const amountReturn = isComplete ? amountPaid - values.order_total : 0;
4981
- let orderState = orderData.state;
4982
- if (isComplete) {
4983
- const { error: updateError } = await supabase.from("orders" /* ORDERS */).update({
4984
- state: "paid",
4985
- amount_return: amountReturn,
4986
- updated_at: (/* @__PURE__ */ new Date()).toISOString()
4987
- }).eq("id", values.pos_order_id);
4988
- if (updateError) {
4989
- console.error("Error updating order state:", updateError);
4990
- } else {
4991
- orderState = "paid";
4992
- }
4993
- } else if (orderData.state === "new") {
4994
- const { error: updateError } = await supabase.from("orders" /* ORDERS */).update({
4995
- state: "in_paid",
4996
- updated_at: (/* @__PURE__ */ new Date()).toISOString()
4997
- }).eq("id", values.pos_order_id);
4998
- if (!updateError) {
4999
- orderState = "in_paid";
5000
- }
4973
+ const { error: updateError } = await supabase.from("orders" /* ORDERS */).update({
4974
+ state: "paid",
4975
+ updated_at: (/* @__PURE__ */ new Date()).toISOString()
4976
+ }).eq("id", values.pos_order_id);
4977
+ if (updateError) {
4978
+ console.error("Error updating order state:", updateError);
5001
4979
  }
5002
4980
  return {
5003
4981
  id: paymentData.id,
5004
- amount: paymentData.amount,
5005
- amount_paid: amountPaid,
5006
- amount_return: amountReturn,
5007
- is_complete: isComplete,
5008
- order_state: orderState
4982
+ amount: paymentData.amount
5009
4983
  };
5010
4984
  } catch (error) {
5011
4985
  console.error("Error creating payment:", error);
@@ -5019,6 +4993,110 @@ var createPaymentSupabaseService = () => {
5019
4993
  };
5020
4994
  };
5021
4995
 
4996
+ // src/services/pos-service/supabase/create-customer.ts
4997
+ import { useCallback as useCallback52 } from "react";
4998
+ var createCustomerSupabaseService = () => {
4999
+ const supabase = useSupabaseOptional();
5000
+ const createCustomerSupabase = useCallback52(
5001
+ async (values) => {
5002
+ if (!supabase) {
5003
+ console.error("Supabase client not initialized");
5004
+ return null;
5005
+ }
5006
+ try {
5007
+ const insertData = cleanObject({
5008
+ name: values.name,
5009
+ phone: values.phone,
5010
+ email: values.email,
5011
+ address: values.address,
5012
+ street2: values.street2,
5013
+ city: values.city,
5014
+ birth_date: values.birth_date,
5015
+ country_id: values.country_id,
5016
+ state_id: values.state_id,
5017
+ ward_id: values.ward_id
5018
+ });
5019
+ const { data, error } = await supabase.from("customers" /* CUSTOMERS */).insert(insertData).select("id, name").single();
5020
+ if (error) {
5021
+ console.error("Error creating customer:", error);
5022
+ return null;
5023
+ }
5024
+ return [[data.id, data.name]];
5025
+ } catch (error) {
5026
+ console.error("Error creating customer:", error);
5027
+ return null;
5028
+ }
5029
+ },
5030
+ [supabase]
5031
+ );
5032
+ return {
5033
+ createCustomerSupabase
5034
+ };
5035
+ };
5036
+
5037
+ // src/services/pos-service/supabase/update-customer.ts
5038
+ import { useCallback as useCallback53 } from "react";
5039
+ var updateCustomerSupabaseService = () => {
5040
+ const supabase = useSupabaseOptional();
5041
+ const updateCustomerSupabase = useCallback53(
5042
+ async (values) => {
5043
+ if (!supabase) {
5044
+ console.error("Supabase client not initialized");
5045
+ return null;
5046
+ }
5047
+ try {
5048
+ const { customer_id, ...rest } = values;
5049
+ const updateData = cleanObject({
5050
+ ...rest,
5051
+ write_date: (/* @__PURE__ */ new Date()).toISOString()
5052
+ });
5053
+ const { data, error } = await supabase.from("customers" /* CUSTOMERS */).update(updateData).eq("id", customer_id).select("id").single();
5054
+ if (error) {
5055
+ console.error("Error updating customer:", error);
5056
+ return null;
5057
+ }
5058
+ return [data.id];
5059
+ } catch (error) {
5060
+ console.error("Error updating customer:", error);
5061
+ return null;
5062
+ }
5063
+ },
5064
+ [supabase]
5065
+ );
5066
+ return {
5067
+ updateCustomerSupabase
5068
+ };
5069
+ };
5070
+
5071
+ // src/services/pos-service/supabase/delete-customer.ts
5072
+ import { useCallback as useCallback54 } from "react";
5073
+ var deleteCustomerSupabaseService = () => {
5074
+ const supabase = useSupabaseOptional();
5075
+ const deleteCustomerSupabase = useCallback54(
5076
+ async (values) => {
5077
+ if (!supabase) {
5078
+ console.error("Supabase client not initialized");
5079
+ return null;
5080
+ }
5081
+ try {
5082
+ const { error } = await supabase.from("customers" /* CUSTOMERS */).delete().eq("id", values.customer_id);
5083
+ if (error) {
5084
+ console.error("Error deleting customer:", error);
5085
+ return null;
5086
+ }
5087
+ return [values.customer_id];
5088
+ } catch (error) {
5089
+ console.error("Error deleting customer:", error);
5090
+ return null;
5091
+ }
5092
+ },
5093
+ [supabase]
5094
+ );
5095
+ return {
5096
+ deleteCustomerSupabase
5097
+ };
5098
+ };
5099
+
5022
5100
  // src/services/pos-service/index.ts
5023
5101
  var serviceFactories = [
5024
5102
  addEntityService,
@@ -5069,7 +5147,10 @@ var serviceFactories = [
5069
5147
  getFunctionalModulesService,
5070
5148
  addPaymentMethodSupabaseService,
5071
5149
  updateSessionPaymentMethodsSupabaseService,
5072
- createPaymentSupabaseService
5150
+ createPaymentSupabaseService,
5151
+ createCustomerSupabaseService,
5152
+ updateCustomerSupabaseService,
5153
+ deleteCustomerSupabaseService
5073
5154
  ];
5074
5155
  var usePosService = () => {
5075
5156
  const { env } = useEnv();
@@ -5225,6 +5306,15 @@ import { useMutation as useMutation105 } from "@tanstack/react-query";
5225
5306
  // src/hooks/pos/supabase/use-create-payment.ts
5226
5307
  import { useMutation as useMutation106 } from "@tanstack/react-query";
5227
5308
 
5309
+ // src/hooks/pos/supabase/use-create-customer.ts
5310
+ import { useMutation as useMutation107 } from "@tanstack/react-query";
5311
+
5312
+ // src/hooks/pos/supabase/use-update-customer.ts
5313
+ import { useMutation as useMutation108 } from "@tanstack/react-query";
5314
+
5315
+ // src/hooks/pos/supabase/use-delete-customer.ts
5316
+ import { useMutation as useMutation109 } from "@tanstack/react-query";
5317
+
5228
5318
  // src/provider/service-provider.tsx
5229
5319
  import { jsx as jsx7 } from "react/jsx-runtime";
5230
5320
  var ServiceContext = createContext3(null);
@@ -5236,7 +5326,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
5236
5326
  // src/services/action-service/index.ts
5237
5327
  function useActionService() {
5238
5328
  const { env } = useEnv();
5239
- const loadAction = useCallback52(
5329
+ const loadAction = useCallback55(
5240
5330
  async ({
5241
5331
  idAction,
5242
5332
  context,
@@ -5260,7 +5350,7 @@ function useActionService() {
5260
5350
  },
5261
5351
  [env]
5262
5352
  );
5263
- const callButton = useCallback52(
5353
+ const callButton = useCallback55(
5264
5354
  async ({
5265
5355
  model,
5266
5356
  ids = [],
@@ -5294,7 +5384,7 @@ function useActionService() {
5294
5384
  },
5295
5385
  [env]
5296
5386
  );
5297
- const removeRows = useCallback52(
5387
+ const removeRows = useCallback55(
5298
5388
  async ({
5299
5389
  model,
5300
5390
  ids,
@@ -5320,7 +5410,7 @@ function useActionService() {
5320
5410
  },
5321
5411
  [env]
5322
5412
  );
5323
- const duplicateRecord = useCallback52(
5413
+ const duplicateRecord = useCallback55(
5324
5414
  async ({
5325
5415
  model,
5326
5416
  id,
@@ -5346,7 +5436,7 @@ function useActionService() {
5346
5436
  },
5347
5437
  [env]
5348
5438
  );
5349
- const getPrintReportName = useCallback52(
5439
+ const getPrintReportName = useCallback55(
5350
5440
  async ({ id }) => {
5351
5441
  const jsonData = {
5352
5442
  model: "ir.actions.report",
@@ -5364,7 +5454,7 @@ function useActionService() {
5364
5454
  },
5365
5455
  [env]
5366
5456
  );
5367
- const print = useCallback52(
5457
+ const print = useCallback55(
5368
5458
  async ({ id, report, db }) => {
5369
5459
  const jsonData = {
5370
5460
  report,
@@ -5382,7 +5472,7 @@ function useActionService() {
5382
5472
  },
5383
5473
  [env]
5384
5474
  );
5385
- const runAction = useCallback52(
5475
+ const runAction = useCallback55(
5386
5476
  async ({
5387
5477
  idAction,
5388
5478
  context,
@@ -5409,7 +5499,7 @@ function useActionService() {
5409
5499
  },
5410
5500
  [env]
5411
5501
  );
5412
- const generateSerialNumber = useCallback52(
5502
+ const generateSerialNumber = useCallback55(
5413
5503
  async ({
5414
5504
  kwargs,
5415
5505
  context,
@@ -5447,11 +5537,11 @@ function useActionService() {
5447
5537
  }
5448
5538
 
5449
5539
  // src/services/auth-service/index.ts
5450
- import { useCallback as useCallback53 } from "react";
5540
+ import { useCallback as useCallback56 } from "react";
5451
5541
  function useAuthService() {
5452
5542
  const { env } = useEnv();
5453
5543
  const supabase = useSupabaseOptional();
5454
- const login = useCallback53(
5544
+ const login = useCallback56(
5455
5545
  async (body) => {
5456
5546
  const payload = Object.fromEntries(
5457
5547
  Object.entries({
@@ -5476,7 +5566,7 @@ function useAuthService() {
5476
5566
  },
5477
5567
  [env]
5478
5568
  );
5479
- const loginSupabase = useCallback53(
5569
+ const loginSupabase = useCallback56(
5480
5570
  async (body) => {
5481
5571
  if (!supabase) {
5482
5572
  return {
@@ -5492,7 +5582,7 @@ function useAuthService() {
5492
5582
  },
5493
5583
  [supabase]
5494
5584
  );
5495
- const forgotPassword = useCallback53(
5585
+ const forgotPassword = useCallback56(
5496
5586
  async (email) => {
5497
5587
  const bodyData = {
5498
5588
  login: email,
@@ -5506,7 +5596,7 @@ function useAuthService() {
5506
5596
  },
5507
5597
  [env]
5508
5598
  );
5509
- const forgotPasswordSSO = useCallback53(
5599
+ const forgotPasswordSSO = useCallback56(
5510
5600
  async ({
5511
5601
  email,
5512
5602
  with_context,
@@ -5529,7 +5619,7 @@ function useAuthService() {
5529
5619
  },
5530
5620
  [env]
5531
5621
  );
5532
- const resetPassword = useCallback53(
5622
+ const resetPassword = useCallback56(
5533
5623
  async (data, token) => {
5534
5624
  const bodyData = {
5535
5625
  token,
@@ -5544,7 +5634,7 @@ function useAuthService() {
5544
5634
  },
5545
5635
  [env]
5546
5636
  );
5547
- const resetPasswordSSO = useCallback53(
5637
+ const resetPasswordSSO = useCallback56(
5548
5638
  async ({
5549
5639
  method,
5550
5640
  password,
@@ -5567,7 +5657,7 @@ function useAuthService() {
5567
5657
  },
5568
5658
  [env]
5569
5659
  );
5570
- const updatePassword = useCallback53(
5660
+ const updatePassword = useCallback56(
5571
5661
  async (data, token) => {
5572
5662
  const bodyData = {
5573
5663
  token,
@@ -5582,7 +5672,7 @@ function useAuthService() {
5582
5672
  },
5583
5673
  [env]
5584
5674
  );
5585
- const isValidToken = useCallback53(
5675
+ const isValidToken = useCallback56(
5586
5676
  async (token) => {
5587
5677
  const bodyData = {
5588
5678
  token
@@ -5595,7 +5685,7 @@ function useAuthService() {
5595
5685
  },
5596
5686
  [env]
5597
5687
  );
5598
- const isValidActionToken = useCallback53(
5688
+ const isValidActionToken = useCallback56(
5599
5689
  async (actionToken) => {
5600
5690
  const bodyData = {};
5601
5691
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -5608,7 +5698,7 @@ function useAuthService() {
5608
5698
  },
5609
5699
  [env]
5610
5700
  );
5611
- const loginSocial = useCallback53(
5701
+ const loginSocial = useCallback56(
5612
5702
  async ({
5613
5703
  db,
5614
5704
  state,
@@ -5626,13 +5716,13 @@ function useAuthService() {
5626
5716
  },
5627
5717
  [env]
5628
5718
  );
5629
- const getProviders = useCallback53(
5719
+ const getProviders = useCallback56(
5630
5720
  async (db) => {
5631
5721
  return env?.requests?.get("/oauth/providers", { params: { db } });
5632
5722
  },
5633
5723
  [env]
5634
5724
  );
5635
- const getAccessByCode = useCallback53(
5725
+ const getAccessByCode = useCallback56(
5636
5726
  async (code) => {
5637
5727
  const data = new URLSearchParams();
5638
5728
  data.append("code", code);
@@ -5652,7 +5742,7 @@ function useAuthService() {
5652
5742
  },
5653
5743
  [env]
5654
5744
  );
5655
- const logout = useCallback53(
5745
+ const logout = useCallback56(
5656
5746
  async (service) => {
5657
5747
  return env?.requests?.post(
5658
5748
  "/logout" /* LOGOUT */,
@@ -5669,7 +5759,7 @@ function useAuthService() {
5669
5759
  },
5670
5760
  [env]
5671
5761
  );
5672
- const getTenantMapping = useCallback53(
5762
+ const getTenantMapping = useCallback56(
5673
5763
  async ({ shortName, service }) => {
5674
5764
  const bodyData = {
5675
5765
  short_name: shortName
@@ -5687,7 +5777,7 @@ function useAuthService() {
5687
5777
  },
5688
5778
  [env]
5689
5779
  );
5690
- const getToken = useCallback53(
5780
+ const getToken = useCallback56(
5691
5781
  async ({
5692
5782
  phone,
5693
5783
  name,
@@ -5732,10 +5822,10 @@ function useAuthService() {
5732
5822
  }
5733
5823
 
5734
5824
  // src/services/company-service/index.ts
5735
- import { useCallback as useCallback54 } from "react";
5825
+ import { useCallback as useCallback57 } from "react";
5736
5826
  function useCompanyService() {
5737
5827
  const { env } = useEnv();
5738
- const getCurrentCompany = useCallback54(
5828
+ const getCurrentCompany = useCallback57(
5739
5829
  async (service, extraHeaders) => {
5740
5830
  return await env.requests.get(
5741
5831
  "/company" /* COMPANY_PATH */,
@@ -5752,7 +5842,7 @@ function useCompanyService() {
5752
5842
  },
5753
5843
  [env]
5754
5844
  );
5755
- const getInfoCompany = useCallback54(
5845
+ const getInfoCompany = useCallback57(
5756
5846
  async (id, service) => {
5757
5847
  const jsonData = {
5758
5848
  ids: [id],
@@ -5788,10 +5878,10 @@ function useCompanyService() {
5788
5878
  }
5789
5879
 
5790
5880
  // src/services/excel-service/index.ts
5791
- import { useCallback as useCallback55 } from "react";
5881
+ import { useCallback as useCallback58 } from "react";
5792
5882
  function useExcelService() {
5793
5883
  const { env } = useEnv();
5794
- const uploadFileExcel = useCallback55(
5884
+ const uploadFileExcel = useCallback58(
5795
5885
  async ({
5796
5886
  formData,
5797
5887
  service,
@@ -5808,7 +5898,7 @@ function useExcelService() {
5808
5898
  },
5809
5899
  [env]
5810
5900
  );
5811
- const uploadIdFile = useCallback55(
5901
+ const uploadIdFile = useCallback58(
5812
5902
  async ({
5813
5903
  formData,
5814
5904
  service,
@@ -5825,7 +5915,7 @@ function useExcelService() {
5825
5915
  },
5826
5916
  [env]
5827
5917
  );
5828
- const parsePreview = useCallback55(
5918
+ const parsePreview = useCallback58(
5829
5919
  async ({
5830
5920
  id,
5831
5921
  selectedSheet,
@@ -5874,7 +5964,7 @@ function useExcelService() {
5874
5964
  },
5875
5965
  [env]
5876
5966
  );
5877
- const executeImport = useCallback55(
5967
+ const executeImport = useCallback58(
5878
5968
  async ({
5879
5969
  columns,
5880
5970
  fields,
@@ -5908,7 +5998,7 @@ function useExcelService() {
5908
5998
  },
5909
5999
  [env]
5910
6000
  );
5911
- const getFileExcel = useCallback55(
6001
+ const getFileExcel = useCallback58(
5912
6002
  async ({
5913
6003
  model,
5914
6004
  service,
@@ -5932,7 +6022,7 @@ function useExcelService() {
5932
6022
  },
5933
6023
  [env]
5934
6024
  );
5935
- const getFieldExport = useCallback55(
6025
+ const getFieldExport = useCallback58(
5936
6026
  async ({
5937
6027
  ids,
5938
6028
  model,
@@ -5972,7 +6062,7 @@ function useExcelService() {
5972
6062
  },
5973
6063
  [env]
5974
6064
  );
5975
- const exportExcel = useCallback55(
6065
+ const exportExcel = useCallback58(
5976
6066
  async ({
5977
6067
  model,
5978
6068
  domain,
@@ -6020,10 +6110,10 @@ function useExcelService() {
6020
6110
  }
6021
6111
 
6022
6112
  // src/services/form-service/index.ts
6023
- import { useCallback as useCallback56 } from "react";
6113
+ import { useCallback as useCallback59 } from "react";
6024
6114
  function useFormService() {
6025
6115
  const { env } = useEnv();
6026
- const getComment = useCallback56(
6116
+ const getComment = useCallback59(
6027
6117
  async ({ data }) => {
6028
6118
  const jsonData = {
6029
6119
  thread_id: data.thread_id,
@@ -6041,7 +6131,7 @@ function useFormService() {
6041
6131
  },
6042
6132
  [env]
6043
6133
  );
6044
- const getThreadData = useCallback56(
6134
+ const getThreadData = useCallback59(
6045
6135
  async ({
6046
6136
  data,
6047
6137
  xNode,
@@ -6068,7 +6158,7 @@ function useFormService() {
6068
6158
  },
6069
6159
  [env]
6070
6160
  );
6071
- const getThreadMessages = useCallback56(
6161
+ const getThreadMessages = useCallback59(
6072
6162
  async ({
6073
6163
  data,
6074
6164
  xNode,
@@ -6094,7 +6184,7 @@ function useFormService() {
6094
6184
  },
6095
6185
  [env]
6096
6186
  );
6097
- const sentComment = useCallback56(
6187
+ const sentComment = useCallback59(
6098
6188
  async ({ data }) => {
6099
6189
  const jsonData = {
6100
6190
  context: {
@@ -6122,7 +6212,7 @@ function useFormService() {
6122
6212
  },
6123
6213
  [env]
6124
6214
  );
6125
- const deleteComment = useCallback56(
6215
+ const deleteComment = useCallback59(
6126
6216
  async ({ data }) => {
6127
6217
  const jsonData = {
6128
6218
  attachment_ids: [],
@@ -6138,7 +6228,7 @@ function useFormService() {
6138
6228
  },
6139
6229
  [env]
6140
6230
  );
6141
- const getImage = useCallback56(
6231
+ const getImage = useCallback59(
6142
6232
  async ({ data }) => {
6143
6233
  return env.requests.get(
6144
6234
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -6151,7 +6241,7 @@ function useFormService() {
6151
6241
  },
6152
6242
  [env]
6153
6243
  );
6154
- const uploadImage = useCallback56(
6244
+ const uploadImage = useCallback59(
6155
6245
  async ({
6156
6246
  formData,
6157
6247
  service,
@@ -6170,7 +6260,7 @@ function useFormService() {
6170
6260
  },
6171
6261
  [env]
6172
6262
  );
6173
- const uploadFile = useCallback56(
6263
+ const uploadFile = useCallback59(
6174
6264
  async ({
6175
6265
  formData,
6176
6266
  service,
@@ -6190,7 +6280,7 @@ function useFormService() {
6190
6280
  },
6191
6281
  [env]
6192
6282
  );
6193
- const getFormView = useCallback56(
6283
+ const getFormView = useCallback59(
6194
6284
  async ({ data }) => {
6195
6285
  const jsonData = {
6196
6286
  model: data.model,
@@ -6206,7 +6296,7 @@ function useFormService() {
6206
6296
  },
6207
6297
  [env]
6208
6298
  );
6209
- const changeStatus = useCallback56(
6299
+ const changeStatus = useCallback59(
6210
6300
  async ({ data }) => {
6211
6301
  const vals = {
6212
6302
  [data.name]: data.stage_id
@@ -6235,7 +6325,7 @@ function useFormService() {
6235
6325
  },
6236
6326
  [env]
6237
6327
  );
6238
- const getExternalTab = useCallback56(
6328
+ const getExternalTab = useCallback59(
6239
6329
  async ({ method, context, service, xNode }) => {
6240
6330
  return env?.requests?.post(
6241
6331
  "/call" /* CALL_PATH */,
@@ -6270,10 +6360,10 @@ function useFormService() {
6270
6360
  }
6271
6361
 
6272
6362
  // src/services/kanban-service/index.ts
6273
- import { useCallback as useCallback57 } from "react";
6363
+ import { useCallback as useCallback60 } from "react";
6274
6364
  function useKanbanService() {
6275
6365
  const { env } = useEnv();
6276
- const getGroups = useCallback57(
6366
+ const getGroups = useCallback60(
6277
6367
  async ({ model, width_context }) => {
6278
6368
  const jsonData = {
6279
6369
  model,
@@ -6293,7 +6383,7 @@ function useKanbanService() {
6293
6383
  },
6294
6384
  [env]
6295
6385
  );
6296
- const getProgressBar = useCallback57(
6386
+ const getProgressBar = useCallback60(
6297
6387
  async ({ field, color, model, width_context }) => {
6298
6388
  const jsonData = {
6299
6389
  model,
@@ -6323,10 +6413,10 @@ function useKanbanService() {
6323
6413
  }
6324
6414
 
6325
6415
  // src/services/model-service/index.ts
6326
- import { useCallback as useCallback58 } from "react";
6416
+ import { useCallback as useCallback61 } from "react";
6327
6417
  function useModelService() {
6328
6418
  const { env } = useEnv();
6329
- const getListMyBankAccount = useCallback58(
6419
+ const getListMyBankAccount = useCallback61(
6330
6420
  async ({
6331
6421
  domain,
6332
6422
  spectification,
@@ -6350,7 +6440,7 @@ function useModelService() {
6350
6440
  },
6351
6441
  [env]
6352
6442
  );
6353
- const getCurrency = useCallback58(async () => {
6443
+ const getCurrency = useCallback61(async () => {
6354
6444
  const jsonData = {
6355
6445
  model: "res.currency",
6356
6446
  method: "web_search_read",
@@ -6370,7 +6460,7 @@ function useModelService() {
6370
6460
  }
6371
6461
  });
6372
6462
  }, [env]);
6373
- const getConversionRate = useCallback58(async () => {
6463
+ const getConversionRate = useCallback61(async () => {
6374
6464
  const jsonData = {
6375
6465
  model: "res.currency",
6376
6466
  method: "web_search_read",
@@ -6396,7 +6486,7 @@ function useModelService() {
6396
6486
  }
6397
6487
  });
6398
6488
  }, [env]);
6399
- const getAll = useCallback58(
6489
+ const getAll = useCallback61(
6400
6490
  async ({
6401
6491
  data,
6402
6492
  service,
@@ -6438,7 +6528,7 @@ function useModelService() {
6438
6528
  },
6439
6529
  [env]
6440
6530
  );
6441
- const getListCalendar = useCallback58(
6531
+ const getListCalendar = useCallback61(
6442
6532
  async ({ data }) => {
6443
6533
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
6444
6534
  fields: data.fields,
@@ -6469,7 +6559,7 @@ function useModelService() {
6469
6559
  },
6470
6560
  [env]
6471
6561
  );
6472
- const getList = useCallback58(
6562
+ const getList = useCallback61(
6473
6563
  async ({
6474
6564
  model,
6475
6565
  ids = [],
@@ -6501,7 +6591,7 @@ function useModelService() {
6501
6591
  },
6502
6592
  [env]
6503
6593
  );
6504
- const getDetail = useCallback58(
6594
+ const getDetail = useCallback61(
6505
6595
  async ({
6506
6596
  ids = [],
6507
6597
  model,
@@ -6533,7 +6623,7 @@ function useModelService() {
6533
6623
  },
6534
6624
  [env]
6535
6625
  );
6536
- const save = useCallback58(
6626
+ const save = useCallback61(
6537
6627
  async ({
6538
6628
  model,
6539
6629
  ids = [],
@@ -6568,7 +6658,7 @@ function useModelService() {
6568
6658
  },
6569
6659
  [env]
6570
6660
  );
6571
- const deleteApi = useCallback58(
6661
+ const deleteApi = useCallback61(
6572
6662
  async ({ ids = [], model, service }) => {
6573
6663
  const jsonData = {
6574
6664
  model,
@@ -6588,7 +6678,7 @@ function useModelService() {
6588
6678
  },
6589
6679
  [env]
6590
6680
  );
6591
- const onChange = useCallback58(
6681
+ const onChange = useCallback61(
6592
6682
  async ({
6593
6683
  ids = [],
6594
6684
  model,
@@ -6624,7 +6714,7 @@ function useModelService() {
6624
6714
  },
6625
6715
  [env]
6626
6716
  );
6627
- const getListFieldsOnchange = useCallback58(
6717
+ const getListFieldsOnchange = useCallback61(
6628
6718
  async ({
6629
6719
  model,
6630
6720
  service,
@@ -6648,7 +6738,7 @@ function useModelService() {
6648
6738
  },
6649
6739
  [env]
6650
6740
  );
6651
- const parseORMOdoo = useCallback58((data) => {
6741
+ const parseORMOdoo = useCallback61((data) => {
6652
6742
  for (const key in data) {
6653
6743
  if (key === "display_name") {
6654
6744
  delete data[key];
@@ -6659,7 +6749,7 @@ function useModelService() {
6659
6749
  }
6660
6750
  return { ...data };
6661
6751
  }, []);
6662
- const toDataJS = useCallback58(
6752
+ const toDataJS = useCallback61(
6663
6753
  (data, viewData, model) => {
6664
6754
  for (const key in data) {
6665
6755
  if (data[key] === false) {
@@ -6717,10 +6807,10 @@ function useModelService() {
6717
6807
  }
6718
6808
 
6719
6809
  // src/services/user-service/index.ts
6720
- import { useCallback as useCallback59 } from "react";
6810
+ import { useCallback as useCallback62 } from "react";
6721
6811
  function useUserService() {
6722
6812
  const { env } = useEnv();
6723
- const getProfile = useCallback59(
6813
+ const getProfile = useCallback62(
6724
6814
  async (service, path, extraHeaders) => {
6725
6815
  return env?.requests?.get(
6726
6816
  path || "/userinfo" /* PROFILE_PATH */,
@@ -6737,7 +6827,7 @@ function useUserService() {
6737
6827
  },
6738
6828
  [env]
6739
6829
  );
6740
- const getUser = useCallback59(
6830
+ const getUser = useCallback62(
6741
6831
  async ({ context, id }) => {
6742
6832
  const jsonData = {
6743
6833
  model: "res.users",
@@ -6775,7 +6865,7 @@ function useUserService() {
6775
6865
  },
6776
6866
  [env]
6777
6867
  );
6778
- const switchUserLocale = useCallback59(
6868
+ const switchUserLocale = useCallback62(
6779
6869
  async ({ id, values, service }) => {
6780
6870
  const jsonData = {
6781
6871
  model: "res.users",
@@ -6803,10 +6893,10 @@ function useUserService() {
6803
6893
  }
6804
6894
 
6805
6895
  // src/services/view-service/index.ts
6806
- import { useCallback as useCallback60 } from "react";
6896
+ import { useCallback as useCallback63 } from "react";
6807
6897
  function useViewService() {
6808
6898
  const { env } = useEnv();
6809
- const getView = useCallback60(
6899
+ const getView = useCallback63(
6810
6900
  async ({
6811
6901
  model,
6812
6902
  views,
@@ -6846,7 +6936,7 @@ function useViewService() {
6846
6936
  },
6847
6937
  [env]
6848
6938
  );
6849
- const getMenu = useCallback60(
6939
+ const getMenu = useCallback63(
6850
6940
  async (context, specification, domain, service) => {
6851
6941
  const jsonData = {
6852
6942
  model: "ir.ui.menu" /* MENU */,
@@ -6877,7 +6967,7 @@ function useViewService() {
6877
6967
  },
6878
6968
  [env]
6879
6969
  );
6880
- const getActionDetail = useCallback60(
6970
+ const getActionDetail = useCallback63(
6881
6971
  async (aid, context) => {
6882
6972
  const jsonData = {
6883
6973
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -6907,7 +6997,7 @@ function useViewService() {
6907
6997
  },
6908
6998
  [env]
6909
6999
  );
6910
- const getResequence = useCallback60(
7000
+ const getResequence = useCallback63(
6911
7001
  async ({
6912
7002
  model,
6913
7003
  ids,
@@ -6937,7 +7027,7 @@ function useViewService() {
6937
7027
  },
6938
7028
  [env]
6939
7029
  );
6940
- const getSelectionItem = useCallback60(
7030
+ const getSelectionItem = useCallback63(
6941
7031
  async ({
6942
7032
  data,
6943
7033
  service,
@@ -6974,7 +7064,7 @@ function useViewService() {
6974
7064
  },
6975
7065
  [env]
6976
7066
  );
6977
- const loadMessages = useCallback60(async () => {
7067
+ const loadMessages = useCallback63(async () => {
6978
7068
  return env.requests.post(
6979
7069
  "/load_message_failures" /* LOAD_MESSAGE */,
6980
7070
  {},
@@ -6985,14 +7075,14 @@ function useViewService() {
6985
7075
  }
6986
7076
  );
6987
7077
  }, [env]);
6988
- const getVersion = useCallback60(async () => {
7078
+ const getVersion = useCallback63(async () => {
6989
7079
  return env?.requests?.get("", {
6990
7080
  headers: {
6991
7081
  "Content-Type": "application/json"
6992
7082
  }
6993
7083
  });
6994
7084
  }, [env]);
6995
- const grantAccess = useCallback60(
7085
+ const grantAccess = useCallback63(
6996
7086
  async ({
6997
7087
  redirect_uri,
6998
7088
  state,
@@ -7019,7 +7109,7 @@ function useViewService() {
7019
7109
  },
7020
7110
  [env]
7021
7111
  );
7022
- const removeTotpSetUp = useCallback60(
7112
+ const removeTotpSetUp = useCallback63(
7023
7113
  async ({ method, token }) => {
7024
7114
  const jsonData = {
7025
7115
  method,
@@ -7040,7 +7130,7 @@ function useViewService() {
7040
7130
  },
7041
7131
  [env]
7042
7132
  );
7043
- const requestSetupTotp = useCallback60(
7133
+ const requestSetupTotp = useCallback63(
7044
7134
  async ({ method, token }) => {
7045
7135
  const jsonData = {
7046
7136
  method,
@@ -7059,7 +7149,7 @@ function useViewService() {
7059
7149
  },
7060
7150
  [env]
7061
7151
  );
7062
- const settingsWebRead2fa = useCallback60(
7152
+ const settingsWebRead2fa = useCallback63(
7063
7153
  async ({
7064
7154
  method,
7065
7155
  model,
@@ -7087,7 +7177,7 @@ function useViewService() {
7087
7177
  },
7088
7178
  [env]
7089
7179
  );
7090
- const signInSSO = useCallback60(
7180
+ const signInSSO = useCallback63(
7091
7181
  async ({
7092
7182
  redirect_uri,
7093
7183
  state,
@@ -7119,7 +7209,7 @@ function useViewService() {
7119
7209
  },
7120
7210
  [env]
7121
7211
  );
7122
- const verify2FA = useCallback60(
7212
+ const verify2FA = useCallback63(
7123
7213
  ({
7124
7214
  method,
7125
7215
  with_context,
@@ -7152,7 +7242,7 @@ function useViewService() {
7152
7242
  },
7153
7243
  [env]
7154
7244
  );
7155
- const get2FAMethods = useCallback60(
7245
+ const get2FAMethods = useCallback63(
7156
7246
  ({ method, with_context }) => {
7157
7247
  const jsonData = {
7158
7248
  method,
@@ -7171,7 +7261,7 @@ function useViewService() {
7171
7261
  },
7172
7262
  [env]
7173
7263
  );
7174
- const verifyTotp = useCallback60(
7264
+ const verifyTotp = useCallback63(
7175
7265
  ({
7176
7266
  method,
7177
7267
  action_token,
@@ -7196,7 +7286,7 @@ function useViewService() {
7196
7286
  },
7197
7287
  [env]
7198
7288
  );
7199
- const getNotifications = useCallback60(
7289
+ const getNotifications = useCallback63(
7200
7290
  async ({
7201
7291
  service,
7202
7292
  xNode,
@@ -7216,7 +7306,7 @@ function useViewService() {
7216
7306
  },
7217
7307
  [env]
7218
7308
  );
7219
- const getCountry = useCallback60(
7309
+ const getCountry = useCallback63(
7220
7310
  async ({
7221
7311
  service,
7222
7312
  xNode,
@@ -7243,7 +7333,7 @@ function useViewService() {
7243
7333
  },
7244
7334
  [env]
7245
7335
  );
7246
- const getCity = useCallback60(
7336
+ const getCity = useCallback63(
7247
7337
  async ({
7248
7338
  service,
7249
7339
  xNode,
@@ -7270,7 +7360,7 @@ function useViewService() {
7270
7360
  },
7271
7361
  [env]
7272
7362
  );
7273
- const getWard = useCallback60(
7363
+ const getWard = useCallback63(
7274
7364
  async ({
7275
7365
  service,
7276
7366
  xNode,
@@ -7295,7 +7385,7 @@ function useViewService() {
7295
7385
  },
7296
7386
  [env]
7297
7387
  );
7298
- const getPartnerTitle = useCallback60(
7388
+ const getPartnerTitle = useCallback63(
7299
7389
  async ({
7300
7390
  service,
7301
7391
  xNode,
@@ -7347,10 +7437,10 @@ function useViewService() {
7347
7437
  }
7348
7438
 
7349
7439
  // src/services/dashboard-service/index.ts
7350
- import { useCallback as useCallback61 } from "react";
7440
+ import { useCallback as useCallback64 } from "react";
7351
7441
  function useDashboardService() {
7352
7442
  const { env } = useEnv();
7353
- const readGroup = useCallback61(
7443
+ const readGroup = useCallback64(
7354
7444
  async ({
7355
7445
  service,
7356
7446
  xNode,
@@ -7367,7 +7457,7 @@ function useDashboardService() {
7367
7457
  },
7368
7458
  [env]
7369
7459
  );
7370
- const getDataChart = useCallback61(
7460
+ const getDataChart = useCallback64(
7371
7461
  async ({
7372
7462
  service,
7373
7463
  xNode,