diff --git a/src/app/device/edit-device-master/edit-device-master.component.ts b/src/app/device/edit-device-master/edit-device-master.component.ts
index dbc13dc..9bd41fb 100644
--- a/src/app/device/edit-device-master/edit-device-master.component.ts
+++ b/src/app/device/edit-device-master/edit-device-master.component.ts
@@ -58,7 +58,7 @@ deletetemplate:boolean=false;
dealerAddress: any;
CID_No: any;
imgUrl: any;
- imgURL: any;
+ imgURL: any = '';
companyName: any;
companyAddress: any;
transportOfficeCity: any;
@@ -93,19 +93,19 @@ deletetemplate:boolean=false;
this.getUser();
this.dealerDetail();
console.log("DATA",this.data);
- this.lastDeviceTime=this.data.deviceInfo.last_device_time;
- this.lastPingOn=this.data.deviceInfo.last_ping_on
- this.devName = this.data.deviceInfo.Device_Name;
+ this.lastDeviceTime = this.data.deviceInfo.last_device_time ? this.data.deviceInfo.last_device_time:'';
+ this.lastPingOn = this.data.deviceInfo.last_ping_on ? this.data.deviceInfo.last_ping_on:''
+ this.devName = this.data.deviceInfo.Device_Name ? 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.phNum = this.data.deviceInfo.contact_number ? 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.orignalEmail = this.data.deviceInfo.Email_ID
- this.emailId = this.data.deviceInfo.Email_ID;
- this.deviceImage=this.data.deviceInfo.deviceImage
-
+ this.simNum = this.data.deviceInfo.sim_number ? this.data.deviceInfo.sim_number:'';
+ this.orignalEmail = this.data.deviceInfo.Email_ID ? this.data.deviceInfo.Email_ID:''
+ this.emailId = this.data.deviceInfo.Email_ID ? this.data.deviceInfo.Email_ID:'';
+ this.deviceImage = this.data.deviceInfo.deviceImage ? this.data.deviceInfo.deviceImage:''
+ this.deviceImage = this.deviceImage.filter(dFilter=>dFilter);
for(var i=0;i {
- myImage.onload = function(){
- console.log("1");
- doc.addImage(myImage , 'png', 40, 180, 30, 20);
- if(that.deviceImage.length==1){
- doc.save('sample-file.pdf');
+ if(myImage.src) {
+ myImage.onload = function () {
+ console.log("1");
+ doc.setPage(1);
+ doc.addImage(myImage, 'png', 160, 213, 20, 20);
+ if (that.deviceImage.length == 1) {
+ doc.save('sample-file.pdf');
+ }
+
+ };
}
-
- };
resolve('');
});
}
function f3(){
- myImage2.onload = function(){
- console.log("3");
-
- doc.addImage(myImage2 , 'png', 80, 180, 30, 20);
- doc.save('sample-file.pdf');
-
-
- };
+ if (myImage2) {
+ myImage2.onload = function () {
+ console.log("3");
+ doc.setPage(1);
+ doc.addImage(myImage2, 'png', 100, 213, 20, 20);
+ doc.save('sample-file.pdf');
+
+
+ };
+ }
+
}
function f2() {
return new Promise((resolve, reject) => {
- myImage1.onload = function(){
+ if (myImage1) {
+ myImage1.onload = function () {
console.log("2");
- doc.addImage(myImage1 , 'png', 60, 180, 30, 20);
- if(that.deviceImage.length==2){
- doc.save('sample-file.pdf');
- }
+ doc.setPage(1);
+ doc.addImage(myImage1, 'png', 130, 213, 20, 20);
+ if (that.deviceImage.length == 2) {
+ doc.save('sample-file.pdf');
+ }
};
+ }
+
resolve('');
})
diff --git a/src/app/dialog-content-example-dialog/dialog-content-example-dialog.component.html b/src/app/dialog-content-example-dialog/dialog-content-example-dialog.component.html
index 1995a71..cfa338a 100644
--- a/src/app/dialog-content-example-dialog/dialog-content-example-dialog.component.html
+++ b/src/app/dialog-content-example-dialog/dialog-content-example-dialog.component.html
@@ -32,7 +32,7 @@
*
-
+
diff --git a/src/app/dialog-content-example-dialog/dialog-content-example-dialog.component.ts b/src/app/dialog-content-example-dialog/dialog-content-example-dialog.component.ts
index 2786c85..ffce360 100644
--- a/src/app/dialog-content-example-dialog/dialog-content-example-dialog.component.ts
+++ b/src/app/dialog-content-example-dialog/dialog-content-example-dialog.component.ts
@@ -548,7 +548,11 @@ export class DialogContentExampleDialogComponent implements OnInit {
}
showDate:boolean=false;
-
+ removeSpecialChar() {
+ if (this.deviceid) {
+ this.deviceid = this.deviceid.replaceAll(/[^0-9 ]/g, "").replaceAll(' ', '');
+ }
+ }
addDevice(btnindex) {
console.log("In addDevice");
@@ -606,9 +610,20 @@ console.log("1");
// console.log("userDetailTopass",this.userDetail._id);
// console.log("vehdata",this.vehType._id)
//this._flashMessagesService.show('Congratulation Device Added as '+this.deviceid, { cssClass: 'alert-success', timeout: 2000 });
+ let expDateObj ;
+
+ if (this.expDate) {
+ expDateObj = new Date(this.expDate);
+ } else {
+ var eDate = new Date();
+ var LifeTimeyear = eDate.getFullYear() + 5;
+ eDate.setFullYear(LifeTimeyear);
+ expDateObj = new Date(eDate);
+ }
+
this.newDevice = {
devicename: this.devicename,
- deviceid: this.deviceid,
+ deviceid: this.deviceid ? this.deviceid.replaceAll(/[^0-9]/g, "") : this.deviceid,
des: this.des,
model: this.model,
hrdwr: this.hrdwr,
@@ -622,7 +637,7 @@ console.log("1");
driver_name: this.driver,
contact_number: this.dcontact,
device_model: this.DeviceModelValue,
- expdate: new Date(this.expDate),
+ expdate: expDateObj,
License : this.licenseVal,
deviceDistanceVariation:this.selcetedSign+(this.deviceDistanceVariation?this.deviceDistanceVariation:'0')
@@ -1835,6 +1850,7 @@ onUpload(imgIndex) {
failedReason:any;
failedUploadFiles:any;
uploadExcel(){
+
console.log("Device Json Payload",this.uploadJSON);
this.failedUploadFiles = [];
this.Load =true;
diff --git a/src/app/distributers-list/distributers-list.component.html b/src/app/distributers-list/distributers-list.component.html
index 6a08f3a..25fc163 100644
--- a/src/app/distributers-list/distributers-list.component.html
+++ b/src/app/distributers-list/distributers-list.component.html
@@ -74,6 +74,7 @@
{{'Address' | translate}} |
{{'Organisation Name' | translate}} |
{{'Point Allocated' | translate}} |
+ {{'No Of Devices' | translate}} |
{{'Point Shared' | translate}} |
{{'Status' | translate}} |
diff --git a/src/app/distributers-list/distributers-list.component.ts b/src/app/distributers-list/distributers-list.component.ts
index 627a3dc..802928d 100644
--- a/src/app/distributers-list/distributers-list.component.ts
+++ b/src/app/distributers-list/distributers-list.component.ts
@@ -61,7 +61,6 @@ export class DistributersListComponent implements OnInit {
.distinctUntilChanged() // only emit if value is different from previous value
.subscribe(myInput => {
this.myInput = myInput;
- console.log('this.myInput in constructor = > ',this.myInput);
this.tabelObj.draw();
@@ -194,13 +193,20 @@ export class DistributersListComponent implements OnInit {
dataTablesParameters.sort = {_id :-1}
var suburl = "";
- suburl += "/users/datatable";
+ suburl += "/users/distributorsWithDeviceCounts";
// console.log(suburl);
// console.log(dataTablesParameters);
// console.log(suburl)
- that.contactService.post(suburl, dataTablesParameters).subscribe(resp => {
-
- callback(resp);
+ that.contactService.post(suburl, {
+ "organisation": that.useridd,
+ "search":that.myInput,
+ "skip": dataTablesParameters.start / dataTablesParameters.length,
+ "limit": dataTablesParameters.length
+ }).subscribe(resp => {
+
+ callback({
+ draw: 0, recordsFiltered: resp['count'], recordsTotal: resp['count'], data: resp['response']
+ });
}, err => {
// console.log(err);
@@ -324,7 +330,6 @@ export class DistributersListComponent implements OnInit {
"data": "phone",
"render": function (data, type, row) {
- console.log('row=>',row);
var phoneShow = '';
if(row.std_code != undefined){
phoneShow ='+' + row.std_code.dialcode + '-' + data ;
@@ -357,6 +362,12 @@ export class DistributersListComponent implements OnInit {
"render": function (data, type, row) {
return data ? data : "";
}
+ },
+ {
+ "data": "noOfDevices",
+ "render": function (data, type, row) {
+ return data ? data.total : 0;
+ }
},
// {
// "data" : "_id",
diff --git a/src/app/edit-dealer/edit-dealer.component.html b/src/app/edit-dealer/edit-dealer.component.html
index 9d39f37..201e623 100644
--- a/src/app/edit-dealer/edit-dealer.component.html
+++ b/src/app/edit-dealer/edit-dealer.component.html
@@ -61,6 +61,11 @@
{{'Enter Address' | translate}}
+
+ {{'Bussiness Type' | translate}}
+
+
+
diff --git a/src/app/edit-dealer/edit-dealer.component.ts b/src/app/edit-dealer/edit-dealer.component.ts
index f0616c2..f5e423d 100644
--- a/src/app/edit-dealer/edit-dealer.component.ts
+++ b/src/app/edit-dealer/edit-dealer.component.ts
@@ -8,7 +8,7 @@ import { MdDialogRef, MD_DIALOG_DATA } from '@angular/material';
styleUrls: ['./edit-dealer.component.scss']
})
export class EditDealerComponent implements OnInit {
-
+ bussinessType: boolean = false;
dealerInfo:any;
dealerEditForm:any;
firstName:any;
@@ -37,7 +37,9 @@ export class EditDealerComponent implements OnInit {
this.PhoneNum = this.dealerInfo.dealer_payload.phone?this.dealerInfo.dealer_payload.phone:'';
this.address =this.dealerInfo.dealer_payload.address?this.dealerInfo.dealer_payload.address:'';
this.expDate = this.dealerInfo.dealer_payload.expire_date?this.dealerInfo.dealer_payload.expire_date:'';
- console.log(this.dealerInfo);
+ this.bussinessType = this.dealerInfo.dealer_payload.bussinessType ? this.dealerInfo.dealer_payload.bussinessType == "1" ? true : false : false
+ // this.bussinessType = this.dealerInfo.dealer_payload.bussinessType!=undefined ? this.dealerInfo.dealer_payload.bussinessType : false;
+ console.log(this.dealerInfo, this.bussinessType);
// this.pageId = this.dealerInfo.id;
// console.log("PAGEID=>",this.pageId);
@@ -64,6 +66,11 @@ export class EditDealerComponent implements OnInit {
expire_date:new Date(this.expDate),
}
+
+ if (this.bussinessType != undefined) {
+ editDealerPayload['bussinessType'] = this.bussinessType ? "1" : "0";
+ }
+
// this.dealerInfo.dealer_payload.status
if(this.PhoneNum !== this.dealerInfo.dealer_payload.phone){
editDealerPayload['phone'] = this.PhoneNum
diff --git a/src/app/fuel-price/fuel-price.component.scss b/src/app/fuel-price/fuel-price.component.scss
index 88909a5..998b937 100644
--- a/src/app/fuel-price/fuel-price.component.scss
+++ b/src/app/fuel-price/fuel-price.component.scss
@@ -1,46 +1,46 @@
-// #body{
-// overflow-x: hidden;
-// overflow-y: hidden;
-// }
-#myInput {
- border-radius: 15px;
- /* border: 2px solid #18262F; */
- padding: 7px;
- width: 116px;
- height: 17px;
- font-size: 9px;
- outline: none;
- float: right;
- margin-top: 2%;
-}
-
-.headStyle {
- text-align: center;
- font-size: 22px;
- font-weight: 500;
-
- color: #6b6a6a;
- padding-top: 7px;
- margin: 0px;
-}
-.sidebar {
- height: 84vh;
- width: 24%;
- text-align: left;
- background: white;
- box-shadow: 3px 1px 5px 0px #b2b0ae;
- position: fixed;
- padding: 10px;
-}
-.main {
- box-shadow: 3px 1px 5px 0px #b2b0ae;
- padding: 10px;
- background: white;
- // margin-left: 5px;
-}
-
-.topDiv {
- padding-top: 59px;
- background: whitesmoke;
- height: 100vh;
-}
+// #body{
+// overflow-x: hidden;
+// overflow-y: hidden;
+// }
+#myInput {
+ border-radius: 15px;
+ /* border: 2px solid #18262F; */
+ padding: 7px;
+ width: 116px;
+ height: 17px;
+ font-size: 9px;
+ outline: none;
+ float: right;
+ margin-top: 2%;
+}
+
+.headStyle {
+ text-align: center;
+ font-size: 22px;
+ font-weight: 500;
+
+ color: #6b6a6a;
+ padding-top: 7px;
+ margin: 0px;
+}
+.sidebar {
+ height: 84vh;
+ width: 24%;
+ text-align: left;
+ background: white;
+ box-shadow: 3px 1px 5px 0px #b2b0ae;
+ position: fixed;
+ padding: 10px;
+}
+.main {
+ box-shadow: 3px 1px 5px 0px #b2b0ae;
+ padding: 10px;
+ background: white;
+ // margin-left: 5px;
+}
+
+.topDiv {
+ padding-top: 59px;
+ background: whitesmoke;
+ height: 100vh;
+}
diff --git a/src/app/gps-master/gps-master.component.ts b/src/app/gps-master/gps-master.component.ts
index 9f532e0..2e96cd1 100644
--- a/src/app/gps-master/gps-master.component.ts
+++ b/src/app/gps-master/gps-master.component.ts
@@ -17,6 +17,7 @@ import { FlashMessagesService } from 'angular2-flash-messages';
export class GpsMasterComponent implements OnInit {
Fromdate=new Date();
todate=new Date();
+ reportData : any = [];
tabelObj: any;
emailid: any;
useridd: any;
@@ -148,10 +149,13 @@ export class GpsMasterComponent implements OnInit {
// if(id != 0)
console.log('calling api');
that.contactService.post(suburl, dataTablesParameters).subscribe(resp => {
+ // console.log('resp',resp);
+ that.reportData = resp['data'];
callback(resp);
}, err => {
// console.log(err);
// console.log(err.status);
+ that.reportData = [];
callback({data:[]})
});
@@ -377,7 +381,96 @@ deviceName1:any;
tab:any;
-exportExcel()
+ exportExcel() {
+ this.downloadFile(this.reportData)
+ }
+ downloadFile(data) {
+ let arrHeader = ['imei','latDecimal','longDecimal','speed','date','insertionTime','syncedAt','integrationResponse','ignition','power','GPS','isFluctuation','isPastData','external_Battery','fuelVoltage','currentFuel','raw','ac','powerCutAlarm','satellites'] ;
+ let csvData = this.ConvertToCSV(data, arrHeader);
+ let blob = new Blob(['\ufeff' + csvData], { type: 'text/csv;charset=utf-8;' });
+ let dwldLink = document.createElement("a");
+ let url = URL.createObjectURL(blob);
+ let isSafariBrowser = navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1;
+ if (isSafariBrowser) { //if Safari open in new window to save file with random filename.
+ dwldLink.setAttribute("target", "_blank");
+ }
+ dwldLink.setAttribute("href", url);
+ dwldLink.setAttribute("download", "systemLogs.csv");
+ dwldLink.style.visibility = "hidden";
+ document.body.appendChild(dwldLink);
+ dwldLink.click();
+ document.body.removeChild(dwldLink);
+ this.Load = false;
+ }
+ convertToDate(element, key) {
+ if (element[key]) {
+ var device_time = new Date(element[key]);
+ return device_time ? (moment(device_time).format('dddd,ll,LTS')) : "";
+ } else {
+ return element[key]
+ }
+ }
+ ConvertToCSV(objArray, headerList) {
+ let array = typeof objArray != 'object' ? JSON.parse(objArray) : objArray;
+ array = JSON.parse(JSON.stringify(array));
+ array.forEach(element => {
+ element['date'] = this.convertToDate(element,'date');
+ element['insertionTime'] = this.convertToDate(element, 'insertionTime')
+ element['syncedAt'] = this.convertToDate(element, 'syncedAt')
+ element['date'] = this.convertToDate(element, 'date')
+ if (element.integrationResponse){
+ if (typeof (element.integrationResponse) === 'object') {
+ element.integrationResponse = JSON.stringify(element.integrationResponse);
+ }
+ }
+ if (element.fuelVoltage) {
+ element.fuelVoltage = element.fuelVoltage ? (element.fuelVoltage / 1000).toFixed(2):'';
+ }
+ });
+ // console.log(array,"<===");Distance 126.94
+ // Running 2:1
+ // Idle 1:56
+ // Stop
+
+ let str = 'Customer List \r\n';
+ let row = 'S.No,';
+ // name,emial,phone,id,password and status no of vehicles
+ let newHeaders = ['Device IMEI', 'Lattitude', 'Longitude', 'Speed', 'Device Time', 'Insertion Time', 'Last Push', 'Integration Respnse', 'Ignition', 'Power', 'GPS positioned', 'isFluctuation', 'isPastData', 'Ext. Volt.', 'Fuel Volt.', 'Fuel Value (L)', 'Raw Data', 'AC', 'Powercut Alarm', 'Sattelite'];
+ for (let index in newHeaders) {
+ row += newHeaders[index] + ',';
+ }
+ row = row.slice(0, -1);
+ str += row + '\r\n';
+ for (let i = 0; i < array.length; i++) {
+
+
+ let line = (i + 1) + '';
+ if (i < array.length) { }
+ for (let index in headerList) {
+ let head = headerList[index];
+ line += ',' + this.strRep(array[i][head]);
+ }
+ str += line + '\r\n';
+
+ }
+ return str;
+ }
+ strRep(data) {
+ if (typeof data == "string") {
+ let newData = data.replace(/,/g, " ");
+ return newData;
+ }
+ else if (typeof data == "undefined") {
+ return "-";
+ }
+ else if (typeof data == "number") {
+ return data.toString();
+ }
+ else {
+ return data;
+ }
+ }
+exportExcelOld()
{
var tab_text=" ";
diff --git a/src/app/inactive-admin/inactive-admin.component.scss b/src/app/inactive-admin/inactive-admin.component.scss
index f283bbb..28f016e 100644
--- a/src/app/inactive-admin/inactive-admin.component.scss
+++ b/src/app/inactive-admin/inactive-admin.component.scss
@@ -1,109 +1,109 @@
-.headStyle {
- text-align: center;
- font-size: 22px;
- font-weight: 500;
- margin-top: 10px;
- color: #6b6a6a;
-}
-
-.InputStyle {
- padding: 10px;
- padding-bottom: 20px;
- background-color: #efefef;
- margin-bottom: 10px;
- .selecStyle {
- display: inherit;
- width: 56%;
- padding-left: 16px;
- margin-left: 50px;
-
- border-radius: 10px;
- }
-}
-
-.topDiv {
- padding-top: 59px;
- background: whitesmoke;
- height: 100vh;
-}
-
-.rowStyle {
- // margin: 5px;
- // background: white;
- height: 84vh;
- // box-shadow: 3px 1px 5px 0px #b2b0ae;
-}
-
-#deviceTable input {
- border-radius: 5px;
-}
-
-::-webkit-scrollbar {
- width: 10px;
-}
-
-/* Track */
-::-webkit-scrollbar-track {
- background: rgb(153, 153, 153);
-}
-
-/* Handle */
-::-webkit-scrollbar-thumb {
- // background: rgb(74, 118, 184);
- background: #868e96;
-}
-
-/* Handle on hover */
-::-webkit-scrollbar-thumb:hover {
- background: #555;
-}
-
-#toast {
- visibility: hidden;
- // max-width: 150px;
- 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: 150px;
- height: 150px;
-
- 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;
-}
+.headStyle {
+ text-align: center;
+ font-size: 22px;
+ font-weight: 500;
+ margin-top: 10px;
+ color: #6b6a6a;
+}
+
+.InputStyle {
+ padding: 10px;
+ padding-bottom: 20px;
+ background-color: #efefef;
+ margin-bottom: 10px;
+ .selecStyle {
+ display: inherit;
+ width: 56%;
+ padding-left: 16px;
+ margin-left: 50px;
+
+ border-radius: 10px;
+ }
+}
+
+.topDiv {
+ padding-top: 59px;
+ background: whitesmoke;
+ height: 100vh;
+}
+
+.rowStyle {
+ // margin: 5px;
+ // background: white;
+ height: 84vh;
+ // box-shadow: 3px 1px 5px 0px #b2b0ae;
+}
+
+#deviceTable input {
+ border-radius: 5px;
+}
+
+::-webkit-scrollbar {
+ width: 10px;
+}
+
+/* Track */
+::-webkit-scrollbar-track {
+ background: rgb(153, 153, 153);
+}
+
+/* Handle */
+::-webkit-scrollbar-thumb {
+ // background: rgb(74, 118, 184);
+ background: #868e96;
+}
+
+/* Handle on hover */
+::-webkit-scrollbar-thumb:hover {
+ background: #555;
+}
+
+#toast {
+ visibility: hidden;
+ // max-width: 150px;
+ 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: 150px;
+ height: 150px;
+
+ 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;
+}
diff --git a/src/app/issue-list/issue-list.component.scss b/src/app/issue-list/issue-list.component.scss
index 380b366..ab6827e 100644
--- a/src/app/issue-list/issue-list.component.scss
+++ b/src/app/issue-list/issue-list.component.scss
@@ -1,109 +1,109 @@
-.headStyle {
- text-align: center;
- font-size: 22px;
- font-weight: 500;
- margin-top: 10px;
- color: #6b6a6a;
-}
-
-.InputStyle {
- padding: 10px;
- padding-bottom: 20px;
- background-color: #efefef;
- margin-bottom: 10px;
- .selecStyle {
- display: inherit;
- width: 56%;
- padding-left: 16px;
- margin-left: 50px;
-
- border-radius: 10px;
- }
-}
-
-.topDiv {
- padding-top: 59px;
- background: whitesmoke;
- height: 100vh;
-}
-
-.rowStyle {
- // margin: 5px;
- // background: white;
- height: 84vh;
- // box-shadow: 3px 1px 5px 0px #b2b0ae;
-}
-
-#deviceTable input {
- border-radius: 5px;
-}
-
-::-webkit-scrollbar {
- width: 10px;
-}
-
-/* Track */
-::-webkit-scrollbar-track {
- background: rgb(153, 153, 153);
-}
-
-/* Handle */
-::-webkit-scrollbar-thumb {
- // background: rgb(74, 118, 184);
- background: #868e96;
-}
-
-/* Handle on hover */
-::-webkit-scrollbar-thumb:hover {
- background: #555;
-}
-
-#toast {
- visibility: hidden;
- max-width: 150px;
- 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: 150px;
- height: 150px;
-
- 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;
-}
+.headStyle {
+ text-align: center;
+ font-size: 22px;
+ font-weight: 500;
+ margin-top: 10px;
+ color: #6b6a6a;
+}
+
+.InputStyle {
+ padding: 10px;
+ padding-bottom: 20px;
+ background-color: #efefef;
+ margin-bottom: 10px;
+ .selecStyle {
+ display: inherit;
+ width: 56%;
+ padding-left: 16px;
+ margin-left: 50px;
+
+ border-radius: 10px;
+ }
+}
+
+.topDiv {
+ padding-top: 59px;
+ background: whitesmoke;
+ height: 100vh;
+}
+
+.rowStyle {
+ // margin: 5px;
+ // background: white;
+ height: 84vh;
+ // box-shadow: 3px 1px 5px 0px #b2b0ae;
+}
+
+#deviceTable input {
+ border-radius: 5px;
+}
+
+::-webkit-scrollbar {
+ width: 10px;
+}
+
+/* Track */
+::-webkit-scrollbar-track {
+ background: rgb(153, 153, 153);
+}
+
+/* Handle */
+::-webkit-scrollbar-thumb {
+ // background: rgb(74, 118, 184);
+ background: #868e96;
+}
+
+/* Handle on hover */
+::-webkit-scrollbar-thumb:hover {
+ background: #555;
+}
+
+#toast {
+ visibility: hidden;
+ max-width: 150px;
+ 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: 150px;
+ height: 150px;
+
+ 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;
+}
diff --git a/src/app/job-card/add-job-card/add-job-card.component.scss b/src/app/job-card/add-job-card/add-job-card.component.scss
index 32ea635..01db341 100644
--- a/src/app/job-card/add-job-card/add-job-card.component.scss
+++ b/src/app/job-card/add-job-card/add-job-card.component.scss
@@ -1,12 +1,12 @@
-.topDiv {
- padding-top: 59px;
- background: whitesmoke;
- height: 100vh;
-}
-
-.rowStyle {
- // margin: 5px;
- // background: white;
- height: 84vh;
- // box-shadow: 3px 1px 5px 0px #b2b0ae;
-}
+.topDiv {
+ padding-top: 59px;
+ background: whitesmoke;
+ height: 100vh;
+}
+
+.rowStyle {
+ // margin: 5px;
+ // background: white;
+ height: 84vh;
+ // box-shadow: 3px 1px 5px 0px #b2b0ae;
+}
diff --git a/src/app/job-card/job-card.component.scss b/src/app/job-card/job-card.component.scss
index 380b366..ab6827e 100644
--- a/src/app/job-card/job-card.component.scss
+++ b/src/app/job-card/job-card.component.scss
@@ -1,109 +1,109 @@
-.headStyle {
- text-align: center;
- font-size: 22px;
- font-weight: 500;
- margin-top: 10px;
- color: #6b6a6a;
-}
-
-.InputStyle {
- padding: 10px;
- padding-bottom: 20px;
- background-color: #efefef;
- margin-bottom: 10px;
- .selecStyle {
- display: inherit;
- width: 56%;
- padding-left: 16px;
- margin-left: 50px;
-
- border-radius: 10px;
- }
-}
-
-.topDiv {
- padding-top: 59px;
- background: whitesmoke;
- height: 100vh;
-}
-
-.rowStyle {
- // margin: 5px;
- // background: white;
- height: 84vh;
- // box-shadow: 3px 1px 5px 0px #b2b0ae;
-}
-
-#deviceTable input {
- border-radius: 5px;
-}
-
-::-webkit-scrollbar {
- width: 10px;
-}
-
-/* Track */
-::-webkit-scrollbar-track {
- background: rgb(153, 153, 153);
-}
-
-/* Handle */
-::-webkit-scrollbar-thumb {
- // background: rgb(74, 118, 184);
- background: #868e96;
-}
-
-/* Handle on hover */
-::-webkit-scrollbar-thumb:hover {
- background: #555;
-}
-
-#toast {
- visibility: hidden;
- max-width: 150px;
- 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: 150px;
- height: 150px;
-
- 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;
-}
+.headStyle {
+ text-align: center;
+ font-size: 22px;
+ font-weight: 500;
+ margin-top: 10px;
+ color: #6b6a6a;
+}
+
+.InputStyle {
+ padding: 10px;
+ padding-bottom: 20px;
+ background-color: #efefef;
+ margin-bottom: 10px;
+ .selecStyle {
+ display: inherit;
+ width: 56%;
+ padding-left: 16px;
+ margin-left: 50px;
+
+ border-radius: 10px;
+ }
+}
+
+.topDiv {
+ padding-top: 59px;
+ background: whitesmoke;
+ height: 100vh;
+}
+
+.rowStyle {
+ // margin: 5px;
+ // background: white;
+ height: 84vh;
+ // box-shadow: 3px 1px 5px 0px #b2b0ae;
+}
+
+#deviceTable input {
+ border-radius: 5px;
+}
+
+::-webkit-scrollbar {
+ width: 10px;
+}
+
+/* Track */
+::-webkit-scrollbar-track {
+ background: rgb(153, 153, 153);
+}
+
+/* Handle */
+::-webkit-scrollbar-thumb {
+ // background: rgb(74, 118, 184);
+ background: #868e96;
+}
+
+/* Handle on hover */
+::-webkit-scrollbar-thumb:hover {
+ background: #555;
+}
+
+#toast {
+ visibility: hidden;
+ max-width: 150px;
+ 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: 150px;
+ height: 150px;
+
+ 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;
+}
diff --git a/src/app/kyc-approval/device-doc/device-doc.component.html b/src/app/kyc-approval/device-doc/device-doc.component.html
index 7d9b576..3ef24f1 100644
--- a/src/app/kyc-approval/device-doc/device-doc.component.html
+++ b/src/app/kyc-approval/device-doc/device-doc.component.html
@@ -21,7 +21,20 @@
- ![]() |
+
+
+
+
+ |
+
+
+
+
+ Not Available
+
+ |
+
+
| {{item.phone}} |
{{item.doctype}} |
diff --git a/src/app/kyc-approval/device-doc/device-doc.component.scss b/src/app/kyc-approval/device-doc/device-doc.component.scss
index aefb4da..ad57697 100644
--- a/src/app/kyc-approval/device-doc/device-doc.component.scss
+++ b/src/app/kyc-approval/device-doc/device-doc.component.scss
@@ -1,121 +1,121 @@
-.mainClass {
- padding-top: 80px;
-
- margin-right: 10px;
- box-shadow: 4px 5px #ececec;
-}
-
-.mainClass p.head_style {
- padding-top: 8px;
- color: white;
- margin-bottom: 0px;
-}
-
-/* .mainClass p.head_style1{
- font-size: 15px;
- font-weight: 500;
- color: #615c5c;
- text-align: left;
- padding-left: 1%;
-} */
-
-/* .rowStyle{
- padding-right: 15%;
-} */
-
-.formfieldstyle {
- width: 40%;
-}
-
-// .rowHeight {
-// height: 145px;
-// overflow: auto;
-// }
-
-#toast {
- visibility: hidden;
- max-width: 150px;
- 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: 150px;
- 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;
-}
-
-/deep/ .mat-input-flex {
- border: 1px solid #c1c1c1;
- background: #f2f2f2;
-}
-.modal-class {
- position: absolute;
- bottom: 0;
- right: 0;
-}
-#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;
-}
-
-.modal-lg {
- max-width: 1068px;
-}
-::ng-deep .modal-dialog {
- max-width: 1200px !important;
- width: 1200px;
-}
+.mainClass {
+ padding-top: 80px;
+
+ margin-right: 10px;
+ box-shadow: 4px 5px #ececec;
+}
+
+.mainClass p.head_style {
+ padding-top: 8px;
+ color: white;
+ margin-bottom: 0px;
+}
+
+/* .mainClass p.head_style1{
+ font-size: 15px;
+ font-weight: 500;
+ color: #615c5c;
+ text-align: left;
+ padding-left: 1%;
+} */
+
+/* .rowStyle{
+ padding-right: 15%;
+} */
+
+.formfieldstyle {
+ width: 40%;
+}
+
+// .rowHeight {
+// height: 145px;
+// overflow: auto;
+// }
+
+#toast {
+ visibility: hidden;
+ max-width: 150px;
+ 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: 150px;
+ 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;
+}
+
+/deep/ .mat-input-flex {
+ border: 1px solid #c1c1c1;
+ background: #f2f2f2;
+}
+.modal-class {
+ position: absolute;
+ bottom: 0;
+ right: 0;
+}
+#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;
+}
+
+.modal-lg {
+ max-width: 1068px;
+}
+::ng-deep .modal-dialog {
+ max-width: 1200px !important;
+ width: 1200px;
+}
diff --git a/src/app/kyc-approval/device-doc/device-doc.component.ts b/src/app/kyc-approval/device-doc/device-doc.component.ts
index d052890..92a98ba 100644
--- a/src/app/kyc-approval/device-doc/device-doc.component.ts
+++ b/src/app/kyc-approval/device-doc/device-doc.component.ts
@@ -121,7 +121,9 @@ export class DeviceDocComponent implements OnInit {
ngOnInit() {
this.bsConfig = Object.assign({}, { containerClass: 'theme-dark-blue' });
}
-
+ hasPdfFile(url) {
+ return url && url.indexOf(".pdf") != -1;
+ }
AddDocumentsField(addedRow:any){
@@ -271,9 +273,11 @@ titleForDoc
openModal(template: TemplateRef,doc){
this.modalRef = this.modalService.show(template,{'backdrop':'static',class:'modal-dialog-centered'});
// this.number=doc.phone;
- var name=(this.data.dealer_payload.user?this.data.dealer_payload.user.first_name?this.data.dealer_payload.user.first_name:"":''+" "+
- this.data.dealer_payload.user?this.data.dealer_payload.user.last_name?this.data.dealer_payload.user.last_name:"":'')
- this.titleForDoc=doc.doctype?doc.doctype=="Adhar card1"?"Adhar card Front":doc.doctype=="Adhar card2"?"Adhar card Back":doc.doctype:doc.doctype
+ let fname = this.data.dealer_payload.user && this.data.dealer_payload.user.first_name ? this.data.dealer_payload.user.first_name : "";
+ let lName = this.data.dealer_payload.user && this.data.dealer_payload.user.last_name ? this.data.dealer_payload.user.last_name : '';
+ var name = fname + " " + lName
+
+ this.titleForDoc=doc.doctype?doc.doctype=="Adhar card1"?"Adhar card Front":doc.doctype=="Adhar card2"?"Adhar card Back":doc.doctype:doc.doctype
this.key=[];
this.value=[]
if(doc.doctype=="Adhar card1" || doc.doctype=="Adhar card1 *"){
@@ -283,6 +287,7 @@ openModal(template: TemplateRef,doc){
doc.phone]
}else if(doc.doctype=="Adhar card2" || doc.doctype=="Adhar card2 *"){
+
this.key=['Name',"Address","Adhaar no"];
this.value=[this.data.dealer_payload.user?this.data.dealer_payload.user.first_name?this.data.dealer_payload.user.first_name:"":''+" "+
this.data.dealer_payload.user?this.data.dealer_payload.user.last_name?this.data.dealer_payload.user.last_name:"":'',
@@ -297,7 +302,7 @@ openModal(template: TemplateRef,doc){
this.data.dealer_payload.ChassisNo?this.data.dealer_payload.ChassisNo:"",
doc.phone]
-
+ console.log('this.value', this.value, name)
}else if(doc.doctype=="vehicle RC"|| doc.doctype=="vehicle RC"){
this.key=['Name',"Vehicle Number","Address","Engine No.","Chassis No.","Number"];
this.value=[name,
diff --git a/src/app/kyc-approval/device-kyc/device-kyc.component.html b/src/app/kyc-approval/device-kyc/device-kyc.component.html
index 3392ae7..c1b1e93 100644
--- a/src/app/kyc-approval/device-kyc/device-kyc.component.html
+++ b/src/app/kyc-approval/device-kyc/device-kyc.component.html
@@ -170,6 +170,9 @@
{{ "View" | translate }}
|
+
+ {{ "Edit" | translate }}
+ |
@@ -355,6 +358,10 @@
|
+
+
+ |
+
diff --git a/src/app/kyc-approval/device-kyc/device-kyc.component.scss b/src/app/kyc-approval/device-kyc/device-kyc.component.scss
index 057f052..0567c73 100644
--- a/src/app/kyc-approval/device-kyc/device-kyc.component.scss
+++ b/src/app/kyc-approval/device-kyc/device-kyc.component.scss
@@ -1,65 +1,65 @@
-.btn {
- display: inline-block;
- margin-bottom: 0;
-
- text-align: center;
- text-transform: uppercase;
- vertical-align: middle;
- cursor: pointer;
- background-image: none;
-
- padding: 6px 12px;
- font-size: 1.4rem;
- border-radius: 0px;
- border: 1px solid transparent;
- text-decoration: none;
- user-select: none;
- background: #d8d8d8;
- font-size: 12px;
-
- &,
- &:active,
- &.active {
- &:focus {
- outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
- }
- }
-
- &:hover,
- &:focus,
- &.focus {
- text-decoration: none;
- color: #fff;
- }
-
- &:active,
- &.active {
- outline: 0;
- background-image: none;
- }
-
- &.disabled,
- &[disabled],
- fieldset[disabled] & {
- cursor: not-allowed;
- pointer-events: none;
- box-shadow: none;
- }
-
- &.btn-xs {
- padding: 3px 6px;
- font-size: 1.2rem;
- }
-
- &.btn-sm {
- padding: 4px 8px;
- font-size: 1.3rem;
- }
-
- &.btn-lg {
- padding: 8px 16px;
- font-size: 1.6rem;
- }
-}
+.btn {
+ display: inline-block;
+ margin-bottom: 0;
+
+ text-align: center;
+ text-transform: uppercase;
+ vertical-align: middle;
+ cursor: pointer;
+ background-image: none;
+
+ padding: 6px 12px;
+ font-size: 1.4rem;
+ border-radius: 0px;
+ border: 1px solid transparent;
+ text-decoration: none;
+ user-select: none;
+ background: #d8d8d8;
+ font-size: 12px;
+
+ &,
+ &:active,
+ &.active {
+ &:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+ }
+ }
+
+ &:hover,
+ &:focus,
+ &.focus {
+ text-decoration: none;
+ color: #fff;
+ }
+
+ &:active,
+ &.active {
+ outline: 0;
+ background-image: none;
+ }
+
+ &.disabled,
+ &[disabled],
+ fieldset[disabled] & {
+ cursor: not-allowed;
+ pointer-events: none;
+ box-shadow: none;
+ }
+
+ &.btn-xs {
+ padding: 3px 6px;
+ font-size: 1.2rem;
+ }
+
+ &.btn-sm {
+ padding: 4px 8px;
+ font-size: 1.3rem;
+ }
+
+ &.btn-lg {
+ padding: 8px 16px;
+ font-size: 1.6rem;
+ }
+}
diff --git a/src/app/kyc-approval/device-kyc/device-kyc.component.ts b/src/app/kyc-approval/device-kyc/device-kyc.component.ts
index 22b00fa..fb9cf04 100644
--- a/src/app/kyc-approval/device-kyc/device-kyc.component.ts
+++ b/src/app/kyc-approval/device-kyc/device-kyc.component.ts
@@ -16,6 +16,7 @@ import { NormalCertComponent } from '../../device/normal-cert/normal-cert.compon
import { CertOptionComponent } from '../../device/cert-option/cert-option.component';
import { EditDeviceMasterComponent } from '../../device/edit-device-master/edit-device-master.component';
declare var swal: any;
+import * as moment from 'moment';
@Component({
selector: 'app-device-kyc',
@@ -335,6 +336,11 @@ searchFilter(text: string) {
// that.limit = len;
this.getCustomer();
}
+ editDevice(data) {
+ localStorage.setItem('deviceData', JSON.stringify(data))
+ localStorage.setItem('KycApprovalRedirect','true');
+ this.router.navigate(['/editDevice']);
+ }
getCustomer(){
this.Load = true;
var url="/devices/getAllVehi?id="+this.organisation+"&skip="+this.skip+'&limit='+this.limit
@@ -452,10 +458,31 @@ tab:any;
// var custumer=[];
// custumer = data;
for(var i=0;i dImageDoc.doctype == 'Adhar card1 *');
+ if (findData) {
+ this.custumer[i].DocName = 'Aadhar Card';
+ this.custumer[i].adharNumber = findData.phone ? findData.phone.replaceAll('-','') : '-' ;
+ }
+ }
+ let lastName = this.custumer[i].user && this.custumer[i].user.last_name ? this.custumer[i].user.last_name : '';
+ console.log(lastName);
+ this.custumer[i].Dphone ='-';
+ this.custumer[i].kycApprovalDateOnly = moment(this.custumer[i].kycApprovalDate).format("DD/MM/YYYY");
+ this.custumer[i].fuelType = '-';
+ this.custumer[i].stateServer = '-';
+ this.custumer[i].email = this.custumer[i].user && this.custumer[i].user.email ? this.custumer[i].user.email : ''
+ this.custumer[i].Dealer_full_name = (this.custumer[i] && this.custumer[i].Dealer && this.custumer[i].Dealer.first_name ? this.custumer[i].Dealer.first_name : '') + ' ' + (this.custumer[i] && this.custumer[i].Dealer &&this.custumer[i].Dealer.last_name ? this.custumer[i].Dealer.last_name : '')
+ //this.custumer[i].Dealer_full_name = (this.custumer[i].Dealer.first_name ? this.custumer[i].Dealer.first_name : '') + ' ' +(this.custumer[i].Dealer.last_name ? this.custumer[i].Dealer.last_name : '');
+ // this.custumer[i].email=this.custumer[i].user.email?this.custumer[i].user.email:''
+ this.custumer[i].user_id = this.custumer[i].user && this.custumer[i].user.user_id?this.custumer[i].user.user_id:''
+ this.custumer[i].phone = this.custumer[i].user && this.custumer[i].user.phone?this.custumer[i].user.phone:'';
+ this.custumer[i].address = this.custumer[i].user && this.custumer[i].user.address ? this.custumer[i].user.address : ''
+ this.custumer[i].fullName = (this.custumer[i].user && this.custumer[i].user.first_name ? this.custumer[i].user.first_name : '') + " " + (lastName ? lastName :'');
+ console.log(this.custumer[i].fullName);
if(i==(this.custumer.length-1)){
this.downloadFile(this.custumer);
@@ -479,8 +506,8 @@ tab:any;
}
downloadFile(data) {
-
- let arrHeader = ["fullName", "email", "phone", "user_id","kycStatus","Device_Name","Device_ID","esim_validity","remark","RtoState","RtoCity"];
+ let arrHeader = ["Device_ID", "kycApprovalDateOnly", "vahanID", "device_Type_csv", "IccidNo", "sim_number", "sim_number2", 'sim_provider', 'License', 'Dealer_full_name', 'phone', 'DocName', 'adharNumber', "fullName", "ConcernPersonName", 'phone', 'manufacturingCompany', 'Model', 'ChassisNo', 'engineNo', 'fuelType', 'Device_Name', 'transportOfficeCity', 'transportOfficeState', 'pin', "transportOfficeState", 'rto', "stateServer", 'state_certifcate_date', 'DocName', 'adharNumber', 'address'];
+ let arrHeaderOld = ["fullName", "email", "phone", "user_id","kycStatus","Device_Name","Device_ID","esim_validity","remark","RtoState","RtoCity"];
let csvData = this.ConvertToCSV(data, arrHeader);
let blob = new Blob(['\ufeff' + csvData], { type: 'text/csv;charset=utf-8;' });
let dwldLink = document.createElement("a");
@@ -507,7 +534,8 @@ tab:any;
let str = 'Customer List \r\n';
let row = 'S.No,';
// name,emial,phone,id,password and status no of vehicles
- let newHeaders =["Name", "Email", "Phone", "User id","KYC Status","Device Name","IMEI","E Sim Validity","Remark","RTO State","RTO City"];
+ let newHeaders = ['IMEI NO.', 'KYC Approve Date', 'DEVICE ID', 'Device Model', 'ICCID NO.', 'SIM 1', 'SIM 2', 'Profile', 'Plan', 'Dealership- Distributor Name', 'D. Mobile', 'ID Proof Document', 'ID NO', 'Customer Name', 'Concern Person Name', 'Mobile No', 'MAKE BY', 'Model', 'Chassis No', 'Engine No', 'Fuel Type', 'Vehicle No.', 'CITY', 'State', 'PIN', 'RTO STATE', 'RTO NAME', 'STATE SERVER', 'State certificate Generation Date', 'Address Proof Document', 'Address ProofDocument No.', 'ADDRESS'];
+ let newHeadersOld =["Name", "Email", "Phone", "User id","KYC Status","Device Name","IMEI","E Sim Validity","Remark","RTO State","RTO City"];
for (let index in newHeaders) {
row += newHeaders[index] + ',';
diff --git a/src/app/kyc-approval/kyc-approval.component.scss b/src/app/kyc-approval/kyc-approval.component.scss
index a6aa3d4..f274dda 100644
--- a/src/app/kyc-approval/kyc-approval.component.scss
+++ b/src/app/kyc-approval/kyc-approval.component.scss
@@ -1,372 +1,372 @@
-.btn {
- display: inline-block;
- margin-bottom: 0;
-
- text-align: center;
- text-transform: uppercase;
- vertical-align: middle;
- cursor: pointer;
- background-image: none;
-
- padding: 6px 12px;
- font-size: 1.4rem;
- border-radius: 0px;
- border: 1px solid transparent;
- text-decoration: none;
- user-select: none;
- background: #d8d8d8;
- font-size: 12px;
-
- &,
- &:active,
- &.active {
- &:focus {
- outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
- }
- }
-
- &:hover,
- &:focus,
- &.focus {
- text-decoration: none;
- color: #fff;
- }
-
- &:active,
- &.active {
- outline: 0;
- background-image: none;
- }
-
- &.disabled,
- &[disabled],
- fieldset[disabled] & {
- cursor: not-allowed;
- pointer-events: none;
- box-shadow: none;
- }
-
- &.btn-xs {
- padding: 3px 6px;
- font-size: 1.2rem;
- }
-
- &.btn-sm {
- padding: 4px 8px;
- font-size: 1.3rem;
- }
-
- &.btn-lg {
- padding: 8px 16px;
- font-size: 1.6rem;
- }
-}
-button,
-input {
- font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
-}
-
-a {
- color: #f96332;
-}
-
-a:hover,
-a:focus {
- color: #f96332;
-}
-
-p {
- line-height: 1.61em;
- font-weight: 300;
- font-size: 1.2em;
-}
-
-.category {
- text-transform: capitalize;
- font-weight: 700;
- color: #9a9a9a;
-}
-
-body {
- color: #2c2c2c;
- font-size: 14px;
- font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
- overflow-x: hidden;
- -moz-osx-font-smoothing: grayscale;
- -webkit-font-smoothing: antialiased;
-}
-
-.nav-item .nav-link,
-.nav-tabs .nav-link {
- -webkit-transition: all 300ms ease 0s;
- -moz-transition: all 300ms ease 0s;
- -o-transition: all 300ms ease 0s;
- -ms-transition: all 300ms ease 0s;
- transition: all 300ms ease 0s;
-}
-
-.card a {
- -webkit-transition: all 150ms ease 0s;
- -moz-transition: all 150ms ease 0s;
- -o-transition: all 150ms ease 0s;
- -ms-transition: all 150ms ease 0s;
- transition: all 150ms ease 0s;
-}
-
-[data-toggle="collapse"][data-parent="#accordion"] i {
- -webkit-transition: transform 150ms ease 0s;
- -moz-transition: transform 150ms ease 0s;
- -o-transition: transform 150ms ease 0s;
- -ms-transition: all 150ms ease 0s;
- transition: transform 150ms ease 0s;
-}
-
-[data-toggle="collapse"][data-parent="#accordion"][aria-expanded="true"] i {
- filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
- -webkit-transform: rotate(180deg);
- -ms-transform: rotate(180deg);
- transform: rotate(180deg);
-}
-
-.now-ui-icons {
- display: inline-block;
- font: normal normal normal 14px/1 "Nucleo Outline";
- font-size: inherit;
- // speak: none;
- text-transform: none;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-@-webkit-keyframes nc-icon-spin {
- 0% {
- -webkit-transform: rotate(0deg);
- }
-
- 100% {
- -webkit-transform: rotate(360deg);
- }
-}
-
-@-moz-keyframes nc-icon-spin {
- 0% {
- -moz-transform: rotate(0deg);
- }
-
- 100% {
- -moz-transform: rotate(360deg);
- }
-}
-
-@keyframes nc-icon-spin {
- 0% {
- -webkit-transform: rotate(0deg);
- -moz-transform: rotate(0deg);
- -ms-transform: rotate(0deg);
- -o-transform: rotate(0deg);
- transform: rotate(0deg);
- }
-
- 100% {
- -webkit-transform: rotate(360deg);
- -moz-transform: rotate(360deg);
- -ms-transform: rotate(360deg);
- -o-transform: rotate(360deg);
- transform: rotate(360deg);
- }
-}
-
-.now-ui-icons.objects_umbrella-13:before {
- content: "\ea5f";
-}
-
-.now-ui-icons.shopping_cart-simple:before {
- content: "\ea1d";
-}
-
-.now-ui-icons.shopping_shop:before {
- content: "\ea50";
-}
-
-.now-ui-icons.ui-2_settings-90:before {
- content: "\ea4b";
-}
-
-.nav-tabs {
- border: 0;
- padding: 15px 0.7rem;
-}
-
-.nav-tabs:not(.nav-tabs-neutral) > .nav-item > .nav-link.active {
- box-shadow: 0px 5px 35px 0px rgba(0, 0, 0, 0.3);
-}
-
-.card .nav-tabs {
- border-top-right-radius: 0.1875rem;
- border-top-left-radius: 0.1875rem;
-}
-
-.nav-tabs > .nav-item > .nav-link {
- color: #888888;
- margin: 0;
- margin-right: 5px;
- background-color: transparent;
- border: 1px solid transparent;
- border-radius: 30px;
- font-size: 14px;
- padding: 11px 23px;
- line-height: 1.5;
-}
-
-.nav-tabs > .nav-item > .nav-link:hover {
- background-color: transparent;
-}
-
-.nav-tabs > .nav-item > .nav-link.active {
- background-color: #444;
- border-radius: 30px;
- color: #ffffff;
-}
-
-.nav-tabs > .nav-item > .nav-link i.now-ui-icons {
- font-size: 14px;
- position: relative;
- top: 1px;
- margin-right: 3px;
-}
-
-.nav-tabs.nav-tabs-neutral > .nav-item > .nav-link {
- color: #ffffff;
-}
-
-.nav-tabs.nav-tabs-neutral > .nav-item > .nav-link.active {
- background-color: rgba(255, 255, 255, 0.2);
- color: #ffffff;
-}
-
-.card {
- border: 0;
- border-radius: 0.1875rem;
- display: inline-block;
- position: relative;
- width: 100%;
- // margin-bottom: 30px;
- // box-shadow: 0px 5px 25px 0px rgba(0, 0, 0, 0.2);
-}
-
-.card .card-header {
- background-color: transparent;
- border-bottom: 0;
- background-color: transparent;
- border-radius: 0;
- padding: 0;
-}
-
-.card[data-background-color="orange"] {
- // background-color: #2d4262;
-}
-
-.card[data-background-color="red"] {
- background-color: #ff3636;
-}
-
-.card[data-background-color="yellow"] {
- background-color: #ffb236;
-}
-
-.card[data-background-color="blue"] {
- background-color: #2ca8ff;
-}
-
-.card[data-background-color="green"] {
- background-color: #15b60d;
-}
-
-[data-background-color="orange"] {
- // background-color: #2d4262;
-}
-
-[data-background-color="black"] {
- // background-color: #2c2c2c;
-}
-
-[data-background-color]:not([data-background-color="gray"]) {
- color: #ffffff;
-}
-
-[data-background-color]:not([data-background-color="gray"]) p {
- color: #ffffff;
-}
-
-[data-background-color]:not([data-background-color="gray"])
- a:not(.btn):not(.dropdown-item) {
- color: #ffffff;
-}
-
-[data-background-color]:not([data-background-color="gray"])
- .nav-tabs
- > .nav-item
- > .nav-link
- i.now-ui-icons {
- color: #ffffff;
-}
-
-@font-face {
- font-family: "Nucleo Outline";
- src: url("https://github.com/creativetimofficial/now-ui-kit/blob/master/assets/fonts/nucleo-outline.eot");
- src: url("https://github.com/creativetimofficial/now-ui-kit/blob/master/assets/fonts/nucleo-outline.eot")
- format("embedded-opentype");
- src: url("https://raw.githack.com/creativetimofficial/now-ui-kit/master/assets/fonts/nucleo-outline.woff2");
- font-weight: normal;
- font-style: normal;
-}
-
-.now-ui-icons {
- display: inline-block;
- font: normal normal normal 14px/1 "Nucleo Outline";
- font-size: inherit;
- // speak: none;
- text-transform: none;
- /* Better Font Rendering */
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-footer {
- margin-top: 50px;
- color: #555;
- background: #fff;
- padding: 25px;
- font-weight: 300;
- background: #f7f7f7;
-}
-.footer p {
- margin-bottom: 0;
-}
-footer p a {
- color: #555;
- font-weight: 400;
-}
-
-footer p a:hover {
- color: #e86c42;
-}
-
-@media screen and (max-width: 768px) {
- .nav-tabs {
- display: inline-block;
- width: 100%;
- padding-left: 100px;
- padding-right: 100px;
- text-align: center;
- }
-
- .nav-tabs .nav-item > .nav-link {
- margin-bottom: 5px;
- }
-}
-.mat-dialog-container {
- padding: 0px !important;
-}
+.btn {
+ display: inline-block;
+ margin-bottom: 0;
+
+ text-align: center;
+ text-transform: uppercase;
+ vertical-align: middle;
+ cursor: pointer;
+ background-image: none;
+
+ padding: 6px 12px;
+ font-size: 1.4rem;
+ border-radius: 0px;
+ border: 1px solid transparent;
+ text-decoration: none;
+ user-select: none;
+ background: #d8d8d8;
+ font-size: 12px;
+
+ &,
+ &:active,
+ &.active {
+ &:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+ }
+ }
+
+ &:hover,
+ &:focus,
+ &.focus {
+ text-decoration: none;
+ color: #fff;
+ }
+
+ &:active,
+ &.active {
+ outline: 0;
+ background-image: none;
+ }
+
+ &.disabled,
+ &[disabled],
+ fieldset[disabled] & {
+ cursor: not-allowed;
+ pointer-events: none;
+ box-shadow: none;
+ }
+
+ &.btn-xs {
+ padding: 3px 6px;
+ font-size: 1.2rem;
+ }
+
+ &.btn-sm {
+ padding: 4px 8px;
+ font-size: 1.3rem;
+ }
+
+ &.btn-lg {
+ padding: 8px 16px;
+ font-size: 1.6rem;
+ }
+}
+button,
+input {
+ font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
+}
+
+a {
+ color: #f96332;
+}
+
+a:hover,
+a:focus {
+ color: #f96332;
+}
+
+p {
+ line-height: 1.61em;
+ font-weight: 300;
+ font-size: 1.2em;
+}
+
+.category {
+ text-transform: capitalize;
+ font-weight: 700;
+ color: #9a9a9a;
+}
+
+body {
+ color: #2c2c2c;
+ font-size: 14px;
+ font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
+ overflow-x: hidden;
+ -moz-osx-font-smoothing: grayscale;
+ -webkit-font-smoothing: antialiased;
+}
+
+.nav-item .nav-link,
+.nav-tabs .nav-link {
+ -webkit-transition: all 300ms ease 0s;
+ -moz-transition: all 300ms ease 0s;
+ -o-transition: all 300ms ease 0s;
+ -ms-transition: all 300ms ease 0s;
+ transition: all 300ms ease 0s;
+}
+
+.card a {
+ -webkit-transition: all 150ms ease 0s;
+ -moz-transition: all 150ms ease 0s;
+ -o-transition: all 150ms ease 0s;
+ -ms-transition: all 150ms ease 0s;
+ transition: all 150ms ease 0s;
+}
+
+[data-toggle="collapse"][data-parent="#accordion"] i {
+ -webkit-transition: transform 150ms ease 0s;
+ -moz-transition: transform 150ms ease 0s;
+ -o-transition: transform 150ms ease 0s;
+ -ms-transition: all 150ms ease 0s;
+ transition: transform 150ms ease 0s;
+}
+
+[data-toggle="collapse"][data-parent="#accordion"][aria-expanded="true"] i {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
+ -webkit-transform: rotate(180deg);
+ -ms-transform: rotate(180deg);
+ transform: rotate(180deg);
+}
+
+.now-ui-icons {
+ display: inline-block;
+ font: normal normal normal 14px/1 "Nucleo Outline";
+ font-size: inherit;
+ // speak: none;
+ text-transform: none;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+@-webkit-keyframes nc-icon-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ }
+
+ 100% {
+ -webkit-transform: rotate(360deg);
+ }
+}
+
+@-moz-keyframes nc-icon-spin {
+ 0% {
+ -moz-transform: rotate(0deg);
+ }
+
+ 100% {
+ -moz-transform: rotate(360deg);
+ }
+}
+
+@keyframes nc-icon-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ -moz-transform: rotate(0deg);
+ -ms-transform: rotate(0deg);
+ -o-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+
+ 100% {
+ -webkit-transform: rotate(360deg);
+ -moz-transform: rotate(360deg);
+ -ms-transform: rotate(360deg);
+ -o-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+
+.now-ui-icons.objects_umbrella-13:before {
+ content: "\ea5f";
+}
+
+.now-ui-icons.shopping_cart-simple:before {
+ content: "\ea1d";
+}
+
+.now-ui-icons.shopping_shop:before {
+ content: "\ea50";
+}
+
+.now-ui-icons.ui-2_settings-90:before {
+ content: "\ea4b";
+}
+
+.nav-tabs {
+ border: 0;
+ padding: 15px 0.7rem;
+}
+
+.nav-tabs:not(.nav-tabs-neutral) > .nav-item > .nav-link.active {
+ box-shadow: 0px 5px 35px 0px rgba(0, 0, 0, 0.3);
+}
+
+.card .nav-tabs {
+ border-top-right-radius: 0.1875rem;
+ border-top-left-radius: 0.1875rem;
+}
+
+.nav-tabs > .nav-item > .nav-link {
+ color: #888888;
+ margin: 0;
+ margin-right: 5px;
+ background-color: transparent;
+ border: 1px solid transparent;
+ border-radius: 30px;
+ font-size: 14px;
+ padding: 11px 23px;
+ line-height: 1.5;
+}
+
+.nav-tabs > .nav-item > .nav-link:hover {
+ background-color: transparent;
+}
+
+.nav-tabs > .nav-item > .nav-link.active {
+ background-color: #444;
+ border-radius: 30px;
+ color: #ffffff;
+}
+
+.nav-tabs > .nav-item > .nav-link i.now-ui-icons {
+ font-size: 14px;
+ position: relative;
+ top: 1px;
+ margin-right: 3px;
+}
+
+.nav-tabs.nav-tabs-neutral > .nav-item > .nav-link {
+ color: #ffffff;
+}
+
+.nav-tabs.nav-tabs-neutral > .nav-item > .nav-link.active {
+ background-color: rgba(255, 255, 255, 0.2);
+ color: #ffffff;
+}
+
+.card {
+ border: 0;
+ border-radius: 0.1875rem;
+ display: inline-block;
+ position: relative;
+ width: 100%;
+ // margin-bottom: 30px;
+ // box-shadow: 0px 5px 25px 0px rgba(0, 0, 0, 0.2);
+}
+
+.card .card-header {
+ background-color: transparent;
+ border-bottom: 0;
+ background-color: transparent;
+ border-radius: 0;
+ padding: 0;
+}
+
+.card[data-background-color="orange"] {
+ // background-color: #2d4262;
+}
+
+.card[data-background-color="red"] {
+ background-color: #ff3636;
+}
+
+.card[data-background-color="yellow"] {
+ background-color: #ffb236;
+}
+
+.card[data-background-color="blue"] {
+ background-color: #2ca8ff;
+}
+
+.card[data-background-color="green"] {
+ background-color: #15b60d;
+}
+
+[data-background-color="orange"] {
+ // background-color: #2d4262;
+}
+
+[data-background-color="black"] {
+ // background-color: #2c2c2c;
+}
+
+[data-background-color]:not([data-background-color="gray"]) {
+ color: #ffffff;
+}
+
+[data-background-color]:not([data-background-color="gray"]) p {
+ color: #ffffff;
+}
+
+[data-background-color]:not([data-background-color="gray"])
+ a:not(.btn):not(.dropdown-item) {
+ color: #ffffff;
+}
+
+[data-background-color]:not([data-background-color="gray"])
+ .nav-tabs
+ > .nav-item
+ > .nav-link
+ i.now-ui-icons {
+ color: #ffffff;
+}
+
+@font-face {
+ font-family: "Nucleo Outline";
+ src: url("https://github.com/creativetimofficial/now-ui-kit/blob/master/assets/fonts/nucleo-outline.eot");
+ src: url("https://github.com/creativetimofficial/now-ui-kit/blob/master/assets/fonts/nucleo-outline.eot")
+ format("embedded-opentype");
+ src: url("https://raw.githack.com/creativetimofficial/now-ui-kit/master/assets/fonts/nucleo-outline.woff2");
+ font-weight: normal;
+ font-style: normal;
+}
+
+.now-ui-icons {
+ display: inline-block;
+ font: normal normal normal 14px/1 "Nucleo Outline";
+ font-size: inherit;
+ // speak: none;
+ text-transform: none;
+ /* Better Font Rendering */
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+footer {
+ margin-top: 50px;
+ color: #555;
+ background: #fff;
+ padding: 25px;
+ font-weight: 300;
+ background: #f7f7f7;
+}
+.footer p {
+ margin-bottom: 0;
+}
+footer p a {
+ color: #555;
+ font-weight: 400;
+}
+
+footer p a:hover {
+ color: #e86c42;
+}
+
+@media screen and (max-width: 768px) {
+ .nav-tabs {
+ display: inline-block;
+ width: 100%;
+ padding-left: 100px;
+ padding-right: 100px;
+ text-align: center;
+ }
+
+ .nav-tabs .nav-item > .nav-link {
+ margin-bottom: 5px;
+ }
+}
+.mat-dialog-container {
+ padding: 0px !important;
+}
diff --git a/src/app/location/location.component.html b/src/app/location/location.component.html
index 8b26ef9..cdbd81d 100644
--- a/src/app/location/location.component.html
+++ b/src/app/location/location.component.html
@@ -28,7 +28,7 @@
name="fontStyle" aria-label="Font Style">
+ [ngClass]="{ 'selectedTotal' :(vehStatus.status == 'Total'),'selectedRunning' :(vehStatus.status == 'Running'), 'deselected' : !vehStatus.status, 'selectedStopped' :(vehStatus.status == 'Stopped'), 'Inactice' :(vehStatus.status == 'Inactive'),'selectIdling' :(vehStatus.status == 'Idle'), 'selectedNodata' : (vehStatus.status == 'No data')}">
{{vehStatus.totalCount}}
{{vehStatus.status | translate}}
@@ -246,7 +246,7 @@
@@ -941,14 +941,15 @@
-
+
+
- 1x
- 2x
- 5x
- 10x
+ 1x
+ 2x
+ 5x
+ 10x
diff --git a/src/app/location/location.component.scss b/src/app/location/location.component.scss
index 01a2595..29f87b9 100644
--- a/src/app/location/location.component.scss
+++ b/src/app/location/location.component.scss
@@ -30,6 +30,12 @@
border-right: 2px solid #ededed;
}
+.selectedTotal{
+ background: #9341acc7;
+ color: white;
+ border-right: 2px solid #ededed;
+}
+
.selectedStopped{
background: #cb0000d9;
color: white;
diff --git a/src/app/location/location.component.ts b/src/app/location/location.component.ts
index 5fb5567..e51ca93 100644
--- a/src/app/location/location.component.ts
+++ b/src/app/location/location.component.ts
@@ -25,6 +25,7 @@ import { AddDeviceComponent } from './add-device/add-device.component';
import { FormControl } from '@angular/forms';
import { ShoRoutePlanComponent } from './sho-route-plan/sho-route-plan.component';
+
declare var jsPDF : any;
declare var html2canvas:any
@@ -52,7 +53,7 @@ export class LocationComponent implements OnInit, OnDestroy {
modelChanged: Subject = new Subject();
area=0;
toppings = new FormControl();
-
+ isLastPosition =false;
toppingList: string[] = ['Extra cheese', 'Mushroom', 'Onion', 'Pepperoni', 'Sausage', 'Tomato'];
imei
// private fuelComponent: SidemenuFuelComponent;
@@ -149,6 +150,7 @@ export class LocationComponent implements OnInit, OnDestroy {
maintanance: any;
expiredDevices: any;
OutOfReach: any;
+ totalDevices:any;
no_data: any;
Running: any;
idle_duration: any;
@@ -546,6 +548,7 @@ export class LocationComponent implements OnInit, OnDestroy {
offline: Boolean = false;
geo: Boolean = false;
foods = [];
+ masterFoods = [];
devmap(a) {
// console.log(a);
}
@@ -1163,7 +1166,7 @@ export class LocationComponent implements OnInit, OnDestroy {
outerThis.draw_flight_trail(outerThis.flightPathArr);
}
- console.log('devobject coming from socket',deviceInfo,msg,initData);
+
// console.log('device object coming from service',outerThis.deviceList)
// if((a != null) && (a != undefined)&&(outerThis.navId != 'locationComponent')){
// if (deviceInfo.status != 'RUNNING') {
@@ -2057,7 +2060,12 @@ export class LocationComponent implements OnInit, OnDestroy {
map.mapTypes.set('darkmode', styledMapType);
outerThis.mapNew = map;
var trafficLayer = new google.maps.TrafficLayer();
- trafficLayer.setMap(map);
+ // trafficLayer.setMap(map);
+ if (outerThis.isTraffic) {
+ trafficLayer.setMap(map);
+ } else {
+ trafficLayer.setMap(null);
+ }
// outerThis.geoService(map);
outerThis.trafficLayer = trafficLayer;
@@ -2415,17 +2423,16 @@ export class LocationComponent implements OnInit, OnDestroy {
// liveAddress = data[0].formatted_address;
// var add = liveAddress;
- console.log('entering Address field');
// } else {
- console.log('entering Address field');
+
// liveAddress = "No address available";
// }
// }
// else {
- console.log('entering Address field');
+
// liveAddress = 'static address';
- console.log(liveAddress);
+
// }
// })
@@ -2847,7 +2854,6 @@ export class LocationComponent implements OnInit, OnDestroy {
number_plate : infobox_numberPlate
}
outerThis.markerArray.push(mtemp);
- console.log('marker Temp array=>',outerThis.markerArray,outerThis.socketData);
google.maps.event.addListener(m, 'click', function () {
// console.log('Opening Infow window',m);
// { lat: , lng: }
@@ -2880,7 +2886,7 @@ export class LocationComponent implements OnInit, OnDestroy {
}
flightPathArr: any = [];
- isTraffic: boolean = true;
+ isTraffic: boolean = false;
mapTypeId: any = "roadmap";
setMapType(mapTypeId) {
// console.log(mapTypeId);
@@ -3091,7 +3097,7 @@ export class LocationComponent implements OnInit, OnDestroy {
var lng = coord[1];
let outerThis = this
var startPos = [lat, lng];
- this.speed = 200
+ //this.speed = 200
var iconselected = this.devicon
var delay = 100;
@@ -3317,7 +3323,7 @@ export class LocationComponent implements OnInit, OnDestroy {
marker.setPosition(new google.maps.LatLng(lat, lng));
map.setCenter({ lat: lat, lng: lng });
- // console.log("Abinash");
+
that.start = setTimeout(that.moveMarker, delay);
}
else {
@@ -3353,13 +3359,16 @@ export class LocationComponent implements OnInit, OnDestroy {
that.rangeDetector = false;
+ console.log('iteration', a,coords.length)
// console.log("outside moveMarker function");
if (a > coords.length) {
// console.log("Cord.length if condition");
outerThis.speeed2 = 0;
+ outerThis.isLastPosition = true;
}
- else {
+ else {
+ outerThis.isLastPosition = false;
// console.log("Cord.length else condition");
that.moveMarker();
km_h = outerThis.speed;
@@ -3598,6 +3607,13 @@ zoomSet(){
showStatus: boolean = false;
flag: any;
playing: boolean = false;
+ replay(i) {
+ this.speed = 100;
+ clearTimeout(this.start);
+ this.marker4.setPosition({ lat: this.latLngLine[i].lat, lng: this.latLngLine[i].lng });
+ this.tempMapHistory[i]['flag'] = 'init';
+ this.play(i);
+ }
play(playindex) {
// console.log('playindex',playindex);
@@ -3609,7 +3625,8 @@ zoomSet(){
tempObj["tempDataCoordArr"] = tempDataCoordArr;
- if (this.tempMapHistory[playindex]['flag'] == 'init') {
+ if (this.tempMapHistory[playindex]['flag'] == 'init') {
+ this.speed = 100;
this.animateMarker_history(this.marker4, tempDataCoordArr, 50, icontype);
tempObj["marker"] = this.marker4;
this.tempMapHistory[playindex]['flag'] = 'stop';
@@ -3630,10 +3647,10 @@ zoomSet(){
tempObj["flag"] = this.tempMapHistory[playindex]['flag'];
}
- if (this.flag == 'reset') {
- this.marker4.setPosition({ lat: this.latLngLine[0].lat, lng: this.latLngLine[0].lng });
- this.flag = 'init';
- }
+ if (this.flag == 'reset') {
+ this.marker4.setPosition({ lat: this.latLngLine[0].lat, lng: this.latLngLine[0].lng });
+ this.flag = 'init';
+ }
}
@@ -3874,7 +3891,7 @@ zoomSet(){
// this.iconSelector("RUNNING","car",{});
var iconDest = 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=D|FF0000|000000';
-
+
// =====================================added==============================
if (this.latlongObjArr[i].interpolated == null || this.latlongObjArr[i].interpolated == undefined || this.latlongObjArr[i].interpolated.length == 0) {
@@ -4160,7 +4177,7 @@ zoomSet(){
var cumulativeDistance =0 ;
for (let i = this.latlongObjArr.length - 1; i > 0; i--) {
-
+ console.log(this.latlongObjArr[i]);
var d_name = (this.navId === 'locationHistory')? this.dev_id.viewValue:this.dev_id.Device_Name;
this.speed = this.latlongObjArr[i].speed + "Km/hr";
this.im = this.latlongObjArr[i].imei;
@@ -4190,7 +4207,7 @@ zoomSet(){
+ this.im + ` DEVICE DATE : `
+ this.datee + ` SPEED : `+ this.speed +
` INSERTION TIME : `+ insertionTime +
- ` RAW : `+ raw +
+ ` RAW : ` + ' Get Raw Data '+
` Address : `
+ this.contentAdd + ' '
+''
@@ -4382,7 +4399,7 @@ zoomSet(){
icon: iconSrc,
scaledSize: new google.maps.Size(20, 20),
});
- // markerSrc['infowindow'] = new google.maps.InfoWindow({ content: content });
+ markerSrc['infowindow'] = new google.maps.InfoWindow({ content: content });
const infowindow = new google.maps.InfoWindow({
content: contentString,
});
@@ -4592,13 +4609,18 @@ zoomSet(){
var customTxt;
var txt;
function geocodePosition(pos, callback) {
- var geocoder = new google.maps.Geocoder();
- geocoder.geocode({
- latLng: pos
- }, function (responses) {
- callback(responses[0].formatted_address)
+ try {
+ var geocoder = new google.maps.Geocoder();
+ geocoder.geocode({
+ latLng: pos
+ }, function (responses) {
+ callback(responses && responses[0] && responses[0].formatted_address ? responses[0].formatted_address : null)
- });
+ });
+ } catch (error) {
+ callback(null)
+ }
+
}
var k;
@@ -4712,7 +4734,12 @@ zoomSet(){
// console.log('mapmapmapmapmapmapmapmapmapmapmapmapmapmap',map);
outerThis.historyMap = map;
var trafficLayer = new google.maps.TrafficLayer();
- trafficLayer.setMap(map);
+ if(outerThis.isTraffic){
+ trafficLayer.setMap(map);
+ }else{
+ trafficLayer.setMap(null);
+ }
+
isMapInit = true;
@@ -5472,13 +5499,15 @@ var seconds = num % 60;
}
ngOnInit() {
-
+ this.injectData.setGPSConnection();
window["angularComponentRef"] = { component: this, zone: this._ngZone };
this.socket = this.injectData.getSocket_gps();
this.socket.on('connect', function (this) { });
this.socket_Notify = this.injectData.getSocket_notifIO();
- this.socket_Notify.on('connect', function(this){ });
+ this.socket_Notify.on('connect', function(this){
+ console.log('notify connect ',this);
+ });
this.bsConfig = Object.assign({dateInputFormat: 'DD-MM-YYYY, h:mm:ss a'}, { containerClass: this.colorTheme });
// console.log('this.bsConfig',this.bsConfig);
@@ -5700,9 +5729,17 @@ var seconds = num % 60;
if( this.socket_Notify){
this.socket_Notify.removeAllListeners()
}
-
+ this.injectData.removedGPSConnection();
}
+ GetRowPacketEvent(data) {
+ this.contactService.GetRowPacket(data).subscribe((res: any) => {
+ document.getElementById(data).innerHTML = '';
+ document.getElementById('display_row' + data).innerHTML = res.raw ? res.raw : 'NA';
+
+
+ })
+ }
addpoi(lat) {
// var lattitude = JSON.parse(lat);
var latlng = JSON.stringify(lat).substring(1, lat.length - 1);
@@ -5825,12 +5862,45 @@ var seconds = num % 60;
}
}
+ this.masterFoods = JSON.parse(JSON.stringify(this.foods));
+ this.sortFoodDataByKey();
}, err => {
// this.Load = false;
// console.log(err);
})
}
+ filterDevicesNew(dlr) {
+ if ((this.navId === 'locationHistory')) {
+ if (dlr) {
+ const filterdealerValue: any = dlr;
+ this.foods = [];
+ this.masterFoods.forEach(pp => {
+ let t = pp.viewValue.toLocaleLowerCase().indexOf(filterdealerValue.toLocaleLowerCase());
+ if (t > -1) {
+ this.foods.push(pp)
+ }
+ });
+ } else {
+ this.foods = [...this.masterFoods];
+ }
+
+ }
+ this.sortFoodDataByKey();
+ }
+ sortFoodDataByKey() {
+ this.foods.sort((a, b) => {
+ let fa = a.viewValue.toLowerCase(),
+ fb = b.viewValue.toLowerCase();
+ if (fa < fb) {
+ return -1;
+ }
+ if (fa > fb) {
+ return 1;
+ }
+ return 0;
+ })
+ }
filterDevices(dlr) {
// console.log("=========>",dlr,this.foods);
@@ -6274,7 +6344,7 @@ var seconds = num % 60;
controlText.style.lineHeight = '38px';
controlText.style.paddingLeft = '5px';
controlText.style.paddingRight = '5px';
- controlText.innerHTML = text;
+ controlText.innerHTML = text ? text : '';
controlUI.appendChild(controlText);
// Setup the click event listeners: simply set the map to Chicago.
@@ -6361,6 +6431,11 @@ var seconds = num % 60;
})
function geocodePosition(pos, callback) {
+ try {
+
+ } catch (error) {
+
+ }
var geocoder = new google.maps.Geocoder();
geocoder.geocode({
latLng: pos
@@ -6416,7 +6491,7 @@ var seconds = num % 60;
// }
- AllVeh: any = [{ 'status': 'Running', 'totalCount': '0' }, { 'status': 'Idle', 'totalCount': '0' }, { 'status': 'Stopped', 'totalCount': '0' }, { 'status': 'Inactive', 'totalCount': '0' }, { 'status': 'No data', 'totalCount': '0' }]
+ AllVeh: any = [{ 'status': 'Total', 'totalCount': '0' },{ 'status': 'Running', 'totalCount': '0' }, { 'status': 'Idle', 'totalCount': '0' }, { 'status': 'Stopped', 'totalCount': '0' }, { 'status': 'Inactive', 'totalCount': '0' }, { 'status': 'No data', 'totalCount': '0' }]
deviceData = [
{
@@ -6648,6 +6723,7 @@ var seconds = num % 60;
this.off_vech = this.devicess["OFF Devices"];
this.maintanance = this.devicess["Maintance Device"];
this.expiredDevices = this.devicess["expire_status"];
+ this.totalDevices = this.devicess["Total_Vech"];
this.OutOfReach = this.devicess["OutOfReach"];
this.no_data = this.devicess["no_data"];
this.Running = this.devicess["running_devices"];
@@ -6674,11 +6750,12 @@ var seconds = num % 60;
// this.loading = this.devicess.running_details.forward.count;
// this.unloading = this.devicess.running_details.reverse.count;
// this.not_on_root = this.devicess.running_details.not_on_route.count;
- this.AllVeh[0].totalCount = this.Running;
- this.AllVeh[1].totalCount = this.idle_vech;
- this.AllVeh[2].totalCount = this.off_vech;
- this.AllVeh[3].totalCount = this.OutOfReach;
- this.AllVeh[4].totalCount = this.no_data;
+ this.AllVeh[0].totalCount = this.totalDevices;
+ this.AllVeh[1].totalCount = this.Running;
+ this.AllVeh[2].totalCount = this.idle_vech;
+ this.AllVeh[3].totalCount = this.off_vech;
+ this.AllVeh[4].totalCount = this.OutOfReach;
+ this.AllVeh[5].totalCount = this.no_data;
// console.log("DAtatatatat---",this.AllVeh);
@@ -6692,104 +6769,113 @@ var seconds = num % 60;
devReady:boolean=true;
groups=[]
getDeviceBYfilter(i,iden) {
- // console.log('iden=>',iden);
+ console.log(i,iden);
this.currStatus = i;
- if (i == 6) {
- this.skip = 0;
- }
- var vehStatus: string;
- if(i!=undefined){
- vehStatus = (i.toUpperCase() == 'INACTIVE') ? "OUT OF REACH" : (i.toUpperCase() == 'IDLE') ? "IDLING" : i.toUpperCase();
- }else{
- vehStatus = null;
+ if (this.currStatus =='Total'){
+ this.ngOnInit();
}
-
- var status_1 = false;
- if(iden === 'tclick'){
- this.showSocketData = false;
-
- }
+
else{
- this.showSocketData = true;
- }
- this.deviceList =[];
- this.foods=[];
- // console.log('this.navId',this.navId);
- if(this.navId == 'locationHistory'){
- iden='tclick';
- this.devReady= false;
- this.limit = 10000;
- };
-
- // console.log('limitfgdfgdfgdgdgdgfdgfdgdgfdgfdgdfg',this.limit);
- this.contactService.getDeviceByFilter_dash(vehStatus, this.emailid, this.useridd, this.skip, this.limit, this.myInput, this.supadmin, this.dealerid, status_1)
- .subscribe(res => {
- // console.log("INside devList");
- var aaaa = res;
- this.deviceList = aaaa.devices;
+ if (i == 6) {
+ this.skip = 0;
+ }
+ var vehStatus: string;
+ if (i != undefined) {
+ vehStatus = (i.toUpperCase() == 'INACTIVE') ? "OUT OF REACH" : (i.toUpperCase() == 'IDLE') ? "IDLING" : i.toUpperCase();
+ } else {
+ vehStatus = null;
- this.devReady= true;
- if (this.deviceList.length === 0) {
- this.lastcall = false;
- this.firstcall = true
- }
- this.foods=[];
-
- for (var k = 0; k < this.deviceList.length; k++) {
+ }
- // if(this.deviceList[k].vehicleGroup){
- // if(!this.groups.includes({name:this.deviceList[k].vehicleGroup.name,id:this.deviceList[k].vehicleGroup._id}))
- // this.groups.push({name:this.deviceList[k].vehicleGroup.name,id:this.deviceList[k].vehicleGroup._id})
- // }
-
- this.deviceList[k]['playPause'] = true;
- this.deviceList[k]['checked'] =true;
- if(iden === 'tclick'){
- if (this.deviceList[k].type_of_device == "Tracker") {
- let a = {
- value: this.deviceList[k].Device_Name,
- viewValue: this.deviceList[k].Device_Name,
- did: this.deviceList[k].Device_ID,
- id: this.deviceList[k]._id,
- user: this.deviceList[k].user,
- email: this.deviceList[k].Email_ID,
- deviceType: this.deviceList[k].type_of_device,
- iconType: this.deviceList[k].iconType,
- // checked: true
- }
- this.foods.push(a);
- if(k === (this.deviceList.length -1)){
- // console.log("1111111110100000");
- if(this.navId!='locationHistory')
- {
- this.showSocketData=false
+ var status_1 = false;
+ if (iden === 'tclick') {
+ this.showSocketData = false;
+
+ }
+ else {
+ this.showSocketData = true;
+ }
+ this.deviceList = [];
+ this.foods = [];
+ this.masterFoods = [];
+ // console.log('this.navId',this.navId);
+ if (this.navId == 'locationHistory') {
+ iden = 'tclick';
+ this.devReady = false;
+ this.limit = 10000;
+ };
+
+ // console.log('limitfgdfgdfgdgdgdgfdgfdgdgfdgfdgdfg',this.limit);
+ this.contactService.getDeviceByFilter_dash(vehStatus, this.emailid, this.useridd, this.skip, this.limit, this.myInput, this.supadmin, this.dealerid, status_1)
+ .subscribe(res => {
+ // console.log("INside devList");
+ var aaaa = res;
+ this.deviceList = aaaa.devices;
+
+ this.devReady = true;
+ if (this.deviceList.length === 0) {
+ this.lastcall = false;
+ this.firstcall = true
+ }
+ this.foods = [];
+ this.masterFoods = [];
+ for (var k = 0; k < this.deviceList.length; k++) {
+
+ // if(this.deviceList[k].vehicleGroup){
+ // if(!this.groups.includes({name:this.deviceList[k].vehicleGroup.name,id:this.deviceList[k].vehicleGroup._id}))
+ // this.groups.push({name:this.deviceList[k].vehicleGroup.name,id:this.deviceList[k].vehicleGroup._id})
+ // }
+
+ this.deviceList[k]['playPause'] = true;
+ this.deviceList[k]['checked'] = true;
+ if (iden === 'tclick') {
+ if (this.deviceList[k].type_of_device == "Tracker") {
+ let a = {
+ value: this.deviceList[k].Device_Name,
+ viewValue: this.deviceList[k].Device_Name,
+ did: this.deviceList[k].Device_ID,
+ id: this.deviceList[k]._id,
+ user: this.deviceList[k].user,
+ email: this.deviceList[k].Email_ID,
+ deviceType: this.deviceList[k].type_of_device,
+ iconType: this.deviceList[k].iconType,
+ // checked: true
}
- this.livetrack(null);
+ this.foods.push(a);
+ if (k === (this.deviceList.length - 1)) {
+ // console.log("1111111110100000");
+ if (this.navId != 'locationHistory') {
+ this.showSocketData = false
+ }
+ this.livetrack(null);
+ }
+
+
}
-
-
+
}
+
+
}
-
-
-
- }
- if(this.deviceList.length==1){
- this.selectedDevice=this.deviceList[0]._id
- this.parkingButtonShow=this.deviceList[0].theftAlert==null?'grey':this.deviceList[0].theftAlert==undefined?'grey':this.deviceList[0].theftAlert==true?'green':'red'
- this.DriverName=this.deviceList[0].driver_name;
- // console.log("DRIVER NAME",this.DriverName,this.deviceList[0].ac);
- this.ac=this.deviceList[0].ac?this.deviceList[0].ac:'NA'
- this.DriverNumber=this.deviceList[0].contact_number
+ if (this.deviceList.length == 1) {
+ this.selectedDevice = this.deviceList[0]._id
+ this.parkingButtonShow = this.deviceList[0].theftAlert == null ? 'grey' : this.deviceList[0].theftAlert == undefined ? 'grey' : this.deviceList[0].theftAlert == true ? 'green' : 'red'
+ this.DriverName = this.deviceList[0].driver_name;
+ // console.log("DRIVER NAME",this.DriverName,this.deviceList[0].ac);
+ this.ac = this.deviceList[0].ac ? this.deviceList[0].ac : 'NA'
+ this.DriverNumber = this.deviceList[0].contact_number
- }
- this.selectAllVehicles({checked:true})
+ }
+ this.selectAllVehicles({ checked: true })
+
+ // console.log('this.deviceList',this.deviceList,'GROUP===',this.groups);
+ this.masterFoods = JSON.parse(JSON.stringify(this.foods));
+ this.sortFoodDataByKey();
+ })
+ }
- // console.log('this.deviceList',this.deviceList,'GROUP===',this.groups);
-
- })
}
@@ -7720,19 +7806,12 @@ historySeekbaar(){
}
-
+ public Selectedspeed = 1;
changeSpeed(t){
// console.log(t);
this.speed = t * 100;
- var header = document.getElementById("myDIV");
- var btns = header.getElementsByClassName("sc-bdVaJa");
- for (var i = 0; i < btns.length; i++) {
- btns[i].addEventListener("click", function() {
- var current = document.getElementsByClassName("active");
- current[0].className = current[0].className.replace(" active", "");
- this.className += " active";
- });
- }
+ this.Selectedspeed = t;
+
}
@@ -7784,6 +7863,8 @@ getNearByVehicles(devData){
}
}
+ this.masterFoods = JSON.parse(JSON.stringify(this.foods));
+ this.sortFoodDataByKey();
// console.log('this.deviceList',this.deviceList);
}else{
this.data_descip = "No Nearby Devices Found !!!";
@@ -8110,6 +8191,8 @@ getNearByVehicles(devData){
})
}
+
+
// @HostListener('click', ['$event'])
// onClick(event) {
// if (event.target.id === 'deletePoint'){
@@ -8305,8 +8388,8 @@ image
this.endTime=this.tempMapHistory[0].toTime;
var name=this.deviceNameForPDF+" track from "+this.startTime+" to "+this.endTime+'.pdf'
var outerThis=this;
- this.startAddress=this.finalArr[0].address
- this.endAddress=this.finalArr[this.finalArr.length-1].address
+ this.startAddress = this.finalArr[0] ?this.finalArr[0].address : '';
+ this.endAddress = this.finalArr[0] ?this.finalArr[this.finalArr.length-1].address :''
// console.log(this.startAddress,this.endAddress);
// console.log(this.tempMapHistory,this.startAddress,this.endAddress, this.image);
@@ -8320,7 +8403,7 @@ image
};
var doc = new jsPDF(pdfOptions);
-
+ this.contactService.setFontInPdf(doc);
var pageWidth = doc.internal.pageSize.width-20;
var width = pageWidth;
@@ -8446,7 +8529,8 @@ selectAllVehicles(ev){
}
this.final = this.deviceList;
-
+ this.foods = [];
+ this.masterFoods = [];
for (let i = 0; i < this.final.length; i++) {
this.final[i]['checked'] = true;
// this.deviceList = this.final;
@@ -8469,6 +8553,7 @@ selectAllVehicles(ev){
}
}
+
let that= this;
if((this.navId === undefined)||(this.navId != 'locationHistory')){
this.livetrack(this.fin);
@@ -8479,6 +8564,8 @@ selectAllVehicles(ev){
this.new = this.foods[y];
}
}
+ this.masterFoods = JSON.parse(JSON.stringify(this.foods));
+ this.sortFoodDataByKey();
}else{
@@ -8494,7 +8581,12 @@ selectAllVehicles(ev){
var map = new google.maps.Map(document.getElementById('map'), myOptions);
// console.log('mapmapmapmapmapmapmapmapmapmapmapmapmapmap',map);
var trafficLayer = new google.maps.TrafficLayer();
- trafficLayer.setMap(map);
+ // trafficLayer.setMap(map);
+ if (this.isTraffic) {
+ trafficLayer.setMap(map);
+ } else {
+ trafficLayer.setMap(null);
+ }
var zoomBar: any;
zoomBar = document.getElementById('myRange');
map.setZoom(map.getZoom());
@@ -8524,17 +8616,20 @@ getTravelPathReport(device){
var payload ={
"to":new Date(this.date2).toISOString(),
"from" : new Date(this.datefrom).toISOString(),
- "device" : device.Device_ID,
- "interval" :10
+ "device": device.Device_ID ? device.Device_ID : device.did,
+ "interval" :10
}
this.contactService.getTravel_path_report(payload).subscribe((resp:any)=>{
this.reportArr = [];
- this.reportArr= resp.filter(function (el) {
+ if (resp && resp.length) {
+ this.reportArr= resp.filter(function (el) {
return el != null;
});
+ }
+
let last = {speed:''};
let result = [];
@@ -8742,7 +8837,7 @@ this.reportArr1=this.reportArr
for (var j = 0; j < rowCount; j++) {
- var str=(pdfBody[j].latDecimal?pdfBody[j].latDecimal:0)+' , '+(pdfBody[j].longDecimal?pdfBody[j].longDecimal:0)
+ var str = (pdfBody[j] && pdfBody[j].latDecimal ? pdfBody[j].latDecimal : 0) + ' , ' + (pdfBody[j] &&pdfBody[j].longDecimal?pdfBody[j].longDecimal:0)
body.push({
deviceName:pdfBody[j].Device_name,
diff --git a/src/app/location/sho-route-plan/sho-route-plan.component.scss b/src/app/location/sho-route-plan/sho-route-plan.component.scss
index d51b09b..d4dddc1 100644
--- a/src/app/location/sho-route-plan/sho-route-plan.component.scss
+++ b/src/app/location/sho-route-plan/sho-route-plan.component.scss
@@ -1,49 +1,49 @@
-#toast {
- visibility: hidden;
- max-width: 150px;
- 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: 150px;
- 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;
-}
+#toast {
+ visibility: hidden;
+ max-width: 150px;
+ 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: 150px;
+ 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;
+}
diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html
index 48c4fbe..06219bb 100644
--- a/src/app/login/login.component.html
+++ b/src/app/login/login.component.html
@@ -134,8 +134,8 @@
diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts
index 51e0f7b..bc2cde8 100644
--- a/src/app/login/login.component.ts
+++ b/src/app/login/login.component.ts
@@ -25,6 +25,7 @@ import {Observable} from 'rxjs/Observable';
import { TranslateService } from 'ng2-translate';
import { DOCUMENT } from '@angular/common';
import { AnnouncementComponent } from '../const/announcement/announcement.component';
+//import { DatainjectionService } from '../datainjection.service';
@Component({
selector: 'app-services',
templateUrl: './login.component.html',
@@ -96,7 +97,7 @@ passwordIcon:any = "visibility_off";
androidAppLink: any;
iosAppLink: any;
- constructor(private titleServic: Title,public dialog: MdDialog,private dataService: ContactService,private _flashMessagesService: FlashMessagesService,private router: Router,public snackBar: MdSnackBar,public translate: TranslateService,@Inject(DOCUMENT) private _document: HTMLDocument) {
+ constructor(private titleServic: Title, public dialog: MdDialog, private dataService: ContactService, private _flashMessagesService: FlashMessagesService, private router: Router, public snackBar: MdSnackBar,public translate: TranslateService,@Inject(DOCUMENT) private _document: HTMLDocument) {
let split1 = document.URL.split('//')[1];
console.log(split1,document);
let split2 = split1.split('/')[0];
@@ -116,7 +117,14 @@ passwordIcon:any = "visibility_off";
console.log("Inside showlink false");
this.showLink = false;
}
+ //let tUrl = 'http://www.nipponsecura.in/login';
+ //let split1 = tUrl.split('//')[1];
+ if (split2 == "www.nipponsecura.in" || split2 == "nipponsecura.in") {
+ this.cpn_showLink = true;
+ this.mainSiteurl = 'https://nipponaudio.com/';
+
+ }
if(split2 == "login.cpntrack.com"){
this.cpn_showLink = true;
@@ -245,6 +253,7 @@ passwordIcon:any = "visibility_off";
// debugger;
this.dataService.log(newlog)
.subscribe(login => {
+
this.showLoader = false;
this.logins.push(login);
// console.log(JSON.parse("TOKEN",login.token));
@@ -254,7 +263,7 @@ passwordIcon:any = "visibility_off";
localStorage.setItem('currentuser',JSON.parse(atob(login.token.split('.')[1]))._id);
var isOperator = JSON.parse(atob(login.token.split('.')[1])).isOperator;
var userId = JSON.parse(atob(login.token.split('.')[1]))._id;
-
+ // this._DatainjectionService.getConnection();
this.getLanguage(userId,isOperator,JSON.parse(atob(login.token.split('.')[1])).customer_role);
} , (err: any) => {
@@ -735,7 +744,7 @@ countdown( elementName, minutes, seconds )
this.organisationName = (this.url == 'oneqlik')?'OneQlik':this.userData.organisationName ;
this.supportContact = this.userData.contact_support?this.userData.contact_support : '';
this.tagline= this.userData.tagline?this.userData.tagline : this.tagline;
- this._document.getElementById('appFavicon').setAttribute('href', this.dev_url+this.userData.favicon);
+ this._document.getElementById('appFavicon').setAttribute('href', this.userData.favicon ? this.dev_url + this.userData.favicon :'faviconn.ico' );
this.text=this.userData.text;
window.localStorage['dealerName']= this.userData.dealerName;
window.localStorage['DealerID'] = this.userData.email
diff --git a/src/app/model-master/model-master.component.scss b/src/app/model-master/model-master.component.scss
index cbbb14b..dbc8ae4 100644
--- a/src/app/model-master/model-master.component.scss
+++ b/src/app/model-master/model-master.component.scss
@@ -1,17 +1,17 @@
-.topDiv {
- padding-top: 20px;
- background: whitesmoke;
- height: 100vh;
-}
-.bg-blue {
- background-color: #00c0ef !important;
-}
-.bg-green {
- background-color: #00a65a !important;
-}
-.bg-orange {
- background-color: #f39c12 !important;
-}
-.bg-red {
- background-color: #d9534f !important;
-}
+.topDiv {
+ padding-top: 20px;
+ background: whitesmoke;
+ height: 100vh;
+}
+.bg-blue {
+ background-color: #00c0ef !important;
+}
+.bg-green {
+ background-color: #00a65a !important;
+}
+.bg-orange {
+ background-color: #f39c12 !important;
+}
+.bg-red {
+ background-color: #d9534f !important;
+}
diff --git a/src/app/notification/notification.component.ts b/src/app/notification/notification.component.ts
index 45b5ece..7940764 100644
--- a/src/app/notification/notification.component.ts
+++ b/src/app/notification/notification.component.ts
@@ -66,6 +66,7 @@ export class NotificationComponent implements OnInit, OnDestroy {
this.router.navigateByUrl("location");
}
accListener(){
+ console.log('connect notifiov2')
var outerThis = this;
return function(msg){
// console.log(msg);
@@ -169,7 +170,9 @@ mb:any
}
this.socket_Notify = this.injectData.getSocket_notifIO();
- this.socket_Notify.on('connect', function(this){ });
+ this.socket_Notify.on('connect', function(this){
+ console.log('notify connect',this)
+ });
this.socket_Notify.on( this.useridd, this.accListener());
this.getData(this.useridd).subscribe(
data => {
diff --git a/src/app/poi-menu/poi-menu.component.html b/src/app/poi-menu/poi-menu.component.html
index 93497dd..f900abd 100644
--- a/src/app/poi-menu/poi-menu.component.html
+++ b/src/app/poi-menu/poi-menu.component.html
@@ -1,48 +1,48 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | {{'Client Name' | translate}} |
- {{'Altitude' | translate}} |
- {{'Longitude' | translate}} |
- {{'Address' | translate}} |
-
-
-
-
-
- | {{failedDevices['Client Name']}} |
- {{failedDevices.Altitude}} |
- {{failedDevices.Longitude}} |
- {{failedDevices.Address}} |
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | {{'Client Name' | translate}} |
+ {{'Altitude' | translate}} |
+ {{'Longitude' | translate}} |
+ {{'Address' | translate}} |
+
+
+
+
+
+ | {{failedDevices['Client Name']}} |
+ {{failedDevices.Altitude}} |
+ {{failedDevices.Longitude}} |
+ {{failedDevices.Address}} |
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/report-schedule/report-schedule.component.scss b/src/app/report-schedule/report-schedule.component.scss
index fecda9c..14d38bc 100644
--- a/src/app/report-schedule/report-schedule.component.scss
+++ b/src/app/report-schedule/report-schedule.component.scss
@@ -1,3 +1,3 @@
-.example-chip-list {
- width: 100%;
-}
+.example-chip-list {
+ width: 100%;
+}
diff --git a/src/app/report/all-menus/all-menus.component.html b/src/app/report/all-menus/all-menus.component.html
index fba623f..b54316f 100644
--- a/src/app/report/all-menus/all-menus.component.html
+++ b/src/app/report/all-menus/all-menus.component.html
@@ -107,7 +107,7 @@
{{'Tutorial Videos' | translate}}
+ *ngIf="superAdmin && urlspecifc" (click)="tutorialVideos('admin')">{{'Tutorial Videos' | translate}}
{{'User Finder' | translate}}
diff --git a/src/app/report/all-menus/all-menus.component.ts b/src/app/report/all-menus/all-menus.component.ts
index ae30574..b764b47 100644
--- a/src/app/report/all-menus/all-menus.component.ts
+++ b/src/app/report/all-menus/all-menus.component.ts
@@ -51,6 +51,7 @@ declare var google: any,$:any;
export class AllMenusComponent implements OnInit {
//
marker1: any;
+
mapData: any[];
routePath: any;
before: any;
@@ -58,6 +59,7 @@ export class AllMenusComponent implements OnInit {
cust: boolean = false;
logo: any;
text: any;
+ urlspecifc:boolean = false
fs: any; ls: any; emailid: any; or: any; useridd: any; mb: any; custtype: any; dealer: any;
showImage: any;
groups = [];
@@ -146,6 +148,13 @@ export class AllMenusComponent implements OnInit {
menuWidth:any;
sup_admin:boolean;
ngOnInit() {
+ let domainName = window.location.host;
+ console.log(domainName, 'domainName');
+ if (domainName.indexOf('oneqlik') >= 0 || domainName.indexOf('localhost') >= 0) {
+ this.urlspecifc = true
+ } else {
+ this.urlspecifc = false;
+ }
// console.log("Inside all app menu component---------------------------------------------");
// this.superAdmin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin;
if(localStorage.getItem('superadmin')=="ON"){
diff --git a/src/app/report/header/header.component.scss b/src/app/report/header/header.component.scss
index 6ac560a..3ae6bb1 100644
--- a/src/app/report/header/header.component.scss
+++ b/src/app/report/header/header.component.scss
@@ -1,234 +1,234 @@
-.custom_style {
- // position: fixed;
- // top:0 ;
- // left:0;
- // right :0;
- // background: #2D4262;
- // padding-top: 0%;
- // padding-bottom: 0%;
- // line-height: 2.8;
- // box-shadow: -1px 7px 7px -5px rgb(48, 68, 99);
-
- // ================changed style==================
- position: fixed;
- background: #2d4262;
- padding-top: 1%;
- padding: 0;
- width: 100%;
- box-shadow: -1px 7px 7px -5px #304463;
-}
-
-.changePadding {
- flex: 1;
- text-align: center;
- padding-left: 90px;
-}
-
-.changePadding1 {
- flex: 1;
- text-align: center;
- padding-left: 15px;
-}
-
-.list_style {
- margin-left: 100px;
- ul {
- li {
- a {
- color: white;
- }
- }
- }
-}
-
-.dropdown_style {
- // background: #b9b7b7 ;
- // background: linear-gradient(to bottom, #2c3e50,#bdc3c7);
- // background: #D42021;
-
- background: #2d4262;
-
- padding-top: 0;
- padding-bottom: 0;
-
- cursor: pointer;
- a {
- color: white;
- }
-}
-
-.dropdown-menu > a:hover {
- background-color: #2a3132;
- background-image: none;
-}
-
-.hoverStyle:hover {
- background-color: #2a3132;
- background-image: none;
-}
-
-.nav-item > a:hover {
- background-color: #2a3132;
-}
-
-::-webkit-scrollbar {
- width: 10px;
-}
-
-/* Track */
-::-webkit-scrollbar-track {
- background: rgb(153, 153, 153);
-}
-
-/* Handle */
-::-webkit-scrollbar-thumb {
- background: rgb(74, 118, 184);
-}
-
-/* Handle on hover */
-::-webkit-scrollbar-thumb:hover {
- background: #555;
-}
-
-@media (max-width: 1540px) {
- #navbarSupportedContent {
- margin-left: 50px;
- }
-}
-
-@media (min-width: 1366px) {
- #navbarSupportedContent {
- margin-left: 50px;
- }
-}
-
-@media (max-width: 1366px) {
- .list_style {
- font-size: 13px;
- }
-}
-
-@media (max-width: 1366px) {
- .changePadding {
- padding-left: 0px;
- }
- .changePadding1 {
- padding-left: 0px;
- }
-}
-
-::-webkit-scrollbar {
- width: 10px;
- height: 10px;
-}
-
-/* Track */
-::-webkit-scrollbar-track {
- background: rgb(143, 215, 255);
-}
-
-/* Handle */
-::-webkit-scrollbar-thumb {
- background: #dadada;
-}
-
-/* Handle on hover */
-::-webkit-scrollbar-thumb:hover {
- background: #555;
-}
-
-#navbarSupportedContent {
- margin-left: 100px;
-}
-@media (max-width: 1537px) {
- #navbarSupportedContent {
- margin-left: 0px;
- }
-}
-
-@media (max-width: 1537px) {
- .list_style {
- font-size: 13px;
- }
-}
-
-// @media (min-width:1366px){
-// .list_style{
-// font-size: 14px;
-// }
-
-// }
-// @media (max-width:1476px){
-
-// .list_style{
-// font-size: 14px;
-// }
-// }
-
-// 1366,1440
-
-// .bg-light{
-// background: #737373;
-
-// }
-
-// .bg-light :hover{
-// background: #dbd4d4;
-
-// }
-
-// .navbar-nav > li > .dropdown-menu { background-color: #FF0000; }
-// .dropdown-menu > .active > a,.dropdown-menu > .active > a:hover.dropdown-menu > .active > a:focus {color: #555555!important; background-color: #e7e7e7!important;}
-
-li a.nav-link {
- width: max-content !important;
- // padding: 20px 5px !important;
-}
-
-.dropdown-submenu {
- position: relative;
-}
-
-.dropdown-submenu > .dropdown-menu {
- top: 0;
- left: 100%;
- margin-top: -6px;
- margin-left: -1px;
- -webkit-border-radius: 0 6px 6px 6px;
- -moz-border-radius: 0 6px 6px;
- border-radius: 0 6px 6px 6px;
-}
-
-.dropdown-submenu:hover > .dropdown-menu {
- display: block;
-}
-
-.dropdown-submenu > a:after {
- display: block;
- content: " ";
- float: right;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
- border-width: 5px 0 5px 5px;
- border-left-color: #ccc;
- margin-top: 5px;
- margin-right: -10px;
-}
-
-.dropdown-submenu:hover > a:after {
- border-left-color: #fff;
-}
-
-.dropdown-submenu.pull-left {
- float: none;
-}
-
-.dropdown-submenu.pull-left > .dropdown-menu {
- left: -100%;
- margin-left: 10px;
- -webkit-border-radius: 6px 0 6px 6px;
- -moz-border-radius: 6px 0 6px 6px;
- border-radius: 6px 0 6px 6px;
-}
+.custom_style {
+ // position: fixed;
+ // top:0 ;
+ // left:0;
+ // right :0;
+ // background: #2D4262;
+ // padding-top: 0%;
+ // padding-bottom: 0%;
+ // line-height: 2.8;
+ // box-shadow: -1px 7px 7px -5px rgb(48, 68, 99);
+
+ // ================changed style==================
+ position: fixed;
+ background: #2d4262;
+ padding-top: 1%;
+ padding: 0;
+ width: 100%;
+ box-shadow: -1px 7px 7px -5px #304463;
+}
+
+.changePadding {
+ flex: 1;
+ text-align: center;
+ padding-left: 90px;
+}
+
+.changePadding1 {
+ flex: 1;
+ text-align: center;
+ padding-left: 15px;
+}
+
+.list_style {
+ margin-left: 100px;
+ ul {
+ li {
+ a {
+ color: white;
+ }
+ }
+ }
+}
+
+.dropdown_style {
+ // background: #b9b7b7 ;
+ // background: linear-gradient(to bottom, #2c3e50,#bdc3c7);
+ // background: #D42021;
+
+ background: #2d4262;
+
+ padding-top: 0;
+ padding-bottom: 0;
+
+ cursor: pointer;
+ a {
+ color: white;
+ }
+}
+
+.dropdown-menu > a:hover {
+ background-color: #2a3132;
+ background-image: none;
+}
+
+.hoverStyle:hover {
+ background-color: #2a3132;
+ background-image: none;
+}
+
+.nav-item > a:hover {
+ background-color: #2a3132;
+}
+
+::-webkit-scrollbar {
+ width: 10px;
+}
+
+/* Track */
+::-webkit-scrollbar-track {
+ background: rgb(153, 153, 153);
+}
+
+/* Handle */
+::-webkit-scrollbar-thumb {
+ background: rgb(74, 118, 184);
+}
+
+/* Handle on hover */
+::-webkit-scrollbar-thumb:hover {
+ background: #555;
+}
+
+@media (max-width: 1540px) {
+ #navbarSupportedContent {
+ margin-left: 50px;
+ }
+}
+
+@media (min-width: 1366px) {
+ #navbarSupportedContent {
+ margin-left: 50px;
+ }
+}
+
+@media (max-width: 1366px) {
+ .list_style {
+ font-size: 13px;
+ }
+}
+
+@media (max-width: 1366px) {
+ .changePadding {
+ padding-left: 0px;
+ }
+ .changePadding1 {
+ padding-left: 0px;
+ }
+}
+
+::-webkit-scrollbar {
+ width: 10px;
+ height: 10px;
+}
+
+/* Track */
+::-webkit-scrollbar-track {
+ background: rgb(143, 215, 255);
+}
+
+/* Handle */
+::-webkit-scrollbar-thumb {
+ background: #dadada;
+}
+
+/* Handle on hover */
+::-webkit-scrollbar-thumb:hover {
+ background: #555;
+}
+
+#navbarSupportedContent {
+ margin-left: 100px;
+}
+@media (max-width: 1537px) {
+ #navbarSupportedContent {
+ margin-left: 0px;
+ }
+}
+
+@media (max-width: 1537px) {
+ .list_style {
+ font-size: 13px;
+ }
+}
+
+// @media (min-width:1366px){
+// .list_style{
+// font-size: 14px;
+// }
+
+// }
+// @media (max-width:1476px){
+
+// .list_style{
+// font-size: 14px;
+// }
+// }
+
+// 1366,1440
+
+// .bg-light{
+// background: #737373;
+
+// }
+
+// .bg-light :hover{
+// background: #dbd4d4;
+
+// }
+
+// .navbar-nav > li > .dropdown-menu { background-color: #FF0000; }
+// .dropdown-menu > .active > a,.dropdown-menu > .active > a:hover.dropdown-menu > .active > a:focus {color: #555555!important; background-color: #e7e7e7!important;}
+
+li a.nav-link {
+ width: max-content !important;
+ // padding: 20px 5px !important;
+}
+
+.dropdown-submenu {
+ position: relative;
+}
+
+.dropdown-submenu > .dropdown-menu {
+ top: 0;
+ left: 100%;
+ margin-top: -6px;
+ margin-left: -1px;
+ -webkit-border-radius: 0 6px 6px 6px;
+ -moz-border-radius: 0 6px 6px;
+ border-radius: 0 6px 6px 6px;
+}
+
+.dropdown-submenu:hover > .dropdown-menu {
+ display: block;
+}
+
+.dropdown-submenu > a:after {
+ display: block;
+ content: " ";
+ float: right;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+ border-width: 5px 0 5px 5px;
+ border-left-color: #ccc;
+ margin-top: 5px;
+ margin-right: -10px;
+}
+
+.dropdown-submenu:hover > a:after {
+ border-left-color: #fff;
+}
+
+.dropdown-submenu.pull-left {
+ float: none;
+}
+
+.dropdown-submenu.pull-left > .dropdown-menu {
+ left: -100%;
+ margin-left: 10px;
+ -webkit-border-radius: 6px 0 6px 6px;
+ -moz-border-radius: 6px 0 6px 6px;
+ border-radius: 6px 0 6px 6px;
+}
diff --git a/src/app/report/main/main.component.scss b/src/app/report/main/main.component.scss
index 42f6505..143080f 100644
--- a/src/app/report/main/main.component.scss
+++ b/src/app/report/main/main.component.scss
@@ -1,146 +1,146 @@
-ul {
- list-style-type: none;
- margin: 55px 0px 0px 0px;
- padding: 0;
- width: 25%;
- background-color: #f1f1f1;
- position: fixed;
- height: 100%;
- overflow: auto;
-}
-
-li a {
- display: block;
- color: #000;
- padding: 8px 0 8px 16px;
- text-decoration: none;
-}
-
-li a.active {
- background-color: #4caf50;
- color: white;
-}
-
-li a:hover:not(.active) {
- background-color: #555;
- color: white;
-}
-
-.componentClass {
- margin-left: 25%;
- padding: 64px 16px;
- height: 1000px;
-}
-/* The sidebar menu */
-.sidebar {
- height: 100%; /* 100% Full-height */
- width: 295px; /* 0 width - change this with JavaScript */
- position: fixed; /* Stay in place */
- z-index: 1; /* Stay on top */
- top: 0;
- left: 0;
- background: #f9f6f6 !important;
- padding-left: 3px;
- background-color: #111; /* Black*/
- overflow-x: hidden; /* Disable horizontal scroll */
- padding-top: 60px; /* Place content 60px from the top */
- transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */
-}
-
-/* The sidebar links */
-.sidebar a {
- padding: 8px 8px 8px 32px;
- text-decoration: none;
- font-size: 25px;
- color: #818181;
- display: block;
- transition: 0.3s;
-}
-
-/* When you mouse over the navigation links, change their color */
-.sidebar a:hover {
- color: #f1f1f1;
-}
-
-/* Position and style the close button (top right corner) */
-.sidebar .closebtn {
- position: absolute;
- top: 0;
- right: 25px;
- font-size: 36px;
- margin-left: 50px;
-}
-
-/* The button used to open the sidebar */
-.openbtn {
- font-size: 20px;
- cursor: pointer;
- background-color: #111;
- color: white;
- margin-top: 35px;
-
- padding: 10px 15px;
- border: none;
-}
-
-.openbtn:hover {
- background-color: #444;
-}
-
-/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
-#main {
- transition: margin-left 0.5s; /* If you want a transition effect */
- padding: 20px;
- margin-left: 295px;
-}
-
-/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
-@media screen and (max-height: 450px) {
- .sidebar {
- padding-top: 15px;
- }
- .sidebar a {
- font-size: 18px;
- }
-}
-.wrapper {
- position: relative;
- width: 250px;
- height: 300px;
- border: 1px dashed #ccc;
- margin: 10px;
-}
-
-.line {
- position: absolute;
- left: 0%;
- top: 0;
- bottom: 0;
- // width: 20px;
- // width: 1px;
- margin-left: 295px;
- // background: #426e86;
- z-index: 1;
-}
-
-.wordwrapper {
- text-align: center;
- height: 12px;
- position: absolute;
- left: 0;
- // right: 0;
-
- top: 50%;
- margin-top: -12px;
- z-index: 2;
-}
-
-.word {
- color: #ccc;
- text-transform: uppercase;
- letter-spacing: 1px;
- padding: 3px;
- margin-left: 295px;
- font: bold 12px arial, sans-serif;
- // background: #fff;
-}
+ul {
+ list-style-type: none;
+ margin: 55px 0px 0px 0px;
+ padding: 0;
+ width: 25%;
+ background-color: #f1f1f1;
+ position: fixed;
+ height: 100%;
+ overflow: auto;
+}
+
+li a {
+ display: block;
+ color: #000;
+ padding: 8px 0 8px 16px;
+ text-decoration: none;
+}
+
+li a.active {
+ background-color: #4caf50;
+ color: white;
+}
+
+li a:hover:not(.active) {
+ background-color: #555;
+ color: white;
+}
+
+.componentClass {
+ margin-left: 25%;
+ padding: 64px 16px;
+ height: 1000px;
+}
+/* The sidebar menu */
+.sidebar {
+ height: 100%; /* 100% Full-height */
+ width: 295px; /* 0 width - change this with JavaScript */
+ position: fixed; /* Stay in place */
+ z-index: 1; /* Stay on top */
+ top: 0;
+ left: 0;
+ background: #f9f6f6 !important;
+ padding-left: 3px;
+ background-color: #111; /* Black*/
+ overflow-x: hidden; /* Disable horizontal scroll */
+ padding-top: 60px; /* Place content 60px from the top */
+ transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */
+}
+
+/* The sidebar links */
+.sidebar a {
+ padding: 8px 8px 8px 32px;
+ text-decoration: none;
+ font-size: 25px;
+ color: #818181;
+ display: block;
+ transition: 0.3s;
+}
+
+/* When you mouse over the navigation links, change their color */
+.sidebar a:hover {
+ color: #f1f1f1;
+}
+
+/* Position and style the close button (top right corner) */
+.sidebar .closebtn {
+ position: absolute;
+ top: 0;
+ right: 25px;
+ font-size: 36px;
+ margin-left: 50px;
+}
+
+/* The button used to open the sidebar */
+.openbtn {
+ font-size: 20px;
+ cursor: pointer;
+ background-color: #111;
+ color: white;
+ margin-top: 35px;
+
+ padding: 10px 15px;
+ border: none;
+}
+
+.openbtn:hover {
+ background-color: #444;
+}
+
+/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
+#main {
+ transition: margin-left 0.5s; /* If you want a transition effect */
+ padding: 20px;
+ margin-left: 295px;
+}
+
+/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
+@media screen and (max-height: 450px) {
+ .sidebar {
+ padding-top: 15px;
+ }
+ .sidebar a {
+ font-size: 18px;
+ }
+}
+.wrapper {
+ position: relative;
+ width: 250px;
+ height: 300px;
+ border: 1px dashed #ccc;
+ margin: 10px;
+}
+
+.line {
+ position: absolute;
+ left: 0%;
+ top: 0;
+ bottom: 0;
+ // width: 20px;
+ // width: 1px;
+ margin-left: 295px;
+ // background: #426e86;
+ z-index: 1;
+}
+
+.wordwrapper {
+ text-align: center;
+ height: 12px;
+ position: absolute;
+ left: 0;
+ // right: 0;
+
+ top: 50%;
+ margin-top: -12px;
+ z-index: 2;
+}
+
+.word {
+ color: #ccc;
+ text-transform: uppercase;
+ letter-spacing: 1px;
+ padding: 3px;
+ margin-left: 295px;
+ font: bold 12px arial, sans-serif;
+ // background: #fff;
+}
diff --git a/src/app/report/report component/daily-report/daily-report.component.scss b/src/app/report/report component/daily-report/daily-report.component.scss
index df04e26..a8bee5c 100644
--- a/src/app/report/report component/daily-report/daily-report.component.scss
+++ b/src/app/report/report component/daily-report/daily-report.component.scss
@@ -1,52 +1,52 @@
-col-sm-9 col-md-9 col-lg-9 .ms-parent {
- width: 100% !important;
-}
-#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;
-}
+col-sm-9 col-md-9 col-lg-9 .ms-parent {
+ width: 100% !important;
+}
+#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;
+}
diff --git a/src/app/report/report component/day-wise-report/day-wise-report.component.ts b/src/app/report/report component/day-wise-report/day-wise-report.component.ts
index a9ec364..abf87b3 100644
--- a/src/app/report/report component/day-wise-report/day-wise-report.component.ts
+++ b/src/app/report/report component/day-wise-report/day-wise-report.component.ts
@@ -723,6 +723,7 @@ var pageWidth = doc.internal.pageSize.width || doc.internal.pageSize.getWidth();
// lineColor: [0, 0, 0]
// },
theme:'grid',
+
didDrawPage: function (data) {
// Header
doc.setFontSize(20);
@@ -784,6 +785,7 @@ var pageWidth = doc.internal.pageSize.width || doc.internal.pageSize.getWidth();
'Moving Time':'Moving Time (HH:MM)',
'Stoppage Time':'Stoppage Time (HH:MM)',
'Idle Time':'Idle Time (HH:MM)',
+ fuelConsumed: 'Fuel Consumed',
startAddress:'Start Location',
endAddress:'End Location',
}
@@ -798,21 +800,31 @@ var pageWidth = doc.internal.pageSize.width || doc.internal.pageSize.getWidth();
let body = [];
for (var j = 0; j < rowCount; j++) {
body.push({
-
- Date:pdfBody[j].Date,
+ Date: (pdfBody[j].Date ? (moment(pdfBody[j].Date).format('DD-MM-YYYY')) : "") ,
VRN:pdfBody[j].VRN,
'Distance(Kms)':(pdfBody[j]['Distance(Kms)']).toFixed(2),
'Moving Time':this.conversion(pdfBody[j]['Moving Time']),
'Stoppage Time':this.conversion(pdfBody[j]['Moving Time']),
"Idle Time":this.conversion(pdfBody[j]['Idle Time']),
+ fuelConsumed: this.fuleConvert((pdfBody[j]['Distance(Kms)']).toFixed(2), pdfBody[j]['Mileage']),
startAddress:pdfBody[j].startAddress,
endAddress:pdfBody[j].endAddress,
-
});
}
return body;
}
+ fuleConvert(distance,data) {
+ if (data && distance) {
+
+ var mileage = parseFloat(distance) / parseFloat(data)
+ return mileage.toFixed(2)
+
+ } else {
+
+ return ''
+ }
+ }
conversion(data){
var hhmm;
if(data){
diff --git a/src/app/report/report component/disatance-report/details/details.component.scss b/src/app/report/report component/disatance-report/details/details.component.scss
index a1ce51f..e4a6d67 100644
--- a/src/app/report/report component/disatance-report/details/details.component.scss
+++ b/src/app/report/report component/disatance-report/details/details.component.scss
@@ -1,3 +1,3 @@
-.mat-dialog-container {
- overflow: hidden !important;
-}
+.mat-dialog-container {
+ overflow: hidden !important;
+}
diff --git a/src/app/report/report component/disatance-report/disatance-report.component.scss b/src/app/report/report component/disatance-report/disatance-report.component.scss
index 5cd7ed5..171f5a7 100644
--- a/src/app/report/report component/disatance-report/disatance-report.component.scss
+++ b/src/app/report/report component/disatance-report/disatance-report.component.scss
@@ -1,49 +1,49 @@
-#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;
-}
+#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;
+}
diff --git a/src/app/report/report component/disatance-report/disatance-report.component.ts b/src/app/report/report component/disatance-report/disatance-report.component.ts
index 099888e..8788f96 100644
--- a/src/app/report/report component/disatance-report/disatance-report.component.ts
+++ b/src/app/report/report component/disatance-report/disatance-report.component.ts
@@ -326,9 +326,9 @@ export class DisatanceReportComponent implements OnInit {
var j = 0;
that.finalArr = [];
for (var i = 0; i < that.reportArr.length; i++) {
- if (that.reportArr[i].reportData){
+ if (that.reportArr[i]){
- that.clocation_1(that.reportArr[i].reportData, function (err, succ) {
+ that.clocation_1(that.reportArr[i], function (err, succ) {
if (err) {
console.log(err);
j++;
diff --git a/src/app/report/report component/geofancing-report/geofancing-report.component.html b/src/app/report/report component/geofancing-report/geofancing-report.component.html
index 03c8b48..ad73587 100644
--- a/src/app/report/report component/geofancing-report/geofancing-report.component.html
+++ b/src/app/report/report component/geofancing-report/geofancing-report.component.html
@@ -19,22 +19,161 @@
-->
-
+
+
+
+
+
+
+
+
+
+
+ Duration More than (in Min)
+
+
+
+
+
+
+
+
+
+
+
+
Loading…
-
-
+
+
-
+
| {{'Vehicle Name' | translate}} |
{{'In/Out' | translate}} |
{{'Datetime' | translate}} |
{{'Location' | translate}} |
{{'GeoFence Name' | translate}} |
+
+
+
+
+
+
+ Loading…
+
+
+
+
+ | {{'Vehicle Name' | translate}} |
+ {{'In Time' | translate}} |
+ {{'Out Time' | translate}} |
+ {{'Duration' | translate}} |
+ {{'GeoFence Name' | translate}} |
+
+
+
+
+
+
+
+
+
+
+ Loading…
+
+
+
+
+
+
+
+ | Object: |
+ {{detailReport.vehicle}} |
+
+
+ | Period: |
+ {{Fromdate | date:"dd/MM/yyyy hh:mm:ss"}} - {{todate | date:"dd/MM/yyyy hh:mm:ss"}} |
+
+
+
+
+
+
+ | {{'Object' | translate}} |
+ {{'Zone in' | translate}} |
+ {{'Zone Out' | translate}} |
+ {{'Duration' | translate}} |
+ {{'Route length' | translate}} |
+ {{'Zone name' | translate}} |
+ {{'Zone position' | translate}} |
+
+
+
+ 120 ? 'yellow':'white'" *ngFor="let item of detailReport.list; let i=index;" >
+ | {{item.vehicleName ? item.vehicleName : '-'}} |
+ {{item.inTimeDate ? (item.inTimeDate | date:'dd/MM/yyyy hh:mm:ss') : '-'}} |
+ {{item.outTimeDate ? (item.outTimeDate | date:'dd/MM/yyyy hh:mm:ss') : '-'}} |
+ {{item.duration ? item.duration : '-'}} |
+ {{item.routeLength ? item.routeLength : '0'}} km |
+ {{item.geoid && item.geoid.geoname ? item.geoid.geoname : '-'}} |
+ - |
+
+
+
+
+
+
+
+ |
+ |
+ |
+
+
+
+
+
+ | {{item.zoneName ? item.zoneName : '-'}} |
+ {{item.durationTotal ? item.durationTotal : '-'}} |
+ {{item.distanceTotal ? item.distanceTotal : '0'}} km |
+
+
+
+
+
+
+ Nothing has been found on your request.
+
+
+
+
+
+
diff --git a/src/app/report/report component/geofancing-report/geofancing-report.component.scss b/src/app/report/report component/geofancing-report/geofancing-report.component.scss
index 63b6859..2908216 100644
--- a/src/app/report/report component/geofancing-report/geofancing-report.component.scss
+++ b/src/app/report/report component/geofancing-report/geofancing-report.component.scss
@@ -3,7 +3,15 @@
background: whitesmoke;
height: 100vh;
}
-
+.d-hide {
+ display: none;
+}
+.yellow-bg {
+ background-color: yellow;
+}
+.tab-btn-active{
+ background-color: #616466 !important;
+}
.rowStyle {
// margin: 5px;
// background: white;
diff --git a/src/app/report/report component/geofancing-report/geofancing-report.component.ts b/src/app/report/report component/geofancing-report/geofancing-report.component.ts
index 880414b..fd48678 100644
--- a/src/app/report/report component/geofancing-report/geofancing-report.component.ts
+++ b/src/app/report/report component/geofancing-report/geofancing-report.component.ts
@@ -1,13 +1,13 @@
import { Component, OnInit } from '@angular/core';
import { ContactService } from '../../../contact.service';
-import {MdDialog, MdDialogRef, MD_DIALOG_DATA} from '@angular/material';
+import { MdDialog, MdDialogRef, MD_DIALOG_DATA } from '@angular/material';
import { MyaccountComponent } from '../../../myaccount/myaccount.component';
-import { Params,Router, ActivatedRoute, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
+import { Params, Router, ActivatedRoute, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
import * as moment from 'moment';
declare var google: any;
-declare var jsPDF : any;
+declare var jsPDF: any;
declare var $: any;
const PDF_EXTENSION = ".pdf"
import { ReportService } from '../../report.service';
@@ -25,59 +25,74 @@ declare var google: any;
styleUrls: ['./geofancing-report.component.scss']
})
export class GeofancingReportComponent implements OnInit {
- date1:any;
- finalArr=[]
- finall:any;
- identifier:any= 'geofence_report';
- options= [];
- logo:any;
- Fromdate:any;
- todate:any;
- userName:any;
- before:any;
- deviceArr: any=[];
+ filterDuration: number = 0;
+ date1: any;
+ finalArr = []
+ finall: any;
+ identifier: any = 'geofence_report';
+ options = [];
+ logo: any;
+ Fromdate: any;
+ todate: any;
+ userName: any;
+ before: any;
+ deviceArr: any = [];
+ isNormalView = true;
+ dtOptions: any = {};
+ setActiveView(status) {
+ this.isNormalView = status;
+ setTimeout(() => {
+ this.tabelDetailsObj.columns.adjust().draw();
+ this.tabelObj.columns.adjust().draw();
+ }, 1000)
-private finalise = new Subject();
- constructor(private contactService: ContactService,private _service:ReportService,private router: Router,public dialog: MdDialog) {
+ }
+ private finalise = new Subject();
+ constructor(private contactService: ContactService, private _service: ReportService, private router: Router, public dialog: MdDialog) {
this._service.invokeEventForgeofenceReport.pipe(
takeUntil(this.finalise)
).subscribe(value => {
- if(value){
- this.getReport(value);
- }
-
-
- });
- }
- ngOnDestroy(){
-
+ if (value) {
+ this.getReport(value);
+ }
+
+
+ });
+ }
+ ngOnDestroy() {
+
this.finalise.next(void 0);
}
- fs : any;
- ls : any;
- emailid : any;
- or : any;
- useridd :any;
- time :any;
-
- device_data:any;
- devicess:any;
- final:any;
- custtype:any;
- cust:boolean=false;
- Load : Boolean = false;
- date : any;
- devicesss:any;
+ fs: any;
+ ls: any;
+ emailid: any;
+ or: any;
+ useridd: any;
+ time: any;
- mb:any;
- logoutbut:boolean;
-dealer:boolean;
+ device_data: any;
+ devicess: any;
+ final: any;
+ custtype: any;
+ cust: boolean = false;
+ Load: Boolean = false;
+ date: any;
+ devicesss: any;
-text:any;
-option:any;
-geo_status=[];
-superAdmin:Boolean = false;
+ mb: any;
+ logoutbut: boolean;
+ dealer: boolean;
+
+ text: any;
+ option: any;
+ geo_status = [];
+ superAdmin: Boolean = false;
ngOnInit() {
+ this.dtOptions = {
+ pagingType: 'full_numbers',
+ pageLength: 10,
+ processing: true
+ };
// var fTime = new Date().setHours(0,0,0);
// this.Fromdate = new Date(fTime);
this.superAdmin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin;
@@ -88,42 +103,43 @@ superAdmin:Boolean = false;
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;
+ 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 = ' '
- }
+ if (this.custtype == true) {
+ this.cust = true;
+ }
+ if (this.mb.charAt(0) == "n") {
+ this.mb = ' '
+ }
- if( window.localStorage['Custumer'] == 'ON'){
- this.logoutbut = false
- this.dealer = true
- }
- else{
- this.logoutbut = true
- }
-
- this.logo=window.localStorage['logo'];
- this.text=window.localStorage['text'];
-
+ if (window.localStorage['Custumer'] == 'ON') {
+ this.logoutbut = false
+ this.dealer = true
+ }
+ else {
+ this.logoutbut = true
+ }
+
+ this.logo = window.localStorage['logo'];
+ this.text = window.localStorage['text'];
+
+
+
+ this.testTable();
+ this.testDetailsTable();
- this.testTable();
-
-
}
// openNav() {
// /* document.getElementById("myNav").style.width = "100%";
// */
// this.router.navigateByUrl("location");
-
+
// }
@@ -139,18 +155,18 @@ superAdmin:Boolean = false;
// }
// myaccount(){
-
+
// let dialogRef = this.dialog.open(MyaccountComponent, {
// width: '903px',
// data: {}
// });
-
+
// dialogRef.afterClosed().subscribe(result => {
-
+
// if(result == "succ"){
// //console.log("Updated")
// }
-
+
// });
// }
// logout(){
@@ -159,16 +175,16 @@ superAdmin:Boolean = false;
// }
// devi(){
// this.router.navigateByUrl("dashboard");
-
+
// }
// soon(){
// this.router.navigateByUrl("const?_i="+window.localStorage.token);
-
+
// }
-
+
// new(){
// this.router.navigateByUrl("new");
-
+
// }
// cond:Boolean = false;
// point : any = 0;
@@ -186,28 +202,28 @@ superAdmin:Boolean = false;
// this.cond = false
// this.point ++;
// }
-
-
+
+
// }
// summaryReport(){
-
+
// this.cond = false
// this.router.navigateByUrl("device-report/summary-report");
// }
-
-
+
+
// overspeed(){
// this.cond = false
// this.router.navigateByUrl("device-report/overspeed");
-
+
// }
// driverPerformance(){
// this.cond = false
// this.router.navigateByUrl("device-report/Driver-performance");
// }
-
+
// route_map(){
// this.router.navigateByUrl("routeMapping");
@@ -221,12 +237,12 @@ superAdmin:Boolean = false;
// VType(){
// this.router.navigateByUrl("VehicleType");
// }
-
-
+
+
// routeViolation(){
// this.cond = false
// this.router.navigateByUrl("device-report/routeViolation");
-
+
// }
@@ -234,11 +250,11 @@ superAdmin:Boolean = false;
// this.cond = false
// this.router.navigateByUrl("notifications");
// }
-
+
// stoppage_report(){
// this.cond = false
// this.router.navigateByUrl("device-report/stoppage_report");
-
+
// }
// group(){
// this.cond = false
@@ -250,7 +266,7 @@ superAdmin:Boolean = false;
// report(){
// this.cond = false
// this.router.navigateByUrl("device-report");
-
+
// }
// report_speed(){
// //console.log("report speed call")
@@ -260,7 +276,7 @@ superAdmin:Boolean = false;
// ign(){
// this.router.navigateByUrl("device-report/ign-report");
-
+
// }
// ignition_report(){
@@ -279,7 +295,7 @@ superAdmin:Boolean = false;
// trip_report(){
// this.cond = false
// this.router.navigateByUrl("device-report/trip_report");
-
+
// }
// ideal(){
@@ -287,7 +303,7 @@ superAdmin:Boolean = false;
// }
// geo(){
// this.router.navigateByUrl("geofencing");
-
+
// }
// vehicleRoute(){
@@ -310,424 +326,720 @@ superAdmin:Boolean = false;
// this.cond = false
// this.router.navigateByUrl("device-report/geofancing");
// }
-
-
- geofence=[];
- show_time:any;
- geofence_data=[];
- address_show:any;
-
-
-// geofancing_Report(fd,td,devop){
-// //console.log(devop);//console.log(fd);//console.log(td);//console.log(devop);
-// let f_date = fd.toISOString();
-// let t_date = td.toISOString();
-// //console.log(f_date);//console.log(t_date);
-// let uId = this.useridd;
-// //console.log(uId);
-// let geoId = devop._id;
-// //console.log(geoId);
-// var outerThis = this;
-// this.Load = true;
-// this.contactService.geofenceData(f_date,t_date,uId,geoId)
-// .subscribe(res=>{
-// this.Load = false;
-// //console.log(res);
-// this.geofence = res;
-// console.log("this.geofence=>",this.geofence);
-// },err=>{
-// this.Load = false;
-// console.log('Error While fetching data');
-// })
-// }
-tabelObj:any;
-testTable() {
- const that = this;
-
- console.log("inside function");
- $(document).ready(function() {
- that.tabelObj = $('#deviceTable').DataTable({
- // dom: 'Bfrtip',
- // buttons: [
- // 'copy', 'csv', 'excel', 'pdf', 'print'
- // ] ,
- "processing": true,
- "searching": true,
- pagingType: 'full_numbers',
- pageLength: 25,
- serverSide: false,
- "scrollY":'65vh',
- "scrollCollapse": true,
- lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
- ajax: (dataTablesParameters,callback) => {
- console.log('temptemptemptemptemp',dataTablesParameters);
- var deviceID;
- that.Load= true;
- // dataTablesParameters.find._u = that.useridd;
-
- // dataTablesParameters.find._u = user;
- // if(that.deviceArr.length != 0){
-
- // dataTablesParameters.find.vname = deviceId;
- // }
- // if (that.Fromdate) {
- // var fdate = new Date(that.Fromdate).toISOString()
- // dataTablesParameters.find.f_date = fdate
- // dataTablesParameters.find.f_date = from_date;
- // };
- // if (that.todate) {
- // var fdate = new Date(that.todate).toISOString()
- // dataTablesParameters.find.t_date = fdate
- // dataTablesParameters.find.t_date = to_date ;
+ geofence = [];
+ show_time: any;
+ geofence_data = [];
+ address_show: any;
+
+
+ // geofancing_Report(fd,td,devop){
+ // //console.log(devop);//console.log(fd);//console.log(td);//console.log(devop);
+ // let f_date = fd.toISOString();
+ // let t_date = td.toISOString();
+ // //console.log(f_date);//console.log(t_date);
+ // let uId = this.useridd;
+ // //console.log(uId);
+ // let geoId = devop._id;
+ // //console.log(geoId);
+ // var outerThis = this;
+ // this.Load = true;
+ // this.contactService.geofenceData(f_date,t_date,uId,geoId)
+ // .subscribe(res=>{
+ // this.Load = false;
+ // //console.log(res);
+ // this.geofence = res;
+ // console.log("this.geofence=>",this.geofence);
+ // },err=>{
+ // this.Load = false;
+ // console.log('Error While fetching data');
+ // })
+ // }
+ tabelDetailsObj: any;
+ testDetailsTable() {
+ const that = this;
+
+ console.log("inside function");
+ $(document).ready(function () {
+ that.tabelDetailsObj = $('#deviceDetailsTable').DataTable({
+ // dom: 'Bfrtip',
+ // buttons: [
+ // 'copy', 'csv', 'excel', 'pdf', 'print'
+ // ] ,
+ "processing": true,
+ "searching": true,
+ pagingType: 'full_numbers',
+ pageLength: 25,
+ serverSide: false,
+ "scrollY": '65vh',
+ "scrollCollapse": true,
+ lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
+ ajax: (dataTablesParameters, callback) => {
+ console.log('temptemptemptemptemp', dataTablesParameters);
+ var deviceID;
+ that.Load = true;
+
+
+ var tempfd = new Date().setHours(0, 0, 0, 0);
+ var tf = new Date(tempfd);
+ var temptd = new Date();
+
+ var from_date = that.Fromdate ? that.Fromdate : tf.toISOString();
+ var to_date = that.todate ? that.todate : temptd.toISOString();
+ var user = that.useridd;
+ var temp = {
+ from_date: from_date,
+ to_date: to_date,
+ user: user
+ }
+ var suburl = "/geofencing/GeoFencingReport";
+ // suburl += "/notifs/GeoFencingReport?from_date=" + temp.from_date + '&to_date=' + temp.to_date + '&_u=' + temp.user;
+ that.finalArr = []
+ // console.log(this.deviceArr);
+ if (that.deviceArr.length != 0) {
+ // suburl += '&geoid=' + that.deviceArr.join(',');
+ } else {
+
+ let resp = [];
+
+ callback({ data: resp });
+ }
+ if (temp.from_date && temp.to_date && that.deviceArr.length != 0) {
+ that.contactService.postWithURL(suburl, {
+ "from_date": temp.from_date,
+ "to_date": temp.to_date,
+ "geoidlist": that.deviceArr.length ? that.deviceArr : []
+}).subscribe((resp: any) => {
+ // console.log(ignReport.length);
+ that.Load = false;
+ that.finalArr = resp
+ let newData = that.setDetailsReport(resp);
+
+ that.newDetailsReport = that.groupDataAndPrepareNewCollection(newData);
+
+ console.log('new Table Data=>', that.newDetailsReport);
+ callback({ data: newData });
+ }, err => {
+ that.Load = false;
+ console.log("error", err);
+ });
+ } else {
+ that.Load = false;
+ callback({ data: [] });
+ }
+ },
+
+ "columns": [
+ {
+ "data": "vehicleName",
+ "render": function (data, type, row) {
+
+ return data ? data : '';
+ }
+ },
+ {
+ "data": "inTime",
+ render: function (data, type, row) {
+ return data ? data : '';
+ }
+ }, {
+ "data": "outTime",
+ render: function (data, type, row) {
+ return data ? data : '';
+ }
+ }, {
+ "data": "duration",
+ render: function (data, type, row) {
+ return data ? data : '';
+ }
+ },
+ {
+ "data": "geoid",
+ render: function (data, type, row) {
+
+ return data ? data.geoname : '';
+
+ }
+ }
+ ],
+ "columnDefs": [
+ { className: "dt-body-left", "targets": [0, 1, 2, 3, 4] },
+ {
+ "targets": '_all',
+ "createdCell": function (td, cellData, rowData, row, col) {
+ $(td).css('padding', '18px')
+ }
+ },
+ { "width": "20%", "targets": 0 },
+ { "width": "20%", "targets": 1 },
+ { "width": "20%", "targets": 2 },
+ { "width": "20%", "targets": 3 },
+ { "width": "20%", "targets": 4 },
+
+ ]
+ });
+
+ });
+
+ }
+
+ tabelObj: any;
+ testTable() {
+ const that = this;
+
+ console.log("inside function");
+ $(document).ready(function () {
+ that.tabelObj = $('#deviceTable').DataTable({
+ // dom: 'Bfrtip',
+ // buttons: [
+ // 'copy', 'csv', 'excel', 'pdf', 'print'
+ // ] ,
+ "processing": true,
+ "searching": true,
+ pagingType: 'full_numbers',
+ pageLength: 25,
+ serverSide: false,
+ "scrollY": '65vh',
+ "scrollCollapse": true,
+ lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
+ ajax: (dataTablesParameters, callback) => {
+ console.log('temptemptemptemptemp', dataTablesParameters);
+ var deviceID;
+ that.Load = true;
+ // dataTablesParameters.find._u = that.useridd;
+
+ // dataTablesParameters.find._u = user;
+
+ // if(that.deviceArr.length != 0){
+
+ // dataTablesParameters.find.vname = deviceId;
+ // }
+ // if (that.Fromdate) {
+ // var fdate = new Date(that.Fromdate).toISOString()
+ // dataTablesParameters.find.f_date = fdate
+ // dataTablesParameters.find.f_date = from_date;
+ // };
+
+ // if (that.todate) {
+ // var fdate = new Date(that.todate).toISOString()
+ // dataTablesParameters.find.t_date = fdate
+ // dataTablesParameters.find.t_date = to_date ;
// };
// this.deviceArr = deviceId;
- var tempfd = new Date().setHours(0,0,0,0);
+ var tempfd = new Date().setHours(0, 0, 0, 0);
var tf = new Date(tempfd);
var temptd = new Date();
-
- var from_date = that.Fromdate?that.Fromdate:tf.toISOString();
- var to_date = that.todate?that.todate:temptd.toISOString();
- var user = that.useridd;
- var temp = {
- from_date : from_date,
- to_date : to_date,
- user : user
- }
- var suburl = "";
- suburl += "/notifs/GeoFencingReport?from_date=" + temp.from_date +'&to_date=' + temp.to_date + '&_u=' + temp.user;
- that.finalArr=[]
- // console.log(this.deviceArr);
- if(that.deviceArr.length != 0){
- suburl +='&geoid='+that.deviceArr[0];
- }else{
-
- let resp =[];
- callback({data : resp });
- }
- if(temp.from_date && temp.to_date && that.deviceArr.length != 0){
- that.contactService.get(suburl).subscribe((resp:any) => {
- // console.log(ignReport.length);
- that.Load= false;
- that.finalArr=resp
- console.log('respresp=>',resp);
- callback({data : resp });
- }, err => {
- that.Load= false;
- console.log("error",err) ;
- });
- }else{
- that.Load= false;
- callback({data : [] });
+ var from_date = that.Fromdate ? that.Fromdate : tf.toISOString();
+ var to_date = that.todate ? that.todate : temptd.toISOString();
+ var user = that.useridd;
+ var temp = {
+ from_date: from_date,
+ to_date: to_date,
+ user: user
}
- },
-
- "columns": [
- {
- "data": "vehicleName",
- "render": function(data, type, row) {
-
- return data?data : '';
- }
- },
- {
- "data": "direction",
- render: function(data, type, row) {
- return data?data:'';
- }
- },
- {
- "data": "timestamp",
- render: function(data, type, row) {
- var cDate = new Date(data);
- return data ? (moment(cDate).format('llll')) : "";
- }
- },
- {
- "data": "address",
- "defaultContent": "_id",
- render: function(data, type, row) {
- let lat = row.lat;
- let long = row.long;
- var addressLink = ' ';
- return data?data : addressLink;
-
- }
- } ,
+ var suburl = "";
+ suburl += "/notifs/GeoFencingReport?from_date=" + temp.from_date + '&to_date=' + temp.to_date + '&_u=' + temp.user;
+ that.finalArr = []
+ // console.log(this.deviceArr);
+ if (that.deviceArr.length != 0) {
+
+ suburl += '&geoid=' + that.deviceArr.join(',');
+ } else {
+
+ let resp = [];
+
+ callback({ data: resp });
+ }
+ if (temp.from_date && temp.to_date && that.deviceArr.length != 0) {
+ that.contactService.get(suburl).subscribe((resp: any) => {
+ // console.log(ignReport.length);
+ that.Load = false;
+ that.finalArr = resp
+ //that.setDetailsReport(resp);
+ console.log('respresp=>', resp);
+ callback({ data: resp });
+ }, err => {
+ that.Load = false;
+ console.log("error", err);
+ });
+ } else {
+ that.Load = false;
+ callback({ data: [] });
+ }
+ },
+
+ "columns": [
+ {
+ "data": "vehicleName",
+ "render": function (data, type, row) {
+
+ return data ? data : '';
+ }
+ },
+ {
+ "data": "direction",
+ render: function (data, type, row) {
+ return data ? data : '';
+ }
+ },
+ {
+ "data": "timestamp",
+ render: function (data, type, row) {
+ var cDate = new Date(data);
+ return data ? (moment(cDate).format('llll')) : "";
+ }
+ },
+ {
+ "data": "address",
+ "defaultContent": "_id",
+ render: function (data, type, row) {
+ let lat = row.lat;
+ let long = row.long;
+ var addressLink = ' ';
+ return data ? data : addressLink;
+
+ }
+ },
{
"data": "geoid",
- render: function(data, type, row) {
-
- return data?data.geoname : '';
-
+ render: function (data, type, row) {
+
+ return data ? data.geoname : '';
+
+ }
+ }
+ ],
+ "columnDefs": [
+ { className: "dt-body-left", "targets": [0, 1, 2, 3, 4] },
+ {
+ "targets": '_all',
+ "createdCell": function (td, cellData, rowData, row, col) {
+ $(td).css('padding', '18px')
}
- }
- ],
- "columnDefs": [
- { className: "dt-body-left", "targets": [ 0,1,2,3,4 ] },
- {
- "targets": '_all',
- "createdCell": function (td, cellData, rowData, row, col) {
- $(td).css('padding', '18px')
- }
},
{ "width": "20%", "targets": 0 },
{ "width": "10%", "targets": 1 },
{ "width": "20%", "targets": 2 },
- { "width": "30%", "targets": 3 },
- { "width": "20%", "targets": 4 },
-
- ]
+ { "width": "30%", "targets": 3 },
+ { "width": "20%", "targets": 4 },
+
+ ]
});
- });
+ });
-}
-
+ }
+ groupDataAndPrepareNewCollection(gridData) {
+ let newTableData = [];
+ if (gridData && gridData.length) {
+ let result = gridData.reduce(function (r, a) {
+ r[a.vehicleName] = r[a.vehicleName] || [];
+ r[a.vehicleName].push(a);
+ return r;
+ }, Object.create(null));
+
+ Object.keys(result).forEach(key => {
+ newTableData.push({
+ 'vehicle': key,
+ 'list': result[key],
+ 'calculatedKey':this.calculateGeofence(result[key])
+ })
+ });
+
+ }
+ return newTableData;
+ }
+ totalGeoFaceCalculate(data) {
+ let returnData = {
+ durationTotal:0,
+ distanceTotal:0,
+ idleTime:'0 h 0 m',
+ labelDuration:''
+ }
+ data.forEach(item=>{
+ returnData.durationTotal += item.durationMin;
+ returnData.distanceTotal += item.routeLength;
+ })
+ return returnData;
+ }
+ calculateGeofence(geofenceData) {
+ let newGeoFenceData = []
+ let result = geofenceData.reduce(function (r, a) {
+ r[a.geoid.geoname] = r[a.geoid.geoname] || [];
+ r[a.geoid.geoname].push(a);
+ return r;
+ }, Object.create(null));
+
+ Object.keys(result).forEach(key => {
+ let finalSetData = this.totalGeoFaceCalculate(result[key]);
+ if (finalSetData.durationTotal) {
+ finalSetData['labelDuration'] = Math.floor(finalSetData.durationTotal / 60) + " H, " + finalSetData.durationTotal % 60 + " M"
+ } else {
+ finalSetData['labelDuration'] = 'O H, 0 M';
+ }
+ newGeoFenceData.push({
+ 'zoneName': key,
+ 'durationTotal': finalSetData.labelDuration,
+ 'durationTotalMin': finalSetData.durationTotal,
+ 'distanceTotal': finalSetData.distanceTotal,
+ 'idleTime':finalSetData.idleTime,
+
+ })
+ });
+ return newGeoFenceData;
+ }
addressLink = "";
-getlink(report){
- console.log("inside function");
- console.log("report=>",report);
- var lat = report.lat?report.lat:0;
- var lng = report.long?report.long:0;
- this.addressLink = 'https://maps.google.com/?q=' + lat + ',' + lng;
- return this.addressLink ;
-}
+ getlink(report) {
+ console.log("inside function");
+ console.log("report=>", report);
+ var lat = report.lat ? report.lat : 0;
+ var lng = report.long ? report.long : 0;
+ this.addressLink = 'https://maps.google.com/?q=' + lat + ',' + lng;
+ return this.addressLink;
+ }
- tab:any;
+ tab: any;
- exportExcel()
- {
-
+ exportExcel() {
- var tab_text="";
+ tab_text = tab_text.replace(/]*>|<\/A>/g, "");//remove if u want links in your table
+ tab_text = tab_text.replace(/ ]*>/gi, ""); // remove if u want images in your table
+ tab_text = tab_text.replace(/]*>|<\/input>/gi, ""); // reomves input params
- var ua = window.navigator.userAgent;
- var msie = ua.indexOf("MSIE ");
+ var ua = window.navigator.userAgent;
+ var msie = ua.indexOf("MSIE ");
- var sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));
-
- return (sa);
+ if(this.isNormalView) {
+ var sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));
+ return (sa);
+ }
+ else {
+ var sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent($('#geoDetailsTable').html()));
+ return (sa);
+ }
}
-
- getReport(event){
- if(event == 'getExcel'){
- this.exportExcel();
- } else if(event=='getPdf')
- {
- this.expotToPdf();
- }else{
+
+ getReport(event) {
+ if (event == 'getExcel') {
+ if(this.isNormalView) {
+
+ this.exportExcel();
+ } else {
+ this.tableToCSV();
+ }
+ } else if (event == 'getPdf') {
+ this.expotToPdf();
+ } else {
var deviceId: any;
- var tpdata = event ;
+ var tpdata = event;
var that = this;
var fd = new Date(tpdata.fromDate);
- var td = new Date(tpdata.toDate);
-
- if(event.deviceArr.length==0){
- deviceId=[];
- }else{
- deviceId= event.deviceArr;
+ var td = new Date(tpdata.toDate);
+
+ if (event.deviceArr.length == 0) {
+ deviceId = [];
+ } else {
+ deviceId = event.deviceArr;
}
- this.deviceArr = deviceId;
-
+ this.deviceArr = deviceId;
+
this.Fromdate = fd.toISOString();
this.todate = td.toISOString();
-
-
+
+
console.log(this.tabelObj);
- this.tabelObj.ajax.reload();
-
-
-
+ this.tabelObj.ajax.reload();
+ this.tabelDetailsObj.ajax.reload();
+
+
+
}
-
- }
- expotToPdf(){
- console.log(this.finalArr);
- this.downloadPdf()
-
+ }
+ tableToCSV() {
+
+ // Variable to store the final csv data
+ var csv_data = [];
+
+ // Get each row data
+ var rows = document.getElementsByClassName('tr-geofence');
+ for (var i = 0; i < rows.length; i++) {
+
+ // Get each column data
+ var cols = rows[i].querySelectorAll('td,th');
+
+ // Stores each csv row data
+ var csvrow = [];
+ for (var j = 0; j < cols.length; j++) {
+
+ // Get the text data of each cell
+ // of a row and push it to csvrow
+ csvrow.push(cols[j].innerHTML);
+ }
+
+ // Combine each column value with comma
+ csv_data.push(csvrow.join(","));
}
-// downloadPdf() {
-// let fileName =
-// "Geofencing Report" +
-// new Date().getTime() +
-// PDF_EXTENSION;
-// var pdfsize = "a2";
+ // Combine each row data with new line character
+ let newcsv_data = csv_data.join('\n');
+
+ // Call this function to download csv file
+ this.downloadCSVFile(newcsv_data);
+
+}
+
+downloadCSVFile(csv_data) {
+
+ // Create CSV file object and feed
+ // our csv_data into it
+ let CSVFile = new Blob([csv_data], {
+ type: "text/csv"
+ });
+
+ // Create to temporary link to initiate
+ // download process
+ var temp_link = document.createElement('a');
+
+ // Download csv file
+ temp_link.download = "Geofence.csv";
+ var url = window.URL.createObjectURL(CSVFile);
+ temp_link.href = url;
+
+ // This link should not be displayed
+ temp_link.style.display = "none";
+ document.body.appendChild(temp_link);
+
+ // Automatically click the link to
+ // trigger download
+ temp_link.click();
+ document.body.removeChild(temp_link);
+}
+
-// var doc = new jsPDF("p", "pt", pdfsize);
-// doc.setFontSize(15);
-// doc.text('Geofencing Report ', 20, 30);
-// doc.setFontStyle("arial");
-// var header = function(data) {
-// doc.setFontSize(15);
-// doc.setTextColor(40);
-// doc.setFontStyle('normal');
-
-// };
-// var options = {
-// beforePageContent: header,
-// margin: {
-// top: 120
-// },
-// startY: doc.autoTableEndPosY() + 20
-// };
+ expotToPdf() {
+ console.log(this.finalArr);
+ this.downloadPdf()
+ if(this.isNormalView) {
-// doc.autoTable({
-// head: this.headRows(),
-// // margin: { top: 80 },
-// body: this.bodyRows(this.finalArr.length, this.finalArr),
-// options
-
-// });
-// doc.save(fileName);
-// }
+ } else {
+ // var doc = new jsPDF();
+ // var specialElementHandlers = {
+ // '#editor789': function (element, renderer) {
+ // return true;
+ // }
+ // };
+ // doc.fromHTML($('#geoDetailsTable').html(), 15, 5, {
+ // 'width': 500,
+ // 'elementHandlers': specialElementHandlers
+ // });
+ // doc.save('detail_geofence.pdf')
+ }
+
+ }
+
+ // downloadPdf() {
+ // let fileName =
+ // "Geofencing Report" +
+ // new Date().getTime() +
+ // PDF_EXTENSION;
+ // var pdfsize = "a2";
+
+ // var doc = new jsPDF("p", "pt", pdfsize);
+
+ // doc.setFontSize(15);
+ // doc.text('Geofencing Report ', 20, 30);
+ // doc.setFontStyle("arial");
+ // var header = function(data) {
+ // doc.setFontSize(15);
+ // doc.setTextColor(40);
+ // doc.setFontStyle('normal');
+
+ // };
+
+ // var options = {
+ // beforePageContent: header,
+ // margin: {
+ // top: 120
+ // },
+ // startY: doc.autoTableEndPosY() + 20
+ // };
+
+ // doc.autoTable({
+ // head: this.headRows(),
+ // // margin: { top: 80 },
+ // body: this.bodyRows(this.finalArr.length, this.finalArr),
+ // options
+
+ // });
+ // doc.save(fileName);
+ // }
startAddress;
-endAddress;
-f_date
-t_date
-downloadPdf() {
- var outerThis=this
+ endAddress;
+ f_date
+ t_date
+ downloadPdf() {
+ var outerThis = this;
+ let displayArray = [];
+ if (!this.isNormalView) {
+
+ displayArray = this.displayDetailsReport;
+ } else {
+ displayArray = outerThis.finalArr;
+ }
let fileName =
"Distnace Report" +
- new Date()+
+ new Date() +
PDF_EXTENSION;
var pdfsize = "a2";
var totalPagesExp = "{total_pages_count_string}";
- outerThis.startAddress= outerThis.finalArr[0].address;
- outerThis.endAddress= outerThis.finalArr[outerThis.finalArr.length-1].address
+ outerThis.startAddress = displayArray[0].address;
+ outerThis.endAddress = displayArray[displayArray.length - 1].address
var doc = new jsPDF("p", "pt", pdfsize);
- // outerThis.f_date = moment(this.Fromdate).format('lll');
- // outerThis.t_date =moment(this.todate).format('lll');
- // var date_combine = f_date + ' to ' + t_date;
- // doc.setFontSize(30);
- var pageHeight = doc.internal.pageSize.height || doc.internal.pageSize.getHeight();
-var pageWidth = doc.internal.pageSize.width || doc.internal.pageSize.getWidth();
- doc.setFontSize(15);
- // doc.text(60, 20, 'Travel Path Report (Date='+date_combine+') Device Name='+this.device_name,);
-
- doc.text("Distance Report", 500, 30);
+ // outerThis.f_date = moment(this.Fromdate).format('lll');
+ // outerThis.t_date =moment(this.todate).format('lll');
+ // var date_combine = f_date + ' to ' + t_date;
+ // doc.setFontSize(30);
+ var pageHeight = doc.internal.pageSize.height || doc.internal.pageSize.getHeight();
+ var pageWidth = doc.internal.pageSize.width || doc.internal.pageSize.getWidth();
+ doc.setFontSize(15);
+ // doc.text(60, 20, 'Travel Path Report (Date='+date_combine+') Device Name='+this.device_name,);
+
+ doc.text("Distance Report", 500, 30);
doc.setFontStyle("arial");
- var header = function(data) {
- doc.setFontSize(30);
- doc.setTextColor(40);
- doc.setFontStyle('arial');
-
- };
+ var header = function (data) {
+ doc.setFontSize(30);
+ doc.setTextColor(40);
+ doc.setFontStyle('arial');
- var options = {
- beforePageContent: header,
- margin: {
- top: 120
- },
-
- startY: doc.autoTableEndPosY() + 20
- };
- var logo=localStorage.getItem('logo1');
- outerThis.toDataURL(logo, function (dataUrl) {
-
- doc.autoTable({
- head: outerThis.headRows(),
- // margin: { top: 80 },
- // startY: doc.autoTable.previous.finalY + 200,
- body: outerThis.bodyRows(outerThis.finalArr.length, outerThis.finalArr),
- options,
- styles: {overflow: 'linebreak'},
-
- theme:'grid',
- didDrawPage: function (data) {
- // Header
- doc.setFontSize(20);
- doc.setTextColor(40);
- doc.setFontStyle('arial');
- // logo=localStorage.getItem('logo1');
- if(logo)
- doc.addImage(dataUrl, 'JPEG', pageWidth-100, 6, 75, 75);
- doc.autoTable({html:"#headerTable",
- styles: {fontSize: 13,textColor:"[255,72,72]"},
- margin:{bottom:140,left:40,right:8,top:40},
- theme:'plain'});
+ };
- // Footer
- var str = "Page " + doc.internal.getNumberOfPages()
- // Total page number plugin only available in jspdf v1.0+
- if (typeof doc.putTotalPages === 'function') {
+ var options = {
+ beforePageContent: header,
+ margin: {
+ top: 120
+ },
+
+ startY: doc.autoTableEndPosY() + 20
+ };
+ var logo = localStorage.getItem('logo1');
+ outerThis.toDataURL(logo, function (dataUrl) {
+
+ doc.autoTable({
+ head: outerThis.headRows(),
+ // margin: { top: 80 },
+ // startY: doc.autoTable.previous.finalY + 200,
+ body: outerThis.bodyRows(displayArray.length, displayArray),
+ options,
+ styles: { overflow: 'linebreak' },
+
+ theme: 'grid',
+ didDrawPage: function (data) {
+ // Header
+ doc.setFontSize(20);
+ doc.setTextColor(40);
+ doc.setFontStyle('arial');
+ // logo=localStorage.getItem('logo1');
+ if (logo)
+ doc.addImage(dataUrl, 'JPEG', pageWidth - 100, 6, 75, 75);
+ doc.autoTable({
+ html: "#headerTable",
+ styles: { fontSize: 13, textColor: "[255,72,72]" },
+ margin: { bottom: 140, left: 40, right: 8, top: 40 },
+ theme: 'plain'
+ });
+
+ // Footer
+ var str = "Page " + doc.internal.getNumberOfPages()
+ // Total page number plugin only available in jspdf v1.0+
+ if (typeof doc.putTotalPages === 'function') {
str = str + " of " + totalPagesExp;
- }
- doc.setFontSize(10);
+ }
+ doc.setFontSize(10);
- // jsPDF 1.4+ uses getWidth, <1.4 uses .width
- var pageSize = doc.internal.pageSize;
- var pageHeight = pageSize.height ? pageSize.height : pageSize.getHeight();
- doc.text(str, data.settings.margin.left, pageHeight - 10);
- },
-
- margin: {top: 85},
-
- });
- if (typeof doc.putTotalPages === 'function') {
- doc.putTotalPages(totalPagesExp);
- }
- doc.save(fileName);
- })
+ // jsPDF 1.4+ uses getWidth, <1.4 uses .width
+ var pageSize = doc.internal.pageSize;
+ var pageHeight = pageSize.height ? pageSize.height : pageSize.getHeight();
+ doc.text(str, data.settings.margin.left, pageHeight - 10);
+ },
+
+ margin: { top: 85 },
+
+ });
+ if (typeof doc.putTotalPages === 'function') {
+ doc.putTotalPages(totalPagesExp);
+ }
+ doc.save(fileName);
+ })
}
- toDataURL(url, callback) {
-
- 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();
- }
- headRows() {
+ toDataURL(url, callback) {
- return [
- // displayedColumns=['vehicleName','IMEI','totalDistance','fuel','ignOn','ignOff','idleTime','outOfReach','noGps','trips','maxSpeed','startLocation','endLocation','details'];
-
- {
- vehicleName:'Vehicle Name',
- direction:'In/Out',
- timestamp:'Date Time',
- location:'Location',
- geoname:'Geofence Name',
-
-
+ 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();
+ }
+ headRows() {
+ let finalPrintKeys = this.isNormalView ? {
+ vehicleName: 'Vehicle Name',
+ direction: 'In/Out',
+ timestamp: 'Date Time',
+ location: 'Location',
+ geoname: 'Geofence Name',
+
+
+ } : {
+ vehicleName: 'Vehicle Name',
+ inTime: 'In Time',
+ outTime: 'Out Time',
+ duration: 'Duration',
+ geoname: 'Geofence Name',
+
+
+ }
+ return [
+ // displayedColumns=['vehicleName','IMEI','totalDistance','fuel','ignOn','ignOff','idleTime','outOfReach','noGps','trips','maxSpeed','startLocation','endLocation','details'];
+ finalPrintKeys
+
];
}
@@ -737,19 +1049,96 @@ var pageWidth = doc.internal.pageSize.width || doc.internal.pageSize.getWidth();
rowCount = rowCount || 10;
let body = [];
for (var j = 0; j < rowCount; j++) {
- body.push({
- vehicleName:pdfBody[j].vehicleName,
- direction:pdfBody[j].direction,
- timestamp: moment(pdfBody[j].timestamp).format('lll'),
- location:[pdfBody[j].lat,pdfBody[j].long],
- geoname:pdfBody[j].geoid.geoname?pdfBody[j].geoid.geoname:'--',
-
- });
+ if (this.isNormalView) {
+ body.push({
+ vehicleName: pdfBody[j].vehicleName,
+ direction: pdfBody[j].direction,
+ timestamp: moment(pdfBody[j].timestamp).format('lll'),
+ location: [pdfBody[j].lat, pdfBody[j].long],
+ geoname: pdfBody[j].geoid.geoname ? pdfBody[j].geoid.geoname : '--',
+
+ });
+ } else {
+ body.push({
+ vehicleName: pdfBody[j].vehicleName,
+ inTime: pdfBody[j].inTime,
+ outTime: pdfBody[j].outTime,
+ duration: pdfBody[j].duration,
+ geoname: pdfBody[j].geoid.geoname ? pdfBody[j].geoid.geoname : '--',
+
+ });
+ }
+
}
return body;
}
+ displayDetailsReport = [];
+ newDetailsReport = [];
+ setDetailsReport(list) {
+ // let a = list.sort(function (a, b) {
+ // // Turn your strings into dates, and then subtract them
+ // // to get a value that is either negative, positive, or zero.
+ // let d1 = new Date(b.timestamp).getTime();
+ // let d2 = new Date(a.timestamp).getTime();
+ // return d2 - d1;
+ // });
+ this.displayDetailsReport = [];
+ this.newDetailsReport = [];
+ list.forEach(item => {
+ if (item.direction == 'Out') {
+ // let lastItem = this.displayDetailsReport.filter(dItem => dItem.direction == 'In' && item.vehicleName.trim() == dItem.vehicleName.trim())
+ // if (lastItem && lastItem.length) {
+ // if (!lastItem[lastItem.length - 1].isOutEntry) {
+ // let dateDiff = this.dateDifferent(lastItem[lastItem.length - 1].timestamp, item.timestamp);
+ // lastItem[lastItem.length - 1].isOutEntry = true;
+ // lastItem[lastItem.length - 1].outTime = item.timestamp ? (moment(item.timestamp).format('llll')) : ""
+ // lastItem[lastItem.length - 1].duration = dateDiff.label;
+ // lastItem[lastItem.length - 1].durationMin = dateDiff.min;
+ // }
+ // }
+
+ } else { // in direction
+ item.vehicleName = item.device && item.device.Device_Name ? item.device.Device_Name : 'n/a'
+ item.inTimeDate = item.arrivalTime;
+ item.inTime = item.arrivalTime ? (moment(item.arrivalTime).format('llll')) : "";
+ let dateDiff = this.convertMStoHourMin(item.duration);
+ item.outTime = item.departureTime ? (moment(item.departureTime).format('llll')) : "n/a";
+ item.routeLength = 0;
+ item.outTimeDate = item.departureTime;
+ item.duration = dateDiff.label;
+ item.durationMin = dateDiff.min;
+ this.displayDetailsReport.push(item);
+ }
+ });
+ this.displayDetailsReport = this.displayDetailsReport.filter(ddR => ddR.durationMin >= this.filterDuration)
+ return this.displayDetailsReport;
+ }
+ dateDifferent(date1, date2) {
+ var today = date1? new Date(date1): new Date();
+ var Christmas = date2? new Date(date2):new Date();
+ var diffMs = (Christmas.getTime() - today.getTime()); // milliseconds between now & Christmas
+ var diffDays = Math.floor(diffMs / 86400000); // days
+ var diffHrs = Math.floor((diffMs % 86400000) / 3600000); // hours
+
+ var diffMins = Math.round(((diffMs % 86400000) % 3600000) / 60000); // minutes
+ let finalMin = (diffHrs + (diffDays * 24)) * 60 + diffMins;
+ console.log(finalMin);
+ return { label: (diffHrs + (diffDays * 24)) + " H, " + diffMins + "M", min: finalMin };
+ }
+ convertMStoHourMin(diffMs) {
+ var diffDays = Math.floor(diffMs / 86400000); // days
+ var diffHrs = Math.floor((diffMs % 86400000) / 3600000); // hours
+
+ var diffMins = Math.round(((diffMs % 86400000) % 3600000) / 60000); // minutes
+ let finalMin = (diffHrs + (diffDays * 24)) * 60 + diffMins;
+ console.log(finalMin);
+ return { label: (diffHrs + (diffDays * 24)) + " H, " + diffMins + "M", min: finalMin };
+ }
+ filterDetailsReport() {
+ this.tabelDetailsObj.ajax.reload();
+ }
}
diff --git a/src/app/report/report component/new-travel-path-report/new-travel-path-report.component.scss b/src/app/report/report component/new-travel-path-report/new-travel-path-report.component.scss
index 63b6859..004f5c8 100644
--- a/src/app/report/report component/new-travel-path-report/new-travel-path-report.component.scss
+++ b/src/app/report/report component/new-travel-path-report/new-travel-path-report.component.scss
@@ -1,36 +1,36 @@
-.topDiv {
- // padding-top: 59px;
- background: whitesmoke;
- height: 100vh;
-}
-
-.rowStyle {
- // margin: 5px;
- // background: white;
- height: 84vh;
- // box-shadow: 3px 1px 5px 0px #b2b0ae;
-}
-
-#deviceTable input {
- border-radius: 5px;
-}
-
-::-webkit-scrollbar {
- width: 10px;
-}
-
-/* Track */
-::-webkit-scrollbar-track {
- background: rgb(153, 153, 153);
-}
-
-/* Handle */
-::-webkit-scrollbar-thumb {
- // background: rgb(74, 118, 184);
- background: #868e96;
-}
-
-/* Handle on hover */
-::-webkit-scrollbar-thumb:hover {
- background: #555;
-}
+.topDiv {
+ // padding-top: 59px;
+ background: whitesmoke;
+ height: 100vh;
+}
+
+.rowStyle {
+ // margin: 5px;
+ // background: white;
+ height: 84vh;
+ // box-shadow: 3px 1px 5px 0px #b2b0ae;
+}
+
+#deviceTable input {
+ border-radius: 5px;
+}
+
+::-webkit-scrollbar {
+ width: 10px;
+}
+
+/* Track */
+::-webkit-scrollbar-track {
+ background: rgb(153, 153, 153);
+}
+
+/* Handle */
+::-webkit-scrollbar-thumb {
+ // background: rgb(74, 118, 184);
+ background: #868e96;
+}
+
+/* Handle on hover */
+::-webkit-scrollbar-thumb:hover {
+ background: #555;
+}
diff --git a/src/app/report/report component/new-travel-path-report/new-travel-path-report.component.ts b/src/app/report/report component/new-travel-path-report/new-travel-path-report.component.ts
index 3a273b3..1c63a61 100644
--- a/src/app/report/report component/new-travel-path-report/new-travel-path-report.component.ts
+++ b/src/app/report/report component/new-travel-path-report/new-travel-path-report.component.ts
@@ -749,12 +749,12 @@ export class NewTravelPathReportComponent implements OnInit {
imei: pdfBody[j].imei,
date: moment(pdfBody[j].date).format('lll'),
odo: pdfBody[j].odo ? (pdfBody[j].odo).toFixed(2) : 0,
- distanceFromPrevious: this.get_distance(pdfBody[j].index),
+ distanceFromPrevious: pdfBody[j].distanceFromPrevious,
speed: pdfBody[j].speed,
- avgSpeed: this.getavgSpeed(pdfBody[j].index),
+ avgSpeed: pdfBody[j].avgSpeed,
externalBattery: pdfBody[j].external_Battery ? pdfBody[j].external_Battery : '0',
temperature: pdfBody[j].temp ? (parseFloat(pdfBody[j].temp) / 10).toFixed(2) : '0',
- cumDistance: this.getcummulative_distance(pdfBody[j], pdfBody[j].index),
+ cumDistance: pdfBody[j].cum_distance,
location: (pdfBody[j].latDecimal ? pdfBody[j].latDecimal : 0) + ' , ' + (pdfBody[j].longDecimal ? pdfBody[j].longDecimal : 0),
address: pdfBody[j].address,
diff --git a/src/app/report/report component/no-report/no-report.component.scss b/src/app/report/report component/no-report/no-report.component.scss
index d2ff01e..0a0b006 100644
--- a/src/app/report/report component/no-report/no-report.component.scss
+++ b/src/app/report/report component/no-report/no-report.component.scss
@@ -1,7 +1,7 @@
-.card {
- margin: 218px;
- float: none;
- padding: 70px;
- text-align: center;
- margin-bottom: 10px;
-}
+.card {
+ margin: 218px;
+ float: none;
+ padding: 70px;
+ text-align: center;
+ margin-bottom: 10px;
+}
diff --git a/src/app/report/report component/notification-master/noti-location/noti-location.component.scss b/src/app/report/report component/notification-master/noti-location/noti-location.component.scss
index 0f792b5..be398de 100644
--- a/src/app/report/report component/notification-master/noti-location/noti-location.component.scss
+++ b/src/app/report/report component/notification-master/noti-location/noti-location.component.scss
@@ -1,825 +1,825 @@
-.topWrapper {
- position: fixed;
- width: 100%;
- height: 100%;
-}
-
-.mainWrapperWrapper {
- height: inherit;
- width: inherit;
- padding-top: 59px;
- background: #efecec;
-}
-
-.rowStyle {
- height: inherit;
- width: inherit;
- margin: 0;
-}
-
-.tabCustomStyle {
- .mat-tab-header {
- background: white;
- }
-}
-
-.selectedRunning {
- background: #86ac41c7;
- color: white;
- border-right: 2px solid #ededed;
-}
-
-.selectedStopped {
- background: #cb0000d9;
- color: white;
- border-right: 2px solid #ededed;
-}
-
-.Inactice {
- background: #4897d8;
- color: white;
- border-right: 2px solid #ededed;
-}
-
-.selectIdling {
- background: #ffc13c;
- color: white;
- border-right: 2px solid #ededed;
-}
-
-.selectedNodata {
- background: #5b7065;
- color: white;
- border-right: 2px solid #ededed;
-}
-
-.deselected {
- background: white;
- color: black;
-}
-
-.scrollit {
- overflow: scroll;
- height: 100%;
-}
-
-.panel-resizable {
- resize: vertical;
- overflow: auto;
-}
-
-::-webkit-scrollbar {
- width: 10px;
- height: 10px;
-}
-
-/* Track */
-::-webkit-scrollbar-track {
- background: rgb(153, 153, 153);
-}
-
-/* Handle */
-::-webkit-scrollbar-thumb {
- // background: rgb(74, 118, 184);
- background: #868e96;
-}
-
-/* Handle on hover */
-::-webkit-scrollbar-thumb:hover {
- background: #555;
-}
-
-.buttonStyle {
- background: white;
- color: black;
-}
-
-.buttonStyle:hover {
- background: grey;
- color: black;
-}
-
-.animateClass {
- font-size: 12px;
- padding: 12px;
- cursor: pointer;
- margin-left: 10px;
- margin-right: 10px;
- color: white;
- background: #989898;
- border-radius: 25px;
- font-size: 12px;
- padding: 12px;
- cursor: pointer;
- margin-left: 10px;
- margin-right: 10px;
- color: white;
- background: #989898;
- border-radius: 25px;
- box-shadow: -2px 1px 3px 0px #b2b0ae;
-}
-
-.animateClass_1 {
- padding: 5px;
- padding-left: 7px;
- padding-right: 7px;
- color: black;
- cursor: pointer;
- border: 1px solid #b5b5b5;
- box-shadow: 3px 2px 5px 0px rgb(178, 176, 174);
-}
-
-.animateClass_2 {
- padding: 5px;
- color: rgb(255, 254, 254);
- cursor: pointer;
- border: 1px solid #b5b5b5;
- box-shadow: 0px 2px 2px 0px #b2b0ae;
-}
-
-.animateClass_3 {
- padding: 5px;
- color: rgb(255, 254, 254);
- cursor: pointer;
- border: 1px solid #b5b5b5;
- box-shadow: 2px 2px 2px 0px #b2b0ae;
-}
-
-.animateClass_1:active {
- // background-color: #3e8e41;
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-
-.animateClass_2:active {
- // background-color: #3e8e41;
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-
-.animateClass_3:active {
- // background-color: #3e8e41;
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-
-.animateClass:hover {
- // background-color: #3e8e41
-}
-
-.animateClass:active {
- // background-color: #3e8e41;
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-
-.animateClass_4 {
- width: 25%;
- border-right: 2px solid white;
-}
-.animateClass_5 {
- width: 25%;
- border-right: 2px solid white;
-}
-.animateClass_6 {
- width: 25%;
- border-right: 2px solid white;
-}
-
-.animateClass_7 {
- width: 25%;
-}
-
-.animateClass_4:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-.animateClass_5:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-.animateClass_6:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-
-.animateClass_7:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-
-.animateClass_8 {
- cursor: pointer;
- color: #2d4262;
-}
-.animateClass_9 {
- cursor: pointer;
- color: green;
-}
-.animateClass_10 {
- cursor: pointer;
- color: green;
-}
-
-.animateClass_11 {
- cursor: pointer;
- color: red;
-}
-
-.animateClass_12 {
- cursor: pointer;
- color: #2d4262;
-}
-.animateClass_13 {
- cursor: pointer;
- color: red;
-}
-
-.animateDropDown {
- font-size: 15px;
- color: #888888;
- border-radius: 25px;
- box-shadow: 2px 2px 2px 0px #b2b0ae;
-}
-.animateDropDown:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-
-.animateDropDown:hover {
- color: blue;
-}
-
-.animateClass_4:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-.animateClass_5:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-.animateClass_6:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-
-.animateClass_7:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-
-.animateClass_8:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-.animateClass_9:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-.animateClass_10:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-
-.animateClass_11:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-
-.animateClass_12:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-
-.animateClass_13:active {
- box-shadow: 0 1px #666;
- transform: translateY(1px);
-}
-
-.mat-menu-panel.styleMenu {
- max-width: 35px;
- min-width: 30px;
- background: #efecec;
- border: 1px solid #afadad;
-}
-
-#slider {
- margin: 20px;
-}
-
-#toast {
- visibility: hidden;
- max-width: 150px;
- 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: 150px;
- 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;
-}
-
-/*//////////////////////////////////////////////////////////////////
-[ FONT ]*/
-
-/*//////////////////////////////////////////////////////////////////
- [ RESTYLE TAG ]*/
-* {
- margin: 0px;
- padding: 0px;
- box-sizing: border-box;
-}
-
-body,
-html {
- height: 100%;
- font-family: sans-serif;
-}
-
-/* ------------------------------------ */
-a {
- margin: 0px;
- transition: all 0.4s;
- -webkit-transition: all 0.4s;
- -o-transition: all 0.4s;
- -moz-transition: all 0.4s;
-}
-
-a:focus {
- outline: none !important;
-}
-
-a:hover {
- text-decoration: none;
-}
-
-/* ------------------------------------ */
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- margin: 0px;
-}
-
-p {
- margin: 0px;
-}
-
-ul,
-li {
- margin: 0px;
- list-style-type: none;
-}
-
-/* ------------------------------------ */
-input {
- display: block;
- outline: none;
- border: none !important;
-}
-
-textarea {
- display: block;
- outline: none;
-}
-
-textarea:focus,
-input:focus {
- border-color: transparent !important;
-}
-
-/* ------------------------------------ */
-button {
- outline: none !important;
- border: none;
- background: transparent;
-}
-
-button:hover {
- cursor: pointer;
-}
-
-iframe {
- border: none !important;
-}
-
-/*//////////////////////////////////////////////////////////////////
- [ Utiliti ]*/
-
-/*//////////////////////////////////////////////////////////////////
- [ Table ]*/
-
-.limiterTable {
- width: 100%;
- margin: 0 auto;
- height: 20vh;
- overflow: auto;
-}
-
-.container-table100 {
- width: 100%;
- // min-height: 100vh;
- // background: #c850c0;
- // background: -webkit-linear-gradient(45deg, #4158d0, #c850c0);
- // background: -o-linear-gradient(45deg, #4158d0, #c850c0);
- // background: -moz-linear-gradient(45deg, #4158d0, #c850c0);
- // background: linear-gradient(45deg, #4158d0, #c850c0);
-
- display: -webkit-box;
- display: -webkit-flex;
- display: -moz-box;
- display: -ms-flexbox;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-wrap: wrap;
- // padding: 33px 30px;
-}
-
-.wrap-table100 {
- width: inherit;
-}
-
-// thisTableOnly {
-// border-spacing: 1;
-// border-collapse: collapse;
-// background: white;
-// border-radius: 10px;
-// overflow: hidden;
-// width: 100%;
-// margin: 0 auto;
-// position: relative;
-// }
-// thisTableOnly * {
-// position: relative;
-// }
-// thisTableOnly td, thisTableOnly th {
-// padding-left: 8px;
-// }
-// thisTableOnly thead tr {
-// height: 60px;
-// background: #36304a;
-// }
-// thisTableOnly tbody tr {
-// height: 50px;
-// }
-// thisTableOnly tbody tr:last-child {
-// border: 0;
-// }
-// thisTableOnly td, thisTableOnly th {
-// text-align: left;
-// }
-// thisTableOnly td.l, thisTableOnly th.l {
-// text-align: right;
-// }
-// thisTableOnly td.c, thisTableOnly th.c {
-// text-align: center;
-// }
-// thisTableOnly td.r, thisTableOnly th.r {
-// text-align: center;
-// }
-
-// .table100-head th{
-// // font-family: OpenSans-Regular;
-// font-size: 18px;
-// color: #fff;
-// line-height: 1.2;
-// font-weight: unset;
-// }
-
-tbody tr:nth-child(even) {
- background-color: #f5f5f5;
-}
-
-// tbody tr {
-
-// font-size: 15px;
-// color: #808080;
-// line-height: 1.2;
-// font-weight: unset;
-// }
-
-// tbody tr:hover {
-// color: #555555;
-// background-color: #f5f5f5;
-// cursor: pointer;
-// }
-
-.column1 {
- width: 260px;
- white-space: nowrap;
- padding: 10px 10px 10px 10px;
-}
-
-.column2 {
- width: 160px;
- white-space: nowrap;
- padding: 10px 10px 10px 10px;
-}
-
-.column3 {
- width: 245px;
- white-space: nowrap;
- padding: 10px 10px 10px 10px;
-}
-
-.column4 {
- width: 110px;
- // text-align: right;
- white-space: nowrap;
- padding: 10px 10px 10px 10px;
-}
-
-.column5 {
- width: 170px;
- // text-align: right;
- white-space: nowrap;
- padding: 10px 10px 10px 10px;
-}
-
-.column6 {
- width: 222px;
- // text-align: right;
- padding-right: 62px;
- white-space: nowrap;
- padding: 10px 10px 10px 10px;
-}
-
-// @media screen and (max-width: 992px) {
-// table {
-// display: block;
-// }
-// table > *, table tr, table td, table th {
-// display: block;
-// }
-// table thead {
-// display: none;
-// }
-// table tbody tr {
-// height: auto;
-// padding: 37px 0;
-// }
-// table tbody tr td {
-// padding-left: 40% !important;
-// margin-bottom: 24px;
-// }
-// table tbody tr td:last-child {
-// margin-bottom: 0;
-// }
-// table tbody tr td:before {
-// // font-family: OpenSans-Regular;
-// font-size: 14px;
-// color: #999999;
-// line-height: 1.2;
-// font-weight: unset;
-// position: absolute;
-// width: 40%;
-// left: 30px;
-// top: 0;
-// }
-// table tbody tr td:nth-child(1):before {
-// content: "Date";
-// }
-// table tbody tr td:nth-child(2):before {
-// content: "Order ID";
-// }
-// table tbody tr td:nth-child(3):before {
-// content: "Name";
-// }
-// table tbody tr td:nth-child(4):before {
-// content: "Price";
-// }
-// table tbody tr td:nth-child(5):before {
-// content: "Quantity";
-// }
-// table tbody tr td:nth-child(6):before {
-// content: "Total";
-// }
-
-// .column4,
-// .column5,
-// .column6 {
-// text-align: left;
-// }
-
-// .column4,
-// .column5,
-// .column6,
-// .column1,
-// .column2,
-// .column3 {
-// width: 100%;
-// }
-
-// tbody tr {
-// font-size: 14px;
-// }
-// }
-
-// @media (max-width: 576px) {
-// .container-table100 {
-// padding-left: 15px;
-// padding-right: 15px;
-// }
-// }
-
-.kWgQNm {
- box-sizing: border-box;
- display: flex;
- -webkit-box-pack: start;
- justify-content: flex-start;
- align-content: center;
- -webkit-box-align: center;
- align-items: center;
- flex-direction: row;
- flex-wrap: nowrap;
- max-width: unset;
- min-width: unset;
- min-height: unset;
- cursor: unset;
- transform: unset;
- word-break: unset;
- z-index: unset;
- padding: 0px;
- margin: 0px;
- overflow: unset;
- background: unset;
- border-right: unset;
- border-bottom: unset;
- flex: 0 0 auto;
- border-radius: unset;
- transition: initial;
-}
-
-.dfmgGo {
- z-index: 0;
- top: unset;
- right: unset;
- bottom: unset;
- left: unset;
- box-shadow: unset;
- -webkit-box-flex: unset;
- flex-grow: unset;
- background-color: rgb(255, 255, 255);
- color: rgb(30, 172, 178);
- font-size: 14px;
- backdrop-filter: unset;
- width: 30px;
- max-height: 40px;
- text-align: center;
- cursor: pointer;
- align-self: unset;
- padding: 3px;
- border-left: 1px solid rgb(30, 172, 178);
- border-right: none;
- border-top: 1px solid rgb(30, 172, 178);
- border-bottom: 1px solid rgb(30, 172, 178);
- margin: 0px;
- border-radius: 18px 0px 0px 18px;
-}
-
-.jXaklS {
- z-index: 0;
- top: unset;
- right: unset;
- bottom: unset;
- left: unset;
- box-shadow: unset;
- -webkit-box-flex: unset;
- flex-grow: unset;
- background-color: rgb(255, 255, 255);
- color: rgb(30, 172, 178);
- font-size: 14px;
- backdrop-filter: unset;
- width: 30px;
- max-height: 40px;
- text-align: center;
- cursor: pointer;
- align-self: unset;
- padding: 3px;
- border-left: none;
- border-right: none;
- border-top: 1px solid rgb(30, 172, 178);
- border-bottom: 1px solid rgb(30, 172, 178);
- margin: 0px;
- border-radius: 0px;
-}
-
-.jXaklS {
- z-index: 0;
- top: unset;
- right: unset;
- bottom: unset;
- left: unset;
- box-shadow: unset;
- -webkit-box-flex: unset;
- flex-grow: unset;
- background-color: rgb(255, 255, 255);
- color: rgb(30, 172, 178);
- font-size: 14px;
- backdrop-filter: unset;
- width: 30px;
- max-height: 40px;
- text-align: center;
- cursor: pointer;
- align-self: unset;
- padding: 3px;
- border-left: none;
- border-right: none;
- border-top: 1px solid rgb(30, 172, 178);
- border-bottom: 1px solid rgb(30, 172, 178);
- margin: 0px;
- border-radius: 0px;
-}
-
-.bvKoMW {
- z-index: 0;
- top: unset;
- right: unset;
- bottom: unset;
- left: unset;
- box-shadow: unset;
- -webkit-box-flex: unset;
- flex-grow: unset;
-
- color: #1eacb2;
- font-size: 14px;
- backdrop-filter: unset;
- width: 30px;
- max-height: 40px;
- text-align: center;
- cursor: pointer;
- align-self: unset;
- padding: 3px;
- border-left: none;
- border-right: 1px solid rgb(30, 172, 178);
- border-top: 1px solid rgb(30, 172, 178);
- border-bottom: 1px solid rgb(30, 172, 178);
- margin: 0px;
- border-radius: 0px 18px 18px 0px;
-}
-
-.kWgQNm {
- // .active, .dfmgGo:hover{
- // background-color: rgb(30, 172, 178);
- // border-right: 1px solid rgb(30, 172, 178);
- // border-top: 1px solid rgb(30, 172, 178);
- // border-bottom: 1px solid rgb(30, 172, 178);
- // color:white;
- // }
-
- .active,
- .sc-bdVaJa:hover {
- background-color: rgb(30, 172, 178);
- color: white;
- border-bottom: 1px solid rgb(30, 172, 178);
- }
-
- // .active, .bvKoMW:hover{
- // background-color: rgb(30, 172, 178);
- // border-right: 1px solid rgb(30, 172, 178);
- // border-top: 1px solid rgb(30, 172, 178);
- // border-bottom: 1px solid rgb(30, 172, 178);
- // color:white;
- // }
-}
+.topWrapper {
+ position: fixed;
+ width: 100%;
+ height: 100%;
+}
+
+.mainWrapperWrapper {
+ height: inherit;
+ width: inherit;
+ padding-top: 59px;
+ background: #efecec;
+}
+
+.rowStyle {
+ height: inherit;
+ width: inherit;
+ margin: 0;
+}
+
+.tabCustomStyle {
+ .mat-tab-header {
+ background: white;
+ }
+}
+
+.selectedRunning {
+ background: #86ac41c7;
+ color: white;
+ border-right: 2px solid #ededed;
+}
+
+.selectedStopped {
+ background: #cb0000d9;
+ color: white;
+ border-right: 2px solid #ededed;
+}
+
+.Inactice {
+ background: #4897d8;
+ color: white;
+ border-right: 2px solid #ededed;
+}
+
+.selectIdling {
+ background: #ffc13c;
+ color: white;
+ border-right: 2px solid #ededed;
+}
+
+.selectedNodata {
+ background: #5b7065;
+ color: white;
+ border-right: 2px solid #ededed;
+}
+
+.deselected {
+ background: white;
+ color: black;
+}
+
+.scrollit {
+ overflow: scroll;
+ height: 100%;
+}
+
+.panel-resizable {
+ resize: vertical;
+ overflow: auto;
+}
+
+::-webkit-scrollbar {
+ width: 10px;
+ height: 10px;
+}
+
+/* Track */
+::-webkit-scrollbar-track {
+ background: rgb(153, 153, 153);
+}
+
+/* Handle */
+::-webkit-scrollbar-thumb {
+ // background: rgb(74, 118, 184);
+ background: #868e96;
+}
+
+/* Handle on hover */
+::-webkit-scrollbar-thumb:hover {
+ background: #555;
+}
+
+.buttonStyle {
+ background: white;
+ color: black;
+}
+
+.buttonStyle:hover {
+ background: grey;
+ color: black;
+}
+
+.animateClass {
+ font-size: 12px;
+ padding: 12px;
+ cursor: pointer;
+ margin-left: 10px;
+ margin-right: 10px;
+ color: white;
+ background: #989898;
+ border-radius: 25px;
+ font-size: 12px;
+ padding: 12px;
+ cursor: pointer;
+ margin-left: 10px;
+ margin-right: 10px;
+ color: white;
+ background: #989898;
+ border-radius: 25px;
+ box-shadow: -2px 1px 3px 0px #b2b0ae;
+}
+
+.animateClass_1 {
+ padding: 5px;
+ padding-left: 7px;
+ padding-right: 7px;
+ color: black;
+ cursor: pointer;
+ border: 1px solid #b5b5b5;
+ box-shadow: 3px 2px 5px 0px rgb(178, 176, 174);
+}
+
+.animateClass_2 {
+ padding: 5px;
+ color: rgb(255, 254, 254);
+ cursor: pointer;
+ border: 1px solid #b5b5b5;
+ box-shadow: 0px 2px 2px 0px #b2b0ae;
+}
+
+.animateClass_3 {
+ padding: 5px;
+ color: rgb(255, 254, 254);
+ cursor: pointer;
+ border: 1px solid #b5b5b5;
+ box-shadow: 2px 2px 2px 0px #b2b0ae;
+}
+
+.animateClass_1:active {
+ // background-color: #3e8e41;
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+
+.animateClass_2:active {
+ // background-color: #3e8e41;
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+
+.animateClass_3:active {
+ // background-color: #3e8e41;
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+
+.animateClass:hover {
+ // background-color: #3e8e41
+}
+
+.animateClass:active {
+ // background-color: #3e8e41;
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+
+.animateClass_4 {
+ width: 25%;
+ border-right: 2px solid white;
+}
+.animateClass_5 {
+ width: 25%;
+ border-right: 2px solid white;
+}
+.animateClass_6 {
+ width: 25%;
+ border-right: 2px solid white;
+}
+
+.animateClass_7 {
+ width: 25%;
+}
+
+.animateClass_4:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+.animateClass_5:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+.animateClass_6:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+
+.animateClass_7:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+
+.animateClass_8 {
+ cursor: pointer;
+ color: #2d4262;
+}
+.animateClass_9 {
+ cursor: pointer;
+ color: green;
+}
+.animateClass_10 {
+ cursor: pointer;
+ color: green;
+}
+
+.animateClass_11 {
+ cursor: pointer;
+ color: red;
+}
+
+.animateClass_12 {
+ cursor: pointer;
+ color: #2d4262;
+}
+.animateClass_13 {
+ cursor: pointer;
+ color: red;
+}
+
+.animateDropDown {
+ font-size: 15px;
+ color: #888888;
+ border-radius: 25px;
+ box-shadow: 2px 2px 2px 0px #b2b0ae;
+}
+.animateDropDown:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+
+.animateDropDown:hover {
+ color: blue;
+}
+
+.animateClass_4:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+.animateClass_5:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+.animateClass_6:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+
+.animateClass_7:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+
+.animateClass_8:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+.animateClass_9:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+.animateClass_10:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+
+.animateClass_11:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+
+.animateClass_12:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+
+.animateClass_13:active {
+ box-shadow: 0 1px #666;
+ transform: translateY(1px);
+}
+
+.mat-menu-panel.styleMenu {
+ max-width: 35px;
+ min-width: 30px;
+ background: #efecec;
+ border: 1px solid #afadad;
+}
+
+#slider {
+ margin: 20px;
+}
+
+#toast {
+ visibility: hidden;
+ max-width: 150px;
+ 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: 150px;
+ 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;
+}
+
+/*//////////////////////////////////////////////////////////////////
+[ FONT ]*/
+
+/*//////////////////////////////////////////////////////////////////
+ [ RESTYLE TAG ]*/
+* {
+ margin: 0px;
+ padding: 0px;
+ box-sizing: border-box;
+}
+
+body,
+html {
+ height: 100%;
+ font-family: sans-serif;
+}
+
+/* ------------------------------------ */
+a {
+ margin: 0px;
+ transition: all 0.4s;
+ -webkit-transition: all 0.4s;
+ -o-transition: all 0.4s;
+ -moz-transition: all 0.4s;
+}
+
+a:focus {
+ outline: none !important;
+}
+
+a:hover {
+ text-decoration: none;
+}
+
+/* ------------------------------------ */
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ margin: 0px;
+}
+
+p {
+ margin: 0px;
+}
+
+ul,
+li {
+ margin: 0px;
+ list-style-type: none;
+}
+
+/* ------------------------------------ */
+input {
+ display: block;
+ outline: none;
+ border: none !important;
+}
+
+textarea {
+ display: block;
+ outline: none;
+}
+
+textarea:focus,
+input:focus {
+ border-color: transparent !important;
+}
+
+/* ------------------------------------ */
+button {
+ outline: none !important;
+ border: none;
+ background: transparent;
+}
+
+button:hover {
+ cursor: pointer;
+}
+
+iframe {
+ border: none !important;
+}
+
+/*//////////////////////////////////////////////////////////////////
+ [ Utiliti ]*/
+
+/*//////////////////////////////////////////////////////////////////
+ [ Table ]*/
+
+.limiterTable {
+ width: 100%;
+ margin: 0 auto;
+ height: 20vh;
+ overflow: auto;
+}
+
+.container-table100 {
+ width: 100%;
+ // min-height: 100vh;
+ // background: #c850c0;
+ // background: -webkit-linear-gradient(45deg, #4158d0, #c850c0);
+ // background: -o-linear-gradient(45deg, #4158d0, #c850c0);
+ // background: -moz-linear-gradient(45deg, #4158d0, #c850c0);
+ // background: linear-gradient(45deg, #4158d0, #c850c0);
+
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -moz-box;
+ display: -ms-flexbox;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-wrap: wrap;
+ // padding: 33px 30px;
+}
+
+.wrap-table100 {
+ width: inherit;
+}
+
+// thisTableOnly {
+// border-spacing: 1;
+// border-collapse: collapse;
+// background: white;
+// border-radius: 10px;
+// overflow: hidden;
+// width: 100%;
+// margin: 0 auto;
+// position: relative;
+// }
+// thisTableOnly * {
+// position: relative;
+// }
+// thisTableOnly td, thisTableOnly th {
+// padding-left: 8px;
+// }
+// thisTableOnly thead tr {
+// height: 60px;
+// background: #36304a;
+// }
+// thisTableOnly tbody tr {
+// height: 50px;
+// }
+// thisTableOnly tbody tr:last-child {
+// border: 0;
+// }
+// thisTableOnly td, thisTableOnly th {
+// text-align: left;
+// }
+// thisTableOnly td.l, thisTableOnly th.l {
+// text-align: right;
+// }
+// thisTableOnly td.c, thisTableOnly th.c {
+// text-align: center;
+// }
+// thisTableOnly td.r, thisTableOnly th.r {
+// text-align: center;
+// }
+
+// .table100-head th{
+// // font-family: OpenSans-Regular;
+// font-size: 18px;
+// color: #fff;
+// line-height: 1.2;
+// font-weight: unset;
+// }
+
+tbody tr:nth-child(even) {
+ background-color: #f5f5f5;
+}
+
+// tbody tr {
+
+// font-size: 15px;
+// color: #808080;
+// line-height: 1.2;
+// font-weight: unset;
+// }
+
+// tbody tr:hover {
+// color: #555555;
+// background-color: #f5f5f5;
+// cursor: pointer;
+// }
+
+.column1 {
+ width: 260px;
+ white-space: nowrap;
+ padding: 10px 10px 10px 10px;
+}
+
+.column2 {
+ width: 160px;
+ white-space: nowrap;
+ padding: 10px 10px 10px 10px;
+}
+
+.column3 {
+ width: 245px;
+ white-space: nowrap;
+ padding: 10px 10px 10px 10px;
+}
+
+.column4 {
+ width: 110px;
+ // text-align: right;
+ white-space: nowrap;
+ padding: 10px 10px 10px 10px;
+}
+
+.column5 {
+ width: 170px;
+ // text-align: right;
+ white-space: nowrap;
+ padding: 10px 10px 10px 10px;
+}
+
+.column6 {
+ width: 222px;
+ // text-align: right;
+ padding-right: 62px;
+ white-space: nowrap;
+ padding: 10px 10px 10px 10px;
+}
+
+// @media screen and (max-width: 992px) {
+// table {
+// display: block;
+// }
+// table > *, table tr, table td, table th {
+// display: block;
+// }
+// table thead {
+// display: none;
+// }
+// table tbody tr {
+// height: auto;
+// padding: 37px 0;
+// }
+// table tbody tr td {
+// padding-left: 40% !important;
+// margin-bottom: 24px;
+// }
+// table tbody tr td:last-child {
+// margin-bottom: 0;
+// }
+// table tbody tr td:before {
+// // font-family: OpenSans-Regular;
+// font-size: 14px;
+// color: #999999;
+// line-height: 1.2;
+// font-weight: unset;
+// position: absolute;
+// width: 40%;
+// left: 30px;
+// top: 0;
+// }
+// table tbody tr td:nth-child(1):before {
+// content: "Date";
+// }
+// table tbody tr td:nth-child(2):before {
+// content: "Order ID";
+// }
+// table tbody tr td:nth-child(3):before {
+// content: "Name";
+// }
+// table tbody tr td:nth-child(4):before {
+// content: "Price";
+// }
+// table tbody tr td:nth-child(5):before {
+// content: "Quantity";
+// }
+// table tbody tr td:nth-child(6):before {
+// content: "Total";
+// }
+
+// .column4,
+// .column5,
+// .column6 {
+// text-align: left;
+// }
+
+// .column4,
+// .column5,
+// .column6,
+// .column1,
+// .column2,
+// .column3 {
+// width: 100%;
+// }
+
+// tbody tr {
+// font-size: 14px;
+// }
+// }
+
+// @media (max-width: 576px) {
+// .container-table100 {
+// padding-left: 15px;
+// padding-right: 15px;
+// }
+// }
+
+.kWgQNm {
+ box-sizing: border-box;
+ display: flex;
+ -webkit-box-pack: start;
+ justify-content: flex-start;
+ align-content: center;
+ -webkit-box-align: center;
+ align-items: center;
+ flex-direction: row;
+ flex-wrap: nowrap;
+ max-width: unset;
+ min-width: unset;
+ min-height: unset;
+ cursor: unset;
+ transform: unset;
+ word-break: unset;
+ z-index: unset;
+ padding: 0px;
+ margin: 0px;
+ overflow: unset;
+ background: unset;
+ border-right: unset;
+ border-bottom: unset;
+ flex: 0 0 auto;
+ border-radius: unset;
+ transition: initial;
+}
+
+.dfmgGo {
+ z-index: 0;
+ top: unset;
+ right: unset;
+ bottom: unset;
+ left: unset;
+ box-shadow: unset;
+ -webkit-box-flex: unset;
+ flex-grow: unset;
+ background-color: rgb(255, 255, 255);
+ color: rgb(30, 172, 178);
+ font-size: 14px;
+ backdrop-filter: unset;
+ width: 30px;
+ max-height: 40px;
+ text-align: center;
+ cursor: pointer;
+ align-self: unset;
+ padding: 3px;
+ border-left: 1px solid rgb(30, 172, 178);
+ border-right: none;
+ border-top: 1px solid rgb(30, 172, 178);
+ border-bottom: 1px solid rgb(30, 172, 178);
+ margin: 0px;
+ border-radius: 18px 0px 0px 18px;
+}
+
+.jXaklS {
+ z-index: 0;
+ top: unset;
+ right: unset;
+ bottom: unset;
+ left: unset;
+ box-shadow: unset;
+ -webkit-box-flex: unset;
+ flex-grow: unset;
+ background-color: rgb(255, 255, 255);
+ color: rgb(30, 172, 178);
+ font-size: 14px;
+ backdrop-filter: unset;
+ width: 30px;
+ max-height: 40px;
+ text-align: center;
+ cursor: pointer;
+ align-self: unset;
+ padding: 3px;
+ border-left: none;
+ border-right: none;
+ border-top: 1px solid rgb(30, 172, 178);
+ border-bottom: 1px solid rgb(30, 172, 178);
+ margin: 0px;
+ border-radius: 0px;
+}
+
+.jXaklS {
+ z-index: 0;
+ top: unset;
+ right: unset;
+ bottom: unset;
+ left: unset;
+ box-shadow: unset;
+ -webkit-box-flex: unset;
+ flex-grow: unset;
+ background-color: rgb(255, 255, 255);
+ color: rgb(30, 172, 178);
+ font-size: 14px;
+ backdrop-filter: unset;
+ width: 30px;
+ max-height: 40px;
+ text-align: center;
+ cursor: pointer;
+ align-self: unset;
+ padding: 3px;
+ border-left: none;
+ border-right: none;
+ border-top: 1px solid rgb(30, 172, 178);
+ border-bottom: 1px solid rgb(30, 172, 178);
+ margin: 0px;
+ border-radius: 0px;
+}
+
+.bvKoMW {
+ z-index: 0;
+ top: unset;
+ right: unset;
+ bottom: unset;
+ left: unset;
+ box-shadow: unset;
+ -webkit-box-flex: unset;
+ flex-grow: unset;
+
+ color: #1eacb2;
+ font-size: 14px;
+ backdrop-filter: unset;
+ width: 30px;
+ max-height: 40px;
+ text-align: center;
+ cursor: pointer;
+ align-self: unset;
+ padding: 3px;
+ border-left: none;
+ border-right: 1px solid rgb(30, 172, 178);
+ border-top: 1px solid rgb(30, 172, 178);
+ border-bottom: 1px solid rgb(30, 172, 178);
+ margin: 0px;
+ border-radius: 0px 18px 18px 0px;
+}
+
+.kWgQNm {
+ // .active, .dfmgGo:hover{
+ // background-color: rgb(30, 172, 178);
+ // border-right: 1px solid rgb(30, 172, 178);
+ // border-top: 1px solid rgb(30, 172, 178);
+ // border-bottom: 1px solid rgb(30, 172, 178);
+ // color:white;
+ // }
+
+ .active,
+ .sc-bdVaJa:hover {
+ background-color: rgb(30, 172, 178);
+ color: white;
+ border-bottom: 1px solid rgb(30, 172, 178);
+ }
+
+ // .active, .bvKoMW:hover{
+ // background-color: rgb(30, 172, 178);
+ // border-right: 1px solid rgb(30, 172, 178);
+ // border-top: 1px solid rgb(30, 172, 178);
+ // border-bottom: 1px solid rgb(30, 172, 178);
+ // color:white;
+ // }
+}
diff --git a/src/app/report/report component/push-data-report/push-data-report.component.scss b/src/app/report/report component/push-data-report/push-data-report.component.scss
index 63b6859..004f5c8 100644
--- a/src/app/report/report component/push-data-report/push-data-report.component.scss
+++ b/src/app/report/report component/push-data-report/push-data-report.component.scss
@@ -1,36 +1,36 @@
-.topDiv {
- // padding-top: 59px;
- background: whitesmoke;
- height: 100vh;
-}
-
-.rowStyle {
- // margin: 5px;
- // background: white;
- height: 84vh;
- // box-shadow: 3px 1px 5px 0px #b2b0ae;
-}
-
-#deviceTable input {
- border-radius: 5px;
-}
-
-::-webkit-scrollbar {
- width: 10px;
-}
-
-/* Track */
-::-webkit-scrollbar-track {
- background: rgb(153, 153, 153);
-}
-
-/* Handle */
-::-webkit-scrollbar-thumb {
- // background: rgb(74, 118, 184);
- background: #868e96;
-}
-
-/* Handle on hover */
-::-webkit-scrollbar-thumb:hover {
- background: #555;
-}
+.topDiv {
+ // padding-top: 59px;
+ background: whitesmoke;
+ height: 100vh;
+}
+
+.rowStyle {
+ // margin: 5px;
+ // background: white;
+ height: 84vh;
+ // box-shadow: 3px 1px 5px 0px #b2b0ae;
+}
+
+#deviceTable input {
+ border-radius: 5px;
+}
+
+::-webkit-scrollbar {
+ width: 10px;
+}
+
+/* Track */
+::-webkit-scrollbar-track {
+ background: rgb(153, 153, 153);
+}
+
+/* Handle */
+::-webkit-scrollbar-thumb {
+ // background: rgb(74, 118, 184);
+ background: #868e96;
+}
+
+/* Handle on hover */
+::-webkit-scrollbar-thumb:hover {
+ background: #555;
+}
diff --git a/src/app/report/report component/stoppage-report/stoppage-report.component.ts b/src/app/report/report component/stoppage-report/stoppage-report.component.ts
index 5da751a..4cd810b 100644
--- a/src/app/report/report component/stoppage-report/stoppage-report.component.ts
+++ b/src/app/report/report component/stoppage-report/stoppage-report.component.ts
@@ -417,13 +417,13 @@ addressLink = "";
}
} ,
{
- "data": "address",
+ "data": null,
render: function(data, type, row) {
var lat = row.lat?row.lat:0;
var lng = row.long?row.long:0;
var addressLink = ' ';
- if(data){
- return data ;
+ if(row.address){
+ return row.address ;
}else{
return addressLink;
}
@@ -615,6 +615,7 @@ downloadPdf() {
// outerThis.startAddress= outerThis.finalArr[0].address;
// outerThis.endAddress= outerThis.finalArr[outerThis.finalArr.length-1].address
var doc = new jsPDF("p", "pt", pdfsize);
+ console.log(outerThis);
outerThis.f_date = moment(this.Fromdate).format('lll');
outerThis.t_date =moment(this.todate).format('lll');
// var date_combine = f_date + ' to ' + t_date;
@@ -728,8 +729,8 @@ var pageWidth = doc.internal.pageSize.width || doc.internal.pageSize.getWidth();
body.push({
vehicleName:pdfBody[j].device.Device_Name,
- fromDate:moment(this.Fromdate).format('lll'),
- toDate:moment(this.todate).format('lll'),
+ fromDate: moment(pdfBody[j].arrival_time).format('lll'),
+ toDate: moment(pdfBody[j].departure_time).format('lll'),
duration:this.durationFun(pdfBody[j]),
location:pdfBody[j].address?pdfBody[j].address:'N/A',
diff --git a/src/app/report/report component/trip-report/trip-report.component.html b/src/app/report/report component/trip-report/trip-report.component.html
index 67bb749..c309cb3 100644
--- a/src/app/report/report component/trip-report/trip-report.component.html
+++ b/src/app/report/report component/trip-report/trip-report.component.html
@@ -2,7 +2,7 @@
- {{'Trip Report'|translate}}
+ {{'1 Trip Report'|translate}}
-
+
+
+
+
+
+
+
+
{{ lableVariable | translate }} :
-
@@ -618,7 +657,7 @@
{{ "Device" | translate }}
-
-
+
|