|
@@ -20,6 +20,8 @@ export class DefinitionOfCovenantsListComponent implements OnInit {
|
|
pages= [];
|
|
pages= [];
|
|
pageId: number;
|
|
pageId: number;
|
|
Ids = [];
|
|
Ids = [];
|
|
|
|
+ categories = [];
|
|
|
|
+ type: any = 'all';
|
|
count: number;
|
|
count: number;
|
|
perPagePagenation: number;
|
|
perPagePagenation: number;
|
|
currentPage:number = 1;
|
|
currentPage:number = 1;
|
|
@@ -30,6 +32,7 @@ export class DefinitionOfCovenantsListComponent implements OnInit {
|
|
dataTableNumber: number = 5;
|
|
dataTableNumber: number = 5;
|
|
absorpationListIds = [];
|
|
absorpationListIds = [];
|
|
dataListIds = [];
|
|
dataListIds = [];
|
|
|
|
+ showItime: boolean = true;
|
|
|
|
|
|
constructor(
|
|
constructor(
|
|
private route: ActivatedRoute,
|
|
private route: ActivatedRoute,
|
|
@@ -69,7 +72,18 @@ export class DefinitionOfCovenantsListComponent implements OnInit {
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
+ this.http.get(this.authSer.pathApi + '/get_covenant_categories_list')
|
|
|
|
+ .subscribe(
|
|
|
|
+ res => {
|
|
|
|
+ console.log('gg', res);
|
|
|
|
+ this.categories = res[('covenant_categories')];
|
|
|
|
+ },
|
|
|
|
+ err =>{
|
|
|
|
+ console.log(err);
|
|
|
|
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ );
|
|
this.route.parent.params.subscribe(
|
|
this.route.parent.params.subscribe(
|
|
(params:Params) => {
|
|
(params:Params) => {
|
|
this.userLoginId = params['userID'];
|
|
this.userLoginId = params['userID'];
|
|
@@ -101,7 +115,7 @@ export class DefinitionOfCovenantsListComponent implements OnInit {
|
|
);
|
|
);
|
|
|
|
|
|
console.log('current page',this.pageId)
|
|
console.log('current page',this.pageId)
|
|
- this.dashboardSer.getListData(this.pageId, this.currentPage ,this.dataTableNumber).subscribe(
|
|
|
|
|
|
+ this.dashboardSer.getListDataNew(this.pageId, this.currentPage ,this.dataTableNumber, this.type).subscribe(
|
|
res => {
|
|
res => {
|
|
console.log(res);
|
|
console.log(res);
|
|
this.dataList = res['covenants'];
|
|
this.dataList = res['covenants'];
|
|
@@ -158,7 +172,28 @@ export class DefinitionOfCovenantsListComponent implements OnInit {
|
|
this.absorpationListIds = [];
|
|
this.absorpationListIds = [];
|
|
console.log(pagenationNumber);
|
|
console.log(pagenationNumber);
|
|
console.log(this.pageId);
|
|
console.log(this.pageId);
|
|
- this.dashboardSer.getListData(this.pageId, pagenationNumber, this.dataTableNumber).subscribe(
|
|
|
|
|
|
+ this.dashboardSer.getListDataNew(this.pageId, this.currentPage ,this.dataTableNumber, this.type).subscribe(
|
|
|
|
+ res => {
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.dataList = res['covenants'];
|
|
|
|
+ this.count = res['count'];
|
|
|
|
+ this.perPagePagenation = res['per_page'];
|
|
|
|
+ console.log('FFFFFF', this.absorpationListIds);
|
|
|
|
+ this.spinner.hide();
|
|
|
|
+ },
|
|
|
|
+ err => {
|
|
|
|
+ console.log(err);
|
|
|
|
+ this.spinner.hide();
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ getCategories(event){
|
|
|
|
+ this.showItime = true;
|
|
|
|
+ this.type = event;
|
|
|
|
+ if(event != 'all'){
|
|
|
|
+ this.showItime = false;
|
|
|
|
+ }
|
|
|
|
+ this.dashboardSer.getListDataNew(this.pageId, this.currentPage ,this.dataTableNumber, this.type).subscribe(
|
|
res => {
|
|
res => {
|
|
console.log(res);
|
|
console.log(res);
|
|
this.dataList = res['covenants'];
|
|
this.dataList = res['covenants'];
|
|
@@ -179,7 +214,7 @@ onGetValue(event) {
|
|
this.spinner.show();
|
|
this.spinner.show();
|
|
this.absorpationListIds = [];
|
|
this.absorpationListIds = [];
|
|
this.dataTableNumber = event.target.value;
|
|
this.dataTableNumber = event.target.value;
|
|
- this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
|
|
|
|
|
|
+ this.dashboardSer.getListDataNew(this.pageId, this.currentPage ,this.dataTableNumber, this.type).subscribe(
|
|
res => {
|
|
res => {
|
|
console.log(res);
|
|
console.log(res);
|
|
this.absorpationListIds = res['covenants'];
|
|
this.absorpationListIds = res['covenants'];
|
|
@@ -193,27 +228,27 @@ onGetValue(event) {
|
|
}
|
|
}
|
|
);
|
|
);
|
|
};
|
|
};
|
|
-onGetValueFiltter(event) {
|
|
|
|
- console.log(event.target.value)
|
|
|
|
- this.spinner.show();
|
|
|
|
- this.dataList = [];
|
|
|
|
- const typeId = event.target.value;
|
|
|
|
- this.filtterStatus = event.target.value;
|
|
|
|
- console.log(this.filtterStatus);
|
|
|
|
- this.http.get(this.authSer.pathApi +'/page_list/' + this.pageId + '/' + this.currentPage + '/' + this.dataTableNumber + '/' + typeId).subscribe(
|
|
|
|
- res => {
|
|
|
|
- console.log(res);
|
|
|
|
- this.dataList = res['covenants'];
|
|
|
|
- this.count = res['count'];
|
|
|
|
- this.perPagePagenation = res['per_page'];
|
|
|
|
- this.spinner.hide();
|
|
|
|
- console.log('UrL>>', this.authSer.pathApi +'/page_list/' + this.pageId + '/' + this.currentPage + '/' + this.dataTableNumber + '/' + typeId)
|
|
|
|
- },
|
|
|
|
- err=> {
|
|
|
|
- console.log(err);
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
-}
|
|
|
|
|
|
+// onGetValueFiltter(event) {
|
|
|
|
+// console.log(event.target.value)
|
|
|
|
+// this.spinner.show();
|
|
|
|
+// this.dataList = [];
|
|
|
|
+// const typeId = event.target.value;
|
|
|
|
+// this.filtterStatus = event.target.value;
|
|
|
|
+// console.log(this.filtterStatus);
|
|
|
|
+// this.http.get(this.authSer.pathApi +'/page_list/' + this.pageId + '/' + this.currentPage + '/' + this.dataTableNumber + '/' + this.type + '/' + typeId).subscribe(
|
|
|
|
+// res => {
|
|
|
|
+// console.log(res);
|
|
|
|
+// this.dataList = res['covenants'];
|
|
|
|
+// this.count = res['count'];
|
|
|
|
+// this.perPagePagenation = res['per_page'];
|
|
|
|
+// this.spinner.hide();
|
|
|
|
+// console.log('UrL>>', this.authSer.pathApi +'/page_list/' + this.pageId + '/' + this.currentPage + '/' + this.dataTableNumber + '/' + typeId)
|
|
|
|
+// },
|
|
|
|
+// err=> {
|
|
|
|
+// console.log(err);
|
|
|
|
+// }
|
|
|
|
+// );
|
|
|
|
+// }
|
|
|
|
|
|
|
|
|
|
onDelete() {
|
|
onDelete() {
|
|
@@ -245,7 +280,7 @@ onDelete() {
|
|
this.spinner.show();
|
|
this.spinner.show();
|
|
this.dataList = [];
|
|
this.dataList = [];
|
|
//get list data
|
|
//get list data
|
|
- this.dashboardSer.getListData(this.pageId, this.currentPage ,this.dataTableNumber).subscribe(
|
|
|
|
|
|
+ this.dashboardSer.getListDataNew(this.pageId, this.currentPage ,this.dataTableNumber, this.type).subscribe(
|
|
(responce) => {
|
|
(responce) => {
|
|
console.log(responce);
|
|
console.log(responce);
|
|
this.dataList = responce['covenants'];
|
|
this.dataList = responce['covenants'];
|