Compare commits
No commits in common. "b6da1923419222a3f71308088520721bfdc3e1ef" and "4897ae18f30d5d20c819bb5eb4d980f9e1d46973" have entirely different histories.
b6da192341
...
4897ae18f3
2250
package-lock.json
generated
2250
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -60,7 +60,6 @@
|
||||
"cordova-plugin-x-socialsharing": "^5.6.8",
|
||||
"cordova-sqlite-storage": "3.4.0",
|
||||
"es6-promise-plugin": "^4.2.2",
|
||||
"formidable": "^2.0.1",
|
||||
"hammerjs": "^2.0.8",
|
||||
"ionic-angular": "3.9.2",
|
||||
"ionic-img-viewer": "^2.9.0",
|
||||
@ -68,7 +67,6 @@
|
||||
"ng2-pdf-viewer": "5.2.3",
|
||||
"ngx-image-compress": "^8.0.4",
|
||||
"ngx-mat-select-search": "^1.8.0",
|
||||
"node-sass": "^7.0.1",
|
||||
"rxjs": "^6.5.4",
|
||||
"rxjs-compat": "^6.5.4",
|
||||
"sw-toolbox": "3.6.0",
|
||||
|
||||
@ -95,7 +95,6 @@ import {SocialSharing} from '@ionic-native/social-sharing'
|
||||
import { CreditSectionListPageModule } from '../pages/credit_pd/pages/credit-section-list/credit-section-list.module';
|
||||
import { OfflineManagerCreditProvider } from '../pages/credit_pd/providers/offline-manager-credit/offline-manager-credit';
|
||||
import { ApiServiceProvider } from '../pages/credit_pd/providers/api-service/api-service';
|
||||
import { OtpPage } from '../pages/otp/otp';
|
||||
|
||||
// need the hammerConnfig
|
||||
export class HammerConfig extends HammerGestureConfig {
|
||||
@ -119,7 +118,6 @@ export class HammerConfig extends HammerGestureConfig {
|
||||
AuthPage,
|
||||
LoginPage,
|
||||
PdListPage,
|
||||
OtpPage,
|
||||
|
||||
PasswordPage,
|
||||
PdAllocationPage,
|
||||
@ -179,7 +177,6 @@ export class HammerConfig extends HammerGestureConfig {
|
||||
AuthPage,
|
||||
LoginPage,
|
||||
PdListPage,
|
||||
OtpPage,
|
||||
|
||||
PasswordPage,
|
||||
PdAllocationPage,
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<!-- add to homescreen for ios -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<script src="https://unpkg.com/ionicons@5.0.0/dist/ionicons.js"></script>
|
||||
|
||||
<!-- cordova.js required for cordova apps (remove if not needed) -->
|
||||
<script src="cordova.js"></script>
|
||||
|
||||
|
||||
@ -32,14 +32,8 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 100%" class="mb-1">
|
||||
<input matInput placeholder="Password" minlength= "8" [type]="hide ? 'password' : 'text'" name="password" required [(ngModel)]="password">
|
||||
|
||||
<ion-icon class="passwordIcon" name="{{hide ? 'eye-off' : 'eye'}}" matSuffix (click)="hide = !hide">{{hide ? 'eye-off' : 'eye'}}</ion-icon>
|
||||
|
||||
<!-- <ion-icon matSuffix name="eye-sharp"></ion-icon> -->
|
||||
<input matInput placeholder="Password" minlength= "8" type="password" name="password" required [(ngModel)]="password">
|
||||
</mat-form-field>
|
||||
|
||||
<!-- <ion-icon name="save"></ion-icon> -->
|
||||
<ion-row>
|
||||
<ion-col text-center>
|
||||
<button color="primary" mat-raised-button>SIGN IN</button><br/>
|
||||
|
||||
@ -37,7 +37,4 @@ img{
|
||||
line-height: 0px;
|
||||
box-shadow: 0 16px 38px -12px rgba(0,0,0,.56), 0 4px 25px 0 rgba(0,0,0,.12), 0 8px 10px -5px rgba(0,0,0,.2) !important;
|
||||
}
|
||||
.passwordIcon{
|
||||
color: #f34325 !important;
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
import { Component,OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams, MenuController,LoadingController, Events, ModalController, ModalOptions } from 'ionic-angular';
|
||||
import { IonicPage, NavController, NavParams, MenuController,LoadingController, Events } from 'ionic-angular';
|
||||
import { AlertController } from 'ionic-angular';
|
||||
// import {Validators, FormBuilder, FormGroup } from '@angular/forms';
|
||||
// import { GridPage } from '../grid/grid';
|
||||
@ -13,7 +13,7 @@ import { AwsServiceProvider } from '../../providers/aws-service/aws-service';
|
||||
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
|
||||
// import { CustomValidators } from 'ng2-validation';
|
||||
|
||||
import { MatDialogConfig, MatDialogRef } from '@angular/material';
|
||||
import { MatDialog, MatDialogRef, MatDialogConfig } from '@angular/material';
|
||||
import { CognitoServiceProvider } from '../../providers/aws-service/cognito.service';
|
||||
import { PdListPage } from '../pd-list/pd-list';
|
||||
import { PasswordPage } from '../password/password';
|
||||
@ -23,7 +23,6 @@ import { SalesPDlistPage } from '../sales_pd/pages/sales-p-dlist/sales-p-dlist';
|
||||
import { PdtriggerProvider } from '../../providers/pdtrigger/pdtrigger';
|
||||
import { SalesPdProvider } from '../sales_pd/providers/sales-pd/sales-pd';
|
||||
import { AuthPage } from '../auth/auth';
|
||||
import { OtpPage } from '../otp/otp';
|
||||
|
||||
|
||||
@Component({
|
||||
@ -41,7 +40,7 @@ changePassword: any;
|
||||
status: Boolean = false;
|
||||
config: MatDialogConfig = {
|
||||
disableClose: false,
|
||||
width: '10px',
|
||||
width: '',
|
||||
height: '',
|
||||
position: {
|
||||
top: '',
|
||||
@ -53,14 +52,13 @@ config: MatDialogConfig = {
|
||||
userDetails: any;
|
||||
commonDetails: any;
|
||||
forgetpin: boolean = false;
|
||||
hide: boolean;
|
||||
constructor(private modalCtrl:ModalController,public aws: AwsServiceProvider, public navParams: NavParams,
|
||||
constructor( public aws: AwsServiceProvider, public dialog: MatDialog, public navParams: NavParams,
|
||||
public shared:CognitoServiceProvider,public navCtrl:NavController,public Menu:MenuController
|
||||
,public toast:ToastProvider,public load:LoadingController,private events:Events,private constantProvider:ConstantsProvider,private pdtrigger:PdtriggerProvider,private salesPDProvider:SalesPdProvider) {
|
||||
|
||||
}
|
||||
ngOnInit(){
|
||||
this.hide = true;
|
||||
|
||||
//this.loggedInCheck();
|
||||
|
||||
}
|
||||
@ -86,9 +84,7 @@ login()
|
||||
{
|
||||
|
||||
if(this.email !==undefined && this.password !==undefined && this.email !='' && this.password !='' && this.email !=null && this.password !=null ){
|
||||
const mailid = this.email.split(/\s/).join('');
|
||||
const password = this.password.split(/\s/).join('');
|
||||
let auth = { 'Username': mailid, 'Password': password };
|
||||
let auth = { 'Username': this.email, 'Password': this.password };
|
||||
|
||||
this.aws.dologin(auth).subscribe(awsres => {
|
||||
this.presentLoading()
|
||||
@ -103,7 +99,7 @@ login()
|
||||
|
||||
|
||||
}, err => {
|
||||
console.log(err,JSON.stringify(err.message));
|
||||
console.log(JSON.stringify(err.message));
|
||||
if (err.message == "New password is required.") {
|
||||
//console.log("if");
|
||||
this.getCommonSettings()
|
||||
@ -193,44 +189,13 @@ forgotopen() {
|
||||
}
|
||||
|
||||
|
||||
// forgotpassword() {
|
||||
// // alert('rets');
|
||||
// // let auth = { 'Username': this.email };
|
||||
// // console.log(auth);
|
||||
// this.aws.generateotp(this.email).subscribe(res => {
|
||||
|
||||
// if(res.status == 200) {
|
||||
// this.dialogRef = this.dialog.open(OtpPage, {
|
||||
// data: this.email,
|
||||
// width: '30%',
|
||||
// disableClose: true
|
||||
// });
|
||||
|
||||
// }
|
||||
forgotpassword() {
|
||||
// alert('rets');
|
||||
let auth = { 'Username': this.email };
|
||||
console.log(auth);
|
||||
this.aws.userforgotpass(auth).subscribe(res => {
|
||||
|
||||
|
||||
|
||||
// // })
|
||||
// }
|
||||
forgotpassword(){
|
||||
const mailid = this.email.split(/\s/).join('');
|
||||
this.aws.generateotp(mailid).subscribe(res => {
|
||||
if(res.status == 200) {
|
||||
const modalOption:ModalOptions={
|
||||
cssClass:'optModal'
|
||||
}
|
||||
const modalCtrl=this.modalCtrl.create(OtpPage,{'drop_down_datas':this.email},modalOption)
|
||||
modalCtrl.present();
|
||||
modalCtrl.onDidDismiss((data)=>{
|
||||
console.log(data)
|
||||
if(data == true){
|
||||
this.getCommonSettings()
|
||||
this.navCtrl.setRoot(PasswordPage,{'Username':this.email,'Password':'temp1234'});
|
||||
}
|
||||
})
|
||||
}else{
|
||||
alert(res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
loggedInCheck(){
|
||||
@ -253,76 +218,76 @@ loggedInCheck(){
|
||||
* New password Dialog
|
||||
*/
|
||||
|
||||
const newpassword = new FormControl('', Validators.required);
|
||||
const confirmPassword = new FormControl('');
|
||||
// const newpassword = new FormControl('', Validators.required);
|
||||
// const confirmPassword = new FormControl('');
|
||||
|
||||
@Component({
|
||||
selector: 'app-jazz-dialog',
|
||||
template: `
|
||||
<h5 class="mt-0">New Password Change.</h5>
|
||||
// @Component({
|
||||
// selector: 'app-jazz-dialog',
|
||||
// template: `
|
||||
// <h5 class="mt-0">New Password Change.</h5>
|
||||
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="New Password" #newpassword type="password" style="width: 100%;">
|
||||
// <mat-form-field>
|
||||
// <input matInput placeholder="New Password" #newpassword type="password" style="width: 100%;">
|
||||
|
||||
</mat-form-field>
|
||||
// </mat-form-field>
|
||||
|
||||
|
||||
<br/>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="ConfirmPassword" #confirmPassword type="password" style="width: 100%;">
|
||||
</mat-form-field>
|
||||
// <br/>
|
||||
// <mat-form-field>
|
||||
// <input matInput placeholder="ConfirmPassword" #confirmPassword type="password" style="width: 100%;">
|
||||
// </mat-form-field>
|
||||
|
||||
<small *ngIf="confirmPassword.value !='' && newpassword.value != confirmPassword.value" class="mat-text-warn">Passwords do not math.</small>
|
||||
// <small *ngIf="confirmPassword.value !='' && newpassword.value != confirmPassword.value" class="mat-text-warn">Passwords do not math.</small>
|
||||
|
||||
<br>
|
||||
// <br>
|
||||
|
||||
<button mat-raised-button class="mat-green" type="submit" (click)="dialogRef.close(newpassword.value)">Submit</button>
|
||||
// <button mat-raised-button class="mat-green" type="submit" (click)="dialogRef.close(newpassword.value)">Submit</button>
|
||||
|
||||
|
||||
`
|
||||
})
|
||||
export class NewPasswordDialog {
|
||||
// `
|
||||
// })
|
||||
// export class NewPasswordDialog {
|
||||
|
||||
newpassword: any = newpassword;
|
||||
confirmPassword: any = confirmPassword;
|
||||
jazzMessage = 'Jazzy jazz jazz';
|
||||
// newpassword: any = newpassword;
|
||||
// confirmPassword: any = confirmPassword;
|
||||
// jazzMessage = 'Jazzy jazz jazz';
|
||||
|
||||
constructor(public dialogRef: MatDialogRef<NewPasswordDialog>) {
|
||||
// constructor(public dialogRef: MatDialogRef<NewPasswordDialog>) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-jazz-dialog',
|
||||
template: `
|
||||
<h5 class="mt-0">Forgot Password</h5>
|
||||
// @Component({
|
||||
// selector: 'app-jazz-dialog',
|
||||
// template: `
|
||||
// <h5 class="mt-0">Forgot Password</h5>
|
||||
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Email Id" #newpassword type="Email" style="width: 100%;">
|
||||
// <mat-form-field>
|
||||
// <input matInput placeholder="Email Id" #newpassword type="Email" style="width: 100%;">
|
||||
|
||||
</mat-form-field>
|
||||
// </mat-form-field>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
// <br>
|
||||
|
||||
<button mat-raised-button class="mat-green" type="submit" (click)="dialogRef.close(newpassword.value)">Submit</button>
|
||||
// <button mat-raised-button class="mat-green" type="submit" (click)="dialogRef.close(newpassword.value)">Submit</button>
|
||||
|
||||
|
||||
`
|
||||
})
|
||||
export class ForgotPass {
|
||||
// `
|
||||
// })
|
||||
// export class ForgotPass {
|
||||
|
||||
newpassword: any = newpassword;
|
||||
confirmPassword: any = confirmPassword;
|
||||
jazzMessage = 'Jazzy jazz jazz';
|
||||
// newpassword: any = newpassword;
|
||||
// confirmPassword: any = confirmPassword;
|
||||
// jazzMessage = 'Jazzy jazz jazz';
|
||||
|
||||
constructor(public dialogRef: MatDialogRef<ForgotPass>) {
|
||||
// constructor(public dialogRef: MatDialogRef<ForgotPass>) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
|
||||
|
||||
<!--
|
||||
Generated template for the AdvanceFilterPage page.
|
||||
|
||||
See http://ionicframework.com/docs/components/#navigation for more info on
|
||||
Ionic pages and navigation.
|
||||
-->
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar>
|
||||
<ion-title >OTP</ion-title>
|
||||
<ion-buttons end>
|
||||
<button ion-button clear (click)="closeModal()"><ion-icon name="close" style="font-size: 20px;"></ion-icon></button>
|
||||
</ion-buttons>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<mat-form-field style="width: 60%">
|
||||
<input matInput placeholder="Enter OTP" #otp
|
||||
type="text" maxlength="6">
|
||||
</mat-form-field>
|
||||
<span style="width: 25%">
|
||||
<button mat-button *ngIf="timeLeft !=0" style="color: red;"
|
||||
>{{timeLeft == 0 ? 'Resend OTP' : timeLeft+' Seconds Left....' }} </button>
|
||||
<button small ion-button round color="optblue" *ngIf="timeLeft ==0"
|
||||
(click)="resendOTP()" >{{timeLeft == 0 ? 'Resend OTP' : timeLeft+' Seconds Left....' }} </button>
|
||||
</span>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<div align="right" fxLayout="row" fxLayoutAlign="flex-end" style="margin-top: 10px;margin-right: 10px;">
|
||||
|
||||
<!-- <button mat-raised-button mat-icon-button (click)="updatepassword(otp.value)" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Update Password" matTooltipPosition="below"><mat-icon>save</mat-icon></button> -->
|
||||
|
||||
<!-- <button style="background-color: #e2412f;" mat-raised-button mat-icon-button (click)="updatepassword(otp.value)" class="mr-1 mt-1 hover-icon">
|
||||
<ion-icon name="save"></ion-icon>
|
||||
</button> -->
|
||||
<button class="btn-no-pad" medium ion-button round color="optblue" (click)="updatepassword(otp.value)" style="color: #fff;">Verify</button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@ -1,13 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from 'ionic-angular';
|
||||
import { OtpPage } from './otp';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
OtpPage,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(OtpPage),
|
||||
],
|
||||
})
|
||||
export class OtpPageModule {}
|
||||
@ -1,13 +0,0 @@
|
||||
page-otp {
|
||||
.toolbar-background-md {
|
||||
border-color: #b2b2b2;
|
||||
background: red !important;
|
||||
|
||||
}
|
||||
.toolbar-title-md{
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,86 +0,0 @@
|
||||
import { Component, Inject, Input } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams, ViewController } from 'ionic-angular';
|
||||
import { AwsServiceProvider } from '../../providers/aws-service/aws-service';
|
||||
import { MAT_DIALOG_DATA } from '@angular/material';
|
||||
import { ToastProvider } from '../../providers/common-provider/toast';
|
||||
|
||||
/**
|
||||
* Generated class for the OtpPage page.
|
||||
*
|
||||
* See https://ionicframework.com/docs/components/#navigation for more info on
|
||||
* Ionic pages and navigation.
|
||||
*/
|
||||
|
||||
@IonicPage()
|
||||
@Component({
|
||||
selector: 'page-otp',
|
||||
templateUrl: 'otp.html',
|
||||
})
|
||||
export class OtpPage {
|
||||
@Input()drop_down_datas
|
||||
timeLeft: number = 0;
|
||||
loggedEmailID:any="";
|
||||
interval;
|
||||
constructor(private viewCtrl:ViewController,public toast:ToastProvider,public navCtrl: NavController, public navParams: NavParams,public aws: AwsServiceProvider) {
|
||||
this.timeLeft = 60;
|
||||
this.interval = setInterval(() => {
|
||||
if(this.timeLeft > 0) {
|
||||
this.timeLeft--;
|
||||
} else {
|
||||
clearInterval(this.interval);
|
||||
}
|
||||
},1000)
|
||||
}
|
||||
ngOnInit() {
|
||||
this.drop_down_datas = this.navParams.get('drop_down_datas');
|
||||
console.log(this.drop_down_datas);
|
||||
}
|
||||
updatepassword(otp)
|
||||
{
|
||||
console.log('data');
|
||||
console.log(this.drop_down_datas,otp);
|
||||
const mail = this.drop_down_datas.split(/\s/).join('');
|
||||
this.aws.resetpassword(mail,otp).subscribe(data => {
|
||||
console.log('data');
|
||||
console.log(data)
|
||||
if (data.status == 200) {
|
||||
this.toast.lenderappmessage('Password Reset Successfully');
|
||||
// alert('Password Reset Successfully');
|
||||
// this.dialogRef.close();
|
||||
this.viewCtrl.dismiss(true);
|
||||
} else
|
||||
{
|
||||
alert('OTP is invalid. Plesae enter correct OTP.!');
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad OtpPage');
|
||||
}
|
||||
|
||||
closeModal() {
|
||||
this.viewCtrl.dismiss();
|
||||
}
|
||||
resendOTP() {
|
||||
console.log(this.drop_down_datas);
|
||||
console.log(this.loggedEmailID)
|
||||
this.timeLeft = 60;
|
||||
this.aws.generateotp(this.drop_down_datas.split(/\s/).join('')).subscribe(
|
||||
response => {
|
||||
// if(response.status == 200)
|
||||
console.log(response)
|
||||
this.interval = setInterval(() => {
|
||||
if(this.timeLeft > 0) {
|
||||
this.timeLeft--;
|
||||
} else {
|
||||
clearInterval(this.interval);
|
||||
// alert(response.msg);//comment this.
|
||||
}
|
||||
},1000)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -32,16 +32,15 @@
|
||||
<ion-row>
|
||||
<ion-col text-center>
|
||||
<mat-form-field>
|
||||
<input matInput [type]="hide1 ? 'password' : 'text'" placeholder="New Password" #newpassword style="width: 100%;" required>
|
||||
<ion-icon size="small" class="passwordIcon" name="{{hide1 ? 'eye-off' : 'eye'}}" matSuffix (click)="hide1 = !hide1">{{hide1 ? 'eye-off' : 'eye'}}</ion-icon>
|
||||
<input matInput type="password"placeholder="New Password" #newpassword style="width: 100%;" required>
|
||||
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<br/>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Confirm Password" [type]="hide2 ? 'password' : 'text'" #confirmPassword style="width: 100%;" required
|
||||
<input matInput placeholder="Confirm Password" type="password" #confirmPassword style="width: 100%;" required
|
||||
>
|
||||
<ion-icon size="small" class="passwordIcon" name="{{hide2 ? 'eye-off' : 'eye'}}" matSuffix (click)="hide2 = !hide2">{{hide2 ? 'eye-off' : 'eye'}}</ion-icon>
|
||||
</mat-form-field>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
@ -33,7 +33,4 @@ page-password {
|
||||
ion-icon{
|
||||
font-size:2.2em;
|
||||
}
|
||||
.passwordIcon{
|
||||
color: #f34325 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,14 +26,11 @@ export class PasswordPage {
|
||||
Username:any;
|
||||
Password:any;
|
||||
userDetails: any;
|
||||
hide1: boolean = true;
|
||||
hide2: boolean = true;
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public commonconstant:ConstantsProvider,public toast:ToastProvider,private events:Events,private constantProvider:ConstantsProvider,
|
||||
private pdtrigger:PdtriggerProvider) {
|
||||
this.commonImage = this.commonconstant.commonimage;
|
||||
this.Username = this.navParams.get('Username');
|
||||
this.Password = this.navParams.get('Password');
|
||||
console.log( this.Username, this.Password )
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
@ -41,16 +38,12 @@ export class PasswordPage {
|
||||
}
|
||||
setNewPassword(newpass)
|
||||
{
|
||||
console.log(this.Username,this.Password);
|
||||
const mailid = this.Username.split(/\s/).join('');
|
||||
const Password = this.Password.split(/\s/).join('');
|
||||
if(newpass !='' && newpass !=null && newpass !== undefined){
|
||||
let auth = { 'Username': mailid, 'Password': Password, 'newpassword': newpass };
|
||||
let auth = { 'Username': this.Username, 'Password': this.Password, 'newpassword': newpass };
|
||||
console.log(auth);
|
||||
this.aws.dologin(auth).subscribe(res => {
|
||||
console.log(res);
|
||||
// this.navCtrl.setRoot(PdListPage);
|
||||
this.toast.lenderappmessage('Password Successfully Changed..!');
|
||||
this.getlenderpddetails()
|
||||
// this.router.navigate(['/home']);
|
||||
}, err => {
|
||||
|
||||
@ -1251,7 +1251,7 @@ this.proceedonChangeProperty(modified)
|
||||
this.spinner_access=true
|
||||
|
||||
if (this.submit_btn && flag == 0) {
|
||||
|
||||
alert('empty')
|
||||
// this.insertSectionDataLocally(storage_param)
|
||||
storage_param.questions=this.questions_JSON.questions
|
||||
|
||||
@ -1266,14 +1266,14 @@ this.proceedonChangeProperty(modified)
|
||||
if(this.local_ques_JSON.section_id == 1 || this.submit_btn){
|
||||
this.salesPDProvider.getData_fromLocal('sales_pd_id_PRIMARYKEY').then(result=>{
|
||||
if(result != null && !this.submit_btn){
|
||||
// alert('a');
|
||||
alert('a');
|
||||
console.log('storage_param');
|
||||
console.log(storage_param);
|
||||
this.sendSectiontoApi(storage_param)
|
||||
}
|
||||
else{
|
||||
this.sendDatatoApi(storage_param)
|
||||
//alert('b');
|
||||
alert('b');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -80,8 +80,10 @@
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
|
||||
<ion-col text-right col-12>
|
||||
<a href={{val.link}} target={{val.link}}><ion-icon style="color: #008828; font-size: 25px;" name="link"></ion-icon></a>
|
||||
<ion-col text-right col-6 >
|
||||
<a href={{val.link}} target={{val.link}}><ion-icon style="color: #008828; font-size: 20px; padding-left: 360px;"
|
||||
name="link"></ion-icon></a>
|
||||
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@ import { SectionListPageModule } from '../section-list/section-list.module';
|
||||
import { CreditSectionListPageModule } from '../../../credit_pd/pages/credit-section-list/credit-section-list.module';
|
||||
import { CreditSectionListPage } from '../../../credit_pd/pages/credit-section-list/credit-section-list';
|
||||
import { ApiServiceProvider } from '../../../credit_pd/providers/api-service/api-service';
|
||||
import { BrowserTab } from '@ionic-native/browser-tab';
|
||||
|
||||
|
||||
/**
|
||||
@ -39,7 +40,6 @@ export class SalesPDlistPage {
|
||||
common: any;
|
||||
localPDs:any =[ ]
|
||||
is_sales_login:boolean = false
|
||||
apiurl: any;
|
||||
constructor(public actionSheetCtrl: ActionSheetController,public navCtrl: NavController, public navParams: NavParams,private salesPDService:SalesPdProvider,private toastProvider:ToastProvider,private loaderProvider:LoadingProvider,private modalCtrl:ModalController,private offlineManager:OfflineManagerProvider,
|
||||
private ionicStorageService:IonicStorageProvider,private cameraProvider:CameraProvider,private constantProvider:ConstantsProvider,private _creditPdService:ApiServiceProvider) {
|
||||
let userDetails = localStorage.getItem('user_details');
|
||||
@ -139,19 +139,7 @@ export class SalesPDlistPage {
|
||||
this.sales_displayValue.map(val=>{
|
||||
console.log('vvvaaall');
|
||||
console.log(val);
|
||||
// https://gstapp.smcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U&PDID=123&Email=manojsahrawat@smcfinance.com
|
||||
//let link = "http://gstapp.devopsmcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
this.apiurl = this.constantProvider.environment();
|
||||
console.log(this.apiurl.authorization)
|
||||
let link
|
||||
if(this.apiurl.authorization == 'sparqvenba2018'){
|
||||
console.log(this.apiurl.authorization)
|
||||
link ="http://salesapp.devopsmcfinance.com/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
}else {
|
||||
console.log(this.apiurl.authorization)
|
||||
link ="https://salesapp.smcfinance.com/app/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
}
|
||||
console.log(link)
|
||||
let link = "http://gstapp.devopsmcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
var string:any = {
|
||||
EmpName:user.user_first_name,
|
||||
EmpCode:"",
|
||||
@ -166,7 +154,7 @@ export class SalesPDlistPage {
|
||||
//let email="mwisesales1@sine.com";
|
||||
let PDID=val.sales_pd_sno;
|
||||
// let mail="&Email=manojsahrawat@smcfinance.com"
|
||||
let finallink=link+"&PDID="+PDID+"&Email="+user.email
|
||||
let finallink=link+"&Email="+user.email+"&PDID="+PDID;
|
||||
|
||||
console.log('finallink')
|
||||
console.log(finallink);
|
||||
@ -249,7 +237,6 @@ export class SalesPDlistPage {
|
||||
}
|
||||
|
||||
editForm(value_obj){
|
||||
|
||||
// let product= localStorage.getItem('product_id_salesPD')
|
||||
// storing the sales_pd_id and product id in local storagey
|
||||
let primary_key= 'sales_pd_id'
|
||||
@ -264,7 +251,7 @@ export class SalesPDlistPage {
|
||||
}
|
||||
console.log(value_obj);
|
||||
localStorage.setItem('sales_pd_type',value_obj.sales_pd_type)
|
||||
this.navCtrl.push(SectionListPage,{product_id:value_obj.product_id,sales_pd_type:value_obj.sales_pd_type,link:value_obj.link})
|
||||
this.navCtrl.push(SectionListPage,{product_id:value_obj.product_id,sales_pd_type:value_obj.sales_pd_type})
|
||||
})
|
||||
})
|
||||
}
|
||||
@ -321,100 +308,9 @@ export class SalesPDlistPage {
|
||||
modalCtrl.onDidDismiss((data)=>{
|
||||
console.log(data)
|
||||
if(data){
|
||||
console.log(data)
|
||||
this.sales_displayValue = data;
|
||||
console.log(this.sales_displayValue)
|
||||
this.filterMsg = false
|
||||
}
|
||||
if(this.sales_displayValue.length > 0){
|
||||
let user1 = localStorage.getItem('user_details');
|
||||
let user=(JSON.parse(user1))
|
||||
console.log(this.sales_displayValue);
|
||||
if(!this.is_sales_login) {
|
||||
this.sales_displayValue = this.sales_displayValue.filter(vll=>vll.status == 'COMPLETED');
|
||||
}
|
||||
this.filterMsg = true
|
||||
let products=[]
|
||||
let lenders=[]
|
||||
let pd_status=[]
|
||||
this.sales_displayValue.map(val=>{
|
||||
console.log('vvvaaall');
|
||||
console.log(val);
|
||||
// https://gstapp.smcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U&PDID=123&Email=manojsahrawat@smcfinance.com
|
||||
//let link = "http://gstapp.devopsmcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
this.apiurl = this.constantProvider.environment();
|
||||
console.log(this.apiurl.authorization)
|
||||
let link
|
||||
if(this.apiurl.authorization == 'sparqvenba2018'){
|
||||
console.log(this.apiurl.authorization)
|
||||
link ="http://salesapp.devopsmcfinance.com/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
}else {
|
||||
console.log(this.apiurl.authorization)
|
||||
link ="https://salesapp.smcfinance.com/app/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
}
|
||||
var string:any = {
|
||||
EmpName:user.user_first_name,
|
||||
EmpCode:"",
|
||||
PDID:val.sales_pd_sno,
|
||||
//PD_NO:val.sales_pd_sno,
|
||||
}
|
||||
//console.log(string);
|
||||
//var encodedString = btoa(JSON.stringify(string));
|
||||
//console.log("encode",encodedString); // Outputs: "SGVsbG8gV29ybGQh"
|
||||
//var decodedString = atob(encodedString);
|
||||
//console.log("decode",JSON.parse(decodedString));
|
||||
//let email="mwisesales1@sine.com";
|
||||
let PDID=val.sales_pd_sno;
|
||||
// let mail="&Email=manojsahrawat@smcfinance.com"
|
||||
let finallink=link+"&PDID="+PDID+"&Email="+user.email
|
||||
|
||||
console.log('finallink')
|
||||
console.log(finallink);
|
||||
val.link = finallink;
|
||||
if(products.length > 0 ){
|
||||
if(products.filter(pro=>pro == val.product_id).length == 0 ){
|
||||
products.push(val.product_id)
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
products.push(val.product_id)
|
||||
}
|
||||
if(lenders.length > 0 ){
|
||||
if(lenders.filter(pro=>pro == val.lender_id).length == 0 ){
|
||||
lenders.push(val.lender_id)
|
||||
}
|
||||
}
|
||||
else{
|
||||
lenders.push(val.lender_id)
|
||||
}
|
||||
if(pd_status.length > 0 ){
|
||||
if(pd_status.filter(pro=>pro == val.status).length == 0 ){
|
||||
pd_status.push(val.status)
|
||||
}
|
||||
}
|
||||
else{
|
||||
pd_status.push(val.status)
|
||||
}
|
||||
if(pd_status.length > 0 ){
|
||||
if(pd_status.filter(pro=>pro == val.status).length == 0 ){
|
||||
|
||||
pd_status.push(val.status)
|
||||
}
|
||||
}
|
||||
//let link='a';
|
||||
|
||||
|
||||
|
||||
// val.link = finallink;
|
||||
console.log('val');
|
||||
console.log(val)
|
||||
// link.push(val.status)
|
||||
|
||||
})
|
||||
this.filter_drop_down_data={product_ids:products,lender_ids:lenders,pd_status:pd_status}
|
||||
console.log(this.sales_displayValue);
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@ -10,16 +10,11 @@
|
||||
<button ion-button menuToggle>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
<ion-title>Section List </ion-title>
|
||||
<ion-title>Section List</ion-title>
|
||||
|
||||
<ion-buttons end>
|
||||
<a href={{link}} target={{link}}><ion-icon style="color: white; font-size: 40px; padding-left: 100px;"
|
||||
name="link"></ion-icon></a>
|
||||
</ion-buttons>
|
||||
<ion-buttons end *ngIf="is_sync_btn">
|
||||
<button ion-button outline round (click)="syncPDWithSections()"><ion-icon name="sync"></ion-icon> Sync</button>
|
||||
</ion-buttons>
|
||||
|
||||
</ion-navbar>
|
||||
</ion-header>
|
||||
|
||||
|
||||
@ -31,19 +31,15 @@ export class SectionListPage {
|
||||
sales_pd_type: string;
|
||||
customer_link_with_text: string;
|
||||
config_expression: any;
|
||||
link: any;
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,private SalesPDService:SalesPdProvider,private toastProvider:ToastProvider,
|
||||
private offlineManager:OfflineManagerProvider,private constantProvider:ConstantsProvider,
|
||||
private socialSharing:SocialSharing) {
|
||||
|
||||
if(this.navParams.get('product_id')){
|
||||
this.product_id=this.navParams.get('product_id')
|
||||
this.link=this.navParams.get('link')
|
||||
console.log(this.link)
|
||||
}
|
||||
this.sales_pd_type = localStorage.getItem('sales_pd_type')
|
||||
this.getTemplate()
|
||||
//alert(this.link);
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
|
||||
@ -155,20 +155,7 @@ apiurl:any;
|
||||
});
|
||||
}
|
||||
|
||||
generateotp(email): Observable<any> {
|
||||
|
||||
return this.http.post(this.apiurl.url + 'generateOTP', { "records":{ "email":email}})
|
||||
// .pipe(
|
||||
// catchError(this.handleError('role', []))
|
||||
// )
|
||||
}
|
||||
resetpassword(data,otp): Observable<any> {
|
||||
|
||||
return this.http.post(this.apiurl.url + 'verifyOTP', { "records":{ "email":data,"OTP":otp}})
|
||||
// .pipe(
|
||||
// catchError(this.handleError('role', []))
|
||||
// )
|
||||
}
|
||||
/**
|
||||
* Config function
|
||||
*/
|
||||
|
||||
@ -66,72 +66,3 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.optModal{
|
||||
padding: 6.4%;
|
||||
// padding: 30px;
|
||||
background-color: rgba(0, 0, 0, 0.56);
|
||||
// padding: 30px;
|
||||
color:red;
|
||||
// filter:blur(5px);
|
||||
//color:lightcyan;
|
||||
// background-color:gray;
|
||||
.modal-wrapper {
|
||||
// border-radius: 7px;
|
||||
// background: rgba(0, 0, 0, 0.5);
|
||||
// color: gray;
|
||||
|
||||
height: 35% !important;
|
||||
width: 100% !important;
|
||||
border-radius: 10px;
|
||||
margin-top: 50%;
|
||||
|
||||
mat-card{
|
||||
// background-color:rgb(252, 252, 161);
|
||||
background-color:white;
|
||||
box-shadow: 2px 2px lavender;
|
||||
border-radius: 5px;
|
||||
min-height: 13em;
|
||||
// height: 16.5em;
|
||||
max-height: 16.5em;
|
||||
border:1px solid lavender;
|
||||
}
|
||||
.mat-card-title{
|
||||
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
color:#e2412f;
|
||||
}
|
||||
mat-card-content{
|
||||
// margin-left: 4%;
|
||||
}
|
||||
ion-item{
|
||||
// background-color:rgb(252, 252, 161);
|
||||
background-color: lightcyan;
|
||||
}
|
||||
// margin-right: 15%;
|
||||
|
||||
button{
|
||||
font-size: 12px;
|
||||
// height: 40px;
|
||||
color: #fff;
|
||||
// margin-bottom: 10px;
|
||||
position: relative;
|
||||
bottom:0.5em;
|
||||
}
|
||||
// input{
|
||||
// // border:1px solid blueviolet;
|
||||
// }
|
||||
// mat-form-field{
|
||||
// width: 100%;
|
||||
// margin-top: 3%;
|
||||
// }
|
||||
// mat-radio-button{
|
||||
// margin-top: 2%;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,6 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<script data-ionic="inject">
|
||||
(function(w){var i=w.Ionic=w.Ionic||{};i.version='3.9.2';i.angular='5.0.3';i.staticDir='build/';})(window);
|
||||
</script>
|
||||
<meta charset="UTF-8">
|
||||
<title>Ionic App</title>
|
||||
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
@ -14,7 +17,7 @@
|
||||
<!-- add to homescreen for ios -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<script src="https://unpkg.com/ionicons@5.0.0/dist/ionicons.js"></script>
|
||||
|
||||
<!-- cordova.js required for cordova apps (remove if not needed) -->
|
||||
<script src="cordova.js"></script>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user