diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts
index 588eeb4..35d6f9c 100644
--- a/src/app/dashboard/dashboard.component.ts
+++ b/src/app/dashboard/dashboard.component.ts
@@ -1694,7 +1694,13 @@ testTable() {
"data":null,
"defaultContent": "",
"render":function(data,type,row){
- return '
'
+ if(row.kycStatus && row.kycStatus=="Approved") {
+ return '
'
+ }
+ else {
+
+ return '
'
+ }
}
} ,
{
diff --git a/src/app/dashboard/download-certificate/download-certificate.component.html b/src/app/dashboard/download-certificate/download-certificate.component.html
index 5018d9b..e89eb1a 100644
--- a/src/app/dashboard/download-certificate/download-certificate.component.html
+++ b/src/app/dashboard/download-certificate/download-certificate.component.html
@@ -20,12 +20,12 @@
To
Regional Transport Authority
- Kolkata
- West Bengal Only
+ {{data.deviceInfo && data.deviceInfo.transportOfficeCity?data.deviceInfo.transportOfficeCity:''}}
+ {{data.deviceInfo && data.deviceInfo.transportOfficeState?data.deviceInfo.transportOfficeState:''}} Only
|
-
@@ -56,7 +56,7 @@
| VEHICLE REG.NO |
- {{ devName ? devName : "" }} |
+ |
| VEHICLE REG.DATE |
@@ -127,16 +127,13 @@
| VTS SR.NO/UINO |
- {{ ICCICD ? ICCICD : "" }} |
+ {{ vahanID ? vahanID : "" }} |
- | VTS MODEL TRACK |
+ VTS MODEL |
{{ devicetype ? devicetype : "" }} |
-
- | Test Report NO. |
- - |
-
+
| TAC NO. |
CK8077 |
@@ -190,24 +187,27 @@
-
-
- |
+ |
+
+
|
-
+ |
|
-
+ |
PRODUCT SATISFACTION REPORT
- This is to acknowledge confirm that we have got our vehicle bearing registration no {{vahanID}} VTS Device manufactured by NIPPON AUDIOTRONIX bearing Sr.No
- {{engineNo}} We have checked the performance ot the vehicle after fitment of the said VTS device the unit is sealed and functioning as per normslaid out in AIS 140.We
+ This is to acknowledge confirm that we have got our vehicle bearing chassis no {{ChassisNo}} VTS Device manufactured by NIPPON AUDIOTRONIX bearing Sr.No
+ {{vahanID}} We have checked the performance ot the vehicle after fitment of the said VTS device the unit is sealed and functioning as per normslaid out in AIS 140.We
have satisfied with the performance of the unit in all respects.We undertake not to reseany dispute or any legal claims against NIPPON AUDIOTRONIX in the event that the
above mentioned seals atfound broken/tampered.
-
-
+
+
+
+
- |
+ |
+
+ |
+
Dealer Name:
|
-
+ |
{{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.first_name ? data.deviceInfo.Dealer.first_name : "" }}
{{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.last_name ? data.deviceInfo.Dealer.last_name : "" }}
|
-
+ |
Dealer Contact no:
|
-
+ |
|
Dealer Addresse:
- |
-
+
{{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.address ? data.deviceInfo.Dealer.address : "" }}
|
@@ -273,8 +277,7 @@
Customer Addresse:
- |
-
+
{{ user.address ? user.address : "" }}
|
@@ -289,18 +292,17 @@
Dealer Sign:
- ..............................
- |
-
- RTA/MVI/STA:
+ ..............
|
+ RTA/MVI/STA:
+
...............................
|
-
+
diff --git a/src/app/dashboard/download-certificate/download-certificate.component.scss b/src/app/dashboard/download-certificate/download-certificate.component.scss
index 10ad477..01cd97a 100644
--- a/src/app/dashboard/download-certificate/download-certificate.component.scss
+++ b/src/app/dashboard/download-certificate/download-certificate.component.scss
@@ -2,6 +2,17 @@
width: 3000px !important;
height: 3000px !important;
}
+#testPdf .table{
+ margin-bottom: 0.25rem;
+}
+#stamp-section{
+ background: url('/assets/images/liveTrackIcons/Stamp.png');
+ background-repeat: no-repeat;
+ height: 110px;
+ position: absolute;
+ top: 5px;
+ width: 110px;
+}
.t-mp-heading {
font-size: 16px;font-weight: 700;
text-align: center;
diff --git a/src/app/dashboard/download-certificate/download-certificate.component.ts b/src/app/dashboard/download-certificate/download-certificate.component.ts
index 7d49369..ad20314 100644
--- a/src/app/dashboard/download-certificate/download-certificate.component.ts
+++ b/src/app/dashboard/download-certificate/download-certificate.component.ts
@@ -138,6 +138,7 @@ export class DownloadCertificateComponent implements OnInit {
if (this.supAdmin.imageDoc && this.supAdmin.imageDoc.length > 0) {
this.supAdmin.imageDoc = 'https://www.oneqlik.in' + this.supAdmin.imageDoc[0].substring(6)
}
+
console.log(this.deviceImage);
this.installationDate = this.data.deviceInfo.created_on
this.todayODO = this.data.deviceInfo.today_odo;
@@ -165,10 +166,16 @@ export class DownloadCertificateComponent implements OnInit {
this.gsmModule = 'Quectel M66'
}
+ let replaceURL = 'http://nipponsecura.in'
+ let currentWebURl = window.location.hostname;
+ if(currentWebURl.includes('www.oneqlik.in')) {
+ replaceURL = 'https://www.oneqlik.in'
+ }
for (var i = 0; i < this.deviceImage.length; i++) {
console.log("DEVUCE IMAGE=>", this.deviceImage[i]);
-
- this.deviceImage[i] = this.deviceImage[i] && this.deviceImage[i] != "" ? 'http://nipponsecura.in' + this.deviceImage[i].substring(6) : ''
+ if(this.deviceImage[i] && !this.deviceImage[i].includes(replaceURL)) {
+ this.deviceImage[i] = this.deviceImage[i] && this.deviceImage[i] != "" ? replaceURL + this.deviceImage[i].substring(6) : ''
+ }
}
@@ -310,6 +317,9 @@ export class DownloadCertificateComponent implements OnInit {
+ }
+ removeItemForm() {
+ this.deviceImage.splice(this.deviceImage.length -1,1);
}
closePopup() {
this.dialogRef.close(1);
@@ -394,7 +404,6 @@ export class DownloadCertificateComponent implements OnInit {
overflow: "linebreak"
},
willDrawCell: data => {
- console.log('manojpatidar',data);
if (data.row.index === 0) {
data.row.height = 40;
doc.setFontStyle('bold');
diff --git a/src/app/indexingReport/index-report.component.html b/src/app/indexingReport/index-report.component.html
new file mode 100644
index 0000000..8f6f7c6
--- /dev/null
+++ b/src/app/indexingReport/index-report.component.html
@@ -0,0 +1,44 @@
+
+
+
+
+
+ {{'Index Report' | translate}}
+
+
+
+
+
+
+
+
+
+ Loading…
+
+
+
+
+ | {{col | translate}} |
+
+
+
+
+
+ | {{item[col]}} |
+
+
+
+
+
+
+
+
+
diff --git a/src/app/indexingReport/index-report.component.scss b/src/app/indexingReport/index-report.component.scss
new file mode 100644
index 0000000..c80b458
--- /dev/null
+++ b/src/app/indexingReport/index-report.component.scss
@@ -0,0 +1,86 @@
+.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 #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: 350px;
+ 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;
+}
diff --git a/src/app/indexingReport/index-report.component.spec.ts b/src/app/indexingReport/index-report.component.spec.ts
new file mode 100644
index 0000000..7bba407
--- /dev/null
+++ b/src/app/indexingReport/index-report.component.spec.ts
@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { IndexingReportComponent } from './index-report.component';
+
+describe('IndexingReportComponent', () => {
+ let component: IndexingReportComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ IndexingReportComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(IndexingReportComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should be created', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/indexingReport/index-report.component.ts b/src/app/indexingReport/index-report.component.ts
new file mode 100644
index 0000000..9a4022e
--- /dev/null
+++ b/src/app/indexingReport/index-report.component.ts
@@ -0,0 +1,520 @@
+import { Component, OnInit } from '@angular/core';
+import { ContactService } from './../contact.service';
+
+declare var $: any, DataTable: any;
+import * as moment from 'moment';
+
+import { MdDialog } from '@angular/material';
+import { FlashMessagesService } from 'angular2-flash-messages';
+
+
+@Component({
+ selector: 'app-index-report',
+ templateUrl: './index-report.component.html',
+ styleUrls: ['./index-report.component.scss']
+})
+export class IndexingReportComponent implements OnInit {
+ Fromdate=new Date();
+ todate=new Date();
+ reportData : any = [];
+ tabelObj: any;
+ emailid: any;
+ useridd: any;
+ option: any;
+ supadm: any;
+ deviceObjwithName: any=[];
+ deviceSelect1: any=[];
+
+ identifier:String='gps_master';
+ Load: boolean;
+ super_admin : any;
+ isDealer: any;
+ dlrID: any;
+ constructor(public contactService: ContactService,public dialog: MdDialog,private _flashMessagesService: FlashMessagesService) {
+ this.Fromdate.setHours(0, 0, 0);
+ this.emailid = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).email;
+ this.useridd = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id;
+ this.supadm = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin;
+ this.isDealer = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isDealer;
+ if(this.isDealer == true){
+ this.dlrID = JSON.parse(window.atob(window.localStorage.token.split(".")[1]))._id
+ }
+
+ }
+
+ ngOnInit() {
+ // this.getAllDevice();
+ // this.testTable();
+ }
+
+ callfunction(): void {
+ this.tabelObj.draw();
+ }
+
+ displayCol = []
+ testTable() {
+
+this.displayCol = [];
+
+ //console.log("initId=>",id);
+ console.log('Inside testTable');
+ const that = this;
+ let obj ={ "imei":"",
+ "from":"",
+ "to":""};
+ if (that.deviceArr.length !=0) {
+ // console.log(that.deviceSelect[0].id);
+ obj.imei =that.deviceArr[0];
+ }
+
+
+ if (that.Fromdate) {
+ console.log('that.Fromdate',that.Fromdate.toISOString());
+
+ obj.from = new Date(that.Fromdate).toISOString()
+
+ };
+ if (that.todate) {
+ that.todate.setSeconds(0);
+ that.todate.setMilliseconds(0);
+ obj.to = new Date(that.todate).toISOString()
+
+ }
+
+
+
+ // if(this.supadm){
+ // dataTablesParameters.find.supAdmin = that.useridd;
+ // }
+
+ var suburl = "";
+ suburl += "/gps/indexingAIS140";
+ // console.log(suburl);
+ // console.log(dataTablesParameters);
+ // console.log(suburl)
+// if(id != 0)
+ console.log('calling api');
+ // { "imei":"862818043677154",
+ // "from":"2023-02-26 00:00:00.000Z",
+ // "to":"2023-02-27 20:00:00.000Z"}
+ that.contactService.post(suburl,obj ).subscribe(resp => {
+ // console.log('resp',resp);
+ that.reportData = resp ? resp : [];
+ if(that.reportData.length) {
+
+ for (var key in that.reportData[0]) {
+ this.displayCol.push(key)
+ }
+ }
+ }, err => {
+ // console.log(err);
+ // console.log(err.status);
+ that.reportData = [];
+
+ });
+
+ // $(document).ready(function () {
+ // that.tabelObj = $('#gpsTable').DataTable({
+ // "serverSide": true,
+ // "processing": true,
+ // "searching": false,
+ // "scrollX": true,
+ // "scrollY": "480px",
+ // "scrollCollapse": true,
+ // "responsive" :true,
+ // lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
+ // ajax: (dataTablesParameters: any, callback) => {
+ // console.log('inside ajax call');
+ // dataTablesParameters.op = {};
+ // dataTablesParameters.select = [];
+ // dataTablesParameters.find = {};
+
+
+ // // console.log(dataTablesParameters);
+ // // console.log("callback", callback);
+
+ // // dataTablesParameters.find = {
+ // // _id: that.useridd
+ // // };
+ // dataTablesParameters.columns = [
+ // {data : "_id"},
+ // { data: "imei" },
+ // { data: "date" },
+ // { data: "latDecimal" },
+ // { data: "longDecimal" },
+ // { data: "insertionTime" },
+ // {data : 'syncedAt'},
+ // {data : 'integrationResponse'},
+ // { data: "speed" },
+ // {data:"ac"},
+ // {data : "currentFuel"},
+ // {data : "raw"},
+ // { data: "ignition" },
+ // { data: "power" },
+ // {data : "fuelVoltage"},
+ // { data: "external_Battery" },
+ // { data: "powerCutAlarm" },
+ // { data: "satellites" },
+ // {data:'GPS positioned'},
+ // {data:'isFluctuation'},
+ // {data:'isPastData'},
+ // ]
+
+
+ // // dataTablesParameters.find.supAdmin = that.useridd;
+
+
+ // if (that.deviceArr.length !=0) {
+ // // console.log(that.deviceSelect[0].id);
+ // dataTablesParameters.find.imei =that.deviceArr[0];
+ // }
+
+
+ // if (that.Fromdate) {
+ // console.log('that.Fromdate',that.Fromdate.toISOString());
+ // dataTablesParameters.find['insertionTime'] = dataTablesParameters.find['insertionTime'] ? dataTablesParameters.find['insertionTime'] : {};
+ // dataTablesParameters.find['insertionTime']['$gte'] = {
+ // _eval: 'date',
+ // value: new Date(that.Fromdate).toISOString()
+ // }
+ // };
+ // // }
+ // if (that.todate) {
+ // that.todate.setSeconds(0);
+ // that.todate.setMilliseconds(0);
+ // console.log('that.todate',that.todate.toISOString())
+
+ // dataTablesParameters.find['insertionTime'] = dataTablesParameters.find['insertionTime'] ? dataTablesParameters.find['insertionTime'] : {};
+ // dataTablesParameters.find['insertionTime']['$lte'] = {
+ // _eval: 'date',
+ // value: new Date(that.todate).toISOString()
+ // };
+ // }
+
+
+
+ // // if(this.supadm){
+ // // dataTablesParameters.find.supAdmin = that.useridd;
+ // // }
+
+ // var suburl = "";
+ // suburl += "/gps/indexingAIS140";
+ // // console.log(suburl);
+ // // console.log(dataTablesParameters);
+ // // console.log(suburl)
+ // // if(id != 0)
+ // console.log('calling api');
+ // that.contactService.post(suburl, { "imei":"862818043677154",
+ // "from":"2023-02-26 00:00:00.000Z",
+ // "to":"2023-02-27 20:00:00.000Z"}).subscribe(resp => {
+ // // console.log('resp',resp);
+ // that.reportData = resp ? resp : [];
+ // callback(resp);
+ // }, err => {
+ // // console.log(err);
+ // // console.log(err.status);
+ // that.reportData = [];
+ // callback({data:[]})
+ // });
+
+
+ // },
+ // "rowCallback": function(row: Node, data: any | Object, index: number){
+ // $('#delete', row).bind('click', () => {
+ // // console.log("delete Method",data);
+ // var gpsId = data._id;
+ // that.contactService.deletegpsdata(gpsId)
+ // .subscribe(res=>{
+ // // console.log(res);
+ // that._flashMessagesService.show("Data Deleted", { cssClass: 'alert-warning', timeout: 2000 });
+ // that.callfunction();
+ // },err=>{
+ // that._flashMessagesService.show("Internal server error", { cssClass: 'alert-warning', timeout: 2000 });
+ // // console.log(err);
+ // })
+ // });
+ // },
+
+ // "columns": [
+ // {
+ // "data": "imei",
+ // "render": function (data, type, row) {
+ // return data ? data : "";
+ // }
+ // },
+ // {
+ // "data": "latDecimal",
+ // "render": function (data, type, row) {
+ // return data ? data : "";
+ // }
+ // },
+ // {
+ // "data": "longDecimal",
+ // "render": function (data, type, row) {
+ // return data ? data : "";
+ // }
+ // },
+ // {
+ // "data": "speed",
+ // "render": function (data, type, row) {
+ // return data ? data : "";
+ // }
+ // },
+ // {
+ // "data": "date",
+ // "render": function (data, type, row) {
+
+ // var device_time = new Date(data);
+ // return data ? (moment(device_time).format('dddd,ll,LTS')) : "";
+ // }
+ // },
+ // {
+ // "data": "insertionTime",
+ // "render": function (data, type, row) {
+ // var created_time = new Date(data);
+ // return data ? (moment(created_time).format('dddd,ll,LTS')) : "";
+ // }
+ // },
+ // {
+ // "data": "syncedAt",
+ // "render": function (data, type, row) {
+ // var insertion_time = new Date(data);
+ // return data ? (moment(insertion_time).format('dddd,ll,LTS')) : "";
+ // }
+ // },
+ // {
+ // "data": "integrationResponse",
+ // "render": function (data, type, row) {
+ // if(data)
+ // // alert(data);
+ // console.log(typeof(data));
+ // if(typeof(data) === 'object'){
+ // data = JSON.stringify(data);
+
+ // }
+ // return data ? data: "";
+ // }
+ // },
+ // {
+ // "data": "ignition",
+ // "render": function (data, type, row) {
+ // return data ? data : "";
+ // }
+ // },
+ // {
+ // "data": "power",
+ // "render": function (data, type, row) {
+ // return data ? data : ""
+ // }
+ // },
+ // {
+ // "data": "GPS positioned",
+ // "render": function (data, type, row) {
+ // return data ? data : ""
+ // }
+ // },
+ // {
+ // "data": "isFluctuation",
+ // "render": function (data, type, row) {
+ // return data ? data : ""
+ // }
+ // },
+ // {
+ // "data": "isPastData",
+ // "render": function (data, type, row) {
+ // return data ? data : ""
+ // }
+ // },
+ // {
+ // "data": "external_Battery",
+ // "render": function (data, type, row) {
+ // return data ? data : ""
+ // }
+ // },
+ // {
+ // "data": "fuelVoltage",
+ // "render": function (data, type, row) {
+ // return data ? (data/1000).toFixed(2) : ""
+ // }
+ // },
+ // {
+ // "data": "currentFuel",
+ // "render": function (data, type, row) {
+ // return data ? data : ""
+ // }
+ // },
+ // {
+ // "data": "raw",
+ // "render": function (data, type, row) {
+ // return data ? data : "" ;
+ // }
+ // },
+ // {
+ // "data": "ac",
+ // "render": function (data, type, row) {
+ // return data ? data : ""
+ // }
+ // },
+ // {
+ // "data": "powerCutAlarm",
+ // "render": function (data, type, row) {
+ // return data ? data : "";
+ // }
+ // },
+ // {
+ // "data": "satellites",
+ // "render": function (data, type, row) {
+ // return data ? data : "";
+ // }
+ // },
+ // {
+ // "data":null,"render":function(data,type,row){
+ // return ''
+ // }}
+ // ],
+ // "columnDefs": [
+
+ // { width: '20px', targets: ['15'] }
+ // ]
+ // });
+ // });
+
+ }
+
+ deviceObj=[];
+
+
+
+deviceSelect:any=[];
+deviceName:any;
+deviceName1:any;
+
+ deviceArr=[];
+ data_descip:any;
+
+ getReport(event){
+ this.deviceArr=[];
+ console.log("inside function",event);
+ if(event == 'getExcel'){
+ this.exportExcel();
+ }else{
+ var deviceId: any;
+ var tpdata = event ;
+ var that = this;
+ var fd = new Date(tpdata.fromDate);
+ var td = new Date(tpdata.toDate);
+ var Fromdate = fd.toISOString();
+ var todate = td.toISOString();
+
+ var diff = moment(todate).diff(Fromdate, 'days')
+ // console.log(diff,"999999999");
+
+ if(diff>=31){
+ console.log('difference :' + diff)
+ this.data_descip = 'Report is unavailable for more than a month';
+ launch_toast();
+
+ }else{
+ if(event.deviceId.length==0){
+ deviceId=[];
+ }else{
+ deviceId= event.deviceId;
+ }
+ this.deviceArr = deviceId;
+ this.Fromdate = fd;
+ this.todate = td;
+ this.testTable();
+ }
+ }
+
+ function launch_toast() {
+ // console.log(divid);
+ var x = document.getElementById("toast")
+ //console.log(x);
+ x.className = "show";
+ setTimeout(function () { x.className = x.className.replace("show", ""); }, 4500);
+ }
+
+}
+
+
+ tab:any;
+ exportExcel() {
+ this.downloadFile(this.reportData)
+ }
+ downloadFile(data) {
+ let arrHeader = this.displayCol;
+ 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));
+
+ // 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 = this.displayCol;
+ 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;
+ }
+ }
+
+
+}
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 ff5ebf8..1e54bfd 100644
--- a/src/app/kyc-approval/device-doc/device-doc.component.html
+++ b/src/app/kyc-approval/device-doc/device-doc.component.html
@@ -21,12 +21,12 @@
- |
+ |
|
-
+
@@ -92,21 +92,51 @@
|
| State RTO Certificate |
-
-
+
+
+
+ |
+
+
+
+
+ Not Available
+
|
-
+
+
+ |
{{state_certifcate_date |date:"medium"}}
|
| Vahan Certificate |
-
-
+
+
+
+ |
+
+
+
+
- |
+
+ Not Available
+
+
+
+
{{vaahan_certifcate_date |date:"medium"}}
|
@@ -127,18 +157,18 @@
- | State RTO Certificate |
+ State RTO Certificate |
-
+ |
-
+
|
-
+
-
+
Not Available
|
@@ -147,24 +177,33 @@
{{state_certifcate_date |date:"medium"}}
|
+
+
+
+
+ |
+
+
+
+
+ |
+
+
-
- |
-
| Vahan Certificate |
-
+ |
-
+
|
-
+
-
+
Not Available
|
@@ -173,9 +212,18 @@
{{vaahan_certifcate_date |date:"medium"}}
|
-
-
- |
+
+
+
+
+
+ |
+
+
+
+
+ |
+
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 e35a08f..6977ca0 100644
--- a/src/app/kyc-approval/device-doc/device-doc.component.ts
+++ b/src/app/kyc-approval/device-doc/device-doc.component.ts
@@ -137,12 +137,11 @@ AddDocumentsField(addedRow:any){
console.log(this.imageuploadObject);
// console.log("ImageuploadObject=>",this.imageuploadObject);
}
-selectedFile: File;
+selectedFile: any = {};
statePic;
vahanPic
onFileChanged(event1,type) {
- this.selectedFile = event1.target.files[0];
- console.log(this.selectedFile,type);
+ this.selectedFile[type] = event1.target.files[0];
var fileToUpload = event1.target.files.item(0);
@@ -172,15 +171,14 @@ onUpload(imgIndex) {
console.log(imgIndex);
console.log(this.imageuploadObject);
const fd = new FormData();
- console.log("selected file name =>",this.selectedFile.name);
- if(this.selectedFile.name == " "){
+ if( !(this.selectedFile[imgIndex] && this.selectedFile[imgIndex].name)){
swal(
'Upload Error',
'Please select document type before upload !!!',
'error'
)
}else{
- fd.append('photo',this.selectedFile,this.selectedFile.name)
+ fd.append('photo',this.selectedFile[imgIndex],this.selectedFile[imgIndex].name)
console.log("imgURL=>",fd) ;
this.Load = true;
this.contactService.imageupload(fd)
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 1c63a61..b3c4f92 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
@@ -432,21 +432,22 @@ export class NewTravelPathReportComponent implements OnInit {
return (sa);
}
clocation_1(latlngObj, cb) {
- if (latlngObj == null) {
- cb(null, latlngObj);
- }
- var outerThis = this;
- var la = '';
+ // if (latlngObj == null) {
+ // cb(null, latlngObj);
+ // }
+ cb(null, latlngObj);
+ // var outerThis = this;
+ // var la = '';
- let latLng = {
- lat: "0",
- long: "0"
- };
+ // let latLng = {
+ // lat: "0",
+ // long: "0"
+ // };
- latLng = {
- lat: latlngObj.latDecimal ? latlngObj.latDecimal : 0,
- long: latlngObj.longDecimal ? latlngObj.longDecimal : 0
- }
+ // latLng = {
+ // lat: latlngObj.latDecimal ? latlngObj.latDecimal : 0,
+ // long: latlngObj.longDecimal ? latlngObj.longDecimal : 0
+ // }
// if () {
@@ -456,79 +457,79 @@ export class NewTravelPathReportComponent implements OnInit {
// }
// }
- outerThis.contactService.getAddressByApi(latLng).subscribe(res => {
- if (res.message == "Address not found in databse") {
- var adata = {
- iden: 'noaddress',
- latlng: latLng
- }
- latlngObj['address'] = adata;
- // cb(null,latlngObj);
- var latLng_1 = {
- lat: "0",
- long: "0"
- };
+ // outerThis.contactService.getAddressByApi(latLng).subscribe(res => {
+ // if (res.message == "Address not found in databse") {
+ // var adata = {
+ // iden: 'noaddress',
+ // latlng: latLng
+ // }
+ // latlngObj['address'] = adata;
+ // // cb(null,latlngObj);
+ // var latLng_1 = {
+ // lat: "0",
+ // long: "0"
+ // };
- latLng_1 = {
- lat: latlngObj.latDecimal ? latlngObj.latDecimal : 0,
- long: latlngObj.longDecimal ? latlngObj.longDecimal : 0
- }
+ // latLng_1 = {
+ // lat: latlngObj.latDecimal ? latlngObj.latDecimal : 0,
+ // long: latlngObj.longDecimal ? latlngObj.longDecimal : 0
+ // }
- outerThis.contactService.getAddressByApi(latLng_1).subscribe(res => {
- if (res.message == "Address not found in databse") {
- var bdata = {
- iden: 'noaddress',
- latlng: latLng_1
- }
+ // outerThis.contactService.getAddressByApi(latLng_1).subscribe(res => {
+ // if (res.message == "Address not found in databse") {
+ // var bdata = {
+ // iden: 'noaddress',
+ // latlng: latLng_1
+ // }
- latlngObj['address'] = bdata;
- cb(null, latlngObj);
+ // latlngObj['address'] = bdata;
+ // cb(null, latlngObj);
- } else {
- latlngObj['address'] = res.address;
- cb(null, latlngObj);
- }
+ // } else {
+ // latlngObj['address'] = res.address;
+ // cb(null, latlngObj);
+ // }
- })
+ // })
- } else {
- latlngObj['address'] = res.address;
- var latLng_1 = {
- lat: "0",
- long: "0"
- };
+ // } else {
+ // latlngObj['address'] = res.address;
+ // var latLng_1 = {
+ // lat: "0",
+ // long: "0"
+ // };
- latLng_1 = {
- lat: latlngObj.latDecimal ? latlngObj.latDecimal : 0,
- long: latlngObj.longDecimal ? latlngObj.longDecimal : 0
- }
+ // latLng_1 = {
+ // lat: latlngObj.latDecimal ? latlngObj.latDecimal : 0,
+ // long: latlngObj.longDecimal ? latlngObj.longDecimal : 0
+ // }
- outerThis.contactService.getAddressByApi(latLng_1).subscribe(res => {
- if (res.message == "Address not found in databse") {
- var cdata = {
- iden: 'noaddress',
- latlng: latLng_1
- }
+ // outerThis.contactService.getAddressByApi(latLng_1).subscribe(res => {
+ // if (res.message == "Address not found in databse") {
+ // var cdata = {
+ // iden: 'noaddress',
+ // latlng: latLng_1
+ // }
- latlngObj['address'] = cdata;
- cb(null, latlngObj);
+ // latlngObj['address'] = cdata;
+ // cb(null, latlngObj);
- } else {
- latlngObj['address'] = res.address;
- cb(null, latlngObj);
- }
+ // } else {
+ // latlngObj['address'] = res.address;
+ // cb(null, latlngObj);
+ // }
- })
+ // })
- // cb(null,latlngObj);
- }
- })
+ // // cb(null,latlngObj);
+ // }
+ // })
}
diff --git a/src/app/report/report-filter/report-filter.component.html b/src/app/report/report-filter/report-filter.component.html
index 869f645..0178641 100644
--- a/src/app/report/report-filter/report-filter.component.html
+++ b/src/app/report/report-filter/report-filter.component.html
@@ -1086,7 +1086,7 @@
{{ "Search By" | translate }} :
-
+
-
+
{{ "Vahicle Name" | translate }}
diff --git a/src/app/report/report-filter/report-filter.component.ts b/src/app/report/report-filter/report-filter.component.ts
index b82db88..04053fb 100644
--- a/src/app/report/report-filter/report-filter.component.ts
+++ b/src/app/report/report-filter/report-filter.component.ts
@@ -134,6 +134,7 @@ export class ReportFilterComponent implements OnInit {
// {name : "User Trip Report",Rstatus : true,Astatus:false,value:"user_trip_report"},
// {name : "Alert Report",Rstatus : true,Astatus:false,value:"alert_report"} ,
];
+ @Input() hideIEMI= false;
reportPrefrecne:any
componentArray=['AC_report','daily_report','ss','dayWiseReport','distance_report','Driver_performance','geofence_report',
'idle_report','ignition_report','loadunloadTrip','notification_master','over_speed','poi_report','route_violation_report','speed_variation','summary_report','stoppage_report','device_sos_report',
diff --git a/src/index.html b/src/index.html
index eded6a3..2a07fd6 100644
--- a/src/index.html
+++ b/src/index.html
@@ -287,7 +287,7 @@
-
+
| |