diff --git a/ng6-seed/src/app/_guard/token.interceptor.ts b/ng6-seed/src/app/_guard/token.interceptor.ts
index 155834488..48ff7d06e 100644
--- a/ng6-seed/src/app/_guard/token.interceptor.ts
+++ b/ng6-seed/src/app/_guard/token.interceptor.ts
@@ -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);
}
diff --git a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html
index b33b0042b..4696b3961 100644
--- a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html
@@ -1,63 +1,68 @@
-
- + Add Branch
-
-
-
-
-
+
+ + Add Branch
+
+
+
+
+
-
-
-
-
-
-
-
- Sl
- {{i+1}}
-
-
- Branch Name
- {{row.name}}
-
-
-
- City Name
- {{row.cityname}}
-
-
-
- Is Active
-
- done
- clear
-
-
+
+
-
- Actions
-
- edit
- delete_outline
-
-
-
-
-
-
-
+
-
-
-
-
+
+ Sl
+ {{i+1}}
+
+
+
+ Branch Name
+ {{row.name}}
+
+
+
+ City Name
+ {{row.cityname}}
+
+
+
+ Is Active
+
+
+ done
+
+ clear
+
+
+
+
+
+ Actions
+
+ edit
+ delete_outline
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No records found
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts
index ba05d7cde..2b16ed254 100644
--- a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts
@@ -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();
+ });
}
diff --git a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html
index 353f13c92..f446e5fdd 100644
--- a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html
@@ -7,7 +7,7 @@
-
+
-
+
@@ -94,7 +94,7 @@
State Name
- {{row.cityname}}
+ {{row.state_name}}
@@ -121,5 +121,5 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts
index 37d834b9e..79e3f3907 100644
--- a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts
@@ -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();
+ });
}
}
diff --git a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html
index ed3bb97ee..5dcb4fd57 100644
--- a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html
@@ -61,13 +61,13 @@
-->
- -->
-
+
-
+
@@ -110,12 +110,12 @@
- Name
+ Company Name
{{row.name}}
- State Name
+ City Name
{{row.city_name}}
@@ -137,6 +137,6 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.ts b/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.ts
index 911cea78a..6f8b472e2 100644
--- a/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.ts
@@ -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');
}
}
diff --git a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html
index 49d7cffd2..e07f78e7d 100644
--- a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html
@@ -60,13 +60,14 @@
-->
+
-
+
@@ -76,7 +77,7 @@
- City Name
+ Description
{{row.description}}
@@ -103,7 +104,7 @@
-
+
No records found
diff --git a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts
index 00b6e960c..d21b4f0a4 100644
--- a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts
@@ -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');
}
}
diff --git a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html
index 1ecf4b1bc..659b4ce52 100644
--- a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html
@@ -65,14 +65,14 @@
-->
-
+
+
-
-
+
@@ -81,8 +81,8 @@
{{i+1}}
-
- CustomerSegmentName
+
+ Customer Segment
{{row.name}}
@@ -109,7 +109,7 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts
index e32570661..7e5e72dfd 100644
--- a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts
@@ -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');
}
}
diff --git a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html
index 0233d611b..329337713 100644
--- a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html
@@ -65,14 +65,14 @@
-->
-
+
-
+
@@ -80,16 +80,11 @@
Sl
{{i+1}}
-
-
- City Name
+
+
+ Designation Name
{{row.name}}
-
-
- State Name
- {{row.cityname}}
-
Is Active
@@ -115,6 +110,6 @@
-
+
No records found
diff --git a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.ts b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.ts
index 9599ae221..8ad329e41 100644
--- a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.ts
@@ -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
{
diff --git a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html
index 2d1146b84..f342ffa3a 100644
--- a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html
@@ -74,14 +74,14 @@
-->
-
+
-
+
@@ -91,7 +91,7 @@
- City Name
+ Frequency Name
{{row.name}}
@@ -118,7 +118,7 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts
index e28b61337..7260680fd 100644
--- a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts
@@ -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');
diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html
index 834afb6c7..169a46965 100644
--- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html
@@ -75,14 +75,14 @@
-->
-
+
-
+
@@ -120,5 +120,5 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.ts b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.ts
index 3e1e845e3..ab8380bfa 100644
--- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.ts
@@ -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');
}
diff --git a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html
index 3d7c013e3..d761a8e46 100644
--- a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html
@@ -59,14 +59,14 @@
-->
-
+
+
-
-
+
@@ -75,9 +75,9 @@
{{i+1}}
-
- City Name
- {{row.name}}
+
+ Lender Hierarchy
+ {{row.lender_hierarchy}}
@@ -109,6 +109,6 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts
index 682819e6f..605dc75eb 100644
--- a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts
@@ -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');
}
}
diff --git a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html
index 0d48cfdb4..791db4771 100644
--- a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html
@@ -3,9 +3,9 @@
+ Add Member's Occupation
-
+
-
+
-
+
@@ -125,7 +125,7 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts
index fb4dec5c7..e3aef1446 100644
--- a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts
@@ -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');
}
}
diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.html b/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.html
index 3fdf3d85b..e3127317a 100644
--- a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.html
@@ -1,6 +1,6 @@
- + Add PDAllocationType
+
@@ -56,14 +56,14 @@
-
-->
+ -->
-
+
@@ -72,16 +72,16 @@
{{i+1}}
-
- City Name
- {{row.name}}
+
+ PD Allocation Type
+ {{row.pd_allocation_type_name}}
-
- State Name
- {{row.cityname}}
+
+ PD Allocation Logic
+ {{row.pd_allocation_logic}}
-
+
Is Active
@@ -90,13 +90,13 @@
-
+
@@ -105,7 +105,7 @@
-
+
No records found
diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.ts
index 77577b76b..787343196 100644
--- a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.ts
@@ -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');
}
}
diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.html b/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.html
index df1a85eb6..1a7bdaf0c 100644
--- a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.html
@@ -62,14 +62,14 @@
-->
-
+
-
+
@@ -78,16 +78,11 @@
{{i+1}}
-
- City Name
- {{row.name}}
+
+ PD Location
+ {{row.description}}
-
-
- State Name
- {{row.cityname}}
-
-
+
Is Active
@@ -113,5 +108,5 @@
-
+ No records found
diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.ts
index 18473f74b..a9dc4b62f 100644
--- a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.ts
@@ -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
diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.html b/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.html
index 6693e88f7..8b6e89b9d 100644
--- a/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.html
@@ -59,13 +59,14 @@
-->
+
+
-
@@ -74,14 +75,9 @@
{{i+1}}
-
- City Name
- {{row.name}}
-
-
-
- State Name
- {{row.cityname}}
+
+ PD Type
+ {{row.type_name}}
@@ -108,5 +104,5 @@
-
+
No records found
diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.ts
index cf13990c6..a798945ea 100644
--- a/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.ts
@@ -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');
}
}
diff --git a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html
index 24d4ff9a1..610012f96 100644
--- a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html
@@ -3,14 +3,14 @@
+ Add Product
-
+
-
+
@@ -52,6 +52,7 @@
+
No records found
-
+
-
+
@@ -108,5 +108,5 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts
index 86d6def7a..4c953df9b 100644
--- a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts
@@ -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');
}
}
diff --git a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html
index e4a980213..7ae3c559f 100644
--- a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html
@@ -80,14 +80,14 @@
-->
-
+
-
+
@@ -126,6 +126,6 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts
index e47d54536..2fcfe080d 100644
--- a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts
@@ -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');
}
}
diff --git a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html
index 197aa05b0..71b9a805b 100644
--- a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html
@@ -100,14 +100,14 @@
-->
-
+
-
+
@@ -151,5 +151,5 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts
index 2e742297b..1c5d2b438 100644
--- a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts
@@ -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');
}
diff --git a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html
index a616e4cc0..0f52d168d 100644
--- a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html
@@ -90,14 +90,14 @@
-->
-
+
-
+
@@ -140,6 +140,6 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts
index 9406e186e..63ceb94dd 100644
--- a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts
@@ -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');
}
}
diff --git a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html
index 8aa5be15b..d669c62da 100644
--- a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html
@@ -80,14 +80,14 @@
-->
-
+
-
+
@@ -125,6 +125,6 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts
index 5873b5cfd..882814fc9 100644
--- a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts
@@ -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');
}
}
diff --git a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html
index d79789888..10c6412e6 100644
--- a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html
@@ -73,13 +73,14 @@
-->
+
-
+
@@ -88,16 +89,11 @@
{{i+1}}
-
- City Name
+
+ Activity Name
{{row.name}}
-
-
- State Name
- {{row.cityname}}
-
-
+
Is Active
@@ -123,5 +119,5 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts
index aa0046f2b..ac25472aa 100644
--- a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts
@@ -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();
}
diff --git a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html
index acc15bbdd..b3b31c949 100644
--- a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html
@@ -75,13 +75,14 @@
-->
+
-
+
@@ -120,5 +121,5 @@
-
+
No records found
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts
index 64016ac25..730fd382a 100644
--- a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts
@@ -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');
}
}
diff --git a/ng6-seed/src/app/settings/service/masters/masters.service.ts b/ng6-seed/src/app/settings/service/masters/masters.service.ts
index 457fac286..40b26a20e 100644
--- a/ng6-seed/src/app/settings/service/masters/masters.service.ts
+++ b/ng6-seed/src/app/settings/service/masters/masters.service.ts
@@ -97,9 +97,11 @@ return this._http.post
(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;
}
/**