{"version":3,"sources":["webpack:///./src/views/reports/PPE.vue?b23a","webpack:///./src/views/reports/PPE.vue","webpack:///src/views/reports/PPE.vue","webpack:///./src/views/reports/PPE.vue?9beb","webpack:///./src/views/reports/PPE.vue?0dd2","webpack:///./src/components/ui/Dialog.vue","webpack:///src/components/ui/Dialog.vue","webpack:///./src/components/ui/Dialog.vue?031d","webpack:///./src/components/ui/Dialog.vue?85af","webpack:///./src/utils/helper.js"],"names":["render","_vm","this","_c","_self","staticClass","class","alertType","attrs","model","value","alert","callback","$$v","expression","_v","_s","alertMessage","downloadFormat","on","onSelectedFormat","formData","selectedFormat","$set","isDownloading","onDownload","headers","ppeRecords","loadingData","_e","_l","item","key","requestId","personnelName","location","jobTitle","contractEmployerName","items","date","status","ref","scopedSlots","_u","fn","deleteJobtitle","$event","cancel","proxy","staticRenderFns","components","Button","Dialog","SelectField","data","search","name","id","valid","isSavingUser","excelExportRecords","text","computed","methods","addNew","showAlertMessage","message","type","_this","setTimeout","openDeleteModal","$refs","deleteModal","toggleModal","modal","getApprovedPPEItems","_this2","requestService","getApprovedPPE","then","result","records","excelRecords","forEach","ppeItems","ppEs","requestItems","length","ppe","concat","ppeType","narration","excelItem","employeeName","moment","requestDate","format","push","catch","error","console","log","finally","time","doc","JSPDF","autoTable","theme","headStyles","fillColor","textColor","alternateRowStyles","html","align","save","ppeSheet","XLSX","utils","json_to_sheet","ppeWorkBook","book_new","book_append_sheet","writeFile","formattedData","fileHeaders","itemName","itemCount","replace","ExportToCSVFile","mounted","component","persistent","width","showModal","title","_t","props","String","default","subTitle","Number","Boolean","closeModal","openModal","convertToCSV","objectArray","JsonData","_typeof","JSON","parse","csvString","i","line","index","fileTitle","unshift","jsonObject","stringify","csvData","exportedFilename","blob","Blob","navigator","msSaveBlob","link","document","createElement","undefined","download","url","URL","createObjectURL","setAttribute","style","visibility","body","appendChild","click","removeChild"],"mappings":"kHAAA,W,yCCAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EA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K,EAAY,GAEPC,EAAI,EAAGA,EAAIL,EAAS3D,OAAQgE,IAAK,CACxC,IAAIC,EAAO,GACX,IAAK,IAAIC,KAASP,EAASK,GACZ,KAATC,IAAaA,GAAQ,KAEzBA,GAAQN,EAASK,GAAGE,GAGtBH,GAAaE,EAAO,OAGtB,OAAOF,IAGHtB,EAAkB,SAACtG,EAASY,EAAOoH,GACvC,GAAIhI,EAAS,CACXY,EAAMqH,QAAQjI,GAEd,IAAMkI,EAAaR,KAAKS,UAAUvH,GAC5BwH,EAAUd,EAAaY,GACvBG,EAAmB,GAAHtE,OAAMiE,EAAS,QAC/BM,EAAO,IAAIC,KAAK,CAACH,GAAU,CAAE3F,KAAM,2BACzC,GAAI+F,UAAUC,WACZD,UAAUC,WAAWH,EAAMD,OACtB,CACL,IAAMK,EAAOC,SAASC,cAAc,KACpC,QAAsBC,IAAlBH,EAAKI,SAAwB,CAC/B,IAAMC,EAAMC,IAAIC,gBAAgBX,GAChCI,EAAKQ,aAAa,OAAQH,GAC1BL,EAAKQ,aAAa,WAAYb,GAC9BK,EAAKS,MAAMC,WAAa,SACxBT,SAASU,KAAKC,YAAYZ,GAC1BA,EAAKa,QACLZ,SAASU,KAAKG,YAAYd,OAMnBpC,U","file":"js/chunk-2c98360a.a5ecec48.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PPE.vue?vue&type=style&index=0&id=028ec7cc&prod&scoped=true&lang=css\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('v-app',{},[_c('div',[_c('v-alert',{staticClass:\"alert\",class:{'alert-error':_vm.alertType=='error', 'alert-success':_vm.alertType=='success'},attrs:{\"border\":\"left\",\"dark\":\"\",\"dismissible\":\"\"},model:{value:(_vm.alert),callback:function ($$v) {_vm.alert=$$v},expression:\"alert\"}},[_vm._v(\" \"+_vm._s(_vm.alertMessage)+\" \")])],1),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-10 ml-auto mr-auto\"},[_c('v-container',[_c('div',{staticClass:\"mb-8 mt-8 text-center\"},[_c('h1',[_vm._v(\"PPE Requests\")])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 d-flex justify-start\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-4\"}),_c('div',{staticClass:\"col-md-4\"})])]),_c('div',{staticClass:\"col-md-4\"},[_c('div',{staticClass:\"export-container\"},[_c('SelectField',{attrs:{\"items\":_vm.downloadFormat,\"label\":'Download Format',\"itemText\":'name',\"itemValue\":'id',\"returnObject\":true},on:{\"input\":_vm.onSelectedFormat},model:{value:(_vm.formData.selectedFormat),callback:function ($$v) {_vm.$set(_vm.formData, \"selectedFormat\", $$v)},expression:\"formData.selectedFormat\"}}),_c('Button',{staticClass:\"mr-2\",attrs:{\"btnType\":'Submit',\"isLoading\":_vm.isDownloading,\"label\":'Export'},on:{\"onClick\":_vm.onDownload}})],1)])]),_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"items\":_vm.ppeRecords}}),(_vm.loadingData)?_c('div',{staticClass:\"text-center\"},[_c('v-progress-circular',{attrs:{\"indeterminate\":\"\",\"color\":\"primary\"}})],1):_vm._e(),_c('table',{attrs:{\"hidden\":\"\",\"id\":\"ppeRequestTable\"}},[_c('thead',[_c('tr',[_c('th',[_vm._v(\"Personnel Name\")]),_c('th',[_vm._v(\"Location\")]),_c('th',[_vm._v(\"Job Title\")]),_c('th',[_vm._v(\"Employer\")]),_c('th',[_vm._v(\"PPE Items\")]),_c('th',[_vm._v(\"Request Date\")]),_c('th',[_vm._v(\"Status\")])])]),_c('tbody',_vm._l((_vm.ppeRecords),function(item){return _c('tr',{key:item.requestId},[_c('td',[_vm._v(\" \"+_vm._s(item.personnelName)+\" \")]),_c('td',[_vm._v(\" \"+_vm._s(item.location)+\" \")]),_c('td',[_vm._v(\" \"+_vm._s(item.jobTitle)+\" \")]),_c('td',[_vm._v(\" \"+_vm._s(item.contractEmployerName)+\" \")]),_c('td',[_vm._v(\" \"+_vm._s(item.items)+\" \")]),_c('td',[_vm._v(\" \"+_vm._s(item.date)+\" \")]),_c('td',[_vm._v(\" \"+_vm._s(item.status)+\" \")])])}),0)]),_c('Dialog',{ref:\"deleteModal\",attrs:{\"title\":'Are you sure you want to delete',\"width\":400},scopedSlots:_vm._u([{key:\"footer\",fn:function(){return [_c('Button',{staticClass:\"mr-2\",attrs:{\"btnType\":'Submit',\"label\":'Yes'},on:{\"onClick\":_vm.deleteJobtitle}}),_c('Button',{attrs:{\"btnType\":'Cancel',\"label\":'No'},on:{\"onClick\":function($event){return _vm.cancel('deleteModal')}}})]},proxy:true}])})],1)],1)])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PPE.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PPE.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./PPE.vue?vue&type=template&id=028ec7cc&scoped=true\"\nimport script from \"./PPE.vue?vue&type=script&lang=js\"\nexport * from \"./PPE.vue?vue&type=script&lang=js\"\nimport style0 from \"./PPE.vue?vue&type=style&index=0&id=028ec7cc&prod&scoped=true&lang=css\"\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 \"028ec7cc\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('v-row',{attrs:{\"justify\":\"center\"}},[_c('v-dialog',{attrs:{\"persistent\":_vm.persistent,\"max-width\":_vm.width},model:{value:(_vm.showModal),callback:function ($$v) {_vm.showModal=$$v},expression:\"showModal\"}},[_c('v-card',[_c('v-card-title',{staticClass:\"headline text-center\"},[_c('h3',{staticClass:\"mt-2 mb-0\"},[_vm._v(_vm._s(_vm.title))])]),_c('v-divider'),_c('v-container',[_c('v-card-text',[_vm._t(\"default\")],2),_c('v-card-actions',{staticClass:\"d-flex justify-content-end\"},[_c('v-spacer'),_vm._t(\"footer\")],2)],1)],1)],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Dialog.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Dialog.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Dialog.vue?vue&type=template&id=3c4325c8\"\nimport script from \"./Dialog.vue?vue&type=script&lang=js\"\nexport * from \"./Dialog.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\nexport default component.exports","const convertToCSV = (objectArray) => {\r\n const JsonData = typeof objectArray !== 'object' ? JSON.parse(objectArray) : objectArray\r\n let csvString = ''\r\n\r\n for (var i = 0; i < JsonData.length; i++) {\r\n let line = ''\r\n for (var index in JsonData[i]) {\r\n if (line !== '') line += ','\r\n\r\n line += JsonData[i][index]\r\n }\r\n\r\n csvString += line + '\\r\\n'\r\n }\r\n\r\n return csvString\r\n}\r\n\r\nconst ExportToCSVFile = (headers, items, fileTitle) => {\r\n if (headers) {\r\n items.unshift(headers)\r\n\r\n const jsonObject = JSON.stringify(items)\r\n const csvData = convertToCSV(jsonObject)\r\n const exportedFilename = `${fileTitle}.csv`\r\n const blob = new Blob([csvData], { type: 'text/csv;charset=utf-8' })\r\n if (navigator.msSaveBlob) {\r\n navigator.msSaveBlob(blob, exportedFilename)\r\n } else {\r\n const link = document.createElement('a')\r\n if (link.download !== undefined) {\r\n const url = URL.createObjectURL(blob)\r\n link.setAttribute('href', url)\r\n link.setAttribute('download', exportedFilename)\r\n link.style.visibility = 'hidden'\r\n document.body.appendChild(link)\r\n link.click()\r\n document.body.removeChild(link)\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport default ExportToCSVFile\r\n"],"sourceRoot":""}