master cahnges and pd Team changes : ps

This commit is contained in:
venbatechnologies@gmail.com 2018-10-10 16:22:38 +05:30
parent ca9a25fcd1
commit c155ddb133
21 changed files with 501 additions and 225 deletions

View File

@ -63,7 +63,7 @@
</div> </div>
<br>--> <br>-->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
@ -71,20 +71,20 @@
</div> </div>
--> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addCustomerBehaviour()" matTooltip="Add Customer Behaviour" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addCustomerBehaviour()" matTooltip="Add Customer Behaviour" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
</div> </div>
</div> </div>
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -140,9 +140,9 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
<!-- <div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div> --> <!-- <div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div> -->

View File

@ -67,25 +67,26 @@
<br>--> <br>-->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addCustomerSegment()" matTooltip="Add Customer Segment" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addCustomerSegment()" matTooltip="Add Customer Segment" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
</div> </div>
</div> </div>
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -136,9 +137,8 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
</mat-card-content> </mat-card-content>
<notifier-container></notifier-container> <notifier-container></notifier-container>

View File

@ -67,18 +67,19 @@
</div> </div>
<br>--> <br>-->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addDesignation()" matTooltip="Add Designation" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addDesignation()" matTooltip="Add Designation" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
@ -87,7 +88,7 @@
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -135,11 +136,9 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
</mat-card-content> </mat-card-content>
<notifier-container></notifier-container> <notifier-container></notifier-container>

View File

@ -76,18 +76,19 @@
</div> </div>
<br>--> <br>-->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addFrequency()" matTooltip="Add Frequency" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addFrequency()" matTooltip="Add Frequency" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
@ -96,7 +97,7 @@
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -142,9 +143,9 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
</mat-card-content> </mat-card-content>

View File

@ -7,7 +7,7 @@
<!-- <div *ngIf="loader"> <!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar> <mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div> <br> --> </div> <br> -->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
@ -15,17 +15,18 @@
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addIndustryClassification()" matTooltip="Add Industry Classification" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addIndustryClassification()" matTooltip="Add Industry Classification" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
</div> </div>
</div> </div>
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -72,12 +73,12 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<!-- <div *ngIf="noRecordFound" class="example-container mat-elevation-z8"> <!-- <div *ngIf="noRecordFound" class="example-container mat-elevation-z8">
<div class="nocontent">No records found</div> <div class="nocontent">No records found</div>
</div> --> </div> -->
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
</mat-card-content> </mat-card-content>
<notifier-container></notifier-container> <notifier-container></notifier-container>

View File

@ -62,18 +62,19 @@
<br>--> <br>-->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addLenderHierarchy()" matTooltip="Add Lender Hierarchy" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addLenderHierarchy()" matTooltip="Add Lender Hierarchy" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
@ -81,7 +82,7 @@
</div> </div>
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -132,10 +133,10 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
</mat-card-content> </mat-card-content>
<notifier-container></notifier-container> <notifier-container></notifier-container>

View File

@ -80,18 +80,19 @@
</div> </div>
<br>--> <br>-->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addMemberOccupation()" matTooltip="Add Member's Occupation" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addMemberOccupation()" matTooltip="Add Member's Occupation" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
@ -100,7 +101,7 @@
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -150,9 +151,9 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
</mat-card-content> </mat-card-content>

View File

@ -63,25 +63,26 @@
</div> </div>
<br>--> <br>-->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdLocationApproach()" matTooltip="Add Pd Location Approach" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdLocationApproach()" matTooltip="Add Pd Location Approach" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
</div> </div>
</div> </div>
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -129,9 +130,9 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
</mat-card-content> </mat-card-content>
<notifier-container></notifier-container> <notifier-container></notifier-container>

View File

@ -61,18 +61,19 @@
<br> <br>
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
@ -81,7 +82,7 @@
</div> </div>
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -129,9 +130,9 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <!-- -->
</mat-card-content> </mat-card-content>
<notifier-container></notifier-container> <notifier-container></notifier-container>

View File

@ -8,7 +8,7 @@
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar> <mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div> </div>
<br> --> <br> -->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
@ -16,19 +16,19 @@
</div> </div>
--> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div *ngIf="noRecordFound" class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addProductMaster()" matTooltip="Add Product" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addProductMaster()" matTooltip="Add Product" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
</div> </div>
</div> </div>
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -82,9 +82,9 @@
</mat-table> </mat-table>
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> --> <!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> -->
<mat-paginator [pageSizeOptions]="[5, 10, 15, 20, 25]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
<!-- Copyright 2018 Google Inc. All Rights Reserved. <!-- Copyright 2018 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that Use of this source code is governed by an MIT-style license that

View File

@ -9,7 +9,7 @@
</div> </div>
<br> --> <br> -->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
@ -17,17 +17,18 @@
</div> </div>
--> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addQuestionCategory()" matTooltip="Add Question Category" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addQuestionCategory()" matTooltip="Add Question Category" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
</div> </div>
</div> </div>
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -73,7 +74,7 @@
</mat-table> </mat-table>
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> --> <!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> -->
<mat-paginator [pageSizeOptions]="[5, 10, 15, 20, 25]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <div *ngIf="noRecordFound" class="nocontent">No records found</div>

View File

@ -1,92 +1,19 @@
<mat-card-content>
<!-- <div style="text-align: right;"> <div class="filter-container mat-elevation-z8">
<!-- <button mat-stroked-button [color]="color" > + Add regions</button> --
</div> -->
<mat-card-content>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div>
<br> -->
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div> <br> -->
<!-- <div datatable>
<table style="border-collapse: collapse">
<thead>
<th style="text-align: center;">#</th>
<th style="text-align: center;">Regions Name</th>
<th style="text-align: center;">IsActive</th>
<th style="text-align: center;">Action</th>
</thead>
<tr *ngIf="regionsList.length === 0" > <td colspan="4" style="text-align: center;"> No Records </td></tr>
<tr *ngFor="let RL of regionsList; let i=index">
<td style="text-align: center;">{{i+1}}</td>
<td style="text-align: center;">{{RL.name}}</td>
<td style="text-align: center;">{{RL.isactive}}</td>
<td style="text-align: center;">
<a (click)="editregions(RL)"><mat-icon>edit</mat-icon></a>
<a (click)="deleteregions(RL.region_id)"><mat-icon>delete_outline</mat-icon></a>
</td>
</tr>
</table>
</div>
<!--<div> <mat-table [dataSource]="dataSource"> ->
<mat-table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="name">
<mat-header-cell *matHeaderCellDef mat-sort-header> Name </mat-header-cell>
<mat-cell *matCellDef="let user"> {{user.name}} </mat-cell>
</ng-container>
<ng-container matColumnDef="region_id">
<mat-header-cell *matHeaderCellDef mat-sort-header> ID </mat-header-cell>
<mat-cell *matCellDef="let user"> {{user.region_id}} </mat-cell>
</ng-container>
<ng-container matColumnDef="isactive">
<mat-header-cell *matHeaderCellDef mat-sort-header> isactive </mat-header-cell>
<mat-cell *matCellDef="let user"> {{user.isactive}} </mat-cell>
</ng-container>
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef></mat-header-cell>
<mat-cell *matCellDef="let user">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editregions(user)"><mat-icon>edit</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteregions(user.regions_id)"><mat-icon>delete_outline</mat-icon></button>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>
</div>
<br>-->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
<!-- <div class="filter-header">
<mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field>
</div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addregions()" matTooltip="Add Region" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addregions()" matTooltip="Add Region" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
</div>
</div> </div>
</div> </div>
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<mat-table [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -98,12 +25,9 @@
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell> <mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
</ng-container> </ng-container>
<ng-container matColumnDef="isactive"> <ng-container matColumnDef="isactive">
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
<mat-cell *matCellDef="let row"><!--{{row.isactive}}--> <mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
<!-- <mat-icon *ngIf="row.isactive == 1;else notactive;" class="hover-icon" matTooltip="Active" matTooltipPosition="above">done</mat-icon>
<ng-template #notactive ><mat-icon class="hover-icon" matTooltip="Inactive" matTooltipPosition="above">clear</mat-icon></ng-template> -->
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;" <mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin" class="example-margin"
matTooltip="Active" matTooltipPosition="above" matTooltip="Active" matTooltipPosition="above"
@ -126,7 +50,7 @@
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell> <mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row"> <mat-cell *matCellDef="let row">
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editregions(row)"><mat-icon>edit</mat-icon></button> <button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editregions(row)"><mat-icon>edit</mat-icon></button>
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteregions(row.regions_id)"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell> </mat-cell>
</ng-container> </ng-container>
@ -135,10 +59,5 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
</mat-card-content> </mat-card-content>
<notifier-container></notifier-container> <notifier-container></notifier-container>

View File

@ -82,18 +82,19 @@
</div> </div>
<br>--> <br>-->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addRelationShip()" matTooltip="Add Relation ship" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addRelationShip()" matTooltip="Add Relation ship" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
@ -103,7 +104,7 @@
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -152,10 +153,10 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
</mat-card-content> </mat-card-content>
<notifier-container></notifier-container> <notifier-container></notifier-container>

View File

@ -102,18 +102,19 @@
</div> </div>
<br>--> <br>-->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addState()" matTooltip="Add State" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addState()" matTooltip="Add State" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
@ -122,7 +123,7 @@
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -175,10 +176,10 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
</mat-card-content> </mat-card-content>
<notifier-container></notifier-container> <notifier-container></notifier-container>

View File

@ -1,9 +1,9 @@
<mat-card-content> <mat-card-content>
<div style="text-align: right;"> <!-- <div style="text-align: right;"> -->
<!-- <button mat-stroked-button [color]="color" (click)="addSubProductMaster()" > + Add Sub Product</button> --> <!-- <button mat-stroked-button [color]="color" (click)="addSubProductMaster()" > + Add Sub Product</button> -->
</div> <!-- </div>
<br> <br> -->
<!-- <div *ngIf="loader"> <!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar> <mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div> </div>
@ -92,19 +92,19 @@
</div>--> </div>-->
<br> <br>
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div *ngIf="noRecordFound" class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addSubProductMaster()" matTooltip="Add Sub Product" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addSubProductMaster()" matTooltip="Add Sub Product" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
</div> </div>
@ -112,7 +112,7 @@
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -165,10 +165,10 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
</mat-card-content> </mat-card-content>
<notifier-container></notifier-container> <notifier-container></notifier-container>

View File

@ -79,18 +79,19 @@
</div>--> </div>-->
<br> <br>
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addTitle()" matTooltip="Add Title" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addTitle()" matTooltip="Add Title" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
@ -100,7 +101,7 @@
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -148,10 +149,10 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
</mat-card-content> </mat-card-content>
<notifier-container></notifier-container> <notifier-container></notifier-container>

View File

@ -75,18 +75,19 @@
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row> <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table> </mat-table>
</div>--> </div>-->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<!-- <div class="filter-header"> <!-- <div class="filter-header">
<mat-form-field> <mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div class="ml-xs mr-xs" style="width: 90%;"> <div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addActivity()" matTooltip="Add Activity()" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addActivity()" matTooltip="Add Activity()" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
</div> </div>
@ -94,7 +95,7 @@
<mat-table [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno"> <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
@ -142,10 +143,10 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
</mat-card-content> </mat-card-content>
<notifier-container></notifier-container> <notifier-container></notifier-container>

View File

@ -28,14 +28,18 @@
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start"> <div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
<mat-form-field fxFlex="0 1 auto" class="ml-xs"> <mat-form-field fxFlex="0 1 auto" class="ml-xs">
<mat-select placeholder="City" required formControlName="fk_city" multiple> <mat-select placeholder="City" required formControlName="fk_city" multiple>
<mat-option *ngFor="let cd of citydatas" [value]="cd.city_id" (onSelectionChange)="toggleAllSelection($event)" >{{ cd.name }} </mat-option> <mat-option *ngFor="let cd of citydatas" [value]="cd" (onSelectionChange)="onChangeCityDatas($event)" >{{ cd.name }} </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="submitted && f.fk_city.hasError('required')" class="mat-text-warn">You must Select Cities.</mat-error> <mat-error *ngIf="submitted && f.fk_city.hasError('required')" class="mat-text-warn">You must Select Cities.</mat-error>
</mat-form-field> </mat-form-field>
<!-- // <span fxFlex="0 1 auto" class="ml-xs">
<ul *ngIf="!empty(PDTeamMapping)" *ngFor="let data of myData"> <h6> The Selected Cities are., </h6>
<li>{{data.id}}</li> <ul *ngFor="let data of selectedCityDatas">
</ul>--> <li>{{data}}</li>
</ul>
</span>
</div> </div>
@ -43,10 +47,16 @@
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start"> <div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
<mat-form-field fxFlex="0 1 auto" class="ml-xs"> <mat-form-field fxFlex="0 1 auto" class="ml-xs">
<mat-select placeholder="Product" required formControlName="fk_product" multiple> <mat-select placeholder="Product" required formControlName="fk_product" multiple>
<mat-option *ngFor="let pd of productdatas " [value]="pd.product_id" >{{ pd.name }} </mat-option> <mat-option *ngFor="let pd of productdatas " [value]="pd" (onSelectionChange)="onChangeProductDatas($event)" >{{ pd.name }} </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="submitted && f.fk_product.hasError('required')" class="mat-text-warn">You must Select Product.</mat-error> <mat-error *ngIf="submitted && f.fk_product.hasError('required')" class="mat-text-warn">You must Select Product.</mat-error>
</mat-form-field> </mat-form-field>
<span fxFlex="0 1 auto" class="ml-xs">
<h6> The Selected Products are., </h6>
<ul *ngFor="let data of selectedProductDatas">
<li>{{data}}</li>
</ul>
</span>
</div> </div>
<h6>Customers Segment</h6><hr><br> <h6>Customers Segment</h6><hr><br>
@ -54,10 +64,16 @@
<mat-form-field fxFlex="0 1 auto" class="ml-xs"> <mat-form-field fxFlex="0 1 auto" class="ml-xs">
<mat-select placeholder="Customer Segment" required formControlName="fk_customer_segment" multiple> <mat-select placeholder="Customer Segment" required formControlName="fk_customer_segment" multiple>
<mat-option *ngFor="let csd of customerSegmentdatas" [value]="csd.customer_segment_id">{{csd.name}}</mat-option> <mat-option *ngFor="let csd of customerSegmentdatas" [value]="csd" (onSelectionChange)="onChangeCustomerSegmentDatas($event)">{{csd.name}}</mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="submitted && f.fk_customer_segment.hasError('required')" class="mat-text-warn">You must Select Customer Segment.</mat-error> <mat-error *ngIf="submitted && f.fk_customer_segment.hasError('required')" class="mat-text-warn">You must Select Customer Segment.</mat-error>
</mat-form-field> </mat-form-field>
<span fxFlex="0 1 auto" class="ml-xs">
<h6> The Selected Customer segment are., </h6>
<ul *ngFor="let data of selectedSegmentDatas">
<li>{{data}}</li>
</ul>
</span>
</div> </div>
<div class="row" style="text-align:right;"> <div class="row" style="text-align:right;">

View File

@ -22,18 +22,24 @@ export class PdTeamAddComponent implements OnInit {
public _pdTeamForm: FormGroup; public _pdTeamForm: FormGroup;
public submitted = false; public submitted = false;
color = 'primary';
errorMessage:string;
//This Type Of Array Declaration for select dropdown to list the datas
citydatas: any[]; citydatas: any[];
lenderdatas: any[]; lenderdatas: any[];
productdatas: any[]; productdatas: any[];
customerSegmentdatas: any[]; customerSegmentdatas: any[];
//This Type Of Array Declaration
pdTeamCityArray: Array<{teamid: number, cityid: number}> = []; pdTeamCityArray: Array<{teamid: number, cityid: number}> = [];
pdTeamProductArray: Array<{teamid: number, productid: number}> = []; pdTeamProductArray: Array<{teamid: number, productid: number}> = [];
pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = []; pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = [];
color = 'primary'; //This Type Of Array Declaration for Local Purpose and List the data in html page
errorMessage:string; selectedCityDatas : any=[];
selectedProductDatas : any=[];
selectedSegmentDatas : any=[];
constructor(private _formBuilder: FormBuilder, constructor(private _formBuilder: FormBuilder,
private _notifier: NotifierService, private _notifier: NotifierService,
@ -111,37 +117,87 @@ onNoClick(): void {
/** To Save/Edited Popup Data */ /** To Save/Edited Popup Data */
onSubmit() { onSubmit() {
this.submitted = true; this.submitted = true;
alert("onsubmit function"); // stop here if form is invalid
console.log(this._pdTeamForm.value); if (this._pdTeamForm.invalid) {
// this.errorMessage = "Please Fill All Mandate Fields.";
// return;
alert('Please Fill All Mandate Fields.');
} else {
var pdTeamFormValues = this._pdTeamForm.value; var pdTeamFormValues = this._pdTeamForm.value;
//To Remove The "Null" With Key also
Object.keys(pdTeamFormValues).forEach( Object.keys(pdTeamFormValues).forEach(
(key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]); (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]);
this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe( this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe(
dataresult=>{ dataresult => {
if (dataresult.status == 200) {
if(dataresult.dataStatus == true){ console.log(dataresult);
alert('Saved'); this._notifier.notify('success', 'Record Edited Successfully.!');
// alert('Record Successfully.!');
this._router.navigate(['/setting/pdteam/pdteamlist']);
this._pdTeamForm.reset();
} }
else{ else {
alert('Not Saved'); this._notifier.notify('warning', 'Something Wents Wrong Try Again.!');
//alert('Some Thing Wents Wrong Try Again !');
//this.errorMessage = "Some Thing Wents Wrong Try Again !";
} }
}, error => {
this._notifier.notify('warning', 'Something Wents Wrong Try Again.!');
// this.errorMessage = "Something Wents Wrong Try Again !";
//alert('Some Thing Wents Wrong Try Again !');
}); });
}
} }
/** To Reset Popup Data For Add*/ /** To Reset Popup Data For Add*/
onResetForAdd(){ onResetForAdd(){
alert("reset function"); alert("reset function");
} }
toggleAllSelection($event){
console.log($event); /**on change function for customer segment to dispaly the as List in html page */
let srcarray = $event['source'] onChangeCustomerSegmentDatas($event){
console.log(srcarray._mostRecentViewValue); let CustomerSegmentName = $event.source.value.name;
if($event.source._selected === true ){
this.selectedSegmentDatas.push(CustomerSegmentName);
}
else if($event.source._selected === false ){
let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName);
this.selectedSegmentDatas.splice(index,1);
}
} }
/**on change function for City to display the as List in html page */
onChangeCityDatas($event){
let cityName = $event.source.value.name;
if($event.source._selected === true ){
this.selectedCityDatas.push(cityName);
}
else if($event.source._selected === false ){
let index = this.selectedCityDatas.indexOf(cityName);
this.selectedCityDatas.splice(index,1);
}
} }
/** End Of Pd Dialog Component */
/**on change function for Product to display the data as List in html page */
onChangeProductDatas($event){
let productName = $event.source.value.name;
if($event.source._selected === true ){
this.selectedProductDatas.push(productName);
}
else if($event.source._selected === false ){
let index = this.selectedProductDatas.indexOf(productName);
this.selectedProductDatas.splice(index,1);
}
}
}
/** End Of PD TEAM ADD Component */

View File

@ -1,3 +1,86 @@
<p> <div style="max-height: 580px;">
pd-team-edit works! <form [formGroup]="_pdTeamForm" (submit)="onSubmit()">
</p> <mat-card style="padding: 6px;">
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 50%;">PD TEAM</h2>
<div style="width: 20%;"></div>
<div style="width: 30%;text-align:right;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="onNoClick()"><mat-icon>close</mat-icon></button>
</div>
</div>
<h6>Team Details</h6><hr><br>
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
<input matInput type="text" placeholder="Team Name" required formControlName="team_name">
<mat-error *ngIf="submitted && f.team_name.hasError('required')" class="mat-text-warn">You must Include Team Name.</mat-error>
</mat-form-field>
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
<mat-select placeholder="Lender" required formControlName="fk_lender">
<mat-option *ngFor="let ld of lenderdatas" [value]="ld.entity_id" >{{ ld.short_name }} {{ ld.full_name }} </mat-option>
</mat-select>
<mat-error *ngIf="submitted && f.fk_lender.hasError('required')" class="mat-text-warn">You must Select Lender Name.</mat-error>
</mat-form-field>
</div>
<h6>Cities Coverd</h6><hr><br>
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
<mat-select placeholder="City" required formControlName="fk_city" multiple>
<mat-option *ngFor="let cd of citydatas" [value]="cd" (onSelectionChange)="onChangeCityDatas($event)" >{{ cd.name }} </mat-option>
</mat-select>
<mat-error *ngIf="submitted && f.fk_city.hasError('required')" class="mat-text-warn">You must Select Cities.</mat-error>
</mat-form-field>
<span fxFlex="0 1 auto" class="ml-xs">
<h6> The Selected Cities are., </h6>
<ul *ngFor="let data of selectedCityDatas">
<li>{{data}}</li>
</ul>
</span>
</div>
<h6>Products</h6><hr><br>
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
<mat-select placeholder="Product" required formControlName="fk_product" multiple>
<mat-option *ngFor="let pd of productdatas " [value]="pd" (onSelectionChange)="onChangeProductDatas($event)" >{{ pd.name }} </mat-option>
</mat-select>
<mat-error *ngIf="submitted && f.fk_product.hasError('required')" class="mat-text-warn">You must Select Product.</mat-error>
</mat-form-field>
<span fxFlex="0 1 auto" class="ml-xs">
<h6> The Selected Products are., </h6>
<ul *ngFor="let data of selectedProductDatas">
<li>{{data}}</li>
</ul>
</span>
</div>
<h6>Customers Segment</h6><hr><br>
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
<mat-select placeholder="Customer Segment" required formControlName="fk_customer_segment" multiple>
<mat-option *ngFor="let csd of customerSegmentdatas" [value]="csd" (onSelectionChange)="onChangeCustomerSegmentDatas($event)">{{csd.name}}</mat-option>
</mat-select>
<mat-error *ngIf="submitted && f.fk_customer_segment.hasError('required')" class="mat-text-warn">You must Select Customer Segment.</mat-error>
</mat-form-field>
<span fxFlex="0 1 auto" class="ml-xs">
<h6> The Selected Customer segment are., </h6>
<ul *ngFor="let data of selectedSegmentDatas">
<li>{{data}}</li>
</ul>
</span>
</div>
<div class="row" style="text-align:right;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
</div>
</mat-card>
</form>
</div>
<notifier-container></notifier-container>

View File

@ -1,4 +1,20 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, Inject } from '@angular/core';
import { FormBuilder,
FormGroup,
Validators,
FormControl } from '@angular/forms';
import { MatDialog,
MatDialogRef,
MAT_DIALOG_DATA } from '@angular/material';
/** Service */
import { MastersService } from '../../service/masters/masters.service';
import { PdTeamService } from '../../service/masters/pd-team.service';
import { NotifierService } from 'angular-notifier';
import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
import { Router } from '@angular/router';
@Component({ @Component({
selector: 'app-pd-team-edit', selector: 'app-pd-team-edit',
@ -7,9 +23,185 @@ import { Component, OnInit } from '@angular/core';
}) })
export class PdTeamEditComponent implements OnInit { export class PdTeamEditComponent implements OnInit {
constructor() { } public _pdTeamForm: FormGroup;
public submitted = false;
color = 'primary';
errorMessage:string;
ngOnInit() { //This Type Of Array Declaration for select dropdown to list the datas
citydatas: any[];
lenderdatas: any[];
productdatas: any[];
customerSegmentdatas: any[];
//This Type Of Array Declaration
pdTeamCityArray: Array<{teamid: number, cityid: number}> = [];
pdTeamProductArray: Array<{teamid: number, productid: number}> = [];
pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = [];
//This Type Of Array Declaration for Local Purpose and List the data in html page
selectedCityDatas : any=[];
selectedProductDatas : any=[];
selectedSegmentDatas : any=[];
constructor(private _formBuilder: FormBuilder,
private _notifier: NotifierService,
private _pdTeamService: PdTeamService,
private _router: Router,
private _masterService: MastersService)
{
this._notifier = _notifier;
} }
}
ngOnInit() {
this.PdTeamFormDatas();
/** To Display The City Data For City DropDown */
this._masterService.getAllMasterData('CITY').subscribe(
dataresult => {
if (dataresult.status == 200) {
this.citydatas = dataresult.records;
this.citydatas = this.citydatas.filter(city=>city.isactive == 1 );
}
}, error => this.errorMessage = <any> error);
/** To Display The Entities Data For Entities DropDown */
this._masterService.getAllMasterData('ENTITY').subscribe(
dataresult => {
if (dataresult.status == 200) {
this.lenderdatas = dataresult.records;
this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 );
}
}, error => this.errorMessage = <any> error);
/** To Display The Entities Data For Entities DropDown */
this._masterService.getAllMasterData('PRODUCTS').subscribe(
dataresult => {
if (dataresult.status == 200) {
this.productdatas = dataresult.records;
this.productdatas = this.productdatas.filter(product=>product.isactive == 1 );
}
}, error => this.errorMessage = <any> error);
/** To Display The Entities Data For Entities DropDown */
this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe(
dataresult => {
if (dataresult.status == 200) {
this.customerSegmentdatas = dataresult.records;
this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 );
}
}, error => this.errorMessage = <any> error);
}
/** Pd Team Form Datas */
PdTeamFormDatas(){
this._pdTeamForm = this._formBuilder.group({
pdteam_id: [null, Validators.compose([Validators.required])],
team_name: [null, Validators.compose([Validators.required])],
fk_lender: [null, Validators.compose([Validators.required])],
fk_city: [null, Validators.compose([Validators.required])],
fk_customer_segment: [null, Validators.compose([Validators.required])],
fk_product:[null, Validators.compose([Validators.required])],
});
}
/** convenience getter for easy access to form fields */
get f() { return this._pdTeamForm.controls; }
/** For Popup Close Button */
onNoClick(): void {
this._router.navigate(['/setting/pdteam/pdteamlist']);
}
/** To Save/Edited Popup Data */
/** To Save/Edited Popup Data */
onSubmit() {
this.submitted = true;
// stop here if form is invalid
if (this._pdTeamForm.invalid) {
// this.errorMessage = "Please Fill All Mandate Fields.";
// return;
alert('Please Fill All Mandate Fields.');
} else {
var pdTeamFormValues = this._pdTeamForm.value;
//To Remove The "Null" With Key also
Object.keys(pdTeamFormValues).forEach(
(key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]);
this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe(
dataresult => {
if (dataresult.status == 200) {
console.log(dataresult);
// this._notifier.notify('success', 'Record Saved Successfully.!');
alert('Record Saved Successfully.!');
this._router.navigate(['/setting/pdteam/pdteamlist']);
this._pdTeamForm.reset();
}
else {
//this._notifier.notify('warning', 'Something Wents Wrong Try Again.!');
alert('Some Thing Wents Wrong Try Again !');
//this.errorMessage = "Some Thing Wents Wrong Try Again !";
}
}, error => {
// this._notifier.notify('warning', 'Something Wents Wrong Try Again.!');
// this.errorMessage = "Something Wents Wrong Try Again !";
alert('Some Thing Wents Wrong Try Again !');
});
}
}
/** To Reset Popup Data For Add*/
onResetForAdd(){
alert("reset function");
}
/**on change function for customer segment to dispaly the as List in html page */
onChangeCustomerSegmentDatas($event){
let CustomerSegmentName = $event.source.value.name;
if($event.source._selected === true ){
this.selectedSegmentDatas.push(CustomerSegmentName);
}
else if($event.source._selected === false ){
let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName);
this.selectedSegmentDatas.splice(index,1);
}
}
/**on change function for City to display the as List in html page */
onChangeCityDatas($event){
let cityName = $event.source.value.name;
if($event.source._selected === true ){
this.selectedCityDatas.push(cityName);
}
else if($event.source._selected === false ){
let index = this.selectedCityDatas.indexOf(cityName);
this.selectedCityDatas.splice(index,1);
}
}
/**on change function for Product to display the data as List in html page */
onChangeProductDatas($event){
let productName = $event.source.value.name;
if($event.source._selected === true ){
this.selectedProductDatas.push(productName);
}
else if($event.source._selected === false ){
let index = this.selectedProductDatas.indexOf(productName);
this.selectedProductDatas.splice(index,1);
}
}
}
/** End Of PD TEAM ADD Component */