PageSourceSearch

https://vet.ge/chunk-E42AJW3S.js

js vet.ge collected 2026-10-02 05:58:29 UTC 8,887 bytes, 1 lines download raw bytes

1import{C as te,F as oe,H as re,I as ne,Ua as ae,ba as me,d as L,l as ie,ua as se}from"./chunk-RNV5H4L3.js";import"./chunk-PBQDPYG6.js";import"./chunk-GZ6E3O3O.js";import"./chunk-ZNZUUEGS.js";import{Aa as A,Ba as $,Da as j,Db as Q,Ea as d,Fb as X,Ga as K,Ia as Y,Ib as Z,Jb as ee,La as q,Qa as H,Xa as U,kb as J,ya as R}from"./chunk-XQM4VZUS.js";import"./chunk-GQBYF67E.js";import{c as O,d as V,f as S,i as W}from"./chunk-QV2QXE5O.js";import"./chunk-JAMC46NG.js";import"./chunk-WIMTBFD2.js";import{J as T,Q as P}from"./chunk-2YK54JWE.js";import{a as N}from"./chunk-KX6WOKIV.js";import{Ac as u,Bc as g,Ea as B,Gb as G,Gd as z,Ka as k,La as x,Lb as C,Nc as p,Oa as w,Oc as I,Pc as h,Yb as l,ba as y,da as le,ec as E,hd as s,id as a,jc as n,kc as m,lc as _,pa as f,pc as D,qb as r,xa as M,ya as v}from"./chunk-CY6DIAHF.js";import{a as F}from"./chunk-G27JW64F.js";import"./chunk-NUMHA4AJ.js";F();z();le();z();function pe(t,c){if(t&1){let e=D();n(0,"div",15)(1,"div",3),_(2,"vet-input",16),s(3,"transloco"),_(4,"vet-input",17),s(5,"transloco"),m(),n(6,"div",3),_(7,"vet-input",18),s(8,"transloco"),m()(),n(9,"div",6)(10,"vet-button",7),u("click",function(){M(e);let o=g(2);return v(o.addCommissionMember())}),p(11),s(12,"transloco"),m()()}t&2&&(r(2),l("placeholder",a(3,4,"programs.first_name")),r(2),l("placeholder",a(5,6,"programs.phone")),r(3),l("placeholder",a(8,8,"programs.program_code_name")),r(4),h(" ",a(12,10,"programs.add")," "))}function de(t,c){if(t&1&&(n(0,"div",8),p(1),m()),t&2){let e=g(2);l("@fadeInOut",void 0),r(),h(" ",e.temporaryErrorMessage()," ")}}function ce(t,c){t&1&&(p(0),s(1,"transloco")),t&2&&h(" ",a(1,1,"shared.noRecords")," ")}function ge(t,c){if(t&1&&(n(0,"div",19)(1,"p"),p(2),m(),n(3,"p"),p(4),m()()),t&2){let e=c.$implicit;r(2),I(e.firstName),r(2),I(e.lastName)}}function he(t,c){if(t&1){let e=D();n(0,"div",20)(1,"vet-icon-button",21),u("click",function(){let o=M(e).$implicit,b=g(2);return v(b.removeCommissionMember(o))}),m()()}}function Ce(t,c){if(t&1){let e=D();n(0,"form",1)(1,"div",2)(2,"div",3)(3,"kendo-label"),_(4,"vet-input",4),s(5,"transloco"),m(),n(6,"kendo-label"),_(7,"vet-input",5),s(8,"transloco"),m()(),n(9,"div",6)(10,"vet-button",7),u("click",function(){M(e);let o=g();return v(o.checkCommissionMember())}),p(11),s(12,"transloco"),m()(),C(13,pe,13,12)(14,de,2,2,"div",8),n(15,"kendo-grid",9),C(16,ce,2,3,"ng-template",10),n(17,"kendo-grid-column",11),s(18,"transloco"),C(19,ge,5,2,"ng-template",12),m(),n(20,"kendo-grid-column",13),s(21,"transloco"),C(22,he,2,0,"ng-template",12),m()(),n(23,"vet-info",14),p(24),s(25,"transloco"),m(),n(26,"div",6)(27,"vet-button",7),u("click",function(){M(e);let o=g();return v(o.saveChanges())}),p(28),s(29,"transloco"),m()()()()}if(t&2){let e=g();l("formGroup",c),r(4),l("placeholder",a(5,18,"programs.id_passport_number")),r(3),l("placeholder",a(8,20,"programs.last_name")),r(4),h(" ",a(12,22,"programs.check")," "),r(2),E(e.isCommissionMemberValid()?13:-1),r(),E(e.temporaryErrorMessage()?14:-1),r(),l("data",e.updatedCommissionMembers())("resizable",!0),r(2),l("title",a(18,24,"programs.commission_members"))("width",200)("minResizableWidth",120),r(3),l("title",a(21,26,"shared.other"))("width",70)("resizable",!1)("minResizableWidth",70)("maxResizableWidth",70),r(4),h(" ",a(25,28,"programs.commission_add_warning")," "),r(4),h(" ",a(29,30,"programs.save")," ")}}var Re=(()=>{class t{constructor(){this.dialogClose=k(),this.dialogCloseWithWarning=k(),this.reloadProgramsWithCommissionMembers=k(),this.programCode=x(),this.programId=x(),this.programName=x(),this.commissionMembers=x(),this.commissionMemberForm=this.createFormGroup(),this.commissionService=f(me),this.destroyRef=f(B),this.userRolesService=f(se),this.toastService=f(ie),this.organisation=this.userRolesService.getOrganisation(),this.isCommissionMemberValid=w(!1),this.updatedCommissionMembers=w([]),this.temporaryErrorMessage=w(null)}ngOnInit(){this.setCommissionMembersGridData(),this.clearTemporaryError()}showTemporaryError(e){this.temporaryErrorMessage.set(e)}clearTemporaryError(){this.commissionMemberForm.valueChanges.pipe(y(()=>{this.temporaryErrorMessage.set(null)}),N(this.destroyRef)).subscribe()}createFormGroup(){return new j({pid:new d("",[R.required]),name:new d("",[R.required,ae]),first_name:new d,last_name:new d,phone:new d,program_code:new d,program_name:new d})}handleClose(){this.dialogClose.emit()}handleCloseWithWarning(){this.dialogCloseWithWarning.emit()}checkCommissionMember(){this.isCommissionMemberValid.set(!1),this.commissionMemberForm.markAllAsTouched();let e=this.commissionMemberForm.value;this.commissionService.findCommissionMember({pid:e.pid,name:e.name,program:this.programId()}).pipe(y({next:i=>{this.validateCommissonMembers()&&(this.isCommissionMemberValid.set(!0),this.commissionMemberForm.patchValue({first_name:i.data?.first_name,last_name:i.data?.last_name,phone:i.data?.phone,program_code:this.programId(),program_name:`${this.programCode()} - ${this.programName()}`}),["first_name","phone","program_code","program_name"].forEach(o=>{this.commissionMemberForm.get(o)?.disable()}))},error:i=>{let o=this.commissionMemberForm.value;o.pid&&o.name&&this.showTemporaryError(i.error.error.message)}}),N(this.destroyRef)).subscribe()}setCommissionMembersGridData(){let e=this.commissionMembers();e&&this.updatedCommissionMembers.set(e)}getCommissionMembersPids(){return this.updatedCommissionMembers().map(e=>e.pid)}getNewCommissionMember(){let e=this.commissionMemberForm.getRawValue();return{pid:e.pid,firstName:e.first_name,lastName:e.last_name,phone:e.phone,name:e.name}}validateCommissonMembers(){let e=this.getNewCommissionMember(),i=this.updatedCommissionMembers();return i.some(o=>o.pid===e.pid)?(this.showTemporaryError(T("programs.member_already_added")),!1):i.length>=6?(this.showTemporaryError(T("programs.commission_member_maximum_warning")),!1):(this.temporaryErrorMessage.set(null),!0)}
1addCommissionMember(){if(this.commissionMemberForm.invalid)return;let e=this.getNewCommissionMember();this.updatedCommissionMembers.update(i=>[...i,e]),this.isCommissionMemberValid.set(!1),this.commissionMemberForm.get("name")?.reset(),this.commissionMemberForm.get("pid")?.reset()}removeCommissionMember(e){this.updatedCommissionMembers.update(i=>i.filter(o=>o.pid!==e.pid))}saveChanges(){if(this.updatedCommissionMembers().length<3){this.showTemporaryError(T("programs.commission_member_minimum_warning"));return}let i={program:this.programId(),pids:this.getCommissionMembersPids()};this.commissionService.createProgramCommission({organisation:this.organisation},i).pipe(y({next:()=>{this.reloadProgramsWithCommissionMembers.emit(),this.dialogClose.emit()}}),N(this.destroyRef)).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=G({type:t,selectors:[["vet-commission-members-dialog"]],inputs:{programCode:[1,"programCode"],programId:[1,"programId"],programName:[1,"programName"],commissionMembers:[1,"commissionMembers"]},outputs:{dialogClose:"dialogClose",dialogCloseWithWarning:"dialogCloseWithWarning",reloadProgramsWithCommissionMembers:"reloadProgramsWithCommissionMembers"},decls:3,vars:6,consts:[[3,"close","width","maxHeight","title"],[3,"formGroup"],[1,"k-display-flex","k-flex-column","k-gap-5"],[1,"k-display-flex","k-gap-4.5","k-flex-1"],["formControlName","pid",3,"placeholder"],["formControlName","name",3,"placeholder"],[1,"k-display-flex","k-align-self-end"],["type","button",3,"click"],[1,"k-text-error","k-display-flex","k-align-items-center","error-message","k-justify-content-center","k-text-center"],[3,"data","resizable"],["kendoGridNoRecordsTemplate",""],[3,"title","width","minResizableWidth"],["kendoGridCellTemplate",""],[3,"title","width","resizable","minResizableWidth","maxResizableWidth"],["variant","warning"],[1,"k-display-flex","k-flex-column","k-gap-4.5"],["formControlName","first_name",3,"placeholder"],["formControlName","phone",3,"placeholder"],["formControlName","program_name",3,"placeholder"],[1,"k-display-flex","k-gap-1"],[1,"k-display-flex","k-align-items-center","k-justify-content-center"],["icon","minusCircleRed","mode","flat","iconSize","small","variant","error",3,"click"]],template:function(i,o){if(i&1&&(n(0,"kendo-dialog",0),s(1,"transloco"),u("close",function(){return o.handleCloseWithWarning()}),C(2,Ce,30,32,"form",1),m()),i&2){let b;l("width",650)("maxHeight",700)("title",a(1,4,"programs.add_commission_member")),r(2),E((b=o.commissionMemberForm)?2:-1,b)}},dependencies:[U,P,H,K,A,$,Y,q,J,ne,ee,X,Q,Z,L,te,re,oe],styles:["[_nghost-%COMP%]{display:block}"],data:{animation:[O("fadeInOut",[W(":enter",[S({opacity:0,transform:"translateY(10px)"}),V("400ms cubic-bezier(0.25, 0.8, 0.25, 1)",S({opacity:1,transform:"translateY(0)"}))]),W(":leave",[V("300ms ease-in",S({opacity:0,transform:"translateY(10px)"}))])])]},changeDetection:0})}}return t})();export{Re as CommissionMembersDialogComponent};

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.