@fctc/interface-logic 3.1.5 → 3.1.7

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
@@ -546,4 +546,12 @@ declare const useHandleClosingDetailSession: () => _tanstack_react_query.UseMuta
546
546
  kwargs: any;
547
547
  }, unknown>;
548
548
 
549
- export { useAddEntity, useButton, useChangeStatus, useCheckPayment, useCreateEntity, useCreateSession, useDelete, useDeleteComment, useDeleteEntity, useDuplicateRecord, useExecuteImport, useExportExcel, useForgotPassword, useForgotPasswordSSO, useGenSerialNumber, useGet2FAMethods, useGetASession, useGetAccessByCode, useGetActionDetail, useGetAll, useGetCalendar, useGetComment, useGetCompanyInfo, useGetConversionRate, useGetCurrency, useGetCurrentCompany, useGetDetail, useGetFieldExport, useGetFieldOnChange, useGetFileExcel, useGetFormView, useGetGroups, useGetImage, useGetList, useGetListCompany, useGetListData, useGetListMyBankAccount, useGetMenu, useGetOrderLine, useGetPos, useGetPrintReport, useGetProGressBar, useGetProductImage, useGetProfile, useGetProvider, useGetResequence, useGetSelection, useGetUser, useGetView, useGrantAccess, useHandleCloseSession, useHandleClosingDetailSession, useHandleClosingSession, useIsValidToken, useLoadAction, useLoadDataPosSession, useLoadMessage, useLoginCredential, useLoginSocial, useLogout, useManageOnChange, useManageSession, useModel, useOdooDataTransform, useOnChangeForm, useParsePreview, usePrint, useRemoveRow, useRemoveTotpSetup, useRequestSetupTotp, useResetPassword, useResetPasswordSSO, useRunAction, useSave, useSendComment, useSettingsWebRead2fa, useSignInSSO, useSwitchLocale, useUpdateClosedSession, useUpdateEntity, useUpdatePassword, useUploadFile, useUploadFileExcel, useUploadIdFile, useUploadImage, useValidateActionToken, useVerify2FA, useVerifyTotp };
549
+ declare const useCreatePosConfig: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
550
+ model: string;
551
+ name: string;
552
+ modulePosRestaurant: string;
553
+ service: string;
554
+ xNode: string;
555
+ }, unknown>;
556
+
557
+ export { useAddEntity, useButton, useChangeStatus, useCheckPayment, useCreateEntity, useCreatePosConfig, useCreateSession, useDelete, useDeleteComment, useDeleteEntity, useDuplicateRecord, useExecuteImport, useExportExcel, useForgotPassword, useForgotPasswordSSO, useGenSerialNumber, useGet2FAMethods, useGetASession, useGetAccessByCode, useGetActionDetail, useGetAll, useGetCalendar, useGetComment, useGetCompanyInfo, useGetConversionRate, useGetCurrency, useGetCurrentCompany, useGetDetail, useGetFieldExport, useGetFieldOnChange, useGetFileExcel, useGetFormView, useGetGroups, useGetImage, useGetList, useGetListCompany, useGetListData, useGetListMyBankAccount, useGetMenu, useGetOrderLine, useGetPos, useGetPrintReport, useGetProGressBar, useGetProductImage, useGetProfile, useGetProvider, useGetResequence, useGetSelection, useGetUser, useGetView, useGrantAccess, useHandleCloseSession, useHandleClosingDetailSession, useHandleClosingSession, useIsValidToken, useLoadAction, useLoadDataPosSession, useLoadMessage, useLoginCredential, useLoginSocial, useLogout, useManageOnChange, useManageSession, useModel, useOdooDataTransform, useOnChangeForm, useParsePreview, usePrint, useRemoveRow, useRemoveTotpSetup, useRequestSetupTotp, useResetPassword, useResetPasswordSSO, useRunAction, useSave, useSendComment, useSettingsWebRead2fa, useSignInSSO, useSwitchLocale, useUpdateClosedSession, useUpdateEntity, useUpdatePassword, useUploadFile, useUploadFileExcel, useUploadIdFile, useUploadImage, useValidateActionToken, useVerify2FA, useVerifyTotp };
package/dist/hooks.d.ts CHANGED
@@ -546,4 +546,12 @@ declare const useHandleClosingDetailSession: () => _tanstack_react_query.UseMuta
546
546
  kwargs: any;
