payroll_manager/front-end/build/cache-loader/c2764ce66829c992313aa22680dd8d85.json

1 line
6.4 KiB
JSON

{"remainingRequest":"/var/www/html/payroll_manager/front-end/node_modules/thread-loader/dist/cjs.js??ref--4-2!/var/www/html/payroll_manager/front-end/node_modules/ts-loader/index.js??ref--4-3!/var/www/html/payroll_manager/front-end/node_modules/tslint-loader/index.js!/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/account/settings/settings.reducer.ts","dependencies":[{"path":"/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/account/settings/settings.reducer.ts","mtime":1533613272057},{"path":"/var/www/html/payroll_manager/front-end/node_modules/react-hot-loader/webpack.js","mtime":1505850161000},{"path":"/var/www/html/payroll_manager/front-end/node_modules/cache-loader/dist/cjs.js","mtime":0},{"path":"/var/www/html/payroll_manager/front-end/node_modules/thread-loader/dist/cjs.js","mtime":0},{"path":"/var/www/html/payroll_manager/front-end/node_modules/ts-loader/index.js","mtime":1530127508000},{"path":"/var/www/html/payroll_manager/front-end/node_modules/tslint-loader/index.js","mtime":1519899048000}],"contextDependencies":[],"result":["var _this = this;\nimport * as tslib_1 from \"tslib\";\nimport axios from 'axios';\nimport { REQUEST, SUCCESS, FAILURE } from 'app/shared/reducers/action-type.util';\nimport { getSession } from 'app/shared/reducers/authentication';\nexport var ACTION_TYPES = {\n UPDATE_ACCOUNT: 'account/UPDATE_ACCOUNT',\n RESET: 'account/RESET'\n};\nvar initialState = {\n loading: false,\n errorMessage: null,\n updateSuccess: false,\n updateFailure: false\n};\n// Reducer\nexport default (function (state, action) {\n if (state === void 0) { state = initialState; }\n switch (action.type) {\n case REQUEST(ACTION_TYPES.UPDATE_ACCOUNT):\n return tslib_1.__assign({}, state, { errorMessage: null, updateSuccess: false, loading: true });\n case FAILURE(ACTION_TYPES.UPDATE_ACCOUNT):\n return tslib_1.__assign({}, state, { loading: false, updateSuccess: false, updateFailure: true });\n case SUCCESS(ACTION_TYPES.UPDATE_ACCOUNT):\n return tslib_1.__assign({}, state, { loading: false, updateSuccess: true, updateFailure: false });\n case ACTION_TYPES.RESET:\n return tslib_1.__assign({}, initialState);\n default:\n return state;\n }\n});\n// Actions\nvar apiUrl = 'api/account';\nexport var saveAccountSettings = function (account) { return function (dispatch) { return tslib_1.__awaiter(_this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, dispatch({\n type: ACTION_TYPES.UPDATE_ACCOUNT,\n payload: axios.post(apiUrl, account),\n meta: {\n successMessage: '<strong>Settings saved!</strong>'\n }\n })];\n case 1:\n _a.sent();\n dispatch(getSession());\n return [2 /*return*/];\n }\n });\n}); }; };\nexport var reset = function () { return ({\n type: ACTION_TYPES.RESET\n}); };\n",{"version":3,"file":"/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/account/settings/settings.reducer.ts","sourceRoot":"","sources":["/var/www/html/payroll_manager/front-end/node_modules/tslint-loader/index.js!/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/account/settings/settings.reducer.ts"],"names":[],"mappings":"AAAA,iBAqEA;;AArEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,MAAM,CAAC,IAAM,YAAY,GAAG;IAC1B,cAAc,EAAE,wBAAwB;IACxC,KAAK,EAAE,eAAe;CACvB,CAAC;AAEF,IAAM,YAAY,GAAG;IACnB,OAAO,EAAE,KAAK;IACd,YAAY,EAAE,IAAI;IAClB,aAAa,EAAE,KAAK;IACpB,aAAa,EAAE,KAAK;CACrB,CAAC;AAIF,UAAU;AACV,gBAAe,UAAC,KAAmC,EAAE,MAAM;IAA3C,sBAAA,EAAA,oBAAmC;IACjD,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC;YACvC,4BACK,KAAK,IACR,YAAY,EAAE,IAAI,EAClB,aAAa,EAAE,KAAK,EACpB,OAAO,EAAE,IAAI,IACb;QACJ,KAAK,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC;YACvC,4BACK,KAAK,IACR,OAAO,EAAE,KAAK,EACd,aAAa,EAAE,KAAK,EACpB,aAAa,EAAE,IAAI,IACnB;QACJ,KAAK,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC;YACvC,4BACK,KAAK,IACR,OAAO,EAAE,KAAK,EACd,aAAa,EAAE,IAAI,EACnB,aAAa,EAAE,KAAK,IACpB;QACJ,KAAK,YAAY,CAAC,KAAK;YACrB,4BACK,YAAY,EACf;QACJ;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC,EAAC;AAEF,UAAU;AACV,IAAM,MAAM,GAAG,aAAa,CAAC;AAE7B,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAA,OAAO,IAAI,OAAA,UAAM,QAAQ;;;oBAC1D,qBAAM,QAAQ,CAAC;oBACb,IAAI,EAAE,YAAY,CAAC,cAAc;oBACjC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC;oBACpC,IAAI,EAAE;wBACJ,cAAc,EAAE,kCAAkC;qBACnD;iBACF,CAAC,EAAA;;gBANF,SAME,CAAC;gBACH,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;;;;KACxB,EAT6C,CAS7C,CAAC;AAEF,MAAM,CAAC,IAAM,KAAK,GAAG,cAAM,OAAA,CAAC;IAC1B,IAAI,EAAE,YAAY,CAAC,KAAK;CACzB,CAAC,EAFyB,CAEzB,CAAC","sourcesContent":["import axios from 'axios';\n\nimport { REQUEST, SUCCESS, FAILURE } from 'app/shared/reducers/action-type.util';\nimport { getSession } from 'app/shared/reducers/authentication';\n\nexport const ACTION_TYPES = {\n UPDATE_ACCOUNT: 'account/UPDATE_ACCOUNT',\n RESET: 'account/RESET'\n};\n\nconst initialState = {\n loading: false,\n errorMessage: null,\n updateSuccess: false,\n updateFailure: false\n};\n\nexport type SettingsState = Readonly<typeof initialState>;\n\n// Reducer\nexport default (state: SettingsState = initialState, action): SettingsState => {\n switch (action.type) {\n case REQUEST(ACTION_TYPES.UPDATE_ACCOUNT):\n return {\n ...state,\n errorMessage: null,\n updateSuccess: false,\n loading: true\n };\n case FAILURE(ACTION_TYPES.UPDATE_ACCOUNT):\n return {\n ...state,\n loading: false,\n updateSuccess: false,\n updateFailure: true\n };\n case SUCCESS(ACTION_TYPES.UPDATE_ACCOUNT):\n return {\n ...state,\n loading: false,\n updateSuccess: true,\n updateFailure: false\n };\n case ACTION_TYPES.RESET:\n return {\n ...initialState\n };\n default:\n return state;\n }\n};\n\n// Actions\nconst apiUrl = 'api/account';\n\nexport const saveAccountSettings = account => async dispatch => {\n await dispatch({\n type: ACTION_TYPES.UPDATE_ACCOUNT,\n payload: axios.post(apiUrl, account),\n meta: {\n successMessage: '<strong>Settings saved!</strong>'\n }\n });\n dispatch(getSession());\n};\n\nexport const reset = () => ({\n type: ACTION_TYPES.RESET\n});\n"]}]}