pd allocatin changes

This commit is contained in:
gandhimathi 2018-11-12 15:26:32 +05:30
parent d1ff5dcb83
commit c941efa5ba
4 changed files with 15 additions and 12 deletions

View File

@ -11,9 +11,9 @@
<mat-card-content>
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
<div *ngIf="pdExcutiveList.length > 0" >
<div *ngIf="pdCentralOfficerList.length > 0" >
<div fxLayout="row wrap" fxFlex="100%">
<div fxLayout="row wrap" fxFlex="33.33%" *ngFor="let officer of pdExcutiveList; ">
<div fxLayout="row wrap" fxFlex="33.33%" *ngFor="let officer of pdCentralOfficerList; ">
<!-- <p><mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button>
{{officer.first_name}}
</p>
@ -41,7 +41,7 @@
</div>
</div>
</div>
<mat-list *ngIf="pdExcutiveList.length == 0">
<mat-list *ngIf="pdCentralOfficerList.length == 0">
<mat-list-item>
<p>No executive available.</p>
</mat-list-item>
@ -62,9 +62,9 @@
</mat-card-header>
<mat-card-content>
<div *ngIf="pdCentralOfficerList.length > 0" >
<div *ngIf="pdExcutiveList.length > 0" >
<div fxLayout="row wrap" fxFlex="100%">
<div fxLayout="row wrap" fxFlex="33.33%" *ngFor="let excutive of pdCentralOfficerList">
<div fxLayout="row wrap" fxFlex="33.33%" *ngFor="let excutive of pdExcutiveList">
<mat-card fxFlex="100%">
<mat-card-content style="text-align:center">
<mat-radio-button [value]="excutive" (change)="selectExcutiveOfficer(excutive)"></mat-radio-button>
@ -97,7 +97,7 @@
</mat-list-item>
</mat-radio-group>
</mat-list> -->
<mat-list *ngIf="pdCentralOfficerList.length == 0">
<mat-list *ngIf="pdExcutiveList.length == 0">
<mat-list-item>
<p>No central officer available.</p>
</mat-list-item>

View File

@ -11,8 +11,8 @@ import { PdTrigerService } from '../../../pd-service/pd-triger.service';
})
export class SmartPdAllocationComponent implements OnInit {
public pageTitle: string = "Allocate To Executive";
public pageTitle2: string = "Allocate To Central Officer";
public pageTitle2: string = "Allocate To Executive";
public pageTitle: string = "Allocate To Central Officer";
public _pdAllocationForm: FormGroup;
//public pdOfficerList: any = [];
public pdCentralOfficerList: any = [];
@ -70,7 +70,7 @@ export class SmartPdAllocationComponent implements OnInit {
else {
let updateData = {
"pd_id":this.data.pd_id,
"fk_pd_allocated_to":pdOfficer.fk_user_id,
"central_pd_officer_id":pdOfficer.fk_user_id,
"executive_id":excutiveOfficer.fk_user_id,
}
this._pd.updatePdOfficer(updateData).subscribe(

View File

@ -57,7 +57,7 @@ export class TelePdAllocationComponent implements OnInit {
else {
let updateData = {
"pd_id":this.data.pd_id,
"fk_pd_allocated_to":allocateDate.fk_user_id,
"central_pd_officer_id":allocateDate.fk_user_id,
}
this._pd.updatePdOfficer(updateData).subscribe(
result => {

View File

@ -16,8 +16,11 @@
<!-- <span *ngIf="master.pd_allocated_to" style="color:red;text-align:left" class="fa-1x fa fa-user-secret" matTooltip="PD Officer"
matTooltipPosition="above"></span> -->
<span *ngIf="master.pd_allocated_to" style="color:red;text-align:left"><mat-icon color="primary" class="hover-icon" matTooltip="PD Officer"
matTooltipPosition="above">person</mat-icon>{{master.pd_allocated_to | titlecase}}</span> &nbsp;&nbsp;
<span *ngIf="master.pd_allocated_to && master.fk_pd_type==1" style="color:red;text-align:left"><mat-icon color="primary" class="hover-icon" matTooltip="PD Officer" matTooltipPosition="above">person</mat-icon>{{master.pd_allocated_to | titlecase}}</span>
<span *ngIf="master.executive_name && master.centralofficer && master.fk_pd_type==2" style="color:red;text-align:left"><mat-icon color="primary" class="hover-icon" matTooltip="PD Officer" matTooltipPosition="above">person</mat-icon>{{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}}</span>
<span *ngIf="master.centralofficer && master.fk_pd_type==3" style="color:red;text-align:left"><mat-icon color="primary" class="hover-icon" matTooltip="PD Officer" matTooltipPosition="above">person</mat-icon>{{master.centralofficer | titlecase}}</span>
&nbsp;&nbsp;
<span *ngIf="master.pd_status==pdStatusCheck.SCHEDULED" style="color:red;text-align:left">{{master.pd_status | titlecase}} &nbsp;On&nbsp;{{master.scheduled_on}}</span>
<span *ngIf="master.pd_status!=pdStatusCheck.SCHEDULED && master.pd_status!=pdStatusCheck.QC_COMPLETED " style="color:red;text-align:left">{{master.pd_status | titlecase}}</span>
<span *ngIf="master.pd_status==pdStatusCheck.QC_COMPLETED " style="color:red;text-align:left">QC Completed</span>