all work till 15 jan

This commit is contained in:
vivekm2 2025-01-15 18:26:54 +05:30
parent 81e5b8cf52
commit 017919aa4b
249 changed files with 127261 additions and 45869 deletions

2
build.sh Normal file
View file

@ -0,0 +1,2 @@
nvm use 8.12.0
time node --max_old_space_size=99999999 node_modules/@angular/cli/bin/ng build --prod --sourcemaps

2
build2.sh Normal file
View file

@ -0,0 +1,2 @@
nvm use 8.12.0
time node --max_old_space_size=99999 node_modules/@angular/cli/bin/ng build --prod

2211
run.sh Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,45 +0,0 @@
# fSelect
A jQuery select box replacement library ([live demo](https://facetwp.com/wp-content/plugins/facetwp/assets/vendor/fSelect/test.html))
<img src="http://i.imgur.com/yXOv8DG.png" width="208" height="223" />
### Usage
```javascript
$('.your-select').fSelect();
```
### Available options
```js
$('.your-select').fSelect({
placeholder: 'Select some options',
numDisplayed: 3,
overflowText: '{n} selected',
noResultsText: 'No results found',
searchText: 'Search',
showSearch: true
});
```
* **placeholder** (str) - the default placeholder text
* **numDisplayed** (int) - the number of values to show before switching to the `overflowText`
* **overflowText** (str) - the text to show after exceeding the `numDisplayed` limit
* **noResultsText** (str) - the text to show if no choices exist (or an empty string)
* **searchText** (str) - the search box placeholder text
* **showSearch** (bool) - show the search box?
### Methods
```js
$('.your-select').fSelect('reload');
$('.your-select').fSelect('destroy');
```
### Single vs. multi-select
Add the `multiple` attribute to your `<select>` to enable multi-select:
```html
<select class="your-select-box" multiple="multiple">
```

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,24 @@
<flash-messages style="float: center;margin:0px 1px;height:-6px;"></flash-messages> <flash-messages style="float: center;margin:0px 1px;height:-6px;"></flash-messages>
</div> </div>
</div> </div>
<!-- <div class="row no-gutters">
</div> -->
<div class="row" style="margin:0px"> <div class="row" style="margin:0px">
<div class="col-12" *ngIf="sup_admin == '620ca3e45abdcf25b5d866df'">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="inlineRadio1" name="bussinessType" value="0" [(ngModel)]="bussinessType">
<label class="form-check-label p-0" for="inlineRadio1">Normal</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="inlineRadio2" name="bussinessType" value="2" [(ngModel)]="bussinessType">
<label class="form-check-label p-0" for="inlineRadio2">OutLet</label>
</div>
</div>
<div class="col-6"> <div class="col-6">
<md-form-field class="example-full-width width"> <md-form-field class="example-full-width width">
<input mdInput type="text" [(ngModel)]="userID" placeholder="Enter User ID" name="userId" required> <input mdInput type="text" [(ngModel)]="userID" placeholder="Enter User ID" name="userId" required>

File diff suppressed because it is too large Load diff

View file

@ -74,6 +74,7 @@
<option *ngFor="let zone of timezoneArray" [value]="zone.value" [selected] = "zone.value === timezone">{{ zone.viewValue }}</option> <option *ngFor="let zone of timezoneArray" [value]="zone.value" [selected] = "zone.value === timezone">{{ zone.viewValue }}</option>
</select> </select>
</div> </div>
<div class="col-6" style="margin-bottom: 20px;"> <div class="col-6" style="margin-bottom: 20px;">
<lable>Inventory</lable> <lable>Inventory</lable>
<md-slide-toggle style="margin-top: 5px;" [(ngModel)]="inventoryManagement" ngDefaultControl> <md-slide-toggle style="margin-top: 5px;" [(ngModel)]="inventoryManagement" ngDefaultControl>
@ -86,6 +87,28 @@
</div> </div>
</div> </div>
<div class="row" style="margin:0px" *ngIf="_org._id == '6110fa23a6221d46dbebc473'">
<div class="col-6" style="padding-right: 0px">
<label for="customerType">Customer Type</label> <span>*</span>
<md-select class="example-full-width width" [(ngModel)]="customer_role">
<md-option value="normal">Normal</md-option>
<md-option value="kycApproval">Kyc Approval</md-option>
<md-option value="tag">Tag</md-option>
</md-select>
</div>
<div class="col-6" style="padding-right: 0px" *ngIf="customer_role !== 'normal'">
<label for="state" >State</label>
<md-select
class="example-full-width width"
[(ngModel)]="state">
<md-option value="all">All</md-option>
<md-option *ngFor="let item of states" [value]="item">
{{ item }}
</md-option>
</md-select>
</div>
</div>
<div class="row" style="margin:0px"> <div class="row" style="margin:0px">
<div class="col-12"> <span>{{'Upload Documents' | translate}} :</span> <div class="col-12"> <span>{{'Upload Documents' | translate}} :</span>
<button mdTooltip="upload Documents" style="border:1px solid transparent; background-color: transparent;cursor:pointer;float:right" (click)="AddDocumentsField('addedrow')"> <button mdTooltip="upload Documents" style="border:1px solid transparent; background-color: transparent;cursor:pointer;float:right" (click)="AddDocumentsField('addedrow')">

View file

@ -16,7 +16,7 @@ import {MdDialog, MdDialogRef, MD_DIALOG_DATA} from '@angular/material';
declare var swal: any; declare var swal: any;
declare var ol : any; declare var ol : any;
declare var $:any; declare var $:any;
declare var $: any, _: any;
@Component({ @Component({
selector: 'app-add-dealer', selector: 'app-add-dealer',
templateUrl: './add-dealer.component.html', templateUrl: './add-dealer.component.html',
@ -113,6 +113,9 @@ export class AddDealerComponent implements OnInit {
this.imageuploadObject.push(initialObj); this.imageuploadObject.push(initialObj);
} }
bussinessType:boolean=false; bussinessType:boolean=false;
db_token: any = { isDealer: false, isSuperAdmin: false };;
db_state_city_list:boolean=false;
_org = JSON.parse(localStorage.ORG);
ngOnInit() { ngOnInit() {
this.superAdmin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin; this.superAdmin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin;
this.fs = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).fn; this.fs = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).fn;
@ -123,6 +126,9 @@ bussinessType:boolean=false;
this.mb = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).phn; this.mb = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).phn;
// this.bussinessType=this.data.userInfo.bussinessType?this.data.userInfo.bussinessType=="1"?true:false:false // this.bussinessType=this.data.userInfo.bussinessType?this.data.userInfo.bussinessType=="1"?true:false:false
this.sup_admin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).supAdmin; this.sup_admin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).supAdmin;
this.db_token = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
);
var that = this; var that = this;
setTimeout(() => { setTimeout(() => {
that.telCountryCode = $("#telephone").intlTelInput({ that.telCountryCode = $("#telephone").intlTelInput({
@ -134,6 +140,7 @@ bussinessType:boolean=false;
}); });
}, 300); }, 300);
this.getAllState()
var Phoneinput = document.getElementById('telephone'); var Phoneinput = document.getElementById('telephone');
var that = this; var that = this;
Phoneinput.addEventListener("countrychange",function(p) { Phoneinput.addEventListener("countrychange",function(p) {
@ -205,8 +212,29 @@ this.latLongDetail()
this.emaill = null this.emaill = null
this.phone = null this.phone = null
} }
customer_role='normal';
state='all'
onUsertypeChange(event){
}
onStateChange(event) {
let stList: any = _.find(this.db_state_city_list, {
state: event.target.value,
});
}
states = [];
getAllState() {
this.contactService.get("/RTO_master/getAllState").subscribe((res: any) => {
for (var i = 0; i < res.length; i++) {
this.states.push(res[i]._id.state);
}
// this.states=res;
});
}
addContact2(){ addContact2(){
debugger
var tzone = $('#dbselect').multipleSelect('getSelects','value'); var tzone = $('#dbselect').multipleSelect('getSelects','value');
console.log(tzone); console.log(tzone);
var expDate = new Date() var expDate = new Date()
@ -217,6 +245,7 @@ this.latLongDetail()
countryCode : countryData.iso2, countryCode : countryData.iso2,
dialcode: countryData.dialCode dialcode: countryData.dialCode
} }
console.log('expDate=>',expDate); console.log('expDate=>',expDate);
if(this.first_name==null || this.last_name==null || this.passwordd==null) if(this.first_name==null || this.last_name==null || this.passwordd==null)
{ {
@ -254,6 +283,14 @@ this.latLongDetail()
address:this.address address:this.address
} }
if(this.customer_role !== 'normal'){
newContact2['customer_role']=this.customer_role;
newContact2['state']=this.state;
newContact2['organisation']=this._org._id
// newContact2['transportOfficeState']=this.state
// transportOfficeState
}
if(this.inventoryManagement!=undefined){ if(this.inventoryManagement!=undefined){
newContact2['inventoryManagement']=this.inventoryManagement; newContact2['inventoryManagement']=this.inventoryManagement;
} }
@ -354,7 +391,13 @@ this.latLongDetail()
// user_id:this.userID, // user_id:this.userID,
address:this.address address:this.address
} }
if(this.customer_role !== 'normal'){
newContact2['customer_role']=this.customer_role;
newContact2['state']=this.state;
newContact2['organisation']=this._org._id
// newContact2['transportOfficeState']=this.state
// transportOfficeState
}
if(this.phone){ if(this.phone){
newContact2['phone'] = this.phone ; newContact2['phone'] = this.phone ;
} }

View file

@ -1287,13 +1287,13 @@ li {
/* ------------------------------------ */ /* ------------------------------------ */
input { input {
display: block; display: block;
outline: none; // outline: none;
border: none !important; // border: none !important;
} }
textarea { textarea {
display: block; display: block;
outline: none; // outline: none;
} }
textarea:focus, textarea:focus,

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,19 @@
<app-all-menus></app-all-menus>
<div class="topDiv">
<div class="row"
style="text-align: center; background: #426E86; padding-top: 10px; padding-bottom: 10px; color: white;box-shadow:3px 1px 5px 0px rgb(178, 176, 174)">
<div class="col-sm-12 col-md-12 col-lg-12">
<h4>{{'Address' | translate}}</h4>
</div>
</div>
<!-- <span (click)="clickme('#downloadExcel379')">test </span> -->
<div class="row rowStyle">
<div class="container-fluid">
<div class="table-responsive">
<app-device-kyc></app-device-kyc>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AdminDeviceKYCComponent } from './admin-device-kyc.component';
describe('AdminDeviceKYCComponent', () => {
let component: AdminDeviceKYCComponent;
let fixture: ComponentFixture<AdminDeviceKYCComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AdminDeviceKYCComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AdminDeviceKYCComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,15 @@
import { Component, OnInit } from "@angular/core";
declare var $: any;
@Component({
selector: "app-admin-device-kyc",
templateUrl: "./admin-device-kyc.component.html",
styleUrls: ["./admin-device-kyc.component.scss"],
})
export class AdminDeviceKYCComponent implements OnInit {
constructor() {}
ngOnInit() {}
clickme(id) {
$(id).click();
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,23 +1,55 @@
<html> <html>
<head> <head> </head>
</head> <body>
<body> <md-toolbar
<md-toolbar flex *ngIf="showNav" style="background-color:white;width: 100%;overflow: hidden;position: fixed; top: 0;z-index: 9;border-bottom:1px solid #ddd"> flex
<img src={{this.logo}} routerLink="home" style="padding-top: 8px;cursor:pointer;border:none"> *ngIf="showNav"
<ul fxHide.sm="true" fxHide.xs="true" style="width:33%;padding:30px 10% 0 0;float:right" fxLayout="row"> style="
<p style="padding-top: 2%; background-color: white;
padding-left: 0%;">{{text}}</p> width: 100%;
overflow: hidden;
position: fixed;
top: 0;
z-index: 9;
border-bottom: 1px solid #ddd;
"
>
<img
src="{{ this.logo }}"
routerLink="home"
style="padding-top: 8px; cursor: pointer; border: none"
/>
<ul
fxHide.sm="true"
fxHide.xs="true"
style="width: 33%; padding: 30px 10% 0 0; float: right"
fxLayout="row"
>
<p style="padding-top: 2%; padding-left: 0%">{{ text }}</p>
</ul> </ul>
<ul fxShow fxHide.xs="false" fxHide.lg="true" fxHide.gt-sm="true" style="width:100%;padding-top: 18px;"> <ul
fxShow
fxHide.xs="false"
fxHide.lg="true"
fxHide.gt-sm="true"
style="width: 100%; padding-top: 18px"
>
<!-- <li style="width:25%;"> <!-- <li style="width:25%;">
<a style="font-size: 2.5vw; color: black; <a style="font-size: 2.5vw; color: black;
padding: 4em 6em;" routerLink="signup">SignUp</a> padding: 4em 6em;" routerLink="signup">SignUp</a>
</li> --> </li> -->
<li style="float:left;width:22%;padding-left:1.7em;"> <li style="float: left; width: 22%; padding-left: 1.7em">
<a color="blue" routerLink="login" style="font-size: 2.5vw;color: black;padding-left:2.3em">{{'Login' | translate}}</a> <a
color="blue"
routerLink="login"
style="font-size: 2.5vw; color: black; padding-left: 2.3em"
>{{ "Login" | translate }}</a
>
</li> </li>
<li style="float:right;width:40%;"> <li style="float: right; width: 40%">
<button md-button [mdMenuTriggerFor]="menu" style="padding:0%;"><i class="material-icons">list</i></button> <button md-button [mdMenuTriggerFor]="menu" style="padding: 0%">
<i class="material-icons">list</i>
</button>
<md-menu #menu="mdMenu"> <md-menu #menu="mdMenu">
<button md-menu-item routerLink="home">Home</button> <button md-menu-item routerLink="home">Home</button>
<button md-menu-item routerLink="support">Contact us</button> <button md-menu-item routerLink="support">Contact us</button>
@ -26,29 +58,59 @@
</md-menu> </md-menu>
</li> </li>
</ul> </ul>
<ul fxShow fxHide.xs="true" fxHide.lt-md="true" fxHide.gt-sm="false" style="float:right;width:50%; margin-top: 3%;"> <ul
fxShow
fxHide.xs="true"
fxHide.lt-md="true"
fxHide.gt-sm="false"
style="float: right; width: 50%; margin-top: 3%"
>
<!-- <li style="width:12%;float:right"> <!-- <li style="width:12%;float:right">
<a style="font-size: 15px;color: black;padding: 10%;" routerLink="signup" <a style="font-size: 15px;color: black;padding: 10%;" routerLink="signup"
routerLinkActive="active-link">SignUp</a> routerLinkActive="active-link">SignUp</a>
</li> --> </li> -->
<li style="width:10%;float:right"> <li style="width: 10%; float: right">
<a style="font-size: 15px;color: black;padding: 10%;" routerLink="login" routerLinkActive="active-link">Login</a> <a
style="font-size: 15px; color: black; padding: 10%"
routerLink="login"
routerLinkActive="active-link"
>Login</a
>
</li> </li>
<li style="width:12%;float:right;margin-right:34px"> <li style="width: 12%; float: right; margin-right: 34px">
<a style="font-size: 15px;color: black;padding: 10 19%;" routerLink="support" <a
routerLinkActive="active-link">Contact us</a> style="font-size: 15px; color: black; padding: 10 19%"
routerLink="support"
routerLinkActive="active-link"
>Contact us</a
>
</li> </li>
<li style="float:right;width:15%"> <li style="float: right; width: 15%">
<a color="blue" routerLink="about-us" style="font-size: 15px ;padding: 10 3%;color: black;" <a
routerLinkActive="active-link">About Us</a> color="blue"
routerLink="about-us"
style="font-size: 15px; padding: 10 3%; color: black"
routerLinkActive="active-link"
>About Us</a
>
</li> </li>
<li style="float:right;width:15%"> <li style="float: right; width: 15%">
<a color="blue" routerLink="services" style="font-size: 15px;padding: 10 3%;color: black;" <a
routerLinkActive="active-link">Services</a> color="blue"
routerLink="services"
style="font-size: 15px; padding: 10 3%; color: black"
routerLinkActive="active-link"
>Services</a
>
</li> </li>
<li style="float:right;width:10%"> <li style="float: right; width: 10%">
<a color="blue" routerLink="home" style="font-size: 15px;padding: 10 3%;color: black;" <a
routerLinkActive="active-link">Home</a> color="blue"
routerLink="home"
style="font-size: 15px; padding: 10 3%; color: black"
routerLinkActive="active-link"
>Home</a
>
</li> </li>
</ul> </ul>
</md-toolbar> </md-toolbar>
@ -105,8 +167,6 @@
</md-menu></li> </md-menu></li>
</ul> --> </ul> -->
<!-- <ul fxShow fxHide.xs="true" fxHide.lt-md="true" fxHide.gt-sm="false" style="float:right;width:30%; margin-top: 3%;"> <!-- <ul fxShow fxHide.xs="true" fxHide.lt-md="true" fxHide.gt-sm="false" style="float:right;width:30%; margin-top: 3%;">
<li style="width:27%;float:right"> <li style="width:27%;float:right">
<a style="font-size: 1.5vw; color: black;padding: 10%;" routerLink="signup">SignUp</a> <a style="font-size: 1.5vw; color: black;padding: 10%;" routerLink="signup">SignUp</a>
@ -123,7 +183,5 @@
<ng4-loading-spinner></ng4-loading-spinner> <ng4-loading-spinner></ng4-loading-spinner>
<router-outlet></router-outlet> <router-outlet></router-outlet>
<!-- </div> --> <!-- </div> -->
</body>
</body>
</html> </html>

View file

@ -1,80 +1,106 @@
import { environment } from './../environments/environment'; import { environment } from "./../environments/environment";
import { Component, Inject } from '@angular/core'; import { Component, Inject } from "@angular/core";
import { RouterLinkActive } from '@angular/router'; import { RouterLinkActive } from "@angular/router";
import { Title } from '@angular/platform-browser'; import { Title } from "@angular/platform-browser";
import {ContactService} from './contact.service'; import { ContactService } from "./contact.service";
import{Http, Headers} from '@angular/http'; import { Http, Headers } from "@angular/http";
import 'rxjs/add/operator/map'; import "rxjs/add/operator/map";
import { Observable } from 'rxjs/Observable'; import { Observable } from "rxjs/Observable";
import { Injectable } from '@angular/core'; import { Injectable } from "@angular/core";
import { TranslateService } from 'ng2-translate'; import { TranslateService } from "ng2-translate";
import { LoginComponent } from './login/login.component'; import { LoginComponent } from "./login/login.component";
import { DOCUMENT } from '@angular/common'; import { DOCUMENT } from "@angular/common";
@Injectable() @Injectable()
@Component({ @Component({
selector: 'app-root', selector: "app-root",
templateUrl: './app.component.html', templateUrl: "./app.component.html",
styleUrls: ['./app.component.css'], styleUrls: ["./app.component.css"],
providers: [LoginComponent], providers: [LoginComponent],
}) })
export class AppComponent { export class AppComponent {
userData:any; userData: any;
url:any; url: any;
logo:any; logo: any;
text:any; text: any;
address:any; address: any;
mobile:any; mobile: any;
dev_url = environment.hostUrl; dev_url = environment.hostUrl;
showMenu = environment.showLandingpageMenu; showMenu = environment.showLandingpageMenu;
headerfooterPadding:any; headerfooterPadding: any;
margintop:any; margintop: any;
showNav: boolean; showNav: boolean;
constructor(private titleService: Title,private contactService: ContactService,private http: Http,public translate: TranslateService,public loginComp : LoginComponent){ constructor(
console.log("showMenu=>",this.showMenu); private titleService: Title,
let split1 = document.URL.split('//')[1]; private contactService: ContactService,
let split2 = split1.split('/')[0]; private http: Http,
let splitForStyle = split1.split('/')[1]; public translate: TranslateService,
this.url = split2; public loginComp: LoginComponent
) {
let x: any = Array.from(document.getElementsByTagName("script")).map(
(el) => el.src
);
x = x.filter((src) => src.match(/main/))[0].split("/");
x = x[x.length - 1];
async function check() {
let text = (await fetch("/").then((x) => x.text())).match(
/main\..*\.js/
)[0];
console.log(x, text);
if (x != text) {
console.log("😀👢🐬 🅱⛎🕴👢🐬");
window.location.reload();
} else {
console.log("👢🅰🍄𝓔💲🍄 🅱⛎🕴👢🐬");
}
}
check();
setInterval(()=>{
check();
}, 3600000);
let split1 = document.URL.split("//")[1];
let split2 = split1.split("/")[0];
let splitForStyle = split1.split("/")[1];
this.url = split2;
// let split3 = document.URL.split('referrer_token')[1] || localStorage.getItem('referrer_token'); // let split3 = document.URL.split('referrer_token')[1] || localStorage.getItem('referrer_token');
var decode_token = function (token) {
var decode_token = function(token){ var decodeToken = function (token) {
var decodeToken = function(token){ return token ? window.atob(token) : token;
return token ? (window.atob(token)):token; };
} var parseToken = function (token) {
var parseToken = function(token){ if (token && typeof token == "string") {
if(token && typeof(token)=='string'){
try { try {
return JSON.parse(token) return JSON.parse(token);
} catch (e) { } catch (e) {
return ""; return "";
} }
} else return "";
};
var getData = function (token) {
return token
? {
referer: decodeToken(token._referrer),
username: decodeToken(token._u),
pass: decodeToken(token._p),
} }
else : null;
return ""; };
}
var getData = function(token){
return token ? {
"referer": decodeToken(token._referrer),
"username": decodeToken(token._u),
"pass": decodeToken(token._p)
} : null;
}
return getData(parseToken(decodeToken(token))); return getData(parseToken(decodeToken(token)));
} };
let token = document.URL.split('referrer_token=')[1] || localStorage.getItem('referrer_token='); let token =
console.log(token); document.URL.split("referrer_token=")[1] ||
var split3 = decode_token(token) ; localStorage.getItem("referrer_token=");
console.log(token);
var split3 = decode_token(token);
console.log(split3); console.log(split3);
if(split3 && split3.referer){ if (split3 && split3.referer) {
// var referrer_token = split3.substring(1); // var referrer_token = split3.substring(1);
// var referer_data = window.atob(referrer_token).split(","); // var referer_data = window.atob(referrer_token).split(",");
// var referer = referer_data[0].split("=")[1]; // var referer = referer_data[0].split("=")[1];
@ -91,19 +117,20 @@ console.log(token);
// user : username, // user : username,
// pass : password // pass : password
// } // }
localStorage.setItem('referer_obj',JSON.stringify(split3)); localStorage.setItem("referer_obj", JSON.stringify(split3));
localStorage.setItem('referrer_token=',token); localStorage.setItem("referrer_token=", token);
var referer = split3['referer']; var referer = split3["referer"];
this.contactService.getReferenceId(referer).subscribe(res=>{ this.contactService.getReferenceId(referer).subscribe(
(res) => {
// localStorage.setItem('referrer_token',split3); // localStorage.setItem('referrer_token',split3);
this.loginComp.loginemail() ; this.loginComp.loginemail();
},err=>{ },
(err) => {
console.log(err); console.log(err);
}) }
);
}else{ } else {
for (var i = 0; i < this.showMenu.length; i++) {
for(var i = 0; i <this.showMenu.length;i++){
if (this.url == this.showMenu[i]) { if (this.url == this.showMenu[i]) {
this.showNav = true; this.showNav = true;
return; return;
@ -112,52 +139,48 @@ console.log(token);
} }
} }
this.contactService.dealerInfo(this.url == 'localhost:4200' ?'www.oneqlik.in':this.url ).subscribe( this.contactService
data => { .dealerInfo(this.url == "localhost:4200" ? "www.oneqlik.in" : this.url)
this.userData = data .subscribe((data) => {
this.userData = data;
this.logo = this.dev_url+this.userData.logo; this.logo = this.dev_url + this.userData.logo;
this.titleService.setTitle(this.userData.organisationName); this.titleService.setTitle(this.userData.organisationName);
this.text=this.userData.text; this.text = this.userData.text;
this.address = this.userData.address; this.address = this.userData.address;
console.log("this.userData.email",this.userData.email); console.log("this.userData.email", this.userData.email);
// this.dealerId = // this.dealerId =
console.log("this.userData",this.userData); console.log("this.userData", this.userData);
window.localStorage['dealerName']= this.userData.dealerName; window.localStorage["dealerName"] = this.userData.dealerName;
window.localStorage['DealerID'] = this.userData.email; window.localStorage["DealerID"] = this.userData.email;
window.localStorage['DealerPhone'] =this.userData.contactNumber; window.localStorage["DealerPhone"] = this.userData.contactNumber;
window.localStorage['logo'] =this.logo; window.localStorage["logo"] = this.logo;
window.localStorage['address'] =this.userData.address; window.localStorage["address"] = this.userData.address;
window.localStorage['text'] = this.text; window.localStorage["text"] = this.text;
window.localStorage['mobile'] = this.userData.contactNumber; window.localStorage["mobile"] = this.userData.contactNumber;
window.localStorage['facebook'] = this.userData.facebook; window.localStorage["facebook"] = this.userData.facebook;
window.localStorage['android'] = this.userData.androidApp; window.localStorage["android"] = this.userData.androidApp;
window.localStorage['iphone'] = this.userData.appleApp; window.localStorage["iphone"] = this.userData.appleApp;
window.localStorage['organisationName'] = this.userData.organisationName; window.localStorage["organisationName"] =
if(window.localStorage[this.userData.dealerName]){ this.userData.organisationName;
if (window.localStorage[this.userData.dealerName]) {
console.log("Dealer Name =>", this.userData.dealerName); console.log("Dealer Name =>", this.userData.dealerName);
} }
}) });
// translate.setDefaultLang('en'); // translate.setDefaultLang('en');
// translate.use('en'); // translate.use('en');
}
} }
}; color: any;
fun1(value) {
if (value == "signup") {
color:any; this.color = "red";
fun1(value){
if(value=="signup"){
this.color='red';
// console.log(this.color); // console.log(this.color);
} }
} }
ngOnDestroy() { ngOnDestroy() {
window.localStorage.clear(); window.localStorage.clear();
} }
} }

View file

@ -1,311 +1,331 @@
import { Ng2OrderModule } from 'ng2-order-pipe'; import { Ng2OrderModule } from "ng2-order-pipe";
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from "@angular/platform-browser";
import { NgModule , NO_ERRORS_SCHEMA } from '@angular/core'; import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { AppComponent } from './app.component'; import { AppComponent } from "./app.component";
import { ModalModule, TimepickerModule } from 'ngx-bootstrap'; import { ModalModule, TimepickerModule } from "ngx-bootstrap";
import {FlexLayoutModule} from "@angular/flex-layout"; import { FlexLayoutModule } from "@angular/flex-layout";
import {NgxPaginationModule} from 'ngx-pagination'; import { NgxPaginationModule } from "ngx-pagination";
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import {TranslateModule, TranslateStaticLoader, TranslateLoader} from 'ng2-translate/ng2-translate'; import {
import { routes2 } from './dash/dash.router'; TranslateModule,
import { routes } from './app.router'; TranslateStaticLoader,
import {SoonComponent} from './soon/soon.component'; TranslateLoader,
import { CommunityComponent } from './community/community.component'; } from "ng2-translate/ng2-translate";
import { LoginComponent } from './login/login.component'; import { routes2 } from "./dash/dash.router";
import { SignupComponent } from './signup/signup.component'; import { routes } from "./app.router";
import { SupportComponent } from './support/support.component'; import { SoonComponent } from "./soon/soon.component";
import { HomeComponent } from './home/home.component'; import { CommunityComponent } from "./community/community.component";
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { LoginComponent } from "./login/login.component";
import { SignupComponent } from "./signup/signup.component";
import { SupportComponent } from "./support/support.component";
import { HomeComponent } from "./home/home.component";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
/* import { AuthService, AppGlobals } from 'angular2-google-login'; /* import { AuthService, AppGlobals } from 'angular2-google-login';
*/import { ReCaptchaModule } from 'angular2-recaptcha'; */ import { ReCaptchaModule } from "angular2-recaptcha";
import {ResponseOptions, Response, Http} from '@angular/http'; import { ResponseOptions, Response, Http } from "@angular/http";
import { HttpModule } from '@angular/http'; import { HttpModule } from "@angular/http";
import { StormpathModule } from 'angular-stormpath'; import { StormpathModule } from "angular-stormpath";
import { AlertComponent } from './alert.component'; import { AlertComponent } from "./alert.component";
import { AlertService } from './alert.service'; import { AlertService } from "./alert.service";
import { NguiPopupModule } from '@ngui/popup'; import { NguiPopupModule } from "@ngui/popup";
import {GmapComponent} from './gmap/gmap.component'; import { GmapComponent } from "./gmap/gmap.component";
import {LoginsucComponent} from './login_sucess/loginsuc.component'; import { LoginsucComponent } from "./login_sucess/loginsuc.component";
/* import { AgmCoreModule } from 'angular2-google-maps/core'; */ /* import { AgmCoreModule } from 'angular2-google-maps/core'; */
import { Ng2DropdownModule } from 'ng2-material-dropdown'; import { Ng2DropdownModule } from "ng2-material-dropdown";
import { DashComponent } from './dash/dash.component'; import { DashComponent } from "./dash/dash.component";
import { Data } from "./data"; import { Data } from "./data";
import { Ng2CarouselamosModule } from 'ng2-carouselamos'; import { Ng2CarouselamosModule } from "ng2-carouselamos";
import { CarouselModule } from 'ngx-bootstrap'; import { CarouselModule } from "ngx-bootstrap";
import { ChartsModule } from 'ng2-charts'; import { ChartsModule } from "ng2-charts";
import {CountDown} from "ng2-date-countdown"; import { CountDown } from "ng2-date-countdown";
import { SimpleTimer } from 'ng2-simple-timer'; import { SimpleTimer } from "ng2-simple-timer";
import { MomentModule } from 'angular2-moment'; import { MomentModule } from "angular2-moment";
// import { AgmCoreModule } from '@agm/core'; // import { AgmCoreModule } from '@agm/core';
/* import {GaugesModule} from 'ng-canvas-gauges/lib'; */ /* import {GaugesModule} from 'ng-canvas-gauges/lib'; */
import { GaugeModule } from "angular-gauge";
import { FlashMessagesModule } from "angular2-flash-messages";
import { FormWizardModule } from "angular2-wizard";
import { NoopAnimationsModule } from "@angular/platform-browser/animations";
import { GaugeModule } from 'angular-gauge'; import { AccountComponent } from "./account/account.component";
import { FlashMessagesModule } from 'angular2-flash-messages'; import { ProgressBarModule } from "ng2-progress-bar";
import { FormWizardModule } from 'angular2-wizard'; import { DashboardComponent } from "./dashboard/dashboard.component";
import { DialogContentExampleDialogComponent } from "./dialog-content-example-dialog/dialog-content-example-dialog.component";
import {NoopAnimationsModule} from '@angular/platform-browser/animations'; import { GatewayComponent } from "./gateway/gateway.component";
import { AccountComponent } from './account/account.component'; import { DragulaModule } from "ng2-dragula";
import {ProgressBarModule} from "ng2-progress-bar";
import { DashboardComponent } from './dashboard/dashboard.component';
import { DialogContentExampleDialogComponent } from './dialog-content-example-dialog/dialog-content-example-dialog.component';
import { GatewayComponent } from './gateway/gateway.component';
import { DragulaModule } from 'ng2-dragula';
// import { DatepickerModule } from 'angular2-material-datepicker' // import { DatepickerModule } from 'angular2-material-datepicker'
import { ExpansionPanelsModule } from 'ng2-expansion-panels'; import { ExpansionPanelsModule } from "ng2-expansion-panels";
import {ResizableModule} from 'angular2-resizable'; import { ResizableModule } from "angular2-resizable";
import { DetailsComponent } from './details/details.component'; import { DetailsComponent } from "./details/details.component";
import { RuleComponent } from './rule/rule.component'; import { RuleComponent } from "./rule/rule.component";
// import { ImageUploadModule } from "angular2-image-upload"; // import { ImageUploadModule } from "angular2-image-upload";
import { PasswordStrengthBarModule } from 'ng2-password-strength-bar'; import { PasswordStrengthBarModule } from "ng2-password-strength-bar";
import { ConstComponent } from './const/const.component'; import { ConstComponent } from "./const/const.component";
import { MDBBootstrapModule } from 'angular-bootstrap-md'; import { MDBBootstrapModule } from "angular-bootstrap-md";
import {NgbModule} from '@ng-bootstrap/ng-bootstrap'; import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
import { LocationComponent } from './location/location.component'; import { LocationComponent } from "./location/location.component";
import { EditScheComponent } from './edit-sche/edit-sche.component'; import { LocationNewComponent } from "./location/new-location/location.component";
import { DatepickerModule, BsDatepickerModule } from 'ngx-bootstrap/datepicker'; import { OpenMapComponent } from "./open-map/open-map.component";
import { AngularDateTimePickerModule } from 'angular2-datetimepicker'; import { EditScheComponent } from "./edit-sche/edit-sche.component";
import {IfScrollbarsModule} from 'ng2-if-scrollbars'; import { DatepickerModule, BsDatepickerModule } from "ngx-bootstrap/datepicker";
import { AngularDateTimePickerModule } from "angular2-datetimepicker";
import { IfScrollbarsModule } from "ng2-if-scrollbars";
// import { IonicApp, IonicModule } from 'ionic-angular'; // import { IonicApp, IonicModule } from 'ionic-angular';
import { LoaderServiceComponent } from './loader-service/loader-service.component'; import { LoaderServiceComponent } from "./loader-service/loader-service.component";
import { GeofencingComponent } from './geofencing/geofencing.component'; import { GeofencingComponent } from "./geofencing/geofencing.component";
import { GeofenceAddComponent } from './geofence-add/geofence-add.component'; import { GeofenceAddComponent } from "./geofence-add/geofence-add.component";
import { GeofencingViewComponent } from './geofencing-view/geofencing-view.component'; import { GeofencingViewComponent } from "./geofencing-view/geofencing-view.component";
import { GeofencingView2Component } from './geofencing-view2/geofencing-view2.component'; import { GeofencingView2Component } from "./geofencing-view2/geofencing-view2.component";
import { DeviceReportComponent } from './device-report/device-report.component'; import { DeviceReportComponent } from "./device-report/device-report.component";
import { DeviceEditComponent } from './dashboard/device-edit/device-edit.component'; import { DeviceEditComponent } from "./dashboard/device-edit/device-edit.component";
import { DeviceSpeedReportComponent } from './device-report/device-speed-report/device-speed-report.component'; import { DeviceSpeedReportComponent } from "./device-report/device-speed-report/device-speed-report.component";
import { DeviceShareComponent } from './dashboard/device-share/device-share.component'; import { DeviceShareComponent } from "./dashboard/device-share/device-share.component";
import { ShareUserComponent } from './dashboard/share-user/share-user.component'; import { ShareUserComponent } from "./dashboard/share-user/share-user.component";
import { DateTimePickerModule } from 'ng-pick-datetime'; import { DateTimePickerModule } from "ng-pick-datetime";
import { SpeednotifyComponent } from './dashboard/speednotify/speednotify.component'; import { SpeednotifyComponent } from "./dashboard/speednotify/speednotify.component";
import { ShareLocComponent } from './location/share-loc/share-loc.component'; import { ShareLocComponent } from "./location/share-loc/share-loc.component";
import { AddComponent } from './add/add.component'; import { AddComponent } from "./add/add.component";
import { ResetpwdComponent } from './resetpwd/resetpwd.component'; import { ResetpwdComponent } from "./resetpwd/resetpwd.component";
import { GetdevdetailComponent } from './const/getdevdetail/getdevdetail.component'; import { GetdevdetailComponent } from "./const/getdevdetail/getdevdetail.component";
import { IdealReportComponent } from './device-report/ideal-report/ideal-report.component'; import { IdealReportComponent } from "./device-report/ideal-report/ideal-report.component";
import { SidebarComponent } from './sidebar/sidebar.component'; import { SidebarComponent } from "./sidebar/sidebar.component";
import {DatainjectionService} from './datainjection.service'; import { DatainjectionService } from "./datainjection.service";
import {ContactService} from './contact.service'; import { ContactService } from "./contact.service";
import { NotificationComponent } from './notification/notification.component'; import { NotificationComponent } from "./notification/notification.component";
import { MyaccountComponent } from './myaccount/myaccount.component'; import { MyaccountComponent } from "./myaccount/myaccount.component";
import { AddCustComponent } from './add-cust/add-cust.component'; import { AddCustComponent } from "./add-cust/add-cust.component";
import { IgnReportComponent } from './device-report/ign-report/ign-report.component'; import { IgnReportComponent } from "./device-report/ign-report/ign-report.component";
import { SpecDevComponent } from './spec-dev/spec-dev.component'; import { SpecDevComponent } from "./spec-dev/spec-dev.component";
//import {NgxPaginationModule} from 'ngx-pagination'; //import {NgxPaginationModule} from 'ngx-pagination';
import {Ng2PaginationModule} from 'ng2-pagination'; import { Ng2PaginationModule } from "ng2-pagination";
import { AboutUsComponent } from './about-us/about-us.component'; import { AboutUsComponent } from "./about-us/about-us.component";
import { ServicesComponent } from './services/services.component'; import { ServicesComponent } from "./services/services.component";
import { TripDetailsComponent } from './device-report/trip-details/trip-details.component'; import { TripDetailsComponent } from "./device-report/trip-details/trip-details.component";
import { SummaryReportComponent } from './device-report/summary-report/summary-report.component'; import { SummaryReportComponent } from "./device-report/summary-report/summary-report.component";
import {GeofancingReportComponent} from './device-report/geofancing-report/geofancing-report.component'; import { GeofancingReportComponent } from "./device-report/geofancing-report/geofancing-report.component";
import { OverSpeedComponent } from './device-report/over-speed/over-speed.component'; import { OverSpeedComponent } from "./device-report/over-speed/over-speed.component";
import { RouteViolationComponent } from './device-report/route-violation/route-violation.component'; import { RouteViolationComponent } from "./device-report/route-violation/route-violation.component";
import { StoppageReportComponent } from './device-report/stoppage-report/stoppage-report.component'; import { StoppageReportComponent } from "./device-report/stoppage-report/stoppage-report.component";
import { IgnitionReportComponent } from './device-report/ignition-report/ignition-report.component'; import { IgnitionReportComponent } from "./device-report/ignition-report/ignition-report.component";
import { DistanceReportComponent } from './device-report/distance-report/distance-report.component'; import { DistanceReportComponent } from "./device-report/distance-report/distance-report.component";
import { AlertReportComponent } from './device-report/alert-report/alert-report.component'; import { AlertReportComponent } from "./device-report/alert-report/alert-report.component";
import { TripReportComponent } from './device-report/trip-report/trip-report.component'; import { TripReportComponent } from "./device-report/trip-report/trip-report.component";
import { GroupComponent } from './group/group.component'; import { GroupComponent } from "./group/group.component";
import { AddGroupComponent } from './add-group/add-group.component'; import { AddGroupComponent } from "./add-group/add-group.component";
import { DialogDemoComponent } from './dialog-demo/dialog-demo.component'; import { DialogDemoComponent } from "./dialog-demo/dialog-demo.component";
import { EditGroupComponent } from './edit-group/edit-group.component'; import { EditGroupComponent } from "./edit-group/edit-group.component";
import { DeleteGroupComponent } from './delete-group/delete-group.component'; import { DeleteGroupComponent } from "./delete-group/delete-group.component";
import { SidemenuFuelComponent } from './sidemenu-fuel/sidemenu-fuel.component'; import { SidemenuFuelComponent } from "./sidemenu-fuel/sidemenu-fuel.component";
import { VehicleRouteComponent } from './vehicle-route/vehicle-route.component'; import { VehicleRouteComponent } from "./vehicle-route/vehicle-route.component";
import { RouteSetComponent } from './route-set/route-set.component'; import { RouteSetComponent } from "./route-set/route-set.component";
import { ShowRouteComponent } from './show-route/show-route.component'; import { ShowRouteComponent } from "./show-route/show-route.component";
import { DealersInfoComponent } from './dealers-info/dealers-info.component'; import { DealersInfoComponent } from "./dealers-info/dealers-info.component";
import { RouteMappingComponent } from './route-mapping/route-mapping.component'; import { RouteMappingComponent } from "./route-mapping/route-mapping.component";
import { RouteMapAddComponent } from './route-map-add/route-map-add.component'; import { RouteMapAddComponent } from "./route-map-add/route-map-add.component";
import { PointOfIntrestComponent } from './point-of-intrest/point-of-intrest.component'; import { PointOfIntrestComponent } from "./point-of-intrest/point-of-intrest.component";
import { RouteDeleteComponent } from './route-delete/route-delete.component'; import { RouteDeleteComponent } from "./route-delete/route-delete.component";
import { AddDealerComponent } from './add-dealer/add-dealer.component'; import { AddDealerComponent } from "./add-dealer/add-dealer.component";
import { NotificationMasterComponent } from './notification-master/notification-master.component'; import { NotificationMasterComponent } from "./notification-master/notification-master.component";
import { EditCostumerComponent } from './edit-costumer/edit-costumer.component'; import { EditCostumerComponent } from "./edit-costumer/edit-costumer.component";
import { EditDealerComponent } from './edit-dealer/edit-dealer.component'; import { EditDealerComponent } from "./edit-dealer/edit-dealer.component";
import { DriversPerformanceReportComponent } from './device-report/drivers-performance-report/drivers-performance-report.component'; import { DriversPerformanceReportComponent } from "./device-report/drivers-performance-report/drivers-performance-report.component";
import { TripHistoryComponent } from './trip-history/trip-history.component'; import { TripHistoryComponent } from "./trip-history/trip-history.component";
import { PoiListComponent } from './poi-list/poi-list.component'; import { PoiListComponent } from "./poi-list/poi-list.component";
import { ShowCaliberationComponent} from './show-caliberation/show-caliberation.component'; import { ShowCaliberationComponent } from "./show-caliberation/show-caliberation.component";
import {VehicleTypeComponent} from './vehicle-type/vehicle-type.component'; import { VehicleTypeComponent } from "./vehicle-type/vehicle-type.component";
import { DriverDetailComponent } from './driver-detail/driver-detail.component'; import { DriverDetailComponent } from "./driver-detail/driver-detail.component";
import { DeviceModelComponent } from './device-model/device-model.component'; import { DeviceModelComponent } from "./device-model/device-model.component";
import { AddEditVehicleTypeComponent } from './add-edit-vehicle-type/add-edit-vehicle-type.component'; import { AddEditVehicleTypeComponent } from "./add-edit-vehicle-type/add-edit-vehicle-type.component";
import { AddDriverComponent } from './add-driver/add-driver.component'; import { AddDriverComponent } from "./add-driver/add-driver.component";
import { AddDeviceModelComponent } from './add-device-model/add-device-model.component'; import { AddDeviceModelComponent } from "./add-device-model/add-device-model.component";
import { MdButtonModule, MdCheckboxModule, MaterialModule,MdAutocompleteModule, MdDialogRef, MD_DIALOG_DATA } from '@angular/material'; import {
import { EditRouteMapComponent } from './edit-route-map/edit-route-map.component'; MdButtonModule,
import { POIdetailsComponent } from './poidetails/poidetails.component'; MdCheckboxModule,
import { PoiDtlDelComponent } from './poi-dtl-del/poi-dtl-del.component'; MaterialModule,
import { AcReportComponent } from './device-report/ac-report/ac-report.component'; MdAutocompleteModule,
import { FuelReportComponent } from './device-report/fuel-report/fuel-report.component'; MdDialogRef,
import { PoiMenuComponent } from './poi-menu/poi-menu.component'; MD_DIALOG_DATA,
import { AllMenusComponent } from './all-menus/all-menus.component'; } from "@angular/material";
import { LoadManagementComponent } from './load-management/load-management.component'; import { EditRouteMapComponent } from "./edit-route-map/edit-route-map.component";
import { FuelReportGraphComponent } from './fuel-report-graph/fuel-report-graph.component'; import { POIdetailsComponent } from "./poidetails/poidetails.component";
import { EditVehicleTypeComponent } from './edit-vehicle-type/edit-vehicle-type.component'; import { PoiDtlDelComponent } from "./poi-dtl-del/poi-dtl-del.component";
import { Ng2SearchPipeModule } from 'ng2-search-filter'; import { AcReportComponent } from "./device-report/ac-report/ac-report.component";
import { UserMasterComponent } from './user-master/user-master.component'; import { FuelReportComponent } from "./device-report/fuel-report/fuel-report.component";
import { DeviceComponent } from './device/device.component'; import { PoiMenuComponent } from "./poi-menu/poi-menu.component";
import { GpsMasterComponent } from './gps-master/gps-master.component'; import { AllMenusComponent } from "./all-menus/all-menus.component";
import { CmdPacketMasterComponent } from './cmd-packet-master/cmd-packet-master.component'; import { LoadManagementComponent } from "./load-management/load-management.component";
import { EditDeviceMasterComponent } from './device/edit-device-master/edit-device-master.component'; import { FuelReportGraphComponent } from "./fuel-report-graph/fuel-report-graph.component";
import { GpsEditMasterComponent } from './gps-master/gps-edit-master/gps-edit-master.component'; import { EditVehicleTypeComponent } from "./edit-vehicle-type/edit-vehicle-type.component";
import { POIReportComponent } from './device-report/poi-report/poi-report.component'; import { Ng2SearchPipeModule } from "ng2-search-filter";
import { AddpoiBylocationComponent } from './addpoi-bylocation/addpoi-bylocation.component'; import { UserMasterComponent } from "./user-master/user-master.component";
import { POIreportComponent } from './poireport/poireport.component'; import { DeviceComponent } from "./device/device.component";
import { LRNumberComponent } from './lr-number/lr-number.component'; import { GpsMasterComponent } from "./gps-master/gps-master.component";
import { DayWiseReportComponent } from './device-report/day-wise-report/day-wise-report.component'; import { CmdPacketMasterComponent } from "./cmd-packet-master/cmd-packet-master.component";
import { DeviceFuelReportComponent } from './device-report/device-fuel-report/device-fuel-report.component'; import { EditDeviceMasterComponent } from "./device/edit-device-master/edit-device-master.component";
import { SOSAlertComponent } from './sosalert/sosalert.component'; import { GpsEditMasterComponent } from "./gps-master/gps-edit-master/gps-edit-master.component";
import { EditDeviceModelComponent } from './edit-device-model/edit-device-model.component'; import { POIReportComponent } from "./device-report/poi-report/poi-report.component";
import { PoiMasterEditComponent } from './poi-master-edit/poi-master-edit.component'; import { AddpoiBylocationComponent } from "./addpoi-bylocation/addpoi-bylocation.component";
import { NotificationSettingComponent } from './notification-setting/notification-setting.component'; import { POIreportComponent } from "./poireport/poireport.component";
import { DeviceSOSreportComponent } from './device-report/device-sosreport/device-sosreport.component'; import { LRNumberComponent } from "./lr-number/lr-number.component";
import { SearchFilterPipe } from './search-filter.pipe'; import { DayWiseReportComponent } from "./device-report/day-wise-report/day-wise-report.component";
import { LiveHistoryComponent } from './location/live-history/live-history.component'; import { DeviceFuelReportComponent } from "./device-report/device-fuel-report/device-fuel-report.component";
import { DeviceEntryComponent } from './device-entry/device-entry.component'; import { SOSAlertComponent } from "./sosalert/sosalert.component";
import { InventoryListComponent } from './inventory-list/inventory-list.component'; import { EditDeviceModelComponent } from "./edit-device-model/edit-device-model.component";
import { AcreportInfoComponent } from './device-report/ac-report/acreport-info/acreport-info.component'; import { PoiMasterEditComponent } from "./poi-master-edit/poi-master-edit.component";
import { GeneralSettingsComponent } from './dashboard/general-settings/general-settings.component'; import { NotificationSettingComponent } from "./notification-setting/notification-setting.component";
import { DistributersListComponent } from './distributers-list/distributers-list.component'; import { DeviceSOSreportComponent } from "./device-report/device-sosreport/device-sosreport.component";
import { AddDistributersComponent } from './add-distributers/add-distributers.component'; import { SearchFilterPipe } from "./search-filter.pipe";
import { CostumerSupportComponent } from './costumer-support/costumer-support.component'; import { LiveHistoryComponent } from "./location/live-history/live-history.component";
import { CreateTripComponent } from './location/create-trip/create-trip.component'; import { DeviceEntryComponent } from "./device-entry/device-entry.component";
import { TripByDeviceComponent } from './device-report/trip-by-device/trip-by-device.component'; import { InventoryListComponent } from "./inventory-list/inventory-list.component";
import { FuelObjectcomponentComponent } from './fuel-objectcomponent/fuel-objectcomponent.component'; import { AcreportInfoComponent } from "./device-report/ac-report/acreport-info/acreport-info.component";
import { TravelPathReportComponent } from './device-report/travel-path-report/travel-path-report.component'; import { GeneralSettingsComponent } from "./dashboard/general-settings/general-settings.component";
import { ExpenseComponentComponent } from './device-report/trip-by-device/expense-component/expense-component.component'; import { DistributersListComponent } from "./distributers-list/distributers-list.component";
import { ExpenselistComponent } from './device-report/trip-by-device/expenselist/expenselist.component'; import { AddDistributersComponent } from "./add-distributers/add-distributers.component";
import { ReportSettingComponent } from './add/report-setting/report-setting.component'; import { CostumerSupportComponent } from "./costumer-support/costumer-support.component";
import { NormalCertComponent } from './device/normal-cert/normal-cert.component'; import { CreateTripComponent } from "./location/create-trip/create-trip.component";
import { CertOptionComponent } from './device/cert-option/cert-option.component'; import { TripByDeviceComponent } from "./device-report/trip-by-device/trip-by-device.component";
import { IdleReportComponent } from './device-report/idle-report/idle-report.component'; import { FuelObjectcomponentComponent } from "./fuel-objectcomponent/fuel-objectcomponent.component";
import { VehicleReminderComponent } from './vehicle-reminder/vehicle-reminder.component'; import { TravelPathReportComponent } from "./device-report/travel-path-report/travel-path-report.component";
import { ExpenseComponentComponent } from "./device-report/trip-by-device/expense-component/expense-component.component";
import { ExpenselistComponent } from "./device-report/trip-by-device/expenselist/expenselist.component";
import { ReportSettingComponent } from "./add/report-setting/report-setting.component";
import { NormalCertComponent } from "./device/normal-cert/normal-cert.component";
import { CertOptionComponent } from "./device/cert-option/cert-option.component";
import { IdleReportComponent } from "./device-report/idle-report/idle-report.component";
import { VehicleReminderComponent } from "./vehicle-reminder/vehicle-reminder.component";
import { AddReminderComponent } from "./vehicle-reminder/add-reminder/add-reminder.component";
import { ImmobilizeComponent } from "./location/immobilize/immobilize.component";
import { ReportFilterComponent } from "./device-report/report-filter/report-filter.component";
import { ResetPasswordComponent } from "./add/reset-password/reset-password.component";
import { DealerPermissionComponent } from "./dealers-info/dealer-permission/dealer-permission.component";
import { DashboardContentComponent } from "./add/dashboard-content/dashboard-content.component";
import { SharedDevicesComponent } from "./const/shared-devices/shared-devices.component";
import { DailyLogsComponent } from "./device-report/daily-logs/daily-logs.component";
import { VehicleExpensesComponent } from "./vehicle-expenses/vehicle-expenses.component";
import { AddVehicleExpensesComponent } from "./vehicle-expenses/add-vehicle-expenses/add-vehicle-expenses.component";
import { VehicleExpenseDetailComponent } from "./vehicle-expenses/vehicle-expense-detail/vehicle-expense-detail.component";
import { ProductSummaryComponent } from "./product-summary/product-summary.component";
import { AddProductComponent } from "./product-summary/add-product/add-product.component";
import { ProductShopComponent } from "./product-shop/product-shop.component";
import { ProductOverviewComponent } from "./product-shop/product-overview/product-overview.component";
import { PointShareComponent } from "./point-share/point-share.component";
import { MessageUtilityComponent } from "./message-utility/message-utility.component";
import { TripLoadUnloadComponent } from "./device-report/trip-load-unload/trip-load-unload.component";
import { BuyNowComponent } from "./product-shop/buy-now/buy-now.component";
import { BillingInfoComponent } from "./product-shop/billing-info/billing-info.component";
import { OrderSummaryComponent } from "./product-shop/order-summary/order-summary.component";
import { OrderDetailsComponent } from "./product-shop/order-details/order-details.component";
import { DemoVideosComponent } from "./const/demo-videos/demo-videos.component";
import { SafePipe } from "./const/safe.pipe";
import { BillingDashboardComponent } from "./billing-dashboard/billing-dashboard.component";
import { WorkingHourDetailComponent } from "./device-report/working-hour-detail/working-hour-detail.component";
import { WorkingHourReportComponent } from "./device-report/working-hour-report/working-hour-report.component";
import { AccountDetailComponent } from "./account-detail/account-detail.component";
import { TempretureGraphComponent } from "./device-report/tempreture-graph/tempreture-graph.component";
import { CensorDisplayComponent } from "./censor-display/censor-display.component";
import { ManualAddressComponent } from "./const/manual-address/manual-address.component";
import { AddressUpdateComponent } from "./address-update/address-update.component";
import { CmdUIComponent } from "./location/cmd-ui/cmd-ui.component";
import { CommanQueueComponent } from "./comman-queue/comman-queue.component";
import { CommandWindowComponent } from "./location/command-window/command-window.component";
import { AddDeviceComponent } from "./location/add-device/add-device.component";
import { MaintananceComponent } from "./device-report/maintanance/maintanance.component";
import { SubAminComponent } from "./sub-amin/sub-amin.component";
import { AddsubadminComponent } from "./sub-amin/addsubadmin/addsubadmin.component";
import { PlayTripComponent } from "./play-trip/play-trip.component";
import { TempretureReportComponent } from "./device-report/tempreture-report/tempreture-report.component";
import { CommentWindowComponent } from "./comment-window/comment-window.component";
import { DetailComponent } from "./device-report/distance-report/details/details.component";
import { DailyDetailsComponent } from "./device-report/daily-details/daily-details.component";
import { AnnouncementComponent } from "./const/announcement/announcement.component";
import { ReportModule } from "./report/report.module";
import { ReportService } from "./report/report.service";
import { DeviceRenewComponent } from "./device-renew/device-renew.component";
import { ReportScheduleComponent } from "./report-schedule/report-schedule.component";
import { DeviceListComponent } from "./device-list/device-list.component";
import { TollComponent } from "./toll/toll.component";
import { RenewalHistoryComponent } from "./dashboard/renewal-history/renewal-history.component";
import { DeviceInventoryComponent } from "./device-inventory/device-inventory.component";
import { SelectUntrackVehiclesComponent } from "./geofencing/select-untrack-vehicles/select-untrack-vehicles.component";
import { IssueListComponent } from "./issue-list/issue-list.component";
import { TechnicianComponent } from "./technician/technician.component";
import { JobCardComponent } from "./job-card/job-card.component";
import { AddJobCardComponent } from "./job-card/add-job-card/add-job-card.component";
import { RechargeComponent } from "./recharge/recharge.component";
import { AddPlanComponent } from "./account-detail/add-plan/add-plan.component";
import { RenewVehicleComponent } from "./dashboard/renew-vehicle/renew-vehicle.component";
import { RoutePlanComponent } from "./route-plan/route-plan.component";
import { RoutPlanReportComponent } from "./rout-plan-report/rout-plan-report.component";
import { ShowPullDataLinkComponent } from "./add/show-pull-data-link/show-pull-data-link.component";
import { NewTempReportComponent } from "./device-report/tempreture-report/new-temp-report/new-temp-report.component";
import { RouteListComponent } from "./route-plan/route-list/route-list.component";
import { HualtListComponent } from "./route-plan/hualt-list/hualt-list.component";
import { InactiveAdminComponent } from "./inactive-admin/inactive-admin.component";
import { UserFinderComponent } from "./user-finder/user-finder.component";
import { ShowVehiclesComponent } from "./show-vehicles/show-vehicles.component";
import { ViewCustomerDetailsComponent } from "./add/view-customer-details/view-customer-details.component";
import { OtpScreenComponent } from "./add/otp-screen/otp-screen.component";
import { KycApprovalComponent } from "./kyc-approval/kyc-approval.component";
import { FuelPriceComponent } from "./fuel-price/fuel-price.component";
import { AddFuelPriceComponent } from "./add-fuel-price/add-fuel-price.component";
import { ShoRoutePlanComponent } from "./location/sho-route-plan/sho-route-plan.component";
import { EChalanComponent } from "./dashboard/e-chalan/e-chalan.component";
import { TrackedVehiclesComponent } from "./vehicle-route/tracked-vehicles/tracked-vehicles.component";
import { RtoMasterComponent } from "./rto-master/rto-master.component";
import { DeviceKYCComponent } from "./kyc-approval/device-kyc/device-kyc.component";
import { DeviceDocComponent } from "./kyc-approval/device-doc/device-doc.component";
import { NewRoutePlanReportComponent } from "./rout-plan-report/new-route-plan-report/new-route-plan-report.component";
import { ModelMasterComponent } from "./model-master/model-master.component";
import { TrackedUntrackedVehiclesComponent } from "./poireport/tracked-untracked-vehicles/tracked-untracked-vehicles.component";
import { NotificationForCCComponent } from "./notification-for-cc/notification-for-cc.component";
import { AddNewDeviceComponent } from "./dashboard/add-new-device/add-new-device.component";
import { AddNewDevices2Component } from "./dashboard/add-new-device2/add-new-device.component";
import { ViewCertificateComponent } from "./dashboard/view-certificate/view-certificate.component";
import { NewEditDeviceComponent } from "./dashboard/new-edit-device/new-edit-device.component";
import { DownloadCertificateComponent } from "./dashboard/download-certificate/download-certificate.component";
import { DownloadCertificaterdmComponent } from "./dashboard/download-certificate_rdm/download-certificaterdm.component";
import { DeviceSettingComponent } from "./device-setting/device-setting.component";
import { UserSettingComponent } from "./user-setting/user-setting.component";
import { IndexingReportComponent } from "./indexingReport/index-report.component";
import { IssueListKycComponent } from "./kyc-approval/issue-list/issue-list.component";
import { IssueAddKycComponent } from "./kyc-approval/issue-add/issue-add.component";
import { TripManagementReportComponent } from "./report/report component/trip-management/trip-management-report.component";
import { VirtualDeviceComponent } from "./virtual-device/virtual-device.component";
import { MoveMarkerService } from "./location/move-marker.service";
import { LocationCommanService } from "./location/service/location-comman.service";
import { FotaComponent } from "./fota/fota.component";
import { FotaService } from "./fota/fota.service";
import { FinanceApprovalComponent } from "./finance-approval/finance-approval.component";
import { RawComponent } from "./raw/raw.component";
import { FirmwareComponent } from "./firmware/firmware.component";
import { RawDataCommandComponent } from "./raw-data-command/raw-data-command.component";
import { VivekComponent } from "./vivek/vivek.component";
import { GprsCommndTablePopupComponent } from "./gprs-commnd-table-popup/gprs-commnd-table-popup.component";
import { DeviceInventoryEditPopupComponent } from "./device-inventory-edit-popup/device-inventory-edit-popup.component";
import { DbEditDeviceComponent } from "./db-edit-device/db-edit-device.component";
import { DbliveComponent } from "./dblive/dblive.component";
import { Location2Component } from "./location/location2/location2.component";
import { NewissuelistComponent } from "./kyc-approval/newissuelist/newissuelist.component";
import { DbauthGuard } from "./dbauth.guard";
import { AdminDeviceKYCComponent } from './admin-device-kyc/admin-device-kyc.component';
import { RenewalDocumentsComponent } from './renewal-documents/renewal-documents.component';
import { AddReminderComponent } from './vehicle-reminder/add-reminder/add-reminder.component';
import { ImmobilizeComponent } from './location/immobilize/immobilize.component';
import { ReportFilterComponent } from './device-report/report-filter/report-filter.component';
import { ResetPasswordComponent } from './add/reset-password/reset-password.component';
import { DealerPermissionComponent } from './dealers-info/dealer-permission/dealer-permission.component';
import { DashboardContentComponent } from './add/dashboard-content/dashboard-content.component';
import { SharedDevicesComponent } from './const/shared-devices/shared-devices.component';
import { DailyLogsComponent } from './device-report/daily-logs/daily-logs.component';
import { VehicleExpensesComponent } from './vehicle-expenses/vehicle-expenses.component';
import { AddVehicleExpensesComponent } from './vehicle-expenses/add-vehicle-expenses/add-vehicle-expenses.component';
import { VehicleExpenseDetailComponent } from './vehicle-expenses/vehicle-expense-detail/vehicle-expense-detail.component';
import { ProductSummaryComponent } from './product-summary/product-summary.component';
import { AddProductComponent } from './product-summary/add-product/add-product.component';
import { ProductShopComponent } from './product-shop/product-shop.component';
import { ProductOverviewComponent } from './product-shop/product-overview/product-overview.component';
import { PointShareComponent } from './point-share/point-share.component';
import { MessageUtilityComponent } from './message-utility/message-utility.component';
import { TripLoadUnloadComponent } from './device-report/trip-load-unload/trip-load-unload.component';
import { BuyNowComponent } from './product-shop/buy-now/buy-now.component';
import { BillingInfoComponent } from './product-shop/billing-info/billing-info.component';
import { OrderSummaryComponent } from './product-shop/order-summary/order-summary.component';
import { OrderDetailsComponent } from './product-shop/order-details/order-details.component';
import { DemoVideosComponent } from './const/demo-videos/demo-videos.component';
import { SafePipe } from './const/safe.pipe';
import { BillingDashboardComponent } from './billing-dashboard/billing-dashboard.component';
import { WorkingHourDetailComponent } from './device-report/working-hour-detail/working-hour-detail.component';
import { WorkingHourReportComponent } from './device-report/working-hour-report/working-hour-report.component';
import { AccountDetailComponent } from './account-detail/account-detail.component';
import { TempretureGraphComponent } from './device-report/tempreture-graph/tempreture-graph.component';
import { CensorDisplayComponent } from './censor-display/censor-display.component';
import { ManualAddressComponent } from './const/manual-address/manual-address.component';
import { AddressUpdateComponent } from './address-update/address-update.component';
import { CmdUIComponent } from './location/cmd-ui/cmd-ui.component';
import { CommanQueueComponent } from './comman-queue/comman-queue.component';
import { CommandWindowComponent } from './location/command-window/command-window.component';
import { AddDeviceComponent } from './location/add-device/add-device.component';
import { MaintananceComponent } from './device-report/maintanance/maintanance.component';
import { SubAminComponent } from './sub-amin/sub-amin.component';
import { AddsubadminComponent } from './sub-amin/addsubadmin/addsubadmin.component';
import { PlayTripComponent } from './play-trip/play-trip.component';
import { TempretureReportComponent } from './device-report/tempreture-report/tempreture-report.component';
import { CommentWindowComponent } from './comment-window/comment-window.component';
import { DetailComponent } from './device-report/distance-report/details/details.component';
import { DailyDetailsComponent } from './device-report/daily-details/daily-details.component';
import { AnnouncementComponent } from './const/announcement/announcement.component';
import { ReportModule } from './report/report.module';
import { ReportService } from './report/report.service';
import { DeviceRenewComponent } from './device-renew/device-renew.component';
import { ReportScheduleComponent } from './report-schedule/report-schedule.component';
import { DeviceListComponent } from './device-list/device-list.component';
import { TollComponent } from './toll/toll.component';
import { RenewalHistoryComponent } from './dashboard/renewal-history/renewal-history.component';
import { DeviceInventoryComponent } from './device-inventory/device-inventory.component';
import { SelectUntrackVehiclesComponent } from './geofencing/select-untrack-vehicles/select-untrack-vehicles.component';
import { IssueListComponent } from './issue-list/issue-list.component';
import { TechnicianComponent } from './technician/technician.component';
import { JobCardComponent } from './job-card/job-card.component';
import { AddJobCardComponent } from './job-card/add-job-card/add-job-card.component';
import { RechargeComponent } from './recharge/recharge.component';
import { AddPlanComponent } from './account-detail/add-plan/add-plan.component';
import { RenewVehicleComponent } from './dashboard/renew-vehicle/renew-vehicle.component';
import { RoutePlanComponent } from './route-plan/route-plan.component';
import { RoutPlanReportComponent } from './rout-plan-report/rout-plan-report.component';
import { ShowPullDataLinkComponent } from './add/show-pull-data-link/show-pull-data-link.component';
import { NewTempReportComponent } from './device-report/tempreture-report/new-temp-report/new-temp-report.component';
import { RouteListComponent } from './route-plan/route-list/route-list.component';
import { HualtListComponent } from './route-plan/hualt-list/hualt-list.component';
import { InactiveAdminComponent } from './inactive-admin/inactive-admin.component';
import { UserFinderComponent } from './user-finder/user-finder.component';
import { ShowVehiclesComponent } from './show-vehicles/show-vehicles.component';
import { ViewCustomerDetailsComponent } from './add/view-customer-details/view-customer-details.component';
import { OtpScreenComponent } from './add/otp-screen/otp-screen.component';
import { KycApprovalComponent } from './kyc-approval/kyc-approval.component';
import { FuelPriceComponent } from './fuel-price/fuel-price.component';
import { AddFuelPriceComponent } from './add-fuel-price/add-fuel-price.component';
import { ShoRoutePlanComponent } from './location/sho-route-plan/sho-route-plan.component';
import { EChalanComponent } from './dashboard/e-chalan/e-chalan.component';
import { TrackedVehiclesComponent } from './vehicle-route/tracked-vehicles/tracked-vehicles.component';
import { RtoMasterComponent } from './rto-master/rto-master.component';
import { DeviceKYCComponent } from './kyc-approval/device-kyc/device-kyc.component';
import { DeviceDocComponent } from './kyc-approval/device-doc/device-doc.component';
import { NewRoutePlanReportComponent } from './rout-plan-report/new-route-plan-report/new-route-plan-report.component';
import { ModelMasterComponent } from './model-master/model-master.component';
import { TrackedUntrackedVehiclesComponent } from './poireport/tracked-untracked-vehicles/tracked-untracked-vehicles.component';
import { NotificationForCCComponent } from './notification-for-cc/notification-for-cc.component';
import { AddNewDeviceComponent } from './dashboard/add-new-device/add-new-device.component';
import { ViewCertificateComponent } from './dashboard/view-certificate/view-certificate.component';
import { NewEditDeviceComponent } from './dashboard/new-edit-device/new-edit-device.component';
import { DownloadCertificateComponent } from './dashboard/download-certificate/download-certificate.component';
import { DeviceSettingComponent } from './device-setting/device-setting.component';
import { UserSettingComponent } from './user-setting/user-setting.component';
import { IndexingReportComponent } from './indexingReport/index-report.component';
import { IssueListKycComponent } from './kyc-approval/issue-list/issue-list.component';
import { IssueAddKycComponent } from './kyc-approval/issue-add/issue-add.component';
import { TripManagementReportComponent } from './report/report component/trip-management/trip-management-report.component';
import { VirtualDeviceComponent } from './virtual-device/virtual-device.component';
// import { DisatanceReportComponent } from './report/disatance-report/disatance-report.component'; // import { DisatanceReportComponent } from './report/disatance-report/disatance-report.component';
// import { MainComponent } from './report/main/main.component'; // import { MainComponent } from './report/main/main.component';
// import { AcReportsComponent } from './report/ac-report/ac-report.component'; // import { AcReportsComponent } from './report/ac-report/ac-report.component';
// import { LiveTrackingComponent } from './live-tracking/live-tracking.component'; // import { LiveTrackingComponent } from './live-tracking/live-tracking.component';
// import { NgSelectModule } from '@ng-select/ng-select'; // import { NgSelectModule } from '@ng-select/ng-select';
// import { EditDeviceMasterComponent } from './device/src/app/device/edit-device-master/edit-device-master.component'; // import { EditDeviceMasterComponent } from './device/src/app/device/edit-device-master/edit-device-master.component';
// import { NgCircleProgressModule } from 'ng-circle-progress'; // import { NgCircleProgressModule } from 'ng-circle-progress';
// import { NgCircleProgressModule } from 'ng-circle-progress'; // import { NgCircleProgressModule } from 'ng-circle-progress';
@ -319,13 +339,11 @@ import { VirtualDeviceComponent } from './virtual-device/virtual-device.componen
}); */ }); */
export function createTranslateLoader(http: Http) { export function createTranslateLoader(http: Http) {
return new TranslateStaticLoader(http, './assets/i18n', '.json'); return new TranslateStaticLoader(http, "./assets/i18n", ".json");
} }
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,
CommunityComponent, CommunityComponent,
LoginComponent, LoginComponent,
@ -346,6 +364,8 @@ export function createTranslateLoader(http: Http) {
RuleComponent, RuleComponent,
ConstComponent, ConstComponent,
LocationComponent, LocationComponent,
LocationNewComponent,
OpenMapComponent,
EditScheComponent, EditScheComponent,
LoaderServiceComponent, LoaderServiceComponent,
GeofencingComponent, GeofencingComponent,
@ -546,18 +566,35 @@ export function createTranslateLoader(http: Http) {
TrackedUntrackedVehiclesComponent, TrackedUntrackedVehiclesComponent,
NotificationForCCComponent, NotificationForCCComponent,
AddNewDeviceComponent, AddNewDeviceComponent,
AddNewDevices2Component,
ViewCertificateComponent, ViewCertificateComponent,
NewEditDeviceComponent, NewEditDeviceComponent,
DownloadCertificateComponent, DownloadCertificateComponent,
DownloadCertificaterdmComponent,
DeviceSettingComponent, DeviceSettingComponent,
UserSettingComponent, UserSettingComponent,
IndexingReportComponent, IndexingReportComponent,
FotaComponent,
FinanceApprovalComponent,
RawComponent,
FirmwareComponent,
RawDataCommandComponent,
VivekComponent,
GprsCommndTablePopupComponent,
DeviceInventoryEditPopupComponent,
DbEditDeviceComponent,
DbliveComponent,
Location2Component,
NewissuelistComponent,
AdminDeviceKYCComponent,
RenewalDocumentsComponent,
// LiveTrackingComponent, // LiveTrackingComponent,
// MainComponent, // MainComponent,
// DisatanceReportComponent, // DisatanceReportComponent,
// AcReportsComponent // AcReportsComponent
], ],
imports: [ imports: [
/* /*
AgmCoreModule.forRoot({ AgmCoreModule.forRoot({
@ -576,7 +613,7 @@ export function createTranslateLoader(http: Http) {
IfScrollbarsModule, IfScrollbarsModule,
GaugeModule.forRoot(), GaugeModule.forRoot(),
/* GaugesModule, */ /* GaugesModule, */
DateTimePickerModule , DateTimePickerModule,
AngularDateTimePickerModule, AngularDateTimePickerModule,
BrowserModule, BrowserModule,
NgbModule.forRoot(), NgbModule.forRoot(),
@ -614,37 +651,84 @@ export function createTranslateLoader(http: Http) {
MaterialModule, MaterialModule,
TranslateModule.forRoot({ TranslateModule.forRoot({
provide: TranslateLoader, provide: TranslateLoader,
useFactory: (createTranslateLoader), useFactory: createTranslateLoader,
deps: [Http] deps: [Http],
}), }),
FormWizardModule,BrowserModule, ChartsModule, FormWizardModule,
BrowserModule,
ChartsModule,
Ng2CarouselamosModule, Ng2CarouselamosModule,
// GaugeModule.forRoot(), // GaugeModule.forRoot(),
CarouselModule.forRoot(), CarouselModule.forRoot(),
TimepickerModule.forRoot(), TimepickerModule.forRoot(),
BsDatepickerModule.forRoot(), BsDatepickerModule.forRoot(),
ReportModule, ReportModule,
ModalModule.forRoot() ModalModule.forRoot(),
], ],
schemas: [ NO_ERRORS_SCHEMA ], schemas: [NO_ERRORS_SCHEMA],
entryComponents:[IssueAddKycComponent, PoiDtlDelComponent,EditDeviceMasterComponent,AcreportInfoComponent,GpsEditMasterComponent,RenewalHistoryComponent,PoiMenuComponent,ExpenseComponentComponent, entryComponents: [
AddpoiBylocationComponent,CreateTripComponent,CommentWindowComponent,DetailComponent,DailyDetailsComponent,RenewVehicleComponent,ViewCustomerDetailsComponent,OtpScreenComponent,DeviceDocComponent,IssueAddKycComponent,IssueListKycComponent,TrackedUntrackedVehiclesComponent,DownloadCertificateComponent, IssueAddKycComponent,
AnnouncementComponent,SelectUntrackVehiclesComponent,ExpenselistComponent,AddPlanComponent,AddDriverComponent,ShowPullDataLinkComponent,HualtListComponent,ShoRoutePlanComponent,EChalanComponent,TrackedVehiclesComponent,ViewCertificateComponent,], PoiDtlDelComponent,
providers: [/* AuthService , */ AlertService, Data, SimpleTimer,DatainjectionService,ContactService,ReportService, EditDeviceMasterComponent,
AcreportInfoComponent,
GpsEditMasterComponent,
RenewalHistoryComponent,
PoiMenuComponent,
ExpenseComponentComponent,
AddpoiBylocationComponent,
CreateTripComponent,
CommentWindowComponent,
DetailComponent,
DailyDetailsComponent,
RenewVehicleComponent,
ViewCustomerDetailsComponent,
OtpScreenComponent,
DeviceDocComponent,
RenewalDocumentsComponent,
IssueAddKycComponent,
IssueListKycComponent,
TrackedUntrackedVehiclesComponent,
DownloadCertificateComponent,
DownloadCertificaterdmComponent,
AnnouncementComponent,
SelectUntrackVehiclesComponent,
ExpenselistComponent,
AddPlanComponent,
AddDriverComponent,
ShowPullDataLinkComponent,
HualtListComponent,
ShoRoutePlanComponent,
EChalanComponent,
TrackedVehiclesComponent,
ViewCertificateComponent,
RawDataCommandComponent,
GprsCommndTablePopupComponent,
DeviceInventoryEditPopupComponent,
],
providers: [
/* AuthService , */ AlertService,
Data,
SimpleTimer,
DatainjectionService,
ContactService,
ReportService,
MoveMarkerService,
LocationCommanService,
FotaService,
{ provide: MD_DIALOG_DATA, useValue: {} }, { provide: MD_DIALOG_DATA, useValue: {} },
{ provide: MdDialogRef, useValue: {} }], { provide: MdDialogRef, useValue: {} },
DbauthGuard,
],
exports: [AllMenusComponent], exports: [AllMenusComponent],
bootstrap: [AppComponent] bootstrap: [AppComponent],
}) })
export class AppModule { export class AppModule {
constructor(){ constructor() {
//for raw angular running on 4200 //for raw angular running on 4200
var a="http://localhost:3005"; var a = "http://localhost:3005";
//for built angular served by backend //for built angular served by backend
//var a=""; //var a="";
} }
}
}

View file

@ -1,192 +1,195 @@
import { ServicesComponent } from './services/services.component'; import { ServicesComponent } from "./services/services.component";
import { AboutUsComponent } from './about-us/about-us.component'; import { AboutUsComponent } from "./about-us/about-us.component";
import { ModuleWithProviders } from '@angular/core'; import { ModuleWithProviders } from "@angular/core";
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from "@angular/router";
import { AppComponent } from './app.component'; import { AppComponent } from "./app.component";
// import { DetailsComponent } from './details/details.component'; // import { DetailsComponent } from './details/details.component';
import { RuleComponent } from './rule/rule.component'; import { RuleComponent } from "./rule/rule.component";
import {AccountComponent} from './account/account.component'; import { AccountComponent } from "./account/account.component";
import {DashComponent} from './dash/dash.component'; import { DashComponent } from "./dash/dash.component";
import { CommunityComponent } from './community/community.component'; import { CommunityComponent } from "./community/community.component";
import { LoginComponent } from './login/login.component'; import { LoginComponent } from "./login/login.component";
import { SignupComponent } from './signup/signup.component'; import { SignupComponent } from "./signup/signup.component";
import { SupportComponent } from './support/support.component'; import { SupportComponent } from "./support/support.component";
import {GmapComponent} from './gmap/gmap.component'; import { GmapComponent } from "./gmap/gmap.component";
import {SoonComponent} from './soon/soon.component'; import { SoonComponent } from "./soon/soon.component";
import { GatewayComponent } from './gateway/gateway.component'; import { GatewayComponent } from "./gateway/gateway.component";
import { ConstComponent } from './const/const.component'; import { ConstComponent } from "./const/const.component";
import { LocationComponent } from './location/location.component'; import { LocationComponent } from "./location/location.component";
import { EditScheComponent } from './edit-sche/edit-sche.component'; import { LocationNewComponent } from "./location/new-location/location.component";
import { GeofencingComponent } from './geofencing/geofencing.component';
import { GeofenceAddComponent } from './geofence-add/geofence-add.component';
import { GeofencingViewComponent } from './geofencing-view/geofencing-view.component';
import { GeofencingView2Component } from './geofencing-view2/geofencing-view2.component'; import { EditScheComponent } from "./edit-sche/edit-sche.component";
import { DeviceEditComponent } from './dashboard/device-edit/device-edit.component'; import { GeofencingComponent } from "./geofencing/geofencing.component";
import { ResetpwdComponent } from './resetpwd/resetpwd.component'; import { GeofenceAddComponent } from "./geofence-add/geofence-add.component";
import { GetdevdetailComponent } from './const/getdevdetail/getdevdetail.component'; import { GeofencingViewComponent } from "./geofencing-view/geofencing-view.component";
import { MyaccountComponent } from './myaccount/myaccount.component';
import {DashboardComponent} from './dashboard/dashboard.component';
import {DialogContentExampleDialogComponent} from './dialog-content-example-dialog/dialog-content-example-dialog.component';
import { DeviceShareComponent } from './dashboard/device-share/device-share.component';
import { ShareUserComponent } from './dashboard/share-user/share-user.component';
import { SpeednotifyComponent } from './dashboard/speednotify/speednotify.component';
import { ShareLocComponent } from './location/share-loc/share-loc.component';
import { AddComponent } from './add/add.component';
import { SidebarComponent } from './sidebar/sidebar.component';
import { NotificationComponent } from './notification/notification.component';
import { AddCustComponent } from './add-cust/add-cust.component';
import { SpecDevComponent } from './spec-dev/spec-dev.component';
import { GroupComponent } from './group/group.component';
import { AddGroupComponent } from './add-group/add-group.component';
import { EditGroupComponent } from './edit-group/edit-group.component';
import { DeleteGroupComponent } from './delete-group/delete-group.component';
import { SidemenuFuelComponent } from './sidemenu-fuel/sidemenu-fuel.component'; import { GeofencingView2Component } from "./geofencing-view2/geofencing-view2.component";
import { VehicleRouteComponent } from './vehicle-route/vehicle-route.component'; import { DeviceEditComponent } from "./dashboard/device-edit/device-edit.component";
import { RouteSetComponent } from './route-set/route-set.component'; import { ResetpwdComponent } from "./resetpwd/resetpwd.component";
import { ShowRouteComponent } from './show-route/show-route.component'; import { GetdevdetailComponent } from "./const/getdevdetail/getdevdetail.component";
import { DealersInfoComponent } from './dealers-info/dealers-info.component'; import { MyaccountComponent } from "./myaccount/myaccount.component";
import { RouteMappingComponent } from './route-mapping/route-mapping.component'; import { DashboardComponent } from "./dashboard/dashboard.component";
import { RouteMapAddComponent } from './route-map-add/route-map-add.component'; import { DialogContentExampleDialogComponent } from "./dialog-content-example-dialog/dialog-content-example-dialog.component";
import { PointOfIntrestComponent } from './point-of-intrest/point-of-intrest.component'; import { DeviceShareComponent } from "./dashboard/device-share/device-share.component";
import { RouteDeleteComponent } from './route-delete/route-delete.component'; import { ShareUserComponent } from "./dashboard/share-user/share-user.component";
import { AddDealerComponent } from './add-dealer/add-dealer.component'; import { SpeednotifyComponent } from "./dashboard/speednotify/speednotify.component";
import { NotificationMasterComponent } from './notification-master/notification-master.component'; import { ShareLocComponent } from "./location/share-loc/share-loc.component";
import { EditCostumerComponent } from './edit-costumer/edit-costumer.component'; import { AddComponent } from "./add/add.component";
import { EditDealerComponent } from './edit-dealer/edit-dealer.component'; import { SidebarComponent } from "./sidebar/sidebar.component";
import { TripHistoryComponent } from './trip-history/trip-history.component'; import { NotificationComponent } from "./notification/notification.component";
import { PoiListComponent } from './poi-list/poi-list.component'; import { AddCustComponent } from "./add-cust/add-cust.component";
import { SpecDevComponent } from "./spec-dev/spec-dev.component";
import { GroupComponent } from "./group/group.component";
import { AddGroupComponent } from "./add-group/add-group.component";
import { EditGroupComponent } from "./edit-group/edit-group.component";
import { DeleteGroupComponent } from "./delete-group/delete-group.component";
import { ShowCaliberationComponent} from './show-caliberation/show-caliberation.component'; import { SidemenuFuelComponent } from "./sidemenu-fuel/sidemenu-fuel.component";
import {VehicleTypeComponent} from './vehicle-type/vehicle-type.component'; import { VehicleRouteComponent } from "./vehicle-route/vehicle-route.component";
import { DriverDetailComponent } from './driver-detail/driver-detail.component'; import { RouteSetComponent } from "./route-set/route-set.component";
import { DeviceModelComponent } from './device-model/device-model.component'; import { ShowRouteComponent } from "./show-route/show-route.component";
import { AddEditVehicleTypeComponent } from './add-edit-vehicle-type/add-edit-vehicle-type.component'; import { DealersInfoComponent } from "./dealers-info/dealers-info.component";
import { AddDriverComponent } from './add-driver/add-driver.component'; import { RouteMappingComponent } from "./route-mapping/route-mapping.component";
import { AddDeviceModelComponent } from './add-device-model/add-device-model.component'; import { RouteMapAddComponent } from "./route-map-add/route-map-add.component";
import { EditRouteMapComponent } from './edit-route-map/edit-route-map.component'; import { PointOfIntrestComponent } from "./point-of-intrest/point-of-intrest.component";
import { POIdetailsComponent } from './poidetails/poidetails.component'; import { RouteDeleteComponent } from "./route-delete/route-delete.component";
import { AddDealerComponent } from "./add-dealer/add-dealer.component";
import { NotificationMasterComponent } from "./notification-master/notification-master.component";
import { EditCostumerComponent } from "./edit-costumer/edit-costumer.component";
import { EditDealerComponent } from "./edit-dealer/edit-dealer.component";
import { TripHistoryComponent } from "./trip-history/trip-history.component";
import { PoiListComponent } from "./poi-list/poi-list.component";
import { ShowCaliberationComponent } from "./show-caliberation/show-caliberation.component";
import { VehicleTypeComponent } from "./vehicle-type/vehicle-type.component";
import { DriverDetailComponent } from "./driver-detail/driver-detail.component";
import { DeviceModelComponent } from "./device-model/device-model.component";
import { AddEditVehicleTypeComponent } from "./add-edit-vehicle-type/add-edit-vehicle-type.component";
import { AddDriverComponent } from "./add-driver/add-driver.component";
import { AddDeviceModelComponent } from "./add-device-model/add-device-model.component";
import { EditRouteMapComponent } from "./edit-route-map/edit-route-map.component";
import { POIdetailsComponent } from "./poidetails/poidetails.component";
import { PoiMenuComponent } from "./poi-menu/poi-menu.component"; import { PoiMenuComponent } from "./poi-menu/poi-menu.component";
import { LoadManagementComponent } from './load-management/load-management.component'; import { LoadManagementComponent } from "./load-management/load-management.component";
import { FuelReportGraphComponent } from './fuel-report-graph/fuel-report-graph.component'; import { FuelReportGraphComponent } from "./fuel-report-graph/fuel-report-graph.component";
import { EditVehicleTypeComponent } from './edit-vehicle-type/edit-vehicle-type.component'; import { EditVehicleTypeComponent } from "./edit-vehicle-type/edit-vehicle-type.component";
import { UserMasterComponent } from './user-master/user-master.component' import { UserMasterComponent } from "./user-master/user-master.component";
import { DeviceComponent } from './device/device.component'; import { DeviceComponent } from "./device/device.component";
import { GpsMasterComponent } from './gps-master/gps-master.component'; import { GpsMasterComponent } from "./gps-master/gps-master.component";
import { CmdPacketMasterComponent } from './cmd-packet-master/cmd-packet-master.component'; import { CmdPacketMasterComponent } from "./cmd-packet-master/cmd-packet-master.component";
import { POIreportComponent } from './poireport/poireport.component'; import { POIreportComponent } from "./poireport/poireport.component";
import { LRNumberComponent } from './lr-number/lr-number.component'; import { LRNumberComponent } from "./lr-number/lr-number.component";
import { SOSAlertComponent } from './sosalert/sosalert.component'; import { SOSAlertComponent } from "./sosalert/sosalert.component";
import { HomeComponent } from './home/home.component'; import { HomeComponent } from "./home/home.component";
import { EditDeviceModelComponent } from './edit-device-model/edit-device-model.component'; import { EditDeviceModelComponent } from "./edit-device-model/edit-device-model.component";
import { PoiMasterEditComponent } from './poi-master-edit/poi-master-edit.component'; import { PoiMasterEditComponent } from "./poi-master-edit/poi-master-edit.component";
import { NotificationSettingComponent } from './notification-setting/notification-setting.component'; import { NotificationSettingComponent } from "./notification-setting/notification-setting.component";
import { LiveHistoryComponent } from './location/live-history/live-history.component'; import { LiveHistoryComponent } from "./location/live-history/live-history.component";
import { DeviceEntryComponent } from './device-entry/device-entry.component'; import { DeviceEntryComponent } from "./device-entry/device-entry.component";
import { InventoryListComponent } from './inventory-list/inventory-list.component'; import { InventoryListComponent } from "./inventory-list/inventory-list.component";
import { GeneralSettingsComponent } from './dashboard/general-settings/general-settings.component'; import { GeneralSettingsComponent } from "./dashboard/general-settings/general-settings.component";
import { DistributersListComponent } from './distributers-list/distributers-list.component'; import { DistributersListComponent } from "./distributers-list/distributers-list.component";
import { AddDistributersComponent } from './add-distributers/add-distributers.component'; import { AddDistributersComponent } from "./add-distributers/add-distributers.component";
import { CostumerSupportComponent } from './costumer-support/costumer-support.component'; import { CostumerSupportComponent } from "./costumer-support/costumer-support.component";
import { FuelObjectcomponentComponent } from './fuel-objectcomponent/fuel-objectcomponent.component'; import { FuelObjectcomponentComponent } from "./fuel-objectcomponent/fuel-objectcomponent.component";
import { ReportSettingComponent } from './add/report-setting/report-setting.component'; import { ReportSettingComponent } from "./add/report-setting/report-setting.component";
import { NormalCertComponent } from './device/normal-cert/normal-cert.component'; import { NormalCertComponent } from "./device/normal-cert/normal-cert.component";
import { CertOptionComponent } from './device/cert-option/cert-option.component'; import { CertOptionComponent } from "./device/cert-option/cert-option.component";
import { VehicleReminderComponent } from './vehicle-reminder/vehicle-reminder.component'; import { VehicleReminderComponent } from "./vehicle-reminder/vehicle-reminder.component";
import { AddReminderComponent } from './vehicle-reminder/add-reminder/add-reminder.component';
import { ImmobilizeComponent } from './location/immobilize/immobilize.component';
import { ResetPasswordComponent } from './add/reset-password/reset-password.component';
import { DealerPermissionComponent } from './dealers-info/dealer-permission/dealer-permission.component';
import { DashboardContentComponent } from './add/dashboard-content/dashboard-content.component';
import { SharedDevicesComponent } from './const/shared-devices/shared-devices.component';
import { VehicleExpensesComponent } from './vehicle-expenses/vehicle-expenses.component';
import { AddVehicleExpensesComponent } from './vehicle-expenses/add-vehicle-expenses/add-vehicle-expenses.component';
import { VehicleExpenseDetailComponent } from './vehicle-expenses/vehicle-expense-detail/vehicle-expense-detail.component';
import { ProductSummaryComponent } from './product-summary/product-summary.component';
import { AddProductComponent } from './product-summary/add-product/add-product.component';
import { ProductShopComponent } from './product-shop/product-shop.component';
import { ProductOverviewComponent } from './product-shop/product-overview/product-overview.component';
import { PointShareComponent } from './point-share/point-share.component';
import { MessageUtilityComponent } from './message-utility/message-utility.component';
import { BuyNowComponent } from './product-shop/buy-now/buy-now.component';
import { BillingInfoComponent } from './product-shop/billing-info/billing-info.component';
import { OrderSummaryComponent } from './product-shop/order-summary/order-summary.component';
import { OrderDetailsComponent } from './product-shop/order-details/order-details.component';
import { DemoVideosComponent } from './const/demo-videos/demo-videos.component';
import { BillingDashboardComponent } from './billing-dashboard/billing-dashboard.component';
import { AccountDetailComponent } from './account-detail/account-detail.component';
import { CensorDisplayComponent } from './censor-display/censor-display.component';
import { ManualAddressComponent } from './const/manual-address/manual-address.component';
import { AddressUpdateComponent } from './address-update/address-update.component';
import { CmdUIComponent } from './location/cmd-ui/cmd-ui.component';
import { CommanQueueComponent } from './comman-queue/comman-queue.component';
import { CommandWindowComponent } from './location/command-window/command-window.component';
import { AddDeviceComponent } from './location/add-device/add-device.component';
import { SubAminComponent } from './sub-amin/sub-amin.component';
import { AddsubadminComponent } from './sub-amin/addsubadmin/addsubadmin.component';
import { PlayTripComponent } from './play-trip/play-trip.component';
import { DetailsComponent } from './details/details.component';
import { DisatanceReportComponent } from './report/report component/disatance-report/disatance-report.component';
import { MainComponent } from './report/main/main.component';
import { AcReportsComponent } from './report/report component/ac-report/ac-report.component';
import { DailyReportComponent } from './report/report component/daily-report/daily-report.component';
import { DailyLogssComponent } from './report/report component/daily-logs/daily-logs.component';
import { DayWiseReportComponent } from './report/report component/day-wise-report/day-wise-report.component';
import { GeofancingReportComponent } from './report/report component/geofancing-report/geofancing-report.component';
import { IdleReportComponent } from './report/report component/idle-report/idle-report.component';
import { IgnitionReportComponent } from './report/report component/ignition-report/ignition-report.component';
import { TripLoadUnloadComponent } from './report/report component/trip-load-unload/trip-load-unload.component';
import { OverSpeedComponent } from './report/report component/over-speed/over-speed.component';
import { POIReportComponent } from './report/report component/poi-report/poi-report.component';
import { RouteViolationComponent } from './report/report component/route-violation/route-violation.component';
import { DeviceSpeedReportComponent } from './report/report component/device-speed-report/device-speed-report.component';
import { SummaryReportComponent } from './report/report component/summary-report/summary-report.component';
import { StoppageReportComponent } from './report/report component/stoppage-report/stoppage-report.component';
import { DeviceSOSreportComponent } from './report/report component/device-sosreport/device-sosreport.component';
import { TripReportComponent } from './report/report component/trip-report/trip-report.component';
import { TravelPathReportComponent } from './report/report component/travel-path-report/travel-path-report.component';
import { WorkingHourReportComponent } from './report/report component/working-hour-report/working-hour-report.component';
import { MaintananceComponent } from './report/report component/maintanance/maintanance.component';
import { NotificationMastersComponent } from './report/report component/notification-master/notification-master.component';
import { DriversPerformanceReportComponent } from './report/report component/drivers-performance-report/drivers-performance-report.component';
import { DeviceRenewComponent } from './device-renew/device-renew.component';
import { ReportScheduleComponent } from './report-schedule/report-schedule.component';
import { DeviceFuelReportComponent } from './device-report/device-fuel-report/device-fuel-report.component';
import { NoReportComponent } from './report/report component/no-report/no-report.component';
import { StartComponent } from './report/report component/start/start.component';
import { TempretureReportComponent } from './device-report/tempreture-report/tempreture-report.component';
import { TempretureGraphComponent } from './device-report/tempreture-graph/tempreture-graph.component';
import { DeviceListComponent } from './device-list/device-list.component';
import { TollComponent } from './toll/toll.component';
import { NewTravelPathReportComponent } from './report/report component/new-travel-path-report/new-travel-path-report.component';
import { DeviceInventoryComponent } from './device-inventory/device-inventory.component';
import { IssueListComponent } from './issue-list/issue-list.component';
import { PushDataReportComponent } from './report/report component/push-data-report/push-data-report.component';
import { TechnicianComponent } from './technician/technician.component';
import { JobCardComponent } from './job-card/job-card.component';
import { AddJobCardComponent } from './job-card/add-job-card/add-job-card.component';
import { RechargeComponent } from './recharge/recharge.component';
import { RoutePlanComponent } from './route-plan/route-plan.component';
import { RoutPlanReportComponent } from './rout-plan-report/rout-plan-report.component';
import { RouteListComponent } from './route-plan/route-list/route-list.component';
import { InactiveAdminComponent } from './inactive-admin/inactive-admin.component';
import { UserFinderComponent } from './user-finder/user-finder.component';
import { ShowVehiclesComponent } from './show-vehicles/show-vehicles.component';
import { KycApprovalComponent } from './kyc-approval/kyc-approval.component';
import { FuelPriceComponent } from './fuel-price/fuel-price.component';
import { AddFuelPriceComponent } from './add-fuel-price/add-fuel-price.component';
import { RtoMasterComponent } from './rto-master/rto-master.component';
import { NewRoutePlanReportComponent } from './rout-plan-report/new-route-plan-report/new-route-plan-report.component';
import { ModelMasterComponent } from './model-master/model-master.component';
import { PerformanceReportComponent } from './report/report component/performance-report/performance-report.component';
import { NotificationForCCComponent } from './notification-for-cc/notification-for-cc.component';
import { AddNewDeviceComponent } from './dashboard/add-new-device/add-new-device.component';
import { AddReminderComponent } from "./vehicle-reminder/add-reminder/add-reminder.component";
import { ImmobilizeComponent } from "./location/immobilize/immobilize.component";
import { ResetPasswordComponent } from "./add/reset-password/reset-password.component";
import { DealerPermissionComponent } from "./dealers-info/dealer-permission/dealer-permission.component";
import { DashboardContentComponent } from "./add/dashboard-content/dashboard-content.component";
import { SharedDevicesComponent } from "./const/shared-devices/shared-devices.component";
import { VehicleExpensesComponent } from "./vehicle-expenses/vehicle-expenses.component";
import { AddVehicleExpensesComponent } from "./vehicle-expenses/add-vehicle-expenses/add-vehicle-expenses.component";
import { VehicleExpenseDetailComponent } from "./vehicle-expenses/vehicle-expense-detail/vehicle-expense-detail.component";
import { ProductSummaryComponent } from "./product-summary/product-summary.component";
import { AddProductComponent } from "./product-summary/add-product/add-product.component";
import { ProductShopComponent } from "./product-shop/product-shop.component";
import { ProductOverviewComponent } from "./product-shop/product-overview/product-overview.component";
import { PointShareComponent } from "./point-share/point-share.component";
import { MessageUtilityComponent } from "./message-utility/message-utility.component";
import { BuyNowComponent } from "./product-shop/buy-now/buy-now.component";
import { BillingInfoComponent } from "./product-shop/billing-info/billing-info.component";
import { OrderSummaryComponent } from "./product-shop/order-summary/order-summary.component";
import { OrderDetailsComponent } from "./product-shop/order-details/order-details.component";
import { DemoVideosComponent } from "./const/demo-videos/demo-videos.component";
import { BillingDashboardComponent } from "./billing-dashboard/billing-dashboard.component";
import { AccountDetailComponent } from "./account-detail/account-detail.component";
import { CensorDisplayComponent } from "./censor-display/censor-display.component";
import { ManualAddressComponent } from "./const/manual-address/manual-address.component";
import { AddressUpdateComponent } from "./address-update/address-update.component";
import { CmdUIComponent } from "./location/cmd-ui/cmd-ui.component";
import { CommanQueueComponent } from "./comman-queue/comman-queue.component";
import { CommandWindowComponent } from "./location/command-window/command-window.component";
import { AddDeviceComponent } from "./location/add-device/add-device.component";
import { SubAminComponent } from "./sub-amin/sub-amin.component";
import { AddsubadminComponent } from "./sub-amin/addsubadmin/addsubadmin.component";
import { PlayTripComponent } from "./play-trip/play-trip.component";
import { DetailsComponent } from "./details/details.component";
import { DisatanceReportComponent } from "./report/report component/disatance-report/disatance-report.component";
import { MainComponent } from "./report/main/main.component";
import { AcReportsComponent } from "./report/report component/ac-report/ac-report.component";
import { DailyReportComponent } from "./report/report component/daily-report/daily-report.component";
import { DailyLogssComponent } from "./report/report component/daily-logs/daily-logs.component";
import { DayWiseReportComponent } from "./report/report component/day-wise-report/day-wise-report.component";
import { GeofancingReportComponent } from "./report/report component/geofancing-report/geofancing-report.component";
import { IdleReportComponent } from "./report/report component/idle-report/idle-report.component";
import { IgnitionReportComponent } from "./report/report component/ignition-report/ignition-report.component";
import { TripLoadUnloadComponent } from "./report/report component/trip-load-unload/trip-load-unload.component";
import { OverSpeedComponent } from "./report/report component/over-speed/over-speed.component";
import { POIReportComponent } from "./report/report component/poi-report/poi-report.component";
import { RouteViolationComponent } from "./report/report component/route-violation/route-violation.component";
import { DeviceSpeedReportComponent } from "./report/report component/device-speed-report/device-speed-report.component";
import { SummaryReportComponent } from "./report/report component/summary-report/summary-report.component";
import { StoppageReportComponent } from "./report/report component/stoppage-report/stoppage-report.component";
import { DeviceSOSreportComponent } from "./report/report component/device-sosreport/device-sosreport.component";
import { TripReportComponent } from "./report/report component/trip-report/trip-report.component";
import { TravelPathReportComponent } from "./report/report component/travel-path-report/travel-path-report.component";
import { WorkingHourReportComponent } from "./report/report component/working-hour-report/working-hour-report.component";
import { MaintananceComponent } from "./report/report component/maintanance/maintanance.component";
import { NotificationMastersComponent } from "./report/report component/notification-master/notification-master.component";
import { DriversPerformanceReportComponent } from "./report/report component/drivers-performance-report/drivers-performance-report.component";
import { DeviceRenewComponent } from "./device-renew/device-renew.component";
import { ReportScheduleComponent } from "./report-schedule/report-schedule.component";
import { DeviceFuelReportComponent } from "./device-report/device-fuel-report/device-fuel-report.component";
import { NoReportComponent } from "./report/report component/no-report/no-report.component";
import { StartComponent } from "./report/report component/start/start.component";
import { TempretureReportComponent } from "./device-report/tempreture-report/tempreture-report.component";
import { TempretureGraphComponent } from "./device-report/tempreture-graph/tempreture-graph.component";
import { DeviceListComponent } from "./device-list/device-list.component";
import { TollComponent } from "./toll/toll.component";
import { NewTravelPathReportComponent } from "./report/report component/new-travel-path-report/new-travel-path-report.component";
import { DeviceInventoryComponent } from "./device-inventory/device-inventory.component";
import { IssueListComponent } from "./issue-list/issue-list.component";
import { PushDataReportComponent } from "./report/report component/push-data-report/push-data-report.component";
import { TechnicianComponent } from "./technician/technician.component";
import { JobCardComponent } from "./job-card/job-card.component";
import { AddJobCardComponent } from "./job-card/add-job-card/add-job-card.component";
import { RechargeComponent } from "./recharge/recharge.component";
import { RoutePlanComponent } from "./route-plan/route-plan.component";
import { RoutPlanReportComponent } from "./rout-plan-report/rout-plan-report.component";
import { RouteListComponent } from "./route-plan/route-list/route-list.component";
import { InactiveAdminComponent } from "./inactive-admin/inactive-admin.component";
import { UserFinderComponent } from "./user-finder/user-finder.component";
import { ShowVehiclesComponent } from "./show-vehicles/show-vehicles.component";
import { KycApprovalComponent } from "./kyc-approval/kyc-approval.component";
import { FuelPriceComponent } from "./fuel-price/fuel-price.component";
import { AddFuelPriceComponent } from "./add-fuel-price/add-fuel-price.component";
import { RtoMasterComponent } from "./rto-master/rto-master.component";
import { NewRoutePlanReportComponent } from "./rout-plan-report/new-route-plan-report/new-route-plan-report.component";
import { ModelMasterComponent } from "./model-master/model-master.component";
import { PerformanceReportComponent } from "./report/report component/performance-report/performance-report.component";
import { NotificationForCCComponent } from "./notification-for-cc/notification-for-cc.component";
import { AddNewDeviceComponent } from "./dashboard/add-new-device/add-new-device.component";
import { AddNewDevices2Component } from "./dashboard/add-new-device2/add-new-device.component";
import { FinanceApprovalComponent } from "./finance-approval/finance-approval.component";
// ----------------------------------------- // -----------------------------------------
// import { DriversPerformanceReportComponent } from './device-report/drivers-performance-report/drivers-performance-report.component'; // import { DriversPerformanceReportComponent } from './device-report/drivers-performance-report/drivers-performance-report.component';
// import { IdealReportComponent } from './device-report/ideal-report/ideal-report.component'; // import { IdealReportComponent } from './device-report/ideal-report/ideal-report.component';
@ -205,14 +208,23 @@ import { AddNewDeviceComponent } from './dashboard/add-new-device/add-new-device
// import { POIReportComponent } from './device-report/poi-report/poi-report.component'; // import { POIReportComponent } from './device-report/poi-report/poi-report.component';
// import { DayWiseReportComponent } from './device-report/day-wise-report/day-wise-report.component'; // import { DayWiseReportComponent } from './device-report/day-wise-report/day-wise-report.component';
// import { AcReportComponent } from './device-report/ac-report/ac-report.component'; // import { AcReportComponent } from './device-report/ac-report/ac-report.component';
import { FuelReportComponent } from './device-report/fuel-report/fuel-report.component'; import { FuelReportComponent } from "./device-report/fuel-report/fuel-report.component";
import { NewEditDeviceComponent } from './dashboard/new-edit-device/new-edit-device.component'; import { NewEditDeviceComponent } from "./dashboard/new-edit-device/new-edit-device.component";
import { DeviceSettingComponent } from './device-setting/device-setting.component'; import { DbEditDeviceComponent } from "./db-edit-device/db-edit-device.component";
import { UserSettingComponent } from './user-setting/user-setting.component'; import { DeviceSettingComponent } from "./device-setting/device-setting.component";
import { CurrentPositionReportComponent } from './report/report component/current-position/current-position.component'; import { UserSettingComponent } from "./user-setting/user-setting.component";
import { IndexingReportComponent } from './indexingReport/index-report.component'; import { CurrentPositionReportComponent } from "./report/report component/current-position/current-position.component";
import { TripManagementReportComponent } from './report/report component/trip-management/trip-management-report.component'; import { IndexingReportComponent } from "./indexingReport/index-report.component";
import { VirtualDeviceComponent } from './virtual-device/virtual-device.component'; import { TripManagementReportComponent } from "./report/report component/trip-management/trip-management-report.component";
import { VirtualDeviceComponent } from "./virtual-device/virtual-device.component";
import { FotaComponent } from "./fota/fota.component";
import { FirmwareComponent } from "./firmware/firmware.component";
import { RawComponent } from "./raw/raw.component";
import { Location2Component } from "./location/location2/location2.component";
import { NewissuelistComponent } from "./kyc-approval/newissuelist/newissuelist.component";
import { DbauthGuard } from "./dbauth.guard";
// import { DeviceFuelReportComponent } from './device-report/device-fuel-report/device-fuel-report.component'; // import { DeviceFuelReportComponent } from './device-report/device-fuel-report/device-fuel-report.component';
// import { DeviceSOSreportComponent } from './device-report/device-sosreport/device-sosreport.component'; // import { DeviceSOSreportComponent } from './device-report/device-sosreport/device-sosreport.component';
// import { TripByDeviceComponent } from './device-report/trip-by-device/trip-by-device.component'; // import { TripByDeviceComponent } from './device-report/trip-by-device/trip-by-device.component';
@ -229,143 +241,152 @@ import { VirtualDeviceComponent } from './virtual-device/virtual-device.componen
// import { TempretureReportComponent } from './device-report/tempreture-report/tempreture-report.component'; // import { TempretureReportComponent } from './device-report/tempreture-report/tempreture-report.component';
// import { DeviceReportComponent } from './device-report/device-report.component'; // import { DeviceReportComponent } from './device-report/device-report.component';
// import { DailyDetailsComponent } from './device-report/daily-details/daily-details.component'; // import { DailyDetailsComponent } from './device-report/daily-details/daily-details.component';
import { AdminDeviceKYCComponent } from "./admin-device-kyc/admin-device-kyc.component";
export const router: Routes = [
{ path: "", redirectTo: "login", pathMatch: "full" },
export const router: Routes =[ { path: "community", component: CommunityComponent },
{ path: '', redirectTo: 'login', pathMatch: 'full' }, { path: "rule", component: RuleComponent },
{ path: "login", component: LoginComponent },
{ path: 'community', component: CommunityComponent }, { path: "home", component: HomeComponent },
{ path: 'rule', component: RuleComponent }, { path: "signup", component: SignupComponent },
{ path: 'login', component: LoginComponent }, { path: "support", component: SupportComponent },
{ path: 'home', component: HomeComponent }, { path: "gmap", component: GmapComponent },
{ path: 'signup', component: SignupComponent }, { path: "dash", component: DashComponent },
{ path: 'support', component: SupportComponent }, { path: "account", component: AccountComponent },
{ path: 'gmap', component: GmapComponent },
{ path: 'dash', component: DashComponent},
{ path: 'account', component: AccountComponent},
// {path: 'soon', component:SoonComponent}, // {path: 'soon', component:SoonComponent},
{path: 'details', component:DetailsComponent}, { path: "details", component: DetailsComponent },
{path: 'gateway', component:GatewayComponent}, { path: "gateway", component: GatewayComponent },
{path: 'const', component:ConstComponent }, { path: "const", component: ConstComponent },
{path: 'location', component:LocationComponent}, { path: "glocation", component: LocationComponent },
{path : 'location/immobilize', component : ImmobilizeComponent}, { path: "glocation2", component: Location2Component },
{path: 'dashboard', component:DashboardComponent}, { path: "location", component: LocationNewComponent },
{path: 'dashboard/:id', component:DashboardComponent}, { path: "location/immobilize", component: ImmobilizeComponent },
{path: 'edit-sche', component:EditScheComponent}, { path: "dashboard", component: DashboardComponent },
{path : 'device/certOptioon',component :CertOptionComponent}, { path: "dashboard/:id", component: DashboardComponent },
{path: 'geofencing', component:GeofencingComponent}, { path: "edit-sche", component: EditScheComponent },
{path : 'add/reset_password', component : ResetPasswordComponent}, { path: "device/certOptioon", component: CertOptionComponent },
{path: 'geofence-add', component:GeofenceAddComponent}, { path: "geofencing", component: GeofencingComponent },
{path: 'geofencing-view', component: GeofencingViewComponent}, { path: "add/reset_password", component: ResetPasswordComponent },
{path: 'geofencing-view2', component: GeofencingView2Component}, { path: "geofence-add", component: GeofenceAddComponent },
{path: 'add-device', component:DialogContentExampleDialogComponent}, { path: "geofencing-view", component: GeofencingViewComponent },
{path: 'dashboard/device-edit', component:DeviceEditComponent}, { path: "geofencing-view2", component: GeofencingView2Component },
{path: 'deealer/dealer_permission', component:DealerPermissionComponent}, { path: "dashboard/device-edit", component: DeviceEditComponent },
{path: 'playTrip',component:PlayTripComponent},
{path : 'device/normal_cert', component : NormalCertComponent}, { path: "deealer/dealer_permission", component: DealerPermissionComponent },
{path : 'add/report_sestting',component : ReportSettingComponent}, { path: "playTrip", component: PlayTripComponent },
{path : 'add/dashboard_content', component : DashboardContentComponent},
{ path: "AdminDeviceKYCComponent", component: AdminDeviceKYCComponent },
{ path: "device/normal_cert", component: NormalCertComponent },
{ path: "add/report_sestting", component: ReportSettingComponent },
{ path: "add/dashboard_content", component: DashboardContentComponent },
// {path : 'device-report/dailyLogs',component : DailyLogsComponent}, // {path : 'device-report/dailyLogs',component : DailyLogsComponent},
{path: 'vehicleExpense',component : VehicleExpensesComponent}, { path: "vehicleExpense", component: VehicleExpensesComponent },
{path :'addVehicleExpense', component : AddVehicleExpensesComponent}, { path: "addVehicleExpense", component: AddVehicleExpensesComponent },
{path : 'vehExpenseDetail', component : VehicleExpenseDetailComponent}, { path: "vehExpenseDetail", component: VehicleExpenseDetailComponent },
{path: 'dashboard/device-share', component:DeviceShareComponent}, { path: "dashboard/device-share", component: DeviceShareComponent },
{path : 'product-summary', component : ProductSummaryComponent}, { path: "product-summary", component: ProductSummaryComponent },
{path :'product-summary/add_product',component: AddProductComponent}, { path: "product-summary/add_product", component: AddProductComponent },
{path : 'product-shop/product-overview', component : ProductOverviewComponent}, {
{path: 'dashboard/share-user', component:ShareUserComponent}, path: "product-shop/product-overview",
{path: 'dashboard/speednotify', component:SpeednotifyComponent}, component: ProductOverviewComponent,
{path: 'location/share-loc', component:ShareLocComponent}, },
{path: 'add', component:AddComponent}, { path: "dashboard/share-user", component: ShareUserComponent },
{path : 'const/shared_devices',component : SharedDevicesComponent}, { path: "dashboard/speednotify", component: SpeednotifyComponent },
{path: 'resetpwd', component:ResetpwdComponent}, { path: "location/share-loc", component: ShareLocComponent },
{path: 'const/getdevdetail', component:GetdevdetailComponent}, { path: "add", component: AddComponent },
{path: 'sidebar', component:SidebarComponent}, { path: "const/shared_devices", component: SharedDevicesComponent },
{path: 'notification', component:NotificationComponent}, { path: "resetpwd", component: ResetpwdComponent },
{path: 'myaccount', component:MyaccountComponent}, { path: "const/getdevdetail", component: GetdevdetailComponent },
{path: 'add-cust',component:AddCustComponent}, { path: "sidebar", component: SidebarComponent },
{path: 'spec-dev', component:SpecDevComponent}, { path: "notification", component: NotificationComponent },
{path: 'about-us',component:AboutUsComponent}, { path: "myaccount", component: MyaccountComponent },
{path: 'services',component:ServicesComponent}, { path: "add-cust", component: AddCustComponent },
{path:'device-details',component:DetailsComponent}, { path: "spec-dev", component: SpecDevComponent },
{path: 'location/live-history',component:LiveHistoryComponent}, { path: "about-us", component: AboutUsComponent },
{path:'vehicle/reminder_service',component:VehicleReminderComponent}, { path: "services", component: ServicesComponent },
{path : "vehicle_reminder/add_reminder" , component:AddReminderComponent}, { path: "device-details", component: DetailsComponent },
{path: 'productShop' , component : ProductShopComponent}, { path: "location/live-history", component: LiveHistoryComponent },
{path:'product-shop/buyProduct',component : BuyNowComponent}, { path: "vehicle/reminder_service", component: VehicleReminderComponent },
{path :'product-shop/BillingInfo',component : BillingInfoComponent}, { path: "vehicle_reminder/add_reminder", component: AddReminderComponent },
{path:"cmdWind",component:CommandWindowComponent}, { path: "productShop", component: ProductShopComponent },
{path : 'orderSummary',component : OrderSummaryComponent}, { path: "product-shop/buyProduct", component: BuyNowComponent },
{path: 'orderDetail', component: OrderDetailsComponent}, { path: "product-shop/BillingInfo", component: BillingInfoComponent },
{path : 'demoVideos', component : DemoVideosComponent}, { path: "cmdWind", component: CommandWindowComponent },
{path: 'POI_list',component: POIreportComponent}, { path: "orderSummary", component: OrderSummaryComponent },
{path:'manualAddress',component : ManualAddressComponent}, { path: "orderDetail", component: OrderDetailsComponent },
{path :'add_device', component: AddDeviceComponent}, { path: "demoVideos", component: DemoVideosComponent },
{path : 'CmdUIComponent',component:CmdUIComponent}, { path: "POI_list", component: POIreportComponent },
{path : 'addreessUpdate',component:AddressUpdateComponent}, { path: "manualAddress", component: ManualAddressComponent },
{path: 'group_view',component: GroupComponent}, { path: "add_device", component: AddDeviceComponent },
{path: 'addgroup',component: AddGroupComponent}, { path: "CmdUIComponent", component: CmdUIComponent },
{path : 'sosalert', component: SOSAlertComponent}, { path: "addreessUpdate", component: AddressUpdateComponent },
{path: 'editgrp',component: EditGroupComponent}, { path: "group_view", component: GroupComponent },
{path: 'deleteGrp',component: DeleteGroupComponent}, { path: "addgroup", component: AddGroupComponent },
{path : 'commanQueue',component: CommanQueueComponent}, { path: "sosalert", component: SOSAlertComponent },
{path: 'accountSettings',component: AccountDetailComponent}, { path: "editgrp", component: EditGroupComponent },
{path: 'notifSettings',component: NotificationSettingComponent}, { path: "deleteGrp", component: DeleteGroupComponent },
{path : 'PointShareComponent',component : PointShareComponent}, { path: "commanQueue", component: CommanQueueComponent },
{path: 'messageUtility',component : MessageUtilityComponent}, { path: "accountSettings", component: AccountDetailComponent },
{path: 'censor',component : CensorDisplayComponent}, { path: "notifSettings", component: NotificationSettingComponent },
{path : 'virtualDevice',component : VirtualDeviceComponent}, { path: "PointShareComponent", component: PointShareComponent },
{path: 'fuelComp',component: SidemenuFuelComponent}, { path: "messageUtility", component: MessageUtilityComponent },
{path: 'vehicleRoute',component: VehicleRouteComponent}, { path: "censor", component: CensorDisplayComponent },
{path: 'setRoute',component: RouteSetComponent}, { path: "virtualDevice", component: VirtualDeviceComponent },
{path: 'viewRoute',component: ShowRouteComponent}, { path: "fuelComp", component: SidemenuFuelComponent },
{path: 'dealerInfo',component: DealersInfoComponent}, { path: "vehicleRoute", component: VehicleRouteComponent },
{path: 'routeMapping',component: RouteMappingComponent}, { path: "setRoute", component: RouteSetComponent },
{path: 'editrouteMap',component: EditRouteMapComponent}, { path: "viewRoute", component: ShowRouteComponent },
{path : 'suAdmin', component : SubAminComponent}, { path: "dealerInfo", component: DealersInfoComponent },
{path: 'subAdmin/addSubAdmin',component:AddsubadminComponent}, { path: "routeMapping", component: RouteMappingComponent },
{path: 'addRouteMap',component: RouteMapAddComponent}, { path: "editrouteMap", component: EditRouteMapComponent },
{path: 'Point_Of_Intrest',component:PointOfIntrestComponent}, { path: "suAdmin", component: SubAminComponent },
{path: 'POI_master_edit',component:PoiMasterEditComponent}, { path: "subAdmin/addSubAdmin", component: AddsubadminComponent },
{path : 'cus_support', component : CostumerSupportComponent}, { path: "addRouteMap", component: RouteMapAddComponent },
{ path: "Point_Of_Intrest", component: PointOfIntrestComponent },
{ path: "POI_master_edit", component: PoiMasterEditComponent },
{ path: "cus_support", component: CostumerSupportComponent },
{path: 'routeDelete',component:RouteDeleteComponent}, { path: "routeDelete", component: RouteDeleteComponent },
{path: 'addDealer',component:AddDealerComponent}, { path: "addDealer", component: AddDealerComponent },
{path: 'distributersList', component : DistributersListComponent}, { path: "distributersList", component: DistributersListComponent },
{path : 'addDistributers', component : AddDistributersComponent}, { path: "addDistributers", component: AddDistributersComponent },
{path: 'notifications',component:NotificationMasterComponent}, { path: "notifications", component: NotificationMasterComponent },
{path: 'edit-cust',component:EditCostumerComponent}, { path: "edit-cust", component: EditCostumerComponent },
{path: 'edit-dealer',component:EditDealerComponent}, { path: "edit-dealer", component: EditDealerComponent },
{path: 'tripHistory',component:TripHistoryComponent}, { path: "tripHistory", component: TripHistoryComponent },
{path: 'fuelobj',component:FuelObjectcomponentComponent}, { path: "fuelobj", component: FuelObjectcomponentComponent },
{path: 'poiList',component:PoiListComponent}, { path: "poiList", component: PoiListComponent },
{path: 'loadManagement',component:LoadManagementComponent}, { path: "loadManagement", component: LoadManagementComponent },
{path: 'lrinput',component:LRNumberComponent}, { path: "lrinput", component: LRNumberComponent },
{path: 'showCaliberation',component:ShowCaliberationComponent},//----path { path: "showCaliberation", component: ShowCaliberationComponent }, //----path
{path: 'VehicleType',component:VehicleTypeComponent}, { path: "VehicleType", component: VehicleTypeComponent },
{path: 'driverdetail',component:DriverDetailComponent},//path { path: "driverdetail", component: DriverDetailComponent }, //path
{path: 'deviceModel',component:DeviceModelComponent},//path
{path: 'billingDashboard',component : BillingDashboardComponent}, { path: "fota", component: FotaComponent }, //path
{path : 'generalSetting', component : GeneralSettingsComponent}, { path: "firmware", component: FirmwareComponent }, //path
{path: 'addEditVehicleType',component:AddEditVehicleTypeComponent}, { path: "deviceModel", component: DeviceModelComponent }, //path
{path: 'addDriver',component:AddDriverComponent}, { path: "billingDashboard", component: BillingDashboardComponent },
{path: 'addDeviceModel',component:AddDeviceModelComponent}, { path: "generalSetting", component: GeneralSettingsComponent },
{path: 'poilist',component:POIdetailsComponent}, { path: "addEditVehicleType", component: AddEditVehicleTypeComponent },
{path: 'poimenu',component:PoiMenuComponent}, { path: "addDriver", component: AddDriverComponent },
{path: 'fuel_Report',component:FuelReportGraphComponent}, { path: "addDeviceModel", component: AddDeviceModelComponent },
{path: 'editVehicle_type',component:EditVehicleTypeComponent}, { path: "poilist", component: POIdetailsComponent },
{path: 'editDeviceModel',component:EditDeviceModelComponent}, { path: "poimenu", component: PoiMenuComponent },
{path: 'userLogs',component:UserMasterComponent}, { path: "fuel_Report", component: FuelReportGraphComponent },
{path: 'deviceMaster',component:DeviceComponent}, { path: "editVehicle_type", component: EditVehicleTypeComponent },
{path: 'gpsMaster',component:GpsMasterComponent}, { path: "editDeviceModel", component: EditDeviceModelComponent },
{path: 'indexingReport',component:IndexingReportComponent}, { path: "userLogs", component: UserMasterComponent },
{path: 'cmdMaster',component:CmdPacketMasterComponent}, { path: "deviceMaster", component: DeviceComponent },
{path : 'deviceEntry', component : DeviceEntryComponent}, { path: "gpsMaster", component: GpsMasterComponent },
{path : 'Inventorylist', component : InventoryListComponent}, { path: "indexingReport", component: IndexingReportComponent },
{path : 'RenewReport', component : DeviceRenewComponent}, { path: "cmdMaster", component: CmdPacketMasterComponent },
{path : 'report-schedule', component : ReportScheduleComponent}, { path: "deviceEntry", component: DeviceEntryComponent },
{ path: "Inventorylist", component: InventoryListComponent },
{ path: "RenewReport", component: DeviceRenewComponent },
{ path: "report-schedule", component: ReportScheduleComponent },
// --------------------OLD--------------------------/ // --------------------OLD--------------------------/
// {path: 'device-report/tripsDetails',component:TripDetailsComponent}, // {path: 'device-report/tripsDetails',component:TripDetailsComponent},
@ -382,7 +403,10 @@ export const router: Routes =[
// {path: 'device-report/devicesosReport',component:DeviceSOSreportComponent}, // {path: 'device-report/devicesosReport',component:DeviceSOSreportComponent},
// {path: 'device-report/summary-report',component:SummaryReportComponent}, // {path: 'device-report/summary-report',component:SummaryReportComponent},
// {path: 'device-report/daywise-report',component:DayWiseReportComponent}, // {path: 'device-report/daywise-report',component:DayWiseReportComponent},
{path: 'device-report/dev-fuel-report',component:DeviceFuelReportComponent}, {
path: "device-report/dev-fuel-report",
component: DeviceFuelReportComponent,
},
// {path: 'device-report/geofancing',component:GeofancingReportComponent}, // {path: 'device-report/geofancing',component:GeofancingReportComponent},
// {path: 'device-report/overspeed',component: OverSpeedComponent}, // {path: 'device-report/overspeed',component: OverSpeedComponent},
// {path: 'device-report/routeViolation',component: RouteViolationComponent}, // {path: 'device-report/routeViolation',component: RouteViolationComponent},
@ -398,133 +422,133 @@ export const router: Routes =[
// {path: 'device-report/tripLoadUnload',component: TripLoadUnloadComponent}, // {path: 'device-report/tripLoadUnload',component: TripLoadUnloadComponent},
// {path : 'device-report/travel_path' ,component : TravelPathReportComponent}, // {path : 'device-report/travel_path' ,component : TravelPathReportComponent},
// // {path : 'device-report/ac_report/info',component:AcreportInfoComponent}, // // {path : 'device-report/ac_report/info',component:AcreportInfoComponent},
{path: 'device-report/fuel_report',component: FuelReportComponent}, { path: "device-report/fuel_report", component: FuelReportComponent },
{path : 'device-report/temp_report', component : TempretureReportComponent}, { path: "device-report/temp_report", component: TempretureReportComponent },
// {path: 'device-report/Driver-performance',component:DriversPerformanceReportComponent}, // {path: 'device-report/Driver-performance',component:DriversPerformanceReportComponent},
{path : 'device-report/tempGraph',component : TempretureGraphComponent}, { path: "device-report/tempGraph", component: TempretureGraphComponent },
// {path: 'maintananceReport',component: MaintananceComponent}, // {path: 'maintananceReport',component: MaintananceComponent},
//-------------------------------- //--------------------------------
{path : 'deviceList',component : DeviceListComponent}, { path: "deviceList", component: DeviceListComponent },
{path : 'toll',component : TollComponent}, { path: "toll", component: TollComponent },
{path : 'deviceInventory',component : DeviceInventoryComponent}, { path: "deviceInventory", component: DeviceInventoryComponent },
{path : 'technician',component : TechnicianComponent}, { path: "technician", component: TechnicianComponent },
{path : 'JobCard',component : JobCardComponent}, { path: "JobCard", component: JobCardComponent },
{path : 'JobCardAdd',component : AddJobCardComponent}, { path: "JobCardAdd", component: AddJobCardComponent },
{ {
path: 'reports', path: "reports",
component: MainComponent, // this is the component with the <router-outlet> in the template component: MainComponent, // this is the component with the <router-outlet> in the template
// loadChildren: () => import('./report/report.module').then(m => m.ReportModule), // loadChildren: () => import('./report/report.module').then(m => m.ReportModule),
children: [ children: [
{ {
path: 'ac_report', // child route path path: "ac_report", // child route path
component: AcReportsComponent, component: AcReportsComponent,
}, },
{ {
path: 'distance_report', // child route path path: "distance_report", // child route path
component: DisatanceReportComponent, component: DisatanceReportComponent,
}, },
{ {
path: 'daily_report', // child route path path: "daily_report", // child route path
component: DailyReportComponent, component: DailyReportComponent,
}, },
{ {
path: 'current_position', // child route path path: "current_position", // child route path
component: CurrentPositionReportComponent, component: CurrentPositionReportComponent,
}, },
{ {
path: 'daily_logs', path: "daily_logs",
component: DailyLogssComponent, component: DailyLogssComponent,
}, },
{ {
path: 'daywise_report', path: "daywise_report",
component: DayWiseReportComponent, component: DayWiseReportComponent,
}, },
{ {
path: 'geofence_report', path: "geofence_report",
component: GeofancingReportComponent, component: GeofancingReportComponent,
}, },
{ {
path: 'idle_report', path: "idle_report",
component: IdleReportComponent, component: IdleReportComponent,
}, },
{ {
path: 'ignition_report', path: "ignition_report",
component: IgnitionReportComponent, component: IgnitionReportComponent,
}, },
{ {
path: 'loading_unloading_trip', path: "loading_unloading_trip",
component: TripLoadUnloadComponent, component: TripLoadUnloadComponent,
}, },
{ {
path: 'overspeed_report', path: "overspeed_report",
component: OverSpeedComponent, component: OverSpeedComponent,
}, },
{ {
path: 'poi_report', path: "poi_report",
component: POIReportComponent, component: POIReportComponent,
}, },
{ {
path: 'route_violation_report', path: "route_violation_report",
component: RouteViolationComponent, component: RouteViolationComponent,
}, },
{ {
path: 'speed_variation', path: "speed_variation",
component: DeviceSpeedReportComponent, component: DeviceSpeedReportComponent,
}, },
{ {
path: 'summary_report', path: "summary_report",
component: SummaryReportComponent, component: SummaryReportComponent,
}, },
{ {
path: 'stoppage_report', path: "stoppage_report",
component: StoppageReportComponent, component: StoppageReportComponent,
}, },
{ {
path: 'sos_report', path: "sos_report",
component: DeviceSOSreportComponent, component: DeviceSOSreportComponent,
}, },
{ {
path: 'trip_report', path: "trip_report",
component: TripReportComponent, component: TripReportComponent,
}, },
{ {
path: 'trip_management_report', path: "trip_management_report",
component: TripManagementReportComponent, component: TripManagementReportComponent,
}, },
{ {
path: 'travel_path_report', path: "travel_path_report",
component: NewTravelPathReportComponent, component: NewTravelPathReportComponent,
}, },
{ {
path: 'working_hours_report', path: "working_hours_report",
component: WorkingHourReportComponent, component: WorkingHourReportComponent,
}, },
{ {
path: 'maintanance_report', path: "maintanance_report",
component: MaintananceComponent, component: MaintananceComponent,
}, },
{ {
path: 'notification_master', path: "notification_master",
component: NotificationMastersComponent, component: NotificationMastersComponent,
}, },
{ {
path: 'driver_performance_report', path: "driver_performance_report",
component: DriversPerformanceReportComponent, component: DriversPerformanceReportComponent,
}, },
{ {
path: 'no-report', path: "no-report",
component: NoReportComponent, component: NoReportComponent,
}, },
{ {
path: 'start', path: "start",
component: StartComponent, component: StartComponent,
}, },
{ {
path: 'dataPushReport', path: "dataPushReport",
component: PushDataReportComponent, component: PushDataReportComponent,
}, },
{path:"performanceReport",component:PerformanceReportComponent}, { path: "performanceReport", component: PerformanceReportComponent },
// AC_report','daily_report','daily_logs','dayWiseReport','distance_report','geofence_report','idle_report', // AC_report','daily_report','daily_logs','dayWiseReport','distance_report','geofence_report','idle_report',
// 'ignition_report','loadunloadTrip','over_speed','poi_report','route_violation_report','speed_variation', // 'ignition_report','loadunloadTrip','over_speed','poi_report','route_violation_report','speed_variation',
@ -533,50 +557,86 @@ export const router: Routes =[
], ],
}, },
{ {
path:'IEMI_Finder',component:SoonComponent path: "IEMI_Finder",
component: SoonComponent,
}, },
{ {
path:'USER_Finder',component:UserFinderComponent path: "USER_Finder",
component: UserFinderComponent,
}, },
{ {
path:'issueList',component:IssueListComponent path: "issueList",
component: IssueListComponent,
}, },
{ {
path:'recharge',component:RechargeComponent path: "recharge",
component: RechargeComponent,
}, },
{ {
path:'inactiveAdmins',component:InactiveAdminComponent path: "inactiveAdmins",
component: InactiveAdminComponent,
}, },
{ {
path:'routePlan',component:RouteListComponent path: "routePlan",
component: RouteListComponent,
}, },
{ {
path:'addRoutePlan',component:RoutePlanComponent path: "addRoutePlan",
component: RoutePlanComponent,
}, },
{ {
path:'routePlanReport',component:RoutPlanReportComponent path: "routePlanReport",
component: RoutPlanReportComponent,
}, },
{ {
path:'ViewVehicle',component:ShowVehiclesComponent path: "ViewVehicle",
component: ShowVehiclesComponent,
}, },
{ {
path:"add_newDevice",component:AddNewDeviceComponent path: "add_newDevice",
component: AddNewDeviceComponent,
canActivate: [DbauthGuard],
},
{
path: "add_newDevice2",
component: AddNewDevices2Component,
canActivate: [DbauthGuard],
},
//{ path: "add-device", component: AddNewDevices2Component },
{
path: "add-device",
component: DialogContentExampleDialogComponent,
}, },
{path:'KycApproval',component:KycApprovalComponent}, { path: "KycApproval", component: KycApprovalComponent },
{path:'NotificationForCC',component:NotificationForCCComponent}, { path: "financeApproval", component: FinanceApprovalComponent },
{path:'FuelPrice',component:FuelPriceComponent}, { path: "NotificationForCC", component: NotificationForCCComponent },
{path:'addFuelPrice',component:AddFuelPriceComponent}, { path: "FuelPrice", component: FuelPriceComponent },
{path:'RTO_Master',component:RtoMasterComponent}, { path: "addFuelPrice", component: AddFuelPriceComponent },
{ path: 'device-setting', component: DeviceSettingComponent }, { path: "RTO_Master", component: RtoMasterComponent },
{ path: 'user-setting', component: UserSettingComponent }, { path: "device-setting", component: DeviceSettingComponent },
{ path: "user-setting", component: UserSettingComponent },
// {path:'routePlanReportNew',component:NewRoutePlanReportComponent}, // {path:'routePlanReportNew',component:NewRoutePlanReportComponent},
{path:'routePlanReportNew',component:RoutPlanReportComponent}, { path: "routePlanReportNew", component: RoutPlanReportComponent },
{path:'ModelMaster',component:ModelMasterComponent}, { path: "ModelMaster", component: ModelMasterComponent },
{path:"editDevice",component:NewEditDeviceComponent}, {
{path: '**', redirectTo: 'login', pathMatch: 'full'}, path: "editDevice",
component: NewEditDeviceComponent,
canActivate: [DbauthGuard],
},
{
path: "db_editDevice",
component: DbEditDeviceComponent,
canActivate: [DbauthGuard],
},
{
path: "db_test",
loadChildren: "app/dhananjay2/dhananjay2.module#Dhananjay2Module",
},
{ path: "raw", component: RawComponent },
{ path: "newissuelist", component: NewissuelistComponent },
{ path: "**", redirectTo: "login", pathMatch: "full" },
]; ];
export const routes: ModuleWithProviders = RouterModule.forRoot(router); export const routes: ModuleWithProviders = RouterModule.forRoot(router);

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -19,20 +19,11 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputPassword4">Contact No.</label> <span>*</span> <label for="inputPassword4">Contact No.</label> <span>*</span>
<input <input (input)="onSearchChange($event.target.value)" formControlName="contactNo" type="text"
(input)="onSearchChange($event.target.value)" class="form-control" id="inputPassword4" placeholder="Enter Contact number"
formControlName="contactNo" [ngClass]="{ 'is-invalid': submitted && f.contactNo.errors }" />
type="text"
class="form-control"
id="inputPassword4"
placeholder="Enter Contact number"
[ngClass]="{ 'is-invalid': submitted && f.contactNo.errors }"
/>
<small [class.d-none]="!contactMessage">{{contactMessage}}</small> <small [class.d-none]="!contactMessage">{{contactMessage}}</small>
<div <div *ngIf="submitted && f.contactNo.errors" class="invalid-feedback">
*ngIf="submitted && f.contactNo.errors"
class="invalid-feedback"
>
<div *ngIf="f.contactNo.errors.required"> <div *ngIf="f.contactNo.errors.required">
Contact Number is required Contact Number is required
</div> </div>
@ -43,18 +34,9 @@
</div> </div>
<div class="form-group col-md-2"> <div class="form-group col-md-2">
<label for="inputEmail4">Owner First Name</label> <span>*</span> <label for="inputEmail4">Owner First Name</label> <span>*</span>
<input <input formControlName="first_name" type="text" class="form-control" id="inputEmail4"
formControlName="first_name" placeholder="Enter First Name" [ngClass]="{ 'is-invalid': submitted && f.first_name.errors }" />
type="text" <div *ngIf="submitted && f.first_name.errors" class="invalid-feedback">
class="form-control"
id="inputEmail4"
placeholder="Enter First Name"
[ngClass]="{ 'is-invalid': submitted && f.first_name.errors }"
/>
<div
*ngIf="submitted && f.first_name.errors"
class="invalid-feedback"
>
<div *ngIf="f.first_name.errors.required"> <div *ngIf="f.first_name.errors.required">
Owner First Name is required Owner First Name is required
</div> </div>
@ -64,22 +46,10 @@
</div> </div>
</div> </div>
<div class="form-group col-md-2"> <div class="form-group col-md-2">
<label for="inputEmail4">Owner Last Name</label> <span>*</span> <label for="inputEmail4">Owner Last Name</label>
<input <input formControlName="last_name" type="text" class="form-control" id="inputEmail4"
formControlName="last_name" placeholder="Enter Last Name" [ngClass]="{ 'is-invalid': submitted && f.last_name.errors }" />
type="text" <div *ngIf="submitted && f.last_name.errors" class="invalid-feedback">
class="form-control"
id="inputEmail4"
placeholder="Enter Last Name"
[ngClass]="{ 'is-invalid': submitted && f.last_name.errors }"
/>
<div
*ngIf="submitted && f.last_name.errors"
class="invalid-feedback"
>
<div *ngIf="f.last_name.errors.required">
Owner Last Name is required
</div>
<div *ngIf="f.last_name.errors.pattern"> <div *ngIf="f.last_name.errors.pattern">
Please enter valid last name Please enter valid last name
</div> </div>
@ -88,32 +58,17 @@
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputCity">Email</label> <label for="inputCity">Email</label>
<!-- <span>*</span> --> <!-- <span>*</span> -->
<input <input formControlName="email" type="text" class="form-control" id="inputCity"
formControlName="email" placeholder="Please Enter Email" />
type="text"
class="form-control"
id="inputCity"
placeholder="Please Enter Email"
/>
<!-- <div *ngIf="submitted && f.email.errors.email" class="invalid-feedback">
<div *ngIf="f.email.errors.email">Please Enter valid email id</div>
</div> -->
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputCity">Dealer Followup Mobile</label> <span>*</span> <label for="inputCity">Dealer Followup Mobile</label> <span>*</span>
<input <input formControlName="dealerFollowup" type="text" class="form-control" id="inputCity"
formControlName="dealerFollowup" [ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }" />
type="text" <div *ngIf="submitted && f.dealerFollowup.errors" class="invalid-feedback">
class="form-control"
id="inputCity"
[ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }"
/>
<div
*ngIf="submitted && f.dealerFollowup.errors"
class="invalid-feedback"
>
<div *ngIf="f.dealerFollowup.errors.required"> <div *ngIf="f.dealerFollowup.errors.required">
Dealer Followup is required Dealer Followup is required
</div> </div>
@ -125,26 +80,16 @@
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputCity">Address</label> <span>*</span> <label for="inputCity">Address</label> <span>*</span>
<input <input formControlName="address" type="text" class="form-control" id="inputCity"
formControlName="address" [ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }" />
type="text"
class="form-control"
id="inputCity"
[ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }"
/>
<div *ngIf="submitted && f.address.errors" class="invalid-feedback"> <div *ngIf="submitted && f.address.errors" class="invalid-feedback">
<div *ngIf="f.address.errors.required">Address is required</div> <div *ngIf="f.address.errors.required">Address is required</div>
</div> </div>
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="pin">Pin Code</label> <span>*</span> <label for="pin">Pin Code</label> <span>*</span>
<input <input formControlName="pin" type="text" class="form-control" id="pin"
formControlName="pin" [ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }" />
type="text"
class="form-control"
id="pin"
[ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }"
/>
<div *ngIf="submitted && f.pin.errors" class="invalid-feedback"> <div *ngIf="submitted && f.pin.errors" class="invalid-feedback">
<div *ngIf="f.pin.errors.required">Pin Code is required</div> <div *ngIf="f.pin.errors.required">Pin Code is required</div>
<div *ngIf="f.pin.errors.pattern"> <div *ngIf="f.pin.errors.pattern">
@ -156,46 +101,50 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputState">State</label> <label for="inputState">State</label> <span>*</span>
<select <select formControlName="state" (change)="onStateChange($event)" id="inputState" class="form-control">
formControlName="state"
(change)="onStateChange($event)"
id="inputState"
class="form-control"
>
<option value="" selected disabled>Choose state</option> <option value="" selected disabled>Choose state</option>
<option *ngFor="let item of states" [value]="item"> <option *ngFor="let item of states" [value]="item">
{{ item }} {{ item }}
</option> </option>
</select> </select>
<div *ngIf="submitted && f.state.errors" class="invalid-feedback">
<div *ngIf="f.state.errors.required">
State is required
</div>
</div>
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputCity">City</label> <label for="inputCity">City</label> <span>*</span>
<select <select formControlName="city" (change)="onCityChange($event)" id="inputState" class="form-control">
formControlName="city"
(change)="onCityChange($event)"
id="inputState"
class="form-control"
>
<option value="" selected disabled>Choose City</option> <option value="" selected disabled>Choose City</option>
<option *ngFor="let item of cityList" [value]="item.city"> <option *ngFor="let item of cityList" [value]="item.city">
{{ item.city }} {{ item.city }}
</option> </option>
</select> </select>
<div *ngIf="submitted && f.city.errors" class="invalid-feedback">
<div *ngIf="f.city.errors.required">
City is required
</div>
</div>
<!-- <input formControlName="city" type="text" class="form-control" id="inputCity"> --> <!-- <input formControlName="city" type="text" class="form-control" id="inputCity"> -->
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputZip">RTO Office</label> <label for="inputZip">RTO Office</label> <span>*</span>
<select <select formControlName="rtoOffice" id="inputState" class="form-control">
formControlName="rtoOffice"
id="inputState"
class="form-control"
>
<option value="" selected disabled>Choose RTO</option> <option value="" selected disabled>Choose RTO</option>
<option *ngFor="let item of RTO" [value]="item.RTO_Name"> <option *ngFor="let item of RTO" [value]="item.RTO_Name">
{{ item.RTO_Name }} {{ item.RTO_Name }}
</option> </option>
</select> </select>
<div *ngIf="submitted && f.rtoOffice.errors" class="invalid-feedback">
<div *ngIf="f.rtoOffice.errors.required">
RTO Office is required
</div>
</div>
<!-- <input formControlName="rtoOffice" type="text" class="form-control" id="inputZip"> --> <!-- <input formControlName="rtoOffice" type="text" class="form-control" id="inputZip"> -->
</div> </div>
</div> </div>
@ -203,18 +152,9 @@
<div class="form-row"> <div class="form-row">
<div *ngIf="!inventoryManagement" class="form-group col-md-4"> <div *ngIf="!inventoryManagement" class="form-group col-md-4">
<label for="inputCity">Device ID (IMEI)</label><span>*</span> <label for="inputCity">Device ID (IMEI)</label><span>*</span>
<input <input formControlName="device_id" type="text" (keyup)="removeSpecialChar()" class="form-control"
formControlName="device_id" id="inputCity" [ngClass]="{ 'is-invalid': submitted && f.email.errors }" />
type="text" <div *ngIf="submitted && f.device_id.errors" class="invalid-feedback">
(keyup)="removeSpecialChar()"
class="form-control"
id="inputCity"
[ngClass]="{ 'is-invalid': submitted && f.email.errors }"
/>
<div
*ngIf="submitted && f.device_id.errors"
class="invalid-feedback"
>
<div *ngIf="f.device_id.errors.required"> <div *ngIf="f.device_id.errors.required">
Device Id is required Device Id is required
</div> </div>
@ -224,22 +164,18 @@
<label for="inputCity">Device ID (IMEI)</label><span>*</span> <label for="inputCity">Device ID (IMEI)</label><span>*</span>
<div> <div>
<select id="inventory" multiple="multiple"> <select id="inventory" multiple="multiple">
<option <option *ngFor="let option_1 of inventory" [value]="option_1.IMEI">
*ngFor="let option_1 of inventory"
[value]="option_1.IMEI"
>
{{ option_1.IMEI }} {{ option_1.IMEI }}
</option> </option>
</select> </select>
</div> </div>
<div *ngIf="invalidEmeiSelected" style="margin-top: 0.25rem; <div *ngIf="invalidEmeiSelected" style="margin-top: 0.25rem;
font-size: .875rem; font-size: .875rem;
color: #dc3545;">This IMEI is already added in system. Please choose different IMEI</div> color: #dc3545;">This IMEI is already added in system. Please choose different IMEI</div>
<div <div *ngIf="submitted && f.device_id.errors" class="invalid-feedback">
*ngIf="submitted && f.device_id.errors"
class="invalid-feedback"
>
<div *ngIf="f.device_id.errors.required"> <div *ngIf="f.device_id.errors.required">
Device Id is required Device Id is required
</div> </div>
@ -249,18 +185,9 @@
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputPassword4">Vehicle No.</label><span>*</span> <label for="inputPassword4">Vehicle No.</label><span>*</span>
<input <input formControlName="vehicleNo" type="text" class="form-control" id="inputPassword4"
formControlName="vehicleNo" placeholder="Enter Vehicle number" [ngClass]="{ 'is-invalid': submitted && f.vehicleNo.errors }" />
type="text" <div *ngIf="submitted && f.vehicleNo.errors" class="invalid-feedback">
class="form-control"
id="inputPassword4"
placeholder="Enter Vehicle number"
[ngClass]="{ 'is-invalid': submitted && f.vehicleNo.errors }"
/>
<div
*ngIf="submitted && f.vehicleNo.errors"
class="invalid-feedback"
>
<div *ngIf="f.vehicleNo.errors.required"> <div *ngIf="f.vehicleNo.errors.required">
Vehicle number is required Vehicle number is required
</div> </div>
@ -285,25 +212,14 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="iccid">ICCID</label> <label for="iccid">ICCID</label>
<input <input formControlName="iccid" type="text" class="form-control" id="iccid"
formControlName="iccid" placeholder="Enter ICCID No number" />
type="text"
class="form-control"
id="iccid"
placeholder="Enter ICCID No number"
/>
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="sim1">SIM 1</label> <span>*</span> <label for="sim1">SIM 1</label> <span>*</span>
<input <input formControlName="sim1" type="text" class="form-control" id="sim1" placeholder="Enter SIM number"
formControlName="sim1" [ngClass]="{ 'is-invalid': submitted && f.sim1.errors }" />
type="text"
class="form-control"
id="sim1"
placeholder="Enter SIM number"
[ngClass]="{ 'is-invalid': submitted && f.sim1.errors }"
/>
<div *ngIf="submitted && f.sim1.errors" class="invalid-feedback"> <div *ngIf="submitted && f.sim1.errors" class="invalid-feedback">
<div *ngIf="f.sim1.errors.required">SIM 1 is required</div> <div *ngIf="f.sim1.errors.required">SIM 1 is required</div>
</div> </div>
@ -312,13 +228,7 @@
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputEmail4">SIM 2</label> <label for="inputEmail4">SIM 2</label>
<div> <div>
<input <input formControlName="sim2" type="text" class="form-control" id="sim1" placeholder="Enter SIM number" />
formControlName="sim2"
type="text"
class="form-control"
id="sim1"
placeholder="Enter SIM number"
/>
</div> </div>
</div> </div>
</div> </div>
@ -326,18 +236,9 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputEmail4">Chassis No.</label><span>*</span> <label for="inputEmail4">Chassis No.</label><span>*</span>
<input <input formControlName="chasisNo" type="text" class="form-control" id="inputEmail4"
formControlName="chasisNo" placeholder="Enter Chasis No." [ngClass]="{ 'is-invalid': submitted && f.chasisNo.errors }" />
type="text" <div *ngIf="submitted && f.chasisNo.errors" class="invalid-feedback">
class="form-control"
id="inputEmail4"
placeholder="Enter Chasis No."
[ngClass]="{ 'is-invalid': submitted && f.chasisNo.errors }"
/>
<div
*ngIf="submitted && f.chasisNo.errors"
class="invalid-feedback"
>
<div *ngIf="f.chasisNo.errors.required"> <div *ngIf="f.chasisNo.errors.required">
Chassis No is required Chassis No is required
</div> </div>
@ -345,18 +246,9 @@
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputPassword4">Engine No.</label><span>*</span> <label for="inputPassword4">Engine No.</label><span>*</span>
<input <input formControlName="engineNo" type="text" class="form-control" id="inputPassword4"
formControlName="engineNo" placeholder="Enter Engine number" [ngClass]="{ 'is-invalid': submitted && f.engineNo.errors }" />
type="text" <div *ngIf="submitted && f.engineNo.errors" class="invalid-feedback">
class="form-control"
id="inputPassword4"
placeholder="Enter Engine number"
[ngClass]="{ 'is-invalid': submitted && f.engineNo.errors }"
/>
<div
*ngIf="submitted && f.engineNo.errors"
class="invalid-feedback"
>
<div *ngIf="f.engineNo.errors.required"> <div *ngIf="f.engineNo.errors.required">
Engine No is required Engine No is required
</div> </div>
@ -384,11 +276,7 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputCity">Vehicle Manufacture</label> <label for="inputCity">Vehicle Manufacture</label>
<select <select class="form-control" formControlName="vehicleManufacture" (change)="selectModel($event)">
class="form-control"
formControlName="vehicleManufacture"
(change)="selectModel($event)"
>
<option value="" selected disabled>Choose Manufacturer</option> <option value="" selected disabled>Choose Manufacturer</option>
<option *ngFor="let item of manufacturingData" [value]="item"> <option *ngFor="let item of manufacturingData" [value]="item">
{{ item }} {{ item }}
@ -425,10 +313,7 @@
<label for="inputState">Device Model</label><span>*</span> <label for="inputState">Device Model</label><span>*</span>
<div> <div>
<select id="dbselect" multiple="multiple"> <select id="dbselect" multiple="multiple">
<option <option *ngFor="let option_1 of device_Model" [value]="option_1._id">
*ngFor="let option_1 of device_Model"
[value]="option_1._id"
>
{{ option_1.modelName }} {{ option_1.modelName }}
</option> </option>
</select> </select>
@ -437,38 +322,20 @@
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputZip">Tracking Expiry</label> <label for="inputZip">Tracking Expiry</label>
<input <input disabled formControlName="trackingExp" bsDatepicker [bsConfig]="bsConfig" [isDisabled]="true"
disabled type="text" class="form-control" id="inputZip" />
formControlName="trackingExp"
bsDatepicker
[bsConfig]="bsConfig"
[isDisabled]="true"
type="text"
class="form-control"
id="inputZip"
/>
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputZip">E sim Expiry</label> <label for="inputZip">E sim Expiry</label>
<input <input formControlName="eSimExpiry" bsDatepicker [attr.disabled]="true" [bsConfig]="bsConfig" type="text"
formControlName="eSimExpiry" class="form-control" id="inputZip" />
bsDatepicker
[attr.disabled]="true"
[bsConfig]="bsConfig"
type="text"
class="form-control"
id="inputZip"
/>
</div> </div>
</div> </div>
<div class="row"></div> <div class="row"></div>
</form> </form>
<div <div style="overflow: auto; overflow-x: hidden; min-height: 200px" [ngClass]="{ rowHeight: docRow }">
style="overflow: auto; overflow-x: hidden; min-height: 200px"
[ngClass]="{ rowHeight: docRow }"
>
<div class="row" *ngFor="let data of imageuploadObject; let i = index"> <div class="row" *ngFor="let data of imageuploadObject; let i = index">
<div class="col-sm-6" style="padding-top: 8px"> <div class="col-sm-6" style="padding-top: 8px">
<div class="row"> <div class="row">
@ -476,31 +343,18 @@
<span>{{ data.doctype }} : </span> <span>{{ data.doctype }} : </span>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<input <input type="text" [(ngModel)]="data.phone" placeholder="{{ 'Doc number' | translate }}" />
type="text"
[(ngModel)]="data.phone"
placeholder="{{ 'Doc number' | translate }}"
/>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<img <img *ngIf="data.image" style="width: 50px" [src]="'https://www.oneqlik.in' + data.image.substring(6)"
*ngIf="data.image" (click)="openModal(template, data)" />
style="width: 50px"
[src]="'https://www.oneqlik.in' + data.image.substring(6)"
(click)="openModal(template, data)"
/>
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<span <span><input type="file" class="btn btn btn-success" style="background: #f1f1f1; border: none; color: black"
><input (change)="onFileChanged($event, i)" /></span>
type="file"
class="btn btn btn-success"
style="background: #f1f1f1; border: none; color: black"
(change)="onFileChanged($event, i)"
/></span>
<!-- <span> <!-- <span>
<button class="btn btn btn-success" (click)="onUpload(i)"> <button class="btn btn btn-success" (click)="onUpload(i)">
{{ uploadStatus }} {{ uploadStatus }}
@ -510,31 +364,17 @@
</div> </div>
</div> </div>
<div class="accordion" id="accordionExample"> <div class="accordion" id="accordionExample">
<div <div class="card" style="margin-left: 61px; margin-top: 23px; margin-right: 151px">
class="card"
style="margin-left: 61px; margin-top: 23px; margin-right: 151px"
>
<div class="card-header" id="headingOne"> <div class="card-header" id="headingOne">
<h2 class="mb-0"> <h2 class="mb-0">
<button <button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapseOne"
class="btn btn-link" aria-expanded="true" aria-controls="collapseOne">
type="button"
data-toggle="collapse"
data-target="#collapseOne"
aria-expanded="true"
aria-controls="collapseOne"
>
Upload Device Image Upload Device Image
</button> </button>
</h2> </h2>
</div> </div>
<div <div id="collapseOne" class="collapse collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
id="collapseOne"
class="collapse collapse"
aria-labelledby="headingOne"
data-parent="#accordionExample"
>
<div class="card-body"> <div class="card-body">
<div class="row"> <div class="row">
<div class="col-md-2"> <div class="col-md-2">
@ -542,25 +382,18 @@
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<img <img *ngIf="deviceImg[0]" style="width: 50px"
*ngIf="deviceImg[0]"
style="width: 50px"
[src]="'https://www.oneqlik.in' + deviceImg[0].substring(6)" [src]="'https://www.oneqlik.in' + deviceImg[0].substring(6)"
(click)="openModal(template, deviceImg[0])" (click)="openModal(template, deviceImg[0])" />
/>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<input <input style="
style="
background: #ececec; background: #ececec;
width: 80%; width: 80%;
margin-left: 5px; margin-left: 5px;
border: 1px solid #c1c1c1; border: 1px solid #c1c1c1;
" " type="file" (change)="onDeviceImageChanged($event, 0)" />
type="file"
(change)="onDeviceImageChanged($event, 0)"
/>
</div> </div>
<!-- <div class="col-md-4"> <!-- <div class="col-md-4">
@ -584,24 +417,17 @@
<span>Device Image 2: </span> <span>Device Image 2: </span>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<img <img *ngIf="deviceImg[1]" style="width: 50px"
*ngIf="deviceImg[1]"
style="width: 50px"
[src]="'https://www.oneqlik.in' + deviceImg[1].substring(6)" [src]="'https://www.oneqlik.in' + deviceImg[1].substring(6)"
(click)="openModal(template, deviceImg[1])" (click)="openModal(template, deviceImg[1])" />
/>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<input <input style="
style="
background: #ececec; background: #ececec;
width: 80%; width: 80%;
margin-left: 5px; margin-left: 5px;
border: 1px solid #c1c1c1; border: 1px solid #c1c1c1;
" " type="file" (change)="onDeviceImageChanged($event, 1)" />
type="file"
(change)="onDeviceImageChanged($event, 1)"
/>
</div> </div>
<!-- <div class="col-md-4"> <!-- <div class="col-md-4">
@ -625,24 +451,17 @@
<span>Device Image 3: </span> <span>Device Image 3: </span>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<img <img *ngIf="deviceImg[2]" style="width: 50px"
*ngIf="deviceImg[2]"
style="width: 50px"
[src]="'https://www.oneqlik.in' + deviceImg[2].substring(6)" [src]="'https://www.oneqlik.in' + deviceImg[2].substring(6)"
(click)="openModal(template, deviceImg[2])" (click)="openModal(template, deviceImg[2])" />
/>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<input <input style="
style="
background: #ececec; background: #ececec;
width: 80%; width: 80%;
margin-left: 5px; margin-left: 5px;
border: 1px solid #c1c1c1; border: 1px solid #c1c1c1;
" " type="file" (change)="onDeviceImageChanged($event, 2)" />
type="file"
(change)="onDeviceImageChanged($event, 2)"
/>
</div> </div>
<!-- <div class="col-md-4"> <!-- <div class="col-md-4">
@ -680,12 +499,7 @@
<ng-template #template> <ng-template #template>
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title pull-left">{{ docName }}</h4> <h4 class="modal-title pull-left">{{ docName }}</h4>
<button <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">
type="button"
class="close pull-right"
aria-label="Close"
(click)="modalRef.hide()"
>
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,857 @@
<app-all-menus></app-all-menus>
<!--
(ngSubmit)="submit()"
-->
<div class="container-fluid" style="padding-top: 52px">
<form [formGroup]="deviceForm">
<div class="row">
<!-- <div class="col-md-6 col-lg-6 col-sm-12 col-12">
<div class="form-group col-md-4">
<label for="inputCity">Dealer Followup Mobile</label> <span>*</span>
<input
formControlName="dealerFollowup"
type="text"
class="form-control"
id="inputCity"
[ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }"
/>
<div
*ngIf="submitted && f.dealerFollowup.errors"
class="invalid-feedback"
>
<div *ngIf="f.dealerFollowup.errors.required">
Dealer Followup is required
</div>
<div *ngIf="f.dealerFollowup.errors.pattern">
Please Enter Valid number
</div>
</div>
</div>
</div> -->
<div class="col-md-6 col-lg-6 col-sm-12 col-12">
<div class="card shadow-sm mt-3">
<div class="card-header p-2" style="font-weight: 600; background: #efefef"
(click)="pg_sh.tab101 = !pg_sh.tab101">
<i class="fa-solid" [ngClass]="{
'fa-chevron-down': pg_sh.tab120 == true,
'fa-chevron-right': pg_sh.tab120 == false
}"></i>
Dealership
</div>
<div class="card-body" [ngClass]="{ 'd-none': pg_sh.tab120 == false }">
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Follow-up Contact no<span
class="text-danger"> * </span></label>
<div class="col-sm-8 col-8">
<input formControlName="dealerFollowup" type="text" class="form-control form-control-sm"
id="inputEmail4" placeholder="Enter Follow-up No" [ngClass]="{
'is-invalid': submitted && f.dealerFollowup.errors
}" />
<div *ngIf="submitted && f.dealerFollowup.errors" class="invalid-feedback">
<div *ngIf="f.dealerFollowup.errors.required">
Follow-up No is required
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card shadow-sm mt-3">
<div class="card-header p-2" style="font-weight: 600; background: #efefef"
(click)="pg_sh.tab101 = !pg_sh.tab101">
<i class="fa-solid" [ngClass]="{
'fa-chevron-down': pg_sh.tab101 == true,
'fa-chevron-right': pg_sh.tab101 == false
}"></i>
Customer Detail
</div>
<div class="card-body" [ngClass]="{ 'd-none': pg_sh.tab101 == false }">
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Customer Type<span
class="text-danger"> * </span></label>
<div class="col-sm-8 col-8">
<select class="form-control form-control-sm" name="customerType" id="customerType"
formControlName="customerType">
<option value="">Select Customer Type</option>
<option value="Individual">Customer Individual</option>
<option value="Firm">Customer Firm</option>
</select>
</div>
</div>
<!-- end customer type -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Mobile No.
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<input (input)="onSearchChange($event.target.value)" formControlName="contactNo" type="text"
class="form-control form-control-sm" id="inputPassword4" placeholder="Enter Contact number"
[ngClass]="{ 'is-invalid': submitted && f.contactNo.errors }" />
<small [class.d-none]="!contactMessage">{{
contactMessage
}}</small>
<div *ngIf="submitted && f.contactNo.errors" class="invalid-feedback">
<div *ngIf="f.contactNo.errors.required">
Contact Number is required
</div>
<div *ngIf="f.contactNo.errors.pattern">
Please enter valid Mobile No.
</div>
</div>
</div>
</div>
<!-- Mobile No. end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Customer Name<span
class="text-danger"> * </span></label>
<div class="col-sm-8 col-8">
<input formControlName="first_name" type="text" class="form-control form-control-sm" id="inputEmail4"
placeholder="Enter First Name" [ngClass]="{ 'is-invalid': submitted && f.first_name.errors }" />
<div *ngIf="submitted && f.first_name.errors" class="invalid-feedback">
<div *ngIf="f.first_name.errors.required">
Customer Name is required
</div>
<div *ngIf="f.first_name.errors.pattern">
Please enter valid Customer Name
</div>
</div>
</div>
</div>
<!-- Customer Name end -->
<div class="form-group row mb-0" *ngIf="deviceForm.value.customerType != 'Individual'">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Custodian Name
<span class="text-danger"> * </span></label>
<div class="col-sm-8 col-8">
<input formControlName="last_name" type="text" class="form-control form-control-sm" id="inputEmail4"
placeholder="Enter Custodian Name" [ngClass]="{ 'is-invalid': submitted && f.last_name.errors }" />
<div *ngIf="submitted && f.last_name.errors" class="invalid-feedback">
<div *ngIf="f.last_name.errors.pattern">
Please enter valid Custodian Name
</div>
</div>
</div>
</div>
<!-- Custodian Name end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Email ID</label>
<div class="col-sm-8 col-8">
<input formControlName="email" type="text" class="form-control form-control-sm" id="inputCity"
placeholder="Please Enter Email" />
</div>
</div>
<!-- Email ID end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Address
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<input formControlName="address" type="text" class="form-control form-control-sm" id="old_address"
placeholder="Enter Address" [ngClass]="{
'is-invalid': submitted && f.address.errors
}" />
<div *ngIf="submitted && f.address.errors" class="invalid-feedback">
<div *ngIf="f.address.errors.required">
Address is required
</div>
</div>
</div>
</div>
<!-- Address end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">State
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<select formControlName="customer_state" (change)="newonStateChange($event)" id="inputState173"
class="form-control form-control-sm">
<option value="" selected disabled>Choose state</option>
<option *ngFor="let item of db_state_city_list" [value]="item.state">
{{ item.state }}
</option>
</select>
<div *ngIf="submitted && f.customer_state.errors" class="text-danger">
<div *ngIf="f.customer_state.errors.required">
State is required
</div>
</div>
</div>
</div>
<!-- state end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">City
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<!-- (change)="onCityChange($event)" -->
<select formControlName="customer_city" id="inputState204" class="form-control form-control-sm">
<option value="" selected>Choose City</option>
<option *ngFor="let item of newcityList" [value]="item">
{{ item }}
</option>
</select>
<div *ngIf="submitted && f.customer_city.errors" class="text-danger">
<div *ngIf="f.customer_city.errors.required">
City is required
</div>
</div>
</div>
</div>
<!-- city end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Pin Code <span
class="text-danger"> * </span></label>
<div class="col-sm-8 col-8">
<input type="text" placeholder="Enter Pin Code" formControlName="customer_pin"
class="form-control form-control-sm" id="customer_pin" [ngClass]="{
'is-invalid': submitted && f.customer_pin.errors
}" />
<div *ngIf="submitted && f.customer_pin.errors" class="invalid-feedback">
<div *ngIf="f.customer_pin.errors.required">
Pin Code is required
</div>
<div *ngIf="f.customer_pin.errors.pattern">
Please Enter valid Pin code
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end card -->
<div class="card shadow-sm mt-3">
<div class="card-header p-2" style="font-weight: 600; background: #efefef"
(click)="pg_sh.tab102 = !pg_sh.tab102">
<i class="fa-solid" [ngClass]="{
'fa-chevron-down': pg_sh.tab102 == true,
'fa-chevron-right': pg_sh.tab102 == false
}"></i>
Vehicle Detail
</div>
<div class="card-body" [ngClass]="{ 'd-none': pg_sh.tab102 == false }">
<!-- body start -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Manufacturer<span
class="text-danger"> * </span></label>
<div class="col-sm-8 col-8">
<select class="form-control form-control-sm" formControlName="vehicleManufacture"
(change)="selectModel($event)">
<option value="" selected disabled>
Choose Manufacturer
</option>
<option *ngFor="let item of manufacturingData" [value]="item">
{{ item }}
</option>
</select>
</div>
</div>
<!-- Manufacturer end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Model
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<select class="form-control form-control-sm" formControlName="model">
<option value="" selected disabled>Choose Model</option>
<option *ngFor="let item of modelData" [value]="item.ModelName">
{{ item.ModelName }}
</option>
</select>
</div>
</div>
<!-- Model end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Chassis No.
{{checkChasisNoFlag}}
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<input formControlName="chasisNo" type="text" class="form-control form-control-sm" id="inputEmail4"
placeholder="Enter Chasis No." [ngClass]="{ 'is-invalid':(( submitted && f.chasisNo.errors) || checkChasisNoFlag == true) }"
(keyup)="checkChasisNo(deviceForm.value)"
/>
<div *ngIf="checkChasisNoFlag == true" class="invalid-feedback">
Chassis No already exists!
</div>
<div *ngIf="submitted && f.chasisNo.errors" class="invalid-feedback">
<div *ngIf="f.chasisNo.errors.required">
Chassis No is required
</div>
</div>
</div>
</div>
<!-- Chassis No. end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Engine No<span
class="text-danger"> * </span></label>
<div class="col-sm-8 col-8">
<input formControlName="engineNo" type="text" class="form-control form-control-sm" id="inputPassword4"
placeholder="Enter Engine number" [ngClass]="{ 'is-invalid': submitted && f.engineNo.errors }" />
<div *ngIf="submitted && f.engineNo.errors" class="invalid-feedback">
<div *ngIf="f.engineNo.errors.required">
Engine No is required
</div>
</div>
</div>
</div>
<!-- Engine No end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Vehicle No
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<input formControlName="vehicleNo" type="text" class="form-control form-control-sm" id="vehicleNo"
placeholder="Enter Vehicle number" [ngClass]="{ 'is-invalid': submitted && f.vehicleNo.errors }" />
<div *ngIf="submitted && f.vehicleNo.errors" class="invalid-feedback">
<div *ngIf="f.vehicleNo.errors.required">
Vehicle number is required
</div>
<div *ngIf="f.vehicleNo.errors.maxLength">
Vehicle number accepts max 10 digits
</div>
</div>
</div>
</div>
<!-- Vehicle No end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Mfd Year
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<select formControlName="mfdyear" class="form-control form-control-sm">
<option [value]="''">Select Mfd Year</option>
<option *ngFor="let year of mfdyear_arr" [value]="year">
{{ year }}
</option>
</select>
<!-- <input
formControlName="mfdyear"
type="text"
class="form-control form-control-sm"
id="inputPassword4"
placeholder="Enter Vehicle number"
[ngClass]="{
'is-invalid': submitted && f.mfdyear.errors
}"
/> -->
<div *ngIf="submitted && f.mfdyear.errors" class="invalid-feedback">
<div *ngIf="f.mfdyear.errors.required">
Mfd Year is required
</div>
<div *ngIf="f.mfdyear.errors.maxLength">Mfd Year Enter</div>
</div>
</div>
</div>
<!-- Mfd Year end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Vehicle Category
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<select formControlName="vehicleCategory" class="form-control form-control-sm">
<option *ngFor="let license of vehicleCat" [value]="license">
{{ license }}
</option>
</select>
</div>
</div>
<!-- Vehicle Category -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Fuel Type
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<select class="form-control form-control-sm" formControlName="fuelType">
<option value="" selected disabled>Choose Fuel Type</option>
<option *ngFor="
let item of [
'Electric',
'PETROL',
'PETROL/HYBRID',
'PETROL/CNG',
'Diesel',
'Diesel/ Hybrid',
'Dual Diesel/ Bio CNG',
'CNG Only',
'Dual Diesel/CNG',
'Dual Diesel/LNG',
'Ethanol',
'Fuel Cell Hydrogen',
'LNG',
'LPG ONLY',
'METHNOL',
'PETROL/ETHANOL',
'PETROL/LPG',
'PETROL/METHANOL',
'SOLAR'
]
" [value]="item">
{{ item }}
</option>
</select>
</div>
</div>
<!-- body end -->
</div>
</div>
<!-- -->
</div>
<!-- end col-6 1st -->
<div class="col-md-6 col-lg-6 col-sm-12 col-12">
<div class="card shadow-sm mt-3">
<div class="card-header p-2" style="font-weight: 600; background: #efefef"
(click)="pg_sh.tab103 = !pg_sh.tab103">
<i class="fa-solid" [ngClass]="{
'fa-chevron-down': pg_sh.tab103 == true,
'fa-chevron-right': pg_sh.tab103 == false
}"></i>
Device Detail
</div>
<div class="card-body" [ngClass]="{ 'd-none': pg_sh.tab103 == false }">
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">IMEI <span class="text-danger">
* </span></label>
<div class="col-sm-8 col-8 db_not_inventoryManagement" *ngIf="!inventoryManagement">
<input formControlName="device_id" type="text" (keyup)="removeSpecialChar()"
class="form-control form-control-sm" id="inputIMEI"
[ngClass]="{ 'is-invalid': submitted && f.device_id.errors }" />
<div *ngIf="submitted && f.device_id.errors" class="text-danger">
<div *ngIf="f.device_id.errors.required">
Device Id is required
</div>
</div>
</div>
<div class="col-sm-8 col-8 db_inventoryManagement" *ngIf="inventoryManagement">
<select id="inventory" multiple="multiple">
<option *ngFor="let option_1 of inventory" [value]="option_1.IMEI">
{{ option_1.IMEI }}
</option>
</select>
<div *ngIf="invalidEmeiSelected" style="
margin-top: 0.25rem;
font-size: 0.875rem;
color: #dc3545;
">
This IMEI is already added in system. Please choose different
IMEI
</div>
<div *ngIf="submitted && f.device_id.errors" class="text-danger">
<div *ngIf="f.device_id.errors.required">
Device Id is required
</div>
</div>
</div>
</div>
<!-- IMEI end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">ICCID</label>
<div class="col-sm-8 col-8">
<input disabled formControlName="iccid" type="text" class="form-control form-control-sm" id="iccid"
placeholder="Enter ICCID No number" />
</div>
</div>
<!-- ICCID end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">M2M Provider</label>
<div class="col-sm-8 col-8">
<input disabled formControlName="m2mprovider" type="text" class="form-control form-control-sm"
id="new_m2mprovider" placeholder="Enter M2M provider No number" />
</div>
</div>
<!-- M2M Provider end-->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">SIM 1
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<input disabled formControlName="sim1" type="text" class="form-control form-control-sm" id="sim1"
placeholder="Enter SIM number" [ngClass]="{ 'is-invalid': submitted && f.sim1.errors }" />
<div *ngIf="submitted && f.sim1.errors" class="invalid-feedback">
<div *ngIf="f.sim1.errors.required">SIM 1 is required</div>
</div>
</div>
</div>
<!-- SIM 1 end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">SIM 1 Operator</label>
<div class="col-sm-8 col-8">
<!-- <input
formControlName="new_sim1operator"
type="text"
class="form-control form-control-sm"
id="new_sim1operator"
placeholder="Enter SIM 1 Operator No number"
/> -->
<select disabled class="form-control form-control-sm" formControlName="sim_provider">
<option value="" selected>Select</option>
<option *ngFor="let item of ['Airtel', 'Vodafone', 'BSNL']" [value]="item">
{{ item }}
</option>
</select>
</div>
</div>
<!-- SIM 1 Operator end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">SIM 2</label>
<div class="col-sm-8 col-8">
<input disabled formControlName="sim2" type="text" class="form-control form-control-sm" id="sim1"
placeholder="Enter SIM number" />
</div>
</div>
<!-- SIM 2 end-->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">SIM 2 Operator</label>
<div class="col-sm-8 col-8">
<!-- <input
formControlName="new_sim2operator"
type="text"
class="form-control form-control-sm"
id="new_sim2operator"
placeholder="Enter SIM 2 Operator No number"
/> -->
<select disabled class="form-control form-control-sm" formControlName="sim_provider2">
<option value="" selected>Select</option>
<option *ngFor="let item of ['Airtel', 'Vodafone', 'BSNL']" [value]="item">
{{ item }}
</option>
</select>
</div>
</div>
<!-- SIM 2 Operator end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Vahan ID</label>
<div class="col-sm-8 col-8">
<input disabled formControlName="vahanID" type="text" class="form-control form-control-sm" id="vahanID"
placeholder="Enter Vahan ID No number" />
</div>
</div>
<!-- Vahan ID end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Model</label>
<div class="col-sm-8 col-8">
<select id="dbselect" disabled multiple="multiple">
<option *ngFor="let option_1 of device_Model" [value]="option_1._id">
{{ option_1.modelName }}
</option>
</select>
</div>
</div>
<!-- Model end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Panic Count</label>
<div class="col-sm-8 col-8">
<select formControlName="panic" class="form-control form-control-sm">
<option value="" selected disabled>
Select Panic Button
</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</div>
</div>
<!-- Panic Count end -->
</div>
</div>
<!-- end 1st card -->
<div class="card shadow-sm mt-3">
<div class="card-header p-2" style="font-weight: 600; background: #efefef"
(click)="pg_sh.tab104 = !pg_sh.tab104">
<i class="fa-solid" [ngClass]="{
'fa-chevron-down': pg_sh.tab104 == true,
'fa-chevron-right': pg_sh.tab104 == false
}"></i>
Vehicle Registration Detail
</div>
<div class="card-body" [ngClass]="{ 'd-none': pg_sh.tab104 == false }">
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">RTO State
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<select formControlName="state" (change)="onStateChange($event)" id="inputState802"
class="form-control form-control-sm">
<option value="" selected disabled>Choose state</option>
<option *ngFor="let item of states" [value]="item">
{{ item }}
</option>
</select>
<div *ngIf="submitted && f.state.errors" class="text-danger">
<div *ngIf="f.state.errors.required">State is required</div>
</div>
</div>
</div>
<!-- RTO State end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">RTO City
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<select formControlName="city" (change)="onCityChange($event)" id="inputState"
class="form-control form-control-sm">
<option value="" selected disabled>Choose City</option>
<option *ngFor="let item of cityList" [value]="item.city">
{{ item.city }}
</option>
</select>
<div *ngIf="submitted && f.city.errors" class="text-danger">
<div *ngIf="f.city.errors.required">City is required</div>
</div>
</div>
</div>
<!-- RTO City end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">RTO Name
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<select formControlName="rtoOffice" id="inputState" class="form-control form-control-sm">
<option value="" selected disabled>Choose RTO</option>
<option *ngFor="let item of RTO" [value]="item.RTO_Name">
{{ item.RTO_Name }}
</option>
</select>
<div *ngIf="submitted && f.rtoOffice.errors" class="text-danger">
<div *ngIf="f.rtoOffice.errors.required">
RTO Name is required
</div>
</div>
</div>
</div>
<!-- RTO Name end -->
<!-- <div class="form-group row mb-0">
<label
for="staticEmail"
class="col-sm-4 col-4 col-form-label text-right"
>Pin Code <span class="text-danger"> * </span></label
>
<div class="col-sm-8 col-8">
<input
formControlName="pin"
type="text"
class="form-control form-control-sm"
id="pin"
[ngClass]="{
'is-invalid': submitted && f.pin.errors
}"
/>
<div *ngIf="submitted && f.pin.errors" class="invalid-feedback">
<div *ngIf="f.pin.errors.required">Pin Code is required</div>
<div *ngIf="f.pin.errors.pattern">
Please Enter valid Pin code
</div>
</div>
</div>
</div> -->
<!-- Pin Code end -->
</div>
</div>
</div>
<!-- -->
</div>
</form>
</div>
<!-- added new -->
<div class="container-fluid" style="padding-top: 52px">
<div class="row">
<div class="col-md6 col-lg-6 col-sm-12 col-12">
<div class="card shadow-sm mt-3">
<div class="card-header p-2" style="font-weight: 600; background: #efefef" (click)="pg_sh.tab3 = !pg_sh.tab3">
<i class="fa-solid" [ngClass]="{
'fa-chevron-down': pg_sh.tab3 == true,
'fa-chevron-right': pg_sh.tab3 == false
}"></i>
DOCUMENT UPLOAD
</div>
<div class="card-body" [ngClass]="{ 'd-none': pg_sh.tab3 == false }">
<table class="table table-sm">
<!-- <tr>
<td>Customer Type</td>
<td>
<select
class="form-control form-control-sm"
name=""
id=""
[(ngModel)]="customerType"
>
<option value="">Select Customer Type</option>
<option value="Individual">Customer Individual</option>
<option value="Firm">Customer Firm</option>
</select>
</td>
<td></td>
<td></td>
<td></td>
</tr> -->
<tr *ngFor="let data of imageuploadObject; let i = index">
<td>
{{ data.doctype }}
<span *ngIf="data.req == true" class="text-danger"> * </span>
:
</td>
<td>
<div *ngIf="deviceForm.value.customerType == 'Individual'">
<select class="form-control form-control-sm db_select" [attr.data-type]="data.doctype"
[(ngModel)]="data.doctype_type" *ngIf="data.doctype == 'ID proof'">
<option value="">Select Doc Type</option>
<option value="Aadhar">Aadhar</option>
<option value="Passport">Passport</option>
<option value="Voter_id">Voter ID</option>
<option value="PAN">PAN</option>
<option value="Driving_licence">Driving Licence</option>
</select>
<select class="form-control form-control-sm db_select" [(ngModel)]="data.doctype_type"
[attr.data-type]="data.doctype" *ngIf="data.doctype == 'Address Proof'">
<option value="">Select Doc Type</option>
<option value="Aadhar">Aadhar</option>
<option value="Passport">Passport</option>
<option value="Voter_id">Voter ID</option>
<!-- <option value="PAN">PAN</option> -->
<option value="Driving_licence">Driving Licence</option>
</select>
</div>
<div *ngIf="deviceForm.value.customerType == 'Firm'">
<select class="form-control form-control-sm db_select" [(ngModel)]="data.drop_type"
[attr.data-type]="data.doctype" *ngIf="data.doctype == 'ID proof'">
<option value="">Select Doc Type</option>
<option value="Aadhar">Aadhar</option>
<option value="Passport">Passport</option>
<option value="Voter_id_Front">Voter ID Front</option>
<option value="PAN">PAN</option>
<option value="Driving_licence">Driving Licence</option>
</select>
<select class="form-control form-control-sm db_select" [(ngModel)]="data.drop_type"
[attr.data-type]="data.doctype" *ngIf="data.doctype == 'Address Proof'">
<option value="">Select Doc Type</option>
<option value="udyog_aadhar">Udyog Aadhar</option>
<option value="gst_certificate">GST Certificate</option>
<option value="coi">
Certificate of Incorporation(COI)
</option>
<option value="form16">Form 16(For Govt. Org.)</option>
<!-- <option value="companypancard">Company PAN Card</option> -->
</select>
</div>
<select class="form-control form-control-sm db_select" [(ngModel)]="data.drop_type"
[attr.data-type]="data.doctype" *ngIf="
data.doctype == 'Vehicle Ownership Proof' &&
deviceForm.value.customerType != ''
">
<option value="">Select Doc Type</option>
<option value="vehicle_rc">Vehicle RC</option>
<option value="invoice">Invoice (For new vehicle)</option>
<option value="sell_letter">
Sell letter + invoice (Loan default vehicle sold by bank)
</option>
</select>
</td>
<td>
<input *ngIf="data.isText" type="text" [(ngModel)]="data.phone"
placeholder="{{ 'Doc number' | translate }}" />
</td>
<td>
<!-- <img *ngIf="data.image" style="width: 50px" [src]="'https://www.oneqlik.in' + data.image.substring(6)"
(click)="openModal(template, data)" /> -->
<a *ngIf="data.image" [href]="'https://www.oneqlik.in' + data.image.substring(6)" target="_blank">
{{ showNAME(data.image) }}
</a>
</td>
<td>
<i class="fa-solid fa-upload" (click)="docupclick('doc' + i)"></i>
<input type="file" [attr.accept]="DB_TOKEN.organisation == '6110fa23a6221d46dbebc473' ? '.jpeg,.jpg,.png':'*/*'" [id]="'doc' + i" class="btn btn btn-success d-none"
(dragover)="allowDrop($event)"
(drop)="onDrop($event)"
style="background: #f1f1f1; border: none; color: black" (change)="onFileChanged($event, i, data)" />
</td>
</tr>
<tr>
<td>Device Photo <span class="text-danger"> * </span></td>
<td>
<a *ngIf="deviceImg[0]" [href]="'https://www.oneqlik.in' + deviceImg[0].substring(6)" target="_blank">
{{ showNAME(deviceImg[0]) }}
</a>
</td>
<td></td>
<td></td>
<td>
<i class="fa-solid fa-upload" (click)="docupclick('d_doc1')"></i>
<input class="d-none" type="file" [attr.accept]="DB_TOKEN.organisation == '6110fa23a6221d46dbebc473' ? '.jpeg,.jpg,.png':'*/*'" id="d_doc1" type="file" (change)="onDeviceImageChanged($event, 0)" />
</td>
</tr>
<tr>
<td>Other</td>
<td>
<a *ngIf="deviceImg[1]" [href]="'https://www.oneqlik.in' + deviceImg[1].substring(6)" target="_blank">
{{ showNAME(deviceImg[1]) }}
</a>
</td>
<td></td>
<td></td>
<td>
<i class="fa-solid fa-upload" (click)="docupclick('d_doc2')"></i>
<input class="d-none" type="file" [attr.accept]="DB_TOKEN.organisation == '6110fa23a6221d46dbebc473' ? '.jpeg,.jpg,.png':'*/*'" id="d_doc2" type="file" (change)="onDeviceImageChanged($event, 1)" />
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="col-12 text-right">
<button type="submit" class="btn btn-primary mt-2" (click)="submit()">
Add Device
</button>
<!-- <button
type="button"
class="btn btn-primary mt-2"
(click)="db_show(deviceData)"
>
deviceData
</button>
<button
type="button"
class="btn btn-primary mt-2"
(click)="db_show(imageuploadObject)"
>
imageuploadObject
</button>
<button
type="button"
class="btn btn-primary mt-2"
(click)="db_show(deviceForm.value)"
>
deviceForm
</button> -->
</div>
</div>
</div>
<div id="toast">
<div id="desc">{{ data_descip }}</div>
</div>

View file

@ -0,0 +1,63 @@
.form-control-file,
.form-control-range {
display: block;
width: 100%;
}
.form-control-sm {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
line-height: 1.5;
border-radius: 0.2rem;
}
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 250px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}

View file

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AddNewDeviceComponent } from './add-new-device.component';
describe('AddNewDeviceComponent', () => {
let component: AddNewDeviceComponent;
let fixture: ComponentFixture<AddNewDeviceComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AddNewDeviceComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AddNewDeviceComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,325 @@
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"
integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<title>
Hello, world!</title>
</head>
<body>
<div class="container-fluid" style="padding-top: 52px;">
<div class="row">
<div class="col-md-6 col-lg-6 col-sm-12 col-12">
<div class="card shadow-sm">
<div class="card-header" (click)="pg_sh.tab1 = !pg_sh.tab1">
<i class="fa-solid"
[ngClass]="{ 'fa-chevron-down':pg_sh.tab1 == true ,'fa-chevron-right':pg_sh.tab1 == false}"></i>
Customer Info
</div>
<div class="card-body" *ngIf="pg_sh.tab1 == true">
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Contact
No.</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Owner First Name
*</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Owner Last
Name</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Email</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Dealer Followup
Mobile</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Address</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Pin Code</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">State</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">City</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">RTO Office</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
</div>
</div>
<!-- <div class="card shadow-sm mt-3">
<div class="card-header" (click)="pg_sh.tab2 = !pg_sh.tab2">
<i class="fa-solid"
[ngClass]="{ 'fa-chevron-down':pg_sh.tab2 == true ,'fa-chevron-right':pg_sh.tab2 == false}"></i>
SIM Info
</div>
<div class="card-body" *ngIf="pg_sh.tab2 == true">
</div>
</div> -->
<div class="card shadow-sm mt-3">
<div class="card-header" (click)="pg_sh.tab5 = !pg_sh.tab5">
<i class="fa-solid"
[ngClass]="{ 'fa-chevron-down':pg_sh.tab5 == true ,'fa-chevron-right':pg_sh.tab5 == false}"></i>
Vehicle
</div>
<div class="card-body" *ngIf="pg_sh.tab5 == true">
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Vehicle No</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Vehicle
Type</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Engine No.</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Vehicle
Manufacture</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Model</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Vehicle
Category</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
</div>
</div>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-12">
<div class="card shadow-sm">
<div class="card-header" (click)="pg_sh.tab4 = !pg_sh.tab4">
<i class="fa-solid"
[ngClass]="{ 'fa-chevron-down':pg_sh.tab4 == true ,'fa-chevron-right':pg_sh.tab4 == false}"></i>
Divise INFO
</div>
<div class="card-body" *ngIf="pg_sh.tab4 == true">
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Device ID
(IMEI)*</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">ICCID</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Device
Model</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Tracking
Expiry</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">SIM 1</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">SIM 2</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
<!-- -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">E sim
Expiry</label>
<div class="col-sm-8 col-8">
<input type="text" class="form-control form-control-sm" id="staticEmail"
value="email@example.com">
</div>
</div>
<!-- -->
</div>
</div>
<div class="card shadow-sm mt-3">
<div class="card-header" (click)="pg_sh.tab3 = !pg_sh.tab3">
<i class="fa-solid"
[ngClass]="{ 'fa-chevron-down':pg_sh.tab3 == true ,'fa-chevron-right':pg_sh.tab3 == false}"></i>
User Document
</div>
<div class="card-body" *ngIf="pg_sh.tab3 == true">
<table class="table table-sm">
<tr>
<td>Adhar card1 *</td>
<td></td>
<td><i class="fa-solid fa-upload"></i></td>
</tr>
<tr>
<td>Adhar card2 *</td>
<td></td>
<td><i class="fa-solid fa-upload"></i></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct"
crossorigin="anonymous"></script>
</body>
</html>
<!-- <div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10">
<input type="text" readonly class="form-control-plaintext" id="staticEmail" value="email@example.com">
</div>
</div>
<div class="form-group">
<label for="exampleFormControlInput1">Email address</label>
<input type="email" class="form-control" id="exampleFormControlInput1" placeholder="name@example.com">
</div>
<i class="fa-solid fa-upload"></i>
-->

View file

@ -2,59 +2,154 @@
<div class="limiter"> <div class="limiter">
<app-all-menus></app-all-menus> <app-all-menus></app-all-menus>
<div id="toast"> <div id="toast">
<div id="desc">{{data_descip}}</div> <div id="desc">{{ data_descip }}</div>
</div> </div>
<div class="container-table100"> <div class="container-table100">
<div class="wrap-table100"> <div class="wrap-table100">
<div class="row" style="width:100%;text-align: center;align-items: center;background: #426E86;margin-left: 0px;margin-right: 0px; padding-top: 10px; padding-bottom: 10px; color: white;"> <div class="row" style="
width: 100%;
text-align: center;
align-items: center;
background: #426e86;
margin-left: 0px;
margin-right: 0px;
padding-top: 10px;
padding-bottom: 10px;
color: white;
">
<div class="col-12"> <div class="col-12">
<md-select [(ngModel)]="limit" ngDefaultControl (change)="callDataTable()" style="float: right;background: #efecec;margin-right: 5px;"> <md-select attr-line="21" [(ngModel)]="limit" ngDefaultControl (change)="callDataTable()"
style="float: right; background: #efecec; margin: 0px 0px;padding: 0px 0px;">
<md-option *ngFor="let page of pageLengthArr; let i = index" [value]="page"> <md-option *ngFor="let page of pageLengthArr; let i = index" [value]="page">
{{page}} {{ page }}
</md-option> </md-option>
</md-select> </md-select>
<h4 style="display: inline-block;">{{'Vehicles' | translate}}</h4> <!-- (click)="db_show(this.tabelObj)" -->
<i style="margin-left: 20px;padding-top: 5px;cursor: pointer;float: left;" title="Add Device" class="fas fa-plus" (click)="adddev()" *ngIf="(showAddButton && (bussinessType=='0' || bussinessType==undefined))" ></i> <h4 attr-line="27" style="display: inline-block">{{ "Vehicles" | translate }}
</h4>
<button attr-line="39" class="btn float-left btn-sm rounded mr-2" title="Add Device" *ngIf="
showAddButton &&
(bussinessType == '0' || bussinessType == undefined)
">
<i attr-line="28" title="Add Device" class="fas fa-plus " (click)="adddev()"></i>
</button>
<!-- *ngIf="((custtype && ((dealer_Permission == true)||(dealer_Permission === undefined)))||superAdmin) && (bussinessType!=0 || bussinessType==undefined)"></i> --> <!-- *ngIf="((custtype && ((dealer_Permission == true)||(dealer_Permission === undefined)))||superAdmin) && (bussinessType!=0 || bussinessType==undefined)"></i> -->
<!-- (custtype && ((dealer_Permission == true)||(dealer_Permission === undefined)))||superAdmin||adbtn --> <!-- (custtype && ((dealer_Permission == true)||(dealer_Permission === undefined)))||superAdmin||adbtn -->
<i style="margin-left: 20px;padding-top: 5px;cursor: pointer;float: left;" title="Add Device" class="fas fa-plus-circle" (click)="adddevnew()" *ngIf="(bussinessType=='1')"></i> <button attr-line="39" class="btn float-left btn-sm rounded mr-2" title="Add Device"
*ngIf="bussinessType == '1'">
<i class="fa fa-plus" (click)="adddevnew()"></i>
</button>
<!-- <i
style="
margin-left: 20px;
padding-top: 5px;
cursor: pointer;
float: left;
"
title="old kyc"
class="fas fa-plus-circle"
(click)="old_kyc()"
*ngIf="bussinessType == '1'"
></i> -->
<!-- *ngIf="((custtype && ((dealer_Permission == true)||(dealer_Permission === undefined)))||superAdmin||adbtn) && bussinessType=='1'"></i> --> <!-- *ngIf="((custtype && ((dealer_Permission == true)||(dealer_Permission === undefined)))||superAdmin||adbtn) && bussinessType=='1'"></i> -->
<i style="margin-left: 15px;padding-top: 5px;float: left;" class="fas fa-file-export" title="Export to Excel" (click)="tableToCSV()" *ngIf="(bussinessType=='0' || bussinessType==undefined)"></i> <button attr-line="58" class="btn float-left btn-sm rounded mr-2" title="Export to Excel" *ngIf="
<i style="margin-left: 15px;padding-top: 5px;float: left;" class="fas fa-file-export" title="Export to Excel" (click)="exportExcel1()" *ngIf="(bussinessType=='1')"></i> bussinessType == '0' ||
bussinessType == undefined ||
bussinessType == '1'
">
<a *ngIf="showNav" href="https://youtu.be/dg1zd2geHXA" style="float: left;;margin-left: 15px;padding-top: 5px;cursor: pointer;color:white"title="Video tutorial" target="_blank"> <i class="fas fa-video"></i> </a> <i class="fas fa-file-export l70" (click)="tableToCSV()"></i>
</button>
<!-- <i
style="margin-left: 15px; padding-top: 5px; float: left"
class="fas fa-file-export"
title="Export to Excel l78"
(click)="exportExcel1()"
*ngIf="bussinessType == '1'"
></i> -->
<a title="Video tutorial" target="_blank" class="btn float-left btn-sm rounded mr-2" *ngIf="showNav"
href="https://youtu.be/dg1zd2geHXA" role="button">
<i class="fas fa-video "></i>
</a>
<md-select [(ngModel)]="devStatus" multiple style="padding-top: 0;float: right; margin-right: 10px; width: 150px;background: #efecec;" <button attr-line="58" class="btn float-left btn-sm rounded mr-2" title="Bulk Renew Devices"
placeholder="--{{'Status' | translate}}--" ngDefaultControl (change)="selectedStatus($event,devStatus.name)"> *ngIf="(db_temp_token.isOrganisation || false) == true">
<md-option *ngFor="let devStatus of statusArray; let i = index" style="padding-left: 20px;" [value]="devStatus.name"> <i class="fa-solid fa-upload" (click)="click_call('#db_fileup_127')"></i>
{{devStatus.name}} </button>
<a id="db_sample_download" href="/assets/download/download.xlsx" download target="_blank"
class="btn float-left btn-sm rounded mr-2" *ngIf="(db_temp_token.isOrganisation || false) == true">
<i class="fas fa-download "></i>
</a>
<input attr-line="102" type="file" id="db_fileup_127" (change)="db_fileUp($event)" class="d-none" />
<md-select attr-line="104" [(ngModel)]="devStatus" multiple style="
padding-top: 0;
float: right;
margin-right: 10px;
width: 150px;
background: #efecec;
" placeholder="--{{ 'Status' | translate }}--" ngDefaultControl
(change)="selectedStatus($event, devStatus.name)">
<md-option *ngFor="let devStatus of statusArray; let i = index" style="padding-left: 20px"
[value]="devStatus.name">
{{ devStatus.name }}
</md-option> </md-option>
</md-select> </md-select>
</div> </div>
</div> </div>
<div class="row" style="background: #7ba8b7;padding-top: 5px;padding-bottom: 5px;color: black;font-weight: 500;box-shadow:1px 1px white"> <div attr-line="119" class="row" style="
<div class="col-sm-12 col-md-6 col-lg-10"> background: #7ba8b7;
padding-top: 5px;
padding-bottom: 5px;
color: black;
font-weight: 500;
box-shadow: 1px 1px white;
">
<div class="col-sm-12 col-md-6 col-lg-9">
<div class="s002"> <div class="s002">
<form> <form>
<div class="inner-form"> <div class="inner-form">
<div class="input-field first-wrap">
<div class="icon-wrap"></div>
<select attr-line="133" class="form-control" name="searchKey" id="searchKey" [(ngModel)]="searchKey"
(change)="searchKey_change(searchKey)">
<option value="">All</option>
<option value="Device_Name">Device Name</option>
<option value="Device_ID">IMEI</option>
<option value="sim_number">SIM number</option>
</select>
</div>
<div class="input-field first-wrap"> <div class="input-field first-wrap">
<div class="icon-wrap"> <div class="icon-wrap">
<i class="fas fa-search" width="24" height="24" viewBox="0 0 24 24"></i> <i class="fas fa-search" width="24" height="24" viewBox="0 0 24 24"></i>
</div> </div>
<input type="text" class="form-control" id="myInput" name="myInput" type="text" [(ngModel)]="myInput" (ngModelChange)="searchFilter($event)" placeholder="{{'Device Search' | translate}}" />
<input type="text" class="form-control" id="myInput" name="myInput" type="text" [(ngModel)]="myInput"
(ngModelChange)="searchFilter($event)" placeholder="{{ 'Device Search' | translate }}" />
</div> </div>
<div class="input-field second-wrap"> <div class="input-field second-wrap">
<div class="icon-wrap"> <div class="icon-wrap">
<i class="far fa-calendar-alt" width="24" height="24" viewBox="0 0 24 24"></i> <i class="far fa-calendar-alt" width="24" height="24" viewBox="0 0 24 24"></i>
</div> </div>
<input id="from_date" bsDatepicker class="datepicker" [bsConfig]="bsConfig" [(ngModel)]="from_date" type="text" name="fDate" (ngModelChange)="dateChange('fdate')" placeholder="From Date"> <input id="from_date" bsDatepicker class="datepicker" [bsConfig]="bsConfig" [(ngModel)]="from_date"
type="text" name="fDate" (ngModelChange)="dateChange('fdate')" placeholder="From Date" />
</div> </div>
<div class="input-field third-wrap"> <div class="input-field third-wrap">
<div class="icon-wrap"> <div class="icon-wrap">
<i class="far fa-calendar-alt" width="24" height="24" viewBox="0 0 24 24"></i> <i class="far fa-calendar-alt" width="24" height="24" viewBox="0 0 24 24"></i>
</div> </div>
<input id="to_date" bsDatepicker placeholder="To Date" class="datepicker" [bsConfig]="bsConfig" name="todate" [(ngModel)]="to_date" type="text" (ngModelChange)="dateChange('todate')"> <input id="to_date" bsDatepicker placeholder="To Date" class="datepicker" [bsConfig]="bsConfig"
name="todate" [(ngModel)]="to_date" type="text" (ngModelChange)="dateChange('todate')" />
</div> </div>
<!-- <div class="input-field "> <!-- <div class="input-field ">
<div class="icon-wrap"> <div class="icon-wrap">
@ -65,54 +160,142 @@
</form> </form>
</div> </div>
</div> </div>
<div class="col-sm-12 col-md-6 col-lg-2" style="padding-top: 2px;"> <div class="col-sm-12 col-md-6 col-lg-3" style="padding-top: 2px">
<button class="btn btn-default" [disabled]="lastcall" (click)="pre()" style="width: 120px;float: left;color:white;background: #035096; border-right-color: #2d4262;line-height: 2.6;"><< {{'Previous' | translate}}</button> <button class="btn btn-default" [disabled]="lastcall" (click)="pre()" style="
<button class="btn btn-default" [disabled]="firstcall" (click)="next()" style="width: 100px;float: left;color:white;margin-right: 10px;line-height: 2.6;background: #035096;">{{'Next' | translate}} >></button> width: 120px;
float: left;
color: white;
background: #035096;
border-right-color: #2d4262;
line-height: 2.6;
">
<< {{ "Previous" | translate }} </button>
<button class="btn btn-default" [disabled]="firstcall" (click)="next()" style="
width: 100px;
float: left;
color: white;
margin-right: 10px;
line-height: 2.6;
background: #035096;
">
{{ "Next" | translate }} >>
</button>
</div> </div>
</div> </div>
<div class="table100 ver1"> <div class="table100 ver1">
<div class="wrap-table100-nextcols js-pscroll" style="height: 77vh;overflow-y: hidden;"> <!-- style="height: 77vh; overflow-y: hidden" -->
<div class="wrap-table100-nextcols js-pscroll">
<div class="table100-nextcols"> <div class="table100-nextcols">
<table id="deviceTable1" class="display order-column" cellspacing="0" style="font-size:15px;text-align: center;" > <table id="deviceTable1" class="display order-column" cellspacing="0"
<thead style="background:#add8e6"> style="font-size: 15px; text-align: center">
<thead style="background: #add8e6">
<tr> <tr>
<th style="width: 150px;text-align: left"></th> <th data-attr="1" style="width: 150px; text-align: left"></th>
<th style="width: 150px;text-align: left">{{'Reg. Number' | translate}}</th> <th data-attr="2" style="width: 150px; text-align: left">
<th style="width: 150px;text-align: left">{{'Group' | translate}}</th> {{ "Device Name" | translate }}
<th style="width: 150px;text-align: left">{{'IMEI' | translate}}</th> </th>
<th style="width: 150px;text-align: left">{{'Int. ID' | translate}}</th> <th data-attr="3" style="width: 150px; text-align: left">
<th style="width: 150px;text-align: left">{{'SIM 1' | translate}}</th> {{ "Group" | translate }}
<th style="width: 150px;text-align: left">{{'SIM Provider' | translate}}</th> </th>
<th style="width: 150px;text-align: left">{{'SIM 2' | translate}}</th>
<th style="width: 150px;text-align: left">{{'SIM Provider 2' | translate}}</th> <th data-attr="4" style="width: 150px; text-align: left">
<th style="width: 150px;text-align: left">{{'Device Model' | translate}}</th> {{ "IMEI" | translate }}
<th style="width: 150px;text-align: left">{{'Vehicle Type' | translate}}</th> </th>
<th style="width: 300px;text-align: left">{{'Status' | translate}}</th> <th data-attr="5" style="width: 180px; text-align: center">
<th style="width: 200px;text-align: left">{{'User' | translate}}</th> {{ "Documents" | translate }}
<th style="width: 200px;text-align: left">{{'Owner' | translate}}</th> </th>
<th style="width: 200px;text-align: left">{{'Dealer' | translate}}</th> <th data-attr="6" style="text-align: center">
<th style="width: 200px;text-align: left">{{'Created On' | translate}}</th> {{ "Cert. Download" | translate }}
<th style="width: 200px;text-align: left">{{'Exp. Date' | translate}}</th> </th>
<th style="width: 200px;text-align: left">{{'Renew at' | translate}}</th> <th data-attr="7" style="width: 150px; text-align: left">
<th style="width: 200px;text-align: left">{{'Renew by' | translate}}</th> {{ "Int. ID" | translate }}
<th style="width: 150px;text-align: left">{{"Driver's Name" | translate}}</th> </th>
<th style="width: 150px;text-align: left">{{"Driver's Contact" | translate}}</th> <th data-attr="8" style="width: 150px; text-align: left">
<th style="width: 150px;text-align: left">{{"Sells Person" | translate}}</th> {{ "SIM 1" | translate }}
<th style="width: 150px;text-align: left">{{"Installer" | translate}}</th> </th>
<th style="width: 100px;text-align: center">Last Ping</th> <th data-attr="9" style="width: 150px; text-align: left">
<th style="width: 150px;text-align: center">{{'Device Setting' | translate}}</th> {{ "SIM Provider" | translate }}
<th style="width: 100px;text-align: center">{{'Share Device' | translate}}</th> </th>
<th style="width: 100px;text-align: center">{{'Share User' | translate}}</th> <th data-attr="10" style="width: 150px; text-align: left">
{{ "SIM 2" | translate }}
</th>
<th data-attr="11" style="width: 150px; text-align: left">
{{ "SIM Provider 2" | translate }}
</th>
<th data-attr="12" style="width: 150px; text-align: left">
{{ "Device Model" | translate }}
</th>
<th data-attr="13" style="width: 150px; text-align: left">
{{ "Vehicle Type" | translate }}
</th>
<th data-attr="14" style="width: 300px; text-align: left">
{{ "Status" | translate }}
</th>
<th data-attr="15" style="width: 200px; text-align: left">
{{ "User" | translate }}
</th>
<th data-attr="16" style="width: 200px; text-align: left">
{{ "Owner" | translate }}
</th>
<th data-attr="17" style="width: 200px; text-align: left">
{{ "Dealer" | translate }}
</th>
<th data-attr="18" style="width: 200px; text-align: left">
{{ "Created On" | translate }}
</th>
<th data-attr="19" style="width: 200px; text-align: left">
{{ "Exp. Date" | translate }}
</th>
<th data-attr="20" style="width: 200px; text-align: left">
{{ "Sim Exp. Date" | translate }}
</th>
<th data-attr="21" style="width: 200px; text-align: left">
{{ "Renew at" | translate }}
</th>
<th data-attr="22" style="width: 200px; text-align: left">
{{ "Renew by" | translate }}
</th>
<th data-attr="23" style="width: 150px; text-align: left">
{{ "Driver's Name" | translate }}
</th>
<th data-attr="24" style="width: 150px; text-align: left">
{{ "Driver's Contact" | translate }}
</th>
<th data-attr="25" style="width: 150px; text-align: left">
{{ "Sells Person" | translate }}
</th>
<th data-attr="26" style="width: 150px; text-align: left">
{{ "Installer" | translate }}
</th>
<th data-attr="27" style="width: 100px; text-align: center">Last Ping</th>
<th data-attr="28" style="width: 150px; text-align: center">
{{ "Device Setting" | translate }}
</th>
<th data-attr="29" style="width: 100px; text-align: center">
{{ "Share Device" | translate }}
</th>
<th data-attr="30" style="width: 100px; text-align: center">
{{ "Share User" | translate }}
</th>
<!-- *ngIf="superAdmin||custtype||(dealerTocust=='ON')" --> <!-- *ngIf="superAdmin||custtype||(dealerTocust=='ON')" -->
<!-- *ngIf="superAdmin||custtype||(dealerTocust=='ON')" --> <!-- *ngIf="superAdmin||custtype||(dealerTocust=='ON')" -->
<th style="text-align: center;">{{'Renewal History' | translate}}</th> <th data-attr="31" style="text-align: center">
<th style="text-align: center;">{{'Edit' | translate}}</th> {{ "Renewal History" | translate }}
<th style="text-align: center;">{{'Delete' | translate}}</th> </th>
<th style="text-align: center;">{{'E Chalan' | translate}}</th> <th data-attr="32" style="text-align: center">{{ "Edit" | translate }}</th>
<th style="text-align: center;">{{'Documents' | translate}}</th> <th data-attr="33" style="text-align: center">{{ "Delete" | translate }}</th>
<th style="text-align: center;">{{'Cert. Download' | translate}}</th> <th data-attr="34" style="text-align: center">
<th style="text-align: center;">{{'Remark' | translate}}</th> {{ "E Chalan" | translate }}
<th style="text-align: center;">{{'KYC Status' | translate}}</th> </th>
<th data-attr="35" style="text-align: center">{{ "Remark" | translate }}</th>
<th data-attr="36" style="text-align: center">
{{ "KYC Status" | translate }}
</th>
<th data-attr="37" style="text-align: center">
{{ "Renew Devices" | translate }}
</th>
</tr> </tr>
</thead> </thead>
</table> </table>
@ -121,11 +304,60 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- modal start-->
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary d-none" data-toggle="modal" id="db_exampleModal"
data-target="#exampleModal">
Launch demo modal
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" style="background-color: #426e86; color: #fff">
<h5 class="modal-title" id="exampleModalLabel">Renew Devices</h5>
<button type="button" style="color: #fff" class="close" data-dismiss="modal" aria-label="Close">
<i class="fas fa-times"></i>
</button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-6">
<div class="form-group">
<label for="exampleInputEmail1">Expiration Date</label>
<input type="date" [(ngModel)]="dbexp.db_expiration_date" class="form-control form-control-sm"
placeholder="Enter Expiration Date" />
</div>
</div>
<div class="col-6">
<div class="form-group">
<label for="exampleInputEmail1">ESIM Validity</label>
<input type="date" [(ngModel)]="dbexp.db_esim_validity" placeholder="Enter SIM Expiration Date"
class="form-control form-control-sm" />
</div>
</div> </div>
<!-- <div class="col-12">
{{ dbexp | json }}
<!-- <div class="col-3"> </div> -->
</div>
</div>
<div class="modal-footer">
<button type="button" class="db-btn db-btn-primary" (click)="simValidChange(dbexp)">
Update
</button>
<button type="button" class="db-btn db-btn-secondary" data-dismiss="modal" id="simValidChange_close">
Close
</button>
</div>
</div>
</div>
</div>
<!-- modal end -->
<!-- <div class="col-3">
<i style="margin-left: 5px;cursor: pointer;" title="Add Device" class="fas fa-plus" (click)="adddev()" <i style="margin-left: 5px;cursor: pointer;" title="Add Device" class="fas fa-plus" (click)="adddev()"
*ngIf="(custtype && ((dealer_Permission == true)||(dealer_Permission === undefined)))||superAdmin||adbtn"></i> *ngIf="(custtype && ((dealer_Permission == true)||(dealer_Permission === undefined)))||superAdmin||adbtn"></i>
<i style="margin-left: 15px" class="fas fa-file-export" title="Export to Excel" (click)="exportExcel()"></i> <i style="margin-left: 15px" class="fas fa-file-export" title="Export to Excel" (click)="exportExcel()"></i>

View file

@ -974,11 +974,11 @@
/*////////////////////////////////////////////////////////////////// /*//////////////////////////////////////////////////////////////////
[ RESTYLE TAG ]*/ [ RESTYLE TAG ]*/
* { // * {
margin: 0px; // margin: 0px;
padding: 0px; // padding: 0px;
box-sizing: border-box; // box-sizing: border-box;
} // }
body, body,
html { html {
@ -1003,6 +1003,33 @@ a:hover {
text-decoration: none; text-decoration: none;
} }
.db-btn {
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border: 1px solid transparent;
padding: 0.5rem 0.75rem;
font-size: 1rem;
line-height: 1.25;
border-radius: 0.25rem;
transition: all 0.15s ease-in-out;
}
.db-btn-secondary {
color: #fff;
background-color: #868e96;
border-color: #868e96;
}
.db-btn-primary {
color: #fff;
background-color: #007bff;
border-color: #007bff;
}
/* ------------------------------------ */ /* ------------------------------------ */
h1, h1,
h2, h2,
@ -1027,7 +1054,7 @@ li {
input { input {
display: block; display: block;
outline: none; outline: none;
border: none !important; // border: none !important;
} }
textarea { textarea {
@ -1117,7 +1144,7 @@ iframe {
max-height: 100vh; max-height: 100vh;
// max-width: 1366px; // max-width: 1366px;
margin: 0 auto; margin: 0 auto;
min-height: 100vh; min-height: calc(100vh - 214%);
display: -webkit-box; display: -webkit-box;
display: -webkit-flex; display: -webkit-flex;
display: -moz-box; display: -moz-box;
@ -1125,7 +1152,7 @@ iframe {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
justify-content: center; // justify-content: center;
// padding: 33px 100px; // padding: 33px 100px;
padding: 55px 20px 0px 20px; padding: 55px 20px 0px 20px;
} }
@ -3185,3 +3212,7 @@ mat-input-infix {
margin-top: -13px !important; margin-top: -13px !important;
margin-left: 7px !important; margin-left: 7px !important;
} }
.dataTables_scrollBody {
scrollbar-color: #2d4262 #ccc !important;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,15 +1,12 @@
<md-dialog-content class="md-typography"> <md-dialog-content class="md-typography">
<div id="testPdf"> <div id="testPdf" class="src_app_dashboard_download-certificate_download-certificate.component.html">
<div class="row"> <div class="row">
<table class="table table-borderless" > <table class="table table-borderless">
<tr> <tr>
<td class="text-center"> <td class="text-center">
<div style="text-align: center" *ngIf="org.imageDoc"> <div style="text-align: center" *ngIf="org.imageDoc">
<img <img src="{{ org.imageDoc }}" style="width: auto; height: 100px" /><br />
src="{{ org.imageDoc }}"
style="width: auto; height: 100px"
/><br />
</div> </div>
</td> </td>
@ -21,9 +18,10 @@
To <br /> To <br />
Regional Transport Authority<br /> Regional Transport Authority<br />
{{data.deviceInfo && data.deviceInfo.transportOfficeCity?data.deviceInfo.transportOfficeCity:''}}<br /> {{data.deviceInfo && data.deviceInfo.transportOfficeCity?data.deviceInfo.transportOfficeCity:''}}<br />
{{data.deviceInfo && data.deviceInfo.transportOfficeState?data.deviceInfo.transportOfficeState:''}} Only<br /> {{data.deviceInfo && data.deviceInfo.transportOfficeState?data.deviceInfo.transportOfficeState:''}}
Only<br />
</td> </td>
<td style="width: 50%;" > <td style="width: 50%;">
<div class="text-center"> <div class="text-center">
<div class="fitment-heading"> <div class="fitment-heading">
FITMENT CERTIFICATE FITMENT CERTIFICATE
@ -72,7 +70,8 @@
</tr> </tr>
<tr> <tr>
<td>VEHICLE MAKE</td> <td>VEHICLE MAKE</td>
<td>{{data && data.deviceInfo && data.deviceInfo.manufacturingCompany ? data.deviceInfo.manufacturingCompany :'-'}}</td> <td>{{data && data.deviceInfo && data.deviceInfo.manufacturingCompany ?
data.deviceInfo.manufacturingCompany :'-'}}</td>
</tr> </tr>
<tr> <tr>
<td>VEHICLE MODEL</td> <td>VEHICLE MODEL</td>
@ -140,11 +139,12 @@
</tr> </tr>
<tr> <tr>
<td>COP NO.</td> <td>COP NO.</td>
<td>CC0GR8739</td> <td>{{devicetype ==
"Nippon-NVT-1920"?"CC0GT8761":"CC0GT8746"}}</td>
</tr> </tr>
<tr> <tr>
<td>COP Validity upto</td> <td>COP Validity upto</td>
<td>30 September 2023 </td> <td>{{devicetype == "Nippon-NVT-1920"?"30 September 2025":"30 March 2025"}}</td>
</tr> </tr>
</tbody> </tbody>
@ -188,30 +188,18 @@
<tbody style="font-size: 10px;" *ngIf="deviceImage[0] || deviceImage[1] || deviceImage[2]"> <tbody style="font-size: 10px;" *ngIf="deviceImage[0] || deviceImage[1] || deviceImage[2]">
<tr class="text-center" > <tr class="text-center">
<td style="font-weight: 700;"> <td style="font-weight: 700;">
<img <img *ngIf="deviceImage[0]" src="{{ deviceImage[0] ? deviceImage[0] : img1 }}" width="80px"
*ngIf="deviceImage[0]" height="80px" />
src="{{ deviceImage[0] ? deviceImage[0] : img1 }}"
width="80px"
height="80px"
/>
</td> </td>
<td style="font-weight: 700;"> <td style="font-weight: 700;">
<img <img *ngIf="deviceImage[1]" src="{{ deviceImage[1] ? deviceImage[1] : img1 }}" width="80px"
*ngIf="deviceImage[1]" height="80px" />
src="{{ deviceImage[1] ? deviceImage[1] : img1 }}"
width="80px"
height="80px"
/>
</td> </td>
<td style="font-weight: 700;"> <td style="font-weight: 700;">
<img <img *ngIf="deviceImage[2]" src="{{ deviceImage[2] ? deviceImage[2] : img1 }}" width="80px"
*ngIf="deviceImage[2]" height="80px" />
src="{{ deviceImage[2] ? deviceImage[2] : img1 }}"
width="80px"
height="80px"
/>
</td> </td>
</tr> </tr>
<tr class="text-center"> <tr class="text-center">
@ -226,10 +214,14 @@
</div> </div>
<h5 class="text-center heading-h3 pl-3">PRODUCT SATISFACTION REPORT</h5> <h5 class="text-center heading-h3 pl-3">PRODUCT SATISFACTION REPORT</h5>
<div class="col-12"> <div class="col-12">
<p style="font-size: 10px;">This is to acknowledge confirm that we have got our vehicle bearing chassis no <strong>{{ChassisNo}}</strong> VTS Device manufactured by <strong>NIPPON AUDIOTRONIX</strong> bearing Sr.No <p style="font-size: 10px;">This is to acknowledge confirm that we have got our vehicle bearing chassis no
<strong>{{vahanID}}</strong> We have checked the performance ot the vehicle after fitment of the said VTS device the unit is sealed and functioning as per normslaid out in AIS 140.We <strong>{{ChassisNo}}</strong> VTS Device manufactured by <strong>NIPPON AUDIOTRONIX</strong> bearing Sr.No
have satisfied with the performance of the unit in all respects.We undertake not to reseany dispute or any legal claims against <strong>NIPPON AUDIOTRONIX</strong> in the event that the <strong>{{vahanID}}</strong> We have checked the performance ot the vehicle after fitment of the said VTS
above mentioned seals atfound broken/tampered.</p> device the unit is sealed and functioning as per normslaid out in AIS 140.We
have satisfied with the performance of the unit in all respects.We undertake not to reseany dispute or any
legal claims against <strong>NIPPON AUDIOTRONIX</strong> in the event that the
above mentioned seals atfound broken/tampered.
</p>
</div> </div>
<div class="col-12 "> <div class="col-12 ">
@ -239,15 +231,19 @@
<tbody style="font-size: 10px;"> <tbody style="font-size: 10px;">
<tr> <tr>
<td rowspan="3" style="width: 110px;"><div id="stamp-section"> <td rowspan="3" style="width: 110px;">
<div id="stamp-section">
</div></td> </div>
</td>
<td style="width: 100px;"> <td style="width: 100px;">
<strong>Dealer Name:</strong> <strong>Dealer Name:</strong>
</td> </td>
<td style="width: 100px;"> <td style="width: 100px;">
{{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.first_name ? data.deviceInfo.Dealer.first_name : "" }} {{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.first_name ?
{{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.last_name ? data.deviceInfo.Dealer.last_name : "" }} data.deviceInfo.Dealer.first_name : "" }}
{{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.last_name ?
data.deviceInfo.Dealer.last_name : "" }}
</td> </td>
<td style="width: 100px;"> <td style="width: 100px;">
<strong>Dealer Contact no:</strong> <strong>Dealer Contact no:</strong>
@ -258,7 +254,8 @@
<td> <td>
<strong>Dealer Addresse:</strong> <strong>Dealer Addresse:</strong>
{{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.address ? data.deviceInfo.Dealer.address : "" }} {{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.address ?
data.deviceInfo.Dealer.address : "" }}
</td> </td>
</tr> </tr>
<tr> <tr>
@ -324,8 +321,8 @@
</td> </td>
<td colspan="2"> <td colspan="2">
: CK8077 <br /> : CK8077 <br />
: CC0GR8739<br /> : CC0GS8750<br />
: 30 September 2023 <br /> : 30 September 2024 <br />
: <br /> : <br />
: <br /> : <br />
</td> </td>

View file

@ -1,27 +1,27 @@
import { Component, Inject, OnInit } from '@angular/core'; import { Component, Inject, OnInit } from "@angular/core";
import { MdDialogRef, MD_DIALOG_DATA } from '@angular/material'; import { MdDialogRef, MD_DIALOG_DATA } from "@angular/material";
declare var jsPDF: any; declare var jsPDF: any;
declare var pdfMake: any; declare var pdfMake: any;
declare var html2canvas: any; declare var html2canvas: any;
declare var html2pdf: any; declare var html2pdf: any;
import * as moment from 'moment'; import * as moment from "moment";
import { ContactService } from '../../contact.service'; import { ContactService } from "../../contact.service";
declare var $: any; declare var $: any;
declare var QRious: any; declare var QRious: any;
@Component({ @Component({
selector: 'app-download-certificate', selector: "app-download-certificate",
templateUrl: './download-certificate.component.html', templateUrl: "./download-certificate.component.html",
styleUrls: ['./download-certificate.component.scss'] styleUrls: ["./download-certificate.component.scss"],
}) })
export class DownloadCertificateComponent implements OnInit { export class DownloadCertificateComponent implements OnInit {
devName: any; devName: any;
img1 = '/assets/images/liveTrackIcons/noImageAvailableIcon.jpg' img1 = "/assets/images/liveTrackIcons/noImageAvailableIcon.jpg";
stamp = '/assets/images/liveTrackIcons/Stamp.png' stamp = "/assets/images/liveTrackIcons/Stamp.png";
phNum: any; phNum: any;
createdOn: any; createdOn: any;
expOn: any; expOn: any;
supAdmin supAdmin;
DealerObj = []; DealerObj = [];
userObj = []; userObj = [];
// iconType:any; // iconType:any;
@ -63,7 +63,7 @@ export class DownloadCertificateComponent implements OnInit {
companyName: any; companyName: any;
companyAddress: any; companyAddress: any;
transportOfficeCity: any; transportOfficeCity: any;
transportOfficeState: { data: string; }; transportOfficeState: { data: string };
ChassisNo: any; ChassisNo: any;
deviceManufacturer: any; deviceManufacturer: any;
invoiceNum: any; invoiceNum: any;
@ -75,126 +75,170 @@ export class DownloadCertificateComponent implements OnInit {
superAdmin: any; superAdmin: any;
isDealer: any; isDealer: any;
dealerId: any; dealerId: any;
lastPingOn: any lastPingOn: any;
lastDeviceTime: any lastDeviceTime: any;
deviceImage = []; deviceImage = [];
dealerName dealerName;
installationDate; installationDate;
ICCICD ICCICD;
simNum1 simNum1;
model model;
user: any; user: any;
org org;
link: string; link: string;
kycApprovalDate kycApprovalDate;
esim_validity; esim_validity;
fitmentCertificateNo fitmentCertificateNo;
vahanID: any; vahanID: any;
myImage: HTMLImageElement; myImage: HTMLImageElement;
myImage1: HTMLImageElement; myImage1: HTMLImageElement;
myImage2: HTMLImageElement; myImage2: HTMLImageElement;
stamp1: HTMLImageElement; stamp1: HTMLImageElement;
img: HTMLImageElement; img: HTMLImageElement;
gnnsModule gnnsModule;
gsmModule gsmModule;
constructor(public dialogRef: MdDialogRef<DownloadCertificateComponent>, private contactService: ContactService, constructor(
@Inject(MD_DIALOG_DATA) public data: any) { public dialogRef: MdDialogRef<DownloadCertificateComponent>,
console.log(data); private contactService: ContactService,
@Inject(MD_DIALOG_DATA) public data: any
) {
console.log("102=>", data);
} }
ngOnInit() { ngOnInit() {
this.org = JSON.parse(localStorage.getItem('ORG')) this.org = JSON.parse(localStorage.getItem("ORG"));
if (!this.data.deviceInfo.esim_validity) { if (!this.data.deviceInfo.esim_validity) {
if (this.data.deviceInfo.License == "Yearly") { if (this.data.deviceInfo.License == "Yearly") {
this.esim_validity = this.data.deviceInfo.kycApprovalDate ? moment(new Date(this.data.deviceInfo.kycApprovalDate), "DD/MM/YYYY").add(1, 'years').format("DD/MM/YYYY") : undefined; this.esim_validity = this.data.deviceInfo.kycApprovalDate
? moment(new Date(this.data.deviceInfo.kycApprovalDate), "DD/MM/YYYY")
.add(1, "years")
.format("DD/MM/YYYY")
: undefined;
} }
} else { } else {
this.esim_validity = this.data.deviceInfo.esim_validity ? moment(new Date(this.data.deviceInfo.esim_validity)).format("DD/MM/YYYY") : undefined this.esim_validity = this.data.deviceInfo.esim_validity
? moment(new Date(this.data.deviceInfo.esim_validity)).format(
"DD/MM/YYYY"
)
: undefined;
} }
this.fitmentCertificateNo = this.data.deviceInfo.fitmentCertificateNo; this.fitmentCertificateNo = this.data.deviceInfo.fitmentCertificateNo;
this.ChassisNo = this.data.deviceInfo.ChassisNo; this.ChassisNo = this.data.deviceInfo.ChassisNo;
this.lastDeviceTime = this.data.deviceInfo.last_device_time; this.lastDeviceTime = this.data.deviceInfo.last_device_time;
this.numberOfSOS = this.data.deviceInfo.numberOfSOS this.numberOfSOS = this.data.deviceInfo.numberOfSOS;
this.kycApprovalDate = this.data.deviceInfo.kycApprovalDate this.kycApprovalDate = this.data.deviceInfo.kycApprovalDate;
this.model = this.data.deviceInfo.Model this.model = this.data.deviceInfo.Model;
this.lastPingOn = this.data.deviceInfo.last_ping_on this.lastPingOn = this.data.deviceInfo.last_ping_on;
this.devName = this.data.deviceInfo.Device_Name; this.devName = this.data.deviceInfo.Device_Name;
this.devID = this.data.deviceInfo.Device_ID ? this.data.deviceInfo.Device_ID : ""; this.devID = this.data.deviceInfo.Device_ID
? this.data.deviceInfo.Device_ID
: "";
this.phNum = this.data.deviceInfo.contact_number; this.phNum = this.data.deviceInfo.contact_number;
this.createdOn = this.data.deviceInfo.created_on ? (new Date(this.data.deviceInfo.created_on).toISOString()) : ""; this.createdOn = this.data.deviceInfo.created_on
this.expOn = this.data.deviceInfo.expiration_date ? (new Date(this.data.deviceInfo.expiration_date).toISOString()) : ""; ? new Date(this.data.deviceInfo.created_on).toISOString()
: "";
this.expOn = this.data.deviceInfo.expiration_date
? new Date(this.data.deviceInfo.expiration_date).toISOString()
: "";
// this.iconType=this.data.deviceInfo.iconType; // this.iconType=this.data.deviceInfo.iconType;
this.simNum = this.data.deviceInfo.sim_number; this.simNum = this.data.deviceInfo.sim_number;
this.simNum1 = this.data.deviceInfo.sim_number2; this.simNum1 = this.data.deviceInfo.sim_number2;
this.orignalEmail = this.data.deviceInfo.Email_ID this.orignalEmail = this.data.deviceInfo.Email_ID;
this.emailId = this.data.deviceInfo.Email_ID; this.emailId = this.data.deviceInfo.Email_ID;
this.deviceImage = this.data.deviceInfo.deviceImage this.deviceImage = this.data.deviceInfo.deviceImage;
if (this.org.imageDoc && this.org.imageDoc.length > 0) { if (this.org.imageDoc && this.org.imageDoc.length > 0) {
this.org.imageDoc = 'https://www.oneqlik.in' + this.org.imageDoc[0].substring(6) this.org.imageDoc =
"https://www.oneqlik.in" + this.org.imageDoc[0].substring(6);
} }
this.supAdmin = this.data.deviceInfo.supAdmin; this.supAdmin = this.data.deviceInfo.supAdmin;
if (this.supAdmin.imageDoc && this.supAdmin.imageDoc.length > 0) { if (this.supAdmin.imageDoc && this.supAdmin.imageDoc.length > 0) {
this.supAdmin.imageDoc = 'https://www.oneqlik.in' + this.supAdmin.imageDoc[0].substring(6) this.supAdmin.imageDoc =
"https://www.oneqlik.in" + this.supAdmin.imageDoc[0].substring(6);
} }
console.log(this.deviceImage); console.log(this.deviceImage);
this.installationDate = this.data.deviceInfo.created_on this.installationDate = this.data.deviceInfo.created_on;
this.todayODO = this.data.deviceInfo.today_odo; this.todayODO = this.data.deviceInfo.today_odo;
this.totalODO = this.data.deviceInfo.total_odo; this.totalODO = this.data.deviceInfo.total_odo;
this.deviceID = this.data.deviceInfo.Device_ID; this.deviceID = this.data.deviceInfo.Device_ID;
this.initialUser = this.data.deviceInfo.user._id; this.initialUser = this.data.deviceInfo.user._id;
this.user = this.data.deviceInfo.user this.user = this.data.deviceInfo.user;
this.userName = this.data.deviceInfo.OwnerName; this.userName = this.data.deviceInfo.OwnerName;
this.userAddress = this.data.deviceInfo ? this.data.deviceInfo.user.address : ""; this.userAddress = this.data.deviceInfo
? this.data.deviceInfo.user.address
: "";
this.dealerName = this.data.deviceInfo.Dealer_name; this.dealerName = this.data.deviceInfo.Dealer_name;
this.dealerId = this.data.deviceInfo.Dealer ? this.data.deviceInfo.Dealer._id : ""; this.dealerId = this.data.deviceInfo.Dealer
console.log('this.dealerId', this.dealerId); ? this.data.deviceInfo.Dealer._id
: "";
console.log("this.dealerId", this.dealerId);
this.dealerAddress = this.data.deviceInfo.DealerAddress; this.dealerAddress = this.data.deviceInfo.DealerAddress;
this.InvoiceDate = this.data.deviceInfo.invoiceDate ? (new Date(this.data.deviceInfo.invoiceDate).toISOString()) : ""; this.InvoiceDate = this.data.deviceInfo.invoiceDate
this.invoiceNum = this.data.deviceInfo.invoiceNumber ? new Date(this.data.deviceInfo.invoiceDate).toISOString()
this.CID_No = this.data.deviceInfo.CID_No : "";
this.devicetype = this.data.deviceInfo.device_model ? this.data.deviceInfo.device_model.device_type : ""; this.invoiceNum = this.data.deviceInfo.invoiceNumber;
this.CID_No = this.data.deviceInfo.CID_No;
this.devicetype = this.data.deviceInfo.device_model
? this.data.deviceInfo.device_model.device_type
: "";
if (this.devicetype == "Nippon-NVT-1820") { if (this.devicetype == "Nippon-NVT-1820") {
this.gsmModule = 'Telit GE910' this.gsmModule = "Telit GE910";
} else if (this.devicetype == "Nippon-NVT-1820") { } else if (this.devicetype == "Nippon-NVT-1820") {
this.gnnsModule = "Telit, Jupiter SL869T3-| Nav|C/IRNSS"; this.gnnsModule = "Telit, Jupiter SL869T3-| Nav|C/IRNSS";
this.gsmModule = 'Telit GE910' this.gsmModule = "Telit GE910";
} else { } else {
this.gnnsModule = "Quectel L89(GPS+IRNSS)"; this.gnnsModule = "Quectel L89(GPS+IRNSS)";
this.gsmModule = 'Quectel M66' this.gsmModule = "Quectel M66";
} }
let replaceURL = 'http://nipponsecura.in' let replaceURL = "http://nipponsecura.in";
let currentWebURl = window.location.hostname; let currentWebURl = window.location.hostname;
if(currentWebURl.includes('www.oneqlik.in')) { if (currentWebURl.includes("www.oneqlik.in")) {
replaceURL = 'https://www.oneqlik.in' replaceURL = "https://www.oneqlik.in";
} }
for (var i = 0; i < this.deviceImage.length; i++) { for (var i = 0; i < this.deviceImage.length; i++) {
console.log("DEVUCE IMAGE=>", this.deviceImage[i]); console.log("DEVUCE IMAGE=>", this.deviceImage[i]);
if(this.deviceImage[i] && !this.deviceImage[i].includes(replaceURL)) { if (this.deviceImage[i] && !this.deviceImage[i].includes(replaceURL)) {
this.deviceImage[i] = this.deviceImage[i] && this.deviceImage[i] != "" ? replaceURL + this.deviceImage[i].substring(6) : '' this.deviceImage[i] =
this.deviceImage[i] && this.deviceImage[i] != ""
? replaceURL + this.deviceImage[i].substring(6)
: "";
} }
} }
this.ICCICD = this.data.deviceInfo.IccidNo; this.ICCICD = this.data.deviceInfo.IccidNo;
this.IMSI = this.data.deviceInfo.IMSI; this.IMSI = this.data.deviceInfo.IMSI;
this.uniqueID = this.data.deviceInfo.uniqueID; this.uniqueID = this.data.deviceInfo.uniqueID;
this.fitmentDate = this.data.deviceInfo.fitmentDate ? new Date(this.data.deviceInfo.fitmentDate) : ""; this.fitmentDate = this.data.deviceInfo.fitmentDate
this.expiration_date = this.data.deviceInfo.expiration_date ? new Date(this.data.deviceInfo.expiration_date) : ""; ? new Date(this.data.deviceInfo.fitmentDate)
: "";
this.expiration_date = this.data.deviceInfo.expiration_date
? new Date(this.data.deviceInfo.expiration_date)
: "";
this.engineNo = this.data.deviceInfo.engineNo; this.engineNo = this.data.deviceInfo.engineNo;
this.typeOfVehicle = this.data.deviceInfo.typeOfVehicle; this.typeOfVehicle = this.data.deviceInfo.typeOfVehicle;
this.manufacturingCompany = this.data.deviceInfo.manufacturingCompany; this.manufacturingCompany = this.data.deviceInfo.manufacturingCompany;
this.vahanID = this.data.deviceInfo.vahanID ? this.data.deviceInfo.vahanID : ''; this.vahanID = this.data.deviceInfo.vahanID
this.lastFitnessDate = this.data.deviceInfo.lastFitnessDate ? new Date(this.data.deviceInfo.lastFitnessDate) : ""; ? this.data.deviceInfo.vahanID
this.vehicleRegDate = this.data.deviceInfo.vehicleRegDate ? new Date(this.data.deviceInfo.vehicleRegDate) : ""; : "";
this.vehicleManufacturingDate = this.data.deviceInfo.vehicleManufacturingDate ? new Date(this.data.deviceInfo.vehicleManufacturingDate) : ""; this.lastFitnessDate = this.data.deviceInfo.lastFitnessDate
this.lattitude = this.data.deviceInfo.last_loc ? this.data.deviceInfo.last_loc.coordinates[0] : ""; ? new Date(this.data.deviceInfo.lastFitnessDate)
this.longitude = this.data.deviceInfo.last_loc ? this.data.deviceInfo.last_loc.coordinates[1] : ""; : "";
this.getLocationLink() this.vehicleRegDate = this.data.deviceInfo.vehicleRegDate
var that = this ? new Date(this.data.deviceInfo.vehicleRegDate)
: "";
this.vehicleManufacturingDate = this.data.deviceInfo
.vehicleManufacturingDate
? new Date(this.data.deviceInfo.vehicleManufacturingDate)
: "";
this.lattitude = this.data.deviceInfo.last_loc
? this.data.deviceInfo.last_loc.coordinates[0]
: "";
this.longitude = this.data.deviceInfo.last_loc
? this.data.deviceInfo.last_loc.coordinates[1]
: "";
this.getLocationLink();
var that = this;
this.myImage = new Image(); this.myImage = new Image();
this.myImage.src = this.deviceImage[0] ? this.deviceImage[0] : this.img1; this.myImage.src = this.deviceImage[0] ? this.deviceImage[0] : this.img1;
this.myImage.crossOrigin = "anonymous"; this.myImage.crossOrigin = "anonymous";
@ -212,14 +256,12 @@ export class DownloadCertificateComponent implements OnInit {
this.stamp1.crossOrigin = "anonymous"; this.stamp1.crossOrigin = "anonymous";
this.img = new Image(); this.img = new Image();
this.img.src = this.org.imageDoc ? this.org.imageDoc : ''; this.img.src = this.org.imageDoc ? this.org.imageDoc : "";
this.img.crossOrigin = "anonymous"; this.img.crossOrigin = "anonymous";
// one() // one()
// function one(){ // function one(){
// stamp.onload = function(){ // stamp.onload = function(){
// two() // two()
// doc.addImage(stamp , 'png', 15,210,30,30); // doc.addImage(stamp , 'png', 15,210,30,30);
// }; // };
@ -257,7 +299,6 @@ export class DownloadCertificateComponent implements OnInit {
// doc.addImage(myImage2 , 'png', 120, 170, 30, 20); // doc.addImage(myImage2 , 'png', 120, 170, 30, 20);
// doc.save(name); // doc.save(name);
// }; // };
// } // }
@ -285,14 +326,13 @@ export class DownloadCertificateComponent implements OnInit {
}; };
// var isLoaded = this.myImage.complete && this.myImage.naturalHeight !== 0; // var isLoaded = this.myImage.complete && this.myImage.naturalHeight !== 0;
// if(isLoaded) // if(isLoaded)
resolve(''); resolve("");
}); });
} }
function f3() { function f3() {
that.myImage2.onload = function () { that.myImage2.onload = function () {
console.log("3"); console.log("3");
}; };
} }
@ -307,19 +347,13 @@ export class DownloadCertificateComponent implements OnInit {
}; };
// var isLoaded = this.myImage1.complete && this.myImage1.naturalHeight !== 0; // var isLoaded = this.myImage1.complete && this.myImage1.naturalHeight !== 0;
// if(isLoaded) // if(isLoaded)
resolve(''); resolve("");
}) });
} }
f1().then(res => f2().then(res1 => f3())); f1().then((res) => f2().then((res1) => f3()));
} }
removeItemForm() { removeItemForm() {
this.deviceImage.splice(this.deviceImage.length -1,1); this.deviceImage.splice(this.deviceImage.length - 1, 1);
} }
closePopup() { closePopup() {
this.dialogRef.close(1); this.dialogRef.close(1);
@ -329,49 +363,50 @@ export class DownloadCertificateComponent implements OnInit {
id: this.data.deviceInfo._id, id: this.data.deviceInfo._id,
imei: this.data.deviceInfo.Device_ID, imei: this.data.deviceInfo.Device_ID,
sh: this.data.deviceInfo.user._id, sh: this.data.deviceInfo.user._id,
ttl: 15 * 60 ttl: 15 * 60,
}; };
this.contactService.shareLiveLocation(data).subscribe(res => { this.contactService.shareLiveLocation(data).subscribe(
(res) => {
console.log(res); console.log(res);
console.log('shareToken', res); console.log("shareToken", res);
this.link = 'http://nipponsecura.in' + "/share/liveShare?t=" + res.t; this.link = "http://nipponsecura.in" + "/share/liveShare?t=" + res.t;
console.log(this.link); console.log(this.link);
// this.shareLocationToDevice(link); // this.shareLocationToDevice(link);
this.qrCodeGenerator() this.qrCodeGenerator();
}, err => { },
(err) => {
console.log(err); console.log(err);
}) }
);
} }
qrCodeGenerator() { qrCodeGenerator() {
var qr = new QRious(); var qr = new QRious();
qr.set({ qr.set({
// background: 'green', // background: 'green',
backgroundAlpha: 0.8, backgroundAlpha: 0.8,
// foreground: 'blue', // foreground: 'blue',
foregroundAlpha: 0.8, foregroundAlpha: 0.8,
level: 'L', level: "L",
padding: 25, padding: 25,
size: 500, size: 500,
value: this.link value: this.link,
}); });
this.imgURL = qr.toDataURL(); this.imgURL = qr.toDataURL();
} }
exportAsPdf() { exportAsPdf() {
var that = this var that = this;
var name = "Installation Certificate " + this.devName ? this.devName : "Test" + ".pdf" var name =
"Installation Certificate " + this.devName
? this.devName
: "Test" + ".pdf";
console.log(this.imgURL); console.log(this.imgURL);
var doc = new jsPDF(); var doc = new jsPDF();
var specialElementHandlers = { var specialElementHandlers = {
'#editor': function (element: any, renderer: any) { "#editor": function (element: any, renderer: any) {
return true; return true;
} },
}; };
var stamp = new Image(); var stamp = new Image();
stamp.src = that.stamp; stamp.src = that.stamp;
@ -379,69 +414,72 @@ export class DownloadCertificateComponent implements OnInit {
// stamp.onload = function(){ // stamp.onload = function(){
console.log("0"); console.log("0");
doc.setPage(1); doc.setPage(1);
doc.addImage(that.stamp1, 'png', 15, 210, 30, 30) doc.addImage(that.stamp1, "png", 15, 210, 30, 30);
// }; // };
var img = new Image(); var img = new Image();
img.src = this.org.imageDoc ? this.org.imageDoc : ''; img.src = this.org.imageDoc ? this.org.imageDoc : "";
img.crossOrigin = "anonymous"; img.crossOrigin = "anonymous";
// if(this.org.imageDoc){ // if(this.org.imageDoc){
// img.onload = function(){ // img.onload = function(){
console.log("-1"); console.log("-1");
doc.setPage(1); doc.setPage(1);
doc.addImage(that.img, 'png', 75, 9, 50, 40) doc.addImage(that.img, "png", 75, 9, 50, 40);
// }; // };
// doc.text("Customer Copy", 110, 12); // doc.text("Customer Copy", 110, 12);
doc.setFontSize(3); doc.setFontSize(3);
doc.autoTable({ doc.autoTable({
theme: 'plain', theme: "plain",
html: '#testPdf', html: "#testPdf",
tableWidth: 'auto', tableWidth: "auto",
styles : { styles: {
cellWidth : 35, cellWidth: 35,
overflow: "linebreak" overflow: "linebreak",
}, },
willDrawCell: data => { willDrawCell: (data) => {
if (data.row.index === 0) { if (data.row.index === 0) {
data.row.height = 40; data.row.height = 40;
doc.setFontStyle('bold'); doc.setFontStyle("bold");
data.row.cells[0].styles.halign = 'center'; data.row.cells[0].styles.halign = "center";
data.row.cells[0].styles.fontSize = 25; data.row.cells[0].styles.fontSize = 25;
data.row.cells[0].styles.overflow = "linebreak" data.row.cells[0].styles.overflow = "linebreak";
data.row.cells[0].styles.lineHeight = "1.5"; data.row.cells[0].styles.lineHeight = "1.5";
// doc.setLineHeightFactor() // doc.setLineHeightFactor()
// } // }
// doc.addImage(this.supAdmin.imageDoc,'JPEG', 140, 9,40,40); // doc.addImage(this.supAdmin.imageDoc,'JPEG', 140, 9,40,40);
} }
if (data.row.index === 1) { if (data.row.index === 1) {
// data.row.cells[0].styles.halign = 'center'; // data.row.cells[0].styles.halign = 'center';
doc.halign = 'center'; doc.halign = "center";
doc.setFontStyle('bold'); doc.setFontStyle("bold");
doc.cellPadding = 50; doc.cellPadding = 50;
doc.setPage(1); doc.setPage(1);
doc.addImage(this.imgURL, 'JPEG', 150, 45, 50, 40); doc.addImage(this.imgURL, "JPEG", 150, 45, 50, 40);
} }
if (data.row.index === 3) { if (data.row.index === 3) {
// data.row.cells[0].styles.halign = 'center'; // data.row.cells[0].styles.halign = 'center';
doc.halign = 'center'; doc.halign = "center";
} }
if (data.row.index === 6) { if (data.row.index === 6) {
// data.row.cells[0].styles.halign = 'center'; // data.row.cells[0].styles.halign = 'center';
doc.halign = 'center'; doc.halign = "center";
} }
if ((data.row.index === 1) || (data.row.index === 3) || (data.row.index === 5) || (data.row.index === 7) || (data.row.index === 8) || (data.row.index === 11) || (data.row.index === 13)) { if (
doc.setFontStyle('bold'); data.row.index === 1 ||
data.row.index === 3 ||
data.row.index === 5 ||
data.row.index === 7 ||
data.row.index === 8 ||
data.row.index === 11 ||
data.row.index === 13
) {
doc.setFontStyle("bold");
} }
if (data.row.index === 5) { if (data.row.index === 5) {
data.row.height = 25; data.row.height = 25;
@ -456,12 +494,9 @@ export class DownloadCertificateComponent implements OnInit {
} }
doc.setLineWidth(1); doc.setLineWidth(1);
doc.rect(7, 7, 195, 285); doc.rect(7, 7, 195, 285);
},
}
}); });
// var myImage = new Image(); // var myImage = new Image();
// myImage.src = that.deviceImage[0]?that.deviceImage[0]:this.img1; // myImage.src = that.deviceImage[0]?that.deviceImage[0]:this.img1;
// myImage.crossOrigin="anonymous"; // myImage.crossOrigin="anonymous";
@ -484,26 +519,25 @@ export class DownloadCertificateComponent implements OnInit {
function f1() { function f1() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log("1"); console.log("1");
doc.addImage(that.myImage, 'png', 40, 170, 30, 20); doc.addImage(that.myImage, "png", 40, 170, 30, 20);
resolve(''); resolve("");
}) });
} }
function f2() { function f2() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log("2"); console.log("2");
doc.addImage(that.myImage1, 'png', 80, 170, 30, 20); doc.addImage(that.myImage1, "png", 80, 170, 30, 20);
resolve(''); resolve("");
}) });
} }
function f3() { function f3() {
// myImage2.onload = function(){ // myImage2.onload = function(){
console.log("3"); console.log("3");
doc.addImage(that.myImage2, 'png', 120, 170, 30, 20); doc.addImage(that.myImage2, "png", 120, 170, 30, 20);
doc.save(name); doc.save(name);
} }
// function f1() { // function f1() {
// return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
@ -511,7 +545,6 @@ export class DownloadCertificateComponent implements OnInit {
// console.log("1"); // console.log("1");
// doc.addImage(myImage , 'png', 40, 170, 30, 20); // doc.addImage(myImage , 'png', 40, 170, 30, 20);
// }; // };
// var isLoaded = myImage.complete && myImage.naturalHeight !== 0; // var isLoaded = myImage.complete && myImage.naturalHeight !== 0;
// if(isLoaded) // if(isLoaded)
@ -526,7 +559,6 @@ export class DownloadCertificateComponent implements OnInit {
// doc.addImage(myImage2 , 'png', 120, 170, 30, 20); // doc.addImage(myImage2 , 'png', 120, 170, 30, 20);
// doc.save(name); // doc.save(name);
// }; // };
// } // }
@ -545,8 +577,7 @@ export class DownloadCertificateComponent implements OnInit {
// }) // })
// } // }
f1().then(res => f2().then(res1 => f3())); f1().then((res) => f2().then((res1) => f3()));
} }
toDataURL(url, callback) { toDataURL(url, callback) {
@ -557,68 +588,63 @@ export class DownloadCertificateComponent implements OnInit {
var reader = new FileReader(); var reader = new FileReader();
reader.onloadend = function () { reader.onloadend = function () {
callback(reader.result); callback(reader.result);
} };
reader.readAsDataURL(xhr.response); reader.readAsDataURL(xhr.response);
}; };
xhr.open('GET', url); xhr.open("GET", url);
xhr.responseType = 'blob'; xhr.responseType = "blob";
xhr.send(); xhr.send();
} }
public convetToPDF() public convetToPDF() {
{ var data = document.getElementById("testPdf");
var data = document.getElementById('testPdf');
var opt = {
var opt = {
margin: [0, 0.2, 0.2, 0.2], margin: [0, 0.2, 0.2, 0.2],
filename: this.devName +'.pdf', filename: this.devName + ".pdf",
image: { type: 'jpeg', quality: 0.98 }, image: { type: "jpeg", quality: 0.98 },
html2canvas: { scale: 4 , useCORS: true}, html2canvas: { scale: 4, useCORS: true },
jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' } jsPDF: { unit: "in", format: "letter", orientation: "portrait" },
}; };
// New Promise-based usage: // New Promise-based usage:
html2pdf().set(opt).from(data).save(); html2pdf().set(opt).from(data).save();
// html2canvas(data, {
// useCORS: true,
// scale: 2,
// scrollY: -window.scrollY,
// height:'3000px',
// onrendered: (canvas) =>{
// var data = canvas.toDataURL();
// let img = new Image();
// img.src = this.org.imageDoc ? this.org.imageDoc : '';
// img.crossOrigin = "anonymous";
// //canvas.addImage(img, 'png', 75, 9, 50, 40)
// html2canvas(data, { // var docDefinition = {
// useCORS: true, // content: [{
// scale: 2, // image: data,
// scrollY: -window.scrollY, // width: 500
// height:'3000px', // }]
// onrendered: (canvas) =>{ // };
// var data = canvas.toDataURL(); // pdfMake.createPdf(docDefinition).download("JSON.pdf");
// let img = new Image(); // }
// img.src = this.org.imageDoc ? this.org.imageDoc : ''; // });
// img.crossOrigin = "anonymous";
// //canvas.addImage(img, 'png', 75, 9, 50, 40)
// var docDefinition = { // html2canvas(data).then(canvas => {
// content: [{ // // Few necessary setting options
// image: data, // var imgWidth = 208;
// width: 500 // var pageHeight = 295;
// }] // var imgHeight = canvas.height * imgWidth / canvas.width;
// }; // var heightLeft = imgHeight;
// pdfMake.createPdf(docDefinition).download("JSON.pdf");
// const contentDataURL = canvas.toDataURL('image/png')
// } // let pdf = new jsPDF('p', 'mm', 'a4'); // A4 size page of PDF
// }); // var position = 0;
// pdf.addImage(contentDataURL, 'PNG', 0, position, imgWidth, imgHeight)
// html2canvas(data).then(canvas => { // pdf.save('new-file.pdf'); // Generated PDF
// // Few necessary setting options // });
// var imgWidth = 208; }
// var pageHeight = 295;
// var imgHeight = canvas.height * imgWidth / canvas.width;
// var heightLeft = imgHeight;
// const contentDataURL = canvas.toDataURL('image/png')
// let pdf = new jsPDF('p', 'mm', 'a4'); // A4 size page of PDF
// var position = 0;
// pdf.addImage(contentDataURL, 'PNG', 0, position, imgWidth, imgHeight)
// pdf.save('new-file.pdf'); // Generated PDF
// });
}
} }

View file

@ -0,0 +1,470 @@
<md-dialog-content class="md-typography">
<div id="testPdf" class="src_app_dashboard_download-certificate_rdm_download-certificate.component.html">
<div class="row">
<table class="table table-borderless">
<tr>
<td class="text-center">
<div style="text-align: center" *ngIf="org.imageDoc">
<img src="{{ org.imageDoc }}" style="width: auto; height: 100px" /><br />
</div>
</td>
</tr>
</table>
<table class="table table-borderless">
<tr>
<td class="to-head" style="width: 25%; padding: 20px">
To <br />
Regional Transport Authority<br />
{{
data.deviceInfo && data.deviceInfo.transportOfficeCity
? data.deviceInfo.transportOfficeCity
: ""
}}<br />
{{
data.deviceInfo && data.deviceInfo.transportOfficeState
? data.deviceInfo.transportOfficeState
: ""
}}
Only<br />
</td>
<td style="width: 50%">
<div class="text-center">
<div class="fitment-heading">FITMENT CERTIFICATE</div>
</div>
<p class="mt-2">
This is certified that, AIS 140 compliant vehicle location
tracking device with panic button(SOS) has been installed properly
as per AIS-140 guidelines device has been configured to state
approval server
</p>
</td>
<td style="width: 25%">
<div>
<img src="{{ imgURL }}" height="100px" />
</div>
</td>
</tr>
</table>
</div>
<div class="row">
<div class="col-6">
<table class="table table-bordered">
<thead class="thead-light">
<tr>
<th class="t-mp-heading" colspan="2">VEHICLE DETAILS</th>
</tr>
</thead>
<tbody style="font-size: 10px">
<tr>
<td>VEHICLE REG.NO</td>
<td>
{{
data.deviceInfo && data.deviceInfo.Device_Name
? data.deviceInfo.Device_Name
: ""
}}
</td>
</tr>
<tr>
<td>VEHICLE REG.DATE</td>
<td>
{{
data.deviceInfo && data.deviceInfo.vehicleRegDate
? data.deviceInfo.vehicleRegDate
: ""
}}
</td>
</tr>
<tr>
<td>ENGINE NO</td>
<td>{{ engineNo ? engineNo : "" }}</td>
</tr>
<tr>
<td>CHASSIS NO</td>
<td>{{ ChassisNo ? ChassisNo : "" }}</td>
</tr>
<tr>
<td>VEHICLE MAKE</td>
<td>
{{
data &&
data.deviceInfo &&
data.deviceInfo.manufacturingCompany
? data.deviceInfo.manufacturingCompany
: "-"
}}
</td>
</tr>
<tr>
<td>VEHICLE MODEL</td>
<td>{{ model ? model : "" }}</td>
</tr>
</tbody>
</table>
</div>
<div class="col-6">
<table class="table table-bordered">
<thead class="thead-light">
<tr>
<th class="t-mp-heading" colspan="2">FITMENT DETAILS</th>
</tr>
</thead>
<tbody style="font-size: 10px">
<tr>
<td>FITMENT DATE</td>
<td>
{{
kycApprovalDate ? (kycApprovalDate | date : "dd/MM/yyyy") : ""
}}
</td>
</tr>
<tr>
<td>FITMENT RENEWAL DATE</td>
<td>{{ esim_validity ? esim_validity : "" }}</td>
</tr>
<tr>
<td>FITMENT CERT.NO</td>
<td>RDM23100921402</td>
</tr>
<tr>
<td>INVOICE NO.</td>
<td>
{{
data.deviceInfo && data.deviceInfo.invoiceNumber
? data.deviceInfo.invoiceNumber
: ""
}}
</td>
</tr>
<tr>
<td>INVOCE DATE</td>
<td>
{{
data.deviceInfo && data.deviceInfo.invoiceDate
? data.deviceInfo.invoiceDate
: ""
}}
</td>
</tr>
<tr>
<td>RTO CODE</td>
<td>
{{
data.deviceInfo && data.deviceInfo.rto
? data.deviceInfo.rto
: ""
}}
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-6">
<table class="table table-bordered">
<thead class="thead-light">
<tr>
<th class="t-mp-heading" colspan="2">PRODUCT DETAILS</th>
</tr>
</thead>
<tbody style="font-size: 10px">
<tr>
<td>VTS SR.NO/UINO</td>
<td>{{ vahanID ? vahanID : "" }}</td>
</tr>
<tr>
<td>VTS MODEL</td>
<td>{{ devicetype ? devicetype : "" }}</td>
</tr>
<tr>
<td>TAC NO.</td>
<td>CK8050</td>
</tr>
<tr>
<td>COP NO.</td>
<!-- <td>CC0GS8716</td> -->
<td>CC0GT8714</td>
</tr>
<tr>
<td>COP Validity upto</td>
<td>31/03/2025</td>
<!-- <td>31/03/2024</td> -->
</tr>
</tbody>
</table>
</div>
<div class="col-6">
<table class="table table-bordered">
<thead class="thead-light">
<tr>
<th class="t-mp-heading" colspan="2">SERVICE/ESIM DETAILS</th>
</tr>
</thead>
<tbody style="font-size: 10px">
<tr>
<td>IMEI NO.</td>
<td>{{ deviceID ? deviceID : "" }}</td>
</tr>
<tr>
<td>ICCID NO/SIM NO</td>
<td>{{ ICCICD ? ICCICD : "" }}</td>
</tr>
<tr>
<td>Sim Card Service Provider</td>
<td>
{{
data.deviceInfo && data.deviceInfo.sim_provider
? data.deviceInfo.sim_provider
: ""
}}
</td>
</tr>
<tr>
<td>No. Of Panic Button</td>
<td>{{ numberOfSOS ? numberOfSOS : "" }}</td>
</tr>
<tr>
<td>Sim No.</td>
<td>{{ simNum ? simNum : "" }}</td>
</tr>
</tbody>
</table>
</div>
<div class="col-12">
<table class="table table-bordered">
<tbody style="font-size: 10px" *ngIf="deviceImage[0] || deviceImage[1] || deviceImage[2]">
<tr class="text-center">
<td style="font-weight: 700">
<img *ngIf="deviceImage[0]" src="{{ deviceImage[0] ? deviceImage[0] : img1 }}" width="80px"
height="80px" />
</td>
<td style="font-weight: 700">
<img *ngIf="deviceImage[1]" src="{{ deviceImage[1] ? deviceImage[1] : img1 }}" width="80px"
height="80px" />
</td>
<td style="font-weight: 700">
<img *ngIf="deviceImage[2]" src="{{ deviceImage[2] ? deviceImage[2] : img1 }}" width="80px"
height="80px" />
</td>
</tr>
<tr class="text-center">
<td>Device Image</td>
<td>Reg.Certificate Image</td>
<td>Vehicle Front Image</td>
</tr>
</tbody>
</table>
</div>
<h5 class="text-center heading-h3 pl-3">PRODUCT SATISFACTION REPORT</h5>
<div class="col-12">
<p style="font-size: 10px">
This is to acknowledge confirm that we have got our vehicle bearing
chassis no <strong>{{ ChassisNo }}</strong> VTS Device manufactured by
<strong>RDM Enterprises Pvt Ltd</strong> bearing Sr.No
<strong>{{ vahanID }}</strong> We have checked the performance ot the
vehicle after fitment of the said VTS device the unit is sealed and
functioning as per normslaid out in AIS 140.We have satisfied with the
performance of the unit in all respects.We undertake not to reseany
dispute or any legal claims against
<strong>RDM Enterprises Pvt Ltd</strong> in the event that the above
mentioned seals atfound broken/tampered.
</p>
</div>
<div class="col-12">
<table class="table table-bordered">
<tbody style="font-size: 10px">
<tr>
<td rowspan="3" style="width: 110px">
<!-- <div id="stamp-section"></div> -->
<img width="130" src="./assets/images/RDM.jpg" alt="test" />
</td>
<td style="width: 100px">
<strong>Dealer Name:</strong>
</td>
<td style="width: 100px">
{{
data.deviceInfo &&
data.deviceInfo.Dealer &&
data.deviceInfo.Dealer.first_name
? data.deviceInfo.Dealer.first_name
: ""
}}
{{
data.deviceInfo &&
data.deviceInfo.Dealer &&
data.deviceInfo.Dealer.last_name
? data.deviceInfo.Dealer.last_name
: ""
}}
</td>
<td style="width: 100px">
<strong>Dealer Contact no:</strong>
</td>
<td style="width: 80px"></td>
<td>
<strong>Dealer Addresse:</strong>
{{
data.deviceInfo &&
data.deviceInfo.Dealer &&
data.deviceInfo.Dealer.address
? data.deviceInfo.Dealer.address
: ""
}}
</td>
</tr>
<tr>
<td>
<strong>Customer Name:</strong>
</td>
<td>
{{ user.first_name ? user.first_name : "" }}
{{ user.last_name ? user.last_name : "" }}
</td>
<td>
<strong>Customer Contact no:</strong>
</td>
<td>
{{ user.phone ? user.phone : "" }}
</td>
<td>
<strong>Customer Addresse:</strong>
{{ user.address ? user.address : "" }}
</td>
</tr>
<tr>
<td>
<strong>Device Installed By</strong>
</td>
<td></td>
<td>
<strong>Dealer Sign:</strong>
</td>
<td>..............</td>
<td>
<strong>RTA/MVI/STA: </strong>
...............................
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</md-dialog-content>
<md-dialog-actions align="end">
<button md-button md-dialog-close>Cancel</button>
<button md-button (click)="convetToPDF()" cdkFocusInitial>Export PDF</button>
</md-dialog-actions>
<div style="display: none">
<tr>
<td style="width: 33%">
TAC Reg.No &nbsp;&nbsp;&nbsp; <br />
CoP No.&nbsp;&nbsp;&nbsp;&nbsp;<br />
CoP Validity upto&nbsp;&nbsp;<br />
Fitment Date&nbsp;&nbsp;&nbsp;<br />
Fitment Renewal Date&nbsp;&nbsp;<br />
</td>
<td colspan="2">
: CK8077 <br />
: CC0GS8750<br />
: 30 September 2024 <br />
: <br />
: <br />
</td>
</tr>
<tr>
<td colspan="3">
<h6 style="font-size: 18px; margin: 15px 0 5px 0px">
AIS 140 COMPLIANCE VLT INSTALLATION CERTIFICATE
</h6>
</td>
</tr>
<tr>
<td style="width: 33%">
Fitment Certificate No.<br />
Chassis No. <br />
Vehicle OEM <br />
Vehicle Model <br />
Vehicle Reg/temp <br />
Voltage<br />
Panic Button Model<br />
Panic Button fitted<br />
Dealer Name/fitted by<br />
Device Model No.<br />
GNSS Module<br />
Vahan ID<br />
Device IMEI<br />
GSM Module<br />
ICCID <br />
Primary SIM<br />
Primary SIM Valid till<br />
Secondary SIM<br />
Secondary SIM Valid till<br />
</td>
<td colspan="2">
: {{ fitmentCertificateNo ? fitmentCertificateNo : "" }}<br />
: <br />
: <br />
: {{ manufacturingCompany ? manufacturingCompany : "" }}<br />
: {{ model ? model : "" }}<br />
: {{ devName ? devName : "" }}<br />
: 12V & 24V<br />
: NSS-1821<br />
: panic button<br />
: {{ dealerName ? dealerName : "" }}<br />
: {{ devicetype ? devicetype : "" }}<br />
: {{ gnnsModule ? gnnsModule : 0 }}<br />
: {{ vahanID ? vahanID : "" }}<br />
: {{ deviceID ? deviceID : "" }}<br />
: {{ gsmModule ? gsmModule : "Telit GE910" }}<br />
: {{ ICCICD ? ICCICD : "" }}<br />
: {{ simNum ? simNum : "" }}<br />
: {{ esim_validity ? esim_validity : "" }}<br />
: {{ simNum1 ? simNum1 : "" }}<br />
: {{ esim_validity ? esim_validity : "" }}<br />
</td>
</tr>
<tr style="padding-top: 5px">
<td></td>
<td></td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
<tr style="padding-top: 5px">
<td>Authorised</td>
</tr>
<tr style="padding-top: 5px">
<td>Undertaking</td>
</tr>
<tr>
<td colspan="3">
<p>
This is certified that the device and panic button (SOS) installation
has been carried out to my satisfaction and explained about the
functionality of Device, I undertake that I will not temper the device
and panic button (SOS)
</p>
</td>
</tr>
<tr>
<td colspan="1" style="text-align: center; margin-top: 5px">
Customer Name : <br />
Contact/Login ID :
</td>
<td colspan="1">
Customer Address: <br />
Customer Sign :
</td>
<td></td>
</tr>
</div>

View file

@ -0,0 +1,45 @@
.html2canvas-container {
width: 3000px !important;
height: 3000px !important;
}
#testPdf .table{
margin-bottom: 0.25rem;
}
#stamp-section{
background: url('/assets/images/liveTrackIcons/Stamp.png');
background-repeat: no-repeat;
height: 110px;
position: absolute;
top: 5px;
width: 110px;
}
.t-mp-heading {
font-size: 16px;font-weight: 700;
text-align: center;
}
.table.table-bordered tr td:first-child{
font-weight: 700;
}
.fitment-heading{
font-size: 12px;
border: 3px solid;
padding: 5px;
display: inline;
font-weight: 700;
width: fit-content;
margin-top: -12px;
}
.to-head {
font-size: 14px;
font-weight: 600;
}
#testPdf .table td, #testPdf .table th {
padding: 0.25rem;}
.table.table-borderless td{
border:none;
font-size: 10px;
}
.fix-width-20 td{
width: 16%;
}

View file

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DownloadCertificateComponent } from './download-certificate.component';
describe('DownloadCertificateComponent', () => {
let component: DownloadCertificateComponent;
let fixture: ComponentFixture<DownloadCertificateComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DownloadCertificateComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DownloadCertificateComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,647 @@
import { Component, Inject, OnInit } from "@angular/core";
import { MdDialogRef, MD_DIALOG_DATA } from "@angular/material";
declare var jsPDF: any;
declare var pdfMake: any;
declare var html2canvas: any;
declare var html2pdf: any;
import * as moment from "moment";
import { ContactService } from "../../contact.service";
declare var $: any;
declare var QRious: any;
@Component({
selector: "app-download-certificate",
templateUrl: "./download-certificate.component.html",
styleUrls: ["./download-certificate.component.scss"],
})
export class DownloadCertificaterdmComponent implements OnInit {
devName: any;
img1 = "/assets/images/liveTrackIcons/noImageAvailableIcon.jpg";
stamp = "/assets/images/liveTrackIcons/Stamp.png";
phNum: any;
createdOn: any;
expOn: any;
supAdmin;
DealerObj = [];
userObj = [];
// iconType:any;
simNum: any;
todayODO: any;
totalODO: any;
useridd: any;
emailId: any = "";
costumers: any = [];
deviceID: any;
userName: any;
devmodel: any;
newUserArr = [];
editTemplate: boolean = true;
deletetemplate: boolean = false;
orignalEmail: any;
initialUser: any;
ExportPdf: boolean;
devID: any;
InvoiceDate: any;
devicetype: any;
fitmentDate: any;
engineNo: any;
typeOfVehicle: any;
manufacturingCompany: any;
lastFitnessDate: any;
vehicleRegDate: any;
vehicleManufacturingDate: any;
IMSI: any;
uniqueID: any;
lattitude: any;
longitude: any;
userAddress: any;
dealerAddress: any;
CID_No: any;
imgUrl: any;
imgURL: any;
companyName: any;
companyAddress: any;
transportOfficeCity: any;
transportOfficeState: { data: string };
ChassisNo: any;
deviceManufacturer: any;
invoiceNum: any;
numberOfSOS: any;
expiration_date: any;
organisationFlag: any;
distributerName: any;
distSelect: any = [];
superAdmin: any;
isDealer: any;
dealerId: any;
lastPingOn: any;
lastDeviceTime: any;
deviceImage = [];
dealerName;
installationDate;
ICCICD;
simNum1;
model;
user: any;
org;
link: string;
kycApprovalDate;
esim_validity;
fitmentCertificateNo;
vahanID: any;
myImage: HTMLImageElement;
myImage1: HTMLImageElement;
myImage2: HTMLImageElement;
stamp1: HTMLImageElement;
img: HTMLImageElement;
gnnsModule;
gsmModule;
constructor(
public dialogRef: MdDialogRef<DownloadCertificaterdmComponent>,
private contactService: ContactService,
@Inject(MD_DIALOG_DATA) public data: any
) {
console.log(data);
}
ngOnInit() {
this.org = JSON.parse(localStorage.getItem("ORG"));
if (!this.data.deviceInfo.esim_validity) {
if (this.data.deviceInfo.License == "Yearly") {
this.esim_validity = this.data.deviceInfo.kycApprovalDate
? moment(new Date(this.data.deviceInfo.kycApprovalDate), "DD/MM/YYYY")
.add(1, "years")
.format("DD/MM/YYYY")
: undefined;
}
} else {
this.esim_validity = this.data.deviceInfo.esim_validity
? moment(new Date(this.data.deviceInfo.esim_validity)).format(
"DD/MM/YYYY"
)
: undefined;
}
this.fitmentCertificateNo = this.data.deviceInfo.fitmentCertificateNo;
this.ChassisNo = this.data.deviceInfo.ChassisNo;
this.lastDeviceTime = this.data.deviceInfo.last_device_time;
this.numberOfSOS = this.data.deviceInfo.numberOfSOS;
this.kycApprovalDate = this.data.deviceInfo.kycApprovalDate;
this.model = this.data.deviceInfo.Model;
this.lastPingOn = this.data.deviceInfo.last_ping_on;
this.devName = this.data.deviceInfo.Device_Name;
this.devID = this.data.deviceInfo.Device_ID
? this.data.deviceInfo.Device_ID
: "";
this.phNum = this.data.deviceInfo.contact_number;
this.createdOn = this.data.deviceInfo.created_on
? new Date(this.data.deviceInfo.created_on).toISOString()
: "";
this.expOn = this.data.deviceInfo.expiration_date
? new Date(this.data.deviceInfo.expiration_date).toISOString()
: "";
// this.iconType=this.data.deviceInfo.iconType;
this.simNum = this.data.deviceInfo.sim_number;
this.simNum1 = this.data.deviceInfo.sim_number2;
this.orignalEmail = this.data.deviceInfo.Email_ID;
this.emailId = this.data.deviceInfo.Email_ID;
this.deviceImage = this.data.deviceInfo.deviceImage;
if (this.org.imageDoc && this.org.imageDoc.length > 0) {
this.org.imageDoc =
"https://www.oneqlik.in" + this.org.imageDoc[0].substring(6);
}
this.supAdmin = this.data.deviceInfo.supAdmin;
if (this.supAdmin.imageDoc && this.supAdmin.imageDoc.length > 0) {
this.supAdmin.imageDoc =
"https://www.oneqlik.in" + this.supAdmin.imageDoc[0].substring(6);
}
console.log(this.deviceImage);
this.installationDate = this.data.deviceInfo.created_on;
this.todayODO = this.data.deviceInfo.today_odo;
this.totalODO = this.data.deviceInfo.total_odo;
this.deviceID = this.data.deviceInfo.Device_ID;
this.initialUser = this.data.deviceInfo.user._id;
this.user = this.data.deviceInfo.user;
this.userName = this.data.deviceInfo.OwnerName;
this.userAddress = this.data.deviceInfo
? this.data.deviceInfo.user.address
: "";
this.dealerName = this.data.deviceInfo.Dealer_name;
this.dealerId = this.data.deviceInfo.Dealer
? this.data.deviceInfo.Dealer._id
: "";
console.log("this.dealerId", this.dealerId);
this.dealerAddress = this.data.deviceInfo.DealerAddress;
this.InvoiceDate = this.data.deviceInfo.invoiceDate
? new Date(this.data.deviceInfo.invoiceDate).toISOString()
: "";
this.invoiceNum = this.data.deviceInfo.invoiceNumber;
this.CID_No = this.data.deviceInfo.CID_No;
this.devicetype = this.data.deviceInfo.device_model
? this.data.deviceInfo.device_model.device_type
: "";
if (this.devicetype == "Nippon-NVT-1820") {
this.gsmModule = "Telit GE910";
} else if (this.devicetype == "Nippon-NVT-1820") {
this.gnnsModule = "Telit, Jupiter SL869T3-| Nav|C/IRNSS";
this.gsmModule = "Telit GE910";
} else {
this.gnnsModule = "Quectel L89(GPS+IRNSS)";
this.gsmModule = "Quectel M66";
}
let replaceURL = "http://nipponsecura.in";
let currentWebURl = window.location.hostname;
if (currentWebURl.includes("www.oneqlik.in")) {
replaceURL = "https://www.oneqlik.in";
}
for (var i = 0; i < this.deviceImage.length; i++) {
console.log("DEVUCE IMAGE=>", this.deviceImage[i]);
if (this.deviceImage[i] && !this.deviceImage[i].includes(replaceURL)) {
this.deviceImage[i] =
this.deviceImage[i] && this.deviceImage[i] != ""
? replaceURL + this.deviceImage[i].substring(6)
: "";
}
}
this.ICCICD = this.data.deviceInfo.IccidNo;
this.IMSI = this.data.deviceInfo.IMSI;
this.uniqueID = this.data.deviceInfo.uniqueID;
this.fitmentDate = this.data.deviceInfo.fitmentDate
? new Date(this.data.deviceInfo.fitmentDate)
: "";
this.expiration_date = this.data.deviceInfo.expiration_date
? new Date(this.data.deviceInfo.expiration_date)
: "";
this.engineNo = this.data.deviceInfo.engineNo;
this.typeOfVehicle = this.data.deviceInfo.typeOfVehicle;
this.manufacturingCompany = this.data.deviceInfo.manufacturingCompany;
this.vahanID = this.data.deviceInfo.vahanID
? this.data.deviceInfo.vahanID
: "";
this.lastFitnessDate = this.data.deviceInfo.lastFitnessDate
? new Date(this.data.deviceInfo.lastFitnessDate)
: "";
this.vehicleRegDate = this.data.deviceInfo.vehicleRegDate
? new Date(this.data.deviceInfo.vehicleRegDate)
: "";
this.vehicleManufacturingDate = this.data.deviceInfo
.vehicleManufacturingDate
? new Date(this.data.deviceInfo.vehicleManufacturingDate)
: "";
this.lattitude = this.data.deviceInfo.last_loc
? this.data.deviceInfo.last_loc.coordinates[0]
: "";
this.longitude = this.data.deviceInfo.last_loc
? this.data.deviceInfo.last_loc.coordinates[1]
: "";
this.getLocationLink();
var that = this;
this.myImage = new Image();
this.myImage.src = this.deviceImage[0] ? this.deviceImage[0] : this.img1;
this.myImage.crossOrigin = "anonymous";
this.myImage1 = new Image();
this.myImage1.src = this.deviceImage[1] ? this.deviceImage[1] : this.img1;
this.myImage1.crossOrigin = "anonymous";
this.myImage2 = new Image();
this.myImage2.src = this.deviceImage[2] ? this.deviceImage[2] : this.img1;
this.myImage2.crossOrigin = "anonymous";
this.stamp1 = new Image();
this.stamp1.src = this.stamp;
this.stamp1.crossOrigin = "anonymous";
this.img = new Image();
this.img.src = this.org.imageDoc ? this.org.imageDoc : "";
this.img.crossOrigin = "anonymous";
// one()
// function one(){
// stamp.onload = function(){
// two()
// doc.addImage(stamp , 'png', 15,210,30,30);
// };
// }
// function two(){
// img.onload = function(){
// console.log("-1");
// three()
// doc.addImage(img , 'png', 15, 9,50,40)
// };
// }
// function three(){
// four()
// myImage.onload = function(){
// console.log("1");
// doc.addImage(myImage , 'png', 40, 170, 30, 20);
// };
// }
// function four(){
// myImage1.onload = function(){
// console.log("2");
// five()
// doc.addImage(myImage1 , 'png', 80, 170, 30, 20);
// };
// }
// function five(){
// myImage2.onload = function(){
// console.log("3");
// doc.addImage(myImage2 , 'png', 120, 170, 30, 20);
// doc.save(name);
// };
// }
// var stamp=new Image();
// stamp.src=that.stamp;
// stamp.crossOrigin="anonymous";
// stamp.onload = function(){
// console.log("0");
// doc.addImage(stamp , 'png', 15,210,30,30)
// };
// var img = new Image();
// img.src = this.org.imageDoc?this.org.imageDoc:'';
// img.crossOrigin="anonymous";
// // if(this.org.imageDoc){
// img.onload = function(){
// console.log("-1");
// doc.addImage(img , 'png', 15, 9,50,40)
// };doc.addImage(myImage , 'png', 40, 170, 30, 20);
function f1() {
return new Promise((resolve, reject) => {
that.myImage.onload = function () {
console.log("1");
};
// var isLoaded = this.myImage.complete && this.myImage.naturalHeight !== 0;
// if(isLoaded)
resolve("");
});
}
function f3() {
that.myImage2.onload = function () {
console.log("3");
};
}
function f2() {
return new Promise((resolve, reject) => {
that.myImage1.onload = function () {
console.log("2");
// doc.addImage(myImage1 , 'png', 80, 170, 30, 20);
// if(that.deviceImage.length==2){
// doc.save(name);
// }
};
// var isLoaded = this.myImage1.complete && this.myImage1.naturalHeight !== 0;
// if(isLoaded)
resolve("");
});
}
f1().then((res) => f2().then((res1) => f3()));
}
removeItemForm() {
this.deviceImage.splice(this.deviceImage.length - 1, 1);
}
closePopup() {
this.dialogRef.close(1);
}
getLocationLink() {
var data = {
id: this.data.deviceInfo._id,
imei: this.data.deviceInfo.Device_ID,
sh: this.data.deviceInfo.user._id,
ttl: 15 * 60,
};
this.contactService.shareLiveLocation(data).subscribe(
(res) => {
this.link = "http://13.126.36.205" + "/share/liveShare?t=" + res.t;
// this.shareLocationToDevice(link);
this.qrCodeGenerator();
},
(err) => {
console.log(err);
}
);
}
qrCodeGenerator() {
var qr = new QRious();
qr.set({
// background: 'green',
backgroundAlpha: 0.8,
// foreground: 'blue',
foregroundAlpha: 0.8,
level: "L",
padding: 25,
size: 500,
value: this.link,
});
this.imgURL = qr.toDataURL();
}
exportAsPdf() {
var that = this;
var name =
"Installation Certificate " + this.devName
? this.devName
: "Test" + ".pdf";
console.log(this.imgURL);
var doc = new jsPDF();
var specialElementHandlers = {
"#editor": function (element: any, renderer: any) {
return true;
},
};
var stamp = new Image();
stamp.src = that.stamp;
stamp.crossOrigin = "anonymous";
// stamp.onload = function(){
console.log("0");
doc.setPage(1);
doc.addImage(that.stamp1, "png", 15, 210, 30, 30);
// };
var img = new Image();
img.src = this.org.imageDoc ? this.org.imageDoc : "";
img.crossOrigin = "anonymous";
// if(this.org.imageDoc){
// img.onload = function(){
console.log("-1");
doc.setPage(1);
doc.addImage(that.img, "png", 75, 9, 50, 40);
// };
// doc.text("Customer Copy", 110, 12);
doc.setFontSize(3);
doc.autoTable({
theme: "plain",
html: "#testPdf",
tableWidth: "auto",
styles: {
cellWidth: 35,
overflow: "linebreak",
},
willDrawCell: (data) => {
if (data.row.index === 0) {
data.row.height = 40;
doc.setFontStyle("bold");
data.row.cells[0].styles.halign = "center";
data.row.cells[0].styles.fontSize = 25;
data.row.cells[0].styles.overflow = "linebreak";
data.row.cells[0].styles.lineHeight = "1.5";
// doc.setLineHeightFactor()
// }
// doc.addImage(this.supAdmin.imageDoc,'JPEG', 140, 9,40,40);
}
if (data.row.index === 1) {
// data.row.cells[0].styles.halign = 'center';
doc.halign = "center";
doc.setFontStyle("bold");
doc.cellPadding = 50;
doc.setPage(1);
doc.addImage(this.imgURL, "JPEG", 150, 45, 50, 40);
}
if (data.row.index === 3) {
// data.row.cells[0].styles.halign = 'center';
doc.halign = "center";
}
if (data.row.index === 6) {
// data.row.cells[0].styles.halign = 'center';
doc.halign = "center";
}
if (
data.row.index === 1 ||
data.row.index === 3 ||
data.row.index === 5 ||
data.row.index === 7 ||
data.row.index === 8 ||
data.row.index === 11 ||
data.row.index === 13
) {
doc.setFontStyle("bold");
}
if (data.row.index === 5) {
data.row.height = 25;
// data.row.cells[0].styles.halign = 'center';
// doc.halign = 'center';
}
if (data.row.index === 6) {
data.row.height = 40;
// data.row.cells[0].styles.halign = 'center';
// doc.halign = 'center';
}
doc.setLineWidth(1);
doc.rect(7, 7, 195, 285);
},
});
// var myImage = new Image();
// myImage.src = that.deviceImage[0]?that.deviceImage[0]:this.img1;
// myImage.crossOrigin="anonymous";
// var myImage1 = new Image();
// myImage1.src = that.deviceImage[1]?that.deviceImage[1]:this.img1;
// myImage1.crossOrigin="anonymous";
// var myImage2 = new Image();
// myImage2.src = that.deviceImage[2]?that.deviceImage[2]:this.img1;
// myImage2.crossOrigin="anonymous";
// var stamp=new Image();
// stamp.src=that.stamp;
// stamp.crossOrigin="anonymous";
// var img = new Image();
// img.src = this.org.imageDoc?this.org.imageDoc:'';
// img.crossOrigin="anonymous";
function f1() {
return new Promise((resolve, reject) => {
console.log("1");
doc.addImage(that.myImage, "png", 40, 170, 30, 20);
resolve("");
});
}
function f2() {
return new Promise((resolve, reject) => {
console.log("2");
doc.addImage(that.myImage1, "png", 80, 170, 30, 20);
resolve("");
});
}
function f3() {
// myImage2.onload = function(){
console.log("3");
doc.addImage(that.myImage2, "png", 120, 170, 30, 20);
doc.save(name);
}
// function f1() {
// return new Promise((resolve, reject) => {
// myImage.onload = function(){
// console.log("1");
// doc.addImage(myImage , 'png', 40, 170, 30, 20);
// };
// var isLoaded = myImage.complete && myImage.naturalHeight !== 0;
// if(isLoaded)
// resolve('');
// });
// }
// function f3(){
// myImage2.onload = function(){
// console.log("3");
// doc.addImage(myImage2 , 'png', 120, 170, 30, 20);
// doc.save(name);
// };
// }
// function f2() {
// return new Promise((resolve, reject) => {
// myImage1.onload = function(){
// console.log("2");
// doc.addImage(myImage1 , 'png', 80, 170, 30, 20);
// // if(that.deviceImage.length==2){
// // doc.save(name);
// // }
// };
// var isLoaded = myImage1.complete && myImage1.naturalHeight !== 0;
// if(isLoaded)
// resolve('');
// })
// }
f1().then((res) => f2().then((res1) => f3()));
}
toDataURL(url, callback) {
console.log(url);
var xhr = new XMLHttpRequest();
xhr.onload = function () {
var reader = new FileReader();
reader.onloadend = function () {
callback(reader.result);
};
reader.readAsDataURL(xhr.response);
};
xhr.open("GET", url);
xhr.responseType = "blob";
xhr.send();
}
public convetToPDF() {
var data = document.getElementById("testPdf");
var opt = {
margin: [0, 0.2, 0.2, 0.2],
filename: this.devName + ".pdf",
image: { type: "jpeg", quality: 0.98 },
html2canvas: { scale: 4, useCORS: true },
jsPDF: { unit: "in", format: "letter", orientation: "portrait" },
};
// New Promise-based usage:
html2pdf().set(opt).from(data).save();
// html2canvas(data, {
// useCORS: true,
// scale: 2,
// scrollY: -window.scrollY,
// height:'3000px',
// onrendered: (canvas) =>{
// var data = canvas.toDataURL();
// let img = new Image();
// img.src = this.org.imageDoc ? this.org.imageDoc : '';
// img.crossOrigin = "anonymous";
// //canvas.addImage(img, 'png', 75, 9, 50, 40)
// var docDefinition = {
// content: [{
// image: data,
// width: 500
// }]
// };
// pdfMake.createPdf(docDefinition).download("JSON.pdf");
// }
// });
// html2canvas(data).then(canvas => {
// // Few necessary setting options
// var imgWidth = 208;
// var pageHeight = 295;
// var imgHeight = canvas.height * imgWidth / canvas.width;
// var heightLeft = imgHeight;
// const contentDataURL = canvas.toDataURL('image/png')
// let pdf = new jsPDF('p', 'mm', 'a4'); // A4 size page of PDF
// var position = 0;
// pdf.addImage(contentDataURL, 'PNG', 0, position, imgWidth, imgHeight)
// pdf.save('new-file.pdf'); // Generated PDF
// });
}
}

View file

@ -19,20 +19,11 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputPassword4">Contact No.</label> <span>*</span> <label for="inputPassword4">Contact No.</label> <span>*</span>
<input <input (input)="onSearchChange($event.target.value)" formControlName="contactNo" type="text"
(input)="onSearchChange($event.target.value)" class="form-control" id="inputPassword4" placeholder="Enter Contact number"
formControlName="contactNo" [ngClass]="{ 'is-invalid': submitted && f.contactNo.errors }" />
type="text"
class="form-control"
id="inputPassword4"
placeholder="Enter Contact number"
[ngClass]="{ 'is-invalid': submitted && f.contactNo.errors }"
/>
<small *ngIf="message">{{ message }}</small> <small *ngIf="message">{{ message }}</small>
<div <div *ngIf="submitted && f.contactNo.errors" class="invalid-feedback">
*ngIf="submitted && f.contactNo.errors"
class="invalid-feedback"
>
<div *ngIf="f.contactNo.errors.required"> <div *ngIf="f.contactNo.errors.required">
Contact Number is required Contact Number is required
</div> </div>
@ -43,18 +34,9 @@
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputEmail4">Owner Name</label> <span>*</span> <label for="inputEmail4">Owner Name</label> <span>*</span>
<input <input formControlName="ownerName" type="text" class="form-control" id="inputEmail4"
formControlName="ownerName" placeholder="Please Enter Owner Name" [ngClass]="{ 'is-invalid': submitted && f.ownerName.errors }" />
type="text" <div *ngIf="submitted && f.ownerName.errors" class="invalid-feedback">
class="form-control"
id="inputEmail4"
placeholder="Please Enter Owner Name"
[ngClass]="{ 'is-invalid': submitted && f.ownerName.errors }"
/>
<div
*ngIf="submitted && f.ownerName.errors"
class="invalid-feedback"
>
<div *ngIf="f.ownerName.errors.required"> <div *ngIf="f.ownerName.errors.required">
Owner Name is required Owner Name is required
</div> </div>
@ -66,13 +48,8 @@
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputCity">Email</label> <label for="inputCity">Email</label>
<!-- <span>*</span> --> <!-- <span>*</span> -->
<input <input formControlName="email" type="text" class="form-control" id="inputCity"
formControlName="email" placeholder="Please Enter Email" />
type="text"
class="form-control"
id="inputCity"
placeholder="Please Enter Email"
/>
<!-- <div *ngIf="submitted && f.email.errors.email" class="invalid-feedback"> <!-- <div *ngIf="submitted && f.email.errors.email" class="invalid-feedback">
<div *ngIf="f.email.errors.email">Please Enter valid email id</div> <div *ngIf="f.email.errors.email">Please Enter valid email id</div>
</div> --> </div> -->
@ -80,18 +57,11 @@
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputCity">Dealer Followup Mobile ff</label> <span>*</span> <label for="inputCity">Dealer Followup Mobile ff</label>
<input <span>*</span>
formControlName="dealerFollowup" <input formControlName="dealerFollowup" type="text" class="form-control" id="inputCity"
type="text" [ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }" />
class="form-control" <div *ngIf="submitted && f.dealerFollowup.errors" class="invalid-feedback">
id="inputCity"
[ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }"
/>
<div
*ngIf="submitted && f.dealerFollowup.errors"
class="invalid-feedback"
>
<div *ngIf="f.dealerFollowup.errors.required"> <div *ngIf="f.dealerFollowup.errors.required">
Dealer Followup is required Dealer Followup is required
</div> </div>
@ -100,26 +70,16 @@
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputCity">Address</label> <span>*</span> <label for="inputCity">Address</label> <span>*</span>
<input <input formControlName="address" type="text" class="form-control" id="inputCity"
formControlName="address" [ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }" />
type="text"
class="form-control"
id="inputCity"
[ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }"
/>
<div *ngIf="submitted && f.address.errors" class="invalid-feedback"> <div *ngIf="submitted && f.address.errors" class="invalid-feedback">
<div *ngIf="f.address.errors.required">Address is required</div> <div *ngIf="f.address.errors.required">Address is required</div>
</div> </div>
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="pin">Pin Code</label> <span>*</span> <label for="pin">Pin Code</label> <span>*</span>
<input <input formControlName="pin" type="text" class="form-control" id="pin"
formControlName="pin" [ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }" />
type="text"
class="form-control"
id="pin"
[ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }"
/>
<div *ngIf="submitted && f.pin.errors" class="invalid-feedback"> <div *ngIf="submitted && f.pin.errors" class="invalid-feedback">
<div *ngIf="f.pin.errors.required">Pin Code is required</div> <div *ngIf="f.pin.errors.required">Pin Code is required</div>
<div *ngIf="f.pin.errors.pattern"> <div *ngIf="f.pin.errors.pattern">
@ -131,46 +91,44 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputState">State</label> <label for="inputState">State</label> <span>*</span>
<select <select formControlName="state" (change)="onStateChange($event)" id="inputState" class="form-control">
formControlName="state"
(change)="onStateChange($event)"
id="inputState"
class="form-control"
>
<option value="" selected disabled>Choose state</option> <option value="" selected disabled>Choose state</option>
<option *ngFor="let item of states" [value]="item"> <option *ngFor="let item of states" [value]="item">
{{ item }} {{ item }}
</option> </option>
</select> </select>
<div *ngIf="submitted && f.state.errors" class="invalid-feedback">
<div *ngIf="f.state.errors.required">State is required</div>
</div>
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputCity">City</label> <label for="inputCity">City</label> <span>*</span>
<select <select formControlName="city" (change)="onCityChange($event)" id="inputState" class="form-control">
formControlName="city"
(change)="onCityChange($event)"
id="inputState"
class="form-control"
>
<option value="" selected disabled>Choose City</option> <option value="" selected disabled>Choose City</option>
<option *ngFor="let item of cityList" [value]="item.city"> <option *ngFor="let item of cityList" [value]="item.city">
{{ item.city }} {{ item.city }}
</option> </option>
</select> </select>
<div *ngIf="submitted && f.city.errors" class="invalid-feedback">
<div *ngIf="f.city.errors.required">City is required</div>
</div>
<!-- <input formControlName="city" type="text" class="form-control" id="inputCity"> --> <!-- <input formControlName="city" type="text" class="form-control" id="inputCity"> -->
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputZip">RTO Office</label> <label for="inputZip">RTO Office</label> <span>*</span>
<select <select formControlName="rtoOffice" id="inputState" class="form-control">
formControlName="rtoOffice"
id="inputState"
class="form-control"
>
<option value="" selected disabled>Choose RTO</option> <option value="" selected disabled>Choose RTO</option>
<option *ngFor="let item of RTO" [value]="item.RTO_Name"> <option *ngFor="let item of RTO" [value]="item.RTO_Name">
{{ item.RTO_Name }} {{ item.RTO_Name }}
</option> </option>
</select> </select>
<div *ngIf="submitted && f.rtoOffice.errors" class="invalid-feedback">
<div *ngIf="f.rtoOffice.errors.required">
RTO Office is required
</div>
</div>
<!-- <input formControlName="rtoOffice" type="text" class="form-control" id="inputZip"> --> <!-- <input formControlName="rtoOffice" type="text" class="form-control" id="inputZip"> -->
</div> </div>
</div> </div>
@ -178,6 +136,17 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputCity">Device ID (IMEI)</label><span>*</span> <label for="inputCity">Device ID (IMEI)</label><span>*</span>
<div>
<select id="inventory">
<option *ngFor="let option_1 of inventory" [value]="option_1.IMEI">
{{ option_1.IMEI }}
</option>
</select>
</div>
<!-- <label for="inputCity">Device ID (IMEI)</label><span>*</span>
<input <input
formControlName="device_id" formControlName="device_id"
type="text" type="text"
@ -192,7 +161,7 @@
<div *ngIf="f.device_id.errors.required"> <div *ngIf="f.device_id.errors.required">
Device Id is required Device Id is required
</div> </div>
</div> </div> -->
</div> </div>
<!-- <div *ngIf="inventoryManagement" class="form-group col-md-4"> <!-- <div *ngIf="inventoryManagement" class="form-group col-md-4">
@ -209,18 +178,9 @@
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputPassword4">Vehicle No.</label><span>*</span> <label for="inputPassword4">Vehicle No.</label><span>*</span>
<input <input formControlName="vehicleNo" type="text" class="form-control" id="inputPassword4"
formControlName="vehicleNo" placeholder="Enter Vehicle number" [ngClass]="{ 'is-invalid': submitted && f.vehicleNo.errors }" />
type="text" <div *ngIf="submitted && f.vehicleNo.errors" class="invalid-feedback">
class="form-control"
id="inputPassword4"
placeholder="Enter Vehicle number"
[ngClass]="{ 'is-invalid': submitted && f.vehicleNo.errors }"
/>
<div
*ngIf="submitted && f.vehicleNo.errors"
class="invalid-feedback"
>
<div *ngIf="f.vehicleNo.errors.required"> <div *ngIf="f.vehicleNo.errors.required">
Vehicle number is required Vehicle number is required
</div> </div>
@ -245,25 +205,19 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="iccid">ICCID</label> <label for="iccid">ICCID</label>
<input <input formControlName="iccid" type="text" class="form-control" id="iccid"
formControlName="iccid" placeholder="Enter ICCID No number" />
type="text" </div>
class="form-control" <div class="form-group col-md-4 d-none">
id="iccid" <label for="vahanID">vahanID</label>
placeholder="Enter ICCID No number" <input formControlName="vahanID" type="text" class="form-control" id="vahanID"
/> placeholder="Enter vahanID No number" />
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="sim1">SIM 1</label> <span>*</span> <label for="sim1">SIM 1</label> <span>*</span>
<input <input formControlName="sim1" type="text" class="form-control" id="sim1" placeholder="Enter SIM number"
formControlName="sim1" [ngClass]="{ 'is-invalid': submitted && f.sim1.errors }" />
type="text"
class="form-control"
id="sim1"
placeholder="Enter SIM number"
[ngClass]="{ 'is-invalid': submitted && f.sim1.errors }"
/>
<div *ngIf="submitted && f.sim1.errors" class="invalid-feedback"> <div *ngIf="submitted && f.sim1.errors" class="invalid-feedback">
<div *ngIf="f.sim1.errors.required">SIM 1 is required</div> <div *ngIf="f.sim1.errors.required">SIM 1 is required</div>
</div> </div>
@ -272,13 +226,7 @@
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputEmail4">SIM 2</label> <label for="inputEmail4">SIM 2</label>
<div> <div>
<input <input formControlName="sim2" type="text" class="form-control" id="sim1" placeholder="Enter SIM number" />
formControlName="sim2"
type="text"
class="form-control"
id="sim1"
placeholder="Enter SIM number"
/>
</div> </div>
</div> </div>
</div> </div>
@ -286,18 +234,9 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputEmail4">Chassis No.</label><span>*</span> <label for="inputEmail4">Chassis No.</label><span>*</span>
<input <input formControlName="chasisNo" type="text" class="form-control" id="inputEmail4"
formControlName="chasisNo" placeholder="Enter Chasis No." [ngClass]="{ 'is-invalid': submitted && f.chasisNo.errors }" />
type="text" <div *ngIf="submitted && f.chasisNo.errors" class="invalid-feedback">
class="form-control"
id="inputEmail4"
placeholder="Enter Chasis No."
[ngClass]="{ 'is-invalid': submitted && f.chasisNo.errors }"
/>
<div
*ngIf="submitted && f.chasisNo.errors"
class="invalid-feedback"
>
<div *ngIf="f.chasisNo.errors.required"> <div *ngIf="f.chasisNo.errors.required">
Chassis No is required Chassis No is required
</div> </div>
@ -305,18 +244,9 @@
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputPassword4">Engine No.</label><span>*</span> <label for="inputPassword4">Engine No.</label><span>*</span>
<input <input formControlName="engineNo" type="text" class="form-control" id="inputPassword4"
formControlName="engineNo" placeholder="Enter Engine number" [ngClass]="{ 'is-invalid': submitted && f.engineNo.errors }" />
type="text" <div *ngIf="submitted && f.engineNo.errors" class="invalid-feedback">
class="form-control"
id="inputPassword4"
placeholder="Enter Engine number"
[ngClass]="{ 'is-invalid': submitted && f.engineNo.errors }"
/>
<div
*ngIf="submitted && f.engineNo.errors"
class="invalid-feedback"
>
<div *ngIf="f.engineNo.errors.required"> <div *ngIf="f.engineNo.errors.required">
Engine No is required Engine No is required
</div> </div>
@ -344,11 +274,7 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputCity">Vehicle Manufacture</label> <label for="inputCity">Vehicle Manufacture</label>
<select <select class="form-control" formControlName="vehicleManufacture" (change)="selectModel($event)">
class="form-control"
formControlName="vehicleManufacture"
(change)="selectModel($event)"
>
<option value="" selected disabled>Choose Manufacturer</option> <option value="" selected disabled>Choose Manufacturer</option>
<option *ngFor="let item of manufacturingData" [value]="item"> <option *ngFor="let item of manufacturingData" [value]="item">
{{ item }} {{ item }}
@ -389,10 +315,7 @@
<label for="inputState">Device Model</label><span>*</span> <label for="inputState">Device Model</label><span>*</span>
<div> <div>
<select formControlName="deviceModel" class="form-control"> <select formControlName="deviceModel" class="form-control">
<option <option *ngFor="let option_1 of device_Model" [value]="option_1._id">
*ngFor="let option_1 of device_Model"
[value]="option_1._id"
>
{{ option_1.modelName }} {{ option_1.modelName }}
</option> </option>
</select> </select>
@ -401,26 +324,14 @@
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputZip">Tracking Expiry</label> <label for="inputZip">Tracking Expiry</label>
<input <input formControlName="trackingExp" bsDatepicker [bsConfig]="bsConfig" type="text" class="form-control"
formControlName="trackingExp" id="inputZip" />
bsDatepicker
[bsConfig]="bsConfig"
type="text"
class="form-control"
id="inputZip"
/>
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputZip">E sim Expiry</label> <label for="inputZip">E sim Expiry</label>
<input <input formControlName="eSimExpiry" bsDatepicker [bsConfig]="bsConfig" type="text" class="form-control"
formControlName="eSimExpiry" id="inputZip" />
bsDatepicker
[bsConfig]="bsConfig"
type="text"
class="form-control"
id="inputZip"
/>
</div> </div>
</div> </div>
@ -430,10 +341,7 @@
<h6><b>Remark : </b>{{ deviceData.remark }}</h6> <h6><b>Remark : </b>{{ deviceData.remark }}</h6>
</div> </div>
<hr /> <hr />
<div <div style="overflow: auto; overflow-x: hidden; min-height: 200px" [ngClass]="{ rowHeight: docRow }">
style="overflow: auto; overflow-x: hidden; min-height: 200px"
[ngClass]="{ rowHeight: docRow }"
>
<div class="row" *ngFor="let data of imageuploadObject; let i = index"> <div class="row" *ngFor="let data of imageuploadObject; let i = index">
<div class="col-sm-6" style="padding-top: 8px"> <div class="col-sm-6" style="padding-top: 8px">
<div class="row"> <div class="row">
@ -441,31 +349,28 @@
<span>{{ data.doctype }} : </span> <span>{{ data.doctype }} : </span>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<input <input type="text" [(ngModel)]="data.phone" placeholder="{{ 'Doc number' | translate }}" />
type="text"
[(ngModel)]="data.phone"
placeholder="{{ 'Doc number' | translate }}"
/>
</div> </div>
<div>
<img <div *ngIf="!data.image.toLowerCase().endsWith('.pdf')">
*ngIf="data.image" <img *ngIf="data.image" style="width: 50px" [src]="'https://www.oneqlik.in' + data.image.substring(6)"
style="width: 50px" (click)="openModal(template, data)" />
[src]="'https://www.oneqlik.in' + data.image.substring(6)"
(click)="openModal(template, data)"
/>
</div> </div>
<div *ngIf="data.image.toLowerCase().endsWith('.pdf')">
<h3>
<a [href]="'https://www.oneqlik.in' + data.image.substring(6)" target="_blank">
<i style="width: 50px" class="fa fa-file-pdf"></i>
</a>
</h3>
</div>
<!-- You can customize this part based on your requirements -->
</div> </div>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<span <span><input type="file" class="btn btn btn-success" style="background: #f1f1f1; border: none; color: black"
><input (change)="onFileChanged($event, i)" /></span>
type="file"
class="btn btn btn-success"
style="background: #f1f1f1; border: none; color: black"
(change)="onFileChanged($event, i)"
/></span>
<!-- <span> <!-- <span>
<button class="btn btn btn-success" (click)="onUpload(i)"> <button class="btn btn btn-success" (click)="onUpload(i)">
{{ uploadStatus }} {{ uploadStatus }}
@ -476,56 +381,35 @@
</div> </div>
<div class="accordion" id="accordionExample"> <div class="accordion" id="accordionExample">
<div <div class="card" style="margin-left: 61px; margin-top: 23px; margin-right: 151px">
class="card"
style="margin-left: 61px; margin-top: 23px; margin-right: 151px"
>
<div class="card-header" id="headingOne"> <div class="card-header" id="headingOne">
<h2 class="mb-0"> <h2 class="mb-0">
<button <button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapseOne"
class="btn btn-link" aria-expanded="true" aria-controls="collapseOne">
type="button"
data-toggle="collapse"
data-target="#collapseOne"
aria-expanded="true"
aria-controls="collapseOne"
>
Upload Device Image Upload Device Image
</button> </button>
</h2> </h2>
</div> </div>
<div <div id="collapseOne" class="collapse collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
id="collapseOne"
class="collapse collapse"
aria-labelledby="headingOne"
data-parent="#accordionExample"
>
<div class="card-body"> <div class="card-body">
<div class="row"> <div class="row">
<div class="col-md-2"> <div class="col-md-2">
<span>Device Image 1: </span> <span>Device Image 1: </span>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<img <img *ngIf="deviceImg[0]" style="width: 50px"
*ngIf="deviceImg[0]"
style="width: 50px"
[src]="'https://www.oneqlik.in' + deviceImg[0].substring(6)" [src]="'https://www.oneqlik.in' + deviceImg[0].substring(6)"
(click)="openModal(template, deviceImg[0])" (click)="openModal1(template, deviceImg[0])" />
/>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<input <input style="
style="
background: #ececec; background: #ececec;
width: 80%; width: 80%;
margin-left: 5px; margin-left: 5px;
border: 1px solid #c1c1c1; border: 1px solid #c1c1c1;
" " type="file" (change)="onDeviceImageChanged($event, 0)" />
type="file"
(change)="onDeviceImageChanged($event, 0)"
/>
</div> </div>
<!-- <div class="col-md-4"> <!-- <div class="col-md-4">
@ -549,24 +433,17 @@
<span>Device Image 2: </span> <span>Device Image 2: </span>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<img <img *ngIf="deviceImg[1]" style="width: 50px"
*ngIf="deviceImg[1]"
style="width: 50px"
[src]="'https://www.oneqlik.in' + deviceImg[1].substring(6)" [src]="'https://www.oneqlik.in' + deviceImg[1].substring(6)"
(click)="openModal(template, deviceImg[1])" (click)="openModal1(template, deviceImg[1])" />
/>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<input <input style="
style="
background: #ececec; background: #ececec;
width: 80%; width: 80%;
margin-left: 5px; margin-left: 5px;
border: 1px solid #c1c1c1; border: 1px solid #c1c1c1;
" " type="file" (change)="onDeviceImageChanged($event, 1)" />
type="file"
(change)="onDeviceImageChanged($event, 1)"
/>
</div> </div>
<!-- <div class="col-md-4"> <!-- <div class="col-md-4">
@ -590,24 +467,17 @@
<span>Device Image 3: </span> <span>Device Image 3: </span>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<img <img *ngIf="deviceImg[2]" style="width: 50px"
*ngIf="deviceImg[2]"
style="width: 50px"
[src]="'https://www.oneqlik.in' + deviceImg[2].substring(6)" [src]="'https://www.oneqlik.in' + deviceImg[2].substring(6)"
(click)="openModal(template, deviceImg[2])" (click)="openModal1(template, deviceImg[2])" />
/>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<input <input style="
style="
background: #ececec; background: #ececec;
width: 80%; width: 80%;
margin-left: 5px; margin-left: 5px;
border: 1px solid #c1c1c1; border: 1px solid #c1c1c1;
" " type="file" (change)="onDeviceImageChanged($event, 2)" />
type="file"
(change)="onDeviceImageChanged($event, 2)"
/>
</div> </div>
<!-- <div class="col-md-4"> <!-- <div class="col-md-4">
@ -642,12 +512,7 @@
<ng-template #template> <ng-template #template>
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title pull-left">{{ docName }}</h4> <h4 class="modal-title pull-left">{{ docName }}</h4>
<button <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">
type="button"
class="close pull-right"
aria-label="Close"
(click)="modalRef.hide()"
>
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>

File diff suppressed because it is too large Load diff

View file

@ -1,49 +1,48 @@
<md-dialog-content class="md-typography"> <md-dialog-content class="md-typography">
<table id="testPdf" style="font-weight: 600;"> <table id="testPdf" style="font-weight: 600" class="src_app_dashboard_view-certificate_view-certificate.component.html">
<tr> <tr>
<td> <td>
<div *ngIf="supAdmin.imageDoc"> <div *ngIf="supAdmin.imageDoc">
<img src="{{supAdmin.imageDoc}}" width="100px" height="100px"> <img src="{{ supAdmin.imageDoc }}" width="100px" height="100px" />
</div> </div>
</td> </td>
<td style="text-align: center;font-weight: 700"> <td style="text-align: center; font-weight: 700">
<span *ngIf="supAdmin"> <span *ngIf="supAdmin">
{{ supAdmin.first_name ? supAdmin.first_name : "" }}
{{supAdmin.first_name?supAdmin.first_name:""}} {{supAdmin.last_name?supAdmin.last_name:""}}<br><br> {{ supAdmin.last_name ? supAdmin.last_name : "" }}<br /><br />
{{supAdmin.address?supAdmin.address:""}}<br><br> {{ supAdmin.address ? supAdmin.address : "" }}<br /><br />
CERTIFICATE OF INSTALLATION<br> CERTIFICATE OF INSTALLATION<br />
</span> </span>
<span *ngIf="!supAdmin"> <span *ngIf="!supAdmin">
{{devicetype}} GPS DEVICE<br> {{ devicetype }} GPS DEVICE<br />
(AIS-140 COMPLIANT)<br> (AIS-140 COMPLIANT)<br />
INSTALLATION/FITMENT CERTIFICATE<br> INSTALLATION/FITMENT CERTIFICATE<br />
{{companyName}}<br> {{ companyName }}<br />
{{companyAddress}} {{ companyAddress }}
</span> </span>
</td> </td>
<td style="text-align:center"> <td style="text-align: center">
<div> <div>
<img src="{{imgURL}}" width="100px" height="150px"> <img src="{{ imgURL }}" width="100px" height="150px" />
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="3"> <td colspan="3">
<h6 style="font-size:18px;">Vehicle Details :-</h6> <h6 style="font-size: 18px">Vehicle Details :-</h6>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="2">
Name of Owner : {{userName}}<br> Name of Owner : {{ userName }}<br />
Registration Number. : {{devName}}<br> Registration Number. : {{ devName }}<br />
Chassis no. : {{ChassisNo}}<br> Chassis no. : {{ ChassisNo }}<br />
Engine no. : {{engineNo}}<br> Engine no. : {{ engineNo }}<br />
</td> </td>
<td> <td>
Vehicle Make : {{manufacturingCompany}}<br> Vehicle Make : {{ manufacturingCompany }}<br />
Vehicle Model : {{typeOfVehicle}}<br> Vehicle Model : {{ typeOfVehicle }}<br />
</td> </td>
<!-- <td> <!-- <td>
Registration Date : {{vehicleRegDate | date:'dd-MM-yyyy'}}<br> Registration Date : {{vehicleRegDate | date:'dd-MM-yyyy'}}<br>
@ -52,85 +51,92 @@
</tr> </tr>
<tr> <tr>
<td colspan="3"> <td colspan="3">
<h6 style="font-size:18px;margin: 20px 0 10px 0px;">GPS DEVICE DETAILS : - </h6> <h6 style="font-size: 18px; margin: 20px 0 10px 0px">
GPS DEVICE DETAILS : -
</h6>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="2">
Device Model : {{devicetype}}<br> Device Model : {{ devicetype }}<br />
IMEI Number : {{devID}}<br> IMEI Number : {{ devID }}<br />
UID Number : {{uniqueID}}<br> UID Number : {{ uniqueID }}<br />
</td> </td>
<td> <td>
Invoice Number : <br> Invoice Number : <br />
Vehicle Model : {{typeOfVehicle}}<br> Vehicle Model : {{ typeOfVehicle }}<br />
ICCID Number: {{ICCICD}} ICCID Number: {{ ICCICD }}
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="3"> <td colspan="3">
<h6 style="font-size:18px;margin: 20px 0 10px 0px;">INSTALLATION DETAILS : - </h6> <h6 style="font-size: 18px; margin: 20px 0 10px 0px">
INSTALLATION DETAILS : -
</h6>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="2">
Dealer Name : {{dealerName}}<br> Dealer Name : {{ dealerName }}<br />
Dealer Address : {{dealerAddress}}<br> Dealer Address : {{ dealerAddress }}<br />
RTO Certificate No : <br> RTO Certificate No : <br />
Installation Date : {{installationDate | date:'dd-MM-yyyy'}}<br> Installation Date : {{ installationDate | date : "dd-MM-yyyy" }}<br />
</td>
<td>
Mobile No : {{user.phone?user.phone:""}}
</td> </td>
<td>Mobile No : {{ user.phone ? user.phone : "" }}</td>
</tr> </tr>
<tr style="padding-top: 10px;"> <tr style="padding-top: 10px">
<!-- <td colspan="3"> <!-- <td colspan="3">
<h6 style="font-size:18px;margin: 20px 0 10px 0px;">Fitment Images :- </h6> <h6 style="font-size:18px;margin: 20px 0 10px 0px;">Fitment Images :- </h6>
</td> --> </td> -->
<!-- {{deviceImage |json}} --> <!-- {{deviceImage |json}} -->
<td *ngIf="deviceImage.length && deviceImage[0]"> <td *ngIf="deviceImage.length && deviceImage[0]">
<img src="{{deviceImage[0]}}" width="90px" height="90px"> <img src="{{ deviceImage[0] }}" width="90px" height="90px" />
</td> </td>
<td *ngIf="deviceImage.length && deviceImage[1]"> <td *ngIf="deviceImage.length && deviceImage[1]">
<img src="{{deviceImage[1]}}" width="90px" height="90px"> <img src="{{ deviceImage[1] }}" width="90px" height="90px" />
</td> </td>
<td *ngIf="deviceImage.length && deviceImage[2]"> <td *ngIf="deviceImage.length && deviceImage[2]">
<img src="{{deviceImage[2]}}" width="90px" height="90px"> <img src="{{ deviceImage[2] }}" width="90px" height="90px" />
</td> </td>
</tr> </tr>
<tr> <tr>
This installation certificate is valid till date {{data.deviceInfo.expiration_date?(data.deviceInfo.expiration_date | date:'dd-MM-yyyy') :""}} This installation certificate is valid till date
{{
data.deviceInfo.expiration_date
? (data.deviceInfo.expiration_date | date : "dd-MM-yyyy")
: ""
}}
</tr> </tr>
<tr style="padding-top: 10px;"> <tr style="padding-top: 10px">
<td colspan="2"> <td colspan="2">Dealer Stamp</td>
Dealer Stamp <td>Authorised Signature</td>
</td>
<td>
Authorised Signature
</td>
</tr> </tr>
<tr> <tr>
<td colspan="3"> <td colspan="3">
<h6 style="font-size:18px;margin: 20px 0 10px 0px;">PRODUCT SATISFACTION REPORT : - </h6> <h6 style="font-size: 18px; margin: 20px 0 10px 0px">
PRODUCT SATISFACTION REPORT : -
</h6>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="3" style="text-align:center;margin-top: 10px"> <td colspan="3" style="text-align: center; margin-top: 10px">
This is to Acknowledge and confirm that we have fitted our vehicle with above vehicle location tracking unit. This is to Acknowledge and confirm that we have fitted our vehicle with
We have checked the performance of the vehicle after fitment and we confirm VLTD is functioning as per norms above vehicle location tracking unit. We have checked the performance of
listed out in AIS-140 standards and other guidelines of MoRTH and other government departments. We are also the vehicle after fitment and we confirm VLTD is functioning as per
satisfied with the performance of the device in all respect. We undertake not to raise any dispute or any legal norms listed out in AIS-140 standards and other guidelines of MoRTH and
claims against Airotrack in the event that the above mentioned function are found broken/torn/tampered hereafter. other government departments. We are also satisfied with the performance
I also understand that telecom network connectivity doesn't come under the scope of Airotrack and will not raise of the device in all respect. We undertake not to raise any dispute or
any claim or disputes with respect to issues arising with low or no network coverage. any legal claims against Airotrack in the event that the above mentioned
function are found broken/torn/tampered hereafter. I also understand
that telecom network connectivity doesn't come under the scope of
Airotrack and will not raise any claim or disputes with respect to
issues arising with low or no network coverage.
</td> </td>
</tr> </tr>
</table> </table>
</md-dialog-content> </md-dialog-content>
<md-dialog-actions align="end"> <md-dialog-actions align="end">
<button md-button md-dialog-close>Cancel</button> <button md-button md-dialog-close>Cancel</button>

View file

@ -1,25 +1,31 @@
import { environment } from './../environments/environment'; import { environment } from "./../environments/environment";
import { Injectable } from '@angular/core'; import { Injectable } from "@angular/core";
import { ContactService } from './contact.service'; import { ContactService } from "./contact.service";
import * as io from 'socket.io-client'; import * as io from "socket.io-client";
import { Params,Router, ActivatedRoute, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; import {
import{Http, Headers} from '@angular/http'; Params,
import 'rxjs/add/operator/map'; Router,
ActivatedRoute,
CanActivate,
ActivatedRouteSnapshot,
RouterStateSnapshot,
} from "@angular/router";
import { Http, Headers } from "@angular/http";
import "rxjs/add/operator/map";
@Injectable() @Injectable()
export class DatainjectionService { export class DatainjectionService {
socketConnection= false; socketConnection = false;
devicess:any; devicess: any;
final:any=null; final: any = null;
userID:any; userID: any;
fs:any; fs: any;
ls:any; ls: any;
or:any; or: any;
emailid:any; emailid: any;
useridd:any; useridd: any;
custtype:any; custtype: any;
cust:boolean = false; cust: boolean = false;
dev_url = environment.hostUrl; dev_url = environment.hostUrl;
@ -27,25 +33,51 @@ export class DatainjectionService {
// socketUrl= environment.socket5000; // socketUrl= environment.socket5000;
mb: any; mb: any;
socket_gps: any; socket_5000: any; socket_notifIO: any; socket_gps: any;
getSocket_gps(){ socket_5000: any;
socket_notifIO: any;
getSocket_gps() {
debugger;
return this.socket_gps; return this.socket_gps;
} }
getSocket_5000(){ getSocket_5000() {
return this.socket_5000 return this.socket_5000;
} }
getSocket_notifIO(){ getSocket_notifIO() {
return this.socket_notifIO; return this.socket_notifIO;
} }
constructor(private contactService: ContactService, private activatedRoute: ActivatedRoute, private http: Http,private router:Router) { db_notification: any = null;
get_db_notification(k: any) {
console.log("get=>", this.db_notification[k]);
return this.db_notification[k];
}
set_db_notification(k: any, v: any) {
console.log("set_db_notification=>", k, v);
this.db_notification[k] = v;
return this.db_notification[k];
}
constructor(
private contactService: ContactService,
private activatedRoute: ActivatedRoute,
private http: Http,
private router: Router
) {
// alert('ata injection constructor') // alert('ata injection constructor')
this.getConnection(); this.getConnection();
if (window.localStorage.currentuser) {
this.useridd = window.localStorage.currentuser;
// this.socket_gps = io.connect('https://socket.oneqlik.in' +'/gps', { debugger;
// secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false this.socket_gps = io.connect(
// }); "https://soc.oneqlik.in" + "/gps?userId=" + this.useridd,
{
secure: true,
rejectUnauthorized: false,
transports: ["websocket", "polling"],
upgrade: false,
}
);
}
// this.socket_5000 = io.connect('https://socket.oneqlik.in', { // this.socket_5000 = io.connect('https://socket.oneqlik.in', {
// secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false // secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false
@ -56,8 +88,6 @@ export class DatainjectionService {
// }); // });
// https://server2.oneqlik.in/ // https://server2.oneqlik.in/
} }
closeConnection() { closeConnection() {
// this.socket_notifIO.removeAllListeners(); // this.socket_notifIO.removeAllListeners();
@ -72,23 +102,28 @@ export class DatainjectionService {
this.socket_gps.close(); this.socket_gps.close();
this.socket_5000.close(); this.socket_5000.close();
} catch (error) { } catch (error) {
console.log('Connection Close',error) console.log("Connection Close", error);
} }
} }
refreshConnection() { refreshConnection() {
if (!this.socketConnection) { if (!this.socketConnection) {
this.getConnection(); this.getConnection();
} }
} }
setGPSConnection() { setGPSConnection() {
if (window.localStorage.currentuser) { if (window.localStorage.currentuser) {
//this.socketConnection = true; //this.socketConnection = true;
this.useridd = window.localStorage.currentuser; this.useridd = window.localStorage.currentuser;
this.socket_gps = io.connect('https://soc.oneqlik.in' + '/gps?userId=' + this.useridd, { this.socket_gps = io.connect(
secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false "https://soc.oneqlik.in" + "/gps?userId=" + this.useridd,
}); {
secure: true,
rejectUnauthorized: false,
transports: ["websocket", "polling"],
upgrade: false,
}
);
} }
} }
removedGPSConnection() { removedGPSConnection() {
@ -98,106 +133,203 @@ export class DatainjectionService {
if (window.localStorage.currentuser) { if (window.localStorage.currentuser) {
this.socketConnection = true; this.socketConnection = true;
this.useridd = window.localStorage.currentuser; this.useridd = window.localStorage.currentuser;
this.socket_notifIO = io.connect('https://soc.oneqlik.in' + '/notifIOV2?userId=' + this.useridd, { this.socket_notifIO = io.connect(
secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false "https://soc.oneqlik.in" + "/notifIOV2?userId=" + this.useridd,
}); {
secure: true,
rejectUnauthorized: false,
transports: ["websocket", "polling"],
upgrade: false,
}
);
//this.setGPSConnection(); //this.setGPSConnection();
this.socket_5000 = io.connect('https://soc.oneqlik.in?userId=' + this.useridd, { this.socket_5000 = io.connect(
secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false "https://soc.oneqlik.in?userId=" + this.useridd,
}); {
secure: true,
rejectUnauthorized: false,
transports: ["websocket", "polling"],
upgrade: false,
}
);
} }
if (window.localStorage.custumer_token) { if (window.localStorage.custumer_token) {
this.fs = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).fn; this.fs = JSON.parse(
this.ls = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).ln; window.atob(window.localStorage.custumer_token.split(".")[1])
this.emailid = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).email; ).fn;
this.or = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1]))._orgName; this.ls = JSON.parse(
this.useridd = JSON.parse(window.atob(window.localStorage.custumer_token.split('.')[1]))._id; window.atob(window.localStorage.custumer_token.split(".")[1])
this.mb = JSON.parse(window.atob(window.localStorage.custumer_token.split('.')[1])).phn; ).ln;
this.custtype = JSON.parse(window.atob(window.localStorage.custumer_token.split('.')[1])).isDealer; this.emailid = JSON.parse(
window.atob(window.localStorage.custumer_token.split(".")[1])
).email;
this.or = JSON.parse(
window.atob(window.localStorage.custumer_token.split(".")[1])
)._orgName;
this.useridd = JSON.parse(
window.atob(window.localStorage.custumer_token.split(".")[1])
)._id;
this.mb = JSON.parse(
window.atob(window.localStorage.custumer_token.split(".")[1])
).phn;
this.custtype = JSON.parse(
window.atob(window.localStorage.custumer_token.split(".")[1])
).isDealer;
if (this.custtype == true) { if (this.custtype == true) {
this.cust = true; this.cust = true;
} }
if (this.mb.charAt(0) == "n") { if (this.mb.charAt(0) == "n") {
this.mb = ' ' this.mb = " ";
} }
} } else {
else { var url = this.router.url.substring(0, 12);
var url = (this.router.url).substring(0, 12);
console.log(url); console.log(url);
if (url == "/ViewVehicle") { if (url == "/ViewVehicle") {
} else { } else {
if (window.localStorage.token) { if (window.localStorage.token) {
this.fs = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).fn; this.fs = JSON.parse(
this.ls = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).ln; window.atob(window.localStorage.token.split(".")[1])
this.emailid = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).email; ).fn;
this.or = JSON.parse(window.atob(window.localStorage.token.split(".")[1]))._orgName; this.ls = JSON.parse(
this.useridd = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id; window.atob(window.localStorage.token.split(".")[1])
this.mb = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).phn; ).ln;
this.custtype = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).isDealer; this.emailid = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
).email;
this.or = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
)._orgName;
this.useridd = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
)._id;
this.mb = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
).phn;
this.custtype = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
).isDealer;
if (this.custtype == true) { if (this.custtype == true) {
this.cust = true; this.cust = true;
} }
if (this.mb.charAt(0) == "n") { if (this.mb.charAt(0) == "n") {
this.mb = ' ' this.mb = " ";
} }
} }
}
} }
} }
getDevice(emailid,id) { }
return this.http.get(this.dev_url + "/devices/getDeviceByUser?email="+emailid+'&id='+id) getDevice(emailid, id) {
.map(data => { console.log(
"dbnew=>",
Math.random()
.toString(36)
.substring(2, 10 + 2)
);
return this.http
.get(
this.dev_url + "/devices/getDeviceByUser?email=" + emailid + "&id=" + id
)
.map((data) => {
data.json(); data.json();
var devices = data.json().devices; var devices = data.json().devices;
/* console.log("Devices: ",temp); */ /* console.log("Devices: ",temp); */
return data.json(); return data.json();
}); });
} }
getData(e,u,g,s,l,input,supadm,dealer){ // getData(e, u, g, s, l, input, supadm, dealer) {
// console.log(
// "dbnew=>",
// Math.random()
// .toString(36)
// .substring(2, 10 + 2)
// );
// if (input && input != "undefined") {
// s = 0;
// }
// var url =
// this.dev_url +
// "/devices/getDeviceByUser?email=" +
// e +
// "&id=" +
// u +
// "&skip=" +
// s +
// "&limit=" +
// l;
// if (input && input != "undefined") {
// url += "&search=" + input;
// }
// console.log(url);
// if (supadm) url += "&supAdmin=" + supadm;
// if (dealer) url += "&dealer=" + dealer;
// if (g) url += "&group=" + g;
// return this.http.get(url).map((data) => {
// data.json();
if(input && input!='undefined'){ // var devices = data.json().devices;
s=0; // /* console.log("Devices: ",temp); */
// return data.json();
// });
// }
getData1(e, u, g, s, l, input, supadm, dealer) {
if (input && input != "undefined") {
s = 0;
} }
var url = this.dev_url + "/devices/getDeviceByUser?email="+e+'&id='+u+'&skip='+s+"&limit="+l; console.log("superAdmin=>", supadm);
if(input && input!="undefined"){ let dash = "dashboard";
url+= "&search="+input; let path: any =
JSON.parse(atob(localStorage.token.split(".")[1])).isOrganisation == true
? "/devices/getDeviceByUserOrg?id="
: "/devices/getDeviceByUser?id=";
var url =
this.dev_url +
path +
u +
"&email=" +
e +
"&skip=" +
s +
"&limit=" +
l +
"&statuss=";
if (input && input != "undefined") {
url += "&search=" + input;
} }
console.log(url)
if(supadm) // if (g) url += "&group=" + g + "&queryType=" + dash;
url+= '&supAdmin=' + supadm; // if (supadm) url += "&supAdmin=" + supadm + "&queryType=" + dash;
if(dealer) // if (dealer) url += "&dealer=" + dealer + "&queryType=" + dash;
url+= '&dealer=' + dealer; if (g) {
if(g)
url += "&group=" + g; url += "&group=" + g;
return this.http.get(url)
.map(data => {
data.json();
var devices = data.json().devices;
/* console.log("Devices: ",temp); */
return data.json();
});
} }
getGroupData(e,u){
return this.http.get(this.dev_url + "/devices/getVehiclesUnderGroup?userid="+u)
.map(data => {
if (supadm) {
url += "&supAdmin=" + supadm;
}
if (dealer) {
url += "&dealer=" + dealer;
}
// Add queryType parameter
url += "&queryType=" + dash;
// Example URL:
// https://www.oneqlik.in/devices/getDeviceByUser?id=656d862b8d3eadc1b12ed73f&email=no_email391683@testmail.com&skip=0&limit=100&statuss=&dealer=656d862b8d3eadc1b12ed73f&queryType=dashboard
return this.http.get(url).map((res) => res.json());
}
getGroupData(e, u) {
return this.http
.get(this.dev_url + "/devices/getVehiclesUnderGroup?userid=" + u)
.map((data) => {
data.json(); data.json();
return data.json(); return data.json();
}); });
} }
} }

View file

@ -0,0 +1,854 @@
<app-all-menus></app-all-menus>
<!--
(ngSubmit)="submit()"
-->
<div class="container-fluid" style="padding-top: 52px">
<form [formGroup]="deviceForm">
<div class="row">
<!-- <div class="col-md-6 col-lg-6 col-sm-12 col-12">
<div class="form-group col-md-4">
<label for="inputCity">Dealer Followup Mobile</label> <span>*</span>
<input
formControlName="dealerFollowup"
type="text"
class="form-control"
id="inputCity"
[ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }"
/>
<div
*ngIf="submitted && f.dealerFollowup.errors"
class="invalid-feedback"
>
<div *ngIf="f.dealerFollowup.errors.required">
Dealer Followup is required
</div>
<div *ngIf="f.dealerFollowup.errors.pattern">
Please Enter Valid number
</div>
</div>
</div>
</div> -->
<div class="col-md-6 col-lg-6 col-sm-12 col-12">
<div class="card shadow-sm mt-3">
<div class="card-header p-2" style="font-weight: 600; background: #efefef"
(click)="pg_sh.tab101 = !pg_sh.tab101">
<i class="fa-solid" [ngClass]="{
'fa-chevron-down': pg_sh.tab120 == true,
'fa-chevron-right': pg_sh.tab120 == false
}"></i>
Dealership
</div>
<div class="card-body" [ngClass]="{ 'd-none': pg_sh.tab120 == false }">
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Follow-up No<span
class="text-danger"> * </span></label>
<div class="col-sm-8 col-8">
<input formControlName="dealerFollowup" type="text" class="form-control form-control-sm"
id="inputEmail4" placeholder="Enter Follow-up No" [ngClass]="{
'is-invalid': submitted && f.dealerFollowup.errors
}" />
<div *ngIf="submitted && f.dealerFollowup.errors" class="invalid-feedback">
<div *ngIf="f.dealerFollowup.errors.required">
Follow-up No is required
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card shadow-sm mt-3">
<div class="card-header p-2" style="font-weight: 600; background: #efefef"
(click)="pg_sh.tab101 = !pg_sh.tab101">
<i class="fa-solid" [ngClass]="{
'fa-chevron-down': pg_sh.tab101 == true,
'fa-chevron-right': pg_sh.tab101 == false
}"></i>
Customer Detail
</div>
<div class="card-body" [ngClass]="{ 'd-none': pg_sh.tab101 == false }">
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Customer Type<span
class="text-danger"> * </span></label>
<div class="col-sm-8 col-8">
<select class="form-control form-control-sm" name="customerType" id="customerType"
formControlName="customerType">
<option value="">Select Customer Type</option>
<option value="Individual">Customer Individual</option>
<option value="Firm">Customer Firm</option>
</select>
</div>
</div>
<!-- end Customer Type -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Mobile No.
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<input (input)="onSearchChange($event.target.value)" formControlName="contactNo" type="text"
class="form-control form-control-sm" id="inputPassword4" placeholder="Enter Contact number"
[ngClass]="{ 'is-invalid': submitted && f.contactNo.errors }" />
<small [class.d-none]="!contactMessage">{{
contactMessage
}}</small>
<div *ngIf="submitted && f.contactNo.errors" class="invalid-feedback">
<div *ngIf="f.contactNo.errors.required">
Contact Number is required
</div>
<div *ngIf="f.contactNo.errors.pattern">
Please enter valid Mobile No.
</div>
</div>
</div>
</div>
<!-- Mobile No. end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Customer Name<span
class="text-danger"> * </span></label>
<div class="col-sm-8 col-8">
<input formControlName="first_name" type="text" class="form-control form-control-sm" id="inputEmail4"
placeholder="Enter First Name" [ngClass]="{ 'is-invalid': submitted && f.first_name.errors }" />
<div *ngIf="submitted && f.first_name.errors" class="invalid-feedback">
<div *ngIf="f.first_name.errors.required">
Customer Name is required
</div>
<div *ngIf="f.first_name.errors.pattern">
Please enter valid Customer Name
</div>
</div>
</div>
</div>
<!-- Customer Name end -->
<div class="form-group row mb-0" *ngIf="deviceForm.value.customerType != 'Individual'">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Custodian Name</label>
<div class="col-sm-8 col-8">
<input formControlName="last_name" type="text" class="form-control form-control-sm" id="inputEmail4"
placeholder="Enter Custodian Name" [ngClass]="{ 'is-invalid': submitted && f.last_name.errors }" />
<div *ngIf="submitted && f.last_name.errors" class="invalid-feedback">
<div *ngIf="f.last_name.errors.pattern">
Please enter valid Custodian Name
</div>
</div>
</div>
</div>
<!-- Custodian Name end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Email ID</label>
<div class="col-sm-8 col-8">
<input formControlName="email" type="text" class="form-control form-control-sm" id="inputCity"
placeholder="Please Enter Email" />
</div>
</div>
<!-- Email ID end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Address
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<input formControlName="address" placeholder="Enter Address" type="text"
class="form-control form-control-sm" id="old_address" [ngClass]="{
'is-invalid': submitted && f.address.errors
}" />
<div *ngIf="submitted && f.address.errors" class="invalid-feedback">
<div *ngIf="f.address.errors.required">
Address is required
</div>
</div>
</div>
</div>
<!-- Address end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">State
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<select formControlName="customer_state" (change)="newonStateChange($event)" id="inputState173"
class="form-control form-control-sm">
<option value="" selected disabled>Choose state</option>
<option *ngFor="let item of db_state_city_list" [value]="item.state">
{{ item.state }}
</option>
</select>
<div *ngIf="submitted && f.customer_state.errors" class="text-danger">
<div *ngIf="f.customer_state.errors.required">
State is required
</div>
</div>
</div>
</div>
<!-- state end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">City
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<!-- (change)="onCityChange($event)" -->
<select formControlName="customer_city" id="inputState204" class="form-control form-control-sm">
<option value="" selected>Choose City</option>
<option *ngFor="let item of newcityList" [value]="item">
{{ item }}
</option>
</select>
<div *ngIf="submitted && f.customer_city.errors" class="text-danger">
<div *ngIf="f.customer_city.errors.required">
City is required
</div>
</div>
</div>
</div>
<!-- city end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Pin Code <span
class="text-danger"> * </span></label>
<div class="col-sm-8 col-8">
<input type="text" placeholder="Enter Pin Code" formControlName="customer_pin"
class="form-control form-control-sm" id="customer_pin" [ngClass]="{
'is-invalid': submitted && f.customer_pin.errors
}" />
<div *ngIf="submitted && f.customer_pin.errors" class="invalid-feedback">
<div *ngIf="f.customer_pin.errors.required">
Pin Code is required
</div>
<div *ngIf="f.customer_pin.errors.pattern">
Please Enter valid Pin code
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end card -->
<div class="card shadow-sm mt-3">
<div class="card-header p-2" style="font-weight: 600; background: #efefef"
(click)="pg_sh.tab102 = !pg_sh.tab102">
<i class="fa-solid" [ngClass]="{
'fa-chevron-down': pg_sh.tab102 == true,
'fa-chevron-right': pg_sh.tab102 == false
}"></i>
Vehicle Detail
</div>
<div class="card-body" [ngClass]="{ 'd-none': pg_sh.tab102 == false }">
<!-- body start -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Manufacturer</label>
<div class="col-sm-8 col-8">
<select class="form-control form-control-sm" formControlName="vehicleManufacture"
(change)="selectModel($event)">
<option value="" selected disabled>
Choose Manufacturer
</option>
<option *ngFor="let item of manufacturingData" [value]="item">
{{ item }}
</option>
</select>
</div>
</div>
<!-- Manufacturer end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Model</label>
<div class="col-sm-8 col-8">
<select class="form-control form-control-sm" formControlName="model">
<option value="" selected disabled>Choose Model</option>
<option *ngFor="let item of modelData" [value]="item.ModelName">
{{ item.ModelName }}
</option>
</select>
</div>
</div>
<!-- Model end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Chassis No.
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<input formControlName="chasisNo" type="text" class="form-control form-control-sm" id="inputEmail4"
placeholder="Enter Chasis No." [ngClass]="{ 'is-invalid': submitted && f.chasisNo.errors }" />
<div *ngIf="submitted && f.chasisNo.errors" class="invalid-feedback">
<div *ngIf="f.chasisNo.errors.required">
Chassis No is required
</div>
</div>
</div>
</div>
<!-- Chassis No. end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Engine No<span
class="text-danger"> * </span></label>
<div class="col-sm-8 col-8">
<input formControlName="engineNo" type="text" class="form-control form-control-sm" id="inputPassword4"
placeholder="Enter Engine number" [ngClass]="{ 'is-invalid': submitted && f.engineNo.errors }" />
<div *ngIf="submitted && f.engineNo.errors" class="invalid-feedback">
<div *ngIf="f.engineNo.errors.required">
Engine No is required
</div>
</div>
</div>
</div>
<!-- Engine No end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Vehicle No
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<input formControlName="vehicleNo" type="text" class="form-control form-control-sm" id="vehicleNo"
placeholder="Enter Vehicle number" [ngClass]="{ 'is-invalid': submitted && f.vehicleNo.errors }" />
<div *ngIf="submitted && f.vehicleNo.errors" class="invalid-feedback">
<div *ngIf="f.vehicleNo.errors.required">
Vehicle number is required
</div>
<div *ngIf="f.vehicleNo.errors.maxLength">
Vehicle number accepts max 10 digits
</div>
</div>
</div>
</div>
<!-- Vehicle No end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Mfd Year
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<select formControlName="mfdyear" class="form-control form-control-sm">
<option [value]="''">Select Mfd Year</option>
<option *ngFor="let year of mfdyear_arr" [value]="year">
{{ year }}
</option>
</select>
<!-- <input
formControlName="mfdyear"
type="text"
class="form-control form-control-sm"
id="inputPassword4"
placeholder="Enter Vehicle number"
[ngClass]="{
'is-invalid': submitted && f.mfdyear.errors
}"
/> -->
<div *ngIf="submitted && f.mfdyear.errors" class="invalid-feedback">
<div *ngIf="f.mfdyear.errors.required">
Mfd Year is required
</div>
<div *ngIf="f.mfdyear.errors.maxLength">Mfd Year Enter</div>
</div>
</div>
</div>
<!-- Mfd Year end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Vehicle Category</label>
<div class="col-sm-8 col-8">
<select formControlName="vehicleCategory" class="form-control form-control-sm">
<option *ngFor="let license of vehicleCat" [value]="license">
{{ license }}
</option>
</select>
</div>
</div>
<!-- Vehicle Category -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Fuel Type</label>
<div class="col-sm-8 col-8">
<select class="form-control form-control-sm" formControlName="fuelType" (change)="selectModel($event)">
<option value="" selected disabled>Choose Fuel Type</option>
<option *ngFor="
let item of [
'Electric',
'PETROL',
'PETROL/HYBRID',
'PETROL/CNG',
'Diesel',
'Diesel/ Hybrid',
'Dual Diesel/ Bio CNG',
'CNG Only',
'Dual Diesel/CNG',
'Dual Diesel/LNG',
'Ethanol',
'Fuel Cell Hydrogen',
'LNG',
'LPG ONLY',
'METHNOL',
'PETROL/ETHANOL',
'PETROL/LPG',
'PETROL/METHANOL',
'SOLAR'
]
" [value]="item">
{{ item }}
</option>
</select>
</div>
</div>
<!-- body end -->
</div>
</div>
<!-- -->
</div>
<!-- end col-6 1st -->
<div class="col-md-6 col-lg-6 col-sm-12 col-12">
<div class="card shadow-sm mt-3">
<div class="card-header p-2" style="font-weight: 600; background: #efefef"
(click)="pg_sh.tab103 = !pg_sh.tab103">
<i class="fa-solid" [ngClass]="{
'fa-chevron-down': pg_sh.tab103 == true,
'fa-chevron-right': pg_sh.tab103 == false
}"></i>
Device Detail
</div>
<div class="card-body" [ngClass]="{ 'd-none': pg_sh.tab103 == false }">
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">IMEI <span class="text-danger">
* </span></label>
<!-- <div
class="col-sm-8 col-8 db_not_inventoryManagement"
*ngIf="!inventoryManagement"
>
<input
formControlName="device_id"
type="text"
(keyup)="removeSpecialChar(deviceData)"
class="form-control form-control-sm"
id="inputIMEI"
[ngClass]="{ 'is-invalid': submitted && f.device_id.errors }"
/>
<div
*ngIf="submitted && f.device_id.errors"
class="text-danger"
>
<div *ngIf="f.device_id.errors.required">
Device Id is required
</div>
</div>
</div>
*ngIf="inventoryManagement"
-->
<div class="col-sm-8 col-8 db_inventoryManagement">
<select formControlName="device_id" id="inventory" (change)="removeSpecialChar(deviceData)">
<option *ngFor="let option_1 of inventory" [value]="option_1.IMEI">
{{ option_1.IMEI }}
</option>
</select>
<div *ngIf="invalidEmeiSelected" style="
margin-top: 0.25rem;
font-size: 0.875rem;
color: #dc3545;
">
This IMEI is already added in system. Please choose different
IMEI
</div>
<div *ngIf="submitted && f.device_id.errors" class="text-danger">
<div *ngIf="f.device_id.errors.required">
Device Id is required
</div>
</div>
</div>
</div>
<!-- IMEI end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">ICCID
</label>
<div class="col-sm-8 col-8">
<input disabled formControlName="iccid" type="text" class="form-control form-control-sm" id="iccid"
placeholder="Enter ICCID No number" />
</div>
</div>
<!-- ICCID end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">M2M Provider</label>
<div class="col-sm-8 col-8">
<input disabled formControlName="m2mprovider" type="text" class="form-control form-control-sm"
id="new_m2mprovider" placeholder="Enter M2M provider No number" />
</div>
</div>
<!-- M2M Provider end-->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">SIM 1
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<input disabled formControlName="sim1" type="text" class="form-control form-control-sm" id="sim1"
placeholder="Enter SIM number" [ngClass]="{ 'is-invalid': submitted && f.sim1.errors }" />
<div *ngIf="submitted && f.sim1.errors" class="invalid-feedback">
<div *ngIf="f.sim1.errors.required">SIM 1 is required</div>
</div>
</div>
</div>
<!-- SIM 1 end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">SIM 1 Operator</label>
<div class="col-sm-8 col-8">
<!-- <input
formControlName="new_sim1operator"
type="text"
class="form-control form-control-sm"
id="new_sim1operator"
placeholder="Enter SIM 1 Operator No number"
/> -->
<select class="form-control form-control-sm" formControlName="sim_provider" disabled>
<option value="" selected>Select</option>
<option *ngFor="let item of ['Airtel', 'Vodafone', 'BSNL']" [value]="item">
{{ item }}
</option>
</select>
</div>
</div>
<!-- SIM 1 Operator end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">SIM 2</label>
<div class="col-sm-8 col-8">
<input disabled formControlName="sim2" type="text" class="form-control form-control-sm" id="sim1"
placeholder="Enter SIM number" />
</div>
</div>
<!-- SIM 2 end-->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">SIM 2 Operator</label>
<div class="col-sm-8 col-8">
<!-- <input
formControlName="new_sim2operator"
type="text"
class="form-control form-control-sm"
id="new_sim2operator"
placeholder="Enter SIM 2 Operator No number"
/> -->
<select disabled class="form-control form-control-sm" formControlName="sim_provider2">
<option value="" selected>Select</option>
<option *ngFor="let item of ['Airtel', 'Vodafone', 'BSNL']" [value]="item">
{{ item }}
</option>
</select>
</div>
</div>
<!-- SIM 2 Operator end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Vahan ID</label>
<div class="col-sm-8 col-8">
<input disabled formControlName="vahanID" type="text" class="form-control form-control-sm" id="vahanID"
placeholder="Enter Vahan ID No number" />
</div>
</div>
<!-- Vahan ID end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Model</label>
<div class="col-sm-8 col-8">
<select id="dbselect" multiple="multiple" disabled>
<option *ngFor="let option_1 of device_Model" [value]="option_1._id">
{{ option_1.modelName }}
</option>
</select>
</div>
</div>
<!-- Model end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">Panic Count</label>
<div class="col-sm-8 col-8">
<select formControlName="panic" class="form-control form-control-sm">
<option value="" selected disabled>
Select Panic Button
</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</div>
</div>
<!-- Panic Count end -->
</div>
</div>
<!-- end 1st card -->
<div class="card shadow-sm mt-3">
<div class="card-header p-2" style="font-weight: 600; background: #efefef"
(click)="pg_sh.tab104 = !pg_sh.tab104">
<i class="fa-solid" [ngClass]="{
'fa-chevron-down': pg_sh.tab104 == true,
'fa-chevron-right': pg_sh.tab104 == false
}"></i>
Vehicle Registration Detail
</div>
<div class="card-body" [ngClass]="{ 'd-none': pg_sh.tab104 == false }">
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">RTO State
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<select formControlName="state" (change)="onStateChange($event)" id="inputState802"
class="form-control form-control-sm">
<option value="" selected disabled>Choose state</option>
<option *ngFor="let item of states" [value]="item">
{{ item }}
</option>
</select>
<div *ngIf="submitted && f.state.errors" class="text-danger">
<div *ngIf="f.state.errors.required">State is required</div>
</div>
</div>
</div>
<!-- RTO State end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">RTO City
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<select formControlName="city" (change)="onCityChange($event)" id="inputState"
class="form-control form-control-sm">
<option value="" selected disabled>Choose City</option>
<option *ngFor="let item of cityList" [value]="item.city">
{{ item.city }}
</option>
</select>
<div *ngIf="submitted && f.city.errors" class="text-danger">
<div *ngIf="f.city.errors.required">City is required</div>
</div>
</div>
</div>
<!-- RTO City end -->
<div class="form-group row mb-0">
<label for="staticEmail" class="col-sm-4 col-4 col-form-label text-right">RTO Name
<span class="text-danger"> * </span>
</label>
<div class="col-sm-8 col-8">
<select formControlName="rtoOffice" id="inputState" class="form-control form-control-sm">
<option value="" selected disabled>Choose RTO</option>
<option *ngFor="let item of RTO" [value]="item.RTO_Name">
{{ item.RTO_Name }}
</option>
</select>
<div *ngIf="submitted && f.rtoOffice.errors" class="text-danger">
<div *ngIf="f.rtoOffice.errors.required">
RTO Name is required
</div>
</div>
</div>
</div>
<!-- RTO Name end -->
<!-- <div class="form-group row mb-0">
<label
for="staticEmail"
class="col-sm-4 col-4 col-form-label text-right"
>Pin Code <span class="text-danger"> * </span></label
>
<div class="col-sm-8 col-8">
<input
formControlName="pin"
type="text"
class="form-control form-control-sm"
id="pin"
[ngClass]="{
'is-invalid': submitted && f.pin.errors
}"
/>
<div *ngIf="submitted && f.pin.errors" class="invalid-feedback">
<div *ngIf="f.pin.errors.required">Pin Code is required</div>
<div *ngIf="f.pin.errors.pattern">
Please Enter valid Pin code
</div>
</div>
</div>
</div> -->
<!-- Pin Code end -->
</div>
</div>
</div>
<!-- -->
</div>
</form>
</div>
<!-- added new -->
<div class="container-fluid" style="padding-top: 52px">
<div class="row">
<div class="col-md6 col-lg-6 col-sm-12 col-12">
<div class="card shadow-sm mt-3">
<div class="card-header p-2" style="font-weight: 600; background: #efefef" (click)="pg_sh.tab3 = !pg_sh.tab3">
<i class="fa-solid" [ngClass]="{
'fa-chevron-down': pg_sh.tab3 == true,
'fa-chevron-right': pg_sh.tab3 == false
}" (click)="db_show(imageuploadObject)"></i>
DOCUMENT UPLOAD
</div>
<div class="card-body" [ngClass]="{ 'd-none': pg_sh.tab3 == false }">
<table class="table table-sm">
<!-- <tr>
<td>Customer Type</td>
<td>
<select
class="form-control form-control-sm"
name=""
id=""
[(ngModel)]="customerType"
>
<option value="">Select Customer Type</option>
<option value="Individual">Customer Individual</option>
<option value="Firm">Customer Firm</option>
</select>
</td>
<td></td>
<td></td>
<td></td>
</tr> -->
<tr *ngFor="let data of imageuploadObject; let i = index">
<td>
{{ data.doctype }}
<span *ngIf="data.req == true" class="text-danger"> * </span>
:
</td>
<td>
<div *ngIf="deviceForm.value.customerType == 'Individual'">
<select class="form-control form-control-sm db_select" [(ngModel)]="data.doctype_type"
*ngIf="data.doctype == 'ID proof'" [attr.data-type]="data.doctype">
<option value="">Select Doc Type</option>
<option value="Aadhar">Aadhar</option>
<option value="Passport">Passport</option>
<option value="Voter_id">Voter ID</option>
<option value="PAN">PAN</option>
<option value="Driving_licence">Driving Licence</option>
</select>
<select class="form-control form-control-sm db_select" [attr.data-type]="data.doctype"
[(ngModel)]="data.doctype_type" *ngIf="data.doctype == 'Address Proof'">
<option value="">Select Doc Type</option>
<option value="Aadhar">Aadhar</option>
<option value="Passport">Passport</option>
<option value="Voter_id">Voter ID</option>
<!-- <option value="PAN">PAN</option> -->
<option value="Driving_licence">Driving Licence</option>
</select>
</div>
<div *ngIf="deviceForm.value.customerType == 'Firm'">
<select class="form-control form-control-sm db_select" [attr.data-type]="data.doctype"
[(ngModel)]="data.drop_type" *ngIf="data.doctype == 'ID proof'">
<option value="">Select Doc Type</option>
<option value="Aadhar">Aadhar</option>
<option value="Passport">Passport</option>
<option value="Voter_id_Front">Voter ID Front</option>
<option value="PAN">PAN</option>
<option value="Driving_licence">Driving Licence</option>
</select>
<select class="form-control form-control-sm db_select" [attr.data-type]="data.doctype"
[(ngModel)]="data.drop_type" *ngIf="data.doctype == 'Address Proof'">
<option value="">Select Doc Type</option>
<option value="udyog_aadhar">Udyog Aadhar</option>
<option value="gst_certificate">GST Certificate</option>
<option value="coi">
Certificate of Incorporation(COI)
</option>
<option value="form16">Form 16(For Govt. Org.)</option>
<!-- <option value="companypancard">Company PAN Card</option> -->
</select>
</div>
<select class="form-control form-control-sm db_select" [attr.data-type]="data.doctype"
[(ngModel)]="data.drop_type" *ngIf="
data.doctype == 'Vehicle Ownership Proof' &&
deviceForm.value.customerType != ''
">
<option value="">Select Doc Type</option>
<option value="vehicle_rc">Vehicle RC</option>
<option value="invoice">Invoice (For new vehicle)</option>
<option value="sell_letter">
Sell letter + invoice (Loan default vehicle sold by bank)
</option>
</select>
</td>
<td>
<input *ngIf="data.isText" type="text" [(ngModel)]="data.phone"
placeholder="{{ 'Doc number' | translate }}" />
</td>
<td>
<!-- <img *ngIf="data.image" style="width: 50px" [src]="'https://www.oneqlik.in' + data.image.substring(6)"
(click)="openModal(template, data)" /> -->
<a *ngIf="data.image" [href]="'https://www.oneqlik.in' + data.image.substring(6)" target="_blank">
{{ showNAME(data.image) }}
</a>
</td>
<td>
<i class="fa-solid fa-upload" (click)="docupclick('doc' + i)"></i>
<input type="file" [id]="'doc' + i" class="btn btn btn-success d-none"
[attr.accept]="DB_TOKEN.organisation == '6110fa23a6221d46dbebc473' ? '.jpeg,.jpg,.png':'*/*'"
style="background: #f1f1f1; border: none; color: black" (change)="onFileChanged($event, i, data)" />
</td>
</tr>
<tr>
<td>Device Photo</td>
<td>
<a *ngIf="deviceImg[0]" [href]="'https://www.oneqlik.in' + deviceImg[0].substring(6)" target="_blank">
{{ showNAME(deviceImg[0]) }}
</a>
</td>
<td></td>
<td></td>
<td>
<i class="fa-solid fa-upload" (click)="docupclick('d_doc1')"></i>
<input class="d-none" id="d_doc1" type="file" (change)="onDeviceImageChanged($event, 0)" [attr.accept]="DB_TOKEN.organisation == '6110fa23a6221d46dbebc473' ? '.jpeg,.jpg,.png':'*/*'"/>
</td>
</tr>
<tr>
<td>Other</td>
<td>
<a *ngIf="deviceImg[1]" [href]="'https://www.oneqlik.in' + deviceImg[1].substring(6)" target="_blank">
{{ showNAME(deviceImg[1]) }}
</a>
</td>
<td></td>
<td></td>
<td>
<i class="fa-solid fa-upload" (click)="docupclick('d_doc2')"></i>
<input class="d-none" id="d_doc2" type="file" (change)="onDeviceImageChanged($event, 1)" [attr.accept]="DB_TOKEN.organisation == '6110fa23a6221d46dbebc473' ? '.jpeg,.jpg,.png':'*/*'"/>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="col-12 text-right">
<button type="submit" class="btn btn-primary mt-2" (click)="submit()">
Add Device
</button>
<!-- <button
type="button"
class="btn btn-primary mt-2"
(click)="db_show(deviceData)"
>
deviceData
</button>
<button
type="button"
class="btn btn-primary mt-2"
(click)="db_show(imageuploadObject)"
>
imageuploadObject
</button>
<button
type="button"
class="btn btn-primary mt-2"
(click)="db_show(deviceForm.value)"
>
deviceForm
</button> -->
</div>
</div>
</div>
<div id="toast">
<div id="desc">{{ data_descip }}</div>
</div>

View file

@ -0,0 +1,58 @@
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
padding-left: 4px;
padding-right: 3px;
}
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 250px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}

View file

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DbEditDeviceComponent } from './db-edit-device.component';
describe('DbEditDeviceComponent', () => {
let component: DbEditDeviceComponent;
let fixture: ComponentFixture<DbEditDeviceComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DbEditDeviceComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DbEditDeviceComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,15 @@
import { TestBed, async, inject } from '@angular/core/testing';
import { DbauthGuard } from './dbauth.guard';
describe('DbauthGuard', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [DbauthGuard]
});
});
it('should ...', inject([DbauthGuard], (guard: DbauthGuard) => {
expect(guard).toBeTruthy();
}));
});

30
src/app/dbauth.guard.ts Normal file
View file

@ -0,0 +1,30 @@
import { Injectable } from "@angular/core";
import {
CanActivate,
ActivatedRouteSnapshot,
RouterStateSnapshot,
} from "@angular/router";
import { Observable } from "rxjs/Observable";
import { Router } from "@angular/router";
@Injectable()
export class DbauthGuard implements CanActivate {
constructor(private router: Router) {}
canActivate(
next: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<boolean> | Promise<boolean> | boolean {
if (
window.location.origin.match(/nipponsecura.in/g) != null &&
state.url == "/add_newDevice"
) {
this.router.navigateByUrl("add_newDevice2");
} else if (
window.location.origin.match(/nipponsecura.in/g) != null &&
state.url == "/editDevice"
) {
this.router.navigateByUrl("db_editDevice");
}
return true;
}
}

View file

@ -0,0 +1,3 @@
<p>
dblive works!
</p>

View file

View file

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DbliveComponent } from './dblive.component';
describe('DbliveComponent', () => {
let component: DbliveComponent;
let fixture: ComponentFixture<DbliveComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DbliveComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DbliveComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-dblive',
templateUrl: './dblive.component.html',
styleUrls: ['./dblive.component.scss']
})
export class DbliveComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View file

@ -1,172 +1,76 @@
<!-- <html>
<head>
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>
</head>
<body background="../../assets/image/cust2.jpg">
<app-all-menus></app-all-menus>
<div style="float:left; width: 100%;padding-top: 6%;" class="scrollbar" id="style-1">
<div class="loading" *ngIf="Load">Loading&#8230;</div>
<div id="toast">
<div id="desc">{{data_descip}}</div>
</div>
<p class="headStyle">{{'Dealers' | translate}}</p>
<p *ngIf="errorMsg">{{serviceResponse}}</p>
<div class="row" >
<div class="col-sm-4" style="position: inherit;">
<button mdTooltip="{{'Add Dealer' | translate}}" style="border:1px solid transparent; background-color: transparent;margin-top:8px;cursor:pointer"
(click)="addDealer()">
<md-icon style="float: right;width:30px;height:30px;cursor:pointer">add</md-icon>
</button>
<a *ngIf="showNav" href="https://youtu.be/dg1zd2geHXA" style="cursor: pointer;color:black" title="Video tutorial" target="_blank"><md-icon class="material-icons" style="font-size: 30px"> theaters </md-icon></a>
</div>
<div class="col-sm-8" style="padding-left: 41%;padding-top: 1%;position: inherit;">
<input style="border-radius: 6px;
border: 1px solid #c7c7c7;
border-bottom: 0px;
padding: 12px;
width: 175px;
/* margin-right: 22%; */
height: 7px;
background-color: red;
font-size: 12px;
margin-top: 0;
float: left;
background: #fffcfc;"
type="search" id="myInput" class="form-control" name="myInput" [(ngModel)]="myInput" placeholder="{{'Dealer Search' | translate}}"
(ngModelChange)="searchFilter($event)" />
<button [disabled]="lastcall" (click)="pre()" style="margin-left: 10px;">
< {{'Previous' | translate}} </button> <button [disabled]="firstcall" (click)="next()"> {{'Next' | translate}} >
</button>
</div>
</div>
<table id="myTable" class="table table-striped" style="overflow-y: hidden;
overflow-x: hidden;font-size:12px">
<thead style="background-color:#A2C523 !important;color: white;">
<tr>
<th>{{'User ID' | translate}}</th>
<th>{{'Name' | translate}}</th>
<th>{{'Email ID' | translate}}</th>
<th>{{'Phone Number' | translate}}</th>
<th>{{'Password' | translate}}</th>
<th>{{'Created On' | translate}}</th>
<th>{{'Expire On' | translate}}</th>
<th>{{'Last activity' | translate}}</th>
<th>{{'Last login' | translate}}</th>
<th>{{'Login type' | translate}}</th>
<th>{{'Total vehicles' | translate}}</th>
<th>{{'Deleted vehicles' | translate}}</th>
<th>{{'Token' | translate}}</th>
<th>{{'Documents' | translate}}</th>
<th>{{'Edit' | translate}}</th>
<th>{{'Delete' | translate}}</th>
<th>{{'Dealers Status' | translate}}</th>
<th>{{'Dealer Permission' | translate}}</th>
<th>{{'Add Point' | translate}}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let dealer of dealers_info">
<td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.user_id?dealer.user_id:'NA'}}</td>
<td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.first_name}}
{{dealer.last_name}}</td>
<td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.email}}</td>
<td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.phone}}</td>
<td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.pass?dealer.pass:'Not saved'}}</td>
<td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.created_on|date:'short'}}</td>
<td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.expire_date|date:'short'}}</td>
<td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.last_activity_on|date:'dd/MM/yyyy , h:mm:ss a'}}</td>
<td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.last_login|date:'dd/MM/yyyy , h:mm:ss a'}}</td>
<td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.login_type?dealer.login_type:"NA"}}</td>
<td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.total_vehicle?dealer.total_vehicle:0}}</td>
<td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.delDevices?dealer.delDevices:0}}</td>
<td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.notificationTokenCount?dealer.notificationTokenCount:0}}</td>
<td>
<p><button md-tooltip="View/Download" style="border:1px solid transparent; background-color: transparent;float:right"(click)="viewDocuments(dealer)">
<md-icon>library_books</md-icon></button></p>
</td>
<td>
<p><button md-tooltip="Edit" style="border:1px solid transparent; background-color: transparent;float:right"
(click)="edit_DealerDetail(dealer)">
<md-icon>edit</md-icon>
</button></p>
</td>
<td>
<p><button md-tooltip="Delete" style="border:1px solid transparent; background-color: transparent;float:right"
(click)="delete_DealerDetail(dealer)">
<md-icon>delete</md-icon>
</button></p>
</td>
<td>
<md-slide-toggle [(ngModel)]="dealer.status" ngDefaultControl (change)="onChange(dealer,$event)"></md-slide-toggle>
</td>
<td>
<img src="assets/image/user_permission.png" alt="permission" height="25" width="25" style="cursor: pointer;" title="Additonal Access" (click)="user_permission(dealer)">
</td>
<td>
<i id="pointShare" style="cursor:pointer;font-size: 20px;margin-top: 7px;" class="fas fa-coins" (click)="addPoints(dealer)"></i>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html> -->
<div class="limiter"> <div class="limiter">
<app-all-menus></app-all-menus> <app-all-menus></app-all-menus>
<div id="dvTable" style="position: absolute;top:200px"></div> <div id="dvTable" style="position: absolute; top: 200px"></div>
<div id="toast"> <div id="toast">
<div id="desc">{{data_descip}}</div> <div id="desc">{{ data_descip }}</div>
</div> </div>
<div class="container-table100"> <div class="container-table100">
<div class="wrap-table100"> <div class="wrap-table100">
<div class="row" style="width:100%;text-align: center;align-items: center;background: #426E86; padding-top: 10px; padding-bottom: 10px; color: white;box-shadow:3px 1px 5px 0px rgb(178, 176, 174)"> <div class="row" style="
width: 100%;
text-align: center;
align-items: center;
background: #426e86;
padding-top: 10px;
padding-bottom: 10px;
color: white;
box-shadow: 3px 1px 5px 0px rgb(178, 176, 174);
">
<div class="col-6"> <div class="col-6">
<i class="fas fa-plus-circle" (click)="addDealer()" mdTooltip="{{'Add Dealer' | translate}}" style="box-shadow: 3px 1px 5px 0px #b2b0ae;cursor: pointer; float: left; font-size: 24px;border-radius: 50px;margin-left: 20px;"></i> <i class="fas fa-plus-circle" (click)="addDealer()" mdTooltip="{{ 'Add Dealer' | translate }}" style="
<h4 style="display: inline-block;float: right;">{{'Dealers' | translate}}</h4> box-shadow: 3px 1px 5px 0px #b2b0ae;
cursor: pointer;
float: left;
font-size: 24px;
border-radius: 50px;
margin-left: 20px;
"></i>
<i class="fas fa-download" (click)="downloadXlsx()" mdTooltip="{{ 'download XLSX' | translate }}" style="
box-shadow: 3px 1px 5px 0px #b2b0ae;
cursor: pointer;
float: left;
font-size: 24px;
border-radius: 50px;
margin-left: 20px;
"></i>
<h4 style="display: inline-block; float: right">
{{ "Dealers" | translate }}
</h4>
<!-- <button style="background-color: #cc0000;color:#fdfdfd;font-size: 12px;" md-raised-button (click)="exportPdf()">{{'PDF' | translate}}</button> --> <!-- <button style="background-color: #cc0000;color:#fdfdfd;font-size: 12px;" md-raised-button (click)="exportPdf()">{{'PDF' | translate}}</button> -->
</div> </div>
<div class="col-6"> <div class="col-6">
<button class="btn btn-default" [disabled]="firstcall" (click)="next()" style="margin-right: 10px;">{{'Next' | translate}} >></button> <button class="btn btn-default" [disabled]="firstcall" (click)="next()" style="margin-right: 10px">
<button class="btn btn-default" [disabled]="lastcall" (click)="pre()" style="border-right-color: #2d4262;"><< {{'Previous' | translate}}</button> {{ "Next" | translate }} >>
<input type="search" style="width: 225px;float: right;border-radius: 0px;line-height: 1.9;background: #efecec;margin-right: 5px;" class="form-control" id="myInput" name="myInput" type="text" [(ngModel)]="myInput" (ngModelChange)="searchFilter($event)" placeholder="{{'Dealer Search' | translate}}" /> </button>
<button class="btn btn-default" [disabled]="lastcall" (click)="pre()" style="border-right-color: #2d4262">
<< {{ "Previous" | translate }} </button>
<input type="search" style="
width: 225px;
float: right;
border-radius: 0px;
line-height: 1.9;
background: #efecec;
margin-right: 5px;
" class="form-control" id="myInput" name="myInput" type="text" [(ngModel)]="myInput"
(ngModelChange)="searchFilter($event)" placeholder="{{ 'Dealer Search' | translate }}" />
</div> </div>
</div> </div>
<!-- <div style="width:100%;text-align: center;align-items: center;background: #426E86; padding-top: 10px; padding-bottom: 10px; color: white;box-shadow:3px 1px 5px 0px rgb(178, 176, 174)">
<i class="fas fa-plus-circle" (click)="addDealer()" mdTooltip="{{'Add Dealer' | translate}}" style="box-shadow: 3px 1px 5px 0px #b2b0ae;cursor: pointer; float: left; font-size: 24px;border-radius: 50px;margin-left: 20px;"></i>
<h4 style="display: inline-block;">{{'Dealers' | translate}}</h4>
<button class="btn btn-default" [disabled]="firstcall" (click)="next()" style="margin-right: 10px;">Next >></button>
<button class="btn btn-default" [disabled]="lastcall" (click)="pre()" style="border-right-color: #2d4262;"><< Previous</button>
<input type="search" style="width: 225px;float: right;border-radius: 0px;line-height: 1.9;background: #efecec;box-shadow: 3px 2px 5px 0px rgb(178, 176, 174);" class="form-control" id="myInput" name="myInput" type="text" [(ngModel)]="myInput" (ngModelChange)="searchFilter($event)" placeholder="{{'Dealer Search' | translate}}" />
</div> -->
<!-- <p style="width:100%;text-align: center;align-items: center;background: #426E86; padding-top: 10px; padding-bottom: 10px; color: white;box-shadow:3px 1px 5px 0px rgb(178, 176, 174)">Dealers</p> -->
<div class="table100 ver1" id="deviceTable"> <div class="table100 ver1" id="deviceTable">
<div class="table100-firstcol"> <div class="table100-firstcol">
<table> <table>
<thead> <thead>
<tr> <tr>
<th class="cell100 column1" style="font-weight:600;background: #ADD8E6;"> <th class="cell100 column1" style="font-weight: 600; background: #add8e6">
<div class="row"> <div class="row">
<div class="col-5"> <div class="col-5">
<p>{{'NAME' | translate}}</p> <p>{{ "NAME" | translate }}</p>
</div> </div>
<div class="col-5"> <div class="col-5">
<p>{{'EMAIL' | translate}}</p> <p>{{ "EMAIL" | translate }}</p>
</div> </div>
<div class="col-2"> <div class="col-2">
<p>{{'PHONE' | translate}}</p> <p>{{ "PHONE" | translate }}</p>
</div> </div>
</div> </div>
</th> </th>
@ -179,25 +83,37 @@
<td class="ftd-mp cell100 column1" (click)="dealerSwitch(dealer)"> <td class="ftd-mp cell100 column1" (click)="dealerSwitch(dealer)">
<div class="row"> <div class="row">
<div class="col-sm-5"> <div class="col-sm-5">
<p title="{{dealer.first_name}} {{dealer.last_name}}" style="display: inline-block; <p title="{{ dealer.first_name }} {{ dealer.last_name }}" style="
display: inline-block;
width: 180px; width: 180px;
white-space: nowrap; white-space: nowrap;
overflow: hidden !important; overflow: hidden !important;
text-overflow: ellipsis;">{{dealer.first_name}} {{dealer.last_name}}</p> text-overflow: ellipsis;
">
{{ dealer.first_name }} {{ dealer.last_name }}
</p>
</div> </div>
<div class="col-sm-5"> <div class="col-sm-5">
<p title="{{dealer.email}}" style="display: inline-block; <p title="{{ dealer.email }}" style="
display: inline-block;
width: 180px; width: 180px;
white-space: nowrap; white-space: nowrap;
overflow: hidden !important; overflow: hidden !important;
text-overflow: ellipsis;" (click)="dealerSwitch(dealer)">{{dealer.email}}</p> text-overflow: ellipsis;
" (click)="dealerSwitch(dealer)">
{{ dealer.email }}
</p>
</div> </div>
<div class="col-sm-2"> <div class="col-sm-2">
<p title="{{dealerPhone(dealer)}}" style="display: inline-block; <p title="{{ dealerPhone(dealer) }}" style="
display: inline-block;
width: 180px; width: 180px;
white-space: nowrap; white-space: nowrap;
overflow: hidden !important; overflow: hidden !important;
text-overflow: ellipsis;" (click)="dealerSwitch(dealer)">{{dealerPhone(dealer)}}</p> text-overflow: ellipsis;
" (click)="dealerSwitch(dealer)">
{{ dealerPhone(dealer) }}
</p>
</div> </div>
</div> </div>
</td> </td>
@ -207,173 +123,227 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="wrap-table100-nextcols js-pscroll" style="height: 660px;"> <div class="wrap-table100-nextcols js-pscroll" style="height: 660px">
<div class="table100-nextcols"> <div class="table100-nextcols">
<table> <table>
<thead> <thead>
<tr class="row100 head"> <tr class="row100 head">
<th class="cell100 column2" style="
<th class="cell100 column2" style='text-align: left;font-weight: 600;background: #ADD8E6;padding-left: 55px;'>{{'USER ID' | translate}}</th> text-align: left;
<th class="cell100 column3" style='text-align: left;font-weight: 600;background: #ADD8E6'>{{'PASSWORD' | translate}}</th> font-weight: 600;
<th class="cell100 column4" style='text-align: left;font-weight: 600;background: #ADD8E6'>{{'CREATED ON' | translate}}</th> background: #add8e6;
<th class="cell100 column5" style='text-align: left;font-weight: 600;background: #ADD8E6'>{{'EXPIRES ON' | translate}}</th> padding-left: 55px;
<th class="cell100 column6" style='text-align: left;font-weight: 600;background: #ADD8E6'>{{'LAST ACTIVITY' | translate}}</th> ">
<th class="cell100 column7" style='text-align: left;font-weight: 600;background: #ADD8E6'>{{'LAST LOGIN' | translate}}</th> {{ "USER ID" | translate }}
<th class="cell100 column8" style='text-align: left;font-weight: 600;background: #ADD8E6'>{{'LOGIN TYPE' | translate}}</th> </th>
<th class="cell100 column9" style='text-align: left;font-weight: 600;background: #ADD8E6'>{{'TOTAL VEHICLES' | translate}}</th> <th class="cell100 column3" style="
<th class="cell100 column10" style='text-align: left;font-weight: 600;background: #ADD8E6'>{{'DELETED VEHICLES' | translate}}</th> text-align: left;
<th class="cell100 column11" style='text-align: left;font-weight: 600;background: #ADD8E6'>{{'ALLOCATED POINTS' | translate}}</th> font-weight: 600;
<th class="cell100 column11" style='text-align: left;font-weight: 600;background: #ADD8E6'>{{'AVAILABLE POINTS'| translate}}</th> background: #add8e6;
<th class="cell100 column12" style="text-align: center;font-weight: 600;background: #ADD8E6">{{'TOKEN' | translate}}</th> ">
<th class="cell100 column13" style="text-align: center;font-weight: 600;background: #ADD8E6">{{'DOCUMENTS' | translate}}</th> {{ "PASSWORD" | translate }}
<th class="cell100 column14" style="text-align: center;font-weight: 600;background: #ADD8E6">{{'EDIT' | translate}}</th> </th>
<th class="cell100 column15" style="text-align: center;font-weight: 600;background: #ADD8E6">{{'DELETE' |translate}}</th> <th class="cell100 column4" style="
<th class="cell100 column16" style="text-align: left;font-weight: 600;background: #ADD8E6">{{'DEALER STATUS' | translate}}</th> text-align: left;
<th class="cell100 column17" style="text-align: left;font-weight: 600;background: #ADD8E6">{{'DEALER PERMISSION' | translate}}</th> font-weight: 600;
<th class="cell100 column18" style="text-align: center;font-weight: 600;background: #ADD8E6">{{'ADD POINTS' | translate}}</th> background: #add8e6;
<th class="cell100 column18" style="text-align: center;font-weight: 600;background: #ADD8E6">{{'SUSPEND ACCOUNT' | translate}}</th> ">
<th class="cell100 column18" style="text-align: center;font-weight: 600;background: #ADD8E6">{{'SUSPEND ACCOUNT' | translate}}</th> {{ "CREATED ON" | translate }}
</th>
<th class="cell100 column5" style="
text-align: left;
font-weight: 600;
background: #add8e6;
">
{{ "EXPIRES ON" | translate }}
</th>
<th class="cell100 column6" style="
text-align: left;
font-weight: 600;
background: #add8e6;
">
{{ "LAST ACTIVITY" | translate }}
</th>
<th class="cell100 column7" style="
text-align: left;
font-weight: 600;
background: #add8e6;
">
{{ "LAST LOGIN" | translate }}
</th>
<th class="cell100 column8" style="
text-align: left;
font-weight: 600;
background: #add8e6;
">
{{ "LOGIN TYPE" | translate }}
</th>
<th class="cell100 column9" style="
text-align: left;
font-weight: 600;
background: #add8e6;
">
{{ "TOTAL VEHICLES" | translate }}
</th>
<th class="cell100 column10" style="
text-align: left;
font-weight: 600;
background: #add8e6;
">
{{ "DELETED VEHICLES" | translate }}
</th>
<th class="cell100 column11" style="
text-align: left;
font-weight: 600;
background: #add8e6;
">
{{ "ALLOCATED POINTS" | translate }}
</th>
<th class="cell100 column11" style="
text-align: left;
font-weight: 600;
background: #add8e6;
">
{{ "AVAILABLE POINTS" | translate }}
</th>
<th class="cell100 column12" style="
text-align: center;
font-weight: 600;
background: #add8e6;
">
{{ "TOKEN" | translate }}
</th>
<th class="cell100 column13" style="
text-align: center;
font-weight: 600;
background: #add8e6;
">
{{ "DOCUMENTS" | translate }}
</th>
<th class="cell100 column14" style="
text-align: center;
font-weight: 600;
background: #add8e6;
">
{{ "EDIT" | translate }}
</th>
<th class="cell100 column15" style="
text-align: center;
font-weight: 600;
background: #add8e6;
">
{{ "DELETE" | translate }}
</th>
<th class="cell100 column16" style="
text-align: left;
font-weight: 600;
background: #add8e6;
">
{{ "DEALER STATUS" | translate }}
</th>
<th class="cell100 column17" style="
text-align: left;
font-weight: 600;
background: #add8e6;
">
{{ "DEALER PERMISSION" | translate }}
</th>
<th class="cell100 column18" style="
text-align: center;
font-weight: 600;
background: #add8e6;
">
{{ "ADD POINTS" | translate }}
</th>
<th class="cell100 column18" style="
text-align: center;
font-weight: 600;
background: #add8e6;
">
{{ "SUSPEND ACCOUNT" | translate }}
</th>
<th class="cell100 column18" style="
text-align: center;
font-weight: 600;
background: #add8e6;
">
{{ "SUSPEND ACCOUNT" | translate }}
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr class="row100 body" *ngFor="let dealer of dealers_info"> <tr class="row100 body" *ngFor="let dealer of dealers_info">
<td class="cell100 column2" style="cursor: pointer" (click)="dealerSwitch(dealer)">
<td class="cell100 column2" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.user_id?dealer.user_id:'NA'}}</td> {{ dealer.user_id ? dealer.user_id : "NA" }}
<td class="cell100 column3" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.pass?dealer.pass:'Not saved'}}</td> </td>
<td class="cell100 column4" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.created_on|date:'short'}}</td> <td class="cell100 column3" style="cursor: pointer" (click)="dealerSwitch(dealer)">
<td class="cell100 column5" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.expire_date|date:'short'}}</td> {{ dealer.pass ? dealer.pass : "Not saved" }}
<td class="cell100 column6" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.last_activity_on|date:'dd/MM/yyyy , h:mm:ss a'}}</td> </td>
<td class="cell100 column7" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.last_login|date:'dd/MM/yyyy , h:mm:ss a'}}</td> <td class="cell100 column4" style="cursor: pointer" (click)="dealerSwitch(dealer)">
<td class="cell100 column8" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.login_type?dealer.login_type:"NA"}}</td> {{ dealer.created_on | date : "short" }}
<td class="cell100 column9" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.total_vehicle?dealer.total_vehicle:0}}</td> </td>
<td class="cell100 column10" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.delDevices?dealer.delDevices:0}}</td> <td class="cell100 column5" style="cursor: pointer" (click)="dealerSwitch(dealer)">
<td class="cell100 column11" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.point_Allocated?dealer.point_Allocated:0}}</td> {{ dealer.expire_date | date : "short" }}
<td class="cell100 column11" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{availablePoint(dealer)}}</td> </td>
<td class="cell100 column12" style="cursor: pointer;text-align: center;" (click)="dealerSwitch(dealer)">{{dealer.notificationTokenCount?dealer.notificationTokenCount:0}}</td> <td class="cell100 column6" style="cursor: pointer" (click)="dealerSwitch(dealer)">
<td class="cell100 column13" style="text-align: center;"> {{
<i class="far fa-folder-open" md-tooltip="View/Download" style="cursor: pointer;" (click)="viewDocuments(dealer)"></i> dealer.last_activity_on | date : "dd/MM/yyyy , h:mm:ss a"
}}
</td>
<td class="cell100 column7" style="cursor: pointer" (click)="dealerSwitch(dealer)">
{{ dealer.last_login | date : "dd/MM/yyyy , h:mm:ss a" }}
</td>
<td class="cell100 column8" style="cursor: pointer" (click)="dealerSwitch(dealer)">
{{ dealer.login_type ? dealer.login_type : "NA" }}
</td>
<td class="cell100 column9" style="cursor: pointer" (click)="dealerSwitch(dealer)">
{{ dealer.total_vehicle ? dealer.total_vehicle : 0 }}
</td>
<td class="cell100 column10" style="cursor: pointer" (click)="dealerSwitch(dealer)">
{{ dealer.delDevices ? dealer.delDevices : 0 }}
</td>
<td class="cell100 column11" style="cursor: pointer" (click)="dealerSwitch(dealer)">
{{ dealer.point_Allocated ? dealer.point_Allocated : 0 }}
</td>
<td class="cell100 column11" style="cursor: pointer" (click)="dealerSwitch(dealer)">
{{ availablePoint(dealer) }}
</td>
<td class="cell100 column12" style="cursor: pointer; text-align: center"
(click)="dealerSwitch(dealer)">
{{
dealer.notificationTokenCount
? dealer.notificationTokenCount
: 0
}}
</td>
<td class="cell100 column13" style="text-align: center">
<i class="far fa-folder-open" md-tooltip="View/Download" style="cursor: pointer"
(click)="viewDocuments(dealer)"></i>
</td> </td>
<td class="cell100 column14" style="text-align: center"> <td class="cell100 column14" style="text-align: center">
<i class="far fa-edit" md-tooltip="Edit" style="cursor: pointer;color:#08de85" (click)="edit_DealerDetail(dealer)"></i> <i class="far fa-edit" md-tooltip="Edit" style="cursor: pointer; color: #08de85"
(click)="edit_DealerDetail(dealer)"></i>
</td> </td>
<td class="cell100 column15" style="text-align: center"> <td class="cell100 column15" style="text-align: center">
<i class="fas fa-trash-alt" md-tooltip="Delete" style="cursor: pointer;color:#ff0707;" (click)="delete_DealerDetail(dealer)"></i> <i class="fas fa-trash-alt" md-tooltip="Delete" style="cursor: pointer; color: #ff0707"
(click)="delete_DealerDetail(dealer)"></i>
</td> </td>
<td class="cell100 column16" style="text-align: center"> <td class="cell100 column16" style="text-align: center">
<md-slide-toggle [(ngModel)]="dealer.status" style="height: 0px !important" ngDefaultControl (change)="onChange(dealer,$event)"></md-slide-toggle> <md-slide-toggle [(ngModel)]="dealer.status" style="height: 0px !important" ngDefaultControl
(change)="onChange(dealer, $event)"></md-slide-toggle>
</td> </td>
<td class="cell100 column17" style="text-align: center;"> <td class="cell100 column17" style="text-align: center">
<i class="fas fa-user-shield" title="Additonal Access" (click)="user_permission(dealer)"></i> <i class="fas fa-user-shield" title="Additonal Access" (click)="user_permission(dealer)"></i>
</td> </td>
<td class="cell100 column18" style="text-align: center;"> <td class="cell100 column18" style="text-align: center">
<i id="pointShare" style="cursor:pointer;color:#f5b515;" class="fas fa-coins" (click)="addPoints(dealer)"></i> <i id="pointShare" style="cursor: pointer; color: #f5b515" class="fas fa-coins"
(click)="addPoints(dealer)"></i>
</td> </td>
<td class="cell100 column16" style="text-align: center"> <td class="cell100 column16" style="text-align: center">
<md-slide-toggle [(ngModel)]="dealer.accountSuspended" style="height: 0px !important" ngDefaultControl (change)="accountStatusonChange(dealer,$event)"></md-slide-toggle> <md-slide-toggle [(ngModel)]="dealer.accountSuspended" style="height: 0px !important"
ngDefaultControl (change)="accountStatusonChange(dealer, $event)"></md-slide-toggle>
</td> </td>
</tr> </tr>
<!-- <td style="cursor:pointer" (click)="dealerSwitch(dealer)">{{dealer.notificationTokenCount?dealer.notificationTokenCount:0}}</td> -->
<!-- <tr class="row100 body">
<td class="cell100 column2">Marketing</td>
<td class="cell100 column3">16 Nov 2015</td>
<td class="cell100 column4">30 Nov 2017</td>
<td class="cell100 column5">kathy_82@example.com</td>
<td class="cell100 column6">26</td>
<td class="cell100 column7">New York City, NY</td>
<td class="cell100 column8">424242xxxxxx1616</td>
</tr>
<tr class="row100 body">
<td class="cell100 column2">CFO</td>
<td class="cell100 column3">16 Nov 2013</td>
<td class="cell100 column4">30 Nov 2017</td>
<td class="cell100 column5">elizabeth82@example.com</td>
<td class="cell100 column6">32</td>
<td class="cell100 column7">New York City, NY</td>
<td class="cell100 column8">424242xxxxxx5326</td>
</tr>
<tr class="row100 body">
<td class="cell100 column2">Designer</td>
<td class="cell100 column3">16 Nov 2013</td>
<td class="cell100 column4">30 Nov 2017</td>
<td class="cell100 column5">michael94@example.com</td>
<td class="cell100 column6">22</td>
<td class="cell100 column7">New York City, NY</td>
<td class="cell100 column8">424242xxxxxx6328</td>
</tr>
<tr class="row100 body">
<td class="cell100 column2">Developer</td>
<td class="cell100 column3">16 Nov 2017</td>
<td class="cell100 column4">30 Nov 2017</td>
<td class="cell100 column5">jasoncox@example.com</td>
<td class="cell100 column6">25</td>
<td class="cell100 column7">New York City, NY</td>
<td class="cell100 column8">424242xxxxxx7648</td>
</tr>
<tr class="row100 body">
<td class="cell100 column2">Sale</td>
<td class="cell100 column3">16 Nov 2016</td>
<td class="cell100 column4">30 Nov 2017</td>
<td class="cell100 column5">christian_83@example.com</td>
<td class="cell100 column6">28</td>
<td class="cell100 column7">New York City, NY</td>
<td class="cell100 column8">424242xxxxxx4152</td>
</tr>
<tr class="row100 body">
<td class="cell100 column2">Support</td>
<td class="cell100 column3">16 Nov 2013</td>
<td class="cell100 column4">30 Nov 2017</td>
<td class="cell100 column5">emily90@example.com</td>
<td class="cell100 column6">24</td>
<td class="cell100 column7">New York City, NY</td>
<td class="cell100 column8">424242xxxxxx6668</td>
</tr>
<tr class="row100 body">
<td class="cell100 column2">Support</td>
<td class="cell100 column3">16 Nov 2013</td>
<td class="cell100 column4">30 Nov 2017</td>
<td class="cell100 column5">emily90@example.com</td>
<td class="cell100 column6">24</td>
<td class="cell100 column7">New York City, NY</td>
<td class="cell100 column8">424242xxxxxx6668</td>
</tr>
<tr class="row100 body">
<td class="cell100 column2">Support</td>
<td class="cell100 column3">16 Nov 2013</td>
<td class="cell100 column4">30 Nov 2017</td>
<td class="cell100 column5">emily90@example.com</td>
<td class="cell100 column6">24</td>
<td class="cell100 column7">New York City, NY</td>
<td class="cell100 column8">424242xxxxxx6668</td>
</tr>
<tr class="row100 body">
<td class="cell100 column2">Support</td>
<td class="cell100 column3">16 Nov 2013</td>
<td class="cell100 column4">30 Nov 2017</td>
<td class="cell100 column5">emily90@example.com</td>
<td class="cell100 column6">24</td>
<td class="cell100 column7">New York City, NY</td>
<td class="cell100 column8">424242xxxxxx6668</td>
</tr> -->
</tbody> </tbody>
</table> </table>
</div> </div>
@ -382,7 +352,3 @@
</div> </div>
</div> </div>
</div> </div>

View file

@ -14,7 +14,6 @@
// #d:hover { // #d:hover {
// color: rgb(14, 102, 18); // color: rgb(14, 102, 18);
// } // }
// #ac{ // #ac{
// color: rgb(38, 38, 90) // color: rgb(38, 38, 90)
@ -40,7 +39,6 @@
// margin: 0px; // margin: 0px;
// } // }
// .switch input {display:none;} // .switch input {display:none;}
// .slider { // .slider {
@ -88,7 +86,6 @@
// border-radius: 50%; // border-radius: 50%;
// } // }
// .sk-fading-circle { // .sk-fading-circle {
// margin: 100px auto; // margin: 100px auto;
// width: 40px; // width: 40px;
@ -226,7 +223,6 @@
// 40% { opacity: 1; } // 40% { opacity: 1; }
// } // }
// ul, li { // ul, li {
// list-style: none; // list-style: none;
// float: left; // float: left;
@ -334,7 +330,6 @@
// } // }
// #c2 { // #c2 {
// } // }
// #c1 { // #c1 {
// float:left; // float:left;
@ -572,7 +567,6 @@
// -webkit-transition-delay: 0s; // -webkit-transition-delay: 0s;
// } // }
// #demo .content ul { // #demo .content ul {
// background: #fff; // background: #fff;
// margin: 0; // margin: 0;
@ -756,7 +750,6 @@
// background-color: #555 // background-color: #555
// } // }
// .button2 {background-color: #008CBA;} // .button2 {background-color: #008CBA;}
// .ngx-picker--btn { // .ngx-picker--btn {
// color: #000; // color: #000;
@ -809,7 +802,7 @@
// padding: 0; // padding: 0;
// border-radius: 0.2em; } // border-radius: 0.2em; }
// .calendar--years-select, // .calendar--years-select,
// .calendar--months-select { // .calendar--months-select {
// overflow-y: auto; // overflow-y: auto;
// overflow-x: hidden; // overflow-x: hidden;
@ -970,8 +963,7 @@
// width: 100%; // width: 100%;
// } // }
#toast {
#toast {
visibility: hidden; visibility: hidden;
max-width: 250px; max-width: 250px;
height: 50px; height: 50px;
@ -984,13 +976,13 @@
position: fixed; position: fixed;
z-index: 1; z-index: 1;
left: 60%;right:0; left: 60%;
right: 0;
bottom: 80%; bottom: 80%;
font-size: 13px; font-size: 13px;
white-space: nowrap; white-space: nowrap;
} }
// .scrollbar // .scrollbar
// { // {
// /* margin-left: 30px; */ // /* margin-left: 30px; */
@ -1038,7 +1030,6 @@
// /* background-color: linear-gradient(to bottom, MD_DIALOG_DATA 0%, #0066ff 100%); */ // /* background-color: linear-gradient(to bottom, MD_DIALOG_DATA 0%, #0066ff 100%); */
// } // }
// /deep/ .mat-menu-panel.test{ // /deep/ .mat-menu-panel.test{
// background-color: #b7b7b7; // background-color: #b7b7b7;
@ -1063,10 +1054,7 @@
// margin-top:48px; // margin-top:48px;
// } // }
#toast #img {
#toast #img{
width: 250px; width: 250px;
height: 50px; height: 50px;
@ -1077,13 +1065,10 @@
box-sizing: border-box; box-sizing: border-box;
background-color: #111; background-color: #111;
color: #fff; color: #fff;
} }
#toast #desc{ #toast #desc {
color: #fff; color: #fff;
padding: 16px; padding: 16px;
@ -1094,8 +1079,10 @@
#toast.show { #toast.show {
visibility: visible; visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s,stay 3s 1s, shrink 0.5s 2s, fadeout 0.5s 2.5s; -webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
animation: fadein 0.5s, expand 0.5s 0.5s,stay 3s 1s, shrink 0.5s 4s, fadeout 0.5s 4.5s; fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
} }
// #myInput { // #myInput {
// border-radius: 15px; // border-radius: 15px;
@ -1267,20 +1254,12 @@
// } // }
// } // }
// .openLayermap{ // .openLayermap{
// height:400px; // height:400px;
// width:100%; // width:100%;
// } // }
// css style
// css style
/*////////////////////////////////////////////////////////////////// /*//////////////////////////////////////////////////////////////////
[ FONT ]*/ [ FONT ]*/
@ -1309,7 +1288,8 @@
box-sizing: border-box; box-sizing: border-box;
} }
body, html { body,
html {
height: 100%; height: 100%;
font-family: sans-serif; font-family: sans-serif;
} }
@ -1332,21 +1312,30 @@ a:hover {
} }
/* ------------------------------------ */ /* ------------------------------------ */
h1,h2,h3,h4,h5,h6 {margin: 0px;} h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0px;
}
p {margin: 0px;} p {
margin: 0px;
}
ul, li { ul,
li {
margin: 0px; margin: 0px;
list-style-type: none; list-style-type: none;
} }
/* ------------------------------------ */ /* ------------------------------------ */
input { input {
display: block; display: block;
outline: none; outline: none;
border: none !important; // border: none !important;
} }
textarea { textarea {
@ -1354,7 +1343,8 @@ textarea {
outline: none; outline: none;
} }
textarea:focus, input:focus { textarea:focus,
input:focus {
border-color: transparent !important; border-color: transparent !important;
} }
@ -1380,7 +1370,6 @@ iframe {
overflow: hidden; overflow: hidden;
} }
.table100 .ps__rail-x { .table100 .ps__rail-x {
z-index: 1010; z-index: 1010;
height: 6px; height: 6px;
@ -1418,7 +1407,6 @@ iframe {
left: 15px; left: 15px;
} }
/*////////////////////////////////////////////////////////////////// /*//////////////////////////////////////////////////////////////////
[ Table ]*/ [ Table ]*/
@ -1431,8 +1419,6 @@ iframe {
// background: -o-linear-gradient(bottom, #c471f5, #fa71cd); // background: -o-linear-gradient(bottom, #c471f5, #fa71cd);
// background: -moz-linear-gradient(bottom, #c471f5, #fa71cd); // background: -moz-linear-gradient(bottom, #c471f5, #fa71cd);
// background: linear-gradient(bottom, #c471f5, #fa71cd); // background: linear-gradient(bottom, #c471f5, #fa71cd);
} }
.container-table100 { .container-table100 {
@ -1449,7 +1435,7 @@ iframe {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
// padding: 33px 100px; // padding: 33px 100px;
padding: 55px 20px 0px 20px padding: 55px 20px 0px 20px;
} }
.wrap-table100 { .wrap-table100 {
@ -1466,7 +1452,8 @@ table {
width: 100%; width: 100%;
} }
th, td { th,
td {
font-weight: unset; font-weight: unset;
padding-right: 10px; padding-right: 10px;
} }
@ -1505,7 +1492,7 @@ th, td {
.column8 { .column8 {
// width: 305px; // width: 305px;
width:210px; width: 210px;
} }
.column9 { .column9 {
@ -1518,7 +1505,7 @@ th, td {
.column11 { .column11 {
// width: 200px; // width: 200px;
width:155px; width: 155px;
} }
.column12 { .column12 {
@ -1531,7 +1518,7 @@ th, td {
.column14 { .column14 {
// width: 200px; // width: 200px;
width:150px width: 150px;
} }
.column15 { .column15 {
// width: 200px; // width: 200px;
@ -1539,24 +1526,24 @@ th, td {
} }
.column16 { .column16 {
// width: 200px; // width: 200px;
width:150px; width: 150px;
} }
.column17 { .column17 {
// width: 200px; // width: 200px;
width:175px width: 175px;
} }
.column18 { .column18 {
// width: 200px; // width: 200px;
width:175px; width: 175px;
} }
.column19 { .column19 {
// width: 200px; // width: 200px;
width:150px; width: 150px;
} }
.column20 { .column20 {
// width: 200px; // width: 200px;
width:150px; width: 150px;
} }
.table100 th { .table100 th {
@ -1569,7 +1556,6 @@ th, td {
padding-bottom: 16px; padding-bottom: 16px;
} }
/*================================================================== /*==================================================================
[ Fix col ]*/ [ Fix col ]*/
.table100 { .table100 {
@ -1601,7 +1587,7 @@ th, td {
padding-bottom: 28px; padding-bottom: 28px;
} }
.table100-nextcols table{ .table100-nextcols table {
table-layout: fixed; table-layout: fixed;
} }
@ -1626,7 +1612,7 @@ th, td {
font-size: 14px; font-size: 14px;
// color: #333333; // color: #333333;
color:white; color: white;
line-height: 1.4; line-height: 1.4;
text-transform: uppercase; text-transform: uppercase;
} }
@ -1646,21 +1632,15 @@ th, td {
color: #999999; color: #999999;
} }
.table100.ver1 tr { .table100.ver1 tr {
border-bottom: 1px solid #f2f2f2; border-bottom: 1px solid #f2f2f2;
} }
// .btn-default { // .btn-default {
// @include btn-variant(#546e7a, #90a4ae, #78909c, #cfd8dc, #eceff1, #b0bec5, #455a64); // @include btn-variant(#546e7a, #90a4ae, #78909c, #cfd8dc, #eceff1, #b0bec5, #455a64);
// } // }
.btn { .btn {
display: inline-block; display: inline-block;
margin-bottom: 0; margin-bottom: 0;
@ -1732,6 +1712,3 @@ th, td {
// height: 400px; // height: 400px;
// width: 400px; // width: 400px;
// } // }

View file

@ -1,26 +1,33 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from "@angular/core";
import { ContactService } from '../contact.service'; import { ContactService } from "../contact.service";
import { Router } from '@angular/router'; import { Router } from "@angular/router";
import { FlashMessagesService } from 'angular2-flash-messages'; import { FlashMessagesService } from "angular2-flash-messages";
import { MyaccountComponent } from '../myaccount/myaccount.component'; import { MyaccountComponent } from "../myaccount/myaccount.component";
import { MdDialog } from '@angular/material'; import { MdDialog } from "@angular/material";
import { AddDealerComponent } from '../add-dealer/add-dealer.component'; import { AddDealerComponent } from "../add-dealer/add-dealer.component";
import { DeviceEditComponent } from '../dashboard/device-edit/device-edit.component'; import { DeviceEditComponent } from "../dashboard/device-edit/device-edit.component";
import { EditDealerComponent } from '../edit-dealer/edit-dealer.component'; import { EditDealerComponent } from "../edit-dealer/edit-dealer.component";
import { Subject } from 'rxjs/Subject'; import { Subject } from "rxjs/Subject";
import 'rxjs/add/operator/debounceTime'; import "rxjs/add/operator/debounceTime";
import { EditCostumerComponent } from '../edit-costumer/edit-costumer.component'; import { EditCostumerComponent } from "../edit-costumer/edit-costumer.component";
import { environment } from '../../environments/environment'; import { environment } from "../../environments/environment";
import { DealerPermissionComponent } from './dealer-permission/dealer-permission.component'; import { DealerPermissionComponent } from "./dealer-permission/dealer-permission.component";
import { PointShareComponent } from '../point-share/point-share.component'; import { PointShareComponent } from "../point-share/point-share.component";
declare var swal: any; declare var swal: any, moment: any;
declare var ol : any; declare var ol: any;
declare var PerfectScrollbar:any; declare var PerfectScrollbar: any;
declare var html2canvas:any; declare var html2canvas: any;
declare var pdfMake : any; declare var pdfMake: any;
// import {Fill, Stroke, Circle, Style} from 'ol/style'; // import {Fill, Stroke, Circle, Style} from 'ol/style';
declare var Feature, Overlay,View,Point,TileJSON,VectorSource,Icon,Style : any ; declare var Feature,
Overlay,
View,
Point,
TileJSON,
VectorSource,
Icon,
Style: any;
// import 'ol/ol.css'; // import 'ol/ol.css';
// import Feature from 'ol/Feature'; // import Feature from 'ol/Feature';
@ -38,12 +45,12 @@ declare var Feature, Overlay,View,Point,TileJSON,VectorSource,Icon,Style : any ;
// import {Circle as CircleStyle, Fill, Icon, Stroke, Style} from 'ol/style'; // import {Circle as CircleStyle, Fill, Icon, Stroke, Style} from 'ol/style';
@Component({ @Component({
selector: 'app-dealers-info', selector: "app-dealers-info",
templateUrl: './dealers-info.component.html', templateUrl: "./dealers-info.component.html",
styleUrls: ['./dealers-info.component.scss'] styleUrls: ["./dealers-info.component.scss"],
}) })
export class DealersInfoComponent implements OnInit { export class DealersInfoComponent implements OnInit {
dealer_load: { "uId": any; "loggedIn_id": any; "status": any; }; dealer_load: { uId: any; loggedIn_id: any; status: any };
show1: boolean = false; show1: boolean = false;
show2: boolean = true; show2: boolean = true;
show3: boolean = false; show3: boolean = false;
@ -88,38 +95,154 @@ export class DealersInfoComponent implements OnInit {
serviceResponse: string; serviceResponse: string;
Load: boolean; Load: boolean;
url: any; url: any;
showNav: boolean=false; showNav: boolean = false;
constructor(private contactService: ContactService, private router: Router, private _flashMessagesService: FlashMessagesService, public dialog: MdDialog) { constructor(
private contactService: ContactService,
private router: Router,
private _flashMessagesService: FlashMessagesService,
public dialog: MdDialog
) {
this.modelChanged this.modelChanged
.debounceTime(1000) // wait 300ms after the last event before emitting last event .debounceTime(1000) // wait 300ms after the last event before emitting last event
.distinctUntilChanged() // only emit if value is different from previous value .distinctUntilChanged() // only emit if value is different from previous value
.subscribe(myInput => { .subscribe((myInput) => {
this.myInput = myInput; this.myInput = myInput;
this.dealerDetail(); this.dealerDetail();
}); });
var script = document.createElement("script"); var script = document.createElement("script");
script.setAttribute("type", "text/javascript"); script.setAttribute("type", "text/javascript");
script.setAttribute("src", "https://unpkg.com/multiple-select@1.3.1/dist/multiple-select.min.js"); script.setAttribute(
"src",
"https://unpkg.com/multiple-select@1.3.1/dist/multiple-select.min.js"
);
document.getElementsByTagName("head")[0].appendChild(script); document.getElementsByTagName("head")[0].appendChild(script);
} }
downloadCSV(jsonData, fileName) {
// Step 1: Convert JSON to CSV
const array = typeof jsonData != "object" ? JSON.parse(jsonData) : jsonData;
let csv = "";
// Get the headers
const headers = Object.keys(array[0]);
csv += headers.join(",") + "\n";
// Loop through the data and create CSV rows
array.forEach((obj) => {
let row = "";
headers.forEach((header) => {
row += obj[header] + ",";
});
row = row.slice(0, -1); // Remove trailing comma
csv += row + "\n";
});
// Step 2: Create a Blob
const csvBlob = new Blob([csv], { type: "text/csv" });
// Step 3: Create a Download Link
const downloadLink = document.createElement("a");
downloadLink.href = URL.createObjectURL(csvBlob);
downloadLink.download = fileName;
// Append the link, trigger click and remove the link
document.body.appendChild(downloadLink);
downloadLink.click();
document.body.removeChild(downloadLink);
}
downloadXlsx() {
let that = this;
function db_data(dt: any) {
if (dt != undefined) return moment(dt).format("DD/MM/YYYY hh:mm:ss A");
else return "";
}
function callFunc(useridd, skip, limit, myInput, all, cb) {
let tok: any = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
);
that.contactService
.dealer_Info1(useridd, skip, limit, myInput, null)
.subscribe(
(res) => {
if (res.length == 0) {
cb(all);
} else {
let data = res.filter((d) => {
return d.phone != tok.phn;
});
skip += 1;
callFunc(useridd, skip, limit, myInput, [...all, ...data], cb);
}
},
(err) => {}
);
}
callFunc(that.useridd, 1, 500, this.myInput, [], (allDt) => {
console.log("allDt=>", allDt);
let xlsxData = allDt.map((dx: any) => {
return {
Name: dx.first_name + " " + dx.last_name,
Email: dx.email,
Phone: that.dealerPhone(dx),
UserId: dx.user_id,
Pass: dx.pass,
"CREATED ON":
dx.created_on != undefined ? db_data(dx.created_on) : "",
"Expire Date":
dx.expire_date != undefined ? db_data(dx.expire_date) : "",
"Last Activity On":
dx.last_activity_on != undefined
? db_data(dx.last_activity_on)
: "",
"Last Login":
dx.last_login != undefined ? db_data(dx.last_login) : "",
"Login Type": dx.login_type || "",
"Total Vehicle": dx.total_vehicle || "",
"Deleted Devices": dx.delDevices || "",
"Allocated Points": dx.point_Allocated || "",
"Available Point": that.availablePoint(dx),
Token: dx.notificationTokenCount || "",
};
});
that.downloadCSV(
xlsxData,
moment(new Date()).format("DD-MM-YYYY") + "_Dealer.csv"
);
});
}
ngOnInit() { ngOnInit() {
this.superAdmin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin; this.superAdmin = JSON.parse(
this.fs = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).fn; window.atob(window.localStorage.token.split(".")[1])
this.ls = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).ln; ).isSuperAdmin;
this.emailid = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).email; this.fs = JSON.parse(
this.or = JSON.parse(window.atob(window.localStorage.token.split(".")[1]))._orgName; window.atob(window.localStorage.token.split(".")[1])
this.useridd = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id; ).fn;
this.mb = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).phn; this.ls = JSON.parse(
let test = JSON.parse(window.atob(window.localStorage.token.split('.')[1])); window.atob(window.localStorage.token.split(".")[1])
).ln;
this.emailid = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
).email;
this.or = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
)._orgName;
this.useridd = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
)._id;
this.mb = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
).phn;
let test = JSON.parse(window.atob(window.localStorage.token.split(".")[1]));
this.showDemoVideo(); this.showDemoVideo();
this.custtype = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).isDealer; this.custtype = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
).isDealer;
if (this.mb.charAt(0) == "n") { if (this.mb.charAt(0) == "n") {
this.mb = ' ' this.mb = " ";
} }
if (this.custtype == true) { if (this.custtype == true) {
this.cust = true; this.cust = true;
@ -129,26 +252,30 @@ export class DealersInfoComponent implements OnInit {
// this.testOpenLayerMap(); // this.testOpenLayerMap();
$(document).ready(function () { $(document).ready(function () {
$('.js-pscroll').each(function(){ $(".js-pscroll").each(function () {
var ps = new PerfectScrollbar(this); var ps = new PerfectScrollbar(this);
$(window).on('resize', function(){ $(window).on("resize", function () {
ps.update(); ps.update();
})
$(this).on('ps-x-reach-start', function(){
$(this).parent().find('.table100-firstcol').removeClass('shadow-table100-firstcol');
}); });
$(this).on('ps-scroll-x', function(){ $(this).on("ps-x-reach-start", function () {
$(this).parent().find('.table100-firstcol').addClass('shadow-table100-firstcol'); $(this)
.parent()
.find(".table100-firstcol")
.removeClass("shadow-table100-firstcol");
}); });
$(this).on("ps-scroll-x", function () {
$(this)
.parent()
.find(".table100-firstcol")
.addClass("shadow-table100-firstcol");
});
});
}); });
})
} }
stre() { stre() {
this.str = true; this.str = true;
} }
@ -156,20 +283,17 @@ export class DealersInfoComponent implements OnInit {
this.str = false; this.str = false;
} }
clear() { clear() {
this.first_name = ' ' this.first_name = " ";
this.last_name = ' ' this.last_name = " ";
this.emaill = null this.emaill = null;
this.phone = null this.phone = null;
} }
ign() { ign() {
this.router.navigateByUrl("device-report/ign-report"); this.router.navigateByUrl("device-report/ign-report");
} }
table1ch() { table1ch() {
myFunction(); myFunction();
function myFunction() { function myFunction() {
@ -180,15 +304,13 @@ export class DealersInfoComponent implements OnInit {
tr = table.getElementsByTagName("tr"); tr = table.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) { for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[1]; td = tr[i].getElementsByTagName("td")[1];
td1 = tr[i].getElementsByTagName("td")[0] td1 = tr[i].getElementsByTagName("td")[0];
if (td) { if (td) {
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) { if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = ""; tr[i].style.display = "";
} } else if (td1.innerHTML.toUpperCase().indexOf(filter) > -1) {
else if (td1.innerHTML.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = ""; tr[i].style.display = "";
} } else {
else {
tr[i].style.display = "none"; tr[i].style.display = "none";
} }
} }
@ -196,167 +318,158 @@ export class DealersInfoComponent implements OnInit {
} }
} }
onChange(dealer, ev) { onChange(dealer, ev) {
// console.log(ev.checked); // console.log(ev.checked);
let dealer_status = ev.checked; let dealer_status = ev.checked;
let dealer_id = dealer._id; let dealer_id = dealer._id;
// let dealer_activity = dealer.status; // let dealer_activity = dealer.status;
this.dealer_load = { this.dealer_load = {
"uId": dealer_id, uId: dealer_id,
"loggedIn_id": this.useridd, loggedIn_id: this.useridd,
"status": dealer_status status: dealer_status,
} };
// console.log(dealer_id); // console.log(dealer_id);
// console.log(this.dealer_load); // console.log(this.dealer_load);
this.contactService.custStatus(this.dealer_load) this.contactService.custStatus(this.dealer_load).subscribe(
.subscribe(res => { (res) => {
let a = res; let a = res;
}, err => { },
}) (err) => {}
);
} }
dealerDetail() { dealerDetail() {
this.Load = true; this.Load = true;
console.log("Inside function",this.myInput); console.log("Inside function", this.myInput);
this.contactService.dealer_Info1(this.useridd, this.skip, this.limit,this.myInput,null) let tok: any = JSON.parse(
.subscribe(res => { window.atob(window.localStorage.token.split(".")[1])
);
this.contactService
.dealer_Info1(this.useridd, this.skip, this.limit, this.myInput, null)
.subscribe(
(res) => {
// console.log(res); // console.log(res);
this.Load = false ;
this.dealers_info = res;
console.log('this.dealers_info',this.dealers_info);
// console.log("SuccessLog");
}, err => {
this.Load = false; this.Load = false;
this.dealers_info=[]; debugger;
this.dealers_info = res.filter((d) => {
return d.phone != tok.phn;
});
console.log("this.dealers_info", this.dealers_info);
// console.log("SuccessLog");
},
(err) => {
this.Load = false;
this.dealers_info = [];
this.firstcall = true; this.firstcall = true;
this.lastcall = false; this.lastcall = false;
})
} }
);
}
addDealer() { addDealer() {
let dialogRef = this.dialog.open(AddDealerComponent, { let dialogRef = this.dialog.open(AddDealerComponent, {
width: '800px', width: "800px",
}); });
dialogRef.afterClosed().subscribe(result => { dialogRef.afterClosed().subscribe((result) => {
if (result == "succ") { if (result == "succ") {
this.ngOnInit(); this.ngOnInit();
} }
}); });
} }
edit_DealerDetail(dealerEdit) { edit_DealerDetail(dealerEdit) {
// console.log(dealerEdit); // console.log(dealerEdit);
console.log(dealerEdit); console.log(dealerEdit);
dealerEdit.ID = 'edit'; dealerEdit.ID = "edit";
console.log(dealerEdit); console.log(dealerEdit);
let dialogRef = this.dialog.open(EditDealerComponent, { let dialogRef = this.dialog.open(EditDealerComponent, {
width: '500px', width: "500px",
height: '600px', height: "600px",
data: { dealer_payload: dealerEdit } data: { dealer_payload: dealerEdit },
}); });
dialogRef.afterClosed().subscribe((result) => {
dialogRef.afterClosed().subscribe(result => {
// console.log(result); // console.log(result);
if (result == "success") { if (result == "success") {
this.ngOnInit(); this.ngOnInit();
} }
}); });
} }
delete_DealerDetail(dealerDelete){ delete_DealerDetail(dealerDelete) {
var that =this; var that = this;
console.log(dealerDelete); console.log(dealerDelete);
dealerDelete.ID = 'delete'; dealerDelete.ID = "delete";
let dialogRef = this.dialog.open(EditDealerComponent, { let dialogRef = this.dialog.open(EditDealerComponent, {
width: '500px', width: "500px",
height: '600px', height: "600px",
data: { dealer_payload: dealerDelete } data: { dealer_payload: dealerDelete },
}); });
dialogRef.afterClosed().subscribe((result) => {
dialogRef.afterClosed().subscribe(result => {
console.log(result); console.log(result);
// console.log(result); // console.log(result);
if (result == "yes") { if (result == "yes") {
console.log("DealerId=>",dealerDelete._id) console.log("DealerId=>", dealerDelete._id);
var deletePayload = { var deletePayload = {
'userId' : dealerDelete._id, userId: dealerDelete._id,
'deleteuser' : true deleteuser: true,
} };
this.contactService.deleteCostumer(deletePayload) this.contactService.deleteCostumer(deletePayload).subscribe(
.subscribe(res=>{ (res) => {
console.log(res); console.log(res);
this.serviceResponse = "User Deleted"; this.serviceResponse = "User Deleted";
this.errorMsg =true; this.errorMsg = true;
this.dealerDetail(); this.dealerDetail();
var success = setTimeout(function(){ var success = setTimeout(function () {
clearInterval(success); clearInterval(success);
that.errorMsg = false; that.errorMsg = false;
},5000) }, 5000);
},
},err=>{ (err) => {
this.serviceResponse = "Please try after somrtime"; this.serviceResponse = "Please try after somrtime";
var error = setTimeout(function(){ var error = setTimeout(function () {
clearInterval(error); clearInterval(error);
that.errorMsg = false; that.errorMsg = false;
},5000) }, 5000);
}) }
);
} }
if (result == "no") { if (result == "no") {
console.log(result); console.log(result);
} }
}); });
} }
dealerToken: any; dealerToken: any;
// dealer switch function // dealer switch function
dealerSwitch(dlr) { dealerSwitch(dlr) {
// console.log(dlr); // console.log(dlr);
localStorage.setItem("DealerObj=>", dlr._id); localStorage.setItem("DealerObj=>", dlr._id);
localStorage.setItem("addDev", 'yes'); localStorage.setItem("addDev", "yes");
localStorage.removeItem("in1"); localStorage.removeItem("in1");
this.contactService.getcustToken(dlr._id).subscribe( this.contactService.getcustToken(dlr._id).subscribe((data) => {
data => { this.dealerToken = data;
this.dealerToken = data var superAdminToken = localStorage.getItem("token");
var superAdminToken = localStorage.getItem('token'); localStorage.setItem("superAdminToken", superAdminToken);
localStorage.setItem('superAdminToken', superAdminToken); localStorage.setItem("token", this.dealerToken.custumer_token);
localStorage.setItem('token', this.dealerToken.custumer_token);
var chkPP = localStorage.getItem('profilePic'); var chkPP = localStorage.getItem("profilePic");
if(chkPP != null){ if (chkPP != null) {
localStorage.removeItem('profilePic'); localStorage.removeItem("profilePic");
} }
localStorage.removeItem('devices'); localStorage.removeItem("devices");
window.localStorage['DataUpdate'] = 'True'; window.localStorage["DataUpdate"] = "True";
window.localStorage['Dealer'] = 'ON'; window.localStorage["Dealer"] = "ON";
localStorage.setItem('superadmin', "ON"); localStorage.setItem("superadmin", "ON");
if ((window.localStorage["DataLoaded"] = "True")) {
if (window.localStorage['DataLoaded'] = 'True') { this.router.navigateByUrl("const?_status=" + "OK");
console.log("const?_status=ok");
this.router.navigateByUrl("const?_status=" + "OK");
} }
}); });
} }
@ -382,96 +495,82 @@ this.router.navigateByUrl("const?_status=" + "OK");
this.lastcall = true; this.lastcall = true;
this.firstcall = false; this.firstcall = false;
} }
} }
searchFilter(text: string) { searchFilter(text: string) {
this.modelChanged.next(text); this.modelChanged.next(text);
} }
viewDocuments(docs){ viewDocuments(docs) {
console.log("Documents=>", docs); console.log("Documents=>", docs);
var that =this; var that = this;
docs.ID = 'viewDoc'; docs.ID = "viewDoc";
console.log(docs); console.log(docs);
let dialogRef = this.dialog.open(EditCostumerComponent, { let dialogRef = this.dialog.open(EditCostumerComponent, {
width: '900px', width: "900px",
data: { dealer_payload: docs } data: { dealer_payload: docs },
}); });
dialogRef.afterClosed().subscribe((result) => {
dialogRef.afterClosed().subscribe(result => {
if (result == "yes") { if (result == "yes") {
} }
if (result == "no") { if (result == "no") {
} }
if(result == 'imageupdated'){ if (result == "imageupdated") {
swal( swal("Updated", "Documents has been Updated.", "success");
'Updated', this.dealerDetail();
'Documents has been Updated.',
'success'
)
this.dealerDetail()
} }
}); });
} }
showMenu = environment.showLandingpageMenu; showMenu = environment.showLandingpageMenu;
showDemoVideo(){ showDemoVideo() {
let split1 = document.URL.split('//')[1]; let split1 = document.URL.split("//")[1];
console.log(split1,document); console.log(split1, document);
let split2 = split1.split('/')[0]; let split2 = split1.split("/")[0];
let splitForStyle = split1.split('/')[1]; let splitForStyle = split1.split("/")[1];
this.url = split2; this.url = split2;
console.log("split2",this.url); console.log("split2", this.url);
for (var i = 0; i < this.showMenu.length; i++) {
for(var i = 0; i <this.showMenu.length;i++){ if (this.url == "www.oneqlik.in") {
if (this.url == 'www.oneqlik.in') {
this.showNav = true; this.showNav = true;
return; return;
} else { } else {
this.showNav = false; this.showNav = false;
} }
} }
} }
data_descip :any; data_descip: any;
user_permission(dealer){ user_permission(dealer) {
console.log("user Account"); console.log("user Account");
console.log("Inside reset",dealer); console.log("Inside reset", dealer);
let dialogRef = this.dialog.open(DealerPermissionComponent, { let dialogRef = this.dialog.open(DealerPermissionComponent, {
width: '400px', width: "400px",
data : dealer data: dealer,
// height: '600px', // height: '600px',
}); });
function launch_toast() { function launch_toast() {
// console.log(divid); // console.log(divid);
var x = document.getElementById("toast") var x = document.getElementById("toast");
//console.log(x); //console.log(x);
x.className = "show"; x.className = "show";
setTimeout(function () { x.className = x.className.replace("show", ""); }, 4500); setTimeout(function () {
x.className = x.className.replace("show", "");
}, 4500);
} }
dialogRef.afterClosed().subscribe(result => { dialogRef.afterClosed().subscribe((result) => {
// console.log(result); // console.log(result);
if (result == "succ") { if (result == "succ") {
// this.tost1("password_changed"); // this.tost1("password_changed");
this.data_descip = "Dealer Permission set !!!"; this.data_descip = "Dealer Permission set !!!";
launch_toast(); launch_toast();
this.ngOnInit(); this.ngOnInit();
} }
if (result == "close") { if (result == "close") {
@ -479,9 +578,8 @@ this.router.navigateByUrl("const?_status=" + "OK");
}); });
} }
// testOpenLayerMap // testOpenLayerMap
osMap : any; osMap: any;
// testOpenLayerMap() { // testOpenLayerMap() {
// this.contactService.getlatLong().subscribe(res => { // this.contactService.getlatLong().subscribe(res => {
@ -506,10 +604,6 @@ this.router.navigateByUrl("const?_status=" + "OK");
// }); // });
// }) // })
// } // }
// simpleReverseGeocoding(lon, lat) { // simpleReverseGeocoding(lon, lat) {
@ -521,41 +615,40 @@ this.router.navigateByUrl("const?_status=" + "OK");
// }) // })
// } // }
addPoints(data) {
addPoints(data){
let dialogRef = this.dialog.open(PointShareComponent, { let dialogRef = this.dialog.open(PointShareComponent, {
width: '300px', width: "300px",
data: {"userInfo":data} data: { userInfo: data },
}); });
dialogRef.afterClosed().subscribe(result => { dialogRef.afterClosed().subscribe((result) => {
// console.log(result); // console.log(result);
if(result == 'added'){ if (result == "added") {
this.data_descip = "Point Added"; this.data_descip = "Point Added";
launch_toast(); launch_toast();
} }
function launch_toast() { function launch_toast() {
// console.log(divid); // console.log(divid);
var x = document.getElementById("toast") var x = document.getElementById("toast");
//console.log(x); //console.log(x);
x.className = "show"; x.className = "show";
setTimeout(function(){ x.className = x.className.replace("show", ""); }, 4500); setTimeout(function () {
x.className = x.className.replace("show", "");
}, 4500);
} }
}) });
} }
availablePoint(dObj) {
availablePoint(dObj){
// console.log('dObj=>',dObj); // console.log('dObj=>',dObj);
var avlpoint = dObj.point_Allocated - (dObj.point_Shared_Other + dObj.total_vehicle) var avlpoint =
return avlpoint ; dObj.point_Allocated - (dObj.point_Shared_Other + dObj.total_vehicle);
return avlpoint;
} }
// exportPdf(){ // exportPdf(){
// html2canvas(document.getElementById('deviceTable'), { // html2canvas(document.getElementById('deviceTable'), {
// onrendered: function (canvas) { // onrendered: function (canvas) {
// var data = canvas.toDataURL(); // var data = canvas.toDataURL();
@ -570,16 +663,21 @@ this.router.navigateByUrl("const?_status=" + "OK");
// } // }
// }); // });
// } // }
exportPdf(){ exportPdf() {
var customers = []; var customers = [];
var data_heading = ['Name','Email','Phone','User ID','Password',]; var data_heading = ["Name", "Email", "Phone", "User ID", "Password"];
customers.push(data_heading); customers.push(data_heading);
for(var k =0;k<this.dealers_info.length;k++){ for (var k = 0; k < this.dealers_info.length; k++) {
var colData = [(this.dealers_info[k].first_name + " "+ this.dealers_info[k].last_name),this.dealers_info[k].email,this.dealers_info[k].phone,this.dealers_info[k].user_id?this.dealers_info[k].user_id:'--',this.dealers_info[k].pass?this.dealers_info[k].pass:'--'] var colData = [
this.dealers_info[k].first_name + " " + this.dealers_info[k].last_name,
this.dealers_info[k].email,
this.dealers_info[k].phone,
this.dealers_info[k].user_id ? this.dealers_info[k].user_id : "--",
this.dealers_info[k].pass ? this.dealers_info[k].pass : "--",
];
customers.push(colData); customers.push(colData);
} }
// var json = '[["Customer Id","Name","Country"],[1,"John Hammond","United States"],[2,"Mudassar Khan","India"],[3,"Suzanne Mathews","France"],[4,"Robert Schidner","Russia"]]'; // var json = '[["Customer Id","Name","Country"],[1,"John Hammond","United States"],[2,"Mudassar Khan","India"],[3,"Suzanne Mathews","France"],[4,"Robert Schidner","Russia"]]';
@ -600,13 +698,11 @@ this.router.navigateByUrl("const?_status=" + "OK");
for (var i = 0; i < columnCount; i++) { for (var i = 0; i < columnCount; i++) {
var headerCell = document.createElement("TH"); var headerCell = document.createElement("TH");
headerCell.innerHTML = customers[0][i] headerCell.innerHTML = customers[0][i];
console.log(); console.log();
row.appendChild(headerCell); row.appendChild(headerCell);
} }
//Add the data rows. //Add the data rows.
for (var i = 1; i < customers.length; i++) { for (var i = 1; i < customers.length; i++) {
row = table.insertRow(-1); row = table.insertRow(-1);
@ -616,7 +712,6 @@ this.router.navigateByUrl("const?_status=" + "OK");
} }
} }
//Append the Table to the HTML DIV. //Append the Table to the HTML DIV.
var dvTable = document.getElementById("dvTable"); var dvTable = document.getElementById("dvTable");
dvTable.innerHTML = ""; dvTable.innerHTML = "";
@ -625,70 +720,71 @@ this.router.navigateByUrl("const?_status=" + "OK");
console.log(table); console.log(table);
//Convert Table to PDF. //Convert Table to PDF.
html2canvas(document.getElementById('dvTable'), { html2canvas(document.getElementById("dvTable"), {
scale: 2, scale: 2,
dpi: 144, dpi: 144,
onrendered: function (canvas) { onrendered: function (canvas) {
var data = canvas.toDataURL(); var data = canvas.toDataURL();
var docDefinition = { var docDefinition = {
content: [{ content: [
{
image: data, image: data,
width: 900 width: 900,
}] },
],
}; };
pdfMake.createPdf(docDefinition).download("JSON.pdf"); pdfMake.createPdf(docDefinition).download("JSON.pdf");
//Remove the Table. //Remove the Table.
dvTable.innerHTML = ""; dvTable.innerHTML = "";
} },
}); });
} }
dealerPhone(dlr){ dealerPhone(dlr) {
var dphn = ''; var dphn = "";
if(dlr.std_code != undefined){ if (dlr.std_code != undefined) {
dphn = '+' + dlr.std_code.dialcode + ' ' + dlr.phone ; dphn = "+" + dlr.std_code.dialcode + " " + dlr.phone;
return dphn ; return dphn;
}else{ } else {
dphn = dlr.phone ; dphn = dlr.phone;
return dphn ; return dphn;
}
} }
}
accountStatus:boolean=true; accountStatus: boolean = true;
accountStatusonChange(dealerObj,event){ accountStatusonChange(dealerObj, event) {
var that = this ; var that = this;
console.log(dealerObj,event.checked); console.log(dealerObj, event.checked);
var payload = { var payload = {
accountSuspended : event.checked, accountSuspended: event.checked,
acoountId : dealerObj._id , acoountId: dealerObj._id,
suspendedBy : 'distributer' suspendedBy: "distributer",
} };
swal("Are you sure ?", "Do you want to change account status ?").then((ans)=>{ swal("Are you sure ?", "Do you want to change account status ?").then(
(ans) => {
console.log(ans); console.log(ans);
that.contactService.accountSuspend(payload).subscribe(res=>{ that.contactService.accountSuspend(payload).subscribe((res) => {
console.log(res); console.log(res);
that.dealerDetail(); that.dealerDetail();
that.data_descip = "Account Status Changed"; that.data_descip = "Account Status Changed";
launch_toast(); launch_toast();
function launch_toast() { function launch_toast() {
// console.log(divid); // console.log(divid);
var x = document.getElementById("toast") var x = document.getElementById("toast");
//console.log(x); //console.log(x);
x.className = "show"; x.className = "show";
setTimeout(function(){ x.className = x.className.replace("show", ""); }, 4500); setTimeout(function () {
x.className = x.className.replace("show", "");
}, 4500);
} }
}) });
},
},err=>{ (err) => {
that.dealerDetail(); that.dealerDetail();
console.log(err); console.log(err);
}); }
);
}
} }
}

View file

@ -0,0 +1,288 @@
<div class="topDiv">
<div class="card">
<div class="card-header">
<h4>
Update Device Inventory
<button type="button" class="close pull-right" (click)="closeModal()">
<i class="fas fa-arrow-circle-left"></i>
</button>
</h4>
</div>
<div class="card-body">
<form [formGroup]="deviceForm1" (ngSubmit)="submit()">
<div class="form-row">
<div class="form-group col-md-4">
<label for="inputEmail4">OWNER</label> <span>*</span>
<input formControlName="ownerName1" type="text" class="form-control" id="inputEmail4"
placeholder="Please Enter Owner Name"
readonly />
<!-- <div *ngIf="submitted && f.ownerName1.errors" class="invalid-feedback">
<div *ngIf="f.ownerName1.errors.required">
Owner Name is required
</div>
</div> -->
</div>
<div class="form-group col-md-4">
<label for="inputIMEI">IEMI</label> <span>*</span>
<input formControlName="imei" type="text" class="form-control" id="inputIMEI"
placeholder="Please Enter Imei" [ngClass]="{ 'is-invalid': submitted && f.imei.errors }" />
<div *ngIf="submitted && f.imei.errors" class="invalid-feedback">
<div *ngIf="f.imei.errors.required">
IEMI is required
</div>
<div *ngIf="f.imei.errors.pattern">
Please enter valid imei number
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputUpload">Uploaded By</label> <span>*</span>
<input formControlName="uploaded_By" type="text" class="form-control" id="inputUpload"
placeholder="Please Enter Uploaded by"
readonly />
<!-- <div *ngIf="submitted && f.uploaded_By.errors" class="invalid-feedback">
<div *ngIf="f.uploaded_By.errors.required">
Uploaded By is required
</div>
</div> -->
</div>
<div class="form-group col-md-4">
<label for="inputUploadDate">Upload Date</label> <span>*</span>
<input
formControlName="uploaded_Date"
bsDatepicker
[bsConfig]="bsConfig"
type="text"
class="form-control"
id="inputUploadDate"
[ngClass]="{ 'is-invalid': submitted && f.uploaded_Date.errors }"
placeholder="Select date"
/>
<div *ngIf="submitted && f.uploaded_Date.errors" class="invalid-feedback">
<div *ngIf="f.uploaded_Date.errors.required">
Date is Required
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputBillDate">Bill Date</label> <span>*</span>
<input
formControlName="billDate"
bsDatepicker
[bsConfig]="bsConfig"
type="text"
class="form-control"
id="inputBillDate"
/>
<!-- <input formControlName="billDate" type="text" class="form-control" id="inputBillDate"
placeholder="Please Select date"
[ngClass]="{ 'is-invalid': submitted && f.billDate.errors }" /> -->
<div *ngIf="submitted && f.billDate.errors" class="invalid-feedback">
<div *ngIf="f.billDate.errors.required">
Bill date is required
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputBillNo">Bill Number</label> <span>*</span>
<input formControlName="billNumber" type="text" class="form-control" id="inputBillNo"
placeholder="Please Enter Bill Number" [ngClass]="{ 'is-invalid': submitted && f.billNumber.errors }" />
<div *ngIf="submitted && f.billNumber.errors" class="invalid-feedback">
<div *ngIf="f.billNumber.errors.required">
IEMI is required
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputState">State</label> <span>*</span>
<input formControlName="state" type="text" class="form-control" id="inputState"
placeholder="Please Enter State" [ngClass]="{ 'is-invalid': submitted && f.state.errors }" />
<div *ngIf="submitted && f.state.errors" class="invalid-feedback">
<div *ngIf="f.state.errors.required">
State is Required
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputSimValidity">SIM Validity</label> <span>*</span>
<input formControlName="eSim_Validity" type="text" class="form-control" id="inputSimValidity"
placeholder="Please Enter Imei" [ngClass]="{ 'is-invalid': submitted && f.eSim_Validity.errors }" />
<div *ngIf="submitted && f.eSim_Validity.errors" class="invalid-feedback">
<div *ngIf="f.eSim_Validity.errors.required">
SIM Validity is required
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputDeviceModal">Device Modal</label> <span>*</span>
<input formControlName="deviceModal" type="text" class="form-control" id="inputDeviceModal"
placeholder="Please Enter Device Modal" [ngClass]="{ 'is-invalid': submitted && f.deviceModal.errors }" />
<div *ngIf="submitted && f.deviceModal.errors" class="invalid-feedback">
<div *ngIf="f.deviceModal.errors.required">
Device modal is required
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputSerialNo">Serial Number</label> <span>*</span>
<input formControlName="serial" type="text" class="form-control" id="inputSerialNo"
placeholder="Please Enter Serial Number" [ngClass]="{ 'is-invalid': submitted && f.serial.errors }" />
<div *ngIf="submitted && f.serial.errors" class="invalid-feedback">
<div *ngIf="f.serial.errors.required">
Serial Number is required
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputiccid">Iccid Number</label> <span>*</span>
<input formControlName="iccid_No" type="text" class="form-control" id="inputiccid"
placeholder="Please Enter Imei" [ngClass]="{ 'is-invalid': submitted && f.iccid_No.errors }" />
<div *ngIf="submitted && f.iccid_No.errors" class="invalid-feedback">
<div *ngIf="f.iccid_No.errors.required">
Iccid Number is required
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputmob1">Mob1</label> <span>*</span>
<input formControlName="mob1" type="text" class="form-control" id="inputmob1"
placeholder="Please Enter Mobile Number" [ngClass]="{ 'is-invalid': submitted && f.mob1.errors }" />
<div *ngIf="submitted && f.mob1.errors" class="invalid-feedback">
<div *ngIf="f.mob1.errors.required">
Mobile number is required
</div>
<div *ngIf="f.mob1.errors.pattern">
Please enter valid Mobile No
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputmob2">Mob2</label> <span>*</span>
<input formControlName="mob2" type="text" class="form-control" id="inputmob2"
placeholder="Please Enter Mobile Number" [ngClass]="{ 'is-invalid': submitted && f.mob2.errors }" />
<div *ngIf="submitted && f.mob2.errors" class="invalid-feedback">
<div *ngIf="f.mob2.errors.required">
Mobile number is required
</div>
<div *ngIf="f.mob2.errors.pattern">
Please enter valid Mobile No
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputStatus">Status</label> <span>*</span>
<input formControlName="status" type="text" class="form-control" id="inputStatus"
placeholder="Please Enter Status" [ngClass]="{ 'is-invalid': submitted && f.status.errors }" />
<div *ngIf="submitted && f.status.errors" class="invalid-feedback">
<div *ngIf="f.status.required">
Status is required
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputVendor">Vendor Name</label>
<input formControlName="vendor" type="text" class="form-control" id="inputVendor"
placeholder="Please Enter Vendor Name" [ngClass]="{ 'is-invalid': submitted && f.vendor.errors }" />
<div *ngIf="submitted && f.vendor.errors" class="invalid-feedback">
<div *ngIf="f.vendor.errors.required">
Vendor Name is required
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputPurchase">Purchase Date</label>
<input
formControlName="purchase"
bsDatepicker
[bsConfig]="bsConfig"
type="text"
class="form-control"
id="inputPurchase"
[ngClass]="{ 'is-invalid': submitted && f.purchase.errors }"
placeholder="Select Date"
/>
<!-- <input formControlName="purchase" type="text" class="form-control" id="inputPurchase"
placeholder="Please select purchase date" [ngClass]="{ 'is-invalid': submitted && f.purchase.errors }" /> -->
<div *ngIf="submitted && f.purchase.errors" class="invalid-feedback">
<div *ngIf="f.purchase.errors.required">
Purchase Date is required
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputSold">Sold Date</label>
<input
formControlName="sold"
bsDatepicker
[bsConfig]="bsConfig"
type="text"
class="form-control"
id="inputSold"
[ngClass]="{ 'is-invalid': submitted && f.sold.errors }"
placeholder="Select Date "
/>
<!-- <input formControlName="sold" type="text" class="form-control" id="inputSold"
placeholder="Please select sold date" [ngClass]="{ 'is-invalid': submitted && f.sold.errors }" /> -->
<div *ngIf="submitted && f.sold.errors" class="invalid-feedback">
<div *ngIf="f.sold.errors.required">
Sold Date is required
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputactivation">Activation Date</label>
<input
formControlName="activation"
bsDatepicker
[bsConfig]="bsConfig"
type="text"
class="form-control"
id="inputactivation"
[ngClass]="{ 'is-invalid': submitted && f.activation.errors }"
placeholder="Select Date"
/>
<!-- <input formControlName="activation" type="text" class="form-control" id="inputactivation"
placeholder="Please select activation date" [ngClass]="{ 'is-invalid': submitted && f.activation.errors }" /> -->
<div *ngIf="submitted && f.activation.errors" class="invalid-feedback">
<div *ngIf="f.activation.errors.required">
Activation date is required
</div>
</div>
</div>
</div>
</form>
<div class="card-footer text-center">
<button type="submit" class="btn btn-primary" (click)="submit()">
Update Device
</button>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,6 @@
.topDiv {
height: 90vh;
padding-left: 4px;
padding-right: 3px;
}

View file

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DeviceInventoryEditPopupComponent } from './device-inventory-edit-popup.component';
describe('DeviceInventoryEditPopupComponent', () => {
let component: DeviceInventoryEditPopupComponent;
let fixture: ComponentFixture<DeviceInventoryEditPopupComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DeviceInventoryEditPopupComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DeviceInventoryEditPopupComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,147 @@
import { Component, Inject, Input, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { BsDatepickerConfig, BsModalRef, BsModalService } from 'ngx-bootstrap';
import {
MdDialog,
MdDialogRef,
MD_DIALOG_DATA,
MdTabChangeEvent,
} from "@angular/material";
import { ContactService } from '../contact.service';
declare var swal: any;
@Component({
selector: 'app-device-inventory-edit-popup',
templateUrl: './device-inventory-edit-popup.component.html',
styleUrls: ['./device-inventory-edit-popup.component.scss']
})
export class DeviceInventoryEditPopupComponent implements OnInit {
failedDevices:any =[];
// imei:any;
// owner:any
// uploaded_By:any
// uploaded_Date:any
// billDate:any
// bllNumber:any
// state:any
// eSim_Validity:any
// deviceModal :any
// serial :any
// iccid_No:any
// mob1:any
// mob2:any
// status:any
// vendor:any
// purchase :any
// sold :any
// activation:any;
submitted= false;
deviceForm1:FormGroup;
activationDate: any;
useridd: any;
constructor(public dialogRef: MdDialogRef<DeviceInventoryEditPopupComponent>,
@Inject(MD_DIALOG_DATA) public data: any, private contactService: ContactService,private fb:FormBuilder) {
this.failedDevices = data;
}
bsConfig: Partial<BsDatepickerConfig>;
db_token: any;
ngOnInit() {
this.db_token = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
);
this.useridd = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
)._id;
console.log('userid',this.useridd)
console.log("this.db_token=>", this.db_token);
var fname=this.failedDevices.deviceObject.Owner?this.failedDevices.deviceObject.Owner.first_name?this.failedDevices.deviceObject.Owner.first_name:'':"";
var lname=this.failedDevices.deviceObject.Owner?this.failedDevices.deviceObject.Owner.last_name?this.failedDevices.deviceObject.Owner.last_name:'':""
this.activationDate = this.failedDevices.deviceObject.Activation_date
? new Date(this.failedDevices.deviceObject.Activation_date)
: 'NA';
this.deviceForm1 = this.fb.group({
ownerName1: [fname + ' ' + lname,Validators.required],
imei:[this.failedDevices.deviceObject.IMEI,[Validators.required,Validators.pattern('[0-9 ]{15}')]],
uploaded_By:[this.failedDevices.deviceObject.uploaded_by.first_name + " " + this.failedDevices.deviceObject.uploaded_by.last_name,Validators.required],
uploaded_Date:[this.failedDevices.deviceObject.Uploaded_date ? new Date(this.failedDevices.deviceObject.Uploaded_date): '',Validators.required],
billDate:[this.failedDevices.deviceObject['BillDate'] ? new Date(this.failedDevices.deviceObject['BillDate']):'',Validators.required],
billNumber:[this.failedDevices.deviceObject['BillNo'],Validators.required],
state:[this.failedDevices.deviceObject['State'],Validators.required],//readable
eSim_Validity:[this.failedDevices.deviceObject['eSIMValidaity']],
deviceModal :[this.failedDevices.deviceObject['DeviceModelNo'],Validators.required],
serial :[this.failedDevices.deviceObject['SerialNo'],Validators.required],
iccid_No:[this.failedDevices.deviceObject['IccidNo'],Validators.required],
mob1:[this.failedDevices.deviceObject['Mob1'],[Validators.required,Validators.pattern('[0-9 ]{13}')]],
mob2:[this.failedDevices.deviceObject['Mob2'],[Validators.required,Validators.pattern('[0-9 ]{13}')]],
status:[this.failedDevices.deviceObject.Status,Validators.required],
vendor:[this.failedDevices.deviceObject.Vendor_Name],
purchase :[this.failedDevices.deviceObject.Purchase_date ? new Date (this.failedDevices.deviceObject.Purchase_date): ''],
sold :[this.failedDevices.deviceObject.Sold_date ? new Date(this.failedDevices.deviceObject.Sold_date) : ''],
activation:[this.failedDevices.deviceObject.Activation_date ? new Date(this.failedDevices.deviceObject.Activation_date):''],
});
console.log("DEVICEFORM=>",this.deviceForm1);
}
closeModal(): void {
this.dialogRef.close();
}
get f() { return this.deviceForm1.controls; }
submit(){
debugger
this.submitted = true;
if (this.deviceForm1.invalid) {
console.log('working');
return;
}
var data = {
"IMEI": this.deviceForm1.value.imei,
// "Vendor_Name":this.deviceForm1.value.vendor,
"Uploaded_date":new Date(this.deviceForm1.value.uploaded_Date).toISOString(),
"uploaded_by":this.db_token._id,
"Status":this.deviceForm1.value.status,
// "Purchase_date":new Date(this.deviceForm1.value.purchase).toISOString(),
"BillDate" :new Date(this.deviceForm1.value.billDate).toISOString(),
"BillNo" : this.deviceForm1.value.billNumber,
"State" : this.deviceForm1.value.state,
// "eSIMValidaity" :this.deviceForm1.value.eSim_Validity,
"DeviceModelNo" :this.deviceForm1.value.deviceModal,
"SerialNo" : this.deviceForm1.value.serial,
"IccidNo" : this.deviceForm1.value.iccid_No,
"Mob1" :this.deviceForm1.value.mob1,
"Mob2" :this.deviceForm1.value.mob2,
}
if(this.deviceForm1.value.purchase){
data['Purchase_date']=this.deviceForm1.value.purchase? new Date(this.deviceForm1.value.purchase).toISOString():'';
}
if(this.deviceForm1.value.vendor){
data['Vendor_Name']=this.deviceForm1.value.vendor;
}
if(this.deviceForm1.value.eSim_Validity){
data['eSIMValidaity']= this.deviceForm1.value.eSim_Validity;
}
this.contactService.editdevInv(data)
.subscribe(
response => {
console.log('Device updated successfully:', response);
swal("Updated", "Device Inventory Updated", "success");
},
error => {
console.error('Error deleting device:', error);
}
);
console.log('updated data values',data)
this.closeModal();
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,20 +1,21 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from "@angular/core";
import { ContactService } from '../contact.service'; import { ContactService } from "../contact.service";
declare var $: any; declare var $: any;
declare var moment:any; declare var moment: any;
@Component({ @Component({
selector: 'app-device-list', selector: "app-device-list",
templateUrl: './device-list.component.html', templateUrl: "./device-list.component.html",
styleUrls: ['./device-list.component.scss'] styleUrls: ["./device-list.component.scss"],
}) })
export class DeviceListComponent implements OnInit { export class DeviceListComponent implements OnInit {
identifier='deviceList' identifier = "deviceList";
licenceStatus licenceStatus;
supAdm supAdm;
superAdm=JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id superAdm = JSON.parse(window.atob(window.localStorage.token.split(".")[1]))
fromdate ._id;
fromdate;
todate; todate;
tabelObj: any ; tabelObj: any;
Load: boolean; Load: boolean;
fs: any; fs: any;
ls: any; ls: any;
@ -23,60 +24,72 @@ export class DeviceListComponent implements OnInit {
useridd: any; useridd: any;
custtype: any; custtype: any;
devicess: any; devicess: any;
total_vech=0; total_vech = 0;
idle_vech=0; idle_vech = 0;
off_vech=0; off_vech = 0;
maintanance=0; maintanance = 0;
expiredDevices=0; expiredDevices = 0;
OutOfReach=0; OutOfReach = 0;
no_data=0; no_data = 0;
expire_status=0; expire_status = 0;
Running=0; Running = 0;
from: any; from: any;
to: any; to: any;
groupId: any; groupId: any;
DealerID: any; DealerID: any;
data data;
setTimeOut = { setTimeOut = {
value: 20, value: 20,
viewValue: "20 Seconds" viewValue: "20 Seconds",
}; };
timout = [{ timout = [
{
value: 10, value: 10,
viewValue: "10 Seconds" viewValue: "10 Seconds",
}, },
{ {
value: 20, value: 20,
viewValue: "20 Seconds" viewValue: "20 Seconds",
}, },
{ {
value: 30, value: 30,
viewValue: "30 Seconds" viewValue: "30 Seconds",
}] },
];
interval:any; interval: any;
it: number; it: number;
constructor(private contactService:ContactService) { } constructor(private contactService: ContactService) {}
ngOnInit() { ngOnInit() {
this.data= JSON.parse(localStorage.getItem('dashboardCount')) this.data = JSON.parse(localStorage.getItem("dashboardCount"));
this.to = new Date().toISOString(); this.to = new Date().toISOString();
var d = new Date(); var d = new Date();
let a = d.setHours(0, 0, 0, 0) let a = d.setHours(0, 0, 0, 0);
this.from = new Date(a).toISOString(); this.from = new Date(a).toISOString();
this.emailid = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).email; this.emailid = JSON.parse(
this.or = JSON.parse(window.atob(window.localStorage.token.split(".")[1]))._orgName; window.atob(window.localStorage.token.split(".")[1])
this.useridd = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id; ).email;
this.or = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
)._orgName;
this.useridd = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
)._id;
this.custtype = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).isDealer; this.custtype = JSON.parse(
var fuelvalue = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).fuel_unit; window.atob(window.localStorage.token.split(".")[1])
).isDealer;
var fuelvalue = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
).fuel_unit;
var today = new Date(); var today = new Date();
var startDate = new Date(today.getFullYear(), today.getMonth(), 1); var startDate = new Date(today.getFullYear(), today.getMonth(), 1);
this.fromdate=startDate; this.fromdate = startDate;
this.todate=new Date(); this.todate = new Date();
this.testTable(); this.testTable();
this.getDashbord() this.getDashbord();
// this.superAdm=JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id // this.superAdm=JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id
// this.timeIntervalRefresh(); // this.timeIntervalRefresh();
} }
@ -84,20 +97,26 @@ export class DeviceListComponent implements OnInit {
// var that=this; // var that=this;
clearInterval(this.interval); clearInterval(this.interval);
this.it = (1000 * this.setTimeOut.value); this.it = 1000 * this.setTimeOut.value;
this.interval = setInterval(() => { this.interval = setInterval(() => {
this.getDashbord() this.getDashbord();
}, this.it); }, this.it);
}
getDashbord() {
} this.contactService
.getDashboard(
getDashbord(){ this.emailid,
this.from,
this.contactService.getDashboard(this.emailid, this.from, this.to, this.superAdm, this.groupId,this.superAdm,this.DealerID).subscribe( this.to,
data => { this.superAdm,
this.devicess = data this.groupId,
this.superAdm,
this.DealerID
)
.subscribe((data) => {
this.devicess = data;
console.log(data); console.log(data);
this.total_vech = this.devicess.Total_Vech; this.total_vech = this.devicess.Total_Vech;
@ -106,194 +125,187 @@ export class DeviceListComponent implements OnInit {
this.maintanance = this.devicess["Maintance Device"]; this.maintanance = this.devicess["Maintance Device"];
this.expiredDevices = this.devicess["expire_status"]; this.expiredDevices = this.devicess["expire_status"];
this.OutOfReach = this.devicess["OutOfReach"]; this.OutOfReach = this.devicess["OutOfReach"];
this.no_data = this.devicess["no_data"]?this.devicess["no_data"]:0; this.no_data = this.devicess["no_data"] ? this.devicess["no_data"] : 0;
this.Running = this.devicess["running_devices"]; this.Running = this.devicess["running_devices"];
this.expire_status= this.devicess["expire_status"]; this.expire_status = this.devicess["expire_status"];
});
})
} }
getData() {
getData(){ var data = {
var data={ f: this.fromdate,
f:this.fromdate, t: this.todate,
t:this.todate, deviceType: "",
deviceType:'' };
} this.contactService.getVehicleList(data).subscribe((res) => {
this.contactService.getVehicleList(data).subscribe(res=>{
console.log(res); console.log(res);
});
})
} }
getReport(data){ getReport(data) {
console.log(data); console.log(data);
if(data=="getExcel"){ if (data == "getExcel" || data == "Excel") {
this.exportExcel() this.exportExcel();
} else {
}else{ this.fromdate = new Date(data.fromDate).toISOString();
this.fromdate=new Date(data.fromDate).toISOString(); this.todate = new Date(data.toDate).toISOString();
this.todate=new Date(data.toDate).toISOString(); this.licenceStatus = data.liecenceStatus;
this.licenceStatus=data.liecenceStatus; if (data.distributerSelect[0]) {
if(data.distributerSelect[0]){ this.supAdm = data.distributerSelect[0]._id;
this.supAdm=data.distributerSelect[0]._id; this.superAdm = data.distributerSelect[0]._id;
this.superAdm=data.distributerSelect[0]._id; this.getDashbord();
this.getDashbord() } else {
}else{ this.supAdm = undefined;
this.supAdm=undefined; this.superAdm = this.useridd;
this.superAdm=this.useridd; this.getDashbord();
this.getDashbord()
} }
console.log(this.fromdate,this.todate); console.log(this.fromdate, this.todate);
this.tabelObj.ajax.reload(); this.tabelObj.ajax.reload();
}
} }
testTable() {
}
testTable(){
const that = this; const that = this;
console.log("inside function"); console.log("inside function");
// that.Load = true; // that.Load = true;
$(document).ready(function() { $(document).ready(function () {
that.tabelObj = $('#deviceTable').DataTable({ that.tabelObj = $("#deviceTable").DataTable({
"processing": false, processing: false,
"searching": true, searching: true,
pagingType: 'full_numbers', pagingType: "full_numbers",
pageLength: 25, pageLength: 25,
serverSide: false, serverSide: false,
responsive: true, responsive: true,
"scrollY":'60vh', scrollY: "60vh",
"scrollCollapse": true, scrollCollapse: true,
// "deferLoading": 25 , // "deferLoading": 25 ,
lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]], lengthMenu: [
[10, 25, 50, -1],
[10, 25, 50, "All"],
],
// "rowCallback": function(row: Node, data: any | Object, index: number){ // "rowCallback": function(row: Node, data: any | Object, index: number){
ajax: (mainData,callback) => { ajax: (mainData, callback) => {
var data = {
f: that.fromdate,
t: that.todate,
deviceType: "",
licenceType: that.licenceStatus,
supAdm: that.supAdm,
};
var data={ if (that.fromdate != undefined && that.todate != undefined) {
f:that.fromdate, that.contactService.getVehicleList(data).subscribe((res) => {
t:that.todate,
deviceType:'',
licenceType:that.licenceStatus,
supAdm:that.supAdm
}
if(that.fromdate !=undefined && that.todate!=undefined){
that.contactService.getVehicleList(data).subscribe(res=>{
console.log(res); console.log(res);
that.Load = false; that.Load = false;
if(res.length!=0){ if (res.length != 0) {
callback({ data: res[0].data }); callback({ data: res[0].data });
} else {
}else{
callback({ data: [] }); callback({ data: [] });
} }
});
}) } else {
}else{
callback({ data: [] }); callback({ data: [] });
that.Load = false; that.Load = false;
} }
}, },
"columns": [ columns: [
{ {
"data": "Device_Name", data: "Device_Name",
"render": function(data, type, row) { render: function (data, type, row) {
return data?data : ''; return data ? data : "";
} },
}, },
{ {
"data": "Device_ID", data: "Device_ID",
"render": function(data, type, row) { render: function (data, type, row) {
return data?data : ''; return data ? data : "";
} },
}, },
{ {
"data": "sim_number", data: "sim_number",
"render": function (data, type, row) { render: function (data, type, row) {
return data ? data : ''; return data ? data : "";
} },
}, },
{ {
"data": "User", data: "User",
"render": function(data, type, row) { render: function (data, type, row) {
return data?(data.first_name+' '+data.last_name) : ''; return data ? data.first_name + " " + data.last_name : "";
} },
}, },
{ {
"data": "Distributer", data: "Distributer",
"render": function(data, type, row) { render: function (data, type, row) {
return data?(data.first_name+' '+data.last_name) : ''; return data ? data.first_name + " " + data.last_name : "";
} },
}, },
{ {
"data": "Distributer", data: "Distributer",
"render": function(data, type, row) { render: function (data, type, row) {
return data?(data.phone) : ''; return data ? data.phone : "";
} },
}, },
{ {
"data": "created_on", data: "created_on",
"render": function(data, type, row) { render: function (data, type, row) {
return data?(data) : ''; return data ? data : "";
} },
}, },
{ {
"data": "expiration_date", data: "expiration_date",
"render": function(data, type, row) { render: function (data, type, row) {
return data?data : ''; return data ? data : "";
} },
}, },
{ {
"data": "renew_at", data: "renew_at",
"render": function(data, type, row) { render: function (data, type, row) {
return data?(data) : ''; return data ? data : "";
} },
} },
,{ {
"data": "Dealer", data: "Dealer",
"render": function(data, type, row) { render: function (data, type, row) {
return data?(data.first_name+' '+data.last_name) : ''; return data ? data.first_name + " " + data.last_name : "";
} },
}, },
// "accountSuspended":1,"device_delete_on":1,"integrationId":1 // "accountSuspended":1,"device_delete_on":1,"integrationId":1
{ {
"data": "accountSuspended", data: "accountSuspended",
"render": function(data, type, row) { render: function (data, type, row) {
return data; return data;
} },
}, },
{ {
"data": "deletedDevice", data: "deletedDevice",
"render": function(data, type, row) { render: function (data, type, row) {
return data?'true':'false'; return data ? "true" : "false";
} },
}, },
{ {
"data": "device_delete_on", data: "device_delete_on",
"render": function(data, type, row) { render: function (data, type, row) {
return data?data : ''; return data ? data : "";
} },
}, },
{ {
"data": "integrationId", data: "integrationId",
"render": function(data, type, row) { render: function (data, type, row) {
return data?data : ''; return data ? data : "";
} },
}, },
// [5:57 PM, 7/5/2021] Job 1: creation date
// [5:57 PM, 7/5/2021] Job 1: creation date // [5:57 PM, 7/5/2021] Job 1: dealer name
// [5:57 PM, 7/5/2021] Job 1: dealer name // [5:59 PM, 7/5/2021] Job 1: Organization name
// [5:59 PM, 7/5/2021] Job 1: Organization name
], ],
"columnDefs": [ columnDefs: [
{ className: "dt-body-left", "targets": [ 0,1,2,3,4,5,6,7,8,9,10,11] }, {
className: "dt-body-left",
targets: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
},
// { // {
// "targets": '_all', // "targets": '_all',
// "createdCell": function (td, cellData, rowData, row, col) { // "createdCell": function (td, cellData, rowData, row, col) {
@ -318,51 +330,44 @@ export class DeviceListComponent implements OnInit {
// data: null, // data: null,
// defaultContent: '<div class="btn-group"> <button (click)="show()">view</button></div>' // defaultContent: '<div class="btn-group"> <button (click)="show()">view</button></div>'
// }, // },
] , order: [[ 3, 'desc' ], [ 0, 'asc' ]] ],
order: [
[3, "desc"],
[0, "asc"],
],
}); });
}); });
}
} tab: any;
exportExcel() {
tab:any;
exportExcel()
{
console.log("Export"); console.log("Export");
var tab_text = "<table border='2px'><tr bgcolor='#87AFC6'>";
var tab_text="<table border='2px'><tr bgcolor='#87AFC6'>"; var textRange;
var textRange; var j=0; var j = 0;
var table = $('#deviceTable').clone(); var table = $("#deviceTable").clone();
table[0].querySelector("thead").remove(); table[0].querySelector("thead").remove();
table[0].prepend($(".dataTable thead").clone()[0]); table[0].prepend($(".dataTable thead").clone()[0]);
this.tab = table[0]; this.tab = table[0];
console.log(this.tab); console.log(this.tab);
for (j = 0; j < this.tab.rows.length; j++) {
for(j = 0 ; j < this.tab.rows.length ; j++) tab_text = tab_text + this.tab.rows[j].innerHTML + "</tr>";
{
tab_text=tab_text+this.tab.rows[j].innerHTML+"</tr>";
} }
tab_text=tab_text+"</table>"; tab_text = tab_text + "</table>";
tab_text= tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); tab_text = tab_text.replace(/<input[^>]*>|<\/input>/gi, "");
var ua = window.navigator.userAgent; var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE "); var msie = ua.indexOf("MSIE ");
var sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text)); var sa = window.open(
"data:application/vnd.ms-excel," + encodeURIComponent(tab_text)
);
return (sa); return sa;
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -118,6 +118,7 @@ errorDialog:boolean = false;
tableArr =[]; tableArr =[];
acObject:any=[]; acObject:any=[];
ac_report(){ ac_report(){
debugger
this.acObject =[]; this.acObject =[];
this.Load = true; this.Load = true;
console.log(this.dataSelect); console.log(this.dataSelect);

View file

@ -160,6 +160,7 @@ export class DayWiseReportComponent implements OnInit {
"scrollCollapse": true, "scrollCollapse": true,
lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]], lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
ajax: (dataTablesParameters, callback) => { ajax: (dataTablesParameters, callback) => {
debugger
console.log('temptemptemptemptemp', dataTablesParameters); console.log('temptemptemptemptemp', dataTablesParameters);
var deviceID; var deviceID;
that.Load = true; that.Load = true;

View file

@ -1,60 +1,127 @@
<div class="navbar navbar-default" style="margin-left: -15px; margin-top: -8px">
<div class="navbar navbar-default" style="margin-left: -15px;margin-top: -8px;"> <app-all-menus *ngIf="!token_identifier"></app-all-menus>
<app-all-menus *ngIf="!token_identifier"></app-all-menus>
</div> </div>
<div style="margin-top: 30px;"> <div style="margin-top: 30px">
<div
<div *ngIf="show" id="mySidebar" class="sidebar" style="background: white; *ngIf="show"
box-shadow: 3px 1px 5px 0px #b2b0ae;"> id="mySidebar"
class="sidebar db-fuel-101"
style="background: white; box-shadow: 3px 1px 5px 0px #b2b0ae"
>
<!-- <button class="close pull-right" (click)="closeNav()"><i class="fas fa-times"></i></button> --> <!-- <button class="close pull-right" (click)="closeNav()"><i class="fas fa-times"></i></button> -->
<!-- <app-report-filter></app-report-filter> --> <!-- <app-report-filter></app-report-filter> -->
<div class="row" style="margin: 0;padding-bottom: 10px;"> <div class="row" style="margin: 0; padding-bottom: 10px">
<div class="col-sm-3 col-md-3 col-lg-3" style="padding-left: 0;"> <div class="col-sm-3 col-md-3 col-lg-3" style="padding-left: 0">
<p style="margin-bottom: 0; padding-top: 2px;font-size: 12px">{{"Vehicle" | translate}} :</p> <p style="margin-bottom: 0; padding-top: 2px; font-size: 12px">
{{ "Vehicle" | translate }} :
</p>
</div> </div>
<div class="col-sm-9 col-md-9 col-lg-9" style="padding: 0;"> <div class="col-sm-9 col-md-9 col-lg-9" style="padding: 0">
<div> <div>
<select id="dbselect" multiple="multiple"> <select id="dbselect" multiple="multiple">
<option *ngFor="let option_1 of options" [value]="option_1.selectedValue">{{ option_1.value }}</option> <option
*ngFor="let option_1 of options"
[value]="option_1.selectedValue"
>
{{ option_1.value }}
</option>
</select> </select>
</div> </div>
</div> </div>
</div> </div>
<div class="row" style="margin: 0;padding-bottom: 10px;"> <div class="row" style="margin: 0; padding-bottom: 10px">
<div class="col-sm-12 col-md-12 col-lg-12" style="padding-right: 0%;padding-left: 0;"> <div
class="col-sm-12 col-md-12 col-lg-12"
style="padding-right: 0%; padding-left: 0"
>
<!-- timefilter icons --> <!-- timefilter icons -->
<div class="btn-group btn-group-sm" role="group" aria-label="Basic example" style="width:100%;"> <div
<button type="button" style="width:25%;border-right: 2px solid white;" class="btn btn-secondary animateClass_4" class="btn-group btn-group-sm"
(click)="changeDate('today')">{{'Today' | translate}}</button> role="group"
<button type="button" style="width:25%;border-right: 2px solid white;" class="btn btn-secondary animateClass_5" aria-label="Basic example"
(click)="changeDate('yesterday')">{{'Yesterday' | translate}}</button> style="width: 100%"
<button type="button" style="width:25%;border-right: 2px solid white;" class="btn btn-secondary animateClass_6" >
(click)="changeDate('week')">{{'Week' | translate}}</button> <button
<button type="button" style="width:25%;" class="btn btn-secondary animateClass_7" (click)="changeDate('month')">{{'Month' | translate}}</button> type="button"
style="width: 25%; border-right: 2px solid white"
class="btn btn-secondary animateClass_4"
(click)="changeDate('today')"
>
{{ "Today" | translate }}
</button>
<button
type="button"
style="width: 25%; border-right: 2px solid white"
class="btn btn-secondary animateClass_5"
(click)="changeDate('yesterday')"
>
{{ "Yesterday" | translate }}
</button>
<button
type="button"
style="width: 25%; border-right: 2px solid white"
class="btn btn-secondary animateClass_6"
(click)="changeDate('week')"
>
{{ "Week" | translate }}
</button>
<button
type="button"
style="width: 25%"
class="btn btn-secondary animateClass_7"
(click)="changeDate('month')"
>
{{ "Month" | translate }}
</button>
</div> </div>
</div> </div>
</div> </div>
<div class="row" style="margin: 0;padding-bottom: 10px;padding-right: 3px;"> <div
<div class="col-sm-3 col-md-3 col-lg-3" style="padding-left: 0;"> class="row"
style="margin: 0; padding-bottom: 10px; padding-right: 3px"
>
<div class="col-sm-3 col-md-3 col-lg-3" style="padding-left: 0">
<!-- from time label--> <!-- from time label-->
<span style="margin-bottom: 0%;font-size: 12px;"> {{'From' | translate}} :</span> <span style="margin-bottom: 0%; font-size: 12px">
{{ "From" | translate }} :</span
>
</div> </div>
<div class="col-sm-9 col-md-9 col-lg-9" style="padding:0px"> <div class="col-sm-9 col-md-9 col-lg-9" style="padding: 0px">
<!-- from datetime picker --> <!-- from datetime picker -->
<input id="from_date" bsDatepicker class="form-control form-control-sm" style="height: 25px;" [bsConfig]="bsConfig" <input
[(ngModel)]="from_date" type="text"> id="from_date"
bsDatepicker
class="form-control form-control-sm"
style="height: 25px"
[bsConfig]="bsConfig"
[(ngModel)]="from_date"
type="text"
/>
</div> </div>
</div> </div>
<div class="row" style="margin: 0;padding-bottom: 10px;padding-right: 3px;"> <div
<div class="col-sm-3 col-md-3 col-lg-3" style="padding-left: 0;"> class="row"
style="margin: 0; padding-bottom: 10px; padding-right: 3px"
>
<div class="col-sm-3 col-md-3 col-lg-3" style="padding-left: 0">
<!-- tolabel --> <!-- tolabel -->
<span style="margin-bottom: 0%;font-size: 12px;">{{"To" | translate}} :</span> <span style="margin-bottom: 0%; font-size: 12px"
>{{ "To" | translate }} :</span
>
</div> </div>
<div class="col-sm-9 col-md-9 col-lg-9" style="padding:0px"> <div class="col-sm-9 col-md-9 col-lg-9" style="padding: 0px">
<!-- tolabel picker --> <!-- tolabel picker -->
<input id="to_date" bsDatepicker class="form-control form-control-sm" style="height: 25px;" [bsConfig]="bsConfig" <input
name="todate" [(ngModel)]="to_date" type="text"> id="to_date"
bsDatepicker
class="form-control form-control-sm"
style="height: 25px"
[bsConfig]="bsConfig"
name="todate"
[(ngModel)]="to_date"
type="text"
/>
</div> </div>
</div> </div>
<!-- <div class="row" style="margin: 0;padding-bottom: 10px;padding-right: 3px;"> <!-- <div class="row" style="margin: 0;padding-bottom: 10px;padding-right: 3px;">
@ -66,15 +133,32 @@
</div> --> </div> -->
<div class="dropdown"> <div class="dropdown">
<button style="background-color: #1556b9;color:#fdfdfd;" md-raised-button (click)="reportFilter('data')">{{'Search' | <button
translate}}</button> style="background-color: #1556b9; color: #fdfdfd"
<button style="background-color: #cc0000;color:#fdfdfd;" md-raised-button class="dropdown-toggle" type="button" md-raised-button
id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> (click)="reportFilter('data')"
{{ 'Export To' |translate}} >
{{ "Search" | translate }}
</button>
<button
style="background-color: #cc0000; color: #fdfdfd"
md-raised-button
class="dropdown-toggle"
type="button"
id="dropdownMenuButton"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
{{ "Export To" | translate }}
</button> </button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a style="cursor: pointer;" class="dropdown-item" (click)="exportExel()"><i class="far fa-file-excel"></i> Excel</a> <a style="cursor: pointer" class="dropdown-item" (click)="exportExel()"
<a style="cursor: pointer;" class="dropdown-item" (click)="exportPDF()"><i class="far fa-file-pdf"></i> PDF</a> ><i class="far fa-file-excel"></i> Excel</a
>
<a style="cursor: pointer" class="dropdown-item" (click)="exportPDF()"
><i class="far fa-file-pdf"></i> PDF</a
>
</div> </div>
</div> </div>
</div> </div>
@ -82,47 +166,77 @@
<div id="line" class="line"></div> <div id="line" class="line"></div>
<div class="wordwrapper"> <div class="wordwrapper">
<div id="line1" class="word"> <div id="line1" class="word">
<i style="color: floralwhite;" *ngIf="showLine" class="fas fa-chevron-circle-right" (click)="openNav()"></i> <i
<i style="color: black;font-size: 14px;margin-left: -11px;" *ngIf="!showLine" class="fas fa-chevron-circle-left" style="color: floralwhite"
(click)="openNav()"></i> *ngIf="showLine"
class="fas fa-chevron-circle-right"
(click)="openNav()"
></i>
<i
style="color: black; font-size: 14px; margin-left: -11px"
*ngIf="!showLine"
class="fas fa-chevron-circle-left"
(click)="openNav()"
></i>
</div> </div>
</div> </div>
</div> </div>
<div *ngIf="show" id="main" style="box-shadow: 3px 1px 5px 0px #b2b0ae"> <div *ngIf="show" id="main" style="box-shadow: 3px 1px 5px 0px #b2b0ae">
<div class="row" <div
style="text-align: center; background: #426E86; padding-top: 10px; padding-bottom: 10px; color: white;box-shadow:3px 1px 5px 0px rgb(178, 176, 174)"> class="row"
style="
text-align: center;
background: #426e86;
padding-top: 10px;
padding-bottom: 10px;
color: white;
box-shadow: 3px 1px 5px 0px rgb(178, 176, 174);
"
>
<div class="col-sm-12 col-md-12 col-lg-12"> <div class="col-sm-12 col-md-12 col-lg-12">
<h4>{{'Fuel Fill Report' | translate}}</h4> <h4>{{ "Fuel Fill Report" | translate }}</h4>
<div id="toast"> <div id="toast">
<!-- <div id="desc">{{data_descip}}</div> --> <!-- <div id="desc">{{data_descip}}</div> -->
</div> </div>
</div> </div>
</div> </div>
<div class="row" <div
style="margin:0px;height: 84vh;padding-top:10px;padding-bottom:5px;background: white;box-shadow: 3px 1px 5px 0px #b2b0ae;"> class="row"
style="
margin: 0px;
height: 84vh;
padding-top: 10px;
padding-bottom: 5px;
background: white;
box-shadow: 3px 1px 5px 0px #b2b0ae;
"
>
<div class="col-sm-12 col-md-12 col-lg-12"> <div class="col-sm-12 col-md-12 col-lg-12">
<div *ngIf="Load" class="loading">Loading&#8230;</div> <div *ngIf="Load" class="loading">Loading&#8230;</div>
<div style="width: 100%;height:84vh;"> <div style="width: 100%; height: 84vh">
<table id="deviceTable" cellspacing="0" style="width: 100%;font-size: 14px;"> <table
<thead style="background-color:#e0e0e0;color: #444444;"> id="deviceTable"
cellspacing="0"
style="width: 100%; font-size: 14px"
>
<thead style="background-color: #e0e0e0; color: #444444">
<tr> <tr>
<th style="text-align:center">{{'Vehicle Name' | translate}}</th> <th style="text-align: center">
<th style="text-align:center">{{'Event' | translate}}</th> {{ "Vehicle Name" | translate }}
<th style="text-align:center">{{'Fuel Change (L)' | translate}}</th> </th>
<th style="text-align:center">{{'Time' | translate}}</th> <th style="text-align: center">{{ "Event" | translate }}</th>
<th style="text-align:center">{{'Location' | translate}}</th> <th style="text-align: center">
{{ "Fuel Change (L)" | translate }}
</th>
<th style="text-align: center">{{ "Time" | translate }}</th>
<th style="text-align: center">{{ "Location" | translate }}</th>
</tr> </tr>
</thead> </thead>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -125,7 +125,7 @@ testTable() {
// console.log(suburl); // console.log(suburl);
// console.log(dataTablesParameters); // console.log(dataTablesParameters);
// console.log(suburl) // console.log(suburl)
that.contactService.post(suburl, dataTablesParameters).subscribe(resp => { that.contactService.postReports(suburl, dataTablesParameters).subscribe(resp => {
console.log("poiResp",resp); console.log("poiResp",resp);
callback(resp); callback(resp);
}, err => { }, err => {

File diff suppressed because it is too large Load diff

View file

@ -644,7 +644,7 @@ testTable() {
if(that.deviceArr.length != 0){ if(that.deviceArr.length != 0){
suburl +='&device='+that.deviceArr; suburl +='&device='+that.deviceArr;
} }
that.contactService.get(suburl).subscribe(resp => { that.contactService.getReports(suburl).subscribe(resp => {
// console.log(ignReport.length); // console.log(ignReport.length);
that.summary =[]; that.summary =[];
that.Load= false; that.Load= false;

View file

@ -1,73 +1,79 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from "@angular/core";
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { MdSnackBar } from '@angular/material'; import { MdSnackBar } from "@angular/material";
import { ContactService } from '../contact.service'; import { ContactService } from "../contact.service";
declare var $: any; declare var $: any;
declare var google: any, swal: any; declare var google: any, swal: any;
@Component({ @Component({
selector: 'app-device-setting', selector: "app-device-setting",
templateUrl: './device-setting.component.html', templateUrl: "./device-setting.component.html",
styleUrls: ['./device-setting.component.scss'] styleUrls: ["./device-setting.component.scss"],
}) })
export class DeviceSettingComponent implements OnInit { export class DeviceSettingComponent implements OnInit {
emailId: any; emailId: any;
Load: Boolean=false; Load: Boolean = false;
searchForm: FormGroup; searchForm: FormGroup;
deleteShow: boolean = false; deleteShow: boolean = false;
submitted = false; submitted = false;
userId: any; userId: any;
deviceForm: FormGroup deviceForm: FormGroup;
data: any; data: any;
deleted: boolean = false; deleted: boolean = false;
ditributers ditributers;
dealers dealers;
users: any; users: any;
selectedSupAdmin selectedSupAdmin;
selectedDealer selectedDealer;
selectedUser selectedUser;
// @ViewChild(BaseChartDirective) public chart: BaseChartDirective; // @ViewChild(BaseChartDirective) public chart: BaseChartDirective;
constructor(private contactService: ContactService, private fb: FormBuilder, public snackBar: MdSnackBar) { constructor(
private contactService: ContactService,
} private fb: FormBuilder,
public snackBar: MdSnackBar
) {}
ngOnInit(): void { ngOnInit(): void {
this.searchForm = this.fb.group({ this.searchForm = this.fb.group({
imei: ['', Validators.required] imei: ["", Validators.required],
}) });
this.deviceForm = this.fb.group({ this.deviceForm = this.fb.group({
imei: [''], imei: [""],
registrationNumber: [''], registrationNumber: [""],
sim1: [''], sim1: [""],
sim2: [''], sim2: [""],
dealaer: [''], dealaer: [""],
user: [''], user: [""],
deviceModel: [''], deviceModel: [""],
vehicleType: [''], vehicleType: [""],
expirationDate: [''], expirationDate: [""],
creationDate: [''], creationDate: [""],
superAdmin: [''], superAdmin: [""],
lastRenewal: [''], lastRenewal: [""],
status: [''], status: [""],
deleted: [''], deleted: [""],
deletedBy: [''], deletedBy: [""],
deletedAt: [''], deletedAt: [""],
deletedFrom: [''] deletedFrom: [""],
// 352887076587769 // 352887076587769
}) });
this.emailId = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).email; this.emailId = JSON.parse(
this.userId = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id; window.atob(window.localStorage.token.split(".")[1])
this.loadDropdown() ).email;
this.userId = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
)._id;
this.loadDropdown();
this.getDistributers(); this.getDistributers();
var that=this var that = this;
$("#distributer").change(function () { $("#distributer").change(function () {
// alert($(this).val()); // alert($(this).val());
console.log($(this).val()); console.log($(this).val());
var value = $(this).val(); var value = $(this).val();
that.selectedSupAdmin = value[0]; that.selectedSupAdmin = value[0];
that.getDealers(that.selectedSupAdmin) that.getDealers(that.selectedSupAdmin);
console.log(that.selectedSupAdmin); console.log(that.selectedSupAdmin);
@ -81,7 +87,7 @@ export class DeviceSettingComponent implements OnInit {
console.log($(this).val()); console.log($(this).val());
var value = $(this).val(); var value = $(this).val();
that.selectedDealer = value[0]; that.selectedDealer = value[0];
that.getUsers(that.selectedDealer) that.getUsers(that.selectedDealer);
// that.getUser(that.selectedDealer) // that.getUser(that.selectedDealer)
console.log(that.selectedDealer); console.log(that.selectedDealer);
@ -102,100 +108,113 @@ export class DeviceSettingComponent implements OnInit {
// var prevSelect = $("#MultiSelect_Preview").select2(); // var prevSelect = $("#MultiSelect_Preview").select2();
// prevSelect.val($(this).val()).trigger('change'); // prevSelect.val($(this).val()).trigger('change');
}); });
} }
loadDropdown(){ loadDropdown() {
var script = document.createElement("script"); var script = document.createElement("script");
script.setAttribute("type", "text/javascript"); script.setAttribute("type", "text/javascript");
script.setAttribute("src", "https://unpkg.com/multiple-select@1.3.1/dist/multiple-select.min.js"); script.setAttribute(
"src",
"https://unpkg.com/multiple-select@1.3.1/dist/multiple-select.min.js"
);
document.getElementsByTagName("head")[0].appendChild(script); document.getElementsByTagName("head")[0].appendChild(script);
setTimeout(() => { setTimeout(() => {
$('#distributer').multipleSelect({ $("#distributer").multipleSelect({
width: 470, width: 470,
placeholder: "Select Distributer", placeholder: "Select Distributer",
filter: true, filter: true,
single: true, single: true,
selectAll: false selectAll: false,
});
})
}, 100); }, 100);
setTimeout(() => { setTimeout(() => {
$('#dealer').multipleSelect({ $("#dealer").multipleSelect({
width: 470, width: 470,
placeholder: "Select Dealer", placeholder: "Select Dealer",
filter: true, filter: true,
single: true, single: true,
selectAll: false selectAll: false,
});
})
}, 100); }, 100);
setTimeout(() => { setTimeout(() => {
$('#user').multipleSelect({ $("#user").multipleSelect({
width: 470, width: 470,
placeholder: "Select User", placeholder: "Select User",
filter: true, filter: true,
single: true, single: true,
selectAll: false selectAll: false,
});
})
}, 100); }, 100);
} }
get f() { return this.searchForm.controls; } get f() {
return this.searchForm.controls;
}
getDistributers() {
getDistributers(){ this.Load = true;
this.Load=true; this.contactService.getSuperAdminList().subscribe(
this.contactService.getSuperAdminList().subscribe(res => { (res) => {
this.ditributers=res; this.ditributers = res;
this.loadDropdown() this.loadDropdown();
this.Load = false; this.Load = false;
},err=>{ },
(err) => {
this.Load = false; this.Load = false;
}) }
);
} }
getDealers(id) { getDealers(id) {
this.Load = true; this.Load = true;
this.dealers=[] this.dealers = [];
this.contactService.getDealersDetails(id).subscribe(res => { this.contactService.getDealersDetails(id).subscribe(
(res) => {
this.dealers = res; this.dealers = res;
this.dealers = this.dealers.concat(this.ditributers); this.dealers = this.dealers.concat(this.ditributers);
this.loadDropdown() this.loadDropdown();
this.Load = false; this.Load = false;
}, err => { },
(err) => {
this.Load = false; this.Load = false;
}) }
);
} }
getUsers(id) { getUsers(id) {
this.Load = true; this.Load = true;
this.users = [] this.users = [];
this.contactService.getContactsbyDealer(id).subscribe(res => { this.contactService
.getContactsbyDealer(
id,
"&projection=_id,user_id,phone,email,first_name,last_name"
)
.subscribe(
(res) => {
this.users = res; this.users = res;
this.users = this.users.concat(this.ditributers); this.users = this.users.concat(this.ditributers);
this.users = this.users.concat(this.dealers); this.users = this.users.concat(this.dealers);
this.users = this.users.filter((el, i, a) => i === a.indexOf(el)) this.users = this.users.filter((el, i, a) => i === a.indexOf(el));
this.loadDropdown() this.loadDropdown();
this.Load = false; this.Load = false;
}, err => { },
(err) => {
this.Load = false; this.Load = false;
}) }
);
} }
selectSupAdmin(event){ selectSupAdmin(event) {
// console.log(event.target.value); // console.log(event.target.value);
this.getDealers(event) this.getDealers(event);
} }
selectDealer(event) { selectDealer(event) {
console.log(event.target.value); console.log(event.target.value);
this.getUsers(event.target.value) this.getUsers(event.target.value);
} }
submit() { submit() {
@ -208,129 +227,150 @@ export class DeviceSettingComponent implements OnInit {
if (this.searchForm.invalid) { if (this.searchForm.invalid) {
return; return;
} }
this.contactService.searchByImei(this.searchForm.value).subscribe((res: any) => { this.contactService.searchByImei(this.searchForm.value).subscribe(
(res: any) => {
console.log(res); console.log(res);
this.data = res[0]; this.data = res[0];
this.Load = false; this.Load = false;
if (res.length != 0) { if (res.length != 0) {
this.deleteShow = true this.deleteShow = true;
if (res[0].deletedDevice) { if (res[0].deletedDevice) {
this.deleteShow = false; this.deleteShow = false;
this.deleted = true; this.deleted = true;
} else { } else {
this.deleted = false; this.deleted = false;
} }
this.selectedSupAdmin = this.data.supAdmin ? this.data.supAdmin._id : '' this.selectedSupAdmin = this.data.supAdmin
this.selectedUser = this.data.user ? this.data.user._id : ''; ? this.data.supAdmin._id
this.selectedDealer = this.data.Dealer ? this.data.Dealer._id : '', : "";
this.selectedUser = this.data.user ? this.data.user._id : "";
(this.selectedDealer = this.data.Dealer ? this.data.Dealer._id : ""),
console.log(this.selectedSupAdmin); console.log(this.selectedSupAdmin);
this.deviceForm.patchValue({ this.deviceForm.patchValue({
imei: this.data.Device_ID, imei: this.data.Device_ID,
registrationNumber: this.data.Device_Name, registrationNumber: this.data.Device_Name,
sim1: this.data.sim_number ? this.data.sim_number : '', sim1: this.data.sim_number ? this.data.sim_number : "",
sim2: this.data.sim_number2 ? this.data.sim_number2 : '', sim2: this.data.sim_number2 ? this.data.sim_number2 : "",
dealaer: this.data.Dealer ? this.data.Dealer._id: '', dealaer: this.data.Dealer ? this.data.Dealer._id : "",
user: this.data.user ? this.data.user._id : '', user: this.data.user ? this.data.user._id : "",
deviceModel: this.data.device_model ? this.data.device_model.device_type : '', deviceModel: this.data.device_model
vehicleType: this.data.vehicleType ? (this.data.vehicleType.brand ? this.data.vehicleType.brand : '') + ' ' + (this.data.vehicleType.model ? this.data.vehicleType.model : '') : '', ? this.data.device_model.device_type
expirationDate: this.data.expiration_date ? this.data.expiration_date : '', : "",
superAdmin: this.data.supAdmin ? this.data.supAdmin._id : '', vehicleType: this.data.vehicleType
lastRenewal: this.data.renew_at ? this.data.renew_at : '', ? (this.data.vehicleType.brand
creationDate: this.data.created_on ? this.data.created_on : '', ? this.data.vehicleType.brand
: "") +
" " +
(this.data.vehicleType.model ? this.data.vehicleType.model : "")
: "",
expirationDate: this.data.expiration_date
? this.data.expiration_date
: "",
superAdmin: this.data.supAdmin ? this.data.supAdmin._id : "",
lastRenewal: this.data.renew_at ? this.data.renew_at : "",
creationDate: this.data.created_on ? this.data.created_on : "",
status: this.data.status, status: this.data.status,
deleted: this.data.deletedDevice ? 'Yes' : 'No', deleted: this.data.deletedDevice ? "Yes" : "No",
deletedBy: this.data.device_deleted_by ? this.data.device_deleted_by.first_name + " " + this.data.device_deleted_by.last_name : ' ', deletedBy: this.data.device_deleted_by
? this.data.device_deleted_by.first_name +
" " +
this.data.device_deleted_by.last_name
: " ",
deletedAt: this.data.device_delete_on, deletedAt: this.data.device_delete_on,
deletedFrom: this.data.login_type, deletedFrom: this.data.login_type,
}) });
if (this.data.supAdmin) if (this.data.supAdmin) this.getDealers(this.data.supAdmin._id);
this.getDealers(this.data.supAdmin._id); if (this.data.Dealer) this.getUsers(this.data.Dealer._id);
if (this.data.Dealer)
this.getUsers(this.data.Dealer._id)
} else { } else {
this.deleteShow = false; this.deleteShow = false;
this.deviceForm.reset(); this.deviceForm.reset();
this.snackBar.open("No Data Found", '', { this.snackBar.open("No Data Found", "", {
duration: 4000, duration: 4000,
}); });
} }
},
},err=>{ (err) => {
this.Load = false; this.Load = false;
}) }
);
} }
deleteDevice() { deleteDevice() {
swal({ swal({
title: '<strong>Are you sure?</strong>', title: "<strong>Are you sure?</strong>",
icon: 'warning', icon: "warning",
html: "You won't be able to revert this!", html: "You won't be able to revert this!",
showCloseButton: true, showCloseButton: true,
focusConfirm: false, focusConfirm: false,
// confirmButtonText: 'Reset today ODO', // confirmButtonText: 'Reset today ODO',
confirmButtonText: 'Yes, Save it!', confirmButtonText: "Yes, Save it!",
// cancelButtonText: 'Reset total ODO', // cancelButtonText: 'Reset total ODO',
// cancelButtonAriaLabel: 'Thumbs down' // cancelButtonAriaLabel: 'Thumbs down'
cancelButtonText: 'No, cancel!', cancelButtonText: "No, cancel!",
}).then((result: { value: boolean; }) => { }).then((result: { value: boolean }) => {
if (result) { if (result) {
var req = { var req = {
_id: this.data._id, _id: this.data._id,
Dealer: this.selectedDealer ? this.selectedDealer : this.data.Dealer ? this.data.Dealer._id:undefined, Dealer: this.selectedDealer
user: this.selectedUser ? this.selectedUser : this.data.user ? this.data.user._id : undefined, ? this.selectedDealer
supAdmin: this.selectedSupAdmin ? this.selectedSupAdmin : this.data.supAdmin ? this.data.supAdmin._id : undefined : this.data.Dealer
} ? this.data.Dealer._id
this.contactService.post("/devices/updateDeviceByAdmin",req).subscribe(res => { : undefined,
user: this.selectedUser
? this.selectedUser
: this.data.user
? this.data.user._id
: undefined,
supAdmin: this.selectedSupAdmin
? this.selectedSupAdmin
: this.data.supAdmin
? this.data.supAdmin._id
: undefined,
};
this.contactService
.post("/devices/updateDeviceByAdmin", req)
.subscribe((res) => {
swal({ swal({
title: 'Saved!', title: "Saved!",
html: 'Your file has been saved.', html: "Your file has been saved.",
icon: 'success' icon: "success",
}) });
}) });
this.deviceForm.reset(); this.deviceForm.reset();
this.deleteShow = false; this.deleteShow = false;
} }
} });
)
} }
deleteDevicePermenatly() { deleteDevicePermenatly() {
swal({ swal({
title: '<strong>Are you sure?</strong>', title: "<strong>Are you sure?</strong>",
icon: 'warning', icon: "warning",
html: "Device will be deleted permanantly", html: "Device will be deleted permanantly",
showCloseButton: true, showCloseButton: true,
focusConfirm: false, focusConfirm: false,
// confirmButtonText: 'Reset today ODO', // confirmButtonText: 'Reset today ODO',
confirmButtonText: 'Yes, delete it!', confirmButtonText: "Yes, delete it!",
// cancelButtonText: 'Reset total ODO', // cancelButtonText: 'Reset total ODO',
// cancelButtonAriaLabel: 'Thumbs down' // cancelButtonAriaLabel: 'Thumbs down'
cancelButtonText: 'No, cancel!', cancelButtonText: "No, cancel!",
}).then((result: { value: boolean; }) => { }).then((result: { value: boolean }) => {
if (result) { if (result) {
var req = { var req = {
device: this.data.Device_ID, device: this.data.Device_ID,
userId: this.userId, userId: this.userId,
permenant: true permenant: true,
} };
this.contactService.deldev(req).subscribe(res => { this.contactService.deldev(req).subscribe((res) => {
swal({ swal({
title: 'Deleted!', title: "Deleted!",
html: 'Your file has been deleted.', html: "Your file has been deleted.",
icon: 'success' icon: "success",
}) });
}) });
this.deviceForm.reset(); this.deviceForm.reset();
} }
});
} }
)
}
} }

File diff suppressed because it is too large Load diff

View file

@ -174,7 +174,7 @@
<button type="button" class="btn btn-primary" style="background: #595454;;border:0px;float: right" (click)="exportAsPdf()">{{'Export Pdf' | translate}}</button> <button type="button" class="btn btn-primary" style="background: #595454;;border:0px;float: right" (click)="exportAsPdf()">{{'Export Pdf' | translate}}</button>
<!-- <button type="button" class="btn btn-primary" style="background: #595454;;border:0px;float: right" (click)="qrCodeGenerator()">Qrcode</button> --> <!-- <button type="button" class="btn btn-primary" style="background: #595454;;border:0px;float: right" (click)="qrCodeGenerator()">Qrcode</button> -->
</div> </div>
<table id="testPdf" style="font-weight: 600;" > <table id="testPdf" style="font-weight: 600;" class="src_app_device_edit-device-master_edit-device-master.component.html" >
<tr> <tr>
<td></td> <td></td>
<td style="text-align: center;font-weight: 700"> <td style="text-align: center;font-weight: 700">

View file

@ -27,7 +27,7 @@
> >
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<table id="testPdf" style="margin: 50px 100px 50px 100px;"> <table id="testPdf" style="margin: 50px 100px 50px 100px;" class="src_app_device_normal-cert_normal-cert.component.html">
<tr> <tr>
<td colspan="2"> <td colspan="2">
<img src={{imgurl}} alt="Company Logo" height="50" width="100"> <img src={{imgurl}} alt="Company Logo" height="50" width="100">

View file

@ -0,0 +1,10 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class Dhananjay2RoutingModule { }

View file

@ -0,0 +1,3 @@
<p>
dhananjay2 works!
</p>

View file

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Dhananjay2Component } from './dhananjay2.component';
describe('Dhananjay2Component', () => {
let component: Dhananjay2Component;
let fixture: ComponentFixture<Dhananjay2Component>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ Dhananjay2Component ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(Dhananjay2Component);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-dhananjay2',
templateUrl: './dhananjay2.component.html',
styleUrls: ['./dhananjay2.component.scss']
})
export class Dhananjay2Component implements OnInit {
constructor() { }
ngOnInit() {
}
}

View file

@ -0,0 +1,17 @@
import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { Routes, RouterModule } from "@angular/router";
import { Dhananjay2Component } from "./dhananjay2.component";
const routes: Routes = [
{
path: "",
component: Dhananjay2Component,
},
];
@NgModule({
imports: [CommonModule, RouterModule.forChild(routes)],
declarations: [Dhananjay2Component],
})
export class Dhananjay2Module {}

View file

@ -0,0 +1,36 @@
<div class="col-md-6">
<label for="inputEmail4">{{ "Dealer" | translate }}</label>
<input
placeholder="{{ 'Select dealer' | translate }}"
class="form-control"
[mdAutocomplete]="tdAuto111"
[(ngModel)]="dealerData"
(ngModelChange)="filtergrpStatess(dealerData)"
/>
<md-autocomplete #tdAuto111="mdAutocomplete">
<md-option *ngFor="let group of dealerSelect" [value]="group.fullName">
<span>{{ group.first_name }} {{ group.last_name }}</span>
</md-option>
</md-autocomplete>
</div>
<div class="form-group col-md-6">
<label for="inputEmail4">{{ "User" | translate }}</label>
<input
placeholder="{{ 'Select User' | translate }}"
class="form-control"
[mdAutocomplete]="tdAuto112"
[(ngModel)]="userDetail"
(ngModelChange)="filterUserStates(userDetail)"
/>
<md-autocomplete #tdAuto112="mdAutocomplete">
<md-option
*ngFor="let userName of datauserSelect"
[value]="userName.full_name"
>
<span>{{ userName.full_name }}</span>
</md-option>
</md-autocomplete>
</div>

View file

@ -61,6 +61,32 @@
<md-error class="required">{{'Enter Address' | translate}}</md-error> <md-error class="required">{{'Enter Address' | translate}}</md-error>
</md-form-field> </md-form-field>
</div> </div>
<div class="row" *ngIf="_org._id == '6110fa23a6221d46dbebc473'">
<span style="padding: 17px 0px 0px 10px;">{{'Customer Type' | translate}}</span>
<md-select class="example-full-width" style="float:left;width: 70%;padding-left: 30px;display: inline-block;" [(ngModel)]="customer_role">
<md-option value="normal">Normal</md-option>
<md-option value="kycApproval">Kyc Approval</md-option>
<md-option value="tag">Tag</md-option>
</md-select>
</div>
<div class="row"
*ngIf="customer_role !== 'normal' && _org._id === '6110fa23a6221d46dbebc473'">
<span style="padding: 17px 0px 0px 10px;">
{{ 'State' | translate }}
</span>
<md-select
class="example-full-width"
style="float: left; display: inline-block; width: 84%; padding-left: 98px;"
[(ngModel)]="state">
<md-option value="all">All</md-option>
<md-option *ngFor="let item of states" [value]="item">
{{ item }}
</md-option>
</md-select>
</div>
<div class="row"> <div class="row">
<span style="margin-right: 10px;">{{'Bussiness Type' | translate}}</span> <span style="margin-right: 10px;">{{'Bussiness Type' | translate}}</span>
<md-slide-toggle style="float: right;margin-top: 5px;" [(ngModel)]="bussinessType" ngDefaultControl> <md-slide-toggle style="float: right;margin-top: 5px;" [(ngModel)]="bussinessType" ngDefaultControl>

View file

@ -25,7 +25,10 @@ export class EditDealerComponent implements OnInit {
errorMsg: any; errorMsg: any;
dealerStatus: any; dealerStatus: any;
superAdmin: any; superAdmin: any;
customer_role='';
state:any='';
_org = JSON.parse(localStorage.ORG);
db_token: any = { isDealer: false, isSuperAdmin: false };;
constructor(public dialogRef: MdDialogRef<EditDealerComponent>,public thisDialogRef: MdDialogRef<EditDealerComponent>, constructor(public dialogRef: MdDialogRef<EditDealerComponent>,public thisDialogRef: MdDialogRef<EditDealerComponent>,
@Inject(MD_DIALOG_DATA) public data: any,private contactService: ContactService) { @Inject(MD_DIALOG_DATA) public data: any,private contactService: ContactService) {
this.dealerInfo=data; this.dealerInfo=data;
@ -52,10 +55,26 @@ export class EditDealerComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.pageId = this.dealerInfo.dealer_payload.ID; this.pageId = this.dealerInfo.dealer_payload.ID;
console.log("val=",this.pageId); console.log("val=",this.pageId);
this.getAllState();
this.useridd = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id; this.useridd = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id;
} this.customer_role=this.dealerInfo.dealer_payload.customer_role ? this.dealerInfo.dealer_payload.customer_role : 'normal';
showError :boolean = false; this.state=this.dealerInfo.dealer_payload.state ? this.dealerInfo.dealer_payload.state :'all'
this.db_token = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
);
}
showError :boolean = false;
states = [];
getAllState() {
this.contactService.get("/RTO_master/getAllState").subscribe((res: any) => {
for (var i = 0; i < res.length; i++) {
this.states.push(res[i]._id.state);
}
// this.states=res;
});
}
editDealer(){ editDealer(){
var editDealerPayload = { var editDealerPayload = {
first_name : this.firstName, first_name : this.firstName,
@ -70,7 +89,14 @@ export class EditDealerComponent implements OnInit {
if (this.bussinessType != undefined) { if (this.bussinessType != undefined) {
editDealerPayload['bussinessType'] = this.bussinessType ? "1" : "0"; editDealerPayload['bussinessType'] = this.bussinessType ? "1" : "0";
} }
if(this.customer_role !== 'normal'){
editDealerPayload['customer_role'] = this.customer_role;
editDealerPayload['customer_state'] = this.state;
}
else{
editDealerPayload['customer_role'] = "";
editDealerPayload['customer_state'] = "";
}
// this.dealerInfo.dealer_payload.status // this.dealerInfo.dealer_payload.status
if(this.PhoneNum !== this.dealerInfo.dealer_payload.phone){ if(this.PhoneNum !== this.dealerInfo.dealer_payload.phone){
editDealerPayload['phone'] = this.PhoneNum editDealerPayload['phone'] = this.PhoneNum

View file

@ -0,0 +1,315 @@
<div class="limiter pageHeight">
<nav class="navbar navbar-expand-lg navbar-dark bg-primary" style="height: 65px">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo03"
aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<h6 class="navbar-brand">Finance</h6>
<div class="collapse navbar-collapse" id="navbarTogglerDemo03">
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item active">
<i style="
cursor: pointer;
float: left;
font-size: 24px;
margin-left: 16px;
touch-action: none;
user-select: none;
" class="fas fa-file-excel" (click)="downloadExcel(pg_data.tbl)"></i>
</li>
<!-- <li class="nav-item">
<i style="cursor: pointer;float: left;font-size: 24px;margin-left: 16px;touch-action: none;user-select: none;"
class="fas fa-file-pdf" (click)="downloadExcel()"></i>
</li> -->
</ul>
<ul style="position: absolute; left: 50%; transform: translatex(-50%)"
class="nav nav-tabs nav-tabs-neutral justify-content-center" role="tablist" data-background-color="orange">
<!-- <li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#CustomerKYC" (click)="changeTab('customerKYC')" role="tab">Customer KYC</a>
</li> -->
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" (click)="show(pg_data)" role="tab">Finance Approval</a>
</li>
<!-- <li class="nav-item">
<a class="nav-link active" data-toggle="tab" (click)="changeTab('issues')" role="tab">Issues</a>
</li> -->
</ul>
<form class="form-inline my-2 my-lg-0">
<div style="float: right">
<div style="width: 80px; float: right; margin-top: -8px">
<button md-icon-button mdTooltip="Logout" style="float: right; outline: none; padding-top: 6px"
(click)="logout()">
<i class="fas fa-sign-out-alt" style="color: white; font-size: 20px"></i>
</button>
<app-notification></app-notification>
</div>
</div>
<!-- <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> -->
</form>
</div>
</nav>
<div class="container mt-3 mb-3">
<div class="row">
<!--
CLOSED
:
5
PENDING
:
1
REJECTED
:
3
-->
<div class="card shadow-sm col-sm rounded p-1 mr-1 text-center" style="background-color: rgb(0, 192, 239)">
<h6>Pending</h6>
<span class="text-white">{{ pg_data.status.PENDING }}</span>
</div>
<div class="card shadow-sm col-sm rounded p-1 mr-1 text-center" style="background-color: rgb(0, 166, 90)">
<h6>Closed</h6>
<span class="text-white">{{ pg_data.status.CLOSED }}</span>
</div>
<div class="card shadow-sm col-sm rounded p-1 mr-1 text-center" style="background-color: rgb(243, 156, 18)">
<h6>Reject</h6>
<span class="text-white">{{ pg_data.status.REJECTED }}</span>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row p-3" style="background-color: #426e86">
<div class="col-12 col-md-3 text-left">
<!-- [(ngModel)]="search.user_id"
class="form-control form-control-sm"
(change)="db_user_change(search)"
-->
<select id="dbselect123" [(ngModel)]="search.user_id">
<option [value]="''">Select</option>
<option *ngFor="let i of pg_data.userList" [value]="i._id">
{{ (i.first_name || "") + (i.last_name || "") }}
</option>
</select>
</div>
<div class="col-12 col-md-2">
<!-- (change)="db_status_change(search)" -->
<select class="form-control form-control-sm" [(ngModel)]="search.status" (change)="status_changed(search)">
<option [value]="''">Select</option>
<option [value]="'REJECTED'">Rejected</option>
<option [value]="'PENDING'">Pending</option>
<option [value]="'CLOSED'">Closed</option>
<option [value]="'Dispatched'">Dispatched</option>
</select>
</div>
<div class="col-12 col-md-3">
<!-- (change)="db_status_change(search)" -->
<input id="datefrom" bsDatepicker class="form-control form-control-sm" style="height: 25px"
[bsConfig]="bsConfig" [(ngModel)]="search.from" type="text" />
</div>
<div class="col-12 col-md-3">
<!-- (change)="db_status_change(search)" -->
<input id="dateto" bsDatepicker class="form-control form-control-sm" style="height: 25px" [bsConfig]="bsConfig"
[(ngModel)]="search.to" type="text" />
</div>
<div class="col-12 col-md-1">
<button class="btn-primary" (click)="db_status_change(search)">
<i class="fas fa-search text-white"></i>
</button>
</div>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover">
<tbody>
<tr>
<th>Order Id</th>
<th>Name</th>
<th>phone</th>
<th>email</th>
<th>Date</th>
<th class="text-right">Amount</th>
<th>Address</th>
<th>
Status
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</th>
<th>Cart Info</th>
<th class="text-center">Upload</th>
<th class="text-center">Download</th>
<th class="text-center">Payment Status</th>
<th class="text-center">Payment Ref.</th>
<th class="text-center">Courier Name</th>
<th class="text-center">Tracking Id</th>
</tr>
</tbody>
<tbody>
<tr *ngFor="let t of pg_data.tbl">
<td>{{ t.order_id || "" }}</td>
<td class="text-wrap">
{{
(t.buyer_first_name || "") + " " + (t.buyer_last_name || "")
}}
</td>
<td class="text-nowrap">{{ t.phone }}</td>
<td class="text-nowrap">{{ t.email }}</td>
<td class="text-nowrap">
{{ dt_f(t.purchased_on, "DD-MM-YYYY hh:mm a") }}
</td>
<td class="text-right">{{ t.amount | number }}</td>
<td class="text-nowrap">
{{ showAdd(t) }}
</td>
<td class="text-nowrap">
<select [disabled]="'CLOSED' == t.status" class="form-control form-control-sm" [(ngModel)]="t.status"
(change)="db_row_status_edit(t)">
<!-- <option [value]="''">Select</option> -->
<option [value]="'REJECTED'">Rejected</option>
<option [value]="'PENDING'">Pending</option>
<option [value]="'CLOSED'">Closed</option>
<option [value]="'Dispatched'">Dispatched</option>
</select>
</td>
<td class="text-center text-nowrap">
<i class="fas fa-info" style="cursor: pointer" (click)="db_open_popup('#show_exampleModal', t)"></i>
</td>
<td class="text-center text-nowrap">
<i class="fas fa-upload" style="cursor: pointer" (click)="fileUpload(t)"></i>
</td>
<td class="text-center">
<!-- <a
*ngIf="t.filePath != undefined"
href="https://www.oneqlik.in/images/oneqlikProfilePic/timecomplexityisO(1)foranyalgowithcappedinput1693379818056.PNG"
target="_blank"
download="foranyalgowithcappedinput1693379818056.PNG"
>download invoice</a
> -->
<span>
<u style="cursor: pointer" *ngIf="t.filePath != undefined" (click)="fileDownload_blob(t)">
Download invoice
</u>
<!-- <u *ngIf="t.filePath != undefined" (click)="fileDownload(t)">
download invoice
</u> -->
</span>
</td>
<td class="text-center">{{ t.payment_status || "" }}</td>
<td class="text-center">{{ t.payment_reference || "" }}</td>
<td class="text-center">{{ t.CourierName || "" }}</td>
<td class="text-center">{{ t.TrackingId || "" }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<input type="file" id="db_file" class="d-none" (change)="onFileChanged($event)" />
<!-- db_popup -->
<!-- popup -->
<button type="button" id="show_exampleModal" class="btn btn-primary d-none" data-toggle="modal"
data-target="#exampleModal">
Launch demo modal
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header text-right" style="background-color: #2d4262; color: #fff">
<h5 class="modal-title" id="exampleModalLabel">Cart Details</h5>
<button id="examplemodal_close" type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">
<i class="fas fa-times text-white"></i>
</span>
</button>
</div>
<div class="modal-body p-1">
<!-- {{ pg_data.row | json }} -->
<table class="table table-striped table-hover">
<thead>
<tr style="background-color: #4b658d; color: #fff">
<th>Model</th>
<th class="text-right">Quantity</th>
<th class="text-right">Price</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let i of pg_data.row.CartData">
<td>{{ i.deviceName }}</td>
<td class="text-right">{{ i.quantity | number }}</td>
<td class="text-right">{{ i.price | number }}</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">
Close
</button>
<!-- <button type="button" class="btn btn-primary">Submit</button> -->
</div>
</div>
</div>
</div>
<!-- popup -->
<button type="button" id="show_status_changed_popup" class="btn btn-primary d-none" data-toggle="modal"
data-target="#status_changed_popup">
Launch demo modal
</button>
<!-- Modal
status_popup_data: any = {
CourierName: "",
TrackingId: "",
}
-->
<div class="modal fade" id="status_changed_popup" tabindex="-1" aria-labelledby="status_changed_popupl"
aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header text-right" style="background-color: #2d4262; color: #fff">
<h5 class="modal-title" id="status_changed_popupl">Courier Details</h5>
<button id="status_changed_popupl_close" type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">
<i class="fas fa-times text-white"></i>
</span>
</button>
</div>
<div class="modal-body p-1">
<div class="container-fluid">
<div class="form-group">
<label for="exampleInputEmail1">Courier Name
<span style="color:red;">*</span>
</label>
<input type="text" class="form-control" id="exampleInputEmail1" [(ngModel)]="status_popup_data.CourierName"
aria-describedby="emailHelp">
<!-- <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small> -->
</div>
<div class="form-group">
<label for="exampleInputPassword1">TrackingId
<span style="color:red;">*</span>
</label>
<input type="text" [(ngModel)]="status_popup_data.TrackingId" class="form-control"
id="exampleInputPassword1">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" (click)="status_save_change(status_popup_data)">Submit</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">
Close
</button>
<!-- <button type="button" class="btn btn-primary">Submit</button> -->
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,3 @@
.pageHeight {
height: 100vh;
}

View file

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FinanceApprovalComponent } from './finance-approval.component';
describe('FinanceApprovalComponent', () => {
let component: FinanceApprovalComponent;
let fixture: ComponentFixture<FinanceApprovalComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ FinanceApprovalComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FinanceApprovalComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,328 @@
import { Component, OnInit } from "@angular/core";
import { ContactService } from "../contact.service";
import { BsDatepickerConfig } from "ngx-bootstrap";
import {
Router,
CanActivate,
ActivatedRouteSnapshot,
RouterStateSnapshot,
} from "@angular/router";
import { forkJoin } from "rxjs/observable/forkJoin";
declare var moment: any, $: any, swal: any, _: any;
@Component({
selector: "app-finance-approval",
templateUrl: "./finance-approval.component.html",
styleUrls: ["./finance-approval.component.scss"],
})
export class FinanceApprovalComponent implements OnInit {
constructor(private cs: ContactService, private router: Router) { }
bsConfig: Partial<BsDatepickerConfig>;
logined_user: any = {};
clicked: boolean = false;
//?user_id=XXXXX&status=PENDING
search: any = {
user_id: "",
status: "",
from: new Date(new Date().setHours(0, 0, 0)),
to: new Date(),
};
pg_data: any = { tbl: [], userList: [], row: {}, status: {} };
status_popup_data: any = {
CourierName: "",
TrackingId: "",
}
file_data: any;
status_save_change(st_data: any) {
console.log("status_save_change=>", st_data);
let that = this;
if (st_data.CourierName != "" && st_data.TrackingId != "") {
that.cs.db_editOrder(st_data).subscribe((resp) => {
that.db_user_change(that.search);
$("#status_changed_popupl_close").click();
// swal("Deleted!", "Your imaginary file has been deleted.", "success");
});
}
}
status_changed(dt: any) {
//"status_changed_popup"
debugger;
// this.status_popup_data.form = dt;
// $("show_status_changed_popup").click();
// console.log("status=>", dt);
}
ngOnInit() {
let that = this;
that.bsConfig = Object.assign(
{ dateInputFormat: "DD-MM-YYYY, h:mm:ss a" },
{ containerClass: "theme-dark-blue" }
);
var script = document.createElement("script");
script.setAttribute("type", "text/javascript");
script.setAttribute(
"src",
"https://unpkg.com/multiple-select@1.3.1/dist/multiple-select.min.js"
);
document.getElementsByTagName("head")[0].appendChild(script);
this.logined_user = JSON.parse(atob(localStorage.token.split(".")[1]));
//this.getOederSummary("?user_id=" + this.logined_user._id).subscribe(
this.getOederSummary("").subscribe((resp) => {
console.log("resp=>", resp);
that.pg_data.tbl = resp[0];
that.pg_data.status = resp[1];
});
// getOederSummary
//user_id
//organization=
that.cs
.db_getDealers(
"?organisation=" +
that.logined_user.organisation +
"&pageNo=1&size=9999"
)
.subscribe((resp) => {
that.pg_data.userList = resp;
setTimeout(() => {
$("#dbselect123").multipleSelect({
width: 300,
placeholder: "placeholderval",
filter: true,
single: true,
selectAll: false,
// onOptgroupClick: function (view) {
// console.log(view);
// },
onClick: function (view) {
that.search.user_id = view.value;
// that.db_user_change(that.search);
},
});
// $("#dbselect").change(() => {
// this.clicked = false;
// });
}, 100);
});
}
dt_f(d, f) {
return moment(d).format(f);
}
fileDownload_blob(t) {
const pdfUrl =
this.cs.db_getUrl("dev_url") + t.filePath.replace(/public/g, "");
const fileName = pdfUrl.split(".").at(-1);
fetch(pdfUrl)
.then((response) => response.blob())
.then((blob) => {
const blobUrl = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = blobUrl;
a.download = fileName;
a.click();
});
}
fileDownload(t) {
const downloadLink: any = document.createElement("a");
downloadLink.href =
this.cs.db_getUrl("dev_url") + t.filePath.replace(/public/g, "");
const fileName = downloadLink.href.split(".").at(-1);
downloadLink.download = t.filePath.split("/").at(-1);
downloadLink.innerText = fileName;
downloadLink.target = "_blank";
downloadLink.click();
}
fileUpload(row) {
console.log("row=>", row);
this.pg_data.row = row;
$("#db_file").click();
}
onFileChanged(ev: any) {
debugger;
let that = this;
let file = ev.target.files[0];
const fd = new FormData();
fd.append("photo", file, file.name);
console.log("Binaryimage = > ", fd);
that.cs.imageupload(fd).subscribe((res: any) => {
console.log("resp=>", res);
that.pg_data.row.filePath = res._body;
that.db_editOrder(that.pg_data.row);
});
}
showAdd(t) {
if (t.shippingAddress != undefined) {
return (
(t.shippingAddress.city || "") +
(t.shippingAddress.state || "") +
(t.shippingAddress.country || "") +
(t.shippingAddress.pincode || "")
);
}
return "";
}
getOederSummary(srl) {
return forkJoin([
this.cs.getOederSummary(srl),
this.cs.db_countByStatus({}),
]);
}
downloadExcel(data) {
this.csvDownload(data);
}
changeTab(d: any) { }
logout() {
window.localStorage.clear();
this.router.navigateByUrl("login");
}
show(dt) {
console.log("dt=>", dt);
}
db_open_popup(id, obj) {
this.pg_data.row = obj;
$(id).click();
}
db_row_status_edit(obj) {
let that = this;
if (obj.status == "Dispatched") {
console.log(obj);
this.status_popup_data = obj;
$("#show_status_changed_popup").click();
return;
}
swal({
title: "Are you sure?",
text: "Do you want to save the changes?",
type: "warning",
showCancelButton: true,
confirmButtonText: "Yes",
cancelButtonText: "No",
}).then(
function () {
let temp = JSON.parse(JSON.stringify(obj));
if (temp.user_id != undefined) delete temp.user_id;
else if (temp.__v != undefined) delete temp.__v;
that.cs.db_editOrder(temp).subscribe((resp) => {
that.db_user_change(that.search);
// swal("Deleted!", "Your imaginary file has been deleted.", "success");
});
},
function (dismiss) {
// dismiss can be 'cancel', 'overlay', 'close', 'timer'
if (dismiss === "cancel") {
that.db_user_change(that.search);
// swal("Cancelled", "Your imaginary file is safe :)", "error");
}
}
);
}
db_editOrder(obj) {
let that = this;
let temp = JSON.parse(JSON.stringify(obj));
if (temp.user_id != undefined) delete temp.user_id;
else if (temp.__v != undefined) delete temp.__v;
this.cs.db_editOrder(temp).subscribe((resp) => {
that.db_user_change(that.search);
});
}
db_user_change(srch) {
let that = this;
let t: any = {};
for (let i in srch) {
if (srch[i] != "") {
t[i] = srch[i];
}
}
this.getOederSummary("?" + $.param(t)).subscribe((resp) => {
console.log("resp=>", resp);
that.pg_data.tbl = resp[0];
that.pg_data.status = resp[1];
});
}
db_status_change(srch) {
debugger;
let that = this;
let t: any = {};
for (let i in srch) {
if (srch[i] != "") {
t[i] = srch[i];
}
if (i == "from" && t[i] != "") {
t.from = new Date(t.from).toISOString();
}
if (i == "to" && t[i] != "") {
t.to = new Date(t.to).toISOString();
}
}
this.getOederSummary("?" + $.param(t)).subscribe((resp) => {
console.log("resp=>", resp);
that.pg_data.tbl = resp[0];
that.pg_data.status = resp[1];
});
}
convertToCSV(jsonData) {
const separator = ",";
const keys = Object.keys(jsonData[0]);
const header = keys.join(separator);
const rows = jsonData.map((obj) =>
keys.map((key) => obj[key]).join(separator)
);
return [header, ...rows].join("\n");
}
csvDownload(jsonData: any) {
let that = this;
let xlsxData = jsonData.map((d) => {
let t: any = {};
t.Name = (d.buyer_first_name || "") + (d.buyer_last_name || "");
t.Email = d.email;
t.Phone = d.phone;
t.Status = d.status;
t.purchased_on = that.dt_f(d.purchased_on, "DD-MM-YYYY hh:mm a");
t.Amount = d.amount || "";
t.Address =
d.shippingAddress != undefined
? (d.shippingAddress.city || "") +
" " +
(d.shippingAddress.state || "") +
" " +
(d.shippingAddress.country || "") +
" " +
(d.shippingAddress.pincode || "")
: "";
t.Payment_Status = d.payment_status || "";
t.Payment_Ref = d.payment_reference || "";
d.CartData.map((dx, i) => {
// return { ...t, ...dx };
// t[`Cart-${i + 1}/cartId`] = dx.cartId;
t[`Cart-${i + 1}/deviceName`] = dx.deviceName;
t[`Cart-${i + 1}/price`] = dx.price;
t[`Cart-${i + 1}/quantity`] = dx.quantity;
});
return t;
});
// const csvData = this.convertToCSV(_.flatMap(xlsxData));
const csvData = this.convertToCSV(xlsxData);
const blob = new Blob([csvData], { type: "text/csv" });
const blobUrl = URL.createObjectURL(blob);
const downloadLink = document.createElement("a");
downloadLink.href = blobUrl;
downloadLink.download = "data.csv";
downloadLink.innerText = "Download CSV";
downloadLink.click();
URL.revokeObjectURL(blobUrl);
}
}

View file

@ -0,0 +1,78 @@
<app-all-menus></app-all-menus>
<div style="padding-top: 58px"></div>
<div class="topDiv">
<div
class="row"
style="
text-align: center;
background: #426e86;
padding-top: 10px;
padding-bottom: 10px;
color: white;
box-shadow: 3px 1px 5px 0px rgb(178, 176, 174);
"
>
<div class="col-sm-12 col-md-12 col-lg-12">
<h4>Firmware Version</h4>
</div>
</div>
<div class="container-fluid">
<div class="row mt-1">
<div class="col"></div>
<div class="col">
<table class="">
<tr>
<td>
<input
style="width: 200px"
placeholder="Enter Device ID"
type="text"
class="form-control"
[(ngModel)]="filter.Device_ID"
/>
</td>
<td>
<select
style="width: 200px"
class="form-control"
[(ngModel)]="filter.state"
>
<option value="">Select State</option>
<option
[value]="i._id.state"
*ngFor="let i of getAllState | async"
>
{{ i._id.state }}
</option>
</select>
</td>
<td>
<button class="btn btn-primary" (click)="search(filter)">
Search
</button>
</td>
<td>
<button
id="dwnl"
class="btn btn-primary"
(click)="downloadCsv(dt, 'download')"
>
<i class="fa fa-download" style="cursor: pointer"></i>
</button>
</td>
</tr>
</table>
</div>
<div class="col"></div>
</div>
<table
id="db2023_deviceTable"
cellspacing="0"
class="display nowrap"
style="width: 100%; font-size: 14px"
></table>
</div>
</div>

View file

@ -0,0 +1,7 @@
table.dataTable th {
background-color: #2d4262 !important;
}
table.dataTable.nowrap th,
th {
background-color: #2d4262 !important;
}

View file

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FirmwareComponent } from './firmware.component';
describe('FirmwareComponent', () => {
let component: FirmwareComponent;
let fixture: ComponentFixture<FirmwareComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ FirmwareComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FirmwareComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,121 @@
import { Component, OnInit } from "@angular/core";
import { Http, Headers, Response, ResponseContentType } from "@angular/http";
import { environment } from "../../environments/environment";
import { map, mergeMap } from "rxjs/operators";
declare var $: any;
@Component({
selector: "app-firmware",
templateUrl: "./firmware.component.html",
styleUrls: ["./firmware.component.scss"],
})
export class FirmwareComponent implements OnInit {
dev_url = environment.hostUrl;
dev_url2 = environment.hostUrl2;
userToken = localStorage.getItem("token");
headersVal = new Headers();
constructor(private http: Http) {
this.headersVal.append("Authorization", this.userToken);
}
dt: any = [];
filter: any = {
Device_ID: "",
state: "",
};
tabelObj: any;
search_flat: any = false;
search(filter: any) {
console.log(filter);
this.tabelObj.ajax.reload();
}
ngOnInit() {
let that = this;
this.tabelObj = $("#db2023_deviceTable").DataTable({
processing: true,
searching: false,
pagingType: "full_numbers",
pageLength: 10,
// dom: '<"row"<"col-6"l><"col-6"#d wnl> <"col-12"t> <"col-6"i><"col-6"p>>',
serverSide: true,
// sort: false,
// scrollY: "65vh",
// scrollCollapse: true,
lengthMenu: [
[10, 25, 50, 99999999999999999999],
[10, 25, 50, "All"],
],
ajax: (dataTablesParameters, callback) => {
let qr: any = {
org: "6110fa23a6221d46dbebc473",
page: Number(dataTablesParameters.start),
limit: dataTablesParameters.length,
};
if (that.filter.Device_ID != "") {
qr.Device_ID = that.filter.Device_ID;
}
if (that.filter.state != "") {
qr.state = that.filter.state;
}
this.aj(qr).subscribe((resp) => {
console.log(resp);
that.dt = resp.data;
callback({
data: resp.data,
recordsTotal: resp.recordsTotal,
recordsFiltered: resp.recordsTotal,
});
// that.tabelObj.ajax.reload();
});
},
columns: [
{
data: "Device_ID",
title: "Device",
defaultContent: "",
render: function (data, type, row) {
return data ? data : "";
},
},
{
data: "firmwareVersion",
title: "Firmware Version",
defaultContent: "",
render: function (data, type, row) {
return data ? data : "";
},
},
],
});
}
aj(data) {
let that = this;
return this.http
.post(this.dev_url + "/devices/getFirmwareVersion", data, {
headers: this.headersVal,
})
.pipe(map((d: any) => d.json()));
}
getAllState = this.http
.get(this.dev_url + "/RTO_master/getAllState", {
headers: this.headersVal,
})
.pipe(map((d: any) => d.json()));
convertJsonToCsv(data) {
const csv = data.map((row) => Object.values(row).join(",")).join("\n");
return `data:text/csv;charset=utf-8,${encodeURIComponent(
"Device,Firmware Version\n" + csv
)}`;
}
// Create a download link for the CSV file
downloadCsv(data, filename) {
const csvData = this.convertJsonToCsv(data);
const link = document.createElement("a");
link.setAttribute("href", csvData);
link.setAttribute("download", filename);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
}

View file

@ -0,0 +1,242 @@
<app-all-menus></app-all-menus>
<div style="padding-top: 58px"></div>
<div class="topDiv">
<div
class="row"
style="
text-align: center;
background: #426e86;
padding-top: 10px;
padding-bottom: 10px;
color: white;
box-shadow: 3px 1px 5px 0px rgb(178, 176, 174);
"
>
<div class="col-sm-12 col-md-12 col-lg-12">
<!-- <i
class="fas fa-plus-circle"
md-tooltip="Add Driver"
style="
box-shadow: 3px 1px 5px 0px #b2b0ae;
cursor: pointer;
float: left;
font-size: 30px;
border-radius: 50px;
margin-left: 20px;
"
></i> -->
<h4>{{ "FOTA" }}</h4>
<!-- <button
style="
cursor: pointer;
float: right;
margin-right: 25px;
margin-top: -25px;
"
>
<i class="fas fa-file-excel-o" aria-hidden="true"></i>Export To Excel
</button> -->
</div>
</div>
<!--
{
"_id": "64dcc3ea174eb8338ced1f0b",
"createdAt": "2023-08-16T12:41:14.641Z",
"createdBy": "6110fa23a6221d46dbebc473",
"command": "SETUI S:60,E:5"
}
-->
<div class="container-fluid">
<div class="tab-pane" id="tabs-4" role="tabpanel">
<div class="row" style="margin-top: 10px; margin-bottom: 10px">
<div class="col-sm-4">
<div class="float-right">
<label
style="background: MD_DIALOG_DATA; box-shadow: 2px 2px #a0a3a5"
class="file-upload btn btn-primary"
>Browse for Excel file ...
<input
type="file"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
class="form-control-file"
id="excelFile"
/>
</label>
<!-- <a type="button" download href="https://www.oneqlik.in/BulkDeviceAdd.ods"
style="cursor:pointer; background: #40b516; margin-top: 0px; margin-left: 10px; border-color: #b5b4b4; box-shadow: 2px 2px #b1adad;"
class="btn btn-primary">Download Excel</a> -->
<!-- <a
type="button"
style="
cursor: pointer;
background: #40b516;
margin-top: 0px;
margin-left: 10px;
border-color: #b5b4b4;
box-shadow: 2px 2px #b1adad;
"
class="btn btn-primary"
>Download Excel</a
> -->
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="exampleInputEmail1">Command</label>
<input
type="text"
class="form-control"
id="command"
name="command"
placeholder="Command"
[(ngModel)]="data.command"
aria-describedby="command"
/>
</div>
</div>
<div class="col-sm-4">
<button
type="button"
style="
margin-top: 0px;
margin-left: 15px;
width: 90px;
box-shadow: 2px 2px #b1adad;
"
class="btn btn-primary mt-4"
(click)="btm_submit(data)"
[disabled]="valid(data)"
>
Upload
</button>
<div class="float-right mt-4">
<button
(click)="db_p_table()"
class="btn btn-primary"
[disabled]="db_page == 0"
>
<i class="fas fa-chevron-left"></i>
</button>
<button
(click)="db_n_table()"
class="btn btn-primary"
[disabled]="!(db_page < data.resp2.length / 10 - 1)"
>
<i class="fas fa-chevron-right text-white"></i>
</button>
</div>
</div>
</div>
</div>
<div class="row">
<!-- <div class="col-12">
<div class="form-group">
<label for="exampleFormControlFile1">File Upload</label>
<input
type="file"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
class="form-control-file"
id="excelFile"
/>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="exampleInputEmail1">Command</label>
<input
type="text"
class="form-control"
id="command"
name="command"
[(ngModel)]="data.command"
aria-describedby="command"
/>
</div>
</div>
<div class="col-12 text-right">
<button
type="button"
class="btn btn-primary"
(click)="btm_submit(data)"
[disabled]="valid(data)"
>
Submit
</button>
</div> -->
<div class="col-12 mt-2" *ngIf="data.resp2.length > 0">
<table class="table" id="db_table">
<thead style="background-color: #426e86; color: #fff">
<tr>
<th>Transaction Id</th>
<th>Date & Time</th>
<!-- <th>CreatedBy</th> -->
<th>Command</th>
<th class="text-center">Download</th>
</tr>
</thead>
<tbody>
<ng-container *ngFor="let i of data.resp2; let idx = index">
<ng-container *ngIf="i.page_index == db_page">
<tr>
<td (click)="bulkcommand_commanddetails(i)">
<i
class="fas fa-chevron-right"
*ngIf="i.flag == undefined || i.flag == false"
></i>
<i class="fas fa-chevron-down" *ngIf="i.flag == true"></i>
<span style="text-decoration: underline; cursor: pointer">
{{ i._id }}
</span>
</td>
<td>{{ date(i, "DD-MM-YYYY hh:mm") }}</td>
<!-- <td>{{ i.createdBy }}</td> -->
<td>{{ i.command }}</td>
<td class="text-center" style="cursor: pointer">
<i
style="cursor: pointer"
(click)="down(i)"
class="fa fa-download"
aria-hidden="true"
></i>
</td>
</tr>
<ng-container
*ngIf="
i.child != undefined && i.child.length > 0 && i.flag == true
"
>
<tr>
<td colspan="4" class="p-0">
<table class="table table-sm table-striped" [id]="i._id">
<thead>
<tr>
<th>IMEI</th>
<th>Status</th>
<th>Response</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let i2 of i.child">
<td>{{ i2.imei }}</td>
<td>{{ i2.status }}</td>
<td>{{ i2.deviceResponse || "" }}</td>
</tr>
</tbody>
</table>
</td>
</tr>
</ng-container>
</ng-container>
</ng-container>
</tbody>
</table>
</div>
</div>
</div>
</div>

View file

Some files were not shown because too many files have changed in this diff Show more