PageSourceSearch

https://client.provitam.ro/chunk-TUVLIIDU.js

js provitam.ro collected 2026-10-08 09:40:53 UTC 15,333 bytes, 1 lines download raw bytes

1import{a as Ye}from"./chunk-VGXHXGF5.js";import{a as we,b as Ve}from"./chunk-MCNVOOPB.js";import"./chunk-MS4AQ6UA.js";import"./chunk-3ML5VVIG.js";import{a as ve,b as he,c as xe,d as ye,e as Ee,f as Ce,g as Re,h as Me,i as Be,j as Te,l as Ne}from"./chunk-IIGH4JZF.js";import{d as Le,h as De,i as Oe}from"./chunk-YYWA34SU.js";import"./chunk-3K7AX65M.js";import{a as Ae,b as be}from"./chunk-OGJHVHXI.js";import{a as ge,b as Se}from"./chunk-YXXX2LKA.js";import"./chunk-CGKUP577.js";import{b as ne,c as ae}from"./chunk-CGVS4455.js";import{b as Z,c as ee,i as te,l as ie}from"./chunk-S4YFFSRX.js";import{B as W,b as U,d as I,g as q,h as j,m as G,n as X,p as Q,s as z,x as K,z as J}from"./chunk-ZGSJH3XT.js";import"./chunk-6HRZFNRL.js";import{a as C,b as Ie}from"./chunk-AT46BSK3.js";import{a as pe,c as de,g as ce}from"./chunk-247YPBVB.js";import{b as $,d as H}from"./chunk-NFVJ7ROB.js";import{Bb as E,Bc as Y,C as M,Cc as P,Db as h,Eb as _,Nc as k,Pa as a,Pb as o,Qb as d,Rb as b,Sb as L,Ta as g,U as v,Yc as F,Z as w,Zd as re,_a as V,ae as oe,ca as N,cc as m,ce as le,dc as s,de as me,eb as u,ee as se,f as D,fe as ue,he as B,ie as _e,je as fe,l as O,lb as p,ma as x,na as y,vb as r,wb as n,xb as f,yb as S,zb as A}from"./chunk-V7UMLNGI.js";import"./chunk-J3S4UFG7.js";var T=class e{constructor(t,i){this.http=t;this.translate=i}http;translate;base=`${ue.apiUrl}/Ibr`;getByAnalysis(t){return this.http.get(`${this.base}/analysis/${t}`,{withCredentials:!0}).pipe(M(i=>this.handleError(i)))}upsert(t){return this.http.post(this.base,t,{withCredentials:!0}).pipe(M(i=>this.handleError(i)))}delete(t){return this.http.delete(`${this.base}/${t}`,{withCredentials:!0}).pipe(M(i=>this.handleError(i)))}handleError(t){let i=t.error?.message??"IBR_SERVICE_ERRORS.DEFAULT_ERROR",l=this.translate.instant(i),c=l!==i?l:i;return O(()=>new Error(c))}static \u0275fac=function(i){return new(i||e)(N(F),N(B))};static \u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"})};function He(e,t){if(e&1&&(r(0,"span"),o(1),n()),e&2){let i=_();a(),b(" \u2014 ",i.analysisName,"")}}function Ue(e,t){if(e&1&&(r(0,"mat-option",40),o(1),n()),e&2){let i=t.$implicit;p("value",i.id),a(),d(i.name)}}function qe(e,t){e&1&&(r(0,"mat-error"),o(1),m(2,"translate"),n()),e&2&&(a(),b(" ",s(2,1,"ANALYSIS_IBR.ERROR_REQUIRED")," "))}function je(e,t){if(e&1&&(r(0,"mat-option",40),o(1),n()),e&2){let i=t.$implicit;p("value",i),a(),d(i)}}function Ge(e,t){e&1&&(r(0,"mat-error"),o(1),m(2,"translate"),n()),e&2&&(a(),b(" ",s(2,1,"ANALYSIS_IBR.ERROR_REQUIRED")," "))}function Xe(e,t){if(e&1){let i=E();r(0,"button",41),h("click",function(){x(i);let c=_(2);return y(c.cancelEdit())}),r(1,"mat-icon"),o(2,"cancel"),n(),o(3),m(4,"translate"),n()}e&2&&(a(3),b(" ",s(4,1,"ANALYSIS_IBR.BUTTON_CANCEL")," "))}function Qe(e,t){if(e&1){let i=E();r(0,"mat-card",21)(1,"mat-card-content")(2,"form",22),h("ngSubmit",function(){x(i);let c=_();return y(c.onSubmit())}),r(3,"div",23)(4,"mat-form-field",24)(5,"mat-label"),o(6),m(7,"translate"),n(),r(8,"mat-select",25),u(9,Ue,2,2,"mat-option",26),n(),u(10,qe,3,3,"mat-error",3),n(),r(11,"mat-form-field",27)(12,"mat-label"),o(13),m(14,"translate"),n(),r(15,"mat-select",28),u(16,je,2,2,"mat-option",26),n(),u(17,Ge,3,3,"mat-error",3),n(),r(18,"mat-form-field",27)(19,"mat-label"),o(20),m(21,"translate"),n(),f(22,"input",29),n(),r(23,"mat-form-field",27)(24,"mat-label"),o(25),m(26,"translate"),n(),f(27,"input",30),n(),r(28,"mat-form-field",27)(29,"mat-label"),o(30),m(31,"translate"),n(),f(32,"input",31),n(),r(33,"mat-form-field",27)(34,"mat-label"),o(35),m(36,"translate"),n(),f(37,"input",32),n(),r(38,"div",33)(39,"mat-slide-toggle",34),o(40),m(41,"translate"),n()()(),r(42,"div",23)(43,"mat-form-field",24)(44,"mat-label"),o(45),m(46,"translate"),n(),f(47,"textarea",35),n(),r(48,"mat-form-field",24)(49,"mat-label"),o(50),m(51,"translate"),n(),f(52,"textarea",36),n()(),r(53,"div",37)(54,"button",38)(55,"mat-icon"),o(56),n(),o(57),m(58,"translate"),n(),u(59,Xe,5,3,"button",39),n()()()()}if(e&2){let i,l,c=_();a(2),p("formGroup",c.form),a(4),d(s(7,18,"ANALYSIS_IBR.LABEL_METHOD")),a(3),p("ngForOf",c.methods),a(),p("ngIf",(i=c.form.get("methodId"))==null?null:i.hasError("required")),a(3),d(s(14,20,"ANALYSIS_IBR.LABEL_SEX")),a(3),p("ngForOf",c.genders),a(),p("ngIf",(l=c.form.get("gender"))==null?null:l.hasError("required")),a(3),d(s(21,22,"ANALYSIS_IBR.LABEL_MIN_AGE")),a(5),d(s(26,24,"ANALYSIS_IBR.LABEL_MAX_AGE")),a(5),d(s(31,26,"ANALYSIS_IBR.LABEL_MIN_VALUE")),a(5),d(s(36,28,"ANALYSIS_IBR.LABEL_MAX_VALUE")),a(5),b(" ",s(41,30,"ANALYSIS_IBR.LABEL_IS_NORMAL")," "),a(5),d(s(46,32,"ANALYSIS_IBR.LABEL_IBR_DISPLAY")),a(5),d(s(51,34,"ANALYSIS_IBR.LABEL_INFO_DISPLAY")),a(4),p("disabled",c.form.invali
1d||c.isSaving),a(2),d(c.editingId?"save":"add"),a(),b(" ",s(58,36,c.editingId?"ANALYSIS_IBR.BUTTON_UPDATE":"ANALYSIS_IBR.BUTTON_ADD")," "),a(2),p("ngIf",c.editingId)}}function ze(e,t){e&1&&f(0,"mat-progress-bar",42)}function Ke(e,t){if(e&1&&(r(0,"div",43)(1,"mat-icon"),o(2,"error_outline"),n(),r(3,"span"),o(4),n()()),e&2){let i=_();a(4),d(i.errorMessage)}}function Je(e,t){e&1&&(r(0,"th",44),o(1),m(2,"translate"),n()),e&2&&(a(),d(s(2,1,"ANALYSIS_IBR.HEADER_METHOD")))}function We(e,t){if(e&1&&(r(0,"td",45),o(1),n()),e&2){let i=t.$implicit;a(),d(i.methodName)}}function Ze(e,t){e&1&&(r(0,"th",44),o(1),m(2,"translate"),n()),e&2&&(a(),d(s(2,1,"ANALYSIS_IBR.HEADER_SEX")))}function et(e,t){if(e&1&&(r(0,"td",45),o(1),n()),e&2){let i=t.$implicit;a(),d(i.gender)}}function tt(e,t){e&1&&(r(0,"th",44),o(1),m(2,"translate"),n()),e&2&&(a(),d(s(2,1,"ANALYSIS_IBR.HEADER_AGE_RANGE")))}function it(e,t){if(e&1&&(r(0,"td",45),o(1),n()),e&2){let i=t.$implicit;a(),L("",i.minAge," \u2013 ",i.maxAge,"")}}function nt(e,t){e&1&&(r(0,"th",44),o(1),m(2,"translate"),n()),e&2&&(a(),d(s(2,1,"ANALYSIS_IBR.HEADER_VALUE_RANGE")))}function at(e,t){if(e&1&&(r(0,"td",45),o(1),n()),e&2){let i=t.$implicit;a(),L("",i.minValue," \u2013 ",i.maxValue,"")}}function rt(e,t){e&1&&(r(0,"th",44),o(1),m(2,"translate"),n()),e&2&&(a(),d(s(2,1,"ANALYSIS_IBR.HEADER_IS_NORMAL")))}function ot(e,t){e&1&&(r(0,"mat-icon",47),o(1,"check_circle"),n())}function lt(e,t){if(e&1&&(r(0,"td",45),u(1,ot,2,0,"mat-icon",46),n()),e&2){let i=t.$implicit;a(),p("ngIf",i.isNormal)}}function mt(e,t){e&1&&(r(0,"th",44),o(1),m(2,"translate"),n()),e&2&&(a(),d(s(2,1,"ANALYSIS_IBR.HEADER_IBR_DISPLAY")))}function st(e,t){if(e&1&&(r(0,"td",45),o(1),n()),e&2){let i=t.$implicit;a(),d(i.ibrDisplay)}}function pt(e,t){e&1&&(r(0,"th",44),o(1),m(2,"translate"),n()),e&2&&(a(),d(s(2,1,"ANALYSIS_IBR.HEADER_ACTIONS")))}function dt(e,t){if(e&1){let i=E();r(0,"button",50),m(1,"translate"),h("click",function(){x(i);let c=_().$implicit,R=_();return y(R.editRow(c))}),r(2,"mat-icon"),o(3,"edit"),n()()}e&2&&p("matTooltip",s(1,1,"ANALYSIS_IBR.TOOLTIP_EDIT"))}function ct(e,t){if(e&1){let i=E();r(0,"button",51),m(1,"translate"),h("click",function(){x(i);let c=_().$implicit,R=_();return y(R.deleteRow(c))}),r(2,"mat-icon"),o(3,"delete"),n()()}e&2&&p("matTooltip",s(1,1,"ANALYSIS_IBR.TOOLTIP_DELETE"))}function ut(e,t){if(e&1&&(r(0,"td",45),u(1,dt,4,3,"button",48)(2,ct,4,3,"button",49),n()),e&2){let i=_();a(),p("ngIf",i.canEdit),a(),p("ngIf",i.canEdit)}}function _t(e,t){e&1&&f(0,"tr",52)}function ft(e,t){e&1&&f(0,"tr",53)}function It(e,t){e&1&&(r(0,"div",54),o(1),m(2,"translate"),n()),e&2&&(a(),b(" ",s(2,1,"ANALYSIS_IBR.MESSAGE_NO_ITEMS")," "))}var Pe=class e{constructor(t,i,l,c,R,gt,St){this.fb=t;this.route=i;this.router=l;this.ibrService=c;this.analysisService=R;this.translate=gt;this.authService=St}fb;route;router;ibrService;analysisService;translate;authService;analysisId;analysisName="";form;intervals=[];methods=[];displayedColumns=["method","gender","ageRange","valueRange","isNormal","ibrDisplay","actions"];genders=["M","F"];canEdit=!1;editingId=null;loading=!0;isSaving=!1;errorMessage=null;destroy$=new D;ngOnInit(){this.translate.setDefaultLang("ro");let t=localStorage.getItem("app_lang"),i=t==="en"||t==="hu"||t==="ro"?t:"ro";this.translate.use(i),this.canEdit=this.authService.hasRole(C.LABORATORY_NORMAL)||this.authService.hasRole(C.LABORATORY_SUPER)||this.authService.hasRole(C.SALES)||this.authService.hasRole(C.ADMIN),this.canEdit&&(this.displayedColumns=this.displayedColumns),this.analysisId=+this.route.snapshot.paramMap.get("analysisId"),this.buildForm(),this.analysisService.getById(this.analysisId).pipe(v(this.destroy$)).subscribe({next:l=>this.analysisName=l.analysisName,error:()=>{}}),this.analysisService.getMethods().pipe(v(this.destroy$)).subscribe({next:l=>this.methods=l,error:()=>{}}),this.loadIntervals()}buildForm(){this.form=this.fb.group({methodId:[null,I.required],gender:[null,I.required],minAge:[null,I.required],maxAge:[null,I.required],minValue:[null,I.required],maxValue:[null,I.required],isNormal:[!1],ibrDisplay:["",I.maxLength(2e3)],infoDisplay:["",I.maxLength(2e3)]})}loadIntervals(){this.loading=!0,this.errorMessage=null,this.ibrService.getByAnalysis(this.analysisId).pipe(v(this.destroy$)).subscribe({next:t=>{this.intervals=t,this.loading=!1},error:t=>{this.errorMessage=t.message,this.loading=!1}})}editRow(t){this.editingId=t.id,this.form.patchValue({methodId:t.methodId,gender:t.gender?.trim(),minAge:t.minAge,maxAge:t.maxAge,minValue:t.minValue,maxValue:t.maxValue,isNormal:t.isNormal,ibrDisplay:t.ibrDisplay??"",infoDisplay:t.infoDisplay??""})}cancelEdit(){this.editingId=null,this.form.reset({isNormal:!1})}
1onSubmit(){if(this.form.invalid){this.errorMessage=this.translate.instant("ANALYSIS_IBR.ERROR_FORM_INVALID"),this.form.markAllAsTouched();return}this.isSaving=!0,this.errorMessage=null;let t=this.form.getRawValue();this.ibrService.upsert({id:this.editingId,analysisId:this.analysisId,methodId:t.methodId,gender:t.gender,minAge:+t.minAge,maxAge:+t.maxAge,minValue:t.minValue!==""&&t.minValue!==null?+t.minValue:null,maxValue:t.maxValue!==""&&t.maxValue!==null?+t.maxValue:null,isNormal:t.isNormal,ibrDisplay:t.ibrDisplay||null,infoDisplay:t.infoDisplay||null}).pipe(v(this.destroy$)).subscribe({next:()=>{this.isSaving=!1,this.cancelEdit(),this.loadIntervals()},error:i=>{this.isSaving=!1,this.errorMessage=i.message}})}deleteRow(t){confirm(this.translate.instant("ANALYSIS_IBR.CONFIRM_DELETE"))&&this.ibrService.delete(t.id).pipe(v(this.destroy$)).subscribe({next:()=>{this.editingId===t.id&&this.cancelEdit(),this.loadIntervals()},error:i=>this.errorMessage=i.message})}goBack(){this.router.navigate(["/home/analysis-list"])}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static \u0275fac=function(i){return new(i||e)(g(J),g($),g(H),g(T),g(Ye),g(B),g(Ie))};static \u0275cmp=V({type:e,selectors:[["app-analysis-ibr"]],decls:41,vars:15,consts:[[1,"page-container"],[1,"header-actions"],["mat-icon-button","",3,"click","matTooltip"],[4,"ngIf"],["class","form-card",4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","error-message",4,"ngIf"],[1,"desktop-view"],["mat-table","",3,"dataSource","hidden"],["matColumnDef","method"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","gender"],["matColumnDef","ageRange"],["matColumnDef","valueRange"],["matColumnDef","isNormal"],["matColumnDef","ibrDisplay"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","no-data",4,"ngIf"],[1,"form-card"],[3,"ngSubmit","formGroup"],[1,"form-row"],["appearance","outline"],["formControlName","methodId","required",""],[3,"value",4,"ngFor","ngForOf"],["appearance","outline",1,"narrow"],["formControlName","gender","required",""],["matInput","","formControlName","minAge","type","number","step","0.01","required",""],["matInput","","formControlName","maxAge","type","number","step","0.01","required",""],["matInput","","formControlName","minValue","type","number","step","0.01","required",""],["matInput","","formControlName","maxValue","type","number","step","0.01","required",""],[1,"toggle-cell"],["formControlName","isNormal","color","primary"],["matInput","","formControlName","ibrDisplay","rows","2"],["matInput","","formControlName","infoDisplay","rows","2"],[1,"form-actions"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["mat-button","","type","button",3,"click",4,"ngIf"],[3,"value"],["mat-button","","type","button",3,"click"],["mode","indeterminate"],[1,"error-message"],["mat-header-cell",""],["mat-cell",""],["class","check-icon",4,"ngIf"],[1,"check-icon"],["mat-icon-button","","color","primary",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","","color","warn",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","","color","primary",3,"click","matTooltip"],["mat-icon-button","","color","warn",3,"click","matTooltip"],["mat-header-row",""],["mat-row",""],[1,"no-data"]],template:function(i,l){i&1&&(r(0,"div",0)(1,"div",1)(2,"button",2),m(3,"translate"),h("click",function(){return l.goBack()}),r(4,"mat-icon"),o(5,"arrow_back"),n()(),r(6,"h2"),o(7),m(8,"translate"),u(9,He,2,1,"span",3),n()(),u(10,Qe,60,38,"mat-card",4),r(11,"mat-card")(12,"mat-card-content"),u(13,ze,1,0,"mat-progress-bar",5)(14,Ke,5,1,"div",6),r(15,"div",7)(16,"table",8),S(17,9),u(18,Je,3,3,"th",10)(19,We,2,1,"td",11),A(),S(20,12),u(21,Ze,3,3,"th",10)(22,et,2,1,"td",11),A(),S(23,13),u(24,tt,3,3,"th",10)(25,it,2,2,"td",11),A(),S(26,14),u(27,nt,3,3,"th",10)(28,at,2,2,"td",11),A(),S(29,15),u(30,rt,3,3,"th",10)(31,lt,2,1,"td",11),A(),S(32,16),u(33,mt,3,3,"th",10)(34,st,2,1,"td",11),A(),S(35,17),u(36,pt,3,3,"th",10)(37,ut,3,2,"td",11),A(),u(38,_t,1,0,"tr",18)(39,ft,1,0,"tr",19),n()(),u(40,It,3,3,"div",20),n()()()),i&2&&(a(2),p("matTooltip",s(3,11,"ANALYSIS_IBR.TOOLTIP_BACK")),a(5),d(s(8,13,"ANALYSIS_IBR.TITLE")),a(2),p("ngIf",l.analysisName),a(),p("ngIf",l.canEdit),a(3),p("ngIf",l.loading),a(),p("ngIf",!l.loading&&l.errorMessage),a(2),p("dataSource",l.intervals)("hidden",l.loading),a(22),p("matHeaderRowDef",l.displayedColumns),a(),p("matRowDefColumns",l.displayedColumns),a(),p("ngIf",!l.loading&&l.
1intervals.length===0&&!l.errorMessage))},dependencies:[k,Y,P,W,G,U,X,q,j,K,Q,z,ce,pe,de,Ne,ve,xe,Re,ye,he,Me,Ee,Ce,Be,Te,ie,te,Z,ee,ae,ne,Oe,De,Le,le,oe,re,se,me,Ve,we,be,Ae,Se,ge,fe,_e],styles:[".page-container[_ngcontent-%COMP%]{padding:20px}.header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;margin-bottom:16px}.header-actions[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;color:var(--color-primary);font-size:20px}.form-card[_ngcontent-%COMP%]{margin-bottom:16px}.form-row[_ngcontent-%COMP%]{display:flex;gap:16px;flex-wrap:wrap;align-items:center}.form-row[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%]{flex:1;min-width:160px;margin-top:12px}.form-row[_ngcontent-%COMP%]   mat-form-field.narrow[_ngcontent-%COMP%]{flex:0 0 120px;min-width:100px}.toggle-cell[_ngcontent-%COMP%]{display:flex;align-items:center;min-width:140px}.form-actions[_ngcontent-%COMP%]{margin-top:16px;display:flex;gap:10px}.desktop-view[_ngcontent-%COMP%]{overflow-x:auto}table[_ngcontent-%COMP%]{width:100%}.check-icon[_ngcontent-%COMP%]{color:var(--color-primary)}.error-message[_ngcontent-%COMP%], .no-data[_ngcontent-%COMP%]{text-align:center;padding:20px;color:var(--color-text-muted);display:flex;align-items:center;justify-content:center;gap:8px}.error-message[_ngcontent-%COMP%]{color:var(--color-danger)}"]})};export{Pe as AnalysisIbrComponent};

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.