Fairoj: Sales PD List modified

This commit is contained in:
venbatechnologies@gmail.com 2019-12-23 12:19:11 +05:30
parent 77b47f4ec1
commit 2d339ed2c4
3 changed files with 31 additions and 25 deletions

View File

@ -10,10 +10,10 @@
<mat-tab> <mat-tab>
<ng-template mat-tab-label>Sales PD</ng-template> <ng-template mat-tab-label>Sales PD</ng-template>
<mat-card-content> <mat-card-content>
<mat-expansion-panel [(expanded)]="xpandStatus"> <!-- <mat-expansion-panel [(expanded)]="xpandStatus"> -->
<mat-expansion-panel-header> <!-- <mat-expansion-panel-header>
<mat-panel-title class="text-xs-left"> <mat-panel-title class="text-xs-left">
<!-- <h6 class="mt-0"><mat-icon>filter_list</mat-icon> Filter</h6> --> <h6 class="mt-0"><mat-icon>filter_list</mat-icon> Filter</h6>
<mat-toolbar-row> <mat-toolbar-row>
<mat-icon>filter_list</mat-icon> <mat-icon>filter_list</mat-icon>
<span class="toolbar-space"></span> <span class="toolbar-space"></span>
@ -21,7 +21,7 @@
</mat-toolbar-row> </mat-toolbar-row>
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header> -->
<!-- <mat-list class="m-gap p-gap"> <!-- <mat-list class="m-gap p-gap">
<div [formGroup]="searchForm"> <div [formGroup]="searchForm">
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
@ -77,22 +77,22 @@
</div> </div>
</mat-list> --> </mat-list> -->
</mat-expansion-panel> <!-- </mat-expansion-panel> -->
<br/> <!-- <br/> -->
<mat-table [dataSource]="dataSourceTab4" matSort *ngIf="salesPdData.length > 0" > <mat-table [dataSource]="dataSourceTab4" matSort *ngIf="salesPdData.length > 0" >
<ng-container matColumnDef="SalesPdId"> <ng-container matColumnDef="SalesPdId">
<mat-cell class="cell" *matCellDef="let details;"> <mat-cell class="cell" *matCellDef="let details;" fxFlex.xs="7" fxFlex.sm="7" fxFlex.md="7" fxFlex.lg="7" fxFlex.xl="10">
<small mat-line>{{details.sales_pd_id}}</small> <small mat-line>{{details.sales_pd_id}}</small>
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<ng-container matColumnDef="SalesPdSno"> <ng-container matColumnDef="SalesPdSno">
<mat-cell class="cell" *matCellDef="let details;"> <mat-cell fxFlex.xs="15" fxFlex.sm="15" fxFlex.md="15" fxFlex.lg="16" fxFlex.xl="15" class="cell" *matCellDef="let details;" style="color:rgb(224, 2, 1);font-weight: bold;text-align: left" >
<small mat-line>{{details.sales_pd_sno}}</small> <small mat-line>{{details.sales_pd_sno}}</small>
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<ng-container matColumnDef="Applicant Name"> <ng-container matColumnDef="Applicant Name">
<mat-cell class="cell" *matCellDef="let details;" fxLayoutAlign="center start"> <mat-cell class="cell" *matCellDef="let details;" fxFlex.xs="20" fxFlex.sm="17" fxFlex.md="18" fxFlex.lg="20" fxFlex.xl="18">
<span *ngIf="!details.applicant_name" mat-line> <span *ngIf="!details.applicant_name" mat-line>
<small>--</small> <small>--</small>
</span> </span>
@ -103,33 +103,39 @@
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<ng-container matColumnDef="Short Name"> <ng-container matColumnDef="Short Name">
<mat-cell class="cell" *matCellDef="let details" fxLayoutAlign="center start"> <mat-cell class="cell" *matCellDef="let details" fxLayoutAlign="center start" fxFlex.xs="9" fxFlex.sm="9" fxFlex.md="9" fxFlex.lg="9">
<small mat-line>{{details.short_name}}</small> <span style="font-weight:500"> <small mat-line>{{details.short_name}}</small></span><br/>
<span style="text-align: center;font-weight:400;font-size: 17px;"> <small mat-line>{{details.abbr}}</small></span>
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<ng-container matColumnDef="Abbr">
<mat-cell class="cell" *matCellDef="let details;" fxLayoutAlign="center start">
<small mat-line>{{details.abbr}}</small>
</mat-cell>
</ng-container>
<ng-container matColumnDef="Officer Name"> <ng-container matColumnDef="Officer Name">
<mat-cell class="cell" *matCellDef="let details;" fxLayoutAlign="center start"> <mat-cell fxFlex.xs="10" fxFlex.sm="10" fxFlex.md="10" fxFlex.lg="13" class="cell" *matCellDef="let details;" fxLayoutAlign="center start">
<span *ngIf="!details.officer_name" mat-line> <span *ngIf="!details.officer_name" mat-line>
<small>--</small> <small>--</small>
</span> </span>
<span *ngIf="details.applicant_name" mat-line> <span *ngIf="details.officer_name" mat-line>
<small mat-line>{{details.officer_name}}</small> <small mat-line >{{details.officer_name}}</small>
</span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="status">
<mat-cell fxFlex.xs="10" fxFlex.sm="15" fxFlex.md="15" fxFlex.lg="18" class="cell" *matCellDef="let details;" style="justify-content: flex-start;;text-align: center;font-weight: bold" fxLayoutAlign="start">
<span *ngIf="!details.status" mat-line>
<small>--</small>
</span>
<span *ngIf="details.status" mat-line>
<small mat-line [ngStyle]="{'color':details.status == 'COMPLETED' ? 'green' :'orange'}">{{details.status}}</small>
</span> </span>
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<ng-container matColumnDef="Create On"> <ng-container matColumnDef="Create On">
<mat-cell class="cell" *matCellDef="let details;" fxLayoutAlign="center start"> <mat-cell class="cell" *matCellDef="let details;" fxFlex.xs="10" fxFlex.sm="15" fxFlex.md="15" fxFlex.lg="10" fxLayoutAlign="center end">
<small mat-line>{{details.createdon | date: 'dd/MM/yyyy'}}</small> <small mat-line>{{details.createdon | date: 'dd/MM/yyyy'}}</small>
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<ng-container matColumnDef="Action"> <ng-container matColumnDef="Action">
<mat-cell class="cell" *matCellDef="let details;" fxLayoutAlign="center start"> <mat-cell class="cell" *matCellDef="let details;" style="justify-content: flex-start">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PDF Download" <button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PDF Download" [disabled]="details.status != 'COMPLETED'"
matTooltipPosition="above" color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button> matTooltipPosition="above" color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button>
</mat-cell> </mat-cell>
</ng-container> </ng-container>

View File

@ -4,7 +4,7 @@
} }
.cell{ .cell{
display:inline !important; display:inline !important;
text-align: center !important; // text-align: center !important;
} }
.cellhide{ .cellhide{
display: none !important; display: none !important;

View File

@ -12,7 +12,7 @@ export class SalesPdComponent implements OnInit {
public dataLengthTab4: number; public dataLengthTab4: number;
public dataSourceTab4 = new MatTableDataSource(); public dataSourceTab4 = new MatTableDataSource();
displayedColumns = ['SalesPdId','SalesPdSno','Applicant Name','Short Name','Abbr','Officer Name','Create On','Action']; displayedColumns = ['SalesPdId','SalesPdSno','Applicant Name','Short Name','Officer Name','status','Create On','Action'];
@ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort; @ViewChild(MatSort) sort: MatSort;