{"version":3,"sources":["webpack:///./src/helpers/fileUpload.ts","webpack:///./src/components/ui/input/CheckboxInput.vue?3fc0","webpack:///./src/components/ui/input/CheckboxInput.vue","webpack:///./src/components/ui/input/CheckboxInput.vue?bcd1","webpack:///./src/components/ui/modals/ConfirmDeleteModal.vue?34c2","webpack:///./src/components/ui/modals/ConfirmDeleteModal.vue","webpack:///./src/components/ui/modals/ConfirmDeleteModal.vue?25ca","webpack:///./src/helpers/lot/adminLot.ts","webpack:///./src/features/plural.ts","webpack:///./src/helpers/debounce.ts","webpack:///./src/components/ui/modals/ConfirmDeleteModal.vue?8f89","webpack:///./src/views/admin/stages/AdminStageLots.vue?7df2","webpack:///./src/views/admin/stages/AdminStageLots.vue?2e50","webpack:///./src/views/admin/stages/AdminStageLots.vue","webpack:///./src/views/admin/stages/AdminStageLots.vue?cab5","webpack:///./src/helpers/transformation/price.ts"],"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","_hoisted_1","class","_hoisted_2","_hoisted_3","key","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_normalizeClass","disabled","value","modelValue","checked","onChange","$event","$emit","partial","checkedPartial","label","_toDisplayString","_createCommentVNode","_defineComponent","__name","props","Boolean","String","emits","setup","__props","expose","__expose","emit","__returned__","Object","defineProperty","enumerable","__exports__","_withScopeId","n","_pushScopeId","_popScopeId","_createBlock","isOpen","onClose","close","onConfirm","confirm","title","_withCtx","description","text","deleteItem","isLeadsPage","_createTextVNode","_","required","Number","customText","computed","router","currentRoute","LotAssignmentModal","notEditableLotStatuses","cov_p5j1mur9o","LotStatus","EOI","CONTRACT_EXECUTED","UNCONDITIONAL","canEditLot","status","plural","number","word","withNumber","cov_1quwmciphk","toLocaleLowerCase","firstChar","debounce","fn","delay","cov_2irbpckthq","immediate","timeout","args","clearTimeout","setTimeout","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","src","_imports_0","_hoisted_27","_hoisted_28","_component_router_link","_resolveComponent","isConciergeView","lots","length","_createVNode","searchQuery","placeholder","theme","onClick","toCreateLot","bulkUpload","accept","templateDownloadLink","href","target","isUserActive","selectedLotsList","show","showConfirmBulkDeleteModal","lotList","isSelectAll","selectAll","_Fragment","_renderList","lot","index","handleRowClick","_withModifiers","selectLot","selected","formatPrice","price","getLotStatusClass","PRE_CONTRACT","to","params","userId","estateId","stageId","lotId","_id","setItemForDelete","AVAILABLE","builders","getButtonLabel","showConfirmDeleteModal","itemForDelete","deleteLot","id","bulkDeleteLots","landownerId","default","ref","debounceSearch","getLots","filter","item","user","_user$value","verifiedEmail","selectedIndex","getUser","store","dispatch","then","res","data","map","evnt","isSelect","forEach","e","files","selectedFile","FormData","append","catch","getTemplateLink","message","toLot","push","watch","newEstateId","onMounted","lotIds","success","err","_err$response$data","response","_err$response$data2","isClickable","toLotSelectedIfClickeable","toLotSelected","lotTitle","lotSize","lotPrice","ConfirmDeleteModal","CheckboxInput","InputSearch","LotInterface","UserInterface","cov_243ma3iy2q","showCurrency","_priceArray$0$toStrin","priceArray","split","toString","match","join","formatStripePrice","string","slice","lastTwo","substr","firstCharacter","formatPriceToNumber","parseFloat","replace","formatPriceTrim","trimText","formatPorcentageTrim","porcentage","max","integerValue","decimalValue","porcentageParts","trimPorcentage","updatePriceInput","form","priceField","preventDefault"],"mappings":"+8UAgBE,OAAAA,EAAA,kBAAAC,KAAAD,IAdK,MAAME,GAAWF,IAAAG,EAAA,KAAG,UACrBC,GAAKJ,IAAAG,EAAA,KAA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AA6O,IAAArP,EAAA,MACEqP,IAAA7O,EAAA,SAAAkQ,IAAGrB,IAAA7O,EAAA,SAAIsQ,EAAeT,QAAQ,KAAM,KAA4BK,IAAKrB,IAAA7O,EAAA,SAAA6O,IAAArP,EAAA,MAC/D0Q,EAAIhB,aACZL,IAAA7O,EAAA,SAAA6O,IAAArP,EAAA,MACM2Q,EAAeC,KANFvB,IAAA7O,EAAA,SAAA6O,IAAArP,EAAA,MACX,QAMTqP,IAAArP,EAAA,MAEK,MAAM+Q,EAAmBA,CAACxD,EAAWyD,EAA+BC,KAAsB5B,IAAA5O,EAAA,KAAA4O,IAAArP,EAAA,MAC/FuN,EAAE2D,iBACF,MAAMpH,GAAMuF,IAAArP,EAAA,MAAGuN,EAAEzD,QACXtH,GAAK6M,IAAArP,EAAA,MAAGsQ,EAAgBxG,EAAOtH,QAAO6M,IAAArP,EAAA,MAC5CgR,EAAKC,GAAcd,EAAoB3N","file":"js/admin27.9009a34b.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, normalizeClass as _normalizeClass, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"checkbox-wr\" }\nconst _hoisted_2 = [\"value\", \"checked\", \"disabled\"]\nconst _hoisted_3 = {\n key: 0,\n class: \"label\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"label\", {\n class: _normalizeClass({ disabled: $props.disabled })\n }, [\n _createElementVNode(\"input\", {\n type: \"checkbox\",\n value: $props.modelValue,\n checked: $props.modelValue,\n onChange: _cache[0] || (_cache[0] = ($event: any) => (_ctx.$emit('update:modelValue', !$props.modelValue))),\n disabled: $props.disabled\n }, null, 40, _hoisted_2),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"box\", { partial: $props.checkedPartial }])\n }, null, 2),\n ($props.label)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_3, _toDisplayString($props.label), 1))\n : _createCommentVNode(\"\", true)\n ], 2)\n ]))\n}","import { defineComponent as _defineComponent } from 'vue'\n\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'CheckboxInput',\n props: {\n modelValue: Boolean,\n label: String,\n disabled: Boolean,\n checkedPartial: Boolean,\n},\n emits: [\"update:modelValue\"],\n setup(__props, { expose: __expose, emit: emits }) {\n __expose();\n\nconst props = __props;\n\n\n\n\nconst __returned__ = { props, emits }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./CheckboxInput.vue?vue&type=template&id=1d6c41a5&ts=true&lang=pug\"\nimport script from \"./CheckboxInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CheckboxInput.vue?vue&type=script&lang=ts&setup=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]])\n\nexport default __exports__","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-68a6733c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"text-semi-bold\" }, \"Confirm action\", -1))\nconst _hoisted_2 = { class: \"text-semi-bold\" }\nconst _hoisted_3 = { key: 0 }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createBlock($setup[\"LotAssignmentModal\"], {\n \"is-open\": $props.isOpen,\n onClose: $setup.close,\n onConfirm: $setup.confirm\n }, {\n title: _withCtx(() => [\n _hoisted_1\n ]),\n description: _withCtx(() => [\n _createElementVNode(\"span\", null, _toDisplayString($setup.text) + \" \", 1),\n _createElementVNode(\"span\", _hoisted_2, _toDisplayString($props.deleteItem), 1),\n ($setup.isLeadsPage)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, \" \" + _toDisplayString($props.deleteItem > 1 ? \"leads\" : \"lead\"), 1))\n : _createCommentVNode(\"\", true),\n _createTextVNode(\"?\")\n ]),\n _: 1\n }, 8, [\"is-open\"]))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport LotAssignmentModal from \"@/components/ui/modals/LotAssignmentModal.vue\";\nimport { computed } from \"vue\";\nimport router from \"@/router\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ConfirmDeleteModal',\n props: {\n isOpen: {\n type: Boolean,\n required: true,\n },\n deleteItem: {\n type: [Number, String],\n },\n customText: {\n type: String,\n required: false,\n },\n},\n emits: [\"close\", \"confirm\"],\n setup(__props, { expose: __expose, emit: emits }) {\n __expose();\n\nconst props = __props;\n\n\n\n\nconst text = computed(() => {\n if (props.customText) {\n return props.customText;\n }\n return \"Are you sure you want to delete\";\n});\n\nconst isLeadsPage = computed(() => {\n return router.currentRoute.value.name === \"Leads\";\n});\n\nconst close = () => {\n emits(\"close\");\n};\n\nconst confirm = () => {\n emits(\"confirm\");\n emits(\"close\");\n};\n\n\nconst __returned__ = { emits, props, text, isLeadsPage, close, confirm, LotAssignmentModal, computed, get router() { return router } }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./ConfirmDeleteModal.vue?vue&type=template&id=68a6733c&scoped=true&ts=true&lang=pug\"\nimport script from \"./ConfirmDeleteModal.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ConfirmDeleteModal.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ConfirmDeleteModal.vue?vue&type=style&index=0&id=68a6733c&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-68a6733c\"]])\n\nexport default __exports__","import { LotStatus } from \"@/enums/LotStatus\";\n\nexport const notEditableLotStatuses = [\n LotStatus.EOI,\n LotStatus.CONTRACT_EXECUTED,\n LotStatus.UNCONDITIONAL,\n];\n\nexport function canEditLot(status: LotStatus) {\n return !notEditableLotStatuses.includes(status);\n}\n","const plural = (number: number, word: string, withNumber = true): string => {\n if (word.toLocaleLowerCase() === \"this\") {\n const firstChar = word[0];\n return number > 1 ? `${firstChar}hese` : `${firstChar}his`;\n }\n if (!number) {\n return `0 ${word}s`;\n } else return `${withNumber ? number : \"\"} ${word}${number < 2 ? \"\" : \"s\"}`;\n};\n\nexport default plural;\n","export const debounce = (fn: any, delay = 400, immediate = false) => {\n let timeout: number | undefined;\n return (...args: any[]) => {\n if (immediate && !timeout) fn(...args);\n clearTimeout(timeout);\n\n timeout = setTimeout(() => {\n fn(...args);\n }, delay);\n };\n};\n","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!./ConfirmDeleteModal.vue?vue&type=style&index=0&id=68a6733c&lang=scss&scoped=true\"","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!./AdminStageLots.vue?vue&type=style&index=0&id=281a2d34&lang=scss&scoped=true\"","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, renderList as _renderList, Fragment as _Fragment, withModifiers as _withModifiers, resolveComponent as _resolveComponent, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\nimport _imports_0 from '@/assets/icons/checked-white.svg'\n\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-281a2d34\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"admin-page-wr\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"dashboard-header\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h3\", { class: \"title-main\" }, \"Lots\", -1))\nconst _hoisted_4 = { class: \"subtitle-main\" }\nconst _hoisted_5 = {\n key: 1,\n class: \"filters\"\n}\nconst _hoisted_6 = { class: \"buttons\" }\nconst _hoisted_7 = { class: \"button default primary add-btn-primary bulk-btn\" }\nconst _hoisted_8 = [\"href\"]\nconst _hoisted_9 = {\n key: 0,\n class: \"table-controls\"\n}\nconst _hoisted_10 = {\n key: 0,\n class: \"items-count\"\n}\nconst _hoisted_11 = {\n key: 1,\n class: \"items-count\"\n}\nconst _hoisted_12 = { class: \"table-default\" }\nconst _hoisted_13 = {\n key: 0,\n class: \"checkbox\"\n}\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", null, \"Lot №\", -1))\nconst _hoisted_15 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", null, \"Size\", -1))\nconst _hoisted_16 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", null, \"Price\", -1))\nconst _hoisted_17 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", null, \"Status\", -1))\nconst _hoisted_18 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", null, \"Action\", -1))\nconst _hoisted_19 = [\"onClick\"]\nconst _hoisted_20 = [\"onClick\"]\nconst _hoisted_21 = { class: \"bold\" }\nconst _hoisted_22 = { class: \"tooltip-container\" }\nconst _hoisted_23 = [\"onClick\"]\nconst _hoisted_24 = [\"disabled\"]\nconst _hoisted_25 = {\n key: 3,\n class: \"content-checked\"\n}\nconst _hoisted_26 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"img\", {\n class: \"icon-checked\",\n src: _imports_0\n}, null, -1))\nconst _hoisted_27 = [\n _hoisted_26\n]\nconst _hoisted_28 = {\n key: 0,\n class: \"tooltip\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_router_link = _resolveComponent(\"router-link\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (!$props.isConciergeView)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _hoisted_3,\n _createElementVNode(\"h3\", _hoisted_4, _toDisplayString(`${$setup.lots.length} lot${$setup.lots.length > 1 ? \"s\" : \"\"}`), 1)\n ]))\n : _createCommentVNode(\"\", true),\n (!$props.isConciergeView)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createVNode($setup[\"InputSearch\"], {\n modelValue: $setup.searchQuery,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (($setup.searchQuery) = $event)),\n placeholder: \"Search\",\n theme: \"filter\"\n }, null, 8, [\"modelValue\"]),\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"button\", {\n class: \"button default primary add-btn-primary\",\n onClick: $setup.toCreateLot\n }, \"Add Lot\"),\n _createElementVNode(\"label\", _hoisted_7, [\n _createTextVNode(\"Bulk Upload Lots\"),\n _createElementVNode(\"input\", {\n class: \"bulk-input\",\n type: \"file\",\n onChange: _cache[1] || (_cache[1] = ($event: any) => ($setup.bulkUpload($event))),\n accept: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n }, null, 32)\n ]),\n ($setup.templateDownloadLink)\n ? (_openBlock(), _createElementBlock(\"a\", {\n key: 0,\n class: \"button default primary\",\n href: $setup.templateDownloadLink,\n target: \"_blank\"\n }, \"Download Template\", 8, _hoisted_8))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"table-wrapper\", { 'with-checkbox': !$setup.isUserActive }])\n }, [\n (!$setup.isUserActive)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [\n ($setup.selectedLotsList.length > 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, _toDisplayString($setup.plural($setup.selectedLotsList.length, \"lot\")) + \" selected\", 1))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_11, _toDisplayString($setup.plural($setup.lots.length, \"lot\")), 1)),\n _createElementVNode(\"button\", {\n class: _normalizeClass([\"table-controls-button delete\", { show: $setup.selectedLotsList.length > 0 }]),\n onClick: _cache[2] || (_cache[2] = ($event: any) => ($setup.showConfirmBulkDeleteModal = true))\n }, \"Delete lots\", 2)\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"table\", _hoisted_12, [\n _createElementVNode(\"thead\", null, [\n _createElementVNode(\"tr\", null, [\n (!$setup.isUserActive)\n ? (_openBlock(), _createElementBlock(\"th\", _hoisted_13, [\n _createVNode($setup[\"CheckboxInput\"], {\n checkedPartial: $setup.selectedLotsList.length > 0 && $setup.selectedLotsList.length !== $setup.lotList.length,\n modelValue: $setup.isSelectAll,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => ($setup.selectAll($event)))\n }, null, 8, [\"checkedPartial\", \"modelValue\"])\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_14,\n _hoisted_15,\n _hoisted_16,\n _hoisted_17,\n _hoisted_18\n ])\n ]),\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.lots, (lot, index) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n onClick: ($event: any) => ($setup.handleRowClick(lot, index))\n }, [\n (!$setup.isUserActive)\n ? (_openBlock(), _createElementBlock(\"td\", {\n key: 0,\n class: \"checkbox\",\n onClick: _withModifiers(($event: any) => ($setup.selectLot(!$setup.lotList[index].selected, index)), [\"stop\"])\n }, [\n _createVNode($setup[\"CheckboxInput\"], {\n onClick: _cache[4] || (_cache[4] = _withModifiers(() => {}, [\"stop\"])),\n modelValue: $setup.lotList[index].selected,\n \"onUpdate:modelValue\": ($event: any) => ($setup.selectLot($event, index))\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"])\n ], 8, _hoisted_20))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"td\", _hoisted_21, \"Lot \" + _toDisplayString(lot.title), 1),\n _createElementVNode(\"td\", null, _toDisplayString($setup.formatPrice(lot.size, false)), 1),\n _createElementVNode(\"td\", null, _toDisplayString($setup.formatPrice(lot.price)), 1),\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"badge\", $setup.getLotStatusClass(lot.status === $setup.LotStatus.EOI ? $setup.LotStatus.PRE_CONTRACT : lot.status)])\n }, _toDisplayString(lot.status === $setup.LotStatus.EOI ? $setup.LotStatus.PRE_CONTRACT : lot.status), 3)\n ]),\n _createElementVNode(\"td\", {\n class: _normalizeClass([\"actions\", { 'max-width': $props.isConciergeView }])\n }, [\n _createElementVNode(\"div\", _hoisted_22, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"actions-wr\", { checked: $setup.lotList[index].selected }])\n }, [\n (!$props.isConciergeView)\n ? (_openBlock(), _createBlock(_component_router_link, {\n key: 0,\n class: _normalizeClass([\"icon edit\", { disabled: !$setup.canEditLot(lot.status) }]),\n onClick: _cache[5] || (_cache[5] = _withModifiers(() => {}, [\"stop\"])),\n to: { name: 'AdminLotUpdate', params: { userId: $setup.userId, estateId: $setup.estateId, stageId: $setup.stageId, lotId: lot._id } }\n }, null, 8, [\"to\", \"class\"]))\n : _createCommentVNode(\"\", true),\n (!$props.isConciergeView)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n class: \"icon trash\",\n onClick: _withModifiers(($event: any) => ($setup.setItemForDelete(lot)), [\"stop\"])\n }, null, 8, _hoisted_23))\n : _createCommentVNode(\"\", true),\n ($props.isConciergeView && !$setup.lotList[index].selected)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 2,\n class: _normalizeClass([\"badge select\", { 'disabled-lot': lot.status !== $setup.LotStatus.AVAILABLE || lot.builders.length <= 0 }]),\n disabled: lot.status !== $setup.LotStatus.AVAILABLE || lot.builders.length <= 0\n }, _toDisplayString($setup.getButtonLabel(lot, index)), 11, _hoisted_24))\n : _createCommentVNode(\"\", true),\n ($props.isConciergeView && $setup.lotList[index].selected)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_25, _hoisted_27))\n : _createCommentVNode(\"\", true)\n ], 2),\n ((lot.status !== $setup.LotStatus.AVAILABLE || lot.builders.length <= 0) && $setup.props.isConciergeView)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_28, \"This lot is disabled because it is not available or because it has no builders associated with it.\"))\n : _createCommentVNode(\"\", true)\n ])\n ], 2)\n ], 8, _hoisted_19))\n }), 256))\n ])\n ])\n ], 2),\n _createVNode($setup[\"ConfirmDeleteModal\"], {\n isOpen: $setup.showConfirmDeleteModal,\n deleteItem: $setup.itemForDelete.title,\n onClose: _cache[6] || (_cache[6] = ($event: any) => ($setup.showConfirmDeleteModal = false)),\n onConfirm: _cache[7] || (_cache[7] = ($event: any) => ($setup.deleteLot($setup.itemForDelete.id)))\n }, null, 8, [\"isOpen\", \"deleteItem\"]),\n (!$setup.isUserActive)\n ? (_openBlock(), _createBlock($setup[\"ConfirmDeleteModal\"], {\n key: 2,\n isOpen: $setup.showConfirmBulkDeleteModal,\n deleteItem: $setup.selectedLotsList.length > 1 ? 'selected lots' : 'selected lot',\n onClose: _cache[8] || (_cache[8] = ($event: any) => ($setup.showConfirmBulkDeleteModal = false)),\n onConfirm: $setup.bulkDeleteLots\n }, null, 8, [\"isOpen\", \"deleteItem\"]))\n : _createCommentVNode(\"\", true)\n ]))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport ConfirmDeleteModal from \"@/components/ui/modals/ConfirmDeleteModal.vue\";\n import CheckboxInput from \"@/components/ui/input/CheckboxInput.vue\";\n import InputSearch from \"@/components/ui/input/InputSearch.vue\";\n import { computed, onMounted, ref, watch } from \"vue\";\n import { LotInterface } from \"@/types/LotInterface\";\n import store from \"@/store\";\n import router from \"@/router\";\n import { getLotStatusClass } from \"@/helpers/status\";\n import { isValidFileSize, isXlsxType } from \"@/helpers/fileUpload\";\n import { formatPrice } from \"@/helpers/transformation/price\";\n import plural from \"@/features/plural\";\n import { debounce } from \"@/helpers/debounce\";\n import { useToast } from \"vue-toastification\";\n import { UserInterface } from \"@/types/UserInterface\";\n import { canEditLot } from \"@/helpers/lot/adminLot\";\n import { LotStatus } from \"@/enums/LotStatus\";\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'AdminStageLots',\n props: {\n estateId: { type: String, required: false },\n landownerId: { type: String, required: false },\n stageId: { type: String, required: false },\n isConciergeView: { type: Boolean, default: false },\n },\n emits: [\"lotSelected\"],\n setup(__props, { expose: __expose, emit }) {\n __expose();\n\nconst props = __props;\n\n \n \n const toast = useToast();\n const userId = computed(\n () => props.landownerId || router.currentRoute.value.params.userId\n );\n const estateId = computed(\n () => props.estateId || router.currentRoute.value.params.estateId\n );\n const stageId = computed(\n () => props.stageId || router.currentRoute.value.params.stageId\n );\n const lots = ref([]);\n const searchQuery = ref(\"\");\n const debounceSearch = debounce(getLots);\n const showConfirmDeleteModal = ref(false);\n const showConfirmBulkDeleteModal = ref(false);\n const itemForDelete = ref({ id: \"\", title: \"\" });\n const templateDownloadLink = ref(null);\n const lotList = ref([]);\n const isSelectAll = ref(false);\n const selectedLotsList = computed(() => {\n return lotList.value.filter((item) => item.selected);\n });\n const user = ref(null);\n const isUserActive = computed(() => {\n return user.value?.verifiedEmail;\n });\n const selectedIndex = ref(-1);\n\n watch(\n estateId,\n (newEstateId) => {\n if (newEstateId) {\n getUser();\n getLots();\n getTemplateLink();\n }\n },\n { immediate: true }\n );\n\n watch(\n () => searchQuery.value,\n () => {\n debounceSearch();\n }\n );\n\n onMounted(() => {\n getUser();\n getLots();\n getTemplateLink();\n });\n\n function getUser() {\n store.dispatch(\"user/getUser\", userId.value).then((res) => {\n user.value = res.data;\n });\n }\n function getLots() {\n store\n .dispatch(\"lot/getLots\", {\n title: searchQuery.value,\n stageId: stageId.value,\n })\n .then((res) => {\n lots.value = res.data;\n lotList.value = lots.value.map((item) => {\n return {\n id: item._id,\n selected: false,\n status: item.status,\n };\n });\n isSelectAll.value = false;\n });\n }\n function selectLot(evnt: boolean, index: number) {\n lotList.value[index].selected = !lotList.value[index].selected;\n isSelectAll.value = selectedLotsList.value.length > 0;\n }\n\n function selectAll(isSelect: boolean) {\n isSelectAll.value = isSelect;\n lotList.value.forEach((item) => {\n item.selected = isSelect;\n });\n }\n function bulkUpload(e: any) {\n if (!e.target.files.length) {\n return;\n }\n const selectedFile = e.target.files[0];\n if (!isXlsxType(selectedFile) || !isValidFileSize(selectedFile)) {\n return;\n }\n const data = new FormData();\n data.append(\"file\", selectedFile);\n store\n .dispatch(\"lot/bulkLotUpload\", { stageId: stageId.value, data })\n .then(() => getLots())\n .catch(() => toast.error(\"Invalid file data\"));\n }\n function getTemplateLink() {\n store.dispatch(\"lot/downloadXlsxTemplate\").then((res) => {\n templateDownloadLink.value = res.data.message ? null : res.data;\n });\n }\n function toLot(id: string) {\n router.push({\n name: \"AdminLot\",\n params: {\n userId: userId.value,\n estateId: estateId.value,\n stageId: stageId.value,\n lotId: id,\n },\n });\n }\n function toCreateLot() {\n router.push({\n name: \"AdminLotCreate\",\n params: {\n userId: userId.value,\n estateId: estateId.value,\n stageId: stageId.value,\n },\n });\n }\n const deleteLot = (id: string) => {\n store\n .dispatch(\"lot/deleteLots\", {\n lotIds: [id],\n })\n .then(() => {\n getLots();\n toast.success(\"The lot was successfully deleted\");\n })\n .catch((err) => {\n if (err.response.data?.message) {\n toast.error(err.response.data.message);\n } else {\n toast.error(\"Something went wrong\");\n }\n });\n };\n const bulkDeleteLots = () => {\n store\n .dispatch(\"lot/deleteLots\", {\n lotIds: selectedLotsList.value.map((item) => item.id),\n })\n .then(() => {\n getLots();\n toast.success(\"The lots was successfully deleted\");\n })\n .catch((err) => {\n if (err.response.data?.message) {\n toast.error(err.response.data.message);\n } else {\n toast.error(\"Something went wrong\");\n }\n });\n };\n function setItemForDelete(lot: LotInterface) {\n itemForDelete.value = { id: lot._id, title: lot.title };\n showConfirmDeleteModal.value = true;\n }\n const isClickable = (lot: LotInterface, index: number) => {\n return lot.status === LotStatus.AVAILABLE && lot.builders.length > 0;\n };\n\n const toLotSelectedIfClickeable = (lot: LotInterface, index: number) => {\n if (isClickable(lot, index)) {\n toLotSelected(lot._id, index, lot.title, lot.size, lot.price);\n }\n };\n\n const handleRowClick = (lot: LotInterface, index: number) => {\n if (props.isConciergeView) {\n toLotSelectedIfClickeable(lot, index);\n } else {\n toLot(lot._id);\n }\n };\n const toLotSelected = (\n id: string,\n index: number,\n lotTitle: string,\n lotSize: number,\n lotPrice: number\n ) => {\n emit(\"lotSelected\", id, lotTitle, lotSize, lotPrice);\n\n lotList.value.forEach((lot) => {\n lot.selected = false;\n });\n\n lotList.value[index].selected = true;\n\n isSelectAll.value = selectedLotsList.value.length > 0;\n\n selectedIndex.value = index;\n };\n const getButtonLabel = (lot: LotInterface, index: number) => {\n if (!isClickable(lot, index)) {\n return \"Select\";\n }\n return selectedIndex.value !== -1 && index !== selectedIndex.value\n ? \"Change\"\n : \"Select\";\n };\n\nconst __returned__ = { props, emit, toast, userId, estateId, stageId, lots, searchQuery, debounceSearch, showConfirmDeleteModal, showConfirmBulkDeleteModal, itemForDelete, templateDownloadLink, lotList, isSelectAll, selectedLotsList, user, isUserActive, selectedIndex, getUser, getLots, selectLot, selectAll, bulkUpload, getTemplateLink, toLot, toCreateLot, deleteLot, bulkDeleteLots, setItemForDelete, isClickable, toLotSelectedIfClickeable, handleRowClick, toLotSelected, getButtonLabel, ConfirmDeleteModal, CheckboxInput, InputSearch, computed, onMounted, ref, watch, get LotInterface() { return LotInterface }, get store() { return store }, get router() { return router }, get getLotStatusClass() { return getLotStatusClass }, get isValidFileSize() { return isValidFileSize }, get isXlsxType() { return isXlsxType }, get formatPrice() { return formatPrice }, get plural() { return plural }, get debounce() { return debounce }, get useToast() { return useToast }, get UserInterface() { return UserInterface }, get canEditLot() { return canEditLot }, get LotStatus() { return LotStatus } }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./AdminStageLots.vue?vue&type=template&id=281a2d34&scoped=true&ts=true&lang=pug\"\nimport script from \"./AdminStageLots.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AdminStageLots.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AdminStageLots.vue?vue&type=style&index=0&id=281a2d34&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-281a2d34\"]])\n\nexport default __exports__","export function formatPrice(\n price: number | string = 0,\n showCurrency = true\n): string {\n const priceArray = `${price}`.split(\".\");\n return (\n (showCurrency ? \"$\" : \"\") +\n priceArray[0]\n .toString()\n .match(/.{1,3}(?=(.{3})*$)/g)\n ?.join(\",\") +\n (priceArray[1] ? \".\" + priceArray[1] : \"\")\n );\n}\n\nexport const formatStripePrice = (value = 0, showCurrency = true): string => {\n let string = String(value);\n string = string.slice(0, -2) + \".\" + string.slice(-2);\n const lastTwo = string.substr(string.length - 2);\n const firstCharacter = string.substr(0, 1);\n if (firstCharacter === \".\") {\n string = \"0\" + string;\n }\n if (lastTwo === \"00\") {\n return formatPrice(string.slice(0, -3), showCurrency);\n }\n return formatPrice(string, showCurrency);\n};\n\nexport const formatPriceToNumber = (price: string): number => {\n return parseFloat(price.replace(/,/g, '').replace(/\\$/g, ''));\n}\n\n\nexport const formatPriceTrim = (price: number | string = 0,) : string => {\n const trimText = price ? price.toString()\n .replace(/[^\\d.]/g, '')\n : undefined;\n if(!trimText || trimText === '$') {\n return '$0';\n }\n return formatPrice(trimText);\n};\n\nexport const formatPorcentageTrim = (porcentage: number | string = 0, max ?: number) : string => {\n let integerValue = porcentage;\n let decimalValue = '';\n if(typeof porcentage === 'string' && porcentage.includes('.')) {\n const porcentageParts = porcentage.split('.');\n integerValue = porcentageParts[0];\n decimalValue = '.' + porcentageParts[1];\n }\n const trimPorcentage = formatPriceTrim(integerValue).replace(/\\$/g, '');\n if(!trimPorcentage) {\n return '0.0';\n }\n if(max && trimPorcentage.replace(/,/g, '') as unknown as number >= max) {\n return max.toString();\n }\n return integerValue + decimalValue;\n};\n\nexport const updatePriceInput = (e : Event, form: Record, priceField: string) => {\n e.preventDefault();\n const target = e.target as HTMLInputElement;\n const value = formatPriceTrim(target.value);\n form[priceField] = formatPriceToNumber(value);\n}\n"],"sourceRoot":""}