{"version":3,"sources":["state/actions/food-order/foHistoryActions.ts","state/actions/food-order/foStudentSelectedActions.ts","state/actions/food-order/foCategoryActions.ts","state/actions/food-order/foFoodOrderActions.ts","state/actions/food-order/foSanPhamActions.ts","state/actions/localized-resource/localizedResourceAction.ts","state/actions/actionsWrapper.ts","state/actions/authActions.ts","state/actions/IActionBase.ts","components/loader-page/index.tsx","contexts/LanguageContext.tsx","api/accountApi.ts","models/eReducerBaseStatus.ts","state/action-types/food-order/IFoOrder.ts","state/actions/languageActions.ts","utils/media-query.js","contexts/common.tsx","contexts/navigation.tsx","models/ePageBaseStatus.ts","api/apiClient.ts","api/food-order/foDepositApi.ts","state/action-types/food-order/IFoHistoryActions.ts","state/action-types/IAuthActionTypes.ts","AppInfo.ts","components/loadable/index.tsx","App.tsx","serviceWorker.ts","state/action-types/ICommonActionTypes.ts","state/reducers/food-order/foHistoryReducer.ts","state/reducers/food-order/foStudentSelectedPaymentReducer.ts","state/reducers/food-order/foFoodOrderReducer.ts","state/reducers/food-order/foSanPhamReducer.ts","state/reducers/food-order/foCategoryReducer.ts","state/reducers/authReducer.ts","state/reducers/commonReducer.ts","state/action-types/upload-file/IUploadActionTypes.ts","state/reducers/languageReducer.ts","state/reducers/localized-resource/localizedResourceReducer.ts","state/reducers/upload-file/uploadReducer.ts","state/reducers/index.ts","api/localizedReourceApi.ts","api/apiWrapper.ts","state/sagas/authSaga.ts","state/sagas/localizedResourceSage.ts","api/food-order/foCategoryApi.ts","state/sagas/food-order/foCategorySaga.ts","api/food-order/foSanPhamApi.ts","state/sagas/food-order/foSanPhamSaga.ts","api/food-order/foMenuApi.ts","state/sagas/food-order/foFoodOrderSaga.ts","api/languageApi.ts","state/sagas/languageSaga.ts","api/food-order/foPaymentApi.ts","state/sagas/food-order/foStudentSelectedPaymentSaga.ts","state/sagas/food-order/foHistorySaga.ts","state/sagas/rootSaga.ts","state/store.ts","index.tsx","state/action-types/ILanguageActionTypes.ts","state/action-types/food-order/IFoCategoryActions.ts","api/axiosClient.ts","helpers/toast.ts","state/action-types/food-order/IFoStudentSelectedPaymentActions.ts","state/action-types/food-order/IFoSanPhamActions.ts","state/action-types/localized-resource/ILocalizedResourceActions.ts","api/apiGuestClient.ts","api/food-order/foDonHangApi.ts","models/enum/eLangugae.ts"],"names":["foHistoryActions","loadDepositStart","request","baseAction","eFoHistoryActionIds","LOAD_DEPOSIT_HISTORY_START","loadDepositSuccess","data","LOAD_DEPOSIT_HISTORY_SUCCESS","loadDepositError","message","LOAD_DEPOSIT_HISTORY_ERROR","loadOrderStart","LOAD_ORDER_HISTORY_START","loadOrderSuccess","LOAD_ORDER_HISTORY_SUCCESS","loadOrderError","LOAD_ORDER_HISTORY_ERROR","foStudentSelectedPaymentActions","loadStart","maHs","eFoStudentSelectedPaymentActionIds","LOAD_START","loadSuccess","payment","LOAD_SUCCESS","loadError","LOAD_ERROR","foCategoryActions","eFoCategoryActionTypeIds","undefined","changeSelected","item","CHANGE_SELECTED","foFoodOrderActions","eFoFoodOrderActionTypeIds","setItems","items","SET_SETITEMS","addItemStart","ADD_ITEM_START","addItemSuccess","donHang","ADD_ITEM_SUCCESS","addItemError","ADD_ITEM_ERROR","removeItemStart","REMOVE_ITEM_START","removeItemSuccess","REMOVE_ITEM_SUCCESS","removeItemError","REMOVE_ITEM_ERROR","changeSelectedDate","date","CHANGE_SELECTED_DATE","loadMenuStart","LOAD_MENU_START","loadMenuSuccess","menus","LOAD_MENU_SUCCESS","loadMenuError","LOAD_MENU_ERROR","foSanPhamActions","eFoSanPhamActionTypeIds","localizedResourceAction","lan","eLocalizedResourceActionTypeIds","maps","Map","forEach","e","set","code","value","actions","auth","getUser","type","eAuthActionTypeIds","GET_USER_AUTH","loginStart","LOGIN_START","payload","loginSuccess","LOGIN_SUCCESS","loginError","NotifyHelper","Error","LOGIN_ERROR","logOut","localStorage","removeItem","LOG_OUT","changeStudentSelected","student","CHANGE_STUDENT_SELECTED","language","languageActions","localizedResource","foodOrder","LoaderContent","React","createElement","Fragment","style","height","display","alignItems","width","background","flexDirection","justifyContent","src","alt","borderRadius","LanguageContext","createContext","useLanguageContext","useContext","LanguageProvider","_ref","children","dispatch","useDispatch","useEffect","loadDictionaryStart","_useSelector","useSelector","x","dictionary","status","store","translate","vi","_dictionary$get","eLanguage","EN","has","get","Provider","ePageBaseStatus","is_completed","accountApi","apiClient","post","validateUserName","apiGuestClient","sendLoginOTP","logIn","logInFromTicketKey","key","eReducerBaseStatus","changeLanguage","eLanguageActionTypeIds","CHANGE_LANGUAGE","LOAD_DICTIONARY_START","loadDictionarySuccess","LOAD_DICTIONARY_SUCCESS","loadDictionaryError","error","LOAD_DICTIONARY_ERROR","useScreenSize","_useState","useState","getScreenSize","_useState2","_slicedToArray","screenSize","setScreenSize","onSizeChanged","useCallback","subscribe","unsubscribe","useScreenSizeClass","isLarge","isMedium","isSmall","handlers","xSmallMedia","window","matchMedia","smallMedia","mediumMedia","largeMedia","hugeMedia","media","addListener","matches","handler","push","filter","isXSmall","isHuge","isMobileLayout","CommonContext","useCommonContext","CommonProvider","localized_resources","state","user_info","translateLanguage","createUUID","uuidv4","_localized_resources$","ToastContainer","NavigationContext","useNavigation","NavigationProvider","navigationData","setNavigationData","withNavigationWatcher","Component","props","path","match","currentPath","refreshTokenRequest","getAccessToken","token","Cookies","getRefreshToken","clearAccessToken","clearRefreshToken","setAccessToken","setRefreshToken","checkIsTokenExpired","jwt_decode","exp","parseInt","Math","floor","Date","now","configIfTokenExpired","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","newTokens","new_access_token","new_refresh_token","wrap","_context2","prev","next","Promise","resolve","setTimeout","_callee","res","_context","axiosClient","concat","appInfo","baseApiURL","access_token","refresh_token","sent","is_success","t0","stop","abrupt","split","apply","arguments","_get","_callee3","url","config","_context3","headers","getItem","Authorization","response","status_code","_x","_post","_callee4","_context4","_x2","_x3","put","_put","_callee5","_context5","_x4","_x5","delete","_delete2","_callee6","_context6","_x6","upload","_upload","_callee7","_context7","_x7","_x8","foDepositApi","SelectByHocSinh","maHocSinh","SelectHistory","process","toString","maxdebtValue","orderBeforeDayCount","LazyPage","importFunc","LazyComponent","lazy","pMinDelay","Suspense","fallback","LoaderPage","AuthorizedContent","GuestContent","Content","isCheckTicketDone","setIsCheckTicketDone","history","useHistory","ticketKey","URLSearchParams","useLocation","search","ticketKeyValue","useMemo","console","log","handleLoginFromTicketAsync","studentSelected","students","find","id","student_id_focused","_useSelector2","isLoading","screenSizeClass","Router","className","backgroundImage","backgroundSize","backgroundRepeat","Boolean","location","hostname","eCommonActionTypeIds","iniState","depositHistory","fo_deposites","is_not_initialization","donHangHistory","fo_donhangs","donHangs","sets","menusAll","mergeData","newDonHang","result","donHangOld","sanPhams","categories","initialState","isLogging","eUploadActionTypeIds","dm_truong_selected_id","nam_hoc","hoc_ky","is_show_combobox_namhoc","is_show_combobox_truong","is_show_combobox_hocky","is_show_notify_panel","menu_mode","VI","readExcelResult","uploadExcelResult","uploadImageResult","reducers","combineReducers","length","action","_objectSpread","CLEAR_USER_AUTH","common","HEADER_SHOW_COMBOBOX_TRUONG","HEADER_COMBOBOX_TRUONG_CHANGED","HEADER_CLOSE_COMBOBOX_TRUONG","HEADER_SHOW_COMBOBOX_NAMHOC","HEADER_COMBOBOX_NAMHOC_CHANGED","HEADER_CLOSE_COMBOBOX_NAMHOC","HEADER_SHOW_NOTIFY_PANEL","HEADER_CLOSE_NOTIFY_PANEL","HEADER_SHOW_COMBOBOX_HOCKY","HEADER_COMBOBOX_HOCKY_CHANGED","HEADER_CLOSE_COMBOBOX_HOCKY","CHANGE_MENU_MODE","setItem","uploadFile","UPLOAD_EXCEL_START","is_loading","UPLOAD_EXCEL_SUCCESS","Success","UPLOAD_EXCEL_ERROR","UPLOAD_SVG_START","UPLOAD_SVG_SUCCESS","UPLOAD_SVG_COMPLETE","UPLOAD_SVG_ERROR","UPLOAD_IMAGE_START","UPLOAD_IMAGE_SUCCESS","UPLOAD_IMAGE_COMPLETE","UPLOAD_IMAGE_ERROR","READ_EXCEL_START","READ_EXCEL_SUCCESS","READ_EXCEL_ERROR","_map","en","foCategoryReducer","category_selected","foSanPhamReducer","foFoodOrderReducer","is_saving","selectedDate","foStudentSelectedPaymentReducer","foHistoryReducer","localizedReourceApi","loadAll","apiWrapper","account","authSaga","_marked2","getUserWorker","_marked3","loginStartWorker","takeEvery","_marked","call","localizedSaga","loadWorker","_res$message","foCategoryApi","foCategorySaga","foSanPhamApi","foSanPhamSaga","foMenuApi","fromDate","toDate","foFoodOrderSaga","loadMenuWorker","_marked4","addItemWorker","_marked5","removeItemWorker","foDonHangApi","Select","_res$message2","_res$message3","AddItem","_res$message4","RemoveItem","languageApi","languageSaga","foPaymentApi","foStudentSelectedPaymentSaga","foHistorySaga","loadOrderWorker","loadDepositWorker","takeLatest","rootSaga","all","sagaMiddleware","createSagaMiddleware","createStore","composeWithDevTools","applyMiddleware","run","ReactDOM","render","App","document","getElementById","navigator","serviceWorker","ready","then","registration","unregister","catch","axios","create","interceptors","use","reject","showNotify","toast","hideProgressBar","autoClose","displayTime","position","theme","Warning","Submit","ClearSubmit"],"mappings":"mMAMaA,EAAmB,CAC5BC,iBAAkB,SAACC,GAAuC,OAAKC,YAAWC,IAAoBC,2BAA4BH,IAC1HI,mBAAoB,SAACC,GAA6B,OAAKJ,YAAWC,IAAoBI,6BAA8BD,IACpHE,iBAAkB,SAACC,GAAe,OAAKP,YAAWC,IAAoBO,2BAA4BD,IAElGE,eAAgB,SAACV,GAAuC,OAAKC,YAAWC,IAAoBS,yBAA0BX,IACtHY,iBAAkB,SAACP,GAA6B,OAAKJ,YAAWC,IAAoBW,2BAA4BR,IAChHS,eAAgB,SAACN,GAAe,OAAKP,YAAWC,IAAoBa,yBAA0BP,K,QCRrFQ,EAAkC,CAC3CC,UAAW,SAACC,GAAY,OACpBjB,YAAWkB,IAAmCC,WAAYF,IAC9DG,YAAa,SAACC,GAAoB,OAC9BrB,YAAWkB,IAAmCI,aAAcD,IAChEE,UAAW,SAAChB,GA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4B9I,IAEtDyc,WAAY,SAACzc,GACT,OAAO6I,IAAUC,KAAK,+BAA+B9I,M,gCCvBtD,IAAKqI,EAAZ,kCAGC,SAHWA,KAAS,QAATA,EAAS,QAGpB,CAHWA,MAAS,O","file":"static/js/main.d49e0d0b.chunk.js","sourcesContent":["import { IFoodOrderSelectHistoryRequest } from \"../../../models/request/food-order/IFoodOrderSelectHistoryRequest\";\r\nimport { IFoDepositItemRespone } from \"../../../models/response/food-order/IFoDeposit\";\r\nimport { IFoDonHangItemRespone } from \"../../../models/response/food-order/IFoDonHang\";\r\nimport { eFoHistoryActionIds } from \"../../action-types/food-order/IFoHistoryActions\";\r\nimport { baseAction } from \"../IActionBase\";\r\n\r\nexport const foHistoryActions = {\r\n loadDepositStart: (request: IFoodOrderSelectHistoryRequest) => baseAction(eFoHistoryActionIds.LOAD_DEPOSIT_HISTORY_START, request),\r\n loadDepositSuccess: (data: IFoDepositItemRespone[]) => baseAction(eFoHistoryActionIds.LOAD_DEPOSIT_HISTORY_SUCCESS, data),\r\n loadDepositError: (message: string) => baseAction(eFoHistoryActionIds.LOAD_DEPOSIT_HISTORY_ERROR, message),\r\n\r\n loadOrderStart: (request: IFoodOrderSelectHistoryRequest) => baseAction(eFoHistoryActionIds.LOAD_ORDER_HISTORY_START, request),\r\n loadOrderSuccess: (data: IFoDonHangItemRespone[]) => baseAction(eFoHistoryActionIds.LOAD_ORDER_HISTORY_SUCCESS, data),\r\n loadOrderError: (message: string) => baseAction(eFoHistoryActionIds.LOAD_ORDER_HISTORY_ERROR, message),\r\n}","import { IFoStudentSelectedPaymentLoadSuccess, eFoStudentSelectedPaymentActionIds, IFoStudentSelectedPaymentLoadError } from './../../action-types/food-order/IFoStudentSelectedPaymentActions';\r\nimport { IFoStudentSelectedPaymentLoadStart } from \"../../action-types/food-order/IFoStudentSelectedPaymentActions\";\r\nimport { baseAction } from \"../IActionBase\";\r\nimport { IFoPayment } from '../../../models/response/food-order/IFoPayment';\r\n\r\nexport const foStudentSelectedPaymentActions = {\r\n loadStart: (maHs: string): IFoStudentSelectedPaymentLoadStart =>\r\n baseAction(eFoStudentSelectedPaymentActionIds.LOAD_START, maHs),\r\n loadSuccess: (payment?: IFoPayment): IFoStudentSelectedPaymentLoadSuccess =>\r\n baseAction(eFoStudentSelectedPaymentActionIds.LOAD_SUCCESS, payment),\r\n loadError: (message: string): IFoStudentSelectedPaymentLoadError =>\r\n baseAction(eFoStudentSelectedPaymentActionIds.LOAD_ERROR, message),\r\n}","import { IFoCategory } from \"../../../models/response/food-order/IFoCategory\";\r\nimport { IFoCategoryChangeSelected, IFoCategoryLoadError, IFoCategoryLoadStart, IFoCategoryLoadSuccess, eFoCategoryActionTypeIds } from \"../../action-types/food-order/IFoCategoryActions\";\r\nimport { baseAction } from \"../IActionBase\";\r\n\r\nexport const foCategoryActions = {\r\n loadStart: (): IFoCategoryLoadStart => baseAction(eFoCategoryActionTypeIds.LOAD_START, undefined),\r\n loadSuccess: (data: IFoCategory[]): IFoCategoryLoadSuccess => {\r\n return baseAction(eFoCategoryActionTypeIds.LOAD_SUCCESS, data)\r\n },\r\n loadError: (message: string): IFoCategoryLoadError => baseAction(eFoCategoryActionTypeIds.LOAD_ERROR, message),\r\n\r\n changeSelected: (item?: IFoCategory): IFoCategoryChangeSelected => baseAction(eFoCategoryActionTypeIds.CHANGE_SELECTED, item),\r\n}","import { IFoodOrderAddItemRequest } from \"../../../models/request/food-order/IFoodOrderAddItemRequest\";\r\nimport { IFoodOrderMenuSelectRequest } from \"../../../models/request/food-order/IFoodOrderMenuSelectRequest\";\r\nimport { IFoodOrderSelectOrderRequest } from \"../../../models/request/food-order/IFoodOrderSelectOrderRequest\";\r\nimport { IFoDonHangItemRespone } from \"../../../models/response/food-order/IFoDonHang\";\r\nimport { IFoMenuItemRespone } from \"../../../models/response/food-order/IFoMenu\";\r\nimport { IFoSetItemRespone } from \"../../../models/response/food-order/IIFoSetItemRespone\";\r\nimport { IFoodOrderAddItemError, IFoodOrderAddItemStart, IFoodOrderAddItemSuccess, IFoodOrderChangeSelectedDate, IFoodOrderLoadError, IFoodOrderLoadMenuError, IFoodOrderLoadMenuStart, IFoodOrderLoadMenuSuccess, IFoodOrderLoadStart, IFoodOrderLoadSuccess, IFoodOrderRemoveItemError, IFoodOrderRemoveItemStart, IFoodOrderRemoveItemSuccess, IFoodOrderSetSetItems, eFoFoodOrderActionTypeIds } from \"../../action-types/food-order/IFoOrder\";\r\nimport { baseAction } from \"../IActionBase\";\r\n\r\nexport const foFoodOrderActions = {\r\n loadStart: (request: IFoodOrderSelectOrderRequest): IFoodOrderLoadStart => baseAction(eFoFoodOrderActionTypeIds.LOAD_START, request),\r\n loadSuccess: (data: IFoDonHangItemRespone[]): IFoodOrderLoadSuccess => {\r\n return baseAction(eFoFoodOrderActionTypeIds.LOAD_SUCCESS, data)\r\n },\r\n loadError: (message: string): IFoodOrderLoadError => baseAction(eFoFoodOrderActionTypeIds.LOAD_ERROR, message),\r\n setItems: (items: IFoSetItemRespone[]): IFoodOrderSetSetItems => baseAction(eFoFoodOrderActionTypeIds.SET_SETITEMS, items),\r\n\r\n addItemStart: (request: IFoodOrderAddItemRequest): IFoodOrderAddItemStart => baseAction(eFoFoodOrderActionTypeIds.ADD_ITEM_START, request),\r\n addItemSuccess: (donHang: IFoDonHangItemRespone): IFoodOrderAddItemSuccess => baseAction(eFoFoodOrderActionTypeIds.ADD_ITEM_SUCCESS, donHang),\r\n addItemError: (message: string): IFoodOrderAddItemError => baseAction(eFoFoodOrderActionTypeIds.ADD_ITEM_ERROR, message),\r\n\r\n removeItemStart: (request: IFoodOrderAddItemRequest): IFoodOrderRemoveItemStart => baseAction(eFoFoodOrderActionTypeIds.REMOVE_ITEM_START, request),\r\n removeItemSuccess: (donHang: IFoDonHangItemRespone): IFoodOrderRemoveItemSuccess => baseAction(eFoFoodOrderActionTypeIds.REMOVE_ITEM_SUCCESS, donHang),\r\n removeItemError: (message: string): IFoodOrderRemoveItemError => baseAction(eFoFoodOrderActionTypeIds.REMOVE_ITEM_ERROR, message),\r\n\r\n changeSelectedDate: (date?: Date): IFoodOrderChangeSelectedDate => baseAction(eFoFoodOrderActionTypeIds.CHANGE_SELECTED_DATE, date),\r\n\r\n loadMenuStart: (request: IFoodOrderMenuSelectRequest): IFoodOrderLoadMenuStart => baseAction(eFoFoodOrderActionTypeIds.LOAD_MENU_START, request),\r\n loadMenuSuccess: (menus: IFoMenuItemRespone[]): IFoodOrderLoadMenuSuccess => baseAction(eFoFoodOrderActionTypeIds.LOAD_MENU_SUCCESS, menus),\r\n loadMenuError: (message: string): IFoodOrderLoadMenuError => baseAction(eFoFoodOrderActionTypeIds.LOAD_MENU_ERROR, message),\r\n}","import { IFoSanPham } from \"../../../models/response/food-order/IFoSanPham\";\r\nimport { IFoSanPhamLoadError, IFoSanPhamLoadStart, IFoSanPhamLoadSuccess, eFoSanPhamActionTypeIds } from \"../../action-types/food-order/IFoSanPhamActions\";\r\nimport { baseAction } from \"../IActionBase\";\r\n\r\nexport const foSanPhamActions = {\r\n loadStart: (): IFoSanPhamLoadStart => baseAction(eFoSanPhamActionTypeIds.LOAD_START, undefined),\r\n loadSuccess: (data: IFoSanPham[]): IFoSanPhamLoadSuccess => {\r\n return baseAction(eFoSanPhamActionTypeIds.LOAD_SUCCESS, data)\r\n },\r\n loadError: (message: string): IFoSanPhamLoadError => baseAction(eFoSanPhamActionTypeIds.LOAD_ERROR, message),\r\n}","import { ILocalizedResource } from \"../../../models/response/localized-resource/ILocalizedResource\";\r\nimport { baseAction } from \"../IActionBase\";\r\nimport { eLocalizedResourceActionTypeIds, ILocalizedResourceLoadError, ILocalizedResourceLoadStart, ILocalizedResourceLoadSuccess } from './../../action-types/localized-resource/ILocalizedResourceActions';\r\n\r\nexport const localizedResourceAction = {\r\n loadStart: (lan:string): ILocalizedResourceLoadStart => baseAction(eLocalizedResourceActionTypeIds.LOAD_START, lan),\r\n loadSuccess: (data: ILocalizedResource[]): ILocalizedResourceLoadSuccess => {\r\n let maps = new Map();\r\n data.forEach(e=>{\r\n maps.set(e.code, e.value)\r\n })\r\n return baseAction(eLocalizedResourceActionTypeIds.LOAD_SUCCESS, maps)\r\n },\r\n loadError: (message: string): ILocalizedResourceLoadError => baseAction(eLocalizedResourceActionTypeIds.LOAD_ERROR, message),\r\n}","import { foHistoryActions } from './food-order/foHistoryActions';\r\nimport { foStudentSelectedPaymentActions } from './food-order/foStudentSelectedActions';\r\nimport { foCategoryActions } from './food-order/foCategoryActions';\r\nimport { foFoodOrderActions } from './food-order/foFoodOrderActions';\r\nimport { foSanPhamActions } from './food-order/foSanPhamActions';\r\nimport { languageActions } from './languageActions';\r\nimport { localizedResourceAction } from './localized-resource/localizedResourceAction';\r\n\r\nimport { authActions } from './authActions';\r\n\r\n\r\nexport const actions = {\r\n auth: authActions,\r\n language: languageActions,\r\n localizedResource: localizedResourceAction,\r\n foodOrder: {\r\n foCategoryActions,\r\n foSanPhamActions,\r\n foFoodOrderActions,\r\n foStudentSelectedPaymentActions,\r\n foHistoryActions\r\n }\r\n}\r\n","import { NotifyHelper } from '../../helpers/toast';\r\nimport { IAccountLoginRequest } from \"../../models/request/account/IAccountLoginRequest\";\r\nimport { IUserInfoModel } from \"../../models/response/account/user-info\";\r\nimport { eAuthActionTypeIds, IChangeStudentSelected, IGetUserAuthAction, ILoginErrorAction, ILoginStartAction, ILoginSuccessAction, ILogOutAction } from \"../action-types/IAuthActionTypes\";\r\nimport { IUserStudentModel } from './../../models/response/account/user-info';\r\n\r\nexport const authActions = {\r\n getUser: (): IGetUserAuthAction => {\r\n return {\r\n type: eAuthActionTypeIds.GET_USER_AUTH\r\n }\r\n },\r\n loginStart: (data: IAccountLoginRequest): ILoginStartAction => {\r\n return {\r\n type: eAuthActionTypeIds.LOGIN_START,\r\n payload: data\r\n }\r\n },\r\n loginSuccess: (data: IUserInfoModel): ILoginSuccessAction => {\r\n return {\r\n type: eAuthActionTypeIds.LOGIN_SUCCESS,\r\n payload: data\r\n }\r\n },\r\n loginError: (data?: string): ILoginErrorAction => {\r\n if (data) {\r\n NotifyHelper.Error(data ?? \"\")\r\n }\r\n return {\r\n type: eAuthActionTypeIds.LOGIN_ERROR,\r\n payload: data\r\n }\r\n },\r\n logOut: (): ILogOutAction => {\r\n localStorage.removeItem(\"access_token\")\r\n // clearAccessToken();\r\n // clearRefreshToken();\r\n return {\r\n type: eAuthActionTypeIds.LOG_OUT\r\n }\r\n },\r\n changeStudentSelected: (student: IUserStudentModel): IChangeStudentSelected => {\r\n return {\r\n type: eAuthActionTypeIds.CHANGE_STUDENT_SELECTED,\r\n payload: student\r\n }\r\n }\r\n}\r\n","import { IActionTypeBase } from './../action-types/IActionTypeBase';\r\n\r\nexport function baseAction(type: X, payload: Y): IActionTypeBase {\r\n return {\r\n type: type,\r\n payload: payload\r\n }\r\n}\r\n","import React from 'react'\r\nexport const LoaderContent = () => {\r\n return (\r\n <>\r\n
\r\n \"loader\"\r\n {/*
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
*/}\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default LoaderContent","import React, { createContext, useContext, useEffect } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { eLanguage } from \"../models/enum/eLangugae\";\r\nimport { languageActions } from \"../state/actions/languageActions\";\r\nimport { RootState } from '../state/reducers';\r\nimport { ePageBaseStatus } from \"../models/ePageBaseStatus\";\r\n\r\ntype LanguageContextType = {\r\n children: React.ReactNode\r\n}\r\n\r\ntype LanguageStoreType = {\r\n translate: (vi: string) => string\r\n}\r\n\r\nconst LanguageContext = createContext({} as LanguageStoreType);\r\nconst useLanguageContext = () => useContext(LanguageContext)\r\nconst LanguageProvider = ({ children }: LanguageContextType) => {\r\n const dispatch = useDispatch();\r\n useEffect(() => {\r\n dispatch(languageActions.loadDictionaryStart())\r\n }, [])\r\n const { language, dictionary, status } = useSelector((x: RootState) => x.language)\r\n\r\n //console.log({\r\n // dictionary,\r\n // status\r\n //});\r\n\r\n const store: LanguageStoreType = {\r\n translate: (vi: string): string => {\r\n if (language == eLanguage.EN && dictionary.has(vi)) {\r\n return dictionary.get(vi) ?? vi;\r\n }\r\n return vi;\r\n }\r\n\r\n }\r\n return (\r\n \r\n {/* {children} */}\r\n {status == ePageBaseStatus.is_completed && children}\r\n \r\n );\r\n}\r\nexport {\r\n LanguageProvider,\r\n useLanguageContext\r\n};\r\n\r\n","import { IAccountLoginRequest } from '../models/request/account/IAccountLoginRequest';\r\nimport { IAccountSendOTPLoginRequest } from '../models/request/account/IAccountSendOTPLoginRequest';\r\nimport { IAccountValidateUserNameRequest } from '../models/request/account/IAccountValidateUserNameRequest';\r\nimport { apiClient } from './apiClient';\r\nimport { apiGuestClient } from './apiGuestClient';\r\n\r\nconst accountApi = {\r\n getUser: () => {\r\n return apiClient.post(`account/detail`)\r\n },\r\n validateUserName: (request: IAccountValidateUserNameRequest) => {\r\n return apiGuestClient.post(`account/validate-username`, request);\r\n },\r\n sendLoginOTP: (request: IAccountSendOTPLoginRequest) => {\r\n return apiGuestClient.post(`account/send-login-otp`, request);\r\n },\r\n logIn: (request: IAccountLoginRequest) => {\r\n return apiGuestClient.post(`account/log-in`, request);\r\n },\r\n logInFromTicketKey: (key: string) => {\r\n return apiGuestClient.post(`account/log-in/ticket`, { key });\r\n },\r\n logOut: () => {\r\n return apiClient.post(`account/log-out`)\r\n\r\n }\r\n\r\n}\r\nexport { accountApi };\r\n","export enum eReducerBaseStatus {\r\n is_not_initialization = \"is_not_initialization\",\r\n is_loading = \"is_loading\",\r\n is_completed = \"is_completed\",\r\n is_saving = \"is_saving\",\r\n is_deleting = \"is_deleting\",\r\n is_need_reload = \"is_need_reload\"\r\n}","import { IFoodOrderAddItemRequest } from '../../../models/request/food-order/IFoodOrderAddItemRequest';\r\nimport { IFoodOrderMenuSelectRequest } from '../../../models/request/food-order/IFoodOrderMenuSelectRequest';\r\nimport { IFoodOrderSelectOrderRequest } from '../../../models/request/food-order/IFoodOrderSelectOrderRequest';\r\nimport { IFoDonHangItemRespone } from '../../../models/response/food-order/IFoDonHang';\r\nimport { IFoMenuItemRespone } from '../../../models/response/food-order/IFoMenu';\r\nimport { IFoSetItemRespone } from '../../../models/response/food-order/IIFoSetItemRespone';\r\nimport { IActionTypeBase } from './../IActionTypeBase';\r\nexport enum eFoFoodOrderActionTypeIds {\r\n LOAD_START = \"FO_ORDER_LOAD_START\",\r\n LOAD_SUCCESS = \"FO_ORDER_LOAD_SUCCESS\",\r\n LOAD_ERROR = \"FO_ORDER_LOAD_ERROR\",\r\n\r\n SET_SETITEMS = \"FO_ORDER_SET_SETITEMS\",\r\n\r\n ADD_ITEM_START = \"FO_ORDER_ADD_ITEM_START\",\r\n ADD_ITEM_SUCCESS = \"FO_ORDER_ADD_ITEM_SUCCESS\",\r\n ADD_ITEM_ERROR = \"FO_ORDER_ADD_ITEM_ERROR\",\r\n\r\n REMOVE_ITEM_START = \"FO_ORDER_REMOVE_ITEM_START\",\r\n REMOVE_ITEM_SUCCESS = \"FO_ORDER_REMOVE_ITEM_SUCCESS\",\r\n REMOVE_ITEM_ERROR = \"FO_ORDER_REMOVE_ITEM_ERROR\",\r\n\r\n CHANGE_SELECTED_DATE = \"FO_ORDER_CHANGE_SELECTED_DATE\",\r\n\r\n LOAD_MENU_START = \"FO_ORDER_LOAD_MENU_START\",\r\n LOAD_MENU_SUCCESS = \"FO_ORDER_LOAD_MENU_SUCCESS\",\r\n LOAD_MENU_ERROR = \"FO_ORDER_LOAD_MENU_ERROR\",\r\n\r\n}\r\nexport interface IFoodOrderLoadStart extends IActionTypeBase { }\r\nexport interface IFoodOrderLoadSuccess extends IActionTypeBase { }\r\nexport interface IFoodOrderLoadError extends IActionTypeBase { }\r\n\r\nexport interface IFoodOrderSetSetItems extends IActionTypeBase { }\r\n\r\nexport interface IFoodOrderAddItemStart extends IActionTypeBase { }\r\nexport interface IFoodOrderAddItemSuccess extends IActionTypeBase { }\r\nexport interface IFoodOrderAddItemError extends IActionTypeBase { }\r\n\r\n\r\nexport interface IFoodOrderRemoveItemStart extends IActionTypeBase { }\r\nexport interface IFoodOrderRemoveItemSuccess extends IActionTypeBase { }\r\nexport interface IFoodOrderRemoveItemError extends IActionTypeBase { }\r\n\r\nexport interface IFoodOrderChangeSelectedDate extends IActionTypeBase { }\r\n\r\n\r\nexport interface IFoodOrderLoadMenuStart extends IActionTypeBase { }\r\nexport interface IFoodOrderLoadMenuSuccess extends IActionTypeBase { }\r\nexport interface IFoodOrderLoadMenuError extends IActionTypeBase { }\r\n\r\nexport type IFoodOrderActionTypes = IFoodOrderLoadStart | IFoodOrderLoadSuccess | IFoodOrderLoadError |\r\n IFoodOrderSetSetItems |\r\n IFoodOrderAddItemStart | IFoodOrderAddItemSuccess | IFoodOrderAddItemError |\r\n IFoodOrderRemoveItemStart | IFoodOrderRemoveItemSuccess | IFoodOrderRemoveItemError |\r\n IFoodOrderChangeSelectedDate |\r\n IFoodOrderLoadMenuStart | IFoodOrderLoadMenuSuccess | IFoodOrderLoadMenuError\r\n\r\n","import { eLanguage } from \"../../models/enum/eLangugae\";\r\nimport { ILanguageChangeAction, eLanguageActionTypeIds } from \"../action-types/ILanguageActionTypes\";\r\nimport { baseAction } from \"./IActionBase\";\r\n\r\n\r\nexport const languageActions = {\r\n changeLanguage: (payload: eLanguage): ILanguageChangeAction => baseAction(eLanguageActionTypeIds.CHANGE_LANGUAGE, payload),\r\n loadDictionaryStart: () => baseAction(eLanguageActionTypeIds.LOAD_DICTIONARY_START, undefined),\r\n loadDictionarySuccess: (data: any[]) => baseAction(eLanguageActionTypeIds.LOAD_DICTIONARY_SUCCESS, data),\r\n loadDictionaryError: (error: string) => baseAction(eLanguageActionTypeIds.LOAD_DICTIONARY_ERROR, error),\r\n}","import { useState, useCallback, useEffect } from 'react';\r\n\r\nexport const useScreenSize = () => {\r\n const [screenSize, setScreenSize] = useState(getScreenSize());\r\n const onSizeChanged = useCallback(() => {\r\n setScreenSize(getScreenSize());\r\n }, []);\r\n\r\n useEffect(() => {\r\n subscribe(onSizeChanged);\r\n\r\n return () => {\r\n unsubscribe(onSizeChanged);\r\n };\r\n }, [onSizeChanged]);\r\n\r\n return screenSize;\r\n};\r\n\r\nexport const useScreenSizeClass = () => {\r\n const screenSize = useScreenSize();\r\n\r\n if (screenSize.isLarge) {\r\n return 'screen-large';\r\n }\r\n\r\n if (screenSize.isMedium) {\r\n return 'screen-medium';\r\n }\r\n\r\n if (screenSize.isSmall) {\r\n return 'screen-small';\r\n }\r\n\r\n return 'screen-x-small';\r\n}\r\n\r\nlet handlers = [];\r\nconst xSmallMedia = window.matchMedia('(max-width: 599.99px)');\r\nconst smallMedia = window.matchMedia('(min-width: 600px) and (max-width: 959.99px)');\r\nconst mediumMedia = window.matchMedia('(min-width: 960px) and (max-width: 1279.99px)');\r\nconst largeMedia = window.matchMedia('(min-width: 1280px)');\r\nconst hugeMedia = window.matchMedia('(min-width: 1400px)');\r\n\r\n[xSmallMedia, smallMedia, mediumMedia, largeMedia,hugeMedia].forEach(media => {\r\n media.addListener((e) => {\r\n e.matches && handlers.forEach(handler => handler());\r\n });\r\n});\r\n\r\nconst subscribe = handler => handlers.push(handler);\r\n\r\nconst unsubscribe = handler => {\r\n handlers = handlers.filter(item => item !== handler);\r\n};\r\n\r\nfunction getScreenSize() {\r\n return {\r\n isXSmall: xSmallMedia.matches,\r\n isSmall: smallMedia.matches,\r\n isMedium: mediumMedia.matches,\r\n isLarge: largeMedia.matches,\r\n isHuge: hugeMedia.matches,\r\n isMobileLayout: xSmallMedia.matches || smallMedia.matches\r\n };\r\n};\r\n","import React, { createContext, useContext } from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { ToastContainer } from 'react-toastify';\r\nimport 'react-toastify/dist/ReactToastify.css';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport { appInfo } from \"../AppInfo\";\r\nimport { initialUserInfo } from \"../models/response/account/user-info\";\r\nimport { RootState } from \"../state/reducers\";\r\nimport { useLanguageContext } from \"./LanguageContext\";\r\ntype CommonContextType = {\r\n children: React.ReactNode\r\n}\r\n\r\ntype CommonStoreType = {\r\n createUUID: () => string,\r\n translate: (code: string) => string\r\n}\r\n\r\nconst CommonContext = createContext({} as CommonStoreType);\r\nconst useCommonContext = () => useContext(CommonContext)\r\nconst CommonProvider = ({ children }: CommonContextType) => {\r\n const user = useSelector((state: RootState) => state.auth.user_info) || initialUserInfo\r\n const { localized_resources } = useSelector((x: RootState) => x.localizedResource)\r\n const { translate: translateLanguage } = useLanguageContext();\r\n const store: CommonStoreType = {\r\n\r\n createUUID: () => {\r\n return uuidv4();\r\n },\r\n\r\n translate: (code: string) => {\r\n // if (code == \"MappingFormulaForm.Max.Item.OffsetLabel.HelpText\") {\r\n // return localized_resources.get(code) ?? \"xxx\";\r\n // }\r\n return localized_resources.get(code) ?? translateLanguage(code);\r\n }\r\n\r\n }\r\n return (\r\n \r\n {children}\r\n \r\n \r\n );\r\n}\r\nexport {\r\n CommonProvider,\r\n useCommonContext\r\n};\r\n\r\n","import React, { useState, createContext, useContext, useEffect } from 'react';\r\n\r\nconst NavigationContext = createContext({} as NavigationType);\r\nconst useNavigation = () => useContext(NavigationContext);\r\ntype NavigationProviderProps = {\r\n children: React.ReactNode\r\n}\r\ntype NavigationType = {\r\n navigationData: any,\r\n setNavigationData: any\r\n}\r\n\r\nfunction NavigationProvider({ children }: NavigationProviderProps) {\r\n const [navigationData, setNavigationData] = useState({});\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\n\r\nfunction withNavigationWatcher(Component: any) {\r\n return function (props: any) {\r\n const { path } = props.match;\r\n const { setNavigationData }: NavigationType = useNavigation();\r\n\r\n useEffect(() => {\r\n setNavigationData({ currentPath: path });\r\n }, [path, setNavigationData]);\r\n\r\n return React.createElement(Component, props);\r\n }\r\n}\r\n\r\nexport {\r\n NavigationProvider,\r\n useNavigation,\r\n withNavigationWatcher\r\n}\r\n","export enum ePageBaseStatus {\r\n is_not_initialization = \"is_not_initialization\",\r\n is_loading = \"is_loading\",\r\n is_completed = \"is_completed\",\r\n is_saving = \"is_saving\",\r\n is_deleting = \"is_deleting\",\r\n is_need_reload = \"is_need_reload\"\r\n}","\r\nimport jwt_decode from 'jwt-decode';\r\nimport { appInfo } from '../AppInfo';\r\nimport { IBaseResponeModel } from '../models/response/base-response';\r\nimport { axiosClient } from './axiosClient';\r\nimport Cookies from 'js-cookie';\r\ntype jwt_decodeResult = {\r\n exp: any\r\n}\r\nlet refreshTokenRequest: Promise | null;\r\nexport const getAccessToken = () => {\r\n const token = Cookies.get('access_token');\r\n return token ?? \"\";\r\n}\r\nexport const getRefreshToken = () => {\r\n const token = Cookies.get('refresh_token');\r\n return token ?? undefined;\r\n}\r\nexport const clearAccessToken = () => {\r\n // Cookies.remove('access_token');\r\n}\r\nexport const clearRefreshToken = () => {\r\n // Cookies.remove('refresh_token');\r\n}\r\nexport const setAccessToken = (token: string) => {\r\n // debugger\r\n // Cookies.set('access_token', token, { expires: 30, secure: true });\r\n // const xxx = Cookies.get('access_token');\r\n // console.log({\r\n // xxx\r\n // });\r\n \r\n}\r\nexport const setRefreshToken = (token: string) => {\r\n // debugger\r\n // Cookies.set('refresh_token', token, { expires: 365, secure: true });\r\n}\r\nconst checkIsTokenExpired = (): boolean => {\r\n try {\r\n if (!getAccessToken()) {\r\n return false;\r\n }\r\n const data: jwt_decodeResult = jwt_decode(getAccessToken())\r\n if (getAccessToken() && data) {\r\n const exp = data.exp;\r\n if (parseInt(exp) > Math.floor(Date.now() / 1000)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n } catch (error) {\r\n return true;\r\n }\r\n}\r\n\r\nconst refreshToken = () => {\r\n return new Promise(resolve => {\r\n setTimeout(async () => {\r\n try {\r\n const res: IBaseResponeModel = await axiosClient.post(`${appInfo.baseApiURL}/login/refresh_new_token`, {\r\n access_token: getAccessToken(),\r\n refresh_token: getRefreshToken()\r\n });\r\n\r\n if (res.is_success) {\r\n resolve(res.message)\r\n } else {\r\n resolve(\"\");\r\n }\r\n } catch (error) {\r\n resolve(\"\");\r\n\r\n }\r\n\r\n }, 1000);\r\n });\r\n};\r\nconst configIfTokenExpired = async () => {\r\n const isTokenExpired = checkIsTokenExpired();\r\n if (isTokenExpired) {\r\n refreshTokenRequest = refreshTokenRequest\r\n ? refreshTokenRequest\r\n : refreshToken();\r\n\r\n const newTokens = await refreshTokenRequest;\r\n refreshTokenRequest = null;\r\n if (newTokens == \"\") {\r\n return {\r\n is_success: false,\r\n message: \"Token expired.\"\r\n }\r\n }\r\n const new_access_token = newTokens.split(' ')[0];\r\n const new_refresh_token = newTokens.split(' ')[1];\r\n // localStorage.access_token = new_access_token;\r\n // localStorage.refresh_token = new_refresh_token;\r\n setAccessToken(new_access_token)\r\n setRefreshToken(new_refresh_token)\r\n\r\n }\r\n}\r\nconst apiClient = {\r\n get: async (path: string): Promise => {\r\n const url = `${appInfo.baseApiURL}/${path}`\r\n try {\r\n await configIfTokenExpired();\r\n const config = {\r\n headers: {\r\n language: localStorage.getItem(\"language\"),\r\n Authorization: `Bearer ${getAccessToken()}`,\r\n }\r\n }\r\n const res = await axiosClient.get(url, config);\r\n // const res = await axiosClient.get(url);\r\n return res;\r\n } catch (error: any) {\r\n if (error.response.status == 401) {\r\n return {\r\n status_code: parseInt(error.response.status),\r\n is_success: false,\r\n message: \"Bạn không được phân quyền để thực hiện thao tác này. Vui lòng liên hệ Quản trị viên để được hỗ trợ.\"\r\n }\r\n } else {\r\n return {\r\n status_code: error.response.data.status_code,\r\n is_success: false,\r\n message: error.response.data.message || \"Có lỗi\"\r\n };\r\n }\r\n\r\n }\r\n }\r\n ,\r\n post: async (path: string, data?: any): Promise => {\r\n const url = `${appInfo.baseApiURL}/${path}`\r\n try {\r\n await configIfTokenExpired();\r\n const config = {\r\n headers: {\r\n Authorization: `Bearer ${getAccessToken()}`,\r\n language: localStorage.getItem(\"language\"),\r\n }\r\n }\r\n const res = await axiosClient.post(url, data, config);\r\n // const res = await axiosClient.post(url, data);\r\n return res;\r\n } catch (error: any) {\r\n if (error.response.status == 401) {\r\n return {\r\n status_code: parseInt(error.response.status),\r\n is_success: false,\r\n message: \"Bạn không được phân quyền để thực hiện thao tác này. Vui lòng liên hệ Quản trị viên để được hỗ trợ.\"\r\n }\r\n } else {\r\n return {\r\n status_code: error.response.data.status_code,\r\n is_success: false,\r\n message: error.response.data.message || \"Có lỗi\"\r\n };\r\n }\r\n\r\n }\r\n },\r\n put: async (path: string, data?: any): Promise => {\r\n const url = `${appInfo.baseApiURL}/${path}`\r\n try {\r\n await configIfTokenExpired();\r\n const config = {\r\n headers: {\r\n Authorization: `Bearer ${getAccessToken()}`,\r\n language: localStorage.getItem(\"language\"),\r\n }\r\n }\r\n const res = await axiosClient.put(url, data, config);\r\n // const res = await axiosClient.put(url, data);\r\n return res;\r\n } catch (error: any) {\r\n if (error.response.status == 401) {\r\n return {\r\n status_code: parseInt(error.response.status),\r\n is_success: false,\r\n message: \"Bạn không được phân quyền để thực hiện thao tác này. Vui lòng liên hệ Quản trị viên để được hỗ trợ.\"\r\n }\r\n } else {\r\n return {\r\n status_code: error.response.data.status_code,\r\n is_success: false,\r\n message: error.response.data.message || \"Có lỗi\"\r\n };\r\n }\r\n\r\n }\r\n },\r\n delete: async (path: string): Promise => {\r\n const url = `${appInfo.baseApiURL}/${path}`\r\n try {\r\n await configIfTokenExpired();\r\n const config = {\r\n headers: {\r\n Authorization: `Bearer ${getAccessToken()}`,\r\n language: localStorage.getItem(\"language\"),\r\n }\r\n }\r\n const res = await axiosClient.delete(url, config);\r\n // const res = await axiosClient.delete(url);\r\n return res;\r\n } catch (error: any) {\r\n if (error.response.status == 401) {\r\n return {\r\n status_code: parseInt(error.response.status),\r\n is_success: false,\r\n message: \"Bạn không được phân quyền để thực hiện thao tác này. Vui lòng liên hệ Quản trị viên để được hỗ trợ.\"\r\n }\r\n } else {\r\n return {\r\n status_code: error.response.data.status_code,\r\n is_success: false,\r\n message: error.response.data.message || \"Có lỗi\"\r\n };\r\n }\r\n\r\n }\r\n },\r\n upload: async (path: string, data?: any): Promise => {\r\n const url = `${appInfo.baseApiURL}/${path}`\r\n try {\r\n await configIfTokenExpired();\r\n const config = {\r\n\r\n headers: {\r\n Authorization: `Bearer ${getAccessToken()}`, 'Content-Type': 'multipart/form-data',\r\n language: localStorage.getItem(\"language\"),\r\n }\r\n }\r\n const res = await axiosClient.post(url, data, config);\r\n return res;\r\n } catch (error: any) {\r\n if (error.response.status == 401) {\r\n return {\r\n status_code: parseInt(error.response.status),\r\n is_success: false,\r\n message: \"Bạn không được phân quyền để thực hiện thao tác này. Vui lòng liên hệ Quản trị viên để được hỗ trợ.\"\r\n }\r\n } else {\r\n return {\r\n status_code: error.response.data.status_code,\r\n is_success: false,\r\n message: error.response.data.message || \"Có lỗi\"\r\n };\r\n }\r\n\r\n }\r\n }\r\n}\r\nexport { apiClient };\r\n","import { IFoodOrderSelectHistoryRequest } from \"../../models/request/food-order/IFoodOrderSelectHistoryRequest\";\r\nimport { apiClient } from \"../apiClient\";\r\n\r\nexport const foDepositApi = {\r\n SelectByHocSinh: (maHocSinh: string) => apiClient.get(`deposit/student/${maHocSinh}`),\r\n SelectHistory: (request: IFoodOrderSelectHistoryRequest) => apiClient.post(`deposit/select-history`, request)\r\n}","import { IFoodOrderSelectHistoryRequest } from \"../../../models/request/food-order/IFoodOrderSelectHistoryRequest\";\r\nimport { IFoDepositItemRespone } from \"../../../models/response/food-order/IFoDeposit\";\r\nimport { IFoDonHangItemRespone } from \"../../../models/response/food-order/IFoDonHang\";\r\nimport { IActionTypeBase } from \"../IActionTypeBase\";\r\n\r\nexport enum eFoHistoryActionIds {\r\n LOAD_DEPOSIT_HISTORY_START = \"LOAD_DEPOSIT_HISTORY_START\",\r\n LOAD_DEPOSIT_HISTORY_SUCCESS = \"LOAD_DEPOSIT_HISTORY_SUCCESS\",\r\n LOAD_DEPOSIT_HISTORY_ERROR = \"LOAD_DEPOSIT_HISTORY_ERROR\",\r\n\r\n LOAD_ORDER_HISTORY_START = \"LOAD_ORDER_HISTORY_START\",\r\n LOAD_ORDER_HISTORY_SUCCESS = \"LOAD_ORDER_HISTORY_SUCCESS\",\r\n LOAD_ORDER_HISTORY_ERROR = \"LOAD_ORDER_HISTORY_ERROR\",\r\n}\r\n\r\nexport interface ILoadDepositHistoryStart extends IActionTypeBase { }\r\nexport interface ILoadDepositHistorySuccess extends IActionTypeBase { }\r\nexport interface ILoadDepositHistoryError extends IActionTypeBase { }\r\n\r\nexport interface ILoadOrderHistoryStart extends IActionTypeBase { }\r\nexport interface ILoadOrderHistorySuccess extends IActionTypeBase { }\r\nexport interface ILoadOrderHistoryError extends IActionTypeBase { }\r\n\r\nexport type IFoHistoryActions = ILoadDepositHistoryStart | ILoadDepositHistorySuccess | ILoadDepositHistoryError |\r\n ILoadOrderHistoryStart | ILoadOrderHistorySuccess | ILoadOrderHistoryError","import { actions } from './../actions/actionsWrapper';\r\nimport { IAccountLoginRequest } from \"../../models/request/account/IAccountLoginRequest\"\r\nimport { IUserInfoModel, IUserStudentModel } from \"../../models/response/account/user-info\"\r\nexport enum eAuthActionTypeIds {\r\n GET_USER_AUTH = \"GET_USET_AUTH\",\r\n CLEAR_USER_AUTH = \"CLER_USET_AUTH\",\r\n LOGIN_START = \"LOGIN_START\",\r\n LOGIN_SUCCESS = \"LOGIN_SUCCESS\",\r\n LOGIN_ERROR = \"LOGIN_ERROR\",\r\n LOG_OUT = \"LOG_OUT\",\r\n CHANGE_STUDENT_SELECTED = \"CHANGE_STUDENT_SELECTED\",\r\n}\r\nexport interface IGetUserAuthAction {\r\n type: eAuthActionTypeIds.GET_USER_AUTH,\r\n}\r\n\r\nexport interface IClerUserAuthAction {\r\n type: eAuthActionTypeIds.CLEAR_USER_AUTH\r\n}\r\n\r\nexport interface ILoginStartAction {\r\n type: eAuthActionTypeIds.LOGIN_START,\r\n payload: IAccountLoginRequest\r\n}\r\nexport interface ILoginSuccessAction {\r\n type: eAuthActionTypeIds.LOGIN_SUCCESS,\r\n payload: IUserInfoModel\r\n}\r\nexport interface ILoginErrorAction {\r\n type: eAuthActionTypeIds.LOGIN_ERROR,\r\n payload?: string\r\n}\r\nexport interface ILogOutAction {\r\n type: eAuthActionTypeIds.LOG_OUT,\r\n}\r\n\r\nexport interface IChangeStudentSelected {\r\n type: eAuthActionTypeIds.CHANGE_STUDENT_SELECTED,\r\n payload: IUserStudentModel\r\n}\r\n\r\n\r\nexport type IAuthActionTypes = IGetUserAuthAction | IClerUserAuthAction |\r\n ILoginStartAction | ILoginSuccessAction | ILoginErrorAction |\r\n ILogOutAction | IChangeStudentSelected","// console.log(process.env)\r\n\r\ninterface IAppInfo {\r\n baseApiURL: string,\r\n maxdebtValue: number,\r\n orderBeforeDayCount: number\r\n // homeURL: string,\r\n // importTKBFileUrl: string,\r\n // subSytemId: number,\r\n // versionDataGridStorageKey?: string,\r\n}\r\n\r\nconst appInfo: IAppInfo = {\r\n baseApiURL: process.env.REACT_APP_API_BASE_URL?.toString() || \"\",// 'https://phenikaa-finance.3s.edu.vn/api',\r\n // homeURL: process.env.REACT_APP_PORTAL_URL?.toString() || \"\", //'https://portal.3s.edu.vn',\r\n // importTKBFileUrl: \"https://docs.google.com/spreadsheets/d/1PcwgHeAg96axlc2vAsXFMJyuyDSgk4Iu/edit?usp=sharing&ouid=111169258709356213204&rtpof=true&sd=true\",\r\n // subSytemId: 12,\r\n // versionDataGridStorageKey: process.env.DATA_GRID_STOREGE_VERSION?.toString() || \"\",\r\n maxdebtValue: 1000000,\r\n orderBeforeDayCount: 1\r\n};\r\nexport { appInfo }\r\n\r\n","import pMinDelay from 'p-min-delay';\r\nimport React, { lazy, Suspense } from 'react';\r\nimport LoaderPage from '../loader-page';\r\nexport const Loadable = (importFunc: any, fallback: any) => {\r\n const LazyComponent = lazy(importFunc);\r\n\r\n return (props: any) => (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const LazyPage = (importFunc: any) => {\r\n const LazyComponent = lazy(() => pMinDelay(importFunc, 250));\r\n\r\n return () => (\r\n }>\r\n \r\n \r\n );\r\n}","// import LoadPanel from 'devextreme-react/load-panel';\r\nimport 'devextreme/dist/css/dx.common.css';\r\nimport React, { useEffect, useMemo, useState } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { BrowserRouter as Router, useHistory, useLocation } from 'react-router-dom';\r\nimport 'semantic-ui-css/semantic.min.css';\r\nimport { accountApi } from './api/accountApi';\r\nimport { LazyPage } from './components/loadable';\r\nimport LoaderPage from './components/loader-page';\r\nimport { LanguageProvider } from './contexts/LanguageContext';\r\nimport { CommonProvider } from './contexts/common';\r\nimport { NavigationProvider } from './contexts/navigation';\r\nimport './dx-styles.scss';\r\nimport { actions } from './state/actions/actionsWrapper';\r\nimport { RootState } from './state/reducers';\r\nimport './style.css';\r\nimport './themes/generated/theme.additional.css';\r\nimport './themes/generated/theme.base.css';\r\nimport { useScreenSizeClass } from './utils/media-query';\r\nconst useQuery = () => {\r\n return new URLSearchParams(useLocation().search);\r\n}\r\nconst AuthorizedContent = LazyPage(import('./Content'));\r\nconst GuestContent = LazyPage(import('./GuestContent'));\r\n\r\n// const setJWTToken = (access_token: string, refresh_token: string) => {\r\n// localStorage.access_token = access_token;\r\n// localStorage.refresh_token = refresh_token;\r\n\r\n// }\r\n// const clearJWTToken = () => {\r\n// localStorage.access_token = null;\r\n// localStorage.refresh_token = null;\r\n// }\r\n\r\nconst Content = () => {\r\n const [isCheckTicketDone, setIsCheckTicketDone] = useState(false);\r\n const history = useHistory();\r\n const { user_info } = useSelector((x: RootState) => x.auth)\r\n const query = useQuery();\r\n const ticketKey = query.get('ticket-key') || '';\r\n const dispatch = useDispatch();\r\n const ticketKeyValue = useMemo(() => {\r\n return ticketKey;\r\n }, [ticketKey])\r\n useEffect(() => {\r\n\r\n if (ticketKeyValue) {\r\n console.log({\r\n ticketKeyValue\r\n });\r\n\r\n handleLoginFromTicketAsync(ticketKey)\r\n } else {\r\n setIsCheckTicketDone(true)\r\n }\r\n }, [ticketKeyValue])\r\n const handleLoginFromTicketAsync = async (ticketKey: string) => {\r\n const res = await accountApi.logInFromTicketKey(ticketKey);\r\n if (res.is_success) {\r\n // clearAccessToken();\r\n // clearRefreshToken();\r\n setIsCheckTicketDone(true)\r\n // setAccessToken(res.data.token.access_token);\r\n // setRefreshToken(res.data.token.refresh_token)\r\n dispatch(actions.auth.loginSuccess(res.data.user_info))\r\n const studentSelected = res.data.user_info.students.find((x: any) => x.id == res.data.student_id_focused);\r\n if (studentSelected) {\r\n dispatch(actions.auth.changeStudentSelected(studentSelected))\r\n }\r\n if (res.data.path) {\r\n history.push(`../../${res.data.path}`)\r\n }\r\n }\r\n else {\r\n setIsCheckTicketDone(true)\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n {isCheckTicketDone &&\r\n <>\r\n {user_info && user_info.id > 0 && }\r\n {(!user_info || user_info.id <= 0) && }\r\n \r\n }\r\n {\r\n !isCheckTicketDone &&\r\n \r\n }\r\n\r\n \r\n );\r\n}\r\n\r\nexport default function () {\r\n const { user_info, isLoading } = useSelector((x: RootState) => x.auth)\r\n const { language } = useSelector((x: RootState) => x.language)\r\n const screenSizeClass = useScreenSizeClass();\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n dispatch(actions.auth.getUser())\r\n }, [])\r\n useEffect(() => {\r\n dispatch(actions.localizedResource.loadStart(language))\r\n }, [])\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n {isLoading && }\r\n {!isLoading && <>\r\n \r\n {/* {user_info && user_info.id > 0 && }\r\n {(!user_info || user_info.id <= 0) && } */}\r\n }\r\n\r\n
\r\n {/* */}\r\n
\r\n
\r\n
\r\n
\r\n\r\n );\r\n}\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.0/8 are considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config: any) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl: any, config: any) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl: any, config: any) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl, {\r\n headers: { 'Service-Worker': 'script' },\r\n })\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready\r\n .then(registration => {\r\n registration.unregister();\r\n })\r\n .catch(error => {\r\n console.error(error.message);\r\n });\r\n }\r\n}\r\n","\r\nexport enum eCommonActionTypeIds {\r\n HEADER_SHOW_COMBOBOX_NAMHOC = \"HEADER_COMBOBOX_NAMHOC_SHOW\",\r\n HEADER_CLOSE_COMBOBOX_NAMHOC = \"HEADER_COMBOBOX_NAMHOC_CLOSE\",\r\n HEADER_COMBOBOX_NAMHOC_CHANGED = \"HEADER_COMBOBOX_NAMHOC_CHANGED\",\r\n HEADER_COMBOBOX_TRUONG_CHANGED = \"HEADER_COMBOBOX_TRUONG_CHANGED\",\r\n HEADER_COMBOBOX_HOCKY_CHANGED = \"HEADER_COMBOBOX_HOCKY_CHANGED\",\r\n HEADER_SHOW_COMBOBOX_TRUONG = \"HEADER_COMBOBOX_TRUONG_SHOW\",\r\n HEADER_CLOSE_COMBOBOX_TRUONG = \"HEADER_COMBOBOX_TRUONG_CLOSE\",\r\n HEADER_SHOW_COMBOBOX_HOCKY = \"HEADER_SHOW_COMBOBOX_HOCKY\",\r\n HEADER_CLOSE_COMBOBOX_HOCKY = \"HEADER_CLOSE_COMBOBOX_HOCKY\",\r\n HEADER_SHOW_NOTIFY_PANEL = \"HEADER_SHOW_NOTIFY_PANEL\",\r\n HEADER_CLOSE_NOTIFY_PANEL = \"HEADER_CLOSE_NOTIFY_PANEL\",\r\n\r\n CHANGE_MENU_MODE = \"CHANGE_MENU_MODE\"\r\n}\r\n\r\n\r\n\r\nexport interface IHeaderComboboxNamHocShowAction {\r\n type: eCommonActionTypeIds.HEADER_SHOW_COMBOBOX_NAMHOC,\r\n}\r\nexport interface IHeaderComboboxNamHocChangedAction {\r\n type: eCommonActionTypeIds.HEADER_COMBOBOX_NAMHOC_CHANGED,\r\n payload: string\r\n}\r\nexport interface IHeaderComboboxHocKyChangedAction {\r\n type: eCommonActionTypeIds.HEADER_COMBOBOX_HOCKY_CHANGED,\r\n payload: number\r\n}\r\n\r\nexport interface IHeaderComboboxNamHocCloseAction {\r\n type: eCommonActionTypeIds.HEADER_CLOSE_COMBOBOX_NAMHOC,\r\n}\r\n\r\nexport interface IHeaderComboboxTruongShowAction {\r\n type: eCommonActionTypeIds.HEADER_SHOW_COMBOBOX_TRUONG\r\n}\r\nexport interface IHeaderComboboxHocKyShowAction {\r\n type: eCommonActionTypeIds.HEADER_SHOW_COMBOBOX_HOCKY\r\n}\r\nexport interface IHeaderComboboxTruongChangedAction {\r\n type: eCommonActionTypeIds.HEADER_COMBOBOX_TRUONG_CHANGED,\r\n payload: number\r\n}\r\nexport interface IHeaderComboboxTruongCloseAction {\r\n type: eCommonActionTypeIds.HEADER_CLOSE_COMBOBOX_TRUONG\r\n}\r\nexport interface IHeaderComboboxHocKyCloseAction {\r\n type: eCommonActionTypeIds.HEADER_CLOSE_COMBOBOX_HOCKY\r\n}\r\nexport interface IHeaderShowNofityPanel {\r\n type: eCommonActionTypeIds.HEADER_SHOW_NOTIFY_PANEL\r\n}\r\nexport interface IHeaderCloseNotifyPanel {\r\n type: eCommonActionTypeIds.HEADER_CLOSE_NOTIFY_PANEL\r\n\r\n}\r\nexport interface IChangeMenuMode {\r\n type: eCommonActionTypeIds.CHANGE_MENU_MODE,\r\n payload: \"compact\" | \"full\"\r\n\r\n}\r\n\r\n\r\nexport type ICommonActionTypes =\r\n IHeaderComboboxNamHocShowAction | IHeaderComboboxNamHocChangedAction | IHeaderComboboxNamHocCloseAction |\r\n IHeaderComboboxTruongChangedAction | IHeaderComboboxTruongShowAction | IHeaderComboboxTruongCloseAction |\r\n IHeaderShowNofityPanel | IHeaderCloseNotifyPanel |\r\n IHeaderComboboxHocKyChangedAction | IHeaderComboboxHocKyShowAction | IHeaderComboboxHocKyCloseAction |\r\n IChangeMenuMode","import { eReducerBaseStatus } from \"../../../models/eReducerBaseStatus\";\r\nimport { IFoHistoryActions, eFoHistoryActionIds } from \"../../action-types/food-order/IFoHistoryActions\";\r\nimport { IFoHistoryReducer } from \"../../page-state-model/food-order/IFoHistoryReducer\";\r\nconst iniState: IFoHistoryReducer = {\r\n depositHistory: {\r\n fo_deposites: [],\r\n status: eReducerBaseStatus.is_not_initialization\r\n },\r\n donHangHistory: {\r\n fo_donhangs: [],\r\n status: eReducerBaseStatus.is_not_initialization\r\n }\r\n}\r\nexport const foHistoryReducer = (state: IFoHistoryReducer = iniState, action: IFoHistoryActions): IFoHistoryReducer => {\r\n switch (action.type) {\r\n case eFoHistoryActionIds.LOAD_DEPOSIT_HISTORY_START:\r\n return {\r\n ...state,\r\n depositHistory: {\r\n ...state.depositHistory,\r\n status: eReducerBaseStatus.is_loading,\r\n fo_deposites: []\r\n }\r\n }\r\n case eFoHistoryActionIds.LOAD_DEPOSIT_HISTORY_SUCCESS:\r\n return {\r\n ...state,\r\n depositHistory: {\r\n ...state.depositHistory,\r\n status: eReducerBaseStatus.is_completed,\r\n fo_deposites: action.payload\r\n }\r\n }\r\n case eFoHistoryActionIds.LOAD_DEPOSIT_HISTORY_ERROR:\r\n return {\r\n ...state,\r\n depositHistory: {\r\n ...state.depositHistory,\r\n status: eReducerBaseStatus.is_completed,\r\n fo_deposites: []\r\n }\r\n }\r\n case eFoHistoryActionIds.LOAD_ORDER_HISTORY_START:\r\n return {\r\n ...state,\r\n donHangHistory: {\r\n ...state.donHangHistory,\r\n status: eReducerBaseStatus.is_loading,\r\n fo_donhangs: []\r\n }\r\n }\r\n case eFoHistoryActionIds.LOAD_ORDER_HISTORY_SUCCESS:\r\n return {\r\n ...state,\r\n donHangHistory: {\r\n ...state.donHangHistory,\r\n status: eReducerBaseStatus.is_completed,\r\n fo_donhangs: action.payload\r\n }\r\n }\r\n case eFoHistoryActionIds.LOAD_ORDER_HISTORY_ERROR:\r\n return {\r\n ...state,\r\n donHangHistory: {\r\n ...state.donHangHistory,\r\n status: eReducerBaseStatus.is_completed,\r\n fo_donhangs: []\r\n }\r\n }\r\n\r\n default:\r\n return {\r\n ...state\r\n }\r\n }\r\n}","import { eReducerBaseStatus } from '../../../models/eReducerBaseStatus';\r\nimport { IFoStudentSelectedPaymentActions, eFoStudentSelectedPaymentActionIds } from './../../action-types/food-order/IFoStudentSelectedPaymentActions';\r\nimport { IFoStudentSelectedPaymentReducer } from './../../page-state-model/food-order/IFoStudentSelectedPayment';\r\n\r\nconst iniState: IFoStudentSelectedPaymentReducer = {\r\n status: eReducerBaseStatus.is_not_initialization\r\n}\r\n\r\nexport const foStudentSelectedPaymentReducer = (\r\n state: IFoStudentSelectedPaymentReducer=iniState,\r\n action: IFoStudentSelectedPaymentActions\r\n): IFoStudentSelectedPaymentReducer => {\r\n switch (action.type) {\r\n case eFoStudentSelectedPaymentActionIds.LOAD_START:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_loading\r\n }\r\n case eFoStudentSelectedPaymentActionIds.LOAD_SUCCESS:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed,\r\n payment: action.payload\r\n }\r\n case eFoStudentSelectedPaymentActionIds.LOAD_ERROR:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed,\r\n payment: undefined\r\n }\r\n\r\n default:\r\n return {\r\n ...state\r\n }\r\n }\r\n}","import { eReducerBaseStatus } from '../../../models/eReducerBaseStatus';\r\nimport { IFoDonHangItemRespone } from '../../../models/response/food-order/IFoDonHang';\r\nimport { IFoodOrderActionTypes, eFoFoodOrderActionTypeIds } from '../../action-types/food-order/IFoOrder';\r\nimport { IFoOrderReducer } from '../../page-state-model/food-order/IFoOrderReducer';\r\nconst iniState: IFoOrderReducer = {\r\n donHangs: [],\r\n request: undefined,\r\n status: eReducerBaseStatus.is_not_initialization,\r\n sets: [],\r\n menusAll: []\r\n}\r\nconst mergeData = (donHangs: IFoDonHangItemRespone[], newDonHang: IFoDonHangItemRespone) => {\r\n // debugger\r\n let result: IFoDonHangItemRespone[] = [];\r\n donHangs.forEach(donHangOld => {\r\n if (donHangOld.id == newDonHang.id) {\r\n result.push(newDonHang)\r\n } else {\r\n result.push(donHangOld)\r\n }\r\n })\r\n if (!result.find(x => x.id == newDonHang.id)) {\r\n result.push(newDonHang)\r\n }\r\n // console.log({\r\n // result\r\n // });\r\n\r\n return result;\r\n}\r\nexport const foFoodOrderReducer = (state: IFoOrderReducer = iniState, action: IFoodOrderActionTypes): IFoOrderReducer => {\r\n switch (action.type) {\r\n case eFoFoodOrderActionTypeIds.LOAD_START:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_loading\r\n }\r\n case eFoFoodOrderActionTypeIds.LOAD_SUCCESS:\r\n\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed,\r\n donHangs: action.payload\r\n }\r\n case eFoFoodOrderActionTypeIds.LOAD_ERROR:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed\r\n }\r\n case eFoFoodOrderActionTypeIds.SET_SETITEMS:\r\n return {\r\n ...state,\r\n sets: action.payload\r\n }\r\n case eFoFoodOrderActionTypeIds.ADD_ITEM_START:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_saving\r\n }\r\n case eFoFoodOrderActionTypeIds.ADD_ITEM_SUCCESS:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed,\r\n donHangs: mergeData(state.donHangs, action.payload)\r\n\r\n }\r\n case eFoFoodOrderActionTypeIds.ADD_ITEM_ERROR:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed\r\n }\r\n case eFoFoodOrderActionTypeIds.REMOVE_ITEM_START:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_saving\r\n }\r\n case eFoFoodOrderActionTypeIds.REMOVE_ITEM_SUCCESS:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed,\r\n donHangs: mergeData(state.donHangs, action.payload)\r\n\r\n }\r\n case eFoFoodOrderActionTypeIds.REMOVE_ITEM_ERROR:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed\r\n }\r\n\r\n case eFoFoodOrderActionTypeIds.CHANGE_SELECTED_DATE:\r\n return {\r\n ...state,\r\n selectedDate: action.payload\r\n }\r\n case eFoFoodOrderActionTypeIds.LOAD_MENU_START:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_loading\r\n }\r\n case eFoFoodOrderActionTypeIds.LOAD_MENU_SUCCESS:\r\n\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed,\r\n menusAll: action.payload\r\n }\r\n case eFoFoodOrderActionTypeIds.LOAD_MENU_ERROR:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed\r\n }\r\n default:\r\n return { ...state }\r\n }\r\n}","import { eReducerBaseStatus } from '../../../models/eReducerBaseStatus';\r\nimport { IFoSanPhamActionTypes, eFoSanPhamActionTypeIds } from '../../action-types/food-order/IFoSanPhamActions';\r\nimport { IFoSanPhamReducer } from '../../page-state-model/food-order/IFoSanPhamReducer';\r\nconst iniState: IFoSanPhamReducer = {\r\n sanPhams: [],\r\n status: eReducerBaseStatus.is_not_initialization\r\n}\r\nexport const foSanPhamReducer = (state: IFoSanPhamReducer = iniState, action: IFoSanPhamActionTypes): IFoSanPhamReducer => {\r\n switch (action.type) {\r\n case eFoSanPhamActionTypeIds.LOAD_START:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_loading\r\n }\r\n case eFoSanPhamActionTypeIds.LOAD_SUCCESS:\r\n\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed,\r\n sanPhams: action.payload\r\n }\r\n case eFoSanPhamActionTypeIds.LOAD_ERROR:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed\r\n }\r\n\r\n default:\r\n return { ...state }\r\n }\r\n}","import { eReducerBaseStatus } from '../../../models/eReducerBaseStatus';\r\nimport { eFoCategoryActionTypeIds, IFoCategoryActionTypes } from '../../action-types/food-order/IFoCategoryActions';\r\nimport { IFoCategoryReducer } from '../../page-state-model/food-order/IFoCategoryReducer';\r\nconst iniState: IFoCategoryReducer = {\r\n categories: [],\r\n status: eReducerBaseStatus.is_not_initialization\r\n}\r\nexport const foCategoryReducer = (state: IFoCategoryReducer = iniState, action: IFoCategoryActionTypes): IFoCategoryReducer => {\r\n switch (action.type) {\r\n case eFoCategoryActionTypeIds.LOAD_START:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_loading\r\n }\r\n case eFoCategoryActionTypeIds.LOAD_SUCCESS:\r\n\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed,\r\n categories: action.payload\r\n }\r\n case eFoCategoryActionTypeIds.LOAD_ERROR:\r\n return {\r\n ...state,\r\n status: eReducerBaseStatus.is_completed\r\n }\r\n case eFoCategoryActionTypeIds.CHANGE_SELECTED:\r\n return {\r\n ...state,\r\n category_selected: action.payload\r\n }\r\n\r\n default:\r\n return { ...state }\r\n }\r\n}","import { IUserInfoModel, IUserStudentModel } from \"../../models/response/account/user-info\";\r\nimport { IAuthActionTypes, eAuthActionTypeIds } from \"../action-types/IAuthActionTypes\";\r\nexport interface IAuthState {\r\n isLoading: boolean,\r\n isLogging: boolean,\r\n user_info?: IUserInfoModel,\r\n message?: string,\r\n studentSelected?: IUserStudentModel\r\n\r\n}\r\nconst initialState: IAuthState = {\r\n isLoading: false,\r\n isLogging: false\r\n // user_info: sampleUser\r\n}\r\nconst authReducer = (state: IAuthState = initialState, action: IAuthActionTypes): IAuthState => {\r\n switch (action.type) {\r\n case eAuthActionTypeIds.GET_USER_AUTH:\r\n return {\r\n ...state,\r\n isLoading: true\r\n }\r\n case eAuthActionTypeIds.CLEAR_USER_AUTH:\r\n return initialState\r\n case eAuthActionTypeIds.LOGIN_START:\r\n return {\r\n ...state,\r\n isLogging: true,\r\n message: undefined\r\n }\r\n case eAuthActionTypeIds.LOGIN_SUCCESS:\r\n return {\r\n ...state,\r\n isLoading: false,\r\n isLogging: false,\r\n message: undefined,\r\n user_info: {\r\n ...action.payload,\r\n },\r\n studentSelected: action.payload.students.length > 0 ? action.payload.students[0] : undefined\r\n }\r\n case eAuthActionTypeIds.LOGIN_ERROR:\r\n return {\r\n ...state,\r\n isLoading: false,\r\n isLogging: false,\r\n message: action.payload\r\n\r\n }\r\n case eAuthActionTypeIds.CHANGE_STUDENT_SELECTED:\r\n return {\r\n ...state,\r\n studentSelected: action.payload\r\n\r\n }\r\n default:\r\n return state;\r\n }\r\n}\r\nexport { authReducer };\r\n\r\n","import { eCommonActionTypeIds, ICommonActionTypes } from \"../action-types/ICommonActionTypes\";\r\n\r\nexport interface CommonState {\r\n dm_truong_selected_id: number,\r\n nam_hoc: string,\r\n hoc_ky: number,\r\n is_show_combobox_truong: boolean,\r\n is_show_combobox_namhoc: boolean,\r\n is_show_combobox_hocky: boolean,\r\n is_show_notify_panel: boolean,\r\n menu_mode: \"compact\" | \"full\"\r\n}\r\nconst initialState: CommonState = {\r\n dm_truong_selected_id: localStorage.dm_truong_selected_id ? parseInt(localStorage.dm_truong_selected_id) : 0,\r\n nam_hoc: localStorage.nam_hoc ? localStorage.nam_hoc : \"\",\r\n hoc_ky: localStorage.hoc_ky ? parseInt(localStorage.hoc_ky) : 0,\r\n is_show_combobox_namhoc: false,\r\n is_show_combobox_truong: false,\r\n is_show_combobox_hocky: false,\r\n is_show_notify_panel: false,\r\n menu_mode: localStorage.getItem(\"memu_mode\") == \"compact\" ? \"compact\" : \"full\"\r\n}\r\nconst commonReducer = (state: CommonState = initialState, action: ICommonActionTypes): CommonState => {\r\n switch (action.type) {\r\n case eCommonActionTypeIds.HEADER_SHOW_COMBOBOX_TRUONG:\r\n return {\r\n ...state,\r\n is_show_combobox_truong: true\r\n }\r\n case eCommonActionTypeIds.HEADER_COMBOBOX_TRUONG_CHANGED:\r\n localStorage.dm_truong_selected_id = action.payload;\r\n return {\r\n ...state,\r\n dm_truong_selected_id: action.payload,\r\n }\r\n case eCommonActionTypeIds.HEADER_CLOSE_COMBOBOX_TRUONG:\r\n return {\r\n ...state,\r\n is_show_combobox_truong: false\r\n }\r\n case eCommonActionTypeIds.HEADER_SHOW_COMBOBOX_NAMHOC:\r\n return {\r\n ...state,\r\n is_show_combobox_namhoc: true\r\n }\r\n case eCommonActionTypeIds.HEADER_COMBOBOX_NAMHOC_CHANGED:\r\n localStorage.nam_hoc = action.payload;\r\n return {\r\n ...state,\r\n nam_hoc: action.payload\r\n }\r\n case eCommonActionTypeIds.HEADER_CLOSE_COMBOBOX_NAMHOC:\r\n return {\r\n ...state,\r\n is_show_combobox_namhoc: false\r\n }\r\n case eCommonActionTypeIds.HEADER_SHOW_NOTIFY_PANEL:\r\n return {\r\n ...state,\r\n is_show_notify_panel: true\r\n }\r\n case eCommonActionTypeIds.HEADER_CLOSE_NOTIFY_PANEL:\r\n return {\r\n ...state,\r\n is_show_notify_panel: false\r\n }\r\n case eCommonActionTypeIds.HEADER_SHOW_COMBOBOX_HOCKY:\r\n return {\r\n ...state,\r\n is_show_combobox_hocky: true\r\n }\r\n case eCommonActionTypeIds.HEADER_COMBOBOX_HOCKY_CHANGED:\r\n localStorage.hoc_ky = action.payload;\r\n return {\r\n ...state,\r\n hoc_ky: action.payload\r\n }\r\n case eCommonActionTypeIds.HEADER_CLOSE_COMBOBOX_HOCKY:\r\n return {\r\n ...state,\r\n is_show_combobox_hocky: false\r\n }\r\n case eCommonActionTypeIds.CHANGE_MENU_MODE:\r\n localStorage.setItem(\"memu_mode\",action.payload)\r\n return {\r\n ...state,\r\n menu_mode: action.payload\r\n }\r\n default:\r\n return state;\r\n }\r\n}\r\nexport { commonReducer };\r\n\r\n","import { IReadUploadedExcelFileRequest } from \"../../../models/request/upload-file/IReadUploadedExcelFileRequest\"\r\nimport { IReadExcelResult } from \"../../../models/response/upload-file/IReadExcelResult\"\r\nimport { IUploadExcelResult } from \"../../../models/response/upload-file/IUploadExcelResult\"\r\nimport { IUploadImageResult } from \"../../../models/response/upload-file/IUploadImageResult\"\r\n\r\nexport enum eUploadActionTypeIds {\r\n UPLOAD_IMAGE_START = \"UPLOAD_IMAGE_START\",\r\n UPLOAD_IMAGE_SUCCESS = \"UPLOAD_IMAGE_SUCCESS\",\r\n UPLOAD_IMAGE_ERROR = \"UPLOAD_IMAGE_ERROR\",\r\n UPLOAD_IMAGE_COMPLETE = \"UPLOAD_IMAGE_COMPLETE\",\r\n\r\n UPLOAD_SVG_START = \"UPLOAD_SVG_START\",\r\n UPLOAD_SVG_SUCCESS = \"UPLOAD_SVG_SUCCESS\",\r\n UPLOAD_SVG_ERROR = \"UPLOAD_SVG_ERROR\",\r\n UPLOAD_SVG_COMPLETE = \"UPLOAD_SVG_COMPLETE\",\r\n\r\n UPLOAD_EXCEL_START = \"UPLOAD_EXCEL_START\",\r\n UPLOAD_EXCEL_SUCCESS = \"UPLOAD_EXCEL_SUCCESS\",\r\n UPLOAD_EXCEL_ERROR = \"UPLOAD_EXCEL_ERROR\",\r\n\r\n READ_EXCEL_START = \"READ_EXCEL_START\",\r\n READ_EXCEL_SUCCESS = \"READ_EXCEL_SUCCESS\",\r\n READ_EXCEL_ERROR = \"READ_EXCEL_ERROR\",\r\n}\r\n\r\nexport interface IUploadExcelStartAction {\r\n type: eUploadActionTypeIds.UPLOAD_EXCEL_START,\r\n payload: File\r\n}\r\nexport interface IUploadExcelSuccessAction {\r\n type: eUploadActionTypeIds.UPLOAD_EXCEL_SUCCESS,\r\n payload: IUploadExcelResult\r\n}\r\nexport interface IUploadExcelErrorAction {\r\n type: eUploadActionTypeIds.UPLOAD_EXCEL_ERROR,\r\n payload: string\r\n}\r\n\r\nexport interface IUploadSvgStartAction {\r\n type: eUploadActionTypeIds.UPLOAD_SVG_START,\r\n payload: File\r\n}\r\nexport interface IUploadSvgSuccessAction {\r\n type: eUploadActionTypeIds.UPLOAD_SVG_SUCCESS,\r\n payload?: IUploadImageResult\r\n}\r\nexport interface IUploadSvgErrorAction {\r\n type: eUploadActionTypeIds.UPLOAD_SVG_ERROR,\r\n payload: string\r\n}\r\n\r\nexport interface IUploadSvgCompleteAction {\r\n type: eUploadActionTypeIds.UPLOAD_SVG_COMPLETE,\r\n}\r\n\r\nexport interface IUploadImageStartAction {\r\n type: eUploadActionTypeIds.UPLOAD_IMAGE_START,\r\n payload: File\r\n}\r\nexport interface IUploadImageSuccessAction {\r\n type: eUploadActionTypeIds.UPLOAD_IMAGE_SUCCESS,\r\n payload?: IUploadImageResult\r\n}\r\nexport interface IUploadImageErrorAction {\r\n type: eUploadActionTypeIds.UPLOAD_IMAGE_ERROR,\r\n payload: string\r\n}\r\n\r\nexport interface IUploadImageCompleteAction {\r\n type: eUploadActionTypeIds.UPLOAD_IMAGE_COMPLETE,\r\n}\r\n\r\n\r\nexport interface IReadExcelStartAction {\r\n type: eUploadActionTypeIds.READ_EXCEL_START,\r\n payload: IReadUploadedExcelFileRequest\r\n}\r\nexport interface IReadExcelSuccessAction {\r\n type: eUploadActionTypeIds.READ_EXCEL_SUCCESS,\r\n payload: IReadExcelResult\r\n}\r\nexport interface IReadExcelErrorAction {\r\n type: eUploadActionTypeIds.READ_EXCEL_ERROR,\r\n payload: string\r\n}\r\n\r\nexport type IUploadActionTypes = IUploadExcelStartAction | IUploadExcelSuccessAction | IUploadExcelErrorAction | \r\nIUploadSvgStartAction | IUploadSvgSuccessAction | IUploadSvgErrorAction | IUploadSvgCompleteAction |\r\nIUploadImageStartAction | IUploadImageSuccessAction | IUploadImageErrorAction | IUploadImageCompleteAction |\r\nIReadExcelStartAction | IReadExcelSuccessAction | IReadExcelErrorAction;","\r\nimport { ePageBaseStatus } from '../../models/ePageBaseStatus';\r\nimport { eLanguage } from '../../models/enum/eLangugae';\r\nimport { eLanguageActionTypeIds, ILanguageActionTypes } from '../action-types/ILanguageActionTypes';\r\nimport { ILanguageReducerModel } from '../page-state-model/ILanguageReducerModel';\r\nconst iniState: ILanguageReducerModel = {\r\n status: ePageBaseStatus.is_not_initialization,\r\n language: (localStorage.getItem(\"language\") && localStorage.getItem(\"language\") === \"vi\") ? eLanguage.VI : eLanguage.EN,\r\n dictionary: new Map()\r\n}\r\nexport const languageReducer = (state: ILanguageReducerModel = iniState, action: ILanguageActionTypes): ILanguageReducerModel => {\r\n switch (action.type) {\r\n case eLanguageActionTypeIds.CHANGE_LANGUAGE:\r\n localStorage.setItem(\"language\", action.payload)\r\n return {\r\n ...state,\r\n language: action.payload\r\n }\r\n case eLanguageActionTypeIds.LOAD_DICTIONARY_START:\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_loading\r\n }\r\n case eLanguageActionTypeIds.LOAD_DICTIONARY_SUCCESS:\r\n let _map = new Map();\r\n action.payload.forEach(item => {\r\n _map.set(item.vi, item.en);\r\n })\r\n // console.log({_map});\r\n\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_completed,\r\n dictionary: _map\r\n }\r\n case eLanguageActionTypeIds.LOAD_DICTIONARY_ERROR:\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_completed,\r\n error: action.payload\r\n }\r\n default:\r\n return {\r\n ...state\r\n }\r\n }\r\n}","import { ILocalizedResourceReducer } from '../../page-state-model/localized-resource/ILocalizeResourceReducer';\r\nimport { ePageBaseStatus } from './../../../models/ePageBaseStatus';\r\nimport { eLocalizedResourceActionTypeIds, ILocalizedResourceActionTypes } from './../../action-types/localized-resource/ILocalizedResourceActions';\r\nconst iniState: ILocalizedResourceReducer = {\r\n localized_resources: new Map(),\r\n status: ePageBaseStatus.is_not_initialization\r\n}\r\nexport const localizedResourceReducer = (state: ILocalizedResourceReducer=iniState, action: ILocalizedResourceActionTypes): ILocalizedResourceReducer => {\r\n switch (action.type) {\r\n case eLocalizedResourceActionTypeIds.LOAD_START:\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_loading\r\n }\r\n case eLocalizedResourceActionTypeIds.LOAD_SUCCESS:\r\n // console.log({\r\n // localized_resources: action.payload\r\n // });\r\n \r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_completed,\r\n localized_resources: action.payload\r\n }\r\n case eLocalizedResourceActionTypeIds.LOAD_ERROR:\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_completed\r\n }\r\n\r\n default:\r\n return { ...state }\r\n }\r\n}","import { NotifyHelper } from \"../../../helpers/toast\"\r\nimport { ePageBaseStatus } from \"../../../models/ePageBaseStatus\"\r\nimport { eUploadActionTypeIds, IUploadActionTypes } from \"../../action-types/upload-file/IUploadActionTypes\"\r\nimport { IUploadResultState } from \"../../page-state-model/upload-file/IUploadResultState\"\r\n\r\nconst initialState: IUploadResultState = {\r\n status: ePageBaseStatus.is_not_initialization,\r\n readExcelResult: undefined,\r\n uploadExcelResult: undefined,\r\n uploadImageResult: undefined\r\n}\r\nconst uploadReducer = (state: IUploadResultState = initialState, action: IUploadActionTypes): IUploadResultState => {\r\n switch (action.type) {\r\n case eUploadActionTypeIds.UPLOAD_EXCEL_START:\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_loading,\r\n }\r\n case eUploadActionTypeIds.UPLOAD_EXCEL_SUCCESS:\r\n NotifyHelper.Success(\"Upload thành công.\")\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_completed,\r\n uploadExcelResult: action.payload\r\n }\r\n case eUploadActionTypeIds.UPLOAD_EXCEL_ERROR:\r\n NotifyHelper.Error(action.payload)\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_completed,\r\n }\r\n case eUploadActionTypeIds.UPLOAD_SVG_START:\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_loading,\r\n }\r\n case eUploadActionTypeIds.UPLOAD_SVG_SUCCESS:\r\n NotifyHelper.Success(\"Upload thành công.\")\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_completed,\r\n uploadImageResult: action.payload\r\n }\r\n case eUploadActionTypeIds.UPLOAD_SVG_COMPLETE:\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_not_initialization,\r\n uploadImageResult: undefined\r\n }\r\n case eUploadActionTypeIds.UPLOAD_SVG_ERROR:\r\n NotifyHelper.Error(action.payload)\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_completed,\r\n }\r\n case eUploadActionTypeIds.UPLOAD_IMAGE_START:\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_loading,\r\n }\r\n case eUploadActionTypeIds.UPLOAD_IMAGE_SUCCESS:\r\n NotifyHelper.Success(\"Upload ảnh thành công.\")\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_completed,\r\n uploadImageResult: action.payload\r\n }\r\n case eUploadActionTypeIds.UPLOAD_IMAGE_COMPLETE:\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_not_initialization,\r\n uploadImageResult: undefined\r\n }\r\n case eUploadActionTypeIds.UPLOAD_IMAGE_ERROR:\r\n NotifyHelper.Error(action.payload)\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_completed,\r\n }\r\n case eUploadActionTypeIds.READ_EXCEL_START:\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_loading,\r\n }\r\n case eUploadActionTypeIds.READ_EXCEL_SUCCESS:\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_completed,\r\n readExcelResult: action.payload\r\n }\r\n case eUploadActionTypeIds.READ_EXCEL_ERROR:\r\n NotifyHelper.Error(action.payload)\r\n return {\r\n ...state,\r\n status: ePageBaseStatus.is_completed,\r\n }\r\n default:\r\n return state;\r\n }\r\n}\r\nexport { uploadReducer }","import { foHistoryReducer } from './food-order/foHistoryReducer';\r\nimport { foStudentSelectedPaymentReducer } from './food-order/foStudentSelectedPaymentReducer';\r\nimport { foFoodOrderReducer } from './food-order/foFoodOrderReducer';\r\nimport { foSanPhamReducer } from './food-order/foSanPhamReducer';\r\nimport { foCategoryReducer } from './food-order/foCategoryReducer';\r\nimport { combineReducers } from \"redux\";\r\nimport { authReducer } from \"./authReducer\";\r\nimport { commonReducer } from \"./commonReducer\";\r\nimport { languageReducer } from './languageReducer';\r\nimport { localizedResourceReducer } from './localized-resource/localizedResourceReducer';\r\nimport { uploadReducer } from './upload-file/uploadReducer';\r\n\r\nconst reducers = combineReducers({\r\n auth: authReducer,\r\n common: commonReducer,\r\n uploadFile: uploadReducer,\r\n localizedResource: localizedResourceReducer,\r\n language: languageReducer,\r\n foCategoryReducer,\r\n foSanPhamReducer,\r\n foFoodOrderReducer,\r\n foStudentSelectedPaymentReducer,\r\n foHistoryReducer\r\n})\r\n\r\nexport default reducers\r\n\r\nexport type RootState = ReturnType","import { apiGuestClient } from \"./apiGuestClient\"\r\n\r\nexport const localizedReourceApi = {\r\n loadAll: (lan:string) => {\r\n return apiGuestClient.get(`localized-resource/${lan}`)\r\n }\r\n}","import { accountApi } from \"./accountApi\";\r\nimport { localizedReourceApi } from './localizedReourceApi';\r\n\r\n\r\nexport const apiWrapper = {\r\n account: accountApi,\r\n localizedResource: localizedReourceApi,\r\n}","import { call, put, takeEvery } from \"redux-saga/effects\";\r\nimport { apiWrapper } from \"../../api/apiWrapper\";\r\nimport { initialUserInfo } from \"../../models/response/account/user-info\";\r\nimport { IBaseResponeModel } from \"../../models/response/base-response\";\r\nimport { ILoginStartAction, eAuthActionTypeIds } from \"../action-types/IAuthActionTypes\";\r\nimport { actions } from './../actions/actionsWrapper';\r\nimport { ILoginRespone } from \"../../models/response/account/login-response\";\r\nimport { clearAccessToken, clearRefreshToken, setAccessToken, setRefreshToken } from \"../../api/apiClient\";\r\n\r\n\r\nfunction* authSaga(): any {\r\n yield takeEvery(eAuthActionTypeIds.GET_USER_AUTH, getUserWorker)\r\n yield takeEvery(eAuthActionTypeIds.LOGIN_START, loginStartWorker)\r\n\r\n}\r\n\r\nfunction* getUserWorker() {\r\n try {\r\n const res: IBaseResponeModel = yield call(apiWrapper.account.getUser);\r\n if (res.is_success) {\r\n yield put(actions.auth.loginSuccess(res.data))\r\n } else {\r\n yield put(actions.auth.loginError())\r\n }\r\n } catch (error) {\r\n yield put(actions.auth.loginError())\r\n }\r\n}\r\nconst setJWTToken = (access_token: string, refresh_token: string) => {\r\n setAccessToken(access_token);\r\n setRefreshToken(refresh_token)\r\n // localStorage.access_token = access_token;\r\n // localStorage.refresh_token = refresh_token;\r\n\r\n}\r\nconst clearJWTToken = () => {\r\n clearRefreshToken();\r\n clearAccessToken();\r\n localStorage.access_token = null;\r\n localStorage.refresh_token = null;\r\n}\r\n\r\n//workers\r\nfunction* loginStartWorker(data: ILoginStartAction): any {\r\n const result: ILoginRespone = yield call(apiWrapper.account.logIn, data.payload)\r\n // debugger\r\n // const result = res.data as ILoginRespone;\r\n if (result.is_success && result.data && result.data.user_info) {\r\n setJWTToken(result.data.token.access_token, result.data.token.refresh_token);\r\n yield put(actions.auth.loginSuccess(result.data.user_info))\r\n // yield put(actions.auth.setUser(result.data.user_info))\r\n return true;\r\n } else {\r\n yield put(actions.auth.loginError(result.message || \"Đăng nhập thất bại\"))\r\n clearJWTToken();\r\n\r\n }\r\n return false;\r\n\r\n}\r\n\r\n\r\nexport { authSaga, setJWTToken, clearJWTToken };\r\n\r\n","import { call, put, takeEvery } from \"redux-saga/effects\";\r\nimport { apiWrapper } from \"../../api/apiWrapper\";\r\nimport { IBaseResponeModel } from \"../../models/response/base-response\";\r\nimport { ILocalizedResourceLoadStart, eLocalizedResourceActionTypeIds } from \"../action-types/localized-resource/ILocalizedResourceActions\";\r\nimport { actions } from './../actions/actionsWrapper';\r\n\r\n\r\nexport default function* localizedSaga(): any {\r\n yield takeEvery(eLocalizedResourceActionTypeIds.LOAD_START, loadWorker)\r\n}\r\n\r\nfunction* loadWorker(action: ILocalizedResourceLoadStart) {\r\n try {\r\n const res: IBaseResponeModel = yield call(apiWrapper.localizedResource.loadAll, action.payload);\r\n if (res.is_success) {\r\n yield put(actions.localizedResource.loadSuccess(res.data))\r\n } else {\r\n yield put(actions.localizedResource.loadError(res.message ?? \"\"))\r\n }\r\n } catch (error) {\r\n yield put(actions.localizedResource.loadError(\"\"))\r\n }\r\n}","import { apiClient } from \"../apiClient\"\r\n\r\nexport const foCategoryApi = {\r\n SelectAll: () => {\r\n return apiClient.get('food-order/category');\r\n }\r\n}","import { call, put, takeEvery } from \"redux-saga/effects\";\r\nimport { foCategoryApi } from \"../../../api/food-order/foCategoryApi\";\r\nimport { IBaseResponeModel } from \"../../../models/response/base-response\";\r\nimport { eFoCategoryActionTypeIds } from \"../../action-types/food-order/IFoCategoryActions\";\r\nimport { actions } from \"../../actions/actionsWrapper\";\r\n\r\n\r\nexport default function* foCategorySaga(): any {\r\n yield takeEvery(eFoCategoryActionTypeIds.LOAD_START, loadWorker)\r\n}\r\n\r\nfunction* loadWorker() {\r\n try {\r\n const res: IBaseResponeModel = yield call(foCategoryApi.SelectAll);\r\n if (res.is_success) {\r\n yield put(actions.foodOrder.foCategoryActions.loadSuccess(res.data))\r\n } else {\r\n yield put(actions.foodOrder.foCategoryActions.loadError(res.message ?? \"\"))\r\n }\r\n } catch (error) {\r\n yield put(actions.foodOrder.foCategoryActions.loadError(\"\"))\r\n }\r\n}","import { apiClient } from \"../apiClient\"\r\n\r\nexport const foSanPhamApi = {\r\n SelectAll: () => {\r\n return apiClient.get(`food-order/product`)\r\n }\r\n}","import { call, put, takeEvery } from \"redux-saga/effects\";\r\nimport { foSanPhamApi } from \"../../../api/food-order/foSanPhamApi\";\r\nimport { IBaseResponeModel } from \"../../../models/response/base-response\";\r\nimport { eFoSanPhamActionTypeIds } from \"../../action-types/food-order/IFoSanPhamActions\";\r\nimport { actions } from \"../../actions/actionsWrapper\";\r\n\r\n\r\nexport default function* foSanPhamSaga(): any {\r\n yield takeEvery(eFoSanPhamActionTypeIds.LOAD_START, loadWorker)\r\n}\r\n\r\nfunction* loadWorker() {\r\n try {\r\n const res: IBaseResponeModel = yield call(foSanPhamApi.SelectAll);\r\n if (res.is_success) {\r\n yield put(actions.foodOrder.foSanPhamActions.loadSuccess(res.data))\r\n } else {\r\n yield put(actions.foodOrder.foSanPhamActions.loadError(res.message ?? \"\"))\r\n }\r\n } catch (error) {\r\n yield put(actions.foodOrder.foSanPhamActions.loadError(\"\"))\r\n }\r\n}","import moment from \"moment\"\r\nimport { apiClient } from \"../apiClient\"\r\nimport { IFoodOrderMenuSelectRequest } from \"../../models/request/food-order/IFoodOrderMenuSelectRequest\"\r\n\r\nexport const foMenuApi = {\r\n \r\n Select: (request:IFoodOrderMenuSelectRequest) => {\r\n return apiClient.get(`food-order/menu?fromDate=${request.fromDate}&toDate=${request.toDate}`)\r\n }\r\n}","import { call, put, takeEvery } from \"redux-saga/effects\";\r\nimport { foDonHangApi } from \"../../../api/food-order/foDonHangApi\";\r\nimport { IBaseResponeModel } from \"../../../models/response/base-response\";\r\nimport { IFoodOrderLoadStart, eFoFoodOrderActionTypeIds } from \"../../action-types/food-order/IFoOrder\";\r\nimport { actions } from \"../../actions/actionsWrapper\";\r\nimport { IFoodOrderAddItemStart, IFoodOrderLoadMenuStart, IFoodOrderRemoveItemStart } from './../../action-types/food-order/IFoOrder';\r\nimport { foMenuApi } from \"../../../api/food-order/foMenuApi\";\r\nimport { log } from \"console\";\r\n\r\n\r\nexport default function* foFoodOrderSaga(): any {\r\n yield takeEvery(eFoFoodOrderActionTypeIds.LOAD_START, loadWorker)\r\n yield takeEvery(eFoFoodOrderActionTypeIds.ADD_ITEM_START, addItemWorker)\r\n yield takeEvery(eFoFoodOrderActionTypeIds.REMOVE_ITEM_START, removeItemWorker)\r\n yield takeEvery(eFoFoodOrderActionTypeIds.LOAD_MENU_START, loadMenuWorker)\r\n}\r\n\r\nfunction* loadWorker(action: IFoodOrderLoadStart) {\r\n try {\r\n const res: IBaseResponeModel = yield call(foDonHangApi.Select, action.payload);\r\n if (res.is_success) {\r\n yield put(actions.foodOrder.foFoodOrderActions.loadSuccess(res.data))\r\n } else {\r\n yield put(actions.foodOrder.foFoodOrderActions.loadError(res.message ?? \"\"))\r\n }\r\n } catch (error) {\r\n yield put(actions.foodOrder.foSanPhamActions.loadError(\"\"))\r\n }\r\n}\r\n\r\nfunction* loadMenuWorker(action: IFoodOrderLoadMenuStart) {\r\n try {\r\n const res: IBaseResponeModel = yield call(foMenuApi.Select, action.payload);\r\n if (res.is_success) {\r\n \r\n yield put(actions.foodOrder.foFoodOrderActions.loadMenuSuccess(res.data))\r\n } else {\r\n yield put(actions.foodOrder.foFoodOrderActions.loadMenuError(res.message ?? \"\"))\r\n }\r\n } catch (error) {\r\n yield put(actions.foodOrder.foFoodOrderActions.loadMenuError(\"\"))\r\n }\r\n}\r\n\r\nfunction* addItemWorker(action: IFoodOrderAddItemStart) {\r\n try {\r\n const res: IBaseResponeModel = yield call(foDonHangApi.AddItem, action.payload);\r\n if (res.is_success) {\r\n yield put(actions.foodOrder.foFoodOrderActions.addItemSuccess(res.data))\r\n } else {\r\n yield put(actions.foodOrder.foFoodOrderActions.addItemError(res.message ?? \"\"))\r\n }\r\n } catch (error) {\r\n yield put(actions.foodOrder.foFoodOrderActions.addItemError(\"\"))\r\n }\r\n}\r\n\r\nfunction* removeItemWorker(action: IFoodOrderRemoveItemStart) {\r\n try {\r\n const res: IBaseResponeModel = yield call(foDonHangApi.RemoveItem, action.payload);\r\n if (res.is_success) {\r\n yield put(actions.foodOrder.foFoodOrderActions.removeItemSuccess(res.data))\r\n } else {\r\n yield put(actions.foodOrder.foFoodOrderActions.removeItemError(res.message ?? \"\"))\r\n }\r\n } catch (error) {\r\n yield put(actions.foodOrder.foFoodOrderActions.removeItemError(\"\"))\r\n }\r\n}","import { apiGuestClient } from \"./apiGuestClient\"\r\n\r\nexport const languageApi = {\r\n loadAll: () => {\r\n return apiGuestClient.get(`dictionary`)\r\n }\r\n}","import { call, put, takeEvery } from \"redux-saga/effects\";\r\nimport { languageApi } from \"../../api/languageApi\";\r\nimport { IBaseResponeModel } from \"../../models/response/base-response\";\r\nimport { ILanguageLoadDictionaryStart, eLanguageActionTypeIds } from \"../action-types/ILanguageActionTypes\";\r\nimport { actions } from '../actions/actionsWrapper';\r\n\r\n\r\nexport default function* languageSaga(): any {\r\n yield takeEvery(eLanguageActionTypeIds.LOAD_DICTIONARY_START, loadWorker)\r\n}\r\n\r\nfunction* loadWorker(action: ILanguageLoadDictionaryStart) {\r\n try {\r\n const res: IBaseResponeModel = yield call(languageApi.loadAll);\r\n if (res.is_success) {\r\n yield put(actions.language.loadDictionarySuccess(res.data))\r\n } else {\r\n yield put(actions.language.loadDictionaryError(res.message ?? \"\"))\r\n }\r\n } catch (error) {\r\n yield put(actions.language.loadDictionaryError(\"\"))\r\n }\r\n}","import { apiClient } from \"../apiClient\";\r\n\r\nexport const foPaymentApi = {\r\n SelectByHocSinh: (maHocSinh: string) => apiClient.get(`payment/student/${maHocSinh}`)\r\n}","import { call, put, takeEvery } from \"redux-saga/effects\";\r\nimport { IFoStudentSelectedPaymentLoadStart, eFoStudentSelectedPaymentActionIds } from \"../../action-types/food-order/IFoStudentSelectedPaymentActions\";\r\nimport { foPaymentApi } from \"../../../api/food-order/foPaymentApi\";\r\nimport { IBaseResponeModel } from \"../../../models/response/base-response\";\r\nimport { actions } from \"../../actions/actionsWrapper\";\r\n\r\nexport default function* foStudentSelectedPaymentSaga(): any {\r\n yield takeEvery(eFoStudentSelectedPaymentActionIds.LOAD_START, loadWorker);\r\n}\r\nfunction* loadWorker(action: IFoStudentSelectedPaymentLoadStart) {\r\n const res: IBaseResponeModel = yield call(foPaymentApi.SelectByHocSinh, action.payload)\r\n if (res.is_success) {\r\n yield put(actions.foodOrder.foStudentSelectedPaymentActions.loadSuccess(res.data))\r\n } else {\r\n yield put(actions.foodOrder.foStudentSelectedPaymentActions.loadError(res.message ?? \"\"))\r\n }\r\n}","import { call, put, takeLatest } from \"redux-saga/effects\";\r\nimport { ILoadDepositHistoryStart, ILoadOrderHistoryStart, eFoHistoryActionIds } from \"../../action-types/food-order/IFoHistoryActions\";\r\nimport { foDonHangApi } from \"../../../api/food-order/foDonHangApi\";\r\nimport { IBaseResponeModel } from \"../../../models/response/base-response\";\r\nimport { actions } from \"../../actions/actionsWrapper\";\r\nimport { foDepositApi } from \"../../../api/food-order/foDepositApi\";\r\n\r\nexport default function* foHistorySaga() {\r\n yield takeLatest(eFoHistoryActionIds.LOAD_ORDER_HISTORY_START, loadOrderWorker)\r\n yield takeLatest(eFoHistoryActionIds.LOAD_DEPOSIT_HISTORY_START, loadDepositWorker)\r\n}\r\n\r\nfunction* loadOrderWorker(action: ILoadOrderHistoryStart) {\r\n const res: IBaseResponeModel = yield call(foDonHangApi.SelectHistory, action.payload)\r\n if (res.is_success) {\r\n yield put(actions.foodOrder.foHistoryActions.loadOrderSuccess(res.data))\r\n } else {\r\n yield put(actions.foodOrder.foHistoryActions.loadOrderError(res.message ?? \"\"))\r\n\r\n }\r\n}\r\n\r\nfunction* loadDepositWorker(action: ILoadDepositHistoryStart) {\r\n const res: IBaseResponeModel = yield call(foDepositApi.SelectHistory, action.payload)\r\n if (res.is_success) {\r\n yield put(actions.foodOrder.foHistoryActions.loadDepositSuccess(res.data))\r\n } else {\r\n yield put(actions.foodOrder.foHistoryActions.loadDepositError(res.message ?? \"\"))\r\n\r\n }\r\n}","import { all } from \"redux-saga/effects\"\r\nimport { authSaga } from \"./authSaga\"\r\nimport localizedSaga from \"./localizedResourceSage\"\r\nimport foCategorySaga from \"./food-order/foCategorySaga\"\r\nimport foSanPhamSaga from \"./food-order/foSanPhamSaga\"\r\nimport foFoodOrderSaga from \"./food-order/foFoodOrderSaga\"\r\nimport languageSaga from \"./languageSaga\"\r\nimport foStudentSelectedPaymentSaga from \"./food-order/foStudentSelectedPaymentSaga\"\r\nimport foHistorySaga from \"./food-order/foHistorySaga\"\r\nexport default function* rootSaga() {\r\n yield all([\r\n authSaga(),\r\n localizedSaga(),\r\n languageSaga(),\r\n //\r\n foCategorySaga(),\r\n foSanPhamSaga(),\r\n foFoodOrderSaga(),\r\n //\r\n foStudentSelectedPaymentSaga(),\r\n foHistorySaga()\r\n ])\r\n\r\n\r\n}\r\n","import { applyMiddleware, createStore } from \"@reduxjs/toolkit\";\r\nimport { composeWithDevTools } from 'redux-devtools-extension';\r\nimport createSagaMiddleware from \"redux-saga\";\r\nimport reducers from \"./reducers\";\r\nimport rootSaga from \"./sagas/rootSaga\";\r\nconst sagaMiddleware = createSagaMiddleware()\r\nexport const store = createStore(\r\n reducers,\r\n composeWithDevTools(applyMiddleware(sagaMiddleware))\r\n);\r\nsagaMiddleware.run(rootSaga)","import './polyfills';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport './index.css';\r\nimport './data-grid.css';\r\nimport './pop-up.css';\r\nimport './dropdown-button.css';\r\nimport './text-editor.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport { Provider } from \"react-redux\"\r\nimport { store } from \"./state/store\"\r\nimport 'semantic-ui-css/semantic.min.css'\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n","import { eLanguage } from \"../../models/enum/eLangugae\"\r\n\r\n\r\nexport enum eLanguageActionTypeIds {\r\n CHANGE_LANGUAGE = \"CHANGE_LANGUAGE\",\r\n LOAD_DICTIONARY_START = \"LOAD_DICTIONARY_START\",\r\n LOAD_DICTIONARY_SUCCESS = \"LOAD_DICTIONARY_SUCCESS\",\r\n LOAD_DICTIONARY_ERROR = \"LOAD_DICTIONARY_ERROR\",\r\n}\r\nexport interface ILanguageChangeAction {\r\n type: eLanguageActionTypeIds.CHANGE_LANGUAGE,\r\n payload: eLanguage\r\n}\r\nexport interface ILanguageLoadDictionaryStart {\r\n type: eLanguageActionTypeIds.LOAD_DICTIONARY_START\r\n}\r\nexport interface ILanguageLoadDictionarySuccess {\r\n type: eLanguageActionTypeIds.LOAD_DICTIONARY_SUCCESS,\r\n payload: any[]\r\n}\r\nexport interface ILanguageLoadDictionaryError {\r\n type: eLanguageActionTypeIds.LOAD_DICTIONARY_ERROR,\r\n payload: string\r\n}\r\nexport type ILanguageActionTypes = ILanguageChangeAction | ILanguageLoadDictionaryStart | ILanguageLoadDictionarySuccess | ILanguageLoadDictionaryError","import { IFoCategory } from '../../../models/response/food-order/IFoCategory';\r\nimport { IActionTypeBase } from './../IActionTypeBase';\r\nexport enum eFoCategoryActionTypeIds {\r\n LOAD_START = \"FO_CATEGORY_LOAD_START\",\r\n LOAD_SUCCESS = \"FO_CATEGORY_LOAD_SUCCESS\",\r\n LOAD_ERROR = \"FO_CATEGORY_LOAD_ERROR\",\r\n\r\n CHANGE_SELECTED = \"FO_CATEGORY_CHANGE_SELECTED\"\r\n}\r\nexport interface IFoCategoryLoadStart extends IActionTypeBase { }\r\nexport interface IFoCategoryLoadSuccess extends IActionTypeBase { }\r\nexport interface IFoCategoryLoadError extends IActionTypeBase { }\r\n\r\nexport interface IFoCategoryChangeSelected extends IActionTypeBase { }\r\n\r\nexport type IFoCategoryActionTypes = IFoCategoryLoadStart | IFoCategoryLoadSuccess | IFoCategoryLoadError\r\n | IFoCategoryChangeSelected\r\n","import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';\r\n\r\nconst axiosClient = axios.create({\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n})\r\n// Add a request interceptor\r\naxiosClient.interceptors.request.use(function (config: AxiosRequestConfig) {\r\n return config;\r\n}, function (error) {\r\n return Promise.reject(error);\r\n});\r\n\r\n// Add a response interceptor\r\naxiosClient.interceptors.response.use(function (response: AxiosResponse) {\r\n return response.data;\r\n}, function (error) {\r\n return Promise.reject(error);\r\n});\r\n\r\nexport { axiosClient }","import { toast } from 'react-toastify';\r\ntype NotifyInputType = {\r\n message: string,\r\n type: \"info\" | \"warning\" | \"success\" | \"error\" | \"default\",\r\n displayTime?: number\r\n\r\n}\r\n\r\nexport const showNotify = (props: NotifyInputType) => {\r\n toast(props.message, {\r\n type: props.type,\r\n hideProgressBar: true,\r\n autoClose: props.displayTime || 3000,\r\n position: \"bottom-center\",\r\n theme: \"colored\"\r\n })\r\n}\r\n\r\nexport const NotifyHelper = {\r\n Success: (message: string) => showNotify({ message: message, type: \"success\" }),\r\n Error: (message: string) => showNotify({ message: message, type: \"error\" }),\r\n Warning: (message: string) => showNotify({ message: message, type: \"warning\" })\r\n}","import { IFoPayment } from \"../../../models/response/food-order/IFoPayment\";\r\nimport { IActionTypeBase } from \"../IActionTypeBase\";\r\n\r\nexport enum eFoStudentSelectedPaymentActionIds {\r\n LOAD_START = \"FO_STUDENT_PAYMENT_LOAD_START\",\r\n LOAD_SUCCESS = \"FO_STUDENT_PAYMENT_LOAD_SUCCESS\",\r\n LOAD_ERROR = \"FO_STUDENT_PAYMENT_LOAD_ERROR\",\r\n}\r\nexport interface IFoStudentSelectedPaymentLoadStart extends IActionTypeBase { }\r\nexport interface IFoStudentSelectedPaymentLoadSuccess extends IActionTypeBase { }\r\nexport interface IFoStudentSelectedPaymentLoadError extends IActionTypeBase { }\r\n\r\nexport type IFoStudentSelectedPaymentActions = IFoStudentSelectedPaymentLoadStart\r\n | IFoStudentSelectedPaymentLoadSuccess\r\n | IFoStudentSelectedPaymentLoadError","import { IFoSanPham } from '../../../models/response/food-order/IFoSanPham';\r\nimport { IActionTypeBase } from '../IActionTypeBase';\r\nexport enum eFoSanPhamActionTypeIds {\r\n LOAD_START = \"FO_SANPHAM_LOAD_START\",\r\n LOAD_SUCCESS = \"FO_SANPHAM_LOAD_SUCCESS\",\r\n LOAD_ERROR = \"FO_SANPHAM_LOAD_ERROR\",\r\n}\r\nexport interface IFoSanPhamLoadStart extends IActionTypeBase { }\r\nexport interface IFoSanPhamLoadSuccess extends IActionTypeBase { }\r\nexport interface IFoSanPhamLoadError extends IActionTypeBase { }\r\n\r\nexport type IFoSanPhamActionTypes = IFoSanPhamLoadStart | IFoSanPhamLoadSuccess | IFoSanPhamLoadError\r\n","import { IActionTypeBase } from './../IActionTypeBase';\r\nexport enum eLocalizedResourceActionTypeIds {\r\n LOAD_START = \"LOCALIZED_RESOURCE_LOAD_START\",\r\n LOAD_SUCCESS = \"LOCALIZED_RESOURCE_LOAD_SUCCESS\",\r\n LOAD_ERROR = \"LOCALIZED_RESOURCE_LOAD_ERROR\",\r\n}\r\nexport interface ILocalizedResourceLoadStart extends IActionTypeBase { }\r\nexport interface ILocalizedResourceLoadSuccess extends IActionTypeBase> { }\r\nexport interface ILocalizedResourceLoadError extends IActionTypeBase { }\r\n\r\nexport type ILocalizedResourceActionTypes = ILocalizedResourceLoadStart | ILocalizedResourceLoadSuccess | ILocalizedResourceLoadError\r\n","import { appInfo } from \"../AppInfo\";\r\nimport { IBaseResponeModel } from \"../models/response/base-response\";\r\nimport { axiosClient } from \"./axiosClient\";\r\n\r\nexport const apiGuestClient = {\r\n get: async (path: string): Promise => {\r\n const url = `${appInfo.baseApiURL}/${path}`\r\n try {\r\n const config = {\r\n headers: {\r\n language: localStorage.getItem(\"language\"),\r\n Authorization: `Bearer ${localStorage.access_token}`,\r\n }\r\n }\r\n const res = await axiosClient.get(url, config);\r\n return res;\r\n } catch (error: any) {\r\n return {\r\n status_code: error.response.data.status_code,\r\n is_success: false,\r\n message: error.response.data.message || \"Có lỗi\"\r\n };\r\n\r\n }\r\n }\r\n ,\r\n post: async (path: string, data?: any): Promise => {\r\n const url = `${appInfo.baseApiURL}/${path}`\r\n try {\r\n const config = {\r\n headers: {\r\n Authorization: `Bearer ${localStorage.access_token}`,\r\n language: localStorage.getItem(\"language\"),\r\n }\r\n }\r\n const res = await axiosClient.post(url, data, config);\r\n return res;\r\n } catch (error: any) {\r\n return {\r\n status_code: error.response.data.status_code,\r\n is_success: false,\r\n message: error.response.data.message || \"Có lỗi\"\r\n };\r\n\r\n }\r\n },\r\n put: async (path: string, data?: any): Promise => {\r\n const url = `${appInfo.baseApiURL}/${path}`\r\n try {\r\n const config = {\r\n\r\n headers: {\r\n Authorization: `Bearer ${localStorage.access_token}`,\r\n language: localStorage.getItem(\"language\"),\r\n }\r\n }\r\n const res = await axiosClient.put(url, data, config);\r\n return res;\r\n } catch (error: any) {\r\n return {\r\n status_code: error.response.data.status_code,\r\n is_success: false,\r\n message: error.response.data.message || \"Có lỗi\"\r\n };\r\n }\r\n },\r\n delete: async (path: string): Promise => {\r\n const url = `${appInfo.baseApiURL}/${path}`\r\n try {\r\n const config = {\r\n headers: {\r\n Authorization: `Bearer ${localStorage.access_token}`,\r\n language: localStorage.getItem(\"language\"),\r\n }\r\n }\r\n const res = await axiosClient.delete(url, config);\r\n return res;\r\n } catch (error: any) {\r\n return {\r\n status_code: error.response.data.status_code,\r\n is_success: false,\r\n message: error.response.data.message || \"Có lỗi\"\r\n };\r\n\r\n }\r\n },\r\n}","import { IFoodOrderAddItemRequest } from './../../models/request/food-order/IFoodOrderAddItemRequest';\r\nimport { IFoodOrderSelectOrderRequest } from \"../../models/request/food-order/IFoodOrderSelectOrderRequest\"\r\nimport { apiClient } from \"../apiClient\"\r\nimport { IFoodOrderSelectHistoryRequest } from '../../models/request/food-order/IFoodOrderSelectHistoryRequest';\r\n\r\nexport const foDonHangApi = {\r\n Select: (request: IFoodOrderSelectOrderRequest) => {\r\n return apiClient.post(`food-order/order/select`,request)\r\n },\r\n SelectHistory: (request: IFoodOrderSelectHistoryRequest) => {\r\n return apiClient.post(`food-order/order/select-history`,request)\r\n },\r\n \r\n Submit: (request: IFoodOrderSelectOrderRequest) => {\r\n return apiClient.post(`food-order/order/submit`,request)\r\n },\r\n ClearSubmit: (request: IFoodOrderSelectOrderRequest) => {\r\n return apiClient.post(`food-order/order/edit`,request)\r\n },\r\n AddItem: (request: IFoodOrderAddItemRequest) => {\r\n return apiClient.post(`food-order/order/add-item`,request)\r\n },\r\n RemoveItem: (request: IFoodOrderAddItemRequest) => {\r\n return apiClient.post(`food-order/order/remove-item`,request)\r\n }\r\n}","export enum eLanguage {\r\n VI = \"vi\",\r\n EN = \"en\"\r\n}"],"sourceRoot":""}