{"version":3,"sources":["webpack:///./src/components/CodeMaintenance/BinMappings.vue?c885","webpack:///./src/components/PrinterBinMappingForm.vue?2ee9","webpack:///./src/components/PrinterBinMap.vue?e930","webpack:///./src/components/PrinterBinMap.vue?38b3","webpack:///./src/components/PrinterBinMap.vue","webpack:///src/components/PrinterBinMappingForm.vue","webpack:///./src/components/PrinterBinMappingForm.vue?9d41","webpack:///./src/components/PrinterBinMappingForm.vue","webpack:///src/components/CodeMaintenance/BinMappings.vue","webpack:///./src/components/CodeMaintenance/BinMappings.vue?0c14","webpack:///./src/components/CodeMaintenance/BinMappings.vue","webpack:///./src/components/common/Card.vue?0c0c","webpack:///./src/components/PrinterBinMappingForm.vue?4984","webpack:///src/components/CodeMaintenance/PrinterMaintenance.vue","webpack:///./src/components/PrinterBinMap.vue?3e01","webpack:///src/components/PrinterBinMap.vue","webpack:///./src/components/CodeMaintenance/PrinterMaintenance.vue?80a6","webpack:///./src/components/CodeMaintenance/PrinterMaintenance.vue?bef6","webpack:///./src/components/CodeMaintenance/PrinterMaintenance.vue","webpack:///./src/components/CodeMaintenance/PrinterMaintenance.vue?601f","webpack:///./src/components/common/Card.vue?2497","webpack:///src/components/common/Card.vue","webpack:///./src/components/common/Card.vue?e662","webpack:///./src/components/common/Card.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","columns","binMaps","toolbar","scopedSlots","_u","key","fn","on","handleAddBinMap","proxy","ref","data","directives","name","rawName","value","permissions","expression","modifiers","$event","handlEditBinMap","handleDeleteBinMap","isModalOpen","handleClose","binMapId","handleSubmit","staticRenderFns","preventDefault","apply","arguments","$v","binMap","model","callback","$$v","$set","booleanOptions","casePriorities","_m","handleAddMap","isLoading","_l","bin","idx","labPrinters","allPrinters","handleDeleteMap","printers","_v","isFileDrop","_e","hasBinSelected","hasRedirectPrinter","printerBins","fileDropTrayOptions","$emit","component","components","TextInput","IconButton","PrinterBinMap","Loader","SelectInput","TagInput","props","priorityIds","isLabDefault","printerId","redirectPrinterId","originalBinMap","computed","mapState","created","validations","required","$each","methods","startupData","PrintersApi","handleErrors","window","id","auditLogMessage","createLogItem","AuditLogApi","handleGetCapabilities","DxGridWithSearch","AddButton","ExpiryTemplate","Container","Modal","PrinterBinMapping","metaInfo","title","titleTemplate","mounted","auditLog","comments","dataField","dataType","lookup","type","caption","cellTemplate","availableLabs","mapGetters","items","location","template","visible","confirm","JSON","PageTitle","Icon","BinMappings","Card","DxSwitch","computers","grid","currentPrinterId","isBinMapsOpen","currentComputerId","selection","enabled","ignoredStatus","printJobs","onUpdating","isIgnored","Promise","LabPrintNodeAPIKey","printerDataSource","store","pageSize","printNodeCredentials","Authorization","dataSource","loadMode","load","printJobColumns","sortOrder","sortIndex","toggleBinMaps","getComputers","fetch","method","headers","printnodeData","computerData","getPrinters","computerId","computerPrinters","handlePrinterExpand","handleSetIgnoredStatus","targetPrinter","getPrintJobs","printerJobs","initializeGrid","event","setTimeout","handleComputerExpand","mappedPrinters","sortBy","printer","labPrinter","console","printJobDate","printJobIcon","cancelPrint","alert","encodedApiKey","Buffer","deletedPrintJobs","jobsDeleted","displayName","fileDrop","FileDropPrinting","get","set","watch","immediate","handler","nv","getPrinterCapabilities","computer","class","active","_s","state","_b","icon","_t"],"mappings":"kHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,YAAY,CAACE,YAAY,OAAO,CAACF,EAAG,sBAAsB,CAACE,YAAY,MAAMC,MAAM,CAAC,MAAQ,sBAAsB,SAAW,UAAU,QAAUP,EAAIQ,QAAQ,WAAaR,EAAIS,QAAQ,QAAUT,EAAIU,SAASC,YAAYX,EAAIY,GAAG,CAAC,CAACC,IAAI,eAAeC,GAAG,WAAW,MAAO,CAACV,EAAG,aAAa,CAACW,GAAG,CAAC,MAAQf,EAAIgB,qBAAqBC,OAAM,GAAM,CAACJ,IAAI,UAAUC,GAAG,SAASI,G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AAKgL,MAAsB,WAAahL,EAAKgL,OAAO,QAAQ,MAAM,CAACtL,IAAI,UAAUC,GAAG,SAASK,GAAM,MAAO,CAACf,EAAG,MAAM,CAACE,YAAY,kCAAkC,CAAiB,QAAfa,EAAKgL,MAAiB/L,EAAG,cAAc,CAACgB,WAAW,CAAC,CAACC,KAAK,UAAUC,QAAQ,YAAYC,MAAM,mBAAqBE,WAAW,uBAAuBnB,YAAY,0BAA0BC,MAAM,CAAC,KAAO,OAAOQ,GAAG,CAAC,MAAQ,SAASY,GAAQ,OAAO3B,EAAI+K,YAAY5J,OAAUnB,EAAI0D,MAAM,OAAO,MAAK,MAAS,KAAKzC,OAAM,GAAM,MAAM,MAAK,QAAU,IAAIb,EAAG,MAAM,CAACA,EAAG,KAAK,CAACE,YAAY,cAAc,CAACN,EAAIwD,GAAG,mDAAmD,KAAKpD,EAAG,QAAQ,CAACG,MAAM,CAAC,OAASP,EAAIgI,eAAejH,GAAG,CAAC,MAAQf,EAAIqJ,gBAAgB,CAACjJ,EAAG,iBAAiB,IAAI,IAC/9B8B,EAAkB,G,YCTqV,S,wBCQvW8B,EAAY,eACd,EACAjE,EACAmC,GACA,EACA,KACA,WACA,MAIa,aAAA8B,E,2CCnBf,W,kCCAA,IAAIjE,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,eAAe,CAACF,EAAG,MAAM,CAACE,YAAY,wCAAwC,CAACN,EAAIsM,GAAG,UAAU,GAAGlM,EAAG,MAAM,CAACE,YAAY,aAAa,CAACN,EAAIsM,GAAG,SAAS,MACzQpK,EAAkB,GCWP,GACfb,aCb6V,I,wBCQzV2C,EAAY,eACd,EACAjE,EACAmC,GACA,EACA,KACA,WACA,MAIa,OAAA8B,E","file":"js/chunk-89819d20.9ba15508.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('container',{staticClass:\"p-1\"},[_c('dx-grid-with-search',{staticClass:\"col\",attrs:{\"title\":\"Bin Map Maintenance\",\"gridName\":\"binmaps\",\"columns\":_vm.columns,\"dataSource\":_vm.binMaps,\"toolbar\":_vm.toolbar},scopedSlots:_vm._u([{key:\"extraActions\",fn:function(){return [_c('add-button',{on:{\"click\":_vm.handleAddBinMap}})]},proxy:true},{key:\"actions\",fn:function(ref){\nvar data = ref.data;\nreturn [_c('div',[_c('icon-button',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.permissions.PrinterCreateEdit),expression:\"permissions.PrinterCreateEdit\"},{name:\"tooltip\",rawName:\"v-tooltip.left\",value:('Edit Bin Map'),expression:\"'Edit Bin Map'\",modifiers:{\"left\":true}}],staticClass:\"m-auto text-primary pointer p-0\",attrs:{\"icon\":\"pen-alt\"},on:{\"click\":function($event){return _vm.handlEditBinMap(data)}}}),_c('icon-button',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.permissions.PrinterCreateEdit),expression:\"permissions.PrinterCreateEdit\"},{name:\"tooltip\",rawName:\"v-tooltip.left\",value:('Delete Bin Map'),expression:\"'Delete Bin Map'\",modifiers:{\"left\":true}}],staticClass:\"ml-2 text-danger pointer p-0\",attrs:{\"icon\":\"trash-alt\"},on:{\"click\":function($event){return _vm.handleDeleteBinMap(data)}}})],1)]}},{key:\"expirationCell\",fn:function(ref){\nvar data = ref.data;\nreturn [_c('ExpiryTemplate',{attrs:{\"expiry-date\":data.value}})]}}])}),_c('modal',{attrs:{\"status\":_vm.isModalOpen},on:{\"close\":_vm.handleClose}},[_c('printer-bin-mapping',{attrs:{\"binMapId\":_vm.binMapId},on:{\"submit\":_vm.handleSubmit,\"close\":_vm.handleClose}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('form',{staticClass:\"binMaps-wrapper p-3\",on:{\"submit\":function($event){$event.preventDefault();return _vm.handleSubmit.apply(null, arguments)}}},[_c('div',{staticClass:\"d-flex\"},[_c('text-input',{staticClass:\"col\",attrs:{\"name\":\"name\",\"label\":\"Name\",\"validator\":_vm.$v.binMap.name},model:{value:(_vm.binMap.name),callback:function ($$v) {_vm.$set(_vm.binMap, \"name\", $$v)},expression:\"binMap.name\"}}),_c('select-input',{staticClass:\"col\",attrs:{\"label\":\"Lab Default\",\"name\":\"isLabDefault\",\"items\":_vm.booleanOptions},model:{value:(_vm.binMap.isLabDefault),callback:function ($$v) {_vm.$set(_vm.binMap, \"isLabDefault\", $$v)},expression:\"binMap.isLabDefault\"}}),_c('tag-input',{staticClass:\"col\",attrs:{\"label\":\"Priorities\",\"items\":_vm.casePriorities},model:{value:(_vm.binMap.priorityIds),callback:function ($$v) {_vm.$set(_vm.binMap, \"priorityIds\", $$v)},expression:\"binMap.priorityIds\"}})],1),_c('div',{staticClass:\"binMappings p-2\"},[_c('div',{staticClass:\"d-flex justify-content-between my-2\"},[_vm._m(0),_c('icon-button',{staticClass:\"btn-primary plus-btn\",attrs:{\"icon\":\"plus\"},on:{\"click\":_vm.handleAddMap}})],1),(!_vm.isLoading)?_vm._l((_vm.binMap.printers),function(bin,idx){return _c('div',{key:'binMap' + idx},[_c('printer-bin-map',{attrs:{\"labPrinters\":_vm.labPrinters,\"allPrinters\":_vm.allPrinters},on:{\"delete\":function($event){return _vm.handleDeleteMap(idx)}},model:{value:(_vm.binMap.printers[idx]),callback:function ($$v) {_vm.$set(_vm.binMap.printers, idx, $$v)},expression:\"binMap.printers[idx]\"}})],1)}):_c('div',[_c('loader',{staticClass:\"mx-auto\"})],1)],2),_vm._m(1)])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('b',[_vm._v(\"Printer Rules\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"d-flex justify-content-end\"},[_c('button',{staticClass:\"btn btn-primary\",attrs:{\"type\":\"submit\"}},[_vm._v(\"Submit\")])])}]\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"d-flex justify-content-between border-bottom\"},[_c('select-input',{staticClass:\"col\",attrs:{\"name\":\"Printer\",\"label\":\"Printer\",\"valueExpr\":\"printerId\",\"items\":_vm.labPrinters},model:{value:(_vm.bin.printerId),callback:function ($$v) {_vm.$set(_vm.bin, \"printerId\", $$v)},expression:\"bin.printerId\"}}),_c('span',{staticClass:\"align-self-center mt-2 mx-2 text-large\"},[_vm._v(\" →\")]),(!_vm.isFileDrop)?_c('select-input',{staticClass:\"col\",attrs:{\"name\":\"Printer\",\"label\":\"Redirect Printer\",\"items\":_vm.allPrinters,\"valueExpr\":\"printerId\",\"disabled\":_vm.hasBinSelected},model:{value:(_vm.bin.redirectPrinterId),callback:function ($$v) {_vm.$set(_vm.bin, \"redirectPrinterId\", $$v)},expression:\"bin.redirectPrinterId\"}}):_vm._e(),(!_vm.isFileDrop)?_c('select-input',{staticClass:\"col\",attrs:{\"disabled\":_vm.hasRedirectPrinter,\"name\":\"Printer\",\"label\":\"Printer Bin\",\"valueExpr\":\"value\",\"items\":_vm.printerBins},model:{value:(_vm.bin.bin),callback:function ($$v) {_vm.$set(_vm.bin, \"bin\", $$v)},expression:\"bin.bin\"}}):_vm._e(),(_vm.isFileDrop)?_c('select-input',{staticClass:\"col\",attrs:{\"name\":\"TrayName\",\"label\":\"Tray Name\",\"items\":_vm.fileDropTrayOptions,\"displayExpr\":\"displayName\",\"valueExpr\":\"displayName\"},model:{value:(_vm.bin.bin),callback:function ($$v) {_vm.$set(_vm.bin, \"bin\", $$v)},expression:\"bin.bin\"}}):_vm._e(),(_vm.isFileDrop)?_c('div',{staticClass:\"col\"}):_vm._e(),_c('icon-button',{staticClass:\"btn-danger delete-btn align-self-center ml-1 mt-3\",attrs:{\"icon\":\"trash-alt\"},on:{\"click\":function($event){return _vm.$emit('delete')}}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","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!./PrinterBinMap.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!./PrinterBinMap.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./PrinterBinMap.vue?vue&type=template&id=e679917e&scoped=true&\"\nimport script from \"./PrinterBinMap.vue?vue&type=script&lang=js&\"\nexport * from \"./PrinterBinMap.vue?vue&type=script&lang=js&\"\nimport style0 from \"./PrinterBinMap.vue?vue&type=style&index=0&id=e679917e&lang=scss&scoped=true&\"\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  \"e679917e\",\n  null\n  \n)\n\nexport default component.exports","<template>\n  <form class=\"binMaps-wrapper p-3\" @submit.prevent=\"handleSubmit\">\n    <div class=\"d-flex\">\n      <text-input\n        class=\"col\"\n        name=\"name\"\n        label=\"Name\"\n        v-model=\"binMap.name\"\n        :validator=\"$v.binMap.name\"\n      />\n      <select-input\n        label=\"Lab Default\"\n        class=\"col\"\n        name=\"isLabDefault\"\n        :items=\"booleanOptions\"\n        v-model=\"binMap.isLabDefault\"\n      />\n      <tag-input\n        label=\"Priorities\"\n        class=\"col\"\n        :items=\"casePriorities\"\n        v-model=\"binMap.priorityIds\"\n      />\n    </div>\n    <div class=\"binMappings p-2\">\n      <div class=\"d-flex justify-content-between my-2\">\n        <span><b>Printer Rules</b></span>\n        <icon-button icon=\"plus\" class=\"btn-primary plus-btn\" @click=\"handleAddMap\" />\n      </div>\n      <template v-if=\"!isLoading\">\n        <div v-for=\"(bin, idx) in binMap.printers\" :key=\"'binMap' + idx\">\n          <printer-bin-map\n            :labPrinters=\"labPrinters\"\n            :allPrinters=\"allPrinters\"\n            v-model=\"binMap.printers[idx]\"\n            @delete=\"handleDeleteMap(idx)\"\n          />\n        </div>\n      </template>\n      <div v-else>\n        <loader class=\"mx-auto\" />\n      </div>\n    </div>\n    <div class=\"d-flex justify-content-end\">\n      <button class=\"btn btn-primary\" type=\"submit\">Submit</button>\n    </div>\n  </form>\n</template>\n\n<script>\nimport { AuditLogApi, PrintersApi } from \"@/services\";\nimport TextInput from \"./common/TextInput.vue\";\nimport IconButton from \"./common/IconButton.vue\";\nimport PrinterBinMap from \"./PrinterBinMap.vue\";\nimport { handleErrors } from \"@/modules/handleErrors\";\nimport Loader from \"./common/Loader.vue\";\nimport SelectInput from \"./common/SelectInput.vue\";\nimport { booleanLookup, createLogComment, createLogItem } from \"@/modules/helpers\";\nimport { required } from \"vuelidate/lib/validators\";\nimport TagInput from \"./common/TagInput.vue\";\nimport { cloneDeep } from \"lodash\";\nimport { AuditLogItems } from \"@/modules/enums\";\nimport { mapState } from \"vuex\";\nexport default {\n  components: { TextInput, IconButton, PrinterBinMap, Loader, SelectInput, TagInput },\n  name: \"PrinterBinMappings\",\n  props: [\"binMapId\"],\n  data() {\n    return {\n      binMap: {\n        name: \"\",\n        priorityIds: [],\n        isLabDefault: false,\n        printers: [\n          {\n            printerId: null,\n            redirectPrinterId: null,\n            bin: \"\",\n            isLabDefault: false\n          }\n        ]\n      },\n      originalBinMap: {},\n      labPrinters: [],\n      allPrinters: [],\n      isLoading: false,\n      booleanOptions: booleanLookup.dataSource\n    };\n  },\n  computed: {\n    ...mapState({\n      casePriorities: state => state.dropdowns.priorities\n    })\n  },\n  created() {\n    this.$store.dispatch(\"dropdowns/getPriorities\");\n    this.startupData();\n  },\n  validations() {\n    return {\n      binMap: {\n        name: { required },\n        printers: {\n          $each: {\n            printerId: {\n              required\n            }\n          }\n        }\n      }\n    };\n  },\n  methods: {\n    async startupData() {\n      try {\n        this.isLoading = true;\n        if (this.binMapId) {\n          await PrintersApi.getBinMapById(this.binMapId).then(res => {\n            if (res) {\n              this.binMap = { ...res };\n              this.originalBinMap = cloneDeep(res);\n            }\n          });\n        }\n        await PrintersApi.getLabPrinters().then(res => {\n          this.labPrinters = res;\n        });\n        await PrintersApi.getAllPrinters().then(res => {\n          this.allPrinters = res;\n        });\n        this.$store.dispatch(\"dropdowns/getPriorities\");\n      } catch (error) {\n        handleErrors(error);\n      } finally {\n        this.isLoading = false;\n      }\n    },\n    async handleSubmit() {\n      if (this.$v.$invalid) {\n        this.$v.$touch();\n        window.notify(\"Please check your input and try again.\", \"warning\");\n        return;\n      }\n      try {\n        if (this.binMapId) {\n          await PrintersApi.updateBinMap({\n            ...this.binMap,\n            id: this.binMapId\n          });\n          const auditLogMessage = createLogItem({}, AuditLogItems.ChangeAdmin);\n          auditLogMessage.comments = createLogComment(this.originalBinMap, this.binMap);\n          await PrintersApi.createBinMap(this.binMap);\n          await AuditLogApi.insertLogMessage(auditLogMessage);\n          //Code for the UPDATE\n        } else {\n          const auditLogMessage = createLogItem({}, AuditLogItems.ChangeAdmin);\n          auditLogMessage.comments = `Created the bin map ${this.binMap.name}. \\n ${JSON.stringify(\n            this.binMap,\n            null,\n            2\n          )}`;\n          await PrintersApi.createBinMap(this.binMap);\n          await AuditLogApi.insertLogMessage(auditLogMessage);\n        }\n      } catch (error) {\n        handleErrors(error);\n      }\n      this.$emit(\"submit\");\n    },\n    handleAddMap() {\n      this.binMap.printers = [\n        ...this.binMap.printers,\n        { printerId: null, redirectPrinterId: null }\n      ];\n    },\n    handleDeleteMap(idx) {\n      this.binMap.printers = [\n        ...this.binMap.printers.slice(0, idx),\n        ...this.binMap.printers.slice(idx + 1)\n      ];\n    },\n    handleGetCapabilities() {}\n  }\n};\n</script>\n\n<style lang=\"scss\" scoped>\n.binMaps-wrapper {\n  width: 55vw;\n}\n</style>\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!./PrinterBinMappingForm.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!./PrinterBinMappingForm.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./PrinterBinMappingForm.vue?vue&type=template&id=1dd7d674&scoped=true&\"\nimport script from \"./PrinterBinMappingForm.vue?vue&type=script&lang=js&\"\nexport * from \"./PrinterBinMappingForm.vue?vue&type=script&lang=js&\"\nimport style0 from \"./PrinterBinMappingForm.vue?vue&type=style&index=0&id=1dd7d674&lang=scss&scoped=true&\"\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  \"1dd7d674\",\n  null\n  \n)\n\nexport default component.exports","<template>\n  <container class=\"p-1\">\n    <dx-grid-with-search\n      class=\"col\"\n      title=\"Bin Map Maintenance\"\n      gridName=\"binmaps\"\n      :columns=\"columns\"\n      :dataSource=\"binMaps\"\n      :toolbar=\"toolbar\"\n    >\n      <template v-slot:extraActions>\n        <add-button @click=\"handleAddBinMap\" />\n      </template>\n      <template v-slot:actions=\"{ data }\">\n        <div>\n          <icon-button\n            class=\"m-auto text-primary pointer p-0\"\n            icon=\"pen-alt\"\n            v-show=\"permissions.PrinterCreateEdit\"\n            @click=\"handlEditBinMap(data)\"\n            v-tooltip.left=\"'Edit Bin Map'\"\n          />\n          <icon-button\n            class=\"ml-2 text-danger pointer p-0\"\n            icon=\"trash-alt\"\n            v-show=\"permissions.PrinterCreateEdit\"\n            @click=\"handleDeleteBinMap(data)\"\n            v-tooltip.left=\"'Delete Bin Map'\"\n          />\n        </div>\n      </template>\n      <template v-slot:expirationCell=\"{ data }\">\n        <ExpiryTemplate :expiry-date=\"data.value\" />\n      </template>\n    </dx-grid-with-search>\n    <modal :status=\"isModalOpen\" @close=\"handleClose\">\n      <printer-bin-mapping @submit=\"handleSubmit\" @close=\"handleClose\" :binMapId=\"binMapId\" />\n    </modal>\n  </container>\n</template>\n\n<script>\nimport DxGridWithSearch from \"../common/DxGridWithSearch.vue\";\nimport { mapGetters, mapState } from \"vuex\";\nimport AddButton from \"../common/AddButton.vue\";\nimport auditLog from \"../../services/AuditLog\";\nimport { booleanLookup, createLogItem } from \"../../modules/helpers\";\nimport ExpiryTemplate from \"@/components/common/ExpiryTemplate.vue\";\nimport Container from \"../common/Container.vue\";\nimport Modal from \"../common/Modal.vue\";\nimport IconButton from \"../common/IconButton.vue\";\nimport { AuditLogApi, PrintersApi } from \"@/services\";\nimport PrinterBinMapping from \"../PrinterBinMappingForm.vue\";\nimport { AuditLogItems } from \"@/modules/enums\";\n\nexport default {\n  components: {\n    DxGridWithSearch,\n    AddButton,\n    ExpiryTemplate,\n    Container,\n    Modal,\n    IconButton,\n    PrinterBinMapping\n  },\n  name: \"BinMappings\",\n  metaInfo: {\n    title: \"Bin Mappings\",\n    titleTemplate: \"IntelliPath - %s\"\n  },\n  mounted() {\n    auditLog.insertLogMessage({\n      ...createLogItem({}, 7),\n      comments: \"Visited Admin Prefix page.\"\n    });\n  },\n  created() {\n    PrintersApi.getLabBinMaps().then(res => {\n      this.binMaps = res || [];\n    });\n  },\n  data: () => ({\n    binMaps: [],\n    isModalOpen: false,\n    binMapId: null,\n\n    columns: [\n      {\n        dataField: \"name\"\n      },\n      {\n        dataField: \"isLabDefault\",\n        dataType: \"boolean\",\n        lookup: booleanLookup\n      },\n      {\n        type: \"buttons\",\n        caption: \"Actions\",\n        cellTemplate: \"actions\"\n      }\n    ],\n    availableLabs: [],\n    isLoading: false\n  }),\n\n  computed: {\n    ...mapState([\"currentUser\", \"currentLab\"]),\n    ...mapGetters([\"permissions\"]),\n    toolbar() {\n      return {\n        items: [\n          {\n            location: \"after\",\n            template: \"extraActions\",\n            visible: this.permissions.PrinterCreateEdit\n          }\n        ]\n      };\n    }\n  },\n\n  methods: {\n    handlEditBinMap({ data }) {\n      if (data) {\n        this.binMapId = data.id;\n      }\n      this.isModalOpen = true;\n    },\n    async handleDeleteBinMap({ data }) {\n      const confirm = await window.confirm(\"This action is irreversible. Do you wish to continue?\");\n      if (!confirm) {\n        return;\n      }\n      await PrintersApi.deleteBinMap(data);\n      await PrintersApi.getLabBinMaps().then(res => {\n        this.binMaps = res || [];\n      });\n\n      const auditLogMessage = createLogItem({}, AuditLogItems.ChangeAdmin);\n      auditLogMessage.comments = `Deleted the bin map ${data.name} ID ${\n        data.id\n      }. \\n ${JSON.stringify(data, null, 2)}`;\n      await AuditLogApi.insertLogMessage(auditLogMessage);\n    },\n    handleAddBinMap() {\n      this.binMapId = null;\n      this.isModalOpen = true;\n    },\n    handleClose() {\n      this.binMapId = null;\n      this.isModalOpen = false;\n    },\n    handleSubmit() {\n      this.binMapId = null;\n      this.isModalOpen = false;\n      PrintersApi.getLabBinMaps().then(res => {\n        this.binMaps = res || [];\n      });\n    }\n  }\n};\n</script>\n\n<style lang=\"scss\" scoped></style>\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!./BinMappings.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!./BinMappings.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./BinMappings.vue?vue&type=template&id=5f98288f&scoped=true&\"\nimport script from \"./BinMappings.vue?vue&type=script&lang=js&\"\nexport * from \"./BinMappings.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  \"5f98288f\",\n  null\n  \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Card.vue?vue&type=style&index=0&id=baae7140&lang=scss&scoped=true&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PrinterBinMappingForm.vue?vue&type=style&index=0&id=1dd7d674&lang=scss&scoped=true&\"","<template>\n  <container class=\"\">\n    <div class=\"p-2 d-flex align-items-center justify-content-between\">\n      <page-title>Printer Maintenance</page-title>\n      <button type=\"button\" @click=\"toggleBinMaps\" class=\"btn btn-primary\">Bin Maps</button>\n    </div>\n    <div class=\"d-flex flex-md-wrap\">\n      <div class=\"col\">\n        <Card\n          :class=\"{ active: computer.id === currentComputerId }\"\n          class=\"p-3\"\n          v-for=\"computer of computers\"\n          :key=\"computer.id\"\n        >\n          <template v-slot:title>\n            <span class=\"font-weight-bold text-large\">🖥️{{ computer.name }}</span>\n            <icon\n              v-tooltip=\"computer.state\"\n              icon=\"circle\"\n              :class=\"{\n                'text-success': computer.state === 'connected',\n                'text-danger': computer.state === 'disconnected'\n              }\"\n              class=\"ml-auto ml-2\"\n            />\n            <icon-button class=\"mx-1\" @click=\"handleComputerExpand(computer.id)\" icon=\"eye\" />\n          </template>\n        </Card>\n      </div>\n      <div class=\"col-8\">\n        <template v-if=\"currentComputerId !== null\">\n          <div class=\"p-2\">\n            <Card class=\"p-1\" v-for=\"printer of printers\" :key=\"printer.id\">\n              <template v-slot:title>\n                <span class=\"mx-2 font-weight-bold text-large\">🖨️{{ printer.name }}</span>\n                <icon\n                  v-tooltip=\"printer.state\"\n                  icon=\"circle\"\n                  :class=\"{\n                    'text-success': printer.state === 'online',\n                    'text-danger': printer.state === 'offline'\n                  }\"\n                  class=\"ml-auto mx-2\"\n                />\n                <DxSwitch\n                  v-if=\"printer.id == currentPrinterId\"\n                  :onValueChanged=\"handleSetIgnoredStatus\"\n                  v-model=\"printer.isIgnored\"\n                  :items=\"booleanOptions\"\n                  v-tooltip=\"'Hide'\"\n                  switchedOnText=\"Hidden\"\n                  switchedOffText=\"Visible\"\n                />\n                <icon-button\n                  @click=\"handlePrinterExpand(printer.id)\"\n                  :icon=\"currentPrinterId === printer.id ? 'chevron-up' : 'chevron-down'\"\n                />\n              </template>\n              <template v-if=\"currentPrinterId === printer.id\" v-slot:body>\n                <div>\n                  <dx-grid-with-search\n                    :columns=\"printJobColumns\"\n                    :dataSource=\"printJobs\"\n                    :selection=\"selection\"\n                  >\n                    <template v-slot:stateIcon=\"{ data }\">\n                      <div class=\"d-flex text-center flex-column\">\n                        <Icon class=\"mx-auto\" v-bind=\"printJobIcon(data)\">\n                          {{ printJobIcon(data).icon ? \"\" : data.state }}\n                        </Icon>\n                        <p class=\"text-capitalize\">\n                          {{ data.state === \"deleted\" ? \"Canceled\" : data.state }}\n                        </p>\n                      </div>\n                    </template>\n                    <template v-slot:actions=\"data\">\n                      <div class=\"d-flex flex-column text-center\">\n                        <icon-button\n                          icon=\"ban\"\n                          class=\"text-danger float-right\"\n                          @click=\"cancelPrint(data)\"\n                          v-if=\"data.state === 'new'\"\n                          v-tooltip=\"'Cancel print job'\"\n                        />\n                      </div>\n                    </template>\n                  </dx-grid-with-search>\n                </div>\n              </template>\n            </Card>\n          </div>\n        </template>\n        <div v-else>\n          <h3 class=\"text-muted\">Please select a computer to view printers.</h3>\n        </div>\n      </div>\n    </div>\n    <modal :status=\"isBinMapsOpen\" @close=\"toggleBinMaps\">\n      <bin-mappings></bin-mappings>\n    </modal>\n  </container>\n</template>\n\n<script>\nimport { mapGetters, mapState } from \"vuex\";\nimport Container from \"../common/Container.vue\";\nimport PageTitle from \"../common/PageTitle.vue\";\nimport Icon from \"../common/Icon.vue\";\nimport IconButton from \"../common/IconButton.vue\";\nimport moment from \"moment\";\nimport { PrintersApi } from \"@/services\";\nimport { sortBy } from \"lodash\";\nimport DxGridWithSearch from \"../common/DxGridWithSearch\";\nimport DxSwitch from \"devextreme-vue/switch\";\nimport ArrayStore from \"devextreme/data/array_store\";\nimport { booleanLookup } from \"@/modules/helpers\";\nimport DataSource from \"devextreme/data/data_source\";\nimport BinMappings from \"./BinMappings.vue\";\nimport Modal from \"../common/Modal.vue\";\nimport CustomStore from \"devextreme/data/custom_store\";\nimport handleErrors from \"@/mixins/handleErrors\";\nimport Card from \"../common/Card.vue\";\nexport default {\n  components: {\n    Container,\n    PageTitle,\n    IconButton,\n    Icon,\n    BinMappings,\n    Modal,\n    Card,\n    DxSwitch,\n    DxGridWithSearch\n  },\n  metaInfo: {\n    title: \"Printer Maintenance\",\n    titleTemplate: \"IntelliPath - %s\"\n  },\n  name: \"PrinterMaintenance\",\n  data() {\n    return {\n      computers: [],\n      grid: {},\n      currentPrinterId: null,\n      isBinMapsOpen: false,\n      currentComputerId: null,\n      selection: { enabled: false },\n      printers: [],\n      ignoredStatus: false,\n      printJobs: [],\n      labPrinters: new ArrayStore({\n        data: [],\n        onUpdating: (key, value) => {\n          const payload = {\n            id: value.printerId,\n            isIgnored: value.isIgnored\n          };\n          return PrintersApi.updatePrinter([payload]);\n        }\n      }),\n      booleanOptions: booleanLookup.dataSource\n    };\n  },\n  async created() {\n    try {\n      this.isLoading = true;\n      await Promise.all([\n        PrintersApi.refreshLabPrinters(this.LabPrintNodeAPIKey),\n        PrintersApi.getAllPrinters().then(res => {\n          this.labPrinters = new ArrayStore({\n            data: res || [],\n            key: \"id\",\n            onUpdating: (key, value) => {\n              const payload = {\n                id: value.printerId,\n                isIgnored: value.isIgnored\n              };\n              return PrintersApi.updatePrinter([payload]);\n            }\n          });\n        }),\n        this.getComputers()\n      ]);\n    } catch (error) {\n      handleErrors(error);\n    } finally {\n      this.isLoading = false;\n    }\n  },\n  computed: {\n    ...mapState({ LabPrintNodeAPIKey: state => state.labSettings.LabPrintNodeAPIKey }),\n    ...mapGetters([\"permissions\"]),\n    printerDataSource() {\n      return new DataSource({\n        store: this.printers,\n        pageSize: 10\n      });\n    },\n    printNodeCredentials() {\n      const encodedApiKey = Buffer.from(this.LabPrintNodeAPIKey).toString(\"base64\");\n      return {\n        Authorization: `Basic ${encodedApiKey}`,\n        \"Content-Type\": \"application/json\"\n      };\n    },\n    dataSource() {\n      return new CustomStore({\n        loadMode: \"raw\",\n        load: this.getComputers\n      });\n    },\n    printJobColumns() {\n      return [\n        { dataField: \"title\", dataType: \"string\", caption: \"File\" },\n        { dataField: \"contentType\", dataType: \"string\", caption: \"Type\" },\n        {\n          dataField: \"createTimestamp\",\n          dataType: \"datetime\",\n          caption: \"Created\",\n          sortOrder: \"desc\",\n          sortIndex: 0\n        },\n        {\n          dataField: \"state\",\n          cellTemplate: \"stateIcon\"\n        },\n        {\n          dataField: \"actions\",\n          caption: \"Actions\",\n          cellTemplate: \"actions\",\n          visible: this.permissions.PrinterCreateEdit\n        }\n      ];\n    }\n  },\n  methods: {\n    toggleBinMaps() {\n      this.isBinMapsOpen = !this.isBinMapsOpen;\n    },\n    async getComputers() {\n      const printnodeData = await fetch(\"https://api.printnode.com/computers\", {\n        method: \"GET\",\n        headers: this.printNodeCredentials\n      });\n\n      const computerData = await printnodeData.json();\n      this.computers = sortBy(computerData, \"state\");\n    },\n    async getPrinters(computerId) {\n      const computerPrinters = await fetch(\n        `https://api.printnode.com/computers/${computerId}/printers`,\n        {\n          method: \"GET\",\n          headers: this.printNodeCredentials\n        }\n      );\n      return computerPrinters.json();\n    },\n    async handlePrinterExpand(printerId) {\n      if (this.currentPrinterId === printerId) {\n        this.currentPrinterId = null;\n        this.printJobs = [];\n      } else {\n        this.currentPrinterId = printerId;\n        this.printJobs = await this.getPrintJobs(printerId);\n      }\n    },\n    async handleSetIgnoredStatus() {\n      const targetPrinter = await this.labPrinters.byKey(this.currentPrinterId);\n      if (targetPrinter?.printerId) {\n        this.labPrinters.update(this.currentPrinterId, {\n          isIgnored: !targetPrinter.isIgnored,\n          printerId: targetPrinter.printerId\n        });\n      }\n    },\n    async getPrintJobs(printerId) {\n      const printerJobs = await fetch(`https://api.printnode.com/printers/${printerId}/printjobs`, {\n        method: \"GET\",\n        headers: this.printNodeCredentials\n      });\n      return printerJobs.json();\n    },\n    initializeGrid(event) {\n      this.grid = event.component;\n      this.grid.refresh = this.grid.reload;\n      this.grid.clearSelection = this.grid.unselectAll;\n      event.component.on(\"contentReady\", () => {\n        const items = event.component.option(\"items\");\n        if (items?.length) {\n          setTimeout(function () {\n            for (let i = 0; i < items.length; i++) event.component.collapseGroup(i);\n          }, 50);\n          event.component.off(\"contentReady\");\n        }\n      });\n    },\n    async handleComputerExpand(computerId) {\n      if (this.currentComputerId === computerId) {\n        this.currentComputerId = null;\n        this.printers = [];\n        return;\n      }\n      this.currentComputerId = computerId;\n      const printers = await this.getPrinters(computerId);\n      const mappedPrinters = [];\n      for (const printer of sortBy(printers, \"state\")) {\n        try {\n          const labPrinter = await this.labPrinters.byKey(printer.id);\n          mappedPrinters.push({ ...labPrinter, ...printer });\n        } catch (error) {\n          console.log(\"Could not add printer \" + printer?.name);\n        }\n      }\n      this.printers = mappedPrinters;\n    },\n    printJobDate(data) {\n      return `${moment(data.createTimestamp).format(\"M/D/YY hh:MM a\")}`;\n    },\n    printJobIcon({ data }) {\n      const props = {};\n      switch (data.state) {\n        case \"done\": {\n          props.icon = \"check\";\n          props.class = \"text-success ml-auto\";\n          break;\n        }\n        case \"error\": {\n          props.icon = \"times\";\n          props.class = \"text-danger ml-auto\";\n          break;\n        }\n        case \"new\": {\n          props.icon = \"plus\";\n          props.class = \"text-warning ml-auto\";\n          break;\n        }\n        case \"sent_to_client\": {\n          props.icon = \"external-link-alt\";\n          props.class = \"text-warning ml-auto\";\n          break;\n        }\n        case \"expired\": {\n          props.icon = \"exclamation-circle\";\n          props.class = \"text-danger ml-auto\";\n          break;\n        }\n        case \"deleted\": {\n          props.icon = \"ban\";\n          props.class = \"text-danger ml-auto\";\n          break;\n        }\n        default: {\n          props.icon = \"\";\n          props.class = \"\";\n        }\n      }\n      return props;\n    },\n    async cancelPrint(data) {\n      if (!this.permissions.PrinterCreateEdit) {\n        alert(\"You do not have permission to perform this action\");\n        return;\n      }\n      const confirm = await window.confirm(\"Are you sure you wish to cancel this print job?\");\n      if (!confirm) {\n        return;\n      } else {\n        if (data.state !== \"new\") {\n          alert(\"This print job has already been sent to the client and cannot be cancelled.\");\n          return;\n        }\n        const encodedApiKey = Buffer.from(this.LabPrintNodeAPIKey).toString(\"base64\");\n        const deletedPrintJobs = await fetch(\n          `https://api.printnode.com/printers/${data.printer.id}/printjobs/${data.id}`,\n          {\n            method: \"DELETE\",\n            headers: {\n              Authorization: `Basic ${encodedApiKey}`,\n              \"Content-Type\": \"application/json\"\n            }\n          }\n        );\n        const jobsDeleted = await deletedPrintJobs.json();\n        if (jobsDeleted.length) {\n          alert(\"Print job cancelled.\");\n          this.printers = await this.getPrintJobs(this.currentComputerId);\n          this.grid.refresh;\n        } else {\n          alert(\"An error ocurred. Could not cancel print job.\");\n        }\n        return deletedPrintJobs.json();\n      }\n    }\n  }\n};\n</script>\n\n<style lang=\"scss\" scoped>\n::v-deep .dx-item.dx-list-item {\n  &.dx-state-active,\n  &.dx-state-focused {\n    color: initial !important;\n  }\n}\n::v-deep .active {\n  opacity: 0.8;\n  border: 2px solid gray;\n}\n</style>\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PrinterBinMap.vue?vue&type=style&index=0&id=e679917e&lang=scss&scoped=true&\"","<template>\n  <div class=\"d-flex justify-content-between border-bottom\">\n    <select-input\n      name=\"Printer\"\n      label=\"Printer\"\n      class=\"col\"\n      valueExpr=\"printerId\"\n      :items=\"labPrinters\"\n      v-model=\"bin.printerId\"\n    />\n    <span class=\"align-self-center mt-2 mx-2 text-large\"> &rarr;</span>\n    <select-input\n      name=\"Printer\"\n      label=\"Redirect Printer\"\n      :items=\"allPrinters\"\n      class=\"col\"\n      valueExpr=\"printerId\"\n      v-model=\"bin.redirectPrinterId\"\n      :disabled=\"hasBinSelected\"\n      v-if=\"!isFileDrop\"\n    />\n    <select-input\n      class=\"col\"\n      :disabled=\"hasRedirectPrinter\"\n      name=\"Printer\"\n      label=\"Printer Bin\"\n      valueExpr=\"value\"\n      :items=\"printerBins\"\n      v-model=\"bin.bin\"\n      v-if=\"!isFileDrop\"\n    />\n    <select-input\n      class=\"col\"\n      name=\"TrayName\"\n      label=\"Tray Name\"\n      v-model=\"bin.bin\"\n      v-if=\"isFileDrop\"\n      :items=\"fileDropTrayOptions\"\n      displayExpr=\"displayName\"\n      valueExpr=\"displayName\"\n    />\n    <div class=\"col\" v-if=\"isFileDrop\" />\n    <icon-button\n      icon=\"trash-alt\"\n      class=\"btn-danger delete-btn align-self-center ml-1 mt-3\"\n      @click=\"$emit('delete')\"\n    />\n  </div>\n</template>\n\n<script>\nimport { mapState } from \"vuex\";\nimport IconButton from \"./common/IconButton.vue\";\nimport SelectInput from \"./common/SelectInput.vue\";\nimport { helpers, required } from \"vuelidate/lib/validators\";\nexport default {\n  components: { SelectInput, IconButton },\n  name: \"PrinterBinMap\",\n  props: {\n    allPrinters: Array,\n    labPrinters: Array,\n    value: Object\n  },\n  data() {\n    return {\n      printerBins: [],\n      isFileDrop: false\n    };\n  },\n  mounted() {\n    if (this.FileDropPrinting?.printerName && !this.labPrinters.find(e => e?.fileDrop)) {\n      this.labPrinters.push({\n        displayName: \"File Drop (\" + this.FileDropPrinting.printerName + \")\",\n        printerId: parseInt(process.env.VUE_APP_FILE_DROP_PRINTER_ID),\n        fileDrop: true\n      });\n    }\n  },\n  computed: {\n    ...mapState({\n      LabPrintNodeAPIKey: state => state.labSettings.LabPrintNodeAPIKey,\n      FileDropPrinting: state => JSON.parse(state.labSettings.FileDropPrintingConfiguration)\n    }),\n    bin: {\n      get() {\n        return this.value;\n      },\n      set(value) {\n        this.$emit(\"input\", value);\n      }\n    },\n    hasRedirectPrinter() {\n      return !!this.bin.redirectPrinterId;\n    },\n    hasBinSelected() {\n      return !!this.bin.bin;\n    },\n    fileDropTrayOptions() {\n      return this.FileDropPrinting?.trayOptions || [];\n    }\n  },\n  validations() {\n    return {\n      bin: {\n        printerId: {\n          required\n        },\n        bin: {\n          required: value => {\n            return this.isFileDrop ? helpers.req(value) : true;\n          }\n        }\n      }\n    };\n  },\n  watch: {\n    \"bin.printerId\": {\n      immediate: true,\n      handler(nv) {\n        if (nv === parseInt(process.env.VUE_APP_FILE_DROP_PRINTER_ID)) {\n          this.isFileDrop = true;\n          return;\n        }\n        this.isFileDrop = false;\n        if (nv !== null) {\n          this.getPrinterCapabilities(nv);\n        }\n      }\n    }\n  },\n  methods: {\n    async getPrinterCapabilities(printerId) {\n      const targetPrinter = this.allPrinters.find(e => e.printerId === printerId);\n      if (!targetPrinter?.printNodeId) {\n        return;\n      }\n      const encodedApiKey = Buffer.from(this.LabPrintNodeAPIKey).toString(\"base64\");\n      const printnodeData = await fetch(\n        `https://api.printnode.com/printers/${targetPrinter.printNodeId}`,\n        {\n          method: \"GET\",\n          headers: {\n            Authorization: `Basic ${encodedApiKey}`,\n            \"Content-Type\": \"application/json\"\n          }\n        }\n      );\n      const data = await printnodeData.json();\n      if (Array.isArray(data) && Array.isArray(data[0]?.capabilities?.bins)) {\n        this.printerBins = data[0].capabilities.bins.map(e => ({ displayName: e, value: e }));\n      }\n    }\n  }\n};\n</script>\n\n<style lang=\"scss\" scoped>\n.text-large {\n  font-size: 1.5rem;\n}\n</style>\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('container',{},[_c('div',{staticClass:\"p-2 d-flex align-items-center justify-content-between\"},[_c('page-title',[_vm._v(\"Printer Maintenance\")]),_c('button',{staticClass:\"btn btn-primary\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.toggleBinMaps}},[_vm._v(\"Bin Maps\")])],1),_c('div',{staticClass:\"d-flex flex-md-wrap\"},[_c('div',{staticClass:\"col\"},_vm._l((_vm.computers),function(computer){return _c('Card',{key:computer.id,staticClass:\"p-3\",class:{ active: computer.id === _vm.currentComputerId },scopedSlots:_vm._u([{key:\"title\",fn:function(){return [_c('span',{staticClass:\"font-weight-bold text-large\"},[_vm._v(\"🖥️\"+_vm._s(computer.name))]),_c('icon',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:(computer.state),expression:\"computer.state\"}],staticClass:\"ml-auto ml-2\",class:{\n              'text-success': computer.state === 'connected',\n              'text-danger': computer.state === 'disconnected'\n            },attrs:{\"icon\":\"circle\"}}),_c('icon-button',{staticClass:\"mx-1\",attrs:{\"icon\":\"eye\"},on:{\"click\":function($event){return _vm.handleComputerExpand(computer.id)}}})]},proxy:true}],null,true)})}),1),_c('div',{staticClass:\"col-8\"},[(_vm.currentComputerId !== null)?[_c('div',{staticClass:\"p-2\"},_vm._l((_vm.printers),function(printer){return _c('Card',{key:printer.id,staticClass:\"p-1\",scopedSlots:_vm._u([{key:\"title\",fn:function(){return [_c('span',{staticClass:\"mx-2 font-weight-bold text-large\"},[_vm._v(\"🖨️\"+_vm._s(printer.name))]),_c('icon',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:(printer.state),expression:\"printer.state\"}],staticClass:\"ml-auto mx-2\",class:{\n                  'text-success': printer.state === 'online',\n                  'text-danger': printer.state === 'offline'\n                },attrs:{\"icon\":\"circle\"}}),(printer.id == _vm.currentPrinterId)?_c('DxSwitch',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:('Hide'),expression:\"'Hide'\"}],attrs:{\"onValueChanged\":_vm.handleSetIgnoredStatus,\"items\":_vm.booleanOptions,\"switchedOnText\":\"Hidden\",\"switchedOffText\":\"Visible\"},model:{value:(printer.isIgnored),callback:function ($$v) {_vm.$set(printer, \"isIgnored\", $$v)},expression:\"printer.isIgnored\"}}):_vm._e(),_c('icon-button',{attrs:{\"icon\":_vm.currentPrinterId === printer.id ? 'chevron-up' : 'chevron-down'},on:{\"click\":function($event){return _vm.handlePrinterExpand(printer.id)}}})]},proxy:true},(_vm.currentPrinterId === printer.id)?{key:\"body\",fn:function(){return [_c('div',[_c('dx-grid-with-search',{attrs:{\"columns\":_vm.printJobColumns,\"dataSource\":_vm.printJobs,\"selection\":_vm.selection},scopedSlots:_vm._u([{key:\"stateIcon\",fn:function(ref){\n                var data = ref.data;\nreturn [_c('div',{staticClass:\"d-flex text-center flex-column\"},[_c('Icon',_vm._b({staticClass:\"mx-auto\"},'Icon',_vm.printJobIcon(data),false),[_vm._v(\" \"+_vm._s(_vm.printJobIcon(data).icon ? \"\" : data.state)+\" \")]),_c('p',{staticClass:\"text-capitalize\"},[_vm._v(\" \"+_vm._s(data.state === \"deleted\" ? \"Canceled\" : data.state)+\" \")])],1)]}},{key:\"actions\",fn:function(data){return [_c('div',{staticClass:\"d-flex flex-column text-center\"},[(data.state === 'new')?_c('icon-button',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:('Cancel print job'),expression:\"'Cancel print job'\"}],staticClass:\"text-danger float-right\",attrs:{\"icon\":\"ban\"},on:{\"click\":function($event){return _vm.cancelPrint(data)}}}):_vm._e()],1)]}}],null,true)})],1)]},proxy:true}:null],null,true)})}),1)]:_c('div',[_c('h3',{staticClass:\"text-muted\"},[_vm._v(\"Please select a computer to view printers.\")])])],2)]),_c('modal',{attrs:{\"status\":_vm.isBinMapsOpen},on:{\"close\":_vm.toggleBinMaps}},[_c('bin-mappings')],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","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!./PrinterMaintenance.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!./PrinterMaintenance.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./PrinterMaintenance.vue?vue&type=template&id=722a24f3&scoped=true&\"\nimport script from \"./PrinterMaintenance.vue?vue&type=script&lang=js&\"\nexport * from \"./PrinterMaintenance.vue?vue&type=script&lang=js&\"\nimport style0 from \"./PrinterMaintenance.vue?vue&type=style&index=0&id=722a24f3&lang=scss&scoped=true&\"\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  \"722a24f3\",\n  null\n  \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PrinterMaintenance.vue?vue&type=style&index=0&id=722a24f3&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"card shadow\"},[_c('div',{staticClass:\"card-title d-flex align-items-center\"},[_vm._t(\"title\")],2),_c('div',{staticClass:\"card-body\"},[_vm._t(\"body\")],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div class=\"card shadow\">\n    <div class=\"card-title d-flex align-items-center\">\n      <slot name=\"title\"></slot>\n    </div>\n    <div class=\"card-body\">\n      <slot name=\"body\"></slot>\n    </div>\n  </div>\n</template>\n\n<script>\nexport default {\n  name: \"Card\"\n};\n</script>\n\n<style lang=\"scss\" scoped>\n.card {\n  /* height: 100px; */\n  display: block;\n  .card-title {\n    margin-bottom: 2px;\n  }\n  .card-body {\n    padding: 0px;\n  }\n  .avatar {\n    display: flex;\n    margin-right: 5px;\n    & > svg {\n      align-self: center;\n      width: 50px;\n      height: 50px;\n    }\n  }\n  p {\n    margin-bottom: 1px;\n  }\n}\n</style>\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!./Card.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!./Card.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Card.vue?vue&type=template&id=baae7140&scoped=true&\"\nimport script from \"./Card.vue?vue&type=script&lang=js&\"\nexport * from \"./Card.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Card.vue?vue&type=style&index=0&id=baae7140&lang=scss&scoped=true&\"\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  \"baae7140\",\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}