@fctc/interface-logic 4.4.9 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/services.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/services/action-service/index.ts
2
- import { useCallback as useCallback35 } from "react";
2
+ import { useCallback as useCallback39 } from "react";
3
3
 
4
4
  // src/constants/api/uri-constant.ts
5
5
  var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
@@ -4360,6 +4360,191 @@ var completeCurrentStageService = (env) => {
4360
4360
  };
4361
4361
  };
4362
4362
 
4363
+ // src/services/pos-service/supabase/add-floor.ts
4364
+ import { useCallback as useCallback33 } from "react";
4365
+ var addFloorSupabaseService = () => {
4366
+ const supabase = useSupabaseOptional();
4367
+ const addFloorSupabase = useCallback33(
4368
+ async (values) => {
4369
+ if (!supabase) {
4370
+ console.error("Supabase client not initialized");
4371
+ return null;
4372
+ }
4373
+ try {
4374
+ const { data, error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).insert({
4375
+ name: values.name,
4376
+ sequence: values.sequence ?? 1,
4377
+ pos_config_ids: values.pos_config_ids ?? [],
4378
+ table_ids: values.table_ids ?? []
4379
+ }).select("id, name").single();
4380
+ if (error) {
4381
+ console.error("Error adding floor:", error);
4382
+ return null;
4383
+ }
4384
+ return [[data.id, data.name]];
4385
+ } catch (error) {
4386
+ console.error("Error adding floor:", error);
4387
+ return null;
4388
+ }
4389
+ },
4390
+ [supabase]
4391
+ );
4392
+ return {
4393
+ addFloorSupabase
4394
+ };
4395
+ };
4396
+
4397
+ // src/services/pos-service/supabase/add-table.ts
4398
+ import { useCallback as useCallback34 } from "react";
4399
+ var addTableSupabaseService = () => {
4400
+ const supabase = useSupabaseOptional();
4401
+ const addTableSupabase = useCallback34(
4402
+ async (values) => {
4403
+ if (!supabase) {
4404
+ console.error("Supabase client not initialized");
4405
+ return null;
4406
+ }
4407
+ try {
4408
+ const { data, error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).insert({
4409
+ floor_id: values.floor_id,
4410
+ table_number: values.table_number ?? 0,
4411
+ seats: values.seats ?? 1
4412
+ }).select("id, table_number").single();
4413
+ if (error) {
4414
+ console.error("Error adding table:", error);
4415
+ return null;
4416
+ }
4417
+ return [[data.id, data.table_number]];
4418
+ } catch (error) {
4419
+ console.error("Error adding table:", error);
4420
+ return null;
4421
+ }
4422
+ },
4423
+ [supabase]
4424
+ );
4425
+ return {
4426
+ addTableSupabase
4427
+ };
4428
+ };
4429
+
4430
+ // src/services/pos-service/supabase/update-floor.ts
4431
+ import { useCallback as useCallback35 } from "react";
4432
+ var updateFloorSupabaseService = () => {
4433
+ const supabase = useSupabaseOptional();
4434
+ const updateFloorSupabase = useCallback35(
4435
+ async (values) => {
4436
+ if (!supabase) {
4437
+ console.error("Supabase client not initialized");
4438
+ return false;
4439
+ }
4440
+ try {
4441
+ const { id, ...updateData } = values;
4442
+ const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id);
4443
+ if (error) {
4444
+ console.error("Error updating floor:", error);
4445
+ return false;
4446
+ }
4447
+ return true;
4448
+ } catch (error) {
4449
+ console.error("Error updating floor:", error);
4450
+ return false;
4451
+ }
4452
+ },
4453
+ [supabase]
4454
+ );
4455
+ return {
4456
+ updateFloorSupabase
4457
+ };
4458
+ };
4459
+
4460
+ // src/services/pos-service/supabase/update-table.ts
4461
+ import { useCallback as useCallback36 } from "react";
4462
+ var updateTableSupabaseService = () => {
4463
+ const supabase = useSupabaseOptional();
4464
+ const updateTableSupabase = useCallback36(
4465
+ async (values) => {
4466
+ if (!supabase) {
4467
+ console.error("Supabase client not initialized");
4468
+ return false;
4469
+ }
4470
+ try {
4471
+ const { id, ...updateData } = values;
4472
+ const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id);
4473
+ if (error) {
4474
+ console.error("Error updating table:", error);
4475
+ return false;
4476
+ }
4477
+ return true;
4478
+ } catch (error) {
4479
+ console.error("Error updating table:", error);
4480
+ return false;
4481
+ }
4482
+ },
4483
+ [supabase]
4484
+ );
4485
+ return {
4486
+ updateTableSupabase
4487
+ };
4488
+ };
4489
+
4490
+ // src/services/pos-service/supabase/delete-floor.ts
4491
+ import { useCallback as useCallback37 } from "react";
4492
+ var deleteFloorSupabaseService = () => {
4493
+ const supabase = useSupabaseOptional();
4494
+ const deleteFloorSupabase = useCallback37(
4495
+ async (values) => {
4496
+ if (!supabase) {
4497
+ console.error("Supabase client not initialized");
4498
+ return false;
4499
+ }
4500
+ try {
4501
+ const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).delete().eq("id", values.id);
4502
+ if (error) {
4503
+ console.error("Error deleting floor:", error);
4504
+ return false;
4505
+ }
4506
+ return true;
4507
+ } catch (error) {
4508
+ console.error("Error deleting floor:", error);
4509
+ return false;
4510
+ }
4511
+ },
4512
+ [supabase]
4513
+ );
4514
+ return {
4515
+ deleteFloorSupabase
4516
+ };
4517
+ };
4518
+
4519
+ // src/services/pos-service/supabase/delete-table.ts
4520
+ import { useCallback as useCallback38 } from "react";
4521
+ var deleteTableSupabaseService = () => {
4522
+ const supabase = useSupabaseOptional();
4523
+ const deleteTableSupabase = useCallback38(
4524
+ async (values) => {
4525
+ if (!supabase) {
4526
+ console.error("Supabase client not initialized");
4527
+ return false;
4528
+ }
4529
+ try {
4530
+ const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id);
4531
+ if (error) {
4532
+ console.error("Error deleting table:", error);
4533
+ return false;
4534
+ }
4535
+ return true;
4536
+ } catch (error) {
4537
+ console.error("Error deleting table:", error);
4538
+ return false;
4539
+ }
4540
+ },
4541
+ [supabase]
4542
+ );
4543
+ return {
4544
+ deleteTableSupabase
4545
+ };
4546
+ };
4547
+
4363
4548
  // src/services/pos-service/index.ts
