Compare commits

...

10 commits

Author SHA1 Message Date
017919aa4b all work till 15 jan 2025-01-15 18:26:54 +05:30
81e5b8cf52 24 jul update 2023-07-24 11:36:46 +00:00
Alex beart
3a9e71fd0f trip management 2023-03-20 22:40:00 +05:30
Alex beart
58fb99cc5b issue screen with other Small fixes 2023-03-16 23:22:24 +05:30
69894ac132 removed needless files 2023-03-05 11:44:38 +00:00
Alex beart
55d79d1294 New index report and some UI issue 2023-03-04 16:39:03 +05:30
Alex beart
5dc54bfdb1 Formatting and some UI issue in reports section 2023-01-13 19:36:19 +05:30
Alex beart
6387df7050 Get all USER api parameter change 2023-01-13 19:35:37 +05:30
Alex beart
140263abd8 Change KYC PDF format for nippon 2023-01-13 19:33:16 +05:30
Alex beart
e24269c2a5 Replace single get Google address API to Bulk get address API and Create Local cache for address 2023-01-09 21:13:37 +05:30
315 changed files with 131791 additions and 56456 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

File diff suppressed because it is too large Load diff

225
dms.js
View file

@ -1,225 +0,0 @@
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* Geodesy representation conversion functions (c) Chris Veness 2002-2017 */
/* MIT Licence */
/* www.movable-type.co.uk/scripts/latlong.html */
/* www.movable-type.co.uk/scripts/geodesy/docs/module-dms.html */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
'use strict';
/* eslint no-irregular-whitespace: [2, { skipComments: true }] */
/**
* Latitude/longitude points may be represented as decimal degrees, or subdivided into sexagesimal
* minutes and seconds.
*
* @module dms
*/
/**
* Functions for parsing and representing degrees / minutes / seconds.
* @class Dms
*/
var Dms = {};
// note Unicode Degree = U+00B0. Prime = U+2032, Double prime = U+2033
/**
* Parses string representing degrees/minutes/seconds into numeric degrees.
*
* This is very flexible on formats, allowing signed decimal degrees, or deg-min-sec optionally
* suffixed by compass direction (NSEW). A variety of separators are accepted (eg 3° 37 09W).
* Seconds and minutes may be omitted.
*
* @param {string|number} dmsStr - Degrees or deg/min/sec in variety of formats.
* @returns {number} Degrees as decimal number.
*
* @example
* var lat = Dms.parseDMS('51° 28 40.12″ N');
* var lon = Dms.parseDMS('000° 00 05.31″ W');
* var p1 = new LatLon(lat, lon); // 51.4778°N, 000.0015°W
*/
Dms.parseDMS = function(dmsStr) {
// check for signed decimal degrees without NSEW, if so return it directly
if (typeof dmsStr == 'number' && isFinite(dmsStr)) return Number(dmsStr);
// strip off any sign or compass dir'n & split out separate d/m/s
var dms = String(dmsStr).trim().replace(/^-/, '').replace(/[NSEW]$/i, '').split(/[^0-9.,]+/);
if (dms[dms.length-1]=='') dms.splice(dms.length-1); // from trailing symbol
if (dms == '') return NaN;
// and convert to decimal degrees...
var deg;
switch (dms.length) {
case 3: // interpret 3-part result as d/m/s
deg = dms[0]/1 + dms[1]/60 + dms[2]/3600;
break;
case 2: // interpret 2-part result as d/m
deg = dms[0]/1 + dms[1]/60;
break;
case 1: // just d (possibly decimal) or non-separated dddmmss
deg = dms[0];
// check for fixed-width unseparated format eg 0033709W
//if (/[NS]/i.test(dmsStr)) deg = '0' + deg; // - normalise N/S to 3-digit degrees
//if (/[0-9]{7}/.test(deg)) deg = deg.slice(0,3)/1 + deg.slice(3,5)/60 + deg.slice(5)/3600;
break;
default:
return NaN;
}
if (/^-|[WS]$/i.test(dmsStr.trim())) deg = -deg; // take '-', west and south as -ve
return Number(deg);
};
/**
* Separator character to be used to separate degrees, minutes, seconds, and cardinal directions.
*
* Set to '\u202f' (narrow no-break space) for improved formatting.
*
* @example
* var p = new LatLon(51.2, 0.33); // 51°1200.0″N, 000°1948.0″E
* Dms.separator = '\u202f'; // narrow no-break space
* var pʹ = new LatLon(51.2, 0.33); // 51°1200.0″N, 000°1948.0″E
*/
Dms.separator = '';
/**
* Converts decimal degrees to deg/min/sec format
* - degree, prime, double-prime symbols are added, but sign is discarded, though no compass
* direction is added.
*
* @private
* @param {number} deg - Degrees to be formatted as specified.
* @param {string} [format=dms] - Return value as 'd', 'dm', 'dms' for deg, deg+min, deg+min+sec.
* @param {number} [dp=0|2|4] - Number of decimal places to use default 0 for dms, 2 for dm, 4 for d.
* @returns {string} Degrees formatted as deg/min/secs according to specified format.
*/
Dms.toDMS = function(deg, format, dp) {
if (isNaN(deg)) return null; // give up here if we can't make a number from deg
// default values
if (format === undefined) format = 'dms';
if (dp === undefined) {
switch (format) {
case 'd': case 'deg': dp = 4; break;
case 'dm': case 'deg+min': dp = 2; break;
case 'dms': case 'deg+min+sec': dp = 0; break;
default: format = 'dms'; dp = 0; // be forgiving on invalid format
}
}
deg = Math.abs(deg); // (unsigned result ready for appending compass dir'n)
var dms, d, m, s;
switch (format) {
default: // invalid format spec!
case 'd': case 'deg':
d = deg.toFixed(dp); // round/right-pad degrees
if (d<100) d = '0' + d; // left-pad with leading zeros (note may include decimals)
if (d<10) d = '0' + d;
dms = d + '°';
break;
case 'dm': case 'deg+min':
d = Math.floor(deg); // get component deg
m = ((deg*60) % 60).toFixed(dp); // get component min & round/right-pad
if (m == 60) { m = 0; d++; } // check for rounding up
d = ('000'+d).slice(-3); // left-pad with leading zeros
if (m<10) m = '0' + m; // left-pad with leading zeros (note may include decimals)
dms = d + '°'+Dms.separator + m + '';
break;
case 'dms': case 'deg+min+sec':
d = Math.floor(deg); // get component deg
m = Math.floor((deg*3600)/60) % 60; // get component min
s = (deg*3600 % 60).toFixed(dp); // get component sec & round/right-pad
if (s == 60) { s = (0).toFixed(dp); m++; } // check for rounding up
if (m == 60) { m = 0; d++; } // check for rounding up
d = ('000'+d).slice(-3); // left-pad with leading zeros
m = ('00'+m).slice(-2); // left-pad with leading zeros
if (s<10) s = '0' + s; // left-pad with leading zeros (note may include decimals)
dms = d + '°'+Dms.separator + m + ''+Dms.separator + s + '″';
break;
}
return dms;
};
/**
* Converts numeric degrees to deg/min/sec latitude (2-digit degrees, suffixed with N/S).
*
* @param {number} deg - Degrees to be formatted as specified.
* @param {string} [format=dms] - Return value as 'd', 'dm', 'dms' for deg, deg+min, deg+min+sec.
* @param {number} [dp=0|2|4] - Number of decimal places to use default 0 for dms, 2 for dm, 4 for d.
* @returns {string} Degrees formatted as deg/min/secs according to specified format.
*/
Dms.toLat = function(deg, format, dp) {
var lat = Dms.toDMS(deg, format, dp);
return lat===null ? '' : lat.slice(1)+Dms.separator + (deg<0 ? 'S' : 'N'); // knock off initial '0' for lat!
};
/**
* Convert numeric degrees to deg/min/sec longitude (3-digit degrees, suffixed with E/W)
*
* @param {number} deg - Degrees to be formatted as specified.
* @param {string} [format=dms] - Return value as 'd', 'dm', 'dms' for deg, deg+min, deg+min+sec.
* @param {number} [dp=0|2|4] - Number of decimal places to use default 0 for dms, 2 for dm, 4 for d.
* @returns {string} Degrees formatted as deg/min/secs according to specified format.
*/
Dms.toLon = function(deg, format, dp) {
var lon = Dms.toDMS(deg, format, dp);
return lon===null ? '' : lon+Dms.separator + (deg<0 ? 'W' : 'E');
};
/**
* Converts numeric degrees to deg/min/sec as a bearing (0°..360°)
*
* @param {number} deg - Degrees to be formatted as specified.
* @param {string} [format=dms] - Return value as 'd', 'dm', 'dms' for deg, deg+min, deg+min+sec.
* @param {number} [dp=0|2|4] - Number of decimal places to use default 0 for dms, 2 for dm, 4 for d.
* @returns {string} Degrees formatted as deg/min/secs according to specified format.
*/
Dms.toBrng = function(deg, format, dp) {
deg = (Number(deg)+360) % 360; // normalise -ve values to 180°..360°
var brng = Dms.toDMS(deg, format, dp);
return brng===null ? '' : brng.replace('360', '0'); // just in case rounding took us up to 360°!
};
/**
* Returns compass point (to given precision) for supplied bearing.
*
* @param {number} bearing - Bearing in degrees from north.
* @param {number} [precision=3] - Precision (1:cardinal / 2:intercardinal / 3:secondary-intercardinal).
* @returns {string} Compass point for supplied bearing.
*
* @example
* var point = Dms.compassPoint(24); // point = 'NNE'
* var point = Dms.compassPoint(24, 1); // point = 'N'
*/
Dms.compassPoint = function(bearing, precision) {
if (precision === undefined) precision = 3;
// note precision could be extended to 4 for quarter-winds (eg NbNW), but I think they are little used
bearing = ((bearing%360)+360)%360; // normalise to range 0..360°
var cardinals = [
'N', 'NNE', 'NE', 'ENE',
'E', 'ESE', 'SE', 'SSE',
'S', 'SSW', 'SW', 'WSW',
'W', 'WNW', 'NW', 'NNW' ];
var n = 4 * Math.pow(2, precision-1); // no of compass points at reqd precision (1=>4, 2=>8, 3=>16)
var cardinal = cardinals[Math.round(bearing*n/360)%n * 16/n];
return cardinal;
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
if (typeof module != 'undefined' && module.exports) module.exports = Dms; // ≡ export default Dms

View file

@ -1,127 +0,0 @@
/*****************************************
FUNCTIONS
******************************************/
exports.rad = function (x) {
return x * Math.PI / 180;
};
/*
@param p1: {lat:X,lng:Y}
@param p2: {lat:X,lng:Y}
*/
exports.get_distance = function (p1, p2) {
var R = 6378137; // Earths mean radius in meter
var dLat = exports.rad(p2.lat - p1.lat);
var dLong = exports.rad(p2.lng - p1.lng);
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
Math.cos(exports.rad(p1.lat)) * Math.cos(exports.rad(p2.lat)) *
Math.sin(dLong / 2) * Math.sin(dLong / 2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
var d = R * c;
return d; // returns the distance in meter
};
exports.send = function (socket, msg) {
socket.write(msg);
};
exports.parse_data = function (data) {
data = data.replace(/(\r\n|\n|\r)/gm, ''); //Remove 3 type of break lines
var cmd_start = data.indexOf('B'); //al the incomming messages has a cmd starting with 'B'
if (cmd_start > 13)throw 'Device ID is longer than 12 chars!';
var parts = {
'start': data.substr(0, 1),
'device_id': data.substring(1, cmd_start),
'cmd': data.substr(cmd_start, 4),
'data': data.substring(cmd_start + 4, data.length - 1),
'finish': data.substr(data.length - 1, 1)
};
return parts;
};
exports.parse_gps_data = function (str) {
var data = {
'date': str.substr(0, 6),
'availability': str.substr(6, 1),
'latitude': gps_minute_to_decimal(parseFloat(str.substr(7, 9))),
'latitude_i': str.substr(16, 1),
'longitude': gps_minute_to_decimal(parseFloat(str.substr(17, 9))),
'longitude_i': str.substr(27, 1),
'speed': str.substr(28, 5),
'time': str.substr(33, 6),
'orientation': str.substr(39, 6),
'io_state': str.substr(45, 8),
'mile_post': str.substr(53, 1),
'mile_data': parseInt(str.substr(54, 8), 16)
};
return data;
};
exports.send_to = function (socket, cmd, data) {
if (typeof(socket.device_id) == 'undefined')throw 'The socket is not paired with a device_id yet';
var str = gps_format.start;
str += socket.device_id + gps_format.separator + cmd;
if (typeof(data) != 'undefined') str += gps_format.separator + data;
str += gps_format.end;
send(socket, str);
//Example: (<DEVICE_ID>|<CMD>|<DATA>) - separator: | ,start: (, end: )
};
exports.minute_to_decimal = function (pos, pos_i) {
if (typeof(pos_i) === 'undefined') pos_i = 'N';
var dg = parseInt(pos / 100);
var minutes = pos - (dg * 100);
var res = (minutes / 60) + dg;
return (pos_i.toUpperCase() === 'S' || pos_i.toUpperCase() === 'W') ? res * -1 : res;
};
// Send a message to all clients
exports.broadcast = function (message, sender) {
clients.forEach(function (client) {
if (client === sender) return;
client.write(message);
});
process.stdout.write(message + '\n');
};
exports.data_to_hex_array = function (data) {
var arr = [];
for (var i = 0; i < data.length; i++)arr.push(data[i].toString(16));
return arr;
};
/* RETRUN AN INTEGER FROM A HEX CHAR OR integer */
exports.hex_to_int = function (hex_char) {
return parseInt(hex_char, 16);
};
exports.sum_hex_array = function (hex_array) {
var sum = 0;
for (var i in hex_array)sum += exports.hex_to_int(hex_array[i]);
return sum;
};
exports.hex_array_to_hex_str = function (hex_array) {
var str = '';
for (var i in hex_array) {
var char;
if (typeof(hex_array[i]) === 'number') char = hex_array[i].toString(16);
else char = hex_array[i].toString();
str += exports.str_pad(char, 2, '0');
}
return str;
};
exports.str_pad = function (input, length, string) {
string = string || '0';
input = input + '';
return input.length >= length ? input : new Array(length - input.length + 1).join(string) + input;
};
exports.crc_itu_get_verification = function (hex_data) {
var crc16 = require('crc-itu').crc16;
if (typeof(hex_data) === 'String') str = hex_data;
else str = exports.hex_array_to_hex_str(hex_data);
return crc16(str, 'hex');
};

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

@ -158,7 +158,8 @@ logout(){
soon(){ soon(){
this.router.navigateByUrl("const?_i="+window.localStorage.token);
this.router.navigateByUrl("const?_i="+window.localStorage.token);
} }

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

@ -95,7 +95,8 @@ export class AddDeviceModelComponent implements OnInit {
} }
soon(){ soon(){
this.router.navigateByUrl("const?_i="+window.localStorage.token);
this.router.navigateByUrl("const?_i="+window.localStorage.token);
} }
@ -313,7 +314,7 @@ mydealer(){
if(window.localStorage['DataLoaded'] = 'True'){ if(window.localStorage['DataLoaded'] = 'True'){
window.localStorage['Custumer'] = 'OFF' window.localStorage['Custumer'] = 'OFF'
this.router.navigateByUrl("add") this.router.navigateByUrl("add")
// this.router.navigateByUrl("const?_status="+"OK");
} }
} }
/* TOKEN GENERATION */ /* TOKEN GENERATION */

View file

@ -97,7 +97,8 @@ export class AddDriverComponent implements OnInit {
} }
soon(){ soon(){
this.router.navigateByUrl("const?_i="+window.localStorage.token);
this.router.navigateByUrl("const?_i="+window.localStorage.token);
} }
@ -337,7 +338,7 @@ mydealer(){
if(window.localStorage['DataLoaded'] = 'True'){ if(window.localStorage['DataLoaded'] = 'True'){
window.localStorage['Custumer'] = 'OFF' window.localStorage['Custumer'] = 'OFF'
this.router.navigateByUrl("add") this.router.navigateByUrl("add")
// this.router.navigateByUrl("const?_status="+"OK");
} }
} }
/* TOKEN GENERATION */ /* TOKEN GENERATION */
@ -541,7 +542,7 @@ else{
// return metadata; // return metadata;
// }; // };
// onUploadFinished(file) { // onUploadFinished(file) {
// debugger; //
// console.log(file); // console.log(file);
// this.imageFile=file; // this.imageFile=file;
// console.log(this.imageFile.file.name); // console.log(this.imageFile.file.name);
@ -569,7 +570,7 @@ else{
// return metadata; // return metadata;
// }; // };
// onUploadFinished1(file) { // onUploadFinished1(file) {
// debugger; //
// console.log(file); // console.log(file);
// this.imageFile=file; // this.imageFile=file;
// console.log(this.imageFile.file.name); // console.log(this.imageFile.file.name);

View file

@ -116,7 +116,8 @@ export class AddEditVehicleTypeComponent implements OnInit {
} }
soon(){ soon(){
this.router.navigateByUrl("const?_i="+window.localStorage.token);
this.router.navigateByUrl("const?_i="+window.localStorage.token);
} }
@ -332,7 +333,7 @@ mydealer(){
if(window.localStorage['DataLoaded'] = 'True'){ if(window.localStorage['DataLoaded'] = 'True'){
window.localStorage['Custumer'] = 'OFF' window.localStorage['Custumer'] = 'OFF'
this.router.navigateByUrl("add") this.router.navigateByUrl("add")
// this.router.navigateByUrl("const?_status="+"OK");
} }
} }
/* TOKEN GENERATION */ /* TOKEN GENERATION */

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

@ -55,7 +55,7 @@ export class ResetPasswordComponent implements OnInit {
showBtn : boolean = true; showBtn : boolean = true;
showBtn_1 : boolean = true; showBtn_1 : boolean = true;
show_hide_pass(id){ show_hide_pass(id){
debugger;
console.log(id); console.log(id);
if(id == 0){ if(id == 0){
this.iType = 'text'; this.iType = 'text';

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,58 +1,120 @@
<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%;
</ul> overflow: hidden;
<ul fxShow fxHide.xs="false" fxHide.lg="true" fxHide.gt-sm="true" style="width:100%;padding-top: 18px;"> position: fixed;
<!-- <li style="width:25%;"> 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
fxShow
fxHide.xs="false"
fxHide.lg="true"
fxHide.gt-sm="true"
style="width: 100%; padding-top: 18px"
>
<!-- <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
</li> color="blue"
<li style="float:right;width:40%;"> routerLink="login"
<button md-button [mdMenuTriggerFor]="menu" style="padding:0%;"><i class="material-icons">list</i></button> style="font-size: 2.5vw; color: black; padding-left: 2.3em"
<md-menu #menu="mdMenu"> >{{ "Login" | translate }}</a
<button md-menu-item routerLink="home">Home</button> >
<button md-menu-item routerLink="support">Contact us</button> </li>
<button md-menu-item routerLink="about-us">About us</button> <li style="float: right; width: 40%">
<button md-menu-item routerLink="services">Services</button> <button md-button [mdMenuTriggerFor]="menu" style="padding: 0%">
</md-menu> <i class="material-icons">list</i>
</li> </button>
</ul> <md-menu #menu="mdMenu">
<ul fxShow fxHide.xs="true" fxHide.lt-md="true" fxHide.gt-sm="false" style="float:right;width:50%; margin-top: 3%;"> <button md-menu-item routerLink="home">Home</button>
<!-- <li style="width:12%;float:right"> <button md-menu-item routerLink="support">Contact us</button>
<button md-menu-item routerLink="about-us">About us</button>
<button md-menu-item routerLink="services">Services</button>
</md-menu>
</li>
</ul>
<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">
<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
</li> style="font-size: 15px; color: black; padding: 10%"
<li style="width:12%;float:right;margin-right:34px"> routerLink="login"
<a style="font-size: 15px;color: black;padding: 10 19%;" routerLink="support" routerLinkActive="active-link"
routerLinkActive="active-link">Contact us</a> >Login</a
</li> >
<li style="float:right;width:15%"> </li>
<a color="blue" routerLink="about-us" style="font-size: 15px ;padding: 10 3%;color: black;" <li style="width: 12%; float: right; margin-right: 34px">
routerLinkActive="active-link">About Us</a> <a
</li> style="font-size: 15px; color: black; padding: 10 19%"
<li style="float:right;width:15%"> routerLink="support"
<a color="blue" routerLink="services" style="font-size: 15px;padding: 10 3%;color: black;" routerLinkActive="active-link"
routerLinkActive="active-link">Services</a> >Contact us</a
</li> >
<li style="float:right;width:10%"> </li>
<a color="blue" routerLink="home" style="font-size: 15px;padding: 10 3%;color: black;" <li style="float: right; width: 15%">
routerLinkActive="active-link">Home</a> <a
</li> color="blue"
</ul> routerLink="about-us"
</md-toolbar> style="font-size: 15px; padding: 10 3%; color: black"
<!-- <div> routerLinkActive="active-link"
>About Us</a
>
</li>
<li style="float: right; width: 15%">
<a
color="blue"
routerLink="services"
style="font-size: 15px; padding: 10 3%; color: black"
routerLinkActive="active-link"
>Services</a
>
</li>
<li style="float: right; width: 10%">
<a
color="blue"
routerLink="home"
style="font-size: 15px; padding: 10 3%; color: black"
routerLinkActive="active-link"
>Home</a
>
</li>
</ul>
</md-toolbar>
<!-- <div>
<md-toolbar flex style="background-color:white;width: 100%;position:fixed;z-index:10;" > <md-toolbar flex style="background-color:white;width: 100%;position:fixed;z-index:10;" >
<img src="../../assets/image/a.jpg" routerLink="home" <img src="../../assets/image/a.jpg" routerLink="home"
@ -82,14 +144,14 @@
</ul> --> </ul> -->
<!-- <!--
<ul fxShow fxHide.xs="false" fxHide.lg="true" fxHide.gt-sm="true" fxHide.gt-xs="true" style=" <ul fxShow fxHide.xs="false" fxHide.lg="true" fxHide.gt-sm="true" fxHide.gt-xs="true" style="
width: 50%; width: 50%;
display: block; display: block;
padding: 0px; padding: 0px;
margin: 0px;"> --> margin: 0px;"> -->
<!--for small screen --> <!--for small screen -->
<!-- <li style="width: 22%;padding-left:0.7em;"> <!-- <li style="width: 22%;padding-left:0.7em;">
<a routerLink="signup" style="font-size: 2.5vw; color: black;" >SignUp</a> <a routerLink="signup" style="font-size: 2.5vw; color: black;" >SignUp</a>
</li> </li>
<li style=" <li style="
@ -105,9 +167,7 @@
</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>
</li> </li>
@ -119,11 +179,9 @@
</ul> </ul>
--> -->
<!-- <div class="main"> --> <!-- <div class="main"> -->
<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,163 +1,186 @@
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(
// let split3 = document.URL.split('referrer_token')[1] || localStorage.getItem('referrer_token'); (el) => el.src
);
x = x.filter((src) => src.match(/main/))[0].split("/");
var decode_token = function(token){ x = x[x.length - 1];
var decodeToken = function(token){ async function check() {
return token ? (window.atob(token)):token; let text = (await fetch("/").then((x) => x.text())).match(
} /main\..*\.js/
var parseToken = function(token){ )[0];
if(token && typeof(token)=='string'){ console.log(x, text);
try { if (x != text) {
return JSON.parse(token) console.log("😀👢🐬 🅱⛎🕴👢🐬");
} catch (e) { window.location.reload();
return "";
}
}
else
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)));
}
let token = document.URL.split('referrer_token=')[1] || localStorage.getItem('referrer_token=');
console.log(token);
var split3 = decode_token(token) ;
console.log(split3);
if(split3 && split3.referer){
// var referrer_token = split3.substring(1);
// var referer_data = window.atob(referrer_token).split(",");
// var referer = referer_data[0].split("=")[1];
// var username = referer_data[1].split("=")[1];
// var password = referer_data[2].split("=")[1];
// console.log(referer);
// console.log(username);
// console.log(password);
// var r1 = referer.split('"')[0];
// var u1 = username.split('"')[0];
// var p1 = password.split('"')[0];
// console.log(r1);
// var reffere_obj = {
// user : username,
// pass : password
// }
localStorage.setItem('referer_obj',JSON.stringify(split3));
localStorage.setItem('referrer_token=',token);
var referer = split3['referer'];
this.contactService.getReferenceId(referer).subscribe(res=>{
// localStorage.setItem('referrer_token',split3);
this.loginComp.loginemail() ;
},err=>{
console.log(err);
})
}else{
for(var i = 0; i <this.showMenu.length;i++){
if (this.url == this.showMenu[i]) {
this.showNav = true;
return;
} else { } else {
this.showNav = false;
console.log("👢🅰🍄𝓔💲🍄 🅱⛎🕴👢🐬");
} }
} }
check();
setInterval(()=>{
check();
}, 3600000);
this.contactService.dealerInfo(this.url == 'localhost:4200' ?'oneqlik.in':this.url ).subscribe(
data => {
this.userData = data
this.logo = this.dev_url+this.userData.logo; let split1 = document.URL.split("//")[1];
this.titleService.setTitle(this.userData.organisationName); let split2 = split1.split("/")[0];
this.text=this.userData.text; let splitForStyle = split1.split("/")[1];
this.address = this.userData.address; this.url = split2;
console.log("this.userData.email",this.userData.email);
// this.dealerId = // let split3 = document.URL.split('referrer_token')[1] || localStorage.getItem('referrer_token');
console.log("this.userData",this.userData);
window.localStorage['dealerName']= this.userData.dealerName; var decode_token = function (token) {
window.localStorage['DealerID'] = this.userData.email; var decodeToken = function (token) {
window.localStorage['DealerPhone'] =this.userData.contactNumber; return token ? window.atob(token) : token;
window.localStorage['logo'] =this.logo; };
window.localStorage['address'] =this.userData.address; var parseToken = function (token) {
window.localStorage['text'] = this.text; if (token && typeof token == "string") {
window.localStorage['mobile'] = this.userData.contactNumber; try {
window.localStorage['facebook'] = this.userData.facebook; return JSON.parse(token);
window.localStorage['android'] = this.userData.androidApp; } catch (e) {
window.localStorage['iphone'] = this.userData.appleApp; return "";
window.localStorage['organisationName'] = this.userData.organisationName; }
if(window.localStorage[this.userData.dealerName]){ } else return "";
console.log("Dealer Name =>", this.userData.dealerName); };
var getData = function (token) {
return token
? {
referer: decodeToken(token._referrer),
username: decodeToken(token._u),
pass: decodeToken(token._p),
}
: null;
};
return getData(parseToken(decodeToken(token)));
};
let token =
document.URL.split("referrer_token=")[1] ||
localStorage.getItem("referrer_token=");
console.log(token);
var split3 = decode_token(token);
console.log(split3);
if (split3 && split3.referer) {
// var referrer_token = split3.substring(1);
// var referer_data = window.atob(referrer_token).split(",");
// var referer = referer_data[0].split("=")[1];
// var username = referer_data[1].split("=")[1];
// var password = referer_data[2].split("=")[1];
// console.log(referer);
// console.log(username);
// console.log(password);
// var r1 = referer.split('"')[0];
// var u1 = username.split('"')[0];
// var p1 = password.split('"')[0];
// console.log(r1);
// var reffere_obj = {
// user : username,
// pass : password
// }
localStorage.setItem("referer_obj", JSON.stringify(split3));
localStorage.setItem("referrer_token=", token);
var referer = split3["referer"];
this.contactService.getReferenceId(referer).subscribe(
(res) => {
// localStorage.setItem('referrer_token',split3);
this.loginComp.loginemail();
},
(err) => {
console.log(err);
}
);
} else {
for (var i = 0; i < this.showMenu.length; i++) {
if (this.url == this.showMenu[i]) {
this.showNav = true;
return;
} else {
this.showNav = false;
}
} }
})
// translate.setDefaultLang('en'); this.contactService
// translate.use('en'); .dealerInfo(this.url == "localhost:4200" ? "www.oneqlik.in" : this.url)
.subscribe((data) => {
this.userData = data;
this.logo = this.dev_url + this.userData.logo;
this.titleService.setTitle(this.userData.organisationName);
this.text = this.userData.text;
this.address = this.userData.address;
console.log("this.userData.email", this.userData.email);
// this.dealerId =
console.log("this.userData", this.userData);
window.localStorage["dealerName"] = this.userData.dealerName;
window.localStorage["DealerID"] = this.userData.email;
window.localStorage["DealerPhone"] = this.userData.contactNumber;
window.localStorage["logo"] = this.logo;
window.localStorage["address"] = this.userData.address;
window.localStorage["text"] = this.text;
window.localStorage["mobile"] = this.userData.contactNumber;
window.localStorage["facebook"] = this.userData.facebook;
window.localStorage["android"] = this.userData.androidApp;
window.localStorage["iphone"] = this.userData.appleApp;
window.localStorage["organisationName"] =
this.userData.organisationName;
if (window.localStorage[this.userData.dealerName]) {
console.log("Dealer Name =>", this.userData.dealerName);
}
});
// translate.setDefaultLang('en');
// translate.use('en');
}
} }
}; color: any;
fun1(value) {
if (value == "signup") {
color:any; this.color = "red";
fun1(value){ // console.log(this.color);
}
if(value=="signup"){ }
this.color='red'; ngOnDestroy() {
// console.log(this.color); window.localStorage.clear();
} }
} }
ngOnDestroy() {
window.localStorage.clear();
}
}

View file

@ -1,306 +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 { 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';
@ -314,13 +339,11 @@ import { UserSettingComponent } from './user-setting/user-setting.component';
}); */ }); */
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,
@ -341,6 +364,8 @@ export function createTranslateLoader(http: Http) {
RuleComponent, RuleComponent,
ConstComponent, ConstComponent,
LocationComponent, LocationComponent,
LocationNewComponent,
OpenMapComponent,
EditScheComponent, EditScheComponent,
LoaderServiceComponent, LoaderServiceComponent,
GeofencingComponent, GeofencingComponent,
@ -377,6 +402,7 @@ export function createTranslateLoader(http: Http) {
DistanceReportComponent, DistanceReportComponent,
AlertReportComponent, AlertReportComponent,
TripReportComponent, TripReportComponent,
TripManagementReportComponent,
GroupComponent, GroupComponent,
AddGroupComponent, AddGroupComponent,
DialogDemoComponent, DialogDemoComponent,
@ -419,6 +445,7 @@ export function createTranslateLoader(http: Http) {
UserMasterComponent, UserMasterComponent,
DeviceComponent, DeviceComponent,
GpsMasterComponent, GpsMasterComponent,
IndexingReportComponent,
CmdPacketMasterComponent, CmdPacketMasterComponent,
EditDeviceMasterComponent, EditDeviceMasterComponent,
GpsEditMasterComponent, GpsEditMasterComponent,
@ -470,6 +497,7 @@ export function createTranslateLoader(http: Http) {
ProductOverviewComponent, ProductOverviewComponent,
PointShareComponent, PointShareComponent,
MessageUtilityComponent, MessageUtilityComponent,
VirtualDeviceComponent,
TripLoadUnloadComponent, TripLoadUnloadComponent,
BuyNowComponent, BuyNowComponent,
BillingInfoComponent, BillingInfoComponent,
@ -531,22 +559,42 @@ export function createTranslateLoader(http: Http) {
RtoMasterComponent, RtoMasterComponent,
DeviceKYCComponent, DeviceKYCComponent,
DeviceDocComponent, DeviceDocComponent,
IssueAddKycComponent,
IssueListKycComponent,
NewRoutePlanReportComponent, NewRoutePlanReportComponent,
ModelMasterComponent, ModelMasterComponent,
TrackedUntrackedVehiclesComponent, TrackedUntrackedVehiclesComponent,
NotificationForCCComponent, NotificationForCCComponent,
AddNewDeviceComponent, AddNewDeviceComponent,
AddNewDevices2Component,
ViewCertificateComponent, ViewCertificateComponent,
NewEditDeviceComponent, NewEditDeviceComponent,
DownloadCertificateComponent, DownloadCertificateComponent,
DownloadCertificaterdmComponent,
DeviceSettingComponent, DeviceSettingComponent,
UserSettingComponent, UserSettingComponent,
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({
@ -564,8 +612,8 @@ export function createTranslateLoader(http: Http) {
// }), // }),
IfScrollbarsModule, IfScrollbarsModule,
GaugeModule.forRoot(), GaugeModule.forRoot(),
/* GaugesModule, */ /* GaugesModule, */
DateTimePickerModule , DateTimePickerModule,
AngularDateTimePickerModule, AngularDateTimePickerModule,
BrowserModule, BrowserModule,
NgbModule.forRoot(), NgbModule.forRoot(),
@ -591,7 +639,7 @@ export function createTranslateLoader(http: Http) {
HttpModule, HttpModule,
StormpathModule, StormpathModule,
NguiPopupModule, NguiPopupModule,
/* googleMapsCore, */ /* googleMapsCore, */
Ng2DropdownModule, Ng2DropdownModule,
BrowserAnimationsModule, BrowserAnimationsModule,
NoopAnimationsModule, NoopAnimationsModule,
@ -603,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:[PoiDtlDelComponent,EditDeviceMasterComponent,AcreportInfoComponent,GpsEditMasterComponent,RenewalHistoryComponent,PoiMenuComponent,ExpenseComponentComponent, entryComponents: [
AddpoiBylocationComponent,CreateTripComponent,CommentWindowComponent,DetailComponent,DailyDetailsComponent,RenewVehicleComponent,ViewCustomerDetailsComponent,OtpScreenComponent,DeviceDocComponent,TrackedUntrackedVehiclesComponent,DownloadCertificateComponent, IssueAddKycComponent,
AnnouncementComponent,SelectUntrackVehiclesComponent,ExpenselistComponent,AddPlanComponent,AddDriverComponent,ShowPullDataLinkComponent,HualtListComponent,ShoRoutePlanComponent,EChalanComponent,TrackedVehiclesComponent,ViewCertificateComponent,], PoiDtlDelComponent,
providers: [/* AuthService , */ AlertService, Data, SimpleTimer,DatainjectionService,ContactService,ReportService, EditDeviceMasterComponent,
{ provide: MD_DIALOG_DATA, useValue: {} }, AcreportInfoComponent,
{ provide: MdDialogRef, useValue: {} }], GpsEditMasterComponent,
exports: [AllMenusComponent], RenewalHistoryComponent,
bootstrap: [AppComponent] 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: MdDialogRef, useValue: {} },
DbauthGuard,
],
exports: [AllMenusComponent],
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="";
} }
}
}

File diff suppressed because it is too large Load diff

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>
@ -223,23 +163,19 @@
<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>
<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,35 +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"
formControlName="trackingExp" type="text" class="form-control" 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 [attr.disabled]="true" [bsConfig]="bsConfig" type="text"
formControlName="eSimExpiry" class="form-control" id="inputZip" />
bsDatepicker
[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">
@ -473,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 }}
@ -507,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">
@ -539,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">
@ -581,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">
@ -622,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">
@ -677,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

@ -1,61 +1,155 @@
<app-all-menus></app-all-menus> <app-all-menus></app-all-menus>
<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()"
<md-option *ngFor="let page of pageLengthArr; let i = index" [value]="page"> style="float: right; background: #efecec; margin: 0px 0px;padding: 0px 0px;">
{{page}} <md-option *ngFor="let page of pageLengthArr; let i = index" [value]="page">
</md-option> {{ page }}
</md-select> </md-option>
<h4 style="display: inline-block;">{{'Vehicles' | translate}}</h4> </md-select>
<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> <!-- (click)="db_show(this.tabelObj)" -->
<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>
</md-option>
</md-select>
<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-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">
@ -66,67 +160,204 @@
</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="table100-nextcols"> <div class="wrap-table100-nextcols js-pscroll">
<table id="deviceTable1" class="display order-column" cellspacing="0" style="font-size:15px;text-align: center;" > <div class="table100-nextcols">
<thead style="background:#add8e6"> <table id="deviceTable1" class="display order-column" cellspacing="0"
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>
</div> </div>
</div> </div>
</div> </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 class="col-3"> <!-- <div class="col-12">
{{ dbexp | json }}
</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,344 +1,419 @@
<!-- <div style="height: 73vh;overflow: auto;" class="card-body .html2canvas-container" id="map2">
<div class="row">
<div style="position: relative;left:4px;" *ngIf="supAdmin.imageDoc">
<img src="{{supAdmin.imageDoc}}" width="100px" height="100px">
</div>
<div style="position: relative;right: -671px;">
<img src="{{imgURL}}" width="150px" height="150px">
</div>
</div>
<h6 class="text-center mb-3">RTO COPY</h6>
<div class="row">
<div class="col-md-6 mb-3">
TAC Reg.No : 84399849
</div>
<div class="col-md-6 mb-3">
Fitment Date : 4 September 2021
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
CoP No. : 84399849
</div>
<div class="col-md-6 mb-3">
Fitment Renewal Date : 4 September 2021
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
CoP Validity upto : 4 September 2021
</div>
</div>
<h6 class="text-center mb-3">AIS 140 COMPLIANCE VLT INSTALLATION CERTIFICATE</h6>
<div class="row">
<div class="col-md-6 mb-3">
Fitment Certificate : 84399849
</div>
<div class="col-md-6 mb-3">
Device Model No. : NVT-1920
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
Chassis No. : 84122399849
</div>
<div class="col-md-6 mb-3">
GNSS Module : NVdsaT-1920
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
Engine No. : 84ss122399849
</div>
<div class="col-md-6 mb-3">
Vahan ID : 84ss122399849
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
Vehicle OEM : 84ss122399849
</div>
<div class="col-md-6 mb-3">
Device IMEI : NVdsaT-1920
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
Vehicle Model : WagnonR
</div>
<div class="col-md-6 mb-3">
GSM Module : NVdsaT-1920
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
Vehicle Reg/temp : WagnonR
</div>
<div class="col-md-6 mb-3">
ICCID : 84ss122399849
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
Voltage : 12V
</div>
<div class="col-md-6 mb-3">
Primary SIM : 84122399849
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
Panic Button Model : jhdks
</div>
<div class="col-md-6 mb-3">
Primary SIM Valid till : 4 September 2021
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
Panic Button fitted : 3
</div>
<div class="col-md-6 mb-3">
Secondary SIM : 4 September 2021
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
Dealer Name/fitted by : demo
</div>
<div class="col-md-6 mb-3">
Secondary SIM Valid till : 4 September 2021
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
GST No. : 4345434
</div>
</div>
<div class="row">
<div class="col-md-4">
<img src="{{deviceImage[0]?deviceImage[0]:img1}}" width="90px" height="90px">
</div>
<div class="col-md-4">
<img src="{{deviceImage[1]?deviceImage[1]:img1}}" width="90px" height="90px">
</div>
<div class="col-md-4">
<img src="{{deviceImage[2]?deviceImage[2]:img1}}" width="90px" height="90px">
</div>
</div>
<p>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>
<b class="mt-5 mb-4">Authorised
<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>
<div class="row">
<div class="col-md-6 mb-3">
Customer Name : abc
</div>
<div class="col-md-6 mb-3">
Contact/Login ID : 35344532
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
Customer Address : demo
</div>
<div class="col-md-6 mb-3">
Customer Sign :
</div>
</div>
</div>
<div class="card-footer text-center">
<button class="btn btn-primary" (click)="downloadPdf()">Download</button>
</div> -->
<md-dialog-content class="md-typography"> <md-dialog-content class="md-typography">
<table id="testPdf" style="font-weight: 600"> <div id="testPdf" class="src_app_dashboard_download-certificate_download-certificate.component.html">
<tr> <div class="row">
<td> <table class="table table-borderless">
<div *ngIf="org.imageDoc"> <tr>
<img
src="{{ org.imageDoc }}"
width="100px"
height="100px"
/><br />
</div>
</td>
<td style="text-align: center; font-weight: 700">
<!-- {{org?org.first_name?org.first_name:"":''}} {{org?org.last_name?org.last_name:'':""}}<br><br> -->
<!-- {{org?org.address?org.address:'':""}}<br><br> -->
RTO COPY
</td>
<td style="text-align: center">
<div>
<img src="{{ imgURL }}" width="100px" height="100px" />
</div>
</td>
</tr>
<tr> <td class="text-center">
<td colspan="3" style="text-align: center"> <div style="text-align: center" *ngIf="org.imageDoc">
<img src="{{ org.imageDoc }}" style="width: auto; height: 100px" /><br />
</div>
</td>
</td> </tr>
</tr> </table>
<tr> <table class="table table-borderless">
<td width="200"> <tr>
TAC Reg.No &nbsp;&nbsp;&nbsp; <br /> <td class="to-head" style="width: 25%;padding: 20px;">
CoP No.&nbsp;&nbsp;&nbsp;&nbsp;<br /> To <br />
CoP Validity upto&nbsp;&nbsp;<br /> Regional Transport Authority<br />
Fitment Date&nbsp;&nbsp;&nbsp;<br /> {{data.deviceInfo && data.deviceInfo.transportOfficeCity?data.deviceInfo.transportOfficeCity:''}}<br />
Fitment Renewal Date&nbsp;&nbsp;<br /> {{data.deviceInfo && data.deviceInfo.transportOfficeState?data.deviceInfo.transportOfficeState:''}}
</td> Only<br />
<td colspan="2"> </td>
: CK8077 <br /> <td style="width: 50%;">
: CC0GR8739<br /> <div class="text-center">
: 30 September 2023 <br /> <div class="fitment-heading">
: {{ kycApprovalDate ? (kycApprovalDate | date: "dd/MM/yyyy") : "" FITMENT CERTIFICATE
}}<br /> </div>
: {{ esim_validity ? esim_validity : "" }}<br /> </div>
</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>
Fitment Certificate No.<br />
Chassis No. <br />
Engine 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 />
: {{ ChassisNo ? ChassisNo : "" }}<br />
: {{ engineNo ? engineNo : "" }}<br />
: {{ manufacturingCompany ? manufacturingCompany : "" }}<br />
: {{ model ? model : "" }}<br />
: {{ devName ? devName : "" }}<br />
: 12V & 24V<br />
: NSS-1821<br />
: {{ numberOfSOS ? numberOfSOS : "" }}<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"> <p class="mt-2">
<td> 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>{{ fitmentCertificateNo ? fitmentCertificateNo : "" }}</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>CK8077</td>
</tr>
<tr>
<td>COP NO.</td>
<td>{{devicetype ==
"Nippon-NVT-1920"?"CC0GT8761":"CC0GT8746"}}</td>
</tr>
<tr>
<td>COP Validity upto</td>
<td>{{devicetype == "Nippon-NVT-1920"?"30 September 2025":"30 March 2025"}}</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;">
</td> <tr>
<td> <td>IMEI NO.</td>
<img <td>{{ deviceID ? deviceID : "" }}</td>
src="{{ deviceImage[0] ? deviceImage[0] : img1 }}" </tr>
width="80px" <tr>
height="80px" <td>ICCID NO/SIM NO</td>
/> <td>{{ ICCICD ? ICCICD : "" }}</td>
<img </tr>
src="{{ deviceImage[1] ? deviceImage[1] : img1 }}" <tr>
width="80px" <td>Sim Card Service Provider</td>
height="80px" <td>{{data.deviceInfo && data.deviceInfo.sim_provider? data.deviceInfo.sim_provider : ''}}</td>
/> </tr>
<img <tr>
src="{{ deviceImage[2] ? deviceImage[2] : img1 }}" <td>No. Of Panic Button</td>
width="80px" <td>{{ numberOfSOS ? numberOfSOS : "" }}</td>
height="80px" </tr>
/> <tr>
</td> <td>Sim No.</td>
<td> <td>{{ simNum ? simNum : "" }}</td>
</tr>
</tbody>
</table>
</div>
<div class="col-12">
<table class="table table-bordered">
</td>
</tr> <tbody style="font-size: 10px;" *ngIf="deviceImage[0] || deviceImage[1] || deviceImage[2]">
<tr> <tr class="text-center">
<td colspan="3"> <td style="font-weight: 700;">
<p> <img *ngIf="deviceImage[0]" src="{{ deviceImage[0] ? deviceImage[0] : img1 }}" width="80px"
This is certified that, AIS 140 compliant vehicle location tracking height="80px" />
device with panic button(SOS) has been installed properly as per </td>
AIS-140 guidelines device has been configured to state approval server <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>NIPPON AUDIOTRONIX</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>NIPPON AUDIOTRONIX</strong> in the event that the
above mentioned seals atfound broken/tampered.
</p> </p>
</td> </div>
</tr>
<tr style="padding-top: 5px"> <div class="col-12 ">
<td>Authorised</td>
</tr> <table class="table table-bordered">
<tr style="padding-top: 5px">
<td>Undertaking</td>
</tr> <tbody style="font-size: 10px;">
<tr> <tr>
<td colspan="3"> <td rowspan="3" style="width: 110px;">
<p> <div id="stamp-section">
This is certified that the device and panic button (SOS) installation
has been carried out to my satisfaction and explained about the </div>
functionality of Device, I undertake that I will not temper the device </td>
and panic button (SOS) <td style="width: 100px;">
</p> <strong>Dealer Name:</strong>
</td> </td>
</tr> <td style="width: 100px;">
<tr> {{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.first_name ?
<td colspan="1" style="text-align: center; margin-top: 5px"> data.deviceInfo.Dealer.first_name : "" }}
Customer Name : {{ user.first_name ? user.first_name : "" }} {{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.last_name ?
{{ user.last_name ? user.last_name : "" }}<br /> data.deviceInfo.Dealer.last_name : "" }}
Contact/Login ID : {{ user.phone ? user.phone : "" }} </td>
</td> <td style="width: 100px;">
<td colspan="1"> <strong>Dealer Contact no:</strong>
Customer Address: {{ user.address ? user.address : "" }}<br /> </td>
Customer Sign : <td style="width: 80px;">
</td>
<td></td> </td>
</tr> <td>
</table> <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-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>
<button md-button (click)="exportAsPdf()" cdkFocusInitial>Export PDF</button> <button md-button (click)="convetToPDF()" cdkFocusInitial>Export PDF</button>
</md-dialog-actions> </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

@ -2,3 +2,44 @@
width: 3000px !important; width: 3000px !important;
height: 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

@ -1,24 +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 html2canvas: any; declare var html2canvas: any;
import * as moment from 'moment';
import { ContactService } from '../../contact.service'; declare var html2pdf: any;
import * as moment from "moment";
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;
@ -60,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;
@ -72,119 +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 currentWebURl = window.location.hostname;
if (currentWebURl.includes("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)) {
this.deviceImage[i] = this.deviceImage[i] && this.deviceImage[i] != "" ? 'http://nipponsecura.in' + 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";
@ -202,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);
// }; // };
@ -247,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);
// }; // };
// } // }
@ -275,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");
}; };
} }
@ -297,16 +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() {
this.deviceImage.splice(this.deviceImage.length - 1, 1);
} }
closePopup() { closePopup() {
this.dialogRef.close(1); this.dialogRef.close(1);
@ -316,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(
console.log(res); (res) => {
console.log('shareToken', res); console.log(res);
this.link = 'http://nipponsecura.in' + "/share/liveShare?t=" + res.t; console.log("shareToken", res);
console.log(this.link); this.link = "http://nipponsecura.in" + "/share/liveShare?t=" + res.t;
// this.shareLocationToDevice(link); console.log(this.link);
this.qrCodeGenerator() // this.shareLocationToDevice(link);
}, err => { this.qrCodeGenerator();
console.log(err); },
}) (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;
@ -366,68 +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', 15, 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 : 10, cellWidth: 35,
// overflow: "linebreak" overflow: "linebreak",
// }, },
willDrawCell: data => { willDrawCell: (data) => {
if (data.row.index === 0) { if (data.row.index === 0) {
data.row.height = 30; 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);
doc.setPage(1);
doc.addImage(this.imgURL, 'JPEG', 150, 9, 50, 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.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;
@ -442,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";
@ -470,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) => {
@ -497,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)
@ -512,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);
// }; // };
// } // }
@ -531,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) {
@ -543,12 +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() {
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

@ -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,136 +1,142 @@
<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 *ngIf="!supAdmin">
{{devicetype}} GPS DEVICE<br>
(AIS-140 COMPLIANT)<br>
INSTALLATION/FITMENT CERTIFICATE<br>
{{companyName}}<br>
{{companyAddress}}
</span> </span>
</td> <span *ngIf="!supAdmin">
<td style="text-align:center"> {{ devicetype }} GPS DEVICE<br />
<div> (AIS-140 COMPLIANT)<br />
<img src="{{imgURL}}" width="100px" height="150px"> INSTALLATION/FITMENT CERTIFICATE<br />
</div> {{ companyName }}<br />
</td> {{ companyAddress }}
</tr> </span>
</td>
<td style="text-align: center">
<div>
<img src="{{ imgURL }}" width="100px" height="150px" />
</div>
</td>
</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>
Date of Manufaturing year : {{vehicleManufacturingDate | date:'dd-MM-yyyy'}} Date of Manufaturing year : {{vehicleManufacturingDate | date:'dd-MM-yyyy'}}
</td> --> </td> -->
</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">
</td> GPS DEVICE DETAILS : -
</tr> </h6>
<tr> </td>
<td colspan="2"> </tr>
Device Model : {{devicetype}}<br> <tr>
IMEI Number : {{devID}}<br> <td colspan="2">
UID Number : {{uniqueID}}<br> Device Model : {{ devicetype }}<br />
IMEI Number : {{ devID }}<br />
UID Number : {{ uniqueID }}<br />
</td>
<td>
Invoice Number : <br />
Vehicle Model : {{ typeOfVehicle }}<br />
ICCID Number: {{ ICCICD }}
</td>
</tr>
</td> <tr>
<td> <td colspan="3">
Invoice Number : <br> <h6 style="font-size: 18px; margin: 20px 0 10px 0px">
Vehicle Model : {{typeOfVehicle}}<br> INSTALLATION DETAILS : -
ICCID Number: {{ICCICD}} </h6>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="3"> <td colspan="2">
<h6 style="font-size:18px;margin: 20px 0 10px 0px;">INSTALLATION DETAILS : - </h6> Dealer Name : {{ dealerName }}<br />
</td> Dealer Address : {{ dealerAddress }}<br />
</tr> RTO Certificate No : <br />
Installation Date : {{ installationDate | date : "dd-MM-yyyy" }}<br />
</td>
<td>Mobile No : {{ user.phone ? user.phone : "" }}</td>
</tr>
<tr> <tr style="padding-top: 10px">
<td colspan="2"> <!-- <td colspan="3">
Dealer Name : {{dealerName}}<br>
Dealer Address : {{dealerAddress}}<br>
RTO Certificate No : <br>
Installation Date : {{installationDate | date:'dd-MM-yyyy'}}<br>
</td>
<td>
Mobile No : {{user.phone?user.phone:""}}
</td>
</tr>
<tr style="padding-top: 10px;">
<!-- <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
</tr> {{
<tr style="padding-top: 10px;"> data.deviceInfo.expiration_date
<td colspan="2"> ? (data.deviceInfo.expiration_date | date : "dd-MM-yyyy")
Dealer Stamp : ""
</td> }}
<td> </tr>
Authorised Signature <tr style="padding-top: 10px">
</td> <td colspan="2">Dealer Stamp</td>
</tr> <td>Authorised Signature</td>
<tr> </tr>
<td colspan="3"> <tr>
<h6 style="font-size:18px;margin: 20px 0 10px 0px;">PRODUCT SATISFACTION REPORT : - </h6> <td colspan="3">
</td> <h6 style="font-size: 18px; margin: 20px 0 10px 0px">
</tr> PRODUCT SATISFACTION REPORT : -
<tr> </h6>
<td colspan="3" style="text-align:center;margin-top: 10px"> </td>
This is to Acknowledge and confirm that we have fitted our vehicle with above vehicle location tracking unit. </tr>
We have checked the performance of the vehicle after fitment and we confirm VLTD is functioning as per norms <tr>
listed out in AIS-140 standards and other guidelines of MoRTH and other government departments. We are also <td colspan="3" style="text-align: center; margin-top: 10px">
satisfied with the performance of the device in all respect. We undertake not to raise any dispute or any legal This is to Acknowledge and confirm that we have fitted our vehicle with
claims against Airotrack in the event that the above mentioned function are found broken/torn/tampered hereafter. above vehicle location tracking unit. We have checked the performance of
I also understand that telecom network connectivity doesn't come under the scope of Airotrack and will not raise the vehicle after fitment and we confirm VLTD is functioning as per
any claim or disputes with respect to issues arising with low or no network coverage. norms listed out in AIS-140 standards and other guidelines of MoRTH and
</td> other government departments. We are also satisfied with the performance
</tr> of the device in all respect. We undertake not to raise any dispute or
</table> 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>
</tr>
</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,51 +1,83 @@
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;
//dev_url = 'http://localhost:3000'; //dev_url = 'http://localhost:3000';
// 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();
@ -67,137 +97,239 @@ export class DatainjectionService {
// this.socket_gps.disconnect(); // this.socket_gps.disconnect();
// this.socket_5000.disconnect(); // this.socket_5000.disconnect();
this.socketConnection = false; this.socketConnection = false;
try { try {
this.socket_notifIO.close(); this.socket_notifIO.close();
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() {
this.socket_gps.close(); this.socket_gps.close();
} }
getConnection() { getConnection() {
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,
}); {
//this.setGPSConnection(); secure: true,
rejectUnauthorized: false,
transports: ["websocket", "polling"],
upgrade: false,
}
);
//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,
if (window.localStorage.custumer_token) { rejectUnauthorized: false,
this.fs = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).fn; transports: ["websocket", "polling"],
this.ls = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).ln; upgrade: false,
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; if (window.localStorage.custumer_token) {
this.custtype = JSON.parse(window.atob(window.localStorage.custumer_token.split('.')[1])).isDealer; this.fs = JSON.parse(
if (this.custtype == true) { window.atob(window.localStorage.custumer_token.split(".")[1])
this.cust = true; ).fn;
} this.ls = JSON.parse(
if (this.mb.charAt(0) == "n") { window.atob(window.localStorage.custumer_token.split(".")[1])
this.mb = ' ' ).ln;
} this.emailid = JSON.parse(
} window.atob(window.localStorage.custumer_token.split(".")[1])
else { ).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) {
this.cust = true;
}
if (this.mb.charAt(0) == "n") {
this.mb = " ";
}
} else {
var url = this.router.url.substring(0, 12);
console.log(url);
var url = (this.router.url).substring(0, 12); if (url == "/ViewVehicle") {
console.log(url); } else {
if (window.localStorage.token) {
if (url == "/ViewVehicle") { this.fs = JSON.parse(
window.atob(window.localStorage.token.split(".")[1])
} else { ).fn;
if (window.localStorage.token) { this.ls = 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; ).ln;
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.mb = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).phn; this.or = JSON.parse(
this.custtype = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).isDealer; window.atob(window.localStorage.token.split(".")[1])
if (this.custtype == true) { )._orgName;
this.cust = true; this.useridd = JSON.parse(
} window.atob(window.localStorage.token.split(".")[1])
if (this.mb.charAt(0) == "n") { )._id;
this.mb = ' ' 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) {
} this.cust = true;
} }
getDevice(emailid,id) { if (this.mb.charAt(0) == "n") {
return this.http.get(this.dev_url + "/devices/getDeviceByUser?email="+emailid+'&id='+id) this.mb = " ";
.map(data => { }
data.json(); }
}
}
var devices = data.json().devices;
/* console.log("Devices: ",temp); */
return data.json();
});
} }
getData(e,u,g,s,l,input,supadm,dealer){ getDevice(emailid, id) {
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();
if(input && input!='undefined'){ var devices = data.json().devices;
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();
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 => {
data.json();
return data.json();
});
/* console.log("Devices: ",temp); */
return data.json();
});
} }
// 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();
// var devices = data.json().devices;
// /* console.log("Devices: ",temp); */
// return data.json();
// });
// }
getData1(e, u, g, s, l, input, supadm, dealer) {
if (input && input != "undefined") {
s = 0;
}
console.log("superAdmin=>", supadm);
let dash = "dashboard";
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;
}
// if (g) url += "&group=" + g + "&queryType=" + dash;
// if (supadm) url += "&supAdmin=" + supadm + "&queryType=" + dash;
// if (dealer) url += "&dealer=" + dealer + "&queryType=" + dash;
if (g) {
url += "&group=" + g;
}
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();
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,367 +1,349 @@
<!-- <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;
<!-- <button style="background-color: #cc0000;color:#fdfdfd;font-size: 12px;" md-raised-button (click)="exportPdf()">{{'PDF' | translate}}</button> --> 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> -->
</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 class="col-5">
<p>{{'EMAIL' | translate}}</p>
</div>
<div class="col-2">
<p>{{'PHONE' | translate}}</p>
</div>
</div> </div>
</th> <div class="col-5">
<!-- <th class="cell100 column1" style='font-weight:600;background: #ADD8E6;text-align: left;'>EMAIL</th> --> <p>{{ "EMAIL" | translate }}</p>
<!-- <th class="cell100 column111" style='font-weight:600;background: #ADD8E6;'>PHONE</th> --> </div>
<div class="col-2">
<p>{{ "PHONE" | translate }}</p>
</div>
</div>
</th>
<!-- <th class="cell100 column1" style='font-weight:600;background: #ADD8E6;text-align: left;'>EMAIL</th> -->
<!-- <th class="cell100 column111" style='font-weight:600;background: #ADD8E6;'>PHONE</th> -->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let dealer of dealers_info"> <tr *ngFor="let dealer of dealers_info">
<td class="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>{{dealer.first_name}} {{dealer.last_name}}</p> <p title="{{ dealer.first_name }} {{ dealer.last_name }}" style="
</div> display: inline-block;
<div class="col-sm-5"> width: 180px;
<p (click)="dealerSwitch(dealer)">{{dealer.email}}</p> white-space: nowrap;
</div> overflow: hidden !important;
<div class="col-sm-2"> text-overflow: ellipsis;
<p (click)="dealerSwitch(dealer)">{{dealerPhone(dealer)}}</p> ">
</div> {{ dealer.first_name }} {{ dealer.last_name }}
</p>
</div> </div>
</td> <div class="col-sm-5">
<!-- <td class="cell100 column1" style="cursor: pointer;" (click)="dealerSwitch(dealer)"></td> <p title="{{ dealer.email }}" style="
display: inline-block;
width: 180px;
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis;
" (click)="dealerSwitch(dealer)">
{{ dealer.email }}
</p>
</div>
<div class="col-sm-2">
<p title="{{ dealerPhone(dealer) }}" style="
display: inline-block;
width: 180px;
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis;
" (click)="dealerSwitch(dealer)">
{{ dealerPhone(dealer) }}
</p>
</div>
</div>
</td>
<!-- <td class="cell100 column1" style="cursor: pointer;" (click)="dealerSwitch(dealer)"></td>
<td class="cell100 column1" style="cursor: pointer;" (click)="dealerSwitch(dealer)"></td> --> <td class="cell100 column1" style="cursor: pointer;" (click)="dealerSwitch(dealer)"></td> -->
</tr> </tr>
</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>
@ -370,7 +352,3 @@
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,3 +1,8 @@
.ftd-mp {
padding-top: 14px;
padding-bottom: 12px;
}
// #body{ // #body{
// overflow-x: hidden; // overflow-x: hidden;
// overflow-y: hidden; // overflow-y: hidden;
@ -9,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)
@ -35,7 +39,6 @@
// margin: 0px; // margin: 0px;
// } // }
// .switch input {display:none;} // .switch input {display:none;}
// .slider { // .slider {
@ -83,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;
@ -221,7 +223,6 @@
// 40% { opacity: 1; } // 40% { opacity: 1; }
// } // }
// ul, li { // ul, li {
// list-style: none; // list-style: none;
// float: left; // float: left;
@ -329,7 +330,6 @@
// } // }
// #c2 { // #c2 {
// } // }
// #c1 { // #c1 {
// float:left; // float:left;
@ -567,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;
@ -751,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;
@ -804,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;
@ -965,27 +963,26 @@
// width: 100%; // width: 100%;
// } // }
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
#toast { position: fixed;
visibility: hidden; z-index: 1;
max-width: 250px; left: 60%;
height: 50px; right: 0;
/*margin-left: -125px;*/ bottom: 80%;
margin: auto; font-size: 13px;
background-color: #333; white-space: nowrap;
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;
} }
// .scrollbar // .scrollbar
// { // {
// /* margin-left: 30px; */ // /* margin-left: 30px; */
@ -1033,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;
@ -1058,39 +1054,35 @@
// margin-top:48px; // margin-top:48px;
// } // }
#toast #img {
width: 250px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
#toast #img{ box-sizing: border-box;
width: 250px;
height: 50px;
float: left; background-color: #111;
color: #fff;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
} }
#toast #desc{ #toast #desc {
color: #fff;
padding: 16px;
color: #fff; overflow: hidden;
white-space: nowrap;
padding: 16px;
overflow: hidden;
white-space: nowrap;
} }
#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;
@ -1262,20 +1254,12 @@
// } // }
// } // }
// .openLayermap{ // .openLayermap{
// height:400px; // height:400px;
// width:100%; // width:100%;
// } // }
// css style
// css style
/*////////////////////////////////////////////////////////////////// /*//////////////////////////////////////////////////////////////////
[ FONT ]*/ [ FONT ]*/
@ -1299,49 +1283,59 @@
/*////////////////////////////////////////////////////////////////// /*//////////////////////////////////////////////////////////////////
[ RESTYLE TAG ]*/ [ RESTYLE TAG ]*/
* { * {
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
box-sizing: border-box; box-sizing: border-box;
} }
body, html { body,
height: 100%; html {
font-family: sans-serif; height: 100%;
font-family: sans-serif;
} }
/* ------------------------------------ */ /* ------------------------------------ */
a { a {
margin: 0px; margin: 0px;
transition: all 0.4s; transition: all 0.4s;
-webkit-transition: all 0.4s; -webkit-transition: all 0.4s;
-o-transition: all 0.4s; -o-transition: all 0.4s;
-moz-transition: all 0.4s; -moz-transition: all 0.4s;
} }
a:focus { a:focus {
outline: none !important; outline: none !important;
} }
a:hover { a:hover {
text-decoration: none; text-decoration: none;
} }
/* ------------------------------------ */ /* ------------------------------------ */
h1,h2,h3,h4,h5,h6 {margin: 0px;} h1,
h2,
p {margin: 0px;} h3,
h4,
ul, li { h5,
margin: 0px; h6 {
list-style-type: none; margin: 0px;
} }
p {
margin: 0px;
}
ul,
li {
margin: 0px;
list-style-type: none;
}
/* ------------------------------------ */ /* ------------------------------------ */
input { input {
display: block; display: block;
outline: none; outline: none;
border: none !important; // border: none !important;
} }
textarea { textarea {
@ -1349,23 +1343,24 @@ textarea {
outline: none; outline: none;
} }
textarea:focus, input:focus { textarea:focus,
input:focus {
border-color: transparent !important; border-color: transparent !important;
} }
/* ------------------------------------ */ /* ------------------------------------ */
button { button {
outline: none !important; outline: none !important;
border: none; border: none;
background: transparent; background: transparent;
} }
button:hover { button:hover {
cursor: pointer; cursor: pointer;
} }
iframe { iframe {
border: none !important; border: none !important;
} }
/*////////////////////////////////////////////////////////////////// /*//////////////////////////////////////////////////////////////////
@ -1375,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;
@ -1413,7 +1407,6 @@ iframe {
left: 15px; left: 15px;
} }
/*////////////////////////////////////////////////////////////////// /*//////////////////////////////////////////////////////////////////
[ Table ]*/ [ Table ]*/
@ -1426,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 {
@ -1444,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 {
@ -1461,7 +1452,8 @@ table {
width: 100%; width: 100%;
} }
th, td { th,
td {
font-weight: unset; font-weight: unset;
padding-right: 10px; padding-right: 10px;
} }
@ -1500,7 +1492,7 @@ th, td {
.column8 { .column8 {
// width: 305px; // width: 305px;
width:210px; width: 210px;
} }
.column9 { .column9 {
@ -1513,7 +1505,7 @@ th, td {
.column11 { .column11 {
// width: 200px; // width: 200px;
width:155px; width: 155px;
} }
.column12 { .column12 {
@ -1526,7 +1518,7 @@ th, td {
.column14 { .column14 {
// width: 200px; // width: 200px;
width:150px width: 150px;
} }
.column15 { .column15 {
// width: 200px; // width: 200px;
@ -1534,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 {
@ -1564,7 +1556,6 @@ th, td {
padding-bottom: 16px; padding-bottom: 16px;
} }
/*================================================================== /*==================================================================
[ Fix col ]*/ [ Fix col ]*/
.table100 { .table100 {
@ -1596,7 +1587,7 @@ th, td {
padding-bottom: 28px; padding-bottom: 28px;
} }
.table100-nextcols table{ .table100-nextcols table {
table-layout: fixed; table-layout: fixed;
} }
@ -1621,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;
} }
@ -1641,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;
@ -1673,7 +1658,7 @@ th, td {
text-decoration: none; text-decoration: none;
user-select: none; user-select: none;
background: #d8d8d8; background: #d8d8d8;
font-size: 12px; font-size: 12px;
&, &,
&:active, &:active,
@ -1727,6 +1712,3 @@ th, td {
// height: 400px; // height: 400px;
// width: 400px; // width: 400px;
// } // }

File diff suppressed because it is too large Load diff

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,81 +24,99 @@ 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, {
viewValue: "10 Seconds" value: 10,
}, viewValue: "10 Seconds",
{ },
value: 20, {
viewValue: "20 Seconds" value: 20,
}, viewValue: "20 Seconds",
{ },
value: 30, {
viewValue: "30 Seconds" value: 30,
}] 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();
} }
timeIntervalRefresh() { timeIntervalRefresh() {
// 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() {
} var data = {
f: this.fromdate,
t: this.todate,
getData(){ deviceType: "",
var data={ };
f:this.fromdate, this.contactService.getVehicleList(data).subscribe((res) => {
t:this.todate,
deviceType:''
}
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: [
// "rowCallback": function(row: Node, data: any | Object, index: number){ [10, 25, 50, -1],
ajax: (mainData,callback) => { [10, 25, 50, "All"],
],
// "rowCallback": function(row: Node, data: any | Object, index: number){
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, console.log(res);
deviceType:'', that.Load = false;
licenceType:that.licenceStatus, if (res.length != 0) {
supAdm:that.supAdm callback({ data: res[0].data });
} } else {
callback({ data: [] });
if(that.fromdate !=undefined && that.todate!=undefined){
that.contactService.getVehicleList(data).subscribe(res=>{
console.log(res);
that.Load = false;
if(res.length!=0){
callback({ data: res[0].data });
}else{
callback({ data: [] });
}
})
}else{
callback({ data: [] });
that.Load = false;
}
},
"columns": [
{
"data": "Device_Name",
"render": function(data, type, row) {
return data?data : '';
}
},
{
"data": "Device_ID",
"render": function(data, type, row) {
return data?data : '';
}
},
{
"data": "sim_number",
"render": function (data, type, row) {
return data ? data : '';
}
},
{
"data": "User",
"render": function(data, type, row) {
return data?(data.first_name+' '+data.last_name) : '';
}
},
{
"data": "Distributer",
"render": function(data, type, row) {
return data?(data.first_name+' '+data.last_name) : '';
}
},
{
"data": "Distributer",
"render": function(data, type, row) {
return data?(data.phone) : '';
}
},
{
"data": "created_on",
"render": function(data, type, row) {
return data?(data) : '';
}
},
{
"data": "expiration_date",
"render": function(data, type, row) {
return data?data : '';
}
},
{
"data": "renew_at",
"render": function(data, type, row) {
return data?(data) : '';
}
} }
,{ });
"data": "Dealer", } else {
"render": function(data, type, row) { callback({ data: [] });
return data?(data.first_name+' '+data.last_name) : ''; that.Load = false;
} }
}, },
// "accountSuspended":1,"device_delete_on":1,"integrationId":1 columns: [
{ {
"data": "accountSuspended", data: "Device_Name",
"render": function(data, type, row) { render: function (data, type, row) {
return data; return data ? data : "";
} },
}, },
{ {
"data": "deletedDevice", data: "Device_ID",
"render": function(data, type, row) { render: function (data, type, row) {
return data?'true':'false'; return data ? data : "";
} },
}, },
{ {
"data": "device_delete_on", data: "sim_number",
"render": function(data, type, row) { render: function (data, type, row) {
return data?data : ''; return data ? data : "";
} },
}, },
{ {
"data": "integrationId", data: "User",
"render": function(data, type, row) { render: function (data, type, row) {
return data?data : ''; return data ? data.first_name + " " + data.last_name : "";
} },
}, },
{
data: "Distributer",
render: function (data, type, row) {
return data ? data.first_name + " " + data.last_name : "";
},
},
{
data: "Distributer",
render: function (data, type, row) {
return data ? data.phone : "";
},
},
{
data: "created_on",
render: function (data, type, row) {
return data ? data : "";
},
},
{
data: "expiration_date",
render: function (data, type, row) {
return data ? data : "";
},
},
{
data: "renew_at",
render: function (data, type, row) {
return data ? data : "";
},
},
{
data: "Dealer",
render: function (data, type, row) {
return data ? data.first_name + " " + data.last_name : "";
},
},
// "accountSuspended":1,"device_delete_on":1,"integrationId":1
{
data: "accountSuspended",
render: function (data, type, row) {
return data;
},
},
{
data: "deletedDevice",
render: function (data, type, row) {
return data ? "true" : "false";
},
},
{
data: "device_delete_on",
render: function (data, type, row) {
return data ? data : "";
},
},
{
data: "integrationId",
render: function (data, type, row) {
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",
{ className: "dt-body-left", "targets": [ 0,1,2,3,4,5,6,7,8,9,10,11] }, 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) {
@ -313,56 +325,49 @@ export class DeviceListComponent implements OnInit {
// { "width": "10px", "targets": 10 }, // { "width": "10px", "targets": 10 },
// { "width": "10px", "targets": 11 }, // { "width": "10px", "targets": 11 },
// { // {
// targets: -1, //-1 es la ultima columna y 0 la primera // targets: -1, //-1 es la ultima columna y 0 la primera
// 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() {
console.log("Export");
} var tab_text = "<table border='2px'><tr bgcolor='#87AFC6'>";
var textRange;
var j = 0;
var table = $("#deviceTable").clone();
table[0].querySelector("thead").remove();
table[0].prepend($(".dataTable thead").clone()[0]);
tab:any;
exportExcel()
{
console.log("Export");
var tab_text="<table border='2px'><tr bgcolor='#87AFC6'>";
var textRange; var j=0;
var table = $('#deviceTable').clone();
table[0].querySelector("thead").remove();
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++) {
tab_text = tab_text + this.tab.rows[j].innerHTML + "</tr>";
}
for(j = 0 ; j < this.tab.rows.length ; j++) tab_text = tab_text + "</table>";
{
tab_text=tab_text+this.tab.rows[j].innerHTML+"</tr>";
} tab_text = tab_text.replace(/<input[^>]*>|<\/input>/gi, "");
tab_text=tab_text+"</table>"; var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
tab_text= tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); var sa = window.open(
"data:application/vnd.ms-excel," + encodeURIComponent(tab_text)
);
var ua = window.navigator.userAgent; return sa;
var msie = ua.indexOf("MSIE ");
var sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));
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

@ -180,7 +180,8 @@ devi(){
} }
soon(){ soon(){
this.router.navigateByUrl("const?_i="+window.localStorage.token);
this.router.navigateByUrl("const?_i="+window.localStorage.token);
} }
new(){ new(){
@ -226,7 +227,7 @@ mydealer(){
if(window.localStorage['DataLoaded'] = 'True'){ if(window.localStorage['DataLoaded'] = 'True'){
window.localStorage['Custumer'] = 'OFF' window.localStorage['Custumer'] = 'OFF'
this.router.navigateByUrl("add") this.router.navigateByUrl("add")
// this.router.navigateByUrl("const?_status="+"OK");
} }
} }

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

@ -208,7 +208,7 @@ export class DeviceSOSreportComponent implements OnInit {
}); });
// $('#deviceTable tbody').on('click', 'button', function() { // $('#deviceTable tbody').on('click', 'button', function() {
// debugger; //
// var data = that.tabelObj.row($(this).parents('tr')).data(); // var data = that.tabelObj.row($(this).parents('tr')).data();
// console.log("button clicked"); // console.log("button clicked");
// }); // });

View file

@ -50,7 +50,8 @@ export class DeviceSpeedReportComponent implements OnInit {
// } // }
// soon() { // soon() {
// this.router.navigateByUrl("const?_i=" + window.localStorage.token); //
// this.router.navigateByUrl("const?_i=" + window.localStorage.token);
// } // }
@ -214,7 +215,7 @@ export class DeviceSpeedReportComponent implements OnInit {
if (window.localStorage['DataLoaded'] = 'True') { if (window.localStorage['DataLoaded'] = 'True') {
window.localStorage['Custumer'] = 'OFF' window.localStorage['Custumer'] = 'OFF'
this.router.navigateByUrl("add") this.router.navigateByUrl("add")
// this.router.navigateByUrl("const?_status="+"OK");
} }
} }
_lineChartData: any; _lineChartData: any;

View file

@ -196,7 +196,8 @@ firstcall:boolean=true;
// } // }
// soon(){ // soon(){
// this.router.navigateByUrl("const?_i="+window.localStorage.token); //
// this.router.navigateByUrl("const?_i="+window.localStorage.token);
// } // }
@ -253,7 +254,7 @@ firstcall:boolean=true;
// if(window.localStorage['DataLoaded'] = 'True'){ // if(window.localStorage['DataLoaded'] = 'True'){
// window.localStorage['Custumer'] = 'OFF' // window.localStorage['Custumer'] = 'OFF'
// this.router.navigateByUrl("add") // this.router.navigateByUrl("add")
// // this.router.navigateByUrl("const?_status="+"OK"); //
// } // }
// } // }
@ -580,25 +581,43 @@ testTable() {
if (that.reportArr.length != 0) { if (that.reportArr.length != 0) {
var j = 0; var j = 0;
var finalArr = []; var finalArr = [];
for (var i = 0; i < that.reportArr.length; i++) {
that.clocation_1(that.reportArr[i], function (err, succ) { let latLongArray :any[] = [];
if (err) { that.reportArr.forEach((deData)=>{
console.log(err); let latLng = {
j++; lat: deData.startLat ? deData.startLat : 0,
} else { long: deData.startLng ? deData.startLng : 0
finalArr.push(succ); }
console.log(finalArr); latLongArray.push(latLng)
j++; })
if (j === that.reportArr.length) {
that.Load = false; that.contactService.getAddressByApiBulk(latLongArray).subscribe(latLongAddress => {
callback({ data: finalArr }); that.reportArr.forEach((deData,index)=>{
} let latLng = {
lat: deData.startLat ? deData.startLat : 0,
long: deData.startLng ? deData.startLng : 0
} }
that.contactService.latLongAddress[latLng.long+'_'+latLng.lat] = latLongAddress[index];
that.clocation_1(deData, function (err, succ) {
if (err) {
console.log(err);
j++;
} else {
finalArr.push(succ);
console.log(finalArr);
j++;
if (j === that.reportArr.length) {
that.Load = false;
callback({ data: finalArr });
}
}
})
}) })
})
}
} else { } else {
that.Load = false; that.Load = false;
that.firstcall=true; that.firstcall=true;
@ -793,13 +812,6 @@ tab:any;
} }
// if () {
// latLng = {
// lat: 0,
// long: 0
// }
// }
outerThis.contactService.getAddressByApi(latLng).subscribe(res => { outerThis.contactService.getAddressByApi(latLng).subscribe(res => {
if (res.message == "Address not found in databse") { if (res.message == "Address not found in databse") {
var adata = { var adata = {

View file

@ -156,7 +156,8 @@ devi(){
} }
soon(){ soon(){
this.router.navigateByUrl("const?_i="+window.localStorage.token);
this.router.navigateByUrl("const?_i="+window.localStorage.token);
} }
@ -223,7 +224,7 @@ mydealer(){
if(window.localStorage['DataLoaded'] = 'True'){ if(window.localStorage['DataLoaded'] = 'True'){
window.localStorage['Custumer'] = 'OFF' window.localStorage['Custumer'] = 'OFF'
this.router.navigateByUrl("add") this.router.navigateByUrl("add")
// this.router.navigateByUrl("const?_status="+"OK");
} }
} }

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"
<!-- from time label--> style="margin: 0; padding-bottom: 10px; padding-right: 3px"
<span style="margin-bottom: 0%;font-size: 12px;"> {{'From' | translate}} :</span> >
</div> <div class="col-sm-3 col-md-3 col-lg-3" style="padding-left: 0">
<div class="col-sm-9 col-md-9 col-lg-9" style="padding:0px"> <!-- from time label-->
<!-- from datetime picker --> <span style="margin-bottom: 0%; font-size: 12px">
<input id="from_date" bsDatepicker class="form-control form-control-sm" style="height: 25px;" [bsConfig]="bsConfig" {{ "From" | translate }} :</span
[(ngModel)]="from_date" type="text"> >
</div>
</div>
<div 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 -->
<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">
<!-- from datetime picker -->
<input
id="from_date"
bsDatepicker
class="form-control form-control-sm"
style="height: 25px"
[bsConfig]="bsConfig"
[(ngModel)]="from_date"
type="text"
/>
</div>
</div>
<div
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 -->
<span style="margin-bottom: 0%; font-size: 12px"
>{{ "To" | translate }} :</span
>
</div>
<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

@ -2,7 +2,7 @@
<div class="topDiv"> <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="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>{{'Geofencing Report' | translate}}</h4> <h4>{{'Geofencing Report 1' | translate}}</h4>
</div> </div>
</div> </div>
<!-- <div class="row rowStyle" > <!-- <div class="row rowStyle" >

View file

@ -116,7 +116,7 @@ superAdmin:Boolean = false;
// if(window.localStorage['DataLoaded'] = 'True'){ // if(window.localStorage['DataLoaded'] = 'True'){
// window.localStorage['Custumer'] = 'OFF' // window.localStorage['Custumer'] = 'OFF'
// this.router.navigateByUrl("add") // this.router.navigateByUrl("add")
// // this.router.navigateByUrl("const?_status="+"OK"); //
// } // }
// } // }
@ -144,7 +144,8 @@ superAdmin:Boolean = false;
// } // }
// soon(){ // soon(){
// this.router.navigateByUrl("const?_i="+window.localStorage.token); //
// this.router.navigateByUrl("const?_i="+window.localStorage.token);
// } // }

View file

@ -127,7 +127,8 @@ this.contactService.getIdealData(neww.did,r).subscribe(
} }
soon(){ soon(){
this.router.navigateByUrl("const?_i="+window.localStorage.token);
this.router.navigateByUrl("const?_i="+window.localStorage.token);
} }
@ -229,7 +230,7 @@ mydealer(){
if(window.localStorage['DataLoaded'] = 'True'){ if(window.localStorage['DataLoaded'] = 'True'){
window.localStorage['Custumer'] = 'OFF' window.localStorage['Custumer'] = 'OFF'
this.router.navigateByUrl("add") this.router.navigateByUrl("add")
// this.router.navigateByUrl("const?_status="+"OK");
} }
} }
report_speed(){ report_speed(){

View file

@ -49,7 +49,8 @@ devi(){
} }
soon(){ soon(){
this.router.navigateByUrl("const?_i="+window.localStorage.token);
this.router.navigateByUrl("const?_i="+window.localStorage.token);
} }
new(){ new(){
@ -202,7 +203,7 @@ creategraph(a){
if(window.localStorage['DataLoaded'] = 'True'){ if(window.localStorage['DataLoaded'] = 'True'){
window.localStorage['Custumer'] = 'OFF' window.localStorage['Custumer'] = 'OFF'
this.router.navigateByUrl("add") this.router.navigateByUrl("add")
// this.router.navigateByUrl("const?_status="+"OK");
} }
} }
getdata(final){ getdata(final){

View file

@ -221,7 +221,8 @@ export class IgnitionReportComponent implements OnInit {
// } // }
// soon(){ // soon(){
// this.router.navigateByUrl("const?_i="+window.localStorage.token); //
//this.router.navigateByUrl("const?_i="+window.localStorage.token);
// } // }
// new(){ // new(){
@ -272,7 +273,7 @@ export class IgnitionReportComponent implements OnInit {
// if(window.localStorage['DataLoaded'] = 'True'){ // if(window.localStorage['DataLoaded'] = 'True'){
// window.localStorage['Custumer'] = 'OFF' // window.localStorage['Custumer'] = 'OFF'
// this.router.navigateByUrl("add") // this.router.navigateByUrl("add")
// // this.router.navigateByUrl("const?_status="+"OK"); //
// } // }
// } // }

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

@ -219,7 +219,8 @@ export class SummaryReportComponent implements OnInit {
// } // }
// soon(){ // soon(){
// this.router.navigateByUrl("const?_i="+window.localStorage.token); //
// this.router.navigateByUrl("const?_i="+window.localStorage.token);
// } // }
// new(){ // new(){
@ -286,7 +287,7 @@ export class SummaryReportComponent implements OnInit {
// if(window.localStorage['DataLoaded'] = 'True'){ // if(window.localStorage['DataLoaded'] = 'True'){
// window.localStorage['Custumer'] = 'OFF' // window.localStorage['Custumer'] = 'OFF'
// this.router.navigateByUrl("add") // this.router.navigateByUrl("add")
// // this.router.navigateByUrl("const?_status="+"OK"); //
// } // }
// } // }
@ -643,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=>{ },
this.Load = false; (err) => {
}) 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(
this.dealers = res; (res) => {
this.dealers = this.dealers.concat(this.ditributers); this.dealers = res;
this.loadDropdown() this.dealers = this.dealers.concat(this.ditributers);
this.Load = false; this.loadDropdown();
}, err => { this.Load = false;
this.Load = false; },
}) (err) => {
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
this.users = res; .getContactsbyDealer(
this.users = this.users.concat(this.ditributers); id,
this.users = this.users.concat(this.dealers); "&projection=_id,user_id,phone,email,first_name,last_name"
this.users = this.users.filter((el, i, a) => i === a.indexOf(el)) )
.subscribe(
(res) => {
this.users = res;
this.users = this.users.concat(this.ditributers);
this.users = this.users.concat(this.dealers);
this.users = this.users.filter((el, i, a) => i === a.indexOf(el));
this.loadDropdown() this.loadDropdown();
this.Load = false; this.Load = false;
}, err => { },
this.Load = false; (err) => {
}) 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(
console.log(res); (res: any) => {
this.data = res[0]; console.log(res);
this.Load = false; this.data = res[0];
if (res.length != 0) { this.Load = false;
this.deleteShow = true if (res.length != 0) {
if (res[0].deletedDevice) { this.deleteShow = true;
this.deleteShow = false; if (res[0].deletedDevice) {
this.deleted = true; this.deleteShow = false;
this.deleted = true;
} else {
this.deleted = false;
}
this.selectedSupAdmin = this.data.supAdmin
? this.data.supAdmin._id
: "";
this.selectedUser = this.data.user ? this.data.user._id : "";
(this.selectedDealer = this.data.Dealer ? this.data.Dealer._id : ""),
console.log(this.selectedSupAdmin);
this.deviceForm.patchValue({
imei: this.data.Device_ID,
registrationNumber: this.data.Device_Name,
sim1: this.data.sim_number ? this.data.sim_number : "",
sim2: this.data.sim_number2 ? this.data.sim_number2 : "",
dealaer: this.data.Dealer ? this.data.Dealer._id : "",
user: this.data.user ? this.data.user._id : "",
deviceModel: this.data.device_model
? this.data.device_model.device_type
: "",
vehicleType: this.data.vehicleType
? (this.data.vehicleType.brand
? 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,
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
: " ",
deletedAt: this.data.device_delete_on,
deletedFrom: this.data.login_type,
});
if (this.data.supAdmin) this.getDealers(this.data.supAdmin._id);
if (this.data.Dealer) this.getUsers(this.data.Dealer._id);
} else { } else {
this.deleteShow = false;
this.deleted = false; this.deviceForm.reset();
this.snackBar.open("No Data Found", "", {
duration: 4000,
});
} }
this.selectedSupAdmin = this.data.supAdmin ? this.data.supAdmin._id : '' },
this.selectedUser = this.data.user ? this.data.user._id : ''; (err) => {
this.selectedDealer = this.data.Dealer ? this.data.Dealer._id : '', this.Load = false;
console.log(this.selectedSupAdmin);
this.deviceForm.patchValue({
imei: this.data.Device_ID,
registrationNumber: this.data.Device_Name,
sim1: this.data.sim_number ? this.data.sim_number : '',
sim2: this.data.sim_number2 ? this.data.sim_number2 : '',
dealaer: this.data.Dealer ? this.data.Dealer._id: '',
user: this.data.user ? this.data.user._id : '',
deviceModel: this.data.device_model ? this.data.device_model.device_type : '',
vehicleType: this.data.vehicleType ? (this.data.vehicleType.brand ? 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,
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 : ' ',
deletedAt: this.data.device_delete_on,
deletedFrom: this.data.login_type,
})
if (this.data.supAdmin)
this.getDealers(this.data.supAdmin._id);
if (this.data.Dealer)
this.getUsers(this.data.Dealer._id)
} else {
this.deleteShow = false;
this.deviceForm.reset();
this.snackBar.open("No Data Found", '', {
duration: 4000,
});
} }
);
},err=>{
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,
swal({ user: this.selectedUser
title: 'Saved!', ? this.selectedUser
html: 'Your file has been saved.', : this.data.user
icon: 'success' ? 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({
title: "Saved!",
html: "Your file has been saved.",
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>

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