Compare commits
10 commits
63d062c4a7
...
017919aa4b
| Author | SHA1 | Date | |
|---|---|---|---|
| 017919aa4b | |||
| 81e5b8cf52 | |||
|
|
3a9e71fd0f | ||
|
|
58fb99cc5b | ||
| 69894ac132 | |||
|
|
55d79d1294 | ||
|
|
5dc54bfdb1 | ||
|
|
6387df7050 | ||
|
|
140263abd8 | ||
|
|
e24269c2a5 |
315 changed files with 131791 additions and 56456 deletions
2
build.sh
Normal file
2
build.sh
Normal 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
2
build2.sh
Normal 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
|
||||
3112
dataprocessing.js
3112
dataprocessing.js
File diff suppressed because it is too large
Load diff
225
dms.js
225
dms.js
|
|
@ -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′ 09″W).
|
||||
* 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°12′00.0″N, 000°19′48.0″E
|
||||
* Dms.separator = '\u202f'; // narrow no-break space
|
||||
* var pʹ = new LatLon(51.2, 0.33); // 51° 12′ 00.0″ N, 000° 19′ 48.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 req’d 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
|
||||
127
gpsFunctions.js
127
gpsFunctions.js
|
|
@ -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; // Earth’s 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');
|
||||
};
|
||||
|
|
@ -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
|
|
@ -158,7 +158,8 @@ logout(){
|
|||
|
||||
soon(){
|
||||
|
||||
this.router.navigateByUrl("const?_i="+window.localStorage.token);
|
||||
|
||||
this.router.navigateByUrl("const?_i="+window.localStorage.token);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,24 @@
|
|||
<flash-messages style="float: center;margin:0px 1px;height:-6px;"></flash-messages>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="row no-gutters">
|
||||
|
||||
|
||||
</div> -->
|
||||
|
||||
<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">
|
||||
<md-form-field class="example-full-width width">
|
||||
<input mdInput type="text" [(ngModel)]="userID" placeholder="Enter User ID" name="userId" required>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -74,6 +74,7 @@
|
|||
<option *ngFor="let zone of timezoneArray" [value]="zone.value" [selected] = "zone.value === timezone">{{ zone.viewValue }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-6" style="margin-bottom: 20px;">
|
||||
<lable>Inventory</lable>
|
||||
<md-slide-toggle style="margin-top: 5px;" [(ngModel)]="inventoryManagement" ngDefaultControl>
|
||||
|
|
@ -85,7 +86,29 @@
|
|||
</md-slide-toggle>
|
||||
|
||||
</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="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')">
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import {MdDialog, MdDialogRef, MD_DIALOG_DATA} from '@angular/material';
|
|||
declare var swal: any;
|
||||
declare var ol : any;
|
||||
declare var $:any;
|
||||
|
||||
declare var $: any, _: any;
|
||||
@Component({
|
||||
selector: 'app-add-dealer',
|
||||
templateUrl: './add-dealer.component.html',
|
||||
|
|
@ -113,6 +113,9 @@ export class AddDealerComponent implements OnInit {
|
|||
this.imageuploadObject.push(initialObj);
|
||||
}
|
||||
bussinessType:boolean=false;
|
||||
db_token: any = { isDealer: false, isSuperAdmin: false };;
|
||||
db_state_city_list:boolean=false;
|
||||
_org = JSON.parse(localStorage.ORG);
|
||||
ngOnInit() {
|
||||
this.superAdmin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin;
|
||||
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.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.db_token = JSON.parse(
|
||||
window.atob(window.localStorage.token.split(".")[1])
|
||||
);
|
||||
var that = this;
|
||||
setTimeout(() => {
|
||||
that.telCountryCode = $("#telephone").intlTelInput({
|
||||
|
|
@ -133,7 +139,8 @@ bussinessType:boolean=false;
|
|||
separateDialCode:true,
|
||||
});
|
||||
}, 300);
|
||||
|
||||
|
||||
this.getAllState()
|
||||
var Phoneinput = document.getElementById('telephone');
|
||||
var that = this;
|
||||
Phoneinput.addEventListener("countrychange",function(p) {
|
||||
|
|
@ -205,8 +212,29 @@ this.latLongDetail()
|
|||
this.emaill = 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(){
|
||||
debugger
|
||||
var tzone = $('#dbselect').multipleSelect('getSelects','value');
|
||||
console.log(tzone);
|
||||
var expDate = new Date()
|
||||
|
|
@ -217,6 +245,7 @@ this.latLongDetail()
|
|||
countryCode : countryData.iso2,
|
||||
dialcode: countryData.dialCode
|
||||
}
|
||||
|
||||
console.log('expDate=>',expDate);
|
||||
if(this.first_name==null || this.last_name==null || this.passwordd==null)
|
||||
{
|
||||
|
|
@ -254,6 +283,14 @@ this.latLongDetail()
|
|||
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){
|
||||
newContact2['inventoryManagement']=this.inventoryManagement;
|
||||
}
|
||||
|
|
@ -354,7 +391,13 @@ this.latLongDetail()
|
|||
// user_id:this.userID,
|
||||
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){
|
||||
newContact2['phone'] = this.phone ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,8 @@ export class AddDeviceModelComponent implements OnInit {
|
|||
|
||||
}
|
||||
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'){
|
||||
window.localStorage['Custumer'] = 'OFF'
|
||||
this.router.navigateByUrl("add")
|
||||
// this.router.navigateByUrl("const?_status="+"OK");
|
||||
|
||||
}
|
||||
}
|
||||
/* TOKEN GENERATION */
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@ export class AddDriverComponent implements OnInit {
|
|||
|
||||
}
|
||||
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'){
|
||||
window.localStorage['Custumer'] = 'OFF'
|
||||
this.router.navigateByUrl("add")
|
||||
// this.router.navigateByUrl("const?_status="+"OK");
|
||||
|
||||
}
|
||||
}
|
||||
/* TOKEN GENERATION */
|
||||
|
|
@ -541,7 +542,7 @@ else{
|
|||
// return metadata;
|
||||
// };
|
||||
// onUploadFinished(file) {
|
||||
// debugger;
|
||||
//
|
||||
// console.log(file);
|
||||
// this.imageFile=file;
|
||||
// console.log(this.imageFile.file.name);
|
||||
|
|
@ -569,7 +570,7 @@ else{
|
|||
// return metadata;
|
||||
// };
|
||||
// onUploadFinished1(file) {
|
||||
// debugger;
|
||||
//
|
||||
// console.log(file);
|
||||
// this.imageFile=file;
|
||||
// console.log(this.imageFile.file.name);
|
||||
|
|
|
|||
|
|
@ -116,7 +116,8 @@ export class AddEditVehicleTypeComponent implements OnInit {
|
|||
|
||||
}
|
||||
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'){
|
||||
window.localStorage['Custumer'] = 'OFF'
|
||||
this.router.navigateByUrl("add")
|
||||
// this.router.navigateByUrl("const?_status="+"OK");
|
||||
|
||||
}
|
||||
}
|
||||
/* TOKEN GENERATION */
|
||||
|
|
|
|||
|
|
@ -1287,13 +1287,13 @@ li {
|
|||
/* ------------------------------------ */
|
||||
input {
|
||||
display: block;
|
||||
outline: none;
|
||||
border: none !important;
|
||||
// outline: none;
|
||||
// border: none !important;
|
||||
}
|
||||
|
||||
textarea {
|
||||
display: block;
|
||||
outline: none;
|
||||
// outline: none;
|
||||
}
|
||||
|
||||
textarea:focus,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -55,7 +55,7 @@ export class ResetPasswordComponent implements OnInit {
|
|||
showBtn : boolean = true;
|
||||
showBtn_1 : boolean = true;
|
||||
show_hide_pass(id){
|
||||
debugger;
|
||||
|
||||
console.log(id);
|
||||
if(id == 0){
|
||||
this.iType = 'text';
|
||||
|
|
|
|||
19
src/app/admin-device-kyc/admin-device-kyc.component.html
Normal file
19
src/app/admin-device-kyc/admin-device-kyc.component.html
Normal 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>
|
||||
25
src/app/admin-device-kyc/admin-device-kyc.component.spec.ts
Normal file
25
src/app/admin-device-kyc/admin-device-kyc.component.spec.ts
Normal 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();
|
||||
});
|
||||
});
|
||||
15
src/app/admin-device-kyc/admin-device-kyc.component.ts
Normal file
15
src/app/admin-device-kyc/admin-device-kyc.component.ts
Normal 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
|
|
@ -1,58 +1,120 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<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">
|
||||
<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%;">
|
||||
<head> </head>
|
||||
<body>
|
||||
<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;
|
||||
"
|
||||
>
|
||||
<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;
|
||||
padding: 4em 6em;" routerLink="signup">SignUp</a>
|
||||
</li> -->
|
||||
<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>
|
||||
</li>
|
||||
<li style="float:right;width:40%;">
|
||||
<button md-button [mdMenuTriggerFor]="menu" style="padding:0%;"><i class="material-icons">list</i></button>
|
||||
<md-menu #menu="mdMenu">
|
||||
<button md-menu-item routerLink="home">Home</button>
|
||||
<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">
|
||||
<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
|
||||
>
|
||||
</li>
|
||||
<li style="float: right; width: 40%">
|
||||
<button md-button [mdMenuTriggerFor]="menu" style="padding: 0%">
|
||||
<i class="material-icons">list</i>
|
||||
</button>
|
||||
<md-menu #menu="mdMenu">
|
||||
<button md-menu-item routerLink="home">Home</button>
|
||||
<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"
|
||||
routerLinkActive="active-link">SignUp</a>
|
||||
</li> -->
|
||||
<li style="width:10%;float:right">
|
||||
<a style="font-size: 15px;color: black;padding: 10%;" routerLink="login" routerLinkActive="active-link">Login</a>
|
||||
</li>
|
||||
<li style="width:12%;float:right;margin-right:34px">
|
||||
<a style="font-size: 15px;color: black;padding: 10 19%;" routerLink="support"
|
||||
routerLinkActive="active-link">Contact us</a>
|
||||
</li>
|
||||
<li style="float:right;width:15%">
|
||||
<a color="blue" routerLink="about-us" style="font-size: 15px ;padding: 10 3%;color: black;"
|
||||
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>
|
||||
<li style="width: 10%; float: right">
|
||||
<a
|
||||
style="font-size: 15px; color: black; padding: 10%"
|
||||
routerLink="login"
|
||||
routerLinkActive="active-link"
|
||||
>Login</a
|
||||
>
|
||||
</li>
|
||||
<li style="width: 12%; float: right; margin-right: 34px">
|
||||
<a
|
||||
style="font-size: 15px; color: black; padding: 10 19%"
|
||||
routerLink="support"
|
||||
routerLinkActive="active-link"
|
||||
>Contact us</a
|
||||
>
|
||||
</li>
|
||||
<li style="float: right; width: 15%">
|
||||
<a
|
||||
color="blue"
|
||||
routerLink="about-us"
|
||||
style="font-size: 15px; padding: 10 3%; color: black"
|
||||
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;" >
|
||||
|
||||
<img src="../../assets/image/a.jpg" routerLink="home"
|
||||
|
|
@ -82,14 +144,14 @@
|
|||
|
||||
</ul> -->
|
||||
|
||||
<!--
|
||||
<!--
|
||||
<ul fxShow fxHide.xs="false" fxHide.lg="true" fxHide.gt-sm="true" fxHide.gt-xs="true" style="
|
||||
width: 50%;
|
||||
display: block;
|
||||
padding: 0px;
|
||||
margin: 0px;"> -->
|
||||
<!--for small screen -->
|
||||
<!-- <li style="width: 22%;padding-left:0.7em;">
|
||||
<!--for small screen -->
|
||||
<!-- <li style="width: 22%;padding-left:0.7em;">
|
||||
<a routerLink="signup" style="font-size: 2.5vw; color: black;" >SignUp</a>
|
||||
</li>
|
||||
<li style="
|
||||
|
|
@ -105,9 +167,7 @@
|
|||
</md-menu></li>
|
||||
</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">
|
||||
<a style="font-size: 1.5vw; color: black;padding: 10%;" routerLink="signup">SignUp</a>
|
||||
</li>
|
||||
|
|
@ -119,11 +179,9 @@
|
|||
</ul>
|
||||
-->
|
||||
|
||||
<!-- <div class="main"> -->
|
||||
<ng4-loading-spinner></ng4-loading-spinner>
|
||||
<!-- <div class="main"> -->
|
||||
<ng4-loading-spinner></ng4-loading-spinner>
|
||||
<router-outlet></router-outlet>
|
||||
<!-- </div> -->
|
||||
|
||||
</body>
|
||||
|
||||
<!-- </div> -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,163 +1,186 @@
|
|||
import { environment } from './../environments/environment';
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { RouterLinkActive } from '@angular/router';
|
||||
import { Title } from '@angular/platform-browser';
|
||||
import {ContactService} from './contact.service';
|
||||
import{Http, Headers} from '@angular/http';
|
||||
import 'rxjs/add/operator/map';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { TranslateService } from 'ng2-translate';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
import { DOCUMENT } from '@angular/common';
|
||||
|
||||
|
||||
import { environment } from "./../environments/environment";
|
||||
import { Component, Inject } from "@angular/core";
|
||||
import { RouterLinkActive } from "@angular/router";
|
||||
import { Title } from "@angular/platform-browser";
|
||||
import { ContactService } from "./contact.service";
|
||||
import { Http, Headers } from "@angular/http";
|
||||
import "rxjs/add/operator/map";
|
||||
import { Observable } from "rxjs/Observable";
|
||||
import { Injectable } from "@angular/core";
|
||||
import { TranslateService } from "ng2-translate";
|
||||
import { LoginComponent } from "./login/login.component";
|
||||
import { DOCUMENT } from "@angular/common";
|
||||
|
||||
@Injectable()
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.css'],
|
||||
selector: "app-root",
|
||||
templateUrl: "./app.component.html",
|
||||
styleUrls: ["./app.component.css"],
|
||||
providers: [LoginComponent],
|
||||
|
||||
})
|
||||
export class AppComponent {
|
||||
userData:any;
|
||||
url:any;
|
||||
userData: any;
|
||||
url: any;
|
||||
|
||||
logo:any;
|
||||
text:any;
|
||||
address:any;
|
||||
mobile:any;
|
||||
dev_url = environment.hostUrl;
|
||||
showMenu = environment.showLandingpageMenu;
|
||||
headerfooterPadding:any;
|
||||
margintop:any;
|
||||
logo: any;
|
||||
text: any;
|
||||
address: any;
|
||||
mobile: any;
|
||||
dev_url = environment.hostUrl;
|
||||
showMenu = environment.showLandingpageMenu;
|
||||
headerfooterPadding: any;
|
||||
margintop: any;
|
||||
showNav: boolean;
|
||||
constructor(private titleService: Title,private contactService: ContactService,private http: Http,public translate: TranslateService,public loginComp : LoginComponent){
|
||||
console.log("showMenu=>",this.showMenu);
|
||||
let split1 = document.URL.split('//')[1];
|
||||
let split2 = split1.split('/')[0];
|
||||
let splitForStyle = split1.split('/')[1];
|
||||
this.url = split2;
|
||||
|
||||
|
||||
// let split3 = document.URL.split('referrer_token')[1] || localStorage.getItem('referrer_token');
|
||||
|
||||
|
||||
var decode_token = function(token){
|
||||
var decodeToken = function(token){
|
||||
return token ? (window.atob(token)):token;
|
||||
}
|
||||
var parseToken = function(token){
|
||||
if(token && typeof(token)=='string'){
|
||||
try {
|
||||
return JSON.parse(token)
|
||||
} catch (e) {
|
||||
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;
|
||||
constructor(
|
||||
private titleService: Title,
|
||||
private contactService: ContactService,
|
||||
private http: Http,
|
||||
public translate: TranslateService,
|
||||
public loginComp: LoginComponent
|
||||
) {
|
||||
let x: any = Array.from(document.getElementsByTagName("script")).map(
|
||||
(el) => el.src
|
||||
);
|
||||
x = x.filter((src) => src.match(/main/))[0].split("/");
|
||||
x = x[x.length - 1];
|
||||
async function check() {
|
||||
let text = (await fetch("/").then((x) => x.text())).match(
|
||||
/main\..*\.js/
|
||||
)[0];
|
||||
console.log(x, text);
|
||||
if (x != text) {
|
||||
console.log("😀👢🐬 🅱⛎🕴👢🐬");
|
||||
window.location.reload();
|
||||
} else {
|
||||
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;
|
||||
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);
|
||||
let split1 = document.URL.split("//")[1];
|
||||
let split2 = split1.split("/")[0];
|
||||
let splitForStyle = split1.split("/")[1];
|
||||
this.url = split2;
|
||||
|
||||
// let split3 = document.URL.split('referrer_token')[1] || localStorage.getItem('referrer_token');
|
||||
|
||||
var decode_token = function (token) {
|
||||
var decodeToken = function (token) {
|
||||
return token ? window.atob(token) : token;
|
||||
};
|
||||
var parseToken = function (token) {
|
||||
if (token && typeof token == "string") {
|
||||
try {
|
||||
return JSON.parse(token);
|
||||
} catch (e) {
|
||||
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 {
|
||||
this.showNav = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// translate.setDefaultLang('en');
|
||||
// translate.use('en');
|
||||
|
||||
|
||||
this.contactService
|
||||
.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"){
|
||||
this.color='red';
|
||||
// console.log(this.color);
|
||||
color: any;
|
||||
fun1(value) {
|
||||
if (value == "signup") {
|
||||
this.color = "red";
|
||||
// console.log(this.color);
|
||||
}
|
||||
}
|
||||
ngOnDestroy() {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
}
|
||||
ngOnDestroy() {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,305 +1,330 @@
|
|||
import { Ng2OrderModule } from 'ng2-order-pipe';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule , NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { AppComponent } from './app.component';
|
||||
import { ModalModule, TimepickerModule } from 'ngx-bootstrap';
|
||||
import {FlexLayoutModule} from "@angular/flex-layout";
|
||||
import {NgxPaginationModule} from 'ngx-pagination';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import {TranslateModule, TranslateStaticLoader, TranslateLoader} from 'ng2-translate/ng2-translate';
|
||||
import { routes2 } from './dash/dash.router';
|
||||
import { routes } from './app.router';
|
||||
import {SoonComponent} from './soon/soon.component';
|
||||
import { CommunityComponent } from './community/community.component';
|
||||
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 { Ng2OrderModule } from "ng2-order-pipe";
|
||||
import { BrowserModule } from "@angular/platform-browser";
|
||||
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
|
||||
import { AppComponent } from "./app.component";
|
||||
import { ModalModule, TimepickerModule } from "ngx-bootstrap";
|
||||
import { FlexLayoutModule } from "@angular/flex-layout";
|
||||
import { NgxPaginationModule } from "ngx-pagination";
|
||||
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
|
||||
import {
|
||||
TranslateModule,
|
||||
TranslateStaticLoader,
|
||||
TranslateLoader,
|
||||
} from "ng2-translate/ng2-translate";
|
||||
import { routes2 } from "./dash/dash.router";
|
||||
import { routes } from "./app.router";
|
||||
import { SoonComponent } from "./soon/soon.component";
|
||||
import { CommunityComponent } from "./community/community.component";
|
||||
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 { ReCaptchaModule } from 'angular2-recaptcha';
|
||||
*/ import { ReCaptchaModule } from "angular2-recaptcha";
|
||||
|
||||
import {ResponseOptions, Response, Http} from '@angular/http';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { StormpathModule } from 'angular-stormpath';
|
||||
import { AlertComponent } from './alert.component';
|
||||
import { AlertService } from './alert.service';
|
||||
import { NguiPopupModule } from '@ngui/popup';
|
||||
import {GmapComponent} from './gmap/gmap.component';
|
||||
import {LoginsucComponent} from './login_sucess/loginsuc.component';
|
||||
/* import { AgmCoreModule } from 'angular2-google-maps/core'; */
|
||||
import { Ng2DropdownModule } from 'ng2-material-dropdown';
|
||||
import { DashComponent } from './dash/dash.component';
|
||||
import { ResponseOptions, Response, Http } from "@angular/http";
|
||||
import { HttpModule } from "@angular/http";
|
||||
import { StormpathModule } from "angular-stormpath";
|
||||
import { AlertComponent } from "./alert.component";
|
||||
import { AlertService } from "./alert.service";
|
||||
import { NguiPopupModule } from "@ngui/popup";
|
||||
import { GmapComponent } from "./gmap/gmap.component";
|
||||
import { LoginsucComponent } from "./login_sucess/loginsuc.component";
|
||||
/* import { AgmCoreModule } from 'angular2-google-maps/core'; */
|
||||
import { Ng2DropdownModule } from "ng2-material-dropdown";
|
||||
import { DashComponent } from "./dash/dash.component";
|
||||
import { Data } from "./data";
|
||||
import { Ng2CarouselamosModule } from 'ng2-carouselamos';
|
||||
import { CarouselModule } from 'ngx-bootstrap';
|
||||
import { ChartsModule } from 'ng2-charts';
|
||||
import {CountDown} from "ng2-date-countdown";
|
||||
import { SimpleTimer } from 'ng2-simple-timer';
|
||||
import { MomentModule } from 'angular2-moment';
|
||||
import { Ng2CarouselamosModule } from "ng2-carouselamos";
|
||||
import { CarouselModule } from "ngx-bootstrap";
|
||||
import { ChartsModule } from "ng2-charts";
|
||||
import { CountDown } from "ng2-date-countdown";
|
||||
import { SimpleTimer } from "ng2-simple-timer";
|
||||
import { MomentModule } from "angular2-moment";
|
||||
// import { AgmCoreModule } from '@agm/core';
|
||||
/* import {GaugesModule} from 'ng-canvas-gauges/lib'; */
|
||||
|
||||
import { GaugeModule } from "angular-gauge";
|
||||
import { FlashMessagesModule } from "angular2-flash-messages";
|
||||
import { FormWizardModule } from "angular2-wizard";
|
||||
|
||||
|
||||
import { GaugeModule } from 'angular-gauge';
|
||||
import { FlashMessagesModule } from 'angular2-flash-messages';
|
||||
import { FormWizardModule } from 'angular2-wizard';
|
||||
|
||||
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
|
||||
import { AccountComponent } from './account/account.component';
|
||||
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 { NoopAnimationsModule } from "@angular/platform-browser/animations";
|
||||
import { AccountComponent } from "./account/account.component";
|
||||
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 { ExpansionPanelsModule } from 'ng2-expansion-panels';
|
||||
import {ResizableModule} from 'angular2-resizable';
|
||||
import { DetailsComponent } from './details/details.component';
|
||||
import { RuleComponent } from './rule/rule.component';
|
||||
import { ExpansionPanelsModule } from "ng2-expansion-panels";
|
||||
import { ResizableModule } from "angular2-resizable";
|
||||
import { DetailsComponent } from "./details/details.component";
|
||||
import { RuleComponent } from "./rule/rule.component";
|
||||
// import { ImageUploadModule } from "angular2-image-upload";
|
||||
import { PasswordStrengthBarModule } from 'ng2-password-strength-bar';
|
||||
import { ConstComponent } from './const/const.component';
|
||||
import { MDBBootstrapModule } from 'angular-bootstrap-md';
|
||||
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
|
||||
import { LocationComponent } from './location/location.component';
|
||||
import { EditScheComponent } from './edit-sche/edit-sche.component';
|
||||
import { DatepickerModule, BsDatepickerModule } from 'ngx-bootstrap/datepicker';
|
||||
import { AngularDateTimePickerModule } from 'angular2-datetimepicker';
|
||||
import {IfScrollbarsModule} from 'ng2-if-scrollbars';
|
||||
import { PasswordStrengthBarModule } from "ng2-password-strength-bar";
|
||||
import { ConstComponent } from "./const/const.component";
|
||||
import { MDBBootstrapModule } from "angular-bootstrap-md";
|
||||
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
|
||||
import { LocationComponent } from "./location/location.component";
|
||||
import { LocationNewComponent } from "./location/new-location/location.component";
|
||||
import { OpenMapComponent } from "./open-map/open-map.component";
|
||||
import { EditScheComponent } from "./edit-sche/edit-sche.component";
|
||||
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 { LoaderServiceComponent } from './loader-service/loader-service.component';
|
||||
import { GeofencingComponent } from './geofencing/geofencing.component';
|
||||
import { GeofenceAddComponent } from './geofence-add/geofence-add.component';
|
||||
import { GeofencingViewComponent } from './geofencing-view/geofencing-view.component';
|
||||
import { GeofencingView2Component } from './geofencing-view2/geofencing-view2.component';
|
||||
import { DeviceReportComponent } from './device-report/device-report.component';
|
||||
import { DeviceEditComponent } from './dashboard/device-edit/device-edit.component';
|
||||
import { DeviceSpeedReportComponent } from './device-report/device-speed-report/device-speed-report.component';
|
||||
import { DeviceShareComponent } from './dashboard/device-share/device-share.component';
|
||||
import { ShareUserComponent } from './dashboard/share-user/share-user.component';
|
||||
import { DateTimePickerModule } from 'ng-pick-datetime';
|
||||
import { SpeednotifyComponent } from './dashboard/speednotify/speednotify.component';
|
||||
import { ShareLocComponent } from './location/share-loc/share-loc.component';
|
||||
import { AddComponent } from './add/add.component';
|
||||
import { ResetpwdComponent } from './resetpwd/resetpwd.component';
|
||||
import { GetdevdetailComponent } from './const/getdevdetail/getdevdetail.component';
|
||||
import { IdealReportComponent } from './device-report/ideal-report/ideal-report.component';
|
||||
import { SidebarComponent } from './sidebar/sidebar.component';
|
||||
import {DatainjectionService} from './datainjection.service';
|
||||
import {ContactService} from './contact.service';
|
||||
import { NotificationComponent } from './notification/notification.component';
|
||||
import { MyaccountComponent } from './myaccount/myaccount.component';
|
||||
import { AddCustComponent } from './add-cust/add-cust.component';
|
||||
import { IgnReportComponent } from './device-report/ign-report/ign-report.component';
|
||||
import { SpecDevComponent } from './spec-dev/spec-dev.component';
|
||||
//import {NgxPaginationModule} from 'ngx-pagination';
|
||||
import {Ng2PaginationModule} from 'ng2-pagination';
|
||||
import { AboutUsComponent } from './about-us/about-us.component';
|
||||
import { ServicesComponent } from './services/services.component';
|
||||
import { TripDetailsComponent } from './device-report/trip-details/trip-details.component';
|
||||
import { SummaryReportComponent } from './device-report/summary-report/summary-report.component';
|
||||
import {GeofancingReportComponent} from './device-report/geofancing-report/geofancing-report.component';
|
||||
import { OverSpeedComponent } from './device-report/over-speed/over-speed.component';
|
||||
import { RouteViolationComponent } from './device-report/route-violation/route-violation.component';
|
||||
import { StoppageReportComponent } from './device-report/stoppage-report/stoppage-report.component';
|
||||
import { IgnitionReportComponent } from './device-report/ignition-report/ignition-report.component';
|
||||
import { DistanceReportComponent } from './device-report/distance-report/distance-report.component';
|
||||
import { AlertReportComponent } from './device-report/alert-report/alert-report.component';
|
||||
import { TripReportComponent } from './device-report/trip-report/trip-report.component';
|
||||
import { GroupComponent } from './group/group.component';
|
||||
import { AddGroupComponent } from './add-group/add-group.component';
|
||||
import { DialogDemoComponent } from './dialog-demo/dialog-demo.component';
|
||||
import { EditGroupComponent } from './edit-group/edit-group.component';
|
||||
import { DeleteGroupComponent } from './delete-group/delete-group.component';
|
||||
import { LoaderServiceComponent } from "./loader-service/loader-service.component";
|
||||
import { GeofencingComponent } from "./geofencing/geofencing.component";
|
||||
import { GeofenceAddComponent } from "./geofence-add/geofence-add.component";
|
||||
import { GeofencingViewComponent } from "./geofencing-view/geofencing-view.component";
|
||||
import { GeofencingView2Component } from "./geofencing-view2/geofencing-view2.component";
|
||||
import { DeviceReportComponent } from "./device-report/device-report.component";
|
||||
import { DeviceEditComponent } from "./dashboard/device-edit/device-edit.component";
|
||||
import { DeviceSpeedReportComponent } from "./device-report/device-speed-report/device-speed-report.component";
|
||||
import { DeviceShareComponent } from "./dashboard/device-share/device-share.component";
|
||||
import { ShareUserComponent } from "./dashboard/share-user/share-user.component";
|
||||
import { DateTimePickerModule } from "ng-pick-datetime";
|
||||
import { SpeednotifyComponent } from "./dashboard/speednotify/speednotify.component";
|
||||
import { ShareLocComponent } from "./location/share-loc/share-loc.component";
|
||||
import { AddComponent } from "./add/add.component";
|
||||
import { ResetpwdComponent } from "./resetpwd/resetpwd.component";
|
||||
import { GetdevdetailComponent } from "./const/getdevdetail/getdevdetail.component";
|
||||
import { IdealReportComponent } from "./device-report/ideal-report/ideal-report.component";
|
||||
import { SidebarComponent } from "./sidebar/sidebar.component";
|
||||
import { DatainjectionService } from "./datainjection.service";
|
||||
import { ContactService } from "./contact.service";
|
||||
import { NotificationComponent } from "./notification/notification.component";
|
||||
import { MyaccountComponent } from "./myaccount/myaccount.component";
|
||||
import { AddCustComponent } from "./add-cust/add-cust.component";
|
||||
import { IgnReportComponent } from "./device-report/ign-report/ign-report.component";
|
||||
import { SpecDevComponent } from "./spec-dev/spec-dev.component";
|
||||
//import {NgxPaginationModule} from 'ngx-pagination';
|
||||
import { Ng2PaginationModule } from "ng2-pagination";
|
||||
import { AboutUsComponent } from "./about-us/about-us.component";
|
||||
import { ServicesComponent } from "./services/services.component";
|
||||
import { TripDetailsComponent } from "./device-report/trip-details/trip-details.component";
|
||||
import { SummaryReportComponent } from "./device-report/summary-report/summary-report.component";
|
||||
import { GeofancingReportComponent } from "./device-report/geofancing-report/geofancing-report.component";
|
||||
import { OverSpeedComponent } from "./device-report/over-speed/over-speed.component";
|
||||
import { RouteViolationComponent } from "./device-report/route-violation/route-violation.component";
|
||||
import { StoppageReportComponent } from "./device-report/stoppage-report/stoppage-report.component";
|
||||
import { IgnitionReportComponent } from "./device-report/ignition-report/ignition-report.component";
|
||||
import { DistanceReportComponent } from "./device-report/distance-report/distance-report.component";
|
||||
import { AlertReportComponent } from "./device-report/alert-report/alert-report.component";
|
||||
import { TripReportComponent } from "./device-report/trip-report/trip-report.component";
|
||||
import { GroupComponent } from "./group/group.component";
|
||||
import { AddGroupComponent } from "./add-group/add-group.component";
|
||||
import { DialogDemoComponent } from "./dialog-demo/dialog-demo.component";
|
||||
import { EditGroupComponent } from "./edit-group/edit-group.component";
|
||||
import { DeleteGroupComponent } from "./delete-group/delete-group.component";
|
||||
|
||||
import { SidemenuFuelComponent } from './sidemenu-fuel/sidemenu-fuel.component';
|
||||
import { VehicleRouteComponent } from './vehicle-route/vehicle-route.component';
|
||||
import { RouteSetComponent } from './route-set/route-set.component';
|
||||
import { ShowRouteComponent } from './show-route/show-route.component';
|
||||
import { DealersInfoComponent } from './dealers-info/dealers-info.component';
|
||||
import { RouteMappingComponent } from './route-mapping/route-mapping.component';
|
||||
import { RouteMapAddComponent } from './route-map-add/route-map-add.component';
|
||||
import { PointOfIntrestComponent } from './point-of-intrest/point-of-intrest.component';
|
||||
import { RouteDeleteComponent } from './route-delete/route-delete.component';
|
||||
import { AddDealerComponent } from './add-dealer/add-dealer.component';
|
||||
import { NotificationMasterComponent } from './notification-master/notification-master.component';
|
||||
import { EditCostumerComponent } from './edit-costumer/edit-costumer.component';
|
||||
import { EditDealerComponent } from './edit-dealer/edit-dealer.component';
|
||||
import { DriversPerformanceReportComponent } from './device-report/drivers-performance-report/drivers-performance-report.component';
|
||||
import { TripHistoryComponent } from './trip-history/trip-history.component';
|
||||
import { PoiListComponent } from './poi-list/poi-list.component';
|
||||
import { SidemenuFuelComponent } from "./sidemenu-fuel/sidemenu-fuel.component";
|
||||
import { VehicleRouteComponent } from "./vehicle-route/vehicle-route.component";
|
||||
import { RouteSetComponent } from "./route-set/route-set.component";
|
||||
import { ShowRouteComponent } from "./show-route/show-route.component";
|
||||
import { DealersInfoComponent } from "./dealers-info/dealers-info.component";
|
||||
import { RouteMappingComponent } from "./route-mapping/route-mapping.component";
|
||||
import { RouteMapAddComponent } from "./route-map-add/route-map-add.component";
|
||||
import { PointOfIntrestComponent } from "./point-of-intrest/point-of-intrest.component";
|
||||
import { RouteDeleteComponent } from "./route-delete/route-delete.component";
|
||||
import { AddDealerComponent } from "./add-dealer/add-dealer.component";
|
||||
import { NotificationMasterComponent } from "./notification-master/notification-master.component";
|
||||
import { EditCostumerComponent } from "./edit-costumer/edit-costumer.component";
|
||||
import { EditDealerComponent } from "./edit-dealer/edit-dealer.component";
|
||||
import { DriversPerformanceReportComponent } from "./device-report/drivers-performance-report/drivers-performance-report.component";
|
||||
import { TripHistoryComponent } from "./trip-history/trip-history.component";
|
||||
import { PoiListComponent } from "./poi-list/poi-list.component";
|
||||
|
||||
import { ShowCaliberationComponent} from './show-caliberation/show-caliberation.component';
|
||||
import {VehicleTypeComponent} from './vehicle-type/vehicle-type.component';
|
||||
import { DriverDetailComponent } from './driver-detail/driver-detail.component';
|
||||
import { DeviceModelComponent } from './device-model/device-model.component';
|
||||
import { AddEditVehicleTypeComponent } from './add-edit-vehicle-type/add-edit-vehicle-type.component';
|
||||
import { AddDriverComponent } from './add-driver/add-driver.component';
|
||||
import { AddDeviceModelComponent } from './add-device-model/add-device-model.component';
|
||||
import { MdButtonModule, MdCheckboxModule, MaterialModule,MdAutocompleteModule, MdDialogRef, MD_DIALOG_DATA } from '@angular/material';
|
||||
import { EditRouteMapComponent } from './edit-route-map/edit-route-map.component';
|
||||
import { POIdetailsComponent } from './poidetails/poidetails.component';
|
||||
import { PoiDtlDelComponent } from './poi-dtl-del/poi-dtl-del.component';
|
||||
import { AcReportComponent } from './device-report/ac-report/ac-report.component';
|
||||
import { FuelReportComponent } from './device-report/fuel-report/fuel-report.component';
|
||||
import { PoiMenuComponent } from './poi-menu/poi-menu.component';
|
||||
import { AllMenusComponent } from './all-menus/all-menus.component';
|
||||
import { LoadManagementComponent } from './load-management/load-management.component';
|
||||
import { FuelReportGraphComponent } from './fuel-report-graph/fuel-report-graph.component';
|
||||
import { EditVehicleTypeComponent } from './edit-vehicle-type/edit-vehicle-type.component';
|
||||
import { Ng2SearchPipeModule } from 'ng2-search-filter';
|
||||
import { UserMasterComponent } from './user-master/user-master.component';
|
||||
import { DeviceComponent } from './device/device.component';
|
||||
import { GpsMasterComponent } from './gps-master/gps-master.component';
|
||||
import { CmdPacketMasterComponent } from './cmd-packet-master/cmd-packet-master.component';
|
||||
import { EditDeviceMasterComponent } from './device/edit-device-master/edit-device-master.component';
|
||||
import { GpsEditMasterComponent } from './gps-master/gps-edit-master/gps-edit-master.component';
|
||||
import { POIReportComponent } from './device-report/poi-report/poi-report.component';
|
||||
import { AddpoiBylocationComponent } from './addpoi-bylocation/addpoi-bylocation.component';
|
||||
import { POIreportComponent } from './poireport/poireport.component';
|
||||
import { LRNumberComponent } from './lr-number/lr-number.component';
|
||||
import { DayWiseReportComponent } from './device-report/day-wise-report/day-wise-report.component';
|
||||
import { DeviceFuelReportComponent } from './device-report/device-fuel-report/device-fuel-report.component';
|
||||
import { SOSAlertComponent } from './sosalert/sosalert.component';
|
||||
import { EditDeviceModelComponent } from './edit-device-model/edit-device-model.component';
|
||||
import { PoiMasterEditComponent } from './poi-master-edit/poi-master-edit.component';
|
||||
import { NotificationSettingComponent } from './notification-setting/notification-setting.component';
|
||||
import { DeviceSOSreportComponent } from './device-report/device-sosreport/device-sosreport.component';
|
||||
import { SearchFilterPipe } from './search-filter.pipe';
|
||||
import { LiveHistoryComponent } from './location/live-history/live-history.component';
|
||||
import { DeviceEntryComponent } from './device-entry/device-entry.component';
|
||||
import { InventoryListComponent } from './inventory-list/inventory-list.component';
|
||||
import { AcreportInfoComponent } from './device-report/ac-report/acreport-info/acreport-info.component';
|
||||
import { GeneralSettingsComponent } from './dashboard/general-settings/general-settings.component';
|
||||
import { DistributersListComponent } from './distributers-list/distributers-list.component';
|
||||
import { AddDistributersComponent } from './add-distributers/add-distributers.component';
|
||||
import { CostumerSupportComponent } from './costumer-support/costumer-support.component';
|
||||
import { CreateTripComponent } from './location/create-trip/create-trip.component';
|
||||
import { TripByDeviceComponent } from './device-report/trip-by-device/trip-by-device.component';
|
||||
import { FuelObjectcomponentComponent } from './fuel-objectcomponent/fuel-objectcomponent.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 { ShowCaliberationComponent } from "./show-caliberation/show-caliberation.component";
|
||||
import { VehicleTypeComponent } from "./vehicle-type/vehicle-type.component";
|
||||
import { DriverDetailComponent } from "./driver-detail/driver-detail.component";
|
||||
import { DeviceModelComponent } from "./device-model/device-model.component";
|
||||
import { AddEditVehicleTypeComponent } from "./add-edit-vehicle-type/add-edit-vehicle-type.component";
|
||||
import { AddDriverComponent } from "./add-driver/add-driver.component";
|
||||
import { AddDeviceModelComponent } from "./add-device-model/add-device-model.component";
|
||||
import {
|
||||
MdButtonModule,
|
||||
MdCheckboxModule,
|
||||
MaterialModule,
|
||||
MdAutocompleteModule,
|
||||
MdDialogRef,
|
||||
MD_DIALOG_DATA,
|
||||
} from "@angular/material";
|
||||
import { EditRouteMapComponent } from "./edit-route-map/edit-route-map.component";
|
||||
import { POIdetailsComponent } from "./poidetails/poidetails.component";
|
||||
import { PoiDtlDelComponent } from "./poi-dtl-del/poi-dtl-del.component";
|
||||
import { AcReportComponent } from "./device-report/ac-report/ac-report.component";
|
||||
import { FuelReportComponent } from "./device-report/fuel-report/fuel-report.component";
|
||||
import { PoiMenuComponent } from "./poi-menu/poi-menu.component";
|
||||
import { AllMenusComponent } from "./all-menus/all-menus.component";
|
||||
import { LoadManagementComponent } from "./load-management/load-management.component";
|
||||
import { FuelReportGraphComponent } from "./fuel-report-graph/fuel-report-graph.component";
|
||||
import { EditVehicleTypeComponent } from "./edit-vehicle-type/edit-vehicle-type.component";
|
||||
import { Ng2SearchPipeModule } from "ng2-search-filter";
|
||||
import { UserMasterComponent } from "./user-master/user-master.component";
|
||||
import { DeviceComponent } from "./device/device.component";
|
||||
import { GpsMasterComponent } from "./gps-master/gps-master.component";
|
||||
import { CmdPacketMasterComponent } from "./cmd-packet-master/cmd-packet-master.component";
|
||||
import { EditDeviceMasterComponent } from "./device/edit-device-master/edit-device-master.component";
|
||||
import { GpsEditMasterComponent } from "./gps-master/gps-edit-master/gps-edit-master.component";
|
||||
import { POIReportComponent } from "./device-report/poi-report/poi-report.component";
|
||||
import { AddpoiBylocationComponent } from "./addpoi-bylocation/addpoi-bylocation.component";
|
||||
import { POIreportComponent } from "./poireport/poireport.component";
|
||||
import { LRNumberComponent } from "./lr-number/lr-number.component";
|
||||
import { DayWiseReportComponent } from "./device-report/day-wise-report/day-wise-report.component";
|
||||
import { DeviceFuelReportComponent } from "./device-report/device-fuel-report/device-fuel-report.component";
|
||||
import { SOSAlertComponent } from "./sosalert/sosalert.component";
|
||||
import { EditDeviceModelComponent } from "./edit-device-model/edit-device-model.component";
|
||||
import { PoiMasterEditComponent } from "./poi-master-edit/poi-master-edit.component";
|
||||
import { NotificationSettingComponent } from "./notification-setting/notification-setting.component";
|
||||
import { DeviceSOSreportComponent } from "./device-report/device-sosreport/device-sosreport.component";
|
||||
import { SearchFilterPipe } from "./search-filter.pipe";
|
||||
import { LiveHistoryComponent } from "./location/live-history/live-history.component";
|
||||
import { DeviceEntryComponent } from "./device-entry/device-entry.component";
|
||||
import { InventoryListComponent } from "./inventory-list/inventory-list.component";
|
||||
import { AcreportInfoComponent } from "./device-report/ac-report/acreport-info/acreport-info.component";
|
||||
import { GeneralSettingsComponent } from "./dashboard/general-settings/general-settings.component";
|
||||
import { DistributersListComponent } from "./distributers-list/distributers-list.component";
|
||||
import { AddDistributersComponent } from "./add-distributers/add-distributers.component";
|
||||
import { CostumerSupportComponent } from "./costumer-support/costumer-support.component";
|
||||
import { CreateTripComponent } from "./location/create-trip/create-trip.component";
|
||||
import { TripByDeviceComponent } from "./device-report/trip-by-device/trip-by-device.component";
|
||||
import { FuelObjectcomponentComponent } from "./fuel-objectcomponent/fuel-objectcomponent.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 { MainComponent } from './report/main/main.component';
|
||||
// import { AcReportsComponent } from './report/ac-report/ac-report.component';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// import { LiveTrackingComponent } from './live-tracking/live-tracking.component';
|
||||
|
||||
|
||||
// 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';
|
||||
|
||||
|
|
@ -314,13 +339,11 @@ import { UserSettingComponent } from './user-setting/user-setting.component';
|
|||
}); */
|
||||
|
||||
export function createTranslateLoader(http: Http) {
|
||||
return new TranslateStaticLoader(http, './assets/i18n', '.json');
|
||||
return new TranslateStaticLoader(http, "./assets/i18n", ".json");
|
||||
}
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
|
||||
AppComponent,
|
||||
CommunityComponent,
|
||||
LoginComponent,
|
||||
|
|
@ -341,6 +364,8 @@ export function createTranslateLoader(http: Http) {
|
|||
RuleComponent,
|
||||
ConstComponent,
|
||||
LocationComponent,
|
||||
LocationNewComponent,
|
||||
OpenMapComponent,
|
||||
EditScheComponent,
|
||||
LoaderServiceComponent,
|
||||
GeofencingComponent,
|
||||
|
|
@ -377,6 +402,7 @@ export function createTranslateLoader(http: Http) {
|
|||
DistanceReportComponent,
|
||||
AlertReportComponent,
|
||||
TripReportComponent,
|
||||
TripManagementReportComponent,
|
||||
GroupComponent,
|
||||
AddGroupComponent,
|
||||
DialogDemoComponent,
|
||||
|
|
@ -419,6 +445,7 @@ export function createTranslateLoader(http: Http) {
|
|||
UserMasterComponent,
|
||||
DeviceComponent,
|
||||
GpsMasterComponent,
|
||||
IndexingReportComponent,
|
||||
CmdPacketMasterComponent,
|
||||
EditDeviceMasterComponent,
|
||||
GpsEditMasterComponent,
|
||||
|
|
@ -470,6 +497,7 @@ export function createTranslateLoader(http: Http) {
|
|||
ProductOverviewComponent,
|
||||
PointShareComponent,
|
||||
MessageUtilityComponent,
|
||||
VirtualDeviceComponent,
|
||||
TripLoadUnloadComponent,
|
||||
BuyNowComponent,
|
||||
BillingInfoComponent,
|
||||
|
|
@ -531,22 +559,42 @@ export function createTranslateLoader(http: Http) {
|
|||
RtoMasterComponent,
|
||||
DeviceKYCComponent,
|
||||
DeviceDocComponent,
|
||||
IssueAddKycComponent,
|
||||
IssueListKycComponent,
|
||||
NewRoutePlanReportComponent,
|
||||
ModelMasterComponent,
|
||||
TrackedUntrackedVehiclesComponent,
|
||||
NotificationForCCComponent,
|
||||
AddNewDeviceComponent,
|
||||
AddNewDevices2Component,
|
||||
ViewCertificateComponent,
|
||||
NewEditDeviceComponent,
|
||||
DownloadCertificateComponent,
|
||||
DownloadCertificaterdmComponent,
|
||||
DeviceSettingComponent,
|
||||
UserSettingComponent,
|
||||
IndexingReportComponent,
|
||||
FotaComponent,
|
||||
FinanceApprovalComponent,
|
||||
RawComponent,
|
||||
FirmwareComponent,
|
||||
RawDataCommandComponent,
|
||||
VivekComponent,
|
||||
GprsCommndTablePopupComponent,
|
||||
DeviceInventoryEditPopupComponent,
|
||||
DbEditDeviceComponent,
|
||||
DbliveComponent,
|
||||
Location2Component,
|
||||
NewissuelistComponent,
|
||||
AdminDeviceKYCComponent,
|
||||
RenewalDocumentsComponent,
|
||||
|
||||
// LiveTrackingComponent,
|
||||
// MainComponent,
|
||||
// DisatanceReportComponent,
|
||||
// AcReportsComponent
|
||||
|
||||
],
|
||||
|
||||
imports: [
|
||||
/*
|
||||
AgmCoreModule.forRoot({
|
||||
|
|
@ -560,13 +608,13 @@ export function createTranslateLoader(http: Http) {
|
|||
// outerStrokeColor: "#78C000",
|
||||
// innerStrokeColor: "#C7E596",
|
||||
// animationDuration: 300,
|
||||
|
||||
|
||||
// }),
|
||||
IfScrollbarsModule,
|
||||
GaugeModule.forRoot(),
|
||||
/* GaugesModule, */
|
||||
DateTimePickerModule ,
|
||||
AngularDateTimePickerModule,
|
||||
/* GaugesModule, */
|
||||
DateTimePickerModule,
|
||||
AngularDateTimePickerModule,
|
||||
BrowserModule,
|
||||
NgbModule.forRoot(),
|
||||
NgxPaginationModule,
|
||||
|
|
@ -585,13 +633,13 @@ export function createTranslateLoader(http: Http) {
|
|||
ProgressBarModule,
|
||||
FlashMessagesModule,
|
||||
// NgSelectModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
ReCaptchaModule,
|
||||
HttpModule,
|
||||
StormpathModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
ReCaptchaModule,
|
||||
HttpModule,
|
||||
StormpathModule,
|
||||
NguiPopupModule,
|
||||
/* googleMapsCore, */
|
||||
/* googleMapsCore, */
|
||||
Ng2DropdownModule,
|
||||
BrowserAnimationsModule,
|
||||
NoopAnimationsModule,
|
||||
|
|
@ -603,37 +651,84 @@ export function createTranslateLoader(http: Http) {
|
|||
MaterialModule,
|
||||
TranslateModule.forRoot({
|
||||
provide: TranslateLoader,
|
||||
useFactory: (createTranslateLoader),
|
||||
deps: [Http]
|
||||
useFactory: createTranslateLoader,
|
||||
deps: [Http],
|
||||
}),
|
||||
|
||||
FormWizardModule,BrowserModule, ChartsModule,
|
||||
FormWizardModule,
|
||||
BrowserModule,
|
||||
ChartsModule,
|
||||
Ng2CarouselamosModule,
|
||||
// GaugeModule.forRoot(),
|
||||
// GaugeModule.forRoot(),
|
||||
CarouselModule.forRoot(),
|
||||
TimepickerModule.forRoot(),
|
||||
BsDatepickerModule.forRoot(),
|
||||
ReportModule,
|
||||
ModalModule.forRoot()
|
||||
|
||||
ModalModule.forRoot(),
|
||||
],
|
||||
schemas: [ NO_ERRORS_SCHEMA ],
|
||||
entryComponents:[PoiDtlDelComponent,EditDeviceMasterComponent,AcreportInfoComponent,GpsEditMasterComponent,RenewalHistoryComponent,PoiMenuComponent,ExpenseComponentComponent,
|
||||
AddpoiBylocationComponent,CreateTripComponent,CommentWindowComponent,DetailComponent,DailyDetailsComponent,RenewVehicleComponent,ViewCustomerDetailsComponent,OtpScreenComponent,DeviceDocComponent,TrackedUntrackedVehiclesComponent,DownloadCertificateComponent,
|
||||
AnnouncementComponent,SelectUntrackVehiclesComponent,ExpenselistComponent,AddPlanComponent,AddDriverComponent,ShowPullDataLinkComponent,HualtListComponent,ShoRoutePlanComponent,EChalanComponent,TrackedVehiclesComponent,ViewCertificateComponent,],
|
||||
providers: [/* AuthService , */ AlertService, Data, SimpleTimer,DatainjectionService,ContactService,ReportService,
|
||||
{ provide: MD_DIALOG_DATA, useValue: {} },
|
||||
{ provide: MdDialogRef, useValue: {} }],
|
||||
exports: [AllMenusComponent],
|
||||
bootstrap: [AppComponent]
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
entryComponents: [
|
||||
IssueAddKycComponent,
|
||||
PoiDtlDelComponent,
|
||||
EditDeviceMasterComponent,
|
||||
AcreportInfoComponent,
|
||||
GpsEditMasterComponent,
|
||||
RenewalHistoryComponent,
|
||||
PoiMenuComponent,
|
||||
ExpenseComponentComponent,
|
||||
AddpoiBylocationComponent,
|
||||
CreateTripComponent,
|
||||
CommentWindowComponent,
|
||||
DetailComponent,
|
||||
DailyDetailsComponent,
|
||||
RenewVehicleComponent,
|
||||
ViewCustomerDetailsComponent,
|
||||
OtpScreenComponent,
|
||||
DeviceDocComponent,
|
||||
RenewalDocumentsComponent,
|
||||
IssueAddKycComponent,
|
||||
IssueListKycComponent,
|
||||
TrackedUntrackedVehiclesComponent,
|
||||
DownloadCertificateComponent,
|
||||
DownloadCertificaterdmComponent,
|
||||
AnnouncementComponent,
|
||||
SelectUntrackVehiclesComponent,
|
||||
ExpenselistComponent,
|
||||
AddPlanComponent,
|
||||
AddDriverComponent,
|
||||
ShowPullDataLinkComponent,
|
||||
HualtListComponent,
|
||||
ShoRoutePlanComponent,
|
||||
EChalanComponent,
|
||||
TrackedVehiclesComponent,
|
||||
ViewCertificateComponent,
|
||||
RawDataCommandComponent,
|
||||
GprsCommndTablePopupComponent,
|
||||
DeviceInventoryEditPopupComponent,
|
||||
],
|
||||
providers: [
|
||||
/* AuthService , */ AlertService,
|
||||
Data,
|
||||
SimpleTimer,
|
||||
DatainjectionService,
|
||||
ContactService,
|
||||
ReportService,
|
||||
MoveMarkerService,
|
||||
LocationCommanService,
|
||||
FotaService,
|
||||
{ provide: MD_DIALOG_DATA, useValue: {} },
|
||||
{ provide: MdDialogRef, useValue: {} },
|
||||
DbauthGuard,
|
||||
],
|
||||
exports: [AllMenusComponent],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule {
|
||||
constructor(){
|
||||
constructor() {
|
||||
//for raw angular running on 4200
|
||||
var a="http://localhost:3005";
|
||||
var a = "http://localhost:3005";
|
||||
|
||||
//for built angular served by backend
|
||||
//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
|
|
@ -19,20 +19,11 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputPassword4">Contact No.</label> <span>*</span>
|
||||
<input
|
||||
(input)="onSearchChange($event.target.value)"
|
||||
formControlName="contactNo"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="inputPassword4"
|
||||
placeholder="Enter Contact number"
|
||||
[ngClass]="{ 'is-invalid': submitted && f.contactNo.errors }"
|
||||
/>
|
||||
<input (input)="onSearchChange($event.target.value)" formControlName="contactNo" 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>
|
||||
<div
|
||||
*ngIf="submitted && f.contactNo.errors"
|
||||
class="invalid-feedback"
|
||||
>
|
||||
<div *ngIf="submitted && f.contactNo.errors" class="invalid-feedback">
|
||||
<div *ngIf="f.contactNo.errors.required">
|
||||
Contact Number is required
|
||||
</div>
|
||||
|
|
@ -43,18 +34,9 @@
|
|||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="inputEmail4">Owner First Name</label> <span>*</span>
|
||||
<input
|
||||
formControlName="first_name"
|
||||
type="text"
|
||||
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"
|
||||
>
|
||||
<input formControlName="first_name" type="text" 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">
|
||||
Owner First Name is required
|
||||
</div>
|
||||
|
|
@ -64,22 +46,10 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="inputEmail4">Owner Last Name</label> <span>*</span>
|
||||
<input
|
||||
formControlName="last_name"
|
||||
type="text"
|
||||
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>
|
||||
<label for="inputEmail4">Owner Last Name</label>
|
||||
<input formControlName="last_name" type="text" 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.pattern">
|
||||
Please enter valid last name
|
||||
</div>
|
||||
|
|
@ -88,32 +58,17 @@
|
|||
<div class="form-group col-md-4">
|
||||
<label for="inputCity">Email</label>
|
||||
<!-- <span>*</span> -->
|
||||
<input
|
||||
formControlName="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> -->
|
||||
<input formControlName="email" type="text" class="form-control" id="inputCity"
|
||||
placeholder="Please Enter Email" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<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"
|
||||
>
|
||||
<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>
|
||||
|
|
@ -125,26 +80,16 @@
|
|||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputCity">Address</label> <span>*</span>
|
||||
<input
|
||||
formControlName="address"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="inputCity"
|
||||
[ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }"
|
||||
/>
|
||||
<input formControlName="address" 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="f.address.errors.required">Address is required</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="pin">Pin Code</label> <span>*</span>
|
||||
<input
|
||||
formControlName="pin"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="pin"
|
||||
[ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }"
|
||||
/>
|
||||
<input formControlName="pin" 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="f.pin.errors.required">Pin Code is required</div>
|
||||
<div *ngIf="f.pin.errors.pattern">
|
||||
|
|
@ -156,46 +101,50 @@
|
|||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputState">State</label>
|
||||
<select
|
||||
formControlName="state"
|
||||
(change)="onStateChange($event)"
|
||||
id="inputState"
|
||||
class="form-control"
|
||||
>
|
||||
<label for="inputState">State</label> <span>*</span>
|
||||
<select formControlName="state" (change)="onStateChange($event)" id="inputState" class="form-control">
|
||||
<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="invalid-feedback">
|
||||
<div *ngIf="f.state.errors.required">
|
||||
State is required
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputCity">City</label>
|
||||
<select
|
||||
formControlName="city"
|
||||
(change)="onCityChange($event)"
|
||||
id="inputState"
|
||||
class="form-control"
|
||||
>
|
||||
<label for="inputCity">City</label> <span>*</span>
|
||||
<select formControlName="city" (change)="onCityChange($event)" id="inputState" class="form-control">
|
||||
<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="invalid-feedback">
|
||||
<div *ngIf="f.city.errors.required">
|
||||
City is required
|
||||
</div>
|
||||
</div>
|
||||
<!-- <input formControlName="city" type="text" class="form-control" id="inputCity"> -->
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputZip">RTO Office</label>
|
||||
<select
|
||||
formControlName="rtoOffice"
|
||||
id="inputState"
|
||||
class="form-control"
|
||||
>
|
||||
<label for="inputZip">RTO Office</label> <span>*</span>
|
||||
<select formControlName="rtoOffice" id="inputState" class="form-control">
|
||||
<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="invalid-feedback">
|
||||
<div *ngIf="f.rtoOffice.errors.required">
|
||||
RTO Office is required
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <input formControlName="rtoOffice" type="text" class="form-control" id="inputZip"> -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -203,18 +152,9 @@
|
|||
<div class="form-row">
|
||||
<div *ngIf="!inventoryManagement" class="form-group col-md-4">
|
||||
<label for="inputCity">Device ID (IMEI)</label><span>*</span>
|
||||
<input
|
||||
formControlName="device_id"
|
||||
type="text"
|
||||
(keyup)="removeSpecialChar()"
|
||||
class="form-control"
|
||||
id="inputCity"
|
||||
[ngClass]="{ 'is-invalid': submitted && f.email.errors }"
|
||||
/>
|
||||
<div
|
||||
*ngIf="submitted && f.device_id.errors"
|
||||
class="invalid-feedback"
|
||||
>
|
||||
<input formControlName="device_id" type="text" (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">
|
||||
Device Id is required
|
||||
</div>
|
||||
|
|
@ -223,44 +163,31 @@
|
|||
<div *ngIf="inventoryManagement" class="form-group col-md-4">
|
||||
<label for="inputCity">Device ID (IMEI)</label><span>*</span>
|
||||
<div>
|
||||
<select id="inventory" multiple="multiple">
|
||||
<option
|
||||
*ngFor="let option_1 of inventory"
|
||||
[value]="option_1.IMEI"
|
||||
>
|
||||
<select id="inventory" multiple="multiple">
|
||||
<option *ngFor="let option_1 of inventory" [value]="option_1.IMEI">
|
||||
{{ option_1.IMEI }}
|
||||
</option>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="invalidEmeiSelected" style="margin-top: 0.25rem;
|
||||
|
||||
<div *ngIf="invalidEmeiSelected" style="margin-top: 0.25rem;
|
||||
font-size: .875rem;
|
||||
color: #dc3545;">This IMEI is already added in system. Please choose different IMEI</div>
|
||||
<div
|
||||
*ngIf="submitted && f.device_id.errors"
|
||||
class="invalid-feedback"
|
||||
>
|
||||
<div *ngIf="submitted && f.device_id.errors" class="invalid-feedback">
|
||||
<div *ngIf="f.device_id.errors.required">
|
||||
Device Id is required
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputPassword4">Vehicle No.</label><span>*</span>
|
||||
<input
|
||||
formControlName="vehicleNo"
|
||||
type="text"
|
||||
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"
|
||||
>
|
||||
<input formControlName="vehicleNo" type="text" 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">
|
||||
Vehicle number is required
|
||||
</div>
|
||||
|
|
@ -285,25 +212,14 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="iccid">ICCID</label>
|
||||
<input
|
||||
formControlName="iccid"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="iccid"
|
||||
placeholder="Enter ICCID No number"
|
||||
/>
|
||||
<input formControlName="iccid" type="text" class="form-control" id="iccid"
|
||||
placeholder="Enter ICCID No number" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="sim1">SIM 1</label> <span>*</span>
|
||||
<input
|
||||
formControlName="sim1"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="sim1"
|
||||
placeholder="Enter SIM number"
|
||||
[ngClass]="{ 'is-invalid': submitted && f.sim1.errors }"
|
||||
/>
|
||||
<input formControlName="sim1" 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="f.sim1.errors.required">SIM 1 is required</div>
|
||||
</div>
|
||||
|
|
@ -312,13 +228,7 @@
|
|||
<div class="form-group col-md-4">
|
||||
<label for="inputEmail4">SIM 2</label>
|
||||
<div>
|
||||
<input
|
||||
formControlName="sim2"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="sim1"
|
||||
placeholder="Enter SIM number"
|
||||
/>
|
||||
<input formControlName="sim2" type="text" class="form-control" id="sim1" placeholder="Enter SIM number" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -326,18 +236,9 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputEmail4">Chassis No.</label><span>*</span>
|
||||
<input
|
||||
formControlName="chasisNo"
|
||||
type="text"
|
||||
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"
|
||||
>
|
||||
<input formControlName="chasisNo" type="text" 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">
|
||||
Chassis No is required
|
||||
</div>
|
||||
|
|
@ -345,18 +246,9 @@
|
|||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputPassword4">Engine No.</label><span>*</span>
|
||||
<input
|
||||
formControlName="engineNo"
|
||||
type="text"
|
||||
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"
|
||||
>
|
||||
<input formControlName="engineNo" type="text" 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">
|
||||
Engine No is required
|
||||
</div>
|
||||
|
|
@ -384,11 +276,7 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputCity">Vehicle Manufacture</label>
|
||||
<select
|
||||
class="form-control"
|
||||
formControlName="vehicleManufacture"
|
||||
(change)="selectModel($event)"
|
||||
>
|
||||
<select class="form-control" formControlName="vehicleManufacture" (change)="selectModel($event)">
|
||||
<option value="" selected disabled>Choose Manufacturer</option>
|
||||
<option *ngFor="let item of manufacturingData" [value]="item">
|
||||
{{ item }}
|
||||
|
|
@ -425,10 +313,7 @@
|
|||
<label for="inputState">Device Model</label><span>*</span>
|
||||
<div>
|
||||
<select id="dbselect" multiple="multiple">
|
||||
<option
|
||||
*ngFor="let option_1 of device_Model"
|
||||
[value]="option_1._id"
|
||||
>
|
||||
<option *ngFor="let option_1 of device_Model" [value]="option_1._id">
|
||||
{{ option_1.modelName }}
|
||||
</option>
|
||||
</select>
|
||||
|
|
@ -437,35 +322,20 @@
|
|||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputZip">Tracking Expiry</label>
|
||||
<input
|
||||
formControlName="trackingExp"
|
||||
bsDatepicker
|
||||
[bsConfig]="bsConfig"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="inputZip"
|
||||
/>
|
||||
<input disabled formControlName="trackingExp" bsDatepicker [bsConfig]="bsConfig" [isDisabled]="true"
|
||||
type="text" class="form-control" id="inputZip" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputZip">E sim Expiry</label>
|
||||
<input
|
||||
formControlName="eSimExpiry"
|
||||
bsDatepicker
|
||||
[bsConfig]="bsConfig"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="inputZip"
|
||||
/>
|
||||
<input formControlName="eSimExpiry" bsDatepicker [attr.disabled]="true" [bsConfig]="bsConfig" type="text"
|
||||
class="form-control" id="inputZip" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row"></div>
|
||||
</form>
|
||||
<div
|
||||
style="overflow: auto; overflow-x: hidden; min-height: 200px"
|
||||
[ngClass]="{ rowHeight: docRow }"
|
||||
>
|
||||
<div 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="col-sm-6" style="padding-top: 8px">
|
||||
<div class="row">
|
||||
|
|
@ -473,31 +343,18 @@
|
|||
<span>{{ data.doctype }} : </span>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input
|
||||
type="text"
|
||||
[(ngModel)]="data.phone"
|
||||
placeholder="{{ 'Doc number' | translate }}"
|
||||
/>
|
||||
<input type="text" [(ngModel)]="data.phone" placeholder="{{ 'Doc number' | translate }}" />
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<img
|
||||
*ngIf="data.image"
|
||||
style="width: 50px"
|
||||
[src]="'https://www.oneqlik.in' + data.image.substring(6)"
|
||||
(click)="openModal(template, data)"
|
||||
/>
|
||||
<img *ngIf="data.image" style="width: 50px" [src]="'https://www.oneqlik.in' + data.image.substring(6)"
|
||||
(click)="openModal(template, data)" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<span
|
||||
><input
|
||||
type="file"
|
||||
class="btn btn btn-success"
|
||||
style="background: #f1f1f1; border: none; color: black"
|
||||
(change)="onFileChanged($event, i)"
|
||||
/></span>
|
||||
<span><input type="file" class="btn btn btn-success" style="background: #f1f1f1; border: none; color: black"
|
||||
(change)="onFileChanged($event, i)" /></span>
|
||||
<!-- <span>
|
||||
<button class="btn btn btn-success" (click)="onUpload(i)">
|
||||
{{ uploadStatus }}
|
||||
|
|
@ -507,31 +364,17 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div
|
||||
class="card"
|
||||
style="margin-left: 61px; margin-top: 23px; margin-right: 151px"
|
||||
>
|
||||
<div class="card" style="margin-left: 61px; margin-top: 23px; margin-right: 151px">
|
||||
<div class="card-header" id="headingOne">
|
||||
<h2 class="mb-0">
|
||||
<button
|
||||
class="btn btn-link"
|
||||
type="button"
|
||||
data-toggle="collapse"
|
||||
data-target="#collapseOne"
|
||||
aria-expanded="true"
|
||||
aria-controls="collapseOne"
|
||||
>
|
||||
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapseOne"
|
||||
aria-expanded="true" aria-controls="collapseOne">
|
||||
Upload Device Image
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div
|
||||
id="collapseOne"
|
||||
class="collapse collapse"
|
||||
aria-labelledby="headingOne"
|
||||
data-parent="#accordionExample"
|
||||
>
|
||||
<div id="collapseOne" class="collapse collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
|
|
@ -539,25 +382,18 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<img
|
||||
*ngIf="deviceImg[0]"
|
||||
style="width: 50px"
|
||||
<img *ngIf="deviceImg[0]" style="width: 50px"
|
||||
[src]="'https://www.oneqlik.in' + deviceImg[0].substring(6)"
|
||||
(click)="openModal(template, deviceImg[0])"
|
||||
/>
|
||||
(click)="openModal(template, deviceImg[0])" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<input
|
||||
style="
|
||||
<input style="
|
||||
background: #ececec;
|
||||
width: 80%;
|
||||
margin-left: 5px;
|
||||
border: 1px solid #c1c1c1;
|
||||
"
|
||||
type="file"
|
||||
(change)="onDeviceImageChanged($event, 0)"
|
||||
/>
|
||||
" type="file" (change)="onDeviceImageChanged($event, 0)" />
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-4">
|
||||
|
|
@ -581,24 +417,17 @@
|
|||
<span>Device Image 2: </span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<img
|
||||
*ngIf="deviceImg[1]"
|
||||
style="width: 50px"
|
||||
<img *ngIf="deviceImg[1]" style="width: 50px"
|
||||
[src]="'https://www.oneqlik.in' + deviceImg[1].substring(6)"
|
||||
(click)="openModal(template, deviceImg[1])"
|
||||
/>
|
||||
(click)="openModal(template, deviceImg[1])" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input
|
||||
style="
|
||||
<input style="
|
||||
background: #ececec;
|
||||
width: 80%;
|
||||
margin-left: 5px;
|
||||
border: 1px solid #c1c1c1;
|
||||
"
|
||||
type="file"
|
||||
(change)="onDeviceImageChanged($event, 1)"
|
||||
/>
|
||||
" type="file" (change)="onDeviceImageChanged($event, 1)" />
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-4">
|
||||
|
|
@ -622,24 +451,17 @@
|
|||
<span>Device Image 3: </span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<img
|
||||
*ngIf="deviceImg[2]"
|
||||
style="width: 50px"
|
||||
<img *ngIf="deviceImg[2]" style="width: 50px"
|
||||
[src]="'https://www.oneqlik.in' + deviceImg[2].substring(6)"
|
||||
(click)="openModal(template, deviceImg[2])"
|
||||
/>
|
||||
(click)="openModal(template, deviceImg[2])" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input
|
||||
style="
|
||||
<input style="
|
||||
background: #ececec;
|
||||
width: 80%;
|
||||
margin-left: 5px;
|
||||
border: 1px solid #c1c1c1;
|
||||
"
|
||||
type="file"
|
||||
(change)="onDeviceImageChanged($event, 2)"
|
||||
/>
|
||||
" type="file" (change)="onDeviceImageChanged($event, 2)" />
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-4">
|
||||
|
|
@ -677,12 +499,7 @@
|
|||
<ng-template #template>
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title pull-left">{{ docName }}</h4>
|
||||
<button
|
||||
type="button"
|
||||
class="close pull-right"
|
||||
aria-label="Close"
|
||||
(click)="modalRef.hide()"
|
||||
>
|
||||
<button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -691,4 +508,4 @@
|
|||
<img style="width: -webkit-fill-available" src="{{ image }}" />
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
File diff suppressed because it is too large
Load diff
857
src/app/dashboard/add-new-device2/add-new-device.component.html
Normal file
857
src/app/dashboard/add-new-device2/add-new-device.component.html
Normal 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>
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
1579
src/app/dashboard/add-new-device2/add-new-device.component.ts
Normal file
1579
src/app/dashboard/add-new-device2/add-new-device.component.ts
Normal file
File diff suppressed because it is too large
Load diff
325
src/app/dashboard/add-new-device2/index.html
Normal file
325
src/app/dashboard/add-new-device2/index.html
Normal 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>
|
||||
-->
|
||||
|
|
@ -1,61 +1,155 @@
|
|||
<app-all-menus></app-all-menus>
|
||||
|
||||
<div class="limiter">
|
||||
<app-all-menus></app-all-menus>
|
||||
<div id="toast">
|
||||
<div id="desc">{{data_descip}}</div>
|
||||
</div>
|
||||
<div class="container-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 id="desc">{{ data_descip }}</div>
|
||||
</div>
|
||||
<div class="container-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="col-12">
|
||||
<md-select [(ngModel)]="limit" ngDefaultControl (change)="callDataTable()" style="float: right;background: #efecec;margin-right: 5px;">
|
||||
<md-option *ngFor="let page of pageLengthArr; let i = index" [value]="page">
|
||||
{{page}}
|
||||
</md-option>
|
||||
</md-select>
|
||||
<h4 style="display: inline-block;">{{'Vehicles' | translate}}</h4>
|
||||
<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>
|
||||
<md-select attr-line="21" [(ngModel)]="limit" ngDefaultControl (change)="callDataTable()"
|
||||
style="float: right; background: #efecec; margin: 0px 0px;padding: 0px 0px;">
|
||||
<md-option *ngFor="let page of pageLengthArr; let i = index" [value]="page">
|
||||
{{ page }}
|
||||
</md-option>
|
||||
</md-select>
|
||||
<!-- (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> -->
|
||||
<!-- (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> -->
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<md-select [(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>
|
||||
<button attr-line="58" class="btn float-left btn-sm rounded mr-2" title="Export to Excel" *ngIf="
|
||||
bussinessType == '0' ||
|
||||
bussinessType == undefined ||
|
||||
bussinessType == '1'
|
||||
">
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<button attr-line="58" class="btn float-left btn-sm rounded mr-2" title="Bulk Renew Devices"
|
||||
*ngIf="(db_temp_token.isOrganisation || false) == true">
|
||||
<i class="fa-solid fa-upload" (click)="click_call('#db_fileup_127')"></i>
|
||||
</button>
|
||||
|
||||
|
||||
<a id="db_sample_download" href="/assets/download/download.xlsx" download target="_blank"
|
||||
class="btn float-left btn-sm rounded mr-2" *ngIf="(db_temp_token.isOrganisation || false) == true">
|
||||
|
||||
<i class="fas fa-download "></i>
|
||||
</a>
|
||||
|
||||
|
||||
<input attr-line="102" type="file" id="db_fileup_127" (change)="db_fileUp($event)" class="d-none" />
|
||||
|
||||
<md-select attr-line="104" [(ngModel)]="devStatus" multiple style="
|
||||
padding-top: 0;
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
width: 150px;
|
||||
background: #efecec;
|
||||
" placeholder="--{{ 'Status' | translate }}--" ngDefaultControl
|
||||
(change)="selectedStatus($event, devStatus.name)">
|
||||
<md-option *ngFor="let devStatus of statusArray; let i = index" style="padding-left: 20px"
|
||||
[value]="devStatus.name">
|
||||
{{ devStatus.name }}
|
||||
</md-option>
|
||||
</md-select>
|
||||
</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 class="col-sm-12 col-md-6 col-lg-10">
|
||||
<div attr-line="119" class="row" style="
|
||||
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">
|
||||
<form>
|
||||
<div class="inner-form">
|
||||
<div class="input-field first-wrap">
|
||||
<div class="icon-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="icon-wrap">
|
||||
<i class="fas fa-search" width="24" height="24" viewBox="0 0 24 24"></i>
|
||||
</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 class="input-field second-wrap">
|
||||
<div class="icon-wrap">
|
||||
<i class="far fa-calendar-alt" width="24" height="24" viewBox="0 0 24 24"></i>
|
||||
</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 class="input-field third-wrap">
|
||||
<div class="icon-wrap">
|
||||
<i class="far fa-calendar-alt" width="24" height="24" viewBox="0 0 24 24"></i>
|
||||
</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 class="input-field ">
|
||||
<div class="icon-wrap">
|
||||
|
|
@ -66,67 +160,204 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-2" 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]="firstcall" (click)="next()" style="width: 100px;float: left;color:white;margin-right: 10px;line-height: 2.6;background: #035096;">{{'Next' | translate}} >></button>
|
||||
<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]="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 class="table100 ver1">
|
||||
<div class="wrap-table100-nextcols js-pscroll" style="height: 77vh;overflow-y: hidden;">
|
||||
<div class="table100-nextcols">
|
||||
<table id="deviceTable1" class="display order-column" cellspacing="0" style="font-size:15px;text-align: center;" >
|
||||
<thead style="background:#add8e6">
|
||||
<div class="table100 ver1">
|
||||
<!-- style="height: 77vh; overflow-y: hidden" -->
|
||||
<div class="wrap-table100-nextcols js-pscroll">
|
||||
<div class="table100-nextcols">
|
||||
<table id="deviceTable1" class="display order-column" cellspacing="0"
|
||||
style="font-size: 15px; text-align: center">
|
||||
<thead style="background: #add8e6">
|
||||
<tr>
|
||||
<th style="width: 150px;text-align: left"></th>
|
||||
<th style="width: 150px;text-align: left">{{'Reg. Number' | translate}}</th>
|
||||
<th style="width: 150px;text-align: left">{{'Group' | translate}}</th>
|
||||
<th style="width: 150px;text-align: left">{{'IMEI' | translate}}</th>
|
||||
<th style="width: 150px;text-align: left">{{'Int. ID' | translate}}</th>
|
||||
<th style="width: 150px;text-align: left">{{'SIM 1' | translate}}</th>
|
||||
<th style="width: 150px;text-align: left">{{'SIM Provider' | translate}}</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 style="width: 150px;text-align: left">{{'Device Model' | translate}}</th>
|
||||
<th style="width: 150px;text-align: left">{{'Vehicle Type' | translate}}</th>
|
||||
<th style="width: 300px;text-align: left">{{'Status' | translate}}</th>
|
||||
<th style="width: 200px;text-align: left">{{'User' | translate}}</th>
|
||||
<th style="width: 200px;text-align: left">{{'Owner' | translate}}</th>
|
||||
<th style="width: 200px;text-align: left">{{'Dealer' | translate}}</th>
|
||||
<th style="width: 200px;text-align: left">{{'Created On' | translate}}</th>
|
||||
<th style="width: 200px;text-align: left">{{'Exp. Date' | translate}}</th>
|
||||
<th style="width: 200px;text-align: left">{{'Renew at' | translate}}</th>
|
||||
<th style="width: 200px;text-align: left">{{'Renew by' | translate}}</th>
|
||||
<th style="width: 150px;text-align: left">{{"Driver's Name" | translate}}</th>
|
||||
<th style="width: 150px;text-align: left">{{"Driver's Contact" | translate}}</th>
|
||||
<th style="width: 150px;text-align: left">{{"Sells Person" | translate}}</th>
|
||||
<th style="width: 150px;text-align: left">{{"Installer" | translate}}</th>
|
||||
<th style="width: 100px;text-align: center">Last Ping</th>
|
||||
<th style="width: 150px;text-align: center">{{'Device Setting' | translate}}</th>
|
||||
<th style="width: 100px;text-align: center">{{'Share Device' | translate}}</th>
|
||||
<th style="width: 100px;text-align: center">{{'Share User' | translate}}</th>
|
||||
<th data-attr="1" style="width: 150px; text-align: left"></th>
|
||||
<th data-attr="2" style="width: 150px; text-align: left">
|
||||
{{ "Device Name" | translate }}
|
||||
</th>
|
||||
<th data-attr="3" style="width: 150px; text-align: left">
|
||||
{{ "Group" | translate }}
|
||||
</th>
|
||||
|
||||
<th data-attr="4" style="width: 150px; text-align: left">
|
||||
{{ "IMEI" | translate }}
|
||||
</th>
|
||||
<th data-attr="5" style="width: 180px; text-align: center">
|
||||
{{ "Documents" | translate }}
|
||||
</th>
|
||||
<th data-attr="6" style="text-align: center">
|
||||
{{ "Cert. Download" | translate }}
|
||||
</th>
|
||||
<th data-attr="7" style="width: 150px; text-align: left">
|
||||
{{ "Int. ID" | translate }}
|
||||
</th>
|
||||
<th data-attr="8" style="width: 150px; text-align: left">
|
||||
{{ "SIM 1" | translate }}
|
||||
</th>
|
||||
<th data-attr="9" style="width: 150px; text-align: left">
|
||||
{{ "SIM Provider" | 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')" -->
|
||||
<th style="text-align: center;">{{'Renewal History' | translate}}</th>
|
||||
<th style="text-align: center;">{{'Edit' | translate}}</th>
|
||||
<th style="text-align: center;">{{'Delete' | translate}}</th>
|
||||
<th style="text-align: center;">{{'E Chalan' | translate}}</th>
|
||||
<th style="text-align: center;">{{'Documents' | translate}}</th>
|
||||
<th style="text-align: center;">{{'Cert. Download' | translate}}</th>
|
||||
<th style="text-align: center;">{{'Remark' | translate}}</th>
|
||||
<th style="text-align: center;">{{'KYC Status' | translate}}</th>
|
||||
<th data-attr="31" style="text-align: center">
|
||||
{{ "Renewal History" | translate }}
|
||||
</th>
|
||||
<th data-attr="32" style="text-align: center">{{ "Edit" | translate }}</th>
|
||||
<th data-attr="33" style="text-align: center">{{ "Delete" | translate }}</th>
|
||||
<th data-attr="34" style="text-align: center">
|
||||
{{ "E Chalan" | translate }}
|
||||
</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>
|
||||
</thead>
|
||||
</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>
|
||||
|
||||
<!-- <div class="col-3">
|
||||
<!-- 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-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()"
|
||||
*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>
|
||||
|
|
|
|||
|
|
@ -974,11 +974,11 @@
|
|||
|
||||
/*//////////////////////////////////////////////////////////////////
|
||||
[ RESTYLE TAG ]*/
|
||||
* {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
// * {
|
||||
// margin: 0px;
|
||||
// padding: 0px;
|
||||
// box-sizing: border-box;
|
||||
// }
|
||||
|
||||
body,
|
||||
html {
|
||||
|
|
@ -1003,6 +1003,33 @@ a:hover {
|
|||
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,
|
||||
h2,
|
||||
|
|
@ -1027,7 +1054,7 @@ li {
|
|||
input {
|
||||
display: block;
|
||||
outline: none;
|
||||
border: none !important;
|
||||
// border: none !important;
|
||||
}
|
||||
|
||||
textarea {
|
||||
|
|
@ -1117,7 +1144,7 @@ iframe {
|
|||
max-height: 100vh;
|
||||
// max-width: 1366px;
|
||||
margin: 0 auto;
|
||||
min-height: 100vh;
|
||||
min-height: calc(100vh - 214%);
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -moz-box;
|
||||
|
|
@ -1125,7 +1152,7 @@ iframe {
|
|||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
// justify-content: center;
|
||||
// padding: 33px 100px;
|
||||
padding: 55px 20px 0px 20px;
|
||||
}
|
||||
|
|
@ -3185,3 +3212,7 @@ mat-input-infix {
|
|||
margin-top: -13px !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
|
|
@ -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">
|
||||
<table id="testPdf" style="font-weight: 600">
|
||||
<tr>
|
||||
<td>
|
||||
<div *ngIf="org.imageDoc">
|
||||
<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>
|
||||
<div id="testPdf" class="src_app_dashboard_download-certificate_download-certificate.component.html">
|
||||
<div class="row">
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3" style="text-align: center">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="200">
|
||||
TAC Reg.No <br />
|
||||
CoP No. <br />
|
||||
CoP Validity upto <br />
|
||||
Fitment Date <br />
|
||||
Fitment Renewal Date <br />
|
||||
</td>
|
||||
<td colspan="2">
|
||||
: CK8077 <br />
|
||||
: CC0GR8739<br />
|
||||
: 30 September 2023 <br />
|
||||
: {{ kycApprovalDate ? (kycApprovalDate | date: "dd/MM/yyyy") : ""
|
||||
}}<br />
|
||||
: {{ esim_validity ? esim_validity : "" }}<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>
|
||||
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>
|
||||
<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 style="padding-top: 5px">
|
||||
<td>
|
||||
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<img
|
||||
src="{{ deviceImage[0] ? deviceImage[0] : img1 }}"
|
||||
width="80px"
|
||||
height="80px"
|
||||
/>
|
||||
<img
|
||||
src="{{ deviceImage[1] ? deviceImage[1] : img1 }}"
|
||||
width="80px"
|
||||
height="80px"
|
||||
/>
|
||||
<img
|
||||
src="{{ deviceImage[2] ? deviceImage[2] : img1 }}"
|
||||
width="80px"
|
||||
height="80px"
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<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
|
||||
</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>{{ 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;">
|
||||
|
||||
|
||||
<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>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>
|
||||
</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 : {{ user.first_name ? user.first_name : "" }}
|
||||
{{ user.last_name ? user.last_name : "" }}<br />
|
||||
Contact/Login ID : {{ user.phone ? user.phone : "" }}
|
||||
</td>
|
||||
<td colspan="1">
|
||||
Customer Address: {{ user.address ? user.address : "" }}<br />
|
||||
Customer Sign :
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</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>
|
||||
</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)="exportAsPdf()" cdkFocusInitial>Export PDF</button>
|
||||
<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 <br />
|
||||
CoP No. <br />
|
||||
CoP Validity upto <br />
|
||||
Fitment Date <br />
|
||||
Fitment Renewal Date <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>
|
||||
|
|
@ -2,3 +2,44 @@
|
|||
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%;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,27 @@
|
|||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { MdDialogRef, MD_DIALOG_DATA } from '@angular/material';
|
||||
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;
|
||||
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 QRious: any;
|
||||
@Component({
|
||||
selector: 'app-download-certificate',
|
||||
templateUrl: './download-certificate.component.html',
|
||||
styleUrls: ['./download-certificate.component.scss']
|
||||
selector: "app-download-certificate",
|
||||
templateUrl: "./download-certificate.component.html",
|
||||
styleUrls: ["./download-certificate.component.scss"],
|
||||
})
|
||||
export class DownloadCertificateComponent implements OnInit {
|
||||
devName: any;
|
||||
img1 = '/assets/images/liveTrackIcons/noImageAvailableIcon.jpg'
|
||||
stamp = '/assets/images/liveTrackIcons/Stamp.png'
|
||||
img1 = "/assets/images/liveTrackIcons/noImageAvailableIcon.jpg";
|
||||
stamp = "/assets/images/liveTrackIcons/Stamp.png";
|
||||
phNum: any;
|
||||
createdOn: any;
|
||||
expOn: any;
|
||||
supAdmin
|
||||
supAdmin;
|
||||
DealerObj = [];
|
||||
userObj = [];
|
||||
// iconType:any;
|
||||
|
|
@ -60,7 +63,7 @@ export class DownloadCertificateComponent implements OnInit {
|
|||
companyName: any;
|
||||
companyAddress: any;
|
||||
transportOfficeCity: any;
|
||||
transportOfficeState: { data: string; };
|
||||
transportOfficeState: { data: string };
|
||||
ChassisNo: any;
|
||||
deviceManufacturer: any;
|
||||
invoiceNum: any;
|
||||
|
|
@ -72,119 +75,170 @@ export class DownloadCertificateComponent implements OnInit {
|
|||
superAdmin: any;
|
||||
isDealer: any;
|
||||
dealerId: any;
|
||||
lastPingOn: any
|
||||
lastDeviceTime: any
|
||||
lastPingOn: any;
|
||||
lastDeviceTime: any;
|
||||
deviceImage = [];
|
||||
dealerName
|
||||
dealerName;
|
||||
installationDate;
|
||||
ICCICD
|
||||
simNum1
|
||||
model
|
||||
ICCICD;
|
||||
simNum1;
|
||||
model;
|
||||
user: any;
|
||||
org
|
||||
org;
|
||||
link: string;
|
||||
kycApprovalDate
|
||||
kycApprovalDate;
|
||||
esim_validity;
|
||||
fitmentCertificateNo
|
||||
fitmentCertificateNo;
|
||||
vahanID: any;
|
||||
myImage: HTMLImageElement;
|
||||
myImage1: HTMLImageElement;
|
||||
myImage2: HTMLImageElement;
|
||||
stamp1: HTMLImageElement;
|
||||
img: HTMLImageElement;
|
||||
gnnsModule
|
||||
gsmModule
|
||||
constructor(public dialogRef: MdDialogRef<DownloadCertificateComponent>, private contactService: ContactService,
|
||||
@Inject(MD_DIALOG_DATA) public data: any) {
|
||||
console.log(data);
|
||||
|
||||
gnnsModule;
|
||||
gsmModule;
|
||||
constructor(
|
||||
public dialogRef: MdDialogRef<DownloadCertificateComponent>,
|
||||
private contactService: ContactService,
|
||||
@Inject(MD_DIALOG_DATA) public data: any
|
||||
) {
|
||||
console.log("102=>", data);
|
||||
}
|
||||
|
||||
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.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 {
|
||||
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.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.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.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.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.orignalEmail = 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) {
|
||||
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;
|
||||
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);
|
||||
this.installationDate = this.data.deviceInfo.created_on
|
||||
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.user = this.data.deviceInfo.user;
|
||||
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.dealerId = this.data.deviceInfo.Dealer ? this.data.deviceInfo.Dealer._id : "";
|
||||
console.log('this.dealerId', this.dealerId);
|
||||
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 : "";
|
||||
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'
|
||||
this.gsmModule = "Telit GE910";
|
||||
} else if (this.devicetype == "Nippon-NVT-1820") {
|
||||
this.gnnsModule = "Telit, Jupiter SL869T3-| Nav|C/IRNSS";
|
||||
this.gsmModule = 'Telit GE910'
|
||||
this.gsmModule = "Telit GE910";
|
||||
} else {
|
||||
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++) {
|
||||
console.log("DEVUCE IMAGE=>", this.deviceImage[i]);
|
||||
|
||||
this.deviceImage[i] = this.deviceImage[i] && this.deviceImage[i] != "" ? 'http://nipponsecura.in' + this.deviceImage[i].substring(6) : ''
|
||||
|
||||
|
||||
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.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.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";
|
||||
|
|
@ -202,14 +256,12 @@ export class DownloadCertificateComponent implements OnInit {
|
|||
this.stamp1.crossOrigin = "anonymous";
|
||||
|
||||
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";
|
||||
// one()
|
||||
// function one(){
|
||||
// stamp.onload = function(){
|
||||
|
||||
|
||||
|
||||
// two()
|
||||
// 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.save(name);
|
||||
|
||||
|
||||
// };
|
||||
// }
|
||||
|
||||
|
|
@ -275,14 +326,13 @@ export class DownloadCertificateComponent implements OnInit {
|
|||
};
|
||||
// var isLoaded = this.myImage.complete && this.myImage.naturalHeight !== 0;
|
||||
// if(isLoaded)
|
||||
resolve('');
|
||||
resolve("");
|
||||
});
|
||||
}
|
||||
|
||||
function f3() {
|
||||
that.myImage2.onload = function () {
|
||||
console.log("3");
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -297,16 +347,13 @@ export class DownloadCertificateComponent implements OnInit {
|
|||
};
|
||||
// var isLoaded = this.myImage1.complete && this.myImage1.naturalHeight !== 0;
|
||||
// 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() {
|
||||
this.dialogRef.close(1);
|
||||
|
|
@ -316,49 +363,50 @@ export class DownloadCertificateComponent implements OnInit {
|
|||
id: this.data.deviceInfo._id,
|
||||
imei: this.data.deviceInfo.Device_ID,
|
||||
sh: this.data.deviceInfo.user._id,
|
||||
ttl: 15 * 60
|
||||
ttl: 15 * 60,
|
||||
};
|
||||
|
||||
this.contactService.shareLiveLocation(data).subscribe(res => {
|
||||
console.log(res);
|
||||
console.log('shareToken', res);
|
||||
this.link = 'http://nipponsecura.in' + "/share/liveShare?t=" + res.t;
|
||||
console.log(this.link);
|
||||
// this.shareLocationToDevice(link);
|
||||
this.qrCodeGenerator()
|
||||
}, err => {
|
||||
console.log(err);
|
||||
})
|
||||
this.contactService.shareLiveLocation(data).subscribe(
|
||||
(res) => {
|
||||
console.log(res);
|
||||
console.log("shareToken", res);
|
||||
this.link = "http://nipponsecura.in" + "/share/liveShare?t=" + res.t;
|
||||
console.log(this.link);
|
||||
// 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',
|
||||
level: "L",
|
||||
padding: 25,
|
||||
size: 500,
|
||||
value: this.link
|
||||
value: this.link,
|
||||
});
|
||||
|
||||
|
||||
this.imgURL = qr.toDataURL();
|
||||
|
||||
|
||||
|
||||
}
|
||||
exportAsPdf() {
|
||||
var that = this
|
||||
var name = "Installation Certificate " + this.devName ? this.devName : "Test" + ".pdf"
|
||||
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) {
|
||||
"#editor": function (element: any, renderer: any) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
};
|
||||
var stamp = new Image();
|
||||
stamp.src = that.stamp;
|
||||
|
|
@ -366,68 +414,72 @@ export class DownloadCertificateComponent implements OnInit {
|
|||
// stamp.onload = function(){
|
||||
console.log("0");
|
||||
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();
|
||||
img.src = this.org.imageDoc ? this.org.imageDoc : '';
|
||||
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', 15, 9, 50, 40)
|
||||
doc.addImage(that.img, "png", 75, 9, 50, 40);
|
||||
|
||||
// };
|
||||
// doc.text("Customer Copy", 110, 12);
|
||||
doc.setFontSize(3);
|
||||
doc.autoTable({
|
||||
theme: 'plain',
|
||||
html: '#testPdf',
|
||||
theme: "plain",
|
||||
html: "#testPdf",
|
||||
|
||||
tableWidth: 'auto',
|
||||
tableWidth: "auto",
|
||||
|
||||
// styles : {
|
||||
// cellWidth : 10,
|
||||
// overflow: "linebreak"
|
||||
// },
|
||||
willDrawCell: data => {
|
||||
styles: {
|
||||
cellWidth: 35,
|
||||
overflow: "linebreak",
|
||||
},
|
||||
willDrawCell: (data) => {
|
||||
if (data.row.index === 0) {
|
||||
data.row.height = 30;
|
||||
doc.setFontStyle('bold');
|
||||
data.row.cells[0].styles.halign = 'center';
|
||||
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.overflow = "linebreak";
|
||||
data.row.cells[0].styles.lineHeight = "1.5";
|
||||
// doc.setLineHeightFactor()
|
||||
|
||||
// }
|
||||
|
||||
// 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) {
|
||||
// data.row.cells[0].styles.halign = 'center';
|
||||
doc.halign = 'center';
|
||||
doc.setFontStyle('bold');
|
||||
doc.cellPadding = 50
|
||||
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';
|
||||
|
||||
doc.halign = "center";
|
||||
}
|
||||
if (data.row.index === 6) {
|
||||
// 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)) {
|
||||
doc.setFontStyle('bold');
|
||||
|
||||
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;
|
||||
|
|
@ -442,12 +494,9 @@ export class DownloadCertificateComponent implements OnInit {
|
|||
}
|
||||
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";
|
||||
|
|
@ -470,26 +519,25 @@ export class DownloadCertificateComponent implements OnInit {
|
|||
function f1() {
|
||||
return new Promise((resolve, reject) => {
|
||||
console.log("1");
|
||||
doc.addImage(that.myImage, 'png', 40, 170, 30, 20);
|
||||
resolve('');
|
||||
})
|
||||
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('');
|
||||
})
|
||||
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.addImage(that.myImage2, "png", 120, 170, 30, 20);
|
||||
doc.save(name);
|
||||
|
||||
}
|
||||
// function f1() {
|
||||
// return new Promise((resolve, reject) => {
|
||||
|
|
@ -497,7 +545,6 @@ export class DownloadCertificateComponent implements OnInit {
|
|||
// console.log("1");
|
||||
// doc.addImage(myImage , 'png', 40, 170, 30, 20);
|
||||
|
||||
|
||||
// };
|
||||
// var isLoaded = myImage.complete && myImage.naturalHeight !== 0;
|
||||
// if(isLoaded)
|
||||
|
|
@ -512,7 +559,6 @@ export class DownloadCertificateComponent implements OnInit {
|
|||
// doc.addImage(myImage2 , 'png', 120, 170, 30, 20);
|
||||
// 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) {
|
||||
|
|
@ -543,12 +588,63 @@ export class DownloadCertificateComponent implements OnInit {
|
|||
var reader = new FileReader();
|
||||
reader.onloadend = function () {
|
||||
callback(reader.result);
|
||||
}
|
||||
};
|
||||
reader.readAsDataURL(xhr.response);
|
||||
};
|
||||
xhr.open('GET', url);
|
||||
xhr.responseType = 'blob';
|
||||
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
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 <br />
|
||||
CoP No. <br />
|
||||
CoP Validity upto <br />
|
||||
Fitment Date <br />
|
||||
Fitment Renewal Date <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>
|
||||
|
|
@ -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%;
|
||||
}
|
||||
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
|
|
@ -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
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4>
|
||||
Update Device
|
||||
Update Device
|
||||
<button type="button" class="close pull-right" (click)="back()">
|
||||
<i class="fas fa-arrow-circle-left"></i>
|
||||
</button>
|
||||
|
|
@ -19,20 +19,11 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputPassword4">Contact No.</label> <span>*</span>
|
||||
<input
|
||||
(input)="onSearchChange($event.target.value)"
|
||||
formControlName="contactNo"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="inputPassword4"
|
||||
placeholder="Enter Contact number"
|
||||
[ngClass]="{ 'is-invalid': submitted && f.contactNo.errors }"
|
||||
/>
|
||||
<input (input)="onSearchChange($event.target.value)" formControlName="contactNo" type="text"
|
||||
class="form-control" id="inputPassword4" placeholder="Enter Contact number"
|
||||
[ngClass]="{ 'is-invalid': submitted && f.contactNo.errors }" />
|
||||
<small *ngIf="message">{{ message }}</small>
|
||||
<div
|
||||
*ngIf="submitted && f.contactNo.errors"
|
||||
class="invalid-feedback"
|
||||
>
|
||||
<div *ngIf="submitted && f.contactNo.errors" class="invalid-feedback">
|
||||
<div *ngIf="f.contactNo.errors.required">
|
||||
Contact Number is required
|
||||
</div>
|
||||
|
|
@ -43,18 +34,9 @@
|
|||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputEmail4">Owner Name</label> <span>*</span>
|
||||
<input
|
||||
formControlName="ownerName"
|
||||
type="text"
|
||||
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"
|
||||
>
|
||||
<input formControlName="ownerName" type="text" 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">
|
||||
Owner Name is required
|
||||
</div>
|
||||
|
|
@ -66,13 +48,8 @@
|
|||
<div class="form-group col-md-4">
|
||||
<label for="inputCity">Email</label>
|
||||
<!-- <span>*</span> -->
|
||||
<input
|
||||
formControlName="email"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="inputCity"
|
||||
placeholder="Please Enter Email"
|
||||
/>
|
||||
<input formControlName="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> -->
|
||||
|
|
@ -80,18 +57,11 @@
|
|||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputCity">Dealer Followup Mobile ff</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"
|
||||
>
|
||||
<label for="inputCity">Dealer Followup Mobile ff</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>
|
||||
|
|
@ -100,26 +70,16 @@
|
|||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputCity">Address</label> <span>*</span>
|
||||
<input
|
||||
formControlName="address"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="inputCity"
|
||||
[ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }"
|
||||
/>
|
||||
<input formControlName="address" 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="f.address.errors.required">Address is required</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="pin">Pin Code</label> <span>*</span>
|
||||
<input
|
||||
formControlName="pin"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="pin"
|
||||
[ngClass]="{ 'is-invalid': submitted && f.dealerFollowup.errors }"
|
||||
/>
|
||||
<input formControlName="pin" 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="f.pin.errors.required">Pin Code is required</div>
|
||||
<div *ngIf="f.pin.errors.pattern">
|
||||
|
|
@ -131,46 +91,44 @@
|
|||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputState">State</label>
|
||||
<select
|
||||
formControlName="state"
|
||||
(change)="onStateChange($event)"
|
||||
id="inputState"
|
||||
class="form-control"
|
||||
>
|
||||
<label for="inputState">State</label> <span>*</span>
|
||||
<select formControlName="state" (change)="onStateChange($event)" id="inputState" class="form-control">
|
||||
<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="invalid-feedback">
|
||||
<div *ngIf="f.state.errors.required">State is required</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputCity">City</label>
|
||||
<select
|
||||
formControlName="city"
|
||||
(change)="onCityChange($event)"
|
||||
id="inputState"
|
||||
class="form-control"
|
||||
>
|
||||
<label for="inputCity">City</label> <span>*</span>
|
||||
<select formControlName="city" (change)="onCityChange($event)" id="inputState" class="form-control">
|
||||
<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="invalid-feedback">
|
||||
<div *ngIf="f.city.errors.required">City is required</div>
|
||||
</div>
|
||||
<!-- <input formControlName="city" type="text" class="form-control" id="inputCity"> -->
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputZip">RTO Office</label>
|
||||
<select
|
||||
formControlName="rtoOffice"
|
||||
id="inputState"
|
||||
class="form-control"
|
||||
>
|
||||
<label for="inputZip">RTO Office</label> <span>*</span>
|
||||
<select formControlName="rtoOffice" id="inputState" class="form-control">
|
||||
<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="invalid-feedback">
|
||||
<div *ngIf="f.rtoOffice.errors.required">
|
||||
RTO Office is required
|
||||
</div>
|
||||
</div>
|
||||
<!-- <input formControlName="rtoOffice" type="text" class="form-control" id="inputZip"> -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -178,6 +136,17 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<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
|
||||
formControlName="device_id"
|
||||
type="text"
|
||||
|
|
@ -192,7 +161,7 @@
|
|||
<div *ngIf="f.device_id.errors.required">
|
||||
Device Id is required
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- <div *ngIf="inventoryManagement" class="form-group col-md-4">
|
||||
|
||||
|
|
@ -209,18 +178,9 @@
|
|||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputPassword4">Vehicle No.</label><span>*</span>
|
||||
<input
|
||||
formControlName="vehicleNo"
|
||||
type="text"
|
||||
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"
|
||||
>
|
||||
<input formControlName="vehicleNo" type="text" 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">
|
||||
Vehicle number is required
|
||||
</div>
|
||||
|
|
@ -245,25 +205,19 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="iccid">ICCID</label>
|
||||
<input
|
||||
formControlName="iccid"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="iccid"
|
||||
placeholder="Enter ICCID No number"
|
||||
/>
|
||||
<input formControlName="iccid" type="text" class="form-control" id="iccid"
|
||||
placeholder="Enter ICCID No number" />
|
||||
</div>
|
||||
<div class="form-group col-md-4 d-none">
|
||||
<label for="vahanID">vahanID</label>
|
||||
<input formControlName="vahanID" type="text" class="form-control" id="vahanID"
|
||||
placeholder="Enter vahanID No number" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="sim1">SIM 1</label> <span>*</span>
|
||||
<input
|
||||
formControlName="sim1"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="sim1"
|
||||
placeholder="Enter SIM number"
|
||||
[ngClass]="{ 'is-invalid': submitted && f.sim1.errors }"
|
||||
/>
|
||||
<input formControlName="sim1" 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="f.sim1.errors.required">SIM 1 is required</div>
|
||||
</div>
|
||||
|
|
@ -272,13 +226,7 @@
|
|||
<div class="form-group col-md-4">
|
||||
<label for="inputEmail4">SIM 2</label>
|
||||
<div>
|
||||
<input
|
||||
formControlName="sim2"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="sim1"
|
||||
placeholder="Enter SIM number"
|
||||
/>
|
||||
<input formControlName="sim2" type="text" class="form-control" id="sim1" placeholder="Enter SIM number" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -286,18 +234,9 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputEmail4">Chassis No.</label><span>*</span>
|
||||
<input
|
||||
formControlName="chasisNo"
|
||||
type="text"
|
||||
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"
|
||||
>
|
||||
<input formControlName="chasisNo" type="text" 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">
|
||||
Chassis No is required
|
||||
</div>
|
||||
|
|
@ -305,18 +244,9 @@
|
|||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputPassword4">Engine No.</label><span>*</span>
|
||||
<input
|
||||
formControlName="engineNo"
|
||||
type="text"
|
||||
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"
|
||||
>
|
||||
<input formControlName="engineNo" type="text" 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">
|
||||
Engine No is required
|
||||
</div>
|
||||
|
|
@ -344,11 +274,7 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputCity">Vehicle Manufacture</label>
|
||||
<select
|
||||
class="form-control"
|
||||
formControlName="vehicleManufacture"
|
||||
(change)="selectModel($event)"
|
||||
>
|
||||
<select class="form-control" formControlName="vehicleManufacture" (change)="selectModel($event)">
|
||||
<option value="" selected disabled>Choose Manufacturer</option>
|
||||
<option *ngFor="let item of manufacturingData" [value]="item">
|
||||
{{ item }}
|
||||
|
|
@ -389,10 +315,7 @@
|
|||
<label for="inputState">Device Model</label><span>*</span>
|
||||
<div>
|
||||
<select formControlName="deviceModel" class="form-control">
|
||||
<option
|
||||
*ngFor="let option_1 of device_Model"
|
||||
[value]="option_1._id"
|
||||
>
|
||||
<option *ngFor="let option_1 of device_Model" [value]="option_1._id">
|
||||
{{ option_1.modelName }}
|
||||
</option>
|
||||
</select>
|
||||
|
|
@ -401,26 +324,14 @@
|
|||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputZip">Tracking Expiry</label>
|
||||
<input
|
||||
formControlName="trackingExp"
|
||||
bsDatepicker
|
||||
[bsConfig]="bsConfig"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="inputZip"
|
||||
/>
|
||||
<input formControlName="trackingExp" bsDatepicker [bsConfig]="bsConfig" type="text" class="form-control"
|
||||
id="inputZip" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputZip">E sim Expiry</label>
|
||||
<input
|
||||
formControlName="eSimExpiry"
|
||||
bsDatepicker
|
||||
[bsConfig]="bsConfig"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="inputZip"
|
||||
/>
|
||||
<input formControlName="eSimExpiry" bsDatepicker [bsConfig]="bsConfig" type="text" class="form-control"
|
||||
id="inputZip" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -430,10 +341,7 @@
|
|||
<h6><b>Remark : </b>{{ deviceData.remark }}</h6>
|
||||
</div>
|
||||
<hr />
|
||||
<div
|
||||
style="overflow: auto; overflow-x: hidden; min-height: 200px"
|
||||
[ngClass]="{ rowHeight: docRow }"
|
||||
>
|
||||
<div 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="col-sm-6" style="padding-top: 8px">
|
||||
<div class="row">
|
||||
|
|
@ -441,31 +349,28 @@
|
|||
<span>{{ data.doctype }} : </span>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input
|
||||
type="text"
|
||||
[(ngModel)]="data.phone"
|
||||
placeholder="{{ 'Doc number' | translate }}"
|
||||
/>
|
||||
<input type="text" [(ngModel)]="data.phone" placeholder="{{ 'Doc number' | translate }}" />
|
||||
</div>
|
||||
<div>
|
||||
<img
|
||||
*ngIf="data.image"
|
||||
style="width: 50px"
|
||||
[src]="'https://www.oneqlik.in' + data.image.substring(6)"
|
||||
(click)="openModal(template, data)"
|
||||
/>
|
||||
|
||||
<div *ngIf="!data.image.toLowerCase().endsWith('.pdf')">
|
||||
<img *ngIf="data.image" style="width: 50px" [src]="'https://www.oneqlik.in' + data.image.substring(6)"
|
||||
(click)="openModal(template, data)" />
|
||||
</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 class="col-sm-6">
|
||||
<span
|
||||
><input
|
||||
type="file"
|
||||
class="btn btn btn-success"
|
||||
style="background: #f1f1f1; border: none; color: black"
|
||||
(change)="onFileChanged($event, i)"
|
||||
/></span>
|
||||
<span><input type="file" class="btn btn btn-success" style="background: #f1f1f1; border: none; color: black"
|
||||
(change)="onFileChanged($event, i)" /></span>
|
||||
<!-- <span>
|
||||
<button class="btn btn btn-success" (click)="onUpload(i)">
|
||||
{{ uploadStatus }}
|
||||
|
|
@ -476,56 +381,35 @@
|
|||
</div>
|
||||
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div
|
||||
class="card"
|
||||
style="margin-left: 61px; margin-top: 23px; margin-right: 151px"
|
||||
>
|
||||
<div class="card" style="margin-left: 61px; margin-top: 23px; margin-right: 151px">
|
||||
<div class="card-header" id="headingOne">
|
||||
<h2 class="mb-0">
|
||||
<button
|
||||
class="btn btn-link"
|
||||
type="button"
|
||||
data-toggle="collapse"
|
||||
data-target="#collapseOne"
|
||||
aria-expanded="true"
|
||||
aria-controls="collapseOne"
|
||||
>
|
||||
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapseOne"
|
||||
aria-expanded="true" aria-controls="collapseOne">
|
||||
Upload Device Image
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div
|
||||
id="collapseOne"
|
||||
class="collapse collapse"
|
||||
aria-labelledby="headingOne"
|
||||
data-parent="#accordionExample"
|
||||
>
|
||||
<div id="collapseOne" class="collapse collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<span>Device Image 1: </span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<img
|
||||
*ngIf="deviceImg[0]"
|
||||
style="width: 50px"
|
||||
<img *ngIf="deviceImg[0]" style="width: 50px"
|
||||
[src]="'https://www.oneqlik.in' + deviceImg[0].substring(6)"
|
||||
(click)="openModal(template, deviceImg[0])"
|
||||
/>
|
||||
(click)="openModal1(template, deviceImg[0])" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<input
|
||||
style="
|
||||
<input style="
|
||||
background: #ececec;
|
||||
width: 80%;
|
||||
margin-left: 5px;
|
||||
border: 1px solid #c1c1c1;
|
||||
"
|
||||
type="file"
|
||||
(change)="onDeviceImageChanged($event, 0)"
|
||||
/>
|
||||
" type="file" (change)="onDeviceImageChanged($event, 0)" />
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-4">
|
||||
|
|
@ -549,24 +433,17 @@
|
|||
<span>Device Image 2: </span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<img
|
||||
*ngIf="deviceImg[1]"
|
||||
style="width: 50px"
|
||||
<img *ngIf="deviceImg[1]" style="width: 50px"
|
||||
[src]="'https://www.oneqlik.in' + deviceImg[1].substring(6)"
|
||||
(click)="openModal(template, deviceImg[1])"
|
||||
/>
|
||||
(click)="openModal1(template, deviceImg[1])" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input
|
||||
style="
|
||||
<input style="
|
||||
background: #ececec;
|
||||
width: 80%;
|
||||
margin-left: 5px;
|
||||
border: 1px solid #c1c1c1;
|
||||
"
|
||||
type="file"
|
||||
(change)="onDeviceImageChanged($event, 1)"
|
||||
/>
|
||||
" type="file" (change)="onDeviceImageChanged($event, 1)" />
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-4">
|
||||
|
|
@ -590,24 +467,17 @@
|
|||
<span>Device Image 3: </span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<img
|
||||
*ngIf="deviceImg[2]"
|
||||
style="width: 50px"
|
||||
<img *ngIf="deviceImg[2]" style="width: 50px"
|
||||
[src]="'https://www.oneqlik.in' + deviceImg[2].substring(6)"
|
||||
(click)="openModal(template, deviceImg[2])"
|
||||
/>
|
||||
(click)="openModal1(template, deviceImg[2])" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input
|
||||
style="
|
||||
<input style="
|
||||
background: #ececec;
|
||||
width: 80%;
|
||||
margin-left: 5px;
|
||||
border: 1px solid #c1c1c1;
|
||||
"
|
||||
type="file"
|
||||
(change)="onDeviceImageChanged($event, 2)"
|
||||
/>
|
||||
" type="file" (change)="onDeviceImageChanged($event, 2)" />
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-4">
|
||||
|
|
@ -642,12 +512,7 @@
|
|||
<ng-template #template>
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title pull-left">{{ docName }}</h4>
|
||||
<button
|
||||
type="button"
|
||||
class="close pull-right"
|
||||
aria-label="Close"
|
||||
(click)="modalRef.hide()"
|
||||
>
|
||||
<button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -656,4 +521,4 @@
|
|||
<img style="width: -webkit-fill-available" src="{{ image }}" />
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,138 +1,144 @@
|
|||
<md-dialog-content class="md-typography">
|
||||
<table id="testPdf" style="font-weight: 600;">
|
||||
<tr>
|
||||
<td>
|
||||
<div *ngIf="supAdmin.imageDoc">
|
||||
<img src="{{supAdmin.imageDoc}}" width="100px" height="100px">
|
||||
</div>
|
||||
</td>
|
||||
<td style="text-align: center;font-weight: 700">
|
||||
<span *ngIf="supAdmin">
|
||||
|
||||
{{supAdmin.first_name?supAdmin.first_name:""}} {{supAdmin.last_name?supAdmin.last_name:""}}<br><br>
|
||||
{{supAdmin.address?supAdmin.address:""}}<br><br>
|
||||
CERTIFICATE OF INSTALLATION<br>
|
||||
</span>
|
||||
<span *ngIf="!supAdmin">
|
||||
{{devicetype}} GPS DEVICE<br>
|
||||
(AIS-140 COMPLIANT)<br>
|
||||
INSTALLATION/FITMENT CERTIFICATE<br>
|
||||
{{companyName}}<br>
|
||||
{{companyAddress}}
|
||||
<table id="testPdf" style="font-weight: 600" class="src_app_dashboard_view-certificate_view-certificate.component.html">
|
||||
<tr>
|
||||
<td>
|
||||
<div *ngIf="supAdmin.imageDoc">
|
||||
<img src="{{ supAdmin.imageDoc }}" width="100px" height="100px" />
|
||||
</div>
|
||||
</td>
|
||||
<td style="text-align: center; font-weight: 700">
|
||||
<span *ngIf="supAdmin">
|
||||
{{ supAdmin.first_name ? supAdmin.first_name : "" }}
|
||||
{{ supAdmin.last_name ? supAdmin.last_name : "" }}<br /><br />
|
||||
{{ supAdmin.address ? supAdmin.address : "" }}<br /><br />
|
||||
CERTIFICATE OF INSTALLATION<br />
|
||||
</span>
|
||||
</td>
|
||||
<td style="text-align:center">
|
||||
<div>
|
||||
<img src="{{imgURL}}" width="100px" height="150px">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<h6 style="font-size:18px;">Vehicle Details :-</h6>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Name of Owner : {{userName}}<br>
|
||||
Registration Number. : {{devName}}<br>
|
||||
Chassis no. : {{ChassisNo}}<br>
|
||||
Engine no. : {{engineNo}}<br>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Vehicle Make : {{manufacturingCompany}}<br>
|
||||
Vehicle Model : {{typeOfVehicle}}<br>
|
||||
</td>
|
||||
<!-- <td>
|
||||
<span *ngIf="!supAdmin">
|
||||
{{ devicetype }} GPS DEVICE<br />
|
||||
(AIS-140 COMPLIANT)<br />
|
||||
INSTALLATION/FITMENT CERTIFICATE<br />
|
||||
{{ companyName }}<br />
|
||||
{{ companyAddress }}
|
||||
</span>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<div>
|
||||
<img src="{{ imgURL }}" width="100px" height="150px" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<h6 style="font-size: 18px">Vehicle Details :-</h6>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Name of Owner : {{ userName }}<br />
|
||||
Registration Number. : {{ devName }}<br />
|
||||
Chassis no. : {{ ChassisNo }}<br />
|
||||
Engine no. : {{ engineNo }}<br />
|
||||
</td>
|
||||
<td>
|
||||
Vehicle Make : {{ manufacturingCompany }}<br />
|
||||
Vehicle Model : {{ typeOfVehicle }}<br />
|
||||
</td>
|
||||
<!-- <td>
|
||||
Registration Date : {{vehicleRegDate | date:'dd-MM-yyyy'}}<br>
|
||||
Date of Manufaturing year : {{vehicleManufacturingDate | date:'dd-MM-yyyy'}}
|
||||
</td> -->
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<h6 style="font-size:18px;margin: 20px 0 10px 0px;">GPS DEVICE DETAILS : - </h6>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<h6 style="font-size: 18px; margin: 20px 0 10px 0px">
|
||||
GPS DEVICE DETAILS : -
|
||||
</h6>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
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>
|
||||
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<h6 style="font-size:18px;margin: 20px 0 10px 0px;">INSTALLATION DETAILS : - </h6>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<h6 style="font-size: 18px; margin: 20px 0 10px 0px">
|
||||
INSTALLATION DETAILS : -
|
||||
</h6>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
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>
|
||||
<td colspan="2">
|
||||
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">
|
||||
<tr style="padding-top: 10px">
|
||||
<!-- <td colspan="3">
|
||||
<h6 style="font-size:18px;margin: 20px 0 10px 0px;">Fitment Images :- </h6>
|
||||
</td> -->
|
||||
<!-- {{deviceImage |json}} -->
|
||||
<td *ngIf="deviceImage.length && deviceImage[0]">
|
||||
<img src="{{deviceImage[0]}}" width="90px" height="90px">
|
||||
</td>
|
||||
<td *ngIf="deviceImage.length && deviceImage[1]">
|
||||
<img src="{{deviceImage[1]}}" width="90px" height="90px">
|
||||
</td>
|
||||
<td *ngIf="deviceImage.length && deviceImage[2]">
|
||||
<img src="{{deviceImage[2]}}" width="90px" height="90px">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
This installation certificate is valid till date {{data.deviceInfo.expiration_date?(data.deviceInfo.expiration_date | date:'dd-MM-yyyy') :""}}
|
||||
</tr>
|
||||
<tr style="padding-top: 10px;">
|
||||
<td colspan="2">
|
||||
Dealer Stamp
|
||||
</td>
|
||||
<td>
|
||||
Authorised Signature
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<h6 style="font-size:18px;margin: 20px 0 10px 0px;">PRODUCT SATISFACTION REPORT : - </h6>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align:center;margin-top: 10px">
|
||||
This is to Acknowledge and confirm that we have fitted our vehicle with above vehicle location tracking unit.
|
||||
We have checked the performance of the vehicle after fitment and we confirm VLTD is functioning as per norms
|
||||
listed out in AIS-140 standards and other guidelines of MoRTH and other government departments. We are also
|
||||
satisfied with the performance of the device in all respect. We undertake not to raise any dispute or 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>
|
||||
<!-- {{deviceImage |json}} -->
|
||||
<td *ngIf="deviceImage.length && deviceImage[0]">
|
||||
<img src="{{ deviceImage[0] }}" width="90px" height="90px" />
|
||||
</td>
|
||||
<td *ngIf="deviceImage.length && deviceImage[1]">
|
||||
<img src="{{ deviceImage[1] }}" width="90px" height="90px" />
|
||||
</td>
|
||||
<td *ngIf="deviceImage.length && deviceImage[2]">
|
||||
<img src="{{ deviceImage[2] }}" width="90px" height="90px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
This installation certificate is valid till date
|
||||
{{
|
||||
data.deviceInfo.expiration_date
|
||||
? (data.deviceInfo.expiration_date | date : "dd-MM-yyyy")
|
||||
: ""
|
||||
}}
|
||||
</tr>
|
||||
<tr style="padding-top: 10px">
|
||||
<td colspan="2">Dealer Stamp</td>
|
||||
<td>Authorised Signature</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<h6 style="font-size: 18px; margin: 20px 0 10px 0px">
|
||||
PRODUCT SATISFACTION REPORT : -
|
||||
</h6>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align: center; margin-top: 10px">
|
||||
This is to Acknowledge and confirm that we have fitted our vehicle with
|
||||
above vehicle location tracking unit. We have checked the performance of
|
||||
the vehicle after fitment and we confirm VLTD is functioning as per
|
||||
norms listed out in AIS-140 standards and other guidelines of MoRTH and
|
||||
other government departments. We are also satisfied with the performance
|
||||
of the device in all respect. We undertake not to raise any dispute or
|
||||
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-actions align="end">
|
||||
<button md-button md-dialog-close>Cancel</button>
|
||||
<button md-button (click)="exportAsPdf()" cdkFocusInitial>Export PDF</button>
|
||||
</md-dialog-actions>
|
||||
</md-dialog-actions>
|
||||
|
|
|
|||
|
|
@ -1,52 +1,84 @@
|
|||
import { environment } from './../environments/environment';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ContactService } from './contact.service';
|
||||
import * as io from 'socket.io-client';
|
||||
import { Params,Router, ActivatedRoute, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import{Http, Headers} from '@angular/http';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
import { environment } from "./../environments/environment";
|
||||
import { Injectable } from "@angular/core";
|
||||
import { ContactService } from "./contact.service";
|
||||
import * as io from "socket.io-client";
|
||||
import {
|
||||
Params,
|
||||
Router,
|
||||
ActivatedRoute,
|
||||
CanActivate,
|
||||
ActivatedRouteSnapshot,
|
||||
RouterStateSnapshot,
|
||||
} from "@angular/router";
|
||||
import { Http, Headers } from "@angular/http";
|
||||
import "rxjs/add/operator/map";
|
||||
|
||||
@Injectable()
|
||||
export class DatainjectionService {
|
||||
socketConnection= false;
|
||||
devicess:any;
|
||||
final:any=null;
|
||||
userID:any;
|
||||
fs:any;
|
||||
ls:any;
|
||||
or:any;
|
||||
emailid:any;
|
||||
useridd:any;
|
||||
custtype:any;
|
||||
cust:boolean = false;
|
||||
socketConnection = false;
|
||||
devicess: any;
|
||||
final: any = null;
|
||||
userID: any;
|
||||
fs: any;
|
||||
ls: any;
|
||||
or: any;
|
||||
emailid: any;
|
||||
useridd: any;
|
||||
custtype: any;
|
||||
cust: boolean = false;
|
||||
|
||||
dev_url = environment.hostUrl;
|
||||
|
||||
dev_url = environment.hostUrl;
|
||||
|
||||
//dev_url = 'http://localhost:3000';
|
||||
// socketUrl= environment.socket5000;
|
||||
|
||||
mb: any;
|
||||
socket_gps: any; socket_5000: any; socket_notifIO: any;
|
||||
getSocket_gps(){
|
||||
socket_gps: any;
|
||||
socket_5000: any;
|
||||
socket_notifIO: any;
|
||||
getSocket_gps() {
|
||||
debugger;
|
||||
return this.socket_gps;
|
||||
}
|
||||
getSocket_5000(){
|
||||
return this.socket_5000
|
||||
getSocket_5000() {
|
||||
return this.socket_5000;
|
||||
}
|
||||
getSocket_notifIO(){
|
||||
getSocket_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')
|
||||
this.getConnection();
|
||||
|
||||
|
||||
|
||||
// this.socket_gps = io.connect('https://socket.oneqlik.in' +'/gps', {
|
||||
// secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false
|
||||
// });
|
||||
|
||||
if (window.localStorage.currentuser) {
|
||||
this.useridd = window.localStorage.currentuser;
|
||||
debugger;
|
||||
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', {
|
||||
// secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false
|
||||
// });
|
||||
|
|
@ -54,10 +86,8 @@ export class DatainjectionService {
|
|||
// this.socket_notifIO = io.connect('https://socket.oneqlik.in'+'/notifIO', {
|
||||
// secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false
|
||||
// });
|
||||
|
||||
// https://server2.oneqlik.in/
|
||||
|
||||
|
||||
// https://server2.oneqlik.in/
|
||||
}
|
||||
closeConnection() {
|
||||
// this.socket_notifIO.removeAllListeners();
|
||||
|
|
@ -67,137 +97,239 @@ export class DatainjectionService {
|
|||
// this.socket_gps.disconnect();
|
||||
// this.socket_5000.disconnect();
|
||||
this.socketConnection = false;
|
||||
try {
|
||||
this.socket_notifIO.close();
|
||||
this.socket_gps.close();
|
||||
this.socket_5000.close();
|
||||
} catch (error) {
|
||||
console.log('Connection Close',error)
|
||||
}
|
||||
try {
|
||||
this.socket_notifIO.close();
|
||||
this.socket_gps.close();
|
||||
this.socket_5000.close();
|
||||
} catch (error) {
|
||||
console.log("Connection Close", error);
|
||||
}
|
||||
}
|
||||
refreshConnection() {
|
||||
if (!this.socketConnection) {
|
||||
this.getConnection();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
setGPSConnection() {
|
||||
if (window.localStorage.currentuser) {
|
||||
//this.socketConnection = true;
|
||||
this.useridd = window.localStorage.currentuser;
|
||||
this.socket_gps = io.connect('https://soc.oneqlik.in' + '/gps?userId=' + this.useridd, {
|
||||
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,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
removedGPSConnection() {
|
||||
this.socket_gps.close();
|
||||
}
|
||||
getConnection() {
|
||||
if (window.localStorage.currentuser) {
|
||||
this.socketConnection = true;
|
||||
this.useridd = window.localStorage.currentuser;
|
||||
this.socket_notifIO = io.connect('https://soc.oneqlik.in' + '/notifIOV2?userId=' + this.useridd, {
|
||||
secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false
|
||||
});
|
||||
//this.setGPSConnection();
|
||||
getConnection() {
|
||||
if (window.localStorage.currentuser) {
|
||||
this.socketConnection = true;
|
||||
this.useridd = window.localStorage.currentuser;
|
||||
this.socket_notifIO = io.connect(
|
||||
"https://soc.oneqlik.in" + "/notifIOV2?userId=" + this.useridd,
|
||||
{
|
||||
secure: true,
|
||||
rejectUnauthorized: false,
|
||||
transports: ["websocket", "polling"],
|
||||
upgrade: false,
|
||||
}
|
||||
);
|
||||
//this.setGPSConnection();
|
||||
|
||||
this.socket_5000 = io.connect('https://soc.oneqlik.in?userId=' + this.useridd, {
|
||||
secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false
|
||||
});
|
||||
}
|
||||
if (window.localStorage.custumer_token) {
|
||||
this.fs = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).fn;
|
||||
this.ls = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).ln;
|
||||
this.emailid = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).email;
|
||||
this.or = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1]))._orgName;
|
||||
this.useridd = JSON.parse(window.atob(window.localStorage.custumer_token.split('.')[1]))._id;
|
||||
this.mb = JSON.parse(window.atob(window.localStorage.custumer_token.split('.')[1])).phn;
|
||||
this.custtype = JSON.parse(window.atob(window.localStorage.custumer_token.split('.')[1])).isDealer;
|
||||
if (this.custtype == true) {
|
||||
this.cust = true;
|
||||
}
|
||||
if (this.mb.charAt(0) == "n") {
|
||||
this.mb = ' '
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
var url = (this.router.url).substring(0, 12);
|
||||
console.log(url);
|
||||
this.socket_5000 = io.connect(
|
||||
"https://soc.oneqlik.in?userId=" + this.useridd,
|
||||
{
|
||||
secure: true,
|
||||
rejectUnauthorized: false,
|
||||
transports: ["websocket", "polling"],
|
||||
upgrade: false,
|
||||
}
|
||||
);
|
||||
}
|
||||
if (window.localStorage.custumer_token) {
|
||||
this.fs = JSON.parse(
|
||||
window.atob(window.localStorage.custumer_token.split(".")[1])
|
||||
).fn;
|
||||
this.ls = JSON.parse(
|
||||
window.atob(window.localStorage.custumer_token.split(".")[1])
|
||||
).ln;
|
||||
this.emailid = JSON.parse(
|
||||
window.atob(window.localStorage.custumer_token.split(".")[1])
|
||||
).email;
|
||||
this.or = JSON.parse(
|
||||
window.atob(window.localStorage.custumer_token.split(".")[1])
|
||||
)._orgName;
|
||||
this.useridd = JSON.parse(
|
||||
window.atob(window.localStorage.custumer_token.split(".")[1])
|
||||
)._id;
|
||||
this.mb = JSON.parse(
|
||||
window.atob(window.localStorage.custumer_token.split(".")[1])
|
||||
).phn;
|
||||
this.custtype = JSON.parse(
|
||||
window.atob(window.localStorage.custumer_token.split(".")[1])
|
||||
).isDealer;
|
||||
if (this.custtype == true) {
|
||||
this.cust = true;
|
||||
}
|
||||
if (this.mb.charAt(0) == "n") {
|
||||
this.mb = " ";
|
||||
}
|
||||
} else {
|
||||
var url = this.router.url.substring(0, 12);
|
||||
console.log(url);
|
||||
|
||||
if (url == "/ViewVehicle") {
|
||||
|
||||
} else {
|
||||
if (window.localStorage.token) {
|
||||
this.fs = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).fn;
|
||||
this.ls = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).ln;
|
||||
this.emailid = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).email;
|
||||
this.or = JSON.parse(window.atob(window.localStorage.token.split(".")[1]))._orgName;
|
||||
this.useridd = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id;
|
||||
this.mb = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).phn;
|
||||
this.custtype = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).isDealer;
|
||||
if (this.custtype == true) {
|
||||
this.cust = true;
|
||||
}
|
||||
if (this.mb.charAt(0) == "n") {
|
||||
this.mb = ' '
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
getDevice(emailid,id) {
|
||||
return this.http.get(this.dev_url + "/devices/getDeviceByUser?email="+emailid+'&id='+id)
|
||||
.map(data => {
|
||||
data.json();
|
||||
|
||||
|
||||
var devices = data.json().devices;
|
||||
|
||||
|
||||
/* console.log("Devices: ",temp); */
|
||||
return data.json();
|
||||
});
|
||||
if (url == "/ViewVehicle") {
|
||||
} else {
|
||||
if (window.localStorage.token) {
|
||||
this.fs = JSON.parse(
|
||||
window.atob(window.localStorage.token.split(".")[1])
|
||||
).fn;
|
||||
this.ls = JSON.parse(
|
||||
window.atob(window.localStorage.token.split(".")[1])
|
||||
).ln;
|
||||
this.emailid = JSON.parse(
|
||||
window.atob(window.localStorage.token.split(".")[1])
|
||||
).email;
|
||||
this.or = JSON.parse(
|
||||
window.atob(window.localStorage.token.split(".")[1])
|
||||
)._orgName;
|
||||
this.useridd = JSON.parse(
|
||||
window.atob(window.localStorage.token.split(".")[1])
|
||||
)._id;
|
||||
this.mb = JSON.parse(
|
||||
window.atob(window.localStorage.token.split(".")[1])
|
||||
).phn;
|
||||
this.custtype = JSON.parse(
|
||||
window.atob(window.localStorage.token.split(".")[1])
|
||||
).isDealer;
|
||||
if (this.custtype == true) {
|
||||
this.cust = true;
|
||||
}
|
||||
if (this.mb.charAt(0) == "n") {
|
||||
this.mb = " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
getData(e,u,g,s,l,input,supadm,dealer){
|
||||
|
||||
if(input && input!='undefined'){
|
||||
s=0;
|
||||
}
|
||||
var url = this.dev_url + "/devices/getDeviceByUser?email="+e+'&id='+u+'&skip='+s+"&limit="+l;
|
||||
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 => {
|
||||
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();
|
||||
|
||||
data.json();
|
||||
return data.json();
|
||||
});
|
||||
|
||||
var devices = data.json().devices;
|
||||
|
||||
/* 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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
854
src/app/db-edit-device/db-edit-device.component.html
Normal file
854
src/app/db-edit-device/db-edit-device.component.html
Normal 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>
|
||||
58
src/app/db-edit-device/db-edit-device.component.scss
Normal file
58
src/app/db-edit-device/db-edit-device.component.scss
Normal 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;
|
||||
}
|
||||
25
src/app/db-edit-device/db-edit-device.component.spec.ts
Normal file
25
src/app/db-edit-device/db-edit-device.component.spec.ts
Normal 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();
|
||||
});
|
||||
});
|
||||
1612
src/app/db-edit-device/db-edit-device.component.ts
Normal file
1612
src/app/db-edit-device/db-edit-device.component.ts
Normal file
File diff suppressed because it is too large
Load diff
15
src/app/dbauth.guard.spec.ts
Normal file
15
src/app/dbauth.guard.spec.ts
Normal 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
30
src/app/dbauth.guard.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
3
src/app/dblive/dblive.component.html
Normal file
3
src/app/dblive/dblive.component.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<p>
|
||||
dblive works!
|
||||
</p>
|
||||
0
src/app/dblive/dblive.component.scss
Normal file
0
src/app/dblive/dblive.component.scss
Normal file
25
src/app/dblive/dblive.component.spec.ts
Normal file
25
src/app/dblive/dblive.component.spec.ts
Normal 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();
|
||||
});
|
||||
});
|
||||
15
src/app/dblive/dblive.component.ts
Normal file
15
src/app/dblive/dblive.component.ts
Normal 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() {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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…</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">
|
||||
<app-all-menus></app-all-menus>
|
||||
<div id="dvTable" style="position: absolute;top:200px"></div>
|
||||
<div id="toast">
|
||||
<div id="desc">{{data_descip}}</div>
|
||||
</div>
|
||||
<app-all-menus></app-all-menus>
|
||||
<div id="dvTable" style="position: absolute; top: 200px"></div>
|
||||
<div id="toast">
|
||||
<div id="desc">{{ data_descip }}</div>
|
||||
</div>
|
||||
<div class="container-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">
|
||||
<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;float: right;">{{'Dealers' | translate}}</h4>
|
||||
<!-- <button style="background-color: #cc0000;color:#fdfdfd;font-size: 12px;" md-raised-button (click)="exportPdf()">{{'PDF' | translate}}</button> -->
|
||||
<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-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 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]="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>
|
||||
<button class="btn btn-default" [disabled]="firstcall" (click)="next()" style="margin-right: 10px">
|
||||
{{ "Next" | 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 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-firstcol">
|
||||
<div class="table100-firstcol">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="cell100 column1" style="font-weight:600;background: #ADD8E6;">
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<p>{{'NAME' | translate}}</p>
|
||||
</div>
|
||||
<div class="col-5">
|
||||
<p>{{'EMAIL' | translate}}</p>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<p>{{'PHONE' | translate}}</p>
|
||||
</div>
|
||||
<tr>
|
||||
<th class="cell100 column1" style="font-weight: 600; background: #add8e6">
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<p>{{ "NAME" | translate }}</p>
|
||||
</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> -->
|
||||
<div class="col-5">
|
||||
<p>{{ "EMAIL" | translate }}</p>
|
||||
</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>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let dealer of dealers_info">
|
||||
<td class="cell100 column1" (click)="dealerSwitch(dealer)">
|
||||
<div class="row">
|
||||
<div class="col-sm-5">
|
||||
<p>{{dealer.first_name}} {{dealer.last_name}}</p>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<p (click)="dealerSwitch(dealer)">{{dealer.email}}</p>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<p (click)="dealerSwitch(dealer)">{{dealerPhone(dealer)}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<!-- <td class="cell100 column1" style="cursor: pointer;" (click)="dealerSwitch(dealer)"></td>
|
||||
<tr *ngFor="let dealer of dealers_info">
|
||||
<td class="ftd-mp cell100 column1" (click)="dealerSwitch(dealer)">
|
||||
<div class="row">
|
||||
<div class="col-sm-5">
|
||||
<p title="{{ dealer.first_name }} {{ dealer.last_name }}" style="
|
||||
display: inline-block;
|
||||
width: 180px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis;
|
||||
">
|
||||
{{ dealer.first_name }} {{ dealer.last_name }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<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> -->
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</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">
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="row100 head">
|
||||
|
||||
<th class="cell100 column2" style='text-align: left;font-weight: 600;background: #ADD8E6;padding-left: 55px;'>{{'USER ID' | translate}}</th>
|
||||
<th class="cell100 column3" style='text-align: left;font-weight: 600;background: #ADD8E6'>{{'PASSWORD' | translate}}</th>
|
||||
<th class="cell100 column4" style='text-align: left;font-weight: 600;background: #ADD8E6'>{{'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 class="row100 head">
|
||||
<th class="cell100 column2" style="
|
||||
text-align: left;
|
||||
font-weight: 600;
|
||||
background: #add8e6;
|
||||
padding-left: 55px;
|
||||
">
|
||||
{{ "USER ID" | translate }}
|
||||
</th>
|
||||
<th class="cell100 column3" style="
|
||||
text-align: left;
|
||||
font-weight: 600;
|
||||
background: #add8e6;
|
||||
">
|
||||
{{ "PASSWORD" | translate }}
|
||||
</th>
|
||||
<th class="cell100 column4" style="
|
||||
text-align: left;
|
||||
font-weight: 600;
|
||||
background: #add8e6;
|
||||
">
|
||||
{{ "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>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row100 body" *ngFor="let dealer of dealers_info">
|
||||
|
||||
<td class="cell100 column2" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.user_id?dealer.user_id:'NA'}}</td>
|
||||
<td class="cell100 column3" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.pass?dealer.pass:'Not saved'}}</td>
|
||||
<td class="cell100 column4" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.created_on|date:'short'}}</td>
|
||||
<td class="cell100 column5" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{dealer.expire_date|date:'short'}}</td>
|
||||
<td class="cell100 column6" style="cursor: pointer;" (click)="dealerSwitch(dealer)">{{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 class="cell100 column2" style="cursor: pointer" (click)="dealerSwitch(dealer)">
|
||||
{{ dealer.user_id ? dealer.user_id : "NA" }}
|
||||
</td>
|
||||
<td class="cell100 column3" style="cursor: pointer" (click)="dealerSwitch(dealer)">
|
||||
{{ dealer.pass ? dealer.pass : "Not saved" }}
|
||||
</td>
|
||||
<td class="cell100 column4" style="cursor: pointer" (click)="dealerSwitch(dealer)">
|
||||
{{ dealer.created_on | date : "short" }}
|
||||
</td>
|
||||
<td class="cell100 column5" style="cursor: pointer" (click)="dealerSwitch(dealer)">
|
||||
{{ dealer.expire_date | date : "short" }}
|
||||
</td>
|
||||
<td class="cell100 column6" style="cursor: pointer" (click)="dealerSwitch(dealer)">
|
||||
{{
|
||||
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 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 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 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 class="cell100 column17" style="text-align: center;">
|
||||
<i class="fas fa-user-shield" title="Additonal Access" (click)="user_permission(dealer)"></i>
|
||||
|
||||
<td class="cell100 column17" style="text-align: center">
|
||||
<i class="fas fa-user-shield" title="Additonal Access" (click)="user_permission(dealer)"></i>
|
||||
</td>
|
||||
<td class="cell100 column18" style="text-align: center">
|
||||
<i id="pointShare" style="cursor: pointer; color: #f5b515" class="fas fa-coins"
|
||||
(click)="addPoints(dealer)"></i>
|
||||
</td>
|
||||
<td class="cell100 column18" style="text-align: center;">
|
||||
<i id="pointShare" style="cursor:pointer;color:#f5b515;" class="fas fa-coins" (click)="addPoints(dealer)"></i>
|
||||
</td>
|
||||
<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>
|
||||
</td>
|
||||
<md-slide-toggle [(ngModel)]="dealer.accountSuspended" style="height: 0px !important"
|
||||
ngDefaultControl (change)="accountStatusonChange(dealer, $event)"></md-slide-toggle>
|
||||
</td>
|
||||
</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>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -369,8 +351,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -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>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
.topDiv {
|
||||
height: 90vh;
|
||||
padding-left: 4px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
|
|
@ -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
|
|
@ -1,20 +1,21 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { ContactService } from '../contact.service';
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { ContactService } from "../contact.service";
|
||||
declare var $: any;
|
||||
declare var moment:any;
|
||||
declare var moment: any;
|
||||
@Component({
|
||||
selector: 'app-device-list',
|
||||
templateUrl: './device-list.component.html',
|
||||
styleUrls: ['./device-list.component.scss']
|
||||
selector: "app-device-list",
|
||||
templateUrl: "./device-list.component.html",
|
||||
styleUrls: ["./device-list.component.scss"],
|
||||
})
|
||||
export class DeviceListComponent implements OnInit {
|
||||
identifier='deviceList'
|
||||
licenceStatus
|
||||
supAdm
|
||||
superAdm=JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id
|
||||
fromdate
|
||||
identifier = "deviceList";
|
||||
licenceStatus;
|
||||
supAdm;
|
||||
superAdm = JSON.parse(window.atob(window.localStorage.token.split(".")[1]))
|
||||
._id;
|
||||
fromdate;
|
||||
todate;
|
||||
tabelObj: any ;
|
||||
tabelObj: any;
|
||||
Load: boolean;
|
||||
fs: any;
|
||||
ls: any;
|
||||
|
|
@ -23,277 +24,288 @@ export class DeviceListComponent implements OnInit {
|
|||
useridd: any;
|
||||
custtype: any;
|
||||
devicess: any;
|
||||
total_vech=0;
|
||||
idle_vech=0;
|
||||
off_vech=0;
|
||||
maintanance=0;
|
||||
expiredDevices=0;
|
||||
OutOfReach=0;
|
||||
no_data=0;
|
||||
expire_status=0;
|
||||
Running=0;
|
||||
total_vech = 0;
|
||||
idle_vech = 0;
|
||||
off_vech = 0;
|
||||
maintanance = 0;
|
||||
expiredDevices = 0;
|
||||
OutOfReach = 0;
|
||||
no_data = 0;
|
||||
expire_status = 0;
|
||||
Running = 0;
|
||||
from: any;
|
||||
to: any;
|
||||
groupId: any;
|
||||
DealerID: any;
|
||||
data
|
||||
setTimeOut = {
|
||||
data;
|
||||
setTimeOut = {
|
||||
value: 20,
|
||||
viewValue: "20 Seconds"
|
||||
viewValue: "20 Seconds",
|
||||
};
|
||||
timout = [{
|
||||
value: 10,
|
||||
viewValue: "10 Seconds"
|
||||
},
|
||||
{
|
||||
value: 20,
|
||||
viewValue: "20 Seconds"
|
||||
},
|
||||
{
|
||||
value: 30,
|
||||
viewValue: "30 Seconds"
|
||||
}]
|
||||
timout = [
|
||||
{
|
||||
value: 10,
|
||||
viewValue: "10 Seconds",
|
||||
},
|
||||
{
|
||||
value: 20,
|
||||
viewValue: "20 Seconds",
|
||||
},
|
||||
{
|
||||
value: 30,
|
||||
viewValue: "30 Seconds",
|
||||
},
|
||||
];
|
||||
|
||||
interval:any;
|
||||
interval: any;
|
||||
it: number;
|
||||
constructor(private contactService:ContactService) { }
|
||||
constructor(private contactService: ContactService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.data= JSON.parse(localStorage.getItem('dashboardCount'))
|
||||
this.data = JSON.parse(localStorage.getItem("dashboardCount"));
|
||||
this.to = new Date().toISOString();
|
||||
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.emailid = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).email;
|
||||
this.or = JSON.parse(window.atob(window.localStorage.token.split(".")[1]))._orgName;
|
||||
this.useridd = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id;
|
||||
|
||||
this.custtype = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).isDealer;
|
||||
var fuelvalue = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).fuel_unit;
|
||||
this.emailid = JSON.parse(
|
||||
window.atob(window.localStorage.token.split(".")[1])
|
||||
).email;
|
||||
this.or = JSON.parse(
|
||||
window.atob(window.localStorage.token.split(".")[1])
|
||||
)._orgName;
|
||||
this.useridd = JSON.parse(
|
||||
window.atob(window.localStorage.token.split(".")[1])
|
||||
)._id;
|
||||
|
||||
this.custtype = JSON.parse(
|
||||
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 startDate = new Date(today.getFullYear(), today.getMonth(), 1);
|
||||
this.fromdate=startDate;
|
||||
this.todate=new Date();
|
||||
var startDate = new Date(today.getFullYear(), today.getMonth(), 1);
|
||||
this.fromdate = startDate;
|
||||
this.todate = new Date();
|
||||
this.testTable();
|
||||
this.getDashbord()
|
||||
this.getDashbord();
|
||||
// this.superAdm=JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id
|
||||
// this.timeIntervalRefresh();
|
||||
}
|
||||
timeIntervalRefresh() {
|
||||
// var that=this;
|
||||
clearInterval(this.interval);
|
||||
// var that=this;
|
||||
clearInterval(this.interval);
|
||||
|
||||
this.it = (1000 * this.setTimeOut.value);
|
||||
this.it = 1000 * this.setTimeOut.value;
|
||||
|
||||
this.interval = setInterval(() => {
|
||||
this.getDashbord()
|
||||
}, this.it);
|
||||
this.interval = setInterval(() => {
|
||||
this.getDashbord();
|
||||
}, this.it);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
getDashbord(){
|
||||
|
||||
this.contactService.getDashboard(this.emailid, this.from, this.to, this.superAdm, this.groupId,this.superAdm,this.DealerID).subscribe(
|
||||
data => {
|
||||
this.devicess = data
|
||||
getDashbord() {
|
||||
this.contactService
|
||||
.getDashboard(
|
||||
this.emailid,
|
||||
this.from,
|
||||
this.to,
|
||||
this.superAdm,
|
||||
this.groupId,
|
||||
this.superAdm,
|
||||
this.DealerID
|
||||
)
|
||||
.subscribe((data) => {
|
||||
this.devicess = data;
|
||||
console.log(data);
|
||||
|
||||
|
||||
this.total_vech = this.devicess.Total_Vech;
|
||||
this.idle_vech = this.devicess["Ideal Devices"];
|
||||
this.off_vech = this.devicess["OFF Devices"];
|
||||
this.maintanance = this.devicess["Maintance Device"];
|
||||
this.expiredDevices = this.devicess["expire_status"];
|
||||
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.expire_status= this.devicess["expire_status"];
|
||||
this.expire_status = this.devicess["expire_status"];
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getData(){
|
||||
var data={
|
||||
f:this.fromdate,
|
||||
t:this.todate,
|
||||
deviceType:''
|
||||
}
|
||||
this.contactService.getVehicleList(data).subscribe(res=>{
|
||||
getData() {
|
||||
var data = {
|
||||
f: this.fromdate,
|
||||
t: this.todate,
|
||||
deviceType: "",
|
||||
};
|
||||
this.contactService.getVehicleList(data).subscribe((res) => {
|
||||
console.log(res);
|
||||
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
getReport(data){
|
||||
getReport(data) {
|
||||
console.log(data);
|
||||
if(data=="getExcel"){
|
||||
this.exportExcel()
|
||||
|
||||
}else{
|
||||
this.fromdate=new Date(data.fromDate).toISOString();
|
||||
this.todate=new Date(data.toDate).toISOString();
|
||||
this.licenceStatus=data.liecenceStatus;
|
||||
if(data.distributerSelect[0]){
|
||||
this.supAdm=data.distributerSelect[0]._id;
|
||||
this.superAdm=data.distributerSelect[0]._id;
|
||||
this.getDashbord()
|
||||
}else{
|
||||
this.supAdm=undefined;
|
||||
this.superAdm=this.useridd;
|
||||
this.getDashbord()
|
||||
if (data == "getExcel" || data == "Excel") {
|
||||
this.exportExcel();
|
||||
} else {
|
||||
this.fromdate = new Date(data.fromDate).toISOString();
|
||||
this.todate = new Date(data.toDate).toISOString();
|
||||
this.licenceStatus = data.liecenceStatus;
|
||||
if (data.distributerSelect[0]) {
|
||||
this.supAdm = data.distributerSelect[0]._id;
|
||||
this.superAdm = data.distributerSelect[0]._id;
|
||||
this.getDashbord();
|
||||
} else {
|
||||
this.supAdm = undefined;
|
||||
this.superAdm = this.useridd;
|
||||
this.getDashbord();
|
||||
}
|
||||
console.log(this.fromdate,this.todate);
|
||||
console.log(this.fromdate, this.todate);
|
||||
this.tabelObj.ajax.reload();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
testTable(){
|
||||
const that = this;
|
||||
console.log("inside function");
|
||||
// that.Load = true;
|
||||
testTable() {
|
||||
const that = this;
|
||||
console.log("inside function");
|
||||
// that.Load = true;
|
||||
|
||||
$(document).ready(function() {
|
||||
that.tabelObj = $('#deviceTable').DataTable({
|
||||
"processing": false,
|
||||
"searching": true,
|
||||
pagingType: 'full_numbers',
|
||||
pageLength: 25,
|
||||
serverSide: false,
|
||||
responsive: true,
|
||||
"scrollY":'60vh',
|
||||
"scrollCollapse": true,
|
||||
|
||||
// "deferLoading": 25 ,
|
||||
lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
|
||||
// "rowCallback": function(row: Node, data: any | Object, index: number){
|
||||
ajax: (mainData,callback) => {
|
||||
$(document).ready(function () {
|
||||
that.tabelObj = $("#deviceTable").DataTable({
|
||||
processing: false,
|
||||
searching: true,
|
||||
pagingType: "full_numbers",
|
||||
pageLength: 25,
|
||||
serverSide: false,
|
||||
responsive: true,
|
||||
scrollY: "60vh",
|
||||
scrollCollapse: true,
|
||||
|
||||
var data={
|
||||
f:that.fromdate,
|
||||
t:that.todate,
|
||||
deviceType:'',
|
||||
licenceType:that.licenceStatus,
|
||||
supAdm:that.supAdm
|
||||
}
|
||||
// "deferLoading": 25 ,
|
||||
lengthMenu: [
|
||||
[10, 25, 50, -1],
|
||||
[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,
|
||||
};
|
||||
|
||||
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) : '';
|
||||
}
|
||||
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: [] });
|
||||
}
|
||||
,{
|
||||
"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: dealer name
|
||||
// [5:59 PM, 7/5/2021] Job 1: Organization name
|
||||
|
||||
],
|
||||
"columnDefs": [
|
||||
{ className: "dt-body-left", "targets": [ 0,1,2,3,4,5,6,7,8,9,10,11] },
|
||||
});
|
||||
} 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",
|
||||
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: dealer name
|
||||
// [5:59 PM, 7/5/2021] Job 1: Organization name
|
||||
],
|
||||
columnDefs: [
|
||||
{
|
||||
className: "dt-body-left",
|
||||
targets: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
|
||||
},
|
||||
// {
|
||||
// "targets": '_all',
|
||||
// "createdCell": function (td, cellData, rowData, row, col) {
|
||||
|
|
@ -306,63 +318,56 @@ export class DeviceListComponent implements OnInit {
|
|||
// { "width": "70px", "targets": 3 },
|
||||
// { "width": "70px", "targets": 4 },
|
||||
// { "width": "70px", "targets": 5 },
|
||||
// { "width": "70px", "targets": 6 },
|
||||
// { "width": "70px", "targets": 6 },
|
||||
// { "width": "70px", "targets": 7 },
|
||||
// { "width": "70px", "targets": 8 },
|
||||
// { "width": "70px", "targets": 9 },
|
||||
// { "width": "10px", "targets": 10 },
|
||||
// { "width": "10px", "targets": 11 },
|
||||
|
||||
// {
|
||||
// targets: -1, //-1 es la ultima columna y 0 la primera
|
||||
// data: null,
|
||||
// defaultContent: '<div class="btn-group"> <button (click)="show()">view</button></div>'
|
||||
// },
|
||||
] , order: [[ 3, 'desc' ], [ 0, 'asc' ]]
|
||||
// { "width": "10px", "targets": 11 },
|
||||
|
||||
// {
|
||||
// targets: -1, //-1 es la ultima columna y 0 la primera
|
||||
// data: null,
|
||||
// defaultContent: '<div class="btn-group"> <button (click)="show()">view</button></div>'
|
||||
// },
|
||||
],
|
||||
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]);
|
||||
this.tab = table[0];
|
||||
console.log(this.tab);
|
||||
|
||||
|
||||
for(j = 0 ; j < this.tab.rows.length ; j++)
|
||||
{
|
||||
tab_text=tab_text+this.tab.rows[j].innerHTML+"</tr>";
|
||||
|
||||
}
|
||||
|
||||
tab_text=tab_text+"</table>";
|
||||
|
||||
tab_text= tab_text.replace(/<input[^>]*>|<\/input>/gi, "");
|
||||
|
||||
var ua = window.navigator.userAgent;
|
||||
var msie = ua.indexOf("MSIE ");
|
||||
|
||||
var sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));
|
||||
|
||||
return (sa);
|
||||
});
|
||||
}
|
||||
|
||||
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];
|
||||
console.log(this.tab);
|
||||
|
||||
for (j = 0; j < this.tab.rows.length; j++) {
|
||||
tab_text = tab_text + this.tab.rows[j].innerHTML + "</tr>";
|
||||
}
|
||||
|
||||
tab_text = tab_text + "</table>";
|
||||
|
||||
tab_text = tab_text.replace(/<input[^>]*>|<\/input>/gi, "");
|
||||
|
||||
var ua = window.navigator.userAgent;
|
||||
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
|
|
@ -118,6 +118,7 @@ errorDialog:boolean = false;
|
|||
tableArr =[];
|
||||
acObject:any=[];
|
||||
ac_report(){
|
||||
debugger
|
||||
this.acObject =[];
|
||||
this.Load = true;
|
||||
console.log(this.dataSelect);
|
||||
|
|
|
|||
|
|
@ -180,7 +180,8 @@ devi(){
|
|||
|
||||
}
|
||||
soon(){
|
||||
this.router.navigateByUrl("const?_i="+window.localStorage.token);
|
||||
|
||||
this.router.navigateByUrl("const?_i="+window.localStorage.token);
|
||||
|
||||
}
|
||||
new(){
|
||||
|
|
@ -226,7 +227,7 @@ mydealer(){
|
|||
if(window.localStorage['DataLoaded'] = 'True'){
|
||||
window.localStorage['Custumer'] = 'OFF'
|
||||
this.router.navigateByUrl("add")
|
||||
// this.router.navigateByUrl("const?_status="+"OK");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ export class DayWiseReportComponent implements OnInit {
|
|||
"scrollCollapse": true,
|
||||
lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
|
||||
ajax: (dataTablesParameters, callback) => {
|
||||
debugger
|
||||
console.log('temptemptemptemptemp', dataTablesParameters);
|
||||
var deviceID;
|
||||
that.Load = true;
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ export class DeviceSOSreportComponent implements OnInit {
|
|||
|
||||
});
|
||||
// $('#deviceTable tbody').on('click', 'button', function() {
|
||||
// debugger;
|
||||
//
|
||||
// var data = that.tabelObj.row($(this).parents('tr')).data();
|
||||
// console.log("button clicked");
|
||||
// });
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ export class DeviceSpeedReportComponent implements OnInit {
|
|||
|
||||
// }
|
||||
// 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') {
|
||||
window.localStorage['Custumer'] = 'OFF'
|
||||
this.router.navigateByUrl("add")
|
||||
// this.router.navigateByUrl("const?_status="+"OK");
|
||||
|
||||
}
|
||||
}
|
||||
_lineChartData: any;
|
||||
|
|
|
|||
|
|
@ -196,7 +196,8 @@ firstcall:boolean=true;
|
|||
|
||||
// }
|
||||
// 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'){
|
||||
// window.localStorage['Custumer'] = 'OFF'
|
||||
// this.router.navigateByUrl("add")
|
||||
// // this.router.navigateByUrl("const?_status="+"OK");
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
|
|
@ -580,25 +581,43 @@ testTable() {
|
|||
if (that.reportArr.length != 0) {
|
||||
var j = 0;
|
||||
var finalArr = [];
|
||||
for (var i = 0; i < that.reportArr.length; i++) {
|
||||
|
||||
that.clocation_1(that.reportArr[i], 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 });
|
||||
}
|
||||
|
||||
let latLongArray :any[] = [];
|
||||
that.reportArr.forEach((deData)=>{
|
||||
let latLng = {
|
||||
lat: deData.startLat ? deData.startLat : 0,
|
||||
long: deData.startLng ? deData.startLng : 0
|
||||
}
|
||||
latLongArray.push(latLng)
|
||||
})
|
||||
|
||||
that.contactService.getAddressByApiBulk(latLongArray).subscribe(latLongAddress => {
|
||||
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 {
|
||||
that.Load = false;
|
||||
that.firstcall=true;
|
||||
|
|
@ -792,13 +811,6 @@ tab:any;
|
|||
long: latlngObj.startLng ? latlngObj.startLng : 0
|
||||
}
|
||||
|
||||
|
||||
// if () {
|
||||
// latLng = {
|
||||
// lat: 0,
|
||||
// long: 0
|
||||
// }
|
||||
// }
|
||||
|
||||
outerThis.contactService.getAddressByApi(latLng).subscribe(res => {
|
||||
if (res.message == "Address not found in databse") {
|
||||
|
|
|
|||
|
|
@ -156,7 +156,8 @@ devi(){
|
|||
|
||||
}
|
||||
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'){
|
||||
window.localStorage['Custumer'] = 'OFF'
|
||||
this.router.navigateByUrl("add")
|
||||
// this.router.navigateByUrl("const?_status="+"OK");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,60 +1,127 @@
|
|||
|
||||
<div class="navbar navbar-default" style="margin-left: -15px;margin-top: -8px;">
|
||||
<app-all-menus *ngIf="!token_identifier"></app-all-menus>
|
||||
<div class="navbar navbar-default" style="margin-left: -15px; margin-top: -8px">
|
||||
<app-all-menus *ngIf="!token_identifier"></app-all-menus>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 30px;">
|
||||
|
||||
<div *ngIf="show" id="mySidebar" class="sidebar" style="background: white;
|
||||
box-shadow: 3px 1px 5px 0px #b2b0ae;">
|
||||
<div style="margin-top: 30px">
|
||||
<div
|
||||
*ngIf="show"
|
||||
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> -->
|
||||
<!-- <app-report-filter></app-report-filter> -->
|
||||
<div class="row" style="margin: 0;padding-bottom: 10px;">
|
||||
<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>
|
||||
<div class="row" style="margin: 0; padding-bottom: 10px">
|
||||
<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>
|
||||
</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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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="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"
|
||||
>
|
||||
<!-- timefilter icons -->
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="Basic example" style="width:100%;">
|
||||
<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
|
||||
class="btn-group btn-group-sm"
|
||||
role="group"
|
||||
aria-label="Basic example"
|
||||
style="width: 100%"
|
||||
>
|
||||
<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 class="row" style="margin: 0;padding-bottom: 10px;padding-right: 3px;">
|
||||
<div class="col-sm-3 col-md-3 col-lg-3" style="padding-left: 0;">
|
||||
<!-- from time label-->
|
||||
<span style="margin-bottom: 0%;font-size: 12px;"> {{'From' | translate}} :</span>
|
||||
</div>
|
||||
<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
|
||||
class="row"
|
||||
style="margin: 0; padding-bottom: 10px; padding-right: 3px"
|
||||
>
|
||||
<div class="col-sm-3 col-md-3 col-lg-3" style="padding-left: 0">
|
||||
<!-- from time label-->
|
||||
<span style="margin-bottom: 0%; font-size: 12px">
|
||||
{{ "From" | translate }} :</span
|
||||
>
|
||||
</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 -->
|
||||
<input id="to_date" bsDatepicker class="form-control form-control-sm" style="height: 25px;" [bsConfig]="bsConfig"
|
||||
name="todate" [(ngModel)]="to_date" type="text">
|
||||
<input
|
||||
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 class="row" style="margin: 0;padding-bottom: 10px;padding-right: 3px;">
|
||||
|
|
@ -66,15 +133,32 @@
|
|||
</div> -->
|
||||
|
||||
<div class="dropdown">
|
||||
<button style="background-color: #1556b9;color:#fdfdfd;" md-raised-button (click)="reportFilter('data')">{{'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
|
||||
style="background-color: #1556b9; color: #fdfdfd"
|
||||
md-raised-button
|
||||
(click)="reportFilter('data')"
|
||||
>
|
||||
{{ "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>
|
||||
<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)="exportPDF()"><i class="far fa-file-pdf"></i> PDF</a>
|
||||
<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)="exportPDF()"
|
||||
><i class="far fa-file-pdf"></i> PDF</a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -82,47 +166,77 @@
|
|||
<div id="line" class="line"></div>
|
||||
<div class="wordwrapper">
|
||||
<div id="line1" class="word">
|
||||
<i style="color: floralwhite;" *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>
|
||||
<i
|
||||
style="color: floralwhite"
|
||||
*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 *ngIf="show" id="main" style="box-shadow: 3px 1px 5px 0px #b2b0ae">
|
||||
<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">
|
||||
<h4>{{'Fuel Fill Report' | translate}}</h4>
|
||||
<h4>{{ "Fuel Fill Report" | translate }}</h4>
|
||||
<div id="toast">
|
||||
<!-- <div id="desc">{{data_descip}}</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row"
|
||||
style="margin:0px;height: 84vh;padding-top:10px;padding-bottom:5px;background: white;box-shadow: 3px 1px 5px 0px #b2b0ae;">
|
||||
<div
|
||||
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 *ngIf="Load" class="loading">Loading…</div>
|
||||
<div style="width: 100%;height:84vh;">
|
||||
<table id="deviceTable" cellspacing="0" style="width: 100%;font-size: 14px;">
|
||||
<thead style="background-color:#e0e0e0;color: #444444;">
|
||||
<div style="width: 100%; height: 84vh">
|
||||
<table
|
||||
id="deviceTable"
|
||||
cellspacing="0"
|
||||
style="width: 100%; font-size: 14px"
|
||||
>
|
||||
<thead style="background-color: #e0e0e0; color: #444444">
|
||||
<tr>
|
||||
<th style="text-align:center">{{'Vehicle Name' | translate}}</th>
|
||||
<th style="text-align:center">{{'Event' | 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>
|
||||
<th style="text-align: center">
|
||||
{{ "Vehicle Name" | translate }}
|
||||
</th>
|
||||
<th style="text-align: center">{{ "Event" | 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>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<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>{{'Geofencing Report' | translate}}</h4>
|
||||
<h4>{{'Geofencing Report 1' | translate}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="row rowStyle" >
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ superAdmin:Boolean = false;
|
|||
// if(window.localStorage['DataLoaded'] = 'True'){
|
||||
// window.localStorage['Custumer'] = 'OFF'
|
||||
// this.router.navigateByUrl("add")
|
||||
// // this.router.navigateByUrl("const?_status="+"OK");
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
|
|
@ -144,7 +144,8 @@ superAdmin:Boolean = false;
|
|||
|
||||
// }
|
||||
// soon(){
|
||||
// this.router.navigateByUrl("const?_i="+window.localStorage.token);
|
||||
//
|
||||
// this.router.navigateByUrl("const?_i="+window.localStorage.token);
|
||||
|
||||
// }
|
||||
|
||||
|
|
|
|||
|
|
@ -127,7 +127,8 @@ this.contactService.getIdealData(neww.did,r).subscribe(
|
|||
|
||||
}
|
||||
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'){
|
||||
window.localStorage['Custumer'] = 'OFF'
|
||||
this.router.navigateByUrl("add")
|
||||
// this.router.navigateByUrl("const?_status="+"OK");
|
||||
|
||||
}
|
||||
}
|
||||
report_speed(){
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ devi(){
|
|||
|
||||
}
|
||||
soon(){
|
||||
this.router.navigateByUrl("const?_i="+window.localStorage.token);
|
||||
|
||||
this.router.navigateByUrl("const?_i="+window.localStorage.token);
|
||||
|
||||
}
|
||||
new(){
|
||||
|
|
@ -202,7 +203,7 @@ creategraph(a){
|
|||
if(window.localStorage['DataLoaded'] = 'True'){
|
||||
window.localStorage['Custumer'] = 'OFF'
|
||||
this.router.navigateByUrl("add")
|
||||
// this.router.navigateByUrl("const?_status="+"OK");
|
||||
|
||||
}
|
||||
}
|
||||
getdata(final){
|
||||
|
|
|
|||
|
|
@ -221,7 +221,8 @@ export class IgnitionReportComponent implements OnInit {
|
|||
|
||||
// }
|
||||
// soon(){
|
||||
// this.router.navigateByUrl("const?_i="+window.localStorage.token);
|
||||
//
|
||||
//this.router.navigateByUrl("const?_i="+window.localStorage.token);
|
||||
|
||||
// }
|
||||
// new(){
|
||||
|
|
@ -272,7 +273,7 @@ export class IgnitionReportComponent implements OnInit {
|
|||
// if(window.localStorage['DataLoaded'] = 'True'){
|
||||
// window.localStorage['Custumer'] = 'OFF'
|
||||
// this.router.navigateByUrl("add")
|
||||
// // this.router.navigateByUrl("const?_status="+"OK");
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ testTable() {
|
|||
// console.log(suburl);
|
||||
// console.log(dataTablesParameters);
|
||||
// console.log(suburl)
|
||||
that.contactService.post(suburl, dataTablesParameters).subscribe(resp => {
|
||||
that.contactService.postReports(suburl, dataTablesParameters).subscribe(resp => {
|
||||
console.log("poiResp",resp);
|
||||
callback(resp);
|
||||
}, err => {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -219,7 +219,8 @@ export class SummaryReportComponent implements OnInit {
|
|||
|
||||
// }
|
||||
// soon(){
|
||||
// this.router.navigateByUrl("const?_i="+window.localStorage.token);
|
||||
//
|
||||
// this.router.navigateByUrl("const?_i="+window.localStorage.token);
|
||||
|
||||
// }
|
||||
// new(){
|
||||
|
|
@ -286,7 +287,7 @@ export class SummaryReportComponent implements OnInit {
|
|||
// if(window.localStorage['DataLoaded'] = 'True'){
|
||||
// window.localStorage['Custumer'] = 'OFF'
|
||||
// this.router.navigateByUrl("add")
|
||||
// // this.router.navigateByUrl("const?_status="+"OK");
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
|
|
@ -643,7 +644,7 @@ testTable() {
|
|||
if(that.deviceArr.length != 0){
|
||||
suburl +='&device='+that.deviceArr;
|
||||
}
|
||||
that.contactService.get(suburl).subscribe(resp => {
|
||||
that.contactService.getReports(suburl).subscribe(resp => {
|
||||
// console.log(ignReport.length);
|
||||
that.summary =[];
|
||||
that.Load= false;
|
||||
|
|
|
|||
|
|
@ -1,76 +1,82 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { MdSnackBar } from '@angular/material';
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
|
||||
import { MdSnackBar } from "@angular/material";
|
||||
|
||||
import { ContactService } from '../contact.service';
|
||||
import { ContactService } from "../contact.service";
|
||||
declare var $: any;
|
||||
|
||||
declare var google: any, swal: any;
|
||||
@Component({
|
||||
selector: 'app-device-setting',
|
||||
templateUrl: './device-setting.component.html',
|
||||
styleUrls: ['./device-setting.component.scss']
|
||||
selector: "app-device-setting",
|
||||
templateUrl: "./device-setting.component.html",
|
||||
styleUrls: ["./device-setting.component.scss"],
|
||||
})
|
||||
export class DeviceSettingComponent implements OnInit {
|
||||
emailId: any;
|
||||
Load: Boolean=false;
|
||||
Load: Boolean = false;
|
||||
searchForm: FormGroup;
|
||||
deleteShow: boolean = false;
|
||||
submitted = false;
|
||||
userId: any;
|
||||
deviceForm: FormGroup
|
||||
deviceForm: FormGroup;
|
||||
data: any;
|
||||
deleted: boolean = false;
|
||||
ditributers
|
||||
dealers
|
||||
ditributers;
|
||||
dealers;
|
||||
users: any;
|
||||
selectedSupAdmin
|
||||
selectedDealer
|
||||
selectedUser
|
||||
selectedSupAdmin;
|
||||
selectedDealer;
|
||||
selectedUser;
|
||||
// @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 {
|
||||
this.searchForm = this.fb.group({
|
||||
imei: ['', Validators.required]
|
||||
})
|
||||
imei: ["", Validators.required],
|
||||
});
|
||||
this.deviceForm = this.fb.group({
|
||||
imei: [''],
|
||||
registrationNumber: [''],
|
||||
sim1: [''],
|
||||
sim2: [''],
|
||||
dealaer: [''],
|
||||
user: [''],
|
||||
deviceModel: [''],
|
||||
vehicleType: [''],
|
||||
expirationDate: [''],
|
||||
creationDate: [''],
|
||||
superAdmin: [''],
|
||||
lastRenewal: [''],
|
||||
status: [''],
|
||||
deleted: [''],
|
||||
deletedBy: [''],
|
||||
deletedAt: [''],
|
||||
deletedFrom: ['']
|
||||
imei: [""],
|
||||
registrationNumber: [""],
|
||||
sim1: [""],
|
||||
sim2: [""],
|
||||
dealaer: [""],
|
||||
user: [""],
|
||||
deviceModel: [""],
|
||||
vehicleType: [""],
|
||||
expirationDate: [""],
|
||||
creationDate: [""],
|
||||
superAdmin: [""],
|
||||
lastRenewal: [""],
|
||||
status: [""],
|
||||
deleted: [""],
|
||||
deletedBy: [""],
|
||||
deletedAt: [""],
|
||||
deletedFrom: [""],
|
||||
|
||||
// 352887076587769
|
||||
})
|
||||
this.emailId = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).email;
|
||||
this.userId = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id;
|
||||
this.loadDropdown()
|
||||
});
|
||||
this.emailId = JSON.parse(
|
||||
window.atob(window.localStorage.token.split(".")[1])
|
||||
).email;
|
||||
this.userId = JSON.parse(
|
||||
window.atob(window.localStorage.token.split(".")[1])
|
||||
)._id;
|
||||
this.loadDropdown();
|
||||
this.getDistributers();
|
||||
|
||||
var that=this
|
||||
var that = this;
|
||||
$("#distributer").change(function () {
|
||||
// alert($(this).val());
|
||||
console.log($(this).val());
|
||||
var value = $(this).val();
|
||||
that.selectedSupAdmin = value[0];
|
||||
that.getDealers(that.selectedSupAdmin)
|
||||
|
||||
that.getDealers(that.selectedSupAdmin);
|
||||
|
||||
console.log(that.selectedSupAdmin);
|
||||
|
||||
|
||||
// var prevSelect = $("#MultiSelect_Preview").select2();
|
||||
// prevSelect.val($(this).val()).trigger('change');
|
||||
});
|
||||
|
|
@ -81,7 +87,7 @@ export class DeviceSettingComponent implements OnInit {
|
|||
console.log($(this).val());
|
||||
var value = $(this).val();
|
||||
that.selectedDealer = value[0];
|
||||
that.getUsers(that.selectedDealer)
|
||||
that.getUsers(that.selectedDealer);
|
||||
// that.getUser(that.selectedDealer)
|
||||
|
||||
console.log(that.selectedDealer);
|
||||
|
|
@ -102,100 +108,113 @@ export class DeviceSettingComponent implements OnInit {
|
|||
// var prevSelect = $("#MultiSelect_Preview").select2();
|
||||
// prevSelect.val($(this).val()).trigger('change');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
loadDropdown(){
|
||||
loadDropdown() {
|
||||
var script = document.createElement("script");
|
||||
script.setAttribute("type", "text/javascript");
|
||||
script.setAttribute("src", "https://unpkg.com/multiple-select@1.3.1/dist/multiple-select.min.js");
|
||||
script.setAttribute(
|
||||
"src",
|
||||
"https://unpkg.com/multiple-select@1.3.1/dist/multiple-select.min.js"
|
||||
);
|
||||
document.getElementsByTagName("head")[0].appendChild(script);
|
||||
|
||||
setTimeout(() => {
|
||||
$('#distributer').multipleSelect({
|
||||
$("#distributer").multipleSelect({
|
||||
width: 470,
|
||||
placeholder: "Select Distributer",
|
||||
filter: true,
|
||||
single: true,
|
||||
selectAll: false
|
||||
|
||||
})
|
||||
selectAll: false,
|
||||
});
|
||||
}, 100);
|
||||
|
||||
setTimeout(() => {
|
||||
$('#dealer').multipleSelect({
|
||||
width: 470,
|
||||
placeholder: "Select Dealer",
|
||||
filter: true,
|
||||
single: true,
|
||||
selectAll: false
|
||||
|
||||
})
|
||||
}, 100);
|
||||
$("#dealer").multipleSelect({
|
||||
width: 470,
|
||||
placeholder: "Select Dealer",
|
||||
filter: true,
|
||||
single: true,
|
||||
selectAll: false,
|
||||
});
|
||||
}, 100);
|
||||
|
||||
setTimeout(() => {
|
||||
$('#user').multipleSelect({
|
||||
$("#user").multipleSelect({
|
||||
width: 470,
|
||||
placeholder: "Select User",
|
||||
filter: true,
|
||||
single: true,
|
||||
selectAll: false
|
||||
|
||||
})
|
||||
selectAll: false,
|
||||
});
|
||||
}, 100);
|
||||
|
||||
}
|
||||
|
||||
get f() { return this.searchForm.controls; }
|
||||
get f() {
|
||||
return this.searchForm.controls;
|
||||
}
|
||||
|
||||
|
||||
getDistributers(){
|
||||
this.Load=true;
|
||||
this.contactService.getSuperAdminList().subscribe(res => {
|
||||
this.ditributers=res;
|
||||
this.loadDropdown()
|
||||
this.Load = false;
|
||||
},err=>{
|
||||
this.Load = false;
|
||||
})
|
||||
getDistributers() {
|
||||
this.Load = true;
|
||||
this.contactService.getSuperAdminList().subscribe(
|
||||
(res) => {
|
||||
this.ditributers = res;
|
||||
this.loadDropdown();
|
||||
this.Load = false;
|
||||
},
|
||||
(err) => {
|
||||
this.Load = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
getDealers(id) {
|
||||
this.Load = true;
|
||||
this.dealers=[]
|
||||
this.contactService.getDealersDetails(id).subscribe(res => {
|
||||
this.dealers = res;
|
||||
this.dealers = this.dealers.concat(this.ditributers);
|
||||
this.loadDropdown()
|
||||
this.Load = false;
|
||||
}, err => {
|
||||
this.Load = false;
|
||||
})
|
||||
this.dealers = [];
|
||||
this.contactService.getDealersDetails(id).subscribe(
|
||||
(res) => {
|
||||
this.dealers = res;
|
||||
this.dealers = this.dealers.concat(this.ditributers);
|
||||
this.loadDropdown();
|
||||
this.Load = false;
|
||||
},
|
||||
(err) => {
|
||||
this.Load = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
getUsers(id) {
|
||||
this.Load = true;
|
||||
this.users = []
|
||||
this.contactService.getContactsbyDealer(id).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.users = [];
|
||||
this.contactService
|
||||
.getContactsbyDealer(
|
||||
id,
|
||||
"&projection=_id,user_id,phone,email,first_name,last_name"
|
||||
)
|
||||
.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.Load = false;
|
||||
}, err => {
|
||||
this.Load = false;
|
||||
})
|
||||
this.loadDropdown();
|
||||
this.Load = false;
|
||||
},
|
||||
(err) => {
|
||||
this.Load = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
selectSupAdmin(event){
|
||||
selectSupAdmin(event) {
|
||||
// console.log(event.target.value);
|
||||
this.getDealers(event)
|
||||
this.getDealers(event);
|
||||
}
|
||||
|
||||
selectDealer(event) {
|
||||
console.log(event.target.value);
|
||||
this.getUsers(event.target.value)
|
||||
this.getUsers(event.target.value);
|
||||
}
|
||||
|
||||
submit() {
|
||||
|
|
@ -208,129 +227,150 @@ export class DeviceSettingComponent implements OnInit {
|
|||
if (this.searchForm.invalid) {
|
||||
return;
|
||||
}
|
||||
this.contactService.searchByImei(this.searchForm.value).subscribe((res: any) => {
|
||||
console.log(res);
|
||||
this.data = res[0];
|
||||
this.Load = false;
|
||||
if (res.length != 0) {
|
||||
this.deleteShow = true
|
||||
if (res[0].deletedDevice) {
|
||||
this.deleteShow = false;
|
||||
this.deleted = true;
|
||||
this.contactService.searchByImei(this.searchForm.value).subscribe(
|
||||
(res: any) => {
|
||||
console.log(res);
|
||||
this.data = res[0];
|
||||
this.Load = false;
|
||||
if (res.length != 0) {
|
||||
this.deleteShow = true;
|
||||
if (res[0].deletedDevice) {
|
||||
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 {
|
||||
|
||||
this.deleted = false;
|
||||
this.deleteShow = 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 : '';
|
||||
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 {
|
||||
this.deleteShow = false;
|
||||
this.deviceForm.reset();
|
||||
this.snackBar.open("No Data Found", '', {
|
||||
duration: 4000,
|
||||
});
|
||||
},
|
||||
(err) => {
|
||||
this.Load = false;
|
||||
}
|
||||
|
||||
},err=>{
|
||||
this.Load = false;
|
||||
})
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
deleteDevice() {
|
||||
swal({
|
||||
title: '<strong>Are you sure?</strong>',
|
||||
icon: 'warning',
|
||||
title: "<strong>Are you sure?</strong>",
|
||||
icon: "warning",
|
||||
html: "You won't be able to revert this!",
|
||||
showCloseButton: true,
|
||||
focusConfirm: false,
|
||||
// confirmButtonText: 'Reset today ODO',
|
||||
confirmButtonText: 'Yes, Save it!',
|
||||
confirmButtonText: "Yes, Save it!",
|
||||
// cancelButtonText: 'Reset total ODO',
|
||||
// cancelButtonAriaLabel: 'Thumbs down'
|
||||
cancelButtonText: 'No, cancel!',
|
||||
}).then((result: { value: boolean; }) => {
|
||||
cancelButtonText: "No, cancel!",
|
||||
}).then((result: { value: boolean }) => {
|
||||
if (result) {
|
||||
var req = {
|
||||
_id: this.data._id,
|
||||
Dealer: this.selectedDealer ? this.selectedDealer : this.data.Dealer ? this.data.Dealer._id:undefined,
|
||||
user: this.selectedUser ? this.selectedUser : this.data.user ? this.data.user._id : undefined,
|
||||
supAdmin: this.selectedSupAdmin ? this.selectedSupAdmin : this.data.supAdmin ? this.data.supAdmin._id : undefined
|
||||
}
|
||||
this.contactService.post("/devices/updateDeviceByAdmin",req).subscribe(res => {
|
||||
swal({
|
||||
title: 'Saved!',
|
||||
html: 'Your file has been saved.',
|
||||
icon: 'success'
|
||||
})
|
||||
})
|
||||
Dealer: this.selectedDealer
|
||||
? this.selectedDealer
|
||||
: this.data.Dealer
|
||||
? this.data.Dealer._id
|
||||
: undefined,
|
||||
user: this.selectedUser
|
||||
? this.selectedUser
|
||||
: this.data.user
|
||||
? this.data.user._id
|
||||
: undefined,
|
||||
supAdmin: this.selectedSupAdmin
|
||||
? this.selectedSupAdmin
|
||||
: this.data.supAdmin
|
||||
? this.data.supAdmin._id
|
||||
: undefined,
|
||||
};
|
||||
this.contactService
|
||||
.post("/devices/updateDeviceByAdmin", req)
|
||||
.subscribe((res) => {
|
||||
swal({
|
||||
title: "Saved!",
|
||||
html: "Your file has been saved.",
|
||||
icon: "success",
|
||||
});
|
||||
});
|
||||
this.deviceForm.reset();
|
||||
this.deleteShow = false;
|
||||
}
|
||||
}
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
deleteDevicePermenatly() {
|
||||
swal({
|
||||
title: '<strong>Are you sure?</strong>',
|
||||
icon: 'warning',
|
||||
title: "<strong>Are you sure?</strong>",
|
||||
icon: "warning",
|
||||
html: "Device will be deleted permanantly",
|
||||
showCloseButton: true,
|
||||
focusConfirm: false,
|
||||
// confirmButtonText: 'Reset today ODO',
|
||||
confirmButtonText: 'Yes, delete it!',
|
||||
confirmButtonText: "Yes, delete it!",
|
||||
// cancelButtonText: 'Reset total ODO',
|
||||
// cancelButtonAriaLabel: 'Thumbs down'
|
||||
cancelButtonText: 'No, cancel!',
|
||||
}).then((result: { value: boolean; }) => {
|
||||
cancelButtonText: "No, cancel!",
|
||||
}).then((result: { value: boolean }) => {
|
||||
if (result) {
|
||||
var req = {
|
||||
device: this.data.Device_ID,
|
||||
userId: this.userId,
|
||||
permenant: true
|
||||
}
|
||||
this.contactService.deldev(req).subscribe(res => {
|
||||
permenant: true,
|
||||
};
|
||||
this.contactService.deldev(req).subscribe((res) => {
|
||||
swal({
|
||||
title: 'Deleted!',
|
||||
html: 'Your file has been deleted.',
|
||||
icon: 'success'
|
||||
})
|
||||
})
|
||||
title: "Deleted!",
|
||||
html: "Your file has been deleted.",
|
||||
icon: "success",
|
||||
});
|
||||
});
|
||||
this.deviceForm.reset();
|
||||
}
|
||||
}
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -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)="qrCodeGenerator()">Qrcode</button> -->
|
||||
</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>
|
||||
<td></td>
|
||||
<td style="text-align: center;font-weight: 700">
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -27,7 +27,7 @@
|
|||
>
|
||||
<div class="row">
|
||||
<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>
|
||||
<td colspan="2">
|
||||
<img src={{imgurl}} alt="Company Logo" height="50" width="100">
|
||||
|
|
|
|||
10
src/app/dhananjay2/dhananjay2-routing.module.ts
Normal file
10
src/app/dhananjay2/dhananjay2-routing.module.ts
Normal 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 { }
|
||||
3
src/app/dhananjay2/dhananjay2.component.html
Normal file
3
src/app/dhananjay2/dhananjay2.component.html
Normal 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
Loading…
Add table
Add a link
Reference in a new issue