@fctc/interface-logic 4.7.1 → 4.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks.d.mts +47 -7
- package/dist/hooks.d.ts +47 -7
- package/dist/hooks.js +263 -45
- package/dist/hooks.mjs +257 -44
- package/dist/provider.d.mts +7 -2
- package/dist/provider.d.ts +7 -2
- package/dist/provider.js +278 -65
- package/dist/provider.mjs +267 -54
- package/dist/services.d.mts +58 -7
- package/dist/services.d.ts +58 -7
- package/dist/services.js +341 -133
- package/dist/services.mjs +338 -130
- 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_react52 = 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_react50 = 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 [];
|
|
4485
4485
|
}
|
|
4486
4486
|
try {
|
|
4487
4487
|
const { id, ...updateData } = values;
|
|
4488
|
-
const { error } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id);
|
|
4488
|
+
const { error, data } = await supabase.from("restaurant_floors" /* RESTAURANT_FLOORS */).update(updateData).eq("id", id).select("id").single();
|
|
4489
4489
|
if (error) {
|
|
4490
4490
|
console.error("Error updating floor:", error);
|
|
4491
|
-
return
|
|
4491
|
+
return [];
|
|
4492
4492
|
}
|
|
4493
|
-
return
|
|
4493
|
+
return [data.id];
|
|
4494
4494
|
} catch (error) {
|
|
4495
4495
|
console.error("Error updating floor:", error);
|
|
4496
|
-
return
|
|
4496
|
+
return [];
|
|
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 [];
|
|
4515
4515
|
}
|
|
4516
4516
|
try {
|
|
4517
4517
|
const { id, ...updateData } = values;
|
|
4518
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id);
|
|
4518
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).update(updateData).eq("id", id).select("id").single();
|
|
4519
4519
|
if (error) {
|
|
4520
4520
|
console.error("Error updating table:", error);
|
|
4521
|
-
return
|
|
4521
|
+
return [];
|
|
4522
4522
|
}
|
|
4523
|
-
return
|
|
4523
|
+
return [data.id];
|
|
4524
4524
|
} catch (error) {
|
|
4525
4525
|
console.error("Error updating table:", error);
|
|
4526
|
-
return
|
|
4526
|
+
return [];
|
|
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 [];
|
|
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 [];
|
|
4551
4551
|
}
|
|
4552
|
-
return
|
|
4552
|
+
return [values.id];
|
|
4553
4553
|
} catch (error) {
|
|
4554
4554
|
console.error("Error deleting floor:", error);
|
|
4555
|
-
return
|
|
4555
|
+
return [];
|
|
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 [];
|
|
4574
4574
|
}
|
|
4575
4575
|
try {
|
|
4576
|
-
const { error } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id);
|
|
4576
|
+
const { error, data } = await supabase.from("restaurant_tables" /* RESTAURANT_TABLES */).delete().eq("id", values.id).select("id").single();
|
|
4577
4577
|
if (error) {
|
|
4578
4578
|
console.error("Error deleting table:", error);
|
|
4579
|
-
return
|
|
4579
|
+
return [];
|
|
4580
4580
|
}
|
|
4581
|
-
return
|
|
4581
|
+
return [data.id];
|
|
4582
4582
|
} catch (error) {
|
|
4583
4583
|
console.error("Error deleting table:", error);
|
|
4584
|
-
return
|
|
4584
|
+
return [];
|
|
4585
4585
|
}
|
|
4586
4586
|
},
|
|
4587
4587
|
[supabase]
|
|
@@ -4593,54 +4593,241 @@ 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
|
+
};
|
|
4596
4631
|
|
|
4597
4632
|
// src/services/pos-service/supabase/add-product-to-order.ts
|
|
4598
4633
|
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
|
+
};
|
|
4599
4671
|
|
|
4600
4672
|
// src/services/pos-service/supabase/update-order-total-amount.ts
|
|
4601
4673
|
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
|
+
};
|
|
4602
4704
|
|
|
4603
4705
|
// src/services/pos-service/supabase/update-order-line.ts
|
|
4604
4706
|
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
|
+
};
|
|
4605
4739
|
|
|
4606
4740
|
// src/services/pos-service/supabase/update-order.ts
|
|
4607
4741
|
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
|
+
};
|
|
4608
4775
|
|
|
4609
4776
|
// src/services/pos-service/supabase/delete-order.ts
|
|
4610
4777
|
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
|
+
};
|
|
4611
4804
|
|
|
4612
4805
|
// src/services/pos-service/supabase/delete-order-line.ts
|
|
4613
4806
|
var import_react49 = require("react");
|
|
4614
|
-
|
|
4615
|
-
// src/services/pos-service/supabase/add-category.ts
|
|
4616
|
-
var import_react50 = require("react");
|
|
4617
|
-
var addCategorySupabaseService = () => {
|
|
4807
|
+
var deleteOrderLineSupabaseService = () => {
|
|
4618
4808
|
const supabase = useSupabaseOptional();
|
|
4619
|
-
const
|
|
4809
|
+
const deleteOrderLineSupabase = (0, import_react49.useCallback)(
|
|
4620
4810
|
async (values) => {
|
|
4621
4811
|
if (!supabase) {
|
|
4622
4812
|
console.error("Supabase client not initialized");
|
|
4623
|
-
return
|
|
4813
|
+
return [];
|
|
4624
4814
|
}
|
|
4625
4815
|
try {
|
|
4626
|
-
const {
|
|
4627
|
-
name: values.name,
|
|
4628
|
-
id: values.id
|
|
4629
|
-
}).select("id, name").single();
|
|
4816
|
+
const { error, data } = await supabase.from("order_line" /* ORDER_LINE */).delete().eq("id", values.line_id).select("id").single();
|
|
4630
4817
|
if (error) {
|
|
4631
|
-
console.error("Error
|
|
4632
|
-
return
|
|
4818
|
+
console.error("Error deleting order line:", error);
|
|
4819
|
+
return [];
|
|
4633
4820
|
}
|
|
4634
|
-
return [
|
|
4821
|
+
return [data.id];
|
|
4635
4822
|
} catch (error) {
|
|
4636
|
-
console.error("Error
|
|
4637
|
-
return
|
|
4823
|
+
console.error("Error deleting order line:", error);
|
|
4824
|
+
return [];
|
|
4638
4825
|
}
|
|
4639
4826
|
},
|
|
4640
4827
|
[supabase]
|
|
4641
4828
|
);
|
|
4642
4829
|
return {
|
|
4643
|
-
|
|
4830
|
+
deleteOrderLineSupabase
|
|
4644
4831
|
};
|
|
4645
4832
|
};
|
|
4646
4833
|
|
|
@@ -4682,7 +4869,13 @@ var serviceFactories = [
|
|
|
4682
4869
|
updateTableSupabaseService,
|
|
4683
4870
|
deleteFloorSupabaseService,
|
|
4684
4871
|
deleteTableSupabaseService,
|
|
4685
|
-
|
|
4872
|
+
createOrderSupabaseService,
|
|
4873
|
+
addProductToOrderSupabaseService,
|
|
4874
|
+
updateOrderTotalAmountSupabaseService,
|
|
4875
|
+
updateOrderLineSupabaseService,
|
|
4876
|
+
updateOrderSupabaseService,
|
|
4877
|
+
deleteOrderSupabaseService,
|
|
4878
|
+
deleteOrderLineSupabaseService
|
|
4686
4879
|
];
|
|
4687
4880
|
var usePosService = () => {
|
|
4688
4881
|
const { env } = useEnv();
|
|
@@ -4802,21 +4995,36 @@ var import_react_query120 = require("@tanstack/react-query");
|
|
|
4802
4995
|
// src/hooks/pos/supabase/use-create-order.ts
|
|
4803
4996
|
var import_react_query121 = require("@tanstack/react-query");
|
|
4804
4997
|
|
|
4805
|
-
// src/hooks/pos/supabase/use-add-
|
|
4998
|
+
// src/hooks/pos/supabase/use-add-product-to-order.ts
|
|
4806
4999
|
var import_react_query122 = require("@tanstack/react-query");
|
|
4807
5000
|
|
|
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
|
+
|
|
4808
5016
|
// src/provider/service-provider.tsx
|
|
4809
5017
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
4810
|
-
var ServiceContext = (0,
|
|
5018
|
+
var ServiceContext = (0, import_react50.createContext)(null);
|
|
4811
5019
|
|
|
4812
5020
|
// src/provider/meta-provider.tsx
|
|
4813
|
-
var
|
|
5021
|
+
var import_react51 = require("react");
|
|
4814
5022
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
4815
5023
|
|
|
4816
5024
|
// src/services/action-service/index.ts
|
|
4817
5025
|
function useActionService() {
|
|
4818
5026
|
const { env } = useEnv();
|
|
4819
|
-
const loadAction = (0,
|
|
5027
|
+
const loadAction = (0, import_react52.useCallback)(
|
|
4820
5028
|
async ({
|
|
4821
5029
|
idAction,
|
|
4822
5030
|
context,
|
|
@@ -4840,7 +5048,7 @@ function useActionService() {
|
|
|
4840
5048
|
},
|
|
4841
5049
|
[env]
|
|
4842
5050
|
);
|
|
4843
|
-
const callButton = (0,
|
|
5051
|
+
const callButton = (0, import_react52.useCallback)(
|
|
4844
5052
|
async ({
|
|
4845
5053
|
model,
|
|
4846
5054
|
ids = [],
|
|
@@ -4874,7 +5082,7 @@ function useActionService() {
|
|
|
4874
5082
|
},
|
|
4875
5083
|
[env]
|
|
4876
5084
|
);
|
|
4877
|
-
const removeRows = (0,
|
|
5085
|
+
const removeRows = (0, import_react52.useCallback)(
|
|
4878
5086
|
async ({
|
|
4879
5087
|
model,
|
|
4880
5088
|
ids,
|
|
@@ -4900,7 +5108,7 @@ function useActionService() {
|
|
|
4900
5108
|
},
|
|
4901
5109
|
[env]
|
|
4902
5110
|
);
|
|
4903
|
-
const duplicateRecord = (0,
|
|
5111
|
+
const duplicateRecord = (0, import_react52.useCallback)(
|
|
4904
5112
|
async ({
|
|
4905
5113
|
model,
|
|
4906
5114
|
id,
|
|
@@ -4926,7 +5134,7 @@ function useActionService() {
|
|
|
4926
5134
|
},
|
|
4927
5135
|
[env]
|
|
4928
5136
|
);
|
|
4929
|
-
const getPrintReportName = (0,
|
|
5137
|
+
const getPrintReportName = (0, import_react52.useCallback)(
|
|
4930
5138
|
async ({ id }) => {
|
|
4931
5139
|
const jsonData = {
|
|
4932
5140
|
model: "ir.actions.report",
|
|
@@ -4944,7 +5152,7 @@ function useActionService() {
|
|
|
4944
5152
|
},
|
|
4945
5153
|
[env]
|
|
4946
5154
|
);
|
|
4947
|
-
const print = (0,
|
|
5155
|
+
const print = (0, import_react52.useCallback)(
|
|
4948
5156
|
async ({ id, report, db }) => {
|
|
4949
5157
|
const jsonData = {
|
|
4950
5158
|
report,
|
|
@@ -4962,7 +5170,7 @@ function useActionService() {
|
|
|
4962
5170
|
},
|
|
4963
5171
|
[env]
|
|
4964
5172
|
);
|
|
4965
|
-
const runAction = (0,
|
|
5173
|
+
const runAction = (0, import_react52.useCallback)(
|
|
4966
5174
|
async ({
|
|
4967
5175
|
idAction,
|
|
4968
5176
|
context,
|
|
@@ -4989,7 +5197,7 @@ function useActionService() {
|
|
|
4989
5197
|
},
|
|
4990
5198
|
[env]
|
|
4991
5199
|
);
|
|
4992
|
-
const generateSerialNumber = (0,
|
|
5200
|
+
const generateSerialNumber = (0, import_react52.useCallback)(
|
|
4993
5201
|
async ({
|
|
4994
5202
|
kwargs,
|
|
4995
5203
|
context,
|
|
@@ -5027,11 +5235,11 @@ function useActionService() {
|
|
|
5027
5235
|
}
|
|
5028
5236
|
|
|
5029
5237
|
// src/services/auth-service/index.ts
|
|
5030
|
-
var
|
|
5238
|
+
var import_react53 = require("react");
|
|
5031
5239
|
function useAuthService() {
|
|
5032
5240
|
const { env } = useEnv();
|
|
5033
5241
|
const supabase = useSupabaseOptional();
|
|
5034
|
-
const login = (0,
|
|
5242
|
+
const login = (0, import_react53.useCallback)(
|
|
5035
5243
|
async (body) => {
|
|
5036
5244
|
const payload = Object.fromEntries(
|
|
5037
5245
|
Object.entries({
|
|
@@ -5056,7 +5264,7 @@ function useAuthService() {
|
|
|
5056
5264
|
},
|
|
5057
5265
|
[env]
|
|
5058
5266
|
);
|
|
5059
|
-
const loginSupabase = (0,
|
|
5267
|
+
const loginSupabase = (0, import_react53.useCallback)(
|
|
5060
5268
|
async (body) => {
|
|
5061
5269
|
if (!supabase) {
|
|
5062
5270
|
return {
|
|
@@ -5072,7 +5280,7 @@ function useAuthService() {
|
|
|
5072
5280
|
},
|
|
5073
5281
|
[supabase]
|
|
5074
5282
|
);
|
|
5075
|
-
const forgotPassword = (0,
|
|
5283
|
+
const forgotPassword = (0, import_react53.useCallback)(
|
|
5076
5284
|
async (email) => {
|
|
5077
5285
|
const bodyData = {
|
|
5078
5286
|
login: email,
|
|
@@ -5086,7 +5294,7 @@ function useAuthService() {
|
|
|
5086
5294
|
},
|
|
5087
5295
|
[env]
|
|
5088
5296
|
);
|
|
5089
|
-
const forgotPasswordSSO = (0,
|
|
5297
|
+
const forgotPasswordSSO = (0, import_react53.useCallback)(
|
|
5090
5298
|
async ({
|
|
5091
5299
|
email,
|
|
5092
5300
|
with_context,
|
|
@@ -5109,7 +5317,7 @@ function useAuthService() {
|
|
|
5109
5317
|
},
|
|
5110
5318
|
[env]
|
|
5111
5319
|
);
|
|
5112
|
-
const resetPassword = (0,
|
|
5320
|
+
const resetPassword = (0, import_react53.useCallback)(
|
|
5113
5321
|
async (data, token) => {
|
|
5114
5322
|
const bodyData = {
|
|
5115
5323
|
token,
|
|
@@ -5124,7 +5332,7 @@ function useAuthService() {
|
|
|
5124
5332
|
},
|
|
5125
5333
|
[env]
|
|
5126
5334
|
);
|
|
5127
|
-
const resetPasswordSSO = (0,
|
|
5335
|
+
const resetPasswordSSO = (0, import_react53.useCallback)(
|
|
5128
5336
|
async ({
|
|
5129
5337
|
method,
|
|
5130
5338
|
password,
|
|
@@ -5147,7 +5355,7 @@ function useAuthService() {
|
|
|
5147
5355
|
},
|
|
5148
5356
|
[env]
|
|
5149
5357
|
);
|
|
5150
|
-
const updatePassword = (0,
|
|
5358
|
+
const updatePassword = (0, import_react53.useCallback)(
|
|
5151
5359
|
async (data, token) => {
|
|
5152
5360
|
const bodyData = {
|
|
5153
5361
|
token,
|
|
@@ -5162,7 +5370,7 @@ function useAuthService() {
|
|
|
5162
5370
|
},
|
|
5163
5371
|
[env]
|
|
5164
5372
|
);
|
|
5165
|
-
const isValidToken = (0,
|
|
5373
|
+
const isValidToken = (0, import_react53.useCallback)(
|
|
5166
5374
|
async (token) => {
|
|
5167
5375
|
const bodyData = {
|
|
5168
5376
|
token
|
|
@@ -5175,7 +5383,7 @@ function useAuthService() {
|
|
|
5175
5383
|
},
|
|
5176
5384
|
[env]
|
|
5177
5385
|
);
|
|
5178
|
-
const isValidActionToken = (0,
|
|
5386
|
+
const isValidActionToken = (0, import_react53.useCallback)(
|
|
5179
5387
|
async (actionToken) => {
|
|
5180
5388
|
const bodyData = {};
|
|
5181
5389
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -5188,7 +5396,7 @@ function useAuthService() {
|
|
|
5188
5396
|
},
|
|
5189
5397
|
[env]
|
|
5190
5398
|
);
|
|
5191
|
-
const loginSocial = (0,
|
|
5399
|
+
const loginSocial = (0, import_react53.useCallback)(
|
|
5192
5400
|
async ({
|
|
5193
5401
|
db,
|
|
5194
5402
|
state,
|
|
@@ -5206,13 +5414,13 @@ function useAuthService() {
|
|
|
5206
5414
|
},
|
|
5207
5415
|
[env]
|
|
5208
5416
|
);
|
|
5209
|
-
const getProviders = (0,
|
|
5417
|
+
const getProviders = (0, import_react53.useCallback)(
|
|
5210
5418
|
async (db) => {
|
|
5211
5419
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
5212
5420
|
},
|
|
5213
5421
|
[env]
|
|
5214
5422
|
);
|
|
5215
|
-
const getAccessByCode = (0,
|
|
5423
|
+
const getAccessByCode = (0, import_react53.useCallback)(
|
|
5216
5424
|
async (code) => {
|
|
5217
5425
|
const data = new URLSearchParams();
|
|
5218
5426
|
data.append("code", code);
|
|
@@ -5232,7 +5440,7 @@ function useAuthService() {
|
|
|
5232
5440
|
},
|
|
5233
5441
|
[env]
|
|
5234
5442
|
);
|
|
5235
|
-
const logout = (0,
|
|
5443
|
+
const logout = (0, import_react53.useCallback)(
|
|
5236
5444
|
async (service) => {
|
|
5237
5445
|
return env?.requests?.post(
|
|
5238
5446
|
"/logout" /* LOGOUT */,
|
|
@@ -5249,7 +5457,7 @@ function useAuthService() {
|
|
|
5249
5457
|
},
|
|
5250
5458
|
[env]
|
|
5251
5459
|
);
|
|
5252
|
-
const getTenantMapping = (0,
|
|
5460
|
+
const getTenantMapping = (0, import_react53.useCallback)(
|
|
5253
5461
|
async ({ shortName, service }) => {
|
|
5254
5462
|
const bodyData = {
|
|
5255
5463
|
short_name: shortName
|
|
@@ -5267,7 +5475,7 @@ function useAuthService() {
|
|
|
5267
5475
|
},
|
|
5268
5476
|
[env]
|
|
5269
5477
|
);
|
|
5270
|
-
const getToken = (0,
|
|
5478
|
+
const getToken = (0, import_react53.useCallback)(
|
|
5271
5479
|
async ({
|
|
5272
5480
|
phone,
|
|
5273
5481
|
name,
|
|
@@ -5312,10 +5520,10 @@ function useAuthService() {
|
|
|
5312
5520
|
}
|
|
5313
5521
|
|
|
5314
5522
|
// src/services/company-service/index.ts
|
|
5315
|
-
var
|
|
5523
|
+
var import_react54 = require("react");
|
|
5316
5524
|
function useCompanyService() {
|
|
5317
5525
|
const { env } = useEnv();
|
|
5318
|
-
const getCurrentCompany = (0,
|
|
5526
|
+
const getCurrentCompany = (0, import_react54.useCallback)(
|
|
5319
5527
|
async (service, extraHeaders) => {
|
|
5320
5528
|
return await env.requests.get(
|
|
5321
5529
|
"/company" /* COMPANY_PATH */,
|
|
@@ -5332,7 +5540,7 @@ function useCompanyService() {
|
|
|
5332
5540
|
},
|
|
5333
5541
|
[env]
|
|
5334
5542
|
);
|
|
5335
|
-
const getInfoCompany = (0,
|
|
5543
|
+
const getInfoCompany = (0, import_react54.useCallback)(
|
|
5336
5544
|
async (id, service) => {
|
|
5337
5545
|
const jsonData = {
|
|
5338
5546
|
ids: [id],
|
|
@@ -5368,10 +5576,10 @@ function useCompanyService() {
|
|
|
5368
5576
|
}
|
|
5369
5577
|
|
|
5370
5578
|
// src/services/excel-service/index.ts
|
|
5371
|
-
var
|
|
5579
|
+
var import_react55 = require("react");
|
|
5372
5580
|
function useExcelService() {
|
|
5373
5581
|
const { env } = useEnv();
|
|
5374
|
-
const uploadFileExcel = (0,
|
|
5582
|
+
const uploadFileExcel = (0, import_react55.useCallback)(
|
|
5375
5583
|
async ({
|
|
5376
5584
|
formData,
|
|
5377
5585
|
service,
|
|
@@ -5388,7 +5596,7 @@ function useExcelService() {
|
|
|
5388
5596
|
},
|
|
5389
5597
|
[env]
|
|
5390
5598
|
);
|
|
5391
|
-
const uploadIdFile = (0,
|
|
5599
|
+
const uploadIdFile = (0, import_react55.useCallback)(
|
|
5392
5600
|
async ({
|
|
5393
5601
|
formData,
|
|
5394
5602
|
service,
|
|
@@ -5405,7 +5613,7 @@ function useExcelService() {
|
|
|
5405
5613
|
},
|
|
5406
5614
|
[env]
|
|
5407
5615
|
);
|
|
5408
|
-
const parsePreview = (0,
|
|
5616
|
+
const parsePreview = (0, import_react55.useCallback)(
|
|
5409
5617
|
async ({
|
|
5410
5618
|
id,
|
|
5411
5619
|
selectedSheet,
|
|
@@ -5454,7 +5662,7 @@ function useExcelService() {
|
|
|
5454
5662
|
},
|
|
5455
5663
|
[env]
|
|
5456
5664
|
);
|
|
5457
|
-
const executeImport = (0,
|
|
5665
|
+
const executeImport = (0, import_react55.useCallback)(
|
|
5458
5666
|
async ({
|
|
5459
5667
|
columns,
|
|
5460
5668
|
fields,
|
|
@@ -5488,7 +5696,7 @@ function useExcelService() {
|
|
|
5488
5696
|
},
|
|
5489
5697
|
[env]
|
|
5490
5698
|
);
|
|
5491
|
-
const getFileExcel = (0,
|
|
5699
|
+
const getFileExcel = (0, import_react55.useCallback)(
|
|
5492
5700
|
async ({
|
|
5493
5701
|
model,
|
|
5494
5702
|
service,
|
|
@@ -5512,7 +5720,7 @@ function useExcelService() {
|
|
|
5512
5720
|
},
|
|
5513
5721
|
[env]
|
|
5514
5722
|
);
|
|
5515
|
-
const getFieldExport = (0,
|
|
5723
|
+
const getFieldExport = (0, import_react55.useCallback)(
|
|
5516
5724
|
async ({
|
|
5517
5725
|
ids,
|
|
5518
5726
|
model,
|
|
@@ -5552,7 +5760,7 @@ function useExcelService() {
|
|
|
5552
5760
|
},
|
|
5553
5761
|
[env]
|
|
5554
5762
|
);
|
|
5555
|
-
const exportExcel = (0,
|
|
5763
|
+
const exportExcel = (0, import_react55.useCallback)(
|
|
5556
5764
|
async ({
|
|
5557
5765
|
model,
|
|
5558
5766
|
domain,
|
|
@@ -5600,10 +5808,10 @@ function useExcelService() {
|
|
|
5600
5808
|
}
|
|
5601
5809
|
|
|
5602
5810
|
// src/services/form-service/index.ts
|
|
5603
|
-
var
|
|
5811
|
+
var import_react56 = require("react");
|
|
5604
5812
|
function useFormService() {
|
|
5605
5813
|
const { env } = useEnv();
|
|
5606
|
-
const getComment = (0,
|
|
5814
|
+
const getComment = (0, import_react56.useCallback)(
|
|
5607
5815
|
async ({ data }) => {
|
|
5608
5816
|
const jsonData = {
|
|
5609
5817
|
thread_id: data.thread_id,
|
|
@@ -5621,7 +5829,7 @@ function useFormService() {
|
|
|
5621
5829
|
},
|
|
5622
5830
|
[env]
|
|
5623
5831
|
);
|
|
5624
|
-
const getThreadData = (0,
|
|
5832
|
+
const getThreadData = (0, import_react56.useCallback)(
|
|
5625
5833
|
async ({
|
|
5626
5834
|
data,
|
|
5627
5835
|
xNode,
|
|
@@ -5648,7 +5856,7 @@ function useFormService() {
|
|
|
5648
5856
|
},
|
|
5649
5857
|
[env]
|
|
5650
5858
|
);
|
|
5651
|
-
const getThreadMessages = (0,
|
|
5859
|
+
const getThreadMessages = (0, import_react56.useCallback)(
|
|
5652
5860
|
async ({
|
|
5653
5861
|
data,
|
|
5654
5862
|
xNode,
|
|
@@ -5674,7 +5882,7 @@ function useFormService() {
|
|
|
5674
5882
|
},
|
|
5675
5883
|
[env]
|
|
5676
5884
|
);
|
|
5677
|
-
const sentComment = (0,
|
|
5885
|
+
const sentComment = (0, import_react56.useCallback)(
|
|
5678
5886
|
async ({ data }) => {
|
|
5679
5887
|
const jsonData = {
|
|
5680
5888
|
context: {
|
|
@@ -5702,7 +5910,7 @@ function useFormService() {
|
|
|
5702
5910
|
},
|
|
5703
5911
|
[env]
|
|
5704
5912
|
);
|
|
5705
|
-
const deleteComment = (0,
|
|
5913
|
+
const deleteComment = (0, import_react56.useCallback)(
|
|
5706
5914
|
async ({ data }) => {
|
|
5707
5915
|
const jsonData = {
|
|
5708
5916
|
attachment_ids: [],
|
|
@@ -5718,7 +5926,7 @@ function useFormService() {
|
|
|
5718
5926
|
},
|
|
5719
5927
|
[env]
|
|
5720
5928
|
);
|
|
5721
|
-
const getImage = (0,
|
|
5929
|
+
const getImage = (0, import_react56.useCallback)(
|
|
5722
5930
|
async ({ data }) => {
|
|
5723
5931
|
return env.requests.get(
|
|
5724
5932
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -5731,7 +5939,7 @@ function useFormService() {
|
|
|
5731
5939
|
},
|
|
5732
5940
|
[env]
|
|
5733
5941
|
);
|
|
5734
|
-
const uploadImage = (0,
|
|
5942
|
+
const uploadImage = (0, import_react56.useCallback)(
|
|
5735
5943
|
async ({
|
|
5736
5944
|
formData,
|
|
5737
5945
|
service,
|
|
@@ -5750,7 +5958,7 @@ function useFormService() {
|
|
|
5750
5958
|
},
|
|
5751
5959
|
[env]
|
|
5752
5960
|
);
|
|
5753
|
-
const uploadFile = (0,
|
|
5961
|
+
const uploadFile = (0, import_react56.useCallback)(
|
|
5754
5962
|
async ({
|
|
5755
5963
|
formData,
|
|
5756
5964
|
service,
|
|
@@ -5770,7 +5978,7 @@ function useFormService() {
|
|
|
5770
5978
|
},
|
|
5771
5979
|
[env]
|
|
5772
5980
|
);
|
|
5773
|
-
const getFormView = (0,
|
|
5981
|
+
const getFormView = (0, import_react56.useCallback)(
|
|
5774
5982
|
async ({ data }) => {
|
|
5775
5983
|
const jsonData = {
|
|
5776
5984
|
model: data.model,
|
|
@@ -5786,7 +5994,7 @@ function useFormService() {
|
|
|
5786
5994
|
},
|
|
5787
5995
|
[env]
|
|
5788
5996
|
);
|
|
5789
|
-
const changeStatus = (0,
|
|
5997
|
+
const changeStatus = (0, import_react56.useCallback)(
|
|
5790
5998
|
async ({ data }) => {
|
|
5791
5999
|
const vals = {
|
|
5792
6000
|
[data.name]: data.stage_id
|
|
@@ -5815,7 +6023,7 @@ function useFormService() {
|
|
|
5815
6023
|
},
|
|
5816
6024
|
[env]
|
|
5817
6025
|
);
|
|
5818
|
-
const getExternalTab = (0,
|
|
6026
|
+
const getExternalTab = (0, import_react56.useCallback)(
|
|
5819
6027
|
async ({ method, context, service, xNode }) => {
|
|
5820
6028
|
return env?.requests?.post(
|
|
5821
6029
|
"/call" /* CALL_PATH */,
|
|
@@ -5850,10 +6058,10 @@ function useFormService() {
|
|
|
5850
6058
|
}
|
|
5851
6059
|
|
|
5852
6060
|
// src/services/kanban-service/index.ts
|
|
5853
|
-
var
|
|
6061
|
+
var import_react57 = require("react");
|
|
5854
6062
|
function useKanbanService() {
|
|
5855
6063
|
const { env } = useEnv();
|
|
5856
|
-
const getGroups = (0,
|
|
6064
|
+
const getGroups = (0, import_react57.useCallback)(
|
|
5857
6065
|
async ({ model, width_context }) => {
|
|
5858
6066
|
const jsonData = {
|
|
5859
6067
|
model,
|
|
@@ -5873,7 +6081,7 @@ function useKanbanService() {
|
|
|
5873
6081
|
},
|
|
5874
6082
|
[env]
|
|
5875
6083
|
);
|
|
5876
|
-
const getProgressBar = (0,
|
|
6084
|
+
const getProgressBar = (0, import_react57.useCallback)(
|
|
5877
6085
|
async ({ field, color, model, width_context }) => {
|
|
5878
6086
|
const jsonData = {
|
|
5879
6087
|
model,
|
|
@@ -5903,10 +6111,10 @@ function useKanbanService() {
|
|
|
5903
6111
|
}
|
|
5904
6112
|
|
|
5905
6113
|
// src/services/model-service/index.ts
|
|
5906
|
-
var
|
|
6114
|
+
var import_react58 = require("react");
|
|
5907
6115
|
function useModelService() {
|
|
5908
6116
|
const { env } = useEnv();
|
|
5909
|
-
const getListMyBankAccount = (0,
|
|
6117
|
+
const getListMyBankAccount = (0, import_react58.useCallback)(
|
|
5910
6118
|
async ({
|
|
5911
6119
|
domain,
|
|
5912
6120
|
spectification,
|
|
@@ -5930,7 +6138,7 @@ function useModelService() {
|
|
|
5930
6138
|
},
|
|
5931
6139
|
[env]
|
|
5932
6140
|
);
|
|
5933
|
-
const getCurrency = (0,
|
|
6141
|
+
const getCurrency = (0, import_react58.useCallback)(async () => {
|
|
5934
6142
|
const jsonData = {
|
|
5935
6143
|
model: "res.currency",
|
|
5936
6144
|
method: "web_search_read",
|
|
@@ -5950,7 +6158,7 @@ function useModelService() {
|
|
|
5950
6158
|
}
|
|
5951
6159
|
});
|
|
5952
6160
|
}, [env]);
|
|
5953
|
-
const getConversionRate = (0,
|
|
6161
|
+
const getConversionRate = (0, import_react58.useCallback)(async () => {
|
|
5954
6162
|
const jsonData = {
|
|
5955
6163
|
model: "res.currency",
|
|
5956
6164
|
method: "web_search_read",
|
|
@@ -5976,7 +6184,7 @@ function useModelService() {
|
|
|
5976
6184
|
}
|
|
5977
6185
|
});
|
|
5978
6186
|
}, [env]);
|
|
5979
|
-
const getAll = (0,
|
|
6187
|
+
const getAll = (0, import_react58.useCallback)(
|
|
5980
6188
|
async ({
|
|
5981
6189
|
data,
|
|
5982
6190
|
service,
|
|
@@ -6018,7 +6226,7 @@ function useModelService() {
|
|
|
6018
6226
|
},
|
|
6019
6227
|
[env]
|
|
6020
6228
|
);
|
|
6021
|
-
const getListCalendar = (0,
|
|
6229
|
+
const getListCalendar = (0, import_react58.useCallback)(
|
|
6022
6230
|
async ({ data }) => {
|
|
6023
6231
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
6024
6232
|
fields: data.fields,
|
|
@@ -6049,7 +6257,7 @@ function useModelService() {
|
|
|
6049
6257
|
},
|
|
6050
6258
|
[env]
|
|
6051
6259
|
);
|
|
6052
|
-
const getList = (0,
|
|
6260
|
+
const getList = (0, import_react58.useCallback)(
|
|
6053
6261
|
async ({
|
|
6054
6262
|
model,
|
|
6055
6263
|
ids = [],
|
|
@@ -6081,7 +6289,7 @@ function useModelService() {
|
|
|
6081
6289
|
},
|
|
6082
6290
|
[env]
|
|
6083
6291
|
);
|
|
6084
|
-
const getDetail = (0,
|
|
6292
|
+
const getDetail = (0, import_react58.useCallback)(
|
|
6085
6293
|
async ({
|
|
6086
6294
|
ids = [],
|
|
6087
6295
|
model,
|
|
@@ -6113,7 +6321,7 @@ function useModelService() {
|
|
|
6113
6321
|
},
|
|
6114
6322
|
[env]
|
|
6115
6323
|
);
|
|
6116
|
-
const save = (0,
|
|
6324
|
+
const save = (0, import_react58.useCallback)(
|
|
6117
6325
|
async ({
|
|
6118
6326
|
model,
|
|
6119
6327
|
ids = [],
|
|
@@ -6148,7 +6356,7 @@ function useModelService() {
|
|
|
6148
6356
|
},
|
|
6149
6357
|
[env]
|
|
6150
6358
|
);
|
|
6151
|
-
const deleteApi = (0,
|
|
6359
|
+
const deleteApi = (0, import_react58.useCallback)(
|
|
6152
6360
|
async ({ ids = [], model, service }) => {
|
|
6153
6361
|
const jsonData = {
|
|
6154
6362
|
model,
|
|
@@ -6168,7 +6376,7 @@ function useModelService() {
|
|
|
6168
6376
|
},
|
|
6169
6377
|
[env]
|
|
6170
6378
|
);
|
|
6171
|
-
const onChange = (0,
|
|
6379
|
+
const onChange = (0, import_react58.useCallback)(
|
|
6172
6380
|
async ({
|
|
6173
6381
|
ids = [],
|
|
6174
6382
|
model,
|
|
@@ -6204,7 +6412,7 @@ function useModelService() {
|
|
|
6204
6412
|
},
|
|
6205
6413
|
[env]
|
|
6206
6414
|
);
|
|
6207
|
-
const getListFieldsOnchange = (0,
|
|
6415
|
+
const getListFieldsOnchange = (0, import_react58.useCallback)(
|
|
6208
6416
|
async ({
|
|
6209
6417
|
model,
|
|
6210
6418
|
service,
|
|
@@ -6228,7 +6436,7 @@ function useModelService() {
|
|
|
6228
6436
|
},
|
|
6229
6437
|
[env]
|
|
6230
6438
|
);
|
|
6231
|
-
const parseORMOdoo = (0,
|
|
6439
|
+
const parseORMOdoo = (0, import_react58.useCallback)((data) => {
|
|
6232
6440
|
for (const key in data) {
|
|
6233
6441
|
if (key === "display_name") {
|
|
6234
6442
|
delete data[key];
|
|
@@ -6239,7 +6447,7 @@ function useModelService() {
|
|
|
6239
6447
|
}
|
|
6240
6448
|
return { ...data };
|
|
6241
6449
|
}, []);
|
|
6242
|
-
const toDataJS = (0,
|
|
6450
|
+
const toDataJS = (0, import_react58.useCallback)(
|
|
6243
6451
|
(data, viewData, model) => {
|
|
6244
6452
|
for (const key in data) {
|
|
6245
6453
|
if (data[key] === false) {
|
|
@@ -6297,10 +6505,10 @@ function useModelService() {
|
|
|
6297
6505
|
}
|
|
6298
6506
|
|
|
6299
6507
|
// src/services/user-service/index.ts
|
|
6300
|
-
var
|
|
6508
|
+
var import_react59 = require("react");
|
|
6301
6509
|
function useUserService() {
|
|
6302
6510
|
const { env } = useEnv();
|
|
6303
|
-
const getProfile = (0,
|
|
6511
|
+
const getProfile = (0, import_react59.useCallback)(
|
|
6304
6512
|
async (service, path, extraHeaders) => {
|
|
6305
6513
|
return env?.requests?.get(
|
|
6306
6514
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -6317,7 +6525,7 @@ function useUserService() {
|
|
|
6317
6525
|
},
|
|
6318
6526
|
[env]
|
|
6319
6527
|
);
|
|
6320
|
-
const getUser = (0,
|
|
6528
|
+
const getUser = (0, import_react59.useCallback)(
|
|
6321
6529
|
async ({ context, id }) => {
|
|
6322
6530
|
const jsonData = {
|
|
6323
6531
|
model: "res.users",
|
|
@@ -6355,7 +6563,7 @@ function useUserService() {
|
|
|
6355
6563
|
},
|
|
6356
6564
|
[env]
|
|
6357
6565
|
);
|
|
6358
|
-
const switchUserLocale = (0,
|
|
6566
|
+
const switchUserLocale = (0, import_react59.useCallback)(
|
|
6359
6567
|
async ({ id, values, service }) => {
|
|
6360
6568
|
const jsonData = {
|
|
6361
6569
|
model: "res.users",
|
|
@@ -6383,10 +6591,10 @@ function useUserService() {
|
|
|
6383
6591
|
}
|
|
6384
6592
|
|
|
6385
6593
|
// src/services/view-service/index.ts
|
|
6386
|
-
var
|
|
6594
|
+
var import_react60 = require("react");
|
|
6387
6595
|
function useViewService() {
|
|
6388
6596
|
const { env } = useEnv();
|
|
6389
|
-
const getView = (0,
|
|
6597
|
+
const getView = (0, import_react60.useCallback)(
|
|
6390
6598
|
async ({
|
|
6391
6599
|
model,
|
|
6392
6600
|
views,
|
|
@@ -6426,7 +6634,7 @@ function useViewService() {
|
|
|
6426
6634
|
},
|
|
6427
6635
|
[env]
|
|
6428
6636
|
);
|
|
6429
|
-
const getMenu = (0,
|
|
6637
|
+
const getMenu = (0, import_react60.useCallback)(
|
|
6430
6638
|
async (context, specification, domain, service) => {
|
|
6431
6639
|
const jsonData = {
|
|
6432
6640
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -6457,7 +6665,7 @@ function useViewService() {
|
|
|
6457
6665
|
},
|
|
6458
6666
|
[env]
|
|
6459
6667
|
);
|
|
6460
|
-
const getActionDetail = (0,
|
|
6668
|
+
const getActionDetail = (0, import_react60.useCallback)(
|
|
6461
6669
|
async (aid, context) => {
|
|
6462
6670
|
const jsonData = {
|
|
6463
6671
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -6487,7 +6695,7 @@ function useViewService() {
|
|
|
6487
6695
|
},
|
|
6488
6696
|
[env]
|
|
6489
6697
|
);
|
|
6490
|
-
const getResequence = (0,
|
|
6698
|
+
const getResequence = (0, import_react60.useCallback)(
|
|
6491
6699
|
async ({
|
|
6492
6700
|
model,
|
|
6493
6701
|
ids,
|
|
@@ -6517,7 +6725,7 @@ function useViewService() {
|
|
|
6517
6725
|
},
|
|
6518
6726
|
[env]
|
|
6519
6727
|
);
|
|
6520
|
-
const getSelectionItem = (0,
|
|
6728
|
+
const getSelectionItem = (0, import_react60.useCallback)(
|
|
6521
6729
|
async ({
|
|
6522
6730
|
data,
|
|
6523
6731
|
service,
|
|
@@ -6554,7 +6762,7 @@ function useViewService() {
|
|
|
6554
6762
|
},
|
|
6555
6763
|
[env]
|
|
6556
6764
|
);
|
|
6557
|
-
const loadMessages = (0,
|
|
6765
|
+
const loadMessages = (0, import_react60.useCallback)(async () => {
|
|
6558
6766
|
return env.requests.post(
|
|
6559
6767
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
6560
6768
|
{},
|
|
@@ -6565,14 +6773,14 @@ function useViewService() {
|
|
|
6565
6773
|
}
|
|
6566
6774
|
);
|
|
6567
6775
|
}, [env]);
|
|
6568
|
-
const getVersion = (0,
|
|
6776
|
+
const getVersion = (0, import_react60.useCallback)(async () => {
|
|
6569
6777
|
return env?.requests?.get("", {
|
|
6570
6778
|
headers: {
|
|
6571
6779
|
"Content-Type": "application/json"
|
|
6572
6780
|
}
|
|
6573
6781
|
});
|
|
6574
6782
|
}, [env]);
|
|
6575
|
-
const grantAccess = (0,
|
|
6783
|
+
const grantAccess = (0, import_react60.useCallback)(
|
|
6576
6784
|
async ({
|
|
6577
6785
|
redirect_uri,
|
|
6578
6786
|
state,
|
|
@@ -6599,7 +6807,7 @@ function useViewService() {
|
|
|
6599
6807
|
},
|
|
6600
6808
|
[env]
|
|
6601
6809
|
);
|
|
6602
|
-
const removeTotpSetUp = (0,
|
|
6810
|
+
const removeTotpSetUp = (0, import_react60.useCallback)(
|
|
6603
6811
|
async ({ method, token }) => {
|
|
6604
6812
|
const jsonData = {
|
|
6605
6813
|
method,
|
|
@@ -6620,7 +6828,7 @@ function useViewService() {
|
|
|
6620
6828
|
},
|
|
6621
6829
|
[env]
|
|
6622
6830
|
);
|
|
6623
|
-
const requestSetupTotp = (0,
|
|
6831
|
+
const requestSetupTotp = (0, import_react60.useCallback)(
|
|
6624
6832
|
async ({ method, token }) => {
|
|
6625
6833
|
const jsonData = {
|
|
6626
6834
|
method,
|
|
@@ -6639,7 +6847,7 @@ function useViewService() {
|
|
|
6639
6847
|
},
|
|
6640
6848
|
[env]
|
|
6641
6849
|
);
|
|
6642
|
-
const settingsWebRead2fa = (0,
|
|
6850
|
+
const settingsWebRead2fa = (0, import_react60.useCallback)(
|
|
6643
6851
|
async ({
|
|
6644
6852
|
method,
|
|
6645
6853
|
model,
|
|
@@ -6667,7 +6875,7 @@ function useViewService() {
|
|
|
6667
6875
|
},
|
|
6668
6876
|
[env]
|
|
6669
6877
|
);
|
|
6670
|
-
const signInSSO = (0,
|
|
6878
|
+
const signInSSO = (0, import_react60.useCallback)(
|
|
6671
6879
|
async ({
|
|
6672
6880
|
redirect_uri,
|
|
6673
6881
|
state,
|
|
@@ -6699,7 +6907,7 @@ function useViewService() {
|
|
|
6699
6907
|
},
|
|
6700
6908
|
[env]
|
|
6701
6909
|
);
|
|
6702
|
-
const verify2FA = (0,
|
|
6910
|
+
const verify2FA = (0, import_react60.useCallback)(
|
|
6703
6911
|
({
|
|
6704
6912
|
method,
|
|
6705
6913
|
with_context,
|
|
@@ -6732,7 +6940,7 @@ function useViewService() {
|
|
|
6732
6940
|
},
|
|
6733
6941
|
[env]
|
|
6734
6942
|
);
|
|
6735
|
-
const get2FAMethods = (0,
|
|
6943
|
+
const get2FAMethods = (0, import_react60.useCallback)(
|
|
6736
6944
|
({ method, with_context }) => {
|
|
6737
6945
|
const jsonData = {
|
|
6738
6946
|
method,
|
|
@@ -6751,7 +6959,7 @@ function useViewService() {
|
|
|
6751
6959
|
},
|
|
6752
6960
|
[env]
|
|
6753
6961
|
);
|
|
6754
|
-
const verifyTotp = (0,
|
|
6962
|
+
const verifyTotp = (0, import_react60.useCallback)(
|
|
6755
6963
|
({
|
|
6756
6964
|
method,
|
|
6757
6965
|
action_token,
|
|
@@ -6776,7 +6984,7 @@ function useViewService() {
|
|
|
6776
6984
|
},
|
|
6777
6985
|
[env]
|
|
6778
6986
|
);
|
|
6779
|
-
const getNotifications = (0,
|
|
6987
|
+
const getNotifications = (0, import_react60.useCallback)(
|
|
6780
6988
|
async ({
|
|
6781
6989
|
service,
|
|
6782
6990
|
xNode,
|
|
@@ -6796,7 +7004,7 @@ function useViewService() {
|
|
|
6796
7004
|
},
|
|
6797
7005
|
[env]
|
|
6798
7006
|
);
|
|
6799
|
-
const getCountry = (0,
|
|
7007
|
+
const getCountry = (0, import_react60.useCallback)(
|
|
6800
7008
|
async ({
|
|
6801
7009
|
service,
|
|
6802
7010
|
xNode,
|
|
@@ -6823,7 +7031,7 @@ function useViewService() {
|
|
|
6823
7031
|
},
|
|
6824
7032
|
[env]
|
|
6825
7033
|
);
|
|
6826
|
-
const getCity = (0,
|
|
7034
|
+
const getCity = (0, import_react60.useCallback)(
|
|
6827
7035
|
async ({
|
|
6828
7036
|
service,
|
|
6829
7037
|
xNode,
|
|
@@ -6850,7 +7058,7 @@ function useViewService() {
|
|
|
6850
7058
|
},
|
|
6851
7059
|
[env]
|
|
6852
7060
|
);
|
|
6853
|
-
const getWard = (0,
|
|
7061
|
+
const getWard = (0, import_react60.useCallback)(
|
|
6854
7062
|
async ({
|
|
6855
7063
|
service,
|
|
6856
7064
|
xNode,
|
|
@@ -6875,7 +7083,7 @@ function useViewService() {
|
|
|
6875
7083
|
},
|
|
6876
7084
|
[env]
|
|
6877
7085
|
);
|
|
6878
|
-
const getPartnerTitle = (0,
|
|
7086
|
+
const getPartnerTitle = (0, import_react60.useCallback)(
|
|
6879
7087
|
async ({
|
|
6880
7088
|
service,
|
|
6881
7089
|
xNode,
|
|
@@ -6927,10 +7135,10 @@ function useViewService() {
|
|
|
6927
7135
|
}
|
|
6928
7136
|
|
|
6929
7137
|
// src/services/dashboard-service/index.ts
|
|
6930
|
-
var
|
|
7138
|
+
var import_react61 = require("react");
|
|
6931
7139
|
function useDashboardService() {
|
|
6932
7140
|
const { env } = useEnv();
|
|
6933
|
-
const readGroup = (0,
|
|
7141
|
+
const readGroup = (0, import_react61.useCallback)(
|
|
6934
7142
|
async ({
|
|
6935
7143
|
service,
|
|
6936
7144
|
xNode,
|
|
@@ -6947,7 +7155,7 @@ function useDashboardService() {
|
|
|
6947
7155
|
},
|
|
6948
7156
|
[env]
|
|
6949
7157
|
);
|
|
6950
|
-
const getDataChart = (0,
|
|
7158
|
+
const getDataChart = (0, import_react61.useCallback)(
|
|
6951
7159
|
async ({
|
|
6952
7160
|
service,
|
|
6953
7161
|
xNode,
|