PageSourceSearch

https://pdis.org/chunk-HISZ4VH2.js

js pdis.org collected 2026-10-04 04:35:15 UTC 31,333 bytes, 1 lines download raw bytes

1import{a as Ce}from"./chunk-LBTWU7JO.js";import{a as be}from"./chunk-L7YMF43O.js";import{F as he,_ as ge,b as de,r as ue,u as _e,w as fe}from"./chunk-RP7NXCIO.js";import{b as pe}from"./chunk-MZFYDZEP.js";import"./chunk-6WSV3K5H.js";import{K as se,Q as J,R as ce,w as ae}from"./chunk-SRS4Q6TR.js";import{$ as h,Ab as H,Ba as T,Bb as U,C as I,Ca as y,Cb as j,Gb as ne,I as l,J as F,Jb as re,Kb as le,Pb as W,S as f,Ta as V,U as m,Ua as $,Va as G,Vb as me,X as Q,Z as s,_ as n,da as ie,ea as x,fa as g,jb as P,ka as Z,kb as M,mb as E,n as Y,ob as O,pa as q,pb as A,qa as p,qb as B,r as N,ra as C,rb as _,s as ee,sa as oe,v as te,w as v,wb as k,x as S,zb as z}from"./chunk-KVVYFJAW.js";var D=o=>({"is-invalid":o}),R=()=>({width:"100%"});function we(o,a){if(o&1&&(s(0,"option",33),p(1),n()),o&2){let r=a.$implicit;m("ngValue",r.name),l(),C(r.name)}}function xe(o,a){if(o&1&&(s(0,"option",33),p(1),n()),o&2){let r=a.$implicit;m("ngValue",r.name),l(),C(r.name)}}function De(o,a){if(o&1&&(s(0,"option",33),p(1),n()),o&2){let r=a.$implicit;m("ngValue",r.name),l(),C(r.name)}}function Ee(o,a){if(o&1&&(s(0,"option",33),p(1),n()),o&2){let r=a.$implicit;m("ngValue",r.code),l(),C(r.title)}}function Ne(o,a){if(o&1&&(s(0,"option",33),p(1),n()),o&2){let r=a.$implicit;m("ngValue",r.county),l(),C(r.county)}}function Ie(o,a){if(o&1&&(s(0,"option",33),p(1),n()),o&2){let r=a.$implicit;m("ngValue",r.code),l(),C(r.name)}}function qe(o,a){o&1&&(s(0,"div",34),p(1,"Numeric value required. Maximum length is five."),n())}function Te(o,a){o&1&&(s(0,"div",34),p(1,"Invalid format (eg. 12.1234)"),n())}function Ve(o,a){o&1&&(s(0,"div",34),p(1,"Invalid format (eg. 012.1234)"),n())}var ye=(()=>{let a=class a{constructor(){this.zipCodeChange=new I,this.countryCodeChange=new I,this.stateCodeChange=new I,this.countyCodeChange=new I}ngOnInit(){}onCountryCodeChange(){let e=this.generalLabForm.controls.location_country.value;this.countryCodeChange.emit(e)}onStateCodeChange(){let e=this.generalLabForm.controls.location_state.value;this.stateCodeChange.emit(e)}onCountyCodeChange(){this.countyCodeChange.emit()}onZipCodeChange(){let e=this.generalLabForm.controls.location_zip_code.value;e!=null&&e!=""&&e.length>=5&&this.zipCodeChange.emit(e.substring(0,5))}hasFieldError(e){return this.generalLabForm.controls[e].invalid&&this.generalLabForm.controls[e].touched}search_npdnHostList(e){e.query!==void 0&&e.query!==""?this.filtered_npdnHostList=this.getFilteredResultsSet(e.query,this.npdnHostList,"combined_name").slice(0,100):this.filtered_npdnHostList=this.npdnHostList.slice(0,100)}search_suspectedProblemList(e){e.query!==void 0&&e.query!==""?this.filtered_suspectedProblemList=this.getFilteredResultsSet(e.query,this.suspectedProblemList,"suspected_problem").slice(0,100):this.filtered_suspectedProblemList=this.suspectedProblemList.slice(0,100)}clearAutocompleteItem(e){e.value="",e.handleDropdownClick()}getFilteredResultsSet(e,t,i){let d=e.split(" ");return t.filter(u=>u[i].match(new RegExp(d[0],"gi"))).filter(u=>u[i].match(new RegExp(d[1],"gi")))}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=N({type:a,selectors:[["lab-form-general"]],inputs:{generalLabForm:"generalLabForm",diagnosisNeededList:"diagnosisNeededList",sampleSourceList:"sampleSourceList",sampleCategoryList:"sampleCategoryList",sampleMaterialList:"sampleMaterialList",suspectedProblemList:"suspectedProblemList",npdnHostList:"npdnHostList",countryDropdownList:"countryDropdownList",stateDropdownValues:"stateDropdownValues",countyDropdownList:"countyDropdownList"},outputs:{zipCodeChange:"zipCodeChange",countryCodeChange:"countryCodeChange",stateCodeChange:"stateCodeChange",countyCodeChange:"countyCodeChange"},decls:106,vars:54,consts:[["suspected_problem_autocomplete",""],["host_combined_name_autocomplete",""],[1,"row",3,"formGroup"],[1,"col-md-12"],[1,"row"],[1,"input-group","mb-2"],[1,"input-group-text"],["formControlName","diagnosis_needed",1,"form-select",3,"ngClass"],["value","","selected",""],[3,"ngValue",4,"ngFor","ngForOf"],["formControlName","suspected_problem","field","suspected_problem","scrollHeight","300px","placeholder","Enter/select the suspected problem",1,"p-autocomplete1",3,"completeMethod","onFocus","onClear","suggestions","inputStyle","dropdown"],["formControlName","host_combined_name","field","combined_name","scrollHeight","300px","placeholder","Enter a custom host name or select from the dropdown list",1,"p-autocomplete",3,"completeMethod","onFocus","onClear","suggestions","inputStyle","dropdown"],[1,"col-md-6"],["type","text","formControlName","cultivar",1,"form-control",3,"ngClass"],[1,"form-check"],["type","checkbox","formControlName","physical_sample","id","physicalSample","name","physicalSample","title","Check this box if the sample submitted is a physical sample",1,"form-check-input"],["for","physicalSample","title","Check this box if the sample submitted is a physical sample",1,"form-check-label"],["type","text","formControlName","field_id","title","The field ID of this Sample.",1,"form-control",3,"ngClass"],["formControlName","sample_source","title","The source of this Sample.",1,"form-select",3,"ngClass"],["formControlName","source_type","title","The category of this Sample.",1,"form-select",3,"ngClass"],["optionLabel","name","formControlName","sample_type","placeholder","\xA0\xA0select sample material","selectedItemsLabel","\xA0\xA0{0} sample material selected",1,"ngprime-dropdown","p-multiselect-width",3,"options","filter","showToggleAll","showHeader","overlayVisible","maxSelectedLabels"],[1,"col-md-9","col-sm-12"],["type","date","formControlName","date_sample_collected","title","The sample collection date of this Sample.",1,"form-control"],[1,"input-group","mb-4"],["type","date","formControlName","date_physical_sample","title","The date when the physical sample was received.",1,"form-control"],[1,"fieldset-border"],["formControlName","location_state","t
1itle","The location state of this Sample.",1,"form-select",3,"change"],["formControlName","location_county","title","The location county of this Sample.",1,"form-control",3,"change"],["formControlName","location_country","title","The location country of this Sample.",1,"form-select",3,"change"],["type","text","formControlName","location_zip_code","pTooltip","The location zip code of this Sample. Entering zip code will automatically fill the City, County, State, Country, Latitude, and Longitude","title","The location zip code of this Sample. Entering zip code will automatically fill the City, County, State, Country, Latitude, and Longitude","tooltipPosition","top","tooltipEvent","focus",1,"form-control",3,"keyup.enter","blur","ngClass"],["class","invalid-feedback",4,"ngIf"],["type","text","formControlName","latitude","title","The location latitude of this Sample.",1,"form-control",3,"ngClass"],["type","text","formControlName","longitude","title","The location longitude of this Sample.",1,"form-control",3,"ngClass"],[3,"ngValue"],[1,"invalid-feedback"]],template:function(t,i){if(t&1){let d=ie();s(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",3)(4,"div",5)(5,"span",6),p(6,"Diagnosis Needed"),n(),s(7,"select",7)(8,"option",8),p(9,"Select a Diagnosis"),n(),f(10,we,2,2,"option",9),n()(),s(11,"div",5)(12,"span",6),p(13,"Suspected Problem"),n(),s(14,"p-autoComplete",10,0),x("completeMethod",function(c){return v(d),S(i.search_suspectedProblemList(c))})("onFocus",function(c){v(d);let b=q(15);return S(!b.value&&b.handleDropdownClick(c))})("onClear",function(){v(d);let c=q(15);return S(i.clearAutocompleteItem(c))}),n()(),s(16,"div",5)(17,"span",6),p(18,"Host"),n(),s(19,"p-autoComplete",11,1),x("completeMethod",function(c){return v(d),S(i.search_npdnHostList(c))})("onFocus",function(c){v(d);let b=q(20);return S(!b.value&&b.handleDropdownClick(c))})("onClear",function(){v(d);let c=q(20);return S(i.clearAutocompleteItem(c))}),n()()()(),s(21,"div",4)(22,"div",12)(23,"div",5)(24,"span",6),p(25,"Cultivar"),n(),h(26,"input",13),n()(),s(27,"div",12)(28,"div",14),h(29,"input",15),s(30,"label",16),p(31,"Physical Sample"),n()()()(),s(32,"div",4)(33,"div",12)(34,"div",5)(35,"span",6),p(36,"Field/Reference ID"),n(),h(37,"input",17),n()()(),s(38,"div",4)(39,"div",3)(40,"div",5)(41,"span",6),p(42,"Sample Source"),n(),s(43,"select",18)(44,"option",8),p(45,"Select a source"),n(),f(46,xe,2,2,"option",9),n()(),s(47,"div",5)(48,"span",6),p(49,"Sample Category"),n(),s(50,"select",19)(51,"option",8),p(52,"Select a sample category"),n(),f(53,De,2,2,"option",9),n()(),s(54,"div",5)(55,"span",6),p(56,"Sample Material Submitted"),n(),h(57,"p-multiSelect",20),n()()(),s(58,"div",4)(59,"div",21)(60,"div",5)(61,"span",6),p(62,"Date Sample Collected"),n(),h(63,"input",22),n()()(),s(64,"div",4)(65,"div",21)(66,"div",23)(67,"span",6),p(68,"Date Physical Sample Received"),n(),h(69,"input",24),n()()(),s(70,"fieldset",25)(71,"legend",25),p(72,"Sample Collection Location"),n(),s(73,"div",4)(74,"div",12)(75,"div",5)(76,"span",6),p(77,"State"),n(),s(78,"select",26),x("change",function(){return v(d),S(i.onStateCodeChange())}),f(79,Ee,2,2,"option",9),n()(),s(80,"div",5)(81,"span",6),p(82,"County"),n(),s(83,"select",27),x("change",function(){return v(d),S(i.onCountyCodeChange())}),f(84,Ne,2,2,"option",9),n()(),s(85,"div",5)(86,"span",6),p(87,"Country"),n(),s(88,"select",28),x("change",function(){return v(d),S(i.onCountryCodeChange())}),f(89,Ie,2,2,"option",9),n()()(),s(90,"div",12)(91,"div",5)(92,"span",6),p(93,"Zip Code"),n(),s(94,"input",29),x("keyup.enter",function(){return v(d),S(i.onZipCodeChange())})("blur",function(){return v(d),S(i.onZipCodeChange())}),n(),f(95,qe,2,0,"div",30),n(),s(96,"div",5)(97,"span",6),p(98,"Latitude"),n(),h(99,"input",31),f(100,Te,2,0,"div",30),n(),s(101,"div",5)(102,"span",6),p(103,"Longitude"),n(),h(104,"input",32),f(105,Ve,2,0,"div",30),n()()()()()()}t&2&&(m("formGroup",i.generalLabForm),l(7),m("ngClass",y(34,D,i.hasFieldError("diagnosis_needed"))),l(3),m("ngForOf",i.diagnosisNeededList),l(4),Q(T(36,R)),m("suggestions",i.filtered_suspectedProblemList)("inputStyle",T(37,R))("dropdown",!0),l(5),Q(T(38,R)),m("suggestions",i.filtered_npdnHostList)("inputStyle",T(39,R))("dropdown",!0),l(7),m("ngClass",y(40,D,i.hasFieldError("cultivar"))),l(11),m("ngClass",y(42,D,i.hasFieldError("field_id"))),l(6),m("ngClass",y(44,D,i.hasFieldError("sample_source"))),l(3),m("ngForOf",i.sampleSourceList),l(4),m("ngClass",y(46,D,i.hasFieldError("source_type"))),l(3),m("ngForOf",i.sampleCategoryList),l(4),m("options",i.sampleMaterialList)("filter",!1)("showToggleAll",!1)("showHeader",!1)("overlayVisible",!1)("maxSelectedLabels",2),l(22),m("ngForOf",i.stateDropdownValues),l(5),m("ngForOf",i.countyDropdownList),l(5),m("ngForOf",i.countryDropdownList),l(5),m("ngClass",y(48,D,i.hasFieldError("location_zip_code"))),l(),m("ngIf",i.generalLabForm.get("location_zip_code").hasError("pattern")),l(4),m("ngClass",y(50,D,i.hasFieldError("latitude"))),l(),m("ngIf",i.generalLabForm.get("latitude").hasError("pattern")),l(4),m("ngClass",y(52,D,i.hasFieldError("longitude"))),l(),m("ngIf",i.generalLabForm.get("longitude").hasError("pattern")))},dependencies:[V,$,G,U,j,M,P,H,O,A,k,z,de,_e,fe],styles:[".p-dropdown-width[_ngcontent-%COMP%]{width:80%}.p-autocomplete[_ngcontent-%COMP%]{width:90%}.p-autocomplete1[_ngcontent-%COMP%]{width:75%}
1fieldset.fieldset-border[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.125);padding:.75rem 1.25rem;border-radius:5px;margin:0 0 1.5em!important;-webkit-box-shadow:0px 0px 0px 0px #000;box-shadow:0 0 #000}legend.fieldset-border[_ngcontent-%COMP%]{font-size:1em!important;text-align:left!important;width:auto;padding:2px 15px;border:1px solid rgba(0,0,0,.125);background-color:#e9ecef}"]});let o=a;return o})();var X=o=>({"is-invalid":o});function Ge(o,a){o&1&&(s(0,"span"),h(1,"img",8),p(2,"\xA0"),n())}function Pe(o,a){if(o&1&&(s(0,"div")(1,"div",10),h(2,"input",11),s(3,"label",12),p(4),n()()()),o&2){let r=g(),e=r.$implicit,t=r.index,i=g().index;l(2),Z("id","chktypelistbox",i,"",t,""),m("formControlName",e.answer_column_name)("checked",e.answer_column_value=="true"),l(),Z("for","chktypelistbox",i,"",t,""),l(),C(e.element_display_name)}}function Me(o,a){if(o&1&&(s(0,"span",18),p(1),n()),o&2){let r=g(2).$implicit;l(),C(r.element_display_name)}}function Oe(o,a){if(o&1&&h(0,"input",19),o&2){let r=g(2).$implicit,e=g(3);m("formControlName",r.answer_column_name)("ngClass",y(2,X,e.hasFieldError(r.answer_column_name)))}}function Ae(o,a){if(o&1&&h(0,"textarea",20),o&2){let r=g(2).$implicit,e=g(3);m("formControlName",r.answer_column_name)("ngClass",y(2,X,e.hasFieldError(r.answer_column_name)))}}function ke(o,a){o&1&&(s(0,"span",21),h(1,"i",22),n())}function ze(o,a){if(o&1&&(s(0,"div",13),f(1,Me,2,1,"span",14)(2,Oe,1,4,"input",15)(3,Ae,1,4,"textarea",16)(4,ke,2,0,"span",17),n()),o&2){let r=g().$implicit,e=g().$implicit;l(),m("ngIf",e.question!=r.element_display_name),l(),m("ngIf",r.multiline==null),l(),m("ngIf",r.multiline==1),l(),m("ngIf",r.req_field==1)}}function He(o,a){if(o&1&&(s(0,"span",18),p(1),n()),o&2){let r=g(2).$implicit;l(),C(r.element_display_name)}}function Ue(o,a){if(o&1&&(s(0,"option",25),p(1),n()),o&2){let r=a.$implicit;m("ngValue",r.choice_display_name),l(),C(r.choice_display_name)}}function je(o,a){o&1&&(s(0,"span",21),h(1,"i",22),n())}function Re(o,a){if(o&1&&(s(0,"div",13),f(1,He,2,1,"span",14),s(2,"select",23),f(3,Ue,2,2,"option",24),n(),f(4,je,2,0,"span",17),n()),o&2){let r=g().$implicit,e=g().$implicit,t=g(2);l(),m("ngIf",e.question!=r.element_display_name),l(),m("formControlName",r.answer_column_name)("ngClass",y(5,X,t.hasFieldError(r.answer_column_name))),l(),m("ngForOf",t.getLabForm_ChoicesList(r.id_master_elements_pdis2)),l(),m("ngIf",r.req_field==1)}}function Qe(o,a){if(o&1&&(s(0,"div"),f(1,Pe,5,9,"div",6)(2,ze,5,4,"div",9)(3,Re,5,7,"div",9),n()),o&2){let r=a.$implicit;l(),m("ngIf",r.type=="checkbox"),l(),m("ngIf",r.type=="textbox"),l(),m("ngIf",r.type=="listbox")}}function Ze(o,a){if(o&1&&(s(0,"div",5),f(1,Ge,3,0,"span",6),s(2,"label")(3,"b"),p(4),n()(),f(5,Qe,4,3,"div",7),n()),o&2){let r=a.$implicit,e=g(2);l(),m("ngIf",r.npdn_phase==2),l(3),C(r.question),l(),m("ngForOf",e.getLabForm_ElementsList(r.id_master_questions_pdis2))}}function Be(o,a){if(o&1&&(s(0,"div",3),f(1,Ze,6,3,"div",4),n()),o&2){let r=g();m("formGroup",r.specificLabForm),l(),m("ngForOf",r.labForm_QuestionsList)}}var ve=(()=>{let a=class a{constructor(e){this._fb=e}ngOnInit(){}ngOnChanges(e){if(e.specificLabFormData&&this.specificLabFormData!==null&&this.specificLabFormData!==void 0){let t=this.specificLabFormData.map(c=>this.getSelectedProperties(c,["id_master_questions_pdis2","question","npdn_phase"]));this.labForm_QuestionsList=this.removeDuplicates(t,"id_master_questions_pdis2");let i=this.specificLabFormData.map(c=>this.getSelectedProperties(c,["id_master_questions_pdis2","id_master_elements_pdis2","element_display_name","type","req_field","multiline","answer_column_name","answer_column_value"]));this.labForm_ElementsList=this.removeDuplicates(i,"id_master_elements_pdis2");let d=this.specificLabFormData.map(c=>this.getSelectedProperties(c,["id_master_elements_pdis2","choice_display_name"]));this.labForm_ChoicesList=d;let u=this.specificLabFormData.map(c=>this.getSelectedProperties(c,["id_master_elements_pdis2","answer_column_name","answer_column_value","req_field"]));this.labForm_AnswersList=this.removeDuplicates(u,"id_master_elements_pdis2"),this.createSpecificLabFormControls()}}createSpecificLabFormControls(){this.labForm_AnswersList!==null&&this.labForm_AnswersList!==void 0&&this.labForm_AnswersList.forEach(e
1=>{this.specificLabForm.addControl(e.answer_column_name,this._fb.control(e.answer_column_value)),e.req_field==1&&this.specificLabForm.controls[e.answer_column_name].setValidators(E.required)})}hasFieldError(e){return this.specificLabForm.controls[e].invalid&&this.specificLabForm.controls[e].touched}getLabForm_ElementsList(e){return this.labForm_ElementsList!==null&&this.labForm_ElementsList!==void 0?this.labForm_ElementsList.filter(t=>t.id_master_questions_pdis2==e):this.labForm_ElementsList}getLabForm_ChoicesList(e){if(this.labForm_ChoicesList!==null&&this.labForm_ChoicesList!==void 0)return this.labForm_ChoicesList.filter(t=>t.id_master_elements_pdis2==e)}getSelectedProperties(e,t){return t.map(i=>i in e?{[i]:e[i]}:{}).reduce((i,d)=>Object.assign(i,d),{})}removeDuplicates(e,t){return e.filter((i,d,u)=>u.map(c=>c[t]).indexOf(i[t])===d)}};a.\u0275fac=function(t){return new(t||a)(F(ne))},a.\u0275cmp=N({type:a,selectors:[["lab-form-specific"]],inputs:{labFormName:"labFormName",specificLabForm:"specificLabForm",specificLabFormData:"specificLabFormData"},features:[te],decls:4,vars:2,consts:[[1,"fieldset-border"],[1,"legend-border"],["class","scroll-content",3,"formGroup",4,"ngIf"],[1,"scroll-content",3,"formGroup"],["class","question-wrapper mb-2",4,"ngFor","ngForOf"],[1,"question-wrapper","mb-2"],[4,"ngIf"],[4,"ngFor","ngForOf"],["src","../../../../../../assets/Icons/P2_16.jpg","alt","NPDN Phase 2 Field icon"],["class","input-group mb-2",4,"ngIf"],[1,"form-check","form-check-inline"],["type","checkbox",1,"form-check-input",3,"formControlName","id","checked"],[1,"form-check-label",3,"for"],[1,"input-group","mb-2"],["class","input-group-text",4,"ngIf"],["type","text","class","form-control",3,"formControlName","ngClass",4,"ngIf"],["class","form-control h-100","rows","5",3,"formControlName","ngClass",4,"ngIf"],["class","input-group-text text-danger",4,"ngIf"],[1,"input-group-text"],["type","text",1,"form-control",3,"formControlName","ngClass"],["rows","5",1,"form-control","h-100",3,"formControlName","ngClass"],[1,"input-group-text","text-danger"],["aria-hidden","true","alt","Asterisk icon","title","This is a required field.",1,"bi","bi-asterisk"],[1,"form-select",3,"formControlName","ngClass"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"]],template:function(t,i){t&1&&(s(0,"fieldset",0)(1,"legend",1),p(2),n(),f(3,Be,2,2,"div",2),n()),t&2&&(l(2),oe("Lab Form - ",i.labFormName," "),l(),m("ngIf",i.labForm_QuestionsList))},dependencies:[V,$,G,U,j,M,P,H,O,A,k,z],styles:["fieldset.fieldset-border[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.125);padding:.75rem 1.25rem;border-radius:5px;margin:0 0 1.5em!important;-webkit-box-shadow:0px 0px 0px 0px #000;box-shadow:0 0 #000}legend.legend-border[_ngcontent-%COMP%]{font-size:1em!important;text-align:left!important;width:auto;padding:2px 15px;border:1px solid rgba(0,0,0,.125);background-color:#e9ecef}.scroll-content[_ngcontent-%COMP%]{max-height:500px;overflow-y:auto;padding:.25rem}"]});let o=a;return o}
1)();var Se=(()=>{let a=class a{constructor(e,t,i,d,u,c,b,L){this._sampleDashboard=e,this._sampleQueuesService=t,this._sharedService=i,this._authenticationService=d,this._userService=u,this._notificationService=c,this._activatedRoute=b,this._messageService=L,this.defaultCountry="US",this.defaultState="-99",this.defaultCounty="Unknown"}ngOnInit(){this.currentlyLoggedUser=this._authenticationService.getCurrentlyLoggedUser(),this._activatedRoute.parent!==null&&(this.subscription=this._activatedRoute.parent.parent.paramMap.subscribe(e=>{this.id_req_queue=e.get("id_req_queue")})),this.createNewGeneralLabForm(),this.createNewSpecificLabForm(),this.getReqQueueSampleDetail(this.id_req_queue),this.getSpecificLabForm(this.id_req_queue),this.getCountryDropdownList(),this.getStatesDropdownList(this.defaultCountry),this.getSuspectedProblemList(this.currentlyLoggedUser.user_id),this.getNpdnHostCodeList(this.currentlyLoggedUser.user_id),this.getDiagnosisNeededList(),this.getSampleSourceList(),this.getSampleCategoryList(),this.getSampleMaterialList()}ngOnDestroy(){this.subscription.unsubscribe()}createNewGeneralLabForm(){this.generalLabForm=new B({id_req_queue:new _(this.id_req_queue,E.required),diagnosis_needed:new _,suspected_problem:new _,host_combined_name:new _,cultivar:new _,physical_sample:new _(!0),field_id:new _,sample_source:new _,source_type:new _,sample_type:new _,date_sample_collected:new _,date_physical_sample:new _,location_state:new _,location_county:new _,location_country:new _,location_zip_code:new _("",E.pattern("[0-9]{1,5}")),latitude:new _("",E.pattern("[0-9]{2}[.]{0,1}[0-9]{0,4}")),longitude:new _("",E.pattern("(-|)[0-9]{2,3}[.]{0,1}[0-9]{0,4}")),user_id:new _(this.currentlyLoggedUser.user_id),id_session_log:new _(this.currentlyLoggedUser.id_session_log)})}createNewSpecificLabForm(){this.specificLabForm=new B({})}onSaveLabFormSubmit(){this.generalLabForm.valid&&this.specificLabForm.valid?this.saveGeneralAndSpecificLabFormData():J.validateAllFormFields(this.generalLabForm),J.validateAllFormFields(this.specificLabForm)}saveGeneralAndSpecificLabFormData(){let e=this.generalLabForm.value,t="",i="";typeof e.suspected_problem=="object"&&e.suspected_problem!==null?t=e.suspected_problem.suspected_problem:t=e.suspected_problem,typeof e.host_combined_name=="object"&&e.host_combined_name!==null?i=e.host_combined_name.combined_name:i=e.host_combined_name;let d="";Array.isArray(e.sample_type)&&e.sample_type.forEach(c=>{d+=c.name+";"});let u={id_req_queue:e.id_req_queue,diagnosis_needed:e.diagnosis_needed,suspected_problem:t,host_combined_name:i,cultivar:e.cultivar,physical_sample:e.physical_sample==!0?1:0,field_id:e.field_id,sample_source:e.sample_source,source_type:e.source_type,sample_type:d,date_sample_collected:e.date_sample_collected,date_physical_sample:e.date_physical_sample,location_state:e.location_state,location_county:e.location_county,location_country:e.location_country,location_zip_code:e.location_zip_code,latitude:e.latitude,longitude:e.longitude,user_id:e.user_id,id_session_log:e.id_session_log};this._sampleDashboard.UpdateGeneralLabForm(u).subscribe({next:c=>{c.code==1e3?(this._sampleDashboard.GetSampleDashboardProfile$(this.id_req_queue),this.updateSpecificLabForm()):this._messageService.add({severity:"info",summary:c.status,detail:c.message})},error:c=>{this._notificationService.notify(`${c.status} - ${c.message}`)}})}updateSpecificLabForm(){let e=this.specificLabForm.value,t=Object.assign({id_req_queue:this.id_req_queue,user_id:this.currentlyLoggedUser.user_id,id_session_log:this.currentlyLoggedUser.id_session_log},e),i=Object.assign({id_req_queue:this.id_req_queue,user_id:this.currentlyLoggedUser.user_id,id_session_log:this.currentlyLoggedUser.id_session_log},e),d=2780;Object.getOwnPropertyNames(e).forEach(c=>{+c.substring(1)>d?delete t[c]:delete i[c]}),this._sampleDashboard.UpdateSpecificLabFormDataP1(t).subscribe({next:c=>{c.code==1e3?this.UpdateSpecificLabFormPhase2(i):this._messageService.add({severity:"info",summary:c.status,detail:c.message})},error:c=>{this._notificationService.notify(`${c.status} - ${c.message}`)}})}UpdateSpecificLabFormPhase2(e){this._sampleDashboard.UpdateSpecificLabFormDataP2(e).subscribe({next:t=>{t.code==1e3?(this._sampleQueuesService.GetAllSampleQueuesDataSet(this.currentlyLoggedUser.user_id),this._messageService.add({severity:"success",summary:t.status,detail:"Lab form has been saved successfully"})):this._messageService.add({severity:"info",summary:t.status,detail:t.message})},error:t=>
1{this._notificationService.notify(`${t.status} - ${t.message}`)}})}getReqQueueSampleDetail(e){this._sampleDashboard.GetSampleDashboardProfile(e).subscribe({next:t=>{this.currentSampleDetail=t,this.labFormName=t.lab_form_name,this.getCountyDropdownList(t.location_state);let i=t.sample_type,d=[];i!=""&&i!=null&&i.split(";").forEach(L=>{L!=""&&L!=null&&d.push({name:L})});let u="",c="";t.suspected_Problem!==null&&t.suspected_Problem!==""&&(u={id_institutions:"",suspected_problem:t.suspected_Problem}),t.host_combined_name!==null&&t.host_combined_name!==""&&(c={common_name:"",taxonomic_name:"",combined_name:t.host_combined_name,npdn_host_code:""}),this.generalLabForm.patchValue({id_req_queue:this.id_req_queue,diagnosis_needed:t.diagnosis_needed,suspected_problem:u,host_combined_name:c,cultivar:t.cultivar,field_id:t.field_id,sample_source:t.sample_source,source_type:t.source_type,sample_type:d,date_sample_collected:t.date_sample_collected,date_physical_sample:t.date_physical_sample,physical_sample:t.physical_sample}),this.updateSampleCollectionLocation(this.id_req_queue)},error:t=>{this._notificationService.notify(`${t.status} - ${t.message}`)}})}getSpecificLabForm(e){setTimeout(()=>{this._notificationService.showLoadingBar(!0)}),this._sampleDashboard.GetSpecificLabForm(e).subscribe({next:t=>{this.specificLabFormData=t},error:t=>{this._notificationService.notify(`${t.status} - ${t.message}`),this._notificationService.showLoadingBar(!1)},complete:()=>{this._notificationService.showLoadingBar(!1)}})}updateSampleCollectionLocation(e){let t="",i="",d="",u="",c="",b="",L=!0;this._sampleDashboard.GetSampleSubmitter(e).subscribe({next:w=>{this.currentSampleDetail.location_country!=null&&this.currentSampleDetail.location_country!=""?(d=this.currentSampleDetail.location_country,L=!1):d=w[0].country,this.currentSampleDetail.location_state!=null&&this.currentSampleDetail.location_state!=""?(t=this.currentSampleDetail.location_state,L=!1):t=w[0].state,this.currentSampleDetail.location_county!=null&&this.currentSampleDetail.location_county!=""?(i=this.currentSampleDetail.location_county,L=!1):i=w[0].county,this.currentSampleDetail.location_zip_code!=null&&this.currentSampleDetail.location_zip_code!=""?u=this.currentSampleDetail.location_zip_code:L&&(u=w[0].zip_code),this.currentSampleDetail.latitude!=null&&this.currentSampleDetail.latitude!=""&&(this.currentSampleDetail.latitude=="0"?c="":c=this.currentSampleDetail.latitude),this.currentSampleDetail.longitude!=null&&this.currentSampleDetail.longitude!=""&&(this.currentSampleDetail.longitude=="0"?b="":b=this.currentSampleDetail.longitude),L&&w[0].zip_code!=null&&w[0].zip_code!=""?this.onZipCodeChange(w[0].zip_code):(this.getCountyDropdownList(t),this.generalLabForm.patchValue({location_zip_code:u,location_country:d,location_state:t,location_county:i,latitude:c,longitude:b}))},error:w=>{this._notificationService.notify(`${w.status} - ${w.message}`)}})}getSuspectedProblemList(e){this._sharedService.GetSuspectedProblemList(e).subscribe({next:t=>{this.suspectedProblemList=t},error:t=>{this._notificationService.notify(`${t.status} - ${t.message}`)}})}getNpdnHostCodeList(e){this._sharedService.GetNpdnHostCodeList(e).subscribe({next:t=>{this.npdnHostList=t},error:t=>{this._notificationService.notify(`${t.status} - ${t.message}`)}})}getDiagnosisNeededList(){this._sharedService.GetDiagnosisNeededList().subscribe({next:e=>{this.diagnosisNeededList=e},error:e=>{this._notificationService.notify(`${e.status} - ${e.message}`)}})}getSampleSourceList(){this._sharedService.GetSampleSourceList().subscribe({next:e=>{this.sampleSourceList=e},error:e=>{this._notificationService.notify(`${e.status} - ${e.message}`)}})}getSampleCategoryList(){this._sharedService.GetSampleCategoryList().subscribe({next:e=>{this.sampleCategoryList=e},error:e=>{this._notificationService.notify(`${e.status} - ${e.message}`)}})}getSampleMaterialList(){this._sharedService.GetSampleMaterialList().subscribe({next:e=>{this.sampleMaterialList=e},error:e=>{this._notificationService.notify(`${e.status} - ${e.message}`)}})}onZipCodeChange(e){this._userService.GetZipCodeAddress(e).subscribe({next:t=>{t!=null||t!=null?(this.getStatesDropdownList(this.defaultCountry),this.getCountyDropdownList(t.state),this.generalLabForm.patchValue({location_zip_code:e,location_country:this.defaultCountry,location_state:t.state,location_county:t.county,latitude:t.latitude,longitude:t.longitude}
1)):this._notificationService.notify("Sorry !! We couldn't find address detail for zipcode : "+e)},error:t=>{this._notificationService.notify(`${t.status} - ${t.message}`)}})}onCountryCodeChange(e){this.countyDropdownList=[{county:this.defaultCounty}],this.generalLabForm.patchValue({location_county:this.defaultCounty}),this._userService.GetAllStateList(e).subscribe({next:t=>{this.stateDropdownValues=t,this.generalLabForm.patchValue({location_state:this.defaultState,location_zip_code:"",latitude:"",longitude:""})},error:t=>{this._notificationService.notify(`${t.status} - ${t.message}`)}})}onStateCodeChange(e){this._userService.GetCountyList(e).subscribe({next:t=>{this.countyDropdownList=t,this.generalLabForm.patchValue({location_county:this.defaultCounty,location_zip_code:"",latitude:"",longitude:""})},error:t=>{this._notificationService.notify(`${t.status} - ${t.message}`)}})}onCountyCodeChange(){this.generalLabForm.patchValue({location_zip_code:"",latitude:"",longitude:""})}getCountryDropdownList(){this._userService.GetCountryList().subscribe({next:e=>{this.countryDropdownList=e},error:e=>{this._notificationService.notify(`${e.status} - ${e.message}`)}})}getStatesDropdownList(e){this._userService.GetAllStateList(e).subscribe({next:t=>{this.stateDropdownValues=t},error:t=>{this._notificationService.notify(`${t.status} - ${t.message}`)}})}getCountyDropdownList(e){this._userService.GetCountyList(e).subscribe({next:t=>{this.countyDropdownList=t},error:t=>{this._notificationService.notify(`${t.status} - ${t.message}`)}})}};a.\u0275fac=function(t){return new(t||a)(F(Ce),F(ce),F(be),F(me),F(he),F(re),F(le),F(ae))},a.\u0275cmp=N({type:a,selectors:[["app-lab-form-detail"]],decls:14,vars:13,consts:[[1,"card","footer-margin"],[1,"card-header"],[1,"card-body"],[1,"row"],[1,"col-xl-6","col-lg-12","col-md-12"],[3,"zipCodeChange","countryCodeChange","stateCodeChange","countyCodeChange","generalLabForm","countryDropdownList","stateDropdownValues","countyDropdownList","diagnosisNeededList","sampleSourceList","sampleCategoryList","sampleMaterialList","suspectedProblemList","npdnHostList"],[3,"labFormName","specificLabForm","specificLabFormData"],[1,"col-md-12"],["type","button","pButton","","icon","bi bi-database","iconPos","left","label","Save","title","Update and save the Lab Form details","alt","Save button",2,"float","left",3,"click"],["position","top-center"]],template:function(t,i){t&1&&(s(0,"div",0)(1,"div",1)(2,"b"),p(3,"Lab Form"),n()(),s(4,"div",2)(5,"div",3)(6,"div",4)(7,"lab-form-general",5),x("zipCodeChange",function(u){return i.onZipCodeChange(u)})("countryCodeChange",function(u){return i.onCountryCodeChange(u)})("stateCodeChange",function(u){return i.onStateCodeChange(u)})("countyCodeChange",function(){return i.onCountyCodeChange()}),n()(),s(8,"div",4),h(9,"lab-form-specific",6),n()(),s(10,"div",3)(11,"div",7)(12,"button",8),x("click",function(){return i.onSaveLabFormSubmit()}),n()()()()(),h(13,"p-toast",9)),t&2&&(l(7),m("generalLabForm",i.generalLabForm)("countryDropdownList",i.countryDropdownList)("stateDropdownValues",i.stateDropdownValues)("countyDropdownList",i.countyDropdownList)("diagnosisNeededList",i.diagnosisNeededList)("sampleSourceList",i.sampleSourceList)("sampleCategoryList",i.sampleCategoryList)("sampleMaterialList",i.sampleMaterialList)("suspectedProblemList",i.suspectedProblemList)("npdnHostList",i.npdnHostList),l(2),m("labFormName",i.labFormName)("specificLabForm",i.specificLabForm)("specificLabFormData",i.specificLabFormData))},dependencies:[se,ue,ye,ve],styles:[".card.footer-margin[_ngcontent-%COMP%]{margin-bottom:60px}"]});let o=a;return o}
1)();var Je=[{path:"",component:Se}],xt=(()=>{let a=class a{};a.\u0275fac=function(t){return new(t||a)},a.\u0275mod=ee({type:a}),a.\u0275inj=Y({imports:[pe,ge,W.forChild(Je),W]});let o=a;return o})();export{xt as LabFormsModule};

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.