popup error msg added

This commit is contained in:
bitbucket 2022-12-08 12:28:45 +05:30
parent 6a3d0f8abc
commit 7580c90383
3 changed files with 41 additions and 9 deletions

View File

@ -8554,12 +8554,12 @@
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
"integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA=="
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==",
"requires": {
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
@ -8580,7 +8580,7 @@
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
"integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g=="
}
}
},

View File

@ -21,7 +21,7 @@ import { Http, Headers, RequestOptions } from '@angular/http';
import { HttpClient } from '@angular/common/http';
import 'rxjs/add/operator/map';
import { CognitoService } from './cognito.service';
import Swal from 'sweetalert2';
@ -118,7 +118,37 @@ export class AwsService {
onFailure: function (err) { // error user login
//alert('haiii')
console.log(err.message)
alert(err.message);
if( err.message=='Incorrect username or password.' || err.message =='Password attempts exceeded'){
let alerts:any = Swal
alerts.fire({
type: 'info',
title: ''+err.message+'',
}
)
// alert(err.message);
}else if(err.message =='Network error' || err.message =='Unknown error, the response body from fetch is: [object Object]'){
let alert:any = Swal
alert.fire({
type: 'error',
title: 'Oops...',
text: 'Something went wrong!',
footer: '<span style="color:red;font-size: large; font-weight: bold;">Please Check Your Internet Connection....!</span>'
})
}else{
let alerts:any = Swal
alerts.fire({
type: 'info',
title: ''+err.message+'',
})
// alert(err.message);
}
observer.error(err);
}
});
@ -145,7 +175,7 @@ export class AwsService {
observe.next(data);
},
onFailure: function (err) {
alert(err.message || JSON.stringify(err));
// alert(err.message || JSON.stringify(err));
},
//Optional automatic callback
inputVerificationCode: function (data) {
@ -396,7 +426,9 @@ export class AwsService {
err,
data
) => {
if (err) { alert(err.message); }
if (err) {
//alert(err.message);
}
// an error occurred
@ -448,7 +480,7 @@ export class AwsService {
data
) {
if (err) {
alert(err.message);
// alert(err.message);
}//(err, err.stack);
// an error occurred
else {//(data);

View File

@ -571,7 +571,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
console.log(event)
let cus_link;
if(event && event.btnValue == 'video') {
cus_link = window.location.origin+'/vchat/#/chat/'+this.pdMasterData[0].random_string+';id='+this.viewID+';type=1'
cus_link = window.location.origin+'/vchat/#/chat/'+this.pdMasterData[0].random_string+';id='+this.viewID+';type=1;uid='+this.userId
}
else if(event && event.btnValue == 'image') {
cus_link = window.location.origin+'/customer/#/pd-images/'+this.pdMasterData[0].random_string+'/'+this.pdMasterData[0].lender_short_name;