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