547
547
  }, unknown>;
548
548
 
549
- export { useAddEntity, useButton, useChangeStatus, useCheckPayment, useCreateEntity, useCreateSession, useDelete, useDeleteComment, useDeleteEntity, useDuplicateRecord, useExecuteImport, useExportExcel, useForgotPassword, useForgotPasswordSSO, useGenSerialNumber, useGet2FAMethods, useGetASession, useGetAccessByCode, useGetActionDetail, useGetAll, useGetCalendar, useGetComment, useGetCompanyInfo, useGetConversionRate, useGetCurrency, useGetCurrentCompany, useGetDetail, useGetFieldExport, useGetFieldOnChange, useGetFileExcel, useGetFormView, useGetGroups, useGetImage, useGetList, useGetListCompany, useGetListData, useGetListMyBankAccount, useGetMenu, useGetOrderLine, useGetPos, useGetPrintReport, useGetProGressBar, useGetProductImage, useGetProfile, useGetProvider, useGetResequence, useGetSelection, useGetUser, useGetView, useGrantAccess, useHandleCloseSession, useHandleClosingDetailSession, useHandleClosingSession, useIsValidToken, useLoadAction, useLoadDataPosSession, useLoadMessage, useLoginCredential, useLoginSocial, useLogout, useManageOnChange, useManageSession, useModel, useOdooDataTransform, useOnChangeForm, useParsePreview, usePrint, useRemoveRow, useRemoveTotpSetup, useRequestSetupTotp, useResetPassword, useResetPasswordSSO, useRunAction, useSave, useSendComment, useSettingsWebRead2fa, useSignInSSO, useSwitchLocale, useUpdateClosedSession, useUpdateEntity, useUpdatePassword, useUploadFile, useUploadFileExcel, useUploadIdFile, useUploadImage, useValidateActionToken, useVerify2FA, useVerifyTotp };
549
+ declare const useCreatePosConfig: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
550
+ model: string;
551
+ name: string;
552
+ modulePosRestaurant: string;
553
+ service: string;
554
+ xNode: string;
555
+ }, unknown>;
556
+
557
+ export { useAddEntity, useButton, useChangeStatus, useCheckPayment, useCreateEntity, useCreatePosConfig, useCreateSession, useDelete, useDeleteComment, useDeleteEntity, useDuplicateRecord, useExecuteImport, useExportExcel, useForgotPassword, useForgotPasswordSSO, useGenSerialNumber, useGet2FAMethods, useGetASession, useGetAccessByCode, useGetActionDetail, useGetAll, useGetCalendar, useGetComment, useGetCompanyInfo, useGetConversionRate, useGetCurrency, useGetCurrentCompany, useGetDetail, useGetFieldExport, useGetFieldOnChange, useGetFileExcel, useGetFormView, useGetGroups, useGetImage, useGetList, useGetListCompany, useGetListData, useGetListMyBankAccount, useGetMenu, useGetOrderLine, useGetPos, useGetPrintReport, useGetProGressBar, useGetProductImage, useGetProfile, useGetProvider, useGetResequence, useGetSelection, useGetUser, useGetView, useGrantAccess, useHandleCloseSession, useHandleClosingDetailSession, useHandleClosingSession, useIsValidToken, useLoadAction, useLoadDataPosSession, useLoadMessage, useLoginCredential, useLoginSocial, useLogout, useManageOnChange, useManageSession, useModel, useOdooDataTransform, useOnChangeForm, useParsePreview, usePrint, useRemoveRow, useRemoveTotpSetup, useRequestSetupTotp, useResetPassword, useResetPasswordSSO, useRunAction, useSave, useSendComment, useSettingsWebRead2fa, useSignInSSO, useSwitchLocale, useUpdateClosedSession, useUpdateEntity, useUpdatePassword, useUploadFile, useUploadFileExcel, useUploadIdFile, useUploadImage, useValidateActionToken, useVerify2FA, useVerifyTotp };
package/dist/hooks.js CHANGED
@@ -35,6 +35,7 @@ __export(hooks_exports, {
35
35
  useChangeStatus: () => use_change_status_default,
36
36
  useCheckPayment: () => use_check_payment_default,
37
37
  useCreateEntity: () => use_create_entity_default,
38
+ useCreatePosConfig: () => use_create_pos_config_default,
38
39
  useCreateSession: () => use_create_session_default,
39
40
  useDelete: () => use_delete_default,
40
41
  useDeleteComment: () => use_delete_comment_default,
@@ -5292,6 +5293,35 @@ function useViewService() {
5292
5293
  },
5293
5294
  [env]
5294
5295
  );
5296
+ const createPosConfig = (0, import_react14.useCallback)(
5297
+ ({
5298
+ model,
5299
+ name,
5300
+ modulePosRestaurant,
5301
+ xNode,
5302
+ service
5303
+ }) => {
5304
+ const jsonData = {
5305
+ model,
5306
+ values: {
5307
+ name,
5308
+ module_pos_restaurant: modulePosRestaurant
5309
+ }
5310
+ };
5311
+ return env?.requests.post(
5312
+ "/create" /* CREATE_PATH */,
5313
+ jsonData,
5314
+ {
5315
+ headers: {
5316
+ "Content-Type": "application/json",
5317
+ ...xNode ? { "X-Node": xNode } : {}
5318
+ }
5319
+ },
5320
+ service
5321
+ );
5322
+ },
5323
+ [env]
5324
+ );
5295
5325
  return {
5296
5326
  getView,
5297
5327
  getMenu,
@@ -5325,7 +5355,8 @@ function useViewService() {
5325
5355
  addEntity,
5326
5356
  checkPayment,
5327
5357
  handleCloseSession,
5328
- handleClosingDetailSession
5358
+ handleClosingDetailSession,
5359
+ createPosConfig
5329
5360
  };
5330
5361
  }
5331
5362
 
@@ -7151,6 +7182,30 @@ var useHandleClosingDetailSession = () => {
7151
7182
  });
