{"version":3,"sources":["webpack:///./src/Shared/DefaultLocationProp.ts","webpack:///./src/Admin/MeterMapping/MeterMapping.vue?5eef","webpack:///./src/Admin/MeterMapping/MeterRow.vue?9a4e","webpack:///./src/Admin/MeterMapping/MeterRow.vue?b221","webpack:///./src/Admin/MeterMapping/MeterRow.vue?c045","webpack:///./src/Admin/MeterMapping/MeterRow.vue","webpack:///./src/Admin/MeterMapping/MeterMapping.vue?9bb5","webpack:///./src/Admin/MeterMapping/MeterMapping.vue?ccd9","webpack:///./src/Admin/MeterMapping/MeterMapping.vue"],"names":["required","default","type","render","_vm","this","_h","$createElement","_c","_self","directives","name","rawName","value","expression","staticClass","attrs","$t","_v","_s","on","$event","add","newMapping","location","cancelNew","added","_e","_l","map","key","recID","updated","deleted","staticRenderFns","isEditing","workingCopy","domProps","target","composing","$set","model","callback","$$v","cancel","save","mapping","space","block","violation","comment","edit","deleteMapping","extend","props","Object","validator","DefaultLocationProp","data","isLoading","assign","validationErrors","beforeMount","methods","$emit","VatsAPI","delete","headers","response","method","put","post","result","watch","component","LocationBasedMixin","components","MeterRow","loading","mappings","reloadData","get","index","findIndex","item","splice","newMap","locationChanged"],"mappings":"kHAAe,QACXA,UAAU,EACVC,QAAS,GACTC,KAAM,K,2CCHV,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,WAAW,CAAC,CAACC,KAAK,iBAAiBC,QAAQ,mBAAmBC,MAAOT,EAAW,QAAEU,WAAW,YAAYC,YAAY,mCAAmC,CAACP,EAAG,MAAM,CAACO,YAAY,cAAc,CAACP,EAAG,MAAM,CAACO,YAAY,kCAAkC,CAACP,EAAG,OAAO,CAACO,YAAY,kBAAkBC,MAAM,CAAC,eAAeZ,EAAIa,GAAG,yCAAyC,CAACT,EAAG,OAAO,CAACJ,EAAIc,GAAG,yBAAyBd,EAAIe,GAAGf,EAAIa,GA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,EACA7E,EACA+B,GACA,EACA,KACA,KACA,MAIa,e","file":"js/chunk-243ab18e.fbc34ee2.js","sourcesContent":["export default {\r\n required: true,\r\n default: '',\r\n type: '' as any as () => string,\r\n};\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:\"wait-indicator\",rawName:\"v-wait-indicator\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"container wait-indicator-center\"},[_c('div',{staticClass:\"grid-table\"},[_c('div',{staticClass:\"grid-table-row grid-header-row\"},[_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-tooltip\":_vm.$t('admin.meterMapping.spaceColumnLabel')}},[_c('span',[_vm._v(\"\\n \"+_vm._s(_vm.$t('admin.meterMapping.spaceColumnLabel'))+\"\\n \")])]),_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-tooltip\":_vm.$t('admin.meterMapping.locationColumnLabel')}},[_c('span',[_vm._v(\"\\n \"+_vm._s(_vm.$t('admin.meterMapping.locationColumnLabel'))+\"\\n \")])]),_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-tooltip\":_vm.$t('admin.meterMapping.blockColumnLabel')}},[_c('span',[_vm._v(\"\\n \"+_vm._s(_vm.$t('admin.meterMapping.blockColumnLabel'))+\"\\n \")])]),_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-tooltip\":_vm.$t('admin.meterMapping.violationColumnLabel')}},[_c('span',[_vm._v(\"\\n \"+_vm._s(_vm.$t('admin.meterMapping.violationColumnLabel'))+\"\\n \")])]),_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-tooltip\":_vm.$t('admin.meterMapping.commentColumnLabel')}},[_c('span',[_vm._v(\"\\n \"+_vm._s(_vm.$t('admin.meterMapping.commentColumnLabel'))+\"\\n \")])]),_c('span',{staticClass:\"grid-table-cell grid-header-control\"},[_c('div',{staticClass:\"btn-group\"},[_c('button',{staticClass:\"btn btn-outline-primary\",on:{\"click\":function($event){return _vm.add()}}},[_c('i',{staticClass:\"fa fa-plus\"})])])])]),(_vm.newMapping)?_c('MeterRow',{attrs:{\"mapping\":_vm.newMapping,\"location\":_vm.location},on:{\"cancelled\":_vm.cancelNew,\"saved\":_vm.added,\"deleted\":_vm.cancelNew}}):_vm._e(),_vm._l((_vm.mappings),function(map){return _c('MeterRow',{key:map.recID,attrs:{\"mapping\":map,\"location\":_vm.location},on:{\"saved\":_vm.updated,\"deleted\":_vm.deleted}})})],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:\"wait-indicator\",rawName:\"v-wait-indicator\",value:(_vm.isLoading),expression:\"isLoading\"}],staticClass:\"grid-table-row\"},[(!_vm.isEditing)?[_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-title\":_vm.$t('admin.meterMapping.spaceColumnLabel')}},[_vm._v(\"\\n \"+_vm._s(_vm.mapping.space)+\"\\n \")]),_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-title\":_vm.$t('admin.meterMapping.locationColumnLabel')}},[_c('LocationLookupViewer',{attrs:{\"location\":_vm.location,\"type\":\"Location\",\"value\":_vm.mapping.location}})],1),_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-title\":_vm.$t('admin.meterMapping.blockColumnLabel')}},[_vm._v(\"\\n \"+_vm._s(_vm.mapping.block)+\"\\n \")]),_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-title\":_vm.$t('admin.meterMapping.violationColumnLabel')}},[_c('LocationLookupViewer',{attrs:{\"location\":_vm.location,\"type\":\"ViolationCode\",\"value\":_vm.mapping.violation}})],1),_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-title\":_vm.$t('admin.meterMapping.commentColumnLabel')}},[_c('LocationLookupViewer',{attrs:{\"location\":_vm.location,\"type\":\"HandheldComment\",\"value\":_vm.mapping.comment}})],1),_c('span',{staticClass:\"grid-table-cell\"},[_c('div',{staticClass:\"btn-group\"},[_c('button',{staticClass:\"btn btn-outline-info\",on:{\"click\":function($event){return _vm.edit()}}},[_c('i',{staticClass:\"fas fa-edit\"})]),_c('button',{staticClass:\"btn btn-outline-danger\",on:{\"click\":function($event){return _vm.deleteMapping()}}},[_c('i',{staticClass:\"fas fa-trash\"})])])])]:[_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-title\":_vm.$t('admin.meterMapping.spaceColumnLabel')}},[_c('input',{directives:[{name:\"validation-error\",rawName:\"v-validation-error\"},{name:\"model\",rawName:\"v-model\",value:(_vm.workingCopy.space),expression:\"workingCopy.space\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.workingCopy.space)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.workingCopy, \"space\", $event.target.value)}}})]),_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-title\":_vm.$t('admin.meterMapping.locationColumnLabel')}},[_c('LocationLookupDropdown',{directives:[{name:\"validation-error\",rawName:\"v-validation-error\"}],attrs:{\"css\":\"form-control\",\"type\":\"Location\",\"location\":_vm.location},model:{value:(_vm.workingCopy.location),callback:function ($$v) {_vm.$set(_vm.workingCopy, \"location\", $$v)},expression:\"workingCopy.location\"}})],1),_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-title\":_vm.$t('admin.meterMapping.blockColumnLabel')}},[_c('input',{directives:[{name:\"validation-error\",rawName:\"v-validation-error\"},{name:\"model\",rawName:\"v-model\",value:(_vm.workingCopy.block),expression:\"workingCopy.block\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.workingCopy.block)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.workingCopy, \"block\", $event.target.value)}}})]),_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-title\":_vm.$t('admin.meterMapping.violationColumnLabel')}},[_c('LocationLookupDropdown',{directives:[{name:\"validation-error\",rawName:\"v-validation-error\"}],attrs:{\"css\":\"form-control\",\"type\":\"ViolationCode\",\"location\":_vm.location},model:{value:(_vm.workingCopy.violation),callback:function ($$v) {_vm.$set(_vm.workingCopy, \"violation\", $$v)},expression:\"workingCopy.violation\"}})],1),_c('span',{staticClass:\"grid-table-cell\",attrs:{\"data-title\":_vm.$t('admin.meterMapping.commentColumnLabel')}},[_c('LocationLookupDropdown',{directives:[{name:\"validation-error\",rawName:\"v-validation-error\"}],attrs:{\"css\":\"form-control\",\"type\":\"HandheldComment\",\"location\":_vm.location},model:{value:(_vm.workingCopy.comment),callback:function ($$v) {_vm.$set(_vm.workingCopy, \"comment\", $$v)},expression:\"workingCopy.comment\"}})],1),_c('span',{staticClass:\"grid-table-cell\"},[_c('div',{staticClass:\"btn-group\"},[_c('button',{staticClass:\"btn btn-outline-warning\",on:{\"click\":function($event){return _vm.cancel()}}},[_c('i',{staticClass:\"fas fa-times\"})]),_c('button',{staticClass:\"btn btn-outline-success\",on:{\"click\":function($event){return _vm.save()}}},[_c('i',{staticClass:\"fas fa-save\"})])])])]],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { MeterMapping } from './MeterMapping';\nimport DefaultLocationProp from '@/Shared/DefaultLocationProp';\nimport VatsAPI from '@/Shared/VatsAPI';\nimport { getValidationErrors } from '@/Shared/ValidationErrorDirective';\n\nexport default Vue.extend({\n props: {\n mapping: {\n type: Object as () => MeterMapping,\n validator: (): boolean => true,\n required: true\n },\n location: DefaultLocationProp,\n },\n data() {\n return {\n isLoading: false,\n isEditing: false,\n workingCopy: Object.assign({}, this.mapping) as MeterMapping,\n validationErrors: {} as { [propName: string]: string[] }\n };\n },\n beforeMount() {\n if (!this.mapping.recID) {\n this.isEditing = true;\n }\n },\n methods: {\n async deleteMapping() {\n if (!this.workingCopy.recID) {\n this.$emit('deleted', this.workingCopy);\n }\n\n this.isLoading = true;\n try {\n await VatsAPI.delete(`${this.location}/Meters/Mappings`, {\n data: this.workingCopy.recID,\n headers: {\n 'Content-Type': 'application/json',\n }\n });\n this.validationErrors = {};\n this.$emit('deleted', this.mapping);\n }\n catch (e) {\n this.validationErrors = getValidationErrors(e.response);\n throw e;\n }\n finally {\n this.isLoading = false;\n }\n },\n edit() {\n this.isEditing = true;\n },\n cancel() {\n this.isEditing = false;\n this.$emit('cancelled', this.mapping);\n },\n async save() {\n const method = this.workingCopy.recID ? VatsAPI.put : VatsAPI.post;\n\n this.isLoading = true;\n try {\n const result = await method(`${this.location}/Meters/Mappings`, this.workingCopy);\n this.isEditing = false;\n this.$emit('saved', result.data || this.workingCopy);\n this.validationErrors = {};\n }\n catch (e) {\n this.validationErrors = getValidationErrors(e.response);\n throw e;\n }\n finally {\n this.isLoading = false;\n }\n },\n },\n watch: {\n location(): void {\n this.isEditing = false;\n this.isLoading = false;\n },\n mapping(): void {\n this.workingCopy = Object.assign({}, this.mapping) as MeterMapping;\n },\n },\n});\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/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MeterRow.vue?vue&type=script&lang=ts&\"; 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/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MeterRow.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./MeterRow.vue?vue&type=template&id=10d48e48&\"\nimport script from \"./MeterRow.vue?vue&type=script&lang=ts&\"\nexport * from \"./MeterRow.vue?vue&type=script&lang=ts&\"\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","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { MeterMapping } from './MeterMapping';\nimport LocationBasedMixin from '@/Shared/LocationBasedMixin';\nimport mixins from 'vue-typed-mixins';\nimport VatsAPI from '@/Shared/VatsAPI';\nimport MeterRow from './MeterRow.vue';\n\nexport default mixins(LocationBasedMixin).extend({\n components: {\n MeterRow\n },\n data() {\n return {\n loading: false,\n mappings: [] as MeterMapping[],\n newMapping: null as MeterMapping | null\n };\n },\n async beforeMount() {\n await this.reloadData();\n },\n methods: {\n async reloadData() {\n this.loading = true;\n this.newMapping = null;\n try {\n const mappings = await VatsAPI.get(`${this.location}/Meters/Mappings`);\n this.mappings = mappings.data;\n }\n finally {\n this.loading = false;\n }\n },\n deleted(map: MeterMapping) {\n const index = this.mappings.findIndex(item => item === map);\n this.mappings.splice(index, 1);\n },\n cancelNew() {\n this.newMapping = null;\n },\n add() {\n this.newMapping = {} as MeterMapping;\n },\n added(newMap: MeterMapping) {\n this.newMapping = null;\n this.mappings.splice(0, 0, newMap);\n },\n updated(map: MeterMapping) {\n const index = this.mappings.findIndex(item => item.recID === map.recID);\n this.mappings.splice(index, 1, map);\n },\n async locationChanged() {\n this.reloadData();\n }\n },\n});\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/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MeterMapping.vue?vue&type=script&lang=ts&\"; 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/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MeterMapping.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./MeterMapping.vue?vue&type=template&id=2c5fe7c4&\"\nimport script from \"./MeterMapping.vue?vue&type=script&lang=ts&\"\nexport * from \"./MeterMapping.vue?vue&type=script&lang=ts&\"\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"],"sourceRoot":""}