4364
4549
  var serviceFactories = [
4365
4550
  addEntityService,
@@ -4391,7 +4576,13 @@ var serviceFactories = [
4391
4576
  updateClosedSessionService,
4392
4577
  updateEntityService,
4393
4578
  updateOrderStatusService,
4394
- completeCurrentStageService
4579
+ completeCurrentStageService,
4580
+ addFloorSupabaseService,
4581
+ addTableSupabaseService,
4582
+ updateFloorSupabaseService,
4583
+ updateTableSupabaseService,
4584
+ deleteFloorSupabaseService,
4585
+ deleteTableSupabaseService
4395
4586
  ];
4396
4587
  var usePosService = () => {
4397
4588
  const { env } = useEnv();
@@ -4493,15 +4684,21 @@ import { useMutation as useMutation87 } from "@tanstack/react-query";
4493
4684
  // src/hooks/pos/supabase/use-add-floor.ts
4494
4685
  import { useMutation as useMutation88 } from "@tanstack/react-query";
4495
4686
 
4496
- // src/services/pos-service/supabase/add-floor.ts
4497
- import { useCallback as useCallback33 } from "react";
4498
-
4499
- // src/services/pos-service/supabase/add-table.ts
4500
- import { useCallback as useCallback34 } from "react";
4501
-
4502
4687
  // src/hooks/pos/supabase/use-add-table.ts
4503
4688
  import { useMutation as useMutation89 } from "@tanstack/react-query";
4504
4689
 
4690
+ // src/hooks/pos/supabase/use-update-floor.ts
4691
+ import { useMutation as useMutation90 } from "@tanstack/react-query";
4692
+
4693
+ // src/hooks/pos/supabase/use-update-table.ts
4694
+ import { useMutation as useMutation91 } from "@tanstack/react-query";
4695
+
4696
+ // src/hooks/pos/supabase/use-delete-floor.ts
4697
+ import { useMutation as useMutation92 } from "@tanstack/react-query";
4698
+
4699
+ // src/hooks/pos/supabase/use-delete-table.ts
4700
+ import { useMutation as useMutation93 } from "@tanstack/react-query";
4701
+
4505
4702
  // src/provider/service-provider.tsx
4506
4703
  import { jsx as jsx7 } from "react/jsx-runtime";
4507
4704
  var ServiceContext = createContext3(null);
@@ -4513,7 +4710,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
4513
4710
  // src/services/action-service/index.ts
4514
4711
  function useActionService() {
4515
4712
  const { env } = useEnv();
4516
- const loadAction = useCallback35(
4713
+ const loadAction = useCallback39(
4517
4714
  async ({
4518
4715
  idAction,
4519
4716
  context,
@@ -4537,7 +4734,7 @@ function useActionService() {
4537
4734
  },
4538
4735
  [env]
4539
4736
  );
4540
- const callButton = useCallback35(
4737
+ const callButton = useCallback39(
4541
4738
  async ({
4542
4739
  model,
4543
4740
  ids = [],
@@ -4571,7 +4768,7 @@ function useActionService() {
4571
4768
  },
4572
4769
  [env]
4573
4770
  );
4574
- const removeRows = useCallback35(
4771
+ const removeRows = useCallback39(
4575
4772
  async ({
4576
4773
  model,
4577
4774
  ids,
@@ -4597,7 +4794,7 @@ function useActionService() {
4597
4794
  },
4598
4795
  [env]
4599
4796
  );
4600
- const duplicateRecord = useCallback35(
4797
+ const duplicateRecord = useCallback39(
4601
4798
  async ({
4602
4799
  model,
4603
4800
  id,
@@ -4623,7 +4820,7 @@ function useActionService() {
4623
4820
  },
4624
4821
  [env]
4625
4822
  );
4626
- const getPrintReportName = useCallback35(
4823
+ const getPrintReportName = useCallback39(
4627
4824
  async ({ id }) => {
4628
4825
  const jsonData = {
4629
4826
  model: "ir.actions.report",
@@ -4641,7 +4838,7 @@ function useActionService() {
4641
4838
  },
4642
4839
  [env]
4643
4840
  );
4644
- const print = useCallback35(
4841
+ const print = useCallback39(
4645
4842
  async ({ id, report, db }) => {
4646
4843
  const jsonData = {
4647
4844
  report,
@@ -4659,7 +4856,7 @@ function useActionService() {
4659
4856
  },
4660
4857
  [env]
4661
4858
  );
4662
- const runAction = useCallback35(
4859
+ const runAction = useCallback39(
4663
4860
  async ({
4664
4861
  idAction,
4665
4862
  context,
@@ -4686,7 +4883,7 @@ function useActionService() {
4686
4883
  },
4687
4884
  [env]
4688
4885
  );
4689
- const generateSerialNumber = useCallback35(
4886
+ const generateSerialNumber = useCallback39(
4690
4887
  async ({
4691
4888
  kwargs,
4692
4889
  context,
@@ -4724,11 +4921,11 @@ function useActionService() {
4724
4921
  }
4725
4922
 
4726
4923
  // src/services/auth-service/index.ts
4727
- import { useCallback as useCallback36 } from "react";
4924
+ import { useCallback as useCallback40 } from "react";
4728
4925
  function useAuthService() {
4729
4926
  const { env } = useEnv();
4730
4927
  const supabase = useSupabaseOptional();
4731
- const login = useCallback36(
4928
+ const login = useCallback40(
4732
4929
  async (body) => {
4733
4930
  const payload = Object.fromEntries(
4734
4931
  Object.entries({
@@ -4753,7 +4950,7 @@ function useAuthService() {
4753
4950
  },
4754
4951
  [env]
4755
4952
  );
4756
- const loginSupabase = useCallback36(
4953
+ const loginSupabase = useCallback40(
4757
4954
  async (body) => {
4758
4955
  if (!supabase) {
4759
4956
  return {
@@ -4769,7 +4966,7 @@ function useAuthService() {
4769
4966
  },
4770
4967
  [supabase]
4771
4968
  );
4772
- const forgotPassword = useCallback36(
4969
+ const forgotPassword = useCallback40(
4773
4970
  async (email) => {
4774
4971
  const bodyData = {
4775
4972
  login: email,
@@ -4783,7 +4980,7 @@ function useAuthService() {
4783
4980
  },
4784
4981
  [env]
4785
4982
  );
4786
- const forgotPasswordSSO = useCallback36(
4983
+ const forgotPasswordSSO = useCallback40(
4787
4984
  async ({
4788
4985
  email,
4789
4986
  with_context,
@@ -4806,7 +5003,7 @@ function useAuthService() {
4806
5003
  },
4807
5004
  [env]
4808
5005
  );
4809
- const resetPassword = useCallback36(
5006
+ const resetPassword = useCallback40(
4810
5007
  async (data, token) => {
4811
5008
  const bodyData = {
4812
5009
  token,
@@ -4821,7 +5018,7 @@ function useAuthService() {
4821
5018
  },
4822
5019
  [env]
4823
5020
  );
4824
- const resetPasswordSSO = useCallback36(
5021
+ const resetPasswordSSO = useCallback40(
4825
5022
  async ({
4826
5023
  method,
4827
5024
  password,
@@ -4844,7 +5041,7 @@ function useAuthService() {
4844
5041
  },
4845
5042
  [env]
4846
5043
  );
4847
- const updatePassword = useCallback36(
5044
+ const updatePassword = useCallback40(
4848
5045
  async (data, token) => {
4849
5046
  const bodyData = {
4850
5047
  token,
@@ -4859,7 +5056,7 @@ function useAuthService() {
4859
5056
  },
4860
5057
  [env]
4861
5058
  );
4862
- const isValidToken = useCallback36(
5059
+ const isValidToken = useCallback40(
4863
5060
  async (token) => {
4864
5061
  const bodyData = {
4865
5062
  token
@@ -4872,7 +5069,7 @@ function useAuthService() {
4872
5069
  },
4873
5070
  [env]
4874
5071
  );
4875
- const isValidActionToken = useCallback36(
5072
+ const isValidActionToken = useCallback40(
4876
5073
  async (actionToken) => {
4877
5074
  const bodyData = {};
4878
5075
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -4885,7 +5082,7 @@ function useAuthService() {
4885
5082
  },
4886
5083
  [env]
4887
5084
  );
4888
- const loginSocial = useCallback36(
5085
+ const loginSocial = useCallback40(
4889
5086
  async ({
4890
5087
  db,
4891
5088
  state,
@@ -4903,13 +5100,13 @@ function useAuthService() {
4903
5100
  },
4904
5101
  [env]
4905
5102
  );
4906
- const getProviders = useCallback36(
5103
+ const getProviders = useCallback40(
4907
5104
  async (db) => {
4908
5105
  return env?.requests?.get("/oauth/providers", { params: { db } });
4909
5106
  },
4910
5107
  [env]
4911
5108
  );
4912
- const getAccessByCode = useCallback36(
5109
+ const getAccessByCode = useCallback40(
4913
5110
  async (code) => {
4914
5111
  const data = new URLSearchParams();
4915
5112
  data.append("code", code);
@@ -4929,7 +5126,7 @@ function useAuthService() {
4929
5126
  },
4930
5127
  [env]
4931
5128
  );
4932
- const logout = useCallback36(
5129
+ const logout = useCallback40(
4933
5130
  async (service) => {
4934
5131
  return env?.requests?.post(
4935
5132
  "/logout" /* LOGOUT */,
@@ -4946,7 +5143,7 @@ function useAuthService() {
4946
5143
  },
4947
5144
  [env]
4948
5145
  );
4949
- const getTenantMapping = useCallback36(
5146
+ const getTenantMapping = useCallback40(
4950
5147
  async ({ shortName, service }) => {
4951
5148
  const bodyData = {
4952
5149
  short_name: shortName
@@ -4964,7 +5161,7 @@ function useAuthService() {
4964
5161
  },
4965
5162
  [env]
4966
5163
  );
4967
- const getToken = useCallback36(
5164
+ const getToken = useCallback40(
4968
5165
  async ({
4969
5166
  phone,
4970
5167
  name,
@@ -5009,10 +5206,10 @@ function useAuthService() {
5009
5206
  }
5010
5207
 
5011
5208
  // src/services/company-service/index.ts
5012
- import { useCallback as useCallback37 } from "react";
5209
+ import { useCallback as useCallback41 } from "react";
5013
5210
  function useCompanyService() {
5014
5211
  const { env } = useEnv();
5015
- const getCurrentCompany = useCallback37(
5212
+ const getCurrentCompany = useCallback41(
5016
5213
  async (service, extraHeaders) => {
5017
5214
  return await env.requests.get(
5018
5215
  "/company" /* COMPANY_PATH */,
@@ -5029,7 +5226,7 @@ function useCompanyService() {
5029
5226
  },
5030
5227
  [env]
5031
5228
  );
5032
- const getInfoCompany = useCallback37(
5229
+ const getInfoCompany = useCallback41(
5033
5230
  async (id, service) => {
5034
5231
  const jsonData = {
5035
5232
  ids: [id],
@@ -5065,10 +5262,10 @@ function useCompanyService() {
5065
5262
  }
5066
5263
 
5067
5264
  // src/services/excel-service/index.ts
5068
- import { useCallback as useCallback38 } from "react";
5265
+ import { useCallback as useCallback42 } from "react";
5069
5266
  function useExcelService() {
5070
5267
  const { env } = useEnv();
5071
- const uploadFileExcel = useCallback38(
5268
+ const uploadFileExcel = useCallback42(
5072
5269
  async ({
5073
5270
  formData,
5074
5271
  service,
@@ -5085,7 +5282,7 @@ function useExcelService() {
5085
5282
  },
5086
5283
  [env]
5087
5284
  );
5088
- const uploadIdFile = useCallback38(
5285
+ const uploadIdFile = useCallback42(
5089
5286
  async ({
5090
5287
  formData,
5091
5288
  service,
@@ -5102,7 +5299,7 @@ function useExcelService() {
5102
5299
  },
5103
5300
  [env]
5104
5301
  );
5105
- const parsePreview = useCallback38(
5302
+ const parsePreview = useCallback42(
5106
5303
  async ({
5107
5304
  id,
5108
5305
  selectedSheet,
@@ -5151,7 +5348,7 @@ function useExcelService() {
5151
5348
  },
5152
5349
  [env]
5153
5350
  );
5154
- const executeImport = useCallback38(
5351
+ const executeImport = useCallback42(
5155
5352
  async ({
5156
5353
  columns,
5157
5354
  fields,
@@ -5185,7 +5382,7 @@ function useExcelService() {
5185
5382
  },
5186
5383
  [env]
5187
5384
  );
5188
- const getFileExcel = useCallback38(
5385
+ const getFileExcel = useCallback42(
5189
5386
  async ({
5190
5387
  model,
5191
5388
  service,
@@ -5209,7 +5406,7 @@ function useExcelService() {
5209
5406
  },
5210
5407
  [env]
5211
5408
  );
5212
- const getFieldExport = useCallback38(
5409
+ const getFieldExport = useCallback42(
5213
5410
  async ({
5214
5411
  ids,
5215
5412
  model,
@@ -5249,7 +5446,7 @@ function useExcelService() {
5249
5446
  },
5250
5447
  [env]
5251
5448
  );
5252
- const exportExcel = useCallback38(
5449
+ const exportExcel = useCallback42(
5253
5450
  async ({
5254
5451
  model,
5255
5452
  domain,
@@ -5297,10 +5494,10 @@ function useExcelService() {
5297
5494
  }
5298
5495
 
5299
5496
  // src/services/form-service/index.ts
5300
- import { useCallback as useCallback39 } from "react";
5497
+ import { useCallback as useCallback43 } from "react";
5301
5498
  function useFormService() {
5302
5499
  const { env } = useEnv();
5303
- const getComment = useCallback39(
5500
+ const getComment = useCallback43(
5304
5501
  async ({ data }) => {
5305
5502
  const jsonData = {
5306
5503
  thread_id: data.thread_id,
@@ -5318,7 +5515,7 @@ function useFormService() {
5318
5515
  },
5319
5516
  [env]
5320
5517
  );
5321
- const getThreadData = useCallback39(
5518
+ const getThreadData = useCallback43(
5322
5519
  async ({
5323
5520
  data,
5324
5521
  xNode,
@@ -5345,7 +5542,7 @@ function useFormService() {
5345
5542
  },
5346
5543
  [env]
5347
5544
  );
5348
- const getThreadMessages = useCallback39(
5545
+ const getThreadMessages = useCallback43(
5349
5546
  async ({
5350
5547
  data,
5351
5548
  xNode,
@@ -5371,7 +5568,7 @@ function useFormService() {
5371
5568
  },
5372
5569
  [env]
5373
5570
  );
5374
- const sentComment = useCallback39(
5571
+ const sentComment = useCallback43(
5375
5572
  async ({ data }) => {
5376
5573
  const jsonData = {
5377
5574
  context: {
@@ -5399,7 +5596,7 @@ function useFormService() {
5399
5596
  },
5400
5597
  [env]
5401
5598
  );
5402
- const deleteComment = useCallback39(
5599
+ const deleteComment = useCallback43(
5403
5600
  async ({ data }) => {
5404
5601
  const jsonData = {
5405
5602
  attachment_ids: [],
@@ -5415,7 +5612,7 @@ function useFormService() {
5415
5612
  },
5416
5613
  [env]
5417
5614
  );
5418
- const getImage = useCallback39(
5615
+ const getImage = useCallback43(
5419
5616
  async ({ data }) => {
5420
5617
  return env.requests.get(
5421
5618
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -5428,7 +5625,7 @@ function useFormService() {
5428
5625
  },
5429
5626
  [env]
5430
5627
  );
5431
- const uploadImage = useCallback39(
5628
+ const uploadImage = useCallback43(
5432
5629
  async ({
5433
5630
  formData,
5434
5631
  service,
@@ -5447,7 +5644,7 @@ function useFormService() {
5447
5644
  },
5448
5645
  [env]
5449
5646
  );
5450
- const uploadFile = useCallback39(
5647
+ const uploadFile = useCallback43(
5451
5648
  async ({
5452
5649
  formData,
5453
5650
  service,
@@ -5467,7 +5664,7 @@ function useFormService() {
5467
5664
  },
5468
5665
  [env]
5469
5666
  );
5470
- const getFormView = useCallback39(
5667
+ const getFormView = useCallback43(
5471
5668
  async ({ data }) => {
5472
5669
  const jsonData = {
5473
5670
  model: data.model,
@@ -5483,7 +5680,7 @@ function useFormService() {
5483
5680
  },
5484
5681
  [env]
5485
5682
  );
5486
- const changeStatus = useCallback39(
5683
+ const changeStatus = useCallback43(
5487
5684
  async ({ data }) => {
5488
5685
  const vals = {
5489
5686
  [data.name]: data.stage_id
@@ -5512,7 +5709,7 @@ function useFormService() {
5512
5709
  },
5513
5710
  [env]
5514
5711
  );
5515
- const getExternalTab = useCallback39(
5712
+ const getExternalTab = useCallback43(
5516
5713
  async ({ method, context, service, xNode }) => {
5517
5714
  return env?.requests?.post(
5518
5715
  "/call" /* CALL_PATH */,
@@ -5547,10 +5744,10 @@ function useFormService() {
5547
5744
  }
5548
5745
 
5549
5746
  // src/services/kanban-service/index.ts
5550
- import { useCallback as useCallback40 } from "react";
5747
+ import { useCallback as useCallback44 } from "react";
5551
5748
  function useKanbanService() {
5552
5749
  const { env } = useEnv();
5553
- const getGroups = useCallback40(
5750
+ const getGroups = useCallback44(
5554
5751
  async ({ model, width_context }) => {
5555
5752
  const jsonData = {
5556
5753
  model,
@@ -5570,7 +5767,7 @@ function useKanbanService() {
5570
5767
  },
5571
5768
  [env]
5572
5769
  );
5573
- const getProgressBar = useCallback40(
5770
+ const getProgressBar = useCallback44(
5574
5771
  async ({ field, color, model, width_context }) => {
5575
5772
  const jsonData = {
5576
5773
  model,
@@ -5600,10 +5797,10 @@ function useKanbanService() {
5600
5797
  }
5601
5798
 
5602
5799
  // src/services/model-service/index.ts
5603
- import { useCallback as useCallback41 } from "react";
5800
+ import { useCallback as useCallback45 } from "react";
5604
5801
  function useModelService() {
5605
5802
  const { env } = useEnv();
5606
- const getListMyBankAccount = useCallback41(
5803
+ const getListMyBankAccount = useCallback45(
5607
5804
  async ({
5608
5805
  domain,
5609
5806
  spectification,
@@ -5627,7 +5824,7 @@ function useModelService() {
5627
5824
  },
5628
5825
  [env]
5629
5826
  );
5630
- const getCurrency = useCallback41(async () => {
5827
+ const getCurrency = useCallback45(async () => {
5631
5828
  const jsonData = {
5632
5829
  model: "res.currency",
5633
5830
  method: "web_search_read",
@@ -5647,7 +5844,7 @@ function useModelService() {
5647
5844
  }
5648
5845
  });
5649
5846
  }, [env]);
5650
- const getConversionRate = useCallback41(async () => {
5847
+ const getConversionRate = useCallback45(async () => {
5651
5848
  const jsonData = {
5652
5849
  model: "res.currency",
5653
5850
  method: "web_search_read",
@@ -5673,7 +5870,7 @@ function useModelService() {
5673
5870
  }
5674
5871
  });
5675
5872
  }, [env]);
5676
- const getAll = useCallback41(
5873
+ const getAll = useCallback45(
5677
5874
  async ({
5678
5875
  data,
5679
5876
  service,
@@ -5715,7 +5912,7 @@ function useModelService() {
5715
5912
  },
5716
5913
  [env]
5717
5914
  );
5718
- const getListCalendar = useCallback41(
5915
+ const getListCalendar = useCallback45(
5719
5916
  async ({ data }) => {
5720
5917
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
5721
5918
  fields: data.fields,
@@ -5746,7 +5943,7 @@ function useModelService() {
5746
5943
  },
5747
5944
  [env]
5748
5945
  );
5749
- const getList = useCallback41(
5946
+ const getList = useCallback45(
5750
5947
  async ({
5751
5948
  model,
5752
5949
  ids = [],
@@ -5778,7 +5975,7 @@ function useModelService() {
5778
5975
  },
5779
5976
  [env]
5780
5977
  );
5781
- const getDetail = useCallback41(
5978
+ const getDetail = useCallback45(
5782
5979
  async ({
5783
5980
  ids = [],
5784
5981
  model,
@@ -5810,7 +6007,7 @@ function useModelService() {
5810
6007
  },
5811
6008
  [env]
5812
6009
  );
5813
- const save = useCallback41(
6010
+ const save = useCallback45(
5814
6011
  async ({
5815
6012
  model,
5816
6013
  ids = [],
@@ -5845,7 +6042,7 @@ function useModelService() {
5845
6042
  },
5846
6043
  [env]
5847
6044
  );
5848
- const deleteApi = useCallback41(
6045
+ const deleteApi = useCallback45(
5849
6046
  async ({ ids = [], model, service }) => {
5850
6047
  const jsonData = {
5851
6048
  model,
@@ -5865,7 +6062,7 @@ function useModelService() {
5865
6062
  },
5866
6063
  [env]
5867
6064
  );
5868
- const onChange = useCallback41(
6065
+ const onChange = useCallback45(
5869
6066
  async ({
5870
6067
  ids = [],
5871
6068
  model,
@@ -5901,7 +6098,7 @@ function useModelService() {
5901
6098
  },
5902
6099
  [env]
5903
6100
  );
5904
- const getListFieldsOnchange = useCallback41(
6101
+ const getListFieldsOnchange = useCallback45(
5905
6102
  async ({
5906
6103
  model,
5907
6104
  service,
@@ -5925,7 +6122,7 @@ function useModelService() {
5925
6122
  },
5926
6123
  [env]
5927
6124
  );
5928
- const parseORMOdoo = useCallback41((data) => {
6125
+ const parseORMOdoo = useCallback45((data) => {
5929
6126
  for (const key in data) {
5930
6127
  if (key === "display_name") {
5931
6128
  delete data[key];
@@ -5936,7 +6133,7 @@ function useModelService() {
5936
6133
  }
5937
6134
  return { ...data };
5938
6135
  }, []);
5939
- const toDataJS = useCallback41(
6136
+ const toDataJS = useCallback45(
5940
6137
  (data, viewData, model) => {
5941
6138
  for (const key in data) {
5942
6139
  if (data[key] === false) {
@@ -5994,10 +6191,10 @@ function useModelService() {
5994
6191
  }
5995
6192
 
5996
6193
  // src/services/user-service/index.ts
5997
- import { useCallback as useCallback42 } from "react";
6194
+ import { useCallback as useCallback46 } from "react";
5998
6195
  function useUserService() {
5999
6196
  const { env } = useEnv();
6000
- const getProfile = useCallback42(
6197
+ const getProfile = useCallback46(
6001
6198
  async (service, path, extraHeaders) => {
6002
6199
  return env?.requests?.get(
6003
6200
  path || "/userinfo" /* PROFILE_PATH */,
@@ -6014,7 +6211,7 @@ function useUserService() {
6014
6211
  },
6015
6212
  [env]
6016
6213
  );
6017
- const getUser = useCallback42(
6214
+ const getUser = useCallback46(
6018
6215
  async ({ context, id }) => {
6019
6216
  const jsonData = {
6020
6217
  model: "res.users",
@@ -6052,7 +6249,7 @@ function useUserService() {
6052
6249
  },
6053
6250
  [env]
6054
6251
  );
6055
- const switchUserLocale = useCallback42(
6252
+ const switchUserLocale = useCallback46(
6056
6253
  async ({ id, values, service }) => {
6057
6254
  const jsonData = {
6058
6255
  model: "res.users",
@@ -6080,10 +6277,10 @@ function useUserService() {
6080
6277
  }
6081
6278
 
6082
6279
  // src/services/view-service/index.ts
6083
- import { useCallback as useCallback43 } from "react";
6280
+ import { useCallback as useCallback47 } from "react";
6084
6281
  function useViewService() {
6085
6282
  const { env } = useEnv();
6086
- const getView = useCallback43(
6283
+ const getView = useCallback47(
6087
6284
  async ({
6088
6285
  model,
6089
6286
  views,
@@ -6123,7 +6320,7 @@ function useViewService() {
6123
6320
  },
6124
6321
  [env]
6125
6322
  );
6126
- const getMenu = useCallback43(
6323
+ const getMenu = useCallback47(
6127
6324
  async (context, specification, domain, service) => {
6128
6325
  const jsonData = {
6129
6326
  model: "ir.ui.menu" /* MENU */,
@@ -6154,7 +6351,7 @@ function useViewService() {
6154
6351
  },
6155
6352
  [env]
6156
6353
  );
6157
- const getActionDetail = useCallback43(
6354
+ const getActionDetail = useCallback47(
6158
6355
  async (aid, context) => {
6159
6356
  const jsonData = {
6160
6357
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -6184,7 +6381,7 @@ function useViewService() {
6184
6381
  },
6185
6382
  [env]
6186
6383
  );
6187
- const getResequence = useCallback43(
6384
+ const getResequence = useCallback47(
6188
6385
  async ({
6189
6386
  model,
6190
6387
  ids,
@@ -6214,7 +6411,7 @@ function useViewService() {
6214
6411
  },
6215
6412
  [env]
6216
6413
  );
6217
- const getSelectionItem = useCallback43(
6414
+ const getSelectionItem = useCallback47(
6218
6415
  async ({
6219
6416
  data,
6220
6417
  service,
@@ -6251,7 +6448,7 @@ function useViewService() {
6251
6448
  },
6252
6449
  [env]
6253
6450
  );
6254
- const loadMessages = useCallback43(async () => {
6451
+ const loadMessages = useCallback47(async () => {
6255
6452
  return env.requests.post(
6256
6453
  "/load_message_failures" /* LOAD_MESSAGE */,
6257
6454
  {},
@@ -6262,14 +6459,14 @@ function useViewService() {
6262
6459
  }
6263
6460
  );
6264
6461
  }, [env]);
6265
- const getVersion = useCallback43(async () => {
6462
+ const getVersion = useCallback47(async () => {
6266
6463
  return env?.requests?.get("", {
6267
6464
  headers: {
6268
6465
  "Content-Type": "application/json"
6269
6466
  }
6270
6467
  });
6271
6468
  }, [env]);
6272
- const grantAccess = useCallback43(
6469
+ const grantAccess = useCallback47(
6273
6470
  async ({
6274
6471
  redirect_uri,
6275
6472
  state,
@@ -6296,7 +6493,7 @@ function useViewService() {
6296
6493
  },
6297
6494
  [env]
6298
6495
  );
6299
- const removeTotpSetUp = useCallback43(
6496
+ const removeTotpSetUp = useCallback47(
6300
6497
  async ({ method, token }) => {
6301
6498
  const jsonData = {
6302
6499
  method,
@@ -6317,7 +6514,7 @@ function useViewService() {
6317
6514
  },
6318
6515
  [env]
6319
6516
  );
6320
- const requestSetupTotp = useCallback43(
6517
+ const requestSetupTotp = useCallback47(
6321
6518
  async ({ method, token }) => {
6322
6519
  const jsonData = {
6323
6520
  method,
@@ -6336,7 +6533,7 @@ function useViewService() {
6336
6533
  },
6337
6534
  [env]
6338
6535
  );
6339
- const settingsWebRead2fa = useCallback43(
6536
+ const settingsWebRead2fa = useCallback47(
6340
6537
  async ({
6341
6538
  method,
6342
6539
  model,
@@ -6364,7 +6561,7 @@ function useViewService() {
6364
6561
  },
6365
6562
  [env]
6366
6563
  );
6367
- const signInSSO = useCallback43(
6564
+ const signInSSO = useCallback47(
6368
6565
  async ({
6369
6566
  redirect_uri,
6370
6567
  state,
@@ -6396,7 +6593,7 @@ function useViewService() {
6396
6593
  },
6397
6594
  [env]
6398
6595
  );
6399
- const verify2FA = useCallback43(
6596
+ const verify2FA = useCallback47(
6400
6597
  ({
6401
6598
  method,
6402
6599
  with_context,
@@ -6429,7 +6626,7 @@ function useViewService() {
6429
6626
  },
6430
6627
  [env]
6431
6628
  );
6432
- const get2FAMethods = useCallback43(
6629
+ const get2FAMethods = useCallback47(
6433
6630
  ({ method, with_context }) => {
6434
6631
  const jsonData = {
6435
6632
  method,
@@ -6448,7 +6645,7 @@ function useViewService() {
6448
6645
  },
6449
6646
  [env]
6450
6647
  );
6451
- const verifyTotp = useCallback43(
6648
+ const verifyTotp = useCallback47(
6452
6649
  ({
6453
6650
  method,
6454
6651
  action_token,
@@ -6473,7 +6670,7 @@ function useViewService() {
6473
6670
  },
6474
6671
  [env]
6475
6672
  );
6476
- const getNotifications = useCallback43(
6673
+ const getNotifications = useCallback47(
6477
6674
  async ({
6478
6675
  service,
6479
6676
  xNode,
@@ -6493,7 +6690,7 @@ function useViewService() {
6493
6690
  },
6494
6691
  [env]
6495
6692
  );
6496
- const getCountry = useCallback43(
6693
+ const getCountry = useCallback47(
6497
6694
  async ({
6498
6695
  service,
6499
6696
  xNode,
@@ -6520,7 +6717,7 @@ function useViewService() {
6520
6717
  },
6521
6718
  [env]
6522
6719
  );
6523
- const getCity = useCallback43(
6720
+ const getCity = useCallback47(
6524
6721
  async ({
6525
6722
  service,
6526
6723
  xNode,
@@ -6547,7 +6744,7 @@ function useViewService() {
6547
6744
  },
6548
6745
  [env]
6549
6746
  );
6550
- const getWard = useCallback43(
6747
+ const getWard = useCallback47(
6551
6748
  async ({
6552
6749
  service,
6553
6750
  xNode,
@@ -6572,7 +6769,7 @@ function useViewService() {
6572
6769
  },
6573
6770
  [env]
6574
6771
  );
6575
- const getPartnerTitle = useCallback43(
6772
+ const getPartnerTitle = useCallback47(
6576
6773
  async ({
6577
6774
  service,
6578
6775
  xNode,
@@ -6624,10 +6821,10 @@ function useViewService() {
6624
6821
  }
6625
6822
 
6626
6823
  // src/services/dashboard-service/index.ts
6627
- import { useCallback as useCallback44 } from "react";
6824
+ import { useCallback as useCallback48 } from "react";
6628
6825
  function useDashboardService() {
6629
6826
  const { env } = useEnv();
6630
- const readGroup = useCallback44(
6827
+ const readGroup = useCallback48(
6631
6828
  async ({
6632
6829
  service,
6633
6830
  xNode,
@@ -6644,7 +6841,7 @@ function useDashboardService() {
6644
6841
  },
6645
6842
  [env]
6646
6843
  );
6647
- const getDataChart = useCallback44(
6844
+ const getDataChart = useCallback48(
6648
6845
  async ({
6649
6846
  service,
6650
6847
  xNode,