diff --git a/ng6-seed/src/app/AwsService/aws.service.ts b/ng6-seed/src/app/AwsService/aws.service.ts index cea53e5..035b31c 100755 --- a/ng6-seed/src/app/AwsService/aws.service.ts +++ b/ng6-seed/src/app/AwsService/aws.service.ts @@ -551,7 +551,12 @@ export class AwsService { getlocale(){ let session:any = this.shared.getAccessToken() || ""; + if(session && session != "") { return session.idToken.payload.locale; + } + else{ + return session + } } adminchangeData(userData,changeusers){ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html index 17d9904..c105d70 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html @@ -1,4 +1,4 @@ - + @@ -73,8 +73,8 @@

Showing data for last {{common}}. To see older records, please use advanced filter


-
-
+
+
@@ -84,11 +84,15 @@
-
+
{{details.is_child == 0 ? details.applicant_name : 'Add On PD' }}
+
+ {{details.pd_status}} + QC COMPLETED +
@@ -110,8 +114,7 @@
- {{details.pd_status}} - QC COMPLETED +

{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}

@@ -159,9 +162,10 @@ {{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }} {{details.scheduled_on}} - +
+ {{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}
-
+
- - + + +
-
+
{{master.pd_allocated_to | titlecase}}
-
+
{{master.scheduled_on}} @@ -232,22 +233,23 @@ {{addresses.addtional_pd_data[0].pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : addresses.addtional_pd_data[0].pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : addresses.addtional_pd_data[0].pd_status | titlecase}}
- + + - +
-
+
{{addresses.addtional_pd_data[0].pd_allocated_to | titlecase}}
-
+
{{addresses.addtional_pd_data[0].scheduled_on}} 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 0802da7..601524b 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 @@ -19,6 +19,7 @@ import { InitiateAdditionalPdComponent } from './../initiate-additional-pd/initi /**sweet alert */ import Swal from 'sweetalert2'; import { VideoPlayerComponent } from 'app/video-player/video-player.component'; +import { AwsService } from 'app/AwsService/aws.service'; @Component({ selector: 'app-view-pd', @@ -84,6 +85,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { "COMPLETED": 'COMPLETED', "ADD_ON_PENDING": 'ADD_ON_PENDING', "QC_COMPLETED": 'QC_COMPLETED', + "BOUNCED" : 'BOUNCED' }; mandatoryFieldsValidations: any = []; @@ -123,7 +125,8 @@ export class ViewPdComponent implements OnInit, OnDestroy { }; constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder, - private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent) { + private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent, + private _aws:AwsService) { this.notifier = notifier; this.enableStartPD = false; this.roleAccessDetails=this._pd.getRoleAccessDetails(); @@ -500,6 +503,63 @@ else { }) } + /** To update pd officer*/ + selfAllocation() { + const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, { + data: { pdid:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly' }, + disableClose: true, + minWidth: '30%', + // maxWidth: '40%', + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + if (dataresult.update_status == true) { + // return; + let user_id = this._aws.getlocale(); + if(!user_id) { + this.notifier.notify('error',"Something went wrong. Try again!!"); + return; + } + let updateData = { + "pd_id":this.viewID, + "fk_pd_allocated_to":user_id, + } + this._pd.updatePdOfficer(updateData).subscribe( + result => { + if (result.status == 200) { + this.notifier.notify('success', 'PD Allocated Successfully.!'); + this.viewPdDetails(this.viewID) + } + else { + this.notifier.notify('warning', 'Something Went Wrong Try Again.!'); + this.errorMessage = "Something Went Wrong Try Again.!"; + } + }, error => { + this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!'); + this.errorMessage = "Some Thing Wents Wrong Try Again.!"; + // this.dialogRef.close(); + }); + } + }); + + + } + rejectPD() { + const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, { + data: { pdid: this.viewID, pd_status: this.pdStatusCheck.BOUNCED,random_string:this.pdMasterData[0].random_string }, + disableClose: true, + minWidth: '30%', + // maxWidth: '40%', + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + if (dataresult.update_status == true) { + this.viewPdDetails(this.viewID) + // this.router.navigate(['../../../startpd',pdDetails.assigned_pd,this.masterRandomString], { relativeTo: this.route }); + } + }); + } + // updateViewComponent(editBack:string) { diff --git a/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss b/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss index 67cb61b..18502a2 100755 --- a/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss +++ b/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss @@ -196,6 +196,7 @@ @media(max-width:991px) { .body-container { padding: 1rem; + margin-bottom: 0; } html { font-size: 14px; @@ -335,7 +336,7 @@ text-align: center; box-sizing: content-box!important; -ms-flex-direction: column!important; - flex-direction: column!important, ; + flex-direction: column!important ; height: 42px; } .navigation>.mat-list-item>.mat-list-item-content>a>span:not(.menu-badge):not(.menu-caret) { @@ -356,7 +357,7 @@ visibility: visible; } .mat-list-item>.mat-list-item-content>a>.menu-caret, - .mat-list-item>.mat-list-item-content>a>[fxflex], + .mat-list-item>.mat-list-item-content>a>[fxflex] { display: none; }