1"use strict";(self.webpackChunkwebapp=self.webpackChunkwebapp||[]).push([[7730],{7730:(Q,p,n)=>{n.r(p),n.d(p,{ClinicHistoryModule:()=>z});var r=n(9808),c=n(218),t=n(5e3);let d=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-clinic-history"]],decls:1,vars:0,template:function(e,o){1&e&&t._UZ(0,"router-outlet")},directives:[c.lC],styles:[""]}),i})();var y=n(5241),a=n(3075),h=n(2654),f=n(13),m=n(5765),C=n(1927),g=n(1769),v=n(5850);function x(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"ui-table",3),t.NdJ("nextPage",function(){return t.CHM(e),t.oxw().table.nextPage()}),t.qZA()}if(2&i){const e=s.ngIf,o=t.oxw();t.Q6J("columns",o.columns)("isLastPage",o.table.isLastPage)("heightOffset",330)("data",e)}}function H(i,s){1&i&&(t.TgZ(0,"div",4),t._UZ(1,"ui-spinner",5),t.qZA()),2&i&&(t.xp6(1),t.Q6J("diameter",80))}let b=(()=>{class i{constructor(e,o){this.therapyService=e,this.router=o,this.table=new y.i(this.therapyService.listTherapiesWithDiary.bind(this.therapyService)),this.columns=[{label:"Paziente/Gruppo",field:"patient",type:"patient_group"},{label:"Tipo terapia",field:"typologyLabel"},{label:"Terapeuta",field:"therapist",type:"therapist"},{label:"",field:"actions",type:"button",buttonLabel:"Visualizza",buttonAction:l=>this.router.navigate(["/therapist/manage/clinic-history",l.id])}],this.searchControl=new a.NI,this.subscription=new h.w}ngOnInit(){this.subscription.add(this.searchControl.valueChanges.pipe((0,f.b)(500)).subscribe(e=>this.table.filterByName(e)))}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(m.C),t.Y36(c.F0))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-clinic-history-list"]],decls:5,vars:5,consts:[["placeholder","Cerca paziente o gruppo","icon","search",1,"mb-8",3,"formControl"],[3,"columns","isLastPage","heightOffset","data","nextPage",4,"ngIf","ngIfElse"],["loading",""],[3,"columns","isLastPage","heightOffset","data","nextPage"],[1,"flex","justify-center","mt-20"],[3,"diameter"]],template:function(e,o){if(1&e&&(t._UZ(0,"ui-input",0),t.YNc(1,x,1,4,"ui-table",1),t.ALo(2,"async"),t.YNc(3,H,2,1,"ng-template",null,2,t.W1O)),2&e){const l=t.MAs(4);t.Q6J("formControl",o.searchControl),t.xp6(1),t.Q6J("ngIf",t.lcZ(2,3,o.table.items$))("ngIfElse",l)}},directives:[C.a,a.JJ,a.oH,r.O5,g.a,v.O],pipes:[r.Ov],styles:[""]}),i})();var u=n(1072),T=n(649),L=n(8034);function Z(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"div",5)(1,"lib-password-wall",6),t.NdJ("access",function(l){return t.CHM(e),t.oxw().access(l)}),t.qZA()()}if(2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("error",e.error)}}function J(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"div",7)(1,"lib-log-item",8),t.NdJ("edit",function(l){return t.CHM(e),t.oxw().onEdit(l)}),t.qZA()()}if(2&i){const e=t.oxw();t.xp6(1),t.Q6J("title","Diario clinico")("log",e.log.content)}}const I=function(){return["/therapist/manage/clinic-history"]},A=[{path:"",component:d,children:[{path:"",component:b},{path:":id",component:(()=>{class i{constructor(e,o){this.route=e,this.therapyService=o}ngOnInit(){this.therapyId=this.route.snapshot.params.id}access(e){this.therapyService.getDiary(this.therapyId,e).subscribe({next:o=>{this.canAccess=!0,this.log=o},error:()=>{this.error=!0}})}onEdit(e){this.therapyService.updateLog(this.therapyId,"diary",e).subscribe()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(c.gz),t.Y36(m.C))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-clinic-history-detail"]],decls:6,vars:4,consts:[[1,"text-base","text-grey-400","font-semibold","inline-flex","items-center",3,"routerLink"],["key","chevron-left",1,"text-grey-400","mr-0.5"],[1,"grid","grid-cols-3"],["class","col-span-3 md:col-span-1 md:col-offset-2 md:col-start-2",4,"ngIf"],["class","flex-h overflow-y-auto",4,"ngIf"],[1,"col-span-3","md:col-span-1","md:col-offset-2","md:col-start-2"],[3,"error","access"],[1,"flex-h","overflow-y-auto"],[3,"title","log","edit"]],template:function(e,o){1&e&&(t.TgZ(0,"a",0),t._UZ(1,"svg-icon",1),t._uU(2," Torna a lista diari clinici\n"),t.qZA(),t.TgZ(3,"div",2),t.YNc(4,Z,2,1,"div",3),t.qZA(),t.YNc(5,J,2,2,"div",4)),2&e&&(t.Q6J("routerLink",t.DdM(3,I)),t.xp6(4),t.Q6J("ngIf",!o.canAccess),t.xp6(1),t.Q6J("ngIf",o.canAccess))},directives:[c.yS,u.bk,r.O5,T.e,L.n],styles:[""]}),i})()}]}];let D=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[[c.Bz.forChild(A)],c.Bz]}),i})();var M=n(3685),F=n(209),O=n(1660),P=n(8080),S=n(1148);let z=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[[r.ez,D,M.g,F.U,u.Kz,O.n,P.w,a.UX,S.F]]}),i})()}}]);
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.