{"version":3,"sources":["webpack:///./src/pages/root/components/utilities/UpdateUniqueIdModal.vue?3b8d","webpack:///./src/pages/root/components/utilities/UpdateUniqueIdModal.vue?5832","webpack:///./src/pages/root/components/utilities/UpdateUniqueIdModal.vue","webpack:///src/pages/root/components/utilities/UpdateUniqueIdModal.vue"],"names":["component","_vm","this","_h","$createElement","_c","_self","ref","attrs","companyName","staticClass","_v","staticStyle","on","fileSelected","directives","name","rawName","value","expression","domProps","$event","target","composing","fileName","uploadFile","closeModal","options","__file","title","message","result","msg"],"mappings":"kHAAA,ICA0Y,E,UAAG,E,YCOzYA,EAAY,YACd,GFRW,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,WAAW,CAACE,IAAI,kBAAkBC,MAAM,CAAC,MAAQ,yBAA2BP,EAAIQ,YAAY,aAAa,aAAa,CAACJ,EAAG,MAAM,CAACK,YAAY,OAAO,CAACL,EAAG,MAAM,CAACK,YAAY,wBAAwB,CAACL,EAAG,MAAM,CAACK,YAAY,uBAAuB,CAACT,EAAIU,GAAG,sEAAsEV,EAAIU,GAAG,KAAKN,EAAG,IAAI,CAACK,YAAY,cAAc,CAACT,EAAIU,GAAG,gNAAgNN,EAAG,IAAI,CAACA,EAAG,QAAQ,CAACK,YAAY,iBAAiB,CAACT,EAAIU,GAAG,4DAA4DN,EAAG,MAAM,CAACK,YAAY,cAAcF,MAAM,CAAC,GAAK,2BAA2B,CAACH,EAAG,QAAQ,CAACK,YAAY,mBAAmB,CAACL,EAAG,OAAO,CAACK,YAAY,+BAA+BE,YAAY,CAAC,mBAAmB,MAAM,sBAAsB,OAAOJ,MAAM,CAAC,MAAQ,gEAAgE,CAACP,EAAIU,GAAG,sCAAsCN,EAAG,QAAQ,CAACE,IAAI,WAAWK,YAAY,CAAC,QAAU,QAAQJ,MAAM,CAAC,KAAO,QAAQK,GAAG,CAAC,OAASZ,EAAIa,oBAAoBb,E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,KAAN,YACM,KAAN,2BAEI,aA9CJ,SA8CA,GACM,KAAN,iBACM,IAAN,oBAEA,IACQ,KAAR,cACQ,KAAR,gBAGA,UAFA,0DAGU,EAAV,QACY,MAAZ,QACY,QAAZ,sCACA,iCACU,KAAV,mB","file":"js/vue-modals204.b70f043c.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ac-modal',{ref:\"uniqueIdUpdater\",attrs:{\"title\":'Update Unique IDs for ' + _vm.companyName,\"size-class\":'modal-md'}},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-12 form-group\"},[_c('div',{staticClass:\"alert alert-warning\"},[_vm._v(\"This will permenantly update the member's unique ID for a group.\")]),_vm._v(\" \"),_c('p',{staticClass:\"form-group\"},[_vm._v(\"\\n Upload an Excel template with new member unique IDs,\\n the tool will match members using their date of birth and last name and then update their unique ID.\\n \")]),_c('p',[_c('label',{staticClass:\"company-label\"},[_vm._v(\"\\n Select An Excel File\\n \")])]),_c('div',{staticClass:\"input-group\",attrs:{\"id\":\"csv-selector-container\"}},[_c('label',{staticClass:\"input-group-btn\"},[_c('span',{staticClass:\"btn btn-blue btn-sm btn-file\",staticStyle:{\"border-top-width\":\"4px\",\"border-bottom-width\":\"3px\"},attrs:{\"title\":\"Click to select an Excel file from your computer to upload.\"}},[_vm._v(\"\\n Browse… \"),_c('input',{ref:\"uploader\",staticStyle:{\"display\":\"none\"},attrs:{\"type\":\"file\"},on:{\"change\":_vm.fileSelected}})])]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.fileName),expression:\"fileName\"}],staticClass:\"form-control col-8\",attrs:{\"type\":\"text\",\"readonly\":\"\"},domProps:{\"value\":(_vm.fileName)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.fileName=$event.target.value}}})])]),_vm._v(\" \"),_c('div',{staticClass:\"col-md-12\"},[_c('ac-button',{staticClass:\"btn btn-green btn-sm pull-right\",attrs:{\"type\":\"button\",\"title\":\"Click to upload the file previously selected using the 'Browse' button.\",\"action\":_vm.uploadFile}},[_c('i',{staticClass:\"fa fa-lg fa-download\"}),_vm._v(\" UPDATE UNIQUE IDS\\n \")]),_vm._v(\" \"),_c('ac-button',{staticClass:\"btn btn-red btn-sm pull-right\",staticStyle:{\"margin-right\":\"10px\"},attrs:{\"type\":\"button\",\"title\":\"Click to remove the file previously selected using the 'Browse' button.\",\"action\":_vm.closeModal}},[_vm._v(\"\\n CANCEL\\n \")])],1)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UpdateUniqueIdModal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UpdateUniqueIdModal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./UpdateUniqueIdModal.vue?vue&type=template&id=3c1b9648&\"\nimport script from \"./UpdateUniqueIdModal.vue?vue&type=script&lang=js&\"\nexport * from \"./UpdateUniqueIdModal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"UpdateUniqueIdModal.vue\"\nexport default component.exports","<template>\n<ac-modal :title=\"'Update Unique IDs for ' + companyName\" :size-class=\"'modal-md'\" ref=\"uniqueIdUpdater\">\n <div class=\"row\">\n <div class=\"col-md-12 form-group\">\n <div class=\"alert alert-warning\">This will permenantly update the member's unique ID for a group.</div>\n <p class=\"form-group\">\n Upload an Excel template with new member unique IDs,\n the tool will match members using their date of birth and last name and then update their unique ID.\n <p>\n <label class=\"company-label\">\n Select An Excel File\n </label>\n <div class=\"input-group\" id=\"csv-selector-container\">\n <label class=\"input-group-btn\">\n <span class=\"btn btn-blue btn-sm btn-file\" style=\"border-top-width: 4px; border-bottom-width: 3px\"\n title=\"Click to select an Excel file from your computer to upload.\">\n Browse… <input ref=\"uploader\" type=\"file\" style=\"display: none;\" @change=\"fileSelected\">\n </span>\n </label>\n <input type=\"text\" class=\"form-control col-8\" readonly v-model=\"fileName\">\n </div>\n </div>\n <div class=\"col-md-12\">\n <ac-button type=\"button\" class=\"btn btn-green btn-sm pull-right\"\n title=\"Click to upload the file previously selected using the 'Browse' button.\"\n :action=\"uploadFile\">\n <i class=\"fa fa-lg fa-download\"></i> UPDATE UNIQUE IDS\n </ac-button>\n <ac-button type=\"button\" style=\"margin-right: 10px\" class=\"btn btn-red btn-sm pull-right\"\n title=\"Click to remove the file previously selected using the 'Browse' button.\"\n :action=\"closeModal\">\n CANCEL\n </ac-button>\n </div>\n </div>\n</ac-modal>\n</template>\n\n<script>\nimport {notifications} from \"../../../../global/notifications.js\";\nimport {common} from \"../../../../global/common.js\";\nimport {api} from \"../../../../global/framework/api.js\";\n\nexport default {\n data() {\n return {\n companyId: null,\n companyName: \"Group\",\n spreadsheet: null,\n fileName: \"\",\n }\n },\n methods: {\n async showModal(data) {\n if (!data.companyId) throw \"Company Id is required\";\n this.companyId = data.companyId;\n if (data.companyName) this.companyName = data.companyName;\n this.$refs.uniqueIdUpdater.open();\n },\n closeModal() {\n this.clearFile();\n this.$refs.uniqueIdUpdater.close();\n },\n async uploadFile() {\n if (this.spreadsheet == null) {\n notifications.show({\n title: \"Error\",\n message: \"You need to select a file first\"\n }, common.ACRESSA_NOTIFICATIONS.ERROR);\n return;\n } \n \n let formData = new FormData();\n formData.append(\"employeeCsv\", this.spreadsheet);\n\n let result = await $.ajax({\n type: \"POST\",\n url: `Admin/${this.companyId}/UpdateMemberUniqueIds`,\n contentType: false,\n processData: false,\n data: formData\n });\n\n if (result) {\n notifications.show({\n title: \"Success!\", \n message: result.msg\n }, common.ACRESSA_NOTIFICATIONS.SUCCESS);\n\n this.clearFile();\n this.closeModal();\n }\n },\n clearFile() {\n this.spreadsheet = null;\n this.fileName = \"\";\n this.$refs.uploader.value = null;\n },\n fileSelected(event) {\n this.spreadsheet = null;\n let fileData = event.target.files[0];\n\n if (fileData) {\n this.spreadsheet = fileData;\n this.fileName = fileData.name;\n let fileExt = this.fileName.substring(this.fileName.lastIndexOf('.'));\n\n if (fileExt !== '.xlsx') {\n notifications.show({\n title: \"Error\",\n message: \"Only xlsx files types are allowed.\"\n }, common.ACRESSA_NOTIFICATIONS.ERROR);\n this.clearFile();\n }\n }\n },\n },\n}\n</script>\n"],"sourceRoot":""}