PageSourceSearch

https://hemma.sbc.se/kundportal/chunk-HZLI3CKV.js

js sbc.se collected 2026-09-24 23:32:14 UTC 12,177 bytes, 1 lines download raw bytes

1import{a as O,b as G}from"./chunk-4ZWZOI4P.js";import{$a as b,$h as z,Bh as $,Eb as a,Fb as S,Gb as h,Ka as V,Rb as R,Rc as j,Sh as K,Vb as T,W as g,Wa as l,Wb as L,Ya as d,Yc as N,Zh as q,_ as u,_a as w,ab as y,af as W,ah as k,bb as _,bf as A,cb as i,cc as H,db as n,eb as m,ec as M,ha as P,ka as v,kc as U,m as C,nc as D,pb as p,va as E,yd as B,za as o}from"./chunk-MWOM466B.js";import"./chunk-SI3YDIW4.js";var Q=(()=>{class e{constructor(){this.api=u(G)}getCompletedRoutineInspections(){return C(this.api.get("/dashboard/routine-inspections/completed"))}getCounts(){return C(this.api.get("/dashboard/counts"))}static{this.\u0275fac=function(c){return new(c||e)}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var X=(()=>{class e{constructor(){this.sharedService=u(K),this.apiService=u($),this.toolsService=u(z),this.destroyRef=u(P),this.planimaLink="https://app.planima.se/",this.techServiceIds=[2,11,15,16,29,30,31,37],this._userTechServices=v([]),this._userHasTF=v(!1),this._userHasFS=v(!1),this._userHasMobigo=v(!1),this._tfWithoutR=v(!1),this._mobigoUrl=v(null),this._isLoaded=v(!1),this.userTechServices=this._userTechServices.asReadonly(),this.userHasTF=this._userHasTF.asReadonly(),this.userHasFS=this._userHasFS.asReadonly(),this.userHasMobigo=this._userHasMobigo.asReadonly(),this.tfWithoutR=this._tfWithoutR.asReadonly(),this.mobigoUrl=this._mobigoUrl.asReadonly(),this.isLoaded=this._isLoaded.asReadonly(),this.planimaLinkUrl=this.planimaLink,this.showTechLinks=U(()=>(this._userHasTF()||this._userHasFS()||this._userHasMobigo())&&!this._tfWithoutR()),this.sharedService.clientInfoChange$.pipe(k()).subscribe({next:()=>{this.loadTechServicesData()}}),this.sharedService.clientInfo&&this.loadTechServicesData()}loadTechServicesData(){let t=this.sharedService.clientInfo;if(!t)return;let c=t.client.tags,s=t.client.serviceSubscriptions;this.checkIfUserHasTag(c),this.checkIfClientHasTechServices(s),this.fetchMobigoUrl(t.client.clientId),this._isLoaded.set(!0)}checkIfUserHasTag(t){let c=!1;for(let s of t)if(s.toLowerCase().includes("ej reduca")){c=!0;break}this._tfWithoutR.set(c)}checkIfClientHasTechServices(t){let c=[],s=!1,I=!1,F=!1;t.forEach(f=>{let Y=f.subscriptionEndDate,x=this.toolsService.futureDate(new Date(Y),new Date);if(x&&this.techServiceIds.includes(f.serviceId)){let Z=f.serviceName==="Fastighetsf\xF6rvaltning"?"Teknisk f\xF6rvaltning":f.serviceName;c.push(Z)}x&&f.serviceId===2&&(s=!0),x&&f.serviceId===11&&(I=!0),x&&f.serviceId===38&&(F=!0)}),this._userTechServices.set([...new Set(c)]),this._userHasTF.set(s),this._userHasFS.set(I),this._userHasMobigo.set(F)}fetchMobigoUrl(t){this.apiService.fetch(`mobigoLinks/${t}`).pipe(k(this.destroyRef)).subscribe({next:c=>{this._mobigoUrl.set(c[0]?.data[0]?.url??null)},error:()=>{this._mobigoUrl.set(null)}})}static{this.\u0275fac=function(c){return new(c||e)}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ee=()=>({action:"newCase"}),te=()=>[1,2,3],ie=e=>["/cases",e],ne=(e,r)=>r.id;function oe(e,r){if(e&1&&(i(0,"div",23),a(1),n()),e&2){let t=r.$implicit;o(),S(t)}}function ae(e,r){if(e&1&&(i(0,"div",5),b(1,oe,2,1,"div",23,w),n()),e&2){let t=p();o(),y(t.techServicesService.userTechServices())}}function re(e,r){if(e&1&&(i(0,"a",24),m(1,"oc-p-button",28),n()),e&2){let t=p(2);_("href",t.techServicesService.mobigoUrl(),E)}}function se(e,r){if(e&1&&(l(0,re,2,1,"a",24),i(1,"a",24),m(2,"oc-p-button",25),n(),i(3,"a",26),m(4,"oc-p-button",27),n()),e&2){let t=p();d(t.techServicesService.mobigoUrl()?0:-1),o(),_("href",t.techServicesService.planimaLinkUrl,E)}}function le(e,r){e&1&&(i(0,"a",7),m(1,"oc-p-button",29),n()),e&2&&_("queryParams",T(1,ee))}function de(e,r){e&1&&(i(0,"div",13),m(1,"div",30)(2,"div",31),n())}function ce(e,r){e&1&&(i(0,"div",14),a(1," Ett fel uppstod vid h\xE4mtning av felanm\xE4lningar. "),n())}function me(e,r){if(e&1&&(i(0,"div",34),m(1,"oc-p-badge",35),i(2,"span"),a(3),n()()),e&2){let t=p(2);o(),_("value",R(t.countsResource.value().errorReports.highPriorityCount)),o(2),h(" ",t.countsResource.value().errorReports.highPriorityCount===1?"Kritisk":"Kritiska"," ")}}function pe(e,r){if(e&1&&(i(0,"div",15)(1,"span",32),a(2),n(),i(3,"span",33),a(4),n(),l(5,me,4,3,"div",34),n()),e&2){let t=p();o(2),h(" ",t.countsResource.value().errorReports.count," "),o(2),h(" ",t.countsResource.value().errorReports.count===1?"\xD6ppen felanm\xE4lan":"\xD6ppna felanm\xE4lningar"," "),o(),d(t.countsResource.value().errorReports.highPriorityCount>0?5:-1)}}function ue(e,r){e&1&&(i(0,"div",13),m(1,"div",30)(2,"div",31),n())}function ve(e,r){e&1&&(i(0,"div",14),a(1," Ett fel uppstod vid h\xE4mtning av tillsyner. "),n())}function he(e,r){if(e&1&&(i(0,"div",15)(1,"span",32),a(2),n(),i(3,"span",33),a(4,"Utf\xF6rda tillsyner den h\xE4r m\xE5naden"),n()()),e&2){let t=p();o(2),h(" ",t.countsResource.value().completedRoutineInspections.count," ")}}function fe(e,r){e&1&&(i(0,"div",13),m(1,"div",30)(2,"div",31),n())}function _e(e,r){e&1&&(i(0,"div",14),a(1," Ett fel uppstod vid h\xE4mtning av f\xF6rvaltar\xE4renden. "),n())}function xe(e,r){if(e&1&&(i(0,"div",15)(1,"span",32),a(2),n(),i(3,"span",33),a(4),n()()),e&2){let t=p();o(2),h(" ",t.countsResource.value().propertyMaintenance.count," "),o(2),h(" ",t.countsResource.value().propertyMaintenance.count===1?"\xD6ppet \xE4rende":"\xD6ppna \xE4renden"," ")}}function ge(e,r){e&1&&(i(0,"div",36),m(1,"div",37)(2,"div",38)(3,"div",39),n())}function be(e,r){e&1&&(i(0,"div",22),b(1,ge,4,0,"div",36,w),n()),e&2&&(o(),y(T(0,te)))}function ye(e,r){e&1&&(i(0,"div",14),a(1," Ett fel uppstod vid h\xE4mtning av tillsyner. "),n())}function Se(e,r){e&1&&(i(0,"div",40),a(1,"Inga tillsyner hittades."),n())}function Ce(e,r){if(e&1&&(i(0,"span",46),m(1,"oc-p-badge",35),i(2,"span"),a(3,"Anm\xE4rkningar"),n()()),e&2){let t=p().$implicit;o(),_("value",R(t.messagesCount))}}function Ee(e,r){e&1&&(i(0,"span",47),a(1,"Inga anm\xE4rkningar"),n())}function we(e,r){if(e&1&&(i(0,"span"),a(1),n()),e&2){let t=p().$implicit;o(),S(t.responsibleUserName)}}function Re(e,r){if(e&1&&(i(0,"article",41)(1,"div",42)(2,"span",43),a(3),n(),i(4,"span",44),a(5),H(6,"date"),n()(),i(7,"div")(8,"div",45),l(9,Ce,4,2,"span",46)(10,Ee,2,0,"span",47),l(11,we,2,1,"span"),n()(),m(12,"div",16),i(13,"a",48),a(14," L\xE4s tillsynsrapport "),n()()),e&2){let t=r.$implicit;o(3),S(t.subject),o(2),h(" ",M(6,5,t.completedAt,"yyyy-MM-dd")," "),o(4),d(t.messagesCount>0?9:10),o(2),d(t.responsibleUserName?11:-1),o(2),_("routerLink",L(8,ie,t.ticketId))}}function Te(e,r){if(e&1&&(i(0,"div",22),b(1,Re,15,10,"article",41,ne),n()),e&2){let t=p(2);o(),y(t.completedRoutineInspectionsResource.value())}}function De(e,r){if(e&1&&l(0,Se,2,0,"div",40)(1,Te,3,0,"div",22),e&2){let t=p();d(t.completedRoutineInspectionsResource.value().length===0?0:1)}}var Ze=(()=>{class e{constructor(){this.dashboardService=u(Q),this.techServicesService=u(X),this.configService=u(q),this.completedRoutineInspectionsResource=D({loader:()=>this.dashboardService.getCompletedRoutineInspections()}),this.countsResource=D({loader:()=>this.dashboardService.getCounts()})}static{this.\u0275fac=function(c){return new(c||e)}}static{this.\u0275cmp=V({type:e,selectors:[["app-property-dashboard"]],decls:54,vars:15,consts:[[1,"mx-auto","max-w-[1200px]"],[1,"-mx-[15px]","px-4","pb-8","pt-10","md:px-8","md:pb-12","md:pt-16"],[1,"flex","flex-col","gap-6","md:flex-row","md:items-start","md:justify-between"],[1,"mb-4","block","text-3xl","font-medium","text-[var(--primary-color)]","md:mb-6","md:text-5xl"],[1,"m-0","max-w-[600px]","text-base","md:text-xl"],[1,"mt-4","flex","flex-wrap","items-center","gap-2"],[1,"flex","flex-col","items-stretch","gap-2","md:items-end"],["routerLink","/cases",3,"queryParams"],["routerLink","/misc/contact"],["label","Kontakta oss","severity","secondary","icon","fa fa-address-book",1,"nowrap"],[1,"mt-4","grid","grid-cols-1","gap-4","md:grid-cols-2","lg:grid-cols-3"],[1,"flex","h-auto","min-h-[250px]","flex-col","justify-between","rounded-[10px]","bg-white","p-6","shadow-[0_0_10px_#0000000A]","md:h-[300px]","md:p-8"],[1,"mb-3","p-0","text-2xl"],[1,"animate-pulse"],[1,"rounded-lg","border","border-red-200","bg-red-50","p-4","text-red-700"],[1,"flex","flex-col"],[1,"my-3","h-[1px]","bg-slate-200"],["ocPButton","","severity","primary","variant","outlined","routerLink","/error-reports"],["ocPButton","","severity","primary","variant","outlined","routerLink","/routine-inspections"],["ocPButton","","severity","primary","variant","outlined","routerLink","/property-maintenance"],[1,"mb-4","mt-12","rounded-[10px]","bg-[#ebe9e6]","p-8"],[1,"mb-6","p-0","text-2xl"],[1,"grid","gap-4","md:grid-cols-2","lg:grid-cols-3"],[1,"rounded-full","bg-gray-200","px-3","py-1","text-gray-700"],["target","_blank",3,"href"],["label","Underh\xE5llsplan","severity","secondary","icon","far fa-sign-in-alt",1,"nowrap"],["routerLink","/error-report"],["label","Ny Felanm\xE4lan","severity","secondary",1,"nowrap"],["label","Dina tekniska \xE4renden","severity","secondary","icon","far fa-external-link",1,"nowrap"],["label","L\xE4gg till nytt \xE4rende","severity","secondary","icon","far fa-bell",1,"nowrap"],[1,"mb-2","h-12","w-20","rounded","bg-gray-200"],[1,"h-5","w-32","rounded","bg-gray-200"],[1,"mb-1","text-5xl","font-medium","md:text-7xl"],[1,"text-lg","font-semibold","md:text-xl"],[1,"mt-2","flex","items-center","gap-2"],["severity","dangerMuted",3,"value"],[1,"animate-pulse","rounded-[10px]","bg-gray-50","p-6"],[1,"mb-4","h-6","w-3/4","rounded","bg-gray-200"],[1,"mb-3","h-20","rounded","bg-gray-200"],[1,"h-10","w-full","rounded","bg-gray-200"],[1,"rounded-lg","bg-gray-50","p-6","text-gray-600"],[1,"flex","flex-col","justify-between","rounded-[10px]","bg-white","p-3","shadow-[0_0_10px_#0000000A]"],[1,"mb-2","flex","justify-between","gap-2"],[1,"mb-2","text-2xl","font-semibold"],[1,"inline-flex","whitespace-nowrap","px-2.5","py-1","font-medium"],[1,"mb-2","flex","items-center","justify-between","gap-2"],[1,"flex","items-center","gap-2","font-medium"],[1,"text-gray-600"],["ocPButton","","severity","primary","variant","outlined",1,"w-fit",3,"routerLink"]],template:function(c,s){c&1&&(i(0,"div",0)(1,"header",1)(2,"div",2)(3,"div")(4,"h1",3),a(5," Fastighets\xF6versikt "),n(),i(6,"p",4),a(7," H\xE4r ser du vad som h\xE4nder i fastigheten just nu. Nedan listas era aktiva tekniska tj\xE4nster. "),n(),l(8,ae,3,0,"div",5),n(),i(9,"div",6),l(10,se,5,2),l(11,le,2,2,"a",7),i(12,"a",8),m(13,"oc-p-button",9),n()()()(),i(14,"section",10)(15,"article",11)(16,"div")(17,"h2",12),a(18,"Felanm\xE4lan"),n(),l(19,de,3,0,"div",13),l(20,ce,2,0,"div",14),l(21,pe,6,3,"div",15),n(),i(22,"div"),m(23,"div",16),i(24,"a",17),a(25,"Se alla felanm\xE4lningar"),n()()(),i(26,"article",11)(27,"div")(28,"h2",12),a(29,"Tillsyner"),n(),l(30,ue,3,0,"div",13),l(31,ve,2,0,"div",14),l(32,he,5,1,"div",15),n(),i(33,"div"),m(34,"div",16),i(35,"a",18),a(36," Se alla utf\xF6rda tillsyner "),n()()(),i(37,"article",11)(38,"div")(39,"h2",12),a(40,"F\xF6rvaltar\xE4renden"),n(),l(41,fe,3,0,"div",13),l(42,_e,2,0,"div",14),l(43,xe,5,2,"div",15),n(),i(44,"div"),m(45,"div",16),i(46,"a",19),a(47," Se alla f\xF6rvaltar\xE4renden "),n()()()(),i(48,"section",20)(49,"h2",21),a(50,"Senast utf\xF6rda tillsyner"),n(),l(51,be,3,1,"div",22),l(52,ye,2,0,"div",14),l(53,De,2,1),n()()),c&2&&(o(8),d(s.techServicesService.userTechServices().length>0?8:-1),o(2),d(s.techServicesService.showTechLinks()?10:-1),o(),d(s.techServicesService.tfWithoutR()?11:-1),o(8),d(s.
1countsResource.isLoading()?19:-1),o(),d(s.countsResource.error()?20:-1),o(),d(s.countsResource.hasValue()?21:-1),o(9),d(s.countsResource.isLoading()?30:-1),o(),d(s.countsResource.error()?31:-1),o(),d(s.countsResource.hasValue()?32:-1),o(9),d(s.countsResource.isLoading()?41:-1),o(),d(s.countsResource.error()?42:-1),o(),d(s.countsResource.hasValue()?43:-1),o(8),d(s.completedRoutineInspectionsResource.isLoading()?51:-1),o(),d(s.completedRoutineInspectionsResource.error()?52:-1),o(),d(s.completedRoutineInspectionsResource.hasValue()?53:-1))},dependencies:[N,B,W,A,O,j],encapsulation:2,changeDetection:0})}}return e})();export{Ze as PropertyDashboardView};

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.