multiple bugfixes from 20 Apr 2020 to 7 jan 2023

This commit is contained in:
Pranav 2023-01-07 17:09:46 +00:00
parent 902e04c7e6
commit 63d062c4a7
122 changed files with 13163 additions and 12361 deletions

View file

@ -420,7 +420,8 @@ console.log("2->",newContact2);
last_name: this.last_name,
password: this.passwordd,
org_name: this.org_name,
email: this.emaill,
email: this.emaill == null?'':this.emaill,
phone : this.phone == null?'':this.phone,
expdate : new Date(expDate).toISOString(),
supAdmin:this.sup_admin,
isDealer: false,

View file

@ -1,46 +1,46 @@
// #body{
// overflow-x: hidden;
// overflow-y: hidden;
// }
#myInput {
border-radius: 15px;
/* border: 2px solid #18262F; */
padding: 7px;
width: 116px;
height: 17px;
font-size: 9px;
outline: none;
float: right;
margin-top: 2%;
}
.headStyle {
text-align: center;
font-size: 22px;
font-weight: 500;
color: #6b6a6a;
padding-top: 7px;
margin: 0px;
}
.sidebar {
height: 84vh;
width: 24%;
text-align: left;
background: white;
box-shadow: 3px 1px 5px 0px #b2b0ae;
position: fixed;
padding: 10px;
}
.main {
box-shadow: 3px 1px 5px 0px #b2b0ae;
padding: 10px;
background: white;
// margin-left: 5px;
}
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
// #body{
// overflow-x: hidden;
// overflow-y: hidden;
// }
#myInput {
border-radius: 15px;
/* border: 2px solid #18262F; */
padding: 7px;
width: 116px;
height: 17px;
font-size: 9px;
outline: none;
float: right;
margin-top: 2%;
}
.headStyle {
text-align: center;
font-size: 22px;
font-weight: 500;
color: #6b6a6a;
padding-top: 7px;
margin: 0px;
}
.sidebar {
height: 84vh;
width: 24%;
text-align: left;
background: white;
box-shadow: 3px 1px 5px 0px #b2b0ae;
position: fixed;
padding: 10px;
}
.main {
box-shadow: 3px 1px 5px 0px #b2b0ae;
padding: 10px;
background: white;
// margin-left: 5px;
}
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
}

View file

@ -1,163 +1,3 @@
<!-- <app-all-menus></app-all-menus>
<div class="small">
<button md-button [mdMenuTriggerFor]="menu" style="padding:0%;"><i class="material-icons">list</i></button>
<md-menu #menu="mdMenu">
<a href="#">
<h6>DASHBOARD
<md-icon style="float:right">dashboard</md-icon>
</h6>
</a>
<a href="#">
<h6>RULES<md-icon style="float:right">dock</md-icon>
</h6>
</a>
</md-menu>
</div>
<div style="float:left; width: 100%;padding-top: 6%;">
<p class="headStyle">{{'Customers' | translate}}</p>
<p *ngIf="errorMsg" style="text-align: center">{{serviceResponse}}</p>
<div class="loading" *ngIf="Load">Loading&#8230;</div>
<div id="toast">
<div id="desc">{{data_descip}}</div>
</div>
<div class="row">
<div class="col-sm-4">
<button *ngIf="(dealer_Permission === true) || (superAdmin === true) || adbtn" mdTooltip="{{'Add customer' | translate}}" style="border:1px solid transparent; background-color: transparent;margin-top:8px;cursor:pointer" (click)="openDialog()">
<md-icon style="float: right;width:30px;height:30px;cursor:pointer">add</md-icon>
</button>
<a *ngIf="showNav" href="https://youtu.be/dg1zd2geHXA" style="cursor: pointer;color:black" title="Video tutorial"
target="_blank">
<md-icon class="material-icons" style="font-size: 30px"> theaters </md-icon>
</a>
</div>
<div class="col-sm-8" style="padding-left: 41%;padding-top: 1%;">
<input style="border-radius: 6px;
border: 1px solid #c7c7c7;
border-bottom: 0px;
padding: 12px;
width: 175px;
/* margin-right: 22%; */
height: 7px;
background-color: red;
font-size: 12px;
float: left;
margin-top: 0;
background: #fffcfc;" type="search" class="form-control" id="myInput" name="myInput" [(ngModel)]="myInput"
placeholder="{{'Customer Search' | translate}}" (ngModelChange)="searchFilter($event)" />
<button [disabled]="lastcall" (click)="pre()" style="margin-left: 10px;">
< {{'Previous' | translate}} </button> <button [disabled]="firstcall" (click)="next()"> {{'Next' | translate}} >
</button>
</div>
</div>
<div class="scrollbar" style="overflow:overlay;">
<table id="myTable" class="table table-striped" style="overflow-y: hidden;
overflow-x: hidden;font-size:12px">
<thead style="background-color:#A2C523;color: white;">
<tr>
<th>{{'User ID' | translate}}</th>
<th>{{'Name' | translate}}</th>
<th>{{'Dealer' | translate}}</th>
<th>{{'Email ID' | translate}}</th>
<th>{{'Phone Number' | translate}}</th>
<th>{{'Password' | translate}}</th>
<th>{{'Total Vehicle' | translate}}</th>
<th>{{'Deleted Vehicle' | translate}}</th>
<th>{{'Created On' | translate}}</th>
<th>{{'Expire On' | translate}}</th>
<th>{{'Token' | translate}}</th>
<th>{{'Last activity' | translate}}</th>
<th>{{'Last login' | translate}}</th>
<th>{{'Login type' | translate}}</th>
<th>{{'Documents' | translate}}</th>
<th>{{'Edit' | translate}}</th>
<th *ngIf="((custtype == true)||(superAdmin == true))">{{'Report Setting' | translate}}</th>
<th *ngIf="((custtype == true)||(superAdmin == true))">{{'Dashboard Column' | translate}}</th>
<th>{{'Delete' | translate}}</th>
<th>{{'Customer Status' | translate}}</th>
<th>{{'Customer Info' | translate}}</th>
<th>{{'Reset Password' | translate}}</th>
<th>{{'Add Point' | translate}}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let cust_array of custumer">
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">{{cust_array.user_id?cust_array.user_id:'NA'}}
</td>
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">{{cust_array.first_name}} {{cust_array.last_name}}
</td>
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">{{cust_array.DealerDetails[0].first_name}}
{{cust_array.DealerDetails[0].last_name}}</td>
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">{{cust_array.email}}</td>
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">{{cust_array.phone}}</td>
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">{{cust_array.pass?cust_array.pass:'NA'}}</td>
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">{{cust_array.total_vehicle}}</td>
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">{{cust_array.delDevices}}</td>
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">{{cust_array.created_on |date:'dd/MM/yyyy'}}</td>
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">{{cust_array.expire_date|date:'dd/MM/yyyy'}}</td>
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">
{{cust_array.notificationTokenCount ?cust_array.notificationTokenCount :0}}</td>
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">
{{cust_array.last_activity_on|date:'dd/MM/yyyy, h:mm:ss a'}}</td>
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">
{{cust_array.last_login|date:'dd/MM/yyyy, h:mm:ss a'}}</td>
<td style="cursor:pointer" (click)="vewdev(cust_array._id)">
{{cust_array.login_type?cust_array.login_type:"NA"}}</td>
<td>
<p><button md-tooltip="View/Download"
style="border:1px solid transparent; background-color: transparent;float:right"
(click)="viewDocuments(cust_array)">
<md-icon>library_books</md-icon>
</button></p>
</td>
<td>
<p><button md-tooltip="Edit" style="border:1px solid transparent; background-color: transparent;float:right"
(click)="edit_costumerDetail(cust_array)">
<md-icon>edit</md-icon>
</button></p>
</td>
<td *ngIf="((custtype == true)||(superAdmin == true))">
<p><button md-tooltip="Report Setting"
style="border:1px solid transparent; background-color: transparent;float:right"
(click)="reportSetting(cust_array)">
<md-icon>calendar_today</md-icon>
</button></p>
</td>
<td *ngIf="((custtype == true)||(superAdmin == true))">
<img src="assets/image/customised_table.png" alt="Customise Table Content" height="25" width="25" style="cursor: pointer;" title="Customise Table Content" (click)="custom_table(cust_array)">
</td>
<td>
<p><button md-tooltip="Delete"
style="border:1px solid transparent; background-color: transparent;float:right"
(click)="delete_costumerDetail(cust_array)">
<md-icon>delete</md-icon>
</button></p>
</td>
<td style="padding-top:20px">
<md-slide-toggle [(ngModel)]="cust_array.status" ngDefaultControl (change)="onChange(cust_array,$event)">
</md-slide-toggle>
</td>
<td style="padding-top:18px">
<i class="fas fa-sign-in-alt" style="cursor: pointer;font-size: 22px;" title="Send Login Credentials" (click)="shareUserCredential(cust_array)"></i>
</td>
<td style="padding-top:18px">
<img src="assets/image/reset_password.png" alt="reset_password" height="25" width="25" style="cursor: pointer;" title="Reset password" (click)="resetPassword(cust_array)">
</td>
<td>
<i id="pointShare" style="cursor:pointer;font-size: 20px;margin-top: 12px;" class="fas fa-coins" (click)="addPoints(cust_array)"></i>
</td>
</tr>
</tbody>
</table>
</div>
</div> -->
<div class="limiter">
<app-all-menus></app-all-menus>
@ -269,7 +109,7 @@
</div> -->
<!-- <p style="width:100%;text-align: center;align-items: center;background: #426E86; padding-top: 10px; padding-bottom: 10px; color: white;box-shadow:3px 1px 5px 0px rgb(178, 176, 174)">Dealers</p> -->
<div class="table100 ver1">
<div class="table100-firstcol">
<!-- <div class="table100-firstcol">
<table id='customerTable'>
<thead>
<tr class="row100 head">
@ -283,19 +123,25 @@
</thead>
<tbody>
<tr class="row100 body" *ngFor="let cust_array of custumer">
<td class="cell100 column1" (click)="viewCustomerDetails(cust_array)">
<td class="cell100 column1" (click)="viewCustomerDetails(cust_array)">
{{ cust_array.first_name ? cust_array.first_name : "" }}
{{ cust_array.last_name ? cust_array.last_name : "" }}
</td>
</tr>
</tbody>
</table>
</div>
<div class="wrap-table100-nextcols js-pscroll" style="height: 660px">
</div> -->
<div class="1wrap-table100-nextcols js-pscroll" style="height: 660px">
<div class="table100-nextcols">
<table>
<thead>
<tr class="row100 head">
<th
class="cell100 column2"
style="font-weight: 600; background: #add8e6"
>
{{ "NAME" | translate }}
</th>
<th
class="cell100 column2"
style="font-weight: 600; background: #add8e6"
@ -326,77 +172,6 @@
>
{{ "PASSWORD" | translate }}
</th>
<!-- <th
class="cell100 column7"
style="font-weight: 600; background: #add8e6"
>
{{ "TOTAL VEHICLES" | translate }}
</th>
<th
class="cell100 column8"
style="font-weight: 600; background: #add8e6"
>
{{ "DELETED VEHICLES" | translate }}
</th>
<th
class="cell100 column9"
style="font-weight: 600; background: #add8e6"
>
{{ "CREATED ON" | translate }}
</th>
<th
class="cell100 column10"
style="font-weight: 600; background: #add8e6"
>
{{ "EXPIRES ON" | translate }}
</th>
<th
class="cell100 column11"
style="font-weight: 600; background: #add8e6"
>
{{ "TOKEN" | translate }}
</th>
<th
class="cell100 column12"
style="font-weight: 600; background: #add8e6"
>
{{ "LAST ACTIVITY" | translate }}
</th>
<th
class="cell100 column13"
style="font-weight: 600; background: #add8e6"
>
{{ "LAST LOGIN" | translate }}
</th>
<th
class="cell100 column14"
style="font-weight: 600; background: #add8e6"
>
{{ "LOGIN TYPE" | translate }}
</th>
<th
class="cell100 column12"
style="font-weight: 600; background: #add8e6"
>
{{ "ALLOCATED POINTS" | translate }}
</th>
<th class="cell100 column15" style="
text-align: center;
font-weight: 600;
background: #add8e6;
">
{{ "KYC Status" | translate }}
</th>
<th
class="cell100 column15"
style="
text-align: center;
font-weight: 600;
background: #add8e6;
"
>
{{ "DOCUMENTS" | translate }}
</th> -->
<th
class="cell100 column16"
style="
@ -407,28 +182,6 @@
>
{{ "EDIT" | translate }}
</th>
<!-- <th
class="cell100 column17"
style="
text-align: center;
font-weight: 600;
background: #add8e6;
"
*ngIf="custtype == true || superAdmin == true"
>
{{ "USER SETTINGS" | translate }}
</th>
<th
class="cell100 column18"
style="
text-align: center;
font-weight: 600;
background: #add8e6;
"
*ngIf="custtype == true || superAdmin == true"
>
{{ "DASHBOARD COLUMNS" | translate }}
</th> -->
<th
class="cell100 column19"
style="
@ -439,74 +192,14 @@
>
{{ "DELETE" | translate }}
</th>
<!-- <th
class="cell100 column20"
style="
text-align: center;
font-weight: 600;
background: #add8e6;
"
>
{{ "CUSTOMER STATUS" | translate }}
</th>
<th
class="cell100 column21"
style="
text-align: center;
font-weight: 600;
background: #add8e6;
"
>
{{ "CUSTOMER INFO" | translate }}
</th>
<th
class="cell100 column22"
style="
text-align: center;
font-weight: 600;
background: #add8e6;
"
>
{{ "RESTET PASSWORD" | translate }}
</th>
<th
class="cell100 column23"
style="
text-align: center;
font-weight: 600;
background: #add8e6;
"
>
{{ "SUSPEND ACCOUNT" | translate }}
</th>
<th
class="cell100 column23"
style="
text-align: center;
font-weight: 600;
background: #add8e6;
"
>
{{ "ADMIN ALERT" | translate }}
</th>
<th *ngIf="custtype" class="cell100 column23" style="
text-align: center;
font-weight: 600;
background: #add8e6;
">
{{ "DEALER ALERT" | translate }}
</th>
<th class="cell100 column23" style="
text-align: center;
font-weight: 600;
background: #add8e6;
">
{{ "Pull Data" | translate }}
</th> -->
</tr>
</tr>
</thead>
<tbody>
<tr class="row100 body" *ngFor="let cust_array of custumer">
<td class="cell100 column1" (click)="viewCustomerDetails(cust_array)">
<a style=" cursor: pointer;color: #000000bf;text-decoration: underline;"> <strong> {{ cust_array.first_name ? cust_array.first_name : "" }}
{{ cust_array.last_name ? cust_array.last_name : "" }}</strong> </a>
</td>
<td
class="cell100 column2"
style="cursor: pointer"
@ -551,99 +244,6 @@
>
{{ cust_array.pass ? cust_array.pass : "NA" }}
</td>
<!-- <td
class="cell100 column7"
style="cursor: pointer"
(click)="vewdev(cust_array._id)"
>
{{ cust_array.total_vehicle }}
</td>
<td
class="cell100 column8"
style="cursor: pointer"
(click)="vewdev(cust_array._id)"
>
{{ cust_array.delDevices }}
</td>
<td
class="cell100 column9"
style="cursor: pointer"
(click)="vewdev(cust_array._id)"
>
{{ cust_array.created_on | date: "dd/MM/yyyy" }}
</td>
<td
class="cell100 column10"
style="cursor: pointer"
(click)="vewdev(cust_array._id)"
>
{{ cust_array.expire_date | date: "dd/MM/yyyy" }}
</td>
<td
class="cell100 column11"
style="cursor: pointer"
(click)="vewdev(cust_array._id)"
>
{{
cust_array.notificationTokenCount
? cust_array.notificationTokenCount
: 0
}}
</td>
<td
class="cell100 column12"
style="cursor: pointer"
(click)="vewdev(cust_array._id)"
>
{{
cust_array.last_activity_on
| date: "dd/MM/yyyy, h:mm:ss a"
}}
</td>
<td
class="cell100 column13"
style="cursor: pointer"
(click)="vewdev(cust_array._id)"
>
{{ cust_array.last_login | date: "dd/MM/yyyy, h:mm:ss a" }}
</td>
<td
class="cell100 column14"
style="cursor: pointer"
(click)="vewdev(cust_array._id)"
>
{{ cust_array.login_type ? cust_array.login_type : "NA" }}
</td>
<td
class="cell100 colu mn14"
style="cursor: pointer"
(click)="vewdev(cust_array._id)"
>
{{
cust_array.point_Allocated
? cust_array.point_Allocated
: 0
}}
</td>
<td class="cell100 column15" style="cursor: pointer; text-align: center">
<button class="btn btn-warning btn-sm" style="border-radius: 40px; font-size: x-small; background-color: orange;"
*ngIf="cust_array.kycStatus==undefined">Pending</button>
<button class="btn btn-warning btn-sm" style="border-radius: 40px; font-size: x-small; background-color: orange;" *ngIf="cust_array.kycStatus=='Pending'">{{cust_array.kycStatus}}</button>
<button class="btn btn-success btn-sm" style="border-radius: 40px; font-size: x-small; background-color: green;" *ngIf="cust_array.kycStatus=='Approved'">{{cust_array.kycStatus}}</button>
<button class="btn btn-danger btn-sm" style="border-radius: 40px; font-size: x-small; background-color: red;" *ngIf="cust_array.kycStatus=='Reject'">{{cust_array.kycStatus}}</button>
</td>
<td
class="cell100 column15"
style="cursor: pointer; text-align: center"
>
<i
class="far fa-folder-open"
md-tooltip="View/Download"
style="cursor: pointer"
(click)="viewDocuments(cust_array)"
></i>
</td> -->
<td class="cell100 column16" style="text-align: center">
<i
class="far fa-edit"
@ -652,31 +252,6 @@
(click)="edit_costumerDetail(cust_array)"
></i>
</td>
<!-- <td
class="cell100 column17"
*ngIf="custtype == true || superAdmin == true"
style="text-align: center"
>
<i
class="fas fa-sort-alpha-down"
md-tooltip="User Setting"
style="cursor: pointer"
(click)="reportSetting(cust_array)"
></i>
</td>
<td
class="cell100 column18"
*ngIf="custtype == true || superAdmin == true"
style="text-align: center"
>
<i
class="fas fa-columns"
md-tooltip="Customise Table Content"
style="cursor: pointer"
(click)="custom_table(cust_array)"
></i>
</td> -->
<td class="cell100 column19" style="text-align: center">
<i
class="fas fa-trash-alt"
@ -686,55 +261,6 @@
></i>
</td>
<!-- <td class="cell100 column20" style="text-align: center">
<md-slide-toggle
[(ngModel)]="cust_array.status"
style="height: 0px !important"
ngDefaultControl
ngDefaultControl
(change)="onChange(cust_array, $event)"
></md-slide-toggle>
</td>
<td class="cell100 column21" style="text-align: center">
<i
class="fas fa-sign-in-alt"
title="Send Login Credentials"
(click)="shareUserCredential(cust_array)"
></i>
</td>
<td class="cell100 column22" style="text-align: center">
<i
class="fas fa-unlock-alt"
title="Reset Password"
(click)="resetPassword(cust_array)"
></i>
</td>
<td class="cell100 column20" style="text-align: center">
<md-slide-toggle
[(ngModel)]="cust_array.accountSuspended"
style="height: 0px !important"
ngDefaultControl
(change)="accountStatusOnChange(cust_array, $event)"
></md-slide-toggle>
</td>
<td class="column20" style="text-align: center">
<md-slide-toggle
[(ngModel)]="cust_array.adminAlert"
style="height: 0px !important"
ngDefaultControl
(change)="alertStatus($event, cust_array)"
></md-slide-toggle>
</td>
<td *ngIf="custtype" class="column20" style="text-align: center">
<md-slide-toggle [(ngModel)]="cust_array.dealerAlert" style="height: 0px !important" ngDefaultControl
(change)="dealerAlert($event, cust_array)"></md-slide-toggle>
</td>
<td class="column20" style="text-align: center">
<md-slide-toggle [checked]="cust_array.pullData?cust_array.pullData:false" style="height: 0px !important" ngDefaultControl
(change)="generatePullData($event, cust_array)"></md-slide-toggle>
</td> -->
</tr>
</tbody>
</table>

View file

@ -310,6 +310,7 @@ export class AddComponent implements OnInit {
vewdev(id) {
console.log(id);
localStorage.setItem("custId", id);
localStorage.setItem("addDev", 'yes');
localStorage.removeItem("in1");
this.selectedlanguage = localStorage.getItem('appLang');
this.translate.setDefaultLang(this.selectedlanguage);
@ -333,7 +334,6 @@ export class AddComponent implements OnInit {
// localStorage.setItem('Dealer',"OFF");
// localStorage.setItem('superadmin',"OFF")
console.log('this.superAdmin',this.superAdmin);
debugger;
if(this.superAdmin === true){
localStorage.setItem('supAdminAcessToCust', 'true' );
}

View file

@ -1,36 +1,36 @@
.title {
font-weight: 600;
margin-top: 20px;
font-size: 24px;
}
.customBtn {
border-radius: 0px;
padding: 10px;
}
// form input {
// display: inline-block;
// width: 50px;
// height: 50px;
// text-align: center;
// }
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
.title {
font-weight: 600;
margin-top: 20px;
font-size: 24px;
}
.customBtn {
border-radius: 0px;
padding: 10px;
}
// form input {
// display: inline-block;
// width: 50px;
// height: 50px;
// text-align: center;
// }
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}

View file

@ -23,6 +23,7 @@ export class ReportSettingComponent implements OnInit {
{name:"Door",dash_column:false,value:"door_column"},
{name :"Temperature",dash_column:false,value:"temp_column"},
{name :"Charging status",dash_column:false,value:"charging_column"},
{ name: "Address", dash_column: false, value: "address" },
];
reportArray = [
@ -169,9 +170,9 @@ export class ReportSettingComponent implements OnInit {
// arr[0].dash_column = d_column[dt].dash_column;
// this.dashboard_column[dt].dash_column = d_column[dt] ;
arr1[0].dash_column = d_column[dt] ;
arr1[0].dash_column = d_column[dt] ? d_column[dt]:false ;
console.log('d_column[dt]',d_column[dt])
console.log('d_column[dt]', d_column[dt] ? d_column[dt] : false)
// arr[0].Astatus = tempReport[dt].Astatus;
}
console.log("that.reportArray=>",that.reportArray);

View file

@ -1,307 +1,307 @@
button,
input {
font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}
a {
color: #f96332;
}
a:hover,
a:focus {
color: #f96332;
}
p {
line-height: 1.61em;
font-weight: 300;
font-size: 1.2em;
}
.category {
text-transform: capitalize;
font-weight: 700;
color: #9a9a9a;
}
body {
color: #2c2c2c;
font-size: 14px;
font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
overflow-x: hidden;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
.nav-item .nav-link,
.nav-tabs .nav-link {
-webkit-transition: all 300ms ease 0s;
-moz-transition: all 300ms ease 0s;
-o-transition: all 300ms ease 0s;
-ms-transition: all 300ms ease 0s;
transition: all 300ms ease 0s;
}
.card a {
-webkit-transition: all 150ms ease 0s;
-moz-transition: all 150ms ease 0s;
-o-transition: all 150ms ease 0s;
-ms-transition: all 150ms ease 0s;
transition: all 150ms ease 0s;
}
[data-toggle="collapse"][data-parent="#accordion"] i {
-webkit-transition: transform 150ms ease 0s;
-moz-transition: transform 150ms ease 0s;
-o-transition: transform 150ms ease 0s;
-ms-transition: all 150ms ease 0s;
transition: transform 150ms ease 0s;
}
[data-toggle="collapse"][data-parent="#accordion"][aria-expanded="true"] i {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
.now-ui-icons {
display: inline-block;
font: normal normal normal 14px/1 "Nucleo Outline";
font-size: inherit;
// speak: none;
text-transform: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@-webkit-keyframes nc-icon-spin {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@-moz-keyframes nc-icon-spin {
0% {
-moz-transform: rotate(0deg);
}
100% {
-moz-transform: rotate(360deg);
}
}
@keyframes nc-icon-spin {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.now-ui-icons.objects_umbrella-13:before {
content: "\ea5f";
}
.now-ui-icons.shopping_cart-simple:before {
content: "\ea1d";
}
.now-ui-icons.shopping_shop:before {
content: "\ea50";
}
.now-ui-icons.ui-2_settings-90:before {
content: "\ea4b";
}
.nav-tabs {
border: 0;
padding: 15px 0.7rem;
}
.nav-tabs:not(.nav-tabs-neutral) > .nav-item > .nav-link.active {
box-shadow: 0px 5px 35px 0px rgba(0, 0, 0, 0.3);
}
.card .nav-tabs {
border-top-right-radius: 0.1875rem;
border-top-left-radius: 0.1875rem;
}
.nav-tabs > .nav-item > .nav-link {
color: #888888;
margin: 0;
margin-right: 5px;
background-color: transparent;
border: 1px solid transparent;
border-radius: 30px;
font-size: 14px;
padding: 11px 23px;
line-height: 1.5;
}
.nav-tabs > .nav-item > .nav-link:hover {
background-color: transparent;
}
.nav-tabs > .nav-item > .nav-link.active {
background-color: #444;
border-radius: 30px;
color: #ffffff;
}
.nav-tabs > .nav-item > .nav-link i.now-ui-icons {
font-size: 14px;
position: relative;
top: 1px;
margin-right: 3px;
}
.nav-tabs.nav-tabs-neutral > .nav-item > .nav-link {
color: #ffffff;
}
.nav-tabs.nav-tabs-neutral > .nav-item > .nav-link.active {
background-color: rgba(255, 255, 255, 0.2);
color: #ffffff;
}
.card {
border: 0;
border-radius: 0.1875rem;
display: inline-block;
position: relative;
width: 100%;
// margin-bottom: 30px;
// box-shadow: 0px 5px 25px 0px rgba(0, 0, 0, 0.2);
}
.card .card-header {
background-color: transparent;
border-bottom: 0;
background-color: transparent;
border-radius: 0;
padding: 0;
}
.card[data-background-color="orange"] {
background-color: #2d4262;
}
.card[data-background-color="red"] {
background-color: #ff3636;
}
.card[data-background-color="yellow"] {
background-color: #ffb236;
}
.card[data-background-color="blue"] {
background-color: #2ca8ff;
}
.card[data-background-color="green"] {
background-color: #15b60d;
}
[data-background-color="orange"] {
background-color: #2d4262;
}
[data-background-color="black"] {
background-color: #2c2c2c;
}
[data-background-color]:not([data-background-color="gray"]) {
color: #ffffff;
}
[data-background-color]:not([data-background-color="gray"]) p {
color: #ffffff;
}
[data-background-color]:not([data-background-color="gray"])
a:not(.btn):not(.dropdown-item) {
color: #ffffff;
}
[data-background-color]:not([data-background-color="gray"])
.nav-tabs
> .nav-item
> .nav-link
i.now-ui-icons {
color: #ffffff;
}
@font-face {
font-family: "Nucleo Outline";
src: url("https://github.com/creativetimofficial/now-ui-kit/blob/master/assets/fonts/nucleo-outline.eot");
src: url("https://github.com/creativetimofficial/now-ui-kit/blob/master/assets/fonts/nucleo-outline.eot")
format("embedded-opentype");
src: url("https://raw.githack.com/creativetimofficial/now-ui-kit/master/assets/fonts/nucleo-outline.woff2");
font-weight: normal;
font-style: normal;
}
.now-ui-icons {
display: inline-block;
font: normal normal normal 14px/1 "Nucleo Outline";
font-size: inherit;
// speak: none;
text-transform: none;
/* Better Font Rendering */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
footer {
margin-top: 50px;
color: #555;
background: #fff;
padding: 25px;
font-weight: 300;
background: #f7f7f7;
}
.footer p {
margin-bottom: 0;
}
footer p a {
color: #555;
font-weight: 400;
}
footer p a:hover {
color: #e86c42;
}
@media screen and (max-width: 768px) {
.nav-tabs {
display: inline-block;
width: 100%;
padding-left: 100px;
padding-right: 100px;
text-align: center;
}
.nav-tabs .nav-item > .nav-link {
margin-bottom: 5px;
}
}
.mat-dialog-container {
padding: 0px !important;
}
button,
input {
font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}
a {
color: #f96332;
}
a:hover,
a:focus {
color: #f96332;
}
p {
line-height: 1.61em;
font-weight: 300;
font-size: 1.2em;
}
.category {
text-transform: capitalize;
font-weight: 700;
color: #9a9a9a;
}
body {
color: #2c2c2c;
font-size: 14px;
font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
overflow-x: hidden;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
.nav-item .nav-link,
.nav-tabs .nav-link {
-webkit-transition: all 300ms ease 0s;
-moz-transition: all 300ms ease 0s;
-o-transition: all 300ms ease 0s;
-ms-transition: all 300ms ease 0s;
transition: all 300ms ease 0s;
}
.card a {
-webkit-transition: all 150ms ease 0s;
-moz-transition: all 150ms ease 0s;
-o-transition: all 150ms ease 0s;
-ms-transition: all 150ms ease 0s;
transition: all 150ms ease 0s;
}
[data-toggle="collapse"][data-parent="#accordion"] i {
-webkit-transition: transform 150ms ease 0s;
-moz-transition: transform 150ms ease 0s;
-o-transition: transform 150ms ease 0s;
-ms-transition: all 150ms ease 0s;
transition: transform 150ms ease 0s;
}
[data-toggle="collapse"][data-parent="#accordion"][aria-expanded="true"] i {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
.now-ui-icons {
display: inline-block;
font: normal normal normal 14px/1 "Nucleo Outline";
font-size: inherit;
// speak: none;
text-transform: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@-webkit-keyframes nc-icon-spin {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@-moz-keyframes nc-icon-spin {
0% {
-moz-transform: rotate(0deg);
}
100% {
-moz-transform: rotate(360deg);
}
}
@keyframes nc-icon-spin {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.now-ui-icons.objects_umbrella-13:before {
content: "\ea5f";
}
.now-ui-icons.shopping_cart-simple:before {
content: "\ea1d";
}
.now-ui-icons.shopping_shop:before {
content: "\ea50";
}
.now-ui-icons.ui-2_settings-90:before {
content: "\ea4b";
}
.nav-tabs {
border: 0;
padding: 15px 0.7rem;
}
.nav-tabs:not(.nav-tabs-neutral) > .nav-item > .nav-link.active {
box-shadow: 0px 5px 35px 0px rgba(0, 0, 0, 0.3);
}
.card .nav-tabs {
border-top-right-radius: 0.1875rem;
border-top-left-radius: 0.1875rem;
}
.nav-tabs > .nav-item > .nav-link {
color: #888888;
margin: 0;
margin-right: 5px;
background-color: transparent;
border: 1px solid transparent;
border-radius: 30px;
font-size: 14px;
padding: 11px 23px;
line-height: 1.5;
}
.nav-tabs > .nav-item > .nav-link:hover {
background-color: transparent;
}
.nav-tabs > .nav-item > .nav-link.active {
background-color: #444;
border-radius: 30px;
color: #ffffff;
}
.nav-tabs > .nav-item > .nav-link i.now-ui-icons {
font-size: 14px;
position: relative;
top: 1px;
margin-right: 3px;
}
.nav-tabs.nav-tabs-neutral > .nav-item > .nav-link {
color: #ffffff;
}
.nav-tabs.nav-tabs-neutral > .nav-item > .nav-link.active {
background-color: rgba(255, 255, 255, 0.2);
color: #ffffff;
}
.card {
border: 0;
border-radius: 0.1875rem;
display: inline-block;
position: relative;
width: 100%;
// margin-bottom: 30px;
// box-shadow: 0px 5px 25px 0px rgba(0, 0, 0, 0.2);
}
.card .card-header {
background-color: transparent;
border-bottom: 0;
background-color: transparent;
border-radius: 0;
padding: 0;
}
.card[data-background-color="orange"] {
background-color: #2d4262;
}
.card[data-background-color="red"] {
background-color: #ff3636;
}
.card[data-background-color="yellow"] {
background-color: #ffb236;
}
.card[data-background-color="blue"] {
background-color: #2ca8ff;
}
.card[data-background-color="green"] {
background-color: #15b60d;
}
[data-background-color="orange"] {
background-color: #2d4262;
}
[data-background-color="black"] {
background-color: #2c2c2c;
}
[data-background-color]:not([data-background-color="gray"]) {
color: #ffffff;
}
[data-background-color]:not([data-background-color="gray"]) p {
color: #ffffff;
}
[data-background-color]:not([data-background-color="gray"])
a:not(.btn):not(.dropdown-item) {
color: #ffffff;
}
[data-background-color]:not([data-background-color="gray"])
.nav-tabs
> .nav-item
> .nav-link
i.now-ui-icons {
color: #ffffff;
}
@font-face {
font-family: "Nucleo Outline";
src: url("https://github.com/creativetimofficial/now-ui-kit/blob/master/assets/fonts/nucleo-outline.eot");
src: url("https://github.com/creativetimofficial/now-ui-kit/blob/master/assets/fonts/nucleo-outline.eot")
format("embedded-opentype");
src: url("https://raw.githack.com/creativetimofficial/now-ui-kit/master/assets/fonts/nucleo-outline.woff2");
font-weight: normal;
font-style: normal;
}
.now-ui-icons {
display: inline-block;
font: normal normal normal 14px/1 "Nucleo Outline";
font-size: inherit;
// speak: none;
text-transform: none;
/* Better Font Rendering */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
footer {
margin-top: 50px;
color: #555;
background: #fff;
padding: 25px;
font-weight: 300;
background: #f7f7f7;
}
.footer p {
margin-bottom: 0;
}
footer p a {
color: #555;
font-weight: 400;
}
footer p a:hover {
color: #e86c42;
}
@media screen and (max-width: 768px) {
.nav-tabs {
display: inline-block;
width: 100%;
padding-left: 100px;
padding-right: 100px;
text-align: center;
}
.nav-tabs .nav-item > .nav-link {
margin-bottom: 5px;
}
}
.mat-dialog-container {
padding: 0px !important;
}

View file

@ -49,7 +49,7 @@
<a *ngIf="superAdmin || custtype" class="dropdown-item" style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;" (click)="deviceMaster('admin')">{{'Device Master' | translate}}</a>
<a class="dropdown-item" style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;" *ngIf="showIMEI" (click)="imeiFind('admin')">{{'IMEI Finder' | translate}}</a>
<a class="dropdown-item" style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;" *ngIf="superAdmin || isOperator" (click)="deviceInventoryList('admin')">{{'Inventory List' | translate}}</a>
<li class="dropdown-submenu dropdown_style">
<li class="dropdown-submenu dropdown_style" *ngIf="superAdmin || custtype ">
<a class="nav-link dropdown-toggle"
style="width: 100% !important;cursor: pointer;border-bottom: 1px solid;padding-top: 7px; padding-bottom: 7px; padding-right: 20px;font-size: 14px;"
data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true"> <span
@ -71,11 +71,11 @@
(click)="issueList('admin')">{{'Issue List' | translate}}</a>
<a class="dropdown-item" style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;" *ngIf="superAdmin || custtype" (click)="messageUtility('admin')">{{'Message Utility' | translate}}</a>
<li class="dropdown-submenu dropdown_style">
<li class="dropdown-submenu dropdown_style" *ngIf="superAdmin">
<a class="nav-link dropdown-toggle"
style="width: 100% !important;cursor: pointer;border-bottom: 1px solid;padding-top: 7px; padding-bottom: 7px; padding-right: 20px;font-size: 14px;"
data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true"> <span
style="margin-left: 13px;">Master</span></a>
style="margin-left: 13px;">Master </span></a>
<ul class="dropdown-menu dropdown_style">
<li *ngIf="this.reportArray[3].Rstatus == true" class="dropdown_style" (click)="modelMaster('admin')"
style="padding-left: 5px;width: 100% !important;cursor: pointer;border-bottom: 1px solid;padding-top: 7px; padding-bottom: 7px; padding-right: 20px;font-size: 14px;">
@ -88,6 +88,28 @@
</ul>
</li>
<li class="dropdown-submenu dropdown_style" *ngIf="showIMEI">
<a class="nav-link dropdown-toggle"
style="width: 100% !important;cursor: pointer;border-bottom: 1px solid;padding-top: 7px; padding-bottom: 7px; padding-right: 20px;font-size: 14px;"
data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true"> <span
style="margin-left: 13px;">Transfer</span></a>
<ul class="dropdown-menu dropdown_style">
<li class="dropdown_style" (click)="deviceSetting('admin')"
style="padding-left: 5px;width: 100% !important;cursor: pointer;border-bottom: 1px solid;padding-top: 7px; padding-bottom: 7px; padding-right: 20px;font-size: 14px;">
<a>{{'Device' | translate}}</a>
</li>
<li class="dropdown_style" (click)="userSetting('admin')"
style="padding-left: 5px;width: 100% !important;cursor: pointer;border-bottom: 1px solid;padding-top: 7px; padding-bottom: 7px; padding-right: 20px;font-size: 14px;">
<a>{{'User' | translate}}</a>
</li>
<!-- <a *ngIf="showIMEI" class="dropdown-item" style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;" >{{'Device Setting' | translate}}</a> -->
<!-- <a class="dropdown-item"
style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;"
*ngIf="showIMEI" (click)="userSetting('admin')">{{'User Setting' | translate}}</a> -->
</ul>
</li>
<!-- <a *ngIf="superAdmin" class="dropdown-item"
style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;"
@ -98,10 +120,11 @@
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> -->
<a class="dropdown-item" style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;" *ngIf="superAdmin" (click)="tutorialVideos('admin')">{{'Tutorial Videos' | translate}}</a>
<a class="dropdown-item" style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;" *ngIf="superAdmin && urlspecifc" (click)="tutorialVideos('admin')">{{'Tutorial Videos' | translate}}</a>
<a class="dropdown-item"
style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;"
*ngIf="showIMEI" (click)="userFinder('admin')">{{'User Finder' | 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)="userMaster('admin')">{{'User Master' | translate}}</a>
<a class="dropdown-item" style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;" *ngIf="superAdmin || custtype" (click)="VType('admin')">{{'Vehicle Type' | translate}}</a>

View file

@ -37,6 +37,7 @@ import { ContactService } from '../contact.service';
import { TranslateService } from 'ng2-translate';
import { MdDialog } from '@angular/material';
import { DemoVideosComponent } from '../const/demo-videos/demo-videos.component';
import { DatainjectionService } from '../datainjection.service';
// import { PoiListComponent } from '../poi-list/poi-list.component';
// import { PoiDtlDelComponent } from "../poi-dtl-del/poi-dtl-del.component";
// import { MdDialog } from '@angular/material';
@ -110,7 +111,7 @@ export class AllMenusComponent implements OnInit {
adressTab: boolean=false;
phone: any;
// ,public dialog: MdDialog
constructor(public dialog: MdDialog,private router: Router, private route: ActivatedRoute, private contactService: ContactService,public translate: TranslateService) {
constructor(private _DatainjectionService: DatainjectionService,public dialog: MdDialog,private router: Router, private route: ActivatedRoute, private contactService: ContactService,public translate: TranslateService) {
this.contactService.totalTicketCount.subscribe(totalTicketCount => {
// this.ticketCount = totalTicketCount
this.useridd = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id;
@ -146,7 +147,15 @@ export class AllMenusComponent implements OnInit {
menuWidth:any;
sup_admin:boolean;
isOrgnaisation:boolean=false;
urlspecifc:boolean =false;
ngOnInit() {
let domainName = window.location.host;
console.log(domainName, 'domainName');
if (domainName.indexOf('oneqlik') >= 0 || domainName.indexOf('localhost') >= 0) {
this.urlspecifc = true
} else {
this.urlspecifc = false;
}
// console.log("Inside all app menu component---------------------------------------------");
// this.superAdmin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin;
if(localStorage.getItem('superadmin')=="ON"){
@ -164,6 +173,7 @@ export class AllMenusComponent implements OnInit {
// this.emailid = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).email;
this.or = JSON.parse(window.atob(window.localStorage.token.split(".")[1]))._orgName;
this.superAdmin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin;
this.isOrganisation = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isOrganisation;
this.mb = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).phn;
// // this.routePath = JSON.parse(localStorage.getItem('routeData'));
@ -188,7 +198,7 @@ export class AllMenusComponent implements OnInit {
}
this._DatainjectionService.refreshConnection();
// console.log("this.reportPrefrecne=>",this.reportPrefrecne);
@ -706,6 +716,7 @@ fuel_report(id){
logout() {
window.localStorage.clear();
this._DatainjectionService.closeConnection();
this.router.navigateByUrl("login");
}
@ -914,4 +925,10 @@ getLanguage(){
toll(){
this.router.navigate(['/toll'])
}
deviceSetting(id){
this.router.navigate(['/device-setting'])
}
userSetting(id) {
this.router.navigate(['/user-setting'])
}
}

View file

@ -112,7 +112,7 @@ console.log(token);
}
}
this.contactService.dealerInfo(this.url).subscribe(
this.contactService.dealerInfo(this.url == 'localhost:4200' ?'oneqlik.in':this.url ).subscribe(
data => {
this.userData = data

View file

@ -278,6 +278,8 @@ import { AddNewDeviceComponent } from './dashboard/add-new-device/add-new-device
import { ViewCertificateComponent } from './dashboard/view-certificate/view-certificate.component';
import { NewEditDeviceComponent } from './dashboard/new-edit-device/new-edit-device.component';
import { DownloadCertificateComponent } from './dashboard/download-certificate/download-certificate.component';
import { DeviceSettingComponent } from './device-setting/device-setting.component';
import { UserSettingComponent } from './user-setting/user-setting.component';
// import { DisatanceReportComponent } from './report/disatance-report/disatance-report.component';
// import { MainComponent } from './report/main/main.component';
// import { AcReportsComponent } from './report/ac-report/ac-report.component';
@ -537,6 +539,8 @@ export function createTranslateLoader(http: Http) {
ViewCertificateComponent,
NewEditDeviceComponent,
DownloadCertificateComponent,
DeviceSettingComponent,
UserSettingComponent,
// LiveTrackingComponent,
// MainComponent,
// DisatanceReportComponent,

View file

@ -207,6 +207,9 @@ import { AddNewDeviceComponent } from './dashboard/add-new-device/add-new-device
// import { AcReportComponent } from './device-report/ac-report/ac-report.component';
import { FuelReportComponent } from './device-report/fuel-report/fuel-report.component';
import { NewEditDeviceComponent } from './dashboard/new-edit-device/new-edit-device.component';
import { DeviceSettingComponent } from './device-setting/device-setting.component';
import { UserSettingComponent } from './user-setting/user-setting.component';
import { CurrentPositionReportComponent } from './report/report component/current-position/current-position.component';
// import { DeviceFuelReportComponent } from './device-report/device-fuel-report/device-fuel-report.component';
// import { DeviceSOSreportComponent } from './device-report/device-sosreport/device-sosreport.component';
// import { TripByDeviceComponent } from './device-report/trip-by-device/trip-by-device.component';
@ -421,6 +424,10 @@ export const router: Routes =[
path: 'daily_report', // child route path
component: DailyReportComponent,
},
{
path: 'current_position', // child route path
component: CurrentPositionReportComponent,
},
{
path: 'daily_logs',
component: DailyLogssComponent,
@ -553,6 +560,8 @@ export const router: Routes =[
{path:'FuelPrice',component:FuelPriceComponent},
{path:'addFuelPrice',component:AddFuelPriceComponent},
{path:'RTO_Master',component:RtoMasterComponent},
{ path: 'device-setting', component: DeviceSettingComponent },
{ path: 'user-setting', component: UserSettingComponent },
// {path:'routePlanReportNew',component:NewRoutePlanReportComponent},
{path:'routePlanReportNew',component:RoutPlanReportComponent},
{path:'ModelMaster',component:ModelMasterComponent},

View file

@ -1,18 +1,18 @@
.nav-link {
color: black;
}
.actives {
background: #426e86;
color: white;
}
.selected-tab-0 md-ink-bar {
background-color: red;
}
.selected-tab-1 md-ink-bar {
background-color: #426e86;
}
.selected-tab-2 md-ink-bar {
background-color: green;
}
// .mat-tab-body-content {
// }
.nav-link {
color: black;
}
.actives {
background: #426e86;
color: white;
}
.selected-tab-0 md-ink-bar {
background-color: red;
}
.selected-tab-1 md-ink-bar {
background-color: #426e86;
}
.selected-tab-2 md-ink-bar {
background-color: green;
}
// .mat-tab-body-content {
// }

View file

@ -261,7 +261,7 @@
<tbody style="cursor: pointer;">
<tr *ngFor="let device of deviceData | orderBy: key : reverse | filter:myInput ;let i = index" >
<td>
<td>
<div *ngIf="iconCheck(device.status,device.iconType)">
<img *ngIf="device.iconType === 'jcb'" width ='30px' style="margin-left: 10px;" src={{devIcon}}>
<img *ngIf="device.iconType != 'jcb'" width ='20px' style="margin-left: 10px;" src={{devIcon}}>
@ -286,15 +286,15 @@
</td>
<td (click)="vewdev(device.Device_ID,device.Device_Name,device.type_of_device,device.expiration_date,device.last_speed,device.status)">{{device.total_odo
? (device.total_odo | number: '1.2-2' ): 0}}</td>
<td >
<td style="width:200px">
<div style="cursor: pointer;">
<!-- title="update Address" (click)="updateAddress(device)" -->
<!-- <img style="width: 20px;" src='../../assets/image/addressICON.png' (click)=getAddress(device) md-tooltip="Click to get device's last location"> -->
<div >
<span md-tooltip="Device's last location" *ngIf="device.locationAddress!=null">{{device.locationAddress}}</span>
<span style="text-align: center;" md-tooltip="Device's last location" *ngIf="device.locationAddress==null">
<img style="width: 20px;" src='../../assets/image/addressICON.png' (click)=getAddress(device)
<div style="text-align: center;" >
<span style="text-align: center;" md-tooltip="Device's last location" *ngIf="device.locationAddress">{{device.locationAddress}}</span>
<span style="text-align: start;" *ngIf="!device.locationAddress">
<img style="width: 20px;" src='../../assets/image/addressICON.png' (click)=getAddress(device,true)
md-tooltip="Click to get device's last location">
</span>
<i *ngIf="(device.pen)" style="cursor: pointer;color:gray" class="fas fa-pen" title="update Address" (click)="updateAddress(device)"></i>

View file

@ -662,6 +662,8 @@ export class ConstComponent implements OnInit {
this.gsm_column = dashboard_content.gsm_column ;
this.ignition_column = dashboard_content.ignition_column ;
this.ext_volt = dashboard_content.ext_volt ;
this.dashboardAddress = dashboard_content.address ? dashboard_content.address:false
console.log('dashboard_content', this.dashboardAddress);
// this.door_column: false
// this.temp_column: false
// this.charging_column: false
@ -720,12 +722,12 @@ export class ConstComponent implements OnInit {
}
this.socket_Ing = this.injectData.getSocket_gps();
//this.socket_Ing = this.injectData.getSocket_gps();
this.socket_Ing.on('connect', function (this) {
// console.log("No function")
// this.socket_Ing.on('connect', function (this) {
// // console.log("No function")
});
// });
this.modelChanged
.debounceTime(2000) // wait 300ms after the last event before emitting last event
@ -806,7 +808,7 @@ export class ConstComponent implements OnInit {
this.socket_Ing = this.injectData.getSocket_gps();
//this.socket_Ing = this.injectData.getSocket_gps();
// this.socket_Ing.on('connect', function (this) {
@ -1109,15 +1111,20 @@ export class ConstComponent implements OnInit {
// }else{
// var milege=(this.deviceData[j].total_odo/100)*(Number(this.deviceData[j].distanceVariation.substring(1)))
// console.log("MILEGE->",milege,'-',this.deviceData[j].total_odo);
// //console.log("MILEGE->",milege,'-',this.deviceData[j].total_odo);
// this.deviceData[j].total_odo=this.deviceData[j].total_odo-milege
// }
// }
this.getAddress(this.deviceData[j])
if (this.dashboardAddress){
this.getAddress(this.deviceData[j],false)
}
}
console.log('this.deviceData',this.deviceData);
//console.log('this.deviceData',this.deviceData);
}
@ -1214,8 +1221,8 @@ export class ConstComponent implements OnInit {
this.filterId = 'r';
clearInterval(this.interval);
var a = "RUNNING"
// console.log(this.skip,this.limit);
// console.log(this.DealerID);
// //console.log(this.skip,this.limit);
// //console.log(this.DealerID);
var status_1 = false;
this.contactService.getDeviceByFilter_dash(a,this.emailid, this.useridd, this.skip, this.limit, this.myInput,this.supAdm,this.DealerID,status_1)
.subscribe(res => {
@ -1247,21 +1254,21 @@ export class ConstComponent implements OnInit {
}
getDeviceBYfilterStop(i) {
console.log("inside function");
//console.log("inside function");
if(i==3){
this.skip =0;
}
this.filterId = 's';
// console.log(this.skip);
// //console.log(this.skip);
clearInterval(this.interval);
var a = "STOPPED"
var status_1 = false;
this.contactService.getDeviceByFilter_dash(a,this.emailid, this.useridd, this.skip, this.limit, this.myInput,this.supAdm,this.DealerID,status_1)
.subscribe(res => {
// console.log("stoppedveh=>",res);
// //console.log("stoppedveh=>",res);
for(var i=0 ;i<res.length;i++){
var a = res.devices[i].Ignition ;
// console.log(a);
// //console.log(a);
}
@ -1305,7 +1312,7 @@ export class ConstComponent implements OnInit {
var status_1 = false;
this.contactService.getDeviceByFilter_dash(a,this.emailid, this.useridd, this.skip, this.limit, this.myInput,this.supAdm,this.DealerID,status_1)
.subscribe(res => {
// console.log("ourveh=>",res)
// //console.log("ourveh=>",res)
this.filtes = res.devices;
this.abc(this.filtes);
@ -1372,7 +1379,7 @@ export class ConstComponent implements OnInit {
}
alldev() {
// console.log("localstorageComp")
// //console.log("localstorageComp")
var retrievedData = localStorage.getItem("devices");
var cord = JSON.parse(retrievedData);
this.filtes = cord;
@ -1382,7 +1389,7 @@ export class ConstComponent implements OnInit {
selectedlanguage:any
// ----------------new login method-------------------------
vewdevLogin(id) {
console.log(id);
//console.log(id);
localStorage.setItem("custId", id);
localStorage.removeItem("in1");
this.selectedlanguage = localStorage.getItem('appLang');
@ -1391,7 +1398,7 @@ selectedlanguage:any
this.contactService.getcustToken(id).subscribe(
data => {
// this.devicesss = data
// console.log(this.devicesss)
// //console.log(this.devicesss)
window.localStorage['Dealer_token'] = window.localStorage['token']
window.localStorage['token'] =data.custumer_token;
@ -1406,7 +1413,7 @@ selectedlanguage:any
}
// localStorage.setItem('Dealer',"OFF");
// localStorage.setItem('superadmin',"OFF")
console.log('this.superAdmin',this.superAdmin);
//console.log('this.superAdmin',this.superAdmin);
// debugger;
if(this.superAdmin === true){
localStorage.setItem('supAdminAcessToCust', 'true' );
@ -1418,7 +1425,7 @@ selectedlanguage:any
this.router.navigateByUrl("const?_status=" + "OK");
// console.log('testing', this.useridd);
// //console.log('testing', this.useridd);
}
this.deviceData=[]
this.supAdm=undefined
@ -1430,7 +1437,7 @@ selectedlanguage:any
}
vewdev(id, name, type, expDate,lastSpeed,status) {
// console.log(lastSpeed);
// //console.log(lastSpeed);
var exStatus = status.slice(0,7);
if(exStatus === 'Expired'){
@ -1453,7 +1460,7 @@ selectedlanguage:any
vehicleName: name,
vehicleType: type
}
// console.log("Inside View Dev",dataStatus);
// //console.log("Inside View Dev",dataStatus);
if (type == "Tracker") {
localStorage.setItem('last_speed',lastSpeed );
this.router.navigateByUrl("location?_dname=" + name + "_id=" + id);
@ -1473,7 +1480,7 @@ selectedlanguage:any
if(i==0){
this.skip=0;
}
// console.log(this.skip, this.limit);
// //console.log(this.skip, this.limit);
this.filterId = '' ;
if (this.checker == "OK" || this.checker == "ok") {
@ -1506,7 +1513,7 @@ selectedlanguage:any
},
(err) => {
if (err) {
console.log(err);
//console.log(err);
}
}
)
@ -1625,8 +1632,8 @@ selectedlanguage:any
// setInterval(function(){
for (var y = 0; y < that.final.length; y++) {
that.socket_Ing.emit('acc', that.final[y].Device_ID)
that.socket_Ing.on(that.final[y].Device_ID + 'acc', that.accListener(y, that.final[y]));
//that.socket_Ing.emit('acc', that.final[y].Device_ID)
//that.socket_Ing.on(that.final[y].Device_ID + 'acc', that.accListener(y, that.final[y]));
var d = new Date();
var a = d.setHours(0, 0, 0, 0);
@ -1634,7 +1641,7 @@ selectedlanguage:any
// console.log('socket function');
// //console.log('socket function');
that.abc(that.total_final);
// },(1000*that.setTimeOut.value))
@ -1965,7 +1972,7 @@ selectedlanguage:any
key: string = 'Device_Name'; //set default
reverse: boolean = false;
sort(key) {
// console.log(key);
// //console.log(key);
this.key = key;
this.reverse = !this.reverse;
}
@ -2009,19 +2016,19 @@ selectedlanguage:any
// }
locationAddress: any;
getAddress(device) {
getAddress(device,check) {
var ds = device.status;
var exStatus = ds.slice(0,7);
if(exStatus === 'Expired'){
// swal({
// title: 'Expired',
// text: "Renew Your subscription for uninterrupted service",
// type: 'warning',
// showCancelButton: false,
// confirmButtonColor: '#3085d6',
if(exStatus === 'Expired' && check){
swal({
title: 'Expired',
text: "Renew Your subscription for uninterrupted service",
type: 'warning',
showCancelButton: false,
confirmButtonColor: '#3085d6',
// confirmButtonText: 'ok'
// })
confirmButtonText: 'ok'
})
}else{
this.lattitude = device.last_location?device.last_location.lat:0;
this.longitude = device.last_location?device.last_location.long:0;
@ -2031,7 +2038,7 @@ selectedlanguage:any
"long": device.last_location?device.last_location.long:0
}
this.contactService.getAddressByApi(latlng_1).subscribe(res=>{
// console.log('addressresponse=>',res);
// //console.log('addressresponse=>',res);
if(res.message == "Address not found in databse"){
this.addressConversionBygoogleAPI(device);
}else{
@ -2070,11 +2077,11 @@ selectedlanguage:any
geocoder.geocode(request, function (data, status) {
console.log('request',data);
//console.log('request',data);
if (status == google.maps.GeocoderStatus.OK) {
if (data[0] != null) {
console.log('request',request);
//console.log('request',request);
outerThis.address_show = data[0].formatted_address;
device.locationAddress = outerThis.address_show;
device['pen'] = true;
@ -2099,13 +2106,13 @@ selectedlanguage:any
}
translateAddressToHindi(device){
console.log("Device",device);
//console.log("Device",device);
// translation
var index=this.deviceData.indexOf(device);
console.log("herk",this.deviceData.indexOf(device))
//console.log("herk",this.deviceData.indexOf(device))
this.contactService.addressTranslationInHindi({text:device.locationAddress}).subscribe(res=>{
this.deviceData[index].locationAddress=res.translation;
console.log(res);
//console.log(res);
})
@ -2118,9 +2125,9 @@ selectedlanguage:any
"address":address
}
this.contactService.saveAdd(addressObj).subscribe(res=>{
console.log(res);
//console.log(res);
},err=>{
console.log("couldn't save address");
//console.log("couldn't save address");
})
}
@ -2128,7 +2135,7 @@ selectedlanguage:any
updateAddress(dev){
console.log(dev);
//console.log(dev);
let dialogRef = this.dialog.open(ManualAddressComponent, {
width: '600px',
@ -2137,11 +2144,11 @@ selectedlanguage:any
dialogRef.afterClosed().subscribe(result => {
if (result == "success") {
console.log(result);
//console.log(result);
}
else if (result == "cancel") {
console.log(result);
//console.log(result);
}
});
@ -2155,7 +2162,7 @@ selectedlanguage:any
next() {
this.lastcall = false;
this.skip += 1;
// console.log("skip=>",this.skip);
// //console.log("skip=>",this.skip);
if(this.filterId== 'i'){
this.getDeviceBYfilterIdle(10);
@ -2188,7 +2195,7 @@ selectedlanguage:any
}
pre() {
// console.log(this.skip)
// //console.log(this.skip)
if (this.skip > 0) {
this.skip -= 1;
this.lastcall = false;
@ -2238,8 +2245,8 @@ selectedlanguage:any
getfuel(device,ind){
// console.log(ind);
// console.log(device);
// //console.log(ind);
// //console.log(device);
// debugger;
var show_val = '';
if(this.fuelflag == 'l'){
@ -2275,9 +2282,9 @@ selectedlanguage:any
public ngOnDestroy() {
localStorage.setItem('refreshInterval', JSON.stringify(this.setTimeOut.value));
if(this.final){
for (var e = 0; e < this.final.length; e++) {
this.socket_Ing.removeAllListeners(this.final[e])
}
// for (var e = 0; e < this.final.length; e++) {
// this.socket_Ing.removeAllListeners(this.final[e])
// }
}
clearInterval(this.interval);
}
@ -2425,9 +2432,9 @@ selectedlanguage:any
})
that.contactService.vehicleUtilization(role,userid).subscribe(res=>{
console.log('resresresresresresres=>',res);
//console.log('resresresresresresres=>',res);
var bargraph = res;
console.log('bargraph',bargraph.length);
//console.log('bargraph',bargraph.length);
if((bargraph.length != 0)&&(bargraph.length != undefined)){
var varGraphObject = bargraph;
@ -2502,7 +2509,7 @@ selectedlanguage:any
"options":chartOptions
})
},err=>{
console.log(err);
//console.log(err);
})
clearTimeout(tOut);
@ -2549,7 +2556,7 @@ selectedlanguage:any
options: optionDonought
});
that.contactService.getExpenseGrapgData(userId).subscribe(res=>{
console.log('resresresresresresres',res);
//console.log('resresresresresresres',res);
var expenseData = res ;
var expData = [0,0,0,0,0];
@ -2568,7 +2575,7 @@ selectedlanguage:any
}
}
console.log('expDataexpDataexpDataexpDataexpData',expData);
//console.log('expDataexpDataexpDataexpDataexpData',expData);
daugnoutChart_1 = {
datasets: [{
data:expData,
@ -2583,7 +2590,7 @@ selectedlanguage:any
options: optionDonought
});
},err=>{
console.log(err);
//console.log(err);
})
clearTimeout(tOut2);
},3000)
@ -2594,7 +2601,12 @@ selectedlanguage:any
var that = this;
$( document ).ready(function() {
var canvas_1 = <HTMLCanvasElement>document.getElementById("utilisationChart");
var ctx_1 = canvas_1.getContext("2d");
var ctx_1;
try {
ctx_1 = canvas_1.getContext("2d");
} catch (error) {
}
var daugnoutChart = {
datasets: [{
data: [
@ -2662,7 +2674,7 @@ selectedlanguage:any
var Uid = this.useridd;
this.reminderrr = [];
this.contactService.getVehicleReminder(Uid).subscribe(res=>{
console.log('this.reminderVal',this.reminderVal);
//console.log('this.reminderVal',this.reminderVal);
this.reminderrr = res[0];
var notifString = '';
this.notifArr = [];
@ -2676,7 +2688,7 @@ selectedlanguage:any
var rd = moment(this.reminderrr[i].reminder_date).format('lll');;
notifString = 'Reminder for Vehicle' + ' ' + this.reminderrr[i].device.Device_Name + ' ' +'for' +' '+ this.reminderrr[i].reminder_type +' ' + 'on' +' '+ rd;
this.notifArr.push(notifString);
console.log('notifArr',this.notifArr);
//console.log('notifArr',this.notifArr);
}
}
@ -2691,7 +2703,7 @@ selectedlanguage:any
var rd = moment(this.reminderrr[i].reminder_date).format('lll');;
notifString = 'Reminder for Vehicle' + ' ' + this.reminderrr[i].device.Device_Name + ' ' +'for' +' '+ this.reminderrr[i].reminder_type +' ' + 'on' +' '+ rd;
this.notifArr.push(notifString);
console.log('notifArr',this.notifArr);
//console.log('notifArr',this.notifArr);
}
}
}
@ -2706,7 +2718,7 @@ selectedlanguage:any
var rd = moment(this.reminderrr[i].reminder_date).format('lll');;
notifString = 'Reminder for Vehicle' + ' ' + this.reminderrr[i].device.Device_Name + ' ' +'for' +' '+ this.reminderrr[i].reminder_type +' ' + 'on' +' '+ rd;
this.notifArr.push(notifString);
console.log('notifArr',this.notifArr);
//console.log('notifArr',this.notifArr);
}
}
}
@ -2720,7 +2732,7 @@ selectedlanguage:any
var rd = moment(this.reminderrr[i].reminder_date).format('lll');;
notifString = 'Reminder for Vehicle' + ' ' + this.reminderrr[i].device.Device_Name + ' ' +'for' +' '+ this.reminderrr[i].reminder_type +' ' + 'on' +' '+ rd;
this.notifArr.push(notifString);
console.log('notifArr',this.notifArr);
//console.log('notifArr',this.notifArr);
}
}
} if(this.reminderVal == '15daysN'){
@ -2733,7 +2745,7 @@ selectedlanguage:any
var rd = moment(this.reminderrr[i].reminder_date).format('lll');;
notifString = 'Reminder for Vehicle' + ' ' + this.reminderrr[i].device.Device_Name + ' ' +'for' +' '+ this.reminderrr[i].reminder_type +' ' + 'on' +' '+ rd;
this.notifArr.push(notifString);
console.log('notifArr',this.notifArr);
//console.log('notifArr',this.notifArr);
}
}
} if(this.reminderVal == '30daysN'){
@ -2746,18 +2758,18 @@ selectedlanguage:any
var rd = moment(this.reminderrr[i].reminder_date).format('lll');;
notifString = 'Reminder for Vehicle' + ' ' + this.reminderrr[i].device.Device_Name + ' ' +'for' +' '+ this.reminderrr[i].reminder_type +' ' + 'on' +' '+ rd;
this.notifArr.push(notifString);
console.log('notifArr',this.notifArr);
//console.log('notifArr',this.notifArr);
}
}
}
},err=>{
console.log(err);
//console.log(err);
})
}
getreminderevent(ev){
console.log(ev);
//console.log(ev);
this.reminderVal = ev.value;
this.vehicleReminder();
@ -2773,11 +2785,11 @@ selectedlanguage:any
dialogRef.afterClosed().subscribe(result => {
if (result == "success") {
console.log(result);
//console.log(result);
}
else if (result == "cancel") {
console.log(result);
//console.log(result);
}
});
@ -2792,8 +2804,8 @@ selectedlanguage:any
billingDetailArr = [{'key' : 'Paid','value' : 0},{'key' : 'Pending','value' : 0}];
VehicleAdded = ['Today','Last Week','Last Month'];
getDeviceCount($event,id){
console.log($event);
console.log(id);
//console.log($event);
//console.log(id);
}
@ -2816,11 +2828,11 @@ selectedlanguage:any
this.contactService.getDeviceCount(role,user_id).subscribe(res=>{
this.totalCount = [{'key' : 'Today','value' : 0},{'key' : 'Week','value' : 0},{'key' : 'Month','value' : 0}];
this.totalCount = [{'key' : 'Today','value' : res[0].today?res[0].today:0},{'key' : 'Week','value' : res[1].week?res[1].week:0},{'key' : 'Month','value' : res[2]?res[2].month:0}];
console.log(this.totalCount);
//console.log(this.totalCount);
},err=>{
console.log(err);
//console.log(err);
})
}
@ -2845,7 +2857,7 @@ selectedlanguage:any
this.contactService.getExpiredDeviceCount(role1,user_id1).subscribe(res=>{
this.totalExpiredCount = [{'key' : 'Today','value' : 0},{'key' : 'Week','value' : 0},{'key' : 'Month','value' : 0}];
this.totalExpiredCount = [{'key' : 'Today','value' : res[0].today?res[0].today:0},{'key' : 'Week','value' : res[1].week?res[1].week:0},{'key' : 'Month','value' : res[2]?res[2].month:0}];
console.log(this.totalExpiredCount);
//console.log(this.totalExpiredCount);
},err=>{
@ -2874,7 +2886,7 @@ selectedlanguage:any
this.contactService.getRenewDeviceCount(role1,user_id1).subscribe(res=>{
this.totalRenewedCount = [{'key' : 'Today','value' : 0},{'key' : 'Week','value' : 0},{'key' : 'Month','value' : 0}];
this.totalRenewedCount = [{'key' : 'Today','value' : res[0].today?res[0].today:0},{'key' : 'Week','value' : res[1].week?res[1].week:0},{'key' : 'Month','value' : res[2]?res[2].month:0}];
console.log(this.totalRenewedCount);
//console.log(this.totalRenewedCount);
},err=>{
@ -2909,7 +2921,7 @@ selectedlanguage:any
var api_key = 'AIzaSyA_ycttLXPMfCSSNAfPOsaENPQ85i17lPU';
var apiIdentifier = localStorage.getItem('apiIdentifier');
if(apiIdentifier == null){
console.log("Inside AppIdentifier");
//console.log("Inside AppIdentifier");
this.contactService.getgoogleApi(this.useridd).subscribe(res=>{
if(res.message != "api key not found"){
api_key = res.api_key;
@ -2938,7 +2950,7 @@ selectedlanguage:any
})
}else{
console.log(apiIdentifier);
//console.log(apiIdentifier);
var aCount = localStorage.getItem('apiCOunt');
if(aCount != '1'){
// var script = document.createElement('script');
@ -2972,14 +2984,14 @@ selectedlanguage:any
if(this.custtype === true){role = 'Dealer' ;}
var user_id = this.useridd;
this.contactService.getDeviceCount1(role,user_id,key,this.skip,this.limit).subscribe(res=>{
console.log('added deviceList',res);
//console.log('added deviceList',res);
this.filtes = res;
this.abc(this.filtes);
})
}
getExpiredVehList(key){
this.filterId = 'ev';
console.log(this.skip);
//console.log(this.skip);
if(key === 'Today'){
key='today';
this.keyIdentifier = key;
@ -2997,7 +3009,7 @@ selectedlanguage:any
if(this.custtype === true){role = 'Dealer' ;}
var user_id = this.useridd;
this.contactService.getExpiredDeviceCount1(role,user_id,key,this.skip,this.limit).subscribe(res=>{
console.log('ExpiredDeviceList',res);
//console.log('ExpiredDeviceList',res);
this.filtes = res;
this.abc(this.filtes);
})
@ -3024,7 +3036,7 @@ selectedlanguage:any
if(this.custtype === true){role = 'Dealer' ;}
var user_id = this.useridd;
this.contactService.getRenewDeviceCount1(role,user_id,key,this.skip,this.limit).subscribe(res=>{
console.log('renewedDeviceList',res);
//console.log('renewedDeviceList',res);
this.filtes = res;
this.abc(this.filtes);
})
@ -3035,11 +3047,11 @@ selectedlanguage:any
if (navigator.geolocation) {
// if(location.protocol != 'https:'){
// this.contactService.getlatLong().subscribe(res=>{
// console.log(res);
// //console.log(res);
// })
// }else{
navigator.geolocation.getCurrentPosition(function(position) {
console.log('Position=>',position);
//console.log('Position=>',position);
let geocoder = new google.maps.Geocoder();
var d_lat= position.coords.latitude;
var d_lng=position.coords.longitude;
@ -3055,13 +3067,13 @@ selectedlanguage:any
if (status == google.maps.GeocoderStatus.OK) {
if (data[0] != null) {
var address_show = data[0];
console.log('var=>' ,address_show);
//console.log('var=>' ,address_show);
for (var ac = 0; ac < data[0].address_components.length; ac++) {
var component = data[0].address_components[ac];
switch(component.types[0]) {
case 'administrative_area_level_1':
userState = component.long_name;
console.log(userState);
//console.log(userState);
break;
}
};
@ -3093,9 +3105,9 @@ selectedlanguage:any
}
getFuelprice(ustate){
console.log(ustate);
//console.log(ustate);
this.contactService.getFuelDetail(ustate).subscribe(fuelprice=>{
console.log('fuelpricefuelpricefuelprice=>',fuelprice);
//console.log('fuelpricefuelpricefuelprice=>',fuelprice);
this.fuelCount=[{
fuel : 'Diesel',
price: fuelprice[0]?fuelprice[0].diesel:'--',
@ -3114,12 +3126,13 @@ selectedlanguage:any
langSymbol:boolean=true;
valueSymbol ='';
fuelShow:boolean=true;
dashboardAddress: boolean = false;
getLanguage(){
var that = this;
var Var = { uid: this.useridd };
this.contactService.getLanguages(Var).subscribe((res:any)=>{
console.log('resresresresresresresresresresresresresresresres ',res);
//console.log('resresresresresresresresresresresresresresresres ',res);
if(res.timezone != undefined){
if(res.timezone === 'Asia/Kolkata'){
this.fuelShow = true;
@ -3127,7 +3140,6 @@ selectedlanguage:any
this.fuelShow = false;
}
}
var ls = res.currency_code ;
if(ls !=undefined){
@ -3141,13 +3153,13 @@ selectedlanguage:any
}
},err=>{
console.log(err);
//console.log(err);
})
}
totalOdo(dev){
console.log(dev);
//console.log(dev);
var from = new Date().setHours(0,0,0);
var fd = new Date(from).toISOString();
var to = new Date();
@ -3161,7 +3173,7 @@ selectedlanguage:any
}
var suburl = "/summary/distance?from=" + fd +'&to=' + td + '&user=' + user_id + '&device=' + imei;
this.contactService.get(suburl).subscribe((resp:any) => {
console.log('const ka data =>',resp)
//console.log('const ka data =>',resp)
if(resp){
if(resp.length!=0){
dev.roadShow=false;
@ -3169,12 +3181,12 @@ selectedlanguage:any
// if(this.distanceVariation[0]=="+"){
// var milege=(a/100)*(Number(this.distanceVariation.substring(1)))
// console.log("MILEGE->",milege,'-',a);
// //console.log("MILEGE->",milege,'-',a);
// a=a+milege
// }else{
// var milege=(a/100)*(Number(this.distanceVariation.substring(1)))
// console.log("MILEGE->",milege,'-',a);
// //console.log("MILEGE->",milege,'-',a);
// a=a-milege
// }
@ -3201,10 +3213,10 @@ selectedlanguage:any
}
reload(){
window.localStorage['GetDevData'] = 'True'
// console.log("p1");
// //console.log("p1");
this.superAdmin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin;
this.activatedRoute.queryParams.subscribe((params: Params) => {
// console.log('p3');
// //console.log('p3');
this.aa = params['_status'];
if (this.aa != "OK") {

File diff suppressed because one or more lines are too long

View file

@ -28,7 +28,7 @@
placeholder="Enter Contact number"
[ngClass]="{ 'is-invalid': submitted && f.contactNo.errors }"
/>
<small *ngIf="message">{{ message }}</small>
<small [class.d-none]="!contactMessage">{{contactMessage}}</small>
<div
*ngIf="submitted && f.contactNo.errors"
class="invalid-feedback"
@ -41,25 +41,47 @@
</div>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputEmail4">Owner Name</label> <span>*</span>
<div class="form-group col-md-2">
<label for="inputEmail4">Owner First Name</label> <span>*</span>
<input
formControlName="ownerName"
formControlName="first_name"
type="text"
class="form-control"
id="inputEmail4"
placeholder="Please Enter Owner Name"
[ngClass]="{ 'is-invalid': submitted && f.ownerName.errors }"
placeholder="Enter First Name"
[ngClass]="{ 'is-invalid': submitted && f.first_name.errors }"
/>
<div
*ngIf="submitted && f.ownerName.errors"
*ngIf="submitted && f.first_name.errors"
class="invalid-feedback"
>
<div *ngIf="f.ownerName.errors.required">
Owner Name is required
<div *ngIf="f.first_name.errors.required">
Owner First Name is required
</div>
<div *ngIf="f.ownerName.errors.pattern">
Please enter valid name
<div *ngIf="f.first_name.errors.pattern">
Please enter valid first name
</div>
</div>
</div>
<div class="form-group col-md-2">
<label for="inputEmail4">Owner Last Name</label> <span>*</span>
<input
formControlName="last_name"
type="text"
class="form-control"
id="inputEmail4"
placeholder="Enter Last Name"
[ngClass]="{ 'is-invalid': submitted && f.last_name.errors }"
/>
<div
*ngIf="submitted && f.last_name.errors"
class="invalid-feedback"
>
<div *ngIf="f.last_name.errors.required">
Owner Last Name is required
</div>
<div *ngIf="f.last_name.errors.pattern">
Please enter valid last name
</div>
</div>
</div>
@ -184,6 +206,7 @@
<input
formControlName="device_id"
type="text"
(keyup)="removeSpecialChar()"
class="form-control"
id="inputCity"
[ngClass]="{ 'is-invalid': submitted && f.email.errors }"
@ -200,7 +223,7 @@
<div *ngIf="inventoryManagement" class="form-group col-md-4">
<label for="inputCity">Device ID (IMEI)</label><span>*</span>
<div>
<select id="inventory" multiple="multiple">
<select id="inventory" multiple="multiple">
<option
*ngFor="let option_1 of inventory"
[value]="option_1.IMEI"
@ -209,6 +232,10 @@
</option>
</select>
</div>
<div *ngIf="invalidEmeiSelected" style="margin-top: 0.25rem;
font-size: .875rem;
color: #dc3545;">This IMEI is already added in system. Please choose different IMEI</div>
<div
*ngIf="submitted && f.device_id.errors"
class="invalid-feedback"
@ -216,7 +243,8 @@
<div *ngIf="f.device_id.errors.required">
Device Id is required
</div>
</div>
</div>
</div>
<div class="form-group col-md-4">

View file

@ -1,58 +1,58 @@
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
padding-left: 4px;
padding-right: 3px;
}
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 250px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
padding-left: 4px;
padding-right: 3px;
}
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 250px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}

View file

@ -5,6 +5,7 @@ import { FlashMessagesService } from 'angular2-flash-messages';
import { BsDatepickerConfig, BsModalRef, BsModalService } from 'ngx-bootstrap';
import { ContactService } from '../../contact.service';
import {Location} from '@angular/common';
import { T } from '../../../../node_modules3/@types/lodash/fp';
declare var $:any;
declare var swal: any;
@Component({
@ -15,6 +16,7 @@ declare var swal: any;
export class AddNewDeviceComponent implements OnInit {
DeviceModelValue: any;
modalRef: BsModalRef;
contactMessage= '';
submitted = false;
date=new Date()
expDate:any = new Date(this.date.getFullYear() + 1, this.date.getMonth(), this.date.getDate()).toLocaleString();
@ -188,7 +190,9 @@ export class AddNewDeviceComponent implements OnInit {
}
this.deviceForm=this.fb.group({
ownerName:['',[Validators.required,Validators.pattern("[a-zA-Z][a-zA-Z ]+")]],
//ownerName:['',[Validators.required,Validators.pattern("[a-zA-Z][a-zA-Z ]+")]],
first_name: ['', [Validators.required, Validators.pattern("[a-zA-Z][a-zA-Z ]+")]],
last_name: ['', [Validators.required, Validators.pattern("[a-zA-Z][a-zA-Z ]+")]],
contactNo:['',[Validators.required,Validators.pattern('[0-9 ]{10}')]],
device_id:[''],
address:['',Validators.required],
@ -228,6 +232,7 @@ export class AddNewDeviceComponent implements OnInit {
var that=this
$(document).on('change','#inventory',function() {
var value = $('#inventory').val();
that.checkDeviceEMI(value);
for(var i=0;i<that.inventory.length;i++){
if(value==that.inventory[i].IMEI){
var date=new Date()
@ -244,6 +249,9 @@ export class AddNewDeviceComponent implements OnInit {
sim1:that.inventory[i].Mob1,
sim2:that.inventory[i].Mob2,
eSimExpiry:new Date(exp),
trackingExp: new Date(exp),
device_id:value,
})
that.vahanID=that.inventory[i]['SerialNo']
@ -334,14 +342,14 @@ export class AddNewDeviceComponent implements OnInit {
var expDate = new Date();
expDate.setFullYear(expDate.getFullYear()+1);
var name=this.deviceForm.value.ownerName.split(' ')
//var name=this.deviceForm.value.ownerName.split(' ')
var data={
// Dealer:this.reactiveForm.value.manager,
custumer: true,
expdate:new Date(expDate).toISOString(),
first_name:name[0]?name[0]:'',
last_name:name[1]?name[1]:'',
first_name: this.deviceForm.value.first_name ? this.deviceForm.value.first_name:'',
last_name: this.deviceForm.value.last_name ? this.deviceForm.value.last_name : '',
isDealer: false,
phone:this.deviceForm.value.contactNo,
user_id:"",
@ -439,6 +447,10 @@ export class AddNewDeviceComponent implements OnInit {
if(this.deviceForm.value.eSimExpiry){
newDevice['esim_validity'] = this.deviceForm.value.eSimExpiry
}
if (this.deviceForm.value.trackingExp) {
newDevice['expdate'] = this.deviceForm.value.trackingExp
}
if(this.deviceForm.value.model){
@ -569,7 +581,11 @@ export class AddNewDeviceComponent implements OnInit {
}
}
removeSpecialChar() {
if (this.deviceForm.value.device_id) {
this.deviceForm.controls.device_id.setValue(this.deviceForm.value.device_id.replaceAll(/[^0-9 ]/g, "").replaceAll(' ', ''));
}
}
generatePassword(passwordLength) {
var numberChars = "0123456789";
var upperChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
@ -597,7 +613,7 @@ user
userFound:boolean=false;
onSearchChange(value){
this.userFound=false
this.message=undefined
this.contactMessage = '';
console.log(value);
var phone=this.deviceForm.value.contactNo
if(phone.length==10){
@ -606,20 +622,25 @@ onSearchChange(value){
console.log(res);
if(res.message=="User already Present"){
this.deviceForm.patchValue({
ownerName:res.data[0].first_name?res.data[0].first_name:""+" "+res.data[0].last_name?res.data[0].first_name:'',
//ownerName:res.data[0].first_name?res.data[0].first_name:""+" "+res.data[0].last_name?res.data[0].first_name:'',
first_name: res.data[0].first_name ? res.data[0].first_name : "",
last_name: res.data[0].last_name ? res.data[0].last_name : '',
email:res.data[0].email?res.data[0].email:""
})
this.user=res.data[0]
this.userFound=true;
this.deviceForm.controls.ownerName.disable();
this.deviceForm.controls.first_name.disable();
this.deviceForm.controls.last_name.disable();
this.deviceForm.controls.email.disable();
}else{
this.userFound=false
this.message=res.message
this.contactMessage = res.message
console.log('this.contactMessage', this.contactMessage);
}
},err=>{
console.log(err);
this.message=err.error.message
this.contactMessage=err.error.message
console.log('this.contactMessage err', this.contactMessage);
})
}
@ -693,7 +714,20 @@ onSearchChange(value){
}
invalidEmeiSelected = false;
checkDeviceEMI(id) {
this.contactService.checkDeviceId(id)
.subscribe(res => {
try {
this.invalidEmeiSelected = res['_body'] != 'No device Found';
} catch (error) {
}
})
}
vehData:any;
getvehDetail(){
this.contactService.getvehType(this.userId)
@ -709,6 +743,7 @@ getvehDetail(){
this.loadropdown()
})
}
docRow:boolean=false;
// AddDocumentsField(addedRow:any){
// console.log("Inside function !!!");

View file

@ -15,12 +15,12 @@
</md-option>
</md-select>
<h4 style="display: inline-block;">{{'Vehicles' | translate}}</h4>
<i style="margin-left: 20px;padding-top: 5px;cursor: pointer;float: left;" title="Add Device" class="fas fa-plus" (click)="adddev()" *ngIf="(bussinessType=='0' || bussinessType==undefined)" ></i>
<i style="margin-left: 20px;padding-top: 5px;cursor: pointer;float: left;" title="Add Device" class="fas fa-plus" (click)="adddev()" *ngIf="(showAddButton && (bussinessType=='0' || bussinessType==undefined))" ></i>
<!-- *ngIf="((custtype && ((dealer_Permission == true)||(dealer_Permission === undefined)))||superAdmin) && (bussinessType!=0 || bussinessType==undefined)"></i> -->
<!-- (custtype && ((dealer_Permission == true)||(dealer_Permission === undefined)))||superAdmin||adbtn -->
<i style="margin-left: 20px;padding-top: 5px;cursor: pointer;float: left;" title="Add Device" class="fas fa-plus-circle" (click)="adddevnew()" *ngIf="(bussinessType=='1')"></i>
<!-- *ngIf="((custtype && ((dealer_Permission == true)||(dealer_Permission === undefined)))||superAdmin||adbtn) && bussinessType=='1'"></i> -->
<i style="margin-left: 15px;padding-top: 5px;float: left;" class="fas fa-file-export" title="Export to Excel" (click)="exportExcel()" *ngIf="(bussinessType=='0' || bussinessType==undefined)"></i>
<i style="margin-left: 15px;padding-top: 5px;float: left;" class="fas fa-file-export" title="Export to Excel" (click)="tableToCSV()" *ngIf="(bussinessType=='0' || bussinessType==undefined)"></i>
<i style="margin-left: 15px;padding-top: 5px;float: left;" class="fas fa-file-export" title="Export to Excel" (click)="exportExcel1()" *ngIf="(bussinessType=='1')"></i>
<a *ngIf="showNav" href="https://youtu.be/dg1zd2geHXA" style="float: left;;margin-left: 15px;padding-top: 5px;cursor: pointer;color:white"title="Video tutorial" target="_blank"> <i class="fas fa-video"></i> </a>

View file

@ -18,7 +18,7 @@ import { Params,Router, ActivatedRoute, CanActivate, ActivatedRouteSnapshot, Rou
import {ContactService} from '../contact.service';
import { checkNoChangesNode } from '@angular/core/src/view/view';
import { SpeednotifyComponent } from '../dashboard/speednotify/speednotify.component';
import { SidebarComponent } from '../sidebar/sidebar.component';
//import { SidebarComponent } from '../sidebar/sidebar.component';
import { MyaccountComponent } from '../myaccount/myaccount.component';
import {DatainjectionService} from '../datainjection.service'
import { isUndefined } from 'util';
@ -165,22 +165,25 @@ modelChanged: Subject<string> = new Subject<string>();
}
bussinessType;
showButton:Boolean=false
showButton:Boolean=false;
showAddButton:Boolean=false;
ngOnInit() {
// this.updateFieldswithvalue()
this.showDemoVideo();
this.socket_Ing = this.injectData.getSocket_gps();
// this.from_date = new Date();
// this.from_date.setDate(1);
// this.to_date = new Date();
if (localStorage.getItem('addDev') == 'yes' || JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin || JSON.parse(window.atob(window.localStorage.token.split('.')[1])).isDealer){
this.showAddButton=true;
}else{
this.showAddButton = false;
}
this.bsConfig = Object.assign({ dateInputFormat: 'DD-MM-YYYY, h:mm:ss a' }, { containerClass: this.colorTheme });
//io.connect('https://www.oneqlik.in/gps', { secure: true, rejectUnauthorized: false, transports: ["polling"], upgrade: false });
this.socket_Ing.on('connect', function (this) {
// console.log('Ignition IO Connected');
})
// this.socket_Ing.on('connect', function (this) {
// // console.log('Ignition IO Connected');
// })
this.superAdmin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin;
this.adbtn = localStorage.getItem("dlrchk");
this.bussinessType=JSON.parse(window.atob(window.localStorage.token.split(".")[1])).bussinessType
@ -995,6 +998,11 @@ dealerTocust:any;
for(var j=0;j<this.deviceData.length;j++){
// this.deviceData[j].userContactNumber = this.deviceData[j].user && this.deviceData[j].user.phone ? this.deviceData[j].user.phone : 'n/a'
if(this.deviceData[j].status_updated_at==undefined){
let dev_status_1= this.deviceData[j].status?this.deviceData[j].status:"Not available";
this.deviceData[j].status = dev_status_1 ;
@ -1550,10 +1558,11 @@ testTable() {
"render": function(data, type, row) {
var fn = data?data.first_name:'-' ;
var ln = data?data.last_name:'-'
return fn + ' ' + ln ;
var ln = data && data.last_name?data.last_name:'';
let ph = data && data.phone ? ' (' + data.phone +')' : ''
return fn + ' ' + ln + '' + ph;
}
},
},
{
"data": "created_by",
"defaultContent": "",
@ -1582,7 +1591,7 @@ testTable() {
"visible" :true,
"render": function(data, type, row) {
var createdDate = new Date(data);
return data ? (moment(createdDate).format('LL')) : "";
return data ? (moment(createdDate).format('DD/MM/YYYY')) : "";
}
},
{
@ -1591,7 +1600,7 @@ testTable() {
"visible" :true,
"render": function(data, type, row) {
var expDate = new Date(data);
return data ? (moment(expDate).format('LL')) : "";
return data ? (moment(expDate).format('DD/MM/YYYY')) : "";
}
},
{
@ -1600,7 +1609,7 @@ testTable() {
"visible" :true,
"render": function(data, type, row) {
var expDate = new Date(data);
return data ? (moment(expDate).format('LL')) : "";
return data ? (moment(expDate).format('DD/MM/YYYY')) : "";
}
},
{
@ -1648,7 +1657,7 @@ testTable() {
"defaultContent": "",
"render": function(data, type, row) {
var expDate = new Date(data);
return data ? (moment(expDate).format('lll')) : "";
return data ? (moment(expDate).format('DD/MM/YYYY hh:mm:ss')) : "";
}
},
{
@ -1826,6 +1835,7 @@ exportCertificate(data){
dialogRef.afterClosed().subscribe(result => {
// console.log(result);
// if (result == "advance") {
@ -1894,7 +1904,72 @@ exportCertificate(data){
}
tab:any;
tableToCSV() {
// Variable to store the final csv data
var csv_data = [];
// Get each row data
var rows = document.getElementsByTagName('tr');
var isHeaderSelected = false;
for (var i = 0; i < rows.length; i++) {
console.log(rows[i]);
// Get each column data
var cols = !isHeaderSelected ? rows[i].querySelectorAll('td,th') : rows[i].querySelectorAll('td');
if (!isHeaderSelected) {
isHeaderSelected = (rows[i].querySelectorAll('th')).length ? true : false;
}
// Stores each csv row data
var csvrow = [];
if (cols.length) {
for (var j = 0; j < cols.length -7; j++) {
// Get the text data of each cell
// of a row and push it to csvrow
csvrow.push(cols[j].innerHTML ? cols[j].innerHTML.replace(/,/g, ";"):' ');
}
// Combine each column value with comma
csv_data.push(csvrow.join(","));
}
}
// Combine each row data with new line character
let newcsv_data = csv_data.join('\n');
// Call this function to download csv file
this.downloadCSVFile(newcsv_data);
}
downloadCSVFile(csv_data) {
// Create CSV file object and feed
// our csv_data into it
let CSVFile = new Blob([csv_data], {
type: "text/csv"
});
// Create to temporary link to initiate
// download process
var temp_link = document.createElement('a');
// Download csv file
temp_link.download = "Vehicle.csv";
var url = window.URL.createObjectURL(CSVFile);
temp_link.href = url;
// This link should not be displayed
temp_link.style.display = "none";
document.body.appendChild(temp_link);
// Automatically click the link to
// trigger download
temp_link.click();
document.body.removeChild(temp_link);
}
exportExcel1() {
var data = this.devicess.devices
@ -1913,7 +1988,8 @@ exportCertificate(data){
}
if (data[i].user) {
var name1 = data[i].user.first_name ? data[i].user.first_name : "" + " " + data[i].user.last_name ? data[i].user.last_name : ""
data[i].customerName = name1;
let ph = data[i].user && data[i].user.phone ? ' (' + data[i].user.phone + ')' : ''
data[i].customerName = name1 + ph;
data[i].customerId = data[i].imageDoc[0] ? data[i].imageDoc[0].phone ? data[i].imageDoc[0].phone : "" :""
}
@ -2015,41 +2091,72 @@ exportCertificate(data){
}
exportExcel() {
var tab_text="<table border='2px'><tr bgcolor='#87AFC6'>";
var textRange; var j=0;
this.tab = document.getElementById('deviceTable1'); // id of table
// console.log(this.tab.rows.length)
var rowlength = 4;
if((this.superAdmin ==true)||(this.custtype ==true)||(this.dealerTocust=='ON')){
var rowlength = 6;
window.open('data:application/csv,charset=utf-8,' + $('#deviceTable1').html());
var tab_text = "<table border='2px'><tr bgcolor='#87AFC6'>";
var textRange; var j = 0;
var table = $('#deviceTable1').clone();
table[0].querySelector("thead").remove();
console.log(table[0].querySelector("thead"));
table[0].prepend($(".dataTable thead").clone()[0]);
this.tab = table[0];//document.getElementById('deviceTable'); // id of table
for (j = 0; j < this.tab.rows.length; j++) {
tab_text = tab_text + this.tab.rows[j].innerHTML + "</tr>";
//tab_text=tab_text+"</tr>";
}
for(j = 0 ; j < this.tab.rows.length; j++)
{
tab_text=tab_text+this.tab.rows[j].innerHTML+"</tr>";
//tab_text=tab_text+"</tr>";
}
$('table tr').find('td:eq(20),th:eq(20)').remove();
$('table tr').find('td:eq(21),th:eq(21)').remove();
tab_text=tab_text+"</table>";
tab_text= tab_text.replace(/<A[^>]*>|<\/A>/g, "");//remove if u want links in your table
tab_text= tab_text.replace(/<img[^>]*>/gi,""); // remove if u want images in your table
tab_text= tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); // reomves input params
// tab_text= tab_text.replace(/<th>Edit</th>/gi, ""); // reomves input params
// console.log(tab_text);
tab_text = tab_text + "</table>";
tab_text = tab_text.replace(/<A[^>]*>|<\/A>/g, "");//remove if u want links in your table
tab_text = tab_text.replace(/<img[^>]*>/gi, ""); // remove if u want images in your table
tab_text = tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); // reomves input params
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
var sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));
var msie = ua.indexOf("MSIE ");
tab_text = tab_text.replace(/\s{2,}/g, '') // <-- Replace all consecutive spaces, 2+
.replace(/%/g, '%25') // <-- Escape %
.replace(/&/g, '%26') // <-- Escape &
.replace(/#/g, '%23') // <-- Escape #
.replace(/"/g, '%22') // <-- Escape "
.replace(/'/g, '%27');
console.log(tab_text.length, 32767 < tab_text.length);
var sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));
return (sa);
// var tab_text="<table border='2px'><tr bgcolor='#87AFC6'>";
// var textRange; var j=0;
// this.tab = document.getElementById('deviceTable1'); // id of table
// // console.log(this.tab.rows.length)
// var rowlength = 4;
// if((this.superAdmin ==true)||(this.custtype ==true)||(this.dealerTocust=='ON')){
// var rowlength = 6;
// }
// for(j = 0 ; j < this.tab.rows.length; j++)
// {
// tab_text=tab_text+this.tab.rows[j].innerHTML+"</tr>";
// //tab_text=tab_text+"</tr>";
// }
// $('table tr').find('td:eq(20),th:eq(20)').remove();
// $('table tr').find('td:eq(21),th:eq(21)').remove();
// tab_text=tab_text+"</table>";
// tab_text= tab_text.replace(/<A[^>]*>|<\/A>/g, "");//remove if u want links in your table
// tab_text= tab_text.replace(/<img[^>]*>/gi,""); // remove if u want images in your table
// tab_text= tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); // reomves input params
// // tab_text= tab_text.replace(/<th>Edit</th>/gi, ""); // reomves input params
// // console.log(tab_text);
// var ua = window.navigator.userAgent;
// var msie = ua.indexOf("MSIE ");
// var sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));
// return (sa);
}
dateChange(id){
@ -2060,7 +2167,7 @@ exportCertificate(data){
}
pageLength:any;
pageLengthArr=[10,25,50,100,200,500,"All"];
pageLengthArr=[10,25,50,100,200,500,1000,2000,5000];
callDataTable(){
this.customDatafilter = true;
this.skip = 0;

View file

@ -180,7 +180,7 @@
src="{{ org.imageDoc }}"
width="100px"
height="100px"
/><br /><br />
/><br />
</div>
</td>
<td style="text-align: center; font-weight: 700">
@ -190,28 +190,28 @@
</td>
<td style="text-align: center">
<div>
<img src="{{ imgURL }}" width="100px" height="150px" />
<img src="{{ imgURL }}" width="100px" height="100px" />
</div>
</td>
</tr>
<tr>
<td colspan="3" style="text-align: center">
<h6 style="font-size: 18px">&nbsp;&nbsp;.</h6>
</td>
</tr>
<tr>
<td>
<td width="200">
TAC Reg.No &nbsp;&nbsp;&nbsp; <br />
CoP No.&nbsp;&nbsp;&nbsp;&nbsp;<br />
CoP Validity upto&nbsp;&nbsp;<br />
Fitment Date&nbsp;&nbsp;&nbsp;<br />
Fitment Renewal Date&nbsp;&nbsp;<br />
</td>
<td>
<td colspan="2">
: CK8077 <br />
: CC0GP8551<br />
: 30 September 2022 <br />
: CC0GR8739<br />
: 30 September 2023 <br />
: {{ kycApprovalDate ? (kycApprovalDate | date: "dd/MM/yyyy") : ""
}}<br />
: {{ esim_validity ? esim_validity : "" }}<br />
@ -219,7 +219,7 @@
</tr>
<tr>
<td colspan="3">
<h6 style="font-size: 18px; margin: 20px 0 10px 0px">
<h6 style="font-size: 18px; margin: 15px 0 5px 0px">
AIS 140 COMPLIANCE VLT INSTALLATION CERTIFICATE
</h6>
</td>
@ -247,7 +247,7 @@
Secondary SIM<br />
Secondary SIM Valid till<br />
</td>
<td>
<td colspan="2">
: {{ fitmentCertificateNo ? fitmentCertificateNo : "" }}<br />
: {{ ChassisNo ? ChassisNo : "" }}<br />
: {{ engineNo ? engineNo : "" }}<br />
@ -265,35 +265,38 @@
: {{ gsmModule ? gsmModule : "Telit GE910" }}<br />
: {{ ICCICD ? ICCICD : "" }}<br />
: {{ simNum ? simNum : "" }}<br />
: {{ expiration_date ? (expiration_date | date: "dd/MM/yyyy") : ""
: {{ esim_validity ? (esim_validity) : ""
}}<br />
: {{ simNum1 ? simNum1 : "" }}<br />
: {{ expiration_date ? (expiration_date | date: "dd/MM/yyyy") : ""
: {{ esim_validity ? (esim_validity) : ""
}}<br />
</td>
</tr>
<tr style="padding-top: 10px">
<tr style="padding-top: 5px">
<td>
<img
src="{{ deviceImage[0] ? deviceImage[0] : img1 }}"
width="90px"
height="90px"
/>
</td>
<td>
<img
src="{{ deviceImage[0] ? deviceImage[0] : img1 }}"
width="80px"
height="80px"
/>
<img
src="{{ deviceImage[1] ? deviceImage[1] : img1 }}"
width="90px"
height="90px"
width="80px"
height="80px"
/>
<img
src="{{ deviceImage[2] ? deviceImage[2] : img1 }}"
width="80px"
height="80px"
/>
</td>
<td>
<img
src="{{ deviceImage[2] ? deviceImage[2] : img1 }}"
width="90px"
height="90px"
/>
</td>
</tr>
<tr>
@ -305,10 +308,10 @@
</p>
</td>
</tr>
<tr style="padding-top: 10px">
<tr style="padding-top: 5px">
<td>Authorised</td>
</tr>
<tr style="padding-top: 10px">
<tr style="padding-top: 5px">
<td>Undertaking</td>
</tr>
<tr>
@ -322,20 +325,20 @@
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center; margin-top: 10px">
<td colspan="1" style="text-align: center; margin-top: 5px">
Customer Name : {{ user.first_name ? user.first_name : "" }}
{{ user.last_name ? user.last_name : "" }}<br />
Contact/Login ID : {{ user.phone ? user.phone : "" }}
</td>
<td>
<td colspan="1">
Customer Address: {{ user.address ? user.address : "" }}<br />
Customer Sign :
</td>
<td></td>
</tr>
</table>
</md-dialog-content>
<md-dialog-actions align="end">
<button md-button md-dialog-close>Cancel</button>
<button md-button md-dialog-close >Cancel</button>
<button md-button (click)="exportAsPdf()" cdkFocusInitial>Export PDF</button>
</md-dialog-actions>

View file

@ -1,4 +1,4 @@
.html2canvas-container {
width: 3000px !important;
height: 3000px !important;
}
.html2canvas-container {
width: 3000px !important;
height: 3000px !important;
}

View file

@ -1,39 +1,39 @@
import { Component, Inject, OnInit } from '@angular/core';
import { MdDialogRef, MD_DIALOG_DATA } from '@angular/material';
declare var jsPDF : any;
declare var html2canvas:any;
declare var jsPDF: any;
declare var html2canvas: any;
import * as moment from 'moment';
import { ContactService } from '../../contact.service';
declare var $: any;
declare var QRious:any;
declare var QRious: any;
@Component({
selector: 'app-download-certificate',
templateUrl: './download-certificate.component.html',
styleUrls: ['./download-certificate.component.scss']
})
export class DownloadCertificateComponent implements OnInit {
devName:any;
img1='/assets/images/liveTrackIcons/noImageAvailableIcon.jpg'
stamp='/assets/images/liveTrackIcons/Stamp.png'
phNum:any;
createdOn:any;
expOn:any;
supAdmin
DealerObj = [];
userObj = [];
// iconType:any;
simNum:any;
todayODO:any;
totalODO:any;
useridd: any;
emailId:any ="";
costumers: any = [];
deviceID: any;
userName:any;
devmodel:any;
newUserArr=[];
editTemplate:boolean=true;
deletetemplate:boolean=false;
devName: any;
img1 = '/assets/images/liveTrackIcons/noImageAvailableIcon.jpg'
stamp = '/assets/images/liveTrackIcons/Stamp.png'
phNum: any;
createdOn: any;
expOn: any;
supAdmin
DealerObj = [];
userObj = [];
// iconType:any;
simNum: any;
todayODO: any;
totalODO: any;
useridd: any;
emailId: any = "";
costumers: any = [];
deviceID: any;
userName: any;
devmodel: any;
newUserArr = [];
editTemplate: boolean = true;
deletetemplate: boolean = false;
orignalEmail: any;
initialUser: any;
ExportPdf: boolean;
@ -67,14 +67,14 @@ deletetemplate:boolean=false;
numberOfSOS: any;
expiration_date: any;
organisationFlag: any;
distributerName:any;
distSelect: any=[];
distributerName: any;
distSelect: any = [];
superAdmin: any;
isDealer: any;
dealerId: any;
lastPingOn:any
lastDeviceTime:any
deviceImage=[];
lastPingOn: any
lastDeviceTime: any
deviceImage = [];
dealerName
installationDate;
ICCICD
@ -94,121 +94,122 @@ deletetemplate:boolean=false;
img: HTMLImageElement;
gnnsModule
gsmModule
constructor(public dialogRef: MdDialogRef<DownloadCertificateComponent>,private contactService:ContactService,
@Inject(MD_DIALOG_DATA) public data: any ) {
console.log(data);
}
constructor(public dialogRef: MdDialogRef<DownloadCertificateComponent>, private contactService: ContactService,
@Inject(MD_DIALOG_DATA) public data: any) {
console.log(data);
}
ngOnInit() {
this.org=JSON.parse(localStorage.getItem('ORG'))
if(!this.data.deviceInfo.esim_validity){
if(this.data.deviceInfo.License=="Yearly"){
this.esim_validity=this.data.deviceInfo.kycApprovalDate?moment(new Date(this.data.deviceInfo.kycApprovalDate), "DD-MM-YYYY").add(1, 'years').format("DD/MM/YYYY"):undefined;
this.org = JSON.parse(localStorage.getItem('ORG'))
if (!this.data.deviceInfo.esim_validity) {
if (this.data.deviceInfo.License == "Yearly") {
this.esim_validity = this.data.deviceInfo.kycApprovalDate ? moment(new Date(this.data.deviceInfo.kycApprovalDate), "DD/MM/YYYY").add(1, 'years').format("DD/MM/YYYY") : undefined;
}
}else{
this.esim_validity=this.data.deviceInfo.esim_validity?moment(new Date(this.data.deviceInfo.esim_validity)).format("DD/MM/YYYY"):undefined
} else {
this.esim_validity = this.data.deviceInfo.esim_validity ? moment(new Date(this.data.deviceInfo.esim_validity)).format("DD/MM/YYYY") : undefined
}
this.fitmentCertificateNo=this.data.deviceInfo.fitmentCertificateNo;
this.ChassisNo=this.data.deviceInfo.ChassisNo;
this.lastDeviceTime=this.data.deviceInfo.last_device_time;
this.numberOfSOS=this.data.deviceInfo.numberOfSOS
this.kycApprovalDate=this.data.deviceInfo.kycApprovalDate
this.model=this.data.deviceInfo.Model
this.lastPingOn=this.data.deviceInfo.last_ping_on
this.fitmentCertificateNo = this.data.deviceInfo.fitmentCertificateNo;
this.ChassisNo = this.data.deviceInfo.ChassisNo;
this.lastDeviceTime = this.data.deviceInfo.last_device_time;
this.numberOfSOS = this.data.deviceInfo.numberOfSOS
this.kycApprovalDate = this.data.deviceInfo.kycApprovalDate
this.model = this.data.deviceInfo.Model
this.lastPingOn = this.data.deviceInfo.last_ping_on
this.devName = this.data.deviceInfo.Device_Name;
this.devID = this.data.deviceInfo.Device_ID?this.data.deviceInfo.Device_ID:"";
this.phNum =this.data.deviceInfo.contact_number;
this.createdOn = this.data.deviceInfo.created_on?(new Date(this.data.deviceInfo.created_on).toISOString()):"";
this.expOn = this.data.deviceInfo.expiration_date?(new Date(this.data.deviceInfo.expiration_date).toISOString()):"";
this.devID = this.data.deviceInfo.Device_ID ? this.data.deviceInfo.Device_ID : "";
this.phNum = this.data.deviceInfo.contact_number;
this.createdOn = this.data.deviceInfo.created_on ? (new Date(this.data.deviceInfo.created_on).toISOString()) : "";
this.expOn = this.data.deviceInfo.expiration_date ? (new Date(this.data.deviceInfo.expiration_date).toISOString()) : "";
// this.iconType=this.data.deviceInfo.iconType;
this.simNum =this.data.deviceInfo.sim_number;
this.simNum1 =this.data.deviceInfo.sim_number2;
this.orignalEmail = this.data.deviceInfo.Email_ID
this.simNum = this.data.deviceInfo.sim_number;
this.simNum1 = this.data.deviceInfo.sim_number2;
this.orignalEmail = this.data.deviceInfo.Email_ID
this.emailId = this.data.deviceInfo.Email_ID;
this.deviceImage=this.data.deviceInfo.deviceImage
if(this.org.imageDoc && this.org.imageDoc.length>0){
this.org.imageDoc='https://www.oneqlik.in' + this.org.imageDoc[0].substring(6)
this.deviceImage = this.data.deviceInfo.deviceImage
if (this.org.imageDoc && this.org.imageDoc.length > 0) {
this.org.imageDoc = 'https://www.oneqlik.in' + this.org.imageDoc[0].substring(6)
}
this.supAdmin=this.data.deviceInfo.supAdmin;
if(this.supAdmin.imageDoc && this.supAdmin.imageDoc.length>0){
this.supAdmin.imageDoc='https://www.oneqlik.in' + this.supAdmin.imageDoc[0].substring(6)
this.supAdmin = this.data.deviceInfo.supAdmin;
if (this.supAdmin.imageDoc && this.supAdmin.imageDoc.length > 0) {
this.supAdmin.imageDoc = 'https://www.oneqlik.in' + this.supAdmin.imageDoc[0].substring(6)
}
console.log(this.deviceImage);
this.installationDate=this.data.deviceInfo.created_on
this.todayODO=this.data.deviceInfo.today_odo;
this.totalODO =this.data.deviceInfo.total_odo;
console.log(this.deviceImage);
this.installationDate = this.data.deviceInfo.created_on
this.todayODO = this.data.deviceInfo.today_odo;
this.totalODO = this.data.deviceInfo.total_odo;
this.deviceID = this.data.deviceInfo.Device_ID;
this.initialUser = this.data.deviceInfo.user._id;
this.user=this.data.deviceInfo.user
this.user = this.data.deviceInfo.user
this.userName = this.data.deviceInfo.OwnerName;
this.userAddress = this.data.deviceInfo?this.data.deviceInfo.user.address:"";
this.dealerName = this.data.deviceInfo.Dealer_name ;
this.dealerId = this.data.deviceInfo.Dealer?this.data.deviceInfo.Dealer._id : "";
console.log('this.dealerId',this.dealerId);
this.userAddress = this.data.deviceInfo ? this.data.deviceInfo.user.address : "";
this.dealerName = this.data.deviceInfo.Dealer_name;
this.dealerId = this.data.deviceInfo.Dealer ? this.data.deviceInfo.Dealer._id : "";
console.log('this.dealerId', this.dealerId);
this.dealerAddress = this.data.deviceInfo.DealerAddress;
this.InvoiceDate = this.data.deviceInfo.invoiceDate?(new Date(this.data.deviceInfo.invoiceDate).toISOString()):"";
this.InvoiceDate = this.data.deviceInfo.invoiceDate ? (new Date(this.data.deviceInfo.invoiceDate).toISOString()) : "";
this.invoiceNum = this.data.deviceInfo.invoiceNumber
this.CID_No = this.data.deviceInfo.CID_No
this.devicetype = this.data.deviceInfo.device_model?this.data.deviceInfo.device_model.device_type:"";
if(this.devicetype=="Nippon-NVT-1820"){
this.gsmModule='Telit GE910'
}else if(this.devicetype=="Nippon-NVT-1820"){
this.gnnsModule="Telit, Jupiter SL869T3-| Nav|C/IRNSS";
this.gsmModule='Telit GE910'
}else{
this.gnnsModule="Quectel L89(GPS+IRNSS)";
this.gsmModule='Quectel M66'
this.devicetype = this.data.deviceInfo.device_model ? this.data.deviceInfo.device_model.device_type : "";
if (this.devicetype == "Nippon-NVT-1820") {
this.gsmModule = 'Telit GE910'
} else if (this.devicetype == "Nippon-NVT-1820") {
this.gnnsModule = "Telit, Jupiter SL869T3-| Nav|C/IRNSS";
this.gsmModule = 'Telit GE910'
} else {
this.gnnsModule = "Quectel L89(GPS+IRNSS)";
this.gsmModule = 'Quectel M66'
}
for(var i=0;i<this.deviceImage.length;i++){
this.deviceImage[i] = this.deviceImage[i] && this.deviceImage[i]!=""?'http://nipponsecura.in' + this.deviceImage[i].substring(6):''
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) : ''
}
this.ICCICD = this.data.deviceInfo.IccidNo;
this.IMSI = this.data.deviceInfo.IMSI;
this.uniqueID = this.data.deviceInfo.uniqueID;
this.fitmentDate = this.data.deviceInfo.fitmentDate?new Date(this.data.deviceInfo.fitmentDate):"";
this.expiration_date =this.data.deviceInfo.expiration_date?new Date(this.data.deviceInfo.expiration_date):"";
this.fitmentDate = this.data.deviceInfo.fitmentDate ? new Date(this.data.deviceInfo.fitmentDate) : "";
this.expiration_date = this.data.deviceInfo.expiration_date ? new Date(this.data.deviceInfo.expiration_date) : "";
this.engineNo = this.data.deviceInfo.engineNo;
this.typeOfVehicle = this.data.deviceInfo.typeOfVehicle;
this.manufacturingCompany = this.data.deviceInfo.manufacturingCompany;
this.vahanID= this.data.deviceInfo.vahanID?this.data.deviceInfo.vahanID:'';
this.lastFitnessDate = this.data.deviceInfo.lastFitnessDate?new Date(this.data.deviceInfo.lastFitnessDate):"";
this.vehicleRegDate = this.data.deviceInfo.vehicleRegDate? new Date(this.data.deviceInfo.vehicleRegDate):"";
this.vehicleManufacturingDate = this.data.deviceInfo.vehicleManufacturingDate?new Date(this.data.deviceInfo.vehicleManufacturingDate):"";
this.lattitude = this.data.deviceInfo.last_loc?this.data.deviceInfo.last_loc.coordinates[0]:"";
this.longitude = this.data.deviceInfo.last_loc?this.data.deviceInfo.last_loc.coordinates[1]:"";
this.getLocationLink()
var that=this
this.myImage = new Image();
this.myImage.src = this.deviceImage[0]?this.deviceImage[0]:this.img1;
this.myImage.crossOrigin="anonymous";
this.vahanID = this.data.deviceInfo.vahanID ? this.data.deviceInfo.vahanID : '';
this.lastFitnessDate = this.data.deviceInfo.lastFitnessDate ? new Date(this.data.deviceInfo.lastFitnessDate) : "";
this.vehicleRegDate = this.data.deviceInfo.vehicleRegDate ? new Date(this.data.deviceInfo.vehicleRegDate) : "";
this.vehicleManufacturingDate = this.data.deviceInfo.vehicleManufacturingDate ? new Date(this.data.deviceInfo.vehicleManufacturingDate) : "";
this.lattitude = this.data.deviceInfo.last_loc ? this.data.deviceInfo.last_loc.coordinates[0] : "";
this.longitude = this.data.deviceInfo.last_loc ? this.data.deviceInfo.last_loc.coordinates[1] : "";
this.getLocationLink()
var that = this
this.myImage = new Image();
this.myImage.src = this.deviceImage[0] ? this.deviceImage[0] : this.img1;
this.myImage.crossOrigin = "anonymous";
this.myImage1 = new Image();
this.myImage1.src = this.deviceImage[1]?this.deviceImage[1]:this.img1;
this.myImage1.crossOrigin="anonymous";
this.myImage1.src = this.deviceImage[1] ? this.deviceImage[1] : this.img1;
this.myImage1.crossOrigin = "anonymous";
this.myImage2 = new Image();
this.myImage2.src = this.deviceImage[2]?this.deviceImage[2]:this.img1;
this.myImage2.crossOrigin="anonymous";
this.myImage2.src = this.deviceImage[2] ? this.deviceImage[2] : this.img1;
this.myImage2.crossOrigin = "anonymous";
this.stamp1=new Image();
this.stamp1.src=this.stamp;
this.stamp1.crossOrigin="anonymous";
this.stamp1 = new Image();
this.stamp1.src = this.stamp;
this.stamp1.crossOrigin = "anonymous";
this.img = new Image();
this.img.src = this.org.imageDoc?this.org.imageDoc:'';
this.img.crossOrigin="anonymous";
this.img.src = this.org.imageDoc ? this.org.imageDoc : '';
this.img.crossOrigin = "anonymous";
// one()
// function one(){
// stamp.onload = function(){
// two()
// doc.addImage(stamp , 'png', 15,210,30,30);
// };
@ -227,7 +228,7 @@ deletetemplate:boolean=false;
// myImage.onload = function(){
// console.log("1");
// doc.addImage(myImage , 'png', 40, 170, 30, 20);
// };
// }
@ -242,11 +243,11 @@ deletetemplate:boolean=false;
// function five(){
// myImage2.onload = function(){
// console.log("3");
// doc.addImage(myImage2 , 'png', 120, 170, 30, 20);
// doc.save(name);
// };
// }
@ -264,70 +265,73 @@ deletetemplate:boolean=false;
// img.onload = function(){
// console.log("-1");
// doc.addImage(img , 'png', 15, 9,50,40)
// };doc.addImage(myImage , 'png', 40, 170, 30, 20);
function f1() {
return new Promise((resolve, reject) => {
that.myImage.onload = function(){
console.log("1");
};
// var isLoaded = this.myImage.complete && this.myImage.naturalHeight !== 0;
// if(isLoaded)
resolve('');
});
}
return new Promise((resolve, reject) => {
that.myImage.onload = function () {
console.log("1");
};
// var isLoaded = this.myImage.complete && this.myImage.naturalHeight !== 0;
// if(isLoaded)
resolve('');
});
}
function f3() {
that.myImage2.onload = function () {
console.log("3");
function f3(){
that.myImage2.onload = function(){
console.log("3");
};
}
}
function f2() {
return new Promise((resolve, reject) => {
that.myImage1.onload = function(){
console.log("2");
// doc.addImage(myImage1 , 'png', 80, 170, 30, 20);
// if(that.deviceImage.length==2){
// doc.save(name);
// }
function f2() {
return new Promise((resolve, reject) => {
that.myImage1.onload = function () {
console.log("2");
// doc.addImage(myImage1 , 'png', 80, 170, 30, 20);
// if(that.deviceImage.length==2){
// doc.save(name);
// }
};
// var isLoaded = this.myImage1.complete && this.myImage1.naturalHeight !== 0;
// if(isLoaded)
resolve('');
})
}
f1().then(res => f2().then(res1 => f3()));
}
closePopup() {
this.dialogRef.close(1);
}
getLocationLink() {
var data = {
id: this.data.deviceInfo._id,
imei: this.data.deviceInfo.Device_ID,
sh: this.data.deviceInfo.user._id,
ttl: 15 * 60
};
// var isLoaded = this.myImage1.complete && this.myImage1.naturalHeight !== 0;
// if(isLoaded)
resolve('');
this.contactService.shareLiveLocation(data).subscribe(res => {
console.log(res);
console.log('shareToken', res);
this.link = 'http://nipponsecura.in' + "/share/liveShare?t=" + res.t;
console.log(this.link);
// this.shareLocationToDevice(link);
this.qrCodeGenerator()
}, err => {
console.log(err);
})
}
f1().then(res => f2().then(res1=>f3()));
}
getLocationLink(){
var data = {
id: this.data.deviceInfo._id,
imei: this.data.deviceInfo.Device_ID,
sh: this.data.deviceInfo.user._id,
ttl: 15*60
};
qrCodeGenerator() {
this.contactService.shareLiveLocation(data).subscribe(res=>{
console.log(res);
console.log('shareToken',res);
this.link = 'http://nipponsecura.in' + "/share/liveShare?t=" + res.t;
console.log(this.link);
// this.shareLocationToDevice(link);
this.qrCodeGenerator()
},err=>{
console.log(err);
})
}
qrCodeGenerator() {
var qr = new QRious();
qr.set({
// background: 'green',
@ -339,16 +343,16 @@ f1().then(res => f2().then(res1=>f3()));
size: 500,
value: this.link
});
this.imgURL= qr.toDataURL();
this.imgURL = qr.toDataURL();
}
exportAsPdf() {
var that=this
var name="Installation Certificate "+this.devName?this.devName:"Test"+".pdf"
var that = this
var name = "Installation Certificate " + this.devName ? this.devName : "Test" + ".pdf"
console.log(this.imgURL);
var doc = new jsPDF();
var specialElementHandlers = {
@ -356,91 +360,93 @@ f1().then(res => f2().then(res1=>f3()));
return true;
}
};
var stamp=new Image();
stamp.src=that.stamp;
stamp.crossOrigin="anonymous";
// stamp.onload = function(){
console.log("0");
doc.addImage(that.stamp1 , 'png', 15,210,30,30)
// };
var stamp = new Image();
stamp.src = that.stamp;
stamp.crossOrigin = "anonymous";
// stamp.onload = function(){
console.log("0");
doc.setPage(1);
doc.addImage(that.stamp1, 'png', 15, 210, 30, 30)
// };
var img = new Image();
img.src = this.org.imageDoc?this.org.imageDoc:'';
img.crossOrigin="anonymous";
// if(this.org.imageDoc){
// img.onload = function(){
console.log("-1");
doc.addImage(that.img , 'png', 15, 9,50,40)
// };
img.src = this.org.imageDoc ? this.org.imageDoc : '';
img.crossOrigin = "anonymous";
// if(this.org.imageDoc){
// img.onload = function(){
console.log("-1");
doc.setPage(1);
doc.addImage(that.img, 'png', 15, 9, 50, 40)
// };
// doc.text("Customer Copy", 110, 12);
doc.setFontSize(3);
doc.autoTable({
theme: 'plain',
html: '#testPdf',
tableWidth: 'auto',
html: '#testPdf',
tableWidth: 'auto',
// styles : {
// cellWidth : 10,
// overflow: "linebreak"
// },
willDrawCell: data => {
if(data.row.index === 0){
data.row.height = 30;
doc.setFontStyle('bold');
if (data.row.index === 0) {
data.row.height = 30;
doc.setFontStyle('bold');
data.row.cells[0].styles.halign = 'center';
data.row.cells[0].styles.fontSize = 25;
data.row.cells[0].styles.overflow= "linebreak"
data.row.cells[0].styles.lineHeight= "2.5";
data.row.cells[0].styles.overflow = "linebreak"
data.row.cells[0].styles.lineHeight = "1.5";
// doc.setLineHeightFactor()
// }
// doc.addImage(this.supAdmin.imageDoc,'JPEG', 140, 9,40,40);
doc.addImage(this.imgURL,'JPEG',150, 9,50,40);
}
if(data.row.index ===1 ){
// data.row.cells[0].styles.halign = 'center';
doc.setPage(1);
doc.addImage(this.imgURL, 'JPEG', 150, 9, 50, 40);
}
if (data.row.index === 1) {
// data.row.cells[0].styles.halign = 'center';
doc.halign = 'center';
doc.setFontStyle('bold');
doc.cellPadding=60
doc.setFontStyle('bold');
doc.cellPadding = 50
}
if(data.row.index ===3 ){
// data.row.cells[0].styles.halign = 'center';
if (data.row.index === 3) {
// data.row.cells[0].styles.halign = 'center';
doc.halign = 'center';
}
if( data.row.index ===6){
// data.row.cells[0].styles.halign = 'center';
if (data.row.index === 6) {
// data.row.cells[0].styles.halign = 'center';
doc.halign = 'center';
}
if((data.row.index ===1) ||(data.row.index ===3) || (data.row.index ===5) || (data.row.index ===7) ||(data.row.index ===8) ||(data.row.index ===11) || (data.row.index ===13)){
doc.setFontStyle('bold');
if ((data.row.index === 1) || (data.row.index === 3) || (data.row.index === 5) || (data.row.index === 7) || (data.row.index === 8) || (data.row.index === 11) || (data.row.index === 13)) {
doc.setFontStyle('bold');
}
if(data.row.index ===5){
data.row.height = 30;
if (data.row.index === 5) {
data.row.height = 25;
// data.row.cells[0].styles.halign = 'center';
// doc.halign = 'center';
}
if(data.row.index ===6){
data.row.height = 45;
if (data.row.index === 6) {
data.row.height = 40;
// data.row.cells[0].styles.halign = 'center';
// doc.halign = 'center';
}
doc.setLineWidth(1);
doc.rect(7, 7, 195, 285);
doc.setLineWidth(1);
doc.rect(7, 7, 195, 285);
}
});
// var myImage = new Image();
// myImage.src = that.deviceImage[0]?that.deviceImage[0]:this.img1;
@ -462,86 +468,87 @@ f1().then(res => f2().then(res1=>f3()));
// img.src = this.org.imageDoc?this.org.imageDoc:'';
// img.crossOrigin="anonymous";
function f1() {
return new Promise((resolve, reject) => {
console.log("1");
doc.addImage(that.myImage , 'png', 40, 170, 30, 20);
resolve('');
})
return new Promise((resolve, reject) => {
console.log("1");
doc.addImage(that.myImage, 'png', 40, 170, 30, 20);
resolve('');
})
}
function f2() {
return new Promise((resolve, reject) => {
console.log("2");
doc.addImage(that.myImage1 , 'png', 80, 170, 30, 20);
resolve('');
})
function f2() {
return new Promise((resolve, reject) => {
console.log("2");
doc.addImage(that.myImage1, 'png', 80, 170, 30, 20);
resolve('');
})
}
function f3(){
// myImage2.onload = function(){
console.log("3");
doc.addImage(that.myImage2 , 'png', 120, 170, 30, 20);
doc.save(name);
}
// function f1() {
// return new Promise((resolve, reject) => {
// myImage.onload = function(){
// console.log("1");
// doc.addImage(myImage , 'png', 40, 170, 30, 20);
// };
// var isLoaded = myImage.complete && myImage.naturalHeight !== 0;
// if(isLoaded)
// resolve('');
// });
// }
function f3() {
// myImage2.onload = function(){
console.log("3");
// function f3(){
// myImage2.onload = function(){
// console.log("3");
// doc.addImage(myImage2 , 'png', 120, 170, 30, 20);
// doc.save(name);
// };
// }
doc.addImage(that.myImage2, 'png', 120, 170, 30, 20);
doc.save(name);
}
// function f1() {
// return new Promise((resolve, reject) => {
// myImage.onload = function(){
// console.log("1");
// doc.addImage(myImage , 'png', 40, 170, 30, 20);
// };
// var isLoaded = myImage.complete && myImage.naturalHeight !== 0;
// if(isLoaded)
// resolve('');
// });
// }
// function f3(){
// myImage2.onload = function(){
// console.log("3");
// doc.addImage(myImage2 , 'png', 120, 170, 30, 20);
// doc.save(name);
// };
// }
// function f2() {
// return new Promise((resolve, reject) => {
// myImage1.onload = function(){
// console.log("2");
// doc.addImage(myImage1 , 'png', 80, 170, 30, 20);
// // if(that.deviceImage.length==2){
// // doc.save(name);
// // }
// };
// var isLoaded = myImage1.complete && myImage1.naturalHeight !== 0;
// if(isLoaded)
// resolve('');
// })
// }
f1().then(res => f2().then(res1 => f3()));
// function f2() {
// return new Promise((resolve, reject) => {
// myImage1.onload = function(){
// console.log("2");
// doc.addImage(myImage1 , 'png', 80, 170, 30, 20);
// // if(that.deviceImage.length==2){
// // doc.save(name);
// // }
// };
// var isLoaded = myImage1.complete && myImage1.naturalHeight !== 0;
// if(isLoaded)
// resolve('');
// })
// }
f1().then(res => f2().then(res1=>f3()));
}
toDataURL(url, callback) {
console.log(url);
var xhr = new XMLHttpRequest();
xhr.onload = function () {
var reader = new FileReader();
reader.onloadend = function () {
callback(reader.result);
}
reader.readAsDataURL(xhr.response);
};
xhr.open('GET', url);
xhr.responseType = 'blob';
xhr.send();
}
toDataURL(url, callback) {
console.log(url);
var xhr = new XMLHttpRequest();
xhr.onload = function () {
var reader = new FileReader();
reader.onloadend = function () {
callback(reader.result);
}
reader.readAsDataURL(xhr.response);
};
xhr.open('GET', url);
xhr.responseType = 'blob';
xhr.send();
}
}

View file

@ -1,49 +1,49 @@
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 250px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 250px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}

View file

@ -7,7 +7,7 @@
<div class="card">
<div class="card-header">
<h4>
Update Device
Update Device
<button type="button" class="close pull-right" (click)="back()">
<i class="fas fa-arrow-circle-left"></i>
</button>
@ -80,7 +80,7 @@
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label for="inputCity">Dealer Followup Mobile</label> <span>*</span>
<label for="inputCity">Dealer Followup Mobile ff</label> <span>*</span>
<input
formControlName="dealerFollowup"
type="text"

View file

@ -1,7 +1,7 @@
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
padding-left: 4px;
padding-right: 3px;
}
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
padding-left: 4px;
padding-right: 3px;
}

View file

@ -194,6 +194,7 @@ export class NewEditDeviceComponent implements OnInit {
this.DealerId = JSON.parse(window.atob(window.localStorage.Dealer_token.split(".")[1]))._id;
}
console.log('this.custtype', this.custtype);
var fname=this.deviceData.user?this.deviceData.user.first_name?this.deviceData.user.first_name:'':"";
var lname=this.deviceData.user?this.deviceData.user.last_name?this.deviceData.user.last_name:'':""
@ -217,7 +218,7 @@ export class NewEditDeviceComponent implements OnInit {
SMSPlan:[''],
city:[this.deviceData.transportOfficeCity?this.deviceData.transportOfficeCity:''],
deviceModel:[this.deviceData.device_model?this.deviceData.device_model._id:''],
trackingExp:new Date(this.expDate),
trackingExp: [this.deviceData.expiration_date ? new Date(this.deviceData.expiration_date) : ''],
eSimExpiry:[this.deviceData.esim_validity?new Date(this.deviceData.esim_validity):''],
model:[this.deviceData.Model?this.deviceData.Model:''],
email:[this.deviceData.user?this.deviceData.user.email?this.deviceData.user.email:'':''],
@ -234,7 +235,7 @@ export class NewEditDeviceComponent implements OnInit {
this.location.back()
}
this.loadropdown()
this.loadropdown()
this.getDeviceModel();
this.getvehDetail()
this.getUserSetting(this.userId);
@ -363,7 +364,12 @@ export class NewEditDeviceComponent implements OnInit {
if(this.deviceForm.value.address){
data['address']=this.deviceForm.value.address
}
if (this.deviceForm.value.eSimExpiry) {
data['esim_validity'] = this.deviceForm.value.eSimExpiry
}
if (this.deviceForm.value.trackingExp) {
data['expdate'] = this.deviceForm.value.trackingExp
}
console.log(data);
this.contactService.post('/users/editUserDetails',data).subscribe((res:any)=>{
@ -412,7 +418,7 @@ export class NewEditDeviceComponent implements OnInit {
bussinessType:1
}
if (this.custtype) {
newDevice['Dealer'] = this.userId;
newDevice['Dealer'] = this.deviceData.Dealer && this.deviceData.Dealer._id ? this.deviceData.Dealer._id : newDevice['Dealer'];
} else if((this.custtype == false)&&(window.localStorage['Custumer'] == 'ON') ) {
newDevice['Dealer'] = this.DealerId
}
@ -463,6 +469,9 @@ export class NewEditDeviceComponent implements OnInit {
if(this.deviceForm.value.eSimExpiry){
newDevice['esim_validity'] = this.deviceForm.value.eSimExpiry;
}
if (this.deviceForm.value.trackingExp) {
newDevice['expdate'] = this.deviceForm.value.trackingExp
}
if(this.deviceForm.value.vehicleCategory){
newDevice['vehicleCategory'] = this.deviceForm.value.vehicleCategory;
@ -498,8 +507,14 @@ export class NewEditDeviceComponent implements OnInit {
this.contactService.editdevice(newDevice)
.subscribe((device) => {
window.localStorage['DataUpdate'] = 'True';
this.router.navigateByUrl("dashboard");
localStorage.getItem('KycApprovalRedirect')
if (localStorage.getItem('KycApprovalRedirect')) {
localStorage.removeItem('KycApprovalRedirect')
this.router.navigateByUrl("KycApproval")
} else {
this.router.navigateByUrl("dashboard");
}
}
// this.Load = false
)

View file

@ -9,6 +9,7 @@ import 'rxjs/add/operator/map';
@Injectable()
export class DatainjectionService {
socketConnection= false;
devicess:any;
final:any=null;
userID:any;
@ -38,17 +39,9 @@ export class DatainjectionService {
}
constructor(private contactService: ContactService, private activatedRoute: ActivatedRoute, private http: Http,private router:Router) {
// alert('ata injection constructor')
this.socket_gps = io.connect('https://soc.oneqlik.in' +'/gps', {
secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false
});
this.getConnection();
this.socket_5000 = io.connect('https://soc.oneqlik.in', {
secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false
});
this.socket_notifIO = io.connect('https://soc.oneqlik.in'+'/notifIO', {
secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false
});
// this.socket_gps = io.connect('https://socket.oneqlik.in' +'/gps', {
// secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false
@ -63,49 +56,101 @@ export class DatainjectionService {
// });
// https://server2.oneqlik.in/
if(window.localStorage.custumer_token){
this.fs = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).fn;
this.ls = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).ln;
this.emailid = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).email;
this.or = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1]))._orgName;
this.useridd = JSON.parse(window.atob(window.localStorage.custumer_token.split('.')[1]))._id;
this.mb = JSON.parse(window.atob(window.localStorage.custumer_token.split('.')[1])).phn;
this.custtype = JSON.parse(window.atob(window.localStorage.custumer_token.split('.')[1])).isDealer;
if(this.custtype == true){
this.cust = true;
}
if(this.mb.charAt(0)=="n"){
this.mb = ' '
}
}
else{
console.log(router.url);
var url=(router.url).substring(0,12);
console.log(url);
if(url=="/ViewVehicle"){
}else{
this.fs = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).fn;
this.ls = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).ln;
this.emailid = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).email;
this.or = JSON.parse(window.atob(window.localStorage.token.split(".")[1]))._orgName;
this.useridd = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id;
this.mb = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).phn;
this.custtype = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).isDealer;
if(this.custtype == true){
this.cust = true;
}
if(this.mb.charAt(0)=="n"){
this.mb = ' '
}
}
}
}
closeConnection() {
// this.socket_notifIO.removeAllListeners();
// this.socket_gps.removeAllListeners();
// this.socket_5000.removeAllListeners();
// this.socket_notifIO.disconnect();
// this.socket_gps.disconnect();
// this.socket_5000.disconnect();
this.socketConnection = false;
try {
this.socket_notifIO.close();
this.socket_gps.close();
this.socket_5000.close();
} catch (error) {
console.log('Connection Close',error)
}
}
refreshConnection() {
if (!this.socketConnection) {
this.getConnection();
}
}
setGPSConnection() {
if (window.localStorage.currentuser) {
//this.socketConnection = true;
this.useridd = window.localStorage.currentuser;
this.socket_gps = io.connect('https://soc.oneqlik.in' + '/gps?userId=' + this.useridd, {
secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false
});
}
}
removedGPSConnection() {
this.socket_gps.close();
}
getConnection() {
if (window.localStorage.currentuser) {
this.socketConnection = true;
this.useridd = window.localStorage.currentuser;
this.socket_notifIO = io.connect('https://soc.oneqlik.in' + '/notifIOV2?userId=' + this.useridd, {
secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false
});
//this.setGPSConnection();
this.socket_5000 = io.connect('https://soc.oneqlik.in?userId=' + this.useridd, {
secure: true, rejectUnauthorized: false, transports: ["websocket", "polling"], upgrade: false
});
}
if (window.localStorage.custumer_token) {
this.fs = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).fn;
this.ls = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).ln;
this.emailid = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1])).email;
this.or = JSON.parse(window.atob(window.localStorage.custumer_token.split(".")[1]))._orgName;
this.useridd = JSON.parse(window.atob(window.localStorage.custumer_token.split('.')[1]))._id;
this.mb = JSON.parse(window.atob(window.localStorage.custumer_token.split('.')[1])).phn;
this.custtype = JSON.parse(window.atob(window.localStorage.custumer_token.split('.')[1])).isDealer;
if (this.custtype == true) {
this.cust = true;
}
if (this.mb.charAt(0) == "n") {
this.mb = ' '
}
}
else {
var url = (this.router.url).substring(0, 12);
console.log(url);
if (url == "/ViewVehicle") {
} else {
if (window.localStorage.token) {
this.fs = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).fn;
this.ls = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).ln;
this.emailid = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).email;
this.or = JSON.parse(window.atob(window.localStorage.token.split(".")[1]))._orgName;
this.useridd = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id;
this.mb = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).phn;
this.custtype = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).isDealer;
if (this.custtype == true) {
this.cust = true;
}
if (this.mb.charAt(0) == "n") {
this.mb = ' '
}
}
}
}
}
getDevice(emailid,id) {
return this.http.get(this.dev_url + "/devices/getDeviceByUser?email="+emailid+'&id='+id)
.map(data => {

View file

@ -335,6 +335,7 @@ export class DealersInfoComponent implements OnInit {
dealerSwitch(dlr) {
// console.log(dlr);
localStorage.setItem("DealerObj=>", dlr._id);
localStorage.setItem("addDev", 'yes');
localStorage.removeItem("in1");
this.contactService.getcustToken(dlr._id).subscribe(
data => {

View file

@ -9,14 +9,14 @@
<flash-messages style="float: center;margin:0px 1px;height:-6px;"></flash-messages>
</div>
</div>
<div class="loading" *ngIf="Load">Loading&#8230;</div>
<div class="card-header" id="headingOne">
<h2 class="mb-0">
<button class="btn btn-link" (click)="change()" type="button" data-toggle="collapse" data-target="#collapseZero"
aria-expanded="true" aria-controls="collapseZero">
Device Inventory
</button>
<button (click)="exportiventory()" class="btn btn-primary btn-sm float-sm-right ml-2" type="button" >Export To Excel</button>
<button (click)="addmultiple()" class="btn btn-primary btn-sm float-sm-right ml-2" type="button" data-toggle="collapse"
data-target="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo">Add Multiple Device</button>
<!-- *ngIf="checkedList.length>0" -->
@ -30,12 +30,11 @@
<button class="btn btn-primary btn-sm float-sm-right ml-2" type="button" (click)="change()" data-toggle="collapse"
data-target="#collapseSix" aria-expanded="true" aria-controls="collapseSix" (click)="selectTab('sent')">Transaction History</button>
<div aria-labelledby="dropdownMenuButton" class="dropdown-menu" x-placement="bottom-start"
style="position: absolute; transform: translate3d(92px, 35px, 0px); top: 0px; left: 0px; will-change: transform;">
<a data-toggle="collapse" (click)="change()" data-target="#collapseThree" aria-expanded="true" aria-controls="collapseThree" class="dropdown-item" style="cursor: pointer;"> Dealer</a>
<a *ngIf="isSuperAdmin" data-toggle="collapse" (click)="change()" data-target="#collapseThree" aria-expanded="true" aria-controls="collapseThree" class="dropdown-item" style="cursor: pointer;"> Dealer</a>
<a data-toggle="collapse" (click)="change()" data-target="#collapseFour" aria-expanded="true" aria-controls="collapseFour" class="dropdown-item" style="cursor: pointer;">Installer</a>
<a data-toggle="collapse" (click)="change()" data-target="#collapseFive" aria-expanded="true" aria-controls="collapseFour" class="dropdown-item" style="cursor: pointer;">Distributer</a>
<a *ngIf="isOrganisation" data-toggle="collapse" (click)="change()" data-target="#collapseFive" aria-expanded="true" aria-controls="collapseFour" class="dropdown-item" style="cursor: pointer;">Distributer</a>
</div>
</h2>
</div>
@ -53,8 +52,23 @@
</div>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover " style="overflow-y: hidden; overflow-x: hidden;font-size:12px">
<div class="table-responsive gridtable">
<div>
<div class="float-right" style="margin-bottom: 5px;">
<button [disabled]="lastcall" style="border-radius: 50px;" (click)="pre()" class="btn btn-outline-primary btn-sm"><i class="fa fa-arrow-circle-left"></i></button>
<button [disabled]="firstcall" style="border-radius: 50px;" (click)="next()" class="btn btn-outline-primary btn-sm"><i class="fa fa-arrow-circle-right"></i></button>
</div>
<div class="input-field first-wrap">
<!-- <div class="icon-wrap">
<i class="fas fa-search" width="24" height="24" viewBox="0 0 24 24"></i>
</div> -->
<input style="width: 460px;float: right;margin-right: 21px;margin-bottom: 5px;" type="text" class="form-control" id="myInput" name="myInput" type="text" [(ngModel)]="myInput" (ngModelChange)="searchFilter($event)" placeholder="{{'Search' | translate}}" />
</div>
</div>
<table id="deviceInventory" class="table table-striped table-hover " style="overflow-y: hidden; overflow-x: hidden;font-size:12px">
<thead>
<tr>
<th><input type="checkbox" id="customCheck1" [(ngModel)]="masterSelected" (change)="checkUncheckAll()"></th>

View file

@ -1,17 +1,49 @@
.topDiv {
padding-top: 20px;
background: whitesmoke;
height: 100vh;
}
.bg-blue {
background-color: #00c0ef !important;
}
.bg-green {
background-color: #00a65a !important;
}
.bg-orange {
background-color: #f39c12 !important;
}
.bg-red {
background-color: #d9534f !important;
}
.topDiv {
padding-top: 20px;
background: whitesmoke;
height: 100vh;
}
.bg-blue {
background-color: #00c0ef !important;
}
.bg-green {
background-color: #00a65a !important;
}
.bg-orange {
background-color: #f39c12 !important;
}
.bg-red {
background-color: #d9534f !important;
}
.gridtable tbody {
display: block;
max-height: 400px;
overflow-y: scroll;
}
.gridtable thead,
.gridtable tbody tr {
display: table;
table-layout: fixed;
width: 100%;
}
.gridtable thead {
width: calc(100% - 1.1em);
}
.gridtable thead {
position: relative;
}
.gridtable thead th:last-child:after {
content: ' ';
position: absolute;
// background-color: #337ab7;
width: 1.3em;
height: 38px;
right: -1.3em;
top: 0;
border-bottom: 2px solid #ddd;
}

View file

@ -1,6 +1,8 @@
import { Component, OnInit, TemplateRef } from '@angular/core';
import { MdSnackBar } from '@angular/material';
import { FlashMessagesService } from 'angular2-flash-messages';
import { BsDatepickerConfig, BsModalRef, BsModalService } from 'ngx-bootstrap';
import { Subject } from 'rxjs/Subject';
import { ContactService } from '../contact.service';
declare var XLSX:any;
declare var swal: any;
@ -25,7 +27,7 @@ uploadJSON: any;
showErrorupload: boolean =false;
faileduploadDevices=[];
showErrorupload_1: boolean =false;
Load: boolean;
Load: boolean=false;
useridd: any;
selectedArr=[]
inventory=[]
@ -49,15 +51,27 @@ uploadJSON: any;
installer_info: any;
transaction=[]
myInput: any;
modelChanged: Subject<string> = new Subject<string>();
array=[{IMEI:'877',Vendor_Name:'test',Purchase_date:'2021-12-20T18:30:00.000Z','Bill date':'2021-12-20T18:30:00.000Z','Bill no':'2212',State:'Maharastra',
'eSIM validaity':'One Year/Two Year','Device model no':'3232','Serial no':'5443','Iccid no':'4223','Mob-1':'983993022','Mob-2':'983993022','vahanID':"45433"}]
constructor(private contactService:ContactService,private _flashMessagesService: FlashMessagesService) {
constructor(private contactService: ContactService, private _flashMessagesService: FlashMessagesService, public snackBar: MdSnackBar) {
this.masterSelected = false;
}
this.modelChanged
.debounceTime(2000) // wait 300ms after the last event before emitting last eventpublic sidebar: SidebarComponent,
.distinctUntilChanged() // only emit if value is different from previous value
.subscribe(myInput => {
this.myInput = myInput;
// this.tabelObj;
this.getInventory();
});
}
isOrganisation:Boolean=false;
isSuperAdmin: Boolean = false;
ngOnInit() {
this.useridd = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id;
this.isSuperAdmin=JSON.parse(window.atob(window.localStorage.token.split('.')[1])).isSuperAdmin ? JSON.parse(window.atob(window.localStorage.token.split('.')[1])).isSuperAdmin : false;
this.isOrganisation = JSON.parse(window.atob(window.localStorage.token.split('.')[1])).isOrganisation ? JSON.parse(window.atob(window.localStorage.token.split('.')[1])).isOrganisation:false;
this.getInventory();
this.dealerDetail();
this.getInventoryCount();
@ -90,6 +104,9 @@ uploadJSON: any;
});
console.log("file=>",that.uploadJSON);
that.uploadJSON.forEach(mData=> {
mData['IMEI']= mData['IMEI'].replaceAll(/[^0-9 ]/g, "").replaceAll(' ', '')
})
console.log("Failed",that.failedFiles);
@ -102,7 +119,14 @@ uploadJSON: any;
this.getInstallerData()
}
searchFilter(text: string) {
this.modelChanged.next(text);
}
uploadExcel(){
this.Load=true
this.failedUploadFiles = [];
this.uploadJSON.forEach(element => {
element=JSON.stringify(element)
@ -119,11 +143,17 @@ uploadJSON: any;
}
console.log(data);
this.contactService.addMultipleInventory(data).subscribe(res=>{
this.contactService.addMultipleInventory(data).subscribe((res:any)=>{
console.log(res);
this.Load = false
this.getInventory()
var msg = "Records Added Successfully"
this._flashMessagesService.show(msg, { cssClass: 'alert-success', timeout: 3000 });
var msg = res.message
this.snackBar.open(msg, '', {
duration: 4000,
});
// this._flashMessagesService.show(msg, { cssClass: 'alert-success', timeout: 3000 });
},err=>{
this.Load = false
})
}
@ -163,26 +193,29 @@ this.failedUploadFiles = [];
getInventory(){
this.Load=true;
var dateObj={}
var url="/Device_inventory/getInventory?user="+this.useridd
if((this.dateId == 'to_date')||(this.to_date != undefined)){
dateObj['to_date'] = this.to_date.toISOString();
}
if((this.dateId == 'from_date')||(this.from_date != undefined)){
dateObj['from_date'] = this.from_date.toISOString();
}
var url = "/Device_inventory/getInventory?user=" + this.useridd + '&limit=' + this.pageSize + '&skip=' + this.pageIndex
if (this.myInput){
url = url + '&search=' + this.myInput
}
// if(dateObj != undefined){
// url="/Device_inventory/getInventory?from="+this.from_date+'&to='+this.to_date
// }
this.contactService.get(url).subscribe((res:any)=>{
console.log(res);
this.Load=false;
for(let i=0;i<res.length;i++){
res[i].isSelected=false
}
this.inventory=res;
this.showErrorupload=true;
this.getCheckedItemList();
},err=>{
this.Load = false;
})
}
checkValue(data,index){
@ -476,7 +509,7 @@ exportExcels() {
this.downloadFile(this.array);
}
downloadFile(data, filename = 'Distance Report') {
downloadFile(data, filename = 'Device Inventory') {
let arrHeader = ["IMEI","Device model no","Purchase_date","Serial no","Iccid no","Mob-1","Mob-2", "Vendor_Name", "Bill date", "Bill no","State","eSIM validaity"];
let csvData = this.ConvertToCSV(data, arrHeader);
@ -566,32 +599,6 @@ exportExcel()
return (sa);
}
// exportExcel(){
// var tab_text="<table border='2px'><tr bgcolor='#87AFC6'>";
// var textRange; var j=0;
// var table = $('#sample').clone();
// table[0].querySelector("thead").remove();
// table[0].prepend($(".dataTable thead").clone()[0]);
// var tab:any = table[0];//document.getElementById('deviceTable'); // id of table
// for(j = 0 ; j < tab.rows.length ; j++)
// {
// tab_text=tab_text+ tab.rows[j].innerHTML+"</tr>";
// }
// tab_text=tab_text+"</table>";
// tab_text= tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); // reomves input params
// var ua = window.navigator.userAgent;
// var msie = ua.indexOf("MSIE ");
// var sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));
// return (sa);
// }
tabelObj
testTable() {
@ -773,5 +780,76 @@ testTable() {
this.failedFiles=[];
this.dealerObj=undefined
}
firstcall: boolean = false;
lastcall: boolean = true;
next() {
this.lastcall = false;
this.pageIndex += 1;
this.getInventory()
}
searchText: any;
pageIndex = 0;
pageSize = 50;
// next1(){
// this.pageIndex += 1;
// this.getInventory()
// }
pre() {
// console.log(this.skip)
if (this.pageIndex > 0) {
this.pageIndex -= 1;
this.lastcall = false;
this.getInventory()
} else {
this.lastcall = true;
this.firstcall = false;
this.getInventory()
}
}
exportiventory() {
// console.log("INKDJN");
// let element = document.getElementById('deviceInventory');
// const ws =XLSX.utils.table_to_sheet(element);
// /* generate workbook and add the worksheet */
// const wb = XLSX.utils.book_new();
// XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
// /* save to file */
// XLSX.writeFile(wb, 'attendance.xlsx');
var tab_text = "<table border='2px'><tr bgcolor='#87AFC6'>";
var textRange; var j = 0;
var table = $('#deviceInventory').clone();
// table[0].querySelector("thead").remove();
// table[0].prepend($(".dataTable thead").clone()[0]);
var tab = table[0];//document.getElementById('deviceTable'); // id of table
for (j = 0; j < tab.rows.length; j++) {
tab_text = tab_text + tab.rows[j].innerHTML + "</tr>";
// console.log('tab_text',JSON.parse(tab_text));
//tab_text=tab_text+"</tr>";
}
tab_text = tab_text + "</table>";
// tab_text= tab_text.replace(/<A[^>]*>|<\/A>/g, "");//remove if u want links in your table
// tab_text= tab_text.replace(/<img[^>]*>/gi,""); // remove if u want images in your table
tab_text = tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); // reomves input params
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
var sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));
return (sa);
}
}

View file

@ -94,6 +94,7 @@ this.expire_status -->
<tr>
<th style="text-align: left;">{{'Device Name' | translate}}</th>
<th style="text-align: left;">{{'Device IMEI' | translate}}</th>
<th style="text-align: left;">{{'Sim Number' | translate}}</th>
<th style="text-align: left;">{{'User' | translate}}</th>
<th style="text-align: left;">{{'Distributer' | translate}}</th>
<th style="text-align: left;">{{'Distributer Mob' | translate}}</th>

View file

@ -1,93 +1,93 @@
.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;
}
.card {
padding: 5px;
text-align: center;
margin: 5px;
width: 160px;
color: white;
}
.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;
}
.card {
padding: 5px;
text-align: center;
margin: 5px;
width: 160px;
color: white;
}

View file

@ -212,6 +212,12 @@ export class DeviceListComponent implements OnInit {
return data?data : '';
}
},
{
"data": "sim_number",
"render": function (data, type, row) {
return data ? data : '';
}
},
{
"data": "User",
"render": function(data, type, row) {

View file

@ -1,87 +1,87 @@
.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;
height: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
// background: rgb(74, 118, 184);
background: #868e96;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 250px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}
.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;
height: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
// background: rgb(74, 118, 184);
background: #868e96;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 250px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}

View file

@ -45,7 +45,7 @@ export class DayWiseReportComponent implements OnInit {
}
ngOnInit() {
this.useridd = JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id;
this.emailid = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).email;
this.superAdmin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin;

View file

@ -1,3 +1,3 @@
.mat-dialog-container {
overflow: hidden !important;
}
.mat-dialog-container {
overflow: hidden !important;
}

View file

@ -1,226 +1,226 @@
ul {
list-style-type: none;
margin: 55px 0px 0px 0px;
padding: 0;
width: 25%;
background-color: #f1f1f1;
position: fixed;
height: 100%;
overflow: auto;
}
li a {
display: block;
color: #000;
padding: 8px 0 8px 16px;
text-decoration: none;
}
li a.active {
background-color: #4caf50;
color: white;
}
li a:hover:not(.active) {
background-color: #555;
color: white;
}
.componentClass {
margin-left: 25%;
padding: 64px 16px;
height: 1000px;
}
/* The sidebar menu */
.sidebar {
height: 100%; /* 100% Full-height */
width: 295px; /* 0 width - change this with JavaScript */
position: fixed; /* Stay in place */
z-index: 1; /* Stay on top */
top: 0;
left: 0;
top: 40px;
padding-left: 12px;
padding-right: 12px;
background: #f9f6f6 !important;
padding-left: 3px;
background-color: #111; /* Black*/
overflow-x: hidden; /* Disable horizontal scroll */
padding-top: 60px; /* Place content 60px from the top */
transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */
}
/* The sidebar links */
.sidebar a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s;
}
/* When you mouse over the navigation links, change their color */
.sidebar a:hover {
color: #f1f1f1;
}
/* Position and style the close button (top right corner) */
.sidebar .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
}
/* The button used to open the sidebar */
.openbtn {
font-size: 20px;
cursor: pointer;
background-color: #111;
color: white;
margin-top: 35px;
padding: 10px 15px;
border: none;
}
.openbtn:hover {
background-color: #444;
}
/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
#main {
transition: margin-left 0.5s; /* If you want a transition effect */
padding: 20px;
margin-left: 295px;
}
/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
.sidebar {
padding-top: 15px;
}
.sidebar a {
font-size: 18px;
}
}
.wrapper {
position: relative;
width: 250px;
height: 300px;
border: 1px dashed #ccc;
margin: 10px;
}
.line {
position: absolute;
left: 0%;
top: 0;
bottom: 0;
// width: 20px;
// width: 1px;
margin-left: 295px;
// background: #426e86;
z-index: 1;
}
.wordwrapper {
text-align: center;
height: 12px;
position: absolute;
left: 0;
// right: 0;
top: 50%;
margin-top: -12px;
z-index: 2;
}
.word {
color: #ccc;
text-transform: uppercase;
letter-spacing: 1px;
padding: 3px;
margin-left: 295px;
font: bold 12px arial, sans-serif;
// background: #fff;
}
.tabbable-panel {
border: 1px solid #eee;
padding: 10px;
}
.tabbable-line > .nav-tabs {
border: none;
margin: 0px;
}
.tabbable-line > .nav-tabs > li {
margin-right: 2px;
}
.tabbable-line > .nav-tabs > li > a {
border: 0;
margin-right: 0;
color: #737373;
}
.tabbable-line > .nav-tabs > li > a > i {
color: #a6a6a6;
}
.tabbable-line > .nav-tabs > li.open,
.tabbable-line > .nav-tabs > li:hover {
border-bottom: 4px solid rgb(80, 144, 247);
}
.tabbable-line > .nav-tabs > li.open > a,
.tabbable-line > .nav-tabs > li:hover > a {
border: 0;
background: none !important;
color: #333333;
}
.tabbable-line > .nav-tabs > li.open > a > i,
.tabbable-line > .nav-tabs > li:hover > a > i {
color: #a6a6a6;
}
.tabbable-line > .nav-tabs > li.open .dropdown-menu,
.tabbable-line > .nav-tabs > li:hover .dropdown-menu {
margin-top: 0px;
}
.tabbable-line > .nav-tabs > li.active {
border-bottom: 4px solid #32465b;
position: relative;
}
.tabbable-line > .nav-tabs > li.active > a {
border: 0;
color: #333333;
}
.tabbable-line > .nav-tabs > li.active > a > i {
color: #404040;
}
.tabbable-line > .tab-content {
margin-top: -3px;
background-color: #fff;
border: 0;
border-top: 1px solid #eee;
padding: 15px 0;
}
.portlet .tabbable-line > .tab-content {
padding-bottom: 0;
}
.switch-toggle {
float: left;
background: #242729;
}
.switch-toggle input {
position: absolute;
opacity: 0;
}
.switch-toggle input + label {
padding: 7px;
float: left;
color: #fff;
cursor: pointer;
}
.switch-toggle input:checked + label {
background: green;
}
ul {
list-style-type: none;
margin: 55px 0px 0px 0px;
padding: 0;
width: 25%;
background-color: #f1f1f1;
position: fixed;
height: 100%;
overflow: auto;
}
li a {
display: block;
color: #000;
padding: 8px 0 8px 16px;
text-decoration: none;
}
li a.active {
background-color: #4caf50;
color: white;
}
li a:hover:not(.active) {
background-color: #555;
color: white;
}
.componentClass {
margin-left: 25%;
padding: 64px 16px;
height: 1000px;
}
/* The sidebar menu */
.sidebar {
height: 100%; /* 100% Full-height */
width: 295px; /* 0 width - change this with JavaScript */
position: fixed; /* Stay in place */
z-index: 1; /* Stay on top */
top: 0;
left: 0;
top: 40px;
padding-left: 12px;
padding-right: 12px;
background: #f9f6f6 !important;
padding-left: 3px;
background-color: #111; /* Black*/
overflow-x: hidden; /* Disable horizontal scroll */
padding-top: 60px; /* Place content 60px from the top */
transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */
}
/* The sidebar links */
.sidebar a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s;
}
/* When you mouse over the navigation links, change their color */
.sidebar a:hover {
color: #f1f1f1;
}
/* Position and style the close button (top right corner) */
.sidebar .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
}
/* The button used to open the sidebar */
.openbtn {
font-size: 20px;
cursor: pointer;
background-color: #111;
color: white;
margin-top: 35px;
padding: 10px 15px;
border: none;
}
.openbtn:hover {
background-color: #444;
}
/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
#main {
transition: margin-left 0.5s; /* If you want a transition effect */
padding: 20px;
margin-left: 295px;
}
/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
.sidebar {
padding-top: 15px;
}
.sidebar a {
font-size: 18px;
}
}
.wrapper {
position: relative;
width: 250px;
height: 300px;
border: 1px dashed #ccc;
margin: 10px;
}
.line {
position: absolute;
left: 0%;
top: 0;
bottom: 0;
// width: 20px;
// width: 1px;
margin-left: 295px;
// background: #426e86;
z-index: 1;
}
.wordwrapper {
text-align: center;
height: 12px;
position: absolute;
left: 0;
// right: 0;
top: 50%;
margin-top: -12px;
z-index: 2;
}
.word {
color: #ccc;
text-transform: uppercase;
letter-spacing: 1px;
padding: 3px;
margin-left: 295px;
font: bold 12px arial, sans-serif;
// background: #fff;
}
.tabbable-panel {
border: 1px solid #eee;
padding: 10px;
}
.tabbable-line > .nav-tabs {
border: none;
margin: 0px;
}
.tabbable-line > .nav-tabs > li {
margin-right: 2px;
}
.tabbable-line > .nav-tabs > li > a {
border: 0;
margin-right: 0;
color: #737373;
}
.tabbable-line > .nav-tabs > li > a > i {
color: #a6a6a6;
}
.tabbable-line > .nav-tabs > li.open,
.tabbable-line > .nav-tabs > li:hover {
border-bottom: 4px solid rgb(80, 144, 247);
}
.tabbable-line > .nav-tabs > li.open > a,
.tabbable-line > .nav-tabs > li:hover > a {
border: 0;
background: none !important;
color: #333333;
}
.tabbable-line > .nav-tabs > li.open > a > i,
.tabbable-line > .nav-tabs > li:hover > a > i {
color: #a6a6a6;
}
.tabbable-line > .nav-tabs > li.open .dropdown-menu,
.tabbable-line > .nav-tabs > li:hover .dropdown-menu {
margin-top: 0px;
}
.tabbable-line > .nav-tabs > li.active {
border-bottom: 4px solid #32465b;
position: relative;
}
.tabbable-line > .nav-tabs > li.active > a {
border: 0;
color: #333333;
}
.tabbable-line > .nav-tabs > li.active > a > i {
color: #404040;
}
.tabbable-line > .tab-content {
margin-top: -3px;
background-color: #fff;
border: 0;
border-top: 1px solid #eee;
padding: 15px 0;
}
.portlet .tabbable-line > .tab-content {
padding-bottom: 0;
}
.switch-toggle {
float: left;
background: #242729;
}
.switch-toggle input {
position: absolute;
opacity: 0;
}
.switch-toggle input + label {
padding: 7px;
float: left;
color: #fff;
cursor: pointer;
}
.switch-toggle input:checked + label {
background: green;
}

View file

@ -11,7 +11,7 @@
</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="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)" [componentIdentifier]="identifier"></app-report-filter>

View file

@ -30,7 +30,7 @@ export class GeofancingReportComponent implements OnInit {
userName:any;
before:any;
deviceArr: any=[];
constructor(private contactService: ContactService,private router: Router,public dialog: MdDialog) { }
@ -58,6 +58,7 @@ text:any;
option:any;
geo_status=[];
superAdmin:Boolean = false;
ngOnInit() {
// var fTime = new Date().setHours(0,0,0);
// this.Fromdate = new Date(fTime);
@ -341,7 +342,7 @@ testTable() {
"scrollCollapse": true,
lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
ajax: (dataTablesParameters,callback) => {
console.log('temptemptemptemptemp',dataTablesParameters);
console.log('manoj patidar',dataTablesParameters);
var deviceID;
that.Load= true;
// dataTablesParameters.find._u = that.useridd;

View file

@ -79,11 +79,11 @@
<td style="cursor:pointer ; text-align: center">{{(gps_report.imei) ? gps_report.imei : "NA"}}</td>
<td style="cursor:pointer ; text-align: center">{{gps_report.date | date : 'd/M/yyyy, h:mm a'}}</td>
<td style="cursor:pointer ; text-align: center">{{gps_report.odo ?(gps_report.odo | number : '1.2-2' ): "NA"}}</td>
<td style="cursor:pointer ; text-align: center">{{get_distance(pathReport,i)}}</td>
<td style="cursor:pointer ; text-align: center">{{gps_report.get_distance}}</td>
<td style="cursor:pointer ; text-align: center">{{gps_report.speed ? (gps_report.speed | number : '1.2-2' ) : "0"}}</td>
<td style="cursor:pointer ; text-align: center">{{gps_report.external_Battery? (gps_report.external_Battery | number : '1.2-2' ) : "0"}}</td>
<td style="cursor:pointer ; text-align: center">{{gettempExac(gps_report.temp)}}</td>
<td style="cursor:pointer ; text-align: center">{{getcummulative_distance(pathReport,i)}}</td>
<td style="cursor:pointer ; text-align: center">{{gps_report.temp}}</td>
<td style="cursor:pointer ; text-align: center">{{gps_report.getcummulative_distance}}</td>
<!-- <td style="cursor:pointer ; text-align: center;width:40%" *ngIf = "locationOnDemand">
<a href={{addressLink}} target="_blank" (click)= getlink(gps_report) md-tooltip="Click to get device's last location"><img height="20px" width="20px" src="../../../assets/image/addressICON.png"></a>
</td> -->

View file

@ -236,6 +236,9 @@ this.pathReport=[];
for(let i = 0; i <res.length ; i++){
if(res[i]!=null){
res[i].Device_name = device_name;
res[i].get_distance == this.get_distance(res, i);
res[i].getcummulative_distance = this.getcummulative_distance(res, i);
res[i].temp = this.gettempExac(res[i].temp);
this.pathReport.push(res[i]);
}else{
console.log('resnullresnullresnullresnullres=>',res[i]);
@ -292,6 +295,7 @@ get_distance(gps_report,index_1){
}
export_pdf(){
debugger
console.log('pdf');
// jsPDF(orientation, unit, format
@ -323,6 +327,7 @@ export_pdf(){
// cellWidth : 50
// },
willDrawCell: data => {
console.log('data', data);
console.log('data=>',data);
// console.log('data=>',data.row.index.length);

View file

@ -231,7 +231,7 @@
<td>
Owner Name : {{userName}}<br>
</td>
<td>
<td style="vertical-align: baseline;" colspan="2">
Owner Address : {{userAddress}}
</td>
<td>
@ -292,19 +292,23 @@
</td>
</tr>
<tr>
<td colspan="3">
<h6 style="font-size:18px;margin: 20px 0 10px 0px;">Fitment Images :- </h6>
<td colspan="1">
<h6 style="font-size:18px;margin: 20px 0 10px 0px;">Fitment Images:- </h6>
</td>
<td colspan="2" style="text-align: end;">
<!-- {{deviceImage |json}} -->
<td style="margin-left: -155px;" *ngIf="deviceImage.length && deviceImage[0]">
<img style=" margin-left: -91px;" src="{{deviceImage[0]}}" width="90px" height="90px">
</td>
<td *ngIf="deviceImage.length && deviceImage[1]">
<ng-container style="" *ngIf="deviceImage.length && deviceImage[0]">
<img style=" " src="{{deviceImage[0]}}" width="90px" height="90px">
</ng-container>
<ng-container *ngIf="deviceImage.length && deviceImage[1]">
<img src="{{deviceImage[1]}}" width="90px" height="90px">
</td>
<td *ngIf="deviceImage.length && deviceImage[2]">
</ng-container>
<ng-container *ngIf="deviceImage.length && deviceImage[2]">
<img src="{{deviceImage[2]}}" width="90px" height="90px">
</td>
</ng-container>
</td>
</tr>
<tr>
<td colspan="2">

View file

@ -58,7 +58,7 @@ deletetemplate:boolean=false;
dealerAddress: any;
CID_No: any;
imgUrl: any;
imgURL: any;
imgURL: any = '';
companyName: any;
companyAddress: any;
transportOfficeCity: any;
@ -93,19 +93,19 @@ deletetemplate:boolean=false;
this.getUser();
this.dealerDetail();
console.log("DATA",this.data);
this.lastDeviceTime=this.data.deviceInfo.last_device_time;
this.lastPingOn=this.data.deviceInfo.last_ping_on
this.devName = this.data.deviceInfo.Device_Name;
this.lastDeviceTime = this.data.deviceInfo.last_device_time ? this.data.deviceInfo.last_device_time:'';
this.lastPingOn = this.data.deviceInfo.last_ping_on ? this.data.deviceInfo.last_ping_on:''
this.devName = this.data.deviceInfo.Device_Name ? this.data.deviceInfo.Device_Name:'';
this.devID = this.data.deviceInfo.Device_ID?this.data.deviceInfo.Device_ID:"";
this.phNum =this.data.deviceInfo.contact_number;
this.phNum = this.data.deviceInfo.contact_number ? this.data.deviceInfo.contact_number:'';
this.createdOn = this.data.deviceInfo.created_on?(new Date(this.data.deviceInfo.created_on).toISOString()):"";
this.expOn = this.data.deviceInfo.expiration_date?(new Date(this.data.deviceInfo.expiration_date).toISOString()):"";
// this.iconType=this.data.deviceInfo.iconType;
this.simNum =this.data.deviceInfo.sim_number;
this.orignalEmail = this.data.deviceInfo.Email_ID
this.emailId = this.data.deviceInfo.Email_ID;
this.deviceImage=this.data.deviceInfo.deviceImage
this.simNum = this.data.deviceInfo.sim_number ? this.data.deviceInfo.sim_number:'';
this.orignalEmail = this.data.deviceInfo.Email_ID ? this.data.deviceInfo.Email_ID:''
this.emailId = this.data.deviceInfo.Email_ID ? this.data.deviceInfo.Email_ID:'';
this.deviceImage = this.data.deviceInfo.deviceImage ? this.data.deviceInfo.deviceImage:''
this.deviceImage = this.deviceImage.filter(dFilter=>dFilter);
for(var i=0;i<this.deviceImage.length;i++){
this.deviceImage[i] = 'https://www.oneqlik.in' + this.deviceImage[i].substring(6)
@ -113,29 +113,29 @@ deletetemplate:boolean=false;
}
console.log(this.deviceImage);
this.todayODO=this.data.deviceInfo.today_odo;
this.totalODO =this.data.deviceInfo.total_odo;
this.deviceID = this.data.deviceInfo._id;
this.initialUser = this.data.deviceInfo.user._id;
this.todayODO = this.data.deviceInfo.today_odo ? this.data.deviceInfo.today_odo:0;
this.totalODO = this.data.deviceInfo.total_odo ? this.data.deviceInfo.total_odo:0;
this.deviceID = this.data.deviceInfo._id ? this.data.deviceInfo._id:'';
this.initialUser = this.data.deviceInfo.user._id ? this.data.deviceInfo.user._id:'';
this.userName = this.data.deviceInfo.OwnerName;
this.userName = this.data.deviceInfo.OwnerName ? this.data.deviceInfo.OwnerName:'';
this.userAddress = this.data.deviceInfo?this.data.deviceInfo.user.address:"";
this.dealerName = this.data.deviceInfo.Dealer_name ;
this.dealerName = this.data.deviceInfo.Dealer_name ? this.data.deviceInfo.Dealer_name:'' ;
this.dealerId = this.data.deviceInfo.Dealer?this.data.deviceInfo.Dealer._id : "";
console.log('this.dealerId',this.dealerId);
this.dealerAddress = this.data.deviceInfo.DealerAddress;
this.dealerAddress = this.data.deviceInfo.DealerAddress ? this.data.deviceInfo.DealerAddress:'';
this.InvoiceDate = this.data.deviceInfo.invoiceDate?(new Date(this.data.deviceInfo.invoiceDate).toISOString()):"";
this.invoiceNum = this.data.deviceInfo.invoiceNumber
this.CID_No = this.data.deviceInfo.CID_No
this.invoiceNum = this.data.deviceInfo.invoiceNumber ? this.data.deviceInfo.invoiceNumber:''
this.CID_No = this.data.deviceInfo.CID_No ? this.data.deviceInfo.CID_No:''
this.devicetype = this.data.deviceInfo.device_model?this.data.deviceInfo.device_model.device_type:"";
this.ICCICD = this.data.deviceInfo.ICCICD;
this.IMSI = this.data.deviceInfo.IMSI;
this.uniqueID = this.data.deviceInfo.uniqueID;
this.ICCICD = this.data.deviceInfo.ICCICD ? this.data.deviceInfo.ICCICD:'';
this.IMSI = this.data.deviceInfo.IMSI ? this.data.deviceInfo.IMSI:'';
this.uniqueID = this.data.deviceInfo.uniqueID? this.data.deviceInfo.uniqueID:"";
this.fitmentDate = this.data.deviceInfo.fitmentDate?new Date(this.data.deviceInfo.fitmentDate):"";
this.expiration_date =this.data.deviceInfo.expiration_date?new Date(this.data.deviceInfo.expiration_date):"";
this.engineNo = this.data.deviceInfo.engineNo;
this.typeOfVehicle = this.data.deviceInfo.typeOfVehicle;
this.manufacturingCompany = this.data.deviceInfo.manufacturingCompany;
this.engineNo = this.data.deviceInfo.engineNo ? this.data.deviceInfo.engineNo:'';
this.typeOfVehicle = this.data.deviceInfo.typeOfVehicle ? this.data.deviceInfo.typeOfVehicle:'';
this.manufacturingCompany = this.data.deviceInfo.manufacturingCompany ? this.data.deviceInfo.manufacturingCompany:'';
this.lastFitnessDate = this.data.deviceInfo.lastFitnessDate?new Date(this.data.deviceInfo.lastFitnessDate):"";
this.vehicleRegDate = this.data.deviceInfo.vehicleRegDate? new Date(this.data.deviceInfo.vehicleRegDate):"";
@ -145,13 +145,13 @@ deletetemplate:boolean=false;
// console.log(this.CID_No,this.devicetype,this.ICCICD,this.IMSI,this.uniqueID,this.fitmentDate,this.engineNo,this.typeOfVehicle,this.manufacturingCompany);
// console.log(this.lastFitnessDate,this.vehicleRegDate,this.vehicleManufacturingDate,this.lattitude,this.longitude)
if(this.data.deviceInfo['actionId']=="exportPdf"){
this.companyName = this.data.deviceInfo.companyName;
this.companyAddress = this.data.deviceInfo.companyAddress;
this.transportOfficeCity = this.data.deviceInfo.transportOfficeCity;
this.transportOfficeState = this.data.deviceInfo.transportOfficeState;
this.ChassisNo = this.data.deviceInfo.ChassisNo;
this.companyName = this.data.deviceInfo.companyName ? this.data.deviceInfo.companyName:'';
this.companyAddress = this.data.deviceInfo.companyAddress ? this.data.deviceInfo.companyAddress:'';
this.transportOfficeCity = this.data.deviceInfo.transportOfficeCity ? this.data.deviceInfo.transportOfficeCity:'';
this.transportOfficeState = this.data.deviceInfo.transportOfficeState ? this.data.deviceInfo.transportOfficeState:'';
this.ChassisNo = this.data.deviceInfo.ChassisNo ? this.data.deviceInfo.ChassisNo:'';
this.deviceManufacturer = this.data.deviceInfo.device_model?this.data.deviceInfo.device_model.Manufacturer:"";
this.numberOfSOS = this.data.deviceInfo.numberOfSOS;
this.numberOfSOS = this.data.deviceInfo.numberOfSOS ? this.data.deviceInfo.numberOfSOS:'';
this.editTemplate =false;
this.deletetemplate = false;
this.ExportPdf =true;
@ -433,15 +433,15 @@ filterDistStates(dst){
var myImage = new Image();
myImage.src = that.deviceImage[0]?that.deviceImage[0]:'';
myImage.src = that.deviceImage[0] && that.deviceImage[0] !='' ?that.deviceImage[0]:'';
myImage.crossOrigin="anonymous";
var myImage1 = new Image();
myImage1.src = that.deviceImage[1]?that.deviceImage[1]:'';
myImage1.src = that.deviceImage[1] && that.deviceImage[1] != '' ?that.deviceImage[1]:'';
myImage1.crossOrigin="anonymous";
var myImage2 = new Image();
myImage2.src = that.deviceImage[2]?that.deviceImage[2]:'';
myImage2.src = that.deviceImage[2] && that.deviceImage[2] != '' ?that.deviceImage[2]:'';
myImage2.crossOrigin="anonymous";
if(that.deviceImage.length==0){
@ -450,38 +450,48 @@ filterDistStates(dst){
function f1() {
return new Promise((resolve, reject) => {
myImage.onload = function(){
console.log("1");
doc.addImage(myImage , 'png', 40, 180, 30, 20);
if(that.deviceImage.length==1){
doc.save('sample-file.pdf');
if(myImage.src) {
myImage.onload = function () {
console.log("1");
doc.setPage(1);
doc.addImage(myImage, 'png', 160, 213, 20, 20);
if (that.deviceImage.length == 1) {
doc.save('sample-file.pdf');
}
};
}
};
resolve('');
});
}
function f3(){
myImage2.onload = function(){
console.log("3");
doc.addImage(myImage2 , 'png', 80, 180, 30, 20);
doc.save('sample-file.pdf');
};
if (myImage2) {
myImage2.onload = function () {
console.log("3");
doc.setPage(1);
doc.addImage(myImage2, 'png', 100, 213, 20, 20);
doc.save('sample-file.pdf');
};
}
}
function f2() {
return new Promise((resolve, reject) => {
myImage1.onload = function(){
if (myImage1) {
myImage1.onload = function () {
console.log("2");
doc.addImage(myImage1 , 'png', 60, 180, 30, 20);
if(that.deviceImage.length==2){
doc.save('sample-file.pdf');
}
doc.setPage(1);
doc.addImage(myImage1, 'png', 130, 213, 20, 20);
if (that.deviceImage.length == 2) {
doc.save('sample-file.pdf');
}
};
}
resolve('');
})

View file

@ -32,7 +32,7 @@
<div class="form-row">
<div class="form-group col-md-4" *ngIf="!inventoryManagement">
<label for="inputPassword4">{{"Device ID (IMEI No.)" | translate}}</label> <span>*</span>
<input [(ngModel)]=" deviceid" name=" deviceid" placeholder="Please Enter Device ID (IMEI)" type="text" class="form-control">
<input (keyup)="removeSpecialChar()" [(ngModel)]=" deviceid" name=" deviceid" placeholder="Please Enter Device ID (IMEI)" type="text" class="form-control">
</div>
<div class="form-group col-md-4" *ngIf="inventoryManagement">

View file

@ -548,7 +548,11 @@ export class DialogContentExampleDialogComponent implements OnInit {
}
showDate:boolean=false;
removeSpecialChar() {
if (this.deviceid) {
this.deviceid = this.deviceid.replaceAll(/[^0-9 ]/g, "").replaceAll(' ', '');
}
}
addDevice(btnindex) {
console.log("In addDevice");
@ -606,9 +610,20 @@ console.log("1");
// console.log("userDetailTopass",this.userDetail._id);
// console.log("vehdata",this.vehType._id)
//this._flashMessagesService.show('Congratulation Device Added as '+this.deviceid, { cssClass: 'alert-success', timeout: 2000 });
let expDateObj ;
if (this.expDate) {
expDateObj = new Date(this.expDate);
} else {
var eDate = new Date();
var LifeTimeyear = eDate.getFullYear() + 5;
eDate.setFullYear(LifeTimeyear);
expDateObj = new Date(eDate);
}
this.newDevice = {
devicename: this.devicename,
deviceid: this.deviceid,
deviceid: this.deviceid ? this.deviceid.replaceAll(/[^0-9]/g, "") : this.deviceid,
des: this.des,
model: this.model,
hrdwr: this.hrdwr,
@ -622,7 +637,7 @@ console.log("1");
driver_name: this.driver,
contact_number: this.dcontact,
device_model: this.DeviceModelValue,
expdate: new Date(this.expDate),
expdate: expDateObj,
License : this.licenseVal,
deviceDistanceVariation:this.selcetedSign+(this.deviceDistanceVariation?this.deviceDistanceVariation:'0')
@ -1835,6 +1850,7 @@ onUpload(imgIndex) {
failedReason:any;
failedUploadFiles:any;
uploadExcel(){
console.log("Device Json Payload",this.uploadJSON);
this.failedUploadFiles = [];
this.Load =true;

View file

@ -74,6 +74,7 @@
<th style="text-align:left;">{{'Address' | translate}}</th>
<th style="text-align:left;">{{'Organisation Name' | translate}}</th>
<th style="text-align:left;">{{'Point Allocated' | translate}}</th>
<th style="text-align:left;">{{'No Of Devices' | translate}}</th>
<!-- <th style="text-align:left;">{{'Available Points' | translate}}</th> -->
<th style="text-align:left;">{{'Point Shared' | translate}}</th>
<th style="text-align:left;">{{'Status' | translate}}</th>

View file

@ -61,7 +61,6 @@ export class DistributersListComponent implements OnInit {
.distinctUntilChanged() // only emit if value is different from previous value
.subscribe(myInput => {
this.myInput = myInput;
console.log('this.myInput in constructor = > ',this.myInput);
this.tabelObj.draw();
@ -194,13 +193,20 @@ export class DistributersListComponent implements OnInit {
dataTablesParameters.sort = {_id :-1}
var suburl = "";
suburl += "/users/datatable";
suburl += "/users/distributorsWithDeviceCounts";
// console.log(suburl);
// console.log(dataTablesParameters);
// console.log(suburl)
that.contactService.post(suburl, dataTablesParameters).subscribe(resp => {
callback(resp);
that.contactService.post(suburl, {
"organisation": that.useridd,
"search":that.myInput,
"skip": dataTablesParameters.start / dataTablesParameters.length,
"limit": dataTablesParameters.length
}).subscribe(resp => {
callback({
draw: 0, recordsFiltered: resp['count'], recordsTotal: resp['count'], data: resp['response']
});
}, err => {
// console.log(err);
@ -324,7 +330,6 @@ export class DistributersListComponent implements OnInit {
"data": "phone",
"render": function (data, type, row) {
console.log('row=>',row);
var phoneShow = '';
if(row.std_code != undefined){
phoneShow ='+' + row.std_code.dialcode + '-' + data ;
@ -357,6 +362,12 @@ export class DistributersListComponent implements OnInit {
"render": function (data, type, row) {
return data ? data : "";
}
},
{
"data": "noOfDevices",
"render": function (data, type, row) {
return data ? data.total : 0;
}
},
// {
// "data" : "_id",

View file

@ -61,6 +61,11 @@
<md-error class="required">{{'Enter Address' | translate}}</md-error>
</md-form-field>
</div>
<div class="row">
<span style="margin-right: 10px;">{{'Bussiness Type' | translate}}</span>
<md-slide-toggle style="float: right;margin-top: 5px;" [(ngModel)]="bussinessType" ngDefaultControl>
</md-slide-toggle>
</div>
<div class="row" style="padding-left:38%">
<button class="btn btn-primary btn-block/"(click)="editDealer()" style="background:green;cursor:pointer;width: 159px;height: 44px;">EDIT DEALER</button>

View file

@ -8,7 +8,7 @@ import { MdDialogRef, MD_DIALOG_DATA } from '@angular/material';
styleUrls: ['./edit-dealer.component.scss']
})
export class EditDealerComponent implements OnInit {
bussinessType: boolean = false;
dealerInfo:any;
dealerEditForm:any;
firstName:any;
@ -37,7 +37,9 @@ export class EditDealerComponent implements OnInit {
this.PhoneNum = this.dealerInfo.dealer_payload.phone?this.dealerInfo.dealer_payload.phone:'';
this.address =this.dealerInfo.dealer_payload.address?this.dealerInfo.dealer_payload.address:'';
this.expDate = this.dealerInfo.dealer_payload.expire_date?this.dealerInfo.dealer_payload.expire_date:'';
console.log(this.dealerInfo);
this.bussinessType = this.dealerInfo.dealer_payload.bussinessType ? this.dealerInfo.dealer_payload.bussinessType == "1" ? true : false : false
// this.bussinessType = this.dealerInfo.dealer_payload.bussinessType!=undefined ? this.dealerInfo.dealer_payload.bussinessType : false;
console.log(this.dealerInfo, this.bussinessType);
// this.pageId = this.dealerInfo.id;
// console.log("PAGEID=>",this.pageId);
@ -64,6 +66,11 @@ export class EditDealerComponent implements OnInit {
expire_date:new Date(this.expDate),
}
if (this.bussinessType != undefined) {
editDealerPayload['bussinessType'] = this.bussinessType ? "1" : "0";
}
// this.dealerInfo.dealer_payload.status
if(this.PhoneNum !== this.dealerInfo.dealer_payload.phone){
editDealerPayload['phone'] = this.PhoneNum

View file

@ -1,46 +1,46 @@
// #body{
// overflow-x: hidden;
// overflow-y: hidden;
// }
#myInput {
border-radius: 15px;
/* border: 2px solid #18262F; */
padding: 7px;
width: 116px;
height: 17px;
font-size: 9px;
outline: none;
float: right;
margin-top: 2%;
}
.headStyle {
text-align: center;
font-size: 22px;
font-weight: 500;
color: #6b6a6a;
padding-top: 7px;
margin: 0px;
}
.sidebar {
height: 84vh;
width: 24%;
text-align: left;
background: white;
box-shadow: 3px 1px 5px 0px #b2b0ae;
position: fixed;
padding: 10px;
}
.main {
box-shadow: 3px 1px 5px 0px #b2b0ae;
padding: 10px;
background: white;
// margin-left: 5px;
}
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
// #body{
// overflow-x: hidden;
// overflow-y: hidden;
// }
#myInput {
border-radius: 15px;
/* border: 2px solid #18262F; */
padding: 7px;
width: 116px;
height: 17px;
font-size: 9px;
outline: none;
float: right;
margin-top: 2%;
}
.headStyle {
text-align: center;
font-size: 22px;
font-weight: 500;
color: #6b6a6a;
padding-top: 7px;
margin: 0px;
}
.sidebar {
height: 84vh;
width: 24%;
text-align: left;
background: white;
box-shadow: 3px 1px 5px 0px #b2b0ae;
position: fixed;
padding: 10px;
}
.main {
box-shadow: 3px 1px 5px 0px #b2b0ae;
padding: 10px;
background: white;
// margin-left: 5px;
}
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
}

View file

@ -17,6 +17,7 @@ import { FlashMessagesService } from 'angular2-flash-messages';
export class GpsMasterComponent implements OnInit {
Fromdate=new Date();
todate=new Date();
reportData : any = [];
tabelObj: any;
emailid: any;
useridd: any;
@ -148,10 +149,13 @@ export class GpsMasterComponent implements OnInit {
// if(id != 0)
console.log('calling api');
that.contactService.post(suburl, dataTablesParameters).subscribe(resp => {
// console.log('resp',resp);
that.reportData = resp['data'];
callback(resp);
}, err => {
// console.log(err);
// console.log(err.status);
that.reportData = [];
callback({data:[]})
});
@ -377,7 +381,96 @@ deviceName1:any;
tab:any;
exportExcel()
exportExcel() {
this.downloadFile(this.reportData)
}
downloadFile(data) {
let arrHeader = ['imei','latDecimal','longDecimal','speed','date','insertionTime','syncedAt','integrationResponse','ignition','power','GPS','isFluctuation','isPastData','external_Battery','fuelVoltage','currentFuel','raw','ac','powerCutAlarm','satellites'] ;
let csvData = this.ConvertToCSV(data, arrHeader);
let blob = new Blob(['\ufeff' + csvData], { type: 'text/csv;charset=utf-8;' });
let dwldLink = document.createElement("a");
let url = URL.createObjectURL(blob);
let isSafariBrowser = navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1;
if (isSafariBrowser) { //if Safari open in new window to save file with random filename.
dwldLink.setAttribute("target", "_blank");
}
dwldLink.setAttribute("href", url);
dwldLink.setAttribute("download", "systemLogs.csv");
dwldLink.style.visibility = "hidden";
document.body.appendChild(dwldLink);
dwldLink.click();
document.body.removeChild(dwldLink);
this.Load = false;
}
convertToDate(element, key) {
if (element[key]) {
var device_time = new Date(element[key]);
return device_time ? (moment(device_time).format('dddd,ll,LTS')) : "";
} else {
return element[key]
}
}
ConvertToCSV(objArray, headerList) {
let array = typeof objArray != 'object' ? JSON.parse(objArray) : objArray;
array = JSON.parse(JSON.stringify(array));
array.forEach(element => {
element['date'] = this.convertToDate(element,'date');
element['insertionTime'] = this.convertToDate(element, 'insertionTime')
element['syncedAt'] = this.convertToDate(element, 'syncedAt')
element['date'] = this.convertToDate(element, 'date')
if (element.integrationResponse){
if (typeof (element.integrationResponse) === 'object') {
element.integrationResponse = JSON.stringify(element.integrationResponse);
}
}
if (element.fuelVoltage) {
element.fuelVoltage = element.fuelVoltage ? (element.fuelVoltage / 1000).toFixed(2):'';
}
});
// console.log(array,"<===");Distance 126.94
// Running 2:1
// Idle 1:56
// Stop
let str = 'Customer List \r\n';
let row = 'S.No,';
// name,emial,phone,id,password and status no of vehicles
let newHeaders = ['Device IMEI', 'Lattitude', 'Longitude', 'Speed', 'Device Time', 'Insertion Time', 'Last Push', 'Integration Respnse', 'Ignition', 'Power', 'GPS positioned', 'isFluctuation', 'isPastData', 'Ext. Volt.', 'Fuel Volt.', 'Fuel Value (L)', 'Raw Data', 'AC', 'Powercut Alarm', 'Sattelite'];
for (let index in newHeaders) {
row += newHeaders[index] + ',';
}
row = row.slice(0, -1);
str += row + '\r\n';
for (let i = 0; i < array.length; i++) {
let line = (i + 1) + '';
if (i < array.length) { }
for (let index in headerList) {
let head = headerList[index];
line += ',' + this.strRep(array[i][head]);
}
str += line + '\r\n';
}
return str;
}
strRep(data) {
if (typeof data == "string") {
let newData = data.replace(/,/g, " ");
return newData;
}
else if (typeof data == "undefined") {
return "-";
}
else if (typeof data == "number") {
return data.toString();
}
else {
return data;
}
}
exportExcelOld()
{
var tab_text="<table border='2px'><tr bgcolor='#87AFC6'>";

View file

@ -1,109 +1,109 @@
.headStyle {
text-align: center;
font-size: 22px;
font-weight: 500;
margin-top: 10px;
color: #6b6a6a;
}
.InputStyle {
padding: 10px;
padding-bottom: 20px;
background-color: #efefef;
margin-bottom: 10px;
.selecStyle {
display: inherit;
width: 56%;
padding-left: 16px;
margin-left: 50px;
border-radius: 10px;
}
}
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
.rowStyle {
// margin: 5px;
// background: white;
height: 84vh;
// box-shadow: 3px 1px 5px 0px #b2b0ae;
}
#deviceTable input {
border-radius: 5px;
}
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
// background: rgb(74, 118, 184);
background: #868e96;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
#toast {
visibility: hidden;
// max-width: 150px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 150px;
height: 150px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}
.headStyle {
text-align: center;
font-size: 22px;
font-weight: 500;
margin-top: 10px;
color: #6b6a6a;
}
.InputStyle {
padding: 10px;
padding-bottom: 20px;
background-color: #efefef;
margin-bottom: 10px;
.selecStyle {
display: inherit;
width: 56%;
padding-left: 16px;
margin-left: 50px;
border-radius: 10px;
}
}
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
.rowStyle {
// margin: 5px;
// background: white;
height: 84vh;
// box-shadow: 3px 1px 5px 0px #b2b0ae;
}
#deviceTable input {
border-radius: 5px;
}
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
// background: rgb(74, 118, 184);
background: #868e96;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
#toast {
visibility: hidden;
// max-width: 150px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 150px;
height: 150px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}

View file

@ -1,109 +1,109 @@
.headStyle {
text-align: center;
font-size: 22px;
font-weight: 500;
margin-top: 10px;
color: #6b6a6a;
}
.InputStyle {
padding: 10px;
padding-bottom: 20px;
background-color: #efefef;
margin-bottom: 10px;
.selecStyle {
display: inherit;
width: 56%;
padding-left: 16px;
margin-left: 50px;
border-radius: 10px;
}
}
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
.rowStyle {
// margin: 5px;
// background: white;
height: 84vh;
// box-shadow: 3px 1px 5px 0px #b2b0ae;
}
#deviceTable input {
border-radius: 5px;
}
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
// background: rgb(74, 118, 184);
background: #868e96;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
#toast {
visibility: hidden;
max-width: 150px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 150px;
height: 150px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}
.headStyle {
text-align: center;
font-size: 22px;
font-weight: 500;
margin-top: 10px;
color: #6b6a6a;
}
.InputStyle {
padding: 10px;
padding-bottom: 20px;
background-color: #efefef;
margin-bottom: 10px;
.selecStyle {
display: inherit;
width: 56%;
padding-left: 16px;
margin-left: 50px;
border-radius: 10px;
}
}
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
.rowStyle {
// margin: 5px;
// background: white;
height: 84vh;
// box-shadow: 3px 1px 5px 0px #b2b0ae;
}
#deviceTable input {
border-radius: 5px;
}
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
// background: rgb(74, 118, 184);
background: #868e96;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
#toast {
visibility: hidden;
max-width: 150px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 150px;
height: 150px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}

View file

@ -1,12 +1,12 @@
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
.rowStyle {
// margin: 5px;
// background: white;
height: 84vh;
// box-shadow: 3px 1px 5px 0px #b2b0ae;
}
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
.rowStyle {
// margin: 5px;
// background: white;
height: 84vh;
// box-shadow: 3px 1px 5px 0px #b2b0ae;
}

View file

@ -1,109 +1,109 @@
.headStyle {
text-align: center;
font-size: 22px;
font-weight: 500;
margin-top: 10px;
color: #6b6a6a;
}
.InputStyle {
padding: 10px;
padding-bottom: 20px;
background-color: #efefef;
margin-bottom: 10px;
.selecStyle {
display: inherit;
width: 56%;
padding-left: 16px;
margin-left: 50px;
border-radius: 10px;
}
}
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
.rowStyle {
// margin: 5px;
// background: white;
height: 84vh;
// box-shadow: 3px 1px 5px 0px #b2b0ae;
}
#deviceTable input {
border-radius: 5px;
}
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
// background: rgb(74, 118, 184);
background: #868e96;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
#toast {
visibility: hidden;
max-width: 150px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 150px;
height: 150px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}
.headStyle {
text-align: center;
font-size: 22px;
font-weight: 500;
margin-top: 10px;
color: #6b6a6a;
}
.InputStyle {
padding: 10px;
padding-bottom: 20px;
background-color: #efefef;
margin-bottom: 10px;
.selecStyle {
display: inherit;
width: 56%;
padding-left: 16px;
margin-left: 50px;
border-radius: 10px;
}
}
.topDiv {
padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
.rowStyle {
// margin: 5px;
// background: white;
height: 84vh;
// box-shadow: 3px 1px 5px 0px #b2b0ae;
}
#deviceTable input {
border-radius: 5px;
}
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
// background: rgb(74, 118, 184);
background: #868e96;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
#toast {
visibility: hidden;
max-width: 150px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 150px;
height: 150px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}

View file

@ -21,7 +21,20 @@
</thead>
<tbody>
<tr *ngFor="let item of imageDoc">
<td><img style="width: 100px;" [src]="'https://www.oneqlik.in'+item.image.substring(6)" (click)="openModal(template,item)"></td>
<td *ngIf="hasPdfFile(item.image); else pdfSection">
<a target="_blank" [href]="'https://www.oneqlik.in'+item.image.substring(6)">
<i class="fas fa-file-pdf fa-3x pl-4"></i>
</a>
<td>
<ng-template #pdfSection>
<td>
<img *ngIf="item.image ; else notAvaillableImg" style="width: 100px;" [src]="'https://www.oneqlik.in'+item.image.substring(6)" (click)="openModal(template,item)">
<ng-template #notAvaillableImg>Not Available</ng-template>
</td>
</ng-template>
<td>{{item.phone}}</td>
<td>{{item.doctype}}</td>
</tr>

View file

@ -1,121 +1,121 @@
.mainClass {
padding-top: 80px;
margin-right: 10px;
box-shadow: 4px 5px #ececec;
}
.mainClass p.head_style {
padding-top: 8px;
color: white;
margin-bottom: 0px;
}
/* .mainClass p.head_style1{
font-size: 15px;
font-weight: 500;
color: #615c5c;
text-align: left;
padding-left: 1%;
} */
/* .rowStyle{
padding-right: 15%;
} */
.formfieldstyle {
width: 40%;
}
// .rowHeight {
// height: 145px;
// overflow: auto;
// }
#toast {
visibility: hidden;
max-width: 150px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 150px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}
/deep/ .mat-input-flex {
border: 1px solid #c1c1c1;
background: #f2f2f2;
}
.modal-class {
position: absolute;
bottom: 0;
right: 0;
}
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
.modal-lg {
max-width: 1068px;
}
::ng-deep .modal-dialog {
max-width: 1200px !important;
width: 1200px;
}
.mainClass {
padding-top: 80px;
margin-right: 10px;
box-shadow: 4px 5px #ececec;
}
.mainClass p.head_style {
padding-top: 8px;
color: white;
margin-bottom: 0px;
}
/* .mainClass p.head_style1{
font-size: 15px;
font-weight: 500;
color: #615c5c;
text-align: left;
padding-left: 1%;
} */
/* .rowStyle{
padding-right: 15%;
} */
.formfieldstyle {
width: 40%;
}
// .rowHeight {
// height: 145px;
// overflow: auto;
// }
#toast {
visibility: hidden;
max-width: 150px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 150px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}
/deep/ .mat-input-flex {
border: 1px solid #c1c1c1;
background: #f2f2f2;
}
.modal-class {
position: absolute;
bottom: 0;
right: 0;
}
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
.modal-lg {
max-width: 1068px;
}
::ng-deep .modal-dialog {
max-width: 1200px !important;
width: 1200px;
}

View file

@ -121,7 +121,9 @@ export class DeviceDocComponent implements OnInit {
ngOnInit() {
this.bsConfig = Object.assign({}, { containerClass: 'theme-dark-blue' });
}
hasPdfFile(url) {
return url && url.indexOf(".pdf") != -1;
}
AddDocumentsField(addedRow:any){
@ -271,9 +273,11 @@ titleForDoc
openModal(template: TemplateRef<any>,doc){
this.modalRef = this.modalService.show(template,{'backdrop':'static',class:'modal-dialog-centered'});
// this.number=doc.phone;
var name=(this.data.dealer_payload.user?this.data.dealer_payload.user.first_name?this.data.dealer_payload.user.first_name:"":''+" "+
this.data.dealer_payload.user?this.data.dealer_payload.user.last_name?this.data.dealer_payload.user.last_name:"":'')
this.titleForDoc=doc.doctype?doc.doctype=="Adhar card1"?"Adhar card Front":doc.doctype=="Adhar card2"?"Adhar card Back":doc.doctype:doc.doctype
let fname = this.data.dealer_payload.user && this.data.dealer_payload.user.first_name ? this.data.dealer_payload.user.first_name : "";
let lName = this.data.dealer_payload.user && this.data.dealer_payload.user.last_name ? this.data.dealer_payload.user.last_name : '';
var name = fname + " " + lName
this.titleForDoc=doc.doctype?doc.doctype=="Adhar card1"?"Adhar card Front":doc.doctype=="Adhar card2"?"Adhar card Back":doc.doctype:doc.doctype
this.key=[];
this.value=[]
if(doc.doctype=="Adhar card1" || doc.doctype=="Adhar card1 *"){
@ -283,6 +287,7 @@ openModal(template: TemplateRef<any>,doc){
doc.phone]
}else if(doc.doctype=="Adhar card2" || doc.doctype=="Adhar card2 *"){
this.key=['Name',"Address","Adhaar no"];
this.value=[this.data.dealer_payload.user?this.data.dealer_payload.user.first_name?this.data.dealer_payload.user.first_name:"":''+" "+
this.data.dealer_payload.user?this.data.dealer_payload.user.last_name?this.data.dealer_payload.user.last_name:"":'',
@ -297,7 +302,7 @@ openModal(template: TemplateRef<any>,doc){
this.data.dealer_payload.ChassisNo?this.data.dealer_payload.ChassisNo:"",
doc.phone]
console.log('this.value', this.value, name)
}else if(doc.doctype=="vehicle RC"|| doc.doctype=="vehicle RC"){
this.key=['Name',"Vehicle Number","Address","Engine No.","Chassis No.","Number"];
this.value=[name,

View file

@ -170,6 +170,9 @@
<th>
{{ "View" | translate }}
</th>
<th>
{{ "Edit" | translate }}
</th>
</tr>
</thead>
<tbody>
@ -355,6 +358,10 @@
<td style="text-align: center; cursor: pointer">
<i class="fas fa-eye" (click)="viewDocuments(cust_array)"></i>
</td>
<td style="text-align: center; cursor: pointer">
<i id="edit" (click)="editDevice(cust_array)" title="Edit Vehicle" style="font-size:20px;color: green" class="fas fa-edit"></i>
</td>
</tr>
</tbody>
</table>

View file

@ -1,65 +1,65 @@
.btn {
display: inline-block;
margin-bottom: 0;
text-align: center;
text-transform: uppercase;
vertical-align: middle;
cursor: pointer;
background-image: none;
padding: 6px 12px;
font-size: 1.4rem;
border-radius: 0px;
border: 1px solid transparent;
text-decoration: none;
user-select: none;
background: #d8d8d8;
font-size: 12px;
&,
&:active,
&.active {
&:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
}
&:hover,
&:focus,
&.focus {
text-decoration: none;
color: #fff;
}
&:active,
&.active {
outline: 0;
background-image: none;
}
&.disabled,
&[disabled],
fieldset[disabled] & {
cursor: not-allowed;
pointer-events: none;
box-shadow: none;
}
&.btn-xs {
padding: 3px 6px;
font-size: 1.2rem;
}
&.btn-sm {
padding: 4px 8px;
font-size: 1.3rem;
}
&.btn-lg {
padding: 8px 16px;
font-size: 1.6rem;
}
}
.btn {
display: inline-block;
margin-bottom: 0;
text-align: center;
text-transform: uppercase;
vertical-align: middle;
cursor: pointer;
background-image: none;
padding: 6px 12px;
font-size: 1.4rem;
border-radius: 0px;
border: 1px solid transparent;
text-decoration: none;
user-select: none;
background: #d8d8d8;
font-size: 12px;
&,
&:active,
&.active {
&:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
}
&:hover,
&:focus,
&.focus {
text-decoration: none;
color: #fff;
}
&:active,
&.active {
outline: 0;
background-image: none;
}
&.disabled,
&[disabled],
fieldset[disabled] & {
cursor: not-allowed;
pointer-events: none;
box-shadow: none;
}
&.btn-xs {
padding: 3px 6px;
font-size: 1.2rem;
}
&.btn-sm {
padding: 4px 8px;
font-size: 1.3rem;
}
&.btn-lg {
padding: 8px 16px;
font-size: 1.6rem;
}
}

View file

@ -16,6 +16,7 @@ import { NormalCertComponent } from '../../device/normal-cert/normal-cert.compon
import { CertOptionComponent } from '../../device/cert-option/cert-option.component';
import { EditDeviceMasterComponent } from '../../device/edit-device-master/edit-device-master.component';
declare var swal: any;
import * as moment from 'moment';
@Component({
selector: 'app-device-kyc',
@ -335,6 +336,11 @@ searchFilter(text: string) {
// that.limit = len;
this.getCustomer();
}
editDevice(data) {
localStorage.setItem('deviceData', JSON.stringify(data))
localStorage.setItem('KycApprovalRedirect','true');
this.router.navigate(['/editDevice']);
}
getCustomer(){
this.Load = true;
var url="/devices/getAllVehi?id="+this.organisation+"&skip="+this.skip+'&limit='+this.limit
@ -452,10 +458,31 @@ tab:any;
// var custumer=[];
// custumer = data;
for(var i=0;i<this.custumer.length;i++){
this.custumer[i].email=this.custumer[i].user.email?this.custumer[i].user.email:''
this.custumer[i].user_id=this.custumer[i].user.user_id?this.custumer[i].user.user_id:''
this.custumer[i].phone=this.custumer[i].user.phone?this.custumer[i].user.phone:''
this.custumer[i].fullName=this.custumer[i].user.first_name?this.custumer[i].user.first_name:''+" "+this.custumer[i].user.last_name?this.custumer[i].user.last_name:'';
this.custumer[i].DocName = '-';
this.custumer[i].device_Type_csv = this.custumer[i].device_model && this.custumer[i].device_model.device_type ? this.custumer[i].device_model.device_type :''
this.custumer[i].adharNumber = '-';
if (this.custumer[i].imageDoc && this.custumer[i].imageDoc.length) {
let findData = this.custumer[i].imageDoc.find(dImageDoc => dImageDoc.doctype == 'Adhar card1 *');
if (findData) {
this.custumer[i].DocName = 'Aadhar Card';
this.custumer[i].adharNumber = findData.phone ? findData.phone.replaceAll('-','') : '-' ;
}
}
let lastName = this.custumer[i].user && this.custumer[i].user.last_name ? this.custumer[i].user.last_name : '';
console.log(lastName);
this.custumer[i].Dphone ='-';
this.custumer[i].kycApprovalDateOnly = moment(this.custumer[i].kycApprovalDate).format("DD/MM/YYYY");
this.custumer[i].fuelType = '-';
this.custumer[i].stateServer = '-';
this.custumer[i].email = this.custumer[i].user && this.custumer[i].user.email ? this.custumer[i].user.email : ''
this.custumer[i].Dealer_full_name = (this.custumer[i] && this.custumer[i].Dealer && this.custumer[i].Dealer.first_name ? this.custumer[i].Dealer.first_name : '') + ' ' + (this.custumer[i] && this.custumer[i].Dealer &&this.custumer[i].Dealer.last_name ? this.custumer[i].Dealer.last_name : '')
//this.custumer[i].Dealer_full_name = (this.custumer[i].Dealer.first_name ? this.custumer[i].Dealer.first_name : '') + ' ' +(this.custumer[i].Dealer.last_name ? this.custumer[i].Dealer.last_name : '');
// this.custumer[i].email=this.custumer[i].user.email?this.custumer[i].user.email:''
this.custumer[i].user_id = this.custumer[i].user && this.custumer[i].user.user_id?this.custumer[i].user.user_id:''
this.custumer[i].phone = this.custumer[i].user && this.custumer[i].user.phone?this.custumer[i].user.phone:'';
this.custumer[i].address = this.custumer[i].user && this.custumer[i].user.address ? this.custumer[i].user.address : ''
this.custumer[i].fullName = (this.custumer[i].user && this.custumer[i].user.first_name ? this.custumer[i].user.first_name : '') + " " + (lastName ? lastName :'');
console.log(this.custumer[i].fullName);
if(i==(this.custumer.length-1)){
this.downloadFile(this.custumer);
@ -479,8 +506,8 @@ tab:any;
}
downloadFile(data) {
let arrHeader = ["fullName", "email", "phone", "user_id","kycStatus","Device_Name","Device_ID","esim_validity","remark","RtoState","RtoCity"];
let arrHeader = ["Device_ID", "kycApprovalDateOnly", "vahanID", "device_Type_csv", "IccidNo", "sim_number", "sim_number2", 'sim_provider', 'License', 'Dealer_full_name', 'phone', 'DocName', 'adharNumber', "fullName", "ConcernPersonName", 'phone', 'manufacturingCompany', 'Model', 'ChassisNo', 'engineNo', 'fuelType', 'Device_Name', 'transportOfficeCity', 'transportOfficeState', 'pin', "transportOfficeState", 'rto', "stateServer", 'state_certifcate_date', 'DocName', 'adharNumber', 'address'];
let arrHeaderOld = ["fullName", "email", "phone", "user_id","kycStatus","Device_Name","Device_ID","esim_validity","remark","RtoState","RtoCity"];
let csvData = this.ConvertToCSV(data, arrHeader);
let blob = new Blob(['\ufeff' + csvData], { type: 'text/csv;charset=utf-8;' });
let dwldLink = document.createElement("a");
@ -507,7 +534,8 @@ tab:any;
let str = 'Customer List \r\n';
let row = 'S.No,';
// name,emial,phone,id,password and status no of vehicles
let newHeaders =["Name", "Email", "Phone", "User id","KYC Status","Device Name","IMEI","E Sim Validity","Remark","RTO State","RTO City"];
let newHeaders = ['IMEI NO.', 'KYC Approve Date', 'DEVICE ID', 'Device Model', 'ICCID NO.', 'SIM 1', 'SIM 2', 'Profile', 'Plan', 'Dealership- Distributor Name', 'D. Mobile', 'ID Proof Document', 'ID NO', 'Customer Name', 'Concern Person Name', 'Mobile No', 'MAKE BY', 'Model', 'Chassis No', 'Engine No', 'Fuel Type', 'Vehicle No.', 'CITY', 'State', 'PIN', 'RTO STATE', 'RTO NAME', 'STATE SERVER', 'State certificate Generation Date', 'Address Proof Document', 'Address ProofDocument No.', 'ADDRESS'];
let newHeadersOld =["Name", "Email", "Phone", "User id","KYC Status","Device Name","IMEI","E Sim Validity","Remark","RTO State","RTO City"];
for (let index in newHeaders) {
row += newHeaders[index] + ',';

View file

@ -1,372 +1,372 @@
.btn {
display: inline-block;
margin-bottom: 0;
text-align: center;
text-transform: uppercase;
vertical-align: middle;
cursor: pointer;
background-image: none;
padding: 6px 12px;
font-size: 1.4rem;
border-radius: 0px;
border: 1px solid transparent;
text-decoration: none;
user-select: none;
background: #d8d8d8;
font-size: 12px;
&,
&:active,
&.active {
&:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
}
&:hover,
&:focus,
&.focus {
text-decoration: none;
color: #fff;
}
&:active,
&.active {
outline: 0;
background-image: none;
}
&.disabled,
&[disabled],
fieldset[disabled] & {
cursor: not-allowed;
pointer-events: none;
box-shadow: none;
}
&.btn-xs {
padding: 3px 6px;
font-size: 1.2rem;
}
&.btn-sm {
padding: 4px 8px;
font-size: 1.3rem;
}
&.btn-lg {
padding: 8px 16px;
font-size: 1.6rem;
}
}
button,
input {
font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}
a {
color: #f96332;
}
a:hover,
a:focus {
color: #f96332;
}
p {
line-height: 1.61em;
font-weight: 300;
font-size: 1.2em;
}
.category {
text-transform: capitalize;
font-weight: 700;
color: #9a9a9a;
}
body {
color: #2c2c2c;
font-size: 14px;
font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
overflow-x: hidden;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
.nav-item .nav-link,
.nav-tabs .nav-link {
-webkit-transition: all 300ms ease 0s;
-moz-transition: all 300ms ease 0s;
-o-transition: all 300ms ease 0s;
-ms-transition: all 300ms ease 0s;
transition: all 300ms ease 0s;
}
.card a {
-webkit-transition: all 150ms ease 0s;
-moz-transition: all 150ms ease 0s;
-o-transition: all 150ms ease 0s;
-ms-transition: all 150ms ease 0s;
transition: all 150ms ease 0s;
}
[data-toggle="collapse"][data-parent="#accordion"] i {
-webkit-transition: transform 150ms ease 0s;
-moz-transition: transform 150ms ease 0s;
-o-transition: transform 150ms ease 0s;
-ms-transition: all 150ms ease 0s;
transition: transform 150ms ease 0s;
}
[data-toggle="collapse"][data-parent="#accordion"][aria-expanded="true"] i {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
.now-ui-icons {
display: inline-block;
font: normal normal normal 14px/1 "Nucleo Outline";
font-size: inherit;
// speak: none;
text-transform: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@-webkit-keyframes nc-icon-spin {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@-moz-keyframes nc-icon-spin {
0% {
-moz-transform: rotate(0deg);
}
100% {
-moz-transform: rotate(360deg);
}
}
@keyframes nc-icon-spin {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.now-ui-icons.objects_umbrella-13:before {
content: "\ea5f";
}
.now-ui-icons.shopping_cart-simple:before {
content: "\ea1d";
}
.now-ui-icons.shopping_shop:before {
content: "\ea50";
}
.now-ui-icons.ui-2_settings-90:before {
content: "\ea4b";
}
.nav-tabs {
border: 0;
padding: 15px 0.7rem;
}
.nav-tabs:not(.nav-tabs-neutral) > .nav-item > .nav-link.active {
box-shadow: 0px 5px 35px 0px rgba(0, 0, 0, 0.3);
}
.card .nav-tabs {
border-top-right-radius: 0.1875rem;
border-top-left-radius: 0.1875rem;
}
.nav-tabs > .nav-item > .nav-link {
color: #888888;
margin: 0;
margin-right: 5px;
background-color: transparent;
border: 1px solid transparent;
border-radius: 30px;
font-size: 14px;
padding: 11px 23px;
line-height: 1.5;
}
.nav-tabs > .nav-item > .nav-link:hover {
background-color: transparent;
}
.nav-tabs > .nav-item > .nav-link.active {
background-color: #444;
border-radius: 30px;
color: #ffffff;
}
.nav-tabs > .nav-item > .nav-link i.now-ui-icons {
font-size: 14px;
position: relative;
top: 1px;
margin-right: 3px;
}
.nav-tabs.nav-tabs-neutral > .nav-item > .nav-link {
color: #ffffff;
}
.nav-tabs.nav-tabs-neutral > .nav-item > .nav-link.active {
background-color: rgba(255, 255, 255, 0.2);
color: #ffffff;
}
.card {
border: 0;
border-radius: 0.1875rem;
display: inline-block;
position: relative;
width: 100%;
// margin-bottom: 30px;
// box-shadow: 0px 5px 25px 0px rgba(0, 0, 0, 0.2);
}
.card .card-header {
background-color: transparent;
border-bottom: 0;
background-color: transparent;
border-radius: 0;
padding: 0;
}
.card[data-background-color="orange"] {
// background-color: #2d4262;
}
.card[data-background-color="red"] {
background-color: #ff3636;
}
.card[data-background-color="yellow"] {
background-color: #ffb236;
}
.card[data-background-color="blue"] {
background-color: #2ca8ff;
}
.card[data-background-color="green"] {
background-color: #15b60d;
}
[data-background-color="orange"] {
// background-color: #2d4262;
}
[data-background-color="black"] {
// background-color: #2c2c2c;
}
[data-background-color]:not([data-background-color="gray"]) {
color: #ffffff;
}
[data-background-color]:not([data-background-color="gray"]) p {
color: #ffffff;
}
[data-background-color]:not([data-background-color="gray"])
a:not(.btn):not(.dropdown-item) {
color: #ffffff;
}
[data-background-color]:not([data-background-color="gray"])
.nav-tabs
> .nav-item
> .nav-link
i.now-ui-icons {
color: #ffffff;
}
@font-face {
font-family: "Nucleo Outline";
src: url("https://github.com/creativetimofficial/now-ui-kit/blob/master/assets/fonts/nucleo-outline.eot");
src: url("https://github.com/creativetimofficial/now-ui-kit/blob/master/assets/fonts/nucleo-outline.eot")
format("embedded-opentype");
src: url("https://raw.githack.com/creativetimofficial/now-ui-kit/master/assets/fonts/nucleo-outline.woff2");
font-weight: normal;
font-style: normal;
}
.now-ui-icons {
display: inline-block;
font: normal normal normal 14px/1 "Nucleo Outline";
font-size: inherit;
// speak: none;
text-transform: none;
/* Better Font Rendering */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
footer {
margin-top: 50px;
color: #555;
background: #fff;
padding: 25px;
font-weight: 300;
background: #f7f7f7;
}
.footer p {
margin-bottom: 0;
}
footer p a {
color: #555;
font-weight: 400;
}
footer p a:hover {
color: #e86c42;
}
@media screen and (max-width: 768px) {
.nav-tabs {
display: inline-block;
width: 100%;
padding-left: 100px;
padding-right: 100px;
text-align: center;
}
.nav-tabs .nav-item > .nav-link {
margin-bottom: 5px;
}
}
.mat-dialog-container {
padding: 0px !important;
}
.btn {
display: inline-block;
margin-bottom: 0;
text-align: center;
text-transform: uppercase;
vertical-align: middle;
cursor: pointer;
background-image: none;
padding: 6px 12px;
font-size: 1.4rem;
border-radius: 0px;
border: 1px solid transparent;
text-decoration: none;
user-select: none;
background: #d8d8d8;
font-size: 12px;
&,
&:active,
&.active {
&:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
}
&:hover,
&:focus,
&.focus {
text-decoration: none;
color: #fff;
}
&:active,
&.active {
outline: 0;
background-image: none;
}
&.disabled,
&[disabled],
fieldset[disabled] & {
cursor: not-allowed;
pointer-events: none;
box-shadow: none;
}
&.btn-xs {
padding: 3px 6px;
font-size: 1.2rem;
}
&.btn-sm {
padding: 4px 8px;
font-size: 1.3rem;
}
&.btn-lg {
padding: 8px 16px;
font-size: 1.6rem;
}
}
button,
input {
font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}
a {
color: #f96332;
}
a:hover,
a:focus {
color: #f96332;
}
p {
line-height: 1.61em;
font-weight: 300;
font-size: 1.2em;
}
.category {
text-transform: capitalize;
font-weight: 700;
color: #9a9a9a;
}
body {
color: #2c2c2c;
font-size: 14px;
font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
overflow-x: hidden;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
.nav-item .nav-link,
.nav-tabs .nav-link {
-webkit-transition: all 300ms ease 0s;
-moz-transition: all 300ms ease 0s;
-o-transition: all 300ms ease 0s;
-ms-transition: all 300ms ease 0s;
transition: all 300ms ease 0s;
}
.card a {
-webkit-transition: all 150ms ease 0s;
-moz-transition: all 150ms ease 0s;
-o-transition: all 150ms ease 0s;
-ms-transition: all 150ms ease 0s;
transition: all 150ms ease 0s;
}
[data-toggle="collapse"][data-parent="#accordion"] i {
-webkit-transition: transform 150ms ease 0s;
-moz-transition: transform 150ms ease 0s;
-o-transition: transform 150ms ease 0s;
-ms-transition: all 150ms ease 0s;
transition: transform 150ms ease 0s;
}
[data-toggle="collapse"][data-parent="#accordion"][aria-expanded="true"] i {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
.now-ui-icons {
display: inline-block;
font: normal normal normal 14px/1 "Nucleo Outline";
font-size: inherit;
// speak: none;
text-transform: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@-webkit-keyframes nc-icon-spin {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@-moz-keyframes nc-icon-spin {
0% {
-moz-transform: rotate(0deg);
}
100% {
-moz-transform: rotate(360deg);
}
}
@keyframes nc-icon-spin {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.now-ui-icons.objects_umbrella-13:before {
content: "\ea5f";
}
.now-ui-icons.shopping_cart-simple:before {
content: "\ea1d";
}
.now-ui-icons.shopping_shop:before {
content: "\ea50";
}
.now-ui-icons.ui-2_settings-90:before {
content: "\ea4b";
}
.nav-tabs {
border: 0;
padding: 15px 0.7rem;
}
.nav-tabs:not(.nav-tabs-neutral) > .nav-item > .nav-link.active {
box-shadow: 0px 5px 35px 0px rgba(0, 0, 0, 0.3);
}
.card .nav-tabs {
border-top-right-radius: 0.1875rem;
border-top-left-radius: 0.1875rem;
}
.nav-tabs > .nav-item > .nav-link {
color: #888888;
margin: 0;
margin-right: 5px;
background-color: transparent;
border: 1px solid transparent;
border-radius: 30px;
font-size: 14px;
padding: 11px 23px;
line-height: 1.5;
}
.nav-tabs > .nav-item > .nav-link:hover {
background-color: transparent;
}
.nav-tabs > .nav-item > .nav-link.active {
background-color: #444;
border-radius: 30px;
color: #ffffff;
}
.nav-tabs > .nav-item > .nav-link i.now-ui-icons {
font-size: 14px;
position: relative;
top: 1px;
margin-right: 3px;
}
.nav-tabs.nav-tabs-neutral > .nav-item > .nav-link {
color: #ffffff;
}
.nav-tabs.nav-tabs-neutral > .nav-item > .nav-link.active {
background-color: rgba(255, 255, 255, 0.2);
color: #ffffff;
}
.card {
border: 0;
border-radius: 0.1875rem;
display: inline-block;
position: relative;
width: 100%;
// margin-bottom: 30px;
// box-shadow: 0px 5px 25px 0px rgba(0, 0, 0, 0.2);
}
.card .card-header {
background-color: transparent;
border-bottom: 0;
background-color: transparent;
border-radius: 0;
padding: 0;
}
.card[data-background-color="orange"] {
// background-color: #2d4262;
}
.card[data-background-color="red"] {
background-color: #ff3636;
}
.card[data-background-color="yellow"] {
background-color: #ffb236;
}
.card[data-background-color="blue"] {
background-color: #2ca8ff;
}
.card[data-background-color="green"] {
background-color: #15b60d;
}
[data-background-color="orange"] {
// background-color: #2d4262;
}
[data-background-color="black"] {
// background-color: #2c2c2c;
}
[data-background-color]:not([data-background-color="gray"]) {
color: #ffffff;
}
[data-background-color]:not([data-background-color="gray"]) p {
color: #ffffff;
}
[data-background-color]:not([data-background-color="gray"])
a:not(.btn):not(.dropdown-item) {
color: #ffffff;
}
[data-background-color]:not([data-background-color="gray"])
.nav-tabs
> .nav-item
> .nav-link
i.now-ui-icons {
color: #ffffff;
}
@font-face {
font-family: "Nucleo Outline";
src: url("https://github.com/creativetimofficial/now-ui-kit/blob/master/assets/fonts/nucleo-outline.eot");
src: url("https://github.com/creativetimofficial/now-ui-kit/blob/master/assets/fonts/nucleo-outline.eot")
format("embedded-opentype");
src: url("https://raw.githack.com/creativetimofficial/now-ui-kit/master/assets/fonts/nucleo-outline.woff2");
font-weight: normal;
font-style: normal;
}
.now-ui-icons {
display: inline-block;
font: normal normal normal 14px/1 "Nucleo Outline";
font-size: inherit;
// speak: none;
text-transform: none;
/* Better Font Rendering */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
footer {
margin-top: 50px;
color: #555;
background: #fff;
padding: 25px;
font-weight: 300;
background: #f7f7f7;
}
.footer p {
margin-bottom: 0;
}
footer p a {
color: #555;
font-weight: 400;
}
footer p a:hover {
color: #e86c42;
}
@media screen and (max-width: 768px) {
.nav-tabs {
display: inline-block;
width: 100%;
padding-left: 100px;
padding-right: 100px;
text-align: center;
}
.nav-tabs .nav-item > .nav-link {
margin-bottom: 5px;
}
}
.mat-dialog-container {
padding: 0px !important;
}

View file

@ -28,7 +28,7 @@
name="fontStyle" aria-label="Font Style">
<md-button-toggle style="width: 100%;font-size: 12px; text-align: center;"
*ngFor="let vehStatus of AllVeh"
[ngClass]="{ 'selectedRunning' :(vehStatus.status == 'Running'), 'deselected' : !vehStatus.status, 'selectedStopped' :(vehStatus.status == 'Stopped'), 'Inactice' :(vehStatus.status == 'Inactive'),'selectIdling' :(vehStatus.status == 'Idle'), 'selectedNodata' : (vehStatus.status == 'No data')}">
[ngClass]="{ 'selectedTotal' :(vehStatus.status == 'Total'),'selectedRunning' :(vehStatus.status == 'Running'), 'deselected' : !vehStatus.status, 'selectedStopped' :(vehStatus.status == 'Stopped'), 'Inactice' :(vehStatus.status == 'Inactive'),'selectIdling' :(vehStatus.status == 'Idle'), 'selectedNodata' : (vehStatus.status == 'No data')}">
<div (click)="getDeviceBYfilter(vehStatus.status,'tclick')">
{{vehStatus.totalCount}}
{{vehStatus.status | translate}}
@ -246,7 +246,7 @@
</div>
<md-input-container *ngIf="devReady === true" style="width: 100%;height:40px;font-size: 12px;" [disabled]='disableSearch'>
<input mdInput placeholder="Search" [mdAutocomplete]="tdAuto" name="state" #state="ngModel"
[(ngModel)]="deviceName" (ngModelChange)="filterDevices(deviceName)"
[(ngModel)]="deviceName" (ngModelChange)="filterDevicesNew(deviceName)"
[disabled]='disableSearch'>
<md-autocomplete #tdAuto="mdAutocomplete">
<md-option *ngFor="let device of foods" [value]="device.viewValue" (click)="change(device)">
@ -941,14 +941,15 @@
<i class="far fa-play-circle" *ngIf="tempMapHistory[i].flag=='init'" (click)="play(i)" mdTooltip="{{'Play History' | translate}}" style="width: 34px;height: 34px;font-size: 34px;color: #1eacb2;"></i>
<i class="far fa-play-circle" *ngIf="tempMapHistory[i].flag=='start'" (click)="play(i)" mdTooltip="{{'Play History' | translate}}" style="width: 34px;height: 34px;font-size: 34px;color: #1eacb2;"></i>
<i class="far fa-pause-circle" *ngIf="tempMapHistory[i].flag=='stop'" (click)="play(i)" mdTooltip="{{'Pause' | translate}}" style="width: 34px;height: 34px;font-size: 34px;color: #1eacb2;"></i>
</div>
<i class="fas fa-redo " *ngIf="sliderValue == seekBarValue && sliderValue != 0" (click)="replay(i)" mdTooltip="{{'Play History' | translate}}" style="width: 34px;height: 34px;font-size: 31px;color: #1eacb2;"></i>
</div>
<input type="range" min="0" max={{seekBarValue}} [(ngModel)]="sliderValue" class="slider" id="slider1" style="width: 200px;margin-left: 20px;margin-right: 20px; box-shadow: 0px 0px 6px 5px lightg" (change)="zoomSet()">
<!-- (change)="changeRange()" -->
<div class="kWgQNm" id="myDIV">
<div width="30px" cursor="pointer" font-size="14px" color="#1EACB2" class="sc-bdVaJa dfmgGo active" (click)="changeSpeed(1)">1x</div>
<div width="30px" cursor="pointer" font-size="14px" color="#1EACB2" class="sc-bdVaJa jXaklS" (click)="changeSpeed(2)">2x</div>
<div width="30px" cursor="pointer" font-size="14px" color="#1EACB2" class="sc-bdVaJa jXaklS" (click)="changeSpeed(5)">5x</div>
<div width="30px" cursor="pointer" font-size="14px" color="#FFFFFF" class="sc-bdVaJa bvKoMW" (click)="changeSpeed(10)">10x</div>
<div width="30px" cursor="pointer" font-size="14px" color="#1EACB2" [class.active]="speed == 100 || speed == 0" class="sc-bdVaJa dfmgGo" (click)="changeSpeed(1)">1x</div>
<div width="30px" cursor="pointer" font-size="14px" color="#1EACB2" class="sc-bdVaJa jXaklS" [class.active]="speed == 200" (click)="changeSpeed(2)">2x</div>
<div width="30px" cursor="pointer" font-size="14px" color="#1EACB2" class="sc-bdVaJa jXaklS" [class.active]="speed == 500" (click)="changeSpeed(5)">5x</div>
<div width="30px" cursor="pointer" font-size="14px" color="#FFFFFF" class="sc-bdVaJa bvKoMW" [class.active]="speed == 1000" (click)="changeSpeed(10)">10x</div>
</div>
</div>
</div>

View file

@ -30,6 +30,12 @@
border-right: 2px solid #ededed;
}
.selectedTotal{
background: #9341acc7;
color: white;
border-right: 2px solid #ededed;
}
.selectedStopped{
background: #cb0000d9;
color: white;

View file

@ -25,6 +25,7 @@ import { AddDeviceComponent } from './add-device/add-device.component';
import { FormControl } from '@angular/forms';
import { ShoRoutePlanComponent } from './sho-route-plan/sho-route-plan.component';
declare var jsPDF : any;
declare var html2canvas:any
@ -52,7 +53,7 @@ export class LocationComponent implements OnInit, OnDestroy {
modelChanged: Subject<string> = new Subject<string>();
area=0;
toppings = new FormControl();
isLastPosition =false;
toppingList: string[] = ['Extra cheese', 'Mushroom', 'Onion', 'Pepperoni', 'Sausage', 'Tomato'];
imei
// private fuelComponent: SidemenuFuelComponent;
@ -149,6 +150,7 @@ export class LocationComponent implements OnInit, OnDestroy {
maintanance: any;
expiredDevices: any;
OutOfReach: any;
totalDevices:any;
no_data: any;
Running: any;
idle_duration: any;
@ -546,6 +548,7 @@ export class LocationComponent implements OnInit, OnDestroy {
offline: Boolean = false;
geo: Boolean = false;
foods = [];
masterFoods = [];
devmap(a) {
// console.log(a);
}
@ -1163,7 +1166,7 @@ export class LocationComponent implements OnInit, OnDestroy {
outerThis.draw_flight_trail(outerThis.flightPathArr);
}
console.log('devobject coming from socket',deviceInfo,msg,initData);
// console.log('device object coming from service',outerThis.deviceList)
// if((a != null) && (a != undefined)&&(outerThis.navId != 'locationComponent')){
// if (deviceInfo.status != 'RUNNING') {
@ -2057,7 +2060,12 @@ export class LocationComponent implements OnInit, OnDestroy {
map.mapTypes.set('darkmode', styledMapType);
outerThis.mapNew = map;
var trafficLayer = new google.maps.TrafficLayer();
trafficLayer.setMap(map);
// trafficLayer.setMap(map);
if (outerThis.isTraffic) {
trafficLayer.setMap(map);
} else {
trafficLayer.setMap(null);
}
// outerThis.geoService(map);
outerThis.trafficLayer = trafficLayer;
@ -2415,17 +2423,16 @@ export class LocationComponent implements OnInit, OnDestroy {
// liveAddress = data[0].formatted_address;
// var add = liveAddress;
console.log('entering Address field');
// } else {
console.log('entering Address field');
// liveAddress = "No address available";
// }
// }
// else {
console.log('entering Address field');
// liveAddress = 'static address';
console.log(liveAddress);
// }
// })
@ -2847,7 +2854,6 @@ export class LocationComponent implements OnInit, OnDestroy {
number_plate : infobox_numberPlate
}
outerThis.markerArray.push(mtemp);
console.log('marker Temp array=>',outerThis.markerArray,outerThis.socketData);
google.maps.event.addListener(m, 'click', function () {
// console.log('Opening Infow window',m);
// { lat: , lng: }
@ -2880,7 +2886,7 @@ export class LocationComponent implements OnInit, OnDestroy {
}
flightPathArr: any = [];
isTraffic: boolean = true;
isTraffic: boolean = false;
mapTypeId: any = "roadmap";
setMapType(mapTypeId) {
// console.log(mapTypeId);
@ -3091,7 +3097,7 @@ export class LocationComponent implements OnInit, OnDestroy {
var lng = coord[1];
let outerThis = this
var startPos = [lat, lng];
this.speed = 200
//this.speed = 200
var iconselected = this.devicon
var delay = 100;
@ -3317,7 +3323,7 @@ export class LocationComponent implements OnInit, OnDestroy {
marker.setPosition(new google.maps.LatLng(lat, lng));
map.setCenter({ lat: lat, lng: lng });
// console.log("Abinash");
that.start = setTimeout(that.moveMarker, delay);
}
else {
@ -3353,13 +3359,16 @@ export class LocationComponent implements OnInit, OnDestroy {
that.rangeDetector = false;
console.log('iteration', a,coords.length)
// console.log("outside moveMarker function");
if (a > coords.length) {
// console.log("Cord.length if condition");
outerThis.speeed2 = 0;
outerThis.isLastPosition = true;
}
else {
else {
outerThis.isLastPosition = false;
// console.log("Cord.length else condition");
that.moveMarker();
km_h = outerThis.speed;
@ -3598,6 +3607,13 @@ zoomSet(){
showStatus: boolean = false;
flag: any;
playing: boolean = false;
replay(i) {
this.speed = 100;
clearTimeout(this.start);
this.marker4.setPosition({ lat: this.latLngLine[i].lat, lng: this.latLngLine[i].lng });
this.tempMapHistory[i]['flag'] = 'init';
this.play(i);
}
play(playindex) {
// console.log('playindex',playindex);
@ -3609,7 +3625,8 @@ zoomSet(){
tempObj["tempDataCoordArr"] = tempDataCoordArr;
if (this.tempMapHistory[playindex]['flag'] == 'init') {
if (this.tempMapHistory[playindex]['flag'] == 'init') {
this.speed = 100;
this.animateMarker_history(this.marker4, tempDataCoordArr, 50, icontype);
tempObj["marker"] = this.marker4;
this.tempMapHistory[playindex]['flag'] = 'stop';
@ -3630,10 +3647,10 @@ zoomSet(){
tempObj["flag"] = this.tempMapHistory[playindex]['flag'];
}
if (this.flag == 'reset') {
this.marker4.setPosition({ lat: this.latLngLine[0].lat, lng: this.latLngLine[0].lng });
this.flag = 'init';
}
if (this.flag == 'reset') {
this.marker4.setPosition({ lat: this.latLngLine[0].lat, lng: this.latLngLine[0].lng });
this.flag = 'init';
}
}
@ -3874,7 +3891,7 @@ zoomSet(){
// this.iconSelector("RUNNING","car",{});
var iconDest = 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=D|FF0000|000000';
// =====================================added==============================
if (this.latlongObjArr[i].interpolated == null || this.latlongObjArr[i].interpolated == undefined || this.latlongObjArr[i].interpolated.length == 0) {
@ -4160,7 +4177,7 @@ zoomSet(){
var cumulativeDistance =0 ;
for (let i = this.latlongObjArr.length - 1; i > 0; i--) {
console.log(this.latlongObjArr[i]);
var d_name = (this.navId === 'locationHistory')? this.dev_id.viewValue:this.dev_id.Device_Name;
this.speed = this.latlongObjArr[i].speed + "Km/hr";
this.im = this.latlongObjArr[i].imei;
@ -4190,7 +4207,7 @@ zoomSet(){
+ this.im + `</b><br><b>DEVICE DATE : `
+ this.datee + `</b><br><b>SPEED : `+ this.speed +
`</b><br><b>INSERTION TIME : `+ insertionTime +
`</b><br><b>RAW : `+ raw +
`</b><br><b>RAW : ` + '<span style="word-break: break-all;" id="display_row'+this.latlongObjArr[i]._id +'"></span><a id="' + this.latlongObjArr[i]._id +'" style="color: blue;text-decoration: underline;" onclick = "window.angularComponentRef.zone.run(() => {window.angularComponentRef.component.GetRowPacketEvent(\'' + this.latlongObjArr[i]._id + '\');})" > Get Raw Data </a>'+
`</b><br><b style="margin-bottom:10px" id="addressBinding">Address : `
+ this.contentAdd + '</b></div></b><br>'
+'<button style="margin-top:10px;background-color: blue;color: white;padding: 5px;" onclick="window.angularComponentRef.zone.run(() => {window.angularComponentRef.component.addpoi(\'' + lastLat + ',' + lastlong + '\');})">ADD POI</button></div></div></div>'
@ -4382,7 +4399,7 @@ zoomSet(){
icon: iconSrc,
scaledSize: new google.maps.Size(20, 20),
});
// markerSrc['infowindow'] = new google.maps.InfoWindow({ content: content });
markerSrc['infowindow'] = new google.maps.InfoWindow({ content: content });
const infowindow = new google.maps.InfoWindow({
content: contentString,
});
@ -4592,13 +4609,18 @@ zoomSet(){
var customTxt;
var txt;
function geocodePosition(pos, callback) {
var geocoder = new google.maps.Geocoder();
geocoder.geocode({
latLng: pos
}, function (responses) {
callback(responses[0].formatted_address)
try {
var geocoder = new google.maps.Geocoder();
geocoder.geocode({
latLng: pos
}, function (responses) {
callback(responses && responses[0] && responses[0].formatted_address ? responses[0].formatted_address : null)
});
});
} catch (error) {
callback(null)
}
}
var k;
@ -4712,7 +4734,12 @@ zoomSet(){
// console.log('mapmapmapmapmapmapmapmapmapmapmapmapmapmap',map);
outerThis.historyMap = map;
var trafficLayer = new google.maps.TrafficLayer();
trafficLayer.setMap(map);
if(outerThis.isTraffic){
trafficLayer.setMap(map);
}else{
trafficLayer.setMap(null);
}
isMapInit = true;
@ -5472,13 +5499,15 @@ var seconds = num % 60;
}
ngOnInit() {
this.injectData.setGPSConnection();
window["angularComponentRef"] = { component: this, zone: this._ngZone };
this.socket = this.injectData.getSocket_gps();
this.socket.on('connect', function (this) { });
this.socket_Notify = this.injectData.getSocket_notifIO();
this.socket_Notify.on('connect', function(this){ });
this.socket_Notify.on('connect', function(this){
console.log('notify connect ',this);
});
this.bsConfig = Object.assign({dateInputFormat: 'DD-MM-YYYY, h:mm:ss a'}, { containerClass: this.colorTheme });
// console.log('this.bsConfig',this.bsConfig);
@ -5700,9 +5729,17 @@ var seconds = num % 60;
if( this.socket_Notify){
this.socket_Notify.removeAllListeners()
}
this.injectData.removedGPSConnection();
}
GetRowPacketEvent(data) {
this.contactService.GetRowPacket(data).subscribe((res: any) => {
document.getElementById(data).innerHTML = '';
document.getElementById('display_row' + data).innerHTML = res.raw ? res.raw : 'NA';
})
}
addpoi(lat) {
// var lattitude = JSON.parse(lat);
var latlng = JSON.stringify(lat).substring(1, lat.length - 1);
@ -5825,12 +5862,45 @@ var seconds = num % 60;
}
}
this.masterFoods = JSON.parse(JSON.stringify(this.foods));
this.sortFoodDataByKey();
}, err => {
// this.Load = false;
// console.log(err);
})
}
filterDevicesNew(dlr) {
if ((this.navId === 'locationHistory')) {
if (dlr) {
const filterdealerValue: any = dlr;
this.foods = [];
this.masterFoods.forEach(pp => {
let t = pp.viewValue.toLocaleLowerCase().indexOf(filterdealerValue.toLocaleLowerCase());
if (t > -1) {
this.foods.push(pp)
}
});
} else {
this.foods = [...this.masterFoods];
}
}
this.sortFoodDataByKey();
}
sortFoodDataByKey() {
this.foods.sort((a, b) => {
let fa = a.viewValue.toLowerCase(),
fb = b.viewValue.toLowerCase();
if (fa < fb) {
return -1;
}
if (fa > fb) {
return 1;
}
return 0;
})
}
filterDevices(dlr) {
// console.log("=========>",dlr,this.foods);
@ -6274,7 +6344,7 @@ var seconds = num % 60;
controlText.style.lineHeight = '38px';
controlText.style.paddingLeft = '5px';
controlText.style.paddingRight = '5px';
controlText.innerHTML = text;
controlText.innerHTML = text ? text : '';
controlUI.appendChild(controlText);
// Setup the click event listeners: simply set the map to Chicago.
@ -6361,6 +6431,11 @@ var seconds = num % 60;
})
function geocodePosition(pos, callback) {
try {
} catch (error) {
}
var geocoder = new google.maps.Geocoder();
geocoder.geocode({
latLng: pos
@ -6416,7 +6491,7 @@ var seconds = num % 60;
// }
AllVeh: any = [{ 'status': 'Running', 'totalCount': '0' }, { 'status': 'Idle', 'totalCount': '0' }, { 'status': 'Stopped', 'totalCount': '0' }, { 'status': 'Inactive', 'totalCount': '0' }, { 'status': 'No data', 'totalCount': '0' }]
AllVeh: any = [{ 'status': 'Total', 'totalCount': '0' },{ 'status': 'Running', 'totalCount': '0' }, { 'status': 'Idle', 'totalCount': '0' }, { 'status': 'Stopped', 'totalCount': '0' }, { 'status': 'Inactive', 'totalCount': '0' }, { 'status': 'No data', 'totalCount': '0' }]
deviceData = [
{
@ -6648,6 +6723,7 @@ var seconds = num % 60;
this.off_vech = this.devicess["OFF Devices"];
this.maintanance = this.devicess["Maintance Device"];
this.expiredDevices = this.devicess["expire_status"];
this.totalDevices = this.devicess["Total_Vech"];
this.OutOfReach = this.devicess["OutOfReach"];
this.no_data = this.devicess["no_data"];
this.Running = this.devicess["running_devices"];
@ -6674,11 +6750,12 @@ var seconds = num % 60;
// this.loading = this.devicess.running_details.forward.count;
// this.unloading = this.devicess.running_details.reverse.count;
// this.not_on_root = this.devicess.running_details.not_on_route.count;
this.AllVeh[0].totalCount = this.Running;
this.AllVeh[1].totalCount = this.idle_vech;
this.AllVeh[2].totalCount = this.off_vech;
this.AllVeh[3].totalCount = this.OutOfReach;
this.AllVeh[4].totalCount = this.no_data;
this.AllVeh[0].totalCount = this.totalDevices;
this.AllVeh[1].totalCount = this.Running;
this.AllVeh[2].totalCount = this.idle_vech;
this.AllVeh[3].totalCount = this.off_vech;
this.AllVeh[4].totalCount = this.OutOfReach;
this.AllVeh[5].totalCount = this.no_data;
// console.log("DAtatatatat---",this.AllVeh);
@ -6692,104 +6769,113 @@ var seconds = num % 60;
devReady:boolean=true;
groups=[]
getDeviceBYfilter(i,iden) {
// console.log('iden=>',iden);
console.log(i,iden);
this.currStatus = i;
if (i == 6) {
this.skip = 0;
}
var vehStatus: string;
if(i!=undefined){
vehStatus = (i.toUpperCase() == 'INACTIVE') ? "OUT OF REACH" : (i.toUpperCase() == 'IDLE') ? "IDLING" : i.toUpperCase();
}else{
vehStatus = null;
if (this.currStatus =='Total'){
this.ngOnInit();
}
var status_1 = false;
if(iden === 'tclick'){
this.showSocketData = false;
}
else{
this.showSocketData = true;
}
this.deviceList =[];
this.foods=[];
// console.log('this.navId',this.navId);
if(this.navId == 'locationHistory'){
iden='tclick';
this.devReady= false;
this.limit = 10000;
};
// console.log('limitfgdfgdfgdgdgdgfdgfdgdgfdgfdgdfg',this.limit);
this.contactService.getDeviceByFilter_dash(vehStatus, this.emailid, this.useridd, this.skip, this.limit, this.myInput, this.supadmin, this.dealerid, status_1)
.subscribe(res => {
// console.log("INside devList");
var aaaa = res;
this.deviceList = aaaa.devices;
if (i == 6) {
this.skip = 0;
}
var vehStatus: string;
if (i != undefined) {
vehStatus = (i.toUpperCase() == 'INACTIVE') ? "OUT OF REACH" : (i.toUpperCase() == 'IDLE') ? "IDLING" : i.toUpperCase();
} else {
vehStatus = null;
this.devReady= true;
if (this.deviceList.length === 0) {
this.lastcall = false;
this.firstcall = true
}
this.foods=[];
for (var k = 0; k < this.deviceList.length; k++) {
}
// if(this.deviceList[k].vehicleGroup){
// if(!this.groups.includes({name:this.deviceList[k].vehicleGroup.name,id:this.deviceList[k].vehicleGroup._id}))
// this.groups.push({name:this.deviceList[k].vehicleGroup.name,id:this.deviceList[k].vehicleGroup._id})
// }
this.deviceList[k]['playPause'] = true;
this.deviceList[k]['checked'] =true;
if(iden === 'tclick'){
if (this.deviceList[k].type_of_device == "Tracker") {
let a = {
value: this.deviceList[k].Device_Name,
viewValue: this.deviceList[k].Device_Name,
did: this.deviceList[k].Device_ID,
id: this.deviceList[k]._id,
user: this.deviceList[k].user,
email: this.deviceList[k].Email_ID,
deviceType: this.deviceList[k].type_of_device,
iconType: this.deviceList[k].iconType,
// checked: true
}
this.foods.push(a);
if(k === (this.deviceList.length -1)){
// console.log("1111111110100000");
if(this.navId!='locationHistory')
{
this.showSocketData=false
var status_1 = false;
if (iden === 'tclick') {
this.showSocketData = false;
}
else {
this.showSocketData = true;
}
this.deviceList = [];
this.foods = [];
this.masterFoods = [];
// console.log('this.navId',this.navId);
if (this.navId == 'locationHistory') {
iden = 'tclick';
this.devReady = false;
this.limit = 10000;
};
// console.log('limitfgdfgdfgdgdgdgfdgfdgdgfdgfdgdfg',this.limit);
this.contactService.getDeviceByFilter_dash(vehStatus, this.emailid, this.useridd, this.skip, this.limit, this.myInput, this.supadmin, this.dealerid, status_1)
.subscribe(res => {
// console.log("INside devList");
var aaaa = res;
this.deviceList = aaaa.devices;
this.devReady = true;
if (this.deviceList.length === 0) {
this.lastcall = false;
this.firstcall = true
}
this.foods = [];
this.masterFoods = [];
for (var k = 0; k < this.deviceList.length; k++) {
// if(this.deviceList[k].vehicleGroup){
// if(!this.groups.includes({name:this.deviceList[k].vehicleGroup.name,id:this.deviceList[k].vehicleGroup._id}))
// this.groups.push({name:this.deviceList[k].vehicleGroup.name,id:this.deviceList[k].vehicleGroup._id})
// }
this.deviceList[k]['playPause'] = true;
this.deviceList[k]['checked'] = true;
if (iden === 'tclick') {
if (this.deviceList[k].type_of_device == "Tracker") {
let a = {
value: this.deviceList[k].Device_Name,
viewValue: this.deviceList[k].Device_Name,
did: this.deviceList[k].Device_ID,
id: this.deviceList[k]._id,
user: this.deviceList[k].user,
email: this.deviceList[k].Email_ID,
deviceType: this.deviceList[k].type_of_device,
iconType: this.deviceList[k].iconType,
// checked: true
}
this.livetrack(null);
this.foods.push(a);
if (k === (this.deviceList.length - 1)) {
// console.log("1111111110100000");
if (this.navId != 'locationHistory') {
this.showSocketData = false
}
this.livetrack(null);
}
}
}
}
}
if(this.deviceList.length==1){
this.selectedDevice=this.deviceList[0]._id
this.parkingButtonShow=this.deviceList[0].theftAlert==null?'grey':this.deviceList[0].theftAlert==undefined?'grey':this.deviceList[0].theftAlert==true?'green':'red'
this.DriverName=this.deviceList[0].driver_name;
// console.log("DRIVER NAME",this.DriverName,this.deviceList[0].ac);
this.ac=this.deviceList[0].ac?this.deviceList[0].ac:'NA'
this.DriverNumber=this.deviceList[0].contact_number
if (this.deviceList.length == 1) {
this.selectedDevice = this.deviceList[0]._id
this.parkingButtonShow = this.deviceList[0].theftAlert == null ? 'grey' : this.deviceList[0].theftAlert == undefined ? 'grey' : this.deviceList[0].theftAlert == true ? 'green' : 'red'
this.DriverName = this.deviceList[0].driver_name;
// console.log("DRIVER NAME",this.DriverName,this.deviceList[0].ac);
this.ac = this.deviceList[0].ac ? this.deviceList[0].ac : 'NA'
this.DriverNumber = this.deviceList[0].contact_number
}
this.selectAllVehicles({checked:true})
}
this.selectAllVehicles({ checked: true })
// console.log('this.deviceList',this.deviceList,'GROUP===',this.groups);
this.masterFoods = JSON.parse(JSON.stringify(this.foods));
this.sortFoodDataByKey();
})
}
// console.log('this.deviceList',this.deviceList,'GROUP===',this.groups);
})
}
@ -7720,19 +7806,12 @@ historySeekbaar(){
}
public Selectedspeed = 1;
changeSpeed(t){
// console.log(t);
this.speed = t * 100;
var header = document.getElementById("myDIV");
var btns = header.getElementsByClassName("sc-bdVaJa");
for (var i = 0; i < btns.length; i++) {
btns[i].addEventListener("click", function() {
var current = document.getElementsByClassName("active");
current[0].className = current[0].className.replace(" active", "");
this.className += " active";
});
}
this.Selectedspeed = t;
}
@ -7784,6 +7863,8 @@ getNearByVehicles(devData){
}
}
this.masterFoods = JSON.parse(JSON.stringify(this.foods));
this.sortFoodDataByKey();
// console.log('this.deviceList',this.deviceList);
}else{
this.data_descip = "No Nearby Devices Found !!!";
@ -8110,6 +8191,8 @@ getNearByVehicles(devData){
})
}
// @HostListener('click', ['$event'])
// onClick(event) {
// if (event.target.id === 'deletePoint'){
@ -8305,8 +8388,8 @@ image
this.endTime=this.tempMapHistory[0].toTime;
var name=this.deviceNameForPDF+" track from "+this.startTime+" to "+this.endTime+'.pdf'
var outerThis=this;
this.startAddress=this.finalArr[0].address
this.endAddress=this.finalArr[this.finalArr.length-1].address
this.startAddress = this.finalArr[0] ?this.finalArr[0].address : '';
this.endAddress = this.finalArr[0] ?this.finalArr[this.finalArr.length-1].address :''
// console.log(this.startAddress,this.endAddress);
// console.log(this.tempMapHistory,this.startAddress,this.endAddress, this.image);
@ -8320,7 +8403,7 @@ image
};
var doc = new jsPDF(pdfOptions);
this.contactService.setFontInPdf(doc);
var pageWidth = doc.internal.pageSize.width-20;
var width = pageWidth;
@ -8446,7 +8529,8 @@ selectAllVehicles(ev){
}
this.final = this.deviceList;
this.foods = [];
this.masterFoods = [];
for (let i = 0; i < this.final.length; i++) {
this.final[i]['checked'] = true;
// this.deviceList = this.final;
@ -8469,6 +8553,7 @@ selectAllVehicles(ev){
}
}
let that= this;
if((this.navId === undefined)||(this.navId != 'locationHistory')){
this.livetrack(this.fin);
@ -8479,6 +8564,8 @@ selectAllVehicles(ev){
this.new = this.foods[y];
}
}
this.masterFoods = JSON.parse(JSON.stringify(this.foods));
this.sortFoodDataByKey();
}else{
@ -8494,7 +8581,12 @@ selectAllVehicles(ev){
var map = new google.maps.Map(document.getElementById('map'), myOptions);
// console.log('mapmapmapmapmapmapmapmapmapmapmapmapmapmap',map);
var trafficLayer = new google.maps.TrafficLayer();
trafficLayer.setMap(map);
// trafficLayer.setMap(map);
if (this.isTraffic) {
trafficLayer.setMap(map);
} else {
trafficLayer.setMap(null);
}
var zoomBar: any;
zoomBar = document.getElementById('myRange');
map.setZoom(map.getZoom());
@ -8524,17 +8616,20 @@ getTravelPathReport(device){
var payload ={
"to":new Date(this.date2).toISOString(),
"from" : new Date(this.datefrom).toISOString(),
"device" : device.Device_ID,
"interval" :10
"device": device.Device_ID ? device.Device_ID : device.did,
"interval" :10
}
this.contactService.getTravel_path_report(payload).subscribe((resp:any)=>{
this.reportArr = [];
this.reportArr= resp.filter(function (el) {
if (resp && resp.length) {
this.reportArr= resp.filter(function (el) {
return el != null;
});
}
let last = {speed:''};
let result = [];
@ -8742,7 +8837,7 @@ this.reportArr1=this.reportArr
for (var j = 0; j < rowCount; j++) {
var str=(pdfBody[j].latDecimal?pdfBody[j].latDecimal:0)+' , '+(pdfBody[j].longDecimal?pdfBody[j].longDecimal:0)
var str = (pdfBody[j] && pdfBody[j].latDecimal ? pdfBody[j].latDecimal : 0) + ' , ' + (pdfBody[j] &&pdfBody[j].longDecimal?pdfBody[j].longDecimal:0)
body.push({
deviceName:pdfBody[j].Device_name,

View file

@ -1,49 +1,49 @@
#toast {
visibility: hidden;
max-width: 150px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 150px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}
#toast {
visibility: hidden;
max-width: 150px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 150px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}

View file

@ -134,8 +134,8 @@
</div>
<div class="col-sm-6 col-md-6 col-lg-6" >
<div style="text-align: right;padding-top: 20px;">
<span style="font-size: 18px; font-weight: 400; color: #2a2828; padding-right: 30px;cursor:pointer;font-weight:500">Become a Reseller</span>
<span style="font-size: 18px; font-weight: 400; color: #767474;">Support Contact</span>
<!-- <span style="font-size: 18px; font-weight: 400; color: #2a2828; padding-right: 30px;cursor:pointer;font-weight:500">Become a Reseller</span>
<span style="font-size: 18px; font-weight: 400; color: #767474;">Support Contact</span> -->
<span style="font-size: 18px; font-weight: 500; padding-left: 20px;"><a>{{supportContact}}</a></span>
<!-- {{supportContact}} -->
</div>

View file

@ -25,6 +25,7 @@ import {Observable} from 'rxjs/Observable';
import { TranslateService } from 'ng2-translate';
import { DOCUMENT } from '@angular/common';
import { AnnouncementComponent } from '../const/announcement/announcement.component';
//import { DatainjectionService } from '../datainjection.service';
@Component({
selector: 'app-services',
templateUrl: './login.component.html',
@ -96,7 +97,7 @@ passwordIcon:any = "visibility_off";
androidAppLink: any;
iosAppLink: any;
constructor(private titleServic: Title,public dialog: MdDialog,private dataService: ContactService,private _flashMessagesService: FlashMessagesService,private router: Router,public snackBar: MdSnackBar,public translate: TranslateService,@Inject(DOCUMENT) private _document: HTMLDocument) {
constructor(private titleServic: Title, public dialog: MdDialog, private dataService: ContactService, private _flashMessagesService: FlashMessagesService, private router: Router, public snackBar: MdSnackBar,public translate: TranslateService,@Inject(DOCUMENT) private _document: HTMLDocument) {
let split1 = document.URL.split('//')[1];
console.log(split1,document);
let split2 = split1.split('/')[0];
@ -116,7 +117,14 @@ passwordIcon:any = "visibility_off";
console.log("Inside showlink false");
this.showLink = false;
}
//let tUrl = 'http://www.nipponsecura.in/login';
//let split1 = tUrl.split('//')[1];
if (split2 == "www.nipponsecura.in" || split2 == "nipponsecura.in") {
this.cpn_showLink = true;
this.mainSiteurl = 'https://nipponaudio.com/';
}
if(split2 == "login.cpntrack.com"){
this.cpn_showLink = true;
@ -245,6 +253,7 @@ passwordIcon:any = "visibility_off";
// debugger;
this.dataService.log(newlog)
.subscribe(login => {
this.showLoader = false;
this.logins.push(login);
// console.log(JSON.parse("TOKEN",login.token));
@ -254,7 +263,7 @@ passwordIcon:any = "visibility_off";
localStorage.setItem('currentuser',JSON.parse(atob(login.token.split('.')[1]))._id);
var isOperator = JSON.parse(atob(login.token.split('.')[1])).isOperator;
var userId = JSON.parse(atob(login.token.split('.')[1]))._id;
// this._DatainjectionService.getConnection();
this.getLanguage(userId,isOperator,JSON.parse(atob(login.token.split('.')[1])).customer_role);
} , (err: any) => {
@ -735,7 +744,7 @@ countdown( elementName, minutes, seconds )
this.organisationName = (this.url == 'oneqlik')?'OneQlik':this.userData.organisationName ;
this.supportContact = this.userData.contact_support?this.userData.contact_support : '';
this.tagline= this.userData.tagline?this.userData.tagline : this.tagline;
this._document.getElementById('appFavicon').setAttribute('href', this.dev_url+this.userData.favicon);
this._document.getElementById('appFavicon').setAttribute('href', this.userData.favicon ? this.dev_url + this.userData.favicon :'faviconn.ico' );
this.text=this.userData.text;
window.localStorage['dealerName']= this.userData.dealerName;
window.localStorage['DealerID'] = this.userData.email

View file

@ -1,17 +1,17 @@
.topDiv {
padding-top: 20px;
background: whitesmoke;
height: 100vh;
}
.bg-blue {
background-color: #00c0ef !important;
}
.bg-green {
background-color: #00a65a !important;
}
.bg-orange {
background-color: #f39c12 !important;
}
.bg-red {
background-color: #d9534f !important;
}
.topDiv {
padding-top: 20px;
background: whitesmoke;
height: 100vh;
}
.bg-blue {
background-color: #00c0ef !important;
}
.bg-green {
background-color: #00a65a !important;
}
.bg-orange {
background-color: #f39c12 !important;
}
.bg-red {
background-color: #d9534f !important;
}

View file

@ -66,6 +66,7 @@ export class NotificationComponent implements OnInit, OnDestroy {
this.router.navigateByUrl("location");
}
accListener(){
console.log('connect notifiov2')
var outerThis = this;
return function(msg){
// console.log(msg);
@ -169,7 +170,9 @@ mb:any
}
this.socket_Notify = this.injectData.getSocket_notifIO();
this.socket_Notify.on('connect', function(this){ });
this.socket_Notify.on('connect', function(this){
console.log('notify connect',this)
});
this.socket_Notify.on( this.useridd, this.accListener());
this.getData(this.useridd).subscribe(
data => {

View file

@ -1,48 +1,48 @@
<div class="card" style="height:540px">
<div class="card-header">
<h4>Add Multiple POI</h4>
</div>
<div class="card-body">
<div class="row" style="margin-top: 10px;margin-bottom: 10px;">
<div class="col-sm-12" style="text-align: left;font-size: initial;">
<!-- <label >Choose an Excel File:</label>
<input style="margin-left: 30px;" type="file" id="excelFile" multiple size="50"> -->
<div class="col-sm-offset-2 col-sm-10" style="text-align: center;">
<label style="background: MD_DIALOG_DATA;box-shadow: 2px 2px #a0a3a5;"
class="file-upload btn btn-primary">Browse
for Excel file ... <input type="file" id="excelFile" multiple size="50" />
</label>
<button type="button" style="margin-top: 0px; margin-left: 15px;; width: 90px; box-shadow: 2px 2px #b1adad"
class="btn btn-primary" data-toggle="collapse" data-target="#collapseZero" aria-expanded="true"
aria-controls="collapseZero" (click)="uploadExcel()">Upload</button>
</div>
</div>
</div>
<div class="row" *ngIf="showErrorupload_1">
<div class=col-sm-12>
<table class="table table-striped table-hover " style="overflow-y: hidden; overflow-x: hidden;font-size:12px">
<thead>
<tr>
<th>{{'Client Name' | translate}}</th>
<th>{{'Altitude' | translate}}</th>
<th>{{'Longitude' | translate}}</th>
<th>{{'Address' | translate}}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let failedDevices of uploadJSON">
<td style="cursor:pointer">{{failedDevices['Client Name']}}</td>
<td style="cursor:pointer">{{failedDevices.Altitude}}</td>
<td style="cursor:pointer">{{failedDevices.Longitude}}</td>
<td style="cursor:pointer">{{failedDevices.Address}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="card" style="height:540px">
<div class="card-header">
<h4>Add Multiple POI</h4>
</div>
<div class="card-body">
<div class="row" style="margin-top: 10px;margin-bottom: 10px;">
<div class="col-sm-12" style="text-align: left;font-size: initial;">
<!-- <label >Choose an Excel File:</label>
<input style="margin-left: 30px;" type="file" id="excelFile" multiple size="50"> -->
<div class="col-sm-offset-2 col-sm-10" style="text-align: center;">
<label style="background: MD_DIALOG_DATA;box-shadow: 2px 2px #a0a3a5;"
class="file-upload btn btn-primary">Browse
for Excel file ... <input type="file" id="excelFile" multiple size="50" />
</label>
<button type="button" style="margin-top: 0px; margin-left: 15px;; width: 90px; box-shadow: 2px 2px #b1adad"
class="btn btn-primary" data-toggle="collapse" data-target="#collapseZero" aria-expanded="true"
aria-controls="collapseZero" (click)="uploadExcel()">Upload</button>
</div>
</div>
</div>
<div class="row" *ngIf="showErrorupload_1">
<div class=col-sm-12>
<table class="table table-striped table-hover " style="overflow-y: hidden; overflow-x: hidden;font-size:12px">
<thead>
<tr>
<th>{{'Client Name' | translate}}</th>
<th>{{'Altitude' | translate}}</th>
<th>{{'Longitude' | translate}}</th>
<th>{{'Address' | translate}}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let failedDevices of uploadJSON">
<td style="cursor:pointer">{{failedDevices['Client Name']}}</td>
<td style="cursor:pointer">{{failedDevices.Altitude}}</td>
<td style="cursor:pointer">{{failedDevices.Longitude}}</td>
<td style="cursor:pointer">{{failedDevices.Address}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

View file

@ -1,3 +1,3 @@
.example-chip-list {
width: 100%;
}
.example-chip-list {
width: 100%;
}

View file

@ -107,7 +107,7 @@
<a class="dropdown-item"
style="cursor: pointer;border-bottom: 1px solid;padding-top: 7px;padding-bottom: 7px;font-size: 14px;"
*ngIf="superAdmin" (click)="tutorialVideos('admin')">{{'Tutorial Videos' | translate}}</a>
*ngIf="superAdmin && urlspecifc" (click)="tutorialVideos('admin')">{{'Tutorial Videos' | 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)="userFinder('admin')">{{'User Finder' | translate}}</a>

View file

@ -51,6 +51,7 @@ declare var google: any,$:any;
export class AllMenusComponent implements OnInit {
//
marker1: any;
mapData: any[];
routePath: any;
before: any;
@ -58,6 +59,7 @@ export class AllMenusComponent implements OnInit {
cust: boolean = false;
logo: any;
text: any;
urlspecifc:boolean = false
fs: any; ls: any; emailid: any; or: any; useridd: any; mb: any; custtype: any; dealer: any;
showImage: any;
groups = [];
@ -146,6 +148,13 @@ export class AllMenusComponent implements OnInit {
menuWidth:any;
sup_admin:boolean;
ngOnInit() {
let domainName = window.location.host;
console.log(domainName, 'domainName');
if (domainName.indexOf('oneqlik') >= 0 || domainName.indexOf('localhost') >= 0) {
this.urlspecifc = true
} else {
this.urlspecifc = false;
}
// console.log("Inside all app menu component---------------------------------------------");
// this.superAdmin = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).isSuperAdmin;
if(localStorage.getItem('superadmin')=="ON"){

View file

@ -1,234 +1,234 @@
.custom_style {
// position: fixed;
// top:0 ;
// left:0;
// right :0;
// background: #2D4262;
// padding-top: 0%;
// padding-bottom: 0%;
// line-height: 2.8;
// box-shadow: -1px 7px 7px -5px rgb(48, 68, 99);
// ================changed style==================
position: fixed;
background: #2d4262;
padding-top: 1%;
padding: 0;
width: 100%;
box-shadow: -1px 7px 7px -5px #304463;
}
.changePadding {
flex: 1;
text-align: center;
padding-left: 90px;
}
.changePadding1 {
flex: 1;
text-align: center;
padding-left: 15px;
}
.list_style {
margin-left: 100px;
ul {
li {
a {
color: white;
}
}
}
}
.dropdown_style {
// background: #b9b7b7 ;
// background: linear-gradient(to bottom, #2c3e50,#bdc3c7);
// background: #D42021;
background: #2d4262;
padding-top: 0;
padding-bottom: 0;
cursor: pointer;
a {
color: white;
}
}
.dropdown-menu > a:hover {
background-color: #2a3132;
background-image: none;
}
.hoverStyle:hover {
background-color: #2a3132;
background-image: none;
}
.nav-item > a:hover {
background-color: #2a3132;
}
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
background: rgb(74, 118, 184);
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
@media (max-width: 1540px) {
#navbarSupportedContent {
margin-left: 50px;
}
}
@media (min-width: 1366px) {
#navbarSupportedContent {
margin-left: 50px;
}
}
@media (max-width: 1366px) {
.list_style {
font-size: 13px;
}
}
@media (max-width: 1366px) {
.changePadding {
padding-left: 0px;
}
.changePadding1 {
padding-left: 0px;
}
}
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(143, 215, 255);
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #dadada;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
#navbarSupportedContent {
margin-left: 100px;
}
@media (max-width: 1537px) {
#navbarSupportedContent {
margin-left: 0px;
}
}
@media (max-width: 1537px) {
.list_style {
font-size: 13px;
}
}
// @media (min-width:1366px){
// .list_style{
// font-size: 14px;
// }
// }
// @media (max-width:1476px){
// .list_style{
// font-size: 14px;
// }
// }
// 1366,1440
// .bg-light{
// background: #737373;
// }
// .bg-light :hover{
// background: #dbd4d4;
// }
// .navbar-nav > li > .dropdown-menu { background-color: #FF0000; }
// .dropdown-menu > .active > a,.dropdown-menu > .active > a:hover.dropdown-menu > .active > a:focus {color: #555555!important; background-color: #e7e7e7!important;}
li a.nav-link {
width: max-content !important;
// padding: 20px 5px !important;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu > .dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover > .dropdown-menu {
display: block;
}
.dropdown-submenu > a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #ccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover > a:after {
border-left-color: #fff;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left > .dropdown-menu {
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}
.custom_style {
// position: fixed;
// top:0 ;
// left:0;
// right :0;
// background: #2D4262;
// padding-top: 0%;
// padding-bottom: 0%;
// line-height: 2.8;
// box-shadow: -1px 7px 7px -5px rgb(48, 68, 99);
// ================changed style==================
position: fixed;
background: #2d4262;
padding-top: 1%;
padding: 0;
width: 100%;
box-shadow: -1px 7px 7px -5px #304463;
}
.changePadding {
flex: 1;
text-align: center;
padding-left: 90px;
}
.changePadding1 {
flex: 1;
text-align: center;
padding-left: 15px;
}
.list_style {
margin-left: 100px;
ul {
li {
a {
color: white;
}
}
}
}
.dropdown_style {
// background: #b9b7b7 ;
// background: linear-gradient(to bottom, #2c3e50,#bdc3c7);
// background: #D42021;
background: #2d4262;
padding-top: 0;
padding-bottom: 0;
cursor: pointer;
a {
color: white;
}
}
.dropdown-menu > a:hover {
background-color: #2a3132;
background-image: none;
}
.hoverStyle:hover {
background-color: #2a3132;
background-image: none;
}
.nav-item > a:hover {
background-color: #2a3132;
}
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
background: rgb(74, 118, 184);
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
@media (max-width: 1540px) {
#navbarSupportedContent {
margin-left: 50px;
}
}
@media (min-width: 1366px) {
#navbarSupportedContent {
margin-left: 50px;
}
}
@media (max-width: 1366px) {
.list_style {
font-size: 13px;
}
}
@media (max-width: 1366px) {
.changePadding {
padding-left: 0px;
}
.changePadding1 {
padding-left: 0px;
}
}
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(143, 215, 255);
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #dadada;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
#navbarSupportedContent {
margin-left: 100px;
}
@media (max-width: 1537px) {
#navbarSupportedContent {
margin-left: 0px;
}
}
@media (max-width: 1537px) {
.list_style {
font-size: 13px;
}
}
// @media (min-width:1366px){
// .list_style{
// font-size: 14px;
// }
// }
// @media (max-width:1476px){
// .list_style{
// font-size: 14px;
// }
// }
// 1366,1440
// .bg-light{
// background: #737373;
// }
// .bg-light :hover{
// background: #dbd4d4;
// }
// .navbar-nav > li > .dropdown-menu { background-color: #FF0000; }
// .dropdown-menu > .active > a,.dropdown-menu > .active > a:hover.dropdown-menu > .active > a:focus {color: #555555!important; background-color: #e7e7e7!important;}
li a.nav-link {
width: max-content !important;
// padding: 20px 5px !important;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu > .dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover > .dropdown-menu {
display: block;
}
.dropdown-submenu > a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #ccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover > a:after {
border-left-color: #fff;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left > .dropdown-menu {
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}

View file

@ -1,146 +1,146 @@
ul {
list-style-type: none;
margin: 55px 0px 0px 0px;
padding: 0;
width: 25%;
background-color: #f1f1f1;
position: fixed;
height: 100%;
overflow: auto;
}
li a {
display: block;
color: #000;
padding: 8px 0 8px 16px;
text-decoration: none;
}
li a.active {
background-color: #4caf50;
color: white;
}
li a:hover:not(.active) {
background-color: #555;
color: white;
}
.componentClass {
margin-left: 25%;
padding: 64px 16px;
height: 1000px;
}
/* The sidebar menu */
.sidebar {
height: 100%; /* 100% Full-height */
width: 295px; /* 0 width - change this with JavaScript */
position: fixed; /* Stay in place */
z-index: 1; /* Stay on top */
top: 0;
left: 0;
background: #f9f6f6 !important;
padding-left: 3px;
background-color: #111; /* Black*/
overflow-x: hidden; /* Disable horizontal scroll */
padding-top: 60px; /* Place content 60px from the top */
transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */
}
/* The sidebar links */
.sidebar a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s;
}
/* When you mouse over the navigation links, change their color */
.sidebar a:hover {
color: #f1f1f1;
}
/* Position and style the close button (top right corner) */
.sidebar .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
}
/* The button used to open the sidebar */
.openbtn {
font-size: 20px;
cursor: pointer;
background-color: #111;
color: white;
margin-top: 35px;
padding: 10px 15px;
border: none;
}
.openbtn:hover {
background-color: #444;
}
/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
#main {
transition: margin-left 0.5s; /* If you want a transition effect */
padding: 20px;
margin-left: 295px;
}
/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
.sidebar {
padding-top: 15px;
}
.sidebar a {
font-size: 18px;
}
}
.wrapper {
position: relative;
width: 250px;
height: 300px;
border: 1px dashed #ccc;
margin: 10px;
}
.line {
position: absolute;
left: 0%;
top: 0;
bottom: 0;
// width: 20px;
// width: 1px;
margin-left: 295px;
// background: #426e86;
z-index: 1;
}
.wordwrapper {
text-align: center;
height: 12px;
position: absolute;
left: 0;
// right: 0;
top: 50%;
margin-top: -12px;
z-index: 2;
}
.word {
color: #ccc;
text-transform: uppercase;
letter-spacing: 1px;
padding: 3px;
margin-left: 295px;
font: bold 12px arial, sans-serif;
// background: #fff;
}
ul {
list-style-type: none;
margin: 55px 0px 0px 0px;
padding: 0;
width: 25%;
background-color: #f1f1f1;
position: fixed;
height: 100%;
overflow: auto;
}
li a {
display: block;
color: #000;
padding: 8px 0 8px 16px;
text-decoration: none;
}
li a.active {
background-color: #4caf50;
color: white;
}
li a:hover:not(.active) {
background-color: #555;
color: white;
}
.componentClass {
margin-left: 25%;
padding: 64px 16px;
height: 1000px;
}
/* The sidebar menu */
.sidebar {
height: 100%; /* 100% Full-height */
width: 295px; /* 0 width - change this with JavaScript */
position: fixed; /* Stay in place */
z-index: 1; /* Stay on top */
top: 0;
left: 0;
background: #f9f6f6 !important;
padding-left: 3px;
background-color: #111; /* Black*/
overflow-x: hidden; /* Disable horizontal scroll */
padding-top: 60px; /* Place content 60px from the top */
transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */
}
/* The sidebar links */
.sidebar a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s;
}
/* When you mouse over the navigation links, change their color */
.sidebar a:hover {
color: #f1f1f1;
}
/* Position and style the close button (top right corner) */
.sidebar .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
}
/* The button used to open the sidebar */
.openbtn {
font-size: 20px;
cursor: pointer;
background-color: #111;
color: white;
margin-top: 35px;
padding: 10px 15px;
border: none;
}
.openbtn:hover {
background-color: #444;
}
/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
#main {
transition: margin-left 0.5s; /* If you want a transition effect */
padding: 20px;
margin-left: 295px;
}
/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
.sidebar {
padding-top: 15px;
}
.sidebar a {
font-size: 18px;
}
}
.wrapper {
position: relative;
width: 250px;
height: 300px;
border: 1px dashed #ccc;
margin: 10px;
}
.line {
position: absolute;
left: 0%;
top: 0;
bottom: 0;
// width: 20px;
// width: 1px;
margin-left: 295px;
// background: #426e86;
z-index: 1;
}
.wordwrapper {
text-align: center;
height: 12px;
position: absolute;
left: 0;
// right: 0;
top: 50%;
margin-top: -12px;
z-index: 2;
}
.word {
color: #ccc;
text-transform: uppercase;
letter-spacing: 1px;
padding: 3px;
margin-left: 295px;
font: bold 12px arial, sans-serif;
// background: #fff;
}

View file

@ -1,52 +1,52 @@
col-sm-9 col-md-9 col-lg-9 .ms-parent {
width: 100% !important;
}
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 250px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}
col-sm-9 col-md-9 col-lg-9 .ms-parent {
width: 100% !important;
}
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 250px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}

View file

@ -723,6 +723,7 @@ var pageWidth = doc.internal.pageSize.width || doc.internal.pageSize.getWidth();
// lineColor: [0, 0, 0]
// },
theme:'grid',
didDrawPage: function (data) {
// Header
doc.setFontSize(20);
@ -784,6 +785,7 @@ var pageWidth = doc.internal.pageSize.width || doc.internal.pageSize.getWidth();
'Moving Time':'Moving Time (HH:MM)',
'Stoppage Time':'Stoppage Time (HH:MM)',
'Idle Time':'Idle Time (HH:MM)',
fuelConsumed: 'Fuel Consumed',
startAddress:'Start Location',
endAddress:'End Location',
}
@ -798,21 +800,31 @@ var pageWidth = doc.internal.pageSize.width || doc.internal.pageSize.getWidth();
let body = [];
for (var j = 0; j < rowCount; j++) {
body.push({
Date:pdfBody[j].Date,
Date: (pdfBody[j].Date ? (moment(pdfBody[j].Date).format('DD-MM-YYYY')) : "") ,
VRN:pdfBody[j].VRN,
'Distance(Kms)':(pdfBody[j]['Distance(Kms)']).toFixed(2),
'Moving Time':this.conversion(pdfBody[j]['Moving Time']),
'Stoppage Time':this.conversion(pdfBody[j]['Moving Time']),
"Idle Time":this.conversion(pdfBody[j]['Idle Time']),
fuelConsumed: this.fuleConvert((pdfBody[j]['Distance(Kms)']).toFixed(2), pdfBody[j]['Mileage']),
startAddress:pdfBody[j].startAddress,
endAddress:pdfBody[j].endAddress,
});
}
return body;
}
fuleConvert(distance,data) {
if (data && distance) {
var mileage = parseFloat(distance) / parseFloat(data)
return mileage.toFixed(2)
} else {
return ''
}
}
conversion(data){
var hhmm;
if(data){

View file

@ -1,3 +1,3 @@
.mat-dialog-container {
overflow: hidden !important;
}
.mat-dialog-container {
overflow: hidden !important;
}

View file

@ -1,49 +1,49 @@
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 250px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}
#toast {
visibility: hidden;
max-width: 250px;
height: 50px;
/*margin-left: -125px;*/
margin: auto;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
position: fixed;
z-index: 1;
left: 60%;
right: 0;
bottom: 80%;
font-size: 13px;
white-space: nowrap;
}
#toast #img {
width: 250px;
height: 50px;
float: left;
padding-top: 16px;
padding-bottom: 16px;
box-sizing: border-box;
background-color: #111;
color: #fff;
}
#toast #desc {
color: #fff;
padding: 16px;
overflow: hidden;
white-space: nowrap;
}
#toast.show {
visibility: visible;
-webkit-animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 2s,
fadeout 0.5s 2.5s;
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s, shrink 0.5s 4s,
fadeout 0.5s 4.5s;
}

View file

@ -326,9 +326,9 @@ export class DisatanceReportComponent implements OnInit {
var j = 0;
that.finalArr = [];
for (var i = 0; i < that.reportArr.length; i++) {
if (that.reportArr[i].reportData){
if (that.reportArr[i]){
that.clocation_1(that.reportArr[i].reportData, function (err, succ) {
that.clocation_1(that.reportArr[i], function (err, succ) {
if (err) {
console.log(err);
j++;

View file

@ -19,22 +19,161 @@
</div>
</div> -->
<div class="col-sm-12 col-md-12 col-lg-12" style="padding-left: 5px; padding-right: 20px; padding-top: 5px;">
<div class="row" style="margin:0px;height: 84vh;padding-top:10px;padding-bottom:5px;background: white;box-shadow: 3px 1px 5px 0px #b2b0ae;">
<div class="row" style="margin: 0;padding-bottom: 10px;">
<div class="col-sm-12 col-md-12 col-lg-12" style="padding-right: 0%;padding-left: 0;">
<!-- timefilter icons -->
<div class="row">
<div class="btn-group btn-group-sm col-md-6" role="group" aria-label="Basic example" >
<button [class.tab-btn-active]="isNormalView" type="button" style="width:50%;border-right: 2px solid white;" class="btn btn-secondary animateClass_4"
(click)="setActiveView(true)">{{'Events' | translate}}</button>
<button [class.tab-btn-active]="!isNormalView" type="button" style="width:50%;border-right: 2px solid white;" class="btn btn-secondary animateClass_5"
(click)="setActiveView(false)">{{'Report' | translate}}</button>
</div>
<div *ngIf="!isNormalView" class="col-md-6">
<div class="row">
<div class="col-md-5" >Duration More than (in Min)</div>
<div class="col-md-4">
<input
class="form-control"
style=""
min="0"
name="filterDuration"
[(ngModel)]="filterDuration"
type="number"
/>
</div>
<div class="col-md-3">
<button class="mat-raised-button"
style="background-color: #1556b9; color: #fdfdfd"
(click)="filterDetailsReport()"
>
{{ "Filter" | translate }}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div [class.d-hide]="!isNormalView " 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&#8230;</div>
<div style="width: 100%;height:84vh;">
<table id="deviceTable" cellspacing="0" style="width: 100%;font-size: 14px;">
<div style="width: 100%;height:84vh;">
<table class="deviceTable" id="deviceTable" cellspacing="0" style="width: 100%;font-size: 14px;">
<thead style="background-color:#e0e0e0;color: #444444;">
<tr>
<tr >
<th style="text-align: left;">{{'Vehicle Name' | translate}}</th>
<th style="text-align: left;">{{'In/Out' | translate}}</th>
<th style="text-align: left;">{{'Datetime' | translate}}</th>
<th style="text-align: left;">{{'Location' | translate}}</th>
<th style="text-align: left;">{{'GeoFence Name' | translate}}</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
<div [class.d-hide]="isNormalView" 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&#8230;</div>
<div style="width: 100%;height:84vh;">
<table class="deviceDetailsTable" id="deviceDetailsTable" cellspacing="0" style="width: 100%;font-size: 14px;">
<thead style="background-color:#e0e0e0;color: #444444;">
<tr >
<th style="text-align: left;">{{'Vehicle Name' | translate}}</th>
<th style="text-align: left;">{{'In Time' | translate}}</th>
<th style="text-align: left;">{{'Out Time' | translate}}</th>
<th style="text-align: left;">{{'Duration' | translate}}</th>
<th style="text-align: left;">{{'GeoFence Name' | translate}}</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
<div class="row" style="display: none; 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&#8230;</div>
<div style="width: 100%;height:84vh;">
<div id="geoDetailsTable">
<div *ngFor="let detailReport of newDetailsReport; let i=index;">
<div style="width: 100%;">
<tr class="tr-geofence">
<td>Object:</td>
<td>{{detailReport.vehicle}}</td>
</tr>
<tr class="tr-geofence">
<td>Period:</td>
<td>{{Fromdate | date:"dd/MM/yyyy hh:mm:ss"}} - {{todate | date:"dd/MM/yyyy hh:mm:ss"}}</td>
</tr>
<!-- <div > <strong>Object: </strong> {{detailReport.vehicle}}</div>
</div>
<div style="width: 100%;margin-bottom: 10px;">
<div > <strong >Period: </strong>{{Fromdate | date:"medium"}} - {{todate | date:"medium"}}</div>
</div> -->
<table class="geoDetailsTable" cellspacing="0" style="width: 100%;font-size: 16px;">
<thead style="background-color:#e0e0e0;color: #444444;">
<tr class="tr-geofence">
<th style="text-align: left;">{{'Object' | translate}}</th>
<th style="text-align: left;">{{'Zone in' | translate}}</th>
<th style="text-align: left;">{{'Zone Out' | translate}}</th>
<th style="text-align: left;">{{'Duration' | translate}}</th>
<th style="text-align: left;">{{'Route length' | translate}}</th>
<th style="text-align: left;">{{'Zone name' | translate}}</th>
<th style="text-align: left;">{{'Zone position' | translate}}</th>
</tr>
</thead>
<tbody>
<tr class="tr-geofence" [style.background-color]="item.durationMin > 120 ? 'yellow':'white'" *ngFor="let item of detailReport.list; let i=index;" >
<td style="text-align: left;">{{item.vehicleName ? item.vehicleName : '-'}}</td>
<td style="text-align: left;">{{item.inTimeDate ? (item.inTimeDate | date:'dd/MM/yyyy hh:mm:ss') : '-'}}</td>
<td style="text-align: left;">{{item.outTimeDate ? (item.outTimeDate | date:'dd/MM/yyyy hh:mm:ss') : '-'}}</td>
<td style="text-align: left;">{{item.duration ? item.duration : '-'}}</td>
<td style="text-align: left;">{{item.routeLength ? item.routeLength : '0'}} km</td>
<td style="text-align: left;">{{item.geoid && item.geoid.geoname ? item.geoid.geoname : '-'}}</td>
<td style="text-align: left;">-</td>
</tr>
</tbody>
</table>
<table class="geoDetailsTable" cellspacing="0" style="width: 100%;font-size: 14px;margin-top: 10px;margin-bottom: 10px;">
<thead style="background-color:#e0e0e0;color: #444444;">
<tr class="tr-geofence" >
<th style="text-align: left;"></th>
<th style="text-align: left;"></th>
<th style="text-align: left;"></th>
<!-- <th style="text-align: left;"></th> -->
</tr>
</thead>
<tbody>
<tr class="tr-geofence" *ngFor="let item of detailReport.calculatedKey; let i=index;" >
<td style="text-align: left;">{{item.zoneName ? item.zoneName : '-'}}</td>
<td style="text-align: left;">{{item.durationTotal ? item.durationTotal : '-'}}</td>
<td style="text-align: left;">{{item.distanceTotal ? item.distanceTotal : '0'}} km</td>
<!-- <td style="text-align: left;">{{item.idleTime}}</td> -->
</tr>
</tbody>
</table>
<div *ngIf="!detailReport.calculatedKey.length">Nothing has been found on your request.</div>
</div>
</div>
<div id="editor789"></div>
</div>
</div>
</div>
</div>

View file

@ -3,7 +3,15 @@
background: whitesmoke;
height: 100vh;
}
.d-hide {
display: none;
}
.yellow-bg {
background-color: yellow;
}
.tab-btn-active{
background-color: #616466 !important;
}
.rowStyle {
// margin: 5px;
// background: white;

View file

@ -1,36 +1,36 @@
.topDiv {
// padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
.rowStyle {
// margin: 5px;
// background: white;
height: 84vh;
// box-shadow: 3px 1px 5px 0px #b2b0ae;
}
#deviceTable input {
border-radius: 5px;
}
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
// background: rgb(74, 118, 184);
background: #868e96;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
.topDiv {
// padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
.rowStyle {
// margin: 5px;
// background: white;
height: 84vh;
// box-shadow: 3px 1px 5px 0px #b2b0ae;
}
#deviceTable input {
border-radius: 5px;
}
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
// background: rgb(74, 118, 184);
background: #868e96;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}

View file

@ -749,12 +749,12 @@ export class NewTravelPathReportComponent implements OnInit {
imei: pdfBody[j].imei,
date: moment(pdfBody[j].date).format('lll'),
odo: pdfBody[j].odo ? (pdfBody[j].odo).toFixed(2) : 0,
distanceFromPrevious: this.get_distance(pdfBody[j].index),
distanceFromPrevious: pdfBody[j].distanceFromPrevious,
speed: pdfBody[j].speed,
avgSpeed: this.getavgSpeed(pdfBody[j].index),
avgSpeed: pdfBody[j].avgSpeed,
externalBattery: pdfBody[j].external_Battery ? pdfBody[j].external_Battery : '0',
temperature: pdfBody[j].temp ? (parseFloat(pdfBody[j].temp) / 10).toFixed(2) : '0',
cumDistance: this.getcummulative_distance(pdfBody[j], pdfBody[j].index),
cumDistance: pdfBody[j].cum_distance,
location: (pdfBody[j].latDecimal ? pdfBody[j].latDecimal : 0) + ' , ' + (pdfBody[j].longDecimal ? pdfBody[j].longDecimal : 0),
address: pdfBody[j].address,

View file

@ -1,7 +1,7 @@
.card {
margin: 218px;
float: none;
padding: 70px;
text-align: center;
margin-bottom: 10px;
}
.card {
margin: 218px;
float: none;
padding: 70px;
text-align: center;
margin-bottom: 10px;
}

View file

@ -1,36 +1,36 @@
.topDiv {
// padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
.rowStyle {
// margin: 5px;
// background: white;
height: 84vh;
// box-shadow: 3px 1px 5px 0px #b2b0ae;
}
#deviceTable input {
border-radius: 5px;
}
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
// background: rgb(74, 118, 184);
background: #868e96;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
.topDiv {
// padding-top: 59px;
background: whitesmoke;
height: 100vh;
}
.rowStyle {
// margin: 5px;
// background: white;
height: 84vh;
// box-shadow: 3px 1px 5px 0px #b2b0ae;
}
#deviceTable input {
border-radius: 5px;
}
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: rgb(153, 153, 153);
}
/* Handle */
::-webkit-scrollbar-thumb {
// background: rgb(74, 118, 184);
background: #868e96;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}

View file

@ -417,13 +417,13 @@ addressLink = "";
}
} ,
{
"data": "address",
"data": null,
render: function(data, type, row) {
var lat = row.lat?row.lat:0;
var lng = row.long?row.long:0;
var addressLink = '<a href="https://maps.google.com/?q='+ lat +','+lng +' " target="_blank" title="Click to get vehicle last location"> <img height="20px" width="20px" src="../../../assets/image/addressICON.png"> </a>';
if(data){
return data ;
if(row.address){
return row.address ;
}else{
return addressLink;
}
@ -615,6 +615,7 @@ downloadPdf() {
// outerThis.startAddress= outerThis.finalArr[0].address;
// outerThis.endAddress= outerThis.finalArr[outerThis.finalArr.length-1].address
var doc = new jsPDF("p", "pt", pdfsize);
console.log(outerThis);
outerThis.f_date = moment(this.Fromdate).format('lll');
outerThis.t_date =moment(this.todate).format('lll');
// var date_combine = f_date + ' to ' + t_date;
@ -728,8 +729,8 @@ var pageWidth = doc.internal.pageSize.width || doc.internal.pageSize.getWidth();
body.push({
vehicleName:pdfBody[j].device.Device_Name,
fromDate:moment(this.Fromdate).format('lll'),
toDate:moment(this.todate).format('lll'),
fromDate: moment(pdfBody[j].arrival_time).format('lll'),
toDate: moment(pdfBody[j].departure_time).format('lll'),
duration:this.durationFun(pdfBody[j]),
location:pdfBody[j].address?pdfBody[j].address:'N/A',

View file

@ -2,7 +2,7 @@
<div class="topDiv">
<div class="row" style="text-align: center; background: #426E86; padding-top: 10px; padding-bottom: 10px; color: white;box-shadow:3px 1px 5px 0px rgb(178, 176, 174)">
<div class="col-sm-12 col-md-12 col-lg-12">
<h4>{{'Trip Report'|translate}}</h4>
<h4>{{'1 Trip Report'|translate}}</h4>
</div>
</div>
<!-- <div class="row rowStyle" >

View file

@ -586,11 +586,14 @@ var pageWidth = doc.internal.pageSize.width || doc.internal.pageSize.getWidth();
rowCount = rowCount || 10;
let body = [];
for (var j = 0; j < rowCount; j++) {
var stime = pdfBody[j].start_time ? new Date(pdfBody[j].start_time) : '';
var endTime = pdfBody[j].end_time? new Date(pdfBody[j].end_time):'';
body.push({
Device_Name:pdfBody[j].device.Device_Name,
fromDate:moment(this.Fromdate).format('lll'),
fromDate: stime? moment(stime).format('llll'):'',
fromLocation:pdfBody[j].startAddress?pdfBody[j].startAddress:'N/A',
toDate: moment(this.todate).format('lll'),
toDate: endTime ? moment(endTime).format('lll'):'',
toLocation:pdfBody[j].endAddress?pdfBody[j].endAddress:'N/A',
distance:pdfBody[j].distance?(pdfBody[j].distance/1000).toFixed(2):0
});

View file

@ -60,6 +60,7 @@
<div class="col-sm-9 col-md-9 col-lg-9" style="padding: 0">
<div>
<select
[disabled]="componentIdentifier =='current_position'"
style="width: -webkit-fill-available"
[ngModel]="selectGroup"
(ngModelChange)="onChangeGroup($event)"
@ -91,7 +92,8 @@
</div>
<div class="col-sm-9 col-md-9 col-lg-9" style="padding: 0">
<div>
<select id="dbselect" multiple="multiple">
<div *ngIf="componentIdentifier =='daywise_report'">
<select (change)="onDateChange()" id="dbselect_single">
<option
*ngFor="let option_1 of options"
[value]="option_1.selectedValue"
@ -99,6 +101,17 @@
{{ option_1.value }}
</option>
</select>
</div>
<div *ngIf="componentIdentifier !='daywise_report'">
<select id="dbselect" multiple="multiple">
<option
*ngFor="let option_1 of options"
[value]="option_1.selectedValue"
>
{{ option_1.value }}
</option>
</select>
</div>
</div>
</div>
</div>
@ -227,7 +240,8 @@
style="width: 100%"
>
<button
[disabled]="componentIdentifier === 'dayWiseReport'"
[disabled]="componentIdentifier === 'dayWiseReport' || componentIdentifier =='current_position'"
type="button"
style="width: 25%; border-right: 2px solid white"
class="btn btn-secondary animateClass_4"
@ -236,6 +250,8 @@
{{ "Today" | translate }}
</button>
<button
[disabled]="componentIdentifier =='current_position'"
type="button"
style="width: 25%; border-right: 2px solid white"
class="btn btn-secondary animateClass_5"
@ -244,6 +260,7 @@
{{ "Yesterday" | translate }}
</button>
<button
[disabled]="componentIdentifier =='current_position'"
type="button"
style="width: 25%; border-right: 2px solid white"
class="btn btn-secondary animateClass_6"
@ -252,7 +269,9 @@
{{ "Week" | translate }}
</button>
<button
[disabled]="componentIdentifier === 'distance_report'"
[disabled]="componentIdentifier === 'distance_report' || componentIdentifier =='current_position'"
type="button"
style="width: 25%"
class="btn btn-secondary animateClass_7"
@ -284,10 +303,20 @@
{{ "From" | translate }} :</span
>
</div>
<div class="col-sm-9 col-md-9 col-lg-9" style="padding: 0px">
<div class="col-sm-9 col-md-9 col-lg-9 mp-datepicker" style="padding: 0px">
<!-- from datetime picker -->
<input
<ng-container *ngIf="componentIdentifier =='daily_report' || componentIdentifier =='daywise_report'">
<owl-date-time (ngModelChange)="onDateChange($event)" ngDefaultControl [name]="'from_date'" [(ngModel)]="from_date" [hourFormat]="'12'" [type]="'calendar'" [dateFormat]="'DD/MM/YYYY'" [autoClose]="true"></owl-date-time>
</ng-container>
<ng-container *ngIf="!(componentIdentifier =='daily_report' || componentIdentifier =='daywise_report')">
<owl-date-time (ngModelChange)="onDateChange($event)" ngDefaultControl [name]="'from_date'" [(ngModel)]="from_date" [hourFormat]="'12'" [type]="'both'" [dateFormat]="'DD/MM/YYYY h:mm:ss a'" [autoClose]="true"></owl-date-time>
</ng-container>
<!-- <input
id="from_date"
[disabled]="componentIdentifier =='current_position'"
bsDatepicker
class="form-control form-control-sm"
style="height: 25px"
@ -295,7 +324,7 @@
[(ngModel)]="from_date"
type="text"
(ngModelChange)="clicked = false"
/>
/> -->
</div>
</div>
<div
@ -308,10 +337,20 @@
>{{ lableVariable | translate }} :</span
>
</div>
<div class="col-sm-9 col-md-9 col-lg-9" style="padding: 0px">
<div class="col-sm-9 col-md-9 col-lg-9 mp-datepicker" style="padding: 0px">
<!-- tolabel picker -->
<input
<ng-container *ngIf="componentIdentifier =='daily_report' || componentIdentifier =='daywise_report'">
<owl-date-time ngDefaultControl (ngModelChange)="onDateChange($event)" [name]="'to_date'" [(ngModel)]="to_date" [hourFormat]="'12'" [type]="'calendar'" [dateFormat]="'DD/MM/YYYY'" [autoClose]="true"></owl-date-time>
</ng-container>
<ng-container *ngIf="!(componentIdentifier =='daily_report' || componentIdentifier =='daywise_report')">
<owl-date-time ngDefaultControl (ngModelChange)="onDateChange($event)" [name]="'to_date'" [(ngModel)]="to_date" [hourFormat]="'12'" [type]="'both'" [dateFormat]="'DD/MM/YYYY h:mm:ss a'" [autoClose]="true"></owl-date-time>
</ng-container>
<!-- <input
id="to_date"
[disabled]="componentIdentifier =='current_position'"
bsDatepicker
class="form-control form-control-sm"
style="height: 25px"
@ -320,7 +359,7 @@
[(ngModel)]="to_date"
type="text"
(ngModelChange)="clicked = false"
/>
/> -->
</div>
</div>
<div
@ -589,7 +628,7 @@
}"
style="background-color: #1556b9; color: #fdfdfd"
[disabled]="clicked"
(click)="actionMethod('2'); clicked = true"
(click)="actionMethod('2'); clicked = true "
md-raised-button
(click)="reportFilter_billing('data')"
>
@ -618,7 +657,7 @@
<div class="col-3">{{ "Device" | translate }}</div>
<div class="col-9">
<div>
<select id="dbselect" multiple="multiple">
<select id="dbselect" multiple="multiple" >
<option
*ngFor="let option_1 of options"
[value]="option_1.selectedValue"
@ -1088,7 +1127,7 @@
<div class="col-3">{{ "Vahicle Name" | translate }}</div>
<div class="col-9">
<div style="display: flex">
<select id="dbselectVehicleName" multiple="multiple">
<select [disabled]="componentIdentifier =='current_position'" id="dbselectVehicleName" multiple="multiple">
<option
*ngFor="let uname of deviceArr_1"
[value]="uname.Device_ID"
@ -1112,6 +1151,7 @@
style="width: 100%"
>
<button
type="button"
style="width: 25%; border-right: 2px solid white"
class="btn btn-secondary animateClass_4"

View file

@ -9,3 +9,13 @@ col-sm-9 col-md-9 col-lg-9 .ms-parent {
.inner {
display: inline-block;
}
.time-picker {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
max-width: 16em;
min-width: 16em;
background-color: #e6e6e6;
}

View file

@ -78,6 +78,7 @@ export class ReportFilterComponent implements OnInit {
reportArray = [
{name : "AC Report",Rstatus:true,Astatus:false,value:"ac_report"},
{ name: "Current Position", Rstatus: true, Astatus: false, value: "current_position" },
{name:"Daily Report",Rstatus:true,Astatus:false,value:"daily_report"},
{name:"Daily Logs",Rstatus:true,Astatus:false,value:"daily_logs"},
{name:"Daywise Report",Rstatus:true,Astatus:false,value:"daywise_report"},
@ -143,9 +144,92 @@ export class ReportFilterComponent implements OnInit {
console.log(this.componentIdentifier,this.selectedStopageDuration);
this.bsConfig = Object.assign({ dateInputFormat: 'DD-MM-YYYY, h:mm:ss a' }, { containerClass: this.colorTheme });
}
groups
ngOnInit() {
groups;
changeEvents()
{
$(document).on('change', 'select', ()=> {
this.clicked = false
});
$("#dbselect_single").change( ()=> {
this.clicked = false
});
$("#dbselect_1").change( ()=> {
this.clicked = false
});
$("#dbselect_billtype").change( ()=> {
this.clicked = false
});
$("#dbselect_billStatus").change( ()=> {
this.clicked = false
});
$("#dbselectPhone").change( ()=> {
this.clicked = false
});
$("#dbselectName").change( ()=> {
this.clicked = false
});
$("#dbselectSIM").change( ()=> {
this.clicked = false
});
$("#dbselectIMEI").change( ()=> {
this.clicked = false
});
$("#dbselectVehicleName").change( ()=> {
this.clicked = false
});
$("#dbselect_2").change( ()=> {
this.clicked = false
});
$("#dbselect_3").change( ()=> {
this.clicked = false
});
$("#dbselect_notif").change( ()=> {
this.clicked = false
});
$("#dbselect").change( ()=> {
this.clicked = false
});
$("#dbselect_single").change( ()=> {
this.clicked = false
});
$("#dbselect1").change( ()=> {
this.clicked = false
});
$("#dbselectNotif").change( ()=> {
this.clicked = false
});
}
ngOnInit() {
setTimeout(()=>{
this.changeEvents();
},100)
this.loadropdown();
var fTime = new Date();
fTime.setHours(0,0,0,0);
@ -156,74 +240,7 @@ export class ReportFilterComponent implements OnInit {
this.from_date = new Date(fTime);
}
$("#dbselect_1").change(function () {
that.clicked=false
});
$("#dbselect_billtype").change(function () {
that.clicked=false
});
$("#dbselect_billStatus").change(function () {
that.clicked=false
});
$("#dbselectPhone").change(function () {
that.clicked=false
});
$("#dbselectName").change(function () {
that.clicked=false
});
$("#dbselectSIM").change(function () {
that.clicked=false
});
$("#dbselectIMEI").change(function () {
that.clicked=false
});
$("#dbselectVehicleName").change(function () {
that.clicked=false
});
$("#dbselect_2").change(function () {
that.clicked=false
});
$("#dbselect_3").change(function () {
that.clicked=false
});
$("#dbselect_notif").change(function () {
that.clicked=false
});
$("#dbselect").change(function () {
that.clicked=false
});
$("#dbselect1").change(function () {
that.clicked=false
});
$("#dbselectNotif").change(function () {
that.clicked=false
});
// console.log('this.componentIdentifier',this.componentIdentifier);
this.reportPrefrecne = JSON.parse(window.atob(window.localStorage.token.split(".")[1])).report_preference;
console.log("----------------",this.reportPrefrecne,'---->',typeof(this.reportPrefrecne));
@ -270,7 +287,7 @@ $("#dbselectNotif").change(function () {
var td = new Date().setHours(23,59,59,999);
this.to_date = new Date(td);
this.bsConfig = Object.assign({ dateInputFormat: 'DD-MM-YYYYY' }, { containerClass: this.colorTheme });
this.bsConfig = Object.assign({ dateInputFormat: 'DD-MM-YYYY, h:mm:ss a' }, { containerClass: this.colorTheme });
}
@ -407,7 +424,9 @@ $("#dbselectNotif").change(function () {
}
chnageValueEvent() {
this.clicked = false
}
loadropdown() {
let that = this;
var placeholderval;
@ -435,8 +454,8 @@ $("#dbselectNotif").change(function () {
width: 200,
placeholder: this.componentIdentifier == 'geofence_report'?'Select Geofence .....': placeholderval,
filter: true,
single: true,
selectAll: false
// single: true,
// selectAll: false
})
@ -540,15 +559,19 @@ $("#dbselectNotif").change(function () {
}
}else{
setTimeout(() => {
$('#dbselect').multipleSelect({
width: 200,
placeholder:this.componentIdentifier == 'geofence_report'?'Select Geofence....': 'Select Vehicle.....',
placeholder:this.componentIdentifier == 'geofence_report'?'Select Geofence....': 'Select .....',
filter: true,
})
}, 100);
}
if(this.componentIdentifier == 'poi_report'){
setTimeout(() => {
$('#dbselect_1').multipleSelect({
@ -608,7 +631,19 @@ $("#dbselectNotif").change(function () {
}
if (this.componentIdentifier === 'daywise_report') {
setTimeout(() => {
$('#dbselect_single').multipleSelect({
width: 200,
placeholder: 'Select ....',
filter: true,
single: true,
selectAll: false
})
}, 1000);
}
// if(this.componentIdentifier == 'usersMaster'){
@ -636,7 +671,9 @@ $("#dbselectNotif").change(function () {
// }
// },200)
setTimeout(()=>{
this.changeEvents();
},100)
}
@ -644,7 +681,12 @@ $("#dbselectNotif").change(function () {
deviceFilterArr :any;
reportFilter(data): void {
var demo=[]
this.deviceArr = $('#dbselect').multipleSelect('getSelects','value');
if (this.componentIdentifier == "daywise_report") {
this.deviceArr = $('#dbselect_single').multipleSelect('getSelects','value');
} else {
this.deviceArr = $('#dbselect').multipleSelect('getSelects','value');
}
// var group = $('#groupSelect').multipleSelect('getSelects','value');
// console.log("GROUPS==>",group);
@ -782,7 +824,9 @@ $("#dbselectNotif").change(function () {
{
this.reportService.distanceReport(filter)
}
if (this.componentIdentifier == "current_position") {
this.reportService.currentPositionReport(filter)
}
if(this.componentIdentifier=="geofence_report")
@ -922,7 +966,9 @@ exportPDF(){
{
this.reportService.distanceReport(filter)
}
if (this.componentIdentifier == "current_position") {
this.reportService.currentPositionReport(filter)
}
if(this.componentIdentifier=="geofence_report")
this.reportService.geofenceReport(filter)
@ -1007,7 +1053,9 @@ exportExel(){
{
this.reportService.distanceReport(filter)
}
if (this.componentIdentifier == "current_position") {
this.reportService.currentPositionReport(filter)
}
if(this.componentIdentifier=="geofence_report")
this.reportService.geofenceReport(filter)
@ -1488,6 +1536,10 @@ changeComponent(component){
this.ngOnInit()
}
onDateChange() {
console.log('on change triggered');
this.clicked = false;
}
onChangeGroup(event){
console.log(event);
this.clicked=false

View file

@ -87,6 +87,7 @@ import { PerformanceReportComponent } from './report component/performance-repor
import { NotiLocationComponent } from './report component/notification-master/noti-location/noti-location.component';
import { HeaderComponent } from '../report/header/header.component';
import { ViewRawComponent } from './report component/push-data-report/view-raw/view-raw.component';
import { CurrentPositionReportComponent } from './report component/current-position/current-position.component';
@NgModule({
imports: [
@ -155,7 +156,7 @@ import { ViewRawComponent } from './report component/push-data-report/view-raw/v
],
entryComponents:[DetailComponent,WorkingHourDetailComponent,AcreportInfoComponent,SummaryDetailsComponent,NotiLocationComponent,ViewRawComponent],
declarations: [MainComponent,IgnReportComponent, ReportFilterComponent,DisatanceReportComponent,TripDetailsComponent,POIReportComponent,OverSpeedComponent,MaintananceComponent,IgnitionReportComponent,IdleReportComponent,IdealReportComponent,FuelReportComponent,DayWiseReportComponent,DeviceSpeedReportComponent,AcreportInfoComponent,
TravelPathReportComponent,TempretureReportComponent,TempretureGraphComponent,SummaryReportComponent,StoppageReportComponent,RouteViolationComponent,DeviceFuelReportComponent,DeviceSOSreportComponent,AcReportsComponent, DailyReportComponent,DailyDetailsComponent,
TravelPathReportComponent, TempretureReportComponent, TempretureGraphComponent, SummaryReportComponent, StoppageReportComponent, RouteViolationComponent, DeviceFuelReportComponent, DeviceSOSreportComponent, AcReportsComponent, DailyReportComponent,CurrentPositionReportComponent,DailyDetailsComponent,
WorkingHourReportComponent,WorkingHourDetailComponent,TripReportComponent,TripLoadUnloadComponent,AlertReportComponent, DailyLogssComponent,AllMenusComponent,NotificationComponent,GeofancingReportComponent,DetailComponent,DriversPerformanceReportComponent,NotificationMastersComponent, NoReportComponent, StartComponent, SummaryDetailsComponent, NewTravelPathReportComponent, PushDataReportComponent, PerformanceReportComponent, NotiLocationComponent, HeaderComponent, ViewRawComponent]
})
export class ReportModule { }

View file

@ -6,6 +6,7 @@ export class ReportService {
invokeEvent: Subject<any> = new Subject();
invokeEventForAcReport:Subject<any>=new Subject();
invokeEventForDistance:Subject<any>=new Subject();
invokeEventForCurrentPosition: Subject<any> = new Subject();
invokeEventForDailyLogs:Subject<any>=new Subject();
invokeEventForDayWiseReport:Subject<any>=new Subject();
invokeEventForgeofenceReport:Subject<any>=new Subject();
@ -121,6 +122,10 @@ export class ReportService {
console.log(value);
this.invokeEventForDistance.next(value)
}
currentPositionReport(value) {
console.log(value);
this.invokeEventForCurrentPosition.next(value)
}
geofenceReport(value){
console.log(value);
this.invokeEventForgeofenceReport.next(value)

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