{"version":3,"sources":["webpack:///./src/views/admin/concierge/AdminPackageCreate.vue?e2b7","webpack:///./src/views/admin/concierge/AdminPackageCreate.vue","webpack:///./src/views/admin/concierge/AdminPackageCreate.vue?14bb","webpack:///./src/views/admin/concierge/AdminPackageCreate.vue?ac65"],"names":["_withScopeId","n","_pushScopeId","_popScopeId","_hoisted_1","_createElementVNode","class","_hoisted_2","key","_hoisted_3","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","loading","_createCommentVNode","_createVNode","estateSelected","options","optionsEstate","onSelectEstate","selectedEstateId","openListLots","_createBlock","estateId","landownerId","selectedLandownerId","isConciergeView","onToLots","selectedStageId","stageId","onLotSelected","openBuilderDrop","builderPackage","builders","builderOptions","onSelectBuilder","openHouseTable","houses","selectedBuilderHouses","onSelectHouse","housePackage","openFacadeOptions","facades","selectedHouseFacades","onSelectFacade","openAddSiteCosts","siteCosts","selectedHouseSiteCosts","onAddSiteCosts","project","lot","lotPackage","name","landSize","lotSelectedSize","landPrice","price","homeArea","selectedHouseArea","homePrice","facadePrice","facadePackage","selectedSiteCosts","floorplanPackage","landowerId","estateTitle","_defineComponent","__name","setup","__props","expose","__expose","ref","toast","useToast","lotId","builderId","logoUrl","houseId","facadeId","url","estates","BuilderDropdownOptionsEnum","SELECT_PROJECT","buildersForLot","onMounted","getEstates","watch","value","debounceSearch","async","res","store","dispatch","data","error","getBuildersByLotId","debounce","computed","title","id","map","estate","_estate$landownerId","_id","SELECT_BUILDER","logo","builder","selectedBuilder","find","builderTitle","builderLogoUrl","lotTitle","lotSize","lotPrice","area","basePrice","floorplanUrl","floorplanName","houseName","selectedHouse","house","facadeName","length","houseIndex","findIndex","siteCost","__returned__","POSITION","DropDown","EstateInterface","ProjectDropdown","AdminEstateStages","AdminStageLots","BuildersForLot","BuilderDropdown","HouseTable","FacadeOptions","AddSiteCosts","SummaryPackage","SavedChanges","BuilderPackage","FloorplanPackage","HousePackage","LotPackage","FacadePackage","Object","defineProperty","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AAgBC,0BAAc,qBAAuB,OAAOC,qBAAkB,uBAAyB,OAAOC,uBAAoB,mBAAqB,OAAOC,mBAAgB,iBAAmB,OAAOC,iBAAc,oBAAsB,OAAOC,qBAE3xC,OADAC,OAAOC,eAAepB,GAAc,kBAAmB,CAAEqB,YAAY,EAAO5D,OAAO,IAC5EuC,M,iCC9QP,MAAMsB,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASlJ,GAAQ,CAAC,YAAY,qBAE1E,gB,kCCTf,W","file":"js/admin8.ab9ab1bf.js","sourcesContent":["import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createBlock as _createBlock, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-62009908\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"dashboard-header\" }, [\n /*#__PURE__*/_createElementVNode(\"h2\", { class: \"title-main\" }, \"Create Package\")\n], -1))\nconst _hoisted_2 = {\n key: 0,\n class: \"spinner\"\n}\nconst _hoisted_3 = { class: \"create-package-content\" }\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 ($setup.loading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode($setup[\"ProjectDropdown\"], {\n estateSelected: $setup.estateSelected,\n options: $setup.optionsEstate,\n onSelectEstate: $setup.onSelectEstate\n }, null, 8, [\"estateSelected\", \"options\"]),\n ($setup.selectedEstateId && !$setup.openListLots)\n ? (_openBlock(), _createBlock($setup[\"AdminEstateStages\"], {\n key: 0,\n estateId: $setup.selectedEstateId,\n landownerId: $setup.selectedLandownerId,\n isConciergeView: true,\n onToLots: $setup.onToLots\n }, null, 8, [\"estateId\", \"landownerId\"]))\n : _createCommentVNode(\"\", true),\n ($setup.selectedStageId && $setup.openListLots)\n ? (_openBlock(), _createBlock($setup[\"AdminStageLots\"], {\n key: 1,\n estateId: $setup.selectedEstateId,\n landownerId: $setup.selectedLandownerId,\n stageId: $setup.selectedStageId,\n isConciergeView: true,\n onLotSelected: $setup.onLotSelected\n }, null, 8, [\"estateId\", \"landownerId\", \"stageId\"]))\n : _createCommentVNode(\"\", true),\n ($setup.openBuilderDrop)\n ? (_openBlock(), _createBlock($setup[\"BuilderDropdown\"], {\n key: 2,\n builderPackage: $setup.builderPackage,\n builders: $setup.builderOptions,\n onSelectBuilder: $setup.onSelectBuilder\n }, null, 8, [\"builderPackage\", \"builders\"]))\n : _createCommentVNode(\"\", true),\n ($setup.builderPackage && $setup.openHouseTable)\n ? (_openBlock(), _createBlock($setup[\"HouseTable\"], {\n key: 3,\n houses: $setup.selectedBuilderHouses,\n onSelectHouse: $setup.onSelectHouse\n }, null, 8, [\"houses\"]))\n : _createCommentVNode(\"\", true),\n ($setup.housePackage && $setup.openFacadeOptions)\n ? (_openBlock(), _createBlock($setup[\"FacadeOptions\"], {\n key: 4,\n facades: $setup.selectedHouseFacades,\n onSelectFacade: $setup.onSelectFacade\n }, null, 8, [\"facades\"]))\n : _createCommentVNode(\"\", true),\n ($setup.housePackage && $setup.selectedHouseFacades && $setup.openAddSiteCosts)\n ? (_openBlock(), _createBlock($setup[\"AddSiteCosts\"], {\n key: 5,\n siteCosts: $setup.selectedHouseSiteCosts,\n onAddSiteCosts: $setup.onAddSiteCosts\n }, null, 8, [\"siteCosts\"]))\n : _createCommentVNode(\"\", true),\n ($setup.housePackage && $setup.selectedHouseFacades && $setup.openAddSiteCosts)\n ? (_openBlock(), _createBlock($setup[\"SummaryPackage\"], {\n key: 6,\n project: $setup.estateSelected,\n lot: $setup.lotPackage.name,\n landSize: $setup.lotSelectedSize,\n landPrice: $setup.lotPackage.price,\n homeArea: $setup.selectedHouseArea,\n homePrice: $setup.housePackage.price,\n facadePrice: $setup.facadePackage.price,\n siteCosts: $setup.selectedSiteCosts\n }, null, 8, [\"project\", \"lot\", \"landSize\", \"landPrice\", \"homeArea\", \"homePrice\", \"facadePrice\", \"siteCosts\"]))\n : _createCommentVNode(\"\", true),\n ($setup.housePackage && $setup.selectedHouseFacades && $setup.openAddSiteCosts)\n ? (_openBlock(), _createBlock($setup[\"SavedChanges\"], {\n key: 7,\n landSize: $setup.lotSelectedSize,\n siteCosts: $setup.selectedSiteCosts,\n builderPackage: $setup.builderPackage,\n housePackage: $setup.housePackage,\n facadePackage: $setup.facadePackage,\n floorplanPackage: $setup.floorplanPackage,\n lotPackage: $setup.lotPackage,\n landowerId: $setup.selectedLandownerId,\n estateId: $setup.selectedEstateId,\n estateTitle: $setup.estateSelected\n }, null, 8, [\"landSize\", \"siteCosts\", \"builderPackage\", \"housePackage\", \"facadePackage\", \"floorplanPackage\", \"lotPackage\", \"landowerId\", \"estateId\", \"estateTitle\"]))\n : _createCommentVNode(\"\", true)\n ])\n ], 64))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { computed, onMounted, ref, watch } from \"vue\";\n import store from \"@/store\";\n import { debounce } from \"@/helpers/debounce\";\n import { POSITION, useToast } from \"vue-toastification\";\n import DropDown from \"@/components/ui/dropdown/DropDown.vue\";\n import { EstateInterface } from \"@/types/EstateInterface\";\n import ProjectDropdown from \"@/components/concierge/ProjectDropdown.vue\";\n import AdminEstateStages from \"@/views/admin/estates/AdminEstateStages.vue\";\n import AdminStageLots from \"../stages/AdminStageLots.vue\";\n import { BuildersForLot } from \"@/types/BuilderForLotInterface\";\n import { BuilderDropdownOptionsEnum } from \"@/enums/BuilderDropdownOptionsEnum\";\n import BuilderDropdown from \"@/components/concierge/BuilderDropdown.vue\";\n import HouseTable from \"@/components/concierge/HouseTable.vue\";\n import FacadeOptions from \"@/components/concierge/FacadeOptions.vue\";\n import AddSiteCosts from \"@/components/concierge/AddSiteCosts.vue\";\n import SummaryPackage from \"@/components/concierge/SummaryPackage.vue\";\n import SavedChanges from \"@/components/concierge/SavedChanges.vue\";\n import {\n BuilderPackage,\n FloorplanPackage,\n HousePackage,\n LotPackage,\n FacadePackage,\n } from \"@/types/BuilderQuote\";\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'AdminPackageCreate',\n setup(__props, { expose: __expose }) {\n __expose();\n\n const loading = ref(false);\n const toast = useToast();\n\n const lotPackage = ref({\n lotId: \"\",\n name: \"\",\n price: 0,\n });\n const builderPackage = ref({\n builderId: \"\",\n name: \"\",\n logoUrl: \"\",\n });\n const housePackage = ref({\n houseId: \"\",\n name: \"\",\n price: 0,\n });\n const facadePackage = ref({\n facadeId: \"\",\n name: \"\",\n url: \"\",\n price: 0,\n });\n const floorplanPackage = ref({\n name: \"\",\n url: \"\",\n });\n const estates = ref([]);\n const estateSelected = ref(BuilderDropdownOptionsEnum.SELECT_PROJECT);\n const lotSelectedSize = ref(null);\n const selectedHouseArea = ref(null);\n\n const selectedEstateId = ref(null);\n const selectedLandownerId = ref(null);\n const selectedStageId = ref(null);\n const selectedSiteCosts = ref(null);\n\n const openListLots = ref(false);\n const openBuilderDrop = ref(false);\n const openHouseTable = ref(false);\n const openFacadeOptions = ref(false);\n const openAddSiteCosts = ref(false);\n\n const buildersForLot = ref({\n builders: [],\n });\n\n onMounted(() => {\n getEstates();\n });\n\n watch(\n () => lotPackage.value.lotId,\n () => {\n debounceSearch();\n }\n );\n\n const getEstates = async () => {\n try {\n const res = await store.dispatch(\"estate/getEstates\");\n estates.value = res.data;\n } catch (error) {\n toast.error(\"Error getting estates\");\n } finally {\n loading.value = false;\n }\n };\n\n const getBuildersByLotId = async () => {\n try {\n const res = await store.dispatch(\n \"builder/getBuildersByLotId\",\n lotPackage.value.lotId\n );\n buildersForLot.value = res.data;\n } catch (error) {\n toast.error(\"Error getting builders\");\n } finally {\n loading.value = false;\n }\n };\n\n const debounceSearch = debounce(getBuildersByLotId);\n\n const optionsEstate = computed(() => [\n {\n title: BuilderDropdownOptionsEnum.SELECT_PROJECT,\n id: null,\n landownerId: null,\n },\n ...estates.value.map((estate) => ({\n title: estate.title,\n id: estate._id,\n landownerId: estate?.landownerId?._id,\n })),\n ]);\n\n const builderOptions = computed(() => {\n return [\n {\n title: BuilderDropdownOptionsEnum.SELECT_BUILDER,\n id: null,\n logo: null,\n },\n ...buildersForLot.value.builders.map((builder) => {\n return {\n title: builder.name,\n id: builder._id,\n logo: builder.logo,\n };\n }),\n ];\n });\n\n const selectedBuilderHouses = computed(() => {\n const selectedBuilder = buildersForLot.value.builders.find(\n (builder) => builder._id === builderPackage.value.builderId\n );\n return selectedBuilder ? selectedBuilder.houses : [];\n });\n\n const onSelectEstate = (\n estateTitle: string,\n estateId: string | null,\n landownerId: string | null\n ) => {\n estateSelected.value = estateTitle;\n selectedEstateId.value = estateId;\n selectedLandownerId.value = landownerId;\n openListLots.value = false;\n openBuilderDrop.value = false;\n openHouseTable.value = false;\n openFacadeOptions.value = false;\n };\n\n const onSelectBuilder = (\n builderTitle: string,\n builderId: string,\n builderLogoUrl: string\n ) => {\n builderPackage.value.name = builderTitle;\n builderPackage.value.builderId = builderId;\n builderPackage.value.logoUrl = builderLogoUrl;\n openHouseTable.value =\n builderTitle === BuilderDropdownOptionsEnum.SELECT_BUILDER ? false : true;\n openFacadeOptions.value = false;\n openAddSiteCosts.value = false;\n };\n\n const onToLots = (stageId: string) => {\n openListLots.value = true;\n selectedStageId.value = stageId;\n };\n\n const onLotSelected = (\n lotId: string,\n lotTitle: string,\n lotSize: number,\n lotPrice: number\n ) => {\n lotPackage.value.lotId = lotId;\n lotPackage.value.name = lotTitle;\n lotSelectedSize.value = lotSize;\n lotPackage.value.price = lotPrice;\n openBuilderDrop.value = true;\n openHouseTable.value = false;\n openFacadeOptions.value = false;\n openAddSiteCosts.value = false;\n builderPackage.value.name = BuilderDropdownOptionsEnum.SELECT_BUILDER;\n };\n\n const onSelectHouse = (\n houseId: string,\n area: number,\n basePrice: number,\n floorplanUrl: string,\n floorplanName: string,\n houseName: string\n ) => {\n housePackage.value.houseId = houseId;\n selectedHouseArea.value = area;\n housePackage.value.price = basePrice;\n floorplanPackage.value.url = floorplanUrl;\n floorplanPackage.value.name = floorplanName;\n housePackage.value.name = houseName;\n openFacadeOptions.value = true;\n };\n\n const selectedHouseFacades = computed(() => {\n if (housePackage.value.houseId) {\n const selectedBuilder = buildersForLot.value.builders.find(\n (builder) => builder._id === builderPackage.value.builderId\n );\n if (selectedBuilder) {\n const selectedHouse = selectedBuilder.houses.find(\n (house) => house._id === housePackage.value.houseId\n );\n return selectedHouse ? selectedHouse.facades : [];\n }\n }\n return [];\n });\n\n const onSelectFacade = (\n facadeId: string,\n url: string,\n facadeName: string,\n facadePrice: number\n ) => {\n facadePackage.value.facadeId = facadeId;\n facadePackage.value.url = url;\n facadePackage.value.name = facadeName;\n facadePackage.value.price = facadePrice;\n openAddSiteCosts.value = true;\n };\n\n const selectedHouseSiteCosts = computed(() => {\n if (\n housePackage.value.houseId &&\n buildersForLot.value.builders.length > 0\n ) {\n const selectedBuilder = buildersForLot.value.builders.find(\n (builder) => builder._id === builderPackage.value.builderId\n );\n if (selectedBuilder) {\n const houseIndex = selectedBuilder.houses.findIndex(\n (house) => house._id === housePackage.value.houseId\n );\n if (houseIndex !== -1) {\n const siteCost = selectedBuilder.siteCosts[houseIndex];\n return siteCost !== null ? siteCost : 0;\n }\n }\n }\n return 0;\n });\n\n const onAddSiteCosts = (siteCosts: number) => {\n selectedSiteCosts.value = siteCosts;\n };\n\nconst __returned__ = { loading, toast, lotPackage, builderPackage, housePackage, facadePackage, floorplanPackage, estates, estateSelected, lotSelectedSize, selectedHouseArea, selectedEstateId, selectedLandownerId, selectedStageId, selectedSiteCosts, openListLots, openBuilderDrop, openHouseTable, openFacadeOptions, openAddSiteCosts, buildersForLot, getEstates, getBuildersByLotId, debounceSearch, optionsEstate, builderOptions, selectedBuilderHouses, onSelectEstate, onSelectBuilder, onToLots, onLotSelected, onSelectHouse, selectedHouseFacades, onSelectFacade, selectedHouseSiteCosts, onAddSiteCosts, computed, onMounted, ref, watch, get store() { return store }, get debounce() { return debounce }, get POSITION() { return POSITION }, get useToast() { return useToast }, DropDown, get EstateInterface() { return EstateInterface }, ProjectDropdown, AdminEstateStages, AdminStageLots, get BuildersForLot() { return BuildersForLot }, get BuilderDropdownOptionsEnum() { return BuilderDropdownOptionsEnum }, BuilderDropdown, HouseTable, FacadeOptions, AddSiteCosts, SummaryPackage, SavedChanges, get BuilderPackage() { return BuilderPackage }, get FloorplanPackage() { return FloorplanPackage }, get HousePackage() { return HousePackage }, get LotPackage() { return LotPackage }, get FacadePackage() { return FacadePackage } }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./AdminPackageCreate.vue?vue&type=template&id=62009908&scoped=true&ts=true&lang=pug\"\nimport script from \"./AdminPackageCreate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AdminPackageCreate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AdminPackageCreate.vue?vue&type=style&index=0&id=62009908&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-62009908\"]])\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!./AdminPackageCreate.vue?vue&type=style&index=0&id=62009908&lang=scss&scoped=true\""],"sourceRoot":""}