{"version":3,"sources":["webpack:///./src/helpers/fileUpload.ts","webpack:///./src/views/admin/estates/AdminEstateMapUpdate.vue?a62f","webpack:///./src/views/admin/estates/AdminEstateMapUpdate.vue","webpack:///./src/views/admin/estates/AdminEstateMapUpdate.vue?8b49","webpack:///./src/views/admin/estates/AdminEstateMapUpdate.vue?2d54"],"names":["cov_tf4ol8p5k","actualCoverage","MaxFileSize","s","toast","useToast","validDocumentsTypes","validImagesTypes","isValidDocumentType","file","showErrorToast","b","f","includes","type","name","toLowerCase","endsWith","error","isValidImageType","isPngType","isXlsxType","isValidFileSize","size","Math","floor","_withScopeId","n","_pushScopeId","_popScopeId","_hoisted_1","_createElementVNode","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","key","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_withDirectives","_normalizeClass","v$","width","$error","$event","form","placeholder","_vModelText","_toDisplayString","$errors","$message","_createCommentVNode","height","map","src","mapImage","url","_createTextVNode","onChange","selectFile","accept","onClick","router","go","updateMap","_defineComponent","__name","setup","__props","expose","__expose","userId","currentRoute","value","params","estateId","ref","reactive","rules","computed","required","numeric","$autoDirty","useVuelidate","e","target","files","length","selectedFile","uploadFile","data","FormData","append","payload","landownerId","store","dispatch","async","_map$value","$touch","isFormCorrect","$validate","id","_id","then","push","onMounted","res","__returned__","EstateMapInterface","CreateEstateMapInterface","Object","defineProperty","enumerable","__exports__"],"mappings":"s7UAgBE,OAAAA,EAAA,kBAAAC,KAAAD,IAdK,MAAME,GAAWF,IAAAG,EAAA,KAAG,UACrBC,GAAKJ,IAAAG,EAAA,KAAGE,kBACDC,GAAmBN,IAAAG,EAAA,KAAG,CACjC,YACA,aACA,aACA,aACA,QACA,oBAEWI,GAAgBP,IAAAG,EAAA,K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A2B,OAAO+C,yBAAsB,+BAAiC,OAAOC,+BAA4B,gBAAkB,OAAOhH,gBAAa,sBAAwB,OAAOE,uBAEvf,OADA+G,OAAOC,eAAeJ,EAAc,kBAAmB,CAAEK,YAAY,EAAOxC,OAAO,IAC5EmC,K,iCC9EP,MAAMM,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASrF,GAAQ,CAAC,YAAY,qBAE1E,gB,srFCTf","file":"js/admin14.25bd3195.js","sourcesContent":["import { useToast } from \"vue-toastification\";\n\nexport const MaxFileSize = 26214400;\nconst toast = useToast();\nexport const validDocumentsTypes = [\n \"image/png\",\n \"image/jpeg\",\n \"image/heic\",\n \"image/heif\",\n \".heic\",\n \"application/pdf\",\n];\nexport const validImagesTypes = [\n \"image/png\",\n \"image/jpeg\",\n \"image/heic\",\n \"image/heif\",\n \".heic\",\n];\n\nexport function isValidDocumentType(file: File, showErrorToast = true) {\n if (\n !validDocumentsTypes.includes(file.type) &&\n !file.name.toLowerCase().endsWith(\".heic\")\n ) {\n if (showErrorToast) {\n toast.error(\"Only png, jpg, jpeg, heic, pdf files allowed\");\n }\n return false;\n }\n return true;\n}\nexport function isValidImageType(file: File, showErrorToast = true) {\n if (\n !validImagesTypes.includes(file.type) &&\n !file.name.toLowerCase().endsWith(\".heic\")\n ) {\n if (showErrorToast) {\n toast.error(\"Only png, jpg, jpeg, heic files allowed\");\n }\n return false;\n }\n return true;\n}\nexport function isPngType(file: File, showErrorToast = true) {\n if (file.type !== \"image/png\") {\n if (showErrorToast) {\n toast.error(\"Only png files allowed\");\n }\n return false;\n }\n return true;\n}\nexport function isXlsxType(file: File, showErrorToast = true) {\n if (\n file.type !==\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n ) {\n if (showErrorToast) {\n toast.error(\"Only xlsx files allowed\");\n }\n return false;\n }\n return true;\n}\nexport function isValidFileSize(file: File, showErrorToast = true) {\n if (file.size > MaxFileSize) {\n if (showErrorToast) {\n toast.error(\n `File size should not exceed ${Math.floor(\n MaxFileSize / 1024 / 1024\n )} MB`\n );\n }\n return false;\n }\n return true;\n}\n","import { createElementVNode as _createElementVNode, vModelText as _vModelText, normalizeClass as _normalizeClass, withDirectives as _withDirectives, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-081cea7a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"dashboard-header\" }, [\n /*#__PURE__*/_createElementVNode(\"h2\", { class: \"title-main\" }, \"Update Estate Map\")\n], -1))\nconst _hoisted_2 = { class: \"default-form\" }\nconst _hoisted_3 = { class: \"input-row\" }\nconst _hoisted_4 = { class: \"input-wr\" }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"label\", { class: \"label\" }, \"Width\", -1))\nconst _hoisted_6 = {\n key: 0,\n class: \"error-hint\"\n}\nconst _hoisted_7 = { class: \"input-wr\" }\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"label\", { class: \"label\" }, \"Height\", -1))\nconst _hoisted_9 = {\n key: 0,\n class: \"error-hint\"\n}\nconst _hoisted_10 = { class: \"input-row\" }\nconst _hoisted_11 = { class: \"input-wr\" }\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"label\", { class: \"label\" }, \"Current Map\", -1))\nconst _hoisted_13 = [\"src\"]\nconst _hoisted_14 = { class: \"input-row\" }\nconst _hoisted_15 = { class: \"input-wr\" }\nconst _hoisted_16 = { class: \"file-label\" }\nconst _hoisted_17 = { key: 0 }\nconst _hoisted_18 = { class: \"input-row\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _hoisted_1,\n _createElementVNode(\"form\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _hoisted_5,\n _withDirectives(_createElementVNode(\"input\", {\n class: _normalizeClass([\"input\", { error: $setup.v$.width.$error }]),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (($setup.form.width) = $event)),\n type: \"number\",\n placeholder: \"Width\"\n }, null, 2), [\n [_vModelText, $setup.form.width]\n ]),\n ($setup.v$.width.$error)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, _toDisplayString($setup.v$.width.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_7, [\n _hoisted_8,\n _withDirectives(_createElementVNode(\"input\", {\n class: _normalizeClass([\"input\", { error: $setup.v$.height.$error }]),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (($setup.form.height) = $event)),\n type: \"number\",\n placeholder: \"Height\"\n }, null, 2), [\n [_vModelText, $setup.form.height]\n ]),\n ($setup.v$.height.$error)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_9, _toDisplayString($setup.v$.height.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_10, [\n _createElementVNode(\"div\", _hoisted_11, [\n _hoisted_12,\n ($setup.map)\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n src: $setup.map.mapImage.url\n }, null, 8, _hoisted_13))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_14, [\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"label\", _hoisted_16, [\n _createTextVNode(\"Choose New File\"),\n _createElementVNode(\"input\", {\n onChange: _cache[2] || (_cache[2] = ($event: any) => ($setup.selectFile($event))),\n type: \"file\",\n accept: \"image/png\"\n }, null, 32),\n ($setup.form.file)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_17, _toDisplayString($setup.form.file.name), 1))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_18, [\n _createElementVNode(\"button\", {\n class: \"button default outlined cancel-btn\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => ($setup.router.go(-1))),\n type: \"button\"\n }, \"Cancel\"),\n _createElementVNode(\"button\", {\n class: \"button default primary create-btn\",\n onClick: $setup.updateMap,\n type: \"button\"\n }, \"Update\")\n ])\n ])\n ], 64))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { reactive, computed, onMounted, ref } from \"vue\";\nimport useVuelidate from \"@vuelidate/core\";\nimport { numeric, required } from \"@vuelidate/validators\";\nimport store from \"@/store\";\nimport router from \"@/router\";\nimport { EstateMapInterface } from \"@/types/EstateMapInterface\";\nimport { CreateEstateMapInterface } from \"@/types/CreateEstateMapInterface\";\nimport { isPngType, isValidFileSize } from \"@/helpers/fileUpload\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'AdminEstateMapUpdate',\n setup(__props, { expose: __expose }) {\n __expose();\n\nconst userId = router.currentRoute.value.params.userId;\nconst estateId = router.currentRoute.value.params.estateId;\nconst map = ref(null);\nconst form = reactive({\n width: 0,\n height: 0,\n file: null,\n});\nconst rules = computed(() => {\n return {\n width: { required, numeric, $autoDirty: true },\n height: { required, numeric, $autoDirty: true },\n };\n});\nconst v$ = useVuelidate(rules, form);\n\nonMounted(() => {\n store.dispatch(\"estate/getEstateMap\", estateId).then((res) => {\n map.value = res.data;\n form.width = map.value.size.width;\n form.height = map.value.size.height;\n });\n});\n\nfunction selectFile(e: any) {\n if (!e.target.files.length) {\n return;\n }\n const selectedFile = e.target.files[0];\n if (!isPngType(selectedFile) || !isValidFileSize(selectedFile)) {\n return;\n }\n form.file = selectedFile;\n}\nfunction uploadFile() {\n const data = new FormData();\n data.append(\"file\", form.file as File);\n const payload = {\n landownerId: userId,\n estateId,\n data,\n };\n return store.dispatch(\"estate/uploadEstateMapImg\", payload);\n}\nasync function updateMap() {\n v$.value.$touch();\n const isFormCorrect = await v$.value.$validate();\n if (!isFormCorrect) return;\n const data: Partial = {\n size: {\n width: form.width,\n height: form.height,\n },\n };\n if (form.file) {\n data.mapImage = (await uploadFile()).data;\n }\n store\n .dispatch(\"estate/updateEstateMap\", { id: map.value?._id, data })\n .then(() => {\n router.push({\n name: \"AdminEstateMap\",\n params: { userId, estateId },\n });\n });\n}\n\nconst __returned__ = { userId, estateId, map, form, rules, v$, selectFile, uploadFile, updateMap, reactive, computed, onMounted, ref, get useVuelidate() { return useVuelidate }, get numeric() { return numeric }, get required() { return required }, get store() { return store }, get router() { return router }, get EstateMapInterface() { return EstateMapInterface }, get CreateEstateMapInterface() { return CreateEstateMapInterface }, get isPngType() { return isPngType }, get isValidFileSize() { return isValidFileSize } }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./AdminEstateMapUpdate.vue?vue&type=template&id=081cea7a&scoped=true&ts=true&lang=pug\"\nimport script from \"./AdminEstateMapUpdate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AdminEstateMapUpdate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AdminEstateMapUpdate.vue?vue&type=style&index=0&id=081cea7a&lang=scss&scoped=true\"\n\nimport exportComponent from \"/codebuild/output/src264950160/src/lottrackr-front/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-081cea7a\"]])\n\nexport default __exports__","export * from \"-!../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/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/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./AdminEstateMapUpdate.vue?vue&type=style&index=0&id=081cea7a&lang=scss&scoped=true\""],"sourceRoot":""}