New index report and some UI issue
This commit is contained in:
parent
5dc54bfdb1
commit
55d79d1294
21 changed files with 908 additions and 142 deletions
|
|
@ -116,6 +116,7 @@
|
||||||
(click)="modelMaster('admin')">{{'Model Master' | translate}}</a> -->
|
(click)="modelMaster('admin')">{{'Model Master' | translate}}</a> -->
|
||||||
<a *ngIf="superAdmin" class="dropdown-item" style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;" (click)="subAdmin('admin')">{{'Subadmin' | translate}}</a>
|
<a *ngIf="superAdmin" class="dropdown-item" style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;" (click)="subAdmin('admin')">{{'Subadmin' | translate}}</a>
|
||||||
<a class="dropdown-item" style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;" *ngIf="superAdmin" (click)="gpsMaster('admin')">{{'System Logs' | translate}}</a>
|
<a class="dropdown-item" style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;" *ngIf="superAdmin" (click)="gpsMaster('admin')">{{'System Logs' | translate}}</a>
|
||||||
|
<a class="dropdown-item" style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;" *ngIf="superAdmin" (click)="indexReport('admin')">{{'Index Report' | translate}}</a>
|
||||||
<!-- <a class="dropdown-item"
|
<!-- <a class="dropdown-item"
|
||||||
style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;"
|
style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;"
|
||||||
*ngIf="superAdmin" (click)="RTOMaster('admin')">{{'RTO Master' | translate}}</a> -->
|
*ngIf="superAdmin" (click)="RTOMaster('admin')">{{'RTO Master' | translate}}</a> -->
|
||||||
|
|
|
||||||
|
|
@ -571,6 +571,11 @@ gpsMaster(id){
|
||||||
this.menuFlag = this.contactService.menuReturnSet(id);
|
this.menuFlag = this.contactService.menuReturnSet(id);
|
||||||
this.router.navigateByUrl("gpsMaster");
|
this.router.navigateByUrl("gpsMaster");
|
||||||
|
|
||||||
|
}
|
||||||
|
indexReport(id){
|
||||||
|
this.menuFlag = this.contactService.menuReturnSet(id);
|
||||||
|
this.router.navigateByUrl("indexingReport");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
technician(id){
|
technician(id){
|
||||||
|
|
|
||||||
|
|
@ -280,6 +280,7 @@ import { NewEditDeviceComponent } from './dashboard/new-edit-device/new-edit-dev
|
||||||
import { DownloadCertificateComponent } from './dashboard/download-certificate/download-certificate.component';
|
import { DownloadCertificateComponent } from './dashboard/download-certificate/download-certificate.component';
|
||||||
import { DeviceSettingComponent } from './device-setting/device-setting.component';
|
import { DeviceSettingComponent } from './device-setting/device-setting.component';
|
||||||
import { UserSettingComponent } from './user-setting/user-setting.component';
|
import { UserSettingComponent } from './user-setting/user-setting.component';
|
||||||
|
import { IndexingReportComponent } from './indexingReport/index-report.component';
|
||||||
// import { DisatanceReportComponent } from './report/disatance-report/disatance-report.component';
|
// import { DisatanceReportComponent } from './report/disatance-report/disatance-report.component';
|
||||||
// import { MainComponent } from './report/main/main.component';
|
// import { MainComponent } from './report/main/main.component';
|
||||||
// import { AcReportsComponent } from './report/ac-report/ac-report.component';
|
// import { AcReportsComponent } from './report/ac-report/ac-report.component';
|
||||||
|
|
@ -419,6 +420,7 @@ export function createTranslateLoader(http: Http) {
|
||||||
UserMasterComponent,
|
UserMasterComponent,
|
||||||
DeviceComponent,
|
DeviceComponent,
|
||||||
GpsMasterComponent,
|
GpsMasterComponent,
|
||||||
|
IndexingReportComponent,
|
||||||
CmdPacketMasterComponent,
|
CmdPacketMasterComponent,
|
||||||
EditDeviceMasterComponent,
|
EditDeviceMasterComponent,
|
||||||
GpsEditMasterComponent,
|
GpsEditMasterComponent,
|
||||||
|
|
@ -541,6 +543,7 @@ export function createTranslateLoader(http: Http) {
|
||||||
DownloadCertificateComponent,
|
DownloadCertificateComponent,
|
||||||
DeviceSettingComponent,
|
DeviceSettingComponent,
|
||||||
UserSettingComponent,
|
UserSettingComponent,
|
||||||
|
IndexingReportComponent,
|
||||||
// LiveTrackingComponent,
|
// LiveTrackingComponent,
|
||||||
// MainComponent,
|
// MainComponent,
|
||||||
// DisatanceReportComponent,
|
// DisatanceReportComponent,
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,7 @@ import { NewEditDeviceComponent } from './dashboard/new-edit-device/new-edit-dev
|
||||||
import { DeviceSettingComponent } from './device-setting/device-setting.component';
|
import { DeviceSettingComponent } from './device-setting/device-setting.component';
|
||||||
import { UserSettingComponent } from './user-setting/user-setting.component';
|
import { UserSettingComponent } from './user-setting/user-setting.component';
|
||||||
import { CurrentPositionReportComponent } from './report/report component/current-position/current-position.component';
|
import { CurrentPositionReportComponent } from './report/report component/current-position/current-position.component';
|
||||||
|
import { IndexingReportComponent } from './indexingReport/index-report.component';
|
||||||
// import { DeviceFuelReportComponent } from './device-report/device-fuel-report/device-fuel-report.component';
|
// import { DeviceFuelReportComponent } from './device-report/device-fuel-report/device-fuel-report.component';
|
||||||
// import { DeviceSOSreportComponent } from './device-report/device-sosreport/device-sosreport.component';
|
// import { DeviceSOSreportComponent } from './device-report/device-sosreport/device-sosreport.component';
|
||||||
// import { TripByDeviceComponent } from './device-report/trip-by-device/trip-by-device.component';
|
// import { TripByDeviceComponent } from './device-report/trip-by-device/trip-by-device.component';
|
||||||
|
|
@ -357,6 +358,7 @@ export const router: Routes =[
|
||||||
{path: 'userLogs',component:UserMasterComponent},
|
{path: 'userLogs',component:UserMasterComponent},
|
||||||
{path: 'deviceMaster',component:DeviceComponent},
|
{path: 'deviceMaster',component:DeviceComponent},
|
||||||
{path: 'gpsMaster',component:GpsMasterComponent},
|
{path: 'gpsMaster',component:GpsMasterComponent},
|
||||||
|
{path: 'indexingReport',component:IndexingReportComponent},
|
||||||
{path: 'cmdMaster',component:CmdPacketMasterComponent},
|
{path: 'cmdMaster',component:CmdPacketMasterComponent},
|
||||||
{path : 'deviceEntry', component : DeviceEntryComponent},
|
{path : 'deviceEntry', component : DeviceEntryComponent},
|
||||||
{path : 'Inventorylist', component : InventoryListComponent},
|
{path : 'Inventorylist', component : InventoryListComponent},
|
||||||
|
|
|
||||||
|
|
@ -438,9 +438,11 @@
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="inputZip">Tracking Expiry</label>
|
<label for="inputZip">Tracking Expiry</label>
|
||||||
<input
|
<input
|
||||||
|
disabled
|
||||||
formControlName="trackingExp"
|
formControlName="trackingExp"
|
||||||
bsDatepicker
|
bsDatepicker
|
||||||
[bsConfig]="bsConfig"
|
[bsConfig]="bsConfig"
|
||||||
|
[isDisabled]="true"
|
||||||
type="text"
|
type="text"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
id="inputZip"
|
id="inputZip"
|
||||||
|
|
@ -452,6 +454,7 @@
|
||||||
<input
|
<input
|
||||||
formControlName="eSimExpiry"
|
formControlName="eSimExpiry"
|
||||||
bsDatepicker
|
bsDatepicker
|
||||||
|
[attr.disabled]="true"
|
||||||
[bsConfig]="bsConfig"
|
[bsConfig]="bsConfig"
|
||||||
type="text"
|
type="text"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { FlashMessagesService } from 'angular2-flash-messages';
|
||||||
import { BsDatepickerConfig, BsModalRef, BsModalService } from 'ngx-bootstrap';
|
import { BsDatepickerConfig, BsModalRef, BsModalService } from 'ngx-bootstrap';
|
||||||
import { ContactService } from '../../contact.service';
|
import { ContactService } from '../../contact.service';
|
||||||
import {Location} from '@angular/common';
|
import {Location} from '@angular/common';
|
||||||
import { T } from '../../../../node_modules3/@types/lodash/fp';
|
|
||||||
declare var $:any;
|
declare var $:any;
|
||||||
declare var swal: any;
|
declare var swal: any;
|
||||||
@Component({
|
@Component({
|
||||||
|
|
@ -316,7 +315,14 @@ export class AddNewDeviceComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!this.deviceImg[0]) {
|
||||||
|
swal(
|
||||||
|
'Upload Error',
|
||||||
|
'Please Upload device image !!!',
|
||||||
|
'error'
|
||||||
|
)
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(this.userFound){
|
if(this.userFound){
|
||||||
var data1={
|
var data1={
|
||||||
contactid:this.user._id
|
contactid:this.user._id
|
||||||
|
|
@ -330,9 +336,6 @@ export class AddNewDeviceComponent implements OnInit {
|
||||||
if(res.message=="Saved"){
|
if(res.message=="Saved"){
|
||||||
|
|
||||||
this.addDevice(this.user)
|
this.addDevice(this.user)
|
||||||
|
|
||||||
// this.addDevice(res._id)
|
|
||||||
// this.router.navigateByUrl('/dashboard');
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<app-all-menus></app-all-menus>
|
<app-all-menus></app-all-menus>
|
||||||
|
|
||||||
<div class="limiter">
|
<div class="limiter">
|
||||||
<app-all-menus></app-all-menus>
|
<app-all-menus></app-all-menus>
|
||||||
<div id="toast">
|
<div id="toast">
|
||||||
|
|
|
||||||
|
|
@ -1694,7 +1694,13 @@ testTable() {
|
||||||
"data":null,
|
"data":null,
|
||||||
"defaultContent": "",
|
"defaultContent": "",
|
||||||
"render":function(data,type,row){
|
"render":function(data,type,row){
|
||||||
return '<i id="edit" title="Edit Vehicle" style="font-size:20px;color: green" class="fas fa-edit"></i>'
|
if(row.kycStatus && row.kycStatus=="Approved") {
|
||||||
|
return '<i title="Unable to edit" style="font-size:20px;color:gray;cursor: not-allowed;" class="fas fa-edit"></i>'
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
return '<i id="edit" title="Edit Vehicle" style="font-size:20px;color: green" class="fas fa-edit"></i>'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} ,
|
} ,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -20,12 +20,12 @@
|
||||||
<td class="to-head" style="width: 25%;padding: 20px;">
|
<td class="to-head" style="width: 25%;padding: 20px;">
|
||||||
To <br />
|
To <br />
|
||||||
Regional Transport Authority<br />
|
Regional Transport Authority<br />
|
||||||
Kolkata<br />
|
{{data.deviceInfo && data.deviceInfo.transportOfficeCity?data.deviceInfo.transportOfficeCity:''}}<br />
|
||||||
West Bengal Only<br />
|
{{data.deviceInfo && data.deviceInfo.transportOfficeState?data.deviceInfo.transportOfficeState:''}} Only<br />
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 50%;" >
|
<td style="width: 50%;" >
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<div class="fitment-heading">
|
<div class="fitment-heading">
|
||||||
FITMENT CERTIFICATE
|
FITMENT CERTIFICATE
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
<tbody style="font-size: 10px;">
|
<tbody style="font-size: 10px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td>VEHICLE REG.NO</td>
|
<td>VEHICLE REG.NO</td>
|
||||||
<td>{{ devName ? devName : "" }}</td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>VEHICLE REG.DATE</td>
|
<td>VEHICLE REG.DATE</td>
|
||||||
|
|
@ -127,16 +127,13 @@
|
||||||
<tbody style="font-size: 10px;">
|
<tbody style="font-size: 10px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td>VTS SR.NO/UINO</td>
|
<td>VTS SR.NO/UINO</td>
|
||||||
<td>{{ ICCICD ? ICCICD : "" }}</td>
|
<td>{{ vahanID ? vahanID : "" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>VTS MODEL TRACK</td>
|
<td>VTS MODEL</td>
|
||||||
<td>{{ devicetype ? devicetype : "" }}</td>
|
<td>{{ devicetype ? devicetype : "" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Test Report NO.</td>
|
|
||||||
<td>-</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>TAC NO.</td>
|
<td>TAC NO.</td>
|
||||||
<td>CK8077</td>
|
<td>CK8077</td>
|
||||||
|
|
@ -190,24 +187,27 @@
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
|
|
||||||
|
|
||||||
<tbody style="font-size: 10px;">
|
<tbody style="font-size: 10px;" *ngIf="deviceImage[0] || deviceImage[1] || deviceImage[2]">
|
||||||
<tr class="text-center">
|
<tr class="text-center" >
|
||||||
<td>
|
<td style="font-weight: 700;">
|
||||||
<img
|
<img
|
||||||
|
*ngIf="deviceImage[0]"
|
||||||
src="{{ deviceImage[0] ? deviceImage[0] : img1 }}"
|
src="{{ deviceImage[0] ? deviceImage[0] : img1 }}"
|
||||||
width="80px"
|
width="80px"
|
||||||
height="80px"
|
height="80px"
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style="font-weight: 700;">
|
||||||
<img
|
<img
|
||||||
|
*ngIf="deviceImage[1]"
|
||||||
src="{{ deviceImage[1] ? deviceImage[1] : img1 }}"
|
src="{{ deviceImage[1] ? deviceImage[1] : img1 }}"
|
||||||
width="80px"
|
width="80px"
|
||||||
height="80px"
|
height="80px"
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style="font-weight: 700;">
|
||||||
<img
|
<img
|
||||||
|
*ngIf="deviceImage[2]"
|
||||||
src="{{ deviceImage[2] ? deviceImage[2] : img1 }}"
|
src="{{ deviceImage[2] ? deviceImage[2] : img1 }}"
|
||||||
width="80px"
|
width="80px"
|
||||||
height="80px"
|
height="80px"
|
||||||
|
|
@ -226,34 +226,38 @@
|
||||||
</div>
|
</div>
|
||||||
<h5 class="text-center heading-h3 pl-3">PRODUCT SATISFACTION REPORT</h5>
|
<h5 class="text-center heading-h3 pl-3">PRODUCT SATISFACTION REPORT</h5>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<p style="font-size: 10px;">This is to acknowledge confirm that we have got our vehicle bearing registration no <strong>{{vahanID}}</strong> VTS Device manufactured by <strong>NIPPON AUDIOTRONIX</strong> bearing Sr.No
|
<p style="font-size: 10px;">This is to acknowledge confirm that we have got our vehicle bearing chassis no <strong>{{ChassisNo}}</strong> VTS Device manufactured by <strong>NIPPON AUDIOTRONIX</strong> bearing Sr.No
|
||||||
<strong>{{engineNo}}</strong> We have checked the performance ot the vehicle after fitment of the said VTS device the unit is sealed and functioning as per normslaid out in AIS 140.We
|
<strong>{{vahanID}}</strong> We have checked the performance ot the vehicle after fitment of the said VTS device the unit is sealed and functioning as per normslaid out in AIS 140.We
|
||||||
have satisfied with the performance of the unit in all respects.We undertake not to reseany dispute or any legal claims against <strong>NIPPON AUDIOTRONIX</strong> in the event that the
|
have satisfied with the performance of the unit in all respects.We undertake not to reseany dispute or any legal claims against <strong>NIPPON AUDIOTRONIX</strong> in the event that the
|
||||||
above mentioned seals atfound broken/tampered.</p>
|
above mentioned seals atfound broken/tampered.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
|
||||||
<table class="table table-bordered fix-width-20">
|
<div class="col-12 ">
|
||||||
|
|
||||||
|
<table class="table table-bordered">
|
||||||
|
|
||||||
|
|
||||||
<tbody style="font-size: 10px;">
|
<tbody style="font-size: 10px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td rowspan="3" style="width: 110px;"><div id="stamp-section">
|
||||||
|
|
||||||
|
</div></td>
|
||||||
|
<td style="width: 100px;">
|
||||||
<strong>Dealer Name:</strong>
|
<strong>Dealer Name:</strong>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style="width: 100px;">
|
||||||
{{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.first_name ? data.deviceInfo.Dealer.first_name : "" }}
|
{{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.first_name ? data.deviceInfo.Dealer.first_name : "" }}
|
||||||
{{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.last_name ? data.deviceInfo.Dealer.last_name : "" }}
|
{{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.last_name ? data.deviceInfo.Dealer.last_name : "" }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style="width: 100px;">
|
||||||
<strong>Dealer Contact no:</strong>
|
<strong>Dealer Contact no:</strong>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style="width: 80px;">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<strong>Dealer Addresse:</strong>
|
<strong>Dealer Addresse:</strong>
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.address ? data.deviceInfo.Dealer.address : "" }}
|
{{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.address ? data.deviceInfo.Dealer.address : "" }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -273,8 +277,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<strong>Customer Addresse:</strong>
|
<strong>Customer Addresse:</strong>
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ user.address ? user.address : "" }}
|
{{ user.address ? user.address : "" }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -289,18 +292,17 @@
|
||||||
<strong>Dealer Sign:</strong>
|
<strong>Dealer Sign:</strong>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
..............................
|
..............
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<strong>RTA/MVI/STA:</strong>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
<strong>RTA/MVI/STA: </strong>
|
||||||
|
|
||||||
...............................
|
...............................
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,17 @@
|
||||||
width: 3000px !important;
|
width: 3000px !important;
|
||||||
height: 3000px !important;
|
height: 3000px !important;
|
||||||
}
|
}
|
||||||
|
#testPdf .table{
|
||||||
|
margin-bottom: 0.25rem;
|
||||||
|
}
|
||||||
|
#stamp-section{
|
||||||
|
background: url('/assets/images/liveTrackIcons/Stamp.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
height: 110px;
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
width: 110px;
|
||||||
|
}
|
||||||
.t-mp-heading {
|
.t-mp-heading {
|
||||||
font-size: 16px;font-weight: 700;
|
font-size: 16px;font-weight: 700;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,7 @@ export class DownloadCertificateComponent implements OnInit {
|
||||||
if (this.supAdmin.imageDoc && this.supAdmin.imageDoc.length > 0) {
|
if (this.supAdmin.imageDoc && this.supAdmin.imageDoc.length > 0) {
|
||||||
this.supAdmin.imageDoc = 'https://www.oneqlik.in' + this.supAdmin.imageDoc[0].substring(6)
|
this.supAdmin.imageDoc = 'https://www.oneqlik.in' + this.supAdmin.imageDoc[0].substring(6)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(this.deviceImage);
|
console.log(this.deviceImage);
|
||||||
this.installationDate = this.data.deviceInfo.created_on
|
this.installationDate = this.data.deviceInfo.created_on
|
||||||
this.todayODO = this.data.deviceInfo.today_odo;
|
this.todayODO = this.data.deviceInfo.today_odo;
|
||||||
|
|
@ -165,10 +166,16 @@ export class DownloadCertificateComponent implements OnInit {
|
||||||
this.gsmModule = 'Quectel M66'
|
this.gsmModule = 'Quectel M66'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let replaceURL = 'http://nipponsecura.in'
|
||||||
|
let currentWebURl = window.location.hostname;
|
||||||
|
if(currentWebURl.includes('www.oneqlik.in')) {
|
||||||
|
replaceURL = 'https://www.oneqlik.in'
|
||||||
|
}
|
||||||
for (var i = 0; i < this.deviceImage.length; i++) {
|
for (var i = 0; i < this.deviceImage.length; i++) {
|
||||||
console.log("DEVUCE IMAGE=>", this.deviceImage[i]);
|
console.log("DEVUCE IMAGE=>", this.deviceImage[i]);
|
||||||
|
if(this.deviceImage[i] && !this.deviceImage[i].includes(replaceURL)) {
|
||||||
this.deviceImage[i] = this.deviceImage[i] && this.deviceImage[i] != "" ? 'http://nipponsecura.in' + this.deviceImage[i].substring(6) : ''
|
this.deviceImage[i] = this.deviceImage[i] && this.deviceImage[i] != "" ? replaceURL + this.deviceImage[i].substring(6) : ''
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -310,6 +317,9 @@ export class DownloadCertificateComponent implements OnInit {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
removeItemForm() {
|
||||||
|
this.deviceImage.splice(this.deviceImage.length -1,1);
|
||||||
}
|
}
|
||||||
closePopup() {
|
closePopup() {
|
||||||
this.dialogRef.close(1);
|
this.dialogRef.close(1);
|
||||||
|
|
@ -394,7 +404,6 @@ export class DownloadCertificateComponent implements OnInit {
|
||||||
overflow: "linebreak"
|
overflow: "linebreak"
|
||||||
},
|
},
|
||||||
willDrawCell: data => {
|
willDrawCell: data => {
|
||||||
console.log('manojpatidar',data);
|
|
||||||
if (data.row.index === 0) {
|
if (data.row.index === 0) {
|
||||||
data.row.height = 40;
|
data.row.height = 40;
|
||||||
doc.setFontStyle('bold');
|
doc.setFontStyle('bold');
|
||||||
|
|
|
||||||
44
src/app/indexingReport/index-report.component.html
Normal file
44
src/app/indexingReport/index-report.component.html
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
<app-all-menus></app-all-menus>
|
||||||
|
<div class="topDiv">
|
||||||
|
<div id="toast">
|
||||||
|
<div id="desc">{{data_descip}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="text-align: center; background: #426E86; padding-top: 10px; padding-bottom: 10px; color: white;box-shadow:3px 1px 5px 0px rgb(178, 176, 174)">
|
||||||
|
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||||
|
<h4>{{'Index Report' | translate}}</h4>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row rowStyle">
|
||||||
|
<div class="col-sm-3 col-md-3 col-lg-3" style="padding-left: 20px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px;">
|
||||||
|
<div class="row" style="margin:0px;height: 84vh;background: white;box-shadow: 3px 1px 5px 0px #b2b0ae;">
|
||||||
|
<div class="col-sm-12 col-md-12 col-lg-12" style="padding:0px">
|
||||||
|
<app-report-filter (onReportFIlter)= "getReport($event)" [hideIEMI]="true" [componentIdentifier]="identifier"></app-report-filter>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-9 col-md-9 col-lg-9" style="padding-left: 5px; padding-right: 20px; padding-top: 5px;">
|
||||||
|
<flash-messages style="float: center;margin:0px 1px;height:-6px;position: absolute;"></flash-messages>
|
||||||
|
<div class="row" style="margin:0px;height: 84vh;padding-top:10px;padding-bottom:5px;background: white;box-shadow: 3px 1px 5px 0px #b2b0ae;">
|
||||||
|
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||||
|
<div *ngIf="Load" class="loading">Loading…</div>
|
||||||
|
<div style="width: 100%;height:84vh; overflow: scroll;">
|
||||||
|
<table id="gpsTable1" cellspacing="0" style="width: 100%;font-size: 14px;">
|
||||||
|
<thead style="background-color:#e0e0e0;color: #444444;">
|
||||||
|
<tr>
|
||||||
|
<th *ngFor="let col of displayCol; index as i" style="text-align:center;padding-left: 5px;padding-right: 5px;">{{col | translate}}</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr *ngFor="let item of reportData; index as j">
|
||||||
|
<td *ngFor="let col of displayCol; index as i" style="text-align:center;">{{item[col]}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
86
src/app/indexingReport/index-report.component.scss
Normal file
86
src/app/indexingReport/index-report.component.scss
Normal file
|
|
@ -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;
|
||||||
|
}
|
||||||
24
src/app/indexingReport/index-report.component.spec.ts
Normal file
24
src/app/indexingReport/index-report.component.spec.ts
Normal file
|
|
@ -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<IndexingReportComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ IndexingReportComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(IndexingReportComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
520
src/app/indexingReport/index-report.component.ts
Normal file
520
src/app/indexingReport/index-report.component.ts
Normal file
|
|
@ -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 '<i id="delete" class="fas fa-trash" style="cursor:pointer;color:red", title="Delete log"></i>'
|
||||||
|
// }}
|
||||||
|
// ],
|
||||||
|
// "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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -21,12 +21,12 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let item of imageDoc">
|
<tr *ngFor="let item of imageDoc">
|
||||||
<td *ngIf="hasPdfFile(item.image); else pdfSection">
|
<td *ngIf="hasPdfFile(item.image); else pdfSection6">
|
||||||
<a target="_blank" [href]="'https://www.oneqlik.in'+item.image.substring(6)">
|
<a target="_blank" [href]="'https://www.oneqlik.in'+item.image.substring(6)">
|
||||||
<i class="fas fa-file-pdf fa-3x pl-4"></i>
|
<i class="fas fa-file-pdf fa-3x pl-4"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<ng-template #pdfSection>
|
<ng-template #pdfSection6>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<img *ngIf="item.image ; else notAvaillableImg" style="width: 100px;" [src]="'https://www.oneqlik.in'+item.image.substring(6)" (click)="openModal(template,item)">
|
<img *ngIf="item.image ; else notAvaillableImg" style="width: 100px;" [src]="'https://www.oneqlik.in'+item.image.substring(6)" (click)="openModal(template,item)">
|
||||||
|
|
@ -92,21 +92,51 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>State RTO Certificate</td>
|
<td>State RTO Certificate</td>
|
||||||
<td>
|
|
||||||
<img style="width: 100px;" [src]="'https://www.oneqlik.in'+statePic.substring(6)"
|
|
||||||
|
|
||||||
|
<td *ngIf="hasPdfFile(statePic); else pdfSection7">
|
||||||
|
<a target="_blank" [href]="'https://www.oneqlik.in'+statePic.substring(6)">
|
||||||
|
<i class="fas fa-file-pdf fa-2x pl-4"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<ng-template #pdfSection7>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<img *ngIf="statePic ; else notAvaillableImg" style="width: 100px;" [src]="'https://www.oneqlik.in'+statePic.substring(6)"
|
||||||
(click)="openModal1(template,statePic.substring(6))">
|
(click)="openModal1(template,statePic.substring(6))">
|
||||||
|
<ng-template #notAvaillableImg>Not Available</ng-template>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
</ng-template>
|
||||||
|
|
||||||
|
<td>
|
||||||
{{state_certifcate_date |date:"medium"}}
|
{{state_certifcate_date |date:"medium"}}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Vahan Certificate</td>
|
<td>Vahan Certificate</td>
|
||||||
<td>
|
|
||||||
<img style="width: 100px;" [src]="'https://www.oneqlik.in'+vahanPic.substring(6)"
|
|
||||||
|
|
||||||
|
|
||||||
|
<td *ngIf="hasPdfFile(vahanPic); else pdfSection8">
|
||||||
|
<a target="_blank" [href]="'https://www.oneqlik.in'+vahanPic.substring(6)">
|
||||||
|
<i class="fas fa-file-pdf fa-2x pl-4"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<ng-template #pdfSection8>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<img *ngIf="vahanPic ; else notAvaillableImg" style="width: 100px;" [src]="'https://www.oneqlik.in'+vahanPic.substring(6)"
|
||||||
(click)="openModal1(template,vahanPic.substring(6))">
|
(click)="openModal1(template,vahanPic.substring(6))">
|
||||||
</td>
|
|
||||||
|
<ng-template #notAvaillableImg>Not Available</ng-template>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{vaahan_certifcate_date |date:"medium"}}
|
{{vaahan_certifcate_date |date:"medium"}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -127,18 +157,18 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>State RTO Certificate</td>
|
<td>State RTO Certificate </td>
|
||||||
|
|
||||||
|
|
||||||
<td *ngIf="hasPdfFile(statePic); else pdfSection">
|
<td *ngIf="hasPdfFile(statePic); else pdfSection1">
|
||||||
<a target="_blank" [href]="'https://www.oneqlik.in'+statePic.substring(6)">
|
<a target="_blank" [href]="'https://www.oneqlik.in'+statePic.substring(6)">
|
||||||
<i class="fas fa-file-pdf fa-2x pl-4"></i>
|
<i class="fas fa-file-pdf fa-2x"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<ng-template #pdfSection>
|
<ng-template #pdfSection1>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<img *ngIf="statePic ; else notAvaillableImg" style="width: 100px;" [src]="'https://www.oneqlik.in'+statePic.substring(6)" (click)="openModal1(template,statePic.substring(6))">
|
<img *ngIf="statePic ; else notAvaillableImg" style="width: 40px;height: 35px;" [src]="'https://www.oneqlik.in'+statePic.substring(6)" (click)="openModal1(template,statePic.substring(6))">
|
||||||
<ng-template #notAvaillableImg>Not Available</ng-template>
|
<ng-template #notAvaillableImg>Not Available</ng-template>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -147,24 +177,33 @@
|
||||||
<td>
|
<td>
|
||||||
{{state_certifcate_date |date:"medium"}}
|
{{state_certifcate_date |date:"medium"}}
|
||||||
</td>
|
</td>
|
||||||
|
<td *ngIf="hasPdfFile(statePic); else pdfSection2">
|
||||||
|
<a target="_blank" [href]="'https://www.oneqlik.in'+statePic.substring(6)">
|
||||||
|
<i class="fas fa-download"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<ng-template #pdfSection2>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<a (click)="downloadImage('https://www.oneqlik.in'+statePic.substring(6),'State_RTO_Certificate.jpg')" ><i class="fas fa-download"></i></a>
|
||||||
|
</td>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a (click)="downloadImage('https://www.oneqlik.in'+statePic.substring(6),'State_RTO_Certificate.jpg')" class="btn btn-primary btn-sm"><i class="fas fa-download"></i></a>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Vahan Certificate</td>
|
<td>Vahan Certificate</td>
|
||||||
|
|
||||||
|
|
||||||
<td *ngIf="hasPdfFile(vahanPic); else pdfSection">
|
<td *ngIf="hasPdfFile(vahanPic); else pdfSection3">
|
||||||
<a target="_blank" [href]="'https://www.oneqlik.in'+vahanPic.substring(6)">
|
<a target="_blank" [href]="'https://www.oneqlik.in'+vahanPic.substring(6)">
|
||||||
<i class="fas fa-file-pdf fa-2x pl-4"></i>
|
<i class="fas fa-file-pdf fa-2x "></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<ng-template #pdfSection>
|
<ng-template #pdfSection3>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<img *ngIf="vahanPic ; else notAvaillableImg" style="width: 100px;" [src]="'https://www.oneqlik.in'+vahanPic.substring(6)" (click)="openModal1(template,vahanPic.substring(6))">
|
<img *ngIf="vahanPic ; else notAvaillableImg" style="width: 40px;height: 35px;" [src]="'https://www.oneqlik.in'+vahanPic.substring(6)" (click)="openModal1(template,vahanPic.substring(6))">
|
||||||
<ng-template #notAvaillableImg>Not Available</ng-template>
|
<ng-template #notAvaillableImg>Not Available</ng-template>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -173,9 +212,18 @@
|
||||||
<td>
|
<td>
|
||||||
{{vaahan_certifcate_date |date:"medium"}}
|
{{vaahan_certifcate_date |date:"medium"}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<a (click)="downloadImage('https://www.oneqlik.in'+vahanPic.substring(6),'Vahan_Certificate.jpg')" class="btn btn-primary btn-sm" ><i class="fas fa-download"></i></a>
|
<td *ngIf="hasPdfFile(vahanPic); else pdfSection4">
|
||||||
</td>
|
<a target="_blank" [href]="'https://www.oneqlik.in'+vahanPic.substring(6)">
|
||||||
|
<i class="fas fa-download"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<ng-template #pdfSection4>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<a (click)="downloadImage('https://www.oneqlik.in'+vahanPic.substring(6),'Vahan_Certificate.jpg')" ><i class="fas fa-download"></i></a>
|
||||||
|
</td>
|
||||||
|
</ng-template>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -137,12 +137,11 @@ AddDocumentsField(addedRow:any){
|
||||||
console.log(this.imageuploadObject);
|
console.log(this.imageuploadObject);
|
||||||
// console.log("ImageuploadObject=>",this.imageuploadObject);
|
// console.log("ImageuploadObject=>",this.imageuploadObject);
|
||||||
}
|
}
|
||||||
selectedFile: File;
|
selectedFile: any = {};
|
||||||
statePic;
|
statePic;
|
||||||
vahanPic
|
vahanPic
|
||||||
onFileChanged(event1,type) {
|
onFileChanged(event1,type) {
|
||||||
this.selectedFile = <File>event1.target.files[0];
|
this.selectedFile[type] = <File>event1.target.files[0];
|
||||||
console.log(this.selectedFile,type);
|
|
||||||
|
|
||||||
var fileToUpload = event1.target.files.item(0);
|
var fileToUpload = event1.target.files.item(0);
|
||||||
|
|
||||||
|
|
@ -172,15 +171,14 @@ onUpload(imgIndex) {
|
||||||
console.log(imgIndex);
|
console.log(imgIndex);
|
||||||
console.log(this.imageuploadObject);
|
console.log(this.imageuploadObject);
|
||||||
const fd = new FormData();
|
const fd = new FormData();
|
||||||
console.log("selected file name =>",this.selectedFile.name);
|
if( !(this.selectedFile[imgIndex] && this.selectedFile[imgIndex].name)){
|
||||||
if(this.selectedFile.name == " "){
|
|
||||||
swal(
|
swal(
|
||||||
'Upload Error',
|
'Upload Error',
|
||||||
'Please select document type before upload !!!',
|
'Please select document type before upload !!!',
|
||||||
'error'
|
'error'
|
||||||
)
|
)
|
||||||
}else{
|
}else{
|
||||||
fd.append('photo',this.selectedFile,this.selectedFile.name)
|
fd.append('photo',this.selectedFile[imgIndex],this.selectedFile[imgIndex].name)
|
||||||
console.log("imgURL=>",fd) ;
|
console.log("imgURL=>",fd) ;
|
||||||
this.Load = true;
|
this.Load = true;
|
||||||
this.contactService.imageupload(fd)
|
this.contactService.imageupload(fd)
|
||||||
|
|
|
||||||
|
|
@ -432,21 +432,22 @@ export class NewTravelPathReportComponent implements OnInit {
|
||||||
return (sa);
|
return (sa);
|
||||||
}
|
}
|
||||||
clocation_1(latlngObj, cb) {
|
clocation_1(latlngObj, cb) {
|
||||||
if (latlngObj == null) {
|
// if (latlngObj == null) {
|
||||||
cb(null, latlngObj);
|
// cb(null, latlngObj);
|
||||||
}
|
// }
|
||||||
var outerThis = this;
|
cb(null, latlngObj);
|
||||||
var la = '';
|
// var outerThis = this;
|
||||||
|
// var la = '';
|
||||||
|
|
||||||
let latLng = {
|
// let latLng = {
|
||||||
lat: "0",
|
// lat: "0",
|
||||||
long: "0"
|
// long: "0"
|
||||||
};
|
// };
|
||||||
|
|
||||||
latLng = {
|
// latLng = {
|
||||||
lat: latlngObj.latDecimal ? latlngObj.latDecimal : 0,
|
// lat: latlngObj.latDecimal ? latlngObj.latDecimal : 0,
|
||||||
long: latlngObj.longDecimal ? latlngObj.longDecimal : 0
|
// long: latlngObj.longDecimal ? latlngObj.longDecimal : 0
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
// if () {
|
// if () {
|
||||||
|
|
@ -456,79 +457,79 @@ export class NewTravelPathReportComponent implements OnInit {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
outerThis.contactService.getAddressByApi(latLng).subscribe(res => {
|
// outerThis.contactService.getAddressByApi(latLng).subscribe(res => {
|
||||||
if (res.message == "Address not found in databse") {
|
// if (res.message == "Address not found in databse") {
|
||||||
var adata = {
|
// var adata = {
|
||||||
iden: 'noaddress',
|
// iden: 'noaddress',
|
||||||
latlng: latLng
|
// latlng: latLng
|
||||||
}
|
// }
|
||||||
latlngObj['address'] = adata;
|
// latlngObj['address'] = adata;
|
||||||
// cb(null,latlngObj);
|
// // cb(null,latlngObj);
|
||||||
var latLng_1 = {
|
// var latLng_1 = {
|
||||||
lat: "0",
|
// lat: "0",
|
||||||
long: "0"
|
// long: "0"
|
||||||
};
|
// };
|
||||||
|
|
||||||
latLng_1 = {
|
// latLng_1 = {
|
||||||
lat: latlngObj.latDecimal ? latlngObj.latDecimal : 0,
|
// lat: latlngObj.latDecimal ? latlngObj.latDecimal : 0,
|
||||||
long: latlngObj.longDecimal ? latlngObj.longDecimal : 0
|
// long: latlngObj.longDecimal ? latlngObj.longDecimal : 0
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
outerThis.contactService.getAddressByApi(latLng_1).subscribe(res => {
|
// outerThis.contactService.getAddressByApi(latLng_1).subscribe(res => {
|
||||||
if (res.message == "Address not found in databse") {
|
// if (res.message == "Address not found in databse") {
|
||||||
var bdata = {
|
// var bdata = {
|
||||||
iden: 'noaddress',
|
// iden: 'noaddress',
|
||||||
latlng: latLng_1
|
// latlng: latLng_1
|
||||||
}
|
// }
|
||||||
|
|
||||||
latlngObj['address'] = bdata;
|
// latlngObj['address'] = bdata;
|
||||||
cb(null, latlngObj);
|
// cb(null, latlngObj);
|
||||||
|
|
||||||
|
|
||||||
} else {
|
// } else {
|
||||||
latlngObj['address'] = res.address;
|
// latlngObj['address'] = res.address;
|
||||||
cb(null, latlngObj);
|
// cb(null, latlngObj);
|
||||||
}
|
// }
|
||||||
|
|
||||||
})
|
// })
|
||||||
|
|
||||||
} else {
|
// } else {
|
||||||
latlngObj['address'] = res.address;
|
// latlngObj['address'] = res.address;
|
||||||
var latLng_1 = {
|
// var latLng_1 = {
|
||||||
lat: "0",
|
// lat: "0",
|
||||||
long: "0"
|
// long: "0"
|
||||||
};
|
// };
|
||||||
|
|
||||||
latLng_1 = {
|
// latLng_1 = {
|
||||||
lat: latlngObj.latDecimal ? latlngObj.latDecimal : 0,
|
// lat: latlngObj.latDecimal ? latlngObj.latDecimal : 0,
|
||||||
long: latlngObj.longDecimal ? latlngObj.longDecimal : 0
|
// long: latlngObj.longDecimal ? latlngObj.longDecimal : 0
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
outerThis.contactService.getAddressByApi(latLng_1).subscribe(res => {
|
// outerThis.contactService.getAddressByApi(latLng_1).subscribe(res => {
|
||||||
if (res.message == "Address not found in databse") {
|
// if (res.message == "Address not found in databse") {
|
||||||
var cdata = {
|
// var cdata = {
|
||||||
iden: 'noaddress',
|
// iden: 'noaddress',
|
||||||
latlng: latLng_1
|
// latlng: latLng_1
|
||||||
}
|
// }
|
||||||
|
|
||||||
latlngObj['address'] = cdata;
|
// latlngObj['address'] = cdata;
|
||||||
cb(null, latlngObj);
|
// cb(null, latlngObj);
|
||||||
|
|
||||||
|
|
||||||
} else {
|
// } else {
|
||||||
latlngObj['address'] = res.address;
|
// latlngObj['address'] = res.address;
|
||||||
cb(null, latlngObj);
|
// cb(null, latlngObj);
|
||||||
}
|
// }
|
||||||
|
|
||||||
})
|
// })
|
||||||
|
|
||||||
// cb(null,latlngObj);
|
// // cb(null,latlngObj);
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1086,7 +1086,7 @@
|
||||||
<div class="col-5">
|
<div class="col-5">
|
||||||
<p>{{ "Search By" | translate }} :</p>
|
<p>{{ "Search By" | translate }} :</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-7">
|
<div class="col-7" *ngIf="!hideIEMI">
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<md-radio-group
|
<md-radio-group
|
||||||
aria-labelledby="example-radio-group-label"
|
aria-labelledby="example-radio-group-label"
|
||||||
|
|
@ -1123,7 +1123,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" style="margin-top: 20px; margin-bottom: 20px">
|
<div *ngIf="!hideIEMI" class="row" style="margin-top: 20px; margin-bottom: 20px">
|
||||||
<div class="col-3">{{ "Vahicle Name" | translate }}</div>
|
<div class="col-3">{{ "Vahicle Name" | translate }}</div>
|
||||||
<div class="col-9">
|
<div class="col-9">
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ export class ReportFilterComponent implements OnInit {
|
||||||
// {name : "User Trip Report",Rstatus : true,Astatus:false,value:"user_trip_report"},
|
// {name : "User Trip Report",Rstatus : true,Astatus:false,value:"user_trip_report"},
|
||||||
// {name : "Alert Report",Rstatus : true,Astatus:false,value:"alert_report"} ,
|
// {name : "Alert Report",Rstatus : true,Astatus:false,value:"alert_report"} ,
|
||||||
];
|
];
|
||||||
|
@Input() hideIEMI= false;
|
||||||
reportPrefrecne:any
|
reportPrefrecne:any
|
||||||
componentArray=['AC_report','daily_report','ss','dayWiseReport','distance_report','Driver_performance','geofence_report',
|
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',
|
'idle_report','ignition_report','loadunloadTrip','notification_master','over_speed','poi_report','route_violation_report','speed_variation','summary_report','stoppage_report','device_sos_report',
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@
|
||||||
<script src="https://www.gstatic.com/charts/loader.js"></script>
|
<script src="https://www.gstatic.com/charts/loader.js"></script>
|
||||||
<!-- AIzaSyCNT3eO1wPQHUhY_cmQ9N_9BkLzJ_GB9j8 -->
|
<!-- AIzaSyCNT3eO1wPQHUhY_cmQ9N_9BkLzJ_GB9j8 -->
|
||||||
<!-- old key AIzaSyDZKxpYMfGSyStS3fLuVqHuM6ZEJWtF1-k -->
|
<!-- old key AIzaSyDZKxpYMfGSyStS3fLuVqHuM6ZEJWtF1-k -->
|
||||||
<script id= "mapApi" src="https://maps.google.com/maps/api/js?libraries=geometry,places,drawing&key=AIzaSyCYRS0MutZAJa2OztMvaYwBoaMG-fx3zaw"></script>
|
<script id= "mapApi" src="https://maps.google.com/maps/api/js?libraries=geometry,places,drawing&key=AIzaSyAkXHFCJb3wVCZm6qd-fp4WgNVZhet9AsE"></script>
|
||||||
<!-- AIzaSyA_ycttLXPMfCSSNAfPOsaENPQ85i17lPU latest key used on 2 november -->
|
<!-- AIzaSyA_ycttLXPMfCSSNAfPOsaENPQ85i17lPU latest key used on 2 november -->
|
||||||
<!-- AIzaSyCmSXnoBBGekErvqBvu5N7dbeqdH1pHp7c -->
|
<!-- AIzaSyCmSXnoBBGekErvqBvu5N7dbeqdH1pHp7c -->
|
||||||
<!-- AIzaSyDllmSphAf92Mk69v46HFCiClWibYehkiU -->
|
<!-- AIzaSyDllmSphAf92Mk69v46HFCiClWibYehkiU -->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue