|
|
@@ -329,7 +329,23 @@ $(document).on('click', function () {
|
|
|
if (response.status == 'falsetoken') {
|
|
|
this.router.navigate(['/login'])
|
|
|
} else {
|
|
|
+ // this.cust_data = response.data[0].customerData;
|
|
|
this.cust_data = response.data[0].customerData;
|
|
|
+ if(this.role === 'users') {
|
|
|
+ this.cust_data = this.cust_data.filter(item => item.first_name + " " + item.last_name === this.login_name);
|
|
|
+ }
|
|
|
+ this.cust_data = Array.from(
|
|
|
+ new Map(
|
|
|
+ this.cust_data.map(item => [
|
|
|
+ `${item.customer_id}-${item.customer_name}`,
|
|
|
+ {
|
|
|
+ customer_id: item.customer_id,
|
|
|
+ customer_name: item.customer_name
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ ).values()
|
|
|
+ );
|
|
|
+ console.log(this.cust_data);
|
|
|
console.log("yyyyyyyyyyyyyy");
|
|
|
|
|
|
}
|
|
|
@@ -433,7 +449,7 @@ $(document).on('click', function () {
|
|
|
console.log("inside if")
|
|
|
this.openPopup();
|
|
|
this.status_msg = "Warning";
|
|
|
- this.error_msg = response.errors;
|
|
|
+ this.error_msg = response.error;
|
|
|
} else if (response.data.length > 0) {
|
|
|
console.log("inside else condition ")
|
|
|
|
|
|
@@ -447,7 +463,7 @@ $(document).on('click', function () {
|
|
|
if (response.data[0].exception.errorid != '') {
|
|
|
this.openPopup();
|
|
|
this.status_msg = "Warning";
|
|
|
- this.error_msg = response.errors;
|
|
|
+ this.error_msg = response.error;
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
@@ -460,7 +476,7 @@ $(document).on('click', function () {
|
|
|
console.log("inside if")
|
|
|
this.openPopup();
|
|
|
this.status_msg = "Warning";
|
|
|
- this.error_msg = response.errors;
|
|
|
+ this.error_msg = response.error;
|
|
|
}
|
|
|
else if (response.data.length > 0) {
|
|
|
console.log("inside if(response.message== '') 99999999999")
|
|
|
@@ -480,13 +496,13 @@ $(document).on('click', function () {
|
|
|
if (response.data[0].exception.errorid != '') {
|
|
|
this.openPopup();
|
|
|
this.status_msg = "Warning";
|
|
|
- this.error_msg = response.errors;
|
|
|
+ this.error_msg = response.error;
|
|
|
}
|
|
|
}
|
|
|
} else if (response.data[0].createStatus == 1 && response.data[0].exception.errorid == 400) {
|
|
|
this.openPopup();
|
|
|
this.status_msg = "Warning";
|
|
|
- this.error_msg = response.errors;
|
|
|
+ this.error_msg = response.error;
|
|
|
}
|
|
|
else {
|
|
|
this.status_msg = "";
|
|
|
@@ -538,7 +554,7 @@ $(document).on('click', function () {
|
|
|
console.log("inside if")
|
|
|
this.openPopup();
|
|
|
this.status_msg = "Warning";
|
|
|
- this.error_msg = response.errors;
|
|
|
+ this.error_msg = response.error;
|
|
|
} else if (response.data.length > 0) {
|
|
|
console.log("inside if(response.message== '')6666666666 ")
|
|
|
this.openPopup();
|
|
|
@@ -561,7 +577,7 @@ $(document).on('click', function () {
|
|
|
if (response.data[0].exception.errorid != '') {
|
|
|
this.openPopup();
|
|
|
this.status_msg = "Warning";
|
|
|
- this.error_msg = response.errors;
|
|
|
+ this.error_msg = response.error;
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
@@ -574,7 +590,7 @@ $(document).on('click', function () {
|
|
|
console.log("inside if")
|
|
|
this.openPopup();
|
|
|
this.status_msg = "Warning";
|
|
|
- this.error_msg = response.errors;
|
|
|
+ this.error_msg = response.error || response.data[0].exception.errormessage;
|
|
|
}
|
|
|
else if (response.data.length > 0) {
|
|
|
console.log("inside if(response.message== '')222222222222 ")
|
|
|
@@ -603,7 +619,7 @@ $(document).on('click', function () {
|
|
|
if (response.data[0].exception.errorid != '') {
|
|
|
this.openPopup();
|
|
|
this.status_msg = "Warning";
|
|
|
- this.error_msg = response.errors;
|
|
|
+ this.error_msg = response.error || response.data[0].exception.errormessage;
|
|
|
}
|
|
|
}
|
|
|
|