7152
7183
  };
7153
7184
  var use_handle_closing_detail_session_default = useHandleClosingDetailSession;
7185
+
7186
+ // src/hooks/view/use-create-pos-config.ts
7187
+ var import_react_query89 = require("@tanstack/react-query");
7188
+ var useCreatePosConfig = () => {
7189
+ const { createPosConfig } = useViewService();
7190
+ return (0, import_react_query89.useMutation)({
7191
+ mutationFn: ({
7192
+ model,
7193
+ name,
7194
+ modulePosRestaurant,
7195
+ xNode,
7196
+ service
7197
+ }) => {
7198
+ return createPosConfig({
7199
+ model,
7200
+ name,
7201
+ modulePosRestaurant,
7202
+ xNode,
7203
+ service
7204
+ });
7205
+ }
7206
+ });
7207
+ };
7208
+ var use_create_pos_config_default = useCreatePosConfig;
7154
7209
  // Annotate the CommonJS export names for ESM import in node:
7155
7210
  0 && (module.exports = {
7156
7211
  useAddEntity,
@@ -7158,6 +7213,7 @@ var use_handle_closing_detail_session_default = useHandleClosingDetailSession;
7158
7213
  useChangeStatus,
7159
7214
  useCheckPayment,
7160
7215
  useCreateEntity,
7216
+ useCreatePosConfig,
7161
7217
  useCreateSession,
7162
7218
  useDelete,
7163
7219
  useDeleteComment,
package/dist/hooks.mjs CHANGED
@@ -5169,6 +5169,35 @@ function useViewService() {
5169
5169
  },
5170
5170
  [env]
5171
5171
  );
5172
+ const createPosConfig = useCallback10(
5173
+ ({
5174
+ model,
5175
+ name,
5176
+ modulePosRestaurant,
5177
+ xNode,
5178
+ service
5179
+ }) => {
5180
+ const jsonData = {
5181
+ model,
5182
+ values: {
5183
+ name,
5184
+ module_pos_restaurant: modulePosRestaurant
5185
+ }
5186
+ };
5187
+ return env?.requests.post(
5188
+ "/create" /* CREATE_PATH */,
5189
+ jsonData,
5190
+ {
5191
+ headers: {
5192
+ "Content-Type": "application/json",
5193
+ ...xNode ? { "X-Node": xNode } : {}
5194
+ }
5195
+ },
5196
+ service
5197
+ );
5198
+ },
5199
+ [env]
5200
+ );
5172
5201
  return {
5173
5202
  getView,
5174
5203
  getMenu,
@@ -5202,7 +5231,8 @@ function useViewService() {
5202
5231
  addEntity,
5203
5232
  checkPayment,
5204
5233
  handleCloseSession,
5205
- handleClosingDetailSession
5234
+ handleClosingDetailSession,
5235
+ createPosConfig
5206
5236
  };
5207
5237
  }
5208
5238
 
@@ -7028,12 +7058,37 @@ var useHandleClosingDetailSession = () => {
7028
7058
  });
7029
7059
  };
7030
7060
  var use_handle_closing_detail_session_default = useHandleClosingDetailSession;
7061
+
7062
+ // src/hooks/view/use-create-pos-config.ts
7063
+ import { useMutation as useMutation67 } from "@tanstack/react-query";
7064
+ var useCreatePosConfig = () => {
7065
+ const { createPosConfig } = useViewService();
7066
+ return useMutation67({
7067
+ mutationFn: ({
7068
+ model,
7069
+ name,
7070
+ modulePosRestaurant,
7071
+ xNode,
7072
+ service
7073
+ }) => {
7074
+ return createPosConfig({
7075
+ model,
7076
+ name,
7077
+ modulePosRestaurant,
7078
+ xNode,
7079
+ service
7080
+ });
7081
+ }
7082
+ });
7083
+ };
7084
+ var use_create_pos_config_default = useCreatePosConfig;
7031
7085
  export {
7032
7086
  use_add_entity_default as useAddEntity,
7033
7087
  use_button_default as useButton,
7034
7088
  use_change_status_default as useChangeStatus,
7035
7089
  use_check_payment_default as useCheckPayment,
7036
7090
  use_create_entity_default as useCreateEntity,
7091
+ use_create_pos_config_default as useCreatePosConfig,
7037
7092
  use_create_session_default as useCreateSession,
7038
7093
  use_delete_default as useDelete,
7039
7094
  use_delete_comment_default as useDeleteComment,
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
3
  import { L as LocalStorageUtilsType } from './local-storage-BPvoMGYJ.mjs';
4
- import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity, useLoadDataPosSession, useManageOnChange, useGenSerialNumber, useGetOrderLine, useGetProductImage, useAddEntity, useCheckPayment, useHandleCloseSession, useHandleClosingDetailSession } from './hooks.mjs';
4
+ import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity, useLoadDataPosSession, useManageOnChange, useGenSerialNumber, useGetOrderLine, useGetProductImage, useAddEntity, useCheckPayment, useHandleCloseSession, useHandleClosingDetailSession, useCreatePosConfig } from './hooks.mjs';
5
5
  import '@tanstack/react-query';
6
6
  import './view-type-xxw9OeSR.mjs';
7
7
  import './base-model-type-DD8uZnDP.mjs';
@@ -153,6 +153,7 @@ interface ServiceContextType {
153
153
  useCheckPayment: typeof useCheckPayment;
154
154
  useHandleCloseSession: typeof useHandleCloseSession;
155
155
  useHandleClosingDetailSession: typeof useHandleClosingDetailSession;
156
+ useCreatePosConfig: typeof useCreatePosConfig;
156
157
  }
157
158
  declare const ServiceProvider: ({ children, }: {
158
159
  children: React.ReactNode;
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
3
  import { L as LocalStorageUtilsType } from './local-storage-BPvoMGYJ.js';
4
- import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity, useLoadDataPosSession, useManageOnChange, useGenSerialNumber, useGetOrderLine, useGetProductImage, useAddEntity, useCheckPayment, useHandleCloseSession, useHandleClosingDetailSession } from './hooks.js';
4
+ import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity, useLoadDataPosSession, useManageOnChange, useGenSerialNumber, useGetOrderLine, useGetProductImage, useAddEntity, useCheckPayment, useHandleCloseSession, useHandleClosingDetailSession, useCreatePosConfig } from './hooks.js';
5
5
  import '@tanstack/react-query';
6
6
  import './view-type-xxw9OeSR.js';
7
7
  import './base-model-type-DD8uZnDP.js';
@@ -153,6 +153,7 @@ interface ServiceContextType {
153
153
  useCheckPayment: typeof useCheckPayment;
154
154
  useHandleCloseSession: typeof useHandleCloseSession;
155
155
  useHandleClosingDetailSession: typeof useHandleClosingDetailSession;
156
+ useCreatePosConfig: typeof useCreatePosConfig;
156
157
  }
157
158
  declare const ServiceProvider: ({ children, }: {
158
159
  children: React.ReactNode;
package/dist/provider.js CHANGED
@@ -5298,6 +5298,35 @@ function useViewService() {
5298
5298
  },
5299
5299
  [env]
5300
5300
  );
5301
+ const createPosConfig = (0, import_react10.useCallback)(
5302
+ ({
5303
+ model,
5304
+ name,
5305
+ modulePosRestaurant,
5306
+ xNode,
5307
+ service
5308
+ }) => {
5309
+ const jsonData = {
5310
+ model,
5311
+ values: {
5312
+ name,
5313
+ module_pos_restaurant: modulePosRestaurant
5314
+ }
5315
+ };
5316
+ return env?.requests.post(
5317
+ "/create" /* CREATE_PATH */,
5318
+ jsonData,
5319
+ {
5320
+ headers: {
5321
+ "Content-Type": "application/json",
5322
+ ...xNode ? { "X-Node": xNode } : {}
5323
+ }
5324
+ },
5325
+ service
5326
+ );
5327
+ },
5328
+ [env]
5329
+ );
5301
5330
  return {
5302
5331
  getView,
5303
5332
  getMenu,
@@ -5331,7 +5360,8 @@ function useViewService() {
5331
5360
  addEntity,
5332
5361
  checkPayment,
5333
5362
  handleCloseSession,
5334
- handleClosingDetailSession
5363
+ handleClosingDetailSession,
5364
+ createPosConfig
5335
5365
  };
5336
5366
  }
5337
5367
 
@@ -7541,6 +7571,30 @@ var useHandleClosingDetailSession = () => {
7541
7571
  };
7542
7572
  var use_handle_closing_detail_session_default = useHandleClosingDetailSession;
7543
7573
 
7574
+ // src/hooks/view/use-create-pos-config.ts
7575
+ var import_react_query89 = require("@tanstack/react-query");
7576
+ var useCreatePosConfig = () => {
7577
+ const { createPosConfig } = useViewService();
7578
+ return (0, import_react_query89.useMutation)({
7579
+ mutationFn: ({
7580
+ model,
7581
+ name,
7582
+ modulePosRestaurant,
7583
+ xNode,
7584
+ service
7585
+ }) => {
7586
+ return createPosConfig({
7587
+ model,
7588
+ name,
7589
+ modulePosRestaurant,
7590
+ xNode,
7591
+ service
7592
+ });
7593
+ }
7594
+ });
7595
+ };
7596
+ var use_create_pos_config_default = useCreatePosConfig;
7597
+
7544
7598
  // src/provider/service-provider.tsx
7545
7599
  var import_jsx_runtime6 = require("react/jsx-runtime");
7546
7600
  var ServiceContext = (0, import_react13.createContext)(null);
@@ -7635,7 +7689,8 @@ var ServiceProvider = ({
7635
7689
  useAddEntity: use_add_entity_default,
7636
7690
  useCheckPayment: use_check_payment_default,
7637
7691
  useHandleCloseSession: use_handle_close_session_default,
7638
- useHandleClosingDetailSession: use_handle_closing_detail_session_default
7692
+ useHandleClosingDetailSession: use_handle_closing_detail_session_default,
7693
+ useCreatePosConfig: use_create_pos_config_default
7639
7694
  };
7640
7695
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ServiceContext.Provider, { value: services, children });
7641
7696
  };
package/dist/provider.mjs CHANGED
@@ -5255,6 +5255,35 @@ function useViewService() {
5255
5255
  },
5256
5256
  [env]
5257
5257
  );
5258
+ const createPosConfig = useCallback9(
5259
+ ({
5260
+ model,
5261
+ name,
5262
+ modulePosRestaurant,
5263
+ xNode,
5264
+ service
5265
+ }) => {
5266
+ const jsonData = {
5267
+ model,
5268
+ values: {
5269
+ name,
5270
+ module_pos_restaurant: modulePosRestaurant
5271
+ }
5272
+ };
5273
+ return env?.requests.post(
5274
+ "/create" /* CREATE_PATH */,
5275
+ jsonData,
5276
+ {
5277
+ headers: {
5278
+ "Content-Type": "application/json",
5279
+ ...xNode ? { "X-Node": xNode } : {}
5280
+ }
5281
+ },
5282
+ service
5283
+ );
5284
+ },
5285
+ [env]
5286
+ );
5258
5287
  return {
5259
5288
  getView,
5260
5289
  getMenu,
@@ -5288,7 +5317,8 @@ function useViewService() {
5288
5317
  addEntity,
5289
5318
  checkPayment,
5290
5319
  handleCloseSession,
5291
- handleClosingDetailSession
5320
+ handleClosingDetailSession,
5321
+ createPosConfig
5292
5322
  };
5293
5323
  }
5294
5324
 
@@ -7498,6 +7528,30 @@ var useHandleClosingDetailSession = () => {
7498
7528
  };
7499
7529
  var use_handle_closing_detail_session_default = useHandleClosingDetailSession;
7500
7530
 
7531
+ // src/hooks/view/use-create-pos-config.ts
7532
+ import { useMutation as useMutation67 } from "@tanstack/react-query";
7533
+ var useCreatePosConfig = () => {
7534
+ const { createPosConfig } = useViewService();
7535
+ return useMutation67({
7536
+ mutationFn: ({
7537
+ model,
7538
+ name,
7539
+ modulePosRestaurant,
7540
+ xNode,
7541
+ service
7542
+ }) => {
7543
+ return createPosConfig({
7544
+ model,
7545
+ name,
7546
+ modulePosRestaurant,
7547
+ xNode,
7548
+ service
7549
+ });
7550
+ }
7551
+ });
7552
+ };
7553
+ var use_create_pos_config_default = useCreatePosConfig;
7554
+
7501
7555
  // src/provider/service-provider.tsx
7502
7556
  import { jsx as jsx6 } from "react/jsx-runtime";
7503
7557
  var ServiceContext = createContext2(null);
@@ -7592,7 +7646,8 @@ var ServiceProvider = ({
7592
7646
  useAddEntity: use_add_entity_default,
7593
7647
  useCheckPayment: use_check_payment_default,
7594
7648
  useHandleCloseSession: use_handle_close_session_default,
7595
- useHandleClosingDetailSession: use_handle_closing_detail_session_default
7649
+ useHandleClosingDetailSession: use_handle_closing_detail_session_default,
7650
+ useCreatePosConfig: use_create_pos_config_default
7596
7651
  };
7597
7652
  return /* @__PURE__ */ jsx6(ServiceContext.Provider, { value: services, children });
7598
7653
  };
@@ -423,6 +423,13 @@ declare function useViewService(): {
423
423
  xNode: string;
424
424
  kwargs: any;
425
425
  }) => any;
426
+ createPosConfig: ({ model, name, modulePosRestaurant, xNode, service, }: {
427
+ model: string;
428
+ name: string;
429
+ modulePosRestaurant: string;
430
+ service: string;
431
+ xNode: string;
432
+ }) => any;
426
433
  };
427
434
 
428
435
  export { useActionService, useAuthService, useCompanyService, useExcelService, useFormService, useKanbanService, useModelService, useUserService, useViewService };
@@ -423,6 +423,13 @@ declare function useViewService(): {
423
423
  xNode: string;
424
424
  kwargs: any;
425
425
  }) => any;
426
+ createPosConfig: ({ model, name, modulePosRestaurant, xNode, service, }: {
427
+ model: string;
428
+ name: string;
429
+ modulePosRestaurant: string;
430
+ service: string;
431
+ xNode: string;
432
+ }) => any;
426
433
  };
427
434
 
428
435
  export { useActionService, useAuthService, useCompanyService, useExcelService, useFormService, useKanbanService, useModelService, useUserService, useViewService };
package/dist/services.js CHANGED
@@ -3111,6 +3111,9 @@ var import_react_query87 = require("@tanstack/react-query");
3111
3111
  // src/hooks/view/use-handle-closing-detail-session.ts
3112
3112
  var import_react_query88 = require("@tanstack/react-query");
3113
3113
 
3114
+ // src/hooks/view/use-create-pos-config.ts
3115
+ var import_react_query89 = require("@tanstack/react-query");
3116
+
3114
3117
  // src/provider/service-provider.tsx
3115
3118
  var import_jsx_runtime6 = require("react/jsx-runtime");
3116
3119
  var ServiceContext = (0, import_react4.createContext)(null);
@@ -5448,6 +5451,35 @@ function useViewService() {
5448
5451
  },
5449
5452
  [env]
5450
5453
  );
5454
+ const createPosConfig = (0, import_react14.useCallback)(
5455
+ ({
5456
+ model,
5457
+ name,
5458
+ modulePosRestaurant,
5459
+ xNode,
5460
+ service
5461
+ }) => {
5462
+ const jsonData = {
5463
+ model,
5464
+ values: {
5465
+ name,
5466
+ module_pos_restaurant: modulePosRestaurant
5467
+ }
5468
+ };
5469
+ return env?.requests.post(
5470
+ "/create" /* CREATE_PATH */,
5471
+ jsonData,
5472
+ {
5473
+ headers: {
5474
+ "Content-Type": "application/json",
5475
+ ...xNode ? { "X-Node": xNode } : {}
5476
+ }
5477
+ },
5478
+ service
5479
+ );
5480
+ },
5481
+ [env]
5482
+ );
5451
5483
  return {
5452
5484
  getView,
5453
5485
  getMenu,
@@ -5481,7 +5513,8 @@ function useViewService() {
5481
5513
  addEntity,
5482
5514
  checkPayment,
5483
5515
  handleCloseSession,
5484
- handleClosingDetailSession
5516
+ handleClosingDetailSession,
5517
+ createPosConfig
5485
5518
  };
5486
5519
  }
5487
5520
  // Annotate the CommonJS export names for ESM import in node:
package/dist/services.mjs CHANGED
@@ -3067,6 +3067,9 @@ import { useMutation as useMutation65 } from "@tanstack/react-query";
3067
3067
  // src/hooks/view/use-handle-closing-detail-session.ts
3068
3068
  import { useMutation as useMutation66 } from "@tanstack/react-query";
3069
3069
 
3070
+ // src/hooks/view/use-create-pos-config.ts
3071
+ import { useMutation as useMutation67 } from "@tanstack/react-query";
3072
+
3070
3073
  // src/provider/service-provider.tsx
3071
3074
  import { jsx as jsx6 } from "react/jsx-runtime";
3072
3075
  var ServiceContext = createContext2(null);
@@ -5404,6 +5407,35 @@ function useViewService() {
5404
5407
  },
5405
5408
  [env]
5406
5409
  );
5410
+ const createPosConfig = useCallback10(
5411
+ ({
5412
+ model,
5413
+ name,
5414
+ modulePosRestaurant,
5415
+ xNode,
5416
+ service
5417
+ }) => {
5418
+ const jsonData = {
5419
+ model,
5420
+ values: {
5421
+ name,
5422
+ module_pos_restaurant: modulePosRestaurant
5423
+ }
5424
+ };
5425
+ return env?.requests.post(
5426
+ "/create" /* CREATE_PATH */,
5427
+ jsonData,
5428
+ {
5429
+ headers: {
5430
+ "Content-Type": "application/json",
5431
+ ...xNode ? { "X-Node": xNode } : {}
5432
+ }
5433
+ },
5434
+ service
5435
+ );
5436
+ },
5437
+ [env]
5438
+ );
5407
5439
  return {
5408
5440
  getView,
5409
5441
  getMenu,
@@ -5437,7 +5469,8 @@ function useViewService() {
5437
5469
  addEntity,
5438
5470
  checkPayment,
5439
5471
  handleCloseSession,
5440
- handleClosingDetailSession
5472
+ handleClosingDetailSession,
5473
+ createPosConfig
5441
5474
  };
5442
5475
  }
5443
5476
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "3.1.5",
3
+ "version": "3.1.7",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",