From b29fcf20423a437162e527476f7da0fcf6f189e3 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Fri, 6 Nov 2020 14:39:21 +0530 Subject: [PATCH] Fairoj : template changes, copyright year text change and issue fixes --- ng6-seed/src/app/AwsService/aws.service.ts | 2 +- .../manage-pd/list-pd/list-pd.component.ts | 8 + .../pd-status-change-dialogue.component.ts | 38 +-- .../dynamic-form/dynamic-form.component.html | 2 +- .../dynamic-question-template.component.ts | 14 +- .../list-pd/start-pd/start-pd.component.html | 2 +- .../list-pd/start-pd/start-pd.component.ts | 6 +- .../list-pd/view-pd/view-pd.component.ts | 2 +- .../app/session/login/login-component.html | 2 +- .../assets/data/SMC_CREDIT_TEMPLATES/17.json | 271 ++++++++++++++++++ .../assets/data/SMC_CREDIT_TEMPLATES/18.json | 240 +--------------- .../assets/data/SMC_CREDIT_TEMPLATES/19.json | 260 +++++++++++++---- .../assets/data/SMC_CREDIT_TEMPLATES/20.json | 215 -------------- 13 files changed, 537 insertions(+), 525 deletions(-) create mode 100644 ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/17.json delete mode 100644 ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/20.json diff --git a/ng6-seed/src/app/AwsService/aws.service.ts b/ng6-seed/src/app/AwsService/aws.service.ts index e501610..cea53e5 100755 --- a/ng6-seed/src/app/AwsService/aws.service.ts +++ b/ng6-seed/src/app/AwsService/aws.service.ts @@ -176,7 +176,7 @@ export class AwsService { return Observable.create(observe=>{ this.shared.getCurrentUser().signOut(); - + localStorage.clear(); observe.next(); observe.complete(); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts index 98db493..5006dad 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts @@ -63,7 +63,15 @@ export class ListPdComponent implements OnInit, OnDestroy { // after view call all tabs component ngAfterViewInit() { + let entity_id = localStorage.getItem('LocalSetEntity') + if(entity_id) { this.allTabC.loadPDDetails(); + } + else{ + setTimeout(()=>{ + this.allTabC.loadPDDetails(); + },2000) + } } // view pd list in map view diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts index a97b3d3..1eb2fa3 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts @@ -35,25 +35,27 @@ export class PdStatusChangeDialogueComponent implements OnInit { if(this.data.pd_status=='COMPLETED'){ let params: any={}; params.pd_id = this.data.pdid; + this.Loading = false; + this.CompletenessCheck = true; - this.pd.pdFormsCompletenessCheck(this.data.pdid).subscribe(result => { - if (result.dataStatus === true) { - if(result.records.length > 0){ - this.completeness_message = result.msg ; - this.dialoge_subcontent = result.records; - this.Loading = false; - } - else{ - this.CompletenessCheck = true; - this.Loading = false; - this.pd.getPDCompleteDetails(params).subscribe(result => { - if (result.dataStatus === true) { - this.enableAddonPD = result.records.address_count>0 ? true: false; - } - }); - } - } - }); + // this.pd.pdFormsCompletenessCheck(this.data.pdid).subscribe(result => { + // if (result.dataStatus === true) { + // if(result.records.length > 0){ + // this.completeness_message = result.msg ; + // this.dialoge_subcontent = result.records; + // this.Loading = false; + // } + // else{ + // this.CompletenessCheck = true; + // this.Loading = false; + // this.pd.getPDCompleteDetails(params).subscribe(result => { + // if (result.dataStatus === true) { + // this.enableAddonPD = result.records.address_count>0 ? true: false; + // } + // }); + // } + // } + // }); } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.html index 026b9b4..ae0b690 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.html @@ -50,7 +50,7 @@ --> diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts index f0b4b2c..68f300c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts @@ -28,6 +28,7 @@ export class DynamicQuestionTemplateComponent implements OnInit { constructor(private quesService:QuesFormService,private _fb:FormBuilder) { } ngOnInit() { + this.parent_ques = this.currFormArrayObj if(this.parent_ques.type == '9' && this.parent_ques.answers && this.parent_ques.answers.length > 0) { this.autoCompleteAns =this.formGroupN.get(this.parent_ques.question_key).valueChanges.pipe( startWith(''), @@ -42,7 +43,7 @@ export class DynamicQuestionTemplateComponent implements OnInit { this.parent_ques = this.currFormArrayObj if(this.json_answers!=null && this.json_answers != undefined && this.json_answers) { // console.log("ddddddddddddddd",this.json_answers[this.parent_ques.question_key],this.parent_ques) - setTimeout(()=>{ + // setTimeout(()=>{ console.clear() console.log(this.json_answers,this.parent_ques.question_key) if(this.json_answers!=null && this.json_answers != undefined && this.json_answers && !this.group_key) { @@ -80,14 +81,15 @@ export class DynamicQuestionTemplateComponent implements OnInit { // this.onChangeProperty({value:this.json_answers[this.parent_ques.question_key]},this.parent_ques,'') // },1000) // this.formGroupN.patchValue(this.json_answers) - }) + // }) // this.formGroupN.get(this.parent_ques.question_key).patchValue(this.json_answers[this.parent_ques.question_key]) // this.onChangeProperty({value:this.json_answers[this.parent_ques.question_key]},this.parent_ques,'') - setTimeout(()=>{ - this.json_answers = null - },700) + // setTimeout(()=>{ + // this.json_answers = null + // },700) } + // console.log(this.parent_ques,this.formGroupN,this.whole_json ,this.json_answers); // debugger; @@ -160,7 +162,7 @@ export class DynamicQuestionTemplateComponent implements OnInit { console.log(sec_control); // this.fileredSearchValue=[] - if( sec_control.answers!= null && sec_control.answers.length > 0){ + if(sec_control && sec_control.answers!= null && sec_control.answers.length > 0){ // this.creatSubField(sec_control,event.value) } //FOR API CALLS diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html index 6b24c40..12cefb4 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html @@ -17,7 +17,7 @@
- + {{quesIndex+1}}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts index c9efb56..fef8ed8 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts @@ -109,12 +109,12 @@ export class StartPdComponent implements OnInit, OnDestroy { // this.categoryList=data.records.question_answers; let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1); this.mainApplicantName = filterApplicantName.length > 0 ? filterApplicantName[0].applicant_name : ''; - this.currentPDStatus = data.records.pdmaster_details.pd_status=='INPROGRESS' ? true : data.records.pdmaster_details.pd_status=='SCHEDULED' ? true :data.records.pdmaster_details.pd_status=='ALLOCATED' ? true : false; + this.currentPDStatus = data.records.pdmaster_details[0].pd_status=='INPROGRESS' ? true : data.records.pdmaster_details[0].pd_status=='SCHEDULED' ? true :data.records.pdmaster_details[0].pd_status=='ALLOCATED' ? true : false; // this.categoryFormButtons = Object.keys(data.records.template_forms).map((item)=>data.records.template_forms[item]).filter(item=>item.isAnswerable===true); this.categoryFormButtons = data.records.template_details // this.categoryFormButtons = this.categoryFormButtons.filter(item=>item.isAnswerable===true); this.actualQuestions = this.categoryFormButtons.length; - let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.isAnswered===true); + let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.is_answered==='1'); this.answeredQuestions = getAnsweredFormsCount.length; this.pdFullDetails = data.records; // VENDOR FORM ANSWER FETCH STATUS START(SMART PD ONLY) @@ -155,7 +155,7 @@ export class StartPdComponent implements OnInit, OnDestroy { data: { pdid: this.startPD, pd_status: status ,random_string:this.randomString,pd_type:this.pdMasterList.fk_pd_type }, disableClose: true, minWidth:'30%', - maxWidth:'40%', + // maxWidth:'40%', }); dialogRef.afterClosed() .subscribe(dataresult => { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts index 1bcb301..6b0be19 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts @@ -300,7 +300,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { data: { pdid: pdDetails.assigned_pd, pd_status: this.pdStatusCheck.INPROGRESS,random_string:this.pdMasterData[0].random_string }, disableClose: true, minWidth: '30%', - maxWidth: '40%', + // maxWidth: '40%', }); dialogRef.afterClosed() .subscribe(dataresult => { diff --git a/ng6-seed/src/app/session/login/login-component.html b/ng6-seed/src/app/session/login/login-component.html index e03f910..77f02d7 100755 --- a/ng6-seed/src/app/session/login/login-component.html +++ b/ng6-seed/src/app/session/login/login-component.html @@ -42,7 +42,7 @@