@fctc/interface-logic 4.0.2 → 4.0.4

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 CHANGED
@@ -61,6 +61,7 @@ declare const useGetCompanyInfo: () => _tanstack_react_query.UseMutationResult<a
61
61
 
62
62
  declare const useGetCurrentCompany: () => _tanstack_react_query.UseMutationResult<any, Error, {
63
63
  service?: string;
64
+ extraHeaders?: any;
64
65
  }, unknown>;
65
66
 
66
67
  declare const useGetListCompany: (companyIDs?: number[]) => _tanstack_react_query.UseQueryResult<any, Error>;
@@ -274,7 +275,7 @@ declare const useSave: () => _tanstack_react_query.UseMutationResult<any, Error,
274
275
  xNode?: string;
275
276
  }, unknown>;
276
277
 
277
- declare const useGetProfile: (service?: string, path?: string) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
278
+ declare const useGetProfile: (service?: string, path?: string, extraHeaders?: any) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
278
279
 
279
280
  declare const useGetUser: () => _tanstack_react_query.UseMutationResult<any, Error, {
280
281
  id: any;
@@ -629,6 +630,7 @@ declare const useGetPreparationDisplayData: () => _tanstack_react_query.UseMutat
629
630
  ids: any;
630
631
  service?: string;
631
632
  xNode?: string;
633
+ withContext?: any;
632
634
  }, unknown>;
633
635
 
634
636
  declare const useChangeOrderPreparationState: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
package/dist/hooks.d.ts CHANGED
@@ -61,6 +61,7 @@ declare const useGetCompanyInfo: () => _tanstack_react_query.UseMutationResult<a
61
61
 
62
62
  declare const useGetCurrentCompany: () => _tanstack_react_query.UseMutationResult<any, Error, {
63
63
  service?: string;
64
+ extraHeaders?: any;
64
65
  }, unknown>;
65
66
 
66
67
  declare const useGetListCompany: (companyIDs?: number[]) => _tanstack_react_query.UseQueryResult<any, Error>;
@@ -274,7 +275,7 @@ declare const useSave: () => _tanstack_react_query.UseMutationResult<any, Error,
274
275
  xNode?: string;
275
276
  }, unknown>;
276
277
 
277
- declare const useGetProfile: (service?: string, path?: string) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
278
+ declare const useGetProfile: (service?: string, path?: string, extraHeaders?: any) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
278
279
 
279
280
  declare const useGetUser: () => _tanstack_react_query.UseMutationResult<any, Error, {
280
281
  id: any;
@@ -629,6 +630,7 @@ declare const useGetPreparationDisplayData: () => _tanstack_react_query.UseMutat
629
630
  ids: any;
630
631
  service?: string;
631
632
  xNode?: string;
633
+ withContext?: any;
632
634
  }, unknown>;
633
635
 
634
636
  declare const useChangeOrderPreparationState: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
package/dist/hooks.js CHANGED
@@ -3484,11 +3484,14 @@ var import_react8 = require("react");
3484
3484
  function useCompanyService() {
3485
3485
  const { env } = useEnv();
3486
3486
  const getCurrentCompany = (0, import_react8.useCallback)(
3487
- async (service) => {
3487
+ async (service, extraHeaders) => {
3488
3488
  return await env.requests.get(
3489
3489
  "/company" /* COMPANY_PATH */,
3490
3490
  {
3491
- headers: {
3491
+ headers: extraHeaders ? {
3492
+ ...extraHeaders,
3493
+ "Content-Type": "application/json"
3494
+ } : {
3492
3495
  "Content-Type": "application/json"
3493
3496
  }
3494
3497
  },
@@ -4469,11 +4472,14 @@ var import_react13 = require("react");
4469
4472
  function useUserService() {
4470
4473
  const { env } = useEnv();
4471
4474
  const getProfile = (0, import_react13.useCallback)(
4472
- async (service, path) => {
4475
+ async (service, path, extraHeaders) => {
4473
4476
  return env?.requests?.get(
4474
4477
  path || "/userinfo" /* PROFILE_PATH */,
4475
4478
  {
4476
- headers: {
4479
+ headers: extraHeaders ? {
4480
+ ...extraHeaders,
4481
+ "Content-Type": "application/x-www-form-urlencoded"
4482
+ } : {
4477
4483
  "Content-Type": "application/x-www-form-urlencoded"
4478
4484
  }
4479
4485
  },
@@ -5338,16 +5344,18 @@ function useViewService() {
5338
5344
  },
5339
5345
  [env]
5340
5346
  );
5341
- const getPreparaionDisplayData = (0, import_react14.useCallback)(
5347
+ const getPreparationDisplayData = (0, import_react14.useCallback)(
5342
5348
  ({
5343
5349
  ids,
5344
5350
  xNode,
5345
- service
5351
+ service,
5352
+ withContext
5346
5353
  }) => {
5347
5354
  const jsonData = {
5348
5355
  model: "pos_preparation_display.display" /* POS_PREPARATION_DISPLAY */,
5349
5356
  method: "get_preparation_display_data" /* GET_PREPARATION_DISPLAY_DATA */,
5350
- ids
5357
+ ids,
5358
+ with_context: withContext
5351
5359
  };
5352
5360
  return env?.requests.post(
5353
5361
  "/call" /* CALL_PATH */,
@@ -5810,7 +5818,7 @@ function useViewService() {
5810
5818
  handleClosingDetailSession,
5811
5819
  createPosConfig,
5812
5820
  searchJournal,
5813
- getPreparaionDisplayData,
5821
+ getPreparationDisplayData,
5814
5822
  changeOrderPreparaionState,
5815
5823
  updateOrderStatus,
5816
5824
  processOrder,
@@ -6079,7 +6087,10 @@ var import_react_query18 = require("@tanstack/react-query");
6079
6087
  var useGetCurrentCompany = () => {
6080
6088
  const { getCurrentCompany } = useCompanyService();
6081
6089
  return (0, import_react_query18.useMutation)({
6082
- mutationFn: ({ service }) => getCurrentCompany(service)
6090
+ mutationFn: ({
6091
+ service,
6092
+ extraHeaders
6093
+ }) => getCurrentCompany(service, extraHeaders)
6083
6094
  });
6084
6095
  };
6085
6096
  var use_get_current_company_default = useGetCurrentCompany;
@@ -6813,10 +6824,10 @@ var use_save_default = useSave;
6813
6824
 
6814
6825
  // src/hooks/user/use-get-profile.ts
6815
6826
  var import_react_query47 = require("@tanstack/react-query");
6816
- var useGetProfile = (service, path) => {
6827
+ var useGetProfile = (service, path, extraHeaders) => {
6817
6828
  const { getProfile } = useUserService();
6818
6829
  return (0, import_react_query47.useMutation)({
6819
- mutationFn: () => getProfile(service, path)
6830
+ mutationFn: () => getProfile(service, path, extraHeaders)
6820
6831
  });
6821
6832
  };
6822
6833
  var use_get_profile_default = useGetProfile;
@@ -7903,17 +7914,19 @@ var use_search_journal_default = useSearchJournal;
7903
7914
  // src/hooks/view/useGetPreparaionDisplayData.ts
7904
7915
  var import_react_query96 = require("@tanstack/react-query");
7905
7916
  var useGetPreparationDisplayData = () => {
7906
- const { getPreparaionDisplayData } = useViewService();
7917
+ const { getPreparationDisplayData } = useViewService();
7907
7918
  return (0, import_react_query96.useMutation)({
7908
7919
  mutationFn: ({
7909
7920
  ids,
7910
7921
  service,
7911
- xNode
7922
+ xNode,
7923
+ withContext
7912
7924
  }) => {
7913
- return getPreparaionDisplayData({
7925
+ return getPreparationDisplayData({
7914
7926
  ids,
7915
7927
  service,
7916
- xNode
7928
+ xNode,
7929
+ withContext
7917
7930
  });
7918
7931
  }
7919
7932
  });
package/dist/hooks.mjs CHANGED
@@ -3343,11 +3343,14 @@ import { useCallback as useCallback4 } from "react";
3343
3343
  function useCompanyService() {
3344
3344
  const { env } = useEnv();
3345
3345
  const getCurrentCompany = useCallback4(
3346
- async (service) => {
3346
+ async (service, extraHeaders) => {
3347
3347
  return await env.requests.get(
3348
3348
  "/company" /* COMPANY_PATH */,
3349
3349
  {
3350
- headers: {
3350
+ headers: extraHeaders ? {
3351
+ ...extraHeaders,
3352
+ "Content-Type": "application/json"
3353
+ } : {
3351
3354
  "Content-Type": "application/json"
3352
3355
  }
3353
3356
  },
@@ -4328,11 +4331,14 @@ import { useCallback as useCallback9 } from "react";
4328
4331
  function useUserService() {
4329
4332
  const { env } = useEnv();
4330
4333
  const getProfile = useCallback9(
4331
- async (service, path) => {
4334
+ async (service, path, extraHeaders) => {
4332
4335
  return env?.requests?.get(
4333
4336
  path || "/userinfo" /* PROFILE_PATH */,
4334
4337
  {
4335
- headers: {
4338
+ headers: extraHeaders ? {
4339
+ ...extraHeaders,
4340
+ "Content-Type": "application/x-www-form-urlencoded"
4341
+ } : {
4336
4342
  "Content-Type": "application/x-www-form-urlencoded"
4337
4343
  }
4338
4344
  },
@@ -5197,16 +5203,18 @@ function useViewService() {
5197
5203
  },
5198
5204
  [env]
5199
5205
  );
5200
- const getPreparaionDisplayData = useCallback10(
5206
+ const getPreparationDisplayData = useCallback10(
5201
5207
  ({
5202
5208
  ids,
5203
5209
  xNode,
5204
- service
5210
+ service,
5211
+ withContext
5205
5212
  }) => {
5206
5213
  const jsonData = {
5207
5214
  model: "pos_preparation_display.display" /* POS_PREPARATION_DISPLAY */,
5208
5215
  method: "get_preparation_display_data" /* GET_PREPARATION_DISPLAY_DATA */,
5209
- ids
5216
+ ids,
5217
+ with_context: withContext
5210
5218
  };
5211
5219
  return env?.requests.post(
5212
5220
  "/call" /* CALL_PATH */,
@@ -5669,7 +5677,7 @@ function useViewService() {
5669
5677
  handleClosingDetailSession,
5670
5678
  createPosConfig,
5671
5679
  searchJournal,
5672
- getPreparaionDisplayData,
5680
+ getPreparationDisplayData,
5673
5681
  changeOrderPreparaionState,
5674
5682
  updateOrderStatus,
5675
5683
  processOrder,
@@ -5938,7 +5946,10 @@ import { useMutation as useMutation16 } from "@tanstack/react-query";
5938
5946
  var useGetCurrentCompany = () => {
5939
5947
  const { getCurrentCompany } = useCompanyService();
5940
5948
  return useMutation16({
5941
- mutationFn: ({ service }) => getCurrentCompany(service)
5949
+ mutationFn: ({
5950
+ service,
5951
+ extraHeaders
5952
+ }) => getCurrentCompany(service, extraHeaders)
5942
5953
  });
5943
5954
  };
5944
5955
  var use_get_current_company_default = useGetCurrentCompany;
@@ -6672,10 +6683,10 @@ var use_save_default = useSave;
6672
6683
 
6673
6684
  // src/hooks/user/use-get-profile.ts
6674
6685
  import { useMutation as useMutation32 } from "@tanstack/react-query";
6675
- var useGetProfile = (service, path) => {
6686
+ var useGetProfile = (service, path, extraHeaders) => {
6676
6687
  const { getProfile } = useUserService();
6677
6688
  return useMutation32({
6678
- mutationFn: () => getProfile(service, path)
6689
+ mutationFn: () => getProfile(service, path, extraHeaders)
6679
6690
  });
6680
6691
  };
6681
6692
  var use_get_profile_default = useGetProfile;
@@ -7762,17 +7773,19 @@ var use_search_journal_default = useSearchJournal;
7762
7773
  // src/hooks/view/useGetPreparaionDisplayData.ts
7763
7774
  import { useMutation as useMutation72 } from "@tanstack/react-query";
7764
7775
  var useGetPreparationDisplayData = () => {
7765
- const { getPreparaionDisplayData } = useViewService();
7776
+ const { getPreparationDisplayData } = useViewService();
7766
7777
  return useMutation72({
7767
7778
  mutationFn: ({
7768
7779
  ids,
7769
7780
  service,
7770
- xNode
7781
+ xNode,
7782
+ withContext
7771
7783
  }) => {
7772
- return getPreparaionDisplayData({
7784
+ return getPreparationDisplayData({
7773
7785
  ids,
7774
7786
  service,
7775
- xNode
7787
+ xNode,
7788
+ withContext
7776
7789
  });
7777
7790
  }
7778
7791
  });
package/dist/provider.js CHANGED
@@ -3472,11 +3472,14 @@ var import_react4 = require("react");
3472
3472
  function useCompanyService() {
3473
3473
  const { env } = useEnv();
3474
3474
  const getCurrentCompany = (0, import_react4.useCallback)(
3475
- async (service) => {
3475
+ async (service, extraHeaders) => {
3476
3476
  return await env.requests.get(
3477
3477
  "/company" /* COMPANY_PATH */,
3478
3478
  {
3479
- headers: {
3479
+ headers: extraHeaders ? {
3480
+ ...extraHeaders,
3481
+ "Content-Type": "application/json"
3482
+ } : {
3480
3483
  "Content-Type": "application/json"
3481
3484
  }
3482
3485
  },
@@ -4457,11 +4460,14 @@ var import_react9 = require("react");
4457
4460
  function useUserService() {
4458
4461
  const { env } = useEnv();
4459
4462
  const getProfile = (0, import_react9.useCallback)(
4460
- async (service, path) => {
4463
+ async (service, path, extraHeaders) => {
4461
4464
  return env?.requests?.get(
4462
4465
  path || "/userinfo" /* PROFILE_PATH */,
4463
4466
  {
4464
- headers: {
4467
+ headers: extraHeaders ? {
4468
+ ...extraHeaders,
4469
+ "Content-Type": "application/x-www-form-urlencoded"
4470
+ } : {
4465
4471
  "Content-Type": "application/x-www-form-urlencoded"
4466
4472
  }
4467
4473
  },
@@ -5326,16 +5332,18 @@ function useViewService() {
5326
5332
  },
5327
5333
  [env]
5328
5334
  );
5329
- const getPreparaionDisplayData = (0, import_react10.useCallback)(
5335
+ const getPreparationDisplayData = (0, import_react10.useCallback)(
5330
5336
  ({
5331
5337
  ids,
5332
5338
  xNode,
5333
- service
5339
+ service,
5340
+ withContext
5334
5341
  }) => {
5335
5342
  const jsonData = {
5336
5343
  model: "pos_preparation_display.display" /* POS_PREPARATION_DISPLAY */,
5337
5344
  method: "get_preparation_display_data" /* GET_PREPARATION_DISPLAY_DATA */,
5338
- ids
5345
+ ids,
5346
+ with_context: withContext
5339
5347
  };
5340
5348
  return env?.requests.post(
5341
5349
  "/call" /* CALL_PATH */,
@@ -5798,7 +5806,7 @@ function useViewService() {
5798
5806
  handleClosingDetailSession,
5799
5807
  createPosConfig,
5800
5808
  searchJournal,
5801
- getPreparaionDisplayData,
5809
+ getPreparationDisplayData,
5802
5810
  changeOrderPreparaionState,
5803
5811
  updateOrderStatus,
5804
5812
  processOrder,
@@ -6556,7 +6564,10 @@ var import_react_query18 = require("@tanstack/react-query");
6556
6564
  var useGetCurrentCompany = () => {
6557
6565
  const { getCurrentCompany } = useCompanyService();
6558
6566
  return (0, import_react_query18.useMutation)({
6559
- mutationFn: ({ service }) => getCurrentCompany(service)
6567
+ mutationFn: ({
6568
+ service,
6569
+ extraHeaders
6570
+ }) => getCurrentCompany(service, extraHeaders)
6560
6571
  });
6561
6572
  };
6562
6573
  var use_get_current_company_default = useGetCurrentCompany;
@@ -7290,10 +7301,10 @@ var use_save_default = useSave;
7290
7301
 
7291
7302
  // src/hooks/user/use-get-profile.ts
7292
7303
  var import_react_query47 = require("@tanstack/react-query");
7293
- var useGetProfile = (service, path) => {
7304
+ var useGetProfile = (service, path, extraHeaders) => {
7294
7305
  const { getProfile } = useUserService();
7295
7306
  return (0, import_react_query47.useMutation)({
7296
- mutationFn: () => getProfile(service, path)
7307
+ mutationFn: () => getProfile(service, path, extraHeaders)
7297
7308
  });
7298
7309
  };
7299
7310
  var use_get_profile_default = useGetProfile;
@@ -8380,17 +8391,19 @@ var use_search_journal_default = useSearchJournal;
8380
8391
  // src/hooks/view/useGetPreparaionDisplayData.ts
8381
8392
  var import_react_query96 = require("@tanstack/react-query");
8382
8393
  var useGetPreparationDisplayData = () => {
8383
- const { getPreparaionDisplayData } = useViewService();
8394
+ const { getPreparationDisplayData } = useViewService();
8384
8395
  return (0, import_react_query96.useMutation)({
8385
8396
  mutationFn: ({
8386
8397
  ids,
8387
8398
  service,
8388
- xNode
8399
+ xNode,
8400
+ withContext
8389
8401
  }) => {
8390
- return getPreparaionDisplayData({
8402
+ return getPreparationDisplayData({
8391
8403
  ids,
8392
8404
  service,
8393
- xNode
8405
+ xNode,
8406
+ withContext
8394
8407
  });
8395
8408
  }
8396
8409
  });
package/dist/provider.mjs CHANGED
@@ -3429,11 +3429,14 @@ import { useCallback as useCallback3 } from "react";
3429
3429
  function useCompanyService() {
3430
3430
  const { env } = useEnv();
3431
3431
  const getCurrentCompany = useCallback3(
3432
- async (service) => {
3432
+ async (service, extraHeaders) => {
3433
3433
  return await env.requests.get(
3434
3434
  "/company" /* COMPANY_PATH */,
3435
3435
  {
3436
- headers: {
3436
+ headers: extraHeaders ? {
3437
+ ...extraHeaders,
3438
+ "Content-Type": "application/json"
3439
+ } : {
3437
3440
  "Content-Type": "application/json"
3438
3441
  }
3439
3442
  },
@@ -4414,11 +4417,14 @@ import { useCallback as useCallback8 } from "react";
4414
4417
  function useUserService() {
4415
4418
  const { env } = useEnv();
4416
4419
  const getProfile = useCallback8(
4417
- async (service, path) => {
4420
+ async (service, path, extraHeaders) => {
4418
4421
  return env?.requests?.get(
4419
4422
  path || "/userinfo" /* PROFILE_PATH */,
4420
4423
  {
4421
- headers: {
4424
+ headers: extraHeaders ? {
4425
+ ...extraHeaders,
4426
+ "Content-Type": "application/x-www-form-urlencoded"
4427
+ } : {
4422
4428
  "Content-Type": "application/x-www-form-urlencoded"
4423
4429
  }
4424
4430
  },
@@ -5283,16 +5289,18 @@ function useViewService() {
5283
5289
  },
5284
5290
  [env]
5285
5291
  );
5286
- const getPreparaionDisplayData = useCallback9(
5292
+ const getPreparationDisplayData = useCallback9(
5287
5293
  ({
5288
5294
  ids,
5289
5295
  xNode,
5290
- service
5296
+ service,
5297
+ withContext
5291
5298
  }) => {
5292
5299
  const jsonData = {
5293
5300
  model: "pos_preparation_display.display" /* POS_PREPARATION_DISPLAY */,
5294
5301
  method: "get_preparation_display_data" /* GET_PREPARATION_DISPLAY_DATA */,
5295
- ids
5302
+ ids,
5303
+ with_context: withContext
5296
5304
  };
5297
5305
  return env?.requests.post(
5298
5306
  "/call" /* CALL_PATH */,
@@ -5755,7 +5763,7 @@ function useViewService() {
5755
5763
  handleClosingDetailSession,
5756
5764
  createPosConfig,
5757
5765
  searchJournal,
5758
- getPreparaionDisplayData,
5766
+ getPreparationDisplayData,
5759
5767
  changeOrderPreparaionState,
5760
5768
  updateOrderStatus,
5761
5769
  processOrder,
@@ -6513,7 +6521,10 @@ import { useMutation as useMutation16 } from "@tanstack/react-query";
6513
6521
  var useGetCurrentCompany = () => {
6514
6522
  const { getCurrentCompany } = useCompanyService();
6515
6523
  return useMutation16({
6516
- mutationFn: ({ service }) => getCurrentCompany(service)
6524
+ mutationFn: ({
6525
+ service,
6526
+ extraHeaders
6527
+ }) => getCurrentCompany(service, extraHeaders)
6517
6528
  });
6518
6529
  };
6519
6530
  var use_get_current_company_default = useGetCurrentCompany;
@@ -7247,10 +7258,10 @@ var use_save_default = useSave;
7247
7258
 
7248
7259
  // src/hooks/user/use-get-profile.ts
7249
7260
  import { useMutation as useMutation32 } from "@tanstack/react-query";
7250
- var useGetProfile = (service, path) => {
7261
+ var useGetProfile = (service, path, extraHeaders) => {
7251
7262
  const { getProfile } = useUserService();
7252
7263
  return useMutation32({
7253
- mutationFn: () => getProfile(service, path)
7264
+ mutationFn: () => getProfile(service, path, extraHeaders)
7254
7265
  });
7255
7266
  };
7256
7267
  var use_get_profile_default = useGetProfile;
@@ -8337,17 +8348,19 @@ var use_search_journal_default = useSearchJournal;
8337
8348
  // src/hooks/view/useGetPreparaionDisplayData.ts
8338
8349
  import { useMutation as useMutation72 } from "@tanstack/react-query";
8339
8350
  var useGetPreparationDisplayData = () => {
8340
- const { getPreparaionDisplayData } = useViewService();
8351
+ const { getPreparationDisplayData } = useViewService();
8341
8352
  return useMutation72({
8342
8353
  mutationFn: ({
8343
8354
  ids,
8344
8355
  service,
8345
- xNode
8356
+ xNode,
8357
+ withContext
8346
8358
  }) => {
8347
- return getPreparaionDisplayData({
8359
+ return getPreparationDisplayData({
8348
8360
  ids,
8349
8361
  service,
8350
- xNode
8362
+ xNode,
8363
+ withContext
8351
8364
  });
8352
8365
  }
8353
8366
  });
@@ -91,7 +91,7 @@ declare function useAuthService(): {
91
91
  };
92
92
 
93
93
  declare function useCompanyService(): {
94
- getCurrentCompany: (service?: string) => Promise<any>;
94
+ getCurrentCompany: (service?: string, extraHeaders?: any) => Promise<any>;
95
95
  getInfoCompany: (id: number, service: any) => Promise<any>;
96
96
  };
97
97
 
@@ -252,7 +252,7 @@ declare function useModelService(): {
252
252
  };
253
253
 
254
254
  declare function useUserService(): {
255
- getProfile: (service?: string, path?: string) => Promise<any>;
255
+ getProfile: (service?: string, path?: string, extraHeaders?: any) => Promise<any>;
256
256
  getUser: ({ context, id }: {
257
257
  context: any;
258
258
  id: any;
@@ -474,10 +474,11 @@ declare function useViewService(): {
474
474
  service?: string;
475
475
  xNode?: string;
476
476
  }) => any;
477
- getPreparaionDisplayData: ({ ids, xNode, service, }: {
477
+ getPreparationDisplayData: ({ ids, xNode, service, withContext, }: {
478
478
  ids: any;
479
479
  service?: string;
480
480
  xNode?: string;
481
+ withContext?: any;
481
482
  }) => any;
482
483
  changeOrderPreparaionState: ({ orderId, stageId, preparationDisplayId, xNode, service, }: {
483
484
  orderId: number;
@@ -91,7 +91,7 @@ declare function useAuthService(): {
91
91
  };
92
92
 
93
93
  declare function useCompanyService(): {
94
- getCurrentCompany: (service?: string) => Promise<any>;
94
+ getCurrentCompany: (service?: string, extraHeaders?: any) => Promise<any>;
95
95
  getInfoCompany: (id: number, service: any) => Promise<any>;
96
96
  };
97
97
 
@@ -252,7 +252,7 @@ declare function useModelService(): {
252
252
  };
253
253
 
254
254
  declare function useUserService(): {
255
- getProfile: (service?: string, path?: string) => Promise<any>;
255
+ getProfile: (service?: string, path?: string, extraHeaders?: any) => Promise<any>;
256
256
  getUser: ({ context, id }: {
257
257
  context: any;
258
258
  id: any;
@@ -474,10 +474,11 @@ declare function useViewService(): {
474
474
  service?: string;
475
475
  xNode?: string;
476
476
  }) => any;
477
- getPreparaionDisplayData: ({ ids, xNode, service, }: {
477
+ getPreparationDisplayData: ({ ids, xNode, service, withContext, }: {
478
478
  ids: any;
479
479
  service?: string;
480
480
  xNode?: string;
481
+ withContext?: any;
481
482
  }) => any;
482
483
  changeOrderPreparaionState: ({ orderId, stageId, preparationDisplayId, xNode, service, }: {
483
484
  orderId: number;
package/dist/services.js CHANGED
@@ -3680,11 +3680,14 @@ var import_react9 = require("react");
3680
3680
  function useCompanyService() {
3681
3681
  const { env } = useEnv();
3682
3682
  const getCurrentCompany = (0, import_react9.useCallback)(
3683
- async (service) => {
3683
+ async (service, extraHeaders) => {
3684
3684
  return await env.requests.get(
3685
3685
  "/company" /* COMPANY_PATH */,
3686
3686
  {
3687
- headers: {
3687
+ headers: extraHeaders ? {
3688
+ ...extraHeaders,
3689
+ "Content-Type": "application/json"
3690
+ } : {
3688
3691
  "Content-Type": "application/json"
3689
3692
  }
3690
3693
  },
@@ -4665,11 +4668,14 @@ var import_react14 = require("react");
4665
4668
  function useUserService() {
4666
4669
  const { env } = useEnv();
4667
4670
  const getProfile = (0, import_react14.useCallback)(
4668
- async (service, path) => {
4671
+ async (service, path, extraHeaders) => {
4669
4672
  return env?.requests?.get(
4670
4673
  path || "/userinfo" /* PROFILE_PATH */,
4671
4674
  {
4672
- headers: {
4675
+ headers: extraHeaders ? {
4676
+ ...extraHeaders,
4677
+ "Content-Type": "application/x-www-form-urlencoded"
4678
+ } : {
4673
4679
  "Content-Type": "application/x-www-form-urlencoded"
4674
4680
  }
4675
4681
  },
@@ -5534,16 +5540,18 @@ function useViewService() {
5534
5540
  },
5535
5541
  [env]
5536
5542
  );
5537
- const getPreparaionDisplayData = (0, import_react15.useCallback)(
5543
+ const getPreparationDisplayData = (0, import_react15.useCallback)(
5538
5544
  ({
5539
5545
  ids,
5540
5546
  xNode,
5541
- service
5547
+ service,
5548
+ withContext
5542
5549
  }) => {
5543
5550
  const jsonData = {
5544
5551
  model: "pos_preparation_display.display" /* POS_PREPARATION_DISPLAY */,
5545
5552
  method: "get_preparation_display_data" /* GET_PREPARATION_DISPLAY_DATA */,
5546
- ids
5553
+ ids,
5554
+ with_context: withContext
5547
5555
  };
5548
5556
  return env?.requests.post(
5549
5557
  "/call" /* CALL_PATH */,
@@ -6006,7 +6014,7 @@ function useViewService() {
6006
6014
  handleClosingDetailSession,
6007
6015
  createPosConfig,
6008
6016
  searchJournal,
6009
- getPreparaionDisplayData,
6017
+ getPreparationDisplayData,
6010
6018
  changeOrderPreparaionState,
6011
6019
  updateOrderStatus,
6012
6020
  processOrder,
package/dist/services.mjs CHANGED
@@ -3635,11 +3635,14 @@ import { useCallback as useCallback5 } from "react";
3635
3635
  function useCompanyService() {
3636
3636
  const { env } = useEnv();
3637
3637
  const getCurrentCompany = useCallback5(
3638
- async (service) => {
3638
+ async (service, extraHeaders) => {
3639
3639
  return await env.requests.get(
3640
3640
  "/company" /* COMPANY_PATH */,
3641
3641
  {
3642
- headers: {
3642
+ headers: extraHeaders ? {
3643
+ ...extraHeaders,
3644
+ "Content-Type": "application/json"
3645
+ } : {
3643
3646
  "Content-Type": "application/json"
3644
3647
  }
3645
3648
  },
@@ -4620,11 +4623,14 @@ import { useCallback as useCallback10 } from "react";
4620
4623
  function useUserService() {
4621
4624
  const { env } = useEnv();
4622
4625
  const getProfile = useCallback10(
4623
- async (service, path) => {
4626
+ async (service, path, extraHeaders) => {
4624
4627
  return env?.requests?.get(
4625
4628
  path || "/userinfo" /* PROFILE_PATH */,
4626
4629
  {
4627
- headers: {
4630
+ headers: extraHeaders ? {
4631
+ ...extraHeaders,
4632
+ "Content-Type": "application/x-www-form-urlencoded"
4633
+ } : {
4628
4634
  "Content-Type": "application/x-www-form-urlencoded"
4629
4635
  }
4630
4636
  },
@@ -5489,16 +5495,18 @@ function useViewService() {
5489
5495
  },
5490
5496
  [env]
5491
5497
  );
5492
- const getPreparaionDisplayData = useCallback11(
5498
+ const getPreparationDisplayData = useCallback11(
5493
5499
  ({
5494
5500
  ids,
5495
5501
  xNode,
5496
- service
5502
+ service,
5503
+ withContext
5497
5504
  }) => {
5498
5505
  const jsonData = {
5499
5506
  model: "pos_preparation_display.display" /* POS_PREPARATION_DISPLAY */,
5500
5507
  method: "get_preparation_display_data" /* GET_PREPARATION_DISPLAY_DATA */,
5501
- ids
5508
+ ids,
5509
+ with_context: withContext
5502
5510
  };
5503
5511
  return env?.requests.post(
5504
5512
  "/call" /* CALL_PATH */,
@@ -5961,7 +5969,7 @@ function useViewService() {
5961
5969
  handleClosingDetailSession,
5962
5970
  createPosConfig,
5963
5971
  searchJournal,
5964
- getPreparaionDisplayData,
5972
+ getPreparationDisplayData,
5965
5973
  changeOrderPreparaionState,
5966
5974
  updateOrderStatus,
5967
5975
  processOrder,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",