PD notification by suren

This commit is contained in:
sriram-at-840620226347 2019-10-18 20:08:19 +05:30
parent 304d3b8cca
commit 2fcabfb996
3 changed files with 143 additions and 12 deletions

View File

@ -1,5 +1,5 @@
<mat-card-content>
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
<div *ngIf="!noRecordFound" class="filter-container example-container mat-elevation-z8">
<!-- <div class="filter-header">
<mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
@ -11,11 +11,10 @@
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field>
</div>
</div>
</div>
<mat-table [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno">
<ng-container matColumnDef="serialno" sticky>
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row;"> {{row.serialno}} </mat-cell>
</ng-container>
@ -25,13 +24,19 @@
<mat-cell *matCellDef="let row;"> {{row.pdnotification_id}} </mat-cell>
</ng-container>
<ng-container matColumnDef="pd_status_name">
<ng-container matColumnDef="pd_status_name" sticky>
<mat-header-cell *matHeaderCellDef mat-sort-header>Status </mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.pd_status}} </mat-cell>
<!-- <mat-checkbox [checked]="row.isPublish"></mat-checkbox> -->
</ng-container>
<ng-container matColumnDef="sms_customer">
<mat-header-cell *matHeaderCellDef mat-sort-header> Customer-SMS </mat-header-cell>
<mat-cell *matCellDef="let row;let i=index;">
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.sms_customer" [checked]="row.sms_customer==1 ? true:false"></mat-checkbox>
</mat-cell>
</ng-container>
<ng-container matColumnDef="sms_lender">
<!-- <div class="mat-header-row header-group-row">
<div class="mat-header-cell" role="columnheader"></div>
@ -61,9 +66,27 @@
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.sms_pdincharge == 1 ? Check : Uncheck"></mat-checkbox> -->
</mat-cell>
</ng-container>
<ng-container matColumnDef="sms_qcteam">
<mat-header-cell *matHeaderCellDef mat-sort-header> QCteam -SMS</mat-header-cell>
<mat-cell *matCellDef="let row">
<!-- {{row.sms_pdincharge}} -->
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.sms_qcteam" [checked]="row.sms_qcteam==1 ? true:false"></mat-checkbox>
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.sms_pdincharge == 1 ? Check : Uncheck"></mat-checkbox> -->
</mat-cell>
</ng-container>
<!-- </ng-container>
<ng-container matColumnDef="MAIL"> -->
<ng-container matColumnDef="mail_customer">
<mat-header-cell *matHeaderCellDef mat-sort-header> Customer -MAIL</mat-header-cell>
<mat-cell *matCellDef="let row">
<!-- {{row.mail_lender}} -->
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.mail_customer" [checked]="row.mail_customer==1 ? true:false"></mat-checkbox>
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.mail_lender == 1 ? Check : Uncheck"></mat-checkbox> -->
</mat-cell>
</ng-container>
<ng-container matColumnDef="mail_lender">
<mat-header-cell *matHeaderCellDef mat-sort-header> Lender -MAIL</mat-header-cell>
<mat-cell *matCellDef="let row">
@ -89,6 +112,59 @@
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.mail_pdofficer == 1 ? Check : Uncheck"></mat-checkbox> -->
</mat-cell>
</ng-container>
<ng-container matColumnDef="mail_qcteam">
<mat-header-cell *matHeaderCellDef mat-sort-header> QCteam -MAIL</mat-header-cell>
<mat-cell *matCellDef="let row">
<!-- {{row.mail_pdofficer}} -->
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.mail_qcteam" [checked]="row.mail_qcteam==1 ? true:false"></mat-checkbox>
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.mail_pdofficer == 1 ? Check : Uncheck"></mat-checkbox> -->
</mat-cell>
</ng-container>
<!-- </ng-container>
<ng-container matColumnDef="APP"> -->
<ng-container matColumnDef="app_customer">
<mat-header-cell *matHeaderCellDef mat-sort-header> Customer -App</mat-header-cell>
<mat-cell *matCellDef="let row">
<!-- {{row.mail_lender}} -->
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.app_customer" [checked]="row.app_customer==1 ? true:false"></mat-checkbox>
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.mail_lender == 1 ? Check : Uncheck"></mat-checkbox> -->
</mat-cell>
</ng-container>
<ng-container matColumnDef="app_lender">
<mat-header-cell *matHeaderCellDef mat-sort-header> Lender -App</mat-header-cell>
<mat-cell *matCellDef="let row">
<!-- {{row.mail_lender}} -->
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.app_lender" [checked]="row.app_lender==1 ? true:false"></mat-checkbox>
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.mail_lender == 1 ? Check : Uncheck"></mat-checkbox> -->
</mat-cell>
</ng-container>
<ng-container matColumnDef="app_pdincharge">
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Incharge -App </mat-header-cell>
<mat-cell *matCellDef="let row">
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.app_pdincharge" [checked]="row.app_pdincharge==1 ? true:false"></mat-checkbox>
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.mail_pdincharge == 1 ? Check : Uncheck"></mat-checkbox> -->
</mat-cell>
</ng-container>
<ng-container matColumnDef="app_pdofficer">
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Officer -App</mat-header-cell>
<mat-cell *matCellDef="let row">
<!-- {{row.mail_pdofficer}} -->
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.app_pdofficer" [checked]="row.app_pdofficer==1 ? true:false"></mat-checkbox>
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.mail_pdofficer == 1 ? Check : Uncheck"></mat-checkbox> -->
</mat-cell>
</ng-container>
<ng-container matColumnDef="app_qcteam">
<mat-header-cell *matHeaderCellDef mat-sort-header> QCteam -App</mat-header-cell>
<mat-cell *matCellDef="let row">
<!-- {{row.mail_pdofficer}} -->
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.app_qcteam" [checked]="row.app_qcteam==1 ? true:false"></mat-checkbox>
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.mail_pdofficer == 1 ? Check : Uncheck"></mat-checkbox> -->
</mat-cell>
</ng-container>
<!-- </ng-container> -->
<!-- <ng-container matColumnDef="isactive">
@ -112,11 +188,11 @@
<!-- <button mat-icon-button color="primary" class="hover-icon" matTooltip="Save Data" matTooltipPosition="above" (click)="SaveData(dataSource)"><mat-icon>save</mat-icon></button> -->
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>
</mat-table>
<mat-toolbar>
<mat-toolbar-row fxLayout >
<button class="mr-1 mb-1 save-button" fxFlex="10%" fxLayoutAlign="center" mat-raised-button color="primary" class="hover-icon" matTooltip="Save Data" matTooltipPosition="above" (click)="SaveData(dataSource)">Save</button>
<mat-toolbar-row fxLayout >
<!-- <span class="empty-spacer"></span> -->
<mat-paginator fxFlex="90%" [pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</mat-toolbar-row>
@ -124,7 +200,8 @@
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> -->
</div>
</div>
<div style="text-align: right;"> <button class="mt-1 save-button" fxFlex="10%" fxLayoutAlign="center" mat-raised-button color="primary" class="hover-icon" matTooltip="Save Data" matTooltipPosition="above" (click)="SaveData(dataSource)">Save</button></div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
<br>

View File

@ -22,8 +22,8 @@
.mat-table {
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
// overflow: auto;
// max-height: 500px;
> .mat-header-row, > .mat-row {
display: table-row;
@ -62,4 +62,13 @@
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-row, .mat-header-row {
min-width: 2800px;
width: 100%;
}
.example-container {
height: 100%;
overflow: -webkit-paged-x;
}

View File

@ -35,7 +35,7 @@ export class PdNotificationListComponent implements OnInit {
public dataLength: number;
public dataSource = new MatTableDataSource();
displayedColumns = ['serialno','pd_status_name','sms_lender','sms_pdofficer','sms_pdincharge','mail_lender', 'mail_pdincharge','mail_pdofficer'];
displayedColumns = ['serialno','pd_status_name','sms_customer','sms_lender','sms_pdofficer','sms_pdincharge','sms_qcteam','mail_customer','mail_lender', 'mail_pdincharge','mail_pdofficer','mail_qcteam','app_customer','app_lender','app_pdincharge','app_pdofficer','app_qcteam'];
@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;
@ -92,6 +92,11 @@ export class PdNotificationListComponent implements OnInit {
this.noRecordFound = false;
this.notificationData = data.records;
this.notificationData.forEach((item, index) => {
if(item.sms_customer ==1){
this.notificationData[index].sms_customer = true;
}else{
this.notificationData[index].sms_customer = false;
}
if(item.sms_lender ==1){
this.notificationData[index].sms_lender = true;
}else{
@ -107,6 +112,16 @@ export class PdNotificationListComponent implements OnInit {
}else{
this.notificationData[index].sms_pdincharge = false;
}
if(item.sms_qcteam ==1){
this.notificationData[index].sms_qcteam = true;
}else{
this.notificationData[index].sms_qcteam = false;
}
if(item.mail_customer ==1){
this.notificationData[index].mail_customer = true;
}else{
this.notificationData[index].mail_customer = false;
}
if(item.mail_lender ==1){
this.notificationData[index].mail_lender = true;
}else{
@ -122,6 +137,36 @@ export class PdNotificationListComponent implements OnInit {
}else{
this.notificationData[index].mail_pdofficer = false;
}
if(item.mail_qcteam ==1){
this.notificationData[index].mail_qcteam = true;
}else{
this.notificationData[index].mail_qcteam = false;
}
if(item.app_customer ==1){
this.notificationData[index].app_customer = true;
}else{
this.notificationData[index].app_customer = false;
}
if(item.app_lender ==1){
this.notificationData[index].app_lender = true;
}else{
this.notificationData[index].app_lender = false;
}
if(item.app_pdincharge ==1){
this.notificationData[index].app_pdincharge = true;
}else{
this.notificationData[index].app_pdincharge = false;
}
if(item.app_pdofficer ==1){
this.notificationData[index].app_pdofficer = true;
}else{
this.notificationData[index].app_pdofficer = false;
}
if(item.app_qcteam ==1){
this.notificationData[index].app_qcteam = true;
}else{
this.notificationData[index].app_qcteam = false;
}
if(item.isactive ==1){
this.notificationData[index].isactive = true;
}else{