|
@@ -133,7 +133,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getsalepersonlist").subscribe(response => {
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getsalepersonlist").subscribe(response => {
|
|
|
- if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
this.router.navigate(['/login'])
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -166,7 +166,7 @@ export class HomeComponent implements OnInit {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getselectionData").subscribe(response => {
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getselectionData").subscribe(response => {
|
|
|
- if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
this.router.navigate(['/login'])
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -284,7 +284,7 @@ export class HomeComponent implements OnInit {
|
|
|
console.log("dvrlist", this.dvrList);
|
|
console.log("dvrlist", this.dvrList);
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id).subscribe(response => {
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id).subscribe(response => {
|
|
|
|
|
|
|
|
- if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
this.router.navigate(['/login'])
|
|
|
|
|
|
|
|
|
|
|
|
@@ -394,7 +394,7 @@ export class HomeComponent implements OnInit {
|
|
|
if (this.sale_person != undefined && this.customer == undefined && this.startDate == "" && this.endDate == "" && this.sale_person != 'undefined') {
|
|
if (this.sale_person != undefined && this.customer == undefined && this.startDate == "" && this.endDate == "" && this.sale_person != 'undefined') {
|
|
|
console.log("only sales person");
|
|
console.log("only sales person");
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=undefineddate&login_id=" + this.user_id + "&salePerson=" + this.sale_person).subscribe(response => {
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=undefineddate&login_id=" + this.user_id + "&salePerson=" + this.sale_person).subscribe(response => {
|
|
|
- if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
} else {
|
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
@@ -437,7 +437,7 @@ export class HomeComponent implements OnInit {
|
|
|
else if (this.sale_person == undefined && this.customer != undefined && this.endDate == "" && this.startDate == "" && this.sale_person != 'undefined' && this.customer != 'undefined') {
|
|
else if (this.sale_person == undefined && this.customer != undefined && this.endDate == "" && this.startDate == "" && this.sale_person != 'undefined' && this.customer != 'undefined') {
|
|
|
console.log("only customer")
|
|
console.log("only customer")
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=undefineddate&login_id=" + this.user_id + "&customer=" + this.customer.customer_name + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=undefineddate&login_id=" + this.user_id + "&customer=" + this.customer.customer_name + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
|
- if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
} else {
|
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
@@ -479,7 +479,7 @@ export class HomeComponent implements OnInit {
|
|
|
} else if (this.sale_person != undefined && this.customer != undefined && this.endDate == "" && this.startDate == "" && this.sale_person != 'undefined') {
|
|
} else if (this.sale_person != undefined && this.customer != undefined && this.endDate == "" && this.startDate == "" && this.sale_person != 'undefined') {
|
|
|
console.log("for sales person and customer");
|
|
console.log("for sales person and customer");
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=undefineddate&login_id=" + this.user_id + "&customer=" + this.customer.customer_name + "&salePerson=" + this.sale_person + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=undefineddate&login_id=" + this.user_id + "&customer=" + this.customer.customer_name + "&salePerson=" + this.sale_person + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
|
- if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
} else {
|
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
@@ -520,7 +520,7 @@ export class HomeComponent implements OnInit {
|
|
|
} else if (this.sale_person != undefined && this.customer == undefined && this.startDate != "" && this.endDate != "" && this.sale_person != 'undefined') {
|
|
} else if (this.sale_person != undefined && this.customer == undefined && this.startDate != "" && this.endDate != "" && this.sale_person != 'undefined') {
|
|
|
console.log("for date and sales_person")
|
|
console.log("for date and sales_person")
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id + "&salePerson=" + this.sale_person).subscribe(response => {
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id + "&salePerson=" + this.sale_person).subscribe(response => {
|
|
|
- if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
|
@@ -565,7 +565,7 @@ export class HomeComponent implements OnInit {
|
|
|
} else if (this.sale_person == undefined && this.customer != undefined && this.endDate != "" && this.startDate != "" && this.sale_person != 'undefined' && this.customer != 'undefined') {
|
|
} else if (this.sale_person == undefined && this.customer != undefined && this.endDate != "" && this.startDate != "" && this.sale_person != 'undefined' && this.customer != 'undefined') {
|
|
|
console.log("for date and customer");
|
|
console.log("for date and customer");
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id + "&customer=" + this.customer.customer_name + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id + "&customer=" + this.customer.customer_name + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
|
- if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
|
@@ -610,7 +610,7 @@ export class HomeComponent implements OnInit {
|
|
|
} else if (this.sale_person != undefined && this.customer != undefined && this.startDate != undefined && this.endDate != undefined) {
|
|
} else if (this.sale_person != undefined && this.customer != undefined && this.startDate != undefined && this.endDate != undefined) {
|
|
|
console.log("all filters date,customer and sales_person");
|
|
console.log("all filters date,customer and sales_person");
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id + "&salePerson=" + this.sale_person + "&customer=" + this.customer.customer_name + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id + "&salePerson=" + this.sale_person + "&customer=" + this.customer.customer_name + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
|
- if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
} else {
|
|
|
console.log("in searchfilterd");
|
|
console.log("in searchfilterd");
|
|
@@ -667,7 +667,7 @@ export class HomeComponent implements OnInit {
|
|
|
} else {
|
|
} else {
|
|
|
console.log("valid date");
|
|
console.log("valid date");
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id).subscribe(response => {
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id).subscribe(response => {
|
|
|
- if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
} else {
|
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
@@ -706,7 +706,7 @@ export class HomeComponent implements OnInit {
|
|
|
} else {
|
|
} else {
|
|
|
console.log("invalid date");
|
|
console.log("invalid date");
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?login_id=" + this.user_id).subscribe(response => {
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?login_id=" + this.user_id).subscribe(response => {
|
|
|
- if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
} else {
|
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
@@ -758,7 +758,7 @@ export class HomeComponent implements OnInit {
|
|
|
// console.log("for sale person and date filters and customer filter");
|
|
// console.log("for sale person and date filters and customer filter");
|
|
|
|
|
|
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id + "&salePerson=" + this.sale_person + "&customer=" + this.customer.customer_name + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id + "&salePerson=" + this.sale_person + "&customer=" + this.customer.customer_name + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
|
- // if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ // if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
// this.router.navigate(['/login'])
|
|
|
// } else {
|
|
// } else {
|
|
|
|
|
|
|
@@ -798,7 +798,7 @@ export class HomeComponent implements OnInit {
|
|
|
// // for customer and sale_person
|
|
// // for customer and sale_person
|
|
|
// console.log("for sale_person and customer");
|
|
// console.log("for sale_person and customer");
|
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=undefineddate&login_id=" + this.user_id + "&customer=" + this.customer.customer_name + "&salePerson=" + this.sale_person + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=undefineddate&login_id=" + this.user_id + "&customer=" + this.customer.customer_name + "&salePerson=" + this.sale_person + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
|
- // if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ // if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
// this.router.navigate(['/login'])
|
|
|
// } else {
|
|
// } else {
|
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
@@ -833,7 +833,7 @@ export class HomeComponent implements OnInit {
|
|
|
// //for sale_person and date
|
|
// //for sale_person and date
|
|
|
// console.log("for sale_person and date filter");
|
|
// console.log("for sale_person and date filter");
|
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id + "&salePerson=" + this.sale_person).subscribe(response => {
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id + "&salePerson=" + this.sale_person).subscribe(response => {
|
|
|
- // if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ // if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
// this.router.navigate(['/login'])
|
|
|
// } else {
|
|
// } else {
|
|
|
|
|
|
|
@@ -873,7 +873,7 @@ export class HomeComponent implements OnInit {
|
|
|
// //for customer and date filter
|
|
// //for customer and date filter
|
|
|
// console.log("for customer and date filter")
|
|
// console.log("for customer and date filter")
|
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id + "&customer=" + this.customer.customer_name + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id + "&customer=" + this.customer.customer_name + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
|
- // if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ // if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
// this.router.navigate(['/login'])
|
|
|
// } else {
|
|
// } else {
|
|
|
|
|
|
|
@@ -912,7 +912,7 @@ export class HomeComponent implements OnInit {
|
|
|
// // only for sale_person
|
|
// // only for sale_person
|
|
|
// console.log("only for sale_person")
|
|
// console.log("only for sale_person")
|
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=undefineddate&login_id=" + this.user_id + "&salePerson=" + this.sale_person).subscribe(response => {
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=undefineddate&login_id=" + this.user_id + "&salePerson=" + this.sale_person).subscribe(response => {
|
|
|
- // if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ // if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
// this.router.navigate(['/login'])
|
|
|
// } else {
|
|
// } else {
|
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
@@ -946,7 +946,7 @@ export class HomeComponent implements OnInit {
|
|
|
// //for customer filter
|
|
// //for customer filter
|
|
|
// console.log("only for customer filter")
|
|
// console.log("only for customer filter")
|
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=undefineddate&login_id=" + this.user_id + "&customer=" + this.customer.customer_name + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=undefineddate&login_id=" + this.user_id + "&customer=" + this.customer.customer_name + "&customerid=" + this.customer.customer_id).subscribe(response => {
|
|
|
- // if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ // if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
// this.router.navigate(['/login'])
|
|
|
// } else {
|
|
// } else {
|
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
@@ -987,7 +987,7 @@ export class HomeComponent implements OnInit {
|
|
|
// if (result != undefined && result1 != undefined) {
|
|
// if (result != undefined && result1 != undefined) {
|
|
|
// console.log("valid date")
|
|
// console.log("valid date")
|
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id).subscribe(response => {
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?searchfiltertype=" + searchfilter + "&login_id=" + this.user_id).subscribe(response => {
|
|
|
- // if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ // if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
// this.router.navigate(['/login'])
|
|
|
// } else {
|
|
// } else {
|
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
@@ -1018,7 +1018,7 @@ export class HomeComponent implements OnInit {
|
|
|
// } else {
|
|
// } else {
|
|
|
// console.log("invalid date");
|
|
// console.log("invalid date");
|
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?login_id=" + this.user_id).subscribe(response => {
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?login_id=" + this.user_id).subscribe(response => {
|
|
|
- // if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ // if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
// this.router.navigate(['/login'])
|
|
|
// } else {
|
|
// } else {
|
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
@@ -1126,7 +1126,7 @@ export class HomeComponent implements OnInit {
|
|
|
console.log(sale_person)
|
|
console.log(sale_person)
|
|
|
if (sale_person) {
|
|
if (sale_person) {
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/mappingCustomerDetails?sale_person=" + sale_person).subscribe(response => {
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/mappingCustomerDetails?sale_person=" + sale_person).subscribe(response => {
|
|
|
- if (response.status == 'falsetoken') {
|
|
|
|
|
|
|
+ if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
} else {
|
|
|
console.log("sale_person------------>",response);
|
|
console.log("sale_person------------>",response);
|