master changes
This commit is contained in:
parent
72e10b4b26
commit
5250ba0a60
@ -44,7 +44,7 @@ export class TokenInterceptor implements HttpInterceptor{
|
|||||||
console.error("Error: " + error.status);
|
console.error("Error: " + error.status);
|
||||||
if(error.status == 401 || error.status == 500){
|
if(error.status == 401 || error.status == 500){
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
this.router.navigate(['/login']);
|
this.router.navigate(['/authentication/login']);
|
||||||
}
|
}
|
||||||
return of(result as T);
|
return of(result as T);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,14 +7,14 @@
|
|||||||
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
|
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort>
|
<mat-table [dataSource]="dataSource" matSort>
|
||||||
|
|
||||||
<ng-container matColumnDef="SerialNo">
|
<ng-container matColumnDef="SerialNo">
|
||||||
@ -34,14 +34,17 @@
|
|||||||
|
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="IsActive">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
<mat-cell *matCellDef="let row">
|
||||||
|
<!--{{row.isactive}}-->
|
||||||
<mat-icon *ngIf="row.isactive == 1;else notactive;" class="hover-icon" matTooltip="Active" matTooltipPosition="above">done</mat-icon>
|
<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>
|
<ng-template #notactive>
|
||||||
|
<mat-icon class="hover-icon" matTooltip="Inactive" matTooltipPosition="above">clear</mat-icon>
|
||||||
|
</ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Actions </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row">
|
<mat-cell *matCellDef="let row">
|
||||||
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editBranch(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editBranch(row)"><mat-icon>edit</mat-icon></button>
|
||||||
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteBranch(row.branch_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteBranch(row.branch_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
@ -56,8 +59,10 @@
|
|||||||
<!-- <div *ngIf="dataSource.length === 0">No records found</div> -->
|
<!-- <div *ngIf="dataSource.length === 0">No records found</div> -->
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
|
|
||||||
<!-- <p *ngIf="dataSource.length === 0">No records found</p> -->
|
<!-- <p *ngIf="dataSource.length === 0">No records found</p> -->
|
||||||
@ -28,7 +28,6 @@ export class BranchListComponent implements OnInit {
|
|||||||
isPopupOpened = true;
|
isPopupOpened = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
BranchList: any = [];
|
BranchList: any = [];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
@ -40,17 +39,18 @@ export class BranchListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _mastersService: MastersService) {
|
private _mastersService: MastersService) {
|
||||||
this._mastersService.getAllBranch().subscribe(
|
this.getBranch();
|
||||||
data => {
|
// this._mastersService.getAllBranch().subscribe(
|
||||||
this.userData = data.records;
|
// data => {
|
||||||
// alert(this.userData);
|
// this.userData = data.records;
|
||||||
if(data.records === ''){
|
// // alert(this.userData);
|
||||||
this.dataLength = data.records.length;
|
// if(data.records === ''){
|
||||||
}else{
|
// this.dataLength = data.records.length;
|
||||||
this.dataLength = 0}
|
// }else{
|
||||||
this.dataSource.data = this.userData;
|
// this.dataLength = 0}
|
||||||
}
|
// this.dataSource.data = this.userData;
|
||||||
)
|
// }
|
||||||
|
// )
|
||||||
|
|
||||||
|
|
||||||
// this._mastersService.getAllBranch().subscribe(dataresult =>{
|
// this._mastersService.getAllBranch().subscribe(dataresult =>{
|
||||||
@ -65,6 +65,24 @@ export class BranchListComponent implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// this.getBranch();
|
// this.getBranch();
|
||||||
}
|
}
|
||||||
|
noRecordFound: boolean = false;
|
||||||
|
getBranch(){
|
||||||
|
this._mastersService.getAllBranch().subscribe(
|
||||||
|
data => {
|
||||||
|
// alert(this.userData);
|
||||||
|
if(data.status === 200){
|
||||||
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -76,6 +94,7 @@ export class BranchListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getBranch();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -89,6 +108,7 @@ export class BranchListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getBranch();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -97,7 +117,9 @@ export class BranchListComponent implements OnInit {
|
|||||||
/** To delete Branch Datas */
|
/** To delete Branch Datas */
|
||||||
deleteBranch(id: number) {
|
deleteBranch(id: number) {
|
||||||
var PrimaryKeyWithValue ={'branch_id':id};
|
var PrimaryKeyWithValue ={'branch_id':id};
|
||||||
this._mastersService.deleteMasterDetails(PrimaryKeyWithValue,'BRANCH').subscribe();
|
this._mastersService.deleteMasterDetails(PrimaryKeyWithValue,'BRANCH').subscribe(data=>{
|
||||||
|
this.getBranch();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
|
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
|
||||||
</div>
|
</div>
|
||||||
<!-- displayedColumns = ['city_id','name', 'fk_state_id','state_name' , 'isactive','actions'];
|
<!-- displayedColumns = ['city_id','name', 'fk_state_id','state_name' , 'isactive','actions'];
|
||||||
<div class="example-container mat-elevation-z8">
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<table>
|
<table>
|
||||||
<div datatable>
|
<div datatable>
|
||||||
<table style="border-collapse: collapse">
|
<table style="border-collapse: collapse">
|
||||||
@ -71,14 +71,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -94,7 +94,7 @@
|
|||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
<ng-container matColumnDef="StateName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.state_name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="IsActive">
|
||||||
@ -121,5 +121,5 @@
|
|||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@ -25,38 +25,22 @@ export class CityListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
CityList: any = [];
|
CityList: any = [];
|
||||||
|
|
||||||
//, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
|
||||||
// displayedColumns = ['city_id','name', 'fk_state_id','state_name' , 'isactive','actions'];
|
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
noRecordFound: boolean = false;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
displayedColumns = ['SerialNo','CityName','Name', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','CityName','StateName', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllCity().subscribe(
|
this.getCity();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// get CityList() {
|
|
||||||
// return this._MastersService.getAllCity();
|
|
||||||
// }
|
|
||||||
|
|
||||||
//dataSource = new UserDataSource(this._MastersService);
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
//this.getCity();
|
//this.getCity();
|
||||||
@ -71,6 +55,7 @@ export class CityListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getCity();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -84,27 +69,32 @@ export class CityListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getCity();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
//getCity() {
|
getCity() {
|
||||||
//this.loader = true;
|
this._MastersService.getAllCity().subscribe(
|
||||||
// this._MastersService.getAllCity().subscribe(dataresult => {
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
// this.loader = false;
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
// if (dataresult.dataStatus === true) {
|
this.dataLength = data.records.length;
|
||||||
// this.CityList = dataresult.records;
|
this.dataSource.data = this.userData;
|
||||||
// }
|
}else{
|
||||||
// })
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
//}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
deleteCity(id: number) {
|
deleteCity(id: number) {
|
||||||
var PrimaryKeyWithValue ={'city_id':id};
|
var PrimaryKeyWithValue ={'city_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'CITY');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'CITY').subscribe(data=>{
|
||||||
|
this.getCity();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -61,13 +61,13 @@
|
|||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
|
||||||
<div class="example-header">
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8"><div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -77,7 +77,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CommentsOnLocalityName">
|
<ng-container matColumnDef="CommentsOnLocalityName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Comments On Locality Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Comments On Locality Rating </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.rating}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.rating}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
@ -103,7 +103,7 @@
|
|||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div><div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
|
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
@ -25,8 +25,9 @@ export class CommentsOnLocalityListComponent implements OnInit {
|
|||||||
isPopupOpened = true;
|
isPopupOpened = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
CommentsOnLocalityList: any = [];
|
CommentsOnLocalityList: any = [];
|
||||||
|
noRecordFound: boolean = false;
|
||||||
|
|
||||||
|
|
||||||
//displayedColumns = ['comments_on_locality_id','rating','isactive','actions'];
|
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
@ -40,16 +41,7 @@ export class CommentsOnLocalityListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllMasterData('COMMENTSONLOCALITY').subscribe(
|
this.getCommentsOnLocality();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get CommentsOnLocalityList() {
|
// get CommentsOnLocalityList() {
|
||||||
@ -71,6 +63,7 @@ export class CommentsOnLocalityListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getCommentsOnLocality();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -84,27 +77,33 @@ export class CommentsOnLocalityListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getCommentsOnLocality();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getCommentsOnLocality() {
|
getCommentsOnLocality() {
|
||||||
// this.loader = true;
|
this._MastersService.getAllMasterData('COMMENTSONLOCALITY').subscribe(
|
||||||
// this._MastersService.getAllMasterData('COMMENTSONLOCALITY').subscribe(dataresult => {
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// this.loader = false;
|
|
||||||
|
|
||||||
// if (dataresult.dataStatus === true) {
|
|
||||||
// this.CommentsOnLocalityList = dataresult.records;
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
deleteCommentsOnLocality(id: number) {
|
deleteCommentsOnLocality(id: number) {
|
||||||
var PrimaryKeyWithValue ={'comments_on_locality_id':id};
|
var PrimaryKeyWithValue ={'comments_on_locality_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'COMMENTSONLOCALITY');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'COMMENTSONLOCALITY').subscribe(data=>{
|
||||||
|
this.getCommentsOnLocality();
|
||||||
|
});
|
||||||
//this._MastersService.deleteMasterDetails('',id,'');
|
//this._MastersService.deleteMasterDetails('',id,'');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,14 +93,14 @@
|
|||||||
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
</div>-->
|
</div>-->
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8"></div>
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -110,12 +110,12 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="Name">
|
<ng-container matColumnDef="Name">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Company Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="City">
|
<ng-container matColumnDef="City">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.city_name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.city_name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
@ -137,6 +137,6 @@
|
|||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div><div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@ -25,17 +25,11 @@ export class CompanyListComponent implements OnInit {
|
|||||||
isPopupOpened = true;
|
isPopupOpened = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
CompanyList: any = [];
|
CompanyList: any = [];
|
||||||
|
|
||||||
//displayedColumns = ['Company_id', 'fk_city_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions'];
|
|
||||||
//displayedColumns = ['company_id', 'name', 'addressline1', 'addressline2','addressline3', 'city', 'state','city_name', 'state_name', 'pincode', 'logo','action'];
|
|
||||||
displayedColumns = ['SerialNo', 'Name', 'City', 'State' , 'Action'];
|
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
noRecordFound: boolean = false;
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo', 'Name', 'City', 'State' , 'Action'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
@ -43,17 +37,7 @@ export class CompanyListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
|
this.getCompany();
|
||||||
this._MastersService.getAllCompany().subscribe(
|
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get CompanyList() {
|
// get CompanyList() {
|
||||||
@ -75,6 +59,7 @@ export class CompanyListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getCompany();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -88,27 +73,33 @@ export class CompanyListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getCompany();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getCompany() {
|
getCompany() {
|
||||||
// this.loader = true;
|
this._MastersService.getAllCompany().subscribe(
|
||||||
// this._MastersService.getAllCompany().subscribe(dataresult => {
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// this.loader = false;
|
|
||||||
|
|
||||||
// if (dataresult.dataStatus === true) {
|
|
||||||
// this.CompanyList = dataresult.records;
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
deleteCompany(id: number) {
|
deleteCompany(id: number) {
|
||||||
var PrimaryKeyWithValue ={'company_id':id};
|
var PrimaryKeyWithValue ={'company_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'COMPANY');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'COMPANY').subscribe(result => {
|
||||||
|
this.getCompany();
|
||||||
|
});
|
||||||
//this._MastersService.deleteMasterDetails('company_id',id,'COMPANY');
|
//this._MastersService.deleteMasterDetails('company_id',id,'COMPANY');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,13 +60,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -76,7 +77,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="Description">
|
<ng-container matColumnDef="Description">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Description </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.description}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.description}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
@ -103,7 +104,7 @@
|
|||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
|
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
@ -25,14 +25,12 @@ export class CustomerBehaviourListComponent implements OnInit {
|
|||||||
isPopupOpened = true;
|
isPopupOpened = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
CustomerBehaviourList: any = [];
|
CustomerBehaviourList: any = [];
|
||||||
|
noRecordFound: boolean = false;
|
||||||
//displayedColumns = ['customer_behaviour_id', 'description', 'isactive','actions'];
|
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
|
||||||
displayedColumns = ['SerialNo','Description', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','Description', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ -41,23 +39,10 @@ displayedColumns = ['SerialNo','Description', 'IsActive','Actions'];
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllMasterData('CUSTOMERBEHAVIOUR').subscribe(
|
this.getCustomerBehaviour();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get CustomerBehaviourList() {
|
|
||||||
// return this._MastersService.getAllCustomerBehaviour();
|
|
||||||
// }
|
|
||||||
|
|
||||||
//dataSource = new UserDataSource(this._MastersService);
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
//this.getCustomerBehaviour();
|
//this.getCustomerBehaviour();
|
||||||
@ -90,22 +75,27 @@ displayedColumns = ['SerialNo','Description', 'IsActive','Actions'];
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getCustomerBehaviour() {
|
getCustomerBehaviour() {
|
||||||
// this.loader = true;
|
this._MastersService.getAllMasterData('CUSTOMERBEHAVIOUR').subscribe(
|
||||||
// this._MastersService.getAllMasterData('CUSTOMERBEHAVIOUR').subscribe(dataresult => {
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// this.loader = false;
|
|
||||||
|
|
||||||
// if (dataresult.dataStatus === true) {
|
|
||||||
// this.CustomerBehaviourList = dataresult.records;
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
deleteCustomerBehaviour(id: number) {
|
deleteCustomerBehaviour(id: number) {
|
||||||
var PrimaryKeyWithValue ={'customer_behaviour_id':id};
|
var PrimaryKeyWithValue ={'customer_behaviour_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'CUSTOMERBEHAVIOUR');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'CUSTOMERBEHAVIOUR').subscribe(result => {
|
||||||
|
this.getCustomerBehaviour();
|
||||||
|
});
|
||||||
//this._MastersService.deleteMasterDetails('customer_behaviour_id',id,'CUSTOMERBEHAVIOUR');
|
//this._MastersService.deleteMasterDetails('customer_behaviour_id',id,'CUSTOMERBEHAVIOUR');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,13 +66,13 @@
|
|||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -82,7 +82,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CustomerSegmentName">
|
<ng-container matColumnDef="CustomerSegmentName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>CustomerSegmentName</mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Customer Segment</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
@ -109,7 +109,7 @@
|
|||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ export class CustomerSegmentListComponent implements OnInit {
|
|||||||
isPopupOpened = true;
|
isPopupOpened = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
CustomerSegmentList: any = [];
|
CustomerSegmentList: any = [];
|
||||||
|
noRecordFound: boolean = false;
|
||||||
// displayedColumns = ['customer_segment_id', 'abbr', 'name', 'isactive','actions'];
|
// displayedColumns = ['customer_segment_id', 'abbr', 'name', 'isactive','actions'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
@ -40,16 +40,9 @@ displayedColumns = ['SerialNo','CustomerSegmentName', 'IsActive','Actions'];
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllMasterData('CUSTOMERSEGMENT').subscribe(
|
this.getCustomerSegment();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get CustomerSegmentList() {
|
// get CustomerSegmentList() {
|
||||||
@ -71,6 +64,7 @@ displayedColumns = ['SerialNo','CustomerSegmentName', 'IsActive','Actions'];
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getCustomerSegment();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -84,27 +78,32 @@ displayedColumns = ['SerialNo','CustomerSegmentName', 'IsActive','Actions'];
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getCustomerSegment();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getCustomerSegment() {
|
getCustomerSegment() {
|
||||||
// this.loader = true;
|
this._MastersService.getAllMasterData('CUSTOMERSEGMENT').subscribe(
|
||||||
// this._MastersService.getAllMasterData('CUSTOMERSEGMENT').subscribe(dataresult => {
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
// this.loader = false;
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
// if (dataresult.dataStatus === true) {
|
this.dataLength = data.records.length;
|
||||||
// this.CustomerSegmentList = dataresult.records;
|
this.dataSource.data = this.userData;
|
||||||
// }
|
}else{
|
||||||
// })
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
// }
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
deleteCustomerSegment(id: number) {
|
deleteCustomerSegment(id: number) {
|
||||||
var PrimaryKeyWithValue ={'customer_segment_id':id};
|
var PrimaryKeyWithValue ={'customer_segment_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'CUSTOMERSEGMENT');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'CUSTOMERSEGMENT').subscribe(result => {
|
||||||
|
this.getCustomerSegment();
|
||||||
|
});
|
||||||
//this._MastersService.deleteMasterDetails('customer_segment_id',id,'CUSTOMERSEGMENT');
|
//this._MastersService.deleteMasterDetails('customer_segment_id',id,'CUSTOMERSEGMENT');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,14 +65,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -81,16 +81,11 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="DesignationName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Designation Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="IsActive">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
||||||
@ -115,6 +110,6 @@
|
|||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
@ -26,15 +26,12 @@ export class DesignationListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
DesignationList: any = [];
|
DesignationList: any = [];
|
||||||
|
|
||||||
// displayedColumns = ['designation_id', 'name', 'short_name','isactive','actions'];
|
|
||||||
displayedColumns = ['SerialNo','Designation Name', 'IsActive','Actions'];
|
|
||||||
|
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
noRecordFound: boolean = false;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','DesignationName', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
@ -42,23 +39,10 @@ export class DesignationListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllMasterData('DESIGNATION').subscribe(
|
|
||||||
data => {
|
this. getDesignation();
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get DesignationList() {
|
|
||||||
// return this._MastersService.getAllDesignation();
|
|
||||||
// }
|
|
||||||
|
|
||||||
//dataSource = new UserDataSource(this._MastersService);
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
//this.getDesignation();
|
//this.getDesignation();
|
||||||
@ -73,6 +57,7 @@ export class DesignationListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this. getDesignation();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -86,28 +71,31 @@ export class DesignationListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this. getDesignation();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getDesignation() {
|
getDesignation() {
|
||||||
// this.loader = true;
|
this._MastersService.getAllMasterData('DESIGNATION').subscribe(
|
||||||
// this._MastersService.getAllMasterData('DESIGNATION').subscribe(dataresult => {
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
// this.loader = false;
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
// if (dataresult.dataStatus === true) {
|
this.dataLength = data.records.length;
|
||||||
// this.DesignationList = dataresult.records;
|
this.dataSource.data = this.userData;
|
||||||
// }
|
}else{
|
||||||
// })
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
// }
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
deleteDesignation(id: number) {
|
deleteDesignation(id: number) {
|
||||||
var PrimaryKeyWithValue ={'designation_id':id};
|
var PrimaryKeyWithValue ={'designation_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'DESIGNATION');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'DESIGNATION')
|
||||||
// this._MastersService.deleteMasterDetails('designation_id',id,'DESIGNATION');
|
.subscribe( data => { this.getDesignation();})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -74,14 +74,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -91,7 +91,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="FrequencyName">
|
<ng-container matColumnDef="FrequencyName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Frequency Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
@ -118,7 +118,7 @@
|
|||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
|
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@ -25,8 +25,8 @@ export class FrequencyListComponent implements OnInit {
|
|||||||
isPopupOpened = true;
|
isPopupOpened = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
FrequencyList: any = [];
|
FrequencyList: any = [];
|
||||||
|
noRecordFound: boolean = false;
|
||||||
|
|
||||||
// displayedColumns = ['frequency_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
@ -41,16 +41,8 @@ export class FrequencyListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllMasterData('FREQUENCY').subscribe(
|
this.getFrequency();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get FrequencyList() {
|
// get FrequencyList() {
|
||||||
@ -72,6 +64,7 @@ export class FrequencyListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getFrequency();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -85,27 +78,31 @@ export class FrequencyListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getFrequency();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getFrequency() {
|
getFrequency() {
|
||||||
// this.loader = true;
|
this._MastersService.getAllMasterData('FREQUENCY').subscribe(
|
||||||
// this._MastersService.getAllMasterData('FREQUENCY').subscribe(dataresult => {
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
// this.loader = false;
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
// if (dataresult.dataStatus === true) {
|
this.dataLength = data.records.length;
|
||||||
// this.FrequencyList = dataresult.records;
|
this.dataSource.data = this.userData;
|
||||||
// }
|
}else{
|
||||||
// })
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
// }
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
deleteFrequency(id: number) {
|
deleteFrequency(id: number) {
|
||||||
var PrimaryKeyWithValue ={'frequency_id':id};
|
var PrimaryKeyWithValue ={'frequency_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'FREQUENCY');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'FREQUENCY')
|
||||||
|
.subscribe( data => { this.getFrequency();})
|
||||||
// this._MastersService.deleteMasterDetails('designation_id',id,'DESIGNATION');
|
// this._MastersService.deleteMasterDetails('designation_id',id,'DESIGNATION');
|
||||||
|
|
||||||
//this._MastersService.deleteMasterDetails('frequency_id',id,'FREQUENCY');
|
//this._MastersService.deleteMasterDetails('frequency_id',id,'FREQUENCY');
|
||||||
|
|||||||
@ -75,14 +75,14 @@
|
|||||||
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
</div>-->
|
</div>-->
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -120,5 +120,5 @@
|
|||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@ -32,9 +32,7 @@ export class IndustryClassificationListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
IndustryClassificationList: any = [];
|
IndustryClassificationList: any = [];
|
||||||
|
|
||||||
|
noRecordFound: boolean = false;
|
||||||
//displayedColumns = ['industry_classification_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
|
||||||
//industry_classification_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
@ -49,16 +47,7 @@ export class IndustryClassificationListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _IMService: MastersService) {
|
private _IMService: MastersService) {
|
||||||
this._IMService.getAllMasterData('INDUSTRYCLASSIFICATION').subscribe(
|
this.getIndustryClassification();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get IndustryClassificationList() {
|
// get IndustryClassificationList() {
|
||||||
@ -82,6 +71,7 @@ export class IndustryClassificationListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getIndustryClassification();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -95,33 +85,36 @@ export class IndustryClassificationListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getIndustryClassification();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getIndustryClassification() {
|
getIndustryClassification() {
|
||||||
this.loader = true;
|
|
||||||
this._IMService.getAllMasterData('INDUSTRYCLASSIFICATION').subscribe(dataresult => {
|
|
||||||
|
|
||||||
this.loader = false;
|
this._IMService.getAllMasterData('INDUSTRYCLASSIFICATION').subscribe(data => {
|
||||||
|
if(data.status === 200){
|
||||||
if (dataresult.dataStatus === true) {
|
this.noRecordFound = false;
|
||||||
this.IndustryClassificationList = dataresult.records;
|
this.userData = data.records;
|
||||||
}
|
this.dataLength = data.records.length;
|
||||||
else{
|
this.dataSource.data = this.userData;
|
||||||
this.IndustryClassificationList = [];
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
deleteIndustryClassification(id: number) {
|
deleteIndustryClassification(id: number) {
|
||||||
var PrimaryKeyWithValue ={'industry_classification_id':id};
|
var PrimaryKeyWithValue ={'industry_classification_id':id};
|
||||||
console.log('PrimaryKeyWithValue',PrimaryKeyWithValue);
|
// console.log('PrimaryKeyWithValue',PrimaryKeyWithValue);
|
||||||
console.log('id',id);
|
//console.log('id',id);
|
||||||
this._IMService.deleteMasterDetails(PrimaryKeyWithValue,'INDUSTRYCLASSIFICATION');
|
this._IMService.deleteMasterDetails(PrimaryKeyWithValue,'INDUSTRYCLASSIFICATION')
|
||||||
|
.subscribe( data => { this.getIndustryClassification();})
|
||||||
//this._IMService.deleteMasterDetails('industry_classification_id',id,'INDUSTRYCLASSIFICATION');
|
//this._IMService.deleteMasterDetails('industry_classification_id',id,'INDUSTRYCLASSIFICATION');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -60,13 +60,13 @@
|
|||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -75,9 +75,9 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="LenderHierarchy">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Lender Hierarchy </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.lender_hierarchy}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
<ng-container matColumnDef="StateName">
|
||||||
@ -109,6 +109,6 @@
|
|||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@ -26,13 +26,14 @@ export class LenderHierarchyListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
LenderHierarchyList: any = [];
|
LenderHierarchyList: any = [];
|
||||||
|
|
||||||
displayedColumns = ['lender_hierarchy_id', 'lender_hierarchy','isactive','actions'];
|
//displayedColumns = ['lender_hierarchy_id', 'lender_hierarchy','isactive','actions'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
noRecordFound: boolean = false;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','LenderHierarchy', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
@ -40,16 +41,17 @@ export class LenderHierarchyListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllMasterData('LENDERHIERARCHY').subscribe(
|
this.getLenderHierarchy();
|
||||||
data => {
|
// this._MastersService.getAllMasterData('LENDERHIERARCHY').subscribe(
|
||||||
this.userData = data.records;
|
// data => {
|
||||||
if(data.records === ''){
|
// this.userData = data.records;
|
||||||
this.dataLength = data.records.length;
|
// if(data.records === ''){
|
||||||
}else{
|
// this.dataLength = data.records.length;
|
||||||
this.dataLength = 0}
|
// }else{
|
||||||
this.dataSource.data = this.userData;
|
// this.dataLength = 0}
|
||||||
}
|
// this.dataSource.data = this.userData;
|
||||||
)
|
// }
|
||||||
|
// )
|
||||||
}
|
}
|
||||||
|
|
||||||
// get LenderHierarchyList() {
|
// get LenderHierarchyList() {
|
||||||
@ -71,6 +73,7 @@ export class LenderHierarchyListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getLenderHierarchy();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -84,27 +87,32 @@ export class LenderHierarchyListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getLenderHierarchy();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getLenderHierarchy() {
|
getLenderHierarchy() {
|
||||||
this.loader = true;
|
|
||||||
this._MastersService.getAllMasterData('LENDERHIERARCHY').subscribe(dataresult => {
|
|
||||||
|
|
||||||
this.loader = false;
|
this._MastersService.getAllMasterData('LENDERHIERARCHY').subscribe(
|
||||||
|
data => {
|
||||||
if (dataresult.dataStatus === true) {
|
if(data.status === 200){
|
||||||
this.LenderHierarchyList = dataresult.records;
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteLenderHierarchy(id: number) {
|
deleteLenderHierarchy(id: number) {
|
||||||
var PrimaryKeyWithValue ={'lender_hierarchy_id':id};
|
var PrimaryKeyWithValue ={'lender_hierarchy_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'LENDERHIERARCHY');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'LENDERHIERARCHY')
|
||||||
|
.subscribe( data => { this.getLenderHierarchy();})
|
||||||
//this._MastersService.deleteMasterDetails('lender_hierarchy_id',id,'LENDERHIERARCHY');
|
//this._MastersService.deleteMasterDetails('lender_hierarchy_id',id,'LENDERHIERARCHY');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
<button mat-raised-button color="primary" (click)="addMemberOccupation()" [disabled]="dialogRef"> + Add Member's Occupation</button>
|
<button mat-raised-button color="primary" (click)="addMemberOccupation()" [disabled]="dialogRef"> + Add Member's Occupation</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
|
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
|
||||||
</div>
|
</div> -->
|
||||||
<!-- <div datatable>
|
<!-- <div datatable>
|
||||||
<table style="border-collapse: collapse">
|
<table style="border-collapse: collapse">
|
||||||
<thead>
|
<thead>
|
||||||
@ -79,14 +79,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -125,7 +125,7 @@
|
|||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
|
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@ -26,13 +26,8 @@ export class MembersOccupationListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
MemberOccupationList: any = [];
|
MemberOccupationList: any = [];
|
||||||
|
|
||||||
|
|
||||||
//displayedColumns = ['occupation_non_earning_member_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
|
||||||
//occupation_non_earning_member_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
|
||||||
|
|
||||||
// @ViewChild(MatPaginator) paginator: MatPaginator;
|
|
||||||
// @ViewChild(MatSort) sort: MatSort;
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
noRecordFound: boolean = false;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
@ -44,16 +39,7 @@ export class MembersOccupationListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _memberService: MastersService) {
|
private _memberService: MastersService) {
|
||||||
this._memberService.getAllMasterData('OCCUPATIONMEMBERS').subscribe(
|
this.getMemberOccupation();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get MemberOccupationList() {
|
// get MemberOccupationList() {
|
||||||
@ -61,7 +47,7 @@ export class MembersOccupationListComponent implements OnInit {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getMemberOccupation();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//dataSource = new UserDataSource(this._memberService);
|
//dataSource = new UserDataSource(this._memberService);
|
||||||
@ -74,6 +60,7 @@ export class MembersOccupationListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getMemberOccupation();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -87,28 +74,46 @@ export class MembersOccupationListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getMemberOccupation();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
|
// getMemberOccupation() {
|
||||||
|
// this.loader = true;
|
||||||
|
// this._memberService.getAllMasterData('OCCUPATIONMEMBERS').subscribe(dataresult => {
|
||||||
|
|
||||||
|
// this.loader = false;
|
||||||
|
|
||||||
|
// if (dataresult.dataStatus === true) {
|
||||||
|
// this.MemberOccupationList = dataresult.records;
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
getMemberOccupation() {
|
getMemberOccupation() {
|
||||||
this.loader = true;
|
|
||||||
this._memberService.getAllMasterData('OCCUPATIONMEMBERS').subscribe(dataresult => {
|
|
||||||
|
|
||||||
this.loader = false;
|
this._memberService.getAllMasterData('OCCUPATIONMEMBERS').subscribe(
|
||||||
|
data => {
|
||||||
if (dataresult.dataStatus === true) {
|
if(data.status === 200){
|
||||||
this.MemberOccupationList = dataresult.records;
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
deleteMemberOccupation(id: number) {
|
deleteMemberOccupation(id: number) {
|
||||||
var PrimaryKeyWithValue ={'occupation_non_earning_member_id':id};
|
var PrimaryKeyWithValue ={'occupation_non_earning_member_id':id};
|
||||||
this._memberService.deleteMasterDetails(PrimaryKeyWithValue,'OCCUPATIONMEMBERS');
|
this._memberService.deleteMasterDetails(PrimaryKeyWithValue,'OCCUPATIONMEMBERS').subscribe( data => { this.getMemberOccupation();})
|
||||||
//this._memberService.deleteMasterDetails('occupation_non_earning_member_id',id,'OCCUPATIONMEMBERS');
|
//this._memberService.deleteMasterDetails('occupation_non_earning_member_id',id,'OCCUPATIONMEMBERS');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button color="primary" (click)="addPDAllocationType()" [disabled]="dialogRef"> + Add PDAllocationType</button>
|
<!-- <button mat-raised-button color="primary" (click)="addPDAllocationType()" [disabled]="dialogRef"> + Add PDAllocationType</button> -->
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div *ngIf="loader">
|
<div *ngIf="loader">
|
||||||
@ -56,14 +56,14 @@
|
|||||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||||
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
||||||
</mattable>
|
</mattable>
|
||||||
</div>-->
|
</div>--> <div *ngIf="!noRecordFound" class="example-container mat-elevation-z8"></div>
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -72,14 +72,14 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="PDALLOCATIONTYPE">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Allocation Type </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.pd_allocation_type_name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
<ng-container matColumnDef="pdallocationlogic">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Allocation Logic </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.pd_allocation_logic}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="IsActive">
|
||||||
@ -90,13 +90,13 @@
|
|||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="Actions">
|
<!-- <ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row">
|
<mat-cell *matCellDef="let row">
|
||||||
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPDAllocationType(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPDAllocationType(row)"><mat-icon>edit</mat-icon></button>
|
||||||
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deletePDAllocationType(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deletePDAllocationType(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container> -->
|
||||||
|
|
||||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||||
@ -105,7 +105,7 @@
|
|||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -26,13 +26,13 @@ export class PdAllocationTypeListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
PDAllocationTypeList: any = [];
|
PDAllocationTypeList: any = [];
|
||||||
|
|
||||||
//displayedColumns = ['pd_allocation_type_id','pd_allocation_type_name','isactive','actions'];
|
noRecordFound: boolean = false;
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
displayedColumns = ['SerialNo','PD Allocation Type', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','PDALLOCATIONTYPE','pdallocationlogic','IsActive'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
@ -40,16 +40,8 @@ export class PdAllocationTypeListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllMasterData('PDALLOCATIONTYPE').subscribe(
|
this.getPDAllocationType();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +52,7 @@ export class PdAllocationTypeListComponent implements OnInit {
|
|||||||
//dataSource = new UserDataSource(this._MastersService);
|
//dataSource = new UserDataSource(this._MastersService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getPDAllocationType();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -72,6 +64,7 @@ export class PdAllocationTypeListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getPDAllocationType();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -85,27 +78,31 @@ export class PdAllocationTypeListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getPDAllocationType();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getPDAllocationType() {
|
getPDAllocationType() {
|
||||||
this.loader = true;
|
this._MastersService.getAllMasterData('PDALLOCATIONTYPE').subscribe(
|
||||||
this._MastersService.getAllMasterData('PDALLOCATIONTYPE').subscribe(dataresult => {
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
this.loader = false;
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
if (dataresult.dataStatus === true) {
|
this.dataLength = data.records.length;
|
||||||
this.PDAllocationTypeList = dataresult.records;
|
this.dataSource.data = this.userData;
|
||||||
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deletePDAllocationType(id: number) {
|
deletePDAllocationType(id: number) {
|
||||||
var PrimaryKeyWithValue ={'pd_allocation_type_id':id};
|
var PrimaryKeyWithValue ={'pd_allocation_type_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'PDALLOCATIONTYPE');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'PDALLOCATIONTYPE')
|
||||||
|
.subscribe( data => { this.getPDAllocationType();})
|
||||||
//this._MastersService.deleteMasterDetails('pd_allocation_type_id',id,'PDALLOCATIONTYPE');
|
//this._MastersService.deleteMasterDetails('pd_allocation_type_id',id,'PDALLOCATIONTYPE');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,14 +62,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8"></div>
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -78,14 +78,9 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="PDLocationName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Location </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.description}} </mat-cell>
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="IsActive">
|
||||||
@ -113,5 +108,5 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
@ -27,10 +27,8 @@ export class PdLocationApproachListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
PdLocationApproachList: any = [];
|
PdLocationApproachList: any = [];
|
||||||
|
|
||||||
// displayedColumns = ['pd_allocation_type_id', 'pd_allocation_type_name', 'isactive','actions'];
|
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
noRecordFound: boolean = false;
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
displayedColumns = ['SerialNo','PDLocationName','IsActive','Actions'];
|
displayedColumns = ['SerialNo','PDLocationName','IsActive','Actions'];
|
||||||
@ -41,16 +39,7 @@ export class PdLocationApproachListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllMasterData('PDLOCATIONAPPROACH').subscribe(
|
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get PdLocationApproachList() {
|
// get PdLocationApproachList() {
|
||||||
@ -90,22 +79,23 @@ export class PdLocationApproachListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getPdLocationApproach() {
|
getPdLocationApproach() {
|
||||||
// this.loader = true;
|
this._MastersService.getAllMasterData('PDLOCATIONAPPROACH').subscribe(
|
||||||
// this._MastersService.getAllMasterData('PDLOCATIONAPPROACH').subscribe(dataresult => {
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
// this.loader = false;
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
// if (dataresult.dataStatus === true) {
|
this.dataLength = data.records.length;
|
||||||
// this.PdLocationApproachList = dataresult.records;
|
this.dataSource.data = this.userData;
|
||||||
// }
|
}else{
|
||||||
// })
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
// }
|
}
|
||||||
|
})}
|
||||||
|
|
||||||
deletePdLocationApproach(id: number) {
|
deletePdLocationApproach(id: number) {
|
||||||
var PrimaryKeyWithValue ={'pd_allocation_type_id':id};
|
var PrimaryKeyWithValue ={'pd_allocation_type_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'PDLOCATIONAPPROACH');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'PDLOCATIONAPPROACH').subscribe( data => { this.getPdLocationApproach();})
|
||||||
//this._MastersService.deleteMasterDetails('pd_allocation_type_id',id,'PDLOCATIONAPPROACH');
|
//this._MastersService.deleteMasterDetails('pd_allocation_type_id',id,'PDLOCATIONAPPROACH');
|
||||||
}
|
}
|
||||||
//sdffsadfasf
|
//sdffsadfasf
|
||||||
|
|||||||
@ -59,13 +59,14 @@
|
|||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -74,14 +75,9 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="PDType">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>PD Type</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.type_name}} </mat-cell>
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="IsActive">
|
||||||
@ -108,5 +104,5 @@
|
|||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
@ -26,8 +26,7 @@ export class PdTypeListComponent implements OnInit {
|
|||||||
isPopupOpened = true;
|
isPopupOpened = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
PDTypeList: any = [];
|
PDTypeList: any = [];
|
||||||
|
noRecordFound: boolean = false;
|
||||||
//displayedColumns = ['pd_type_id', 'type_name', 'isactive','actions'];
|
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
@ -41,16 +40,7 @@ export class PdTypeListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _PDTypeService: MastersService) {
|
private _PDTypeService: MastersService) {
|
||||||
this._PDTypeService.getAllMasterData('PDTYPE').subscribe(
|
this.getPDType();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get PDTypeList() {
|
// get PDTypeList() {
|
||||||
@ -60,7 +50,7 @@ export class PdTypeListComponent implements OnInit {
|
|||||||
// dataSource = new UserDataSource(this._PDTypeService);
|
// dataSource = new UserDataSource(this._PDTypeService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
//this.getPDType();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -72,6 +62,7 @@ export class PdTypeListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getPDType();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -85,27 +76,31 @@ export class PdTypeListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getPDType();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getPDType() {
|
getPDType() {
|
||||||
// this.loader = true;
|
this._PDTypeService.getAllMasterData('PDTYPE').subscribe(
|
||||||
// this._PDTypeService.getAllMasterData('PDTYPE').subscribe(dataresult => {
|
|
||||||
|
|
||||||
// this.loader = false;
|
|
||||||
|
|
||||||
// if (dataresult.dataStatus === true) {
|
data => {
|
||||||
// this.PDTypeList = dataresult.records;
|
if(data.status === 200){
|
||||||
// }
|
this.noRecordFound = false;
|
||||||
// })
|
this.userData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
// }
|
this.dataSource.data = this.userData;
|
||||||
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
|
||||||
deletePDType(id: number) {
|
deletePDType(id: number) {
|
||||||
var PrimaryKeyWithValue ={'pd_type_id':id};
|
var PrimaryKeyWithValue ={'pd_type_id':id};
|
||||||
this._PDTypeService.deleteMasterDetails(PrimaryKeyWithValue,'PDTYPE');
|
this._PDTypeService.deleteMasterDetails(PrimaryKeyWithValue,'PDTYPE').subscribe( data => { this.getPDType();})
|
||||||
//this._PDTypeService.deleteMasterDetails('pd_type_id',id,'PDTYPE');
|
//this._PDTypeService.deleteMasterDetails('pd_type_id',id,'PDTYPE');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,14 +3,14 @@
|
|||||||
<button mat-raised-button color="primary" (click)="addProductMaster()" [disabled]="dialogRef"> + Add Product</button>
|
<button mat-raised-button color="primary" (click)="addProductMaster()" [disabled]="dialogRef"> + Add Product</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -52,6 +52,7 @@
|
|||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
|
|
||||||
<!-- Copyright 2018 Google Inc. All Rights Reserved.
|
<!-- Copyright 2018 Google Inc. All Rights Reserved.
|
||||||
Use of this source code is governed by an MIT-style license that
|
Use of this source code is governed by an MIT-style license that
|
||||||
|
|||||||
@ -24,20 +24,7 @@ export class ProductListComponent implements OnInit {
|
|||||||
isPopupOpened: boolean = true;
|
isPopupOpened: boolean = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
ProductMasterList: any = [];
|
ProductMasterList: any = [];
|
||||||
|
noRecordFound: boolean = false;
|
||||||
|
|
||||||
//For Data Table
|
|
||||||
//displayedColumns = ['product_id','name','abbr','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
|
||||||
|
|
||||||
|
|
||||||
//dataSource = new UserDataSource(this._ProductService);
|
|
||||||
|
|
||||||
// displayedColumns: string[] = ['ID','ProductName','ProductAbbr'];
|
|
||||||
// dataSource = new MatTableDataSource<ProductElement>(ELEMENT_DATA1);
|
|
||||||
|
|
||||||
// @ViewChild(MatPaginator) paginator: MatPaginator;
|
|
||||||
// @ViewChild(MatSort) sort: MatSort;
|
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
@ -47,11 +34,10 @@ export class ProductListComponent implements OnInit {
|
|||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
//Onready function
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
this.dataSource.sort = this.sort;
|
this.dataSource.sort = this.sort;
|
||||||
//this.getProductMaster();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
applyFilter(filterValue: string) {
|
applyFilter(filterValue: string) {
|
||||||
@ -60,16 +46,7 @@ export class ProductListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _ProductService: MastersService) {
|
private _ProductService: MastersService) {
|
||||||
this._ProductService.getAllMasterData('PRODUCTS').subscribe(
|
this.getProductMaster();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//To open dialog for add the data
|
//To open dialog for add the data
|
||||||
@ -80,6 +57,7 @@ export class ProductListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getProductMaster();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -98,12 +76,13 @@ export class ProductListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getProductMaster();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getProductMaster() {
|
getProductMaster() {
|
||||||
// this.loader = true;
|
// this.loader = true;
|
||||||
// this._ProductService.getAllMasterData('PRODUCTS').subscribe(dataresult => {
|
// this._ProductService.getAllMasterData('PRODUCTS').subscribe(dataresult => {
|
||||||
|
|
||||||
@ -116,63 +95,26 @@ export class ProductListComponent implements OnInit {
|
|||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
this._ProductService.getAllMasterData('PRODUCTS').subscribe(
|
||||||
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
|
||||||
//To inactive the data
|
//To inactive the data
|
||||||
deleteProductMaster(id: number) {
|
deleteProductMaster(id: number) {
|
||||||
console.log('Deleted ID in List Component',id)
|
|
||||||
//this._ProductService.deleteProductMaster(id);
|
|
||||||
var PrimaryKeyWithValue ={'product_id':id};
|
var PrimaryKeyWithValue ={'product_id':id};
|
||||||
this._ProductService.deleteMasterDetails(PrimaryKeyWithValue,'PRODUCTS');
|
this._ProductService.deleteMasterDetails(PrimaryKeyWithValue,'PRODUCTS')
|
||||||
//this._ProductService.deleteMasterDetails('product_id',id,'PRODUCTS').subscribe();
|
.subscribe( data => { this.getProductMaster();})
|
||||||
//this._ProductService.deleteProductMaster(id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// export class UserDataSource extends DataSource<any> {
|
|
||||||
|
|
||||||
// // paginator: MatPaginator;
|
|
||||||
// // sort: MatSort;
|
|
||||||
|
|
||||||
// constructor(private _ps:MastersService) {
|
|
||||||
// super();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // connect(): Observable<ProductMaster[]> {
|
|
||||||
// // //return this.userService.getUser();
|
|
||||||
// // let productData;
|
|
||||||
// // this._ps.getAllMasterData('PRODUCTS').subscribe(data=>{
|
|
||||||
// // productData = data.records;
|
|
||||||
// // //return productData;
|
|
||||||
// // });
|
|
||||||
// // return productData;
|
|
||||||
// // }
|
|
||||||
|
|
||||||
|
|
||||||
// // public getdata(){
|
|
||||||
// // this._ps.getAllMasterData('PRODUCTS')
|
|
||||||
// // .subscribe(dataresult => dataresult.status );
|
|
||||||
// // }
|
|
||||||
|
|
||||||
// connect(): Observable<ProductMaster[]> {
|
|
||||||
// //return this.userService.getUser();
|
|
||||||
// return this._ps.getAllMasterData('PRODUCTS');
|
|
||||||
// }
|
|
||||||
|
|
||||||
// disconnect() {}
|
|
||||||
// }
|
|
||||||
|
|
||||||
export interface ProductElement {
|
|
||||||
ProductName: string;
|
|
||||||
ID: number;
|
|
||||||
ProductAbbr: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ELEMENT_DATA1: ProductElement[] = [
|
|
||||||
{ID: 1, ProductName: 'Home Loan',ProductAbbr: 'HL'},
|
|
||||||
{ID: 2, ProductName: 'Non Residential Premises Loans', ProductAbbr: 'NRPL'},
|
|
||||||
{ID: 3, ProductName: 'Loan Against Property', ProductAbbr: 'LAP'},
|
|
||||||
{ID: 4, ProductName: 'Business Loans', ProductAbbr: 'BL'},
|
|
||||||
{ID: 5, ProductName: 'Personal Loans', ProductAbbr: 'PL'},
|
|
||||||
{ID: 6, ProductName: 'Land Loan', ProductAbbr: 'LL'}
|
|
||||||
];
|
|
||||||
@ -61,14 +61,14 @@
|
|||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -108,5 +108,5 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@ -26,9 +26,7 @@ export class RegionsListComponent implements OnInit {
|
|||||||
isPopupOpened = true;
|
isPopupOpened = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
regionsList: any = [];
|
regionsList: any = [];
|
||||||
|
noRecordFound: boolean = false;
|
||||||
//displayedColumns = ['region_id', 'name', 'isactive','actions'];
|
|
||||||
//region_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
@ -41,17 +39,7 @@ export class RegionsListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _regionsService: MastersService) {
|
private _regionsService: MastersService) {
|
||||||
this._regionsService.getAllMasterData('REGIONS').subscribe(
|
this.getregions();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get regionsList() {
|
// get regionsList() {
|
||||||
@ -61,7 +49,7 @@ export class RegionsListComponent implements OnInit {
|
|||||||
//dataSource = new UserDataSource(this._regionsService);
|
//dataSource = new UserDataSource(this._regionsService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// this.getregions();
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -73,6 +61,7 @@ export class RegionsListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getregions();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -91,22 +80,23 @@ export class RegionsListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getregions() {
|
getregions() {
|
||||||
// this.loader = true;
|
this._regionsService.getAllMasterData('REGIONS').subscribe(
|
||||||
// this._regionsService.getAllMasterData('REGIONS').subscribe(dataresult => {
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
// this.loader = false;
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
// if (dataresult.dataStatus === true) {
|
this.dataLength = data.records.length;
|
||||||
// this.regionsList = dataresult.records;
|
this.dataSource.data = this.userData;
|
||||||
// }
|
}else{
|
||||||
// })
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
// }
|
}
|
||||||
|
})}
|
||||||
|
|
||||||
deleteregions(id: number) {
|
deleteregions(id: number) {
|
||||||
var PrimaryKeyWithValue ={'region_id':id};
|
var PrimaryKeyWithValue ={'region_id':id};
|
||||||
this._regionsService.deleteMasterDetails(PrimaryKeyWithValue,'REGIONS');
|
this._regionsService.deleteMasterDetails(PrimaryKeyWithValue,'REGIONS').subscribe( data => { this.getregions();})
|
||||||
//this._regionsService.deleteMasterDetails('region_id',id,'REGIONS');
|
//this._regionsService.deleteMasterDetails('region_id',id,'REGIONS');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,14 +80,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -126,6 +126,6 @@
|
|||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@ -28,6 +28,7 @@ export class RelationShipListComponent implements OnInit {
|
|||||||
isPopupOpened = true;
|
isPopupOpened = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
RelationShipList: any = [];
|
RelationShipList: any = [];
|
||||||
|
noRecordFound: boolean = false;
|
||||||
|
|
||||||
//displayedColumns = ['relationship_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
//displayedColumns = ['relationship_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
||||||
//relationship_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
//relationship_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
||||||
@ -46,16 +47,7 @@ export class RelationShipListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllMasterData('RELATIONSHIPS').subscribe(
|
this.getRelationShip();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get RelationShipList() {
|
// get RelationShipList() {
|
||||||
@ -78,6 +70,7 @@ export class RelationShipListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getRelationShip();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -92,27 +85,34 @@ export class RelationShipListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getRelationShip();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getRelationShip() {
|
getRelationShip() {
|
||||||
// this.loader = true;
|
this._MastersService.getAllMasterData('RELATIONSHIPS').subscribe(
|
||||||
// this._MastersService.getAllMasterData('RELATIONSHIPS').subscribe(dataresult => {
|
|
||||||
|
|
||||||
// this.loader = false;
|
|
||||||
|
|
||||||
// if (dataresult.dataStatus === true) {
|
data => {
|
||||||
// this.RelationShipList = dataresult.records;
|
if(data.status === 200){
|
||||||
// }
|
this.noRecordFound = false;
|
||||||
// })
|
this.userData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
deleteRelationShip(id: number) {
|
deleteRelationShip(id: number) {
|
||||||
var PrimaryKeyWithValue ={'relationship_id':id};
|
var PrimaryKeyWithValue ={'relationship_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'RELATIONSHIPS');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'RELATIONSHIPS')
|
||||||
|
.subscribe( data => { this.getRelationShip(); })
|
||||||
|
|
||||||
//this._MastersService.deleteMasterDetails('relationship_id',id,'RELATIONSHIPS');
|
//this._MastersService.deleteMasterDetails('relationship_id',id,'RELATIONSHIPS');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,14 +100,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -151,5 +151,5 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@ -25,6 +25,8 @@ export class StatesListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
StateList: any = [];
|
StateList: any = [];
|
||||||
|
|
||||||
|
noRecordFound: boolean = false;
|
||||||
|
|
||||||
//displayedColumns = ['states_id', 'fk_city_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions'];
|
//displayedColumns = ['states_id', 'fk_city_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions'];
|
||||||
// displayedColumns = ['state_id', 'fk_region_id','region_name', 'name', 'code', 'isactive','actions'];
|
// displayedColumns = ['state_id', 'fk_region_id','region_name', 'name', 'code', 'isactive','actions'];
|
||||||
|
|
||||||
@ -40,16 +42,8 @@ export class StatesListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _statesService: MastersService) {
|
private _statesService: MastersService) {
|
||||||
this._statesService.getAllState().subscribe(
|
this.getState();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get StatesList() {
|
// get StatesList() {
|
||||||
@ -71,6 +65,7 @@ export class StatesListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getState();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -84,27 +79,30 @@ export class StatesListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getState();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getState() {
|
getState() {
|
||||||
// this.loader = true;
|
this._statesService.getAllState().subscribe(
|
||||||
// this._statesService. getAllState().subscribe(dataresult => {
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
// this.loader = false;
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
// if (dataresult.dataStatus === true) {
|
this.dataLength = data.records.length;
|
||||||
// this.StateList = dataresult.records;
|
this.dataSource.data = this.userData;
|
||||||
// }
|
}else{
|
||||||
// })
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
// }
|
}
|
||||||
|
})}
|
||||||
|
|
||||||
deleteState(id: number) {
|
deleteState(id: number) {
|
||||||
var PrimaryKeyWithValue ={'state_id':id};
|
var PrimaryKeyWithValue ={'state_id':id};
|
||||||
this._statesService.deleteMasterDetails(PrimaryKeyWithValue,'STATE');
|
this._statesService.deleteMasterDetails(PrimaryKeyWithValue,'STATE')
|
||||||
|
.subscribe( data => { this.getState(); })
|
||||||
//this._statesService.deleteMasterDetails('state_id',id,'STATE');
|
//this._statesService.deleteMasterDetails('state_id',id,'STATE');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -90,14 +90,14 @@
|
|||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -140,6 +140,6 @@
|
|||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@ -30,6 +30,7 @@ export class SubProductListComponent implements OnInit {
|
|||||||
//subproduct_id, fk_product_id, name, abbr, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
//subproduct_id, fk_product_id, name, abbr, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
noRecordFound: boolean = false;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
@ -43,16 +44,17 @@ export class SubProductListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllSubProduct().subscribe(
|
this.getSubProductMaster();
|
||||||
data => {
|
// this._MastersService.getAllSubProduct().subscribe(
|
||||||
this.userData = data.records;
|
// data => {
|
||||||
if(data.records === ''){
|
// this.userData = data.records;
|
||||||
this.dataLength = data.records.length;
|
// if(data.records === ''){
|
||||||
}else{
|
// this.dataLength = data.records.length;
|
||||||
this.dataLength = 0}
|
// }else{
|
||||||
this.dataSource.data = this.userData;
|
// this.dataLength = 0}
|
||||||
}
|
// this.dataSource.data = this.userData;
|
||||||
)
|
// }
|
||||||
|
// )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,6 +79,7 @@ export class SubProductListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getSubProductMaster();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -90,26 +93,29 @@ export class SubProductListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getSubProductMaster();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getSubProductMaster() {
|
getSubProductMaster() {
|
||||||
// this.loader = true;
|
this._MastersService.getAllSubProduct().subscribe(
|
||||||
// this._MastersService.getAllSubProduct().subscribe(dataresult => {
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
// this.loader = false;
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
// if (dataresult.dataStatus === true) {
|
this.dataLength = data.records.length;
|
||||||
// this.SubProductMasterList = dataresult.records;
|
this.dataSource.data = this.userData;
|
||||||
// }
|
}else{
|
||||||
// })
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
// }
|
}
|
||||||
|
})}
|
||||||
|
|
||||||
deleteSubProductMaster(id: number) {
|
deleteSubProductMaster(id: number) {
|
||||||
var PrimaryKeyWithValue ={'subproduct_id':id};
|
var PrimaryKeyWithValue ={'subproduct_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'SUBPRODUCTS');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'SUBPRODUCTS')
|
||||||
|
.subscribe( data => { this.getSubProductMaster(); })
|
||||||
//this._MastersService.deleteMasterDetails('subproduct_id',id,'SUBPRODUCTS');
|
//this._MastersService.deleteMasterDetails('subproduct_id',id,'SUBPRODUCTS');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,14 +80,14 @@
|
|||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -125,6 +125,6 @@
|
|||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@ -27,6 +27,7 @@ export class TitleListComponent implements OnInit {
|
|||||||
isPopupOpened = true;
|
isPopupOpened = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
TitleList: any = [];
|
TitleList: any = [];
|
||||||
|
noRecordFound: boolean = false;
|
||||||
//displayedColumns = ['title_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
//displayedColumns = ['title_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
||||||
|
|
||||||
//title_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
//title_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
||||||
@ -43,16 +44,8 @@ export class TitleListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllMasterData('TITLES').subscribe(
|
this.getTitle();
|
||||||
data => {
|
|
||||||
this.userData = data.records;
|
|
||||||
if(data.records === ''){
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
}else{
|
|
||||||
this.dataLength = 0}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -74,6 +67,7 @@ export class TitleListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getTitle()
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -87,27 +81,31 @@ export class TitleListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getTitle()
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getTitle() {
|
getTitle() {
|
||||||
// this.loader = true;
|
this._MastersService.getAllMasterData('TITLES').subscribe(
|
||||||
// this._MastersService.getAllMasterData('TITLES').subscribe(dataresult => {
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
// this.loader = false;
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
// if (dataresult.dataStatus === true) {
|
this.dataLength = data.records.length;
|
||||||
// this.TitleList = dataresult.records;
|
this.dataSource.data = this.userData;
|
||||||
// }
|
}else{
|
||||||
// })
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
// }
|
}
|
||||||
|
})}
|
||||||
|
|
||||||
deleteTitle(id: number) {
|
deleteTitle(id: number) {
|
||||||
var PrimaryKeyWithValue ={'title_id':id};
|
var PrimaryKeyWithValue ={'title_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'TITLES');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'TITLES')
|
||||||
|
.subscribe( data => { this.getTitle(); })
|
||||||
|
|
||||||
//this._MastersService.deleteMasterDetails('title_id',id,'TITLES');
|
//this._MastersService.deleteMasterDetails('title_id',id,'TITLES');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,13 +73,14 @@
|
|||||||
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
</div>-->
|
</div>-->
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -88,16 +89,11 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="ActivityName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Activity Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="IsActive">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
||||||
@ -123,5 +119,5 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@ -28,7 +28,7 @@ export class ActivityListComponent implements OnInit {
|
|||||||
// displayedColumns = ['type_of_activity_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions'];
|
// displayedColumns = ['type_of_activity_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
noRecordFound: boolean = false;
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
displayedColumns = ['SerialNo','ActivityName','IsActive','Actions'];
|
displayedColumns = ['SerialNo','ActivityName','IsActive','Actions'];
|
||||||
@ -39,16 +39,17 @@ export class ActivityListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllMasterData('TYPEOFACTIVITY').subscribe(
|
this.getActivity();
|
||||||
data => {
|
// this._MastersService.getAllMasterData('TYPEOFACTIVITY').subscribe(
|
||||||
this.userData = data.records;
|
// data => {
|
||||||
if(data.records === ''){
|
// this.userData = data.records;
|
||||||
this.dataLength = data.records.length;
|
// if(data.records === ''){
|
||||||
}else{
|
// this.dataLength = data.records.length;
|
||||||
this.dataLength = 0}
|
// }else{
|
||||||
this.dataSource.data = this.userData;
|
// this.dataLength = 0}
|
||||||
}
|
// this.dataSource.data = this.userData;
|
||||||
)
|
// }
|
||||||
|
// )
|
||||||
}
|
}
|
||||||
|
|
||||||
// dataSource = new UserDataSource(this._MastersService);
|
// dataSource = new UserDataSource(this._MastersService);
|
||||||
@ -65,6 +66,7 @@ export class ActivityListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getActivity();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -79,28 +81,34 @@ export class ActivityListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getActivity();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
// getActivity() {
|
getActivity() {
|
||||||
// this.loader = true;
|
|
||||||
// this._MastersService.getAllMasterData('TYPEOFACTIVITY').subscribe(dataresult => {
|
|
||||||
|
|
||||||
// this.loader = false;
|
this._MastersService.getAllMasterData('TYPEOFACTIVITY').subscribe(
|
||||||
|
|
||||||
// if (dataresult.dataStatus === true) {
|
data => {
|
||||||
// this.ActivityList = dataresult.records;
|
if(data.status === 200){
|
||||||
// }
|
this.noRecordFound = false;
|
||||||
// })
|
this.userData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
// }
|
this.dataSource.data = this.userData;
|
||||||
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
deleteActivity(id: number) {
|
deleteActivity(id: number) {
|
||||||
var PrimaryKeyWithValue ={'type_of_activity_id':id};
|
var PrimaryKeyWithValue ={'type_of_activity_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'TYPEOFACTIVITY');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'TYPEOFACTIVITY')
|
||||||
|
.subscribe( data => { this.getActivity();})
|
||||||
//this._MastersService.deleteMasterDetails('type_of_activity_id',id,'TYPEOFACTIVITY').subscribe();
|
//this._MastersService.deleteMasterDetails('type_of_activity_id',id,'TYPEOFACTIVITY').subscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -75,13 +75,14 @@
|
|||||||
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
</div>-->
|
</div>-->
|
||||||
|
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="example-header">
|
<div class="example-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
@ -120,5 +121,5 @@
|
|||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]"></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@ -33,6 +33,7 @@ export class UomListComponent implements OnInit {
|
|||||||
//uom_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
//uom_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
noRecordFound: boolean = false;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
@ -44,16 +45,17 @@ export class UomListComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) {
|
private _MastersService: MastersService) {
|
||||||
this._MastersService.getAllMasterData('UOM').subscribe(
|
this.getUOM();
|
||||||
data => {
|
// this._MastersService.getAllMasterData('UOM').subscribe(
|
||||||
this.userData = data.records;
|
// data => {
|
||||||
if(data.records === ''){
|
// this.userData = data.records;
|
||||||
this.dataLength = data.records.length;
|
// if(data.records === ''){
|
||||||
}else{
|
// this.dataLength = data.records.length;
|
||||||
this.dataLength = 0}
|
// }else{
|
||||||
this.dataSource.data = this.userData;
|
// this.dataLength = 0}
|
||||||
}
|
// this.dataSource.data = this.userData;
|
||||||
)
|
// }
|
||||||
|
// )
|
||||||
}
|
}
|
||||||
|
|
||||||
// get UOMList() {
|
// get UOMList() {
|
||||||
@ -77,6 +79,7 @@ export class UomListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getUOM();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -90,6 +93,7 @@ export class UomListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getUOM();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -97,21 +101,29 @@ export class UomListComponent implements OnInit {
|
|||||||
//To get data for listing
|
//To get data for listing
|
||||||
getUOM() {
|
getUOM() {
|
||||||
// this.loader = true;
|
// this.loader = true;
|
||||||
// this._MastersService.getAllMasterData('UOM').subscribe(dataresult => {
|
this._MastersService.getAllMasterData('UOM').subscribe(
|
||||||
|
|
||||||
// this.loader = false;
|
|
||||||
|
|
||||||
// if (dataresult.dataStatus === true) {
|
|
||||||
// this.UOMList = dataresult.records;
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
|
data => {
|
||||||
|
if(data.status === 200){
|
||||||
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
deleteUOM(id: number) {
|
deleteUOM(id: number) {
|
||||||
var PrimaryKeyWithValue ={'uom_id':id};
|
var PrimaryKeyWithValue ={'uom_id':id};
|
||||||
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'UOM');
|
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'UOM')
|
||||||
|
.subscribe( data => { this.getUOM();})
|
||||||
//this._MastersService.deleteMasterDetails('uom_id',id,'UOM');
|
//this._MastersService.deleteMasterDetails('uom_id',id,'UOM');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -97,9 +97,11 @@ return this._http.post<any>(this.apiUrl+"saveMaster", ArrayData)
|
|||||||
"records":JSON.parse(JSON.stringify(dataWithPrimaryKey))
|
"records":JSON.parse(JSON.stringify(dataWithPrimaryKey))
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = this._http.post(this.apiUrl+'saveMaster',ArrayData);
|
return this._http.post(this.apiUrl+'saveMaster',ArrayData).pipe(
|
||||||
alert(data);
|
catchError(this.handleError('role', []))
|
||||||
return data;
|
);
|
||||||
|
// alert(data);
|
||||||
|
// return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user