1"use strict";(self["webpackChunkrigardo_webapp"]=self["webpackChunkrigardo_webapp"]||[]).push([[759],{3096589:function(e){e.exports=JSON.parse('["ROLE_ADMIN","ROLE_ADMIN_ASSIST","ROLE_HOUSING_AGENT","ROLE_ACCOUNTANT","ROLE_CARETAKER","ROLE_ASSET_MANAGER","ROLE_FACILITY_MANAGER","ROLE_MOVING_INSPECTOR"]')},3768858:function(e,t,r){r.d(t,{A:function(){return d}});var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("treeselect",{attrs:{value:e.vModelValue,options:e.treeSelectOptions,placeholder:e.$t("select"),"default-expand-level":1,disabled:!e.value,"value-consists-of":"BRANCH_PRIORITY","value-format":"object","disable-fuzzy-matching":"",multiple:""},on:{input:e.input}})},i=[],l=(r(5218111),r(5022489),r(9430531),r(7161701),r(3517642),r(9658004),r(6733853),r(845876),r(8432475),r(3515024),r(4731698),r(4116205)),a={props:{initialValue:[Array,String],includeArchived:Boolean},data(){return{options:null,value:null}},computed:{treeSelectOptions(){return[{id:"ALL",label:this.$t("all"),children:this.options?.filter(e=>"PROPERTY_OWNER"===e.entityType).map(e=>({id:e.id,label:e.label,children:this.options.filter(t=>t.parentId===e.id).sort((e,t)=>e.label.localeCompare(t.label,this.$i18n.locale)).map(e=>({id:e.id,label:e.label,property:!0}))})).filter(e=>e.children.length).sort((e,t)=>e.label.localeCompare(t.label,this.$i18n.locale))}]},vModelValue(){return this.value&&this.getSelectedNodes(this.treeSelectOptions[0],new Set(this.value))}},methods:{getSelectedNodes(e,t){if(e.children){let r=!0;const s=e.children.flatMap(e=>{const s=this.getSelectedNodes(e,t);return r&&=s[0]===e,s});return r?[e]:s}return t.has(e.id)?[e]:[]},input(e){this.$emit("input",this.value=e&&this.getProperties(e).map(e=>e.id))},getProperties(e){return e.filter(e=>e.property).concat(e.flatMap(e=>this.getProperties(e.children??[])))}},created(){l.K.getPropertyOwnersAndProperties(this.includeArchived).then(e=>{this.options=e.data,this.value=[this.initialValue].flat(1/0).filter(Boolean)}).catch(e=>console.error(e))}},o=a,n=r(5281656),p=(0,n.A)(o,s,i,!1,null,null,null),d=p.exports},5840759:function(e,t,r){r.r(t),r.d(t,{default:function(){return f}});var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("area-authorizer",{staticClass:"my-4",attrs:{area:"QUICK_LIST_UNIT","show-loading":"","show-not-found":""},on:{authorized:e.load}},[r("b-container",{attrs:{fluid:""}},[e.properties?r("b-card",{staticClass:"mx-auto",staticStyle:{"max-width":"1800px"}},[r("b-card-title",{staticClass:"mb-4"},[r("i",{class:e.icons.PROPERTY}),e._v(" "+e._s(e.$t("listPreTerminatedTenancies"))+" ")]),r("b-card-text",[e._v(e._s(e.$t("listPreTerminatedTenanciesElaborated")))]),r("b-form-row",[r("b-col",{attrs:{sm:"12",md:"6"}},[r("b-form-group",{attrs:{label:e.$t("property")}},[r("property-tree-select",{attrs:{"data-test-id":"special-property-selector","initial-value":e.initialPropertyId,"include-archived":!1,placeholder:e.$t("selectPropertyOrOwner"),"filtered-property-ids":e.filteredPropertyIds},on:{input:e.updateSelectedProperty}})],1)],1),r("b-col",{attrs:{sm:"12",md:"4"}},[r("b-form-group",{attrs:{label:e.$t("filterByUserRole")}},[r("treeselect",{ref:"treeSelect",attrs:{options:e.roleTypeTreeOptions,placeholder:e.$t("select"),multiple:"","value-format":"object","disable-fuzzy-matching":"",clearable:!1,"disable-branch-nodes":!0},on:{input:e.getPropertiesFromUserRole},model:{value:e.selectedRoleType,callback:function(t){e.selectedRoleType=t},expression:"selectedRoleType"}})],1)],1),r("b-col",{attrs:{sm:"12",md:"1","align-self":"end"}},[r("b-form-group",[r("b-button",{attrs:{"data-test-id":"filter-btn",variant:"primary"},on:{click:e.showUnits}}
1,[e._v(e._s(e.$t("select")))])],1)],1)],1),e.init?r("common-table",{attrs:{items:e.tenantList,fields:e.fields,"per-page":[500,1e3],"primary-key":"id","sort-by":"tenancyNumber","empty-text":"emptyText","empty-filtered-text":"emptyFilteredText","search-placeholder":"searchInList",striped:"",small:"","include-filter":"","sticky-header":"70vh"}}):e._e()],1):r("loading-message")],1)],1)},i=[],l=(r(5218111),r(5022489),r(607588),r(7161701),r(368225)),a=r(265096),o=r(6521777),n=r(9765001),p=r(291151),d=r(1795093),c=r.n(d),u=r(2384732),y=r(3768858),m=r(3096589),h=r(2619205),g=r(7269779),b={components:{AreaAuthorizer:a.A,CommonTable:o.Ay,LoadingMessage:u.A,PropertyTreeSelect:y.A},props:{initialPropertyId:String},data(){return{company:null,selectedRoleType:[],roleTypeTreeOptions:[],userList:null,propertyRoleType:m,roleTypeOptions:Object.values(m).map(e=>({value:e.toLowerCase(),text:this.$t(`model.property.list_user_roles.${e}`)})),icons:l,tenancyStatusList:["PENDING","ACTIVE"],selectedPropertyIds:[],allProperties:[],previousSelectedPropertyIds:[],previousProperties:[],date:c()().format("YYYY-MM-DD"),tenancyStatus:null,properties:[],tenantList:null,units:null,allUnits:null,loadingList:!1,init:!1}},computed:{filteredPropertyIds(){return this.properties&&0!==this.properties.length?this.properties.map(e=>e.id):[]},fields(){return[{key:"unitName",label:this.$t("address"),sortable:!0,template:{type:"link",label:e=>e.item.unitName,to:e=>`/units/${e.item.unitId}`}},{key:"privateCommercialType",label:this.$t("type"),formatter:e=>this.$t("model.unit.private_commercial_types."+e),sortable:!0},{key:"legalEntityName",label:this.$t("name"),sortable:!0,template:{type:"link",label:e=>e.item.legalEntityName,to:e=>`/tenancies/${e.item.tenancyId}`}},{key:"tenancyNumber",label:this.$t("tenancyNumber"),sortable:!0,template:{type:"link",label:e=>e.item.tenancyNumber,to:e=>`/tenancies/${e.item.tenancyId}`}},{key:"tenancyStatus",label:this.$t("status"),formatter:e=>this.$t(`model.unit.status.${e}`),sortable:!0,sortByFormatted:!0,template:{headFilter:{enabled:!0}}},{key:"tenancyRentEndDate",label:this.$t("rentEndDate"),sortable:!0,template:{type:"date",format:"L"}},{key:"actions",template:{type:"actions",head:[{type:"export"}]}}]}},methods:{load(){g.B.getCompany().then(e=>{this.company=e.data,this.company&&this.company.id&&p.J.list().then(e=>{this.properties=e.data,this.selectedPropertyIds.length||(this.selectedPropertyIds=this.properties.map(e=>e.id)),this.buildRoleTypeTreeOptions()}).catch(e=>console.error(e))})},showUnits(){this.selectedPropertyIds&&(this.units=null,this.init=!0,n.a.listAllPreTerminatedTenancies(this.selectedPropertyIds,this.date,this.tenancyStatus).then(e=>this.tenantList=e.data).catch(()=>{this.tenantList=[],this.$bvModalExt.msgBoxError()}))},async buildRoleTypeTreeOptions(){const e=Object.values(this.propertyRoleType).map(async e=>{const t=e.toLowerCase();try{const r=await h.D.getUsersByPropertyRole(this.company.id,t),s=r.data.map(e=>({id:`${t}-${e.id}`,label:e.name,originalUserId:e.id,roleId:t,selectable:!0}));return{id:t,label:this.$t(`model.property.list_user_roles.${e}`),selectable:!1,children:s.length>0?s:null,isHidden:!1,isDisabled:!1}}catch(r){return console.error(`Error fetching users for role ${t}:`,r),{id:t,label:this.$t(`model.property.list_user_roles.${e}`),selectable:!1,children:null,isHidden:!1,isDisabled:!1}}});this.roleTypeTreeOptions=await Promise.all(e)},getPropertiesFromUserRole(){if(this.selectedRoleType&&this.selectedRoleType.length>0){const e=this.selectedRoleType[0].roleId,t=this.selectedRoleType.map(e=>e.originalUserId);this.previousProperties=this.properties,this.previousSelectedPropertyIds=this.selectedPropertyIds,p.J.listPropertiesForUser(t,e).then(e=>{this.properties=e.data,this.selectedPropertyIds=this.properties.map(e=>e.id),this.selectedPropertyIds.length>0&&this.showUnits()})}else this.restorePreviousPropertiesAndSelections()},restorePreviousPropertiesAndSelections(){this.previousProperties&&this.previousSelectedPropertyIds?(this.properties=this.previousProperties,this.selectedPropertyIds=this.previousSelectedPropertyIds):p.J.list().then(e=>{this.properties=e.data,this.selectedPropertyIds=this.properties.map(e=>e.id)}).catch(e=>console.error(e)),this.previousProperties=null,this.previousSelectedPropertyIds=null,this.selectedPropertyIds&&this.selectedPropertyIds.length>0&&this.showUnits()},updateSelectedProperty(e){this.selectedPropertyIds=e}},watch:{selectedPropertyId:"showUnits",date:"showUnits",tenancyStatus:"showUnits",selectedRoleType(e){if(e&&0!==e.length){const t=e[0].id.split("-")[0];
1this.roleTypeTreeOptions.forEach(e=>{e.id!==t&&(e.isDisabled=!0,e.isHidden=!0)})}else this.restorePreviousPropertiesAndSelections(),this.roleTypeTreeOptions.forEach(e=>{e.isDisabled=!1,e.isHidden=!1})},properties(e){if(e&&e.length>0){const t=e.map(e=>e.id),r=this.properties.filter(e=>t.includes(e.id));JSON.stringify(r)!==JSON.stringify(this.properties)&&(this.properties=r)}else 0!==this.properties.length&&this.load()}}},A=b,I=r(5281656),P=(0,I.A)(A,s,i,!1,null,null,null),f=P.exports},9765001:function(e,t,r){r.d(t,{a:function(){return i}});var s=r(6655464);const i={getMoveInStatusList(e,t,r){return s.A.get("list/move-in-status-list",{params:{propertyIds:e,date:t,privateCommercialTypes:r}})},moveInReport(e,t,r){return s.A.get(`list/move-in-report/${e}`,{params:{date:t,selectedShowOptions:r}})},moveInReportGenerate(e,t,r,i,l,a,o){return s.A.post(`list/move-in-report-generate/${e}/${t}/${r}`,i,{params:{date:l,selectedShowOptions:a,useNew:o}})},moveOutStatusReport(e){return s.A.get("list/move-out-status",{params:{propertyIds:e}})},collectionStatusReport(e,t){return s.A.get("list/collection-status-date",{params:{propertyIds:e,date:t}})},collectionOrderLinesStatusReport(e,t,r){return s.A.get("list/collection-order_lines-status",{params:{propertyIds:e,dateFrom:t,dateTo:r}})},tenancyBalanceList(e,t,r){return s.A.get("list/tenancy-balance-list",{params:{propertyIds:e,dateFrom:t,dateTo:r}})},getAccountingBalanceList(e,t,r){return s.A.get("list/accounting-balance-list",{params:{propertyId:e,dateFrom:t,dateTo:r}})},getCollectionBalanceList(e,t,r,i,l,a){return s.A.post("list/collection-balance-list",{propertyId:e,fromYearMonth:t,months:r,emptyStatuses:i,accountingSystemStatuses:l,expenseTypeIds:a})},getCollectionCheckList(e,t){return s.A.post("list/collection-check-list",{propertyId:e,expenseTypeIds:t})},futureCollectionReport(e,t,r,i,l){return s.A.get("list/future-collection-list",{params:{propertyIds:e,date:t,numMonths:r,show:i,budget:l}})},allCollectionStatusReport(e){return s.A.get(`list/collection-status/${e}`)},reminderStatusReport(e){return s.A.get("list/reminder-status",{params:{propertyIds:e},timeout:3e5})},unitStatusReport(e){return s.A.get("list/unit-status-report",{params:{propertyId:e},timeout:3e5})},unitStatusList(e,t){return s.A.get("list/unit-status-list",{params:{propertyId:e,date:t}})},unitTenancyStatusList(e){return s.A.get("list/unit-tenancy-status-report",{params:{propertyId:e}})},listUnitBoligsidenStatuses(e){return s.A.post("list/boligsiden-status-list",e)},getRentalList(e){return s.A.get("list/rental-list",{params:{propertyIds:e}})},getPropertyUnitList(e){return s.A.get(`list/property-unit-list/${e}`)},tenancyListForPropertyOwnerReport(e){return s.A.get(`list/property-owner/tenancy-list/${e}`)},getTenantListForms(e,t,r){return s.A.get("list/tenant-list",{params:{propertyIds:e,date:t,tenancyStatus:r}})},getPotentialTenanciesForProperty(e){return s.A.get("list/potential-tenant-list",{params:{propertyIds:e},timeout:3e5})},initialCollectionListReport(e,t,r){return s.A.get("list/tenancy-initial-collection-list",{params:{propertyId:e,startDate:r,includeOrderLines:t}})},getSecurityList(e,t){return s.A.get("list/security-list",{params:{propertyId:e,selectedDate:t}})},acontoListReport(e,t){return s.A.get("list/aconto-list",{params:{propertyId:e,startDate:t}})},paymentListReport(e,t,r){return s.A.get("list/payment-list",{params:{propertyId:e,fromDate:t,toDate:r}})},acontoPeriodListReport(e,t,r){return s.A.get(`list/aconto-list-period/${e}`,{params:{from:t,to:r}})},createReservation(e){return s.A.post("list/rental-list/reservation",e)},terminatedCancelledTenanciesListReport(e,t){return s.A.get("list/terminated-cancelled-tenancies-list",{params:{propertyIds:e,startDate:t}})},emptyUnitsListReport(e,t,r){return s.A.get("list/empty-units-list",{params:{propertyId:e,startDate:t,endDate:r}})},availableUnitsReport(e,t,r){return s.A.get("list/available-units-list",{params:{propertyId:e,startDate:t,includeTestProperties:r}})},baseDataListReport(e){return s.A.get("list/base-data-list",{params:{propertyId:e}})},getCollectionControlList(e){return s.A.get("list/collection-control-list",{params:{propertyId:e}})},listAllAppliances(e,t){return s.A.get("list/appliances",{params:{propertyId:e,size:t}})},lisAllAppointmentsForPropertyUnits(e){return s.A.get("list/appointments",{params:{propertyIds:e}})},listAllDamageReports(e){return s.A.get("list/damage-reports",{params:{propertyIds:e}})},updateBankFieldsForLegaLEntity(e){return s.A.put("list/legal-entity-bank-info",e)},listAllPreTerminatedTenancies(e,t,r){return s.A.get("list/pre-terminations",{params:{propertyIds:e,date:t,tenancyStatus:r}})},getRentProspectBudgetList(e,t){return s.A.get("list/get-rent-prospect-budget-list",{params:{propertyIds:e,startDate:t}})},getRentProspectBudgetYearlyList(e){return s.A.get("list/get-rent-prospect-budget-yearly-list",{params:{propertyIds:e}})},rentOverviewList(e,t){return s.A.get(`/list/rent-overview-list/${e}`,{params:{date:t}})},rentOverviewListMetadata(e){return s.A.get(`/list/rent-overview-list/${e}/metadata`)}}}}]); 2//# sourceMappingURL=759.6760587c.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.