1"use strict";(self.webpackChunkdemo1=self.webpackChunkdemo1||[]).push([[821],{4821:(ct,C,a)=>{a.r(C),a.d(C,{IctcArtcFindingModule:()=>at});var p=a(9808),D=a(7621),r=a(3075),x=a(7442),k=a(9826),b=a(4107),u=a(6856),M=a(7531),I=a(7423),T=a(508),s=a(8279),N=a(5245),h=a(6087),y=a(5899),g=a(4847),O=a(9943),U=a(5226),Z=a.n(U),_=a(5439),f=a.n(_),t=a(5e3),F=a(8319),Y=a(89),S=a(6115),w=a(7665),v=a(7322);function q(i,n){if(1&i&&(t.TgZ(0,"mat-option",39),t._uU(1),t.qZA()),2&i){const e=n.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.districtName," ")}}function B(i,n){1&i&&(t.TgZ(0,"mat-error"),t._uU(1,"District is required!!!"),t.qZA())}function P(i,n){if(1&i&&(t.TgZ(0,"mat-option",39),t._uU(1),t.qZA()),2&i){const e=n.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.blockName," ")}}function Q(i,n){1&i&&t._UZ(0,"mat-error")}function R(i,n){1&i&&(t.TgZ(0,"th",40),t._uU(1,"District Name "),t.qZA())}function J(i,n){if(1&i&&(t.TgZ(0,"td",41),t._uU(1),t.qZA()),2&i){const e=n.$implicit;t.xp6(1),t.Oqu(null==e.district?null:e.district.districtName)}}function j(i,n){1&i&&(t.TgZ(0,"th",40),t._uU(1,"Health Block Name "),t.qZA())}function $(i,n){if(1&i&&(t.TgZ(0,"td",41),t._uU(1),t.qZA()),2&i){const e=n.$implicit;t.xp6(1),t.Oqu(null==e.block?null:e.block.blockName)}}function E(i,n){1&i&&(t.TgZ(0,"th",40),t._uU(1,"ARTC- Name "),t.qZA())}function z(i,n){if(1&i&&(t.TgZ(0,"td",41),t._uU(1),t.qZA()),2&i){const e=n.$implicit;t.xp6(1),t.Oqu(null==e.userLogin?null:e.userLogin.firstName)}}function G(i,n){1&i&&(t.TgZ(0,"th",40),t._uU(1,"Reporting month and year "),t.qZA())}function L(i,n){if(1&i&&(t.TgZ(0,"td",41),t._uU(1),t.qZA()),2&i){const e=n.$implicit;t.xp6(1),t.AsE("",e.reportingMonth,",",e.year,"")}}function V(i,n){1&i&&(t.TgZ(0,"th",40),t._uU(1,"Total registration in a month"),t.qZA())}function H(i,n){if(1&i&&(t.TgZ(0,"td",41),t._uU(1),t.qZA()),2&i){const e=n.$implicit;t.xp6(1),t.Oqu(e.totalMonthRegistration)}}function X(i,n){1&i&&(t.TgZ(0,"th",40),t._uU(1,"No. of presumptive TB cases referred to NAAT (A)"),t.qZA())}function W(i,n){if(1&i&&(t.TgZ(0,"td",41),t._uU(1),t.qZA()),2&i){const e=n.$implicit;t.xp6(1),t.Oqu(e.presumptiveCasesNumbers)}}function K(i,n){1&i&&(t.TgZ(0,"th",40),t._uU(1,"No. of TB cases diagnosed in NAAT (B =Out of A)"),t.qZA())}function tt(i,n){if(1&i&&(t.TgZ(0,"td",41),t._uU(1),t.qZA()),2&i){const e=n.$implicit;t.xp6(1),t.Oqu(e.diagnosedCasesNumbers)}}function et(i,n){1&i&&t._UZ(0,"tr",42)}function it(i,n){1&i&&t._UZ(0,"tr",43)}function ot(i,n){1&i&&(t.TgZ(0,"tr",44)(1,"td",45),t._uU(2,"No data matching the filter"),t.qZA()())}const nt=function(){return[10,25,100]};let rt=(()=>{class i{constructor(e,o,c,l,d){this.fb=e,this.ictcService=o,this.authService=c,this.districtService=l,this.blockService=d,this.disableBlock=!1,this.disableDistrict=!1,this.displayedColumns=["district","block","userLogin","reportingDate","totalMonthRegistration","presumptiveCasesNumbers","diagnosedCasesNumbers"],this.months=["January","February","March","April","May","June","July","August","September","October","November","December"],this.currentUser=this.authService.currentUserValue}ngOnInit(){this.initializeForm(),this.initializeReportForm(),this.loadInitialData(),this.setupFormSubscriptions()}initializeReportForm(){var e,o;this.form=this.fb.group({districtId:[{value:(null===(e=this.currentUser)||void 0===e?void 0:e.districtId)||"",disabled:this.disableDistrict},[r.kI.required]],blockId:[{value:(null===(o=this.currentUser)||void 0===o?void 0:o.blockId)||"",disabled:this.disableBlock}],startDate:["",r.kI.required],endDate:["",r.kI.required]})}generateReport(){this.form.valid&&Object.assign(Object.assign({},this.form.value),{startDate:f()(this.form.value.startDate).format("YYYY-MM-DD"),endDate:f()(this.form.value.endDate).format("YYYY-MM-DD")})}initializeForm(){var e,o;this.ictcForm=this.fb.group({districtId:[{value:(null===(e=this.currentUser)||void 0===e?void 0:e.districtId)||"",disabled:this.disableDistrict},[r.kI.required]],blockId:[{value:(null===(o=this.currentUser)||void 0===o?void 0:o.blockId)||"",disabled:this.disableBlock}],reportingMonth:["",r.kI.required],totalRegistration:["",[r.kI.required,r.kI.min(0)]],presumptiveDMC:["",[r.kI.required,r.kI.min(0)]],diagnosedMicroscopy:["",[r.kI.required,r.kI.min(0)]],presumptiveNAAT:["",[r.kI.required,r.kI.min(0)]],diagnosedNAAT:["",[r.kI.required,r.kI.min(0)]]})}loadInitialData(){var e,o,c,l,d,m;!(null===(e=this.currentUser)||void 0===e)&&e.stateId&&(this.districts$=this.districtService.getDistricts(this.currentUser.stateId)),((null===(o=this.currentUser)||void 0===o?void 0:o.districtId)||(null===(c=this.currentUser)||void 0===c?void 0:c.blockId))&&(this.getBlocks(null,null===(l=this.currentUser)||void 0===l?void 0:l.districtId),this.disableDistrict=!(null===(d=this.currentUser)||void 0===d||!d.districtId),this.disableBlock=!(null===(m=this.currentUser)||void 0===m||!m.blockId)),this.loadTableData()}setupFormSubscriptions(){var e,o,c,l;null===(e=this.ictcForm.get("diagnosedMicroscopy"))||void 0===e||e.valueChanges.subscribe(()=>{this.updateTotalDiagnosed()}),null===(o=this.ictcForm.get("diagnosedNAAT"))||void 0===o||o.valueChanges.subscribe(()=>{this.updateTotalDiagnosed()}),null===(c=this.ictcForm.get("presumptiveDMC"))||void 0===c||c.valueChanges.subscribe(d=>{const m=this.ictcForm.get("diagnosedMicroscopy");if(m&&null!==d){const A=r.kI.max(d);m.setValidators([r.kI.required,r.kI.min(0),A]),m.updateValueAndValidity()}}),null===(l=this.ictcForm.get("presumptiveNAAT"))||void 0===l||l.valueChanges.subscribe(d=>{const m=this.ictcForm.get("diagnosedNAAT");if(m&&null!==d){const A=r.kI.max(d);m.setValidators([r.kI.required,r.kI.min(0),A]),m.updateValueAndValidity()}})}getBlocks(e,o){const c=o||this.ictcForm.value.districtId;c&&(this.blocks$=this.blockService.getBlocks({districtId:c}))}loadTableData(){this.ictcService.getICTCARTC({}).subscribe({next:e=>{const o=e.map(c=>Object.assign(Object.assign({},c),{reportingMonth:f()().month(c.reportingMonth-1).format("MMMM"),totalDiagnosed:(c.diagnosedMicroscopy||0)+(c.diagnosedNAAT||0)}));this.dataSource=new s.by(o),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort},error:e=>{console.error("Error loading ICTC data:",e),this.showErrorAlert("Failed to load ICTC data")}})}get totalDiagnosed(){var e,o;return(Number(null===(e=this.ictcForm.get("diagnosedMicroscopy"))||void 0===e?void 0:e.value)||0)+(Number(null===(o=this.ictcForm.get("diagnosedNAAT"))||void 0===o?void 0:o.value)||0)}updateTotalDiagnosed(){}onSubmit(){this.ictcForm.valid?Object.assign(Object.assign({},this.ictcForm.value),{totalDiagnosed:this.totalDiagnosed,reportingMonth:f()().month(this.ictcForm.value.reportingMonth).format("M")}):this.markFormGroupTouched(this.ictcForm)}
1markFormGroupTouched(e){Object.values(e.controls).forEach(o=>{o.markAsTouched(),o instanceof r.cw&&this.markFormGroupTouched(o)})}showSuccessAlert(e){Z().fire({icon:"success",title:"Success",text:e,timer:2e3,showConfirmButton:!1})}showErrorAlert(e){Z().fire({icon:"error",title:"Error",text:e})}applyFilter(e){this.dataSource.filter=e.target.value.trim().toLowerCase(),this.dataSource.paginator&&this.dataSource.paginator.firstPage()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(r.qu),t.Y36(F.k),t.Y36(Y.e8),t.Y36(S.R),t.Y36(w.g))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-ictc-artc"]],viewQuery:function(e,o){if(1&e&&(t.Gf(h.NW,5),t.Gf(g.YE,5)),2&e){let c;t.iGM(c=t.CRH())&&(o.paginator=c.first),t.iGM(c=t.CRH())&&(o.sort=c.first)}},decls:69,vars:18,consts:[[1,"card","w-full"],[1,"card-title","my-3","mx-3"],[1,"card-title"],[1,"card-text"],[3,"formGroup"],[1,"d-flex","flex-row","mx-3"],[1,"col-xs-12","col-sm-12","col-md-2"],["appearance","outline",2,"width","100%"],["placeholder","Select District","formControlName","districtId"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["placeholder","Select Block","formControlName","blockId"],[1,"col-xs-12","col-sm-12","col-md-3"],[1,"flex","justify-items-center"],[1,"date-range-container"],[3,"rangePicker"],["matStartDate","","formControlName","startDate","placeholder","Start date"],["matEndDate","","formControlName","endDate","placeholder","End date"],["matIconSuffix","",3,"for"],["picker",""],[1,"col-xs-12","col-sm-12","col-md-2","my-2"],["mat-raised-button","","color","primary",3,"disableRipple","disabled","click"],[1,"card-body"],[1,"table-responsive"],["mat-table","","matSort","",1,"shadow-xl","w-full","h-full",3,"dataSource"],["matColumnDef","district"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","block"],["matColumnDef","userLogin"],["matColumnDef","reportingDate"],["matColumnDef","totalMonthRegistration"],["matColumnDef","presumptiveCasesNumbers"],["matColumnDef","diagnosedCasesNumbers"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],["showFirstLastButtons","",3,"pageSizeOptions"],["paginator",""],[3,"value"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],[1,"mat-row"],["colspan","4",1,"mat-cell"]],template:function(e,o){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"h3",2),t._uU(3,"ARTC Dashboard"),t.qZA(),t.TgZ(4,"p",3),t._uU(5,"Download the raw data report"),t.qZA()(),t.TgZ(6,"form",4)(7,"div",5)(8,"div",6)(9,"mat-form-field",7)(10,"mat-label"),t._uU(11,"District"),t.qZA(),t.TgZ(12,"mat-select",8),t.YNc(13,q,2,2,"mat-option",9),t.ALo(14,"async"),t.qZA(),t.YNc(15,B,2,0,"mat-error",10),t.qZA()(),t.TgZ(16,"div",6)(17,"mat-form-field",7)(18,"mat-label"),t._uU(19,"Block"),t.qZA(),t.TgZ(20,"mat-select",11),t.YNc(21,P,2,2,"mat-option",9),t.ALo(22,"async"),t.qZA()()(),t.TgZ(23,"div",12)(24,"mat-form-field",7)(25,"mat-label"),t._uU(26,"Date range"),t.qZA(),t.TgZ(27,"div",13)(28,"div",14)(29,"mat-date-range-input",15),t._UZ(30,"input",16)(31,"input",17),t.qZA(),t._UZ(32,"mat-datepicker-toggle",18),t.qZA(),t._UZ(33,"mat-date-range-picker",null,19),t.qZA(),t.YNc(35,Q,1,0,"mat-error",10),t.qZA()(),t.TgZ(36,"div",20)(37,"button",21),t.NdJ("click",function(){return o.generateReport()}),t._uU(38,"Download Report"),t.qZA()()()()(),t.TgZ(39,"div",0)(40,"div",22)(41,"div",23)(42,"table",24),t.ynx(43,25),t.YNc(44,R,2,0,"th",26),t.YNc(45,J,2,1,"td",27),t.BQk(),t.ynx(46,28),t.YNc(47,j,2,0,"th",26),t.YNc(48,$,2,1,"td",27),t.BQk(),t.ynx(49,29),t.YNc(50,E,2,0,"th",26),t.YNc(51,z,2,1,"td",27),t.BQk(),t.ynx(52,30),t.YNc(53,G,2,0,"th",26),t.YNc(54,L,2,2,"td",27),t.BQk(),t.ynx(55,31),t.YNc(56,V,2,0,"th",26),t.YNc(57,H,2,1,"td",27),t.BQk(),t.ynx(58,32),t.YNc(59,X,2,0,"th",26),t.YNc(60,W,2,1,"td",27),t.BQk(),t.ynx(61,33),t.YNc(62,K,2,0,"th",26),t.YNc(63,tt,2,1,"td",27),t.BQk(),t.YNc(64,et,1,0,"tr",34),t.YNc(65,it,1,0,"tr",35),t.YNc(66,ot,3,0,"tr",36),t.qZA()(),t._UZ(67,"mat-paginator",37,38),t.qZA()()),2&e){const c=t.MAs(34);t.xp6(6),t.Q6J("formGroup",o.form),t.xp6(7),t.Q6J("ngForOf",t.lcZ(14,13,o.districts$)),t.xp6(2),t.Q6J("ngIf",o.form.controls.districtId.invalid),t.xp6(6),t.Q6J("ngForOf",t.lcZ(22,15,o.blocks$)),t.xp6(8),t.Q6J("rangePicker",c),t.xp6(3),t.Q6J("for",c),t.xp6(3),t.Q6J("ngIf",o.form.controls.startDate.invali
1d),t.xp6(2),t.Q6J("disableRipple",!1)("disabled",o.form.invalid),t.xp6(5),t.Q6J("dataSource",o.dataSource),t.xp6(22),t.Q6J("matHeaderRowDef",o.displayedColumns),t.xp6(1),t.Q6J("matRowDefColumns",o.displayedColumns),t.xp6(2),t.Q6J("pageSizeOptions",t.DdM(17,nt))}},dependencies:[p.sg,p.O5,T.ey,I.lW,u.nW,u.wx,u.zY,u.By,u._g,v.TO,v.KE,v.hX,h.NW,b.gD,g.YE,g.nU,s.BZ,s.fO,s.as,s.w1,s.Dz,s.nj,s.ge,s.ev,s.XQ,s.Gk,s.Ee,r._Y,r.Fj,r.JJ,r.JL,r.sg,r.u,p.Ov],styles:[".date-range-container[_ngcontent-%COMP%]{display:flex;align-items:center}.date-range-container[_ngcontent-%COMP%] mat-datepicker-toggle[_ngcontent-%COMP%]{margin-left:8px}.mat-datepicker-toggle[_ngcontent-%COMP%]{position:absolute;right:.5rem;top:50%;transform:translateY(-50%)}.d-flex[_ngcontent-%COMP%]{gap:5px}table[_ngcontent-%COMP%]{width:100%}.table-responsive[_ngcontent-%COMP%]{display:block;width:100%;overflow-x:auto}.table-responsive[_ngcontent-%COMP%] .mat-table[_ngcontent-%COMP%]{width:100%;max-width:100%;margin-bottom:1rem;display:table;border-collapse:collapse;margin:0}.table-responsive[_ngcontent-%COMP%] .mat-row[_ngcontent-%COMP%], .table-responsive[_ngcontent-%COMP%] .mat-header-row[_ngcontent-%COMP%]{display:table-row}.table-responsive[_ngcontent-%COMP%] .mat-cell[_ngcontent-%COMP%], .table-responsive[_ngcontent-%COMP%] .mat-header-cell[_ngcontent-%COMP%]{word-wrap:initial;display:table-cell;padding:0 5px;line-break:unset;width:auto;white-space:nowrap;overflow:hidden;vertical-align:middle}.form-container[_ngcontent-%COMP%]{padding:20px;max-width:600px;margin:0 auto;background-color:#fff;border-radius:4px;box-shadow:0 2px 4px #0000001a}.full-width[_ngcontent-%COMP%]{width:100%;margin-bottom:15px}.button-container[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:20px} .mat-form-field-required-marker{color:red}input[_ngcontent-%COMP%]::-webkit-outer-spin-button, input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}"]}),i})(),at=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[p.ez,x.m,O.q,r.UX,r.u5,b.LD,u.FA,M.c,I.ot,T.XK,D.M,N.Ps,h.TU,y.Cv,g.JX,s.p0,k.Bz.forChild([{path:"report",component:rt}])]}),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.