master detail changes

This commit is contained in:
venbatechnologies@gmail.com 2018-10-04 20:01:27 +05:30
parent 0b093503a3
commit 326832b1c7
159 changed files with 4252 additions and 3031 deletions

View File

@ -51,7 +51,7 @@ const sineedgeIdentity = "ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";//"ap
const lenderIdentity = "ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907";
const vendorIdenttiy = "";
// serviceProvider
const apiurl = "http://ssa.sineedge.com/sparqapi/api/";
const apiurl = "http://ssa.sineedge.com/sparqapi/api/";
//const apiurl = "http://localhost/sparqapi/api/";
@Injectable({
@ -730,9 +730,5 @@ adminlistgroup(enitiy){
});
}
// waiting for image api
getpicurl(userid){
let users = {'userid':userid}
return this.http.post(apiurl+'getSingedProfilePicURL',users);
}
}

View File

@ -39,8 +39,8 @@ const sineedgeIdentity = "ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";//"ap
const lenderIdentity = "ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907";
const vendorIdenttiy = "";
// serviceProvider
const apiurl = "http://ssa.sineedge.com/sparqapi/api/";
//const apiurl = "http://localhost/sparqapi/api/";
const apiurl = "http://ssa.sineedge.com/sparqapi/api/";
// const apiurl = "http://localhost/sparqapi/api/";
export interface Callback {
callback(): void;

View File

@ -54,8 +54,12 @@ fxLayoutAlign="center">
<br>
<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" [disabled]="!_branchForm.valid"><mat-icon>save</mat-icon></button>
<button *ngIf="_branchForm.controls['branch_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_branchForm.valid"><mat-icon>save</mat-icon></button>
<!-- <button mat-button >RESET</button> -->
</div>

View File

@ -7,4 +7,3 @@ mat-dialog-container{
.container{
width:10% !important;
}
//style="width: 100%"

View File

@ -33,15 +33,9 @@ export class BranchDialogComponent implements OnInit {
private _mastersService: MastersService,
@Inject(MAT_DIALOG_DATA) public data: Branch) { }
ngOnInit() {
/** Branch Form Datas*/
this._branchForm = this._formBuilder.group({
branch_id: [this.data.branch_id],
name: [this.data.name, Validators.compose([Validators.required])],
fk_city_id: [this.data.fk_city_id, Validators.compose([Validators.required])]
});
this.branchFormDatas();
/** For SelectDrop Datas*/
this._mastersService.getAllMasterData('CITY')
@ -57,6 +51,15 @@ export class BranchDialogComponent implements OnInit {
}
/** Branch Form Datas*/
branchFormDatas(){
this._branchForm = this._formBuilder.group({
branch_id: [this.data.branch_id],
name: [this.data.name, Validators.compose([Validators.required])],
fk_city_id: [this.data.fk_city_id, Validators.compose([Validators.required])]
});
}
/** For Popup Close Button */
onNoClick(): void {
this.dialogRef.close();
@ -66,7 +69,8 @@ export class BranchDialogComponent implements OnInit {
onSubmit() {
var BranchFormValues = this._branchForm.value;
console.log(this._branchForm.value);
console.log(BranchFormValues);
if(isNaN(this.data.branch_id)) {
//To Remove The "Null" With Key also
@ -104,4 +108,9 @@ export class BranchDialogComponent implements OnInit {
this._branchForm.reset();
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.branchFormDatas();
}
}

View File

@ -1,10 +1,12 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button color="primary" (click)="addBranch()"> + Add Branch</button>
<button mat-raised-button [color]="color" (click)="addBranch()"> + Add Branch</button>
</div>
<br>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div>
<br> -->
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header">
<mat-form-field>
@ -16,7 +18,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;" class="example-margin"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row;" class="example-margin"> {{row.serialno}} </mat-cell>
</ng-container>
<!-- <ng-container matColumnDef="branch_id">
@ -60,7 +62,7 @@
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
matTooltip="Active" matTooltipPosition="above"
checked="true"
checked="true" [color]="color"
(change)="isactiveBranch(row.branch_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
@ -68,7 +70,7 @@
<mat-slide-toggle
class="example-margin"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
checked="false" [color]="color"
(change)="isactiveBranch(row.branch_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle></ng-template>

View File

@ -69,16 +69,7 @@
padding: 8px 24px 0;
}****/
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
// .example-header {
// min-height: 56px;
@ -92,32 +83,14 @@
// }
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
.nocontent {
color: red;
font-size: 16px;
//display:flex;
//justify-content:center;
// min-height: 56px;
// max-height: 56px;
text-align: center;
}
.active:hover{
color: green;
font-size: 20px;
}
.deactive:hover{
color: red;
font-size: 20px;
}
// .active:hover{
// color: green;
// font-size: 20px;
// }
// .deactive:hover{
// color: red;
// font-size: 20px;
// }
// mat-cell{
// display:flex !important;
@ -129,17 +102,89 @@
// justify-content:center;
// }
.example-h2 {
margin: 10px;
}
// .example-h2 {
// margin: 10px;
// }
.example-section {
display: flex;
align-content: center;
align-items: center;
height: 60px;
}
// .example-section {
// display: flex;
// align-content: center;
// align-items: center;
// height: 60px;
// }
.example-margin {
margin: 10px;
}
.mat-table {
display: table;
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
.mat-form-field {
font-size: 14px;
width: 100%;
}
.nocontent {
color: red;
font-size: 16px;
//display:flex;
//justify-content:center;
// min-height: 56px;
// max-height: 56px;
text-align: center;
}
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
/** new ..**
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
*/

View File

@ -28,8 +28,9 @@ export class BranchListComponent implements OnInit {
noRecordFound: boolean = false;
BranchList: any = [];
userData = null;
userdata2:any = [];
color = 'primary';
//color = 'primary';
// changed(id: number,isactive : number) {
// console.log('Id',id);
// console.log('Isactive',isactive)
@ -59,7 +60,17 @@ export class BranchListComponent implements OnInit {
this.noRecordFound = false;
this.userData = dataresult.records;
this.dataLength = dataresult.records.length;
if(dataresult.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
//console.log('ts `i` value',i + ','+ ', '+ val );
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;
this.dataLength = 0

View File

@ -53,8 +53,11 @@ fxLayoutAlign="center">
</div> -->
<br>
<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" [disabled]="!_cityForm.valid"><mat-icon>save</mat-icon></button>
<button *ngIf="_cityForm.controls['city_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_cityForm.valid"><mat-icon>save</mat-icon></button>
<!-- <button mat-button >RESET</button> -->
</div>

View File

@ -34,12 +34,7 @@ export class CityDialogComponent implements OnInit {
ngOnInit() {
/** City Form Datas*/
this._cityForm = this._formBuilder.group({
city_id: [this.data.city_id],
name: [this.data.name, Validators.compose([Validators.required])],
fk_state_id: [this.data.fk_state_id, Validators.compose([Validators.required])]
});
this.cityFormDatas();
/** For Drop Datas*/
this._mastersService.getAllMasterData('STATE')
@ -53,7 +48,14 @@ export class CityDialogComponent implements OnInit {
}, error => this.errorMessage = <any> error);
}
/** City Form Datas*/
cityFormDatas(){
this._cityForm = this._formBuilder.group({
city_id: [this.data.city_id],
name: [this.data.name, Validators.compose([Validators.required])],
fk_state_id: [this.data.fk_state_id, Validators.compose([Validators.required])]
});
}
/** For Popup Close Button */
onNoClick(): void {
this.dialogRef.close();
@ -88,8 +90,7 @@ export class CityDialogComponent implements OnInit {
alert("SomeThing Wents Wrong Try Again !");
}
});
});
} else {
@ -112,5 +113,12 @@ export class CityDialogComponent implements OnInit {
onReset(){
this._cityForm.reset();
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.cityFormDatas();
}
}
/** End Of CityDialogComponent */

View File

@ -1,11 +1,12 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button color="primary" (click)="addCity()"> + Add City</button>
<button mat-raised-button [color]="color" (click)="addCity()"> + Add City</button>
</div>
<br>
<div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div>
<br>
<!-- displayedColumns = ['city_id','name', 'fk_state_id','state_name' , 'isactive','actions'];
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<table>
@ -72,8 +73,8 @@
<br>-->
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header">
<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>
@ -85,7 +86,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}}</mat-cell>
</ng-container>
<ng-container matColumnDef="name">
@ -117,7 +118,7 @@
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteCity(row.city_id)"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell>
</ng-container>
@ -126,7 +127,7 @@
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
class="example-margin" [color]="color"
matTooltip="Active" matTooltipPosition="above"
checked="true"
(change)="isactiveCity(row.city_id,row.isactive)"
@ -134,7 +135,7 @@
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
class="example-margin"
class="example-margin" [color]="color"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
(change)="isactiveCity(row.city_id,row.isactive)"

View File

@ -1,107 +1,50 @@
/* Structure
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 56px;
max-height: 56px;
display: flex;
align-items: center;
padding: 8px 24px 0;
font-size: 20px;
justify-content: space-between;
border-bottom: 1px solid transparent;
}
.mat-input-container {
font-size: 14px;
flex-grow: 1;
margin-left: 32px;
margin-top: 8px;
}
.example-no-results {
display: flex;
justify-content: center;
padding: 24px;
font-size: 12px;
font-style: italic;
}
/** Selection styles
.example-selection-header {
font-size: 18px;
background: rgba(255, 64, 129, 0.3);
border-bottom: 1px solid #d696ac;
}
.mat-column-select {
max-width: 54px;
}
.mat-row:hover, .example-selected-row {
background: #f5f5f5;
}
.mat-row:active, .mat-row.example-selected-row {
background: #eaeaea;
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/** Table CSS - Dislplay Data */
.mat-table {
overflow: auto;
max-height: 500px;
}*
table {
width: 100%;
}
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
th {
text-align: left;
}
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
.button{
padding-left: 6px;
font-size: 20px;
}*/
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
.active:hover{
color: green;
font-size: 20px;
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.deactive:hover{
color: red;
font-size: 20px;
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-margin {
margin: 10px;
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}

View File

@ -27,6 +27,7 @@ export class CityListComponent implements OnInit {
noRecordFound: boolean = false;
CityList: any = [];
userData = null;
color = 'primary';
public dataLength: number;
@ -53,6 +54,12 @@ export class CityListComponent implements OnInit {
this.noRecordFound = false;
this.userData = dataresult.records;
this.dataLength = dataresult.records.length;
if(dataresult.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;

View File

@ -38,7 +38,10 @@ fxLayoutAlign="center">
<br>
<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 *ngIf="_CommentOnLocalityForm.controls['comments_on_locality_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_CommentOnLocalityForm.valid"><mat-icon>save</mat-icon></button>
<!-- <button mat-button >RESET</button> -->
</div>

View File

@ -31,19 +31,21 @@ export class CommentsOnLocalityDialogComponent implements OnInit {
@Inject(MAT_DIALOG_DATA) public data: any) { }
ngOnInit() {
ngOnInit() { this.commentOnLocalityFormDatas(); }
commentOnLocalityFormDatas(){
/** Comment On Locality Form Datas*/
this._CommentOnLocalityForm = this._formBuilder.group({
comments_on_locality_id: [this.data.comments_on_locality_id],
rating: [this.data.rating, Validators.compose([Validators.required])],
});
this._CommentOnLocalityForm = this._formBuilder.group({
comments_on_locality_id: [this.data.comments_on_locality_id],
rating: [this.data.rating, Validators.compose([Validators.required])],
});
}
/** For Popup Close Button */
onNoClick(): void {
this.dialogRef.close();
}
/** To Save/Edited Popup Data */
onSubmit() {
var CommentOnLocalityForm = this._CommentOnLocalityForm.value;
@ -85,5 +87,11 @@ export class CommentsOnLocalityDialogComponent implements OnInit {
onReset(){
this._CommentOnLocalityForm.reset();
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.commentOnLocalityFormDatas();
}
}
/** End Of Comment On Locality Component*/
/** End Of Comment On Locality Component */

View File

@ -1,11 +1,12 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button color="primary" (click)="addCommentsOnLocality()" > + Add Comments On Locality</button>
<button mat-raised-button [color]="color" (click)="addCommentsOnLocality()" > + Add Comments On Locality</button>
</div>
<br>
<div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div>
<br> -->
<!--<div datatable>
<table style="border-collapse: collapse">
<thead>
@ -61,8 +62,8 @@
<br>-->
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header">
<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>
@ -74,7 +75,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container>
<ng-container matColumnDef="rating">
@ -93,7 +94,7 @@
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCommentsOnLocality(row)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCommentsOnLocality(row)"><mat-icon>edit</mat-icon></button>
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteCommentsOnLocality(row.comments_on_locality_id)"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell>
</ng-container>
@ -104,7 +105,7 @@
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
matTooltip="Active" matTooltipPosition="above"
checked="true"
checked="true" [color]="color"
(change)="isactiveCommentsOnLocality(row.comments_on_locality_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
@ -112,7 +113,7 @@
<mat-slide-toggle
class="example-margin"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
checked="false" [color]="color"
(change)="isactiveCommentsOnLocality(row.comments_on_locality_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle></ng-template>

View File

@ -1,130 +1,50 @@
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/* Structure
.example-container {
/** Table CSS - Dislplay Data */
.mat-table {
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 56px;
max-height: 56px;
display: flex;
align-items: center;
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
font-size: 20px;
justify-content: space-between;
border-bottom: 1px solid transparent;
}
.mat-input-container {
font-size: 14px;
flex-grow: 1;
margin-left: 32px;
margin-top: 8px;
}
.example-no-results {
display: flex;
justify-content: center;
padding: 24px;
font-size: 12px;
font-style: italic;
}
/** Selection styles
.example-selection-header {
font-size: 18px;
background: rgba(255, 64, 129, 0.3);
border-bottom: 1px solid #d696ac;
}
.mat-column-select {
max-width: 54px;
}
.mat-row:hover, .example-selected-row {
background: #f5f5f5;
}
.mat-row:active, .mat-row.example-selected-row {
background: #eaeaea;
}
.mat-table {
overflow: auto;
max-height: 500px;
}*/
/* Structure *
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
width : 80%;
margin : 20px auto;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}
table {
width: 100%;
}
th {
text-align: left;
}*/
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
.active:hover{
color: green;
font-size: 20px;
}
.deactive:hover{
color: red;
font-size: 20px;
}
.example-margin {
margin: 10px;
}

View File

@ -29,6 +29,7 @@ export class CommentsOnLocalityListComponent implements OnInit {
CommentsOnLocalityList: any = [];
userData = null;
color = 'primary';
public dataLength: number;
public dataSource = new MatTableDataSource();
@ -55,6 +56,12 @@ export class CommentsOnLocalityListComponent implements OnInit {
this.noRecordFound = false;
this.userData = dataresult.records;
this.dataLength = dataresult.records.length;
if(dataresult.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;

View File

@ -1,124 +1,93 @@
<!-- <div class="ml-xs mr-xs">
<h2 mat-dialog-title>Company &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<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>
</h2>
</div>
<div class="container"
fxLayout
fxLayout.xs="column"
fxLayoutAlign="center"
fxLayoutGap="35px"
fxLayoutGap.xs="0">
<div class="mat-dialog-title" fxFlex="15px">Company</div>
<div fxFlex="20px" fxFlexOrder="3" style="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 fxFlex></div>
</div>-->
<div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row"
fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 30%;"> Company &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 40%;"></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>
fxLayout="row"
fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 30%;"> Company &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 40%;"></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>
<form [formGroup]="_companyForm" (submit)="onSubmit()">
<form [formGroup]="_companyForm" (submit)="onSubmit()">
<div class="form-group">
<mat-dialog-content>
<!-- displayedColumns = ['company_id', 'name', 'addressline1', 'addressline2','addressline3', 'city', 'state', 'pincode', 'logo']; -->
<div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<input matInput type="text" placeholder="Company Name" required [formControl]="_companyForm.controls['name']">
<mat-error *ngIf="!_companyForm.controls['name'].valid && _companyForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
</mat-form-field>
</div>
<div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<input matInput type="text" placeholder="Company addressline1" required [formControl]="_companyForm.controls['addressline1']">
<mat-error *ngIf="!_companyForm.controls['addressline1'].valid && _companyForm.controls['addressline1'].touched" class="mat-text-warn">You must include a addressline1.</mat-error>
</mat-form-field>
</div>
</div>
<div class="ml-xs mr-xs">
<div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<input matInput type="text" placeholder="Company addressline2" required [formControl]="_companyForm.controls['addressline2']">
<mat-error *ngIf="!_companyForm.controls['addressline2'].valid && _companyForm.controls['addressline2'].touched" class="mat-text-warn">You must include a Name.</mat-error>
</mat-form-field>
</div>
</div>
<div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<input matInput type="text" placeholder="Company addressline3" required [formControl]="_companyForm.controls['addressline3']">
<mat-error *ngIf="!_companyForm.controls['addressline3'].valid && _companyForm.controls['addressline3'].touched" class="mat-text-warn">You must include a Name.</mat-error>
</mat-form-field>
</div>
<!-- <div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<input matInput type="text" placeholder="City" required [formControl]="_companyForm.controls['city']">
<mat-error *ngIf="!_companyForm.controls['city'].valid && _companyForm.controls['city'].touched" class="mat-text-warn">You must include a City.</mat-error>
</mat-form-field>
</div> -->
<div class="ml-xs mr-xs">
<div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<!-- <ngx-select-dropdown [multiple]="false" [value]="citydatas.city_id" [options]="citydatas" ></ngx-select-dropdown> -->
<mat-select placeholder="Pick Up City name" required [formControl]="_companyForm.controls['city']">
<!-- <mat-option (click)="onChangedData()" *ngFor="let masters of masterArray" [value]="masters.value" [disabled]="masters.disabled"> -->
<mat-option *ngFor="let cd of citydatas" [value]="cd.city_id">{{ cd.name }}</mat-option>
</mat-select>
<mat-error *ngIf="!_companyForm.controls['city'].valid && _companyForm.controls['city'].touched" class="mat-text-warn">You must include a City.</mat-error>
</mat-form-field>
<!-- <small *ngIf="!_branchForm.controls['fk_city_id'].valid && _branchForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pickup City Name.</small> -->
</div>
<div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<input matInput type="text" placeholder="Pin code" required [formControl]="_companyForm.controls['pincode']">
<mat-hint>pincode should be in 6 digit format</mat-hint>
<!-- <mat-error *ngIf="_companyForm.controls['pincode'].hasError('required') && _companyForm.controls['pincode'].touched" class="mat-text-warn">You must include phone number.</mat-error> -->
<!-- <mat-error *ngIf="!_companyForm.controls['pincode'].valid && _companyForm.controls['pincode'].touched" class="mat-text-warn">You must include a pincode number.</mat-error> -->
<mat-error *ngIf="_companyForm.controls['pincode'].hasError('minlength') && _companyForm.controls['pincode'].touched" class="mat-text-warn">Your pincode must be at least 5 characters long.</mat-error>
<mat-error *ngIf="_companyForm.controls['pincode'].hasError('maxlength') && _companyForm.controls['pincode'].touched" class="mat-text-warn">Your pincode name cannot exceed 6 characters.</mat-error>
</mat-form-field>
<input matInput type="text" placeholder="Company addressline3" required [formControl]="_companyForm.controls['addressline3']">
<mat-error *ngIf="!_companyForm.controls['addressline3'].valid && _companyForm.controls['addressline3'].touched" class="mat-text-warn">You must include a Name.</mat-error>
</mat-form-field>
</div>
</div>
<div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<mat-select placeholder="Pick Up State Name" required [formControl]="_companyForm.controls['state']">
<mat-option *ngFor="let sd of stateDatas" [value]="sd.state_id">{{ sd.name }}</mat-option>
</mat-select>
<mat-error *ngIf="!_companyForm.controls['state'].valid && _companyForm.controls['state'].touched" class="mat-text-warn">You must Pickup a State.</mat-error>
</mat-form-field>
<div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<mat-select placeholder="Pick Up City name" required [formControl]="_companyForm.controls['city']">
</div>
<!-- <div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<input matInput type="text" placeholder="logo" required [formControl]="_companyForm.controls['logo']">
<mat-error *ngIf="!_companyForm.controls['logo'].valid && _companyForm.controls['logo'].touched" class="mat-text-warn">You must include a logo.</mat-error>
</mat-form-field>
<mat-option *ngFor="let cd of citydatas" [value]="cd.city_id">{{ cd.name }}</mat-option>
</mat-select>
<mat-error *ngIf="!_companyForm.controls['city'].valid && _companyForm.controls['city'].touched" class="mat-text-warn">You must include a City.</mat-error>
</mat-form-field>
<!-- <small *ngIf="!_branchForm.controls['fk_city_id'].valid && _branchForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pickup City Name.</small> -->
</div>
</div> -->
<div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<input matInput type="text" placeholder="Pin code" required [formControl]="_companyForm.controls['pincode']">
<mat-hint>pincode should be in 6 digit format</mat-hint>
<!-- <mat-error *ngIf="_companyForm.controls['pincode'].hasError('required') && _companyForm.controls['pincode'].touched" class="mat-text-warn">You must include phone number.</mat-error> -->
<!-- <mat-error *ngIf="!_companyForm.controls['pincode'].valid && _companyForm.controls['pincode'].touched" class="mat-text-warn">You must include a pincode number.</mat-error> -->
<mat-error *ngIf="_companyForm.controls['pincode'].hasError('minlength') && _companyForm.controls['pincode'].touched" class="mat-text-warn">Your pincode must be at least 5 characters long.</mat-error>
<mat-error *ngIf="_companyForm.controls['pincode'].hasError('maxlength') && _companyForm.controls['pincode'].touched" class="mat-text-warn">Your pincode name cannot exceed 6 characters.</mat-error>
</mat-form-field>
</div>
<!--<div class="ml-xs mr-xs">
logo
<input type="file" (change)="onFileChange($event)" [formControl]="_companyForm.controls['logo']"/>
<!- <span *ngIf="usersData!=''">{{img}}</span>
</div> -->
<div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<mat-select placeholder="Pick Up State Name" required [formControl]="_companyForm.controls['state']">
<mat-option *ngFor="let sd of stateDatas" [value]="sd.state_id">{{ sd.name }}</mat-option>
</mat-select>
<mat-error *ngIf="!_companyForm.controls['state'].valid && _companyForm.controls['state'].touched" class="mat-text-warn">You must Pickup a State.</mat-error>
</mat-form-field>
</div>
<div class="ml-xs mr-xs">
logo
<input type="file" (change)="onFileChange($event)" [formControl]="_companyForm.controls['logo']"/>
</div>
<br>
<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" [disabled]="!_companyForm.valid"><mat-icon>save</mat-icon></button>
<button *ngIf="_companyForm.controls['company_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_companyForm.valid"><mat-icon>save</mat-icon></button>
<!-- <button mat-button >RESET</button> -->
</div>
</mat-dialog-content>
</div>
</form>
</form>

View File

@ -37,20 +37,7 @@ export class CompanyDialogComponent implements OnInit {
ngOnInit() {
this._companyForm = this._formBuilder.group({
//Company_id: any; fk_city_id: any;
// <!-- displayedColumns = ['company_id', 'name', 'addressline1', 'addressline2','addressline3', 'city', 'state', 'pincode', 'logo']; -->
company_id: [this.data.company_id],
name: [this.data.name, Validators.compose([Validators.required])],
addressline1: [this.data.addressline1, Validators.compose([Validators.required])],
addressline2: [this.data.addressline2, Validators.compose([Validators.required])],
addressline3: [this.data.addressline3, Validators.compose([Validators.required])],
city: [this.data.city, Validators.compose([Validators.required])],
state: [this.data.state, Validators.compose([Validators.required])],
pincode: [this.data.pincode, Validators.compose([Validators.required, Validators.minLength(5), Validators.maxLength(6)])],
// logo : [this.data.logo]
});
this.CompanyFormData();
this._mastersService.getAllMasterData('STATE')
.subscribe(
@ -73,19 +60,39 @@ export class CompanyDialogComponent implements OnInit {
}
/** For CompanyFormData */
CompanyFormData() {
this._companyForm = this._formBuilder.group({
//Company_id: any; fk_city_id: any;
// <!-- displayedColumns = ['company_id', 'name', 'addressline1', 'addressline2','addressline3', 'city', 'state', 'pincode', 'logo']; -->
company_id: [this.data.company_id],
name: [this.data.name, Validators.compose([Validators.required])],
addressline1: [this.data.addressline1, Validators.compose([Validators.required])],
addressline2: [this.data.addressline2, Validators.compose([Validators.required])],
addressline3: [this.data.addressline3, Validators.compose([Validators.required])],
city: [this.data.city, Validators.compose([Validators.required])],
state: [this.data.state, Validators.compose([Validators.required])],
pincode: [this.data.pincode, Validators.compose([Validators.required, Validators.minLength(5), Validators.maxLength(6)])],
logo : [null]
});
}
/** For Popup Close Button */
onNoClick(): void {
this.dialogRef.close();
}
// onFileChange($event) {
// //console.log($event.target.files[0]);
onFileChange($event) {
//console.log($event.target.files[0]);
// //if($event.target.files[0] < 0 ){
// this.files = $event.target.files[0];
// //}
// //console.log(this.files);
// }
//if($event.target.files[0] < 0 ){
this.files = $event.target.files[0];
//}
//console.log(this.files);
}
// onSubmit() {
// if (isNaN(this.data.ID)) {
// this._companyService.addCompany(this._companyForm.value);
@ -106,13 +113,26 @@ export class CompanyDialogComponent implements OnInit {
if(isNaN(this.data.company_id)) {
console.log(CompanyFormValue);
Object.keys(CompanyFormValue).forEach((key) => ( CompanyFormValue[key] == null) && delete CompanyFormValue[key]);
console.log(CompanyFormValue);
CompanyFormValue.logo = this.files.name;
//console.log(CompanyFormValue);
//After Saving the Company data then popup close
this._mastersService.addMasterDetails(CompanyFormValue,'COMPANY').subscribe();
this._mastersService.addCompanyDetails(CompanyFormValue).subscribe(
dataresult=>{
if (dataresult.dataStatus == true){
this.dialogRef.close();//After Saving the City data then popup close
alert("Data Saved Successfully");
}
else{
alert("SomeThing Wents Wrong Try Again !");
}
});
//this._mastersService.addCompanyDetails(CompanyFormValue,'COMPANY').subscribe();
this.dialogRef.close();
//this.dialogRef.close();
//Need To Dispaly saving Datas
alert("Saved Successfully");
//alert("Saved Successfully");
} else {
this._mastersService.editMasterDetails(CompanyFormValue,'COMPANY').subscribe();
@ -124,8 +144,12 @@ export class CompanyDialogComponent implements OnInit {
}
/** To Reset Popup Data */
onReset(){
this._companyForm.reset();
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.CompanyFormData();
}
}

View File

@ -1,11 +1,12 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button color="primary" (click)="addCompany()" > + Add Company</button>
<button mat-raised-button [color]="color" (click)="addCompany()" > + Add Company</button>
</div>
<br>
<div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div>
<br> -->
<!-- <div datatable>
<table style="border-collapse: collapse">
<thead>
@ -93,8 +94,8 @@
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>
</div>-->
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header">
<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>
@ -106,7 +107,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container>
<ng-container matColumnDef="name">
@ -127,7 +128,7 @@
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCompany(row)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCompany(row)"><mat-icon>edit</mat-icon></button>
</mat-cell>
</ng-container>

View File

@ -1,118 +1,50 @@
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/* Structure
.example-container {
/** Table CSS - Dislplay Data */
.mat-table {
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 56px;
max-height: 56px;
display: flex;
align-items: center;
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
font-size: 20px;
justify-content: space-between;
border-bottom: 1px solid transparent;
}
.mat-input-container {
font-size: 14px;
flex-grow: 1;
margin-left: 32px;
margin-top: 8px;
}
.example-no-results {
display: flex;
justify-content: center;
padding: 24px;
font-size: 12px;
font-style: italic;
}
/** Selection styles
.example-selection-header {
font-size: 18px;
background: rgba(255, 64, 129, 0.3);
border-bottom: 1px solid #d696ac;
}
.mat-column-select {
max-width: 54px;
}
.mat-row:hover, .example-selected-row {
background: #f5f5f5;
}
.mat-row:active, .mat-row.example-selected-row {
background: #eaeaea;
}
.mat-table {
overflow: auto;
max-height: 500px;
}*/
/* Structure *
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
width : 80%;
margin : 20px auto;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}
table {
width: 100%;
}
th {
text-align: left;
}*/
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}

View File

@ -37,6 +37,7 @@ export class CompanyListComponent implements OnInit {
noRecordFound: boolean = false;
CompanyList: any = [];
userData = null;
color = 'primary';
public dataLength: number;
public dataSource = new MatTableDataSource();
@ -67,6 +68,12 @@ export class CompanyListComponent implements OnInit {
this.noRecordFound = false;
this.userData = data.records;
this.dataLength = data.records.length;
if(data.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;

View File

@ -41,7 +41,11 @@ fxLayoutAlign="center">
<br>
<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="Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button> -->
<button *ngIf="_customerBehaviourForm.controls['customer_behaviour_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_customerBehaviourForm.valid"><mat-icon>save</mat-icon></button>
<!-- <button mat-button >RESET</button> -->
</div>

View File

@ -32,15 +32,22 @@ export class CustomerBehaviourDialogComponent implements OnInit {
ngOnInit() {
/** Customer Behaviour Form Datas*/
this._customerBehaviourForm = this._formBuilder.group({
//branch_id: any; fk_city_id: any;
customer_behaviour_id: [this.data.customer_behaviour_id],
description: [this.data.description, Validators.compose([Validators.required])]
});
this.customerBehaviourFormData()
//customer_behaviour_id, description, createdon, fk_createdby, updatedon, fk_updatedby, isactive
//console.log(this._customerBehaviourForm);
}
customerBehaviourFormData(){
this._customerBehaviourForm = this._formBuilder.group({
//branch_id: any; fk_city_id: any;
customer_behaviour_id: [this.data.customer_behaviour_id],
description: [this.data.description, Validators.compose([Validators.required])]
});
}
// onSubmit() {
// if (isNaN(this.data.ID)) {
// this._MastersService.addBranch(this._customerBehaviourForm.value);
@ -101,5 +108,9 @@ onNoClick(): void {
onReset(){
this._customerBehaviourForm.reset();
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.customerBehaviourFormData();
}
}
/** End of CustomerBehaviour Component */

View File

@ -1,11 +1,12 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button color="primary" (click)="addCustomerBehaviour()" > + Add CustomerBehaviour</button>
<button mat-raised-button [color]="color" (click)="addCustomerBehaviour()" > + Add CustomerBehaviour</button>
</div>
<br>
<div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div>
<br> -->
<!-- <div datatable>
<table style="border-collapse: collapse">
<thead>
@ -60,8 +61,8 @@
</div>
<br>-->
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header">
<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>
@ -73,7 +74,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container>
<ng-container matColumnDef="description">
@ -92,7 +93,7 @@
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCustomerBehaviour(row)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCustomerBehaviour(row)" [color]="color"><mat-icon>edit</mat-icon></button>
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteCustomerBehaviour(row.city_id)"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell>
</ng-container>
@ -105,13 +106,13 @@
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
matTooltip="Active" matTooltipPosition="above"
checked="true"
checked="true" [color]="color"
(change)="isactiveCustomerBehaviour(row.customer_behaviour_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
class="example-margin"
class="example-margin" [color]="color"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
(change)="isactiveCustomerBehaviour(row.customer_behaviour_id,row.isactive)"

View File

@ -1,130 +1,50 @@
/* Structure
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 56px;
max-height: 56px;
display: flex;
align-items: center;
padding: 8px 24px 0;
font-size: 20px;
justify-content: space-between;
border-bottom: 1px solid transparent;
}
.mat-input-container {
font-size: 14px;
flex-grow: 1;
margin-left: 32px;
margin-top: 8px;
}
.example-no-results {
display: flex;
justify-content: center;
padding: 24px;
font-size: 12px;
font-style: italic;
}
/** Selection styles
.example-selection-header {
font-size: 18px;
background: rgba(255, 64, 129, 0.3);
border-bottom: 1px solid #d696ac;
}
.mat-column-select {
max-width: 54px;
}
.mat-row:hover, .example-selected-row {
background: #f5f5f5;
}
.mat-row:active, .mat-row.example-selected-row {
background: #eaeaea;
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/** Table CSS - Dislplay Data */
.mat-table {
overflow: auto;
max-height: 500px;
}*/
/* Structure *
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
width : 80%;
margin : 20px auto;
}
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}
table {
width: 100%;
}
th {
text-align: left;
}
*/
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
.active:hover{
color: green;
font-size: 20px;
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.deactive:hover{
color: red;
font-size: 20px;
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-margin {
margin: 10px;
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}

View File

@ -29,6 +29,7 @@ export class CustomerBehaviourListComponent implements OnInit {
CustomerBehaviourList: any = [];
noRecordFound: boolean = false;
userData = null;
color = 'primary';
public dataLength: number;
public dataSource = new MatTableDataSource();
@ -52,10 +53,16 @@ export class CustomerBehaviourListComponent implements OnInit {
getCustomerBehaviour() {
this._MastersService.getAllMasterData('CUSTOMERBEHAVIOUR').subscribe(
dataresult => {
if(dataresult.status === 200){
if(dataresult.dataStatus == true){
this.noRecordFound = false;
this.userData = dataresult.records;
this.dataLength = dataresult.records.length;
if(dataresult.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;

View File

@ -47,7 +47,11 @@ fxLayoutAlign="center">
</div>
<br>
<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="Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button> -->
<button *ngIf="_customerSegmentForm.controls['customer_segment_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_customerSegmentForm.valid"><mat-icon>save</mat-icon></button>
<!-- <button mat-button >RESET</button> -->
</div>

View File

@ -29,18 +29,21 @@ export class CustomerSegmentDialogComponent implements OnInit {
ngOnInit() {
this.customerSegmentFormDatas();
/** Customer Segment Datas */
this._customerSegmentForm = this._formBuilder.group({
customer_segment_id: [this.data.customer_segment_id],
name: [this.data.name, Validators.compose([Validators.required])],
abbr: [this.data.abbr, Validators.compose([Validators.required])]
});
//console.log(this._customerSegmentForm);
//customer_segment_id, name, abbr, createdon, fk_createdby, updatedon, isactive, fk_updatedby
}
/** Customer Segment Datas */
customerSegmentFormDatas(){
this._customerSegmentForm = this._formBuilder.group({
customer_segment_id: [this.data.customer_segment_id],
name: [this.data.name, Validators.compose([Validators.required])],
abbr: [this.data.abbr, Validators.compose([Validators.required])]
});
}
// onSubmit() {
// if (isNaN(this.data.ID)) {
// this._MastersService.addCustomerSegment(this._customerSegmentForm.value);
@ -99,5 +102,12 @@ export class CustomerSegmentDialogComponent implements OnInit {
onReset(){
this._customerSegmentForm.reset();
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.customerSegmentFormDatas();
}
}
/** End Of Customer Segment Component */

View File

@ -1,11 +1,12 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button color="primary" (click)="addCustomerSegment()" > + Add CustomerSegment</button>
<button mat-raised-button [color]="color" (click)="addCustomerSegment()" > + Add CustomerSegment</button>
</div>
<br>
<div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div>
<br> -->
<!--<div datatable>
<table style="border-collapse: collapse">
<thead>
@ -66,8 +67,8 @@
<br>-->
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header">
<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>
@ -78,7 +79,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container>
<ng-container matColumnDef="name">
@ -90,7 +91,7 @@
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCustomerSegment(row)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCustomerSegment(row)"><mat-icon>edit</mat-icon></button>
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteCustomerSegment(row.city_id)"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell>
</ng-container>
@ -104,7 +105,7 @@
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
matTooltip="Active" matTooltipPosition="above"
checked="true"
checked="true" [color]="color"
(change)="isactiveCustomerSegment(row.customer_segment_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
@ -112,7 +113,7 @@
<mat-slide-toggle
class="example-margin"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
checked="false" [color]="color"
(change)="isactiveCustomerSegment(row.customer_segment_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle></ng-template>

View File

@ -1,130 +1,50 @@
/* Structure
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 56px;
max-height: 56px;
display: flex;
align-items: center;
padding: 8px 24px 0;
font-size: 20px;
justify-content: space-between;
border-bottom: 1px solid transparent;
}
.mat-input-container {
font-size: 14px;
flex-grow: 1;
margin-left: 32px;
margin-top: 8px;
}
.example-no-results {
display: flex;
justify-content: center;
padding: 24px;
font-size: 12px;
font-style: italic;
}
/** Selection styles
.example-selection-header {
font-size: 18px;
background: rgba(255, 64, 129, 0.3);
border-bottom: 1px solid #d696ac;
}
.mat-column-select {
max-width: 54px;
}
.mat-row:hover, .example-selected-row {
background: #f5f5f5;
}
.mat-row:active, .mat-row.example-selected-row {
background: #eaeaea;
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/** Table CSS - Dislplay Data */
.mat-table {
overflow: auto;
max-height: 500px;
}*/
/* Structure *
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
width : 80%;
margin : 20px auto;
}
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
}
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}
table {
width: 100%;
}
th {
text-align: left;
}
*/
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
.active:hover{
color: green;
font-size: 20px;
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.deactive:hover{
color: red;
font-size: 20px;
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-margin {
margin: 10px;
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}

View File

@ -27,6 +27,7 @@ export class CustomerSegmentListComponent implements OnInit {
loader: boolean = false;
CustomerSegmentList: any = [];
noRecordFound: boolean = false;
color = 'primary';
// displayedColumns = ['customer_segment_id', 'abbr', 'name', 'isactive','actions'];
userData = null;
@ -83,10 +84,16 @@ displayedColumns = ['serialno','name','actions','isactive'];
getCustomerSegment() {
this._MastersService.getAllMasterData('CUSTOMERSEGMENT').subscribe(
data => {
if(data.status === 200){
if(data.dataStatus == true){
this.noRecordFound = false;
this.userData = data.records;
this.dataLength = data.records.length;
if(data.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;

View File

@ -47,7 +47,11 @@ fxLayoutAlign="center">
</div>
<br>
<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="Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button> -->
<button *ngIf="_designationForm.controls['designation_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_designationForm.valid"><mat-icon>save</mat-icon></button>
<!-- <button mat-button >RESET</button> -->
</div>

View File

@ -29,16 +29,20 @@ export class DesignationDialogComponent implements OnInit {
ngOnInit() {
this.designationFormDatas();
/** Designation Form Datas */
this._designationForm = this._formBuilder.group({
designation_id: [this.data.designation_id],
name: [this.data.name, Validators.compose([Validators.required])],
short_name: [this.data.short_name, Validators.compose([Validators.required])]
});
}
/** Designation Form Datas */
designationFormDatas(){
this._designationForm = this._formBuilder.group({
designation_id: [this.data.designation_id],
name: [this.data.name, Validators.compose([Validators.required])],
short_name: [this.data.short_name, Validators.compose([Validators.required])]
});
}
// onSubmit() {
// if (isNaN(this.data.ID)) {
// this._MastersService.addDesignation(this._designationForm.value);
@ -95,5 +99,9 @@ export class DesignationDialogComponent implements OnInit {
onReset(){
this._designationForm.reset();
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.designationFormDatas();
}
}
/** End Of Designation Component */

View File

@ -1,11 +1,12 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button color="primary" (click)="addDesignation()" > + Add Designation</button>
<button mat-raised-button [color]="color" (click)="addDesignation()" > + Add Designation</button>
</div>
<br>
<div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div>
<br> -->
<!-- <div datatable>
<table style="border-collapse: collapse">
<thead>
@ -65,8 +66,8 @@
</div>
<br>-->
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header">
<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>
@ -78,7 +79,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container>
<ng-container matColumnDef="name">
@ -94,7 +95,7 @@
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
matTooltip="Active" matTooltipPosition="above"
checked="true"
checked="true" [color]="color"
(change)="isactiveDesignation(row.designation_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
@ -102,7 +103,7 @@
<mat-slide-toggle
class="example-margin"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
checked="false" [color]="color"
(change)="isactiveDesignation(row.designation_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle></ng-template>
@ -112,7 +113,7 @@
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editDesignation(row)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button class="hover-icon" [color]="color" matTooltip="Edit" matTooltipPosition="above" (click)="editDesignation(row)"><mat-icon>edit</mat-icon></button>
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteDesignation(row.designation_id)"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell>
</ng-container>

View File

@ -1,131 +1,50 @@
/* Structure
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 56px;
max-height: 56px;
display: flex;
align-items: center;
padding: 8px 24px 0;
font-size: 20px;
justify-content: space-between;
border-bottom: 1px solid transparent;
}
.mat-input-container {
font-size: 14px;
flex-grow: 1;
margin-left: 32px;
margin-top: 8px;
}
.example-no-results {
display: flex;
justify-content: center;
padding: 24px;
font-size: 12px;
font-style: italic;
}
/** Selection styles
.example-selection-header {
font-size: 18px;
background: rgba(255, 64, 129, 0.3);
border-bottom: 1px solid #d696ac;
}
.mat-column-select {
max-width: 54px;
}
.mat-row:hover, .example-selected-row {
background: #f5f5f5;
}
.mat-row:active, .mat-row.example-selected-row {
background: #eaeaea;
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/** Table CSS - Dislplay Data */
.mat-table {
overflow: auto;
max-height: 500px;
}*/
/* Structure *
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
width : 80%;
margin : 20px auto;
}
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}
table {
width: 100%;
}
th {
text-align: left;
}*/
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
.active:hover{
color: green;
font-size: 20px;
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.deactive:hover{
color: red;
font-size: 20px;
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-margin {
margin: 10px;
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}

View File

@ -28,6 +28,7 @@ export class DesignationListComponent implements OnInit {
loader: boolean = false;
noRecordFound: boolean = false;
DesignationList: any = [];
color = 'primary';
userData = null;
@ -81,10 +82,16 @@ export class DesignationListComponent implements OnInit {
getDesignation() {
this._MastersService.getAllMasterData('DESIGNATION').subscribe(
data => {
if(data.status === 200){
if(data.dataStatus == true){
this.noRecordFound = false;
this.userData = data.records;
this.dataLength = data.records.length;
if(data.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;

View File

@ -39,7 +39,11 @@ fxLayoutAlign="center">
</div>
<br>
<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="Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button> -->
<button *ngIf="_frequencyForm.controls['frequency_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_frequencyForm.valid"><mat-icon>save</mat-icon></button>
</div>

View File

@ -29,14 +29,17 @@ export class FrequencyDialogComponent implements OnInit {
ngOnInit() {
/**FrequencyForm Datas*/
this._frequencyForm = this._formBuilder.group({
frequency_id: [this.data.frequency_id],
name: [this.data.name, Validators.compose([Validators.required])]
});
this.frequencyFormDatas();
//console.log(this._frequencyForm);
}
/**FrequencyForm Datas*/
frequencyFormDatas(){ this._frequencyForm = this._formBuilder.group({
frequency_id: [this.data.frequency_id],
name: [this.data.name, Validators.compose([Validators.required])]
});}
/** For Popup Close Button */
onNoClick(): void {
this.dialogRef.close();
@ -90,5 +93,10 @@ export class FrequencyDialogComponent implements OnInit {
onReset(){
this._frequencyForm.reset();
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.frequencyFormDatas();
}
}
/** End Of Frequency Component */

View File

@ -1,11 +1,12 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button color="primary" (click)="addFrequency()" > + Add Frequency</button>
<button mat-raised-button [color]="color" (click)="addFrequency()" > + Add Frequency</button>
</div>
<br>
<div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div>
<br> -->
<!-- <div datatable>
<table style="border-collapse: collapse">
<thead>
@ -74,8 +75,8 @@
</div>
<br>-->
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header">
<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>
@ -87,7 +88,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container>
<ng-container matColumnDef="name">
@ -101,13 +102,13 @@
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
matTooltip="Active" matTooltipPosition="above"
checked="true"
checked="true" [color]="color"
(change)="isactiveFrequency(row.frequency_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
class="example-margin"
class="example-margin" [color]="color"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
(change)="isactiveFrequency(row.frequency_id,row.isactive)"
@ -119,7 +120,7 @@
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editFrequency(row)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editFrequency(row)"><mat-icon>edit</mat-icon></button>
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteFrequency(row.frequency_id)"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell>
</ng-container>

View File

@ -1,160 +1,50 @@
/* Structure
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}*/
//
/* Structure
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 56px;
max-height: 56px;
display: flex;
align-items: center;
padding: 8px 24px 0;
font-size: 20px;
justify-content: space-between;
border-bottom: 1px solid transparent;
}
.mat-input-container {
font-size: 14px;
flex-grow: 1;
margin-left: 32px;
margin-top: 8px;
}
.example-no-results {
display: flex;
justify-content: center;
padding: 24px;
font-size: 12px;
font-style: italic;
}
/** Selection styles
.example-selection-header {
font-size: 18px;
background: rgba(255, 64, 129, 0.3);
border-bottom: 1px solid #d696ac;
}
.mat-column-select {
max-width: 54px;
}
.mat-row:hover, .example-selected-row {
background: #f5f5f5;
}
.mat-row:active, .mat-row.example-selected-row {
background: #eaeaea;
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/** Table CSS - Dislplay Data */
.mat-table {
overflow: auto;
max-height: 500px;
}*/
/* Structure *
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
width : 80%;
margin : 20px auto;
}
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
}
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}
table {
width: 100%;
}
th {
text-align: left;
}*/
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
.active:hover{
color: green;
font-size: 20px;
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.deactive:hover{
color: red;
font-size: 20px;
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-margin {
margin: 10px;
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}

View File

@ -29,7 +29,7 @@ export class FrequencyListComponent implements OnInit {
loader: boolean = false;
FrequencyList: any = [];
noRecordFound: boolean = false;
color = 'primary';
userData = null;
@ -90,10 +90,16 @@ export class FrequencyListComponent implements OnInit {
getFrequency() {
this._MastersService.getAllMasterData('FREQUENCY').subscribe(
data => {
if(data.status === 200){
if(data.dataStatus == true){
this.noRecordFound = false;
this.userData = data.records;
this.dataLength = data.records.length;
if(data.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;
@ -143,5 +149,6 @@ applyFilter(filterValue: string) {
this.dataSource.filter = filterValue;
}
}
/** End of BranchListComponent */
/** End of FrequencyListComponent */

View File

@ -39,7 +39,11 @@ fxLayoutAlign="center">
</div>
<br>
<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="Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button> -->
<button *ngIf="_IndustryClassificationForm.controls['industry_classification_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_IndustryClassificationForm.valid"><mat-icon>save</mat-icon></button>

View File

@ -29,15 +29,21 @@ export class IndustryClassificationDialogComponent implements OnInit {
ngOnInit() {
/** Industry Classification Form Data */
this._IndustryClassificationForm = this._formBuilder.group({
industry_classification_id: [this.data.industry_classification_id],
name: [this.data.name, Validators.compose([Validators.required])]
});
this.industryClassificationFormDatas();
//console.log(this._IndustryClassificationForm);
//industry_classification_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
}
/** Industry Classification Form Data */
industryClassificationFormDatas(){
this._IndustryClassificationForm = this._formBuilder.group({
industry_classification_id: [this.data.industry_classification_id],
name: [this.data.name, Validators.compose([Validators.required])]
});
}
// onSubmit() {
// if (isNaN(this.data.ID)) {
// this._contactService.addIndustryClassification(this._IndustryClassificationForm.value);
@ -93,5 +99,11 @@ onNoClick(): void {
onReset(){
this._IndustryClassificationForm.reset();
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.industryClassificationFormDatas();
}
}
/** End Of Industry Classification Dialog Component */

View File

@ -1,14 +1,14 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button color="primary" (click)="addIndustryClassification()" > + Add Industry Classification</button>
<button mat-raised-button [color]="color" (click)="addIndustryClassification()" > + Add Industry Classification</button>
</div>
<br>
<div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div>
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div> <br> -->
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
<div class="example-header">
<div class="filter-header">
<mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field>
@ -18,7 +18,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container>
<ng-container matColumnDef="name">
@ -34,14 +34,14 @@
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
matTooltip="Active" matTooltipPosition="above"
checked="true"
checked="true" [color]="color"
(change)="isactiveIndustryClassification(row.industry_classification_id,row.isactive)"
onclick="return confirm('Are you sure?')"></mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
class="example-margin"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
checked="false" [color]="color"
(change)="isactiveIndustryClassification(row.industry_classification_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle></ng-template>
@ -51,7 +51,7 @@
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editIndustryClassification(row)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editIndustryClassification(row)"><mat-icon>edit</mat-icon></button>
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteIndustryClassification(row.industry_classification_id)"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell>
</ng-container>

View File

@ -1,156 +1,50 @@
/* Structure
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}*/
/* Structure
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 56px;
max-height: 56px;
display: flex;
align-items: center;
padding: 8px 24px 0;
font-size: 20px;
justify-content: space-between;
border-bottom: 1px solid transparent;
}
.mat-input-container {
font-size: 14px;
flex-grow: 1;
margin-left: 32px;
margin-top: 8px;
}
.example-no-results {
display: flex;
justify-content: center;
padding: 24px;
font-size: 12px;
font-style: italic;
}
/** Selection styles
.example-selection-header {
font-size: 18px;
background: rgba(255, 64, 129, 0.3);
border-bottom: 1px solid #d696ac;
}
.mat-column-select {
max-width: 54px;
}
.mat-row:hover, .example-selected-row {
background: #f5f5f5;
}
.mat-row:active, .mat-row.example-selected-row {
background: #eaeaea;
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/** Table CSS - Dislplay Data */
.mat-table {
overflow: auto;
max-height: 500px;
}*/
/* Structure *
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
width : 80%;
margin : 20px auto;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}
table {
width: 100%;
}
th {
text-align: left;
}*/
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
.active:hover{
color: green;
font-size: 20px;
}
.deactive:hover{
color: red;
font-size: 20px;
}
.example-margin {
margin: 10px;
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}

View File

@ -38,6 +38,7 @@ export class IndustryClassificationListComponent implements OnInit {
noRecordFound: boolean = false;
userData = null;
color = 'primary';
public dataLength: number;
public dataSource = new MatTableDataSource();
@ -95,10 +96,16 @@ export class IndustryClassificationListComponent implements OnInit {
getIndustryClassification() {
this._IMService.getAllMasterData('INDUSTRYCLASSIFICATION').subscribe(data => {
if(data.status === 200){
if(data.dataStatus == true){
this.noRecordFound = false;
this.userData = data.records;
this.dataLength = data.records.length;
if(data.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;

View File

@ -38,7 +38,11 @@ fxLayoutAlign="center">
</div>
<br>
<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="Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button> -->
<button *ngIf="_lenderHierarchyForm.controls['lender_hierarchy_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_lenderHierarchyForm.valid"><mat-icon>save</mat-icon></button>
</div>

View File

@ -28,17 +28,22 @@ export class LenderHierarchyDialogComponent implements OnInit {
ngOnInit() {
/** lender Hierarchy Form Data */
this._lenderHierarchyForm = this._formBuilder.group({
//Designation_id: any; fk_city_id: any;
this.lenderHierarchyFormDatas();
lender_hierarchy_id: [this.data.lender_hierarchy_id],
lender_hierarchy: [this.data.lender_hierarchy, Validators.compose([Validators.required])],
});
//console.log(this._lenderHierarchyForm);
}
/** lender Hierarchy Form Data */
lenderHierarchyFormDatas(){
this._lenderHierarchyForm = this._formBuilder.group({
//Designation_id: any; fk_city_id: any;
lender_hierarchy_id: [this.data.lender_hierarchy_id],
lender_hierarchy: [this.data.lender_hierarchy, Validators.compose([Validators.required])],
});}
// onSubmit() {
// if (isNaN(this.data.ID)) {
// this._MastersService.addDesignation(this._lenderHierarchyForm.value);
@ -98,5 +103,11 @@ export class LenderHierarchyDialogComponent implements OnInit {
onReset(){
this._lenderHierarchyForm.reset();
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.lenderHierarchyFormDatas();
}
}
/** End of lender hierarchy Component*/

View File

@ -1,11 +1,11 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button color="primary" (click)="addLenderHierarchy()" > + Add LenderHierarchy</button>
<button mat-raised-button [color]="color" (click)="addLenderHierarchy()" > + Add LenderHierarchy</button>
</div>
<br>
<div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div> <br> -->
<!-- <div datatable>
<table style="border-collapse: collapse">
<thead>
@ -60,8 +60,8 @@
<br>-->
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header">
<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>
@ -72,7 +72,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container>
<ng-container matColumnDef="lender_hierarchy">
@ -91,7 +91,7 @@
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
matTooltip="Active" matTooltipPosition="above"
checked="true"
checked="true" [color]="color"
(change)="isactiveLenderHierarchy(row.lender_hierarchy_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
@ -99,7 +99,7 @@
<mat-slide-toggle
class="example-margin"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
checked="false" [color]="color"
(change)="isactiveLenderHierarchy(row.lender_hierarchy_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle></ng-template>
@ -109,7 +109,7 @@
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editLenderHierarchy(row)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editLenderHierarchy(row)"><mat-icon>edit</mat-icon></button>
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteLenderHierarchy(row.lender_hierarchy_id)"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell>
</ng-container>

View File

@ -1,132 +1,50 @@
/* Structure
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 56px;
max-height: 56px;
display: flex;
align-items: center;
padding: 8px 24px 0;
font-size: 20px;
justify-content: space-between;
border-bottom: 1px solid transparent;
}
.mat-input-container {
font-size: 14px;
flex-grow: 1;
margin-left: 32px;
margin-top: 8px;
}
.example-no-results {
display: flex;
justify-content: center;
padding: 24px;
font-size: 12px;
font-style: italic;
}
/** Selection styles
.example-selection-header {
font-size: 18px;
background: rgba(255, 64, 129, 0.3);
border-bottom: 1px solid #d696ac;
}
.mat-column-select {
max-width: 54px;
}
.mat-row:hover, .example-selected-row {
background: #f5f5f5;
}
.mat-row:active, .mat-row.example-selected-row {
background: #eaeaea;
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/** Table CSS - Dislplay Data */
.mat-table {
overflow: auto;
max-height: 500px;
}*/
/* Structure *
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
width : 80%;
margin : 20px auto;
}
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}
table {
width: 100%;
}
th {
text-align: left;
}*/
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
.active:hover{
color: green;
font-size: 20px;
}
.deactive:hover{
color: red;
font-size: 20px;
}
.example-margin {
margin: 10px;
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}

View File

@ -31,7 +31,7 @@ export class LenderHierarchyListComponent implements OnInit {
isPopupOpened: boolean = true;
loader: boolean = false;
LenderHierarchyList: any = [];
color = 'primary';
//displayedColumns = ['lender_hierarchy_id', 'lender_hierarchy','isactive','actions'];
userData = null;
@ -103,10 +103,16 @@ export class LenderHierarchyListComponent implements OnInit {
this._MastersService.getAllMasterData('LENDERHIERARCHY').subscribe(
data => {
if(data.status === 200){
if(data.dataStatus == true){
this.noRecordFound = false;
this.userData = data.records;
this.dataLength = data.records.length;
if(data.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;

View File

@ -38,7 +38,11 @@ fxLayout="row">
</div>
<br>
<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="Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button> -->
<button *ngIf="_occupationForm.controls['occupation_non_earning_member_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_occupationForm.valid"><mat-icon>save</mat-icon></button>
<!-- <button mat-button >RESET</button> -->
</div>

View File

@ -26,13 +26,15 @@ export class MembersOccupationDialogComponent implements OnInit {
private _memberService: MastersService,
@Inject(MAT_DIALOG_DATA) public data: any) { }
occupationFormDatas(){
this._occupationForm = this._formBuilder.group({
occupation_non_earning_member_id: [this.data.occupation_non_earning_member_id],
name: [this.data.name, Validators.compose([Validators.required])]
});
}
ngOnInit() {
this.occupationFormDatas();
this._occupationForm = this._formBuilder.group({
occupation_non_earning_member_id: [this.data.occupation_non_earning_member_id],
name: [this.data.name, Validators.compose([Validators.required])]
});
//console.log(this._occupationForm);
}
@ -91,6 +93,12 @@ export class MembersOccupationDialogComponent implements OnInit {
onReset(){
this._occupationForm.reset();
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.occupationFormDatas();
}
}
/** End Of Occupation Dialog Component */

View File

@ -1,11 +1,11 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button color="primary" (click)="addMemberOccupation()" > + Add Member's Occupation</button>
<button mat-raised-button [color]="color" (click)="addMemberOccupation()" > + Add Member's Occupation</button>
</div>
<br>
<div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div> <br> -->
<!-- <div datatable>
<table style="border-collapse: collapse">
<thead>
@ -79,8 +79,8 @@
</div>
<br>-->
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header">
<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>
@ -92,7 +92,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container>
<ng-container matColumnDef="name">
@ -108,7 +108,7 @@
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
matTooltip="Active" matTooltipPosition="above"
checked="true"
checked="true" [color]="color"
(change)="isactiveMemberOccupations(row.occupation_non_earning_member_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
@ -116,7 +116,7 @@
<mat-slide-toggle
class="example-margin"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
checked="false" [color]="color"
(change)="isactiveMemberOccupations(row.occupation_non_earning_member_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle></ng-template>
@ -128,7 +128,7 @@
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editMemberOccupation(row)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editMemberOccupation(row)"><mat-icon>edit</mat-icon></button>
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteMemberOccupation(row.occupation_non_earning_member_id)"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell>
</ng-container>

View File

@ -1,98 +1,50 @@
/* Structure
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}*
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
width : 80%;
margin : 20px auto;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}
table {
width: 100%;
}
th {
text-align: left;
}
*/
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-form-field {
font-size: 14px;
width: 100%;
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/** Table CSS - Dislplay Data */
.mat-table {
overflow: auto;
max-height: 500px;
}
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
.active:hover{
color: green;
font-size: 20px;
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.deactive:hover{
color: red;
font-size: 20px;
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-margin {
margin: 10px;
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}

View File

@ -30,7 +30,7 @@ export class MembersOccupationListComponent implements OnInit {
isPopupOpened: boolean = true;
loader: boolean = false;
MemberOccupationList: any = [];
color = 'primary';
userData = null;
noRecordFound: boolean = false;
@ -106,6 +106,12 @@ export class MembersOccupationListComponent implements OnInit {
this.noRecordFound = false;
this.userData = data.records;
this.dataLength = data.records.length;
if(data.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;

View File

@ -1,13 +1,13 @@
<mat-card-content>
<div style="text-align: right;">
<!-- <button mat-raised-button color="primary" (click)="addPDAllocationType()" > + Add PDAllocationType</button> -->
<!-- <button mat-raised-button [color]="color" (click)="addPDAllocationType()" > + Add PDAllocationType</button> -->
</div>
<br>
<div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div>
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header">
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</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>
@ -17,7 +17,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container>
<ng-container matColumnDef="pd_allocation_type_name">
@ -53,14 +53,14 @@
class="example-margin"
matTooltip="Not a Default"
matTooltipPosition="above"
checked="false"
checked="false" [color]="color"
(change)="defaultPDAllocationType(row.pd_allocation_type_id)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
<ng-template #alternative>
<mat-slide-toggle class="example-margin"
disabled="true" checked="true"
matTooltip="Default"
matTooltip="Default" [color]="color"
matTooltipPosition="above">
</mat-slide-toggle>
</ng-template>

View File

@ -0,0 +1,50 @@
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/** Table CSS - Dislplay Data */
.mat-table {
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}

View File

@ -10,9 +10,9 @@ import { MatDialog,
MatSort,
MatTableDataSource } from '@angular/material';
/** Service */
import { MastersService } from '../../../../service/masters/masters.service';
import { MastersService } from '../../../service/masters/masters.service';
/** Model */
import { PdAllocationType } from '../../../model/pd';
import { PdAllocationType } from '../../model/pd';
@Component({
@ -26,9 +26,8 @@ export class PdAllocationTypeListComponent implements OnInit {
loader: boolean = false;
PDAllocationTypeList: any = [];
noRecordFound: boolean = false;
userData = null;
defaultdatas : any = [];
defdatas : any = [];
dataSourceRecords = null;
color = 'primary';
public dataLength: number;
@ -55,9 +54,15 @@ export class PdAllocationTypeListComponent implements OnInit {
data => {
if(data.dataStatus == true){
this.noRecordFound = false;
this.userData = data.records;
this.dataSourceRecords = data.records;
this.dataLength = data.records.length;
this.dataSource.data = this.userData;
if(data.records.length >= 1){
this.dataSourceRecords = this.dataSourceRecords.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.dataSourceRecords;
}else{
this.noRecordFound = true;
this.dataLength = 0
@ -71,40 +76,43 @@ export class PdAllocationTypeListComponent implements OnInit {
*/
defaultPDAllocationType(id: number){
var defaultDatas = [];//Empty array to store defaultDatas
let allDefaultData:any =[];//Empty array to store defaultDatas
let tempDefaultData:any =[];
defaultDatas.push({'pd_allocation_type_id':id,'default': 1});
this._MastersService.getAllMasterData('PDALLOCATIONTYPE').subscribe(
data => {
if(data.dataStatus == true){
let allDefaultDatas = data.records;
allDefaultDatas = allDefaultDatas.filter(Datas=>Datas.default == 1 );
this.dataSourceRecords.forEach((item, index) => {
allDefaultDatas.forEach((item, index) => {
// console.log('id',item.pd_allocation_type_id);
// console.log('value',item.default);
let dataChanges = {
if(item.pd_allocation_type_id == id){
tempDefaultData = {
pd_allocation_type_id:item.pd_allocation_type_id,
default:1
};
this.dataSourceRecords[index].default = 1;
}else{
tempDefaultData = {
pd_allocation_type_id:item.pd_allocation_type_id,
default:0
};
defaultDatas.push(dataChanges);
this.dataSourceRecords[index].default = 0;
}
allDefaultData.push(tempDefaultData);
});
}
});
//console.log(defaultDatas);
this._MastersService.editMasterDetails(defaultDatas,'PDALLOCATIONTYPE')
this._MastersService.editPDAllocationType(allDefaultData,'PDALLOCATIONTYPE')
.subscribe(dataresult=>{
if (dataresult.dataStatus == true){
//alert("my check");
this.getPDAllocationType();
}
else{
if (dataresult.dataStatus == true){
//this.getPDAllocationType();
alert("Done");
}
else{
alert("SomeThing Wents Wrong Try Again !");
}
}
});
//console.log('at last Completed Section');
}
/** For Display Tables Pagination And Sorting */

View File

@ -41,7 +41,11 @@ fxLayoutAlign="center">
<br>
<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="Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button> -->
<button *ngIf="_pdLocationApproachForm.controls['pd_location_approach_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_pdLocationApproachForm.valid"><mat-icon>save</mat-icon></button>
<!-- <button mat-button >RESET</button> -->
</div>

View File

@ -28,15 +28,19 @@ export class PdLocationApproachDialogComponent implements OnInit {
//pd_location_approach_id, description, createdon, fk_createdby, updatedon, fk_updatedby, isactive
ngOnInit() {
this.pdLocationApproachFormDatas();
this._pdLocationApproachForm = this._formBuilder.group({
//branch_id: any; fk_city_id: any;
pd_location_approach_id: [this.data.pd_location_approach_id],
description: [this.data.description, Validators.compose([Validators.required])]
});
//console.log(this._pdLocationApproachForm);
}
pdLocationApproachFormDatas(){
this._pdLocationApproachForm = this._formBuilder.group({
//branch_id: any; fk_city_id: any;
pd_location_approach_id: [this.data.pd_location_approach_id],
description: [this.data.description, Validators.compose([Validators.required])]
});}
// onSubmit() {
// if (isNaN(this.data.ID)) {
// this._MastersService.addBranch(this._pdLocationApproachForm.value);
@ -96,5 +100,10 @@ export class PdLocationApproachDialogComponent implements OnInit {
onReset(){
this._pdLocationApproachForm.reset();
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.pdLocationApproachFormDatas();
}
}
/** End Of Pd Location DIalog COmponent */

View File

@ -1,11 +1,11 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button color="primary" (click)="addPdLocationApproach()" > + Add Pd Location Approach</button>
<button mat-raised-button [color]="color" (click)="addPdLocationApproach()" > + Add Pd Location Approach</button>
</div>
<br>
<div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div> <br> -->
<!-- <div datatable>
<table style="border-collapse: collapse">
<thead>
@ -62,8 +62,8 @@
</div>
<br>-->
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header">
<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>
@ -73,7 +73,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container>
<ng-container matColumnDef="description">
@ -87,7 +87,7 @@
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
matTooltip="Active" matTooltipPosition="above"
checked="true"
checked="true" [color]="color"
(change)="isactivePdLocationApproach(row.pd_location_approach_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
@ -95,7 +95,7 @@
<mat-slide-toggle
class="example-margin"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
checked="false" [color]="color"
(change)="isactivePdLocationApproach(row.pd_location_approach_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle></ng-template>
@ -107,7 +107,7 @@
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPdLocationApproach(row)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPdLocationApproach(row)"><mat-icon>edit</mat-icon></button>
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deletePdLocationApproach(row.pd_location_approach_id)"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell>
</ng-container>

View File

@ -0,0 +1,50 @@
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/** Table CSS - Dislplay Data */
.mat-table {
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}

View File

@ -36,7 +36,7 @@ export class PdLocationApproachListComponent implements OnInit {
isPopupOpened = true;
loader: boolean = false;
PdLocationApproachList: any = [];
color = 'primary';
userData = null;
noRecordFound: boolean = false;
public dataLength: number;
@ -93,10 +93,16 @@ export class PdLocationApproachListComponent implements OnInit {
getPdLocationApproach() {
this._MastersService.getAllMasterData('PDLOCATIONAPPROACH').subscribe(
data => {
if(data.status === 200){
if(data.dataStatus == true){
this.noRecordFound = false;
this.userData = data.records;
this.dataLength = data.records.length;
if(data.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;

View File

@ -2,7 +2,7 @@
<div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row"
fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 30%;"> PD Allocation Type &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<h2 mat-dialog-title style="width: 30%;"> PD Notification &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 40%;"></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>
@ -10,15 +10,15 @@ fxLayoutAlign="center">
</div>
<form [formGroup]="_PDAllocationTypeForm" (submit)="onSubmit()">
<form [formGroup]="_PDNotificationForm" (submit)="onSubmit()">
<div class="form-group">
<mat-dialog-content>
<div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<input matInput type="text" placeholder="PD Allocation Type Name" required [formControl]="_PDAllocationTypeForm.controls['pd_allocation_type_name']">
<mat-error *ngIf="!_PDAllocationTypeForm.controls['pd_allocation_type_name'].valid && _PDAllocationTypeForm.controls['pd_allocation_type_name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
<input matInput type="text" placeholder="PD Allocation Type Name" required [formControl]="_PDNotificationForm.controls['pdnotification_id']">
<mat-error *ngIf="!_PDNotificationForm.controls['pdnotification_id'].valid && _PDNOtificationForm.controls['pdnotification_id'].touched" class="mat-text-warn">You must include a ID.</mat-error>
</mat-form-field>
</div>

View File

@ -0,0 +1,26 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
//import { PdNotificationDialogComponent } from './pd-allocation-type-dialog.component';
import { PdNotificationDialogComponent } from './pd-notification-dialog.component';
describe('PdNotificationDialogComponent', () => {
let component: PdNotificationDialogComponent;
let fixture: ComponentFixture<PdNotificationDialogComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PdNotificationDialogComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PdNotificationDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,84 @@
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';
@Component({
selector: 'app-jazz-dialog',
templateUrl: './pd-notification-dialog.component.html',
styleUrls: ['./pd-notification-dialog.component.scss']
})
export class PdNotificationDialogComponent implements OnInit {
public _PDNotificationForm: FormGroup;
constructor(private _formBuilder: FormBuilder,
private dialogRef: MatDialogRef<PdNotificationDialogComponent>,
private _pds: MastersService,
@Inject(MAT_DIALOG_DATA) public data: any) { }
ngOnInit() {
this._PDNotificationForm = this._formBuilder.group({
pdnotification_id: [this.data.pdnotification_id]
});
}
/** For Popup Close Button */
onNoClick(): void {
this.dialogRef.close();
}
/** To Save/Edited Popup Data */
onSubmit() {
alert('i am a submit');
}
// onSubmit() {
// if(isNaN(this.data.pd_allocation_type_id)) {
// var my_array = this._PDNotificationForm.value;
// Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
// console.log(my_array);
// this._pds.addMasterDetails(my_array,'PDNOTIFICATION').subscribe();
// this.dialogRef.close();
// alert("saved");
// } else {
// this._pds.editMasterDetails(this._PDNotificationForm.value,'PDNOTIFICATION').subscribe();
// this.dialogRef.close();
// alert("edited");
// }
// }
// onSubmit() {
// if (isNaN(this.data.ID)) {
// this._memberService.addMembersOccupation(this._PDAllocationTypeForm.value);
// this.dialogRef.close();
// } else {
// this._memberService.editMembersOccupation(this._PDAllocationTypeForm.value);
// this.dialogRef.close();
// }
// }
/** To Reset Popup Data */
onReset(){
this._PDNotificationForm.reset();
}
}

View File

@ -0,0 +1,127 @@
<mat-card-content>
<div style="text-align: right;">
<!-- <button mat-raised-button color="primary" (click)="addPDAllocationType()" > + Add PDAllocationType</button> -->
<!-- displayedColumns = ['','fk_pd_status_id',
'sms_lender','sms_pdofficer','sms_pdincharge',
'mail_lender', 'mail_pdincharge','mail_pdofficer']; -->
</div>
<br>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</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>
<mat-table [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
</ng-container>
<ng-container matColumnDef="pdnotification_id">
<mat-header-cell *matHeaderCellDef mat-sort-header>pdnotification_id </mat-header-cell>
<mat-cell *matCellDef="let row;"> {{row.pdnotification_id}} </mat-cell>
</ng-container>
<ng-container matColumnDef="pd_status_name">
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Status </mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.pd_status_name}} </mat-cell>
<!-- <mat-checkbox [checked]="row.isPublish"></mat-checkbox> -->
</ng-container>
<ng-container matColumnDef="sms_lender">
<!-- <div class="mat-header-row header-group-row">
<div class="mat-header-cell" role="columnheader"></div>
<div class="mat-header-cell header-group" role="columnheader" style="flex: 2">Group1</div>
<div class="mat-header-cell" role="columnheader"></div>
</div> -->
<mat-header-cell *matHeaderCellDef mat-sort-header> Lender-SMS </mat-header-cell>
<mat-cell *matCellDef="let row;let i=index;">
<mat-checkbox color="primary" class="example-margin" (change)="modelChanged(row,$event)" [(ngModel)]="row.sms_lender" [checked]="row.sms_lender==1 ? true:false"></mat-checkbox>
</mat-cell>
</ng-container>
<ng-container matColumnDef="sms_pdofficer">
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Officer-SMS</mat-header-cell>
<mat-cell *matCellDef="let row">
<!-- {{row.sms_pdofficer}} -->
<mat-checkbox color="primary" class="example-margin" (change)="modelChanged(row,$event)" [(ngModel)]="row.sms_pdofficer" [checked]="row.sms_pdofficer==1 ? true:false"></mat-checkbox>
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.sms_pdofficer == 1 ? smsPdofficerCheck : smsPdofficerUncheck"></mat-checkbox> -->
</mat-cell>
</ng-container>
<ng-container matColumnDef="sms_pdincharge">
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Incharge -SMS</mat-header-cell>
<mat-cell *matCellDef="let row">
<!-- {{row.sms_pdincharge}} -->
<mat-checkbox color="primary" class="example-margin" (change)="modelChanged(row,$event)" [(ngModel)]="row.sms_pdincharge" [checked]="row.sms_pdincharge==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_lender">
<mat-header-cell *matHeaderCellDef mat-sort-header> Lender -MAIL</mat-header-cell>
<mat-cell *matCellDef="let row">
<!-- {{row.mail_lender}} -->
<mat-checkbox color="primary" class="example-margin" (change)="modelChanged(row,$event)" [(ngModel)]="row.mail_lender" [checked]="row.mail_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="mail_pdincharge">
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Incharge -MAIL </mat-header-cell>
<mat-cell *matCellDef="let row">
<mat-checkbox color="primary" class="example-margin" (change)="modelChanged(row,$event)" [(ngModel)]="row.mail_pdincharge" [checked]="row.mail_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="mail_pdofficer">
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Officer -MAIL</mat-header-cell>
<mat-cell *matCellDef="let row">
<!-- {{row.mail_pdofficer}} -->
<mat-checkbox color="primary" class="example-margin" (change)="modelChanged(row,$event)" [(ngModel)]="row.mail_pdofficer" [checked]="row.mail_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> -->
<!-- <ng-container matColumnDef="isactive">
<mat-header-cell *matHeaderCellDef mat-sort-header>Is Active </mat-header-cell>
<mat-cell *matCellDef="let row;">
<!-- {{row.isactive}} ->
<mat-slide-toggle
class="example-margin"
color="primary"
[matTooltip]="row.isactive==1 ? Active : InActive"
matTooltipPosition="above"
(change)="modelChanged(row,$event)"
[(ngModel)]="row.isactive"
[checked]="row.isactive==1 ? true:false"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
</mat-cell>
</ng-container> -->
<button mat-icon-button [color]="color" 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-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
<br>
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Save Data" matTooltipPosition="above" (click)="SaveData(dataSource)"><mat-icon>save</mat-icon></button>
</mat-card-content>

View File

@ -0,0 +1,50 @@
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/** Table CSS - Dislplay Data */
.mat-table {
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PdAllocationTypeListComponent } from './pd-allocation-type-list.component';
describe('PdAllocationTypeListComponent', () => {
let component: PdAllocationTypeListComponent;
let fixture: ComponentFixture<PdAllocationTypeListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PdAllocationTypeListComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PdAllocationTypeListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,202 @@
import { Component,
OnInit,
ViewChild } from '@angular/core';
import { MatDialog,
MatPaginator,
MatSort,
MatTableDataSource } from '@angular/material';
import 'rxjs/add/operator/map';
/** Service */
import { MastersService } from '../../../../service/masters/masters.service';
/** Dialog Component */
import { PdNotificationDialogComponent } from '../pd-notification-dialog/pd-notification-dialog.component';
/** Model */
import { PdLocationApproach } from '../../../model/pd';
@Component({
selector: 'app-pd-notification-list',
templateUrl: './pd-notification-list.component.html',
styleUrls: ['./pd-notification-list.component.scss']
})
export class PdNotificationListComponent implements OnInit {
isPopupOpened = true;
loader: boolean = false;
PdLocationApproachList: any = [];
row={
sms_lender:''
};
notificationData = null;
noRecordFound: boolean = false;
public dataLength: number;
public dataSource = new MatTableDataSource();
displayedColumns = ['serialno','pd_status_name','sms_lender','sms_pdofficer','sms_pdincharge','mail_lender', 'mail_pdincharge','mail_pdofficer'];
@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;
constructor(private dialog: MatDialog,
private _MastersService: MastersService) {
this.getPdNotification();
}
ngOnInit() {}
modelChanged(value,event){
console.log('value',value);
console.log(event);
}
// addPdLocationApproach() {
// this.isPopupOpened = true;
// const dialogRef = this.dialog.open(PdNotificationDialogComponent, {
// data: {}
// });
// dialogRef.afterClosed().subscribe(result => {
// this.getPdNotification();
// this.isPopupOpened = false;
// });
// }
// editPdLocationApproach(arr: any[]) {
// this.isPopupOpened = true;
// //const contact = this._MastersService.getAllPdLocationApproach().find(c => c.ID === id);
// const dialogRef = this.dialog.open(PdNotificationDialogComponent, {
// data: arr
// });
// dialogRef.afterClosed().subscribe(result => {
// this.getPdNotification();
// this.isPopupOpened = false;
// });
// }
//To get data for listing
getPdNotification() {
this._MastersService.getAllPDNotification().subscribe(
data => {
// console.log(data);
// console.log(data.status);
// console.log(data.dataStatus);
// console.log(data.records);
// pdnotification_id, fk_pd_status_id, sms_lender, sms_pdofficer,
// sms_pdincharge, mail_lender, mail_pdincharge, mail_pdofficer, createdon, fk_createdby, updatedon, fk_updatedby, isactive
if(data.dataStatus == true){
this.noRecordFound = false;
this.notificationData = data.records;
this.notificationData.forEach((item, index) => {
if(item.sms_lender ==1){
this.notificationData[index].sms_lender = true;
}else{
this.notificationData[index].sms_lender = false;
}
if(item.sms_pdofficer ==1){
this.notificationData[index].sms_pdofficer = true;
}else{
this.notificationData[index].sms_pdofficer = false;
}
if(item.sms_pdincharge ==1){
this.notificationData[index].sms_pdincharge = true;
}else{
this.notificationData[index].sms_pdincharge = false;
}
if(item.mail_lender ==1){
this.notificationData[index].mail_lender = true;
}else{
this.notificationData[index].mail_lender = false;
}
if(item.mail_pdincharge ==1){
this.notificationData[index].mail_pdincharge = true;
}else{
this.notificationData[index].mail_pdincharge = false;
}
if(item.mail_pdofficer ==1){
this.notificationData[index].mail_pdofficer = true;
}else{
this.notificationData[index].mail_pdofficer = false;
}
if(item.isactive ==1){
this.notificationData[index].isactive = true;
}else{
this.notificationData[index].isactive = false;
}
});
//console.log(this.notificationData);
this.dataLength = data.records.length;
this.dataSource.data = this.notificationData;
}else{
this.noRecordFound = true;
this.dataLength = 0
}
})
}
// deletePdLocationApproach(id: number) {
// var PrimaryKeyWithValue ={'pd_allocation_type_id':id};
// this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'PDNOTIFICATION').subscribe( data => { });
// this.getPdNotification();
// //this._MastersService.deleteMasterDetails('pd_allocation_type_id',id,'PDNOTIFICATION');
// }
/** For Changing Active States., which means both Changing Active And Inactive alternatively */
// isactivePdLocationApproach(id: number,isactive: number){
// let pdLocationApproachFormValue = isactive == 0
// ? { 'pd_allocation_type_id':id,'isactive': '1'}
// : { 'pd_allocation_type_id':id,'isactive': '0'}
// //this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
// //this._MastersService.editMasterDetails(ActiveDatas,'PDNOTIFICATION')
// this._MastersService.editMasterDetails(pdLocationApproachFormValue,'PDNOTIFICATION')
// .subscribe(dataresult=>{
// if (dataresult.dataStatus == true){
// //alert("my check");
// this.getPdNotification();
// }
// else{
// alert("SomeThing Wents Wrong Try Again !");
// }
// });
// }
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
}
/** For Display Tables Filtering */
applyFilter(filterValue: string) {
filterValue = filterValue.trim(); // Remove whitespace
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
this.dataSource.filter = filterValue;
}
/** For Saving Table Data */
SaveData(dataSource){
let PDNotificationArray = dataSource['filteredData']
//console.log(PDNotificationArray);
this._MastersService.saveAllPDNotification(PDNotificationArray).subscribe(
dataresult => {
if(dataresult.dataStatus == true){
alert('Updated Successfully !');
this.getPdNotification();
}else{
alert('Sorry Try Again !');
}
});
}
}
/** End of ListComponent */

View File

@ -0,0 +1,90 @@
<div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row"
fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 70%;"> PD Team Details &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<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>
<form [formGroup]="_pdTeamForm" (submit)="onSubmit()">
<div class="form-group">
<mat-dialog-content>
<div class="ml-xs mr-xs">
<mat-form-field style="width: 100%">
<input matInput type="text" placeholder="Team Name" required [formControl]="_pdTeamForm.controls['team_name']">
<mat-error *ngIf="!_pdTeamForm.controls['team_name'].valid && _pdTeamForm.controls['team_name'].touched" class="mat-text-warn">You must include a team name.</mat-error>
</mat-form-field>
</div>
<div class="ml-xs mr-xs">
<mat-form-field>
<mat-select placeholder="Pick Up Lender Name" required [formControl]="_pdTeamForm.controls['fk_lender_id']" (selectionChange)="doSomething()" >
<mat-option *ngFor="let ld of lenderdatas" [value]="ld" >{{ ld.short_name }} {{ ld.full_name }} </mat-option>
</mat-select>
<mat-error *ngIf="!_pdTeamForm.controls['fk_lender_id'].valid && _pdTeamForm.controls['fk_lender_id'].touched" class="mat-text-warn">You must Pick up Lender Name.</mat-error>
</mat-form-field>
</div>
<div class="ml-xs mr-xs">
<mat-form-field>
<mat-select placeholder="Pick Up City name" required [formControl]="_pdTeamForm.controls['fk_city_id']" (selectionChange)="doSomething()" >
<mat-option *ngFor="let cd of citydatas" [value]="cd">{{ cd.name }}</mat-option>
</mat-select>
<mat-error *ngIf="!_pdTeamForm.controls['fk_city_id'].valid && _pdTeamForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pick Up the City Name.</mat-error>
</mat-form-field>
</div>
<div datatable class="row-border hover ml-xs mr-xs">
<table>
<thead>
<th>S.no</th>
<th style="text-align: left;">Lender Name</th>
<th style="text-align: left;">City Name</th>
<th>Action</th>
</thead>
<tr *ngFor="let PD of PDTeamMapping; let i=index">
<td style="text-align: center;">{{i+1}}</td>
<td style="text-align: left;">{{PD.lender_name }}</td>
<td style="text-align: left;">{{PD.city_name }}</td>
<td style="text-align: right;">
<button mat-icon-button class="hover-icon" matTooltip="RemoveData" matTooltipPosition="above" type="button" (click)="deletePdTeamMap(PD,i)"><mat-icon>delete</mat-icon></button>
</td>
</tr>
<tr *ngFor="let PM of tempArray; let i=index">
<td style="text-align: center;" >{{i+PDTeamMaplen+1}}</td>
<td style="text-align: left;">{{PM.lenderid.full_name}}</td>
<td style="text-align: left;">{{PM.cityid.name}}</td>
<td style="text-align: right;">
<button mat-icon-button matTooltip="RemoveData" matTooltipPosition="above" (click)="removevalue(i)"><mat-icon>delete</mat-icon></button>
</td>
</tr>
</table>
</div>
<br>
<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 *ngIf="_pdTeamForm.controls['pdteam_id'] == '';else Editreset;" 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 *ngIf="_pdTeamForm.controls['pdteam_id'] == '';else Editreset;"
mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForAdd()" ><mat-icon>settings_backup_restore</mat-icon></button>
<ng-template #Editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_pdTeamForm.valid"><mat-icon>save</mat-icon></button>
</div>
</mat-dialog-content>
</div>
</form>

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PdTeamDialogComponent } from './pd-team-dialog.component';
describe('PdTeamDialogComponent', () => {
let component: PdTeamDialogComponent;
let fixture: ComponentFixture<PdTeamDialogComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PdTeamDialogComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PdTeamDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,491 @@
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';
@Component({
selector: 'app-pd-team-dialog',
templateUrl: './pd-team-dialog.component.html',
styleUrls: ['./pd-team-dialog.component.scss']
})
export class PdTeamDialogComponent implements OnInit {
public _pdTeamForm: FormGroup;
citydatas: any[];
lenderdatas: any[];
errorMessage:string;
selectedValueForLender: any;
selectedValueForCity: any;
tempArray: Array<{lenderid: number, cityid: number}> = [];
PDTeamMapping: any[];
PDTeamMaplen:any = 0;
constructor(private _formBuilder: FormBuilder,
private dialogRef: MatDialogRef<PdTeamDialogComponent>,
private _pdTeamService: PdTeamService,
private _masterService: MastersService,
@Inject(MAT_DIALOG_DATA) public data: any) { }
ngOnInit() {
this.PdTeamFormDatas();
if(isNaN(this.data.pdteam_id)){}
else{
this._pdTeamService.getAllPdTeamMapList(this.data.pdteam_id) // note, removed this.countries =
.subscribe(
dataresult => {
if(dataresult.dataStatus == true){
this.PDTeamMapping = dataresult.records;
this.PDTeamMaplen = this.PDTeamMapping.length;
}
});
}
/** For City Drop Datas*/
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);
/** For Entity Drop Datas*/
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);
}
/** Pd Team Form Datas */
PdTeamFormDatas(){
this._pdTeamForm = this._formBuilder.group({
pdteam_id: [this.data.pdteam_id],
team_name: [this.data.team_name, Validators.compose([Validators.required])],
fk_city_id: [null, Validators.compose([Validators.required])],
fk_lender_id: [null, Validators.compose([Validators.required])],
temp_array: [this.tempArray]
});
}
// isactivePDTeamChild(PD.pdteam_map_id,PD.isactive)
isactivePDTeamChild(id: number,isactive : number) {
let ActiveDatas = isactive == 0
? { 'pdteam_map_id':id,'isactive': '1'}
: { 'pdteam_map_id':id,'isactive': '0'}
//private _masterService: MastersService,
this._masterService.editMasterDetails(ActiveDatas,'PDTEAMMAP')
.subscribe(dataresult=>{
if (dataresult.dataStatus == true){
alert("Successfully InActive !");
}
else{
alert("SomeThing Wents Wrong Try Again !");
}
});
}
// deletePdTeamMap(arr: any) {
// //console.log(arr);
// //var PrimaryKeyWithValue ={'pdteam_map_id':arr.id};
// //fk_team_id
// this._pdTeamService.updatePdTeam(arr)
// .subscribe( data => { });
// this._pdTeamService.deletePdTeamMap(arr)
// .subscribe( data => { });
// //this.getPdTeam();
// }
deletePdTeamMap(PdTeamMaparr,i) {
let datas :any = [];
this._pdTeamService.deletePdTeamMapDetails(PdTeamMaparr)
.subscribe(data => {
datas = data;
if(datas.dataStatus == true){
this.PDTeamMapping.splice(i, 1);
//alert('Deleted Successfully');
}
});
}
removevalue(i:number) {
//const index: number = this.tempArray.indexOf(i);
if (i !== -1) {
this.tempArray.splice(i, 1);
}
console.log('delete function',this.tempArray);
}
doSomething(){
var check = 0 ;
// console.log(this.selectedValueForLender);
// console.log(this.selectedValueForCity);
this.tempArray.forEach(item => {
if((item.cityid['city_id'] == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
(item.lenderid['entity_id'] == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
{
check++;
alert('Already Exists');
}
});
if(isNaN(this.data.pdteam_id)) {}
else{
//console.log(this.PDTeamMapping);
// console.log(this.PDTeamMapping.length);
if(this.PDTeamMapping !== undefined){
this.PDTeamMapping.forEach(item => {
if((item.fk_city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
(item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
{
check++;
alert('Already Exists');
}
});
}
}
// this.tempArray.forEach(this.data, function (value, key) {
// if((value.cityid.city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
// (value.lenderid.entity_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
// {
// check++;
// console.log('for loop');
// }
// });
if(check == 0){
if((this._pdTeamForm.controls['fk_lender_id'].value != null) && (this._pdTeamForm.controls['fk_city_id'].value != null)){
this.tempArray.push({
'lenderid':this._pdTeamForm.controls['fk_lender_id'].value,
'cityid': this._pdTeamForm.controls['fk_city_id'].value
})
}
//console.log('if condition',check);
}
else{
//console.log('else condition',check);
}
// console.log('Temparray',this.tempArray);
// console.log(this._pdTeamForm.controls['fk_city_id'].value);
// console.log(this._pdTeamForm.controls['fk_lender_id'].value);
}
/** For Popup Close Button */
onNoClick(): void {
this.dialogRef.close();
}
// OnSumbitForAdd(){
// this._pdTeamForm.controls['team_name'].value;
// this._pdTeamService.addPdTeamDetail(pdTeamFormValues).subscribe(
// dataresult=>{
// if (dataresult.dataStatus == true){ }
// })
// }
/** To Save/Edited Popup Data */
onSubmit() {
var pdTeamFormValues = this._pdTeamForm.value;
if(isNaN(this.data.pdteam_id)) {
//console.log(pdTeamFormValues);
//To Remove The "Null" With Key
Object.keys(pdTeamFormValues).forEach(
(key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key] &&
delete pdTeamFormValues['fk_lender_id'] && delete pdTeamFormValues['fk_city_id']);
//this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 );
//this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 );
//console.log(pdTeamFormValues);
//this._memberService.addMasterDetails(OccupationFormValues,'OCCUPATIONMEMBERS').subscribe(
this._pdTeamService.addPdTeamDetail(pdTeamFormValues).subscribe(
dataresult=>{
if (dataresult.dataStatus == true){
//After Saving the data then popup close
this.dialogRef.close();
//Need To Dispaly saving Datas
alert("Data Saved Successfully");
}
else{
alert("SomeThing Wents Wrong Try Again !");
}
});
} else {
Object.keys(pdTeamFormValues).forEach(
(key) => delete pdTeamFormValues['fk_lender_id'] && delete pdTeamFormValues['fk_city_id']);
this._pdTeamService.editPdTeamDetail(pdTeamFormValues).subscribe(
dataresult=>{
if (dataresult.dataStatus == true){
//After Editing the data then popup close
this.dialogRef.close();
//Need To Display saving Datas
alert("Data Edited Successfully");
}
else{
alert("SomeThing Wents Wrong Try Again !");
}
});
}
}
// onSubmit() {
// if (isNaN(this.data.ID)) {
// this._memberService.addMembersOccupation(this._occupationForm.value);
// this.dialogRef.close();
// } else {
// this._memberService.editMembersOccupation(this._occupationForm.value);
// this.dialogRef.close();
// }
// }
/** To Reset Popup Data For Add*/
onResetForAdd(){
this._pdTeamForm.reset();
this.tempArray = [];
//console.log(this.tempArray);
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.PdTeamFormDatas();
this.tempArray = [];
}
}
/** End Of Pd Dialog Component */
/*
import { Component,
OnInit,
ViewChild,
Inject } from '@angular/core';
import { FormBuilder,
FormGroup,
FormArray,
Validators,
FormControl } from '@angular/forms';
import { MatDialog,
MatOption,
MatDialogRef,
MAT_DIALOG_DATA } from '@angular/material';
/** Service *
import { MastersService } from '../../../../service/masters/masters.service';
import { PdTeamService } from '../../../../service/masters/pd-team.service';
@Component({
selector: 'app-pd-team-dialog',
templateUrl: './pd-team-dialog.component.html',
styleUrls: ['./pd-team-dialog.component.scss']
})
export class PdTeamDialogComponent implements OnInit {
public _pdTeamForm: FormGroup;
citydatas: any[];
lenderdatas: any[];
errorMessage:string;
@ViewChild('allSelected') private allSelected: MatOption;
constructor(private _formBuilder: FormBuilder,
private dialogRef: MatDialogRef<PdTeamDialogComponent>,
private _MastersService: MastersService,
private _PdTeamService: PdTeamService,
@Inject(MAT_DIALOG_DATA) public data: any) { }
ngOnInit() {
this._pdTeamForm = this._formBuilder.group({
pdteam_id: [this.data.pdteam_id],
team_name: [this.data.team_name, Validators.compose([Validators.required])],
fk_city_id: [this.data.fk_city_id, Validators.compose([Validators.required])],
fk_lender_id: [this.data.fk_lender_id, Validators.compose([Validators.required])],
// city_ids: this._formBuilder.array([
// this._formBuilder.group({
// pdteam_city_mapping_id: [this.data.pdteam_city_mapping_id],
// fk_team_id:[this.data.pdteam_id],
// fk_city_id: [this.data.fk_city_id]
// })
// ])
// city_ids: [this._formBuilder.group({
// pdteam_city_mapping_id: [this.data.pdteam_city_mapping_id],
// fk_team_id:[this.data.pdteam_id],
// fk_city_id: [this.data.fk_city_id, Validators.compose([Validators.required])],
// })
// ]
// fk_city_id: this._formBuilder.array([this.data.fk_city_id, Validators.compose([Validators.required])])
});
console.log(this._pdTeamForm);
/** For SelectDrop Datas For Multiple Datas*
// this._MastersService.getAllMasterData('CITY')
// .subscribe(
// data => {
// let userRole:any = [];
// if (data.status == 200) {
// this.citydatas = data.records;
// this.citydatas = this.citydatas.filter(city=>city.isactive == 1 );
// if(this.data.pdteam_id != null){
// for (let cities of this.data[0]) {
// //console.log(role);
// userRole.push(this.citydatas.filter(city => city.city_id == cities.fk_city_id)[0]);
// this._pdTeamForm.controls['fk_city_id'].setValue(userRole);
// }
// console.log(userRole);
// }
// }
// }, error => this.errorMessage = <any> error);
/** For Drop Datas*
this._MastersService.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);
/** For Drop Datas*
this._MastersService.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);
}
//pdteam_id, team_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
/** For Popup Close Button *
onNoClick(): void {
this.dialogRef.close();
}
//pdteam_id, team_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
/** To Save/Edited Popup Data *
onSubmit() {
var pdTeamFormValues = this._pdTeamForm.value;
console.log('b4 null val pdTeamFormValues',pdTeamFormValues);
if(isNaN(this.data.pdteam_id)) {
Object.keys(pdTeamFormValues).forEach(
(key) => (pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]
);
console.log('After null val pdTeamFormValues',pdTeamFormValues);
// // var start_index = 2
// // var number_of_elements_to_remove = 1;
// // var removed_elements = pdTeamFormValues.splice(start_index, number_of_elements_to_remove);
// // console.log(removed_elements);
// //["k"]
// pdTeamFormValues.splice(3, 1);
// console.log(pdTeamFormValues);
this._PdTeamService.addPdTeamDetail(pdTeamFormValues).subscribe(
dataresult=>{
if (dataresult.dataStatus == true){
//After Saving the data then popup close
this.dialogRef.close();
//Need To Dispaly saving Datas
alert("Data Saved Successfully");
}
else{
alert("SomeThing Wents Wrong Try Again !");
}
});
} else { alert('Not Yet Completed Edit Function'); }
// //this._MastersService.editProductMaster(this._pdTeamForm.value);
// this._MastersService.editMasterDetails(this._pdTeamForm.value,'PDTEAM').subscribe( dataresult=>{
// if (dataresult.dataStatus == true){
// //After Editing0 the data then popup close
// this.dialogRef.close();
// //Need To Display saving Datas
// alert("Data Edited Successfully");
// }
// else{
// alert("SomeThing Wents Wrong Try Again !");
// }
// });
// }
}
/** To Reset Popup Data /
onReset(){
this._pdTeamForm.reset();
}
}
/** End Of Product Master Component*/

View File

@ -0,0 +1,137 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button [color]="color" (click)="addPdTeam()" > + Add PD Team</button>
</div>
<br>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div> <br> -->
<!-- <div *ngIf="!noRecordFound" class="example-container mat-elevation-z8"> -->
<!-- <div class="example-header">
<mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field>
</div> -->
<!-- <mat-table [dataSource]="dataSource" matSort > -->
<!-- <ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container> -->
<!-- <ng-container matColumnDef="team_name">
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Team Name </mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.team_name}} </mat-cell>
</ng-container> -->
<!-- <ng-container matColumnDef="isactive">
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
<mat-cell *matCellDef="let row"><!--{{row.isactive}}--
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
matTooltip="Active" matTooltipPosition="above"
checked="true"
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
class="example-margin"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container> -->
<!-- <ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPdTeam(row)"><mat-icon>edit</mat-icon></button>
</mat-cell>
</ng-container> -->
<!-- <mat-header-row *matHeaderRo wDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;">
</mat-row>
</mat-table> -->
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> -->
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 15, 20, 25]" showFirstLastButtons></mat-paginator> -->
<!-- </div> -->
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
<!-- <button mat-raised-button color="primary" (click)="ExportTOExcel()">Export as Excel</button> -->
<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>
<mat-table [dataSource]="dataSource" matSort >
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container>
<ng-container matColumnDef="team_name">
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Team Name </mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.team_name}} </mat-cell>
</ng-container>
<ng-container matColumnDef="isactive">
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
class="example-margin"
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle></ng-template>
<!-- <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-cell>
</ng-container>
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<!-- <button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editMemberOccupation(row)"><mat-icon>edit</mat-icon></button> -->
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPdTeam(row)"><mat-icon>edit</mat-icon></button>
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteMemberOccupation(row.occupation_non_earning_member_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>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
</mat-card-content>

View File

@ -0,0 +1,83 @@
// .example-container {
// display: flex;
// flex-direction: column;
// min-width: 300px;
// }
// .example-header {
// min-height: 64px;
// padding: 8px 24px 0;
// }
// .mat-form-field {
// font-size: 14px;
// width: 100%;
// }
// .mat-table {
// overflow: auto;
// max-height: 500px;
// }
// .nocontent {
// color: red;
// font-size: 16px;
// text-align: center;
// }
// .example-margin {
// margin: 10px;
// }
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/** Table CSS - Dislplay Data */
.mat-table {
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PdTeamListComponent } from './pd-team-list.component';
describe('PdTeamListComponent', () => {
let component: PdTeamListComponent;
let fixture: ComponentFixture<PdTeamListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PdTeamListComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PdTeamListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,152 @@
import { Component,
OnInit,
ViewChild } from '@angular/core';
import { MatDialog,
MatDialogRef,
MatDialogConfig,
MatPaginator,
MatSort,
MatTableDataSource } from '@angular/material';
/** Service */
import { MastersService } from '../../../../service/masters/masters.service';
import { PdTeamService } from '../../../../service/masters/pd-team.service';
/** Dialog Component */
import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
@Component({
selector: 'app-pd-team-list',
templateUrl: './pd-team-list.component.html',
styleUrls: ['./pd-team-list.component.scss']
})
export class PdTeamListComponent implements OnInit {
//Variable Declaration part
isPopupOpened: boolean = true;
loader: boolean = false;
PdTeamList: any = [];
color = 'primary';
userData = null;
noRecordFound: boolean = false;
public dataLength: number;
public dataSource = new MatTableDataSource();
displayedColumns = ['serialno','team_name','actions', 'isactive'];
@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;
constructor(private dialog: MatDialog,
private _MasterService: MastersService,
private _PdTeamService: PdTeamService) {
this.getPdTeam();
}
ngOnInit() {}
//To open dialog for add the data
addPdTeam() {
this.isPopupOpened = true;
const dialogRef = this.dialog.open(PdTeamDialogComponent, {
data: {}
});
dialogRef.afterClosed().subscribe(result => {
this.getPdTeam();
this.isPopupOpened = false;
});
}
//To open dialog for edit the data
editPdTeam(arr: any[]) {
// let a:any;
// if(arr.length !=0){
// a = arr;
// }else{
// a ='';
// }
// console.log(a);
this.isPopupOpened = true;
const dialogRef = this.dialog.open(PdTeamDialogComponent, {
data: arr
});
dialogRef.afterClosed().subscribe(result => {
this.getPdTeam();
this.isPopupOpened = false;
});
}
//To get data for listing
getPdTeam() {
//this.loader = true;
this._PdTeamService.getAllPdTeamList().subscribe(
//this._MasterService.getAllMasterData('PDTEAM').subscribe(
data => {
if(data.dataStatus == true){
//this.loader = false;
this.noRecordFound = false;
this.userData = data.records;
this.dataLength = data.records.length;
if(data.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;
this.dataLength = 0
}
})
}
//To inactive the data
deletePdTeam(id: number) {
var PrimaryKeyWithValue ={'pdteam_id':id};
this._MasterService.deleteMasterDetails(PrimaryKeyWithValue,'PDTEAM')
.subscribe( data => { });
this.getPdTeam();
}
/** For Changing Active States., which means both Changing Active And Inactive alternatively */
isactivePdTeam(id: number,isactive : number) {
let ActiveDatas = isactive == 0
? { 'pdteam_id':id,'isactive': '1'}
: { 'pdteam_id':id,'isactive': '0'}
this._MasterService.editMasterDetails(ActiveDatas,'PDTEAM')
.subscribe(dataresult=>{
if (dataresult.dataStatus == true){
//alert("my check");
this.getPdTeam();
}
else{
alert("SomeThing Wents Wrong Try Again !");
}
});
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
}
/** For Display Tables Filtering */
applyFilter(filterValue: string) {
filterValue = filterValue.trim(); // Remove whitespace
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
this.dataSource.filter = filterValue;
}
}
/** End of ListComponent */

View File

@ -41,7 +41,11 @@ fxLayoutAlign="center">
<br>
<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="Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button> -->
<button *ngIf="_pdTypeForm.controls['pd_type_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_pdTypeForm.valid"><mat-icon>save</mat-icon></button>
<!-- <button mat-button >RESET</button> -->
</div>

View File

@ -0,0 +1,3 @@
mat-form-field{
width:100%;
}

View File

@ -27,15 +27,17 @@ export class PdTypeDialogComponent implements OnInit {
ngOnInit() {
this.pdTypeFormDatas();
/** Pd Type Form Datas */
this._pdTypeForm = this._formBuilder.group({
//branch_id: any; fk_city_id: any;pd_type_id, type_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
pd_type_id: [this.data.pd_type_id],
type_name: [this.data.type_name, Validators.compose([Validators.required])]
});
//console.log(this._pdTypeForm);
}
/** Pd Type Form Datas */
pdTypeFormDatas(){
this._pdTypeForm = this._formBuilder.group({
//branch_id: any; fk_city_id: any;pd_type_id, type_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
pd_type_id: [this.data.pd_type_id],
type_name: [this.data.type_name, Validators.compose([Validators.required])]
});}
// onSubmit() {
// if (isNaN(this.data.ID)) {
@ -95,5 +97,11 @@ export class PdTypeDialogComponent implements OnInit {
onReset(){
this._pdTypeForm.reset();
}
/** To Reset Popup Data For Edit*/
onResetForEdit(){
this.pdTypeFormDatas();
}
}
/** End Of PD Type Dialog Component */

View File

@ -1,11 +1,11 @@
<mat-card-content>
<div style="text-align: right;">
<button mat-raised-button color="primary" (click)="addPDType()" > + Add PDType</button>
<button mat-raised-button [color]="color" (click)="addPDType()" > + Add PDType</button>
</div>
<br>
<div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div>
<!-- <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
</div> <br> -->
<!-- <div datatable>
<table style="border-collapse: collapse">
<thead>
@ -60,8 +60,8 @@
<br>
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header">
<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>
@ -72,7 +72,7 @@
<ng-container matColumnDef="serialno">
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container>
<ng-container matColumnDef="type_name">
@ -88,7 +88,7 @@
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
class="example-margin"
matTooltip="Active" matTooltipPosition="above"
checked="true"
checked="true" [color]="color"
(change)="isactivePDType(row.pd_type_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
@ -96,7 +96,7 @@
<mat-slide-toggle
class="example-margin"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
checked="false" [color]="color"
(change)="isactivePDType(row.pd_type_id,row.isactive)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle></ng-template>
@ -106,7 +106,7 @@
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPDType(row)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPDType(row)"><mat-icon>edit</mat-icon></button>
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deletePDType(row.pd_type_id)"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell>
</ng-container>

View File

@ -0,0 +1,50 @@
/** Table SerialNo CSS */
.example-margin {
margin: 10px;
}
/** Table CSS - Dislplay Data */
.mat-table {
display: table;
width: 100%;
overflow: auto;
max-height: 500px;
> .mat-header-row, > .mat-row {
display: table-row;
padding: 0;
border: none;
> .mat-header-cell, > .mat-cell {
display: table-cell;
height: 48px;
vertical-align: middle;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
}
}
/** Table CSS -nocontent */
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
/** Table CSS - Search(or)Filter Field */
.mat-form-field {
font-size: 14px;
width: 100%;
}
.filter-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.filter-header {
min-height: 64px;
padding: 8px 24px 0;
}

View File

@ -29,7 +29,7 @@ export class PdTypeListComponent implements OnInit {
loader: boolean = false;
PDTypeList: any = [];
noRecordFound: boolean = false;
color = 'primary';
userData = null;
public dataLength: number;
@ -88,10 +88,16 @@ export class PdTypeListComponent implements OnInit {
data => {
if(data.status === 200){
if(data.dataStatus == true){
this.noRecordFound = false;
this.userData = data.records;
this.dataLength = data.records.length;
if(data.records.length >= 1){
this.userData = this.userData.map((val, i)=>{
val['serialno'] = i + 1;
return val;
})
}
this.dataSource.data = this.userData;
}else{
this.noRecordFound = true;

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PdAllocationTypeDialogComponent } from './pd-allocation-type-dialog.component';
describe('PdAllocationTypeDialogComponent', () => {
let component: PdAllocationTypeDialogComponent;
let fixture: ComponentFixture<PdAllocationTypeDialogComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PdAllocationTypeDialogComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PdAllocationTypeDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,85 +0,0 @@
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';
@Component({
selector: 'app-jazz-dialog',
templateUrl: './pd-allocation-type-dialog.component.html',
styleUrls: ['./pd-allocation-type-dialog.component.scss']
})
export class PdAllocationTypeDialogComponent implements OnInit {
public _PDAllocationTypeForm: FormGroup;
constructor(private _formBuilder: FormBuilder,
private dialogRef: MatDialogRef<PdAllocationTypeDialogComponent>,
private _pds: MastersService,
@Inject(MAT_DIALOG_DATA) public data: any) { }
ngOnInit() {
this._PDAllocationTypeForm = this._formBuilder.group({
pd_allocation_type_id: [this.data.pd_allocation_type_id],
pd_allocation_type_name: [this.data.pd_allocation_type_name, Validators.compose([Validators.required])]
});
//pd_allocation_type_id, pd_allocation_type_name, createdon, fk_createdby, updatedon, isactive
//console.log(this._PDAllocationTypeForm);
}
/** For Popup Close Button */
onNoClick(): void {
this.dialogRef.close();
}
/** To Save/Edited Popup Data */
onSubmit() {
if(isNaN(this.data.pd_allocation_type_id)) {
var my_array = this._PDAllocationTypeForm.value;
Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
console.log(my_array);
this._pds.addMasterDetails(my_array,'PDALLOCATIONTYPE').subscribe();
this.dialogRef.close();
alert("saved");
} else {
this._pds.editMasterDetails(this._PDAllocationTypeForm.value,'PDALLOCATIONTYPE').subscribe();
this.dialogRef.close();
alert("edited");
}
}
// onSubmit() {
// if (isNaN(this.data.ID)) {
// this._memberService.addMembersOccupation(this._PDAllocationTypeForm.value);
// this.dialogRef.close();
// } else {
// this._memberService.editMembersOccupation(this._PDAllocationTypeForm.value);
// this.dialogRef.close();
// }
// }
/** To Reset Popup Data */
onReset(){
this._PDAllocationTypeForm.reset();
}
}

View File

@ -1,123 +0,0 @@
/* Structure
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 56px;
max-height: 56px;
display: flex;
align-items: center;
padding: 8px 24px 0;
font-size: 20px;
justify-content: space-between;
border-bottom: 1px solid transparent;
}
.mat-input-container {
font-size: 14px;
flex-grow: 1;
margin-left: 32px;
margin-top: 8px;
}
.example-no-results {
display: flex;
justify-content: center;
padding: 24px;
font-size: 12px;
font-style: italic;
}
/** Selection styles
.example-selection-header {
font-size: 18px;
background: rgba(255, 64, 129, 0.3);
border-bottom: 1px solid #d696ac;
}
.mat-column-select {
max-width: 54px;
}
.mat-row:hover, .example-selected-row {
background: #f5f5f5;
}
.mat-row:active, .mat-row.example-selected-row {
background: #eaeaea;
}
.mat-table {
overflow: auto;
max-height: 500px;
}*/
/* Structure *
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
width : 80%;
margin : 20px auto;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}
table {
width: 100%;
}
th {
text-align: left;
}
*/
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
.example-margin {
margin: 10px;
}

View File

@ -1,131 +0,0 @@
/* Structure
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 56px;
max-height: 56px;
display: flex;
align-items: center;
padding: 8px 24px 0;
font-size: 20px;
justify-content: space-between;
border-bottom: 1px solid transparent;
}
.mat-input-container {
font-size: 14px;
flex-grow: 1;
margin-left: 32px;
margin-top: 8px;
}
.example-no-results {
display: flex;
justify-content: center;
padding: 24px;
font-size: 12px;
font-style: italic;
}
/** Selection styles
.example-selection-header {
font-size: 18px;
background: rgba(255, 64, 129, 0.3);
border-bottom: 1px solid #d696ac;
}
.mat-column-select {
max-width: 54px;
}
.mat-row:hover, .example-selected-row {
background: #f5f5f5;
}
.mat-row:active, .mat-row.example-selected-row {
background: #eaeaea;
}
.mat-table {
overflow: auto;
max-height: 500px;
}*/
/* Structure *
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
width : 80%;
margin : 20px auto;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}
table {
width: 100%;
}
th {
text-align: left;
}
*/
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
.active:hover{
color: green;
font-size: 20px;
}
.deactive:hover{
color: red;
font-size: 20px;
}
.example-margin {
margin: 10px;
}

View File

@ -1,132 +0,0 @@
/* Structure
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 56px;
max-height: 56px;
display: flex;
align-items: center;
padding: 8px 24px 0;
font-size: 20px;
justify-content: space-between;
border-bottom: 1px solid transparent;
}
.mat-input-container {
font-size: 14px;
flex-grow: 1;
margin-left: 32px;
margin-top: 8px;
}
.example-no-results {
display: flex;
justify-content: center;
padding: 24px;
font-size: 12px;
font-style: italic;
}
/** Selection styles
.example-selection-header {
font-size: 18px;
background: rgba(255, 64, 129, 0.3);
border-bottom: 1px solid #d696ac;
}
.mat-column-select {
max-width: 54px;
}
.mat-row:hover, .example-selected-row {
background: #f5f5f5;
}
.mat-row:active, .mat-row.example-selected-row {
background: #eaeaea;
}
.mat-table {
overflow: auto;
max-height: 500px;
}*/
/* Structure *
.example-container {
display: flex;
flex-direction: column;
min-width: 30px;
width : 80%;
margin : 20px auto;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
//mat-cell{
.cell{
display:flex !important;
justify-content:center!important;
}
// mat-header-cell {
.header-cell{
display:flex;
justify-content:center;
}
table {
width: 100%;
}
th {
text-align: left;
}
*/
.example-container {
display: flex;
flex-direction: column;
min-width: 300px;
}
.example-header {
min-height: 64px;
padding: 8px 24px 0;
}
.mat-form-field {
font-size: 14px;
width: 100%;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
.nocontent {
color: red;
font-size: 16px;
text-align: center;
}
.active:hover{
color: green;
font-size: 20px;
}
.deactive:hover{
color: red;
font-size: 20px;
}
.example-margin {
margin: 10px;
}

View File

@ -45,7 +45,11 @@ fxLayoutAlign="center">
</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="Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button> -->
<button *ngIf="_productMasterForm.controls['product_id'] == '';else editreset;" 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>
<ng-template #editreset>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
</ng-template>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_productMasterForm.valid"><mat-icon>save</mat-icon></button>
</div>

Some files were not shown because too many files have changed in this diff Show More