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