{"version":3,"sources":["webpack:///./src/Admin/LotArea/LotAreaAdmin.vue?ecd2","webpack:///./src/Admin/LotArea/LotAreaAdmin.vue?298d","webpack:///./src/Admin/LotArea/LotAreaAdmin.vue?6c8d","webpack:///./src/Admin/LotArea/LotAreaAdmin.vue","webpack:///./src/Admin/LotArea/LotAreaAdmin.vue?76c5"],"names":["render","_vm","this","_h","$createElement","_c","_self","directives","name","rawName","value","expression","staticClass","_v","_s","$t","staticStyle","attrs","lots","on","lotSelected","model","callback","$$v","selectedLot","clearPolygon","canSave","save","mapConfig","initialGeography","polygonChanged","staticRenderFns","LotAreaAdmin","LocationBasedMixin","extend","components","VatsGoogleMap","Multiselect","data","unsavedChanges","computed","mounted","init","methods","locationChanged","VatsAPI","get","location","latLongString","latLongArr","split","latLongObj","lat","parseFloat","lng","zoom","mapTypeId","center","polygon","geographicalLocation","path","getPath","getArray","map","latlng","lot","recID","opts","editable","length","paths","post","component"],"mappings":"yHAAA,IAAIA,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,aAAa,CAACP,EAAG,QAAQ,CAACA,EAAG,QAAQ,CAACA,EAAG,KAAK,CAACJ,EAAIY,GAAGZ,EAAIa,GAAGb,EAAIc,GAAG,mCAAmC,GAAGV,EAAG,QAAQ,CAACO,YAAY,yBAAyBI,YAAY,CAAC,gBAAgB,QAAQ,CAACX,EAAG,QAAQ,CAACA,EAAG,cAAc,CAACO,YAAY,eAAeI,YAAY,CAAC,YAAY,SAASC,MAAM,CAAC,QAAUhB,EAAIiB,KAAK,WAAW,QAAQ,MAAQ,WAAWC,GAAG,CAAC,OAASlB,EAAImB,aAAaC,MAAM,CAACX,MAAOT,EAAe,YAAEqB,SAAS,SAAUC,GAAMtB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,EAAwC,CAC1CC,IAAKC,WAAWJ,EAAW,IAC3BK,IAAKD,WAAWJ,EAAW,KAGjB,GAAMJ,EAAA,KAAQC,IAAe,IAAI5C,KAAK6C,SAAQ,uC,cAAtD7B,EAAQ,SAAqFoB,KACnGpC,KAAKgB,KAAOA,EAEZhB,KAAK0B,UAAY,CACb2B,KAAM,GACNC,UAAW,UACXC,OAAQN,G,YAGhBrB,eAAA,SAAe4B,GACPA,IACAxD,KAAKsB,YAAYmC,qBAAqBC,KAAOF,EAAQG,UAChDC,WACAC,KAAI,SAAAC,GACD,MAAO,CACHZ,IAAKY,EAAOZ,MACZE,IAAKU,EAAOV,UAIxBpD,KAAKqC,gBAAiB,IAG9BnB,YAAA,SAAY6C,EAAcC,GACtB,IAAIC,EAAO,CAAEC,UAAU,GACnBT,EAAuB,GAC3BzD,KAAKsB,YAAcyC,EAEfA,EAAIN,sBAAwBM,EAAIN,qBAAqBC,MAAQK,EAAIN,qBAAqBC,KAAKS,QAC3FV,EAAuBM,EAAIN,qBAC3BQ,EAAKG,MAAQX,EAAqBC,MAGlC1D,KAAKsB,YAAYmC,qBAAuBA,EAG5CQ,EAAO,OAAH,OAAG,CAAH,kBAAQR,GAAyBQ,GACrCjE,KAAK2B,iBAAmBsC,GAE5B1C,aAAY,WACRvB,KAAK2B,iBAAmB,IAEtBF,KAAI,W,oHACN,SAAMkB,EAAA,KAAQ0B,KAAK,IAAIrE,KAAK6C,SAAQ,gCAA+B,kBAAO7C,KAAKsB,e,cAA/E,SACAtB,KAAKqC,gBAAiB,E,eAKnB,IC5I0Y,I,wBCQrZiC,EAAY,eACd,EACAxE,EACA+B,GACA,EACA,KACA,WACA,MAIa,aAAAyC,E,2CCnBf,yBAA2jB,EAAG,G","file":"js/chunk-5fd19abe.87f77df8.js","sourcesContent":["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\"},[_c('b-row',[_c('b-col',[_c('h4',[_vm._v(_vm._s(_vm.$t('admin.lotArea.pageHeader')))])])],1),_c('b-row',{staticClass:\"justify-content-center\",staticStyle:{\"margin-bottom\":\"5px\"}},[_c('b-col',[_c('multiselect',{staticClass:\"form-control\",staticStyle:{\"min-width\":\"250px\"},attrs:{\"options\":_vm.lots,\"track-by\":\"recID\",\"label\":\"lotName\"},on:{\"select\":_vm.lotSelected},model:{value:(_vm.selectedLot),callback:function ($$v) {_vm.selectedLot=$$v},expression:\"selectedLot\"}})],1),_c('b-col',[_c('b-button-group',{staticClass:\"float-right\"},[_c('b-button',{attrs:{\"variant\":\"danger\"},on:{\"click\":_vm.clearPolygon}},[_vm._v(_vm._s(_vm.$t('common.clear')))]),_c('b-button',{attrs:{\"variant\":\"info\",\"disabled\":!_vm.canSave},on:{\"click\":_vm.save}},[_vm._v(_vm._s(_vm.$t('common.save')))])],1)],1)],1),_c('b-row',[_c('b-col',{attrs:{\"cols\":\"12\"}},[_c('div',{staticClass:\"lot-area-map-container\"},[_c('VatsGoogleMap',{attrs:{\"mapOptions\":_vm.mapConfig,\"initialGeography\":_vm.initialGeography},on:{\"PolygonChanged\":_vm.polygonChanged}})],1)])],1)],1)}\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\nimport { Logger } from '@/Shared/Logger';\nimport LocationBasedMixin from '@/Shared/LocationBasedMixin';\nimport VatsAPI from '@/Shared/VatsAPI';\nimport VatsGoogleMap from '@/Shared/VatsGoogleMaps/VatsGoogleMap.vue';\nimport Multiselect from 'vue-multiselect';\nimport mixins from 'vue-typed-mixins';\nimport { mapGetters } from 'vuex';\nimport GoogleMapsPolygon from './GoogleMapsPolygon';\nimport LotLkup from './LotLkup';\n\nconst LotAreaAdmin = mixins(LocationBasedMixin).extend({\n components: {\n VatsGoogleMap,\n Multiselect\n },\n data() {\n return {\n mapConfig: {} as google.maps.MapOptions,\n initialGeography: {} as google.maps.PolygonOptions,\n lots: [] as LotLkup[],\n selectedLot: {} as LotLkup,\n unsavedChanges: false\n };\n },\n computed: {\n canSave(): boolean {\n return this.unsavedChanges;\n },\n ...mapGetters('loaderModule', ['loading'])\n },\n async mounted() {\n await this.init();\n },\n methods: {\n locationChanged() {\n this.init();\n },\n async init() {\n this.selectedLot = {} as LotLkup;\n this.unsavedChanges = false;\n\n const latLongString = (\n await VatsAPI\n .get(`/${this.location}/lotmaintenance/GetLatLongForLocation`)\n ).data;\n\n const latLongArr = latLongString.split(',');\n const latLongObj: google.maps.LatLngLiteral = {\n lat: parseFloat(latLongArr[0]),\n lng: parseFloat(latLongArr[1])\n };\n\n const lots = (await VatsAPI.get(`/${this.location}/lotmaintenance/GetLotsForLocation`)).data;\n this.lots = lots;\n\n this.mapConfig = {\n zoom: 14,\n mapTypeId: 'roadmap',\n center: latLongObj\n };\n },\n polygonChanged(polygon: google.maps.Polygon) {\n if (polygon) {\n this.selectedLot.geographicalLocation.path = polygon.getPath()\n .getArray()\n .map(latlng => {\n return {\n lat: latlng.lat(),\n lng: latlng.lng()\n };\n });\n\n this.unsavedChanges = true;\n }\n },\n lotSelected(lot: LotLkup, recID: number) {\n let opts = { editable: true } as google.maps.PolygonOptions;\n let geographicalLocation = {} as GoogleMapsPolygon;\n this.selectedLot = lot;\n\n if (lot.geographicalLocation && lot.geographicalLocation.path && lot.geographicalLocation.path.length) {\n geographicalLocation = lot.geographicalLocation;\n opts.paths = geographicalLocation.path;\n }\n else {\n this.selectedLot.geographicalLocation = geographicalLocation;\n }\n\n opts = { ...geographicalLocation, ...opts };\n this.initialGeography = opts;\n },\n clearPolygon() {\n this.initialGeography = {};\n },\n async save() {\n await VatsAPI.post(`/${this.location}/lotmaintenance/UpdateLotArea`, { ...this.selectedLot });\n this.unsavedChanges = false;\n }\n }\n});\n\nexport default LotAreaAdmin;\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!./LotAreaAdmin.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!./LotAreaAdmin.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./LotAreaAdmin.vue?vue&type=template&id=551dc560&scoped=true&\"\nimport script from \"./LotAreaAdmin.vue?vue&type=script&lang=ts&\"\nexport * from \"./LotAreaAdmin.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./LotAreaAdmin.vue?vue&type=style&index=0&id=551dc560&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 \"551dc560\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LotAreaAdmin.vue?vue&type=style&index=0&id=551dc560&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LotAreaAdmin.vue?vue&type=style&index=0&id=551dc560&lang=scss&scoped=true&\""],"sourceRoot":""}