@fctc/interface-logic 4.7.3 → 4.7.4
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/hooks.d.mts +7 -48
- package/dist/hooks.d.ts +7 -48
- package/dist/hooks.js +44 -263
- package/dist/hooks.mjs +43 -257
- package/dist/provider.d.mts +2 -7
- package/dist/provider.d.ts +2 -7
- package/dist/provider.js +64 -278
- package/dist/provider.mjs +53 -267
- package/dist/services.d.mts +6 -58
- package/dist/services.d.ts +6 -58
- package/dist/services.js +132 -341
- package/dist/services.mjs +129 -338
- package/package.json +1 -1
package/dist/services.js
CHANGED
|
@@ -45,7 +45,7 @@ __export(services_exports, {
|
|
|
45
45
|
module.exports = __toCommonJS(services_exports);
|
|
46
46
|
|
|
47
47
|
// src/services/action-service/index.ts
|
|
48
|
-
var
|
|
48
|
+
var import_react53 = require("react");
|
|
49
49
|
|
|
50
50
|
// src/constants/api/uri-constant.ts
|
|
51
51
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
@@ -2955,7 +2955,7 @@ function useEnv() {
|
|
|
2955
2955
|
}
|
|
2956
2956
|
|
|
2957
2957
|
// src/provider/service-provider.tsx
|
|
2958
|
-
var
|
|
2958
|
+
var import_react51 = require("react");
|
|
2959
2959
|
|
|
2960
2960
|
// src/hooks/auth/use-forgot-password.ts
|
|
2961
2961
|
var import_react_query3 = require("@tanstack/react-query");
|
|
@@ -4481,19 +4481,19 @@ var updateFloorSupabaseService = () => {
|
|
|
4481
4481
|
async (values) => {
|
|
4482
4482
|
if (!supabase) {
|
|
4483
4483
|
console.error("Supabase client not initialized");
|
|
4484
|
-
return
|
|
4484
|
+
return false;
|
|
4485
4485
|
}
|
|
4486
4486
|
try {
|
|
4487
4487
|
const { id, ...updateData } = values;
|
|
4488
|
-
const { error
|
|
4488
|
+
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id);
|
|
4489
4489
|
if (error) {
|
|
4490
4490
|
console.error("Error updating floor:", error);
|
|
4491
|
-
return
|
|
4491
|
+
return false;
|
|
4492
4492
|
}
|
|
4493
|
-
return
|
|
4493
|
+
return true;
|
|
4494
4494
|
} catch (error) {
|
|
4495
4495
|
console.error("Error updating floor:", error);
|
|
4496
|
-
return
|
|
4496
|
+
return false;
|
|
4497
4497
|
}
|
|
4498
4498
|
},
|
|
4499
4499
|
[supabase]
|
|
@@ -4511,19 +4511,19 @@ var updateTableSupabaseService = () => {
|
|
|
4511
4511
|
async (values) => {
|
|
4512
4512
|
if (!supabase) {
|
|
4513
4513
|
console.error("Supabase client not initialized");
|
|
4514
|
-
return
|
|
4514
|
+
return false;
|
|
4515
4515
|
}
|
|
4516
4516
|
try {
|
|
4517
4517
|
const { id, ...updateData } = values;
|
|
4518
|
-
const { error
|
|
4518
|
+
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id);
|
|
4519
4519
|
if (error) {
|
|
4520
4520
|
console.error("Error updating table:", error);
|
|
4521
|
-
return
|
|
4521
|
+
return false;
|
|
4522
4522
|
}
|
|
4523
|
-
return
|
|
4523
|
+
return true;
|
|
4524
4524
|
} catch (error) {
|
|
4525
4525
|
console.error("Error updating table:", error);
|
|
4526
|
-
return
|
|
4526
|
+
return false;
|
|
4527
4527
|
}
|
|
4528
4528
|
},
|
|
4529
4529
|
[supabase]
|
|
@@ -4541,18 +4541,18 @@ var deleteFloorSupabaseService = () => {
|
|
|
4541
4541
|
async (values) => {
|
|
4542
4542
|
if (!supabase) {
|
|
4543
4543
|
console.error("Supabase client not initialized");
|
|
4544
|
-
return
|
|
4544
|
+
return false;
|
|
4545
4545
|
}
|
|
4546
4546
|
try {
|
|
4547
4547
|
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).delete().eq("id", values.id);
|
|
4548
4548
|
if (error) {
|
|
4549
4549
|
console.error("Error deleting floor:", error);
|
|
4550
|
-
return
|
|
4550
|
+
return false;
|
|
4551
4551
|
}
|
|
4552
|
-
return
|
|
4552
|
+
return true;
|
|
4553
4553
|
} catch (error) {
|
|
4554
4554
|
console.error("Error deleting floor:", error);
|
|
4555
|
-
return
|
|
4555
|
+
return false;
|
|
4556
4556
|
}
|
|
4557
4557
|
},
|
|
4558
4558
|
[supabase]
|
|
@@ -4570,18 +4570,18 @@ var deleteTableSupabaseService = () => {
|
|
|
4570
4570
|
async (values) => {
|
|
4571
4571
|
if (!supabase) {
|
|
4572
4572
|
console.error("Supabase client not initialized");
|
|
4573
|
-
return
|
|
4573
|
+
return false;
|
|
4574
4574
|
}
|
|
4575
4575
|
try {
|
|
4576
|
-
const { error
|
|
4576
|
+
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id);
|
|
4577
4577
|
if (error) {
|
|
4578
4578
|
console.error("Error deleting table:", error);
|
|
4579
|
-
return
|
|
4579
|
+
return false;
|
|
4580
4580
|
}
|
|
4581
|
-
return
|
|
4581
|
+
return true;
|
|
4582
4582
|
} catch (error) {
|
|
4583
4583
|
console.error("Error deleting table:", error);
|
|
4584
|
-
return
|
|
4584
|
+
return false;
|
|
4585
4585
|
}
|
|
4586
4586
|
},
|
|
4587
4587
|
[supabase]
|
|
@@ -4593,241 +4593,53 @@ var deleteTableSupabaseService = () => {
|
|
|
4593
4593
|
|
|
4594
4594
|
// src/services/pos-service/supabase/create-order.ts
|
|
4595
4595
|
var import_react43 = require("react");
|
|
4596
|
-
var createOrderSupabaseService = () => {
|
|
4597
|
-
const supabase = useSupabaseOptional();
|
|
4598
|
-
const createOrderSupabase = (0, import_react43.useCallback)(
|
|
4599
|
-
async (values) => {
|
|
4600
|
-
if (!supabase) {
|
|
4601
|
-
console.error("Supabase client not initialized");
|
|
4602
|
-
return null;
|
|
4603
|
-
}
|
|
4604
|
-
try {
|
|
4605
|
-
const { data, error } = await supabase.from("orders" /* ORDERS */).insert({
|
|
4606
|
-
session_id: values.session_id,
|
|
4607
|
-
pos_reference: values.pos_reference,
|
|
4608
|
-
amount_tax: values.amount_tax,
|
|
4609
|
-
amount_total: values.amount_total,
|
|
4610
|
-
amount_paid: values.amount_paid,
|
|
4611
|
-
amount_return: values.amount_return,
|
|
4612
|
-
table_id: values.table_id,
|
|
4613
|
-
partner_id: values.partner_id
|
|
4614
|
-
}).select("id, pos_reference").single();
|
|
4615
|
-
if (error) {
|
|
4616
|
-
console.error("Error creating order:", error);
|
|
4617
|
-
return null;
|
|
4618
|
-
}
|
|
4619
|
-
return [[data.id, data.pos_reference]];
|
|
4620
|
-
} catch (error) {
|
|
4621
|
-
console.error("Error creating order:", error);
|
|
4622
|
-
return null;
|
|
4623
|
-
}
|
|
4624
|
-
},
|
|
4625
|
-
[supabase]
|
|
4626
|
-
);
|
|
4627
|
-
return {
|
|
4628
|
-
createOrderSupabase
|
|
4629
|
-
};
|
|
4630
|
-
};
|
|
4631
4596
|
|
|
4632
4597
|
// src/services/pos-service/supabase/add-product-to-order.ts
|
|
4633
4598
|
var import_react44 = require("react");
|
|
4634
|
-
var addProductToOrderSupabaseService = () => {
|
|
4635
|
-
const supabase = useSupabaseOptional();
|
|
4636
|
-
const addProductToOrderSupabase = (0, import_react44.useCallback)(
|
|
4637
|
-
async (values) => {
|
|
4638
|
-
if (!supabase) {
|
|
4639
|
-
console.error("Supabase client not initialized");
|
|
4640
|
-
return null;
|
|
4641
|
-
}
|
|
4642
|
-
try {
|
|
4643
|
-
const { data, error } = await supabase.from("order_line" /* ORDER_LINE */).insert({
|
|
4644
|
-
order_id: values.order_id,
|
|
4645
|
-
product_id: values.product_id,
|
|
4646
|
-
qty: values.qty,
|
|
4647
|
-
price_unit: values.price_unit,
|
|
4648
|
-
price_subtotal: values.price_subtotal,
|
|
4649
|
-
price_subtotal_incl: values.price_subtotal_incl,
|
|
4650
|
-
tax_ids: values.tax_ids ?? [],
|
|
4651
|
-
uuid: values.uuid,
|
|
4652
|
-
attribute_value_ids: values.attribute_value_ids ?? [],
|
|
4653
|
-
note: values.note
|
|
4654
|
-
}).select("id").single();
|
|
4655
|
-
if (error) {
|
|
4656
|
-
console.error("Error adding product to order:", error);
|
|
4657
|
-
return null;
|
|
4658
|
-
}
|
|
4659
|
-
return [data.id];
|
|
4660
|
-
} catch (error) {
|
|
4661
|
-
console.error("Error adding product to order:", error);
|
|
4662
|
-
return null;
|
|
4663
|
-
}
|
|
4664
|
-
},
|
|
4665
|
-
[supabase]
|
|
4666
|
-
);
|
|
4667
|
-
return {
|
|
4668
|
-
addProductToOrderSupabase
|
|
4669
|
-
};
|
|
4670
|
-
};
|
|
4671
4599
|
|
|
4672
4600
|
// src/services/pos-service/supabase/update-order-total-amount.ts
|
|
4673
4601
|
var import_react45 = require("react");
|
|
4674
|
-
var updateOrderTotalAmountSupabaseService = () => {
|
|
4675
|
-
const supabase = useSupabaseOptional();
|
|
4676
|
-
const updateOrderTotalAmountSupabase = (0, import_react45.useCallback)(
|
|
4677
|
-
async (values) => {
|
|
4678
|
-
if (!supabase) {
|
|
4679
|
-
console.error("Supabase client not initialized");
|
|
4680
|
-
return [];
|
|
4681
|
-
}
|
|
4682
|
-
try {
|
|
4683
|
-
const { error } = await supabase.from("orders" /* ORDERS */).update({
|
|
4684
|
-
amount_tax: values.amount_tax,
|
|
4685
|
-
amount_total: values.amount_total,
|
|
4686
|
-
note: values.note
|
|
4687
|
-
}).eq("id", values.order_id);
|
|
4688
|
-
if (error) {
|
|
4689
|
-
console.error("Error updating order total amount:", error);
|
|
4690
|
-
return [];
|
|
4691
|
-
}
|
|
4692
|
-
return [values.order_id];
|
|
4693
|
-
} catch (error) {
|
|
4694
|
-
console.error("Error updating order total amount:", error);
|
|
4695
|
-
return [];
|
|
4696
|
-
}
|
|
4697
|
-
},
|
|
4698
|
-
[supabase]
|
|
4699
|
-
);
|
|
4700
|
-
return {
|
|
4701
|
-
updateOrderTotalAmountSupabase
|
|
4702
|
-
};
|
|
4703
|
-
};
|
|
4704
4602
|
|
|
4705
4603
|
// src/services/pos-service/supabase/update-order-line.ts
|
|
4706
4604
|
var import_react46 = require("react");
|
|
4707
|
-
var updateOrderLineSupabaseService = () => {
|
|
4708
|
-
const supabase = useSupabaseOptional();
|
|
4709
|
-
const updateOrderLineSupabase = (0, import_react46.useCallback)(
|
|
4710
|
-
async (values) => {
|
|
4711
|
-
if (!supabase) {
|
|
4712
|
-
console.error("Supabase client not initialized");
|
|
4713
|
-
return [];
|
|
4714
|
-
}
|
|
4715
|
-
try {
|
|
4716
|
-
const { error, data } = await supabase.from("order_line" /* ORDER_LINE */).update({
|
|
4717
|
-
order_id: values.order_id,
|
|
4718
|
-
qty: values.qty,
|
|
4719
|
-
price_subtotal: values.price_subtotal,
|
|
4720
|
-
price_subtotal_incl: values.price_subtotal_incl,
|
|
4721
|
-
attribute_value_ids: values.attribute_value_ids ?? []
|
|
4722
|
-
}).eq("id", values.order_line_id).select("id").single();
|
|
4723
|
-
if (error) {
|
|
4724
|
-
console.error("Error updating order line:", error);
|
|
4725
|
-
return [];
|
|
4726
|
-
}
|
|
4727
|
-
return [data.id];
|
|
4728
|
-
} catch (error) {
|
|
4729
|
-
console.error("Error updating order line:", error);
|
|
4730
|
-
return [];
|
|
4731
|
-
}
|
|
4732
|
-
},
|
|
4733
|
-
[supabase]
|
|
4734
|
-
);
|
|
4735
|
-
return {
|
|
4736
|
-
updateOrderLineSupabase
|
|
4737
|
-
};
|
|
4738
|
-
};
|
|
4739
4605
|
|
|
4740
4606
|
// src/services/pos-service/supabase/update-order.ts
|
|
4741
4607
|
var import_react47 = require("react");
|
|
4742
|
-
var updateOrderSupabaseService = () => {
|
|
4743
|
-
const supabase = useSupabaseOptional();
|
|
4744
|
-
const updateOrderSupabase = (0, import_react47.useCallback)(
|
|
4745
|
-
async (values) => {
|
|
4746
|
-
if (!supabase) {
|
|
4747
|
-
console.error("Supabase client not initialized");
|
|
4748
|
-
return [];
|
|
4749
|
-
}
|
|
4750
|
-
const { order_id, ...rest } = values;
|
|
4751
|
-
const updateData = Object.fromEntries(
|
|
4752
|
-
Object.entries({
|
|
4753
|
-
...rest,
|
|
4754
|
-
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4755
|
-
}).filter(([_, v]) => v !== void 0)
|
|
4756
|
-
);
|
|
4757
|
-
try {
|
|
4758
|
-
const { error, data } = await supabase.from("orders" /* ORDERS */).update(updateData).eq("id", order_id).select("id").single();
|
|
4759
|
-
if (error) {
|
|
4760
|
-
console.error("Error updating order:", error);
|
|
4761
|
-
return [];
|
|
4762
|
-
}
|
|
4763
|
-
return [data.id];
|
|
4764
|
-
} catch (error) {
|
|
4765
|
-
console.error("Error updating order:", error);
|
|
4766
|
-
return [];
|
|
4767
|
-
}
|
|
4768
|
-
},
|
|
4769
|
-
[supabase]
|
|
4770
|
-
);
|
|
4771
|
-
return {
|
|
4772
|
-
updateOrderSupabase
|
|
4773
|
-
};
|
|
4774
|
-
};
|
|
4775
4608
|
|
|
4776
4609
|
// src/services/pos-service/supabase/delete-order.ts
|
|
4777
4610
|
var import_react48 = require("react");
|
|
4778
|
-
var deleteOrderSupabaseService = () => {
|
|
4779
|
-
const supabase = useSupabaseOptional();
|
|
4780
|
-
const deleteOrderSupabase = (0, import_react48.useCallback)(
|
|
4781
|
-
async (values) => {
|
|
4782
|
-
if (!supabase) {
|
|
4783
|
-
console.error("Supabase client not initialized");
|
|
4784
|
-
return [];
|
|
4785
|
-
}
|
|
4786
|
-
try {
|
|
4787
|
-
const { error, data } = await supabase.from("orders" /* ORDERS */).delete().eq("id", values.id).select("id").single();
|
|
4788
|
-
if (error) {
|
|
4789
|
-
console.error("Error deleting order:", error);
|
|
4790
|
-
return [];
|
|
4791
|
-
}
|
|
4792
|
-
return [data.id];
|
|
4793
|
-
} catch (error) {
|
|
4794
|
-
console.error("Error deleting order:", error);
|
|
4795
|
-
return [];
|
|
4796
|
-
}
|
|
4797
|
-
},
|
|
4798
|
-
[supabase]
|
|
4799
|
-
);
|
|
4800
|
-
return {
|
|
4801
|
-
deleteOrderSupabase
|
|
4802
|
-
};
|
|
4803
|
-
};
|
|
4804
4611
|
|
|
4805
4612
|
// src/services/pos-service/supabase/delete-order-line.ts
|
|
4806
4613
|
var import_react49 = require("react");
|
|
4807
|
-
|
|
4614
|
+
|
|
4615
|
+
// src/services/pos-service/supabase/add-category.ts
|
|
4616
|
+
var import_react50 = require("react");
|
|
4617
|
+
var addCategorySupabaseService = () => {
|
|
4808
4618
|
const supabase = useSupabaseOptional();
|
|
4809
|
-
const
|
|
4619
|
+
const addCategorySupabase = (0, import_react50.useCallback)(
|
|
4810
4620
|
async (values) => {
|
|
4811
4621
|
if (!supabase) {
|
|
4812
4622
|
console.error("Supabase client not initialized");
|
|
4813
|
-
return
|
|
4623
|
+
return null;
|
|
4814
4624
|
}
|
|
4815
4625
|
try {
|
|
4816
|
-
const {
|
|
4626
|
+
const { data, error } = await supabase.from("pos_categories" /* POS_CATEGORIES */).insert({
|
|
4627
|
+
name: values.name
|
|
4628
|
+
}).select("id, name").single();
|
|
4817
4629
|
if (error) {
|
|
4818
|
-
console.error("Error
|
|
4819
|
-
return
|
|
4630
|
+
console.error("Error adding Category:", error);
|
|
4631
|
+
return null;
|
|
4820
4632
|
}
|
|
4821
|
-
return [data.id];
|
|
4633
|
+
return [[data.id, data.name]];
|
|
4822
4634
|
} catch (error) {
|
|
4823
|
-
console.error("Error
|
|
4824
|
-
return
|
|
4635
|
+
console.error("Error adding Category:", error);
|
|
4636
|
+
return null;
|
|
4825
4637
|
}
|
|
4826
4638
|
},
|
|
4827
4639
|
[supabase]
|
|
4828
4640
|
);
|
|
4829
4641
|
return {
|
|
4830
|
-
|
|
4642
|
+
addCategorySupabase
|
|
4831
4643
|
};
|
|
4832
4644
|
};
|
|
4833
4645
|
|
|
@@ -4869,13 +4681,7 @@ var serviceFactories = [
|
|
|
4869
4681
|
updateTableSupabaseService,
|
|
4870
4682
|
deleteFloorSupabaseService,
|
|
4871
4683
|
deleteTableSupabaseService,
|
|
4872
|
-
|
|
4873
|
-
addProductToOrderSupabaseService,
|
|
4874
|
-
updateOrderTotalAmountSupabaseService,
|
|
4875
|
-
updateOrderLineSupabaseService,
|
|
4876
|
-
updateOrderSupabaseService,
|
|
4877
|
-
deleteOrderSupabaseService,
|
|
4878
|
-
deleteOrderLineSupabaseService
|
|
4684
|
+
addCategorySupabaseService
|
|
4879
4685
|
];
|
|
4880
4686
|
var usePosService = () => {
|
|
4881
4687
|
const { env } = useEnv();
|
|
@@ -4995,36 +4801,21 @@ var import_react_query120 = require("@tanstack/react-query");
|
|
|
4995
4801
|
// src/hooks/pos/supabase/use-create-order.ts
|
|
4996
4802
|
var import_react_query121 = require("@tanstack/react-query");
|
|
4997
4803
|
|
|
4998
|
-
// src/hooks/pos/supabase/use-add-
|
|
4804
|
+
// src/hooks/pos/supabase/use-add-category.ts
|
|
4999
4805
|
var import_react_query122 = require("@tanstack/react-query");
|
|
5000
4806
|
|
|
5001
|
-
// src/hooks/pos/supabase/use-update-order-total-amount.ts
|
|
5002
|
-
var import_react_query123 = require("@tanstack/react-query");
|
|
5003
|
-
|
|
5004
|
-
// src/hooks/pos/supabase/use-update-order-line.ts
|
|
5005
|
-
var import_react_query124 = require("@tanstack/react-query");
|
|
5006
|
-
|
|
5007
|
-
// src/hooks/pos/supabase/use-update-order.ts
|
|
5008
|
-
var import_react_query125 = require("@tanstack/react-query");
|
|
5009
|
-
|
|
5010
|
-
// src/hooks/pos/supabase/use-delete-order.ts
|
|
5011
|
-
var import_react_query126 = require("@tanstack/react-query");
|
|
5012
|
-
|
|
5013
|
-
// src/hooks/pos/supabase/use-delete-order-line.ts
|
|
5014
|
-
var import_react_query127 = require("@tanstack/react-query");
|
|
5015
|
-
|
|
5016
4807
|
// src/provider/service-provider.tsx
|
|
5017
4808
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
5018
|
-
var ServiceContext = (0,
|
|
4809
|
+
var ServiceContext = (0, import_react51.createContext)(null);
|
|
5019
4810
|
|
|
5020
4811
|
// src/provider/meta-provider.tsx
|
|
5021
|
-
var
|
|
4812
|
+
var import_react52 = require("react");
|
|
5022
4813
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
5023
4814
|
|
|
5024
4815
|
// src/services/action-service/index.ts
|
|
5025
4816
|
function useActionService() {
|
|
5026
4817
|
const { env } = useEnv();
|
|
5027
|
-
const loadAction = (0,
|
|
4818
|
+
const loadAction = (0, import_react53.useCallback)(
|
|
5028
4819
|
async ({
|
|
5029
4820
|
idAction,
|
|
5030
4821
|
context,
|
|
@@ -5048,7 +4839,7 @@ function useActionService() {
|
|
|
5048
4839
|
},
|
|
5049
4840
|
[env]
|
|
5050
4841
|
);
|
|
5051
|
-
const callButton = (0,
|
|
4842
|
+
const callButton = (0, import_react53.useCallback)(
|
|
5052
4843
|
async ({
|
|
5053
4844
|
model,
|
|
5054
4845
|
ids = [],
|
|
@@ -5082,7 +4873,7 @@ function useActionService() {
|
|
|
5082
4873
|
},
|
|
5083
4874
|
[env]
|
|
5084
4875
|
);
|
|
5085
|
-
const removeRows = (0,
|
|
4876
|
+
const removeRows = (0, import_react53.useCallback)(
|
|
5086
4877
|
async ({
|
|
5087
4878
|
model,
|
|
5088
4879
|
ids,
|
|
@@ -5108,7 +4899,7 @@ function useActionService() {
|
|
|
5108
4899
|
},
|
|
5109
4900
|
[env]
|
|
5110
4901
|
);
|
|
5111
|
-
const duplicateRecord = (0,
|
|
4902
|
+
const duplicateRecord = (0, import_react53.useCallback)(
|
|
5112
4903
|
async ({
|
|
5113
4904
|
model,
|
|
5114
4905
|
id,
|
|
@@ -5134,7 +4925,7 @@ function useActionService() {
|
|
|
5134
4925
|
},
|
|
5135
4926
|
[env]
|
|
5136
4927
|
);
|
|
5137
|
-
const getPrintReportName = (0,
|
|
4928
|
+
const getPrintReportName = (0, import_react53.useCallback)(
|
|
5138
4929
|
async ({ id }) => {
|
|
5139
4930
|
const jsonData = {
|
|
5140
4931
|
model: "ir.actions.report",
|
|
@@ -5152,7 +4943,7 @@ function useActionService() {
|
|
|
5152
4943
|
},
|
|
5153
4944
|
[env]
|
|
5154
4945
|
);
|
|
5155
|
-
const print = (0,
|
|
4946
|
+
const print = (0, import_react53.useCallback)(
|
|
5156
4947
|
async ({ id, report, db }) => {
|
|
5157
4948
|
const jsonData = {
|
|
5158
4949
|
report,
|
|
@@ -5170,7 +4961,7 @@ function useActionService() {
|
|
|
5170
4961
|
},
|
|
5171
4962
|
[env]
|
|
5172
4963
|
);
|
|
5173
|
-
const runAction = (0,
|
|
4964
|
+
const runAction = (0, import_react53.useCallback)(
|
|
5174
4965
|
async ({
|
|
5175
4966
|
idAction,
|
|
5176
4967
|
context,
|
|
@@ -5197,7 +4988,7 @@ function useActionService() {
|
|
|
5197
4988
|
},
|
|
5198
4989
|
[env]
|
|
5199
4990
|
);
|
|
5200
|
-
const generateSerialNumber = (0,
|
|
4991
|
+
const generateSerialNumber = (0, import_react53.useCallback)(
|
|
5201
4992
|
async ({
|
|
5202
4993
|
kwargs,
|
|
5203
4994
|
context,
|
|
@@ -5235,11 +5026,11 @@ function useActionService() {
|
|
|
5235
5026
|
}
|
|
5236
5027
|
|
|
5237
5028
|
// src/services/auth-service/index.ts
|
|
5238
|
-
var
|
|
5029
|
+
var import_react54 = require("react");
|
|
5239
5030
|
function useAuthService() {
|
|
5240
5031
|
const { env } = useEnv();
|
|
5241
5032
|
const supabase = useSupabaseOptional();
|
|
5242
|
-
const login = (0,
|
|
5033
|
+
const login = (0, import_react54.useCallback)(
|
|
5243
5034
|
async (body) => {
|
|
5244
5035
|
const payload = Object.fromEntries(
|
|
5245
5036
|
Object.entries({
|
|
@@ -5264,7 +5055,7 @@ function useAuthService() {
|
|
|
5264
5055
|
},
|
|
5265
5056
|
[env]
|
|
5266
5057
|
);
|
|
5267
|
-
const loginSupabase = (0,
|
|
5058
|
+
const loginSupabase = (0, import_react54.useCallback)(
|
|
5268
5059
|
async (body) => {
|
|
5269
5060
|
if (!supabase) {
|
|
5270
5061
|
return {
|
|
@@ -5280,7 +5071,7 @@ function useAuthService() {
|
|
|
5280
5071
|
},
|
|
5281
5072
|
[supabase]
|
|
5282
5073
|
);
|
|
5283
|
-
const forgotPassword = (0,
|
|
5074
|
+
const forgotPassword = (0, import_react54.useCallback)(
|
|
5284
5075
|
async (email) => {
|
|
5285
5076
|
const bodyData = {
|
|
5286
5077
|
login: email,
|
|
@@ -5294,7 +5085,7 @@ function useAuthService() {
|
|
|
5294
5085
|
},
|
|
5295
5086
|
[env]
|
|
5296
5087
|
);
|
|
5297
|
-
const forgotPasswordSSO = (0,
|
|
5088
|
+
const forgotPasswordSSO = (0, import_react54.useCallback)(
|
|
5298
5089
|
async ({
|
|
5299
5090
|
email,
|
|
5300
5091
|
with_context,
|
|
@@ -5317,7 +5108,7 @@ function useAuthService() {
|
|
|
5317
5108
|
},
|
|
5318
5109
|
[env]
|
|
5319
5110
|
);
|
|
5320
|
-
const resetPassword = (0,
|
|
5111
|
+
const resetPassword = (0, import_react54.useCallback)(
|
|
5321
5112
|
async (data, token) => {
|
|
5322
5113
|
const bodyData = {
|
|
5323
5114
|
token,
|
|
@@ -5332,7 +5123,7 @@ function useAuthService() {
|
|
|
5332
5123
|
},
|
|
5333
5124
|
[env]
|
|
5334
5125
|
);
|
|
5335
|
-
const resetPasswordSSO = (0,
|
|
5126
|
+
const resetPasswordSSO = (0, import_react54.useCallback)(
|
|
5336
5127
|
async ({
|
|
5337
5128
|
method,
|
|
5338
5129
|
password,
|
|
@@ -5355,7 +5146,7 @@ function useAuthService() {
|
|
|
5355
5146
|
},
|
|
5356
5147
|
[env]
|
|
5357
5148
|
);
|
|
5358
|
-
const updatePassword = (0,
|
|
5149
|
+
const updatePassword = (0, import_react54.useCallback)(
|
|
5359
5150
|
async (data, token) => {
|
|
5360
5151
|
const bodyData = {
|
|
5361
5152
|
token,
|
|
@@ -5370,7 +5161,7 @@ function useAuthService() {
|
|
|
5370
5161
|
},
|
|
5371
5162
|
[env]
|
|
5372
5163
|
);
|
|
5373
|
-
const isValidToken = (0,
|
|
5164
|
+
const isValidToken = (0, import_react54.useCallback)(
|
|
5374
5165
|
async (token) => {
|
|
5375
5166
|
const bodyData = {
|
|
5376
5167
|
token
|
|
@@ -5383,7 +5174,7 @@ function useAuthService() {
|
|
|
5383
5174
|
},
|
|
5384
5175
|
[env]
|
|
5385
5176
|
);
|
|
5386
|
-
const isValidActionToken = (0,
|
|
5177
|
+
const isValidActionToken = (0, import_react54.useCallback)(
|
|
5387
5178
|
async (actionToken) => {
|
|
5388
5179
|
const bodyData = {};
|
|
5389
5180
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -5396,7 +5187,7 @@ function useAuthService() {
|
|
|
5396
5187
|
},
|
|
5397
5188
|
[env]
|
|
5398
5189
|
);
|
|
5399
|
-
const loginSocial = (0,
|
|
5190
|
+
const loginSocial = (0, import_react54.useCallback)(
|
|
5400
5191
|
async ({
|
|
5401
5192
|
db,
|
|
5402
5193
|
state,
|
|
@@ -5414,13 +5205,13 @@ function useAuthService() {
|
|
|
5414
5205
|
},
|
|
5415
5206
|
[env]
|
|
5416
5207
|
);
|
|
5417
|
-
const getProviders = (0,
|
|
5208
|
+
const getProviders = (0, import_react54.useCallback)(
|
|
5418
5209
|
async (db) => {
|
|
5419
5210
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
5420
5211
|
},
|
|
5421
5212
|
[env]
|
|
5422
5213
|
);
|
|
5423
|
-
const getAccessByCode = (0,
|
|
5214
|
+
const getAccessByCode = (0, import_react54.useCallback)(
|
|
5424
5215
|
async (code) => {
|
|
5425
5216
|
const data = new URLSearchParams();
|
|
5426
5217
|
data.append("code", code);
|
|
@@ -5440,7 +5231,7 @@ function useAuthService() {
|
|
|
5440
5231
|
},
|
|
5441
5232
|
[env]
|
|
5442
5233
|
);
|
|
5443
|
-
const logout = (0,
|
|
5234
|
+
const logout = (0, import_react54.useCallback)(
|
|
5444
5235
|
async (service) => {
|
|
5445
5236
|
return env?.requests?.post(
|
|
5446
5237
|
"/logout" /* LOGOUT */,
|
|
@@ -5457,7 +5248,7 @@ function useAuthService() {
|
|
|
5457
5248
|
},
|
|
5458
5249
|
[env]
|
|
5459
5250
|
);
|
|
5460
|
-
const getTenantMapping = (0,
|
|
5251
|
+
const getTenantMapping = (0, import_react54.useCallback)(
|
|
5461
5252
|
async ({ shortName, service }) => {
|
|
5462
5253
|
const bodyData = {
|
|
5463
5254
|
short_name: shortName
|
|
@@ -5475,7 +5266,7 @@ function useAuthService() {
|
|
|
5475
5266
|
},
|
|
5476
5267
|
[env]
|
|
5477
5268
|
);
|
|
5478
|
-
const getToken = (0,
|
|
5269
|
+
const getToken = (0, import_react54.useCallback)(
|
|
5479
5270
|
async ({
|
|
5480
5271
|
phone,
|
|
5481
5272
|
name,
|
|
@@ -5520,10 +5311,10 @@ function useAuthService() {
|
|
|
5520
5311
|
}
|
|
5521
5312
|
|
|
5522
5313
|
// src/services/company-service/index.ts
|
|
5523
|
-
var
|
|
5314
|
+
var import_react55 = require("react");
|
|
5524
5315
|
function useCompanyService() {
|
|
5525
5316
|
const { env } = useEnv();
|
|
5526
|
-
const getCurrentCompany = (0,
|
|
5317
|
+
const getCurrentCompany = (0, import_react55.useCallback)(
|
|
5527
5318
|
async (service, extraHeaders) => {
|
|
5528
5319
|
return await env.requests.get(
|
|
5529
5320
|
"/company" /* COMPANY_PATH */,
|
|
@@ -5540,7 +5331,7 @@ function useCompanyService() {
|
|
|
5540
5331
|
},
|
|
5541
5332
|
[env]
|
|
5542
5333
|
);
|
|
5543
|
-
const getInfoCompany = (0,
|
|
5334
|
+
const getInfoCompany = (0, import_react55.useCallback)(
|
|
5544
5335
|
async (id, service) => {
|
|
5545
5336
|
const jsonData = {
|
|
5546
5337
|
ids: [id],
|
|
@@ -5576,10 +5367,10 @@ function useCompanyService() {
|
|
|
5576
5367
|
}
|
|
5577
5368
|
|
|
5578
5369
|
// src/services/excel-service/index.ts
|
|
5579
|
-
var
|
|
5370
|
+
var import_react56 = require("react");
|
|
5580
5371
|
function useExcelService() {
|
|
5581
5372
|
const { env } = useEnv();
|
|
5582
|
-
const uploadFileExcel = (0,
|
|
5373
|
+
const uploadFileExcel = (0, import_react56.useCallback)(
|
|
5583
5374
|
async ({
|
|
5584
5375
|
formData,
|
|
5585
5376
|
service,
|
|
@@ -5596,7 +5387,7 @@ function useExcelService() {
|
|
|
5596
5387
|
},
|
|
5597
5388
|
[env]
|
|
5598
5389
|
);
|
|
5599
|
-
const uploadIdFile = (0,
|
|
5390
|
+
const uploadIdFile = (0, import_react56.useCallback)(
|
|
5600
5391
|
async ({
|
|
5601
5392
|
formData,
|
|
5602
5393
|
service,
|
|
@@ -5613,7 +5404,7 @@ function useExcelService() {
|
|
|
5613
5404
|
},
|
|
5614
5405
|
[env]
|
|
5615
5406
|
);
|
|
5616
|
-
const parsePreview = (0,
|
|
5407
|
+
const parsePreview = (0, import_react56.useCallback)(
|
|
5617
5408
|
async ({
|
|
5618
5409
|
id,
|
|
5619
5410
|
selectedSheet,
|
|
@@ -5662,7 +5453,7 @@ function useExcelService() {
|
|
|
5662
5453
|
},
|
|
5663
5454
|
[env]
|
|
5664
5455
|
);
|
|
5665
|
-
const executeImport = (0,
|
|
5456
|
+
const executeImport = (0, import_react56.useCallback)(
|
|
5666
5457
|
async ({
|
|
5667
5458
|
columns,
|
|
5668
5459
|
fields,
|
|
@@ -5696,7 +5487,7 @@ function useExcelService() {
|
|
|
5696
5487
|
},
|
|
5697
5488
|
[env]
|
|
5698
5489
|
);
|
|
5699
|
-
const getFileExcel = (0,
|
|
5490
|
+
const getFileExcel = (0, import_react56.useCallback)(
|
|
5700
5491
|
async ({
|
|
5701
5492
|
model,
|
|
5702
5493
|
service,
|
|
@@ -5720,7 +5511,7 @@ function useExcelService() {
|
|
|
5720
5511
|
},
|
|
5721
5512
|
[env]
|
|
5722
5513
|
);
|
|
5723
|
-
const getFieldExport = (0,
|
|
5514
|
+
const getFieldExport = (0, import_react56.useCallback)(
|
|
5724
5515
|
async ({
|
|
5725
5516
|
ids,
|
|
5726
5517
|
model,
|
|
@@ -5760,7 +5551,7 @@ function useExcelService() {
|
|
|
5760
5551
|
},
|
|
5761
5552
|
[env]
|
|
5762
5553
|
);
|
|
5763
|
-
const exportExcel = (0,
|
|
5554
|
+
const exportExcel = (0, import_react56.useCallback)(
|
|
5764
5555
|
async ({
|
|
5765
5556
|
model,
|
|
5766
5557
|
domain,
|
|
@@ -5808,10 +5599,10 @@ function useExcelService() {
|
|
|
5808
5599
|
}
|
|
5809
5600
|
|
|
5810
5601
|
// src/services/form-service/index.ts
|
|
5811
|
-
var
|
|
5602
|
+
var import_react57 = require("react");
|
|
5812
5603
|
function useFormService() {
|
|
5813
5604
|
const { env } = useEnv();
|
|
5814
|
-
const getComment = (0,
|
|
5605
|
+
const getComment = (0, import_react57.useCallback)(
|
|
5815
5606
|
async ({ data }) => {
|
|
5816
5607
|
const jsonData = {
|
|
5817
5608
|
thread_id: data.thread_id,
|
|
@@ -5829,7 +5620,7 @@ function useFormService() {
|
|
|
5829
5620
|
},
|
|
5830
5621
|
[env]
|
|
5831
5622
|
);
|
|
5832
|
-
const getThreadData = (0,
|
|
5623
|
+
const getThreadData = (0, import_react57.useCallback)(
|
|
5833
5624
|
async ({
|
|
5834
5625
|
data,
|
|
5835
5626
|
xNode,
|
|
@@ -5856,7 +5647,7 @@ function useFormService() {
|
|
|
5856
5647
|
},
|
|
5857
5648
|
[env]
|
|
5858
5649
|
);
|
|
5859
|
-
const getThreadMessages = (0,
|
|
5650
|
+
const getThreadMessages = (0, import_react57.useCallback)(
|
|
5860
5651
|
async ({
|
|
5861
5652
|
data,
|
|
5862
5653
|
xNode,
|
|
@@ -5882,7 +5673,7 @@ function useFormService() {
|
|
|
5882
5673
|
},
|
|
5883
5674
|
[env]
|
|
5884
5675
|
);
|
|
5885
|
-
const sentComment = (0,
|
|
5676
|
+
const sentComment = (0, import_react57.useCallback)(
|
|
5886
5677
|
async ({ data }) => {
|
|
5887
5678
|
const jsonData = {
|
|
5888
5679
|
context: {
|
|
@@ -5910,7 +5701,7 @@ function useFormService() {
|
|
|
5910
5701
|
},
|
|
5911
5702
|
[env]
|
|
5912
5703
|
);
|
|
5913
|
-
const deleteComment = (0,
|
|
5704
|
+
const deleteComment = (0, import_react57.useCallback)(
|
|
5914
5705
|
async ({ data }) => {
|
|
5915
5706
|
const jsonData = {
|
|
5916
5707
|
attachment_ids: [],
|
|
@@ -5926,7 +5717,7 @@ function useFormService() {
|
|
|
5926
5717
|
},
|
|
5927
5718
|
[env]
|
|
5928
5719
|
);
|
|
5929
|
-
const getImage = (0,
|
|
5720
|
+
const getImage = (0, import_react57.useCallback)(
|
|
5930
5721
|
async ({ data }) => {
|
|
5931
5722
|
return env.requests.get(
|
|
5932
5723
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -5939,7 +5730,7 @@ function useFormService() {
|
|
|
5939
5730
|
},
|
|
5940
5731
|
[env]
|
|
5941
5732
|
);
|
|
5942
|
-
const uploadImage = (0,
|
|
5733
|
+
const uploadImage = (0, import_react57.useCallback)(
|
|
5943
5734
|
async ({
|
|
5944
5735
|
formData,
|
|
5945
5736
|
service,
|
|
@@ -5958,7 +5749,7 @@ function useFormService() {
|
|
|
5958
5749
|
},
|
|
5959
5750
|
[env]
|
|
5960
5751
|
);
|
|
5961
|
-
const uploadFile = (0,
|
|
5752
|
+
const uploadFile = (0, import_react57.useCallback)(
|
|
5962
5753
|
async ({
|
|
5963
5754
|
formData,
|
|
5964
5755
|
service,
|
|
@@ -5978,7 +5769,7 @@ function useFormService() {
|
|
|
5978
5769
|
},
|
|
5979
5770
|
[env]
|
|
5980
5771
|
);
|
|
5981
|
-
const getFormView = (0,
|
|
5772
|
+
const getFormView = (0, import_react57.useCallback)(
|
|
5982
5773
|
async ({ data }) => {
|
|
5983
5774
|
const jsonData = {
|
|
5984
5775
|
model: data.model,
|
|
@@ -5994,7 +5785,7 @@ function useFormService() {
|
|
|
5994
5785
|
},
|
|
5995
5786
|
[env]
|
|
5996
5787
|
);
|
|
5997
|
-
const changeStatus = (0,
|
|
5788
|
+
const changeStatus = (0, import_react57.useCallback)(
|
|
5998
5789
|
async ({ data }) => {
|
|
5999
5790
|
const vals = {
|
|
6000
5791
|
[data.name]: data.stage_id
|
|
@@ -6023,7 +5814,7 @@ function useFormService() {
|
|
|
6023
5814
|
},
|
|
6024
5815
|
[env]
|
|
6025
5816
|
);
|
|
6026
|
-
const getExternalTab = (0,
|
|
5817
|
+
const getExternalTab = (0, import_react57.useCallback)(
|
|
6027
5818
|
async ({ method, context, service, xNode }) => {
|
|
6028
5819
|
return env?.requests?.post(
|
|
6029
5820
|
"/call" /* CALL_PATH */,
|
|
@@ -6058,10 +5849,10 @@ function useFormService() {
|
|
|
6058
5849
|
}
|
|
6059
5850
|
|
|
6060
5851
|
// src/services/kanban-service/index.ts
|
|
6061
|
-
var
|
|
5852
|
+
var import_react58 = require("react");
|
|
6062
5853
|
function useKanbanService() {
|
|
6063
5854
|
const { env } = useEnv();
|
|
6064
|
-
const getGroups = (0,
|
|
5855
|
+
const getGroups = (0, import_react58.useCallback)(
|
|
6065
5856
|
async ({ model, width_context }) => {
|
|
6066
5857
|
const jsonData = {
|
|
6067
5858
|
model,
|
|
@@ -6081,7 +5872,7 @@ function useKanbanService() {
|
|
|
6081
5872
|
},
|
|
6082
5873
|
[env]
|
|
6083
5874
|
);
|
|
6084
|
-
const getProgressBar = (0,
|
|
5875
|
+
const getProgressBar = (0, import_react58.useCallback)(
|
|
6085
5876
|
async ({ field, color, model, width_context }) => {
|
|
6086
5877
|
const jsonData = {
|
|
6087
5878
|
model,
|
|
@@ -6111,10 +5902,10 @@ function useKanbanService() {
|
|
|
6111
5902
|
}
|
|
6112
5903
|
|
|
6113
5904
|
// src/services/model-service/index.ts
|
|
6114
|
-
var
|
|
5905
|
+
var import_react59 = require("react");
|
|
6115
5906
|
function useModelService() {
|
|
6116
5907
|
const { env } = useEnv();
|
|
6117
|
-
const getListMyBankAccount = (0,
|
|
5908
|
+
const getListMyBankAccount = (0, import_react59.useCallback)(
|
|
6118
5909
|
async ({
|
|
6119
5910
|
domain,
|
|
6120
5911
|
spectification,
|
|
@@ -6138,7 +5929,7 @@ function useModelService() {
|
|
|
6138
5929
|
},
|
|
6139
5930
|
[env]
|
|
6140
5931
|
);
|
|
6141
|
-
const getCurrency = (0,
|
|
5932
|
+
const getCurrency = (0, import_react59.useCallback)(async () => {
|
|
6142
5933
|
const jsonData = {
|
|
6143
5934
|
model: "res.currency",
|
|
6144
5935
|
method: "web_search_read",
|
|
@@ -6158,7 +5949,7 @@ function useModelService() {
|
|
|
6158
5949
|
}
|
|
6159
5950
|
});
|
|
6160
5951
|
}, [env]);
|
|
6161
|
-
const getConversionRate = (0,
|
|
5952
|
+
const getConversionRate = (0, import_react59.useCallback)(async () => {
|
|
6162
5953
|
const jsonData = {
|
|
6163
5954
|
model: "res.currency",
|
|
6164
5955
|
method: "web_search_read",
|
|
@@ -6184,7 +5975,7 @@ function useModelService() {
|
|
|
6184
5975
|
}
|
|
6185
5976
|
});
|
|
6186
5977
|
}, [env]);
|
|
6187
|
-
const getAll = (0,
|
|
5978
|
+
const getAll = (0, import_react59.useCallback)(
|
|
6188
5979
|
async ({
|
|
6189
5980
|
data,
|
|
6190
5981
|
service,
|
|
@@ -6226,7 +6017,7 @@ function useModelService() {
|
|
|
6226
6017
|
},
|
|
6227
6018
|
[env]
|
|
6228
6019
|
);
|
|
6229
|
-
const getListCalendar = (0,
|
|
6020
|
+
const getListCalendar = (0, import_react59.useCallback)(
|
|
6230
6021
|
async ({ data }) => {
|
|
6231
6022
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
6232
6023
|
fields: data.fields,
|
|
@@ -6257,7 +6048,7 @@ function useModelService() {
|
|
|
6257
6048
|
},
|
|
6258
6049
|
[env]
|
|
6259
6050
|
);
|
|
6260
|
-
const getList = (0,
|
|
6051
|
+
const getList = (0, import_react59.useCallback)(
|
|
6261
6052
|
async ({
|
|
6262
6053
|
model,
|
|
6263
6054
|
ids = [],
|
|
@@ -6289,7 +6080,7 @@ function useModelService() {
|
|
|
6289
6080
|
},
|
|
6290
6081
|
[env]
|
|
6291
6082
|
);
|
|
6292
|
-
const getDetail = (0,
|
|
6083
|
+
const getDetail = (0, import_react59.useCallback)(
|
|
6293
6084
|
async ({
|
|
6294
6085
|
ids = [],
|
|
6295
6086
|
model,
|
|
@@ -6321,7 +6112,7 @@ function useModelService() {
|
|
|
6321
6112
|
},
|
|
6322
6113
|
[env]
|
|
6323
6114
|
);
|
|
6324
|
-
const save = (0,
|
|
6115
|
+
const save = (0, import_react59.useCallback)(
|
|
6325
6116
|
async ({
|
|
6326
6117
|
model,
|
|
6327
6118
|
ids = [],
|
|
@@ -6356,7 +6147,7 @@ function useModelService() {
|
|
|
6356
6147
|
},
|
|
6357
6148
|
[env]
|
|
6358
6149
|
);
|
|
6359
|
-
const deleteApi = (0,
|
|
6150
|
+
const deleteApi = (0, import_react59.useCallback)(
|
|
6360
6151
|
async ({ ids = [], model, service }) => {
|
|
6361
6152
|
const jsonData = {
|
|
6362
6153
|
model,
|
|
@@ -6376,7 +6167,7 @@ function useModelService() {
|
|
|
6376
6167
|
},
|
|
6377
6168
|
[env]
|
|
6378
6169
|
);
|
|
6379
|
-
const onChange = (0,
|
|
6170
|
+
const onChange = (0, import_react59.useCallback)(
|
|
6380
6171
|
async ({
|
|
6381
6172
|
ids = [],
|
|
6382
6173
|
model,
|
|
@@ -6412,7 +6203,7 @@ function useModelService() {
|
|
|
6412
6203
|
},
|
|
6413
6204
|
[env]
|
|
6414
6205
|
);
|
|
6415
|
-
const getListFieldsOnchange = (0,
|
|
6206
|
+
const getListFieldsOnchange = (0, import_react59.useCallback)(
|
|
6416
6207
|
async ({
|
|
6417
6208
|
model,
|
|
6418
6209
|
service,
|
|
@@ -6436,7 +6227,7 @@ function useModelService() {
|
|
|
6436
6227
|
},
|
|
6437
6228
|
[env]
|
|
6438
6229
|
);
|
|
6439
|
-
const parseORMOdoo = (0,
|
|
6230
|
+
const parseORMOdoo = (0, import_react59.useCallback)((data) => {
|
|
6440
6231
|
for (const key in data) {
|
|
6441
6232
|
if (key === "display_name") {
|
|
6442
6233
|
delete data[key];
|
|
@@ -6447,7 +6238,7 @@ function useModelService() {
|
|
|
6447
6238
|
}
|
|
6448
6239
|
return { ...data };
|
|
6449
6240
|
}, []);
|
|
6450
|
-
const toDataJS = (0,
|
|
6241
|
+
const toDataJS = (0, import_react59.useCallback)(
|
|
6451
6242
|
(data, viewData, model) => {
|
|
6452
6243
|
for (const key in data) {
|
|
6453
6244
|
if (data[key] === false) {
|
|
@@ -6505,10 +6296,10 @@ function useModelService() {
|
|
|
6505
6296
|
}
|
|
6506
6297
|
|
|
6507
6298
|
// src/services/user-service/index.ts
|
|
6508
|
-
var
|
|
6299
|
+
var import_react60 = require("react");
|
|
6509
6300
|
function useUserService() {
|
|
6510
6301
|
const { env } = useEnv();
|
|
6511
|
-
const getProfile = (0,
|
|
6302
|
+
const getProfile = (0, import_react60.useCallback)(
|
|
6512
6303
|
async (service, path, extraHeaders) => {
|
|
6513
6304
|
return env?.requests?.get(
|
|
6514
6305
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -6525,7 +6316,7 @@ function useUserService() {
|
|
|
6525
6316
|
},
|
|
6526
6317
|
[env]
|
|
6527
6318
|
);
|
|
6528
|
-
const getUser = (0,
|
|
6319
|
+
const getUser = (0, import_react60.useCallback)(
|
|
6529
6320
|
async ({ context, id }) => {
|
|
6530
6321
|
const jsonData = {
|
|
6531
6322
|
model: "res.users",
|
|
@@ -6563,7 +6354,7 @@ function useUserService() {
|
|
|
6563
6354
|
},
|
|
6564
6355
|
[env]
|
|
6565
6356
|
);
|
|
6566
|
-
const switchUserLocale = (0,
|
|
6357
|
+
const switchUserLocale = (0, import_react60.useCallback)(
|
|
6567
6358
|
async ({ id, values, service }) => {
|
|
6568
6359
|
const jsonData = {
|
|
6569
6360
|
model: "res.users",
|
|
@@ -6591,10 +6382,10 @@ function useUserService() {
|
|
|
6591
6382
|
}
|
|
6592
6383
|
|
|
6593
6384
|
// src/services/view-service/index.ts
|
|
6594
|
-
var
|
|
6385
|
+
var import_react61 = require("react");
|
|
6595
6386
|
function useViewService() {
|
|
6596
6387
|
const { env } = useEnv();
|
|
6597
|
-
const getView = (0,
|
|
6388
|
+
const getView = (0, import_react61.useCallback)(
|
|
6598
6389
|
async ({
|
|
6599
6390
|
model,
|
|
6600
6391
|
views,
|
|
@@ -6634,7 +6425,7 @@ function useViewService() {
|
|
|
6634
6425
|
},
|
|
6635
6426
|
[env]
|
|
6636
6427
|
);
|
|
6637
|
-
const getMenu = (0,
|
|
6428
|
+
const getMenu = (0, import_react61.useCallback)(
|
|
6638
6429
|
async (context, specification, domain, service) => {
|
|
6639
6430
|
const jsonData = {
|
|
6640
6431
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -6665,7 +6456,7 @@ function useViewService() {
|
|
|
6665
6456
|
},
|
|
6666
6457
|
[env]
|
|
6667
6458
|
);
|
|
6668
|
-
const getActionDetail = (0,
|
|
6459
|
+
const getActionDetail = (0, import_react61.useCallback)(
|
|
6669
6460
|
async (aid, context) => {
|
|
6670
6461
|
const jsonData = {
|
|
6671
6462
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -6695,7 +6486,7 @@ function useViewService() {
|
|
|
6695
6486
|
},
|
|
6696
6487
|
[env]
|
|
6697
6488
|
);
|
|
6698
|
-
const getResequence = (0,
|
|
6489
|
+
const getResequence = (0, import_react61.useCallback)(
|
|
6699
6490
|
async ({
|
|
6700
6491
|
model,
|
|
6701
6492
|
ids,
|
|
@@ -6725,7 +6516,7 @@ function useViewService() {
|
|
|
6725
6516
|
},
|
|
6726
6517
|
[env]
|
|
6727
6518
|
);
|
|
6728
|
-
const getSelectionItem = (0,
|
|
6519
|
+
const getSelectionItem = (0, import_react61.useCallback)(
|
|
6729
6520
|
async ({
|
|
6730
6521
|
data,
|
|
6731
6522
|
service,
|
|
@@ -6762,7 +6553,7 @@ function useViewService() {
|
|
|
6762
6553
|
},
|
|
6763
6554
|
[env]
|
|
6764
6555
|
);
|
|
6765
|
-
const loadMessages = (0,
|
|
6556
|
+
const loadMessages = (0, import_react61.useCallback)(async () => {
|
|
6766
6557
|
return env.requests.post(
|
|
6767
6558
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
6768
6559
|
{},
|
|
@@ -6773,14 +6564,14 @@ function useViewService() {
|
|
|
6773
6564
|
}
|
|
6774
6565
|
);
|
|
6775
6566
|
}, [env]);
|
|
6776
|
-
const getVersion = (0,
|
|
6567
|
+
const getVersion = (0, import_react61.useCallback)(async () => {
|
|
6777
6568
|
return env?.requests?.get("", {
|
|
6778
6569
|
headers: {
|
|
6779
6570
|
"Content-Type": "application/json"
|
|
6780
6571
|
}
|
|
6781
6572
|
});
|
|
6782
6573
|
}, [env]);
|
|
6783
|
-
const grantAccess = (0,
|
|
6574
|
+
const grantAccess = (0, import_react61.useCallback)(
|
|
6784
6575
|
async ({
|
|
6785
6576
|
redirect_uri,
|
|
6786
6577
|
state,
|
|
@@ -6807,7 +6598,7 @@ function useViewService() {
|
|
|
6807
6598
|
},
|
|
6808
6599
|
[env]
|
|
6809
6600
|
);
|
|
6810
|
-
const removeTotpSetUp = (0,
|
|
6601
|
+
const removeTotpSetUp = (0, import_react61.useCallback)(
|
|
6811
6602
|
async ({ method, token }) => {
|
|
6812
6603
|
const jsonData = {
|
|
6813
6604
|
method,
|
|
@@ -6828,7 +6619,7 @@ function useViewService() {
|
|
|
6828
6619
|
},
|
|
6829
6620
|
[env]
|
|
6830
6621
|
);
|
|
6831
|
-
const requestSetupTotp = (0,
|
|
6622
|
+
const requestSetupTotp = (0, import_react61.useCallback)(
|
|
6832
6623
|
async ({ method, token }) => {
|
|
6833
6624
|
const jsonData = {
|
|
6834
6625
|
method,
|
|
@@ -6847,7 +6638,7 @@ function useViewService() {
|
|
|
6847
6638
|
},
|
|
6848
6639
|
[env]
|
|
6849
6640
|
);
|
|
6850
|
-
const settingsWebRead2fa = (0,
|
|
6641
|
+
const settingsWebRead2fa = (0, import_react61.useCallback)(
|
|
6851
6642
|
async ({
|
|
6852
6643
|
method,
|
|
6853
6644
|
model,
|
|
@@ -6875,7 +6666,7 @@ function useViewService() {
|
|
|
6875
6666
|
},
|
|
6876
6667
|
[env]
|
|
6877
6668
|
);
|
|
6878
|
-
const signInSSO = (0,
|
|
6669
|
+
const signInSSO = (0, import_react61.useCallback)(
|
|
6879
6670
|
async ({
|
|
6880
6671
|
redirect_uri,
|
|
6881
6672
|
state,
|
|
@@ -6907,7 +6698,7 @@ function useViewService() {
|
|
|
6907
6698
|
},
|
|
6908
6699
|
[env]
|
|
6909
6700
|
);
|
|
6910
|
-
const verify2FA = (0,
|
|
6701
|
+
const verify2FA = (0, import_react61.useCallback)(
|
|
6911
6702
|
({
|
|
6912
6703
|
method,
|
|
6913
6704
|
with_context,
|
|
@@ -6940,7 +6731,7 @@ function useViewService() {
|
|
|
6940
6731
|
},
|
|
6941
6732
|
[env]
|
|
6942
6733
|
);
|
|
6943
|
-
const get2FAMethods = (0,
|
|
6734
|
+
const get2FAMethods = (0, import_react61.useCallback)(
|
|
6944
6735
|
({ method, with_context }) => {
|
|
6945
6736
|
const jsonData = {
|
|
6946
6737
|
method,
|
|
@@ -6959,7 +6750,7 @@ function useViewService() {
|
|
|
6959
6750
|
},
|
|
6960
6751
|
[env]
|
|
6961
6752
|
);
|
|
6962
|
-
const verifyTotp = (0,
|
|
6753
|
+
const verifyTotp = (0, import_react61.useCallback)(
|
|
6963
6754
|
({
|
|
6964
6755
|
method,
|
|
6965
6756
|
action_token,
|
|
@@ -6984,7 +6775,7 @@ function useViewService() {
|
|
|
6984
6775
|
},
|
|
6985
6776
|
[env]
|
|
6986
6777
|
);
|
|
6987
|
-
const getNotifications = (0,
|
|
6778
|
+
const getNotifications = (0, import_react61.useCallback)(
|
|
6988
6779
|
async ({
|
|
6989
6780
|
service,
|
|
6990
6781
|
xNode,
|
|
@@ -7004,7 +6795,7 @@ function useViewService() {
|
|
|
7004
6795
|
},
|
|
7005
6796
|
[env]
|
|
7006
6797
|
);
|
|
7007
|
-
const getCountry = (0,
|
|
6798
|
+
const getCountry = (0, import_react61.useCallback)(
|
|
7008
6799
|
async ({
|
|
7009
6800
|
service,
|
|
7010
6801
|
xNode,
|
|
@@ -7031,7 +6822,7 @@ function useViewService() {
|
|
|
7031
6822
|
},
|
|
7032
6823
|
[env]
|
|
7033
6824
|
);
|
|
7034
|
-
const getCity = (0,
|
|
6825
|
+
const getCity = (0, import_react61.useCallback)(
|
|
7035
6826
|
async ({
|
|
7036
6827
|
service,
|
|
7037
6828
|
xNode,
|
|
@@ -7058,7 +6849,7 @@ function useViewService() {
|
|
|
7058
6849
|
},
|
|
7059
6850
|
[env]
|
|
7060
6851
|
);
|
|
7061
|
-
const getWard = (0,
|
|
6852
|
+
const getWard = (0, import_react61.useCallback)(
|
|
7062
6853
|
async ({
|
|
7063
6854
|
service,
|
|
7064
6855
|
xNode,
|
|
@@ -7083,7 +6874,7 @@ function useViewService() {
|
|
|
7083
6874
|
},
|
|
7084
6875
|
[env]
|
|
7085
6876
|
);
|
|
7086
|
-
const getPartnerTitle = (0,
|
|
6877
|
+
const getPartnerTitle = (0, import_react61.useCallback)(
|
|
7087
6878
|
async ({
|
|
7088
6879
|
service,
|
|
7089
6880
|
xNode,
|
|
@@ -7135,10 +6926,10 @@ function useViewService() {
|
|
|
7135
6926
|
}
|
|
7136
6927
|
|
|
7137
6928
|
// src/services/dashboard-service/index.ts
|
|
7138
|
-
var
|
|
6929
|
+
var import_react62 = require("react");
|
|
7139
6930
|
function useDashboardService() {
|
|
7140
6931
|
const { env } = useEnv();
|
|
7141
|
-
const readGroup = (0,
|
|
6932
|
+
const readGroup = (0, import_react62.useCallback)(
|
|
7142
6933
|
async ({
|
|
7143
6934
|
service,
|
|
7144
6935
|
xNode,
|
|
@@ -7155,7 +6946,7 @@ function useDashboardService() {
|
|
|
7155
6946
|
},
|
|
7156
6947
|
[env]
|
|
7157
6948
|
);
|
|
7158
|
-
const getDataChart = (0,
|
|
6949
|
+
const getDataChart = (0, import_react62.useCallback)(
|
|
7159
6950
|
async ({
|
|
7160
6951
|
service,
|
|
7161
6952
|
xNode,
|