@fctc/interface-logic 3.0.7 → 3.0.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/configs.js CHANGED
@@ -2227,6 +2227,13 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2227
2227
  const setViewData = (viewData) => {
2228
2228
  sessionStorage.setItem("viewData", JSON.stringify(viewData));
2229
2229
  };
2230
+ const getXNode = () => {
2231
+ const xNode = sessionStorage.getItem("xNode");
2232
+ return xNode;
2233
+ };
2234
+ const setXNode = (xNode) => {
2235
+ sessionStorage.setItem("xNode", xNode);
2236
+ };
2230
2237
  return {
2231
2238
  getMenuFocus,
2232
2239
  setMenuFocus,
@@ -2234,7 +2241,9 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2234
2241
  getActionData,
2235
2242
  getViewData,
2236
2243
  setViewData,
2237
- getBrowserSession
2244
+ getBrowserSession,
2245
+ getXNode,
2246
+ setXNode
2238
2247
  };
2239
2248
  })();
2240
2249
 
@@ -2247,7 +2256,6 @@ var axiosClient = {
2247
2256
  const database = config?.config?.database;
2248
2257
  let isRefreshing = false;
2249
2258
  let failedQueue = [];
2250
- const xNode = config?.xNode;
2251
2259
  const processQueue = (error, token = null) => {
2252
2260
  failedQueue?.forEach((prom) => {
2253
2261
  if (error) {
@@ -2408,7 +2416,7 @@ var axiosClient = {
2408
2416
  const getHeaders = (header) => {
2409
2417
  const headers = {
2410
2418
  ...header,
2411
- ...xNode ? { "X-Node": xNode } : {}
2419
+ ...sessionStorage2.getXNode() ? { "X-Node": sessionStorage2.getXNode() } : {}
2412
2420
  };
2413
2421
  return headers;
2414
2422
  };
package/dist/configs.mjs CHANGED
@@ -2191,6 +2191,13 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2191
2191
  const setViewData = (viewData) => {
2192
2192
  sessionStorage.setItem("viewData", JSON.stringify(viewData));
2193
2193
  };
2194
+ const getXNode = () => {
2195
+ const xNode = sessionStorage.getItem("xNode");
2196
+ return xNode;
2197
+ };
2198
+ const setXNode = (xNode) => {
2199
+ sessionStorage.setItem("xNode", xNode);
2200
+ };
2194
2201
  return {
2195
2202
  getMenuFocus,
2196
2203
  setMenuFocus,
@@ -2198,7 +2205,9 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2198
2205
  getActionData,
2199
2206
  getViewData,
2200
2207
  setViewData,
2201
- getBrowserSession
2208
+ getBrowserSession,
2209
+ getXNode,
2210
+ setXNode
2202
2211
  };
2203
2212
  })();
2204
2213
 
@@ -2211,7 +2220,6 @@ var axiosClient = {
2211
2220
  const database = config?.config?.database;
2212
2221
  let isRefreshing = false;
2213
2222
  let failedQueue = [];
2214
- const xNode = config?.xNode;
2215
2223
  const processQueue = (error, token = null) => {
2216
2224
  failedQueue?.forEach((prom) => {
2217
2225
  if (error) {
@@ -2372,7 +2380,7 @@ var axiosClient = {
2372
2380
  const getHeaders = (header) => {
2373
2381
  const headers = {
2374
2382
  ...header,
2375
- ...xNode ? { "X-Node": xNode } : {}
2383
+ ...sessionStorage2.getXNode() ? { "X-Node": sessionStorage2.getXNode() } : {}
2376
2384
  };
2377
2385
  return headers;
2378
2386
  };
@@ -2229,6 +2229,13 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2229
2229
  const setViewData = (viewData) => {
2230
2230
  sessionStorage.setItem("viewData", JSON.stringify(viewData));
2231
2231
  };
2232
+ const getXNode = () => {
2233
+ const xNode = sessionStorage.getItem("xNode");
2234
+ return xNode;
2235
+ };
2236
+ const setXNode = (xNode) => {
2237
+ sessionStorage.setItem("xNode", xNode);
2238
+ };
2232
2239
  return {
2233
2240
  getMenuFocus,
2234
2241
  setMenuFocus,
@@ -2236,7 +2243,9 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2236
2243
  getActionData,
2237
2244
  getViewData,
2238
2245
  setViewData,
2239
- getBrowserSession
2246
+ getBrowserSession,
2247
+ getXNode,
2248
+ setXNode
2240
2249
  };
2241
2250
  })();
2242
2251
 
@@ -2249,7 +2258,6 @@ var axiosClient = {
2249
2258
  const database = config?.config?.database;
2250
2259
  let isRefreshing = false;
2251
2260
  let failedQueue = [];
2252
- const xNode = config?.xNode;
2253
2261
  const processQueue = (error, token = null) => {
2254
2262
  failedQueue?.forEach((prom) => {
2255
2263
  if (error) {
@@ -2410,7 +2418,7 @@ var axiosClient = {
2410
2418
  const getHeaders = (header) => {
2411
2419
  const headers = {
2412
2420
  ...header,
2413
- ...xNode ? { "X-Node": xNode } : {}
2421
+ ...sessionStorage2.getXNode() ? { "X-Node": sessionStorage2.getXNode() } : {}
2414
2422
  };
2415
2423
  return headers;
2416
2424
  };
@@ -2191,6 +2191,13 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2191
2191
  const setViewData = (viewData) => {
2192
2192
  sessionStorage.setItem("viewData", JSON.stringify(viewData));
2193
2193
  };
2194
+ const getXNode = () => {
2195
+ const xNode = sessionStorage.getItem("xNode");
2196
+ return xNode;
2197
+ };
2198
+ const setXNode = (xNode) => {
2199
+ sessionStorage.setItem("xNode", xNode);
2200
+ };
2194
2201
  return {
2195
2202
  getMenuFocus,
2196
2203
  setMenuFocus,
@@ -2198,7 +2205,9 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2198
2205
  getActionData,
2199
2206
  getViewData,
2200
2207
  setViewData,
2201
- getBrowserSession
2208
+ getBrowserSession,
2209
+ getXNode,
2210
+ setXNode
2202
2211
  };
2203
2212
  })();
2204
2213
 
@@ -2211,7 +2220,6 @@ var axiosClient = {
2211
2220
  const database = config?.config?.database;
2212
2221
  let isRefreshing = false;
2213
2222
  let failedQueue = [];
2214
- const xNode = config?.xNode;
2215
2223
  const processQueue = (error, token = null) => {
2216
2224
  failedQueue?.forEach((prom) => {
2217
2225
  if (error) {
@@ -2372,7 +2380,7 @@ var axiosClient = {
2372
2380
  const getHeaders = (header) => {
2373
2381
  const headers = {
2374
2382
  ...header,
2375
- ...xNode ? { "X-Node": xNode } : {}
2383
+ ...sessionStorage2.getXNode() ? { "X-Node": sessionStorage2.getXNode() } : {}
2376
2384
  };
2377
2385
  return headers;
2378
2386
  };
package/dist/hooks.d.mts CHANGED
@@ -42,7 +42,9 @@ declare const useValidateActionToken: () => _tanstack_react_query.UseMutationRes
42
42
  actionToken: string;
43
43
  }, unknown>;
44
44
 
45
- declare const useGetCompanyInfo: () => _tanstack_react_query.UseMutationResult<any, Error, number, unknown>;
45
+ declare const useGetCompanyInfo: ({ service }: {
46
+ service?: string;
47
+ }) => _tanstack_react_query.UseMutationResult<any, Error, number, unknown>;
46
48
 
47
49
  declare const useGetCurrentCompany: ({ service }: {
48
50
  service?: string;
@@ -276,7 +278,7 @@ declare const useGetGroups: ({ model, width_context, }: {
276
278
 
277
279
  declare const useGetListData: (listDataProps: any, queryKey?: any, enabled?: any, service?: string, xNode?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
278
280
 
279
- declare const useGetMenu: (context: any, specification: any, enabled?: boolean, domain?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
281
+ declare const useGetMenu: (context: any, specification: any, enabled?: boolean, domain?: any, service?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
280
282
 
281
283
  declare const useGetPrintReport: () => _tanstack_react_query.UseMutationResult<any, Error, {
282
284
  id: number;
package/dist/hooks.d.ts CHANGED
@@ -42,7 +42,9 @@ declare const useValidateActionToken: () => _tanstack_react_query.UseMutationRes
42
42
  actionToken: string;
43
43
  }, unknown>;
44
44
 
45
- declare const useGetCompanyInfo: () => _tanstack_react_query.UseMutationResult<any, Error, number, unknown>;
45
+ declare const useGetCompanyInfo: ({ service }: {
46
+ service?: string;
47
+ }) => _tanstack_react_query.UseMutationResult<any, Error, number, unknown>;
46
48
 
47
49
  declare const useGetCurrentCompany: ({ service }: {
48
50
  service?: string;
@@ -276,7 +278,7 @@ declare const useGetGroups: ({ model, width_context, }: {
276
278
 
277
279
  declare const useGetListData: (listDataProps: any, queryKey?: any, enabled?: any, service?: string, xNode?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
278
280
 
279
- declare const useGetMenu: (context: any, specification: any, enabled?: boolean, domain?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
281
+ declare const useGetMenu: (context: any, specification: any, enabled?: boolean, domain?: any, service?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
280
282
 
281
283
  declare const useGetPrintReport: () => _tanstack_react_query.UseMutationResult<any, Error, {
282
284
  id: number;
package/dist/hooks.js CHANGED
@@ -3404,7 +3404,7 @@ function useCompanyService() {
3404
3404
  [env]
3405
3405
  );
3406
3406
  const getInfoCompany = (0, import_react8.useCallback)(
3407
- async (id) => {
3407
+ async (id, service) => {
3408
3408
  const jsonData = {
3409
3409
  ids: [id],
3410
3410
  model: "res.company" /* COMPANY */,
@@ -3419,11 +3419,16 @@ function useCompanyService() {
3419
3419
  }
3420
3420
  }
3421
3421
  };
3422
- return await env.requests.post("/call" /* CALL_PATH */, jsonData, {
3423
- headers: {
3424
- "Content-Type": "application/json"
3425
- }
3426
- });
3422
+ return await env.requests.post(
3423
+ "/call" /* CALL_PATH */,
3424
+ jsonData,
3425
+ {
3426
+ headers: {
3427
+ "Content-Type": "application/json"
3428
+ }
3429
+ },
3430
+ service
3431
+ );
3427
3432
  },
3428
3433
  [env]
3429
3434
  );
@@ -4379,7 +4384,7 @@ function useViewService() {
4379
4384
  [env]
4380
4385
  );
4381
4386
  const getMenu = (0, import_react14.useCallback)(
4382
- async (context, specification, domain) => {
4387
+ async (context, specification, domain, service) => {
4383
4388
  const jsonData = {
4384
4389
  model: "ir.ui.menu" /* MENU */,
4385
4390
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -4396,11 +4401,16 @@ function useViewService() {
4396
4401
  ]
4397
4402
  }
4398
4403
  };
4399
- return env?.requests?.post("/call" /* CALL_PATH */, jsonData, {
4400
- headers: {
4401
- "Content-Type": "application/json"
4402
- }
4403
- });
4404
+ return env?.requests?.post(
4405
+ "/call" /* CALL_PATH */,
4406
+ jsonData,
4407
+ {
4408
+ headers: {
4409
+ "Content-Type": "application/json"
4410
+ }
4411
+ },
4412
+ service
4413
+ );
4404
4414
  },
4405
4415
  [env]
4406
4416
  );
@@ -5476,10 +5486,10 @@ var use_validate_action_token_default = useValidateActionToken;
5476
5486
 
5477
5487
  // src/hooks/company/use-get-company-info.ts
5478
5488
  var import_react_query15 = require("@tanstack/react-query");
5479
- var useGetCompanyInfo = () => {
5489
+ var useGetCompanyInfo = ({ service }) => {
5480
5490
  const { getInfoCompany } = useCompanyService();
5481
5491
  return (0, import_react_query15.useMutation)({
5482
- mutationFn: (id) => getInfoCompany(id)
5492
+ mutationFn: (id) => getInfoCompany(id, service)
5483
5493
  });
5484
5494
  };
5485
5495
  var use_get_company_info_default = useGetCompanyInfo;
@@ -6313,11 +6323,11 @@ var use_get_list_data_default = useGetListData;
6313
6323
 
6314
6324
  // src/hooks/view/use-get-menu.ts
6315
6325
  var import_react_query51 = require("@tanstack/react-query");
6316
- var useGetMenu = (context, specification, enabled, domain) => {
6326
+ var useGetMenu = (context, specification, enabled, domain, service) => {
6317
6327
  const { getMenu } = useViewService();
6318
6328
  return (0, import_react_query51.useQuery)({
6319
6329
  queryKey: ["menus" /* MENU */, context],
6320
- queryFn: () => getMenu(context, specification, domain).then((res) => {
6330
+ queryFn: () => getMenu(context, specification, domain, service).then((res) => {
6321
6331
  if (res && res?.records && res?.records?.length > 0) {
6322
6332
  return res?.records;
6323
6333
  }
package/dist/hooks.mjs CHANGED
@@ -3281,7 +3281,7 @@ function useCompanyService() {
3281
3281
  [env]
3282
3282
  );
3283
3283
  const getInfoCompany = useCallback4(
3284
- async (id) => {
3284
+ async (id, service) => {
3285
3285
  const jsonData = {
3286
3286
  ids: [id],
3287
3287
  model: "res.company" /* COMPANY */,
@@ -3296,11 +3296,16 @@ function useCompanyService() {
3296
3296
  }
3297
3297
  }
3298
3298
  };
3299
- return await env.requests.post("/call" /* CALL_PATH */, jsonData, {
3300
- headers: {
3301
- "Content-Type": "application/json"
3302
- }
3303
- });
3299
+ return await env.requests.post(
3300
+ "/call" /* CALL_PATH */,
3301
+ jsonData,
3302
+ {
3303
+ headers: {
3304
+ "Content-Type": "application/json"
3305
+ }
3306
+ },
3307
+ service
3308
+ );
3304
3309
  },
3305
3310
  [env]
3306
3311
  );
@@ -4256,7 +4261,7 @@ function useViewService() {
4256
4261
  [env]
4257
4262
  );
4258
4263
  const getMenu = useCallback10(
4259
- async (context, specification, domain) => {
4264
+ async (context, specification, domain, service) => {
4260
4265
  const jsonData = {
4261
4266
  model: "ir.ui.menu" /* MENU */,
4262
4267
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -4273,11 +4278,16 @@ function useViewService() {
4273
4278
  ]
4274
4279
  }
4275
4280
  };
4276
- return env?.requests?.post("/call" /* CALL_PATH */, jsonData, {
4277
- headers: {
4278
- "Content-Type": "application/json"
4279
- }
4280
- });
4281
+ return env?.requests?.post(
4282
+ "/call" /* CALL_PATH */,
4283
+ jsonData,
4284
+ {
4285
+ headers: {
4286
+ "Content-Type": "application/json"
4287
+ }
4288
+ },
4289
+ service
4290
+ );
4281
4291
  },
4282
4292
  [env]
4283
4293
  );
@@ -5353,10 +5363,10 @@ var use_validate_action_token_default = useValidateActionToken;
5353
5363
 
5354
5364
  // src/hooks/company/use-get-company-info.ts
5355
5365
  import { useMutation as useMutation13 } from "@tanstack/react-query";
5356
- var useGetCompanyInfo = () => {
5366
+ var useGetCompanyInfo = ({ service }) => {
5357
5367
  const { getInfoCompany } = useCompanyService();
5358
5368
  return useMutation13({
5359
- mutationFn: (id) => getInfoCompany(id)
5369
+ mutationFn: (id) => getInfoCompany(id, service)
5360
5370
  });
5361
5371
  };
5362
5372
  var use_get_company_info_default = useGetCompanyInfo;
@@ -6190,11 +6200,11 @@ var use_get_list_data_default = useGetListData;
6190
6200
 
6191
6201
  // src/hooks/view/use-get-menu.ts
6192
6202
  import { useQuery as useQuery15 } from "@tanstack/react-query";
6193
- var useGetMenu = (context, specification, enabled, domain) => {
6203
+ var useGetMenu = (context, specification, enabled, domain, service) => {
6194
6204
  const { getMenu } = useViewService();
6195
6205
  return useQuery15({
6196
6206
  queryKey: ["menus" /* MENU */, context],
6197
- queryFn: () => getMenu(context, specification, domain).then((res) => {
6207
+ queryFn: () => getMenu(context, specification, domain, service).then((res) => {
6198
6208
  if (res && res?.records && res?.records?.length > 0) {
6199
6209
  return res?.records;
6200
6210
  }
package/dist/provider.js CHANGED
@@ -2949,6 +2949,13 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2949
2949
  const setViewData = (viewData) => {
2950
2950
  sessionStorage.setItem("viewData", JSON.stringify(viewData));
2951
2951
  };
2952
+ const getXNode = () => {
2953
+ const xNode = sessionStorage.getItem("xNode");
2954
+ return xNode;
2955
+ };
2956
+ const setXNode = (xNode) => {
2957
+ sessionStorage.setItem("xNode", xNode);
2958
+ };
2952
2959
  return {
2953
2960
  getMenuFocus,
2954
2961
  setMenuFocus: setMenuFocus2,
@@ -2956,7 +2963,9 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2956
2963
  getActionData,
2957
2964
  getViewData,
2958
2965
  setViewData,
2959
- getBrowserSession
2966
+ getBrowserSession,
2967
+ getXNode,
2968
+ setXNode
2960
2969
  };
2961
2970
  })();
2962
2971
 
@@ -3401,7 +3410,7 @@ function useCompanyService() {
3401
3410
  [env]
3402
3411
  );
3403
3412
  const getInfoCompany = (0, import_react4.useCallback)(
3404
- async (id) => {
3413
+ async (id, service) => {
3405
3414
  const jsonData = {
3406
3415
  ids: [id],
3407
3416
  model: "res.company" /* COMPANY */,
@@ -3416,11 +3425,16 @@ function useCompanyService() {
3416
3425
  }
3417
3426
  }
3418
3427
  };
3419
- return await env.requests.post("/call" /* CALL_PATH */, jsonData, {
3420
- headers: {
3421
- "Content-Type": "application/json"
3422
- }
3423
- });
3428
+ return await env.requests.post(
3429
+ "/call" /* CALL_PATH */,
3430
+ jsonData,
3431
+ {
3432
+ headers: {
3433
+ "Content-Type": "application/json"
3434
+ }
3435
+ },
3436
+ service
3437
+ );
3424
3438
  },
3425
3439
  [env]
3426
3440
  );
@@ -4376,7 +4390,7 @@ function useViewService() {
4376
4390
  [env]
4377
4391
  );
4378
4392
  const getMenu = (0, import_react10.useCallback)(
4379
- async (context, specification, domain) => {
4393
+ async (context, specification, domain, service) => {
4380
4394
  const jsonData = {
4381
4395
  model: "ir.ui.menu" /* MENU */,
4382
4396
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -4393,11 +4407,16 @@ function useViewService() {
4393
4407
  ]
4394
4408
  }
4395
4409
  };
4396
- return env?.requests?.post("/call" /* CALL_PATH */, jsonData, {
4397
- headers: {
4398
- "Content-Type": "application/json"
4399
- }
4400
- });
4410
+ return env?.requests?.post(
4411
+ "/call" /* CALL_PATH */,
4412
+ jsonData,
4413
+ {
4414
+ headers: {
4415
+ "Content-Type": "application/json"
4416
+ }
4417
+ },
4418
+ service
4419
+ );
4401
4420
  },
4402
4421
  [env]
4403
4422
  );
@@ -5365,7 +5384,6 @@ var axiosClient = {
5365
5384
  const database = config?.config?.database;
5366
5385
  let isRefreshing = false;
5367
5386
  let failedQueue = [];
5368
- const xNode = config?.xNode;
5369
5387
  const processQueue = (error, token = null) => {
5370
5388
  failedQueue?.forEach((prom) => {
5371
5389
  if (error) {
@@ -5526,7 +5544,7 @@ var axiosClient = {
5526
5544
  const getHeaders = (header) => {
5527
5545
  const headers = {
5528
5546
  ...header,
5529
- ...xNode ? { "X-Node": xNode } : {}
5547
+ ...sessionStorage2.getXNode() ? { "X-Node": sessionStorage2.getXNode() } : {}
5530
5548
  };
5531
5549
  return headers;
5532
5550
  };
@@ -5855,10 +5873,10 @@ var use_validate_action_token_default = useValidateActionToken;
5855
5873
 
5856
5874
  // src/hooks/company/use-get-company-info.ts
5857
5875
  var import_react_query15 = require("@tanstack/react-query");
5858
- var useGetCompanyInfo = () => {
5876
+ var useGetCompanyInfo = ({ service }) => {
5859
5877
  const { getInfoCompany } = useCompanyService();
5860
5878
  return (0, import_react_query15.useMutation)({
5861
- mutationFn: (id) => getInfoCompany(id)
5879
+ mutationFn: (id) => getInfoCompany(id, service)
5862
5880
  });
5863
5881
  };
5864
5882
  var use_get_company_info_default = useGetCompanyInfo;
@@ -6692,11 +6710,11 @@ var use_get_list_data_default = useGetListData;
6692
6710
 
6693
6711
  // src/hooks/view/use-get-menu.ts
6694
6712
  var import_react_query51 = require("@tanstack/react-query");
6695
- var useGetMenu = (context, specification, enabled, domain) => {
6713
+ var useGetMenu = (context, specification, enabled, domain, service) => {
6696
6714
  const { getMenu } = useViewService();
6697
6715
  return (0, import_react_query51.useQuery)({
6698
6716
  queryKey: ["menus" /* MENU */, context],
6699
- queryFn: () => getMenu(context, specification, domain).then((res) => {
6717
+ queryFn: () => getMenu(context, specification, domain, service).then((res) => {
6700
6718
  if (res && res?.records && res?.records?.length > 0) {
6701
6719
  return res?.records;
6702
6720
  }
package/dist/provider.mjs CHANGED
@@ -2906,6 +2906,13 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2906
2906
  const setViewData = (viewData) => {
2907
2907
  sessionStorage.setItem("viewData", JSON.stringify(viewData));
2908
2908
  };
2909
+ const getXNode = () => {
2910
+ const xNode = sessionStorage.getItem("xNode");
2911
+ return xNode;
2912
+ };
2913
+ const setXNode = (xNode) => {
2914
+ sessionStorage.setItem("xNode", xNode);
2915
+ };
2909
2916
  return {
2910
2917
  getMenuFocus,
2911
2918
  setMenuFocus: setMenuFocus2,
@@ -2913,7 +2920,9 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2913
2920
  getActionData,
2914
2921
  getViewData,
2915
2922
  setViewData,
2916
- getBrowserSession
2923
+ getBrowserSession,
2924
+ getXNode,
2925
+ setXNode
2917
2926
  };
2918
2927
  })();
2919
2928
 
@@ -3358,7 +3367,7 @@ function useCompanyService() {
3358
3367
  [env]
3359
3368
  );
3360
3369
  const getInfoCompany = useCallback3(
3361
- async (id) => {
3370
+ async (id, service) => {
3362
3371
  const jsonData = {
3363
3372
  ids: [id],
3364
3373
  model: "res.company" /* COMPANY */,
@@ -3373,11 +3382,16 @@ function useCompanyService() {
3373
3382
  }
3374
3383
  }
3375
3384
  };
3376
- return await env.requests.post("/call" /* CALL_PATH */, jsonData, {
3377
- headers: {
3378
- "Content-Type": "application/json"
3379
- }
3380
- });
3385
+ return await env.requests.post(
3386
+ "/call" /* CALL_PATH */,
3387
+ jsonData,
3388
+ {
3389
+ headers: {
3390
+ "Content-Type": "application/json"
3391
+ }
3392
+ },
3393
+ service
3394
+ );
3381
3395
  },
3382
3396
  [env]
3383
3397
  );
@@ -4333,7 +4347,7 @@ function useViewService() {
4333
4347
  [env]
4334
4348
  );
4335
4349
  const getMenu = useCallback9(
4336
- async (context, specification, domain) => {
4350
+ async (context, specification, domain, service) => {
4337
4351
  const jsonData = {
4338
4352
  model: "ir.ui.menu" /* MENU */,
4339
4353
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -4350,11 +4364,16 @@ function useViewService() {
4350
4364
  ]
4351
4365
  }
4352
4366
  };
4353
- return env?.requests?.post("/call" /* CALL_PATH */, jsonData, {
4354
- headers: {
4355
- "Content-Type": "application/json"
4356
- }
4357
- });
4367
+ return env?.requests?.post(
4368
+ "/call" /* CALL_PATH */,
4369
+ jsonData,
4370
+ {
4371
+ headers: {
4372
+ "Content-Type": "application/json"
4373
+ }
4374
+ },
4375
+ service
4376
+ );
4358
4377
  },
4359
4378
  [env]
4360
4379
  );
@@ -5322,7 +5341,6 @@ var axiosClient = {
5322
5341
  const database = config?.config?.database;
5323
5342
  let isRefreshing = false;
5324
5343
  let failedQueue = [];
5325
- const xNode = config?.xNode;
5326
5344
  const processQueue = (error, token = null) => {
5327
5345
  failedQueue?.forEach((prom) => {
5328
5346
  if (error) {
@@ -5483,7 +5501,7 @@ var axiosClient = {
5483
5501
  const getHeaders = (header) => {
5484
5502
  const headers = {
5485
5503
  ...header,
5486
- ...xNode ? { "X-Node": xNode } : {}
5504
+ ...sessionStorage2.getXNode() ? { "X-Node": sessionStorage2.getXNode() } : {}
5487
5505
  };
5488
5506
  return headers;
5489
5507
  };
@@ -5812,10 +5830,10 @@ var use_validate_action_token_default = useValidateActionToken;
5812
5830
 
5813
5831
  // src/hooks/company/use-get-company-info.ts
5814
5832
  import { useMutation as useMutation13 } from "@tanstack/react-query";
5815
- var useGetCompanyInfo = () => {
5833
+ var useGetCompanyInfo = ({ service }) => {
5816
5834
  const { getInfoCompany } = useCompanyService();
5817
5835
  return useMutation13({
5818
- mutationFn: (id) => getInfoCompany(id)
5836
+ mutationFn: (id) => getInfoCompany(id, service)
5819
5837
  });
5820
5838
  };
5821
5839
  var use_get_company_info_default = useGetCompanyInfo;
@@ -6649,11 +6667,11 @@ var use_get_list_data_default = useGetListData;
6649
6667
 
6650
6668
  // src/hooks/view/use-get-menu.ts
6651
6669
  import { useQuery as useQuery15 } from "@tanstack/react-query";
6652
- var useGetMenu = (context, specification, enabled, domain) => {
6670
+ var useGetMenu = (context, specification, enabled, domain, service) => {
6653
6671
  const { getMenu } = useViewService();
6654
6672
  return useQuery15({
6655
6673
  queryKey: ["menus" /* MENU */, context],
6656
- queryFn: () => getMenu(context, specification, domain).then((res) => {
6674
+ queryFn: () => getMenu(context, specification, domain, service).then((res) => {
6657
6675
  if (res && res?.records && res?.records?.length > 0) {
6658
6676
  return res?.records;
6659
6677
  }
@@ -80,7 +80,7 @@ declare function useAuthService(): {
80
80
 
81
81
  declare function useCompanyService(): {
82
82
  getCurrentCompany: (service?: string) => Promise<any>;
83
- getInfoCompany: (id: number) => Promise<any>;
83
+ getInfoCompany: (id: number, service: any) => Promise<any>;
84
84
  };
85
85
 
86
86
  declare function useExcelService(): {
@@ -233,7 +233,7 @@ declare function useUserService(): {
233
233
 
234
234
  declare function useViewService(): {
235
235
  getView: ({ model, views, context, options, aid, service, xNode, }: GetViewParams) => Promise<any>;
236
- getMenu: (context: any, specification: any, domain: any) => Promise<any>;
236
+ getMenu: (context: any, specification: any, domain: any, service?: string) => Promise<any>;
237
237
  getActionDetail: (aid: number, context: any) => Promise<any>;
238
238
  getResequence: ({ model, ids, context, offset, }: {
239
239
  model: string;
@@ -80,7 +80,7 @@ declare function useAuthService(): {
80
80
 
81
81
  declare function useCompanyService(): {
82
82
  getCurrentCompany: (service?: string) => Promise<any>;
83
- getInfoCompany: (id: number) => Promise<any>;
83
+ getInfoCompany: (id: number, service: any) => Promise<any>;
84
84
  };
85
85
 
86
86
  declare function useExcelService(): {
@@ -233,7 +233,7 @@ declare function useUserService(): {
233
233
 
234
234
  declare function useViewService(): {
235
235
  getView: ({ model, views, context, options, aid, service, xNode, }: GetViewParams) => Promise<any>;
236
- getMenu: (context: any, specification: any, domain: any) => Promise<any>;
236
+ getMenu: (context: any, specification: any, domain: any, service?: string) => Promise<any>;
237
237
  getActionDetail: (aid: number, context: any) => Promise<any>;
238
238
  getResequence: ({ model, ids, context, offset, }: {
239
239
  model: string;
package/dist/services.js CHANGED
@@ -3560,7 +3560,7 @@ function useCompanyService() {
3560
3560
  [env]
3561
3561
  );
3562
3562
  const getInfoCompany = (0, import_react8.useCallback)(
3563
- async (id) => {
3563
+ async (id, service) => {
3564
3564
  const jsonData = {
3565
3565
  ids: [id],
3566
3566
  model: "res.company" /* COMPANY */,
@@ -3575,11 +3575,16 @@ function useCompanyService() {
3575
3575
  }
3576
3576
  }
3577
3577
  };
3578
- return await env.requests.post("/call" /* CALL_PATH */, jsonData, {
3579
- headers: {
3580
- "Content-Type": "application/json"
3581
- }
3582
- });
3578
+ return await env.requests.post(
3579
+ "/call" /* CALL_PATH */,
3580
+ jsonData,
3581
+ {
3582
+ headers: {
3583
+ "Content-Type": "application/json"
3584
+ }
3585
+ },
3586
+ service
3587
+ );
3583
3588
  },
3584
3589
  [env]
3585
3590
  );
@@ -4535,7 +4540,7 @@ function useViewService() {
4535
4540
  [env]
4536
4541
  );
4537
4542
  const getMenu = (0, import_react14.useCallback)(
4538
- async (context, specification, domain) => {
4543
+ async (context, specification, domain, service) => {
4539
4544
  const jsonData = {
4540
4545
  model: "ir.ui.menu" /* MENU */,
4541
4546
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -4552,11 +4557,16 @@ function useViewService() {
4552
4557
  ]
4553
4558
  }
4554
4559
  };
4555
- return env?.requests?.post("/call" /* CALL_PATH */, jsonData, {
4556
- headers: {
4557
- "Content-Type": "application/json"
4558
- }
4559
- });
4560
+ return env?.requests?.post(
4561
+ "/call" /* CALL_PATH */,
4562
+ jsonData,
4563
+ {
4564
+ headers: {
4565
+ "Content-Type": "application/json"
4566
+ }
4567
+ },
4568
+ service
4569
+ );
4560
4570
  },
4561
4571
  [env]
4562
4572
  );
package/dist/services.mjs CHANGED
@@ -3516,7 +3516,7 @@ function useCompanyService() {
3516
3516
  [env]
3517
3517
  );
3518
3518
  const getInfoCompany = useCallback4(
3519
- async (id) => {
3519
+ async (id, service) => {
3520
3520
  const jsonData = {
3521
3521
  ids: [id],
3522
3522
  model: "res.company" /* COMPANY */,
@@ -3531,11 +3531,16 @@ function useCompanyService() {
3531
3531
  }
3532
3532
  }
3533
3533
  };
3534
- return await env.requests.post("/call" /* CALL_PATH */, jsonData, {
3535
- headers: {
3536
- "Content-Type": "application/json"
3537
- }
3538
- });
3534
+ return await env.requests.post(
3535
+ "/call" /* CALL_PATH */,
3536
+ jsonData,
3537
+ {
3538
+ headers: {
3539
+ "Content-Type": "application/json"
3540
+ }
3541
+ },
3542
+ service
3543
+ );
3539
3544
  },
3540
3545
  [env]
3541
3546
  );
@@ -4491,7 +4496,7 @@ function useViewService() {
4491
4496
  [env]
4492
4497
  );
4493
4498
  const getMenu = useCallback10(
4494
- async (context, specification, domain) => {
4499
+ async (context, specification, domain, service) => {
4495
4500
  const jsonData = {
4496
4501
  model: "ir.ui.menu" /* MENU */,
4497
4502
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -4508,11 +4513,16 @@ function useViewService() {
4508
4513
  ]
4509
4514
  }
4510
4515
  };
4511
- return env?.requests?.post("/call" /* CALL_PATH */, jsonData, {
4512
- headers: {
4513
- "Content-Type": "application/json"
4514
- }
4515
- });
4516
+ return env?.requests?.post(
4517
+ "/call" /* CALL_PATH */,
4518
+ jsonData,
4519
+ {
4520
+ headers: {
4521
+ "Content-Type": "application/json"
4522
+ }
4523
+ },
4524
+ service
4525
+ );
4516
4526
  },
4517
4527
  [env]
4518
4528
  );
package/dist/utils.d.mts CHANGED
@@ -6,6 +6,8 @@ declare const sessionStorageUtils: {
6
6
  getViewData: () => any | null;
7
7
  setViewData: (viewData: any) => void;
8
8
  getBrowserSession: () => string | null;
9
+ getXNode: () => any | null;
10
+ setXNode: (xNode: any) => void;
9
11
  };
10
12
  interface IMenu {
11
13
  id: number | undefined;
package/dist/utils.d.ts CHANGED
@@ -6,6 +6,8 @@ declare const sessionStorageUtils: {
6
6
  getViewData: () => any | null;
7
7
  setViewData: (viewData: any) => void;
8
8
  getBrowserSession: () => string | null;
9
+ getXNode: () => any | null;
10
+ setXNode: (xNode: any) => void;
9
11
  };
10
12
  interface IMenu {
11
13
  id: number | undefined;
package/dist/utils.js CHANGED
@@ -2970,6 +2970,13 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2970
2970
  const setViewData = (viewData) => {
2971
2971
  sessionStorage.setItem("viewData", JSON.stringify(viewData));
2972
2972
  };
2973
+ const getXNode = () => {
2974
+ const xNode = sessionStorage.getItem("xNode");
2975
+ return xNode;
2976
+ };
2977
+ const setXNode = (xNode) => {
2978
+ sessionStorage.setItem("xNode", xNode);
2979
+ };
2973
2980
  return {
2974
2981
  getMenuFocus,
2975
2982
  setMenuFocus,
@@ -2977,7 +2984,9 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2977
2984
  getActionData,
2978
2985
  getViewData,
2979
2986
  setViewData,
2980
- getBrowserSession
2987
+ getBrowserSession,
2988
+ getXNode,
2989
+ setXNode
2981
2990
  };
2982
2991
  })();
2983
2992
  // Annotate the CommonJS export names for ESM import in node:
package/dist/utils.mjs CHANGED
@@ -2904,6 +2904,13 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2904
2904
  const setViewData = (viewData) => {
2905
2905
  sessionStorage.setItem("viewData", JSON.stringify(viewData));
2906
2906
  };
2907
+ const getXNode = () => {
2908
+ const xNode = sessionStorage.getItem("xNode");
2909
+ return xNode;
2910
+ };
2911
+ const setXNode = (xNode) => {
2912
+ sessionStorage.setItem("xNode", xNode);
2913
+ };
2907
2914
  return {
2908
2915
  getMenuFocus,
2909
2916
  setMenuFocus,
@@ -2911,7 +2918,9 @@ var sessionStorageUtils = /* @__PURE__ */ (() => {
2911
2918
  getActionData,
2912
2919
  getViewData,
2913
2920
  setViewData,
2914
- getBrowserSession
2921
+ getBrowserSession,
2922
+ getXNode,
2923
+ setXNode
2915
2924
  };
2916
2925
  })();
2917
2926
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "3.0.7",
3
+ "version": "3.0.9",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",