PD allocation UI

This commit is contained in:
saravanakumarkandasami 2018-10-30 18:29:26 +05:30
parent 42a78a1633
commit 52071781be
3 changed files with 25 additions and 12 deletions

View File

@ -17,7 +17,7 @@
<mat-card fxFlex="100%"> <mat-card fxFlex="100%">
<mat-card-content style="text-align:center"> <mat-card-content style="text-align:center">
<mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button> <mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button>
<img [src]="officer.profile_url" alt="No Image" style="border-radius:50%;width:50%"><br> <img [src]="officer.profile_url ||'https://image.ibb.co/mGjZB9/usernew.png'" alt="No Image" style="border-radius:50%;width:50%"><br>
<span matBadge="{{officer.count}}" matBadgeOverlap="false" matBadgeColor="warn">{{officer.first_name}}</span> <span matBadge="{{officer.count}}" matBadgeOverlap="false" matBadgeColor="warn">{{officer.first_name}}</span>
<br> <br>
<span>{{officer.mobile_no}}</span> <span>{{officer.mobile_no}}</span>
@ -30,7 +30,7 @@
</div> </div>
<mat-list *ngIf="pdOfficerList.length == 0"> <mat-list *ngIf="pdOfficerList.length == 0">
<mat-list-item> <mat-list-item>
<p>PD officer not available..</p> <p>No PD officer available.</p>
</mat-list-item> </mat-list-item>
</mat-list> </mat-list>

View File

@ -31,7 +31,7 @@
<mat-card fxFlex="100%"> <mat-card fxFlex="100%">
<mat-card-content style="text-align:center"> <mat-card-content style="text-align:center">
<mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button> <mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button>
<img [src]="officer.profile_url" alt="No Image" style="border-radius:50%;width:50%"><br> <img [src]="officer.profile_url ||'https://image.ibb.co/mGjZB9/usernew.png'" alt="No Image" style="border-radius:50%;width:50%"><br>
<span matBadge="{{officer.count}}" matBadgeOverlap="false" matBadgeColor="warn">{{officer.first_name}}</span> <span matBadge="{{officer.count}}" matBadgeOverlap="false" matBadgeColor="warn">{{officer.first_name}}</span>
<br> <br>
<span>{{officer.mobile_no}}</span> <span>{{officer.mobile_no}}</span>
@ -39,12 +39,10 @@
</mat-card> </mat-card>
</div> </div>
</div> </div>
</div>
</div>
<mat-list *ngIf="pdOfficerList.length == 0"> <mat-list *ngIf="pdOfficerList.length == 0">
<mat-list-item> <mat-list-item>
<p>PD officer not available..</p> <p>No executive available.</p>
</mat-list-item> </mat-list-item>
</mat-list> </mat-list>
@ -63,7 +61,22 @@
</mat-card-header> </mat-card-header>
<mat-card-content> <mat-card-content>
<mat-list *ngIf="pdExcutiveList.length > 0"> <div *ngIf="pdExcutiveList.length > 0" >
<div fxLayout="row wrap" fxFlex="100%">
<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>
<img [src]="excutive.profile_url ||'https://image.ibb.co/mGjZB9/usernew.png'" alt="No Image" style="border-radius:50%;width:50%"><br>
<span matBadge="{{excutive.count}}" matBadgeOverlap="false" matBadgeColor="warn">{{excutive.first_name}}</span>
<br>
<span>{{excutive.mobile_no}}</span>
</mat-card-content>
</mat-card>
</div>
</div>
</div>
<!----<mat-list *ngIf="pdExcutiveList.length > 0">
<mat-radio-group> <mat-radio-group>
<mat-list-item *ngFor="let excutive of pdExcutiveList"> <mat-list-item *ngFor="let excutive of pdExcutiveList">
<p><mat-radio-button [value]="excutive" (change)="selectExcutiveOfficer(excutive)"></mat-radio-button> <p><mat-radio-button [value]="excutive" (change)="selectExcutiveOfficer(excutive)"></mat-radio-button>
@ -81,10 +94,10 @@
</mat-list-item> </mat-list-item>
</mat-radio-group> </mat-radio-group>
</mat-list> </mat-list> -->
<mat-list *ngIf="pdExcutiveList.length == 0"> <mat-list *ngIf="pdExcutiveList.length == 0">
<mat-list-item> <mat-list-item>
<p>Excutive officer not available..</p> <p>No central officer available.</p>
</mat-list-item> </mat-list-item>
</mat-list> </mat-list>

View File

@ -11,8 +11,8 @@ import { PdTrigerService } from '../../../pd-service/pd-triger.service';
}) })
export class SmartPdAllocationComponent implements OnInit { export class SmartPdAllocationComponent implements OnInit {
public pageTitle: string = "Allocate To PD Officer"; public pageTitle: string = "Allocate To Executive";
public pageTitle2: string = "Allocate To Excutive Officer"; public pageTitle2: string = "Allocate To Central Officer";
public _pdAllocationForm: FormGroup; public _pdAllocationForm: FormGroup;
public pdOfficerList: any = []; public pdOfficerList: any = [];
public pdExcutiveList: any = []; public pdExcutiveList: any = [];