|
|
@@ -55,7 +55,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
|
constructor(private commonservice: CommonFunctionService, private router: Router) {
|
|
|
|
|
|
- console.log("in home");
|
|
|
+ // console.log("in home");
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -80,7 +80,7 @@ export class HomeComponent implements OnInit {
|
|
|
// document.getElementById("startDate").setAttribute("max", this.current_date);
|
|
|
// document.getElementById("endDate").setAttribute("max", this.current_date);
|
|
|
|
|
|
- //console.log("auth =====>",this.auth.isAuthenticated());
|
|
|
+ //// console.log("auth =====>",this.auth.isAuthenticated());
|
|
|
// if(this.auth.isAuthenticated){
|
|
|
|
|
|
// }
|
|
|
@@ -139,8 +139,8 @@ export class HomeComponent implements OnInit {
|
|
|
}
|
|
|
else {
|
|
|
|
|
|
- console.log("response of sale person list", response);
|
|
|
- console.log("response========================>", response.data[0]);
|
|
|
+ // console.log("response of sale person list", response);
|
|
|
+ // console.log("response========================>", response.data[0]);
|
|
|
|
|
|
this.salePersonlist.push(response.data[0].salePerson);
|
|
|
// this.datalist.push(this.salePersonlist[0]);
|
|
|
@@ -148,8 +148,8 @@ export class HomeComponent implements OnInit {
|
|
|
this.datalist.push(this.salePersonlist[i])
|
|
|
}
|
|
|
|
|
|
- console.log("salePersonlist---------->", this.salePersonlist)
|
|
|
- console.log("this.salePersonlist", this.datalist);
|
|
|
+ // console.log("salePersonlist---------->", this.salePersonlist)
|
|
|
+ // console.log("this.salePersonlist", this.datalist);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -158,10 +158,10 @@ export class HomeComponent implements OnInit {
|
|
|
this.last_login_date = this.logindata[0]["last_loginDate"];
|
|
|
this.user_id = this.logindata[0]["user_id"];
|
|
|
this.role_check = this.logindata[0]["role"]
|
|
|
- console.log(" this.logindata", this.logindata);
|
|
|
- console.log("role_check=====>", this.role_check);
|
|
|
+ // console.log(" this.logindata", this.logindata);
|
|
|
+ // console.log("role_check=====>", this.role_check);
|
|
|
if (this.role_check == 'admin') {
|
|
|
- console.log("admin use dashboard")
|
|
|
+ // console.log("admin use dashboard")
|
|
|
this.check_role = true
|
|
|
}
|
|
|
|
|
|
@@ -187,29 +187,29 @@ export class HomeComponent implements OnInit {
|
|
|
])
|
|
|
).values()
|
|
|
);
|
|
|
- console.log(this.cust_data);
|
|
|
+ // console.log(this.cust_data);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?login_id=" + this.user_id).subscribe(response => {
|
|
|
|
|
|
|
|
|
- // console.log("status",response.status)
|
|
|
+ // // console.log("status",response.status)
|
|
|
if (response.status == 'tokenfalse') {
|
|
|
- console.log("uuuuuuuuuuuuuuuuu")
|
|
|
+ // console.log("uuuuuuuuuuuuuuuuu")
|
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
|
- console.log("uuuuuuuuuuuuu");
|
|
|
- console.log("respose", response);
|
|
|
- // console.log("uuuuuuuuuuu",response.data[0]);
|
|
|
- console.log("uuuuuuuuuuu", response.data[0].getdvrDataStatus);
|
|
|
+ // console.log("uuuuuuuuuuuuu");
|
|
|
+ // console.log("respose", response);
|
|
|
+ // // console.log("uuuuuuuuuuu",response.data[0]);
|
|
|
+ // console.log("uuuuuuuuuuu", response.data[0].getdvrDataStatus);
|
|
|
|
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
|
|
|
|
- // console.log("iiiiiiiiiiiiiiiii",response);
|
|
|
+ // // console.log("iiiiiiiiiiiiiiiii",response);
|
|
|
|
|
|
this.countData = response.data[0]["countdata"];
|
|
|
- // console.log("this.countData",this.countData);
|
|
|
+ // // console.log("this.countData",this.countData);
|
|
|
this.dvrList = response.data[0]["dvrlist"];
|
|
|
this.conformlist = this.dvrList;
|
|
|
this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
@@ -217,7 +217,7 @@ export class HomeComponent implements OnInit {
|
|
|
this.incom_entry = this.countData[0].no_of_incompleted;
|
|
|
this.no_contact = this.countData[0].no_of_contact;
|
|
|
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
|
|
|
} else {
|
|
|
@@ -279,9 +279,9 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
|
this.dvrList = [];
|
|
|
|
|
|
- console.log("searchfilter", searchfilter);
|
|
|
+ // console.log("searchfilter", searchfilter);
|
|
|
|
|
|
- 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 => {
|
|
|
|
|
|
if (response.status == 'tokenfalse') {
|
|
|
@@ -295,14 +295,14 @@ export class HomeComponent implements OnInit {
|
|
|
// this.countData = response["countdata"];
|
|
|
// this.dvrList = response["dvrlist"];
|
|
|
|
|
|
- // console.log(" this.dvrList", this.dvrList);
|
|
|
+ // // console.log(" this.dvrList", this.dvrList);
|
|
|
// this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
// this.com_entry = this.countData[0].no_of_completed;
|
|
|
// this.incom_entry = this.countData[0].no_of_incompleted;
|
|
|
// this.no_contact = this.countData[0].no_of_contact;
|
|
|
|
|
|
this.countData = response.data[0]["countdata"];
|
|
|
- // console.log("this.countData",this.countData);
|
|
|
+ // // console.log("this.countData",this.countData);
|
|
|
this.dvrList = response.data[0]["dvrlist"];
|
|
|
|
|
|
this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
@@ -332,53 +332,53 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
|
onSearch() {
|
|
|
|
|
|
- console.log("00000000000", this.sale_person);
|
|
|
+ // console.log("00000000000", this.sale_person);
|
|
|
|
|
|
// if(this.customer == undefined){
|
|
|
- // console.log("first one")
|
|
|
+ // // console.log("first one")
|
|
|
|
|
|
// }else if(this.customer == 'undefined'){
|
|
|
- // console.log("second one")
|
|
|
+ // // console.log("second one")
|
|
|
|
|
|
// }else{
|
|
|
- // console.log("third one");
|
|
|
+ // // console.log("third one");
|
|
|
// }
|
|
|
|
|
|
- console.log("customer", this.customer);
|
|
|
- console.log("start date,", this.startDate);
|
|
|
- console.log("start date,", this.endDate);
|
|
|
+ // console.log("customer", this.customer);
|
|
|
+ // console.log("start date,", this.startDate);
|
|
|
+ // console.log("start date,", this.endDate);
|
|
|
|
|
|
- // console.log("customer name",this.customer.customer_name);
|
|
|
+ // // console.log("customer name",this.customer.customer_name);
|
|
|
|
|
|
var searchfilter, result, result1;
|
|
|
|
|
|
this.dvrList = [];
|
|
|
if (this.startDate != undefined) {
|
|
|
result = this.startDate.replace("-", "/");
|
|
|
- console.log("result", result);
|
|
|
+ // console.log("result", result);
|
|
|
result = result.replace("-", "/");
|
|
|
- console.log("result1", result);
|
|
|
+ // console.log("result1", result);
|
|
|
}
|
|
|
if (this.endDate != undefined) {
|
|
|
result1 = this.endDate.replace("-", "/");
|
|
|
- console.log("result--->", result1);
|
|
|
+ // console.log("result--->", result1);
|
|
|
result1 = result1.replace("-", "/");
|
|
|
- console.log("result1-->", result1);
|
|
|
+ // console.log("result1-->", result1);
|
|
|
}
|
|
|
|
|
|
- console.log("endDate date--->", searchfilter);
|
|
|
+ // console.log("endDate date--->", searchfilter);
|
|
|
|
|
|
if (this.endDate == "" && this.startDate != "") {
|
|
|
//need show pop-up
|
|
|
//try to enter date
|
|
|
- console.log('in date filters for 1');
|
|
|
+ // console.log('in date filters for 1');
|
|
|
this.openPopup();
|
|
|
this.status_msg = "Warning";
|
|
|
this.error_msg = "Please enter Dates correctly.";
|
|
|
this.dvrList = this.conformlist;
|
|
|
} else if (this.endDate != "" && this.startDate == "") {
|
|
|
// need to show pop-up
|
|
|
- console.log('in date filters for 2');
|
|
|
+ // console.log('in date filters for 2');
|
|
|
this.openPopup();
|
|
|
this.status_msg = "Warning";
|
|
|
this.error_msg = "Please enter Dates correctly.";
|
|
|
@@ -390,9 +390,9 @@ export class HomeComponent implements OnInit {
|
|
|
this.error_msg = "";
|
|
|
searchfilter = result + "-" + result1;
|
|
|
|
|
|
- console.log("this.sale_person", this.sale_person, "this.customer", this.customer, "searchfilter", searchfilter)
|
|
|
+ // console.log("this.sale_person", this.sale_person, "this.customer", this.customer, "searchfilter", searchfilter)
|
|
|
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 => {
|
|
|
if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
|
@@ -403,19 +403,19 @@ export class HomeComponent implements OnInit {
|
|
|
this.countData = response.data[0]["countdata"];
|
|
|
this.dvrList = response.data[0]["dvrlist"];
|
|
|
this.rerender();
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
this.com_entry = this.countData[0].no_of_completed;
|
|
|
this.incom_entry = this.countData[0].no_of_incompleted;
|
|
|
this.no_contact = this.countData[0].no_of_contact;
|
|
|
|
|
|
} else {
|
|
|
- console.log("in else part");
|
|
|
+ // console.log("in else part");
|
|
|
|
|
|
this.dvrList = [];
|
|
|
|
|
|
this.rerender();
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
@@ -435,19 +435,19 @@ 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') {
|
|
|
- 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 => {
|
|
|
if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
|
- console.log("response", response);
|
|
|
+ // console.log("response", response);
|
|
|
// this.countData = response["countdata"];
|
|
|
// this.dvrList = response["dvrlist"];
|
|
|
this.countData = response.data[0]["countdata"];
|
|
|
this.dvrList = response.data[0]["dvrlist"];
|
|
|
this.rerender();
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
this.com_entry = this.countData[0].no_of_completed;
|
|
|
this.incom_entry = this.countData[0].no_of_incompleted;
|
|
|
@@ -458,7 +458,7 @@ export class HomeComponent implements OnInit {
|
|
|
this.dvrList = [];
|
|
|
|
|
|
this.rerender();
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
@@ -477,7 +477,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
|
});
|
|
|
} 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 => {
|
|
|
if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
|
@@ -488,7 +488,7 @@ export class HomeComponent implements OnInit {
|
|
|
this.countData = response.data[0]["countdata"];
|
|
|
this.dvrList = response.data[0]["dvrlist"];
|
|
|
this.rerender();
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
this.com_entry = this.countData[0].no_of_completed;
|
|
|
this.incom_entry = this.countData[0].no_of_incompleted;
|
|
|
@@ -514,19 +514,19 @@ export class HomeComponent implements OnInit {
|
|
|
this.onClear()
|
|
|
|
|
|
} else if (this.customer == 'undefined' && this.sale_person == undefined) {
|
|
|
- console.log("in else condition for customer");
|
|
|
+ // console.log("in else condition for customer");
|
|
|
this.onClear()
|
|
|
|
|
|
} 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 => {
|
|
|
if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
|
|
|
|
- console.log("in searchfilterd");
|
|
|
+ // console.log("in searchfilterd");
|
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
|
|
|
this.countData = response.data[0]["countdata"];
|
|
|
@@ -544,7 +544,7 @@ export class HomeComponent implements OnInit {
|
|
|
this.dvrList = [];
|
|
|
|
|
|
this.rerender();
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
@@ -563,15 +563,15 @@ 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') {
|
|
|
- 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 => {
|
|
|
if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
|
|
|
|
- console.log("in searchfilterd");
|
|
|
+ // console.log("in searchfilterd");
|
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
|
|
|
this.countData = response.data[0]["countdata"];
|
|
|
@@ -589,7 +589,7 @@ export class HomeComponent implements OnInit {
|
|
|
this.dvrList = [];
|
|
|
|
|
|
this.rerender();
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
@@ -608,14 +608,14 @@ export class HomeComponent implements OnInit {
|
|
|
});
|
|
|
|
|
|
} 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 => {
|
|
|
if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
|
- console.log("in searchfilterd");
|
|
|
+ // console.log("in searchfilterd");
|
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
this.countData = response.data[0]["countdata"];
|
|
|
|
|
|
@@ -632,7 +632,7 @@ export class HomeComponent implements OnInit {
|
|
|
this.dvrList = [];
|
|
|
|
|
|
this.rerender();
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
@@ -652,7 +652,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
- console.log("only date");
|
|
|
+ // console.log("only date");
|
|
|
if (this.startDate != "" && this.endDate != "") {
|
|
|
var strtDt = new Date(this.startDate);
|
|
|
var endDt = new Date(this.endDate);
|
|
|
@@ -665,7 +665,7 @@ export class HomeComponent implements OnInit {
|
|
|
this.error_msg = "Please enter Dates correctly ,End date need to be bigger then start date.";
|
|
|
this.dvrList = this.conformlist;
|
|
|
} 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 => {
|
|
|
if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
|
@@ -674,7 +674,7 @@ export class HomeComponent implements OnInit {
|
|
|
this.countData = response.data[0]["countdata"];
|
|
|
this.dvrList = response.data[0]["dvrlist"];
|
|
|
this.rerender();
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
this.com_entry = this.countData[0].no_of_completed;
|
|
|
this.incom_entry = this.countData[0].no_of_incompleted;
|
|
|
@@ -685,7 +685,7 @@ export class HomeComponent implements OnInit {
|
|
|
this.dvrList = [];
|
|
|
|
|
|
this.rerender();
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
@@ -704,7 +704,7 @@ export class HomeComponent implements OnInit {
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
- console.log("invalid date");
|
|
|
+ // console.log("invalid date");
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?login_id=" + this.user_id).subscribe(response => {
|
|
|
if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
|
@@ -713,7 +713,7 @@ export class HomeComponent implements OnInit {
|
|
|
this.countData = response.data[0]["countdata"];
|
|
|
this.dvrList = response.data[0]["dvrlist"];
|
|
|
this.rerender();
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
this.com_entry = this.countData[0].no_of_completed;
|
|
|
this.incom_entry = this.countData[0].no_of_incompleted;
|
|
|
@@ -724,7 +724,7 @@ export class HomeComponent implements OnInit {
|
|
|
this.dvrList = [];
|
|
|
|
|
|
this.rerender();
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
@@ -753,18 +753,18 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
|
|
|
|
// if (this.sale_person != undefined && searchfilter != undefined && this.startDate != undefined && this.endDate != undefined && this.customer != undefined) {
|
|
|
- // console.log("in all filters");
|
|
|
+ // // console.log("in all filters");
|
|
|
|
|
|
- // 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 => {
|
|
|
// if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
|
// } else {
|
|
|
|
|
|
- // console.log("in searchfilterd");
|
|
|
+ // // console.log("in searchfilterd");
|
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
|
- // console.log(" this.dvrList", this.dvrList);
|
|
|
+ // // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
|
|
|
// this.countData = response.data[0]["countdata"];
|
|
|
@@ -796,7 +796,7 @@ export class HomeComponent implements OnInit {
|
|
|
// // for three search filters
|
|
|
// } else if (this.sale_person != 'undefined' && this.sale_person !=undefined && this.customer != undefined) {
|
|
|
// // 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 => {
|
|
|
// if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
|
@@ -807,7 +807,7 @@ export class HomeComponent implements OnInit {
|
|
|
// this.countData = response.data[0]["countdata"];
|
|
|
// this.dvrList = response.data[0]["dvrlist"];
|
|
|
// this.rerender();
|
|
|
- // console.log(" this.dvrList", this.dvrList);
|
|
|
+ // // console.log(" this.dvrList", this.dvrList);
|
|
|
// this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
// this.com_entry = this.countData[0].no_of_completed;
|
|
|
// this.incom_entry = this.countData[0].no_of_incompleted;
|
|
|
@@ -831,15 +831,15 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
|
// }else if(this.sale_person != 'undefined' && this.sale_person != undefined && this.startDate != undefined && this.endDate != undefined){
|
|
|
// //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 => {
|
|
|
// if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
|
// } else {
|
|
|
|
|
|
- // console.log("in searchfilterd");
|
|
|
+ // // console.log("in searchfilterd");
|
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
|
- // console.log(" this.dvrList", this.dvrList);
|
|
|
+ // // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
|
|
|
// this.countData = response.data[0]["countdata"];
|
|
|
@@ -871,15 +871,15 @@ export class HomeComponent implements OnInit {
|
|
|
// }
|
|
|
// else if (this.customer != undefined && this.sale_person ==undefined && searchfilter != undefined && this.startDate != undefined && this.endDate != undefined) {
|
|
|
// //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 => {
|
|
|
// if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
|
// } else {
|
|
|
|
|
|
- // console.log("in searchfilterd");
|
|
|
+ // // console.log("in searchfilterd");
|
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
|
- // console.log(" this.dvrList", this.dvrList);
|
|
|
+ // // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
|
|
|
// this.countData = response.data[0]["countdata"];
|
|
|
@@ -910,7 +910,7 @@ export class HomeComponent implements OnInit {
|
|
|
// }
|
|
|
// else if (this.sale_person != undefined && this.sale_person != 'undefined') {
|
|
|
// // 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 => {
|
|
|
// if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
|
@@ -921,7 +921,7 @@ export class HomeComponent implements OnInit {
|
|
|
// this.countData = response.data[0]["countdata"];
|
|
|
// this.dvrList = response.data[0]["dvrlist"];
|
|
|
// this.rerender();
|
|
|
- // console.log(" this.dvrList", this.dvrList);
|
|
|
+ // // console.log(" this.dvrList", this.dvrList);
|
|
|
// this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
// this.com_entry = this.countData[0].no_of_completed;
|
|
|
// this.incom_entry = this.countData[0].no_of_incompleted;
|
|
|
@@ -944,26 +944,26 @@ export class HomeComponent implements OnInit {
|
|
|
// });
|
|
|
// } else if (this.customer != undefined) {
|
|
|
// //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 => {
|
|
|
// if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
|
// } else {
|
|
|
// if (response.data[0].getdvrDataStatus == '0') {
|
|
|
- // console.log("response",response);
|
|
|
+ // // console.log("response",response);
|
|
|
// // this.countData = response["countdata"];
|
|
|
// // this.dvrList = response["dvrlist"];
|
|
|
// this.countData = response.data[0]["countdata"];
|
|
|
// this.dvrList = response.data[0]["dvrlist"];
|
|
|
// this.rerender();
|
|
|
- // console.log(" this.dvrList", this.dvrList);
|
|
|
+ // // console.log(" this.dvrList", this.dvrList);
|
|
|
// this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
// this.com_entry = this.countData[0].no_of_completed;
|
|
|
// this.incom_entry = this.countData[0].no_of_incompleted;
|
|
|
// this.no_contact = this.countData[0].no_of_contact;
|
|
|
|
|
|
// } else {
|
|
|
- // console.log("in else part")
|
|
|
+ // // console.log("in else part")
|
|
|
// $(document).ready(function () {
|
|
|
// $('.odd').show();
|
|
|
|
|
|
@@ -983,9 +983,9 @@ export class HomeComponent implements OnInit {
|
|
|
// }
|
|
|
// else {
|
|
|
// //only for date filters
|
|
|
- // console.log("in no filters");
|
|
|
+ // // console.log("in no filters");
|
|
|
// 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 => {
|
|
|
// if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
|
@@ -994,7 +994,7 @@ export class HomeComponent implements OnInit {
|
|
|
// this.countData = response.data[0]["countdata"];
|
|
|
// this.dvrList = response.data[0]["dvrlist"];
|
|
|
// this.rerender();
|
|
|
- // console.log(" this.dvrList", this.dvrList);
|
|
|
+ // // console.log(" this.dvrList", this.dvrList);
|
|
|
// this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
// this.com_entry = this.countData[0].no_of_completed;
|
|
|
// this.incom_entry = this.countData[0].no_of_incompleted;
|
|
|
@@ -1016,7 +1016,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
|
// });
|
|
|
// } else {
|
|
|
- // console.log("invalid date");
|
|
|
+ // // console.log("invalid date");
|
|
|
// this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?login_id=" + this.user_id).subscribe(response => {
|
|
|
// if (response.status == 'tokenfalse') {
|
|
|
// this.router.navigate(['/login'])
|
|
|
@@ -1025,7 +1025,7 @@ export class HomeComponent implements OnInit {
|
|
|
// this.countData = response.data[0]["countdata"];
|
|
|
// this.dvrList = response.data[0]["dvrlist"];
|
|
|
// this.rerender();
|
|
|
- // console.log(" this.dvrList", this.dvrList);
|
|
|
+ // // console.log(" this.dvrList", this.dvrList);
|
|
|
// this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
// this.com_entry = this.countData[0].no_of_completed;
|
|
|
// this.incom_entry = this.countData[0].no_of_incompleted;
|
|
|
@@ -1076,23 +1076,23 @@ export class HomeComponent implements OnInit {
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/getdashboarddetails?login_id=" + this.user_id).subscribe(response => {
|
|
|
|
|
|
|
|
|
- // console.log("status",response.status)
|
|
|
+ // // console.log("status",response.status)
|
|
|
if (response.status == 'tokenfalse') {
|
|
|
- console.log("uuuuuuuuuuuuuuuuu")
|
|
|
+ // console.log("uuuuuuuuuuuuuuuuu")
|
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
|
- console.log("uuuuuuuuuuuuu");
|
|
|
- console.log("respose", response);
|
|
|
- // console.log("uuuuuuuuuuu",response.data[0]);
|
|
|
- console.log("uuuuuuuuuuu", response.data[0].getdvrDataStatus);
|
|
|
+ // console.log("uuuuuuuuuuuuu");
|
|
|
+ // console.log("respose", response);
|
|
|
+ // // console.log("uuuuuuuuuuu",response.data[0]);
|
|
|
+ // console.log("uuuuuuuuuuu", response.data[0].getdvrDataStatus);
|
|
|
|
|
|
if (response.data[0].getdvrDataStatus == '0') {
|
|
|
|
|
|
- // console.log("iiiiiiiiiiiiiiiii",response);
|
|
|
+ // // console.log("iiiiiiiiiiiiiiiii",response);
|
|
|
this.rerender();
|
|
|
|
|
|
this.countData = response.data[0]["countdata"];
|
|
|
- // console.log("this.countData",this.countData);
|
|
|
+ // // console.log("this.countData",this.countData);
|
|
|
this.dvrList = response.data[0]["dvrlist"];
|
|
|
this.conformlist = this.dvrList;
|
|
|
this.no_of_visit = this.countData[0].no_of_visit;
|
|
|
@@ -1100,7 +1100,7 @@ export class HomeComponent implements OnInit {
|
|
|
this.incom_entry = this.countData[0].no_of_incompleted;
|
|
|
this.no_contact = this.countData[0].no_of_contact;
|
|
|
|
|
|
- console.log(" this.dvrList", this.dvrList);
|
|
|
+ // console.log(" this.dvrList", this.dvrList);
|
|
|
|
|
|
} else {
|
|
|
this.no_of_visit = 0;
|
|
|
@@ -1123,20 +1123,20 @@ export class HomeComponent implements OnInit {
|
|
|
}
|
|
|
|
|
|
salepersonDetails(sale_person){
|
|
|
- console.log(sale_person)
|
|
|
+ // console.log(sale_person)
|
|
|
if (sale_person) {
|
|
|
this.commonservice.getAllData(this.commonservice.projectpath + "/mappingCustomerDetails?sale_person=" + sale_person).subscribe(response => {
|
|
|
if (response.status == 'tokenfalse') {
|
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
|
- console.log("sale_person------------>",response);
|
|
|
+ // console.log("sale_person------------>",response);
|
|
|
this.cust_data = response.data
|
|
|
- console.log("respocne",response.data)
|
|
|
+ // console.log("respocne",response.data)
|
|
|
}
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
- console.log("sale person not selected yet");
|
|
|
+ // console.log("sale person not selected yet");
|
|
|
}
|
|
|
}
|
|
|
|