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