@fctc/interface-logic 4.8.8 → 4.8.9
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 +9 -1
- package/dist/hooks.d.ts +9 -1
- package/dist/hooks.js +53 -3
- package/dist/hooks.mjs +52 -3
- package/dist/provider.d.mts +3 -2
- package/dist/provider.d.ts +3 -2
- package/dist/provider.js +75 -26
- package/dist/provider.mjs +64 -15
- package/dist/services.d.mts +5 -0
- package/dist/services.d.ts +5 -0
- package/dist/services.js +138 -97
- package/dist/services.mjs +135 -94
- package/package.json +1 -1
package/dist/services.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/services/action-service/index.ts
|
|
2
|
-
import { useCallback as
|
|
2
|
+
import { useCallback as useCallback56 } from "react";
|
|
3
3
|
|
|
4
4
|
// src/constants/api/uri-constant.ts
|
|
5
5
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
@@ -5100,6 +5100,43 @@ var deleteCustomerSupabaseService = () => {
|
|
|
5100
5100
|
};
|
|
5101
5101
|
};
|
|
5102
5102
|
|
|
5103
|
+
// src/services/pos-service/supabase/upload-image.ts
|
|
5104
|
+
import { useCallback as useCallback55 } from "react";
|
|
5105
|
+
var uploadImageSupabaseService = () => {
|
|
5106
|
+
const supabase = useSupabaseOptional();
|
|
5107
|
+
const uploadImageSupabase = useCallback55(
|
|
5108
|
+
async (file, tenantId) => {
|
|
5109
|
+
if (!supabase) {
|
|
5110
|
+
console.error("Supabase client not initialized");
|
|
5111
|
+
return { url: null, error: "Supabase client not initialized" };
|
|
5112
|
+
}
|
|
5113
|
+
const bucketName = `tenant-${tenantId}`;
|
|
5114
|
+
try {
|
|
5115
|
+
const fileExt = file.name.split(".").pop();
|
|
5116
|
+
const fileName = `uploads/${Date.now()}_${Math.random().toString(36).substring(7)}.${fileExt}`;
|
|
5117
|
+
const { error: uploadError } = await supabase.storage.from(bucketName).upload(fileName, file, {
|
|
5118
|
+
cacheControl: "3600",
|
|
5119
|
+
upsert: false,
|
|
5120
|
+
contentType: file.type
|
|
5121
|
+
});
|
|
5122
|
+
if (uploadError) {
|
|
5123
|
+
console.error("Error uploading image:", uploadError);
|
|
5124
|
+
return { url: null, error: uploadError };
|
|
5125
|
+
}
|
|
5126
|
+
const { data: urlData } = supabase.storage.from(bucketName).getPublicUrl(fileName);
|
|
5127
|
+
return { url: urlData.publicUrl, error: null };
|
|
5128
|
+
} catch (error) {
|
|
5129
|
+
console.error("Error uploading image:", error);
|
|
5130
|
+
return { url: null, error };
|
|
5131
|
+
}
|
|
5132
|
+
},
|
|
5133
|
+
[supabase]
|
|
5134
|
+
);
|
|
5135
|
+
return {
|
|
5136
|
+
uploadImageSupabase
|
|
5137
|
+
};
|
|
5138
|
+
};
|
|
5139
|
+
|
|
5103
5140
|
// src/services/pos-service/index.ts
|
|
5104
5141
|
var serviceFactories = [
|
|
5105
5142
|
addEntityService,
|
|
@@ -5153,7 +5190,8 @@ var serviceFactories = [
|
|
|
5153
5190
|
createPaymentSupabaseService,
|
|
5154
5191
|
createCustomerSupabaseService,
|
|
5155
5192
|
updateCustomerSupabaseService,
|
|
5156
|
-
deleteCustomerSupabaseService
|
|
5193
|
+
deleteCustomerSupabaseService,
|
|
5194
|
+
uploadImageSupabaseService
|
|
5157
5195
|
];
|
|
5158
5196
|
var usePosService = () => {
|
|
5159
5197
|
const { env } = useEnv();
|
|
@@ -5318,6 +5356,9 @@ import { useMutation as useMutation108 } from "@tanstack/react-query";
|
|
|
5318
5356
|
// src/hooks/pos/supabase/use-delete-customer.ts
|
|
5319
5357
|
import { useMutation as useMutation109 } from "@tanstack/react-query";
|
|
5320
5358
|
|
|
5359
|
+
// src/hooks/pos/supabase/use-supa-upload-image.ts
|
|
5360
|
+
import { useMutation as useMutation110 } from "@tanstack/react-query";
|
|
5361
|
+
|
|
5321
5362
|
// src/provider/service-provider.tsx
|
|
5322
5363
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
5323
5364
|
var ServiceContext = createContext3(null);
|
|
@@ -5329,7 +5370,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
|
|
|
5329
5370
|
// src/services/action-service/index.ts
|
|
5330
5371
|
function useActionService() {
|
|
5331
5372
|
const { env } = useEnv();
|
|
5332
|
-
const loadAction =
|
|
5373
|
+
const loadAction = useCallback56(
|
|
5333
5374
|
async ({
|
|
5334
5375
|
idAction,
|
|
5335
5376
|
context,
|
|
@@ -5353,7 +5394,7 @@ function useActionService() {
|
|
|
5353
5394
|
},
|
|
5354
5395
|
[env]
|
|
5355
5396
|
);
|
|
5356
|
-
const callButton =
|
|
5397
|
+
const callButton = useCallback56(
|
|
5357
5398
|
async ({
|
|
5358
5399
|
model,
|
|
5359
5400
|
ids = [],
|
|
@@ -5387,7 +5428,7 @@ function useActionService() {
|
|
|
5387
5428
|
},
|
|
5388
5429
|
[env]
|
|
5389
5430
|
);
|
|
5390
|
-
const removeRows =
|
|
5431
|
+
const removeRows = useCallback56(
|
|
5391
5432
|
async ({
|
|
5392
5433
|
model,
|
|
5393
5434
|
ids,
|
|
@@ -5413,7 +5454,7 @@ function useActionService() {
|
|
|
5413
5454
|
},
|
|
5414
5455
|
[env]
|
|
5415
5456
|
);
|
|
5416
|
-
const duplicateRecord =
|
|
5457
|
+
const duplicateRecord = useCallback56(
|
|
5417
5458
|
async ({
|
|
5418
5459
|
model,
|
|
5419
5460
|
id,
|
|
@@ -5439,7 +5480,7 @@ function useActionService() {
|
|
|
5439
5480
|
},
|
|
5440
5481
|
[env]
|
|
5441
5482
|
);
|
|
5442
|
-
const getPrintReportName =
|
|
5483
|
+
const getPrintReportName = useCallback56(
|
|
5443
5484
|
async ({ id }) => {
|
|
5444
5485
|
const jsonData = {
|
|
5445
5486
|
model: "ir.actions.report",
|
|
@@ -5457,7 +5498,7 @@ function useActionService() {
|
|
|
5457
5498
|
},
|
|
5458
5499
|
[env]
|
|
5459
5500
|
);
|
|
5460
|
-
const print =
|
|
5501
|
+
const print = useCallback56(
|
|
5461
5502
|
async ({ id, report, db }) => {
|
|
5462
5503
|
const jsonData = {
|
|
5463
5504
|
report,
|
|
@@ -5475,7 +5516,7 @@ function useActionService() {
|
|
|
5475
5516
|
},
|
|
5476
5517
|
[env]
|
|
5477
5518
|
);
|
|
5478
|
-
const runAction =
|
|
5519
|
+
const runAction = useCallback56(
|
|
5479
5520
|
async ({
|
|
5480
5521
|
idAction,
|
|
5481
5522
|
context,
|
|
@@ -5502,7 +5543,7 @@ function useActionService() {
|
|
|
5502
5543
|
},
|
|
5503
5544
|
[env]
|
|
5504
5545
|
);
|
|
5505
|
-
const generateSerialNumber =
|
|
5546
|
+
const generateSerialNumber = useCallback56(
|
|
5506
5547
|
async ({
|
|
5507
5548
|
kwargs,
|
|
5508
5549
|
context,
|
|
@@ -5540,11 +5581,11 @@ function useActionService() {
|
|
|
5540
5581
|
}
|
|
5541
5582
|
|
|
5542
5583
|
// src/services/auth-service/index.ts
|
|
5543
|
-
import { useCallback as
|
|
5584
|
+
import { useCallback as useCallback57 } from "react";
|
|
5544
5585
|
function useAuthService() {
|
|
5545
5586
|
const { env } = useEnv();
|
|
5546
5587
|
const supabase = useSupabaseOptional();
|
|
5547
|
-
const login =
|
|
5588
|
+
const login = useCallback57(
|
|
5548
5589
|
async (body) => {
|
|
5549
5590
|
const payload = Object.fromEntries(
|
|
5550
5591
|
Object.entries({
|
|
@@ -5569,7 +5610,7 @@ function useAuthService() {
|
|
|
5569
5610
|
},
|
|
5570
5611
|
[env]
|
|
5571
5612
|
);
|
|
5572
|
-
const loginSupabase =
|
|
5613
|
+
const loginSupabase = useCallback57(
|
|
5573
5614
|
async (body) => {
|
|
5574
5615
|
if (!supabase) {
|
|
5575
5616
|
return {
|
|
@@ -5585,7 +5626,7 @@ function useAuthService() {
|
|
|
5585
5626
|
},
|
|
5586
5627
|
[supabase]
|
|
5587
5628
|
);
|
|
5588
|
-
const forgotPassword =
|
|
5629
|
+
const forgotPassword = useCallback57(
|
|
5589
5630
|
async (email) => {
|
|
5590
5631
|
const bodyData = {
|
|
5591
5632
|
login: email,
|
|
@@ -5599,7 +5640,7 @@ function useAuthService() {
|
|
|
5599
5640
|
},
|
|
5600
5641
|
[env]
|
|
5601
5642
|
);
|
|
5602
|
-
const forgotPasswordSSO =
|
|
5643
|
+
const forgotPasswordSSO = useCallback57(
|
|
5603
5644
|
async ({
|
|
5604
5645
|
email,
|
|
5605
5646
|
with_context,
|
|
@@ -5622,7 +5663,7 @@ function useAuthService() {
|
|
|
5622
5663
|
},
|
|
5623
5664
|
[env]
|
|
5624
5665
|
);
|
|
5625
|
-
const resetPassword =
|
|
5666
|
+
const resetPassword = useCallback57(
|
|
5626
5667
|
async (data, token) => {
|
|
5627
5668
|
const bodyData = {
|
|
5628
5669
|
token,
|
|
@@ -5637,7 +5678,7 @@ function useAuthService() {
|
|
|
5637
5678
|
},
|
|
5638
5679
|
[env]
|
|
5639
5680
|
);
|
|
5640
|
-
const resetPasswordSSO =
|
|
5681
|
+
const resetPasswordSSO = useCallback57(
|
|
5641
5682
|
async ({
|
|
5642
5683
|
method,
|
|
5643
5684
|
password,
|
|
@@ -5660,7 +5701,7 @@ function useAuthService() {
|
|
|
5660
5701
|
},
|
|
5661
5702
|
[env]
|
|
5662
5703
|
);
|
|
5663
|
-
const updatePassword =
|
|
5704
|
+
const updatePassword = useCallback57(
|
|
5664
5705
|
async (data, token) => {
|
|
5665
5706
|
const bodyData = {
|
|
5666
5707
|
token,
|
|
@@ -5675,7 +5716,7 @@ function useAuthService() {
|
|
|
5675
5716
|
},
|
|
5676
5717
|
[env]
|
|
5677
5718
|
);
|
|
5678
|
-
const isValidToken =
|
|
5719
|
+
const isValidToken = useCallback57(
|
|
5679
5720
|
async (token) => {
|
|
5680
5721
|
const bodyData = {
|
|
5681
5722
|
token
|
|
@@ -5688,7 +5729,7 @@ function useAuthService() {
|
|
|
5688
5729
|
},
|
|
5689
5730
|
[env]
|
|
5690
5731
|
);
|
|
5691
|
-
const isValidActionToken =
|
|
5732
|
+
const isValidActionToken = useCallback57(
|
|
5692
5733
|
async (actionToken) => {
|
|
5693
5734
|
const bodyData = {};
|
|
5694
5735
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -5701,7 +5742,7 @@ function useAuthService() {
|
|
|
5701
5742
|
},
|
|
5702
5743
|
[env]
|
|
5703
5744
|
);
|
|
5704
|
-
const loginSocial =
|
|
5745
|
+
const loginSocial = useCallback57(
|
|
5705
5746
|
async ({
|
|
5706
5747
|
db,
|
|
5707
5748
|
state,
|
|
@@ -5719,13 +5760,13 @@ function useAuthService() {
|
|
|
5719
5760
|
},
|
|
5720
5761
|
[env]
|
|
5721
5762
|
);
|
|
5722
|
-
const getProviders =
|
|
5763
|
+
const getProviders = useCallback57(
|
|
5723
5764
|
async (db) => {
|
|
5724
5765
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
5725
5766
|
},
|
|
5726
5767
|
[env]
|
|
5727
5768
|
);
|
|
5728
|
-
const getAccessByCode =
|
|
5769
|
+
const getAccessByCode = useCallback57(
|
|
5729
5770
|
async (code) => {
|
|
5730
5771
|
const data = new URLSearchParams();
|
|
5731
5772
|
data.append("code", code);
|
|
@@ -5745,7 +5786,7 @@ function useAuthService() {
|
|
|
5745
5786
|
},
|
|
5746
5787
|
[env]
|
|
5747
5788
|
);
|
|
5748
|
-
const logout =
|
|
5789
|
+
const logout = useCallback57(
|
|
5749
5790
|
async (service) => {
|
|
5750
5791
|
return env?.requests?.post(
|
|
5751
5792
|
"/logout" /* LOGOUT */,
|
|
@@ -5762,7 +5803,7 @@ function useAuthService() {
|
|
|
5762
5803
|
},
|
|
5763
5804
|
[env]
|
|
5764
5805
|
);
|
|
5765
|
-
const getTenantMapping =
|
|
5806
|
+
const getTenantMapping = useCallback57(
|
|
5766
5807
|
async ({ shortName, service }) => {
|
|
5767
5808
|
const bodyData = {
|
|
5768
5809
|
short_name: shortName
|
|
@@ -5780,7 +5821,7 @@ function useAuthService() {
|
|
|
5780
5821
|
},
|
|
5781
5822
|
[env]
|
|
5782
5823
|
);
|
|
5783
|
-
const getToken =
|
|
5824
|
+
const getToken = useCallback57(
|
|
5784
5825
|
async ({
|
|
5785
5826
|
phone,
|
|
5786
5827
|
name,
|
|
@@ -5825,10 +5866,10 @@ function useAuthService() {
|
|
|
5825
5866
|
}
|
|
5826
5867
|
|
|
5827
5868
|
// src/services/company-service/index.ts
|
|
5828
|
-
import { useCallback as
|
|
5869
|
+
import { useCallback as useCallback58 } from "react";
|
|
5829
5870
|
function useCompanyService() {
|
|
5830
5871
|
const { env } = useEnv();
|
|
5831
|
-
const getCurrentCompany =
|
|
5872
|
+
const getCurrentCompany = useCallback58(
|
|
5832
5873
|
async (service, extraHeaders) => {
|
|
5833
5874
|
return await env.requests.get(
|
|
5834
5875
|
"/company" /* COMPANY_PATH */,
|
|
@@ -5845,7 +5886,7 @@ function useCompanyService() {
|
|
|
5845
5886
|
},
|
|
5846
5887
|
[env]
|
|
5847
5888
|
);
|
|
5848
|
-
const getInfoCompany =
|
|
5889
|
+
const getInfoCompany = useCallback58(
|
|
5849
5890
|
async (id, service) => {
|
|
5850
5891
|
const jsonData = {
|
|
5851
5892
|
ids: [id],
|
|
@@ -5881,10 +5922,10 @@ function useCompanyService() {
|
|
|
5881
5922
|
}
|
|
5882
5923
|
|
|
5883
5924
|
// src/services/excel-service/index.ts
|
|
5884
|
-
import { useCallback as
|
|
5925
|
+
import { useCallback as useCallback59 } from "react";
|
|
5885
5926
|
function useExcelService() {
|
|
5886
5927
|
const { env } = useEnv();
|
|
5887
|
-
const uploadFileExcel =
|
|
5928
|
+
const uploadFileExcel = useCallback59(
|
|
5888
5929
|
async ({
|
|
5889
5930
|
formData,
|
|
5890
5931
|
service,
|
|
@@ -5901,7 +5942,7 @@ function useExcelService() {
|
|
|
5901
5942
|
},
|
|
5902
5943
|
[env]
|
|
5903
5944
|
);
|
|
5904
|
-
const uploadIdFile =
|
|
5945
|
+
const uploadIdFile = useCallback59(
|
|
5905
5946
|
async ({
|
|
5906
5947
|
formData,
|
|
5907
5948
|
service,
|
|
@@ -5918,7 +5959,7 @@ function useExcelService() {
|
|
|
5918
5959
|
},
|
|
5919
5960
|
[env]
|
|
5920
5961
|
);
|
|
5921
|
-
const parsePreview =
|
|
5962
|
+
const parsePreview = useCallback59(
|
|
5922
5963
|
async ({
|
|
5923
5964
|
id,
|
|
5924
5965
|
selectedSheet,
|
|
@@ -5967,7 +6008,7 @@ function useExcelService() {
|
|
|
5967
6008
|
},
|
|
5968
6009
|
[env]
|
|
5969
6010
|
);
|
|
5970
|
-
const executeImport =
|
|
6011
|
+
const executeImport = useCallback59(
|
|
5971
6012
|
async ({
|
|
5972
6013
|
columns,
|
|
5973
6014
|
fields,
|
|
@@ -6001,7 +6042,7 @@ function useExcelService() {
|
|
|
6001
6042
|
},
|
|
6002
6043
|
[env]
|
|
6003
6044
|
);
|
|
6004
|
-
const getFileExcel =
|
|
6045
|
+
const getFileExcel = useCallback59(
|
|
6005
6046
|
async ({
|
|
6006
6047
|
model,
|
|
6007
6048
|
service,
|
|
@@ -6025,7 +6066,7 @@ function useExcelService() {
|
|
|
6025
6066
|
},
|
|
6026
6067
|
[env]
|
|
6027
6068
|
);
|
|
6028
|
-
const getFieldExport =
|
|
6069
|
+
const getFieldExport = useCallback59(
|
|
6029
6070
|
async ({
|
|
6030
6071
|
ids,
|
|
6031
6072
|
model,
|
|
@@ -6065,7 +6106,7 @@ function useExcelService() {
|
|
|
6065
6106
|
},
|
|
6066
6107
|
[env]
|
|
6067
6108
|
);
|
|
6068
|
-
const exportExcel =
|
|
6109
|
+
const exportExcel = useCallback59(
|
|
6069
6110
|
async ({
|
|
6070
6111
|
model,
|
|
6071
6112
|
domain,
|
|
@@ -6113,10 +6154,10 @@ function useExcelService() {
|
|
|
6113
6154
|
}
|
|
6114
6155
|
|
|
6115
6156
|
// src/services/form-service/index.ts
|
|
6116
|
-
import { useCallback as
|
|
6157
|
+
import { useCallback as useCallback60 } from "react";
|
|
6117
6158
|
function useFormService() {
|
|
6118
6159
|
const { env } = useEnv();
|
|
6119
|
-
const getComment =
|
|
6160
|
+
const getComment = useCallback60(
|
|
6120
6161
|
async ({ data }) => {
|
|
6121
6162
|
const jsonData = {
|
|
6122
6163
|
thread_id: data.thread_id,
|
|
@@ -6134,7 +6175,7 @@ function useFormService() {
|
|
|
6134
6175
|
},
|
|
6135
6176
|
[env]
|
|
6136
6177
|
);
|
|
6137
|
-
const getThreadData =
|
|
6178
|
+
const getThreadData = useCallback60(
|
|
6138
6179
|
async ({
|
|
6139
6180
|
data,
|
|
6140
6181
|
xNode,
|
|
@@ -6161,7 +6202,7 @@ function useFormService() {
|
|
|
6161
6202
|
},
|
|
6162
6203
|
[env]
|
|
6163
6204
|
);
|
|
6164
|
-
const getThreadMessages =
|
|
6205
|
+
const getThreadMessages = useCallback60(
|
|
6165
6206
|
async ({
|
|
6166
6207
|
data,
|
|
6167
6208
|
xNode,
|
|
@@ -6187,7 +6228,7 @@ function useFormService() {
|
|
|
6187
6228
|
},
|
|
6188
6229
|
[env]
|
|
6189
6230
|
);
|
|
6190
|
-
const sentComment =
|
|
6231
|
+
const sentComment = useCallback60(
|
|
6191
6232
|
async ({ data }) => {
|
|
6192
6233
|
const jsonData = {
|
|
6193
6234
|
context: {
|
|
@@ -6215,7 +6256,7 @@ function useFormService() {
|
|
|
6215
6256
|
},
|
|
6216
6257
|
[env]
|
|
6217
6258
|
);
|
|
6218
|
-
const deleteComment =
|
|
6259
|
+
const deleteComment = useCallback60(
|
|
6219
6260
|
async ({ data }) => {
|
|
6220
6261
|
const jsonData = {
|
|
6221
6262
|
attachment_ids: [],
|
|
@@ -6231,7 +6272,7 @@ function useFormService() {
|
|
|
6231
6272
|
},
|
|
6232
6273
|
[env]
|
|
6233
6274
|
);
|
|
6234
|
-
const getImage =
|
|
6275
|
+
const getImage = useCallback60(
|
|
6235
6276
|
async ({ data }) => {
|
|
6236
6277
|
return env.requests.get(
|
|
6237
6278
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -6244,7 +6285,7 @@ function useFormService() {
|
|
|
6244
6285
|
},
|
|
6245
6286
|
[env]
|
|
6246
6287
|
);
|
|
6247
|
-
const uploadImage =
|
|
6288
|
+
const uploadImage = useCallback60(
|
|
6248
6289
|
async ({
|
|
6249
6290
|
formData,
|
|
6250
6291
|
service,
|
|
@@ -6263,7 +6304,7 @@ function useFormService() {
|
|
|
6263
6304
|
},
|
|
6264
6305
|
[env]
|
|
6265
6306
|
);
|
|
6266
|
-
const uploadFile =
|
|
6307
|
+
const uploadFile = useCallback60(
|
|
6267
6308
|
async ({
|
|
6268
6309
|
formData,
|
|
6269
6310
|
service,
|
|
@@ -6283,7 +6324,7 @@ function useFormService() {
|
|
|
6283
6324
|
},
|
|
6284
6325
|
[env]
|
|
6285
6326
|
);
|
|
6286
|
-
const getFormView =
|
|
6327
|
+
const getFormView = useCallback60(
|
|
6287
6328
|
async ({ data }) => {
|
|
6288
6329
|
const jsonData = {
|
|
6289
6330
|
model: data.model,
|
|
@@ -6299,7 +6340,7 @@ function useFormService() {
|
|
|
6299
6340
|
},
|
|
6300
6341
|
[env]
|
|
6301
6342
|
);
|
|
6302
|
-
const changeStatus =
|
|
6343
|
+
const changeStatus = useCallback60(
|
|
6303
6344
|
async ({ data }) => {
|
|
6304
6345
|
const vals = {
|
|
6305
6346
|
[data.name]: data.stage_id
|
|
@@ -6328,7 +6369,7 @@ function useFormService() {
|
|
|
6328
6369
|
},
|
|
6329
6370
|
[env]
|
|
6330
6371
|
);
|
|
6331
|
-
const getExternalTab =
|
|
6372
|
+
const getExternalTab = useCallback60(
|
|
6332
6373
|
async ({ method, context, service, xNode }) => {
|
|
6333
6374
|
return env?.requests?.post(
|
|
6334
6375
|
"/call" /* CALL_PATH */,
|
|
@@ -6363,10 +6404,10 @@ function useFormService() {
|
|
|
6363
6404
|
}
|
|
6364
6405
|
|
|
6365
6406
|
// src/services/kanban-service/index.ts
|
|
6366
|
-
import { useCallback as
|
|
6407
|
+
import { useCallback as useCallback61 } from "react";
|
|
6367
6408
|
function useKanbanService() {
|
|
6368
6409
|
const { env } = useEnv();
|
|
6369
|
-
const getGroups =
|
|
6410
|
+
const getGroups = useCallback61(
|
|
6370
6411
|
async ({ model, width_context }) => {
|
|
6371
6412
|
const jsonData = {
|
|
6372
6413
|
model,
|
|
@@ -6386,7 +6427,7 @@ function useKanbanService() {
|
|
|
6386
6427
|
},
|
|
6387
6428
|
[env]
|
|
6388
6429
|
);
|
|
6389
|
-
const getProgressBar =
|
|
6430
|
+
const getProgressBar = useCallback61(
|
|
6390
6431
|
async ({ field, color, model, width_context }) => {
|
|
6391
6432
|
const jsonData = {
|
|
6392
6433
|
model,
|
|
@@ -6416,10 +6457,10 @@ function useKanbanService() {
|
|
|
6416
6457
|
}
|
|
6417
6458
|
|
|
6418
6459
|
// src/services/model-service/index.ts
|
|
6419
|
-
import { useCallback as
|
|
6460
|
+
import { useCallback as useCallback62 } from "react";
|
|
6420
6461
|
function useModelService() {
|
|
6421
6462
|
const { env } = useEnv();
|
|
6422
|
-
const getListMyBankAccount =
|
|
6463
|
+
const getListMyBankAccount = useCallback62(
|
|
6423
6464
|
async ({
|
|
6424
6465
|
domain,
|
|
6425
6466
|
spectification,
|
|
@@ -6443,7 +6484,7 @@ function useModelService() {
|
|
|
6443
6484
|
},
|
|
6444
6485
|
[env]
|
|
6445
6486
|
);
|
|
6446
|
-
const getCurrency =
|
|
6487
|
+
const getCurrency = useCallback62(async () => {
|
|
6447
6488
|
const jsonData = {
|
|
6448
6489
|
model: "res.currency",
|
|
6449
6490
|
method: "web_search_read",
|
|
@@ -6463,7 +6504,7 @@ function useModelService() {
|
|
|
6463
6504
|
}
|
|
6464
6505
|
});
|
|
6465
6506
|
}, [env]);
|
|
6466
|
-
const getConversionRate =
|
|
6507
|
+
const getConversionRate = useCallback62(async () => {
|
|
6467
6508
|
const jsonData = {
|
|
6468
6509
|
model: "res.currency",
|
|
6469
6510
|
method: "web_search_read",
|
|
@@ -6489,7 +6530,7 @@ function useModelService() {
|
|
|
6489
6530
|
}
|
|
6490
6531
|
});
|
|
6491
6532
|
}, [env]);
|
|
6492
|
-
const getAll =
|
|
6533
|
+
const getAll = useCallback62(
|
|
6493
6534
|
async ({
|
|
6494
6535
|
data,
|
|
6495
6536
|
service,
|
|
@@ -6531,7 +6572,7 @@ function useModelService() {
|
|
|
6531
6572
|
},
|
|
6532
6573
|
[env]
|
|
6533
6574
|
);
|
|
6534
|
-
const getListCalendar =
|
|
6575
|
+
const getListCalendar = useCallback62(
|
|
6535
6576
|
async ({ data }) => {
|
|
6536
6577
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
6537
6578
|
fields: data.fields,
|
|
@@ -6562,7 +6603,7 @@ function useModelService() {
|
|
|
6562
6603
|
},
|
|
6563
6604
|
[env]
|
|
6564
6605
|
);
|
|
6565
|
-
const getList =
|
|
6606
|
+
const getList = useCallback62(
|
|
6566
6607
|
async ({
|
|
6567
6608
|
model,
|
|
6568
6609
|
ids = [],
|
|
@@ -6594,7 +6635,7 @@ function useModelService() {
|
|
|
6594
6635
|
},
|
|
6595
6636
|
[env]
|
|
6596
6637
|
);
|
|
6597
|
-
const getDetail =
|
|
6638
|
+
const getDetail = useCallback62(
|
|
6598
6639
|
async ({
|
|
6599
6640
|
ids = [],
|
|
6600
6641
|
model,
|
|
@@ -6626,7 +6667,7 @@ function useModelService() {
|
|
|
6626
6667
|
},
|
|
6627
6668
|
[env]
|
|
6628
6669
|
);
|
|
6629
|
-
const save =
|
|
6670
|
+
const save = useCallback62(
|
|
6630
6671
|
async ({
|
|
6631
6672
|
model,
|
|
6632
6673
|
ids = [],
|
|
@@ -6661,7 +6702,7 @@ function useModelService() {
|
|
|
6661
6702
|
},
|
|
6662
6703
|
[env]
|
|
6663
6704
|
);
|
|
6664
|
-
const deleteApi =
|
|
6705
|
+
const deleteApi = useCallback62(
|
|
6665
6706
|
async ({ ids = [], model, service }) => {
|
|
6666
6707
|
const jsonData = {
|
|
6667
6708
|
model,
|
|
@@ -6681,7 +6722,7 @@ function useModelService() {
|
|
|
6681
6722
|
},
|
|
6682
6723
|
[env]
|
|
6683
6724
|
);
|
|
6684
|
-
const onChange =
|
|
6725
|
+
const onChange = useCallback62(
|
|
6685
6726
|
async ({
|
|
6686
6727
|
ids = [],
|
|
6687
6728
|
model,
|
|
@@ -6717,7 +6758,7 @@ function useModelService() {
|
|
|
6717
6758
|
},
|
|
6718
6759
|
[env]
|
|
6719
6760
|
);
|
|
6720
|
-
const getListFieldsOnchange =
|
|
6761
|
+
const getListFieldsOnchange = useCallback62(
|
|
6721
6762
|
async ({
|
|
6722
6763
|
model,
|
|
6723
6764
|
service,
|
|
@@ -6741,7 +6782,7 @@ function useModelService() {
|
|
|
6741
6782
|
},
|
|
6742
6783
|
[env]
|
|
6743
6784
|
);
|
|
6744
|
-
const parseORMOdoo =
|
|
6785
|
+
const parseORMOdoo = useCallback62((data) => {
|
|
6745
6786
|
for (const key in data) {
|
|
6746
6787
|
if (key === "display_name") {
|
|
6747
6788
|
delete data[key];
|
|
@@ -6752,7 +6793,7 @@ function useModelService() {
|
|
|
6752
6793
|
}
|
|
6753
6794
|
return { ...data };
|
|
6754
6795
|
}, []);
|
|
6755
|
-
const toDataJS =
|
|
6796
|
+
const toDataJS = useCallback62(
|
|
6756
6797
|
(data, viewData, model) => {
|
|
6757
6798
|
for (const key in data) {
|
|
6758
6799
|
if (data[key] === false) {
|
|
@@ -6810,10 +6851,10 @@ function useModelService() {
|
|
|
6810
6851
|
}
|
|
6811
6852
|
|
|
6812
6853
|
// src/services/user-service/index.ts
|
|
6813
|
-
import { useCallback as
|
|
6854
|
+
import { useCallback as useCallback63 } from "react";
|
|
6814
6855
|
function useUserService() {
|
|
6815
6856
|
const { env } = useEnv();
|
|
6816
|
-
const getProfile =
|
|
6857
|
+
const getProfile = useCallback63(
|
|
6817
6858
|
async (service, path, extraHeaders) => {
|
|
6818
6859
|
return env?.requests?.get(
|
|
6819
6860
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -6830,7 +6871,7 @@ function useUserService() {
|
|
|
6830
6871
|
},
|
|
6831
6872
|
[env]
|
|
6832
6873
|
);
|
|
6833
|
-
const getUser =
|
|
6874
|
+
const getUser = useCallback63(
|
|
6834
6875
|
async ({ context, id }) => {
|
|
6835
6876
|
const jsonData = {
|
|
6836
6877
|
model: "res.users",
|
|
@@ -6868,7 +6909,7 @@ function useUserService() {
|
|
|
6868
6909
|
},
|
|
6869
6910
|
[env]
|
|
6870
6911
|
);
|
|
6871
|
-
const switchUserLocale =
|
|
6912
|
+
const switchUserLocale = useCallback63(
|
|
6872
6913
|
async ({ id, values, service }) => {
|
|
6873
6914
|
const jsonData = {
|
|
6874
6915
|
model: "res.users",
|
|
@@ -6896,10 +6937,10 @@ function useUserService() {
|
|
|
6896
6937
|
}
|
|
6897
6938
|
|
|
6898
6939
|
// src/services/view-service/index.ts
|
|
6899
|
-
import { useCallback as
|
|
6940
|
+
import { useCallback as useCallback64 } from "react";
|
|
6900
6941
|
function useViewService() {
|
|
6901
6942
|
const { env } = useEnv();
|
|
6902
|
-
const getView =
|
|
6943
|
+
const getView = useCallback64(
|
|
6903
6944
|
async ({
|
|
6904
6945
|
model,
|
|
6905
6946
|
views,
|
|
@@ -6939,7 +6980,7 @@ function useViewService() {
|
|
|
6939
6980
|
},
|
|
6940
6981
|
[env]
|
|
6941
6982
|
);
|
|
6942
|
-
const getMenu =
|
|
6983
|
+
const getMenu = useCallback64(
|
|
6943
6984
|
async (context, specification, domain, service) => {
|
|
6944
6985
|
const jsonData = {
|
|
6945
6986
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -6970,7 +7011,7 @@ function useViewService() {
|
|
|
6970
7011
|
},
|
|
6971
7012
|
[env]
|
|
6972
7013
|
);
|
|
6973
|
-
const getActionDetail =
|
|
7014
|
+
const getActionDetail = useCallback64(
|
|
6974
7015
|
async (aid, context) => {
|
|
6975
7016
|
const jsonData = {
|
|
6976
7017
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -7000,7 +7041,7 @@ function useViewService() {
|
|
|
7000
7041
|
},
|
|
7001
7042
|
[env]
|
|
7002
7043
|
);
|
|
7003
|
-
const getResequence =
|
|
7044
|
+
const getResequence = useCallback64(
|
|
7004
7045
|
async ({
|
|
7005
7046
|
model,
|
|
7006
7047
|
ids,
|
|
@@ -7030,7 +7071,7 @@ function useViewService() {
|
|
|
7030
7071
|
},
|
|
7031
7072
|
[env]
|
|
7032
7073
|
);
|
|
7033
|
-
const getSelectionItem =
|
|
7074
|
+
const getSelectionItem = useCallback64(
|
|
7034
7075
|
async ({
|
|
7035
7076
|
data,
|
|
7036
7077
|
service,
|
|
@@ -7067,7 +7108,7 @@ function useViewService() {
|
|
|
7067
7108
|
},
|
|
7068
7109
|
[env]
|
|
7069
7110
|
);
|
|
7070
|
-
const loadMessages =
|
|
7111
|
+
const loadMessages = useCallback64(async () => {
|
|
7071
7112
|
return env.requests.post(
|
|
7072
7113
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
7073
7114
|
{},
|
|
@@ -7078,14 +7119,14 @@ function useViewService() {
|
|
|
7078
7119
|
}
|
|
7079
7120
|
);
|
|
7080
7121
|
}, [env]);
|
|
7081
|
-
const getVersion =
|
|
7122
|
+
const getVersion = useCallback64(async () => {
|
|
7082
7123
|
return env?.requests?.get("", {
|
|
7083
7124
|
headers: {
|
|
7084
7125
|
"Content-Type": "application/json"
|
|
7085
7126
|
}
|
|
7086
7127
|
});
|
|
7087
7128
|
}, [env]);
|
|
7088
|
-
const grantAccess =
|
|
7129
|
+
const grantAccess = useCallback64(
|
|
7089
7130
|
async ({
|
|
7090
7131
|
redirect_uri,
|
|
7091
7132
|
state,
|
|
@@ -7112,7 +7153,7 @@ function useViewService() {
|
|
|
7112
7153
|
},
|
|
7113
7154
|
[env]
|
|
7114
7155
|
);
|
|
7115
|
-
const removeTotpSetUp =
|
|
7156
|
+
const removeTotpSetUp = useCallback64(
|
|
7116
7157
|
async ({ method, token }) => {
|
|
7117
7158
|
const jsonData = {
|
|
7118
7159
|
method,
|
|
@@ -7133,7 +7174,7 @@ function useViewService() {
|
|
|
7133
7174
|
},
|
|
7134
7175
|
[env]
|
|
7135
7176
|
);
|
|
7136
|
-
const requestSetupTotp =
|
|
7177
|
+
const requestSetupTotp = useCallback64(
|
|
7137
7178
|
async ({ method, token }) => {
|
|
7138
7179
|
const jsonData = {
|
|
7139
7180
|
method,
|
|
@@ -7152,7 +7193,7 @@ function useViewService() {
|
|
|
7152
7193
|
},
|
|
7153
7194
|
[env]
|
|
7154
7195
|
);
|
|
7155
|
-
const settingsWebRead2fa =
|
|
7196
|
+
const settingsWebRead2fa = useCallback64(
|
|
7156
7197
|
async ({
|
|
7157
7198
|
method,
|
|
7158
7199
|
model,
|
|
@@ -7180,7 +7221,7 @@ function useViewService() {
|
|
|
7180
7221
|
},
|
|
7181
7222
|
[env]
|
|
7182
7223
|
);
|
|
7183
|
-
const signInSSO =
|
|
7224
|
+
const signInSSO = useCallback64(
|
|
7184
7225
|
async ({
|
|
7185
7226
|
redirect_uri,
|
|
7186
7227
|
state,
|
|
@@ -7212,7 +7253,7 @@ function useViewService() {
|
|
|
7212
7253
|
},
|
|
7213
7254
|
[env]
|
|
7214
7255
|
);
|
|
7215
|
-
const verify2FA =
|
|
7256
|
+
const verify2FA = useCallback64(
|
|
7216
7257
|
({
|
|
7217
7258
|
method,
|
|
7218
7259
|
with_context,
|
|
@@ -7245,7 +7286,7 @@ function useViewService() {
|
|
|
7245
7286
|
},
|
|
7246
7287
|
[env]
|
|
7247
7288
|
);
|
|
7248
|
-
const get2FAMethods =
|
|
7289
|
+
const get2FAMethods = useCallback64(
|
|
7249
7290
|
({ method, with_context }) => {
|
|
7250
7291
|
const jsonData = {
|
|
7251
7292
|
method,
|
|
@@ -7264,7 +7305,7 @@ function useViewService() {
|
|
|
7264
7305
|
},
|
|
7265
7306
|
[env]
|
|
7266
7307
|
);
|
|
7267
|
-
const verifyTotp =
|
|
7308
|
+
const verifyTotp = useCallback64(
|
|
7268
7309
|
({
|
|
7269
7310
|
method,
|
|
7270
7311
|
action_token,
|
|
@@ -7289,7 +7330,7 @@ function useViewService() {
|
|
|
7289
7330
|
},
|
|
7290
7331
|
[env]
|
|
7291
7332
|
);
|
|
7292
|
-
const getNotifications =
|
|
7333
|
+
const getNotifications = useCallback64(
|
|
7293
7334
|
async ({
|
|
7294
7335
|
service,
|
|
7295
7336
|
xNode,
|
|
@@ -7309,7 +7350,7 @@ function useViewService() {
|
|
|
7309
7350
|
},
|
|
7310
7351
|
[env]
|
|
7311
7352
|
);
|
|
7312
|
-
const getCountry =
|
|
7353
|
+
const getCountry = useCallback64(
|
|
7313
7354
|
async ({
|
|
7314
7355
|
service,
|
|
7315
7356
|
xNode,
|
|
@@ -7336,7 +7377,7 @@ function useViewService() {
|
|
|
7336
7377
|
},
|
|
7337
7378
|
[env]
|
|
7338
7379
|
);
|
|
7339
|
-
const getCity =
|
|
7380
|
+
const getCity = useCallback64(
|
|
7340
7381
|
async ({
|
|
7341
7382
|
service,
|
|
7342
7383
|
xNode,
|
|
@@ -7363,7 +7404,7 @@ function useViewService() {
|
|
|
7363
7404
|
},
|
|
7364
7405
|
[env]
|
|
7365
7406
|
);
|
|
7366
|
-
const getWard =
|
|
7407
|
+
const getWard = useCallback64(
|
|
7367
7408
|
async ({
|
|
7368
7409
|
service,
|
|
7369
7410
|
xNode,
|
|
@@ -7388,7 +7429,7 @@ function useViewService() {
|
|
|
7388
7429
|
},
|
|
7389
7430
|
[env]
|
|
7390
7431
|
);
|
|
7391
|
-
const getPartnerTitle =
|
|
7432
|
+
const getPartnerTitle = useCallback64(
|
|
7392
7433
|
async ({
|
|
7393
7434
|
service,
|
|
7394
7435
|
xNode,
|
|
@@ -7440,10 +7481,10 @@ function useViewService() {
|
|
|
7440
7481
|
}
|
|
7441
7482
|
|
|
7442
7483
|
// src/services/dashboard-service/index.ts
|
|
7443
|
-
import { useCallback as
|
|
7484
|
+
import { useCallback as useCallback65 } from "react";
|
|
7444
7485
|
function useDashboardService() {
|
|
7445
7486
|
const { env } = useEnv();
|
|
7446
|
-
const readGroup =
|
|
7487
|
+
const readGroup = useCallback65(
|
|
7447
7488
|
async ({
|
|
7448
7489
|
service,
|
|
7449
7490
|
xNode,
|
|
@@ -7460,7 +7501,7 @@ function useDashboardService() {
|
|
|
7460
7501
|
},
|
|
7461
7502
|
[env]
|
|
7462
7503
|
);
|
|
7463
|
-
const getDataChart =
|
|
7504
|
+
const getDataChart = useCallback65(
|
|
7464
7505
|
async ({
|
|
7465
7506
|
service,
|
|
7466
7507
|
xNode,
|