vnms module ui changes

This commit is contained in:
bitbucket 2023-07-10 12:16:37 +05:30
parent 3b23565c04
commit 998c0559f2
78 changed files with 10080 additions and 12024 deletions

View File

@ -43,13 +43,13 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
"maximumWarning": "4mb",
"maximumError": "10mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
"maximumWarning": "5kb",
"maximumError": "8kb"
}
],
"fileReplacements": [

View File

@ -1,10 +1,11 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="0.0.10" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>vnms-app</name>
<widget id="io.ionic.starter" version="0.0.17" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>vnms</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
<access origin="*" />
<access launch-external="yes" origin="tel:*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
@ -50,18 +51,7 @@
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
<preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/android/icon/splash.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />

19435
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
{
"name": "sts-school-app",
"name": "vnms-app",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -3,7 +3,14 @@ import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
import { AuthenticationComponent } from './pages/authentication/authentication.component';
import { vnmsComponent } from './pages/vnms/vnms/vnms.component';
import { AuthGuard } from './guard/auth.guard';
const token = localStorage.getItem('user_token');
console.log(token)
let param;
if(token != '' && token != undefined && token != null){
param = 'vnms'
}else{
param = 'authentication'
}
const routes: Routes = [
// {
// path: 'home',
@ -16,16 +23,16 @@ const routes: Routes = [
// },
{
path: '',
redirectTo: 'authentication',
redirectTo: param,
pathMatch: 'full'
},
{
path : '',
component:vnmsComponent,
// component:vnmsComponent,
canActivate:[AuthGuard],
children :[
{
path:'vnms',
path:'',
loadChildren: () => import('./pages/vnms/vnms.module').then(m=>m.vnmsModule),
}
]

View File

@ -3,15 +3,17 @@
<ion-menu contentId="main-content" type="overlay" class="full-width-menu">
<ion-header>
<ion-toolbar color="dark" class="user-profile">
<ion-buttons slot="start">
<ion-back-button defaultHref="vnms-list" (click)="closeMenu()" > <img src="assets/assets/icon/arrow-square-right.png"></ion-back-button>
</ion-buttons>
<!-- <ion-item margin-bottom> -->
<!-- <ion-avatar slot="start" class="user-avatar">
<img src="assets/img/avatar.png">
</ion-avatar> -->
<ion-grid>
<ion-row>
<ion-col size="2" > <img src="assets/assets/icon/arrow-square-right.png"></ion-col>
<ion-col size="10" style="padding-left: 4rem;"> <ion-text color="medium" >
<!-- <ion-col size="2" > <img src="assets/assets/icon/arrow-square-right.png"></ion-col> -->
<ion-col size="12" style="padding-left: 4rem;"> <ion-text color="medium" >
<span class="t-title" style="text-transform: capitalize;">My Account</span>
</ion-text></ion-col>
@ -65,10 +67,10 @@
<ion-row>
<ion-col > <span class="content">
Gopikrishnan<br />
{{user}}<br />
<span class="content-min content-sm">
gopikrishnan@gmail.com</span>
{{user_email}}</span>
</span></ion-col>

View File

@ -47,6 +47,7 @@
font-style: normal;
font-weight: 500;
line-height: 16px;
text-transform: capitalize;
}
.content-sm{

View File

@ -17,7 +17,7 @@ export class AppComponent {
public appPages: Array<Pages>;
user:any =[];
user_role:any =[];
imgVal:any=-10;;
imgVal:any=-10;;user_email:any =[];
constructor(
private platform: Platform,private menuCtrl: MenuController,
private splashScreen: SplashScreen,
@ -34,13 +34,103 @@ export class AppComponent {
localStorage.setItem('user_role',res.role)
this.user = res.userName
this.user_role = res.role
if( this.user_role == 'DRIVER'){
//this.appPages.filter((arr:any)=>{return arr.title == 'Delivery list'})
this.appPages = [
{
title: 'Home',
url: '/home-results',
direct: 'root',
icon: 'home',
src:'assets/assets/icon/menu/home-col.png',
src2:'assets/assets/icon/menu/home.png'
},
{
title: 'Orders',
url: '/driver-list',
direct: 'forward',
icon: 'list',
src:'assets/assets/icon/dark-box.png',
src2:'assets/assets/icon/box.png'
},
{
title: 'Order Summary',
url: '/driver-list/summary',
direct: 'forward',
icon: 'list',
src:'assets/assets/icon/menu/list-col.png',
src2:'assets/assets/icon/menu/list.png'
},
{
title: 'My Profile',
url: '/edit-profile',
direct: 'forward',
icon: 'list',
src:'assets/assets/icon/menu/profile-col.png',
src2:'assets/assets/icon/menu/profile.png'
},
{
title: 'Contact Us',
url: '/contact',
direct: 'forward',
icon: 'information-circle-outline',
src:'assets/assets/icon/menu/contact-col.png',
src2:'assets/assets/icon/menu/contact.png'
}
];
}else{
//this.appPages.filter((arr:any)=>{return arr.title == 'Orders'})
this.appPages = [
{
title: 'Home',
url: '/home-results',
direct: 'root',
icon: 'home',
src:'assets/assets/icon/menu/home-col.png',
src2:'assets/assets/icon/menu/home.png'
},
{
title: 'My Orders',
url: '/view-report',
direct: 'forward',
icon: 'list',
src:'assets/assets/icon/menu/list-col.png',
src2:'assets/assets/icon/menu/list.png'
},
{
title: 'My Profile',
url: '/edit-profile',
direct: 'forward',
icon: 'list',
src:'assets/assets/icon/menu/profile-col.png',
src2:'assets/assets/icon/menu/profile.png'
},
{
title: 'Our Services',
url: '/settings',
direct: 'forward',
icon: 'cog',
src:'assets/assets/icon/menu/service-col.png',
src2:'assets/assets/icon/menu/service.png'
},
{
title: 'Contact Us',
url: '/contact',
direct: 'forward',
icon: 'information-circle-outline',
src:'assets/assets/icon/menu/contact-col.png',
src2:'assets/assets/icon/menu/contact.png'
}
];
}
}
})
@ -50,69 +140,11 @@ export class AppComponent {
this.user = localStorage.getItem('user_name')
this.user_role = localStorage.getItem('user_role')
this.user_email = localStorage.getItem('email')
this.appPages = [
{
title: 'Home',
url: '/home-results',
direct: 'root',
icon: 'home',
src:'assets/assets/icon/menu/home-col.png',
src2:'assets/assets/icon/menu/home.png'
},
{
title: 'My Orders',
url: '/view-report',
direct: 'forward',
icon: 'list',
src:'assets/assets/icon/menu/list-col.png',
src2:'assets/assets/icon/menu/list.png'
},
{
title: 'Orders',
url: '/driver-list',
direct: 'forward',
icon: 'list',
src:'assets/assets/icon/dark-box.png',
src2:'assets/assets/icon/box.png'
},
{
title: 'Order Summary',
url: '/driver-list/list/return/summary',
direct: 'forward',
icon: 'list',
src:'assets/assets/icon/menu/list-col.png',
src2:'assets/assets/icon/menu/list.png'
},
{
title: 'My Profile',
url: '/edit-profile',
direct: 'forward',
icon: 'list',
src:'assets/assets/icon/menu/profile-col.png',
src2:'assets/assets/icon/menu/profile.png'
},
{
title: 'Our Services',
url: '/settings',
direct: 'forward',
icon: 'cog',
src:'assets/assets/icon/menu/service-col.png',
src2:'assets/assets/icon/menu/service.png'
},
{
title: 'Contact Us',
url: '/contact',
direct: 'forward',
icon: 'information-circle-outline',
src:'assets/assets/icon/menu/contact-col.png',
src2:'assets/assets/icon/menu/contact.png'
}
];
if( this.user_role == 'DRIVER'){
@ -232,11 +264,11 @@ export class AppComponent {
logout() {
localStorage.clear();
this.navCtrl.navigateRoot('/');
this.navCtrl.navigateRoot('/authentication/login');
}
getImg(i:any,title:any){
this.imgVal = i
this.imgVal = -10
this.closeMenu()

View File

@ -18,4 +18,24 @@ export class AuthService {
return this._http.post<any>(this.apiUrl + "loginapp",{'email':params.email,'password':params.password})
}
getForgotToken(params:any): Observable<any> {
console.log(params.email)
return this._http.post<any>(this.apiUrl + "forget-password",{'email':params.email,'password':params.password})
}
verifyOtp(params:any): Observable<any> {
//console.log(params.email)
return this._http.post<any>(this.apiUrl + "otp-verify",params)
}
resetPasswordApi(params:any): Observable<any> {
// console.log(params.email)
return this._http.post<any>(this.apiUrl + "reset-password",params)
}
}

View File

@ -2,6 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AuthPage } from './auth/auth.component';
import { PasswordPage } from './password/password.component';
import { ForgetPasswordComponent } from './forget-password/forget-password.component';
import { OtpPageComponent } from './otp-page/otp-page.component';
import { ConfirmPasswordComponent } from './confirm-password/confirm-password.component';
const routes: Routes = [
{
@ -22,7 +25,17 @@ const routes: Routes = [
{
path:'PasswordPage',
component:PasswordPage
}
}, {
path:'forgetpass',
component:ForgetPasswordComponent
}, {
path:'otp',
component:OtpPageComponent
},{
path:'confirm',
component:ConfirmPasswordComponent
},
];
@NgModule({

View File

@ -6,13 +6,16 @@ import { IonicModule } from '@ionic/angular';
import { AuthPage } from './auth/auth.component';
import { PasswordPage } from './password/password.component';
import { MaterialModuleModule } from 'src/app/shared/material-module/material-module.module';
import { ForgetPasswordComponent } from './forget-password/forget-password.component';
import { ConfirmPasswordComponent } from './confirm-password/confirm-password.component';
import { OtpPageComponent } from './otp-page/otp-page.component';
@NgModule({
schemas: [
CUSTOM_ELEMENTS_SCHEMA
],
declarations: [AuthPage,PasswordPage],
declarations: [AuthPage,PasswordPage,OtpPageComponent,ConfirmPasswordComponent,ForgetPasswordComponent],
imports: [
CommonModule,
AuthenticationRoutingModule,

View File

@ -0,0 +1,130 @@
<ion-content padding class="animated fadeIn login auth-page">
<form [formGroup]="onLoginForm" class="list-form">
<div class="theme-bg"></div>
<div class="auth-content">
<!-- Logo -->
<div padding-horizontal text-center class="animated fadeInDown" >
<div class="logo"></div>
</div>
<ion-grid>
<ion-row>
<ion-col > <h4 class="align-right">
New Password
</h4> </ion-col>
</ion-row>
<ion-row>
<ion-col > <span class="msg">Enter new password </span> </ion-col>
</ion-row>
</ion-grid>
<!-- Login form -->
<ion-item no-padding class="animated fadeInUp item-native" style=" border-style: none;">
<ion-label position="floating" class="label-space" style=" padding-bottom: 15px;">
<!-- <ion-icon name="mail" item-start></ion-icon> -->
New Password
</ion-label>
<ion-input type="text" formControlName="password" style="border-radius: 7px;"></ion-input>
</ion-item>
<p ion-text color="warning" class="text08" >
<ion-text color="warning" *ngIf="onLoginForm.get('password')?.hasError('required') && onLoginForm.get('password')?.touched">New Password is required.</ion-text>
</p>
<ion-item no-padding class="animated fadeInUp item-native">
<!-- <span class="input-fl">
Password
</span> -->
<ion-label position="floating" class="label-space" style=" padding-bottom: 15px;">
<!-- <ion-icon name="mail" item-start></ion-icon> -->
Confirm Password
</ion-label>
<ion-input type="password" formControlName="password2" style="border-radius: 7px;"></ion-input>
</ion-item>
<p ion-text color="warning" class="text08" >
<ion-text color="warning" *ngIf="onLoginForm.get('password2')?.hasError('required') && onLoginForm.get('password2')?.touched">Confirm Password is required.</ion-text>
</p>
<!-- <p text-right tappable (click)="forgotPass()" class="paz">
<ion-text color="Dark">
<strong>Forgot Password ?</strong>
</ion-text>
</p> -->
<div>
<ion-button icon-left size="medium" expand="full" class="addMore" (click)="goToHome()" [disabled]="!onLoginForm.valid" tappable>
<!-- <ion-icon name="log-in"></ion-icon> -->
Log in
</ion-button>
<!-- <ion-grid>
<ion-row>
<ion-col style="text-align: center;color: #BA0404;"> </ion-col>
</ion-row>
</ion-grid> -->
<!-- <p text-center>
<ion-text color="light">
Or Signin with:
</ion-text>
</p> -->
<!-- <ion-grid class="btn-group">
<ion-row>
<ion-col size="4">
<ion-button shape="round" expand="full" color="secondary">
<ion-icon slot="icon-only" name="logo-facebook"></ion-icon>
</ion-button>
</ion-col>
<ion-col size="4">
<ion-button shape="round" expand="full" color="secondary">
<ion-icon slot="icon-only" name="logo-twitter"></ion-icon>
</ion-button>
</ion-col>
<ion-col size="4">
<ion-button shape="round" expand="full" color="secondary">
<ion-icon slot="icon-only" name="logo-googleplus"></ion-icon>
</ion-button>
</ion-col>
</ion-row>
</ion-grid> -->
</div>
<!-- Other links -->
<!-- <div text-center margin-top>
<span (click)="goToRegister()" class="paz" tappable>
<ion-text color="light">
New here? <strong>Sign Up</strong>
</ion-text>
</span>
</div> -->
</div>
</form>
</ion-content>

View File

@ -0,0 +1,161 @@
:host {
ion-content {
--background: rgba(255, 255, 255, 0.94);
}
.sc-ion-input-md {
border-radius: 10px !important;
border: 1px solid var(--gray-2, #A7A7A7) !important;
padding-left: 1rem;
}
.item-native{
--border-style: none !important;
}
ion-item{
// margin-top: -1.6rem !important;
}
}
.paz {
position: relative;
z-index: 10;
}
h4{
text-align: center;
}
:host {
background: none;
}
ion-content{
// background: url("/assets/img/login.png");
background: #fff ;
}
.fadeInDown .logo{
margin-top: 4rem;
}
.item-native {
border-style: none !important;
}
.label-space{
padding: 10px;
font-size: 14px;
font-family: Roboto;
font-weight: 500;
line-height: 16px;
}
.custom-margin-bottom:focus {
margin-bottom: 10px; /* Optional, if you want to retain the margin even after losing focus */
}
.input-fl {
display: grid !important;
}
.align-right{
text-align: left;
color: var(--text-4, #3A3A3A);
/* Heading -Medium 24 */
font-size: 24px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 30px;
}
.remember{
color: #6B6B6B;
text-align: center;
/* Body medium 12 */
font-size: 12px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 16px;
}
.forget{
color: #043FB9;
text-align: center;
/* Body medium 12 */
font-size: 12px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 16px;
}
.ion-checkbox{
color: #6B6B6B !important;
}
.sub-btn{
border-radius: 10px;
background: #BA0404;
height: 46px;
flex-shrink: 0;
}
.msg{
color: #6B6B6B;
text-align: center;
/* Body medium 14 */
font-size: 14px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 16px;
}
p{
margin-left: 2rem;
}
.contact{
color: #6B6B6B;
text-align: center;
/* Body regular 14 */
font-size: 14px;
font-family: Roboto;
font-style: normal;
font-weight: 400;
line-height: 16px;
}
.addMore{
border-radius: 10px;
border: 2px solid #BA0404;
// background: #BA0404;
margin: 1rem;
background: #fff;
color:#fff;
}
.addMore:hover{
background: #BA0404;
color:#FFF;
}
.text-an{
color: #043FB9;
/* Body medium 14 */
font-size: 14px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 16px;
}

View File

@ -0,0 +1,24 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { ConfirmPasswordComponent } from './confirm-password.component';
describe('ConfirmPasswordComponent', () => {
let component: ConfirmPasswordComponent;
let fixture: ComponentFixture<ConfirmPasswordComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ConfirmPasswordComponent ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(ConfirmPasswordComponent);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,136 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { AlertController, LoadingController, MenuController, NavController, ToastController } from '@ionic/angular';
import { AuthService } from '../auth.service';
import { VnmsService } from '../../vnms/vnms.service';
@Component({
selector: 'app-confirm-password',
templateUrl: './confirm-password.component.html',
styleUrls: ['./confirm-password.component.scss'],
})
export class ConfirmPasswordComponent implements OnInit {
public onLoginForm: FormGroup;
constructor(
public navCtrl: NavController,
public menuCtrl: MenuController,
public toastCtrl: ToastController,
public alertCtrl: AlertController,
public loadingCtrl: LoadingController,
private formBuilder: FormBuilder,
public _ser:AuthService,public _api:VnmsService
) { }
ionViewWillEnter() {
this.menuCtrl.enable(false);
}
ngOnInit() {
// this.onLoginForm = this.formBuilder.group({
// 'email': [null, Validators.compose([
// Validators.required
// ])],
// 'password': [null, Validators.compose([
// Validators.required
// ])]
// });
this.onLoginForm = new FormGroup({
password: new FormControl('', [Validators.required,Validators.pattern(
'^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*_=+-]).{8,12}$'
)]),
password2: new FormControl('', [Validators.required,Validators.pattern(
'^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*_=+-]).{8,12}$'
)])
// password: new FormControl('', [Validators.required,Validators.pattern(
// '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*_=+-]).{8,12}$'
// )])
});
}
async forgotPass() {
const alert = await this.alertCtrl.create({
header: 'Forgot Password?',
message: 'Enter you email address to send a reset link password.',
inputs: [
{
name: 'email',
type: 'email',
placeholder: 'Email'
}
],
buttons: [
{
text: 'Cancel',
role: 'cancel',
cssClass: 'secondary',
handler: () => {
console.log('Confirm Cancel');
}
}, {
text: 'Confirm',
handler: async () => {
const loader = await this.loadingCtrl.create({
duration: 2000
});
loader.present();
loader.onWillDismiss().then(async l => {
const toast = await this.toastCtrl.create({
//showCloseButton: true,
message: 'Email was sended successfully.',
duration: 3000,
position: 'bottom'
});
toast.present();
});
}
}
]
});
await alert.present();
}
// // //
goToRegister() {
this.navCtrl.navigateRoot('/register');
}
goToHome() {
let email = localStorage.getItem('email')
let param ={email :email,password:this.onLoginForm.value.password,password2:this.onLoginForm.value.password2}
console.log(param)
this._ser.resetPasswordApi(param).subscribe(res => {
console.log(res)
if(res.status == 200){
this.navCtrl.navigateRoot(['authentication/login']);
}
// this.forgotTokenEmail = res
}, err => {
//alert(err.message);
})
}
login(){
}
dismiss(){
}
forget(){
this.navCtrl.navigateRoot(['authentication/forgetpass']);
}
}

View File

@ -0,0 +1,137 @@
<ion-content padding class="animated fadeIn login auth-page">
<form [formGroup]="onLoginForm" class="list-form">
<div class="theme-bg"></div>
<div class="auth-content">
<!-- Logo -->
<div padding-horizontal text-center class="animated fadeInDown" >
<div class="logo"></div>
</div>
<ion-grid>
<ion-row>
<ion-col > <h4 class="align-right">
Forgot Password
</h4> </ion-col>
</ion-row>
<ion-row>
<ion-col > <span class="msg">Enter your email address </span> </ion-col>
</ion-row>
</ion-grid>
<!-- Login form -->
<ion-item no-padding class="animated fadeInUp item-native" style=" border-style: none;">
<ion-label position="floating" class="label-space" style=" padding-bottom: 15px;">
<!-- <ion-icon name="mail" item-start></ion-icon> -->
Email Address
</ion-label>
<ion-input type="email" formControlName="email" style="border-radius: 7px;"></ion-input>
</ion-item>
<p ion-text class="text08" >
<ion-text color="warning" *ngIf="onLoginForm.get('email')?.hasError('required') && onLoginForm.get('email')?.touched">
Email is required.
</ion-text>
<ion-text color="warning" *ngIf="!onLoginForm.get('email')?.hasError('required') && (onLoginForm.get('email')?.errors?.['pattern'])">
Please enter a valid email address
</ion-text>
</p>
<p ion-text color="warning" class="text08" >
<ion-text color="warning" *ngIf="onLoginForm.get('password')?.hasError('required') && onLoginForm.get('password')?.touched">Password is required.</ion-text>
</p>
<!-- <p text-right tappable (click)="forgotPass()" class="paz">
<ion-text color="Dark">
<strong>Forgot Password ?</strong>
</ion-text>
</p> -->
<div>
<ion-button icon-left size="medium" expand="full" class="addMore" (click)="goToHome()" [disabled]="!onLoginForm.valid" tappable>
<!-- <ion-icon name="log-in"></ion-icon> -->
Send OTP
</ion-button>
<ion-grid style="margin-top: 2rem;">
<ion-row>
<ion-col class="contact"> <span>
Remember password? Back to
<span class="text-an">
<a class="text-an" (click)="login()"> Sign in</a></span>
</span></ion-col>
</ion-row>
</ion-grid>
<!-- <ion-grid>
<ion-row>
<ion-col style="text-align: center;color: #BA0404;"> </ion-col>
</ion-row>
</ion-grid> -->
<!-- <p text-center>
<ion-text color="light">
Or Signin with:
</ion-text>
</p> -->
<!-- <ion-grid class="btn-group">
<ion-row>
<ion-col size="4">
<ion-button shape="round" expand="full" color="secondary">
<ion-icon slot="icon-only" name="logo-facebook"></ion-icon>
</ion-button>
</ion-col>
<ion-col size="4">
<ion-button shape="round" expand="full" color="secondary">
<ion-icon slot="icon-only" name="logo-twitter"></ion-icon>
</ion-button>
</ion-col>
<ion-col size="4">
<ion-button shape="round" expand="full" color="secondary">
<ion-icon slot="icon-only" name="logo-googleplus"></ion-icon>
</ion-button>
</ion-col>
</ion-row>
</ion-grid> -->
</div>
<!-- Other links -->
<!-- <div text-center margin-top>
<span (click)="goToRegister()" class="paz" tappable>
<ion-text color="light">
New here? <strong>Sign Up</strong>
</ion-text>
</span>
</div> -->
</div>
</form>
</ion-content>

View File

@ -0,0 +1,161 @@
:host {
ion-content {
--background: rgba(255, 255, 255, 0.94);
}
.sc-ion-input-md {
border-radius: 10px !important;
border: 1px solid var(--gray-2, #A7A7A7) !important;
padding-left: 1rem;
}
.item-native{
--border-style: none !important;
}
ion-item{
// margin-top: -1.6rem !important;
}
}
.paz {
position: relative;
z-index: 10;
}
h4{
text-align: center;
}
:host {
background: none;
}
ion-content{
// background: url("/assets/img/login.png");
background: #fff ;
}
.fadeInDown .logo{
margin-top: 4rem;
}
.item-native {
border-style: none !important;
}
.label-space{
padding: 10px;
font-size: 14px;
font-family: Roboto;
font-weight: 500;
line-height: 16px;
}
.custom-margin-bottom:focus {
margin-bottom: 10px; /* Optional, if you want to retain the margin even after losing focus */
}
.input-fl {
display: grid !important;
}
.align-right{
text-align: left;
color: var(--text-4, #3A3A3A);
/* Heading -Medium 24 */
font-size: 24px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 30px;
}
.remember{
color: #6B6B6B;
text-align: center;
/* Body medium 12 */
font-size: 12px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 16px;
}
.forget{
color: #043FB9;
text-align: center;
/* Body medium 12 */
font-size: 12px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 16px;
}
.ion-checkbox{
color: #6B6B6B !important;
}
.sub-btn{
border-radius: 10px;
background: #BA0404;
height: 46px;
flex-shrink: 0;
}
.msg{
color: #6B6B6B;
text-align: center;
/* Body medium 14 */
font-size: 14px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 16px;
}
p{
margin-left: 2rem;
}
.contact{
color: #6B6B6B;
text-align: center;
/* Body regular 14 */
font-size: 14px;
font-family: Roboto;
font-style: normal;
font-weight: 400;
line-height: 16px;
}
.addMore{
border-radius: 10px;
border: 2px solid #BA0404;
// background: #BA0404;
margin: 1rem;
background: #fff;
color:#fff;
}
.addMore:hover{
background: #BA0404;
color:#FFF;
}
.text-an{
color: #043FB9;
/* Body medium 14 */
font-size: 14px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 16px;
}

View File

@ -0,0 +1,24 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { ForgetPasswordComponent } from './forget-password.component';
describe('ForgetPasswordComponent', () => {
let component: ForgetPasswordComponent;
let fixture: ComponentFixture<ForgetPasswordComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ForgetPasswordComponent ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(ForgetPasswordComponent);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,170 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { AlertController, LoadingController, MenuController, NavController, ToastController } from '@ionic/angular';
import { AuthService } from '../auth.service';
import { VnmsService } from '../../vnms/vnms.service';
@Component({
selector: 'app-forget-password',
templateUrl: './forget-password.component.html',
styleUrls: ['./forget-password.component.scss'],
})
export class ForgetPasswordComponent implements OnInit {
public onLoginForm: FormGroup;
constructor(
public navCtrl: NavController,
public menuCtrl: MenuController,
public toastCtrl: ToastController,
public alertCtrl: AlertController,
public loadingCtrl: LoadingController,
private formBuilder: FormBuilder,
public _ser:AuthService,public _api:VnmsService
) { }
ionViewWillEnter() {
this.menuCtrl.enable(false);
}
ngOnInit() {
// this.onLoginForm = this.formBuilder.group({
// 'email': [null, Validators.compose([
// Validators.required
// ])],
// 'password': [null, Validators.compose([
// Validators.required
// ])]
// });
this.onLoginForm = new FormGroup({
email: new FormControl('', [Validators.required, Validators.email,Validators.pattern(
'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$',
),]),
});
}
async forgotPass() {
const alert = await this.alertCtrl.create({
header: 'Forgot Password?',
message: 'Enter you email address to send a reset link password.',
inputs: [
{
name: 'email',
type: 'email',
placeholder: 'Email'
}
],
buttons: [
{
text: 'Cancel',
role: 'cancel',
cssClass: 'secondary',
handler: () => {
console.log('Confirm Cancel');
}
}, {
text: 'Confirm',
handler: async () => {
const loader = await this.loadingCtrl.create({
duration: 2000
});
loader.present();
loader.onWillDismiss().then(async l => {
const toast = await this.toastCtrl.create({
//showCloseButton: true,
message: 'Email was sended successfully.',
duration: 3000,
position: 'bottom'
});
toast.present();
});
}
}
]
});
await alert.present();
}
// // //
goToRegister() {
this.navCtrl.navigateRoot('/register');
}
goToHome() {
//this.navCtrl.navigateRoot(['authentication/otp']);
let forgotMail = {'email': this.onLoginForm.value.email}
localStorage.setItem('email',forgotMail.email)
// let forgotMail = {'email':mailid}
console.log(forgotMail)
this._ser.getForgotToken(forgotMail).subscribe(res => {
if(res.status == 200){
this.navCtrl.navigateRoot(['authentication/otp']);
}
})
// console.log("enter", this.onLoginForm.value)
// let auth = { 'email': this.onLoginForm.value.email, 'password': this.onLoginForm.value.password};
// localStorage.clear();
// this._ser.getLoginToken(auth).subscribe(async (res:any) => {
// console.log(res)
// if(res.status == 200 || res.status == 'Logged in'){
// if (res.token !== '') {
// localStorage.setItem('user_token',res.token);
// localStorage.setItem('user_role',res.role);
// localStorage.setItem('user_name',res.userName);
// localStorage.setItem('email',res.email);
// localStorage.setItem('roleId',res.roleId);
// localStorage.setItem('rolePk',res.rolePk);
// this._api.sideDetails.next(res)
// // localStorage.setItem('email',JSON.stringify(auth))
// this.navCtrl.navigateRoot(['vnms/vnms-list']);
// const toast = this.toastCtrl.create({
// message: 'Login successfully ..!',
// duration: 3000,
// position: 'bottom',
// // closeButtonText: 'OK',
// //showCloseButton: true
// });
// (await toast).present();
// }
// }else{
// console.log('123')
// const toast = this.toastCtrl.create({
// message: res.message,
// duration: 3000,
// position: 'bottom',
// // closeButtonText: 'OK',
// //showCloseButton: true
// });
// (await toast).present();
// // this.showToast('warning', 'Somthing is Wrong...!',res.message);
// }
// })
}
login(){
this.navCtrl.navigateRoot(['authentication/login']);
}
dismiss(){
}
forget(){
this.navCtrl.navigateRoot(['authentication/forgetpass']);
}
}

View File

@ -57,16 +57,15 @@
</p>
<ion-item no-padding class="animated fadeInUp item-native">
<!-- <span class="input-fl">
Password
</span> -->
<ion-label position="floating" class="label-space" style=" padding-bottom: 15px;">
<!-- <ion-icon name="mail" item-start></ion-icon> -->
<ion-label position="floating" class="label-space" style="padding-bottom: 15px;">
Password
</ion-label>
<ion-input type="password" formControlName="password" style="border-radius: 7px;"></ion-input>
<ion-input formControlName="password" style="border-radius: 7px;">
<!-- <ion-icon name="lock" slot="start"></ion-icon> -->
<div class="input-icon-end" (click)="togglePasswordVisibility()">
<ion-icon #eyeIcon id="eyeIcon" name="{{ showPassword ? 'eye-off' : 'eye' }}"></ion-icon>
</div>
</ion-input>
</ion-item>
<p ion-text color="warning" class="text08" >
@ -96,7 +95,7 @@
<ion-grid>
<ion-row>
<ion-col size="10"> <span> Forgot Password ?</span></ion-col>
<ion-col size="10"> <span (click)="forget()"> Forgot Password ?</span></ion-col>
</ion-row>
</ion-grid>
@ -109,7 +108,7 @@
</ion-row>
</ion-grid>
<div>
<ion-button icon-left size="medium" expand="full" class="sub-btn" (click)="goToHome()" [disabled]="!onLoginForm.valid" tappable>
<ion-button icon-left size="medium" expand="full" class="addMore" (click)="goToHome()" [disabled]="!onLoginForm.valid" tappable>
<!-- <ion-icon name="log-in"></ion-icon> -->
Log in
</ion-button>
@ -118,9 +117,9 @@
<ion-col class="contact"> <span>
Still having issue logging in contact <br />
<span style="color: #BA0404;">
<a href="tel:+919841098401" style="color: #BA0404;">
+919841098401</span>
+919841098401</a>
</span></ion-col>

View File

@ -129,4 +129,33 @@ font-family: Roboto;
font-style: normal;
font-weight: 400;
line-height: 22px;
}
.addMore{
border-radius: 10px;
border: 2px solid #BA0404;
// background: #BA0404;
margin: 1rem;
background: #fff;
color:#fff;
}
.addMore:hover{
background: #BA0404;
color:#FFF;
}
.input-icon-end {
position: absolute;
top: 50%;
right: 8px;
transform: translateY(-50%);
cursor: pointer;
}
.input-icon-end ion-icon {
font-size: 20px;
color: gray;
}

View File

@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { Component, ElementRef, OnInit, Renderer2, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { AlertController, LoadingController, MenuController, NavController, ToastController } from '@ionic/angular';
import { AlertController, IonIcon, LoadingController, MenuController, NavController, ToastController } from '@ionic/angular';
import { AuthService } from '../auth.service';
import { VnmsService } from '../../vnms/vnms.service';
@ -12,8 +12,9 @@ import { VnmsService } from '../../vnms/vnms.service';
export class LoginPage implements OnInit {
public onLoginForm: FormGroup;
constructor(
showPassword: boolean = false;
@ViewChild('eyeIcon', { static: false }) eyeIcon: ElementRef;
constructor(private renderer: Renderer2,
public navCtrl: NavController,
public menuCtrl: MenuController,
public toastCtrl: ToastController,
@ -49,7 +50,11 @@ export class LoginPage implements OnInit {
// )])
});
}
togglePasswordVisibility() {
this.showPassword = !this.showPassword;
const eyeIconElement: ElementRef<HTMLElement> = this.eyeIcon;
this.renderer.setAttribute(eyeIconElement.nativeElement, 'name', this.showPassword ? 'eye-off' : 'eye');
}
async forgotPass() {
const alert = await this.alertCtrl.create({
header: 'Forgot Password?',
@ -111,11 +116,12 @@ export class LoginPage implements OnInit {
localStorage.setItem('user_token',res.token);
localStorage.setItem('user_role',res.role);
localStorage.setItem('user_name',res.userName);
localStorage.setItem('email',res.email);
localStorage.setItem('roleId',res.roleId);
localStorage.setItem('rolePk',res.rolePk);
this._api.sideDetails.next(res)
localStorage.setItem('email',JSON.stringify(auth))
this.navCtrl.navigateRoot(['vnms/vnms-list']);
// localStorage.setItem('email',JSON.stringify(auth))
this.navCtrl.navigateRoot(['vnms-list']);
const toast = this.toastCtrl.create({
message: 'Login successfully ..!',
duration: 3000,
@ -151,4 +157,8 @@ export class LoginPage implements OnInit {
dismiss(){
}
forget(){
this.navCtrl.navigateRoot(['authentication/forgetpass']);
}
}

View File

@ -22,7 +22,7 @@ import { OtpPageComponent } from '../otp-page/otp-page.component';
LoginRoutingModule,
MaterialModuleModule
],
declarations: [LoginPage,OtpPageComponent],
declarations: [LoginPage],
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
})
export class LoginModule { }

View File

@ -1,3 +1,132 @@
<p>
otp-page works!
</p>
<ion-content padding class="animated fadeIn login auth-page">
<!-- <form [formGroup]="onLoginForm" class="list-form"> -->
<div class="theme-bg"></div>
<div class="auth-content">
<!-- Logo -->
<div padding-horizontal text-center class="animated fadeInDown" >
<div class="logo"></div>
</div>
<ion-grid>
<ion-row>
<ion-col > <h4 class="align-right">
OTP Verification
</h4> </ion-col>
</ion-row>
<ion-row>
<ion-col > <span class="msg">Enter the 6 digit numbers sent to your email </span> </ion-col>
</ion-row>
<ion-row >
<ion-col>
<ion-input class="x" #otp1 required="true" maxLength="1" [(ngModel)] ="OTP[0]" (keyup)="otpController($event,otp2,'',0)">
</ion-input>
<ion-input class="x" #otp2 required="true" maxLength="1" [(ngModel)]="OTP[1]" (keyup)="otpController($event,otp3,otp1,1)">
</ion-input>
<ion-input class="x" #otp3 required="true" maxLength="1" [(ngModel)]="OTP[2]" (keyup)="otpController($event,otp4,otp2,2)">
</ion-input>
<ion-input class="x" #otp4 required="true" maxLength="1" [(ngModel)]="OTP[3]" (keyup)="otpController($event,otp5,otp3,3)">
</ion-input>
<ion-input class="x" #otp5 required="true" maxLength="1" [(ngModel)]="OTP[4]" (keyup)="otpController($event,otp6,otp4,4)">
</ion-input>
<ion-input class="x" #otp6 required="true" maxLength="1" [(ngModel)]="OTP[5]" (keyup)="otpController($event,'',otp5,5)">
</ion-input>
</ion-col>
</ion-row>
</ion-grid>
<!-- <p text-right tappable (click)="forgotPass()" class="paz">
<ion-text color="Dark">
<strong>Forgot Password ?</strong>
</ion-text>
</p> -->
<div>
<ion-grid >
<ion-row>
<ion-col class="contact"> <span>
If you didnt receive code,
<span class="text-an">
<a class="text-an" (click)="login()"> Resend</a></span>
</span></ion-col>
</ion-row>
</ion-grid>
<ion-button icon-left size="medium" expand="full" class="addMore" (click)="goToHome()" [disabled]="!submitCheck" tappable>
<!-- <ion-icon name="log-in"></ion-icon> -->
Set New Password
</ion-button>
<!-- <ion-grid>
<ion-row>
<ion-col style="text-align: center;color: #BA0404;"> </ion-col>
</ion-row>
</ion-grid> -->
<!-- <p text-center>
<ion-text color="light">
Or Signin with:
</ion-text>
</p> -->
<!-- <ion-grid class="btn-group">
<ion-row>
<ion-col size="4">
<ion-button shape="round" expand="full" color="secondary">
<ion-icon slot="icon-only" name="logo-facebook"></ion-icon>
</ion-button>
</ion-col>
<ion-col size="4">
<ion-button shape="round" expand="full" color="secondary">
<ion-icon slot="icon-only" name="logo-twitter"></ion-icon>
</ion-button>
</ion-col>
<ion-col size="4">
<ion-button shape="round" expand="full" color="secondary">
<ion-icon slot="icon-only" name="logo-googleplus"></ion-icon>
</ion-button>
</ion-col>
</ion-row>
</ion-grid> -->
</div>
<!-- Other links -->
<!-- <div text-center margin-top>
<span (click)="goToRegister()" class="paz" tappable>
<ion-text color="light">
New here? <strong>Sign Up</strong>
</ion-text>
</span>
</div> -->
</div>
<!-- </form> -->
</ion-content>

View File

@ -0,0 +1,171 @@
:host {
ion-content {
--background: rgba(255, 255, 255, 0.94);
}
.sc-ion-input-md {
border-radius: 10px !important;
border: 1px solid var(--gray-2, #A7A7A7) !important;
padding-left: 1rem;
}
.item-native{
--border-style: none !important;
}
ion-item{
// margin-top: -1.6rem !important;
}
}
.paz {
position: relative;
z-index: 10;
}
h4{
text-align: center;
}
:host {
background: none;
}
ion-content{
// background: url("/assets/img/login.png");
background: #fff ;
}
.fadeInDown .logo{
margin-top: 4rem;
}
.item-native {
border-style: none !important;
}
.label-space{
padding: 10px;
font-size: 14px;
font-family: Roboto;
font-weight: 500;
line-height: 16px;
}
.custom-margin-bottom:focus {
margin-bottom: 10px; /* Optional, if you want to retain the margin even after losing focus */
}
.input-fl {
display: grid !important;
}
.align-right{
text-align: left;
color: var(--text-4, #3A3A3A);
/* Heading -Medium 24 */
font-size: 24px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 30px;
}
.remember{
color: #6B6B6B;
text-align: center;
/* Body medium 12 */
font-size: 12px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 16px;
}
.forget{
color: #043FB9;
text-align: center;
/* Body medium 12 */
font-size: 12px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 16px;
}
.ion-checkbox{
color: #6B6B6B !important;
}
.sub-btn{
border-radius: 10px;
background: #BA0404;
height: 46px;
flex-shrink: 0;
}
.msg{
color: #6B6B6B;
text-align: center;
/* Body medium 14 */
font-size: 14px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 16px;
}
p{
margin-left: 2rem;
}
.contact{
color: #6B6B6B;
text-align: center;
/* Body regular 14 */
font-size: 14px;
font-family: Roboto;
font-style: normal;
font-weight: 400;
line-height: 16px;
}
.addMore{
border-radius: 10px;
border: 2px solid #BA0404;
// background: #BA0404;
margin: 1rem;
background: #fff;
color:#fff;
}
.addMore:hover{
background: #BA0404;
color:#FFF;
}
.text-an{
color: #043FB9;
/* Body medium 14 */
font-size: 14px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
line-height: 16px;
}
.x{
display: inline-block;
width: 33px;
height: 32px;
margin: 7px;
border-radius: 50%;
/* --background: #e1e1e1; */
--padding-start: 7px;
}

View File

@ -1,4 +1,9 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { AlertController, LoadingController, MenuController, NavController, ToastController } from '@ionic/angular';
import { AuthService } from '../auth.service';
import { VnmsService } from '../../vnms/vnms.service';
@Component({
selector: 'app-otp-page',
@ -7,8 +12,144 @@ import { Component, OnInit } from '@angular/core';
})
export class OtpPageComponent implements OnInit {
constructor() { }
submitCheck:boolean = false;
public onLoginForm: FormGroup;
OTP: any = []
OTP2: any = []
OTP3: any = []
OTP4: any = []
OTP5: any = []
OTP6: any = []
constructor(
public navCtrl: NavController,
public menuCtrl: MenuController,
public toastCtrl: ToastController,
public alertCtrl: AlertController,
public loadingCtrl: LoadingController,
private formBuilder: FormBuilder,
public _ser:AuthService,public _api:VnmsService
) { }
ngOnInit() {}
ionViewWillEnter() {
this.menuCtrl.enable(false);
}
ngOnInit() {
// this.onLoginForm = this.formBuilder.group({
// 'email': [null, Validators.compose([
// Validators.required
// ])],
// 'password': [null, Validators.compose([
// Validators.required
// ])]
// });
this.onLoginForm = new FormGroup({
email: new FormControl('', [ Validators.required]),
// password: new FormControl('', [Validators.required,Validators.pattern(
// '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*_=+-]).{8,12}$'
// )])
});
}
otpController(event:any,next:any,prev:any, index:any){
let i = index+1
if(i == 6) {
console.log("submit",this.OTP)
this.submitCheck = true
}
if(event.target.value.length < 1 && prev){
prev.setFocus()
}
else if(next && event.target.value.length>0){
next.setFocus();
}
else {
return 0;
}
}
async forgotPass() {
const alert = await this.alertCtrl.create({
header: 'Forgot Password?',
message: 'Enter you email address to send a reset link password.',
inputs: [
{
name: 'email',
type: 'email',
placeholder: 'Email'
}
],
buttons: [
{
text: 'Cancel',
role: 'cancel',
cssClass: 'secondary',
handler: () => {
console.log('Confirm Cancel');
}
}, {
text: 'Confirm',
handler: async () => {
const loader = await this.loadingCtrl.create({
duration: 2000
});
loader.present();
loader.onWillDismiss().then(async l => {
const toast = await this.toastCtrl.create({
//showCloseButton: true,
message: 'Email was sended successfully.',
duration: 3000,
position: 'bottom'
});
toast.present();
});
}
}
]
});
await alert.present();
}
// // //
goToRegister() {
this.navCtrl.navigateRoot('/register');
}
goToHome() {
let params = this.OTP.join('');
let email = localStorage.getItem('email')
let param ={email:email, otp:params, }
console.log(param)
this._ser.verifyOtp (param).subscribe((res:any) => {
if (res.status == 200) {
console.log(res)
this.navCtrl.navigateRoot(['authentication/confirm']);
}else{
}
})
}
login(){
this.navCtrl.navigateRoot(['authentication/login']);
}
dismiss(){
}
forget(){
this.navCtrl.navigateRoot(['authentication/forgetpass']);
}
}

View File

@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { NavController } from '@ionic/angular';
@Component({
selector: 'app-about',
@ -7,9 +8,17 @@ import { Component, OnInit } from '@angular/core';
})
export class AboutPage implements OnInit {
constructor() { }
constructor( public navCtrl: NavController,) {
console.log(0)
}
ngOnInit() {
console.log('dvdfsdgdfhbdfhgbdfb')
this.logout()
}
logout() {
localStorage.clear();
this.navCtrl.navigateRoot('/authentication/login');
}
}

View File

@ -1,10 +1,12 @@
<ion-header>
<ion-toolbar color="primary">
<ion-buttons slot="start">
<ion-back-button defaultHref="vnms-list" > <img src="assets/assets/icon/arrow-square-right.png"></ion-back-button>
</ion-buttons>
<ion-grid>
<ion-row>
<ion-col size="1.5" (click)="close()"> <img src="assets/assets/icon/arrow-square-right.png"></ion-col>
<ion-col size="1.5" >
<!-- <ion-col size="1.5" (click)="close()"> <img src="assets/assets/icon/arrow-square-right.png"></ion-col> -->
<ion-col size="3" >
<ion-buttons style=" height: 1.4rem;">
<ion-menu-button color="secondary"></ion-menu-button>
</ion-buttons>

View File

@ -1,10 +1,12 @@
<ion-header>
<ion-toolbar color="primary">
<ion-buttons slot="start">
<ion-back-button defaultHref="vnms-list" > <img src="assets/assets/icon/arrow-square-right.png"></ion-back-button>
</ion-buttons>
<ion-grid>
<ion-row>
<ion-col size="1.5" (click)="close()"> <img src="assets/assets/icon/arrow-square-right.png"></ion-col>
<ion-col size="1.5" >
<!-- <ion-col size="1.5" (click)="close()"> <img src="assets/assets/icon/arrow-square-right.png"></ion-col> -->
<ion-col size="3" >
<ion-buttons style=" height: 1.4rem;">
<ion-menu-button color="secondary"></ion-menu-button>
</ion-buttons>

View File

@ -8,16 +8,19 @@
New Order
</ion-text>
</ion-title> -->
<ion-grid>
<ion-buttons slot="start">
<ion-back-button defaultHref="driver-list" > <img src="assets/assets/icon/arrow-square-right.png"></ion-back-button>
</ion-buttons>
<ion-grid style=" padding-left: 0rem;
padding-right: 0rem;">
<ion-row>
<ion-col size="1.5" > <img src="assets/assets/icon/arrow-square-right.png"></ion-col>
<ion-col size="1.5" >
<!-- <ion-col size="1.5" > <img src="assets/assets/icon/arrow-square-right.png"></ion-col> -->
<ion-col size="2" >
<ion-buttons style=" height: 1.4rem;">
<ion-menu-button color="secondary"></ion-menu-button>
</ion-buttons>
</ion-col>
<ion-col size="9" > <ion-text color="medium" >
<ion-col size="10" > <ion-text color="medium" >
<span class="t-title" style="text-transform: capitalize;">View Order</span>
</ion-text></ion-col>
@ -36,7 +39,7 @@
<span class="head-w" style="text-transform: capitalize;"> ORDER ID: {{orderId}}</span>
</ion-col>
<ion-col size="12" class="tex-wm" >
<span style="text-transform: capitalize;"> Placed on July 23, 2023</span>
<span style="text-transform: capitalize;"> Placed on {{createdAt }}</span>
</ion-col>
</ion-row>
@ -68,7 +71,9 @@
</ion-col>
</ion-row>
<ion-button size="medium" expand="full" class="addMore2" (click)="goto()" no-margin>Call Customer</ion-button>
<a href="tel:+91{{phoneNo }}" *ngIf="orderstatus != 'Delivered'" style=" color: #3a3a3a;" > <ion-button size="medium" expand="full" class="addMore2" (click)="goto()" no-margin>
Call Customer</ion-button></a>
</ion-grid>
<ion-grid>

View File

@ -10,7 +10,7 @@ import { VnmsService } from '../../vnms.service';
export class ListOrderComponent implements OnInit {
orderId:any =[];
product:any =[];
countSum:any =[];
countSum:any =[];createdAt:any =[];
customerName:any=[];orderstatus:any=[];
address:any =[];city:any=[];pincode:any=[];phoneNo:any=[];
constructor(public _api:VnmsService, public navCtrl: NavController, public toastCtrl: ToastController) {
@ -40,7 +40,13 @@ export class ListOrderComponent implements OnInit {
this.city = this.product [0].OrderDetails[0].CusDetails[0].city
this.pincode = this.product [0].OrderDetails[0].CusDetails[0].pincode
this.phoneNo = this.product [0].OrderDetails[0].CusDetails[0].cusName
this.createdAt = new Date(this.product [0].createdAt)
let text = this.createdAt.toString();
this.createdAt = text.slice(0, 15);
this.phoneNo = this.product [0].OrderDetails[0].CusDetails[0].phoneNo
console.log(this.product [0].OrderDetails[0].CusDetails[0].phoneNo)
@ -67,7 +73,7 @@ export class ListOrderComponent implements OnInit {
console.log( this.product)
// let param ={id: this.orderPrimaryId, status:'canceled'}
// let param ={id: this.orderPrimaryId, status:'Cancelled'}
let tmp:any =[];
this.product.forEach((element:any) => {
tmp.push({id:element.id , status: 'Delivered'})

View File

@ -8,11 +8,13 @@
New Order
</ion-text>
</ion-title> -->
<ion-buttons slot="start">
<ion-back-button defaultHref="driver-list/summary" > <img src="assets/assets/icon/arrow-square-right.png"></ion-back-button>
</ion-buttons>
<ion-grid>
<ion-row>
<ion-col size="1.5" > <img src="assets/assets/icon/arrow-square-right.png"></ion-col>
<ion-col size="1.5" >
<!-- <ion-col size="1.5" > <img src="assets/assets/icon/arrow-square-right.png"></ion-col> -->
<ion-col size="3" >
<ion-buttons style=" height: 1.4rem;">
<ion-menu-button color="secondary"></ion-menu-button>
</ion-buttons>

View File

@ -17,9 +17,15 @@ export class OrderListSummaryComponent implements OnInit {
ngOnInit() {
this.orderId = localStorage.getItem('orderId')
let tmp = localStorage.getItem('orderIdReturn')
console.log('0')
let data ={orderId : this.orderId}
this._api.getProductslist(data).subscribe((res:any) => {
if(tmp == '0'){
this._api.getProductListSummary(data).subscribe((res:any) => {
console.log(res)
if(res.status == 200){
// res.data.forEach((element:any) => {
@ -42,6 +48,33 @@ export class OrderListSummaryComponent implements OnInit {
})
}else{
this._api.getReturnProductListSummary(data).subscribe((res:any) => {
console.log(res)
if(res.status == 200){
// res.data.forEach((element:any) => {
// element.ProductDetails[0]
// });
this.product = res.data
let tmp:any =[];
this.product.forEach((element:any) => {
tmp.push(element.qty)
});
const sum = tmp.reduce((b:any, a:any) => parseInt(b) + parseInt(a), 0);
console.log(sum); // 6
console.log(tmp);
this.countSum = sum
}
})
}
}
goto(){
this.navCtrl.navigateRoot(['/vnms-list',]);

View File

@ -8,17 +8,19 @@
New Order
</ion-text>
</ion-title> -->
<ion-buttons slot="start">
<ion-back-button defaultHref="vnms-list" > <img src="assets/assets/icon/arrow-square-right.png"></ion-back-button>
</ion-buttons>
<ion-grid>
<ion-row>
<ion-col size="1.5" > <img src="assets/assets/icon/arrow-square-right.png"></ion-col>
<ion-col size="1.5" >
<!-- <ion-col size="1.5" > <img src="assets/assets/icon/arrow-square-right.png"></ion-col> -->
<ion-col size="3" >
<ion-buttons style=" height: 1.4rem;">
<ion-menu-button color="secondary"></ion-menu-button>
</ion-buttons>
</ion-col>
<ion-col size="9" > <ion-text color="medium" >
<span class="t-title" style="text-transform: capitalize;">Empty Return Summary</span>
<span class="t-title" style="text-transform: capitalize;"> Summary</span>
</ion-text></ion-col>
</ion-row>
@ -37,6 +39,9 @@
<ion-content class="profile">
<ion-list-header color="light">
<h5>Delivery Product</h5>
</ion-list-header>
<ion-list-header color="light">
<ion-grid >
@ -58,7 +63,7 @@
<ion-grid class="under" *ngFor="let p of orderlist" (click)="list(p)">
<ion-row>
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.orderId}} </ion-label></ion-col>
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked">x</ion-label>
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked">x {{p.total_amount}}</ion-label>
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
</ion-col>
@ -84,6 +89,57 @@
</ion-list>
<hr>
<ion-list-header color="light">
<h5> Return Products </h5>
</ion-list-header>
<ion-list-header color="light">
<ion-grid >
<ion-row>
<ion-col class="align-center" size="1"> <ion-label color="dark" position="stacked" class="fw700"> </ion-label></ion-col>
<ion-col size="5"> <ion-label color="dark" position="stacked" class="fw700"> Product</ion-label></ion-col>
<ion-col class="align-right" size="5"> <ion-label color="dark" position="stacked" >Qty</ion-label>
<ion-col class="align-center" size="1"> <ion-label color="dark" position="stacked" class="fw700"> </ion-label></ion-col>
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
</ion-col>
</ion-row>
</ion-grid>
</ion-list-header>
<ion-list>
<ion-grid class="under" *ngFor="let p of orderlistReturn" (click)="list2(p)">
<ion-row>
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.orderId}} </ion-label></ion-col>
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked">x {{p.total_amount}}</ion-label>
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
</ion-col>
</ion-row>
<hr>
</ion-grid>
<ion-grid class="under" >
<ion-row>
<ion-col class="align-right" size="8"> <ion-label color="dark" class="title-ww2 align-right red12" position="stacked"> Total </ion-label></ion-col>
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked"> {{countSumReturn}} </ion-label>
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
</ion-col>
<!-- <ion-col size="1"> <ion-label color="dark" position="stacked"></ion-label></ion-col> -->
</ion-row>
<hr>
<!-- <ion-button size="medium" expand="full" class="addMore" (click)="goto()" no-margin>Cancel Order</ion-button>
<ion-button size="medium" expand="full" class="addMore" (click)="goto()" no-margin>Go Back to Homepage</ion-button> -->
</ion-grid>
</ion-list>
<hr>
</ion-content>

View File

@ -12,6 +12,7 @@ export class SummaryComponent implements OnInit {
orderId:any =[];
product:any =[];
countSum:any =[];
countSumReturn:any =[]; orderlistReturn:any=[];
constructor(public _api:VnmsService, public navCtrl: NavController) { }
ngOnInit() {
@ -28,7 +29,7 @@ export class SummaryComponent implements OnInit {
getorderlistApi(){
let param ={id:localStorage.getItem("rolePk")}
this._api.getDriverList(param).subscribe((res:any) => {
this._api.getDriverSummaryList(param).subscribe((res:any) => {
console.log(res)
if(res.status == 200){
@ -42,6 +43,43 @@ export class SummaryComponent implements OnInit {
});
// console.log(data)
this.orderlist = passData
let tmp:any =[];
this.orderlist.forEach((element:any) => {
tmp.push(element.total_amount)
});
const sum = tmp.reduce((b:any, a:any) => parseInt(b) + parseInt(a), 0);
// console.log(tmp);
this.countSum = sum
// this.random_ng_past()
}
})
this._api.getReturnDriverSummaryList(param).subscribe((res:any) => {
console.log(res)
if(res.status == 200){
let passData = res.data
passData.sort((a: any, b: any) => {
return b.orderCatogaryId - a.orderCatogaryId;
});
passData.forEach((element:any, index:any) => {
element.index = index +1
});
// console.log(data)
this.orderlistReturn = passData
let tmp:any =[];
this.orderlistReturn.forEach((element:any) => {
tmp.push(element.total_amount)
});
const sum = tmp.reduce((b:any, a:any) => parseInt(b) + parseInt(a), 0);
// console.log(tmp);
this.countSumReturn = sum
// this.random_ng_past()
}
})
@ -49,10 +87,16 @@ export class SummaryComponent implements OnInit {
list(data:any){
console.log(data)
localStorage.setItem('orderIdReturn','0')
localStorage.setItem('orderId',data.orderId)
this.navCtrl.navigateRoot(['/driver-list/summary/list',]);
}
list2(data:any){
console.log(data)
localStorage.setItem('orderIdReturn','1')
localStorage.setItem('orderId',data.orderId)
this.navCtrl.navigateRoot(['/driver-list/summary/list',]);
}
qtycheck(data:any){
let dataData ={orderId : data.orderId}
this._api.getProductslist(dataData).subscribe((res:any) => {
@ -72,7 +116,7 @@ export class SummaryComponent implements OnInit {
const sum = tmp.reduce((b:any, a:any) => parseInt(b) + parseInt(a), 0);
//console.log(sum); // 6
// console.log(tmp);
this.countSum = sum
return sum
}

View File

@ -8,11 +8,13 @@
New Order
</ion-text>
</ion-title> -->
<ion-buttons slot="start">
<ion-back-button defaultHref="driver-list/summary" > <img src="assets/assets/icon/arrow-square-right.png"></ion-back-button>
</ion-buttons>
<ion-grid>
<ion-row>
<ion-col size="1.5" > <img src="assets/assets/icon/arrow-square-right.png"></ion-col>
<ion-col size="1.5" >
<!-- <ion-col size="1.5" > <img src="assets/assets/icon/arrow-square-right.png"></ion-col> -->
<ion-col size="3" >
<ion-buttons style=" height: 1.4rem;">
<ion-menu-button color="secondary"></ion-menu-button>
</ion-buttons>
@ -29,7 +31,7 @@
<ion-content class="profile">
<ion-card no-margin>
<ion-card-content class="bg-profile">
<img src="assets/img/avatar.png">
<h1 class="fw500">{{user}}</h1>
<h2 color="light" margin-bottom>{{user_role}}</h2>
<!-- <ion-button icon-left color="secondary">
@ -43,9 +45,7 @@
<ion-col size="12" padding>
<ion-list margin-bottom>
<ion-list-header color="light">
<ion-label class="fw700">Profile</ion-label>
</ion-list-header>
<ion-item>
<ion-label color="dark" position="stacked"> Name:</ion-label>

View File

@ -1,7 +1,15 @@
:host {
ion-content {
--background: linear-gradient(-135deg, var(--ion-color-medium), var(--ion-color-light))
--border-style: none;
}
ion-label{
padding-bottom: 2rem;
}
ion-input {
--border-style: none;
}
}
.profile {
@ -10,7 +18,7 @@
border-radius: 0;
background-color: #fff;
ion-card-content {
padding: 32px;
padding: 6px;
background-color: var(--ion-color-primary);
color: #fff;
text-align: center;
@ -32,7 +40,8 @@
ion-item {
ion-input {
border-bottom: 1px solid var(--ion-color-tertiary);
// border-bottom: 1px solid var(--ion-color-tertiary);
//border-style: none !important;
}
}
@ -42,3 +51,4 @@
}
}
}

View File

@ -73,13 +73,20 @@ export class EditProfilePage implements OnInit {
this.formData.append('userName',tmp.userName)
this.formData.append('email', tmp.email);
if(tmp.password == null){
tmp.password2 == null
}
if(tmp.password != null && tmp.password2 != null){
if(tmp.password == tmp.password2){
this.formData.append('password', tmp.password);
}
}
let userRoleName = localStorage.getItem('user_role')
this.formData.append('role', userRoleName);
let cusId = localStorage.getItem('roleId')
this.formData.append('cusId', cusId);
this.formData.append('mobileNo', tmp.mobileNo);
@ -97,15 +104,15 @@ console.log(res)
loader.present();
loader.onWillDismiss().then(async l => {
const toast = await this.toastCtrl.create({
// showCloseButton: true,
cssClass: 'bg-profile',
message: 'Your Data was Edited!',
duration: 3000,
position: 'bottom'
});
// const toast = await this.toastCtrl.create({
// // showCloseButton: true,
// cssClass: 'bg-profile',
// message: 'Your Data was Edited!',
// duration: 3000,
// position: 'bottom'
// });
toast.present();
// toast.present();
this.navCtrl.navigateForward('/home-results');
});
}

View File

@ -37,7 +37,7 @@
<ion-row>
<ion-col > <span class="content">
Welcome, Gopikrishnan<br />
Welcome, {{user}}<br />
<span class="content-min">
What would you like to do</span>
@ -56,7 +56,7 @@
<ion-card-content (mouseover)="changeImageSrc(true)" (mouseout)="changeImageSrc(false)">
<img [src]="imageSrc"> <br />
Place a New Order
Place a New <br />Order
<!-- Card 1 content here -->
</ion-card-content>
</ion-card>
@ -67,13 +67,13 @@
<ion-card-content (mouseover)="changeImageSrc2(true)" (mouseout)="changeImageSrc2(false)">
<img [src]="imageSrc2"> <br />
View Your Orders
View Your <br /> Orders
<!-- Card 2 content here -->
</ion-card-content>
</ion-card>
</ion-col>
</ion-row>
<img src="assets/assets/img/Group 233.png">
<a href="http://vmed.in"><img src="assets/assets/img/Group 233.png"></a>
<ion-row>
<ion-col size="6">
<ion-card>
@ -91,7 +91,7 @@
<ion-card-content (mouseover)="changeImageSrc4(true)" (mouseout)="changeImageSrc4(false)">
<img [src]="imageSrc4"> <br />
Connect with Us
Connect with <br />Us
<!-- Card 4 content here -->
</ion-card-content>
</ion-card>
@ -108,7 +108,7 @@
<ion-card-content (mouseover)="changeImageSrc(true)" (mouseout)="changeImageSrc(false)">
<img [src]="imageSrc"> <br />
Assigned Orders
Assigned <br />Orders
<!-- Card 1 content here -->
</ion-card-content>
</ion-card>
@ -119,7 +119,7 @@
<ion-card-content (mouseover)="changeImageSrc2(true)" (mouseout)="changeImageSrc2(false)">
<img [src]="imageSrc2"> <br />
Empty Return
Empty Return<br />
Summary
<!-- Card 2 content here -->
</ion-card-content>
@ -140,14 +140,14 @@
</ion-card>
</ion-col>
<ion-col size="6">
<ion-card (click)="contact()">
<!-- <ion-card (click)="contact()">
<ion-card-content (mouseover)="changeImageSrc4(true)" (mouseout)="changeImageSrc4(false)">
<img [src]="imageSrc4"> <br />
Connect with Us
<!-- Card 4 content here -->
Connect with<br />Us
</ion-card-content>
</ion-card>
</ion-card> -->
</ion-col>
</ion-row>
</ion-grid>

View File

@ -82,6 +82,7 @@
font-style: normal;
font-weight: 500;
line-height: 30px;
text-transform: capitalize;
}
.content-min{

View File

@ -43,7 +43,7 @@ export class HomeResultsPage {
imageSrc3 = 'assets/assets/icon/msg-col.png';
imageSrc4 = 'assets/assets/icon/contact-color.png';
imageSrc5 = 'assets/assets/icon/user-color.png';
user_role:any =[];
user_role:any =[];user:any=[];
constructor(
public navCtrl: NavController,
public menuCtrl: MenuController,
@ -54,7 +54,7 @@ export class HomeResultsPage {
) {
this.user_role = localStorage.getItem('user_role')
this.user = localStorage.getItem('user_name')
}
ionViewWillEnter() {
@ -192,6 +192,8 @@ export class HomeResultsPage {
newOrder(){
console.log("new order")
this._api.orderDetails.next([])
localStorage.removeItem("createOrder");
this.navCtrl.navigateRoot(['create-report']);
}

View File

@ -2,6 +2,7 @@ import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AboutPage } from './about/about.page';
import { vnmsComponent } from './vnms/vnms.component';
import { AuthGuard } from 'src/app/guard/auth.guard';
const routes: Routes = [
@ -12,34 +13,50 @@ const routes: Routes = [
// // component:AboutPage
// },
{
path : '',
canActivate:[AuthGuard],
loadChildren:() => import('./about/about.module').then(m=>m.AboutPageModule)
},
{ path: 'vnms-list',
canActivate:[AuthGuard],
//loadChildren:() => import('./login/login.module').then(m=>m.LoginPageModule)
loadChildren:() => import('./home-results/home-results.module').then(m=>m.HomeResultsPageModule)
},
{ path: 'register',
canActivate:[AuthGuard],
loadChildren:() => import('./register/register.module').then(m=>m.RegisterPageModule)
},
{ path: 'about',
{ path: 'vnms',
loadChildren:() => import('./about/about.module').then(m=>m.AboutPageModule) },
{ path: 'settings',
loadChildren:() => import('./settings/settings.module').then(m=>m.SettingsPageModule) },
{ path: 'edit-profile',
canActivate:[AuthGuard],
loadChildren:() => import('./edit-profile/edit-profile.module').then(m=>m.EditProfilePageModule) },
{ path: 'home-results',
canActivate:[AuthGuard],
loadChildren:() => import('./home-results/home-results.module').then(m=>m.HomeResultsPageModule) },
{ path: 'create-report',
canActivate:[AuthGuard],
loadChildren:() => import('./vnms/create-report/create-report.module').then(m=>m.CreateReportPageModule) },
{ path: 'view-report',
canActivate:[AuthGuard],
loadChildren:() => import('./vnms/view-report/view-report.module').then(m=>m.ViewReportPageModule) },
{
path: 'driver-list',
canActivate:[AuthGuard],
loadChildren: () => import('./driver/driver-list/driver-list.module').then( m => m.DriverListPageModule)
},
{
path: 'contact',
canActivate:[AuthGuard],
loadChildren: () => import('./contact/contact.module').then( m => m.ContactPageModule)
},

View File

@ -66,6 +66,28 @@ export class VnmsService {
return this._http.post(this.apiUrl + 'getDriverList', addParams)
}
getDriverSummaryList(addParams:any): Observable<any> {
return this._http.post(this.apiUrl + 'getDriverSummaryList', addParams)
}
getReturnDriverSummaryList(addParams:any): Observable<any> {
return this._http.post(this.apiUrl + 'getReturnDriverSummaryList', addParams)
}
getProductListSummary(addParams:any): Observable<any> {
return this._http.post(this.apiUrl + 'getProductListSummary', addParams)
}
getReturnProductListSummary(addParams:any): Observable<any> {
return this._http.post(this.apiUrl + 'getReturnProductListSummary', addParams)
}
getDriverProductList(addParams:any): Observable<any> {
return this._http.post(this.apiUrl + 'getDriverProductList', addParams)

View File

@ -2,9 +2,12 @@
<ion-header>
<ion-toolbar color="primary">
<ion-buttons slot="start">
<ion-back-button defaultHref="create-report" > <img src="assets/assets/icon/arrow-square-right.png"></ion-back-button>
</ion-buttons>
<ion-grid>
<ion-row>
<ion-col size="1" (click)="close()"> <img src="assets/assets/icon/arrow-square-right.png"></ion-col>
<!-- <ion-col size="1" (click)="close()"> <img src="assets/assets/icon/arrow-square-right.png"></ion-col> -->
<ion-col size="3" >
<ion-buttons style=" height: 1.4rem;">
<ion-menu-button color="secondary"></ion-menu-button>
@ -40,7 +43,7 @@
<ion-grid class="under" *ngFor="let p of product">
<ion-row>
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.product.productName}} <br /><span *ngIf="p.productSpec != ''">({{p.productSpec}} )</span> </ion-label></ion-col>
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.json.productName}} <br /><span *ngIf="p.productSpec != ''">({{p.productSpec}} )</span> </ion-label></ion-col>
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked">x{{p.qty}}</ion-label>
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
</ion-col>

View File

@ -25,7 +25,7 @@ export class ConfirmAlertComponent implements OnInit {
this._api.orderDetails_observable$.subscribe((res:any) => {
console.log('booked', res);
if(res){
if(res.length>0){
this.product = res
let tmp:any =[];
this.product.forEach((element:any) => {
@ -48,7 +48,7 @@ export class ConfirmAlertComponent implements OnInit {
async sendData() {
this.product.forEach((element:any) => {
element.id = element.product.id
element.id = element.json.id
});
let cus = localStorage.getItem('roleId')
let role = localStorage.getItem('user_role')
@ -126,7 +126,8 @@ this.navCtrl.navigateRoot(['/create-report/summary/order-placed',]);
this.modalController.dismiss(0);
}
editData(){
this.navCtrl.navigateRoot(['create-report']);
}
}

View File

@ -19,11 +19,13 @@
New Order
</ion-text>
</ion-title> -->
<ion-buttons slot="start">
<ion-back-button defaultHref="vnms-list" > <img src="assets/assets/icon/arrow-square-right.png"></ion-back-button>
</ion-buttons>
<ion-grid>
<ion-row>
<ion-col size="1.5" (click)="close()"> <img src="assets/assets/icon/arrow-square-right.png"></ion-col>
<ion-col size="1.5" >
<!-- <ion-col size="1.5" (click)="close()"> </ion-col> -->
<ion-col size="3" >
<ion-buttons style=" height: 1.4rem;">
<ion-menu-button color="secondary"></ion-menu-button>
</ion-buttons>
@ -54,13 +56,13 @@
<ion-list *ngFor="let fieldGroup of inputFieldGroups; let i = index">
<ion-item>
<ion-select label="Default label" placeholder="Products" [(ngModel)]="fieldGroup.product">
<ion-select-option *ngFor="let p of product" (click)="val(p)" [value]="p">{{p.productName}}</ion-select-option>
<ion-select label="Default label" placeholder="Products" [(ngModel)]="fieldGroup.product" (ngModelChange)="onChange($event,i)">
<span *ngFor="let p of product"><ion-select-option *ngIf="hideProduct(p.productName) == false" [value]="p.id"><p >{{p.productName}}</p></ion-select-option></span>
</ion-select>
</ion-item>
<ion-item>
<ion-grid>
<ion-row> <ion-textarea *ngIf="check(inputFieldGroups[i]) === 'Mixed Gas'" class="textarea-r" label="Disabled textarea" [(ngModel)]="fieldGroup.productSpec" placeholder="Description"></ion-textarea> </ion-row>
<ion-row> <ion-textarea *ngIf="check(inputFieldGroups[i]) === 'Mixed Gas'" class="textarea-r" label="Disabled textarea" [(ngModel)]="fieldGroup.productSpec" placeholder="eg:- N2:CO2:O2 - 50:30:20"></ion-textarea> </ion-row>
<ion-row>
<ion-col style="
margin-top: 2%;"><a class="cancel" (click)="removeInputFieldGroup(i)">Remove</a></ion-col>
@ -80,7 +82,7 @@
</ion-grid>
</ion-item>
</ion-list>
<ion-button size="medium" expand="full" class="addMore" (click)="addInputFieldGroup()" no-margin><ion-icon class="sizeBig" name="add-outline"></ion-icon></ion-button>
<ion-button size="medium" expand="full" class="addMore" (click)="addInputFieldGroup()" no-margin><ion-icon class="sizeBig" name="add-outline"></ion-icon> Add Product</ion-button>
<!-- </ion-card> -->
<!-- <ion-card no-margin>
<ion-grid fixed no-padding>

View File

@ -122,7 +122,7 @@ color:#BA0404;
background: #FFF;
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.1);
margin: 1%;
padding: 3%;
text-align: center;
}
p{
@ -137,3 +137,4 @@ p{
label {
margin-right: 4px;
}

View File

@ -17,7 +17,8 @@ export class CreateReportPage implements OnInit {
mixedGas:any =[];
headTitle:any ='Create Order';
quantity:any =[];
inputFieldGroups: {product:string, qty: string, productSpec: string }[] = [{product:'', qty: '0', productSpec: '' }];
filterProduct:any =[];
inputFieldGroups: {product:any, qty: any, productSpec: any ,json:any}[] = [];
constructor(
public navCtrl: NavController,private modalController: ModalController,private route: ActivatedRoute,
public loadingCtrl: LoadingController, public alertCtrl: AlertController,
@ -36,6 +37,7 @@ export class CreateReportPage implements OnInit {
const param2 = params['param2'];
// Use the retrieved parameters as needed
});
console.log("enter consu")
}
// constructor(private route: ActivatedRoute) {
// const data = this.route.snapshot.data.state;
@ -147,6 +149,22 @@ export class CreateReportPage implements OnInit {
product.forEach((element:any) => {
this.productName .push(element.productName)
});
// this.filterProduct.push( this.product)
let tmp:any = localStorage.getItem('createOrder')
let resultAnswer = JSON.parse(tmp)
if(resultAnswer){
this.inputFieldGroups = resultAnswer
console.log( this.inputFieldGroups)
// this.inputFieldGroups.forEach(element => {
// if(element.json.productName != "Mixed Gas"){
// this.filterProduct.push(element.json.productName)
// }
// })
}
if(this.setData != undefined){
if( Object.keys(this.setData).length != 0){
@ -194,26 +212,68 @@ incrementQty(data:any,i:any){
}
addInputFieldGroup() {
console.log( this.inputFieldGroups)
this.inputFieldGroups.push({product:'', qty: '0', productSpec: '' }); // Add a new input field group to the array
// this.filterProduct.push( this.product)
let tmp =[]
this.inputFieldGroups.forEach(element => {
if(element.json.productName != "Mixed Gas"){
this.filterProduct.push(element.json.productName)
}else{
if(element.productSpec == ""){
tmp.push(1)
}
}
});
console.log( this.inputFieldGroups, this.filterProduct)
if(tmp.length==0){
this.inputFieldGroups.push({product:'', qty: 1, productSpec: '',json:'' });
}
// Add a new input field group to the array
// this.childButtonEvent.emit( this.inputFieldGroups);
}
removeInputFieldGroup(index: number) {
console.log( this.inputFieldGroups)
var myArray = this.filterProduct;
this.filterProduct = [...new Set(myArray)];
if( this.inputFieldGroups[index].json.productName != "Mixed Gas"){
const index1 =this.filterProduct.indexOf( this.inputFieldGroups[index].product.productName);
if (index1 > -1) { // only splice array when item is found
this.filterProduct.splice(index1, 1); // 2nd parameter means remove one item only
}
}
this.inputFieldGroups.splice(index, 1); // Remove the input field group at the specified index
// this.childButtonEvent.emit( this.inputFieldGroups);
}
val(data:any){
onChange(data:any,index:any){
console.log(data)
this.inputFieldGroups[index].json = this.product.filter((arr:any)=>{return arr.id == data})[0]
console.log(this.inputFieldGroups)
}
async viewData(){
this.inputFieldGroups
console.log(this.inputFieldGroups )
let product= this.inputFieldGroups.filter((arr:any)=>{return arr.qty != 0})
let result = product.filter((arr:any)=>{return arr.productName != "Mixed Gas"})
let product2= product.filter((arr:any)=>{return arr.json != ''})
let result:any = product2.filter((arr:any)=>{return arr.json != "Mixed Gas"})
if(result.length>0){
localStorage.setItem('createOrder',JSON.stringify(result))
this._api.orderDetails.next( result)
this.navCtrl.navigateRoot(['/create-report/summary']);
@ -229,6 +289,26 @@ val(data:any){
}
check(param:any){
//console.log(param['product'].productName)
return param['product'].productName
return param['json'].productName
}
triggerEvent(p:any,index:any){
console.log(p,index)
}
hideProduct(data:any){
if(this.filterProduct.length>0){
if(this.filterProduct.includes(data)){
return true
}else{
return false
}
}else{
return false
}
}
}

View File

@ -19,7 +19,7 @@
</ion-row>
<ion-button size="medium" expand="full" class="addMore" (click)="view()" no-margin>View Order</ion-button>
<ion-button size="medium" expand="full" class="addMore2" (click)="view()" no-margin>View Order</ion-button>
<ion-button size="medium" expand="full" class="addMore" (click)="goto()" no-margin>Go Back to Homepage</ion-button>
</ion-grid>

View File

@ -157,4 +157,21 @@ line-height: 16px;
.addMore:hover{
background: #BA0404;
color:#FFF;
}
.addMore2{
border-radius: 10px;
border: 2px solid #BA0404;
// background: #BA0404;
margin: 1rem;
background: #BA0404;
color:#FFF;
}
.addMore2:hover{
background: #fff;
color:#BA0404;
}

View File

@ -8,11 +8,13 @@
New Order
</ion-text>
</ion-title> -->
<ion-buttons slot="start">
<ion-back-button defaultHref="view-report" > <img src="assets/assets/icon/arrow-square-right.png"></ion-back-button>
</ion-buttons>
<ion-grid>
<ion-row>
<ion-col size="1.5" > <img src="assets/assets/icon/arrow-square-right.png"></ion-col>
<ion-col size="1.5" >
<!-- <ion-col size="1.5" > <img src="assets/assets/icon/arrow-square-right.png"></ion-col> -->
<ion-col size="3" >
<ion-buttons style=" height: 1.4rem;">
<ion-menu-button color="secondary"></ion-menu-button>
</ion-buttons>
@ -36,7 +38,7 @@
<span class="head-w" style="text-transform: capitalize;"> ORDER ID: {{orderId}}</span>
</ion-col>
<ion-col size="12" class="tex-wm" >
<span style="text-transform: capitalize;"> Placed on July 23, 2023</span>
<span style="text-transform: capitalize;"> Placed on {{createdAt }}</span>
</ion-col>
</ion-row>
@ -48,6 +50,73 @@
<ion-col size="12" class="title-w" >
<span class="head-wm" style="text-transform: capitalize;"> ORDER STATUS</span>
<ol class="stepper" *ngIf="orderStatus != 'Cancelled'">
<li class="stepper-item" [class.complete]="isOrderPlaced">
<span class="stepper-counter"></span>
<span href="#" class="stepper-link" [class.complete]="!isOrderPlaced">
<span>Order Placed <br />
<span class="info-date">{{createdAt }}</span></span>
</span>
<span class="stepper-line"></span>
</li>
<li class="stepper-item" [class.complete]="isProcessingOrder">
<span class="stepper-counter"></span>
<span href="#" class="stepper-link" [class.complete]="!isProcessingOrder">
<span>Processing your order <br />
<span *ngIf="isProcessingOrder" class="info-date">{{updateAt }}</span></span>
</span>
<span class="stepper-line"></span>
</li>
<li class="stepper-item" [class.complete]="isOutForDelivery">
<span class="stepper-counter"></span>
<span href="#" class="stepper-link" [class.complete]="!isOutForDelivery">
<span>Out for Delivery <br />
<span *ngIf="isOutForDelivery" class="info-date">{{updateAt }}</span></span>
</span>
<span class="stepper-line"></span>
</li>
<li class="stepper-item" [class.complete]="isDelivered">
<span class="stepper-counter"></span>
<span href="#" class="stepper-link" [class.complete]="!isDelivered">
<span>Delivered <br />
<span *ngIf="isDelivered" class="info-date">{{updateAt }}</span></span>
</span>
<span class="stepper-line"></span>
</li>
</ol>
<ol class="stepper" *ngIf="orderStatus == 'Cancelled'">
<li class="stepper-item" [class.complete]="isOrderPlaced">
<span class="stepper-counter"></span>
<span href="#" class="stepper-link" [class.complete]="!isOrderPlaced">
<span>Order Placed <br />
<span class="info-date">{{createdAt }}</span></span>
</span>
<span class="stepper-line"></span>
</li>
<li class="stepper-item" [class.complete]="isProcessingOrder">
<span class="stepper-counter"></span>
<span href="#" class="stepper-link" [class.complete]="!isProcessingOrder">
<span>Processing your order <br />
<span *ngIf="isProcessingOrder" class="info-date">{{updateAt }}</span></span>
</span>
<span class="stepper-line"></span>
</li>
<li class="stepper-item" [class.complete]="isOutForDelivery">
<span class="stepper-counter"></span>
<span href="#" class="stepper-link">
<span>Cancelled <br />
<span *ngIf="isOutForDelivery" class="info-date">{{updateAt }}</span></span>
</span>
<span class="stepper-line"></span>
</li>
</ol>
</ion-col>
<ion-col size="12" class="tex-wm" >
<!-- <div class="example-input-wrapper">
@ -148,8 +217,14 @@
</ion-row>
<hr>
<ion-button size="medium" expand="full" class="addMore" (click)="cancelOrder()" no-margin>Cancel Order</ion-button>
<ion-button size="medium" expand="full" class="addMore" (click)="goto()" no-margin>Go Back to Homepage</ion-button>
<!-- <ion-button size="medium" expand="full" class="addMore2" (click)="cancelOrder()" no-margin>Cancel Order</ion-button> -->
<ion-button size="medium" expand="full" class="addMore2" (click)="goto()" no-margin>Go Back to Homepage</ion-button>
<ion-row style="margin-top: 5rem;color: #BA0404;">
<ion-col class="align-right" size="8"> <a (click)="cancelOrder()" *ngIf="orderStatus == 'ordered'"><u>Cancel Order</u></a></ion-col>
<!-- <ion-col size="1"> <ion-label color="dark" position="stacked"></ion-label></ion-col> -->
</ion-row>
</ion-grid>
</ion-list>

View File

@ -163,6 +163,22 @@ line-height: normal;
color:#FFF;
}
.addMore2{
border-radius: 10px;
border: 2px solid #BA0404;
// background: #BA0404;
margin: 1rem;
background: #BA0404;
color:#FFF;
}
.addMore2:hover{
background: #fff;
color:#BA0404;
}
@ -181,5 +197,169 @@ line-height: normal;
border-left-color: rgba(0, 0, 0, 0.12) !important;
}
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100;200;300;400;500;600;700;800;900&display=swap");
*,
*:before,
*:after {
box-sizing: border-box;
}
button,
input,
select,
textarea {
font: inherit;
}
a {
color: inherit;
}
/* End basic CSS override */
:root {
--c-primary: #1d4ed8;
--c-secondary: #dbeafe;
--c-stepper-bg: #fff;
}
.stepper {
display: flex;
flex-direction: column;
counter-reset: stepper;
gap: 8px;
border: 2px solid var(--c-secondary);
background-color: var(--c-stepper-bg);
padding: 2rem;
border-radius: 10px;
}
.stepper-item {
display: grid;
grid-template-rows: [text-row] auto [line-row] 60px;
grid-template-columns: [counter-column] 28px [text-column] auto;
column-gap: 16px;
row-gap: 8px;
position: relative;
&.complete {
.stepper-counter {
// background-color: var(--c-secondary);
// color: var(--c-primary);
background-color: #1d4ed8;
color: #dbeafe;
// background-color: #dbeafe;
// color: #1d4ed8;
position: relative;
&:after {
position: absolute;
content: "";
display: block;
width: 16px;
height: 16px;
border-radius: 50%;
background-color: var(--c-stepper-bg);
right: -6px;
bottom: -6px;
// background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3Cpath fill='%231d4ed8' d='M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z'/%3E%3C/svg%3E");
background-size: 15px;
background-repeat: no-repeat;
background-position: center center;
}
}
}
&:last-child {
grid-template-rows: [text-row] auto;
}
}
.stepper-line {
display: block;
width: 2px;
background-color: #8f8f8f;
height: 3rem;
justify-self: center;
.stepper-item:last-child & {
display: none;
}
}
.stepper-counter {
flex-shrink: 0;
counter-increment: stepper;
&:before {
content: counter(stepper);
}
display: flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
// background-color: #dbeafe;
// color: #1d4ed8;
background-color: #a4a4a4;
color: #fff;
// background-color: #043fb9;
// color: #fff;
border-radius: 50%;
line-height: 1;
}
.stepper-link {
display: flex;
gap: 12px;
text-decoration: none;
color: var(--c-primary);
&.complete {
color: gray;
}
span {
padding-top: calc((28px - 1.5em) / 2);
font-weight: 600;
// border-bottom: 2px solid transparent;
}
&:after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
&:hover {
span {
border-color: currentcolor;
}
}
&:focus {
outline-offset: 4px;
outline-color: var(--c-primary);
outline-width: 2px;
border-radius: 4px;
}
}
*,
*:before,
*:after {
box-sizing: border-box;
}
.info-date{
color: #6B6B6B;
font-family: Roboto;
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: normal;
}

View File

@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { VnmsService } from '../../../vnms.service';
import { NavController, ToastController } from '@ionic/angular';
import { AlertController, NavController, ToastController } from '@ionic/angular';
import { FormBuilder, FormGroup } from '@angular/forms';
@Component({
@ -11,16 +11,52 @@ import { FormBuilder, FormGroup } from '@angular/forms';
export class ViewOrderComponent implements OnInit {
orderId:any =[];
product:any =[];
countSum:any =[];
orderPrimaryId:any =[];
constructor(public _api:VnmsService, public navCtrl: NavController,private _formBuilder: FormBuilder, public toastCtrl: ToastController,) { }
countSum:any =[];createdAt:any=[];updateAt:any=[];
orderPrimaryId:any =[];orderStatus:any =[];
isCancel:boolean = true;
isOrderPlaced: boolean = true; // Set the completion status based on your condition
isProcessingOrder: boolean = false;
isOutForDelivery: boolean = false;
isDelivered: boolean = false;
constructor( public alertCtrl: AlertController,public _api:VnmsService, public navCtrl: NavController,private _formBuilder: FormBuilder, public toastCtrl: ToastController,) { }
firstFormGroup: FormGroup = this._formBuilder.group({firstCtrl: ['']});
secondFormGroup: FormGroup = this._formBuilder.group({secondCtrl: ['']});
ngOnInit() {
this.orderId = localStorage.getItem('orderId')
this.orderPrimaryId = localStorage.getItem('orderPrimaryId')
this.orderStatus = localStorage.getItem('orderStatus')
if(this.orderStatus == "ordered"){
this.isOrderPlaced = true; // Set the completion status based on your condition
this.isProcessingOrder = false;
this.isOutForDelivery = false;
this.isDelivered = false;
}else if(this.orderStatus == "in progress"){
this.isOrderPlaced = true; // Set the completion status based on your condition
this.isProcessingOrder = true;
this.isOutForDelivery = false;
this.isDelivered = false;
}else if(this.orderStatus == "Out For Delivery"){
this.isOrderPlaced = true; // Set the completion status based on your condition
this.isProcessingOrder = true;
this.isOutForDelivery = true;
this.isDelivered = false;
}else if(this.orderStatus == "Delivered"){
this.isOrderPlaced = true; // Set the completion status based on your condition
this.isProcessingOrder = true;
this.isOutForDelivery = true;
this.isDelivered = true;
}else if(this.orderStatus == "Cancelled"){
this.isOrderPlaced = true; // Set the completion status based on your condition
this.isProcessingOrder = true;
this.isOutForDelivery = true;
this.isCancel = true;
}
let data ={orderId : this.orderId}
this._api.getProductslist(data).subscribe((res:any) => {
console.log(res)
@ -31,6 +67,16 @@ export class ViewOrderComponent implements OnInit {
this.product = res.data
this.createdAt = new Date(res.data[0].createdAt)
let text = this.createdAt.toString();
this.createdAt = text.slice(0, 15);
this.updateAt = new Date(res.data[0].updateAt)
let text2 = this.createdAt.toString();
this.updateAt = text2.slice(0, 15);
let tmp:any =[];
this.product.forEach((element:any) => {
@ -50,15 +96,34 @@ export class ViewOrderComponent implements OnInit {
this.navCtrl.navigateRoot(['/vnms-list',]);
}
cancelOrder(){
async cancelOrder(){
const alert = await this.alertCtrl.create({
header: 'Confirmation',
message: 'Are you sure you want to Cancel this Order?',
buttons: [
{
text: 'No',
role: 'cancel',
cssClass: 'secondary',
handler: () => {
console.log('Confirm Cancel');
}
}, {
text: 'Yes',
handler: () => {
console.log('Confirm Okay');
// Perform your desired action here
console.log( this.product)
this.orderPrimaryId = localStorage.getItem('orderPrimaryId')
// let param ={id: this.orderPrimaryId, status:'canceled'}
// let param ={id: this.orderPrimaryId, status:'Cancelled'}
let tmp:any =[];
this.product.forEach((element:any) => {
tmp.push({id:element.id , status: 'canceled'})
tmp.push({id:element.id , status: 'Cancelled'})
});
@ -73,7 +138,7 @@ export class ViewOrderComponent implements OnInit {
if (res.status == 200) {
console.log(res)
const toast = this.toastCtrl.create({
message: 'Your Order '+this.orderId+' has been Canceled...!',
message: 'Your Order '+this.orderId+' has been Cancelled...!',
duration: 3000,
position: 'bottom',
// closeButtonText: 'OK',
@ -89,9 +154,19 @@ export class ViewOrderComponent implements OnInit {
// this.windowRef.close(0);
}
})
}
}
}
]
});
await alert.present();
}
conditionMethod(param:any) {
// Logic to determine the condition dynamically
return 'stepper-item complete';
}
}

View File

@ -17,11 +17,13 @@
New Order
</ion-text>
</ion-title> -->
<ion-buttons slot="start">
<ion-back-button defaultHref="vnms-list" > <img src="assets/assets/icon/arrow-square-right.png"></ion-back-button>
</ion-buttons>
<ion-grid>
<ion-row>
<ion-col size="1.5" style="text-align: center;"> <img src="assets/assets/icon/arrow-square-right.png"></ion-col>
<ion-col size="1.5" >
<!-- <ion-col size="1.5" style="text-align: center;"> <img src="assets/assets/icon/arrow-square-right.png"></ion-col> -->
<ion-col size="3" >
<ion-buttons style=" height: 1.4rem;">
<ion-menu-button color="secondary"></ion-menu-button>
</ion-buttons>
@ -64,7 +66,7 @@
<span style="text-transform: capitalize;"> Placed on {{item.orderCreatedat | date: 'MMM d, y'}}</span>
</ion-col>
<ion-col class="title-s" size="6" style=" padding-left: 1rem;" >
<span [ngStyle]="{ 'color': item.status == 'ordered' ? '#04BA58' : (item.status == 'canceled' ? '#BA0404' : '#D44D01') }" >{{item.status}}</span>
<span [ngStyle]="{ 'color': item.status == 'ordered' ? '#04BA58' : (item.status == 'Cancelled' ? '#BA0404' :(item.status == 'Delivered' ? '#04BA58' : '#D44D01')) }" >{{item.status}}</span>
<!-- <img [src]="i != imgVal ? 'assets/assets/icon/menu/arrow-col.png' : 'assets/assets/icon/menu/arrow.png'"> -->
</ion-col>
</ion-row>

View File

@ -15,53 +15,7 @@ export class ViewReportPage implements OnInit {
ngOnInit() {
let tmp = [{
"pd_id": "101",
"imgc_fin_institute": null,
"pd_sno": "Ammaiyarkuppam",
"fk_lender_id": "Kamarajar Nagar",
"sub_entity_id": "36",
},{
"pd_id": "102",
"imgc_fin_institute": null,
"pd_sno": "Ammaiyarkuppam",
"fk_lender_id": "Kamarajar Nagar",
"sub_entity_id": "36",
},
{
"pd_id": "103",
"imgc_fin_institute": null,
"pd_sno": "Ammaiyarkuppam",
"fk_lender_id": "Kamarajar Nagar",
"sub_entity_id": "36",
},
{
"pd_id": "104",
"imgc_fin_institute": null,
"pd_sno": "Ammaiyarkuppam",
"fk_lender_id": "Kamarajar Nagar",
"sub_entity_id": "36",
},
{
"pd_id": "105",
"imgc_fin_institute": null,
"pd_sno": "Ammaiyarkuppam",
"fk_lender_id": "Kamarajar Nagar",
"sub_entity_id": "36",
},
{
"pd_id": "106",
"imgc_fin_institute": null,
"pd_sno": "Ammaiyarkuppam",
"fk_lender_id": "Kamarajar Nagar",
"sub_entity_id": "36",
}]
@ -116,11 +70,12 @@ export class ViewReportPage implements OnInit {
editData(data:any){
console.log(data)
localStorage.setItem('orderId',data.orderId)
if(data.status != "canceled"){
localStorage.setItem('orderStatus',data.status)
this._api.orderDetails.next(data)
this.navCtrl.navigateRoot(['create-report/view-order'] );
}
}
}

View File

@ -6,6 +6,7 @@ import { SplashScreen } from '@awesome-cordova-plugins/splash-screen/ngx';
import { StatusBar } from '@awesome-cordova-plugins/status-bar/ngx';
import { Pages } from '../interfaces/pages';
import { Router } from '@angular/router';
@Component({
selector: 'app-vnms',
templateUrl: './vnms.component.html',
@ -18,7 +19,7 @@ export class vnmsComponent {
public appPages: Array<Pages>;
constructor(
private platform: Platform,
private platform: Platform, private router: Router,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
public navCtrl: NavController
@ -50,7 +51,17 @@ export class vnmsComponent {
icon: 'cog'
}
];
console.log("hi")
let URL = this.router.url;
console.log(URL);
let URL_AS_LIST = URL.split('/');
console.log(URL_AS_LIST);
if(URL_AS_LIST[1]== "vnms"){
console.log("hi2")
this.logout()
}
this.initializeApp();
this.user = localStorage.getItem('user_name')
this.user_role = localStorage.getItem('user_role')

View File

@ -1,4 +1,4 @@
export const environment = {
production: true,
apiEndpoint:'http://192.168.1.23:8081/api/',
apiEndpoint:'https://dev.venbait.in/vnms/api/',
};

View File

@ -4,7 +4,7 @@
export const environment = {
production: false,
apiEndpoint:'http://192.168.1.23:8081/api/',
apiEndpoint:'https://dev.venbait.in/vnms/api/',
};
/*

View File

@ -9,7 +9,8 @@
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noImplicitReturns": false,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,