From 81e5b8cf525b24d8a8bf72f72c4613c9761400d5 Mon Sep 17 00:00:00 2001 From: Pranav Date: Mon, 24 Jul 2023 11:36:46 +0000 Subject: [PATCH] 24 jul update --- .../account-detail.component.ts | 1 - src/app/account/account.component.ts | 3 +- src/app/add-cust/add-cust.component.ts | 3 +- .../add-device-model.component.ts | 5 +- src/app/add-driver/add-driver.component.ts | 9 +- .../add-edit-vehicle-type.component.ts | 5 +- src/app/add/add.component.ts | 8 +- .../reset-password.component.ts | 2 +- src/app/all-menus/all-menus.component.html | 3 + src/app/all-menus/all-menus.component.ts | 10 +- src/app/app.module.ts | 2 + src/app/app.router.ts | 3 +- src/app/const/const.component.ts | 37 +- src/app/contact.service.ts | 1 - .../add-new-device.component.ts | 16 +- src/app/dashboard/dashboard.component.ts | 2 +- .../new-edit-device.component.ts | 7 +- .../dealers-info/dealers-info.component.html | 20 +- .../dealers-info/dealers-info.component.scss | 5 + .../dealers-info/dealers-info.component.ts | 5 +- .../device-renew/device-renew.component.ts | 2 +- .../alert-report/alert-report.component.ts | 5 +- .../device-sosreport.component.ts | 2 +- .../device-speed-report.component.ts | 5 +- .../distance-report.component.ts | 5 +- .../drivers-performance-report.component.ts | 5 +- .../geofancing-report.component.html | 2 +- .../geofancing-report.component.ts | 5 +- .../ideal-report/ideal-report.component.ts | 5 +- .../ign-report/ign-report.component.ts | 5 +- .../ignition-report.component.ts | 5 +- .../report-filter.component.html | 22 +- .../report-filter/report-filter.component.ts | 11 +- .../summary-report.component.ts | 5 +- src/app/device/device.component.ts | 2 +- ...dialog-content-example-dialog.component.ts | 7 +- .../geofence-add/geofence-add.component.ts | 2 +- .../geofencing-view.component.ts | 5 +- src/app/geofencing/geofencing.component.ts | 5 +- src/app/group/group.component.ts | 6 +- src/app/home/home.component.ts | 6 +- .../device-doc/device-doc.component.html | 444 ++++++++--------- .../device-kyc/device-kyc.component.html | 26 +- .../device-kyc/device-kyc.component.ts | 29 +- .../kyc-approval/kyc-approval.component.ts | 3 +- src/app/location/cmd-ui/cmd-ui.component.ts | 2 +- .../command-window.component.ts | 2 +- src/app/location/location.component.html | 21 +- src/app/location/location.component.ts | 450 +++++++++--------- src/app/login/login.component.ts | 27 +- .../notification/notification.component.ts | 2 +- src/app/poi-list/poi-list.component.ts | 3 +- .../poi-master-edit.component.ts | 2 +- src/app/poidetails/poidetails.component.ts | 5 +- .../point-of-intrest.component.ts | 5 +- src/app/point-share/point-share.component.ts | 2 +- .../report/all-menus/all-menus.component.html | 4 +- .../report/all-menus/all-menus.component.ts | 12 +- src/app/report/header/header.component.ts | 7 +- src/app/report/main/main.component.ts | 3 + .../notification/notification.component.ts | 4 +- .../alert-report/alert-report.component.ts | 5 +- .../day-wise-report.component.html | 4 +- .../day-wise-report.component.ts | 42 +- .../device-sosreport.component.ts | 2 +- .../device-speed-report.component.ts | 5 +- .../drivers-performance-report.component.ts | 5 +- .../fuel-report/fuel-report.component.ts | 5 +- .../geofancing-report.component.ts | 22 +- .../ideal-report/ideal-report.component.ts | 5 +- .../ign-report/ign-report.component.ts | 5 +- .../ignition-report.component.ts | 5 +- .../new-travel-path-report.component.ts | 34 +- .../notification-master.component.ts | 4 +- .../over-speed/over-speed.component.ts | 5 +- .../route-violation.component.ts | 5 +- .../summary-report.component.html | 4 +- .../summary-report.component.ts | 31 +- .../report-filter.component.html | 13 + .../report-filter/report-filter.component.ts | 30 +- .../route-map-add/route-map-add.component.ts | 3 +- .../route-mapping/route-mapping.component.ts | 3 +- src/app/route-plan/route-plan.component.ts | 2 +- src/app/route-set/route-set.component.ts | 4 +- src/app/show-route/show-route.component.ts | 2 +- .../show-vehicles/show-vehicles.component.ts | 28 +- src/app/sidebar/sidebar.component.ts | 18 +- .../addsubadmin/addsubadmin.component.ts | 2 +- src/app/sub-amin/sub-amin.component.ts | 3 +- src/app/technician/technician.component.ts | 10 +- .../vehicle-type/vehicle-type.component.ts | 9 +- .../virtual-device.component.html | 149 ++++++ .../virtual-device.component.scss | 84 ++++ .../virtual-device.component.spec.ts | 24 + .../virtual-device.component.ts | 156 ++++++ src/environments/environment.prod.ts | 6 +- src/environments/environment.ts | 10 +- src/index.html | 2 +- src/styles.css | 5 +- 99 files changed, 1373 insertions(+), 695 deletions(-) create mode 100644 src/app/virtual-device/virtual-device.component.html create mode 100644 src/app/virtual-device/virtual-device.component.scss create mode 100644 src/app/virtual-device/virtual-device.component.spec.ts create mode 100644 src/app/virtual-device/virtual-device.component.ts diff --git a/src/app/account-detail/account-detail.component.ts b/src/app/account-detail/account-detail.component.ts index 53856e6..16d7680 100644 --- a/src/app/account-detail/account-detail.component.ts +++ b/src/app/account-detail/account-detail.component.ts @@ -452,7 +452,6 @@ mydealer(){ if(window.localStorage['DataLoaded'] = 'True'){ window.localStorage['Custumer'] = 'OFF' this.router.navigateByUrl("add") - // this.router.navigateByUrl("const?_status="+"OK"); } } diff --git a/src/app/account/account.component.ts b/src/app/account/account.component.ts index 6dbdbe9..82fc926 100644 --- a/src/app/account/account.component.ts +++ b/src/app/account/account.component.ts @@ -158,7 +158,8 @@ logout(){ soon(){ - this.router.navigateByUrl("const?_i="+window.localStorage.token); + +this.router.navigateByUrl("const?_i="+window.localStorage.token); } diff --git a/src/app/add-cust/add-cust.component.ts b/src/app/add-cust/add-cust.component.ts index 066bd07..d3b9570 100644 --- a/src/app/add-cust/add-cust.component.ts +++ b/src/app/add-cust/add-cust.component.ts @@ -1096,7 +1096,8 @@ openNav() { this.router.navigateByUrl("device-report/ideal-report"); } soon(){ - this.router.navigateByUrl("const?_i="+window.localStorage.token); + +this.router.navigateByUrl("const?_i="+window.localStorage.token); } new(){ diff --git a/src/app/add-device-model/add-device-model.component.ts b/src/app/add-device-model/add-device-model.component.ts index 7a08d99..baa04b3 100644 --- a/src/app/add-device-model/add-device-model.component.ts +++ b/src/app/add-device-model/add-device-model.component.ts @@ -95,7 +95,8 @@ export class AddDeviceModelComponent implements OnInit { } soon(){ - this.router.navigateByUrl("const?_i="+window.localStorage.token); + +this.router.navigateByUrl("const?_i="+window.localStorage.token); } @@ -313,7 +314,7 @@ mydealer(){ if(window.localStorage['DataLoaded'] = 'True'){ window.localStorage['Custumer'] = 'OFF' this.router.navigateByUrl("add") - // this.router.navigateByUrl("const?_status="+"OK"); + } } /* TOKEN GENERATION */ diff --git a/src/app/add-driver/add-driver.component.ts b/src/app/add-driver/add-driver.component.ts index 7fb75b4..23523d2 100644 --- a/src/app/add-driver/add-driver.component.ts +++ b/src/app/add-driver/add-driver.component.ts @@ -97,7 +97,8 @@ export class AddDriverComponent implements OnInit { } soon(){ - this.router.navigateByUrl("const?_i="+window.localStorage.token); + +this.router.navigateByUrl("const?_i="+window.localStorage.token); } @@ -337,7 +338,7 @@ mydealer(){ if(window.localStorage['DataLoaded'] = 'True'){ window.localStorage['Custumer'] = 'OFF' this.router.navigateByUrl("add") - // this.router.navigateByUrl("const?_status="+"OK"); + } } /* TOKEN GENERATION */ @@ -541,7 +542,7 @@ else{ // return metadata; // }; // onUploadFinished(file) { -// debugger; +// // console.log(file); // this.imageFile=file; // console.log(this.imageFile.file.name); @@ -569,7 +570,7 @@ else{ // return metadata; // }; // onUploadFinished1(file) { -// debugger; +// // console.log(file); // this.imageFile=file; // console.log(this.imageFile.file.name); diff --git a/src/app/add-edit-vehicle-type/add-edit-vehicle-type.component.ts b/src/app/add-edit-vehicle-type/add-edit-vehicle-type.component.ts index 8ab016f..93a8c1b 100644 --- a/src/app/add-edit-vehicle-type/add-edit-vehicle-type.component.ts +++ b/src/app/add-edit-vehicle-type/add-edit-vehicle-type.component.ts @@ -116,7 +116,8 @@ export class AddEditVehicleTypeComponent implements OnInit { } soon(){ - this.router.navigateByUrl("const?_i="+window.localStorage.token); + +this.router.navigateByUrl("const?_i="+window.localStorage.token); } @@ -332,7 +333,7 @@ mydealer(){ if(window.localStorage['DataLoaded'] = 'True'){ window.localStorage['Custumer'] = 'OFF' this.router.navigateByUrl("add") - // this.router.navigateByUrl("const?_status="+"OK"); + } } /* TOKEN GENERATION */ diff --git a/src/app/add/add.component.ts b/src/app/add/add.component.ts index 79cc447..127c6f9 100644 --- a/src/app/add/add.component.ts +++ b/src/app/add/add.component.ts @@ -342,7 +342,8 @@ export class AddComponent implements OnInit { localStorage.setItem("dlrchk", dlrStatus) - this.router.navigateByUrl("const?_status=" + "OK"); + +this.router.navigateByUrl("const?_status=" + "OK"); // console.log('testing', this.useridd); } @@ -399,7 +400,8 @@ export class AddComponent implements OnInit { this.router.navigateByUrl("device-report/ideal-report"); } soon() { - this.router.navigateByUrl("const?_i=" + window.localStorage.token); + +this.router.navigateByUrl("const?_i=" + window.localStorage.token); } new() { @@ -442,7 +444,7 @@ export class AddComponent implements OnInit { if (window.localStorage['DataLoaded'] = 'True') { window.localStorage['Custumer'] = 'OFF' this.router.navigateByUrl("add") - // this.router.navigateByUrl("const?_status="+"OK"); + } } diff --git a/src/app/add/reset-password/reset-password.component.ts b/src/app/add/reset-password/reset-password.component.ts index 85902cb..4d35c5b 100644 --- a/src/app/add/reset-password/reset-password.component.ts +++ b/src/app/add/reset-password/reset-password.component.ts @@ -55,7 +55,7 @@ export class ResetPasswordComponent implements OnInit { showBtn : boolean = true; showBtn_1 : boolean = true; show_hide_pass(id){ - debugger; + console.log(id); if(id == 0){ this.iType = 'text'; diff --git a/src/app/all-menus/all-menus.component.html b/src/app/all-menus/all-menus.component.html index fd3f8aa..a9352ff 100644 --- a/src/app/all-menus/all-menus.component.html +++ b/src/app/all-menus/all-menus.component.html @@ -125,6 +125,9 @@ {{'User Finder' | translate}} + {{'User Master' | translate}} {{'Vehicle Type' | translate}} diff --git a/src/app/all-menus/all-menus.component.ts b/src/app/all-menus/all-menus.component.ts index 9b678dc..afa4bd5 100644 --- a/src/app/all-menus/all-menus.component.ts +++ b/src/app/all-menus/all-menus.component.ts @@ -268,8 +268,10 @@ export class AllMenusComponent implements OnInit { //2 menu dashboard soon(id) { + this.menuFlag = this.contactService.menuReturnSet(id); - this.router.navigateByUrl("const?_i=" + window.localStorage.token); + +this.router.navigateByUrl("const?_i=" + window.localStorage.token); } // 3 menu group(id) { @@ -369,6 +371,9 @@ export class AllMenusComponent implements OnInit { this.router.navigateByUrl("vehicle/reminder_service"); } + virtualDevice(id) { + this.router.navigateByUrl("virtualDevice"); + } @@ -657,7 +662,6 @@ fuel_report(id){ localStorage.removeItem('profilePic'); } this.router.navigateByUrl("add"); - // this.router.navigateByUrl("const?_status="+"OK"); } } @@ -690,7 +694,7 @@ fuel_report(id){ } this.router.navigateByUrl("dealerInfo"); - // this.router.navigateByUrl("const?_status="+"OK"); + } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 877d9c4..f04f77e 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -284,6 +284,7 @@ import { IndexingReportComponent } from './indexingReport/index-report.component import { IssueListKycComponent } from './kyc-approval/issue-list/issue-list.component'; import { IssueAddKycComponent } from './kyc-approval/issue-add/issue-add.component'; import { TripManagementReportComponent } from './report/report component/trip-management/trip-management-report.component'; +import { VirtualDeviceComponent } from './virtual-device/virtual-device.component'; // import { DisatanceReportComponent } from './report/disatance-report/disatance-report.component'; // import { MainComponent } from './report/main/main.component'; // import { AcReportsComponent } from './report/ac-report/ac-report.component'; @@ -476,6 +477,7 @@ export function createTranslateLoader(http: Http) { ProductOverviewComponent, PointShareComponent, MessageUtilityComponent, + VirtualDeviceComponent, TripLoadUnloadComponent, BuyNowComponent, BillingInfoComponent, diff --git a/src/app/app.router.ts b/src/app/app.router.ts index 9a1116d..d19f566 100644 --- a/src/app/app.router.ts +++ b/src/app/app.router.ts @@ -212,6 +212,7 @@ import { UserSettingComponent } from './user-setting/user-setting.component'; import { CurrentPositionReportComponent } from './report/report component/current-position/current-position.component'; import { IndexingReportComponent } from './indexingReport/index-report.component'; import { TripManagementReportComponent } from './report/report component/trip-management/trip-management-report.component'; +import { VirtualDeviceComponent } from './virtual-device/virtual-device.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'; @@ -314,7 +315,7 @@ export const router: Routes =[ {path : 'PointShareComponent',component : PointShareComponent}, {path: 'messageUtility',component : MessageUtilityComponent}, {path: 'censor',component : CensorDisplayComponent}, - // {path : 'live',component : LiveTrackingComponent}, + {path : 'virtualDevice',component : VirtualDeviceComponent}, {path: 'fuelComp',component: SidemenuFuelComponent}, {path: 'vehicleRoute',component: VehicleRouteComponent}, {path: 'setRoute',component: RouteSetComponent}, diff --git a/src/app/const/const.component.ts b/src/app/const/const.component.ts index 33fc126..64c0784 100644 --- a/src/app/const/const.component.ts +++ b/src/app/const/const.component.ts @@ -621,7 +621,7 @@ export class ConstComponent implements OnInit { if (window.localStorage['DataLoaded'] = 'True') { window.localStorage['Custumer'] = 'OFF' this.router.navigateByUrl("add") - // this.router.navigateByUrl("const?_status="+"OK"); + } } logo: any; @@ -738,15 +738,13 @@ export class ConstComponent implements OnInit { this.sidebarData(10); }); - - - - // var retrievedData = localStorage.getItem("devices"); - // var cord = JSON.parse(retrievedData); - // this.final = cord; - - - + this.activatedRoute.queryParams.subscribe((params: Params) => { + // //console.log('p3'); + + if(params['redirect']) { + this.router.navigateByUrl("location?pageid=locationComponent"); + } + }) this.timer = Observable.timer(100, 100); this.subscription = this.timer.subscribe(t => { var retrievedData = localStorage.getItem("devices"); @@ -843,7 +841,7 @@ export class ConstComponent implements OnInit { this.getuserObject(); this.getLanguage(); - this.getNotificationCount() + this.getNotificationCount(); } @@ -1414,7 +1412,7 @@ selectedlanguage:any // localStorage.setItem('Dealer',"OFF"); // localStorage.setItem('superadmin',"OFF") //console.log('this.superAdmin',this.superAdmin); - // debugger; + // if(this.superAdmin === true){ localStorage.setItem('supAdminAcessToCust', 'true' ); } @@ -1423,7 +1421,8 @@ selectedlanguage:any localStorage.setItem("dlrchk", dlrStatus) - this.router.navigateByUrl("const?_status=" + "OK"); + +this.router.navigateByUrl("const?_status=" + "OK"); // //console.log('testing', this.useridd); } @@ -1463,8 +1462,8 @@ selectedlanguage:any // //console.log("Inside View Dev",dataStatus); if (type == "Tracker") { localStorage.setItem('last_speed',lastSpeed ); - this.router.navigateByUrl("location?_dname=" + name + "_id=" + id); - window.localStorage['devDetail'] = JSON.stringify(dataStatus); + //this.router.navigateByUrl("location?_dname=" + name + "_id=" + id); + //window.localStorage['devDetail'] = JSON.stringify(dataStatus); } else { localStorage.setItem('last_speed',lastSpeed ); @@ -2247,7 +2246,7 @@ selectedlanguage:any getfuel(device,ind){ // //console.log(ind); // //console.log(device); - // debugger; + // var show_val = ''; if(this.fuelflag == 'l'){ if((device.currentFuel == undefined)||(device.currentFuel == NaN)||(device.currentFuel == null)){ @@ -2917,7 +2916,7 @@ selectedlanguage:any getApiKey(){ - // debugger; + // var api_key = 'AIzaSyA_ycttLXPMfCSSNAfPOsaENPQ85i17lPU'; var apiIdentifier = localStorage.getItem('apiIdentifier'); if(apiIdentifier == null){ @@ -3225,7 +3224,9 @@ selectedlanguage:any else { window.localStorage['checker'] = params['_status']; } - + if(params['redirect']) { + this.router.navigateByUrl("location?pageid=locationComponent"); + } }); this.latLongDetail() diff --git a/src/app/contact.service.ts b/src/app/contact.service.ts index cce1e22..a63b0be 100644 --- a/src/app/contact.service.ts +++ b/src/app/contact.service.ts @@ -1655,7 +1655,6 @@ getLanguages(payload){ getAddressByApi(latlng){ if(this.latLongAddress[latlng.long+'_'+latlng.lat]) { - console.log('get address for cache'); return Observable.of(this.latLongAddress[latlng.long+'_'+latlng.lat]); } else { return this.http.post(this.dev_url +'/googleAddress/getGoogleAddress',latlng) diff --git a/src/app/dashboard/add-new-device/add-new-device.component.ts b/src/app/dashboard/add-new-device/add-new-device.component.ts index 3033dd1..3cee855 100644 --- a/src/app/dashboard/add-new-device/add-new-device.component.ts +++ b/src/app/dashboard/add-new-device/add-new-device.component.ts @@ -210,7 +210,7 @@ export class AddNewDeviceComponent implements OnInit { SMSPlan:[''], city:[''], deviceModel:[''], - trackingExp:new Date(this.expDate), + trackingExp:new Date(new Date().setFullYear(new Date().getFullYear() + 2)), eSimExpiry:[''], model:[''], email:[""], @@ -234,15 +234,17 @@ export class AddNewDeviceComponent implements OnInit { that.checkDeviceEMI(value); for(var i=0;i - +
-

{{dealer.first_name}} {{dealer.last_name}}

+

{{dealer.first_name}} {{dealer.last_name}}

-

{{dealer.email}}

+

{{dealer.email}}

-

{{dealerPhone(dealer)}}

+

{{dealerPhone(dealer)}}

diff --git a/src/app/dealers-info/dealers-info.component.scss b/src/app/dealers-info/dealers-info.component.scss index 7ce05e0..b07d8f7 100644 --- a/src/app/dealers-info/dealers-info.component.scss +++ b/src/app/dealers-info/dealers-info.component.scss @@ -1,3 +1,8 @@ +.ftd-mp { + padding-top: 14px; + padding-bottom: 12px; +} + // #body{ // overflow-x: hidden; // overflow-y: hidden; diff --git a/src/app/dealers-info/dealers-info.component.ts b/src/app/dealers-info/dealers-info.component.ts index dd944bd..199101a 100644 --- a/src/app/dealers-info/dealers-info.component.ts +++ b/src/app/dealers-info/dealers-info.component.ts @@ -355,7 +355,8 @@ export class DealersInfoComponent implements OnInit { if (window.localStorage['DataLoaded'] = 'True') { - this.router.navigateByUrl("const?_status=" + "OK"); + +this.router.navigateByUrl("const?_status=" + "OK"); } }); } @@ -596,7 +597,7 @@ export class DealersInfoComponent implements OnInit { //Add the header row. var row = table.insertRow(-1); - debugger; + for (var i = 0; i < columnCount; i++) { var headerCell = document.createElement("TH"); headerCell.innerHTML = customers[0][i] diff --git a/src/app/device-renew/device-renew.component.ts b/src/app/device-renew/device-renew.component.ts index fbe5ae3..8f9ac3a 100644 --- a/src/app/device-renew/device-renew.component.ts +++ b/src/app/device-renew/device-renew.component.ts @@ -769,7 +769,7 @@ export class DeviceRenewComponent implements OnInit { const filtersimValue: any = simnum; this.simNumberSelect = []; this.simNumberSelect = this.deviceObj.filter(function (pptt) { - // debugger; + // // console.log(pp); var t = pptt.sim_Number.toLocaleLowerCase().indexOf(filtersimValue.toLocaleLowerCase()); return t > -1; diff --git a/src/app/device-report/alert-report/alert-report.component.ts b/src/app/device-report/alert-report/alert-report.component.ts index 1a7bc23..b74ac59 100644 --- a/src/app/device-report/alert-report/alert-report.component.ts +++ b/src/app/device-report/alert-report/alert-report.component.ts @@ -180,7 +180,8 @@ devi(){ } soon(){ - this.router.navigateByUrl("const?_i="+window.localStorage.token); + +this.router.navigateByUrl("const?_i="+window.localStorage.token); } new(){ @@ -226,7 +227,7 @@ mydealer(){ if(window.localStorage['DataLoaded'] = 'True'){ window.localStorage['Custumer'] = 'OFF' this.router.navigateByUrl("add") - // this.router.navigateByUrl("const?_status="+"OK"); + } } diff --git a/src/app/device-report/device-sosreport/device-sosreport.component.ts b/src/app/device-report/device-sosreport/device-sosreport.component.ts index 082b0c3..f285f7d 100644 --- a/src/app/device-report/device-sosreport/device-sosreport.component.ts +++ b/src/app/device-report/device-sosreport/device-sosreport.component.ts @@ -208,7 +208,7 @@ export class DeviceSOSreportComponent implements OnInit { }); // $('#deviceTable tbody').on('click', 'button', function() { - // debugger; + // // var data = that.tabelObj.row($(this).parents('tr')).data(); // console.log("button clicked"); // }); diff --git a/src/app/device-report/device-speed-report/device-speed-report.component.ts b/src/app/device-report/device-speed-report/device-speed-report.component.ts index 45b7539..555d1db 100644 --- a/src/app/device-report/device-speed-report/device-speed-report.component.ts +++ b/src/app/device-report/device-speed-report/device-speed-report.component.ts @@ -50,7 +50,8 @@ export class DeviceSpeedReportComponent implements OnInit { // } // soon() { - // this.router.navigateByUrl("const?_i=" + window.localStorage.token); + // +// this.router.navigateByUrl("const?_i=" + window.localStorage.token); // } @@ -214,7 +215,7 @@ export class DeviceSpeedReportComponent implements OnInit { if (window.localStorage['DataLoaded'] = 'True') { window.localStorage['Custumer'] = 'OFF' this.router.navigateByUrl("add") - // this.router.navigateByUrl("const?_status="+"OK"); + } } _lineChartData: any; diff --git a/src/app/device-report/distance-report/distance-report.component.ts b/src/app/device-report/distance-report/distance-report.component.ts index 8d0b238..d88d3d5 100644 --- a/src/app/device-report/distance-report/distance-report.component.ts +++ b/src/app/device-report/distance-report/distance-report.component.ts @@ -196,7 +196,8 @@ firstcall:boolean=true; // } // soon(){ -// this.router.navigateByUrl("const?_i="+window.localStorage.token); +// +// this.router.navigateByUrl("const?_i="+window.localStorage.token); // } @@ -253,7 +254,7 @@ firstcall:boolean=true; // if(window.localStorage['DataLoaded'] = 'True'){ // window.localStorage['Custumer'] = 'OFF' // this.router.navigateByUrl("add") -// // this.router.navigateByUrl("const?_status="+"OK"); +// // } // } diff --git a/src/app/device-report/drivers-performance-report/drivers-performance-report.component.ts b/src/app/device-report/drivers-performance-report/drivers-performance-report.component.ts index 2f27c50..c187982 100644 --- a/src/app/device-report/drivers-performance-report/drivers-performance-report.component.ts +++ b/src/app/device-report/drivers-performance-report/drivers-performance-report.component.ts @@ -156,7 +156,8 @@ devi(){ } soon(){ - this.router.navigateByUrl("const?_i="+window.localStorage.token); + +this.router.navigateByUrl("const?_i="+window.localStorage.token); } @@ -223,7 +224,7 @@ mydealer(){ if(window.localStorage['DataLoaded'] = 'True'){ window.localStorage['Custumer'] = 'OFF' this.router.navigateByUrl("add") - // this.router.navigateByUrl("const?_status="+"OK"); + } } diff --git a/src/app/device-report/geofancing-report/geofancing-report.component.html b/src/app/device-report/geofancing-report/geofancing-report.component.html index 1ef4ebe..5e6cc39 100644 --- a/src/app/device-report/geofancing-report/geofancing-report.component.html +++ b/src/app/device-report/geofancing-report/geofancing-report.component.html @@ -2,7 +2,7 @@
-

{{'Geofencing Report' | translate}}

+

{{'Geofencing Report 1' | translate}}

- - - - + + + + State RTO Certificate @@ -75,167 +76,179 @@ - -
- -
+ +
+ +
-
- - - - - - - - - +
+
NameImageDate
+ + - - - - - - - - - - - - + + + - - - - + + + - - - - - + + + - - + + + + + + + + + + + + + + + + + + + +
State RTO Certificate - - - - - - Not Available - - - {{state_certifcate_date |date:"medium"}} - NameImageDate
Vahan Certificate
State RTO Certificate - - - - - - - Not Available - - + + + + - {{vaahan_certifcate_date |date:"medium"}} + + Not Available +
+ {{state_certifcate_date |date:"medium"}} +
Vahan Certificate + + + + + + + Not Available + + + {{vaahan_certifcate_date |date:"medium"}} +
-
- - - + +
+
+ + + + + + + + + - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameImageDateDownload
NameImageDateDownloadState RTO Certificate + + + + + + Not Available + + + {{state_certifcate_date |date:"medium"}} + + + + + + +
State RTO Certificate - - - - - - Not Available - - - {{state_certifcate_date |date:"medium"}} - - - - - - - -
Vahan Certificate - - - - - - Not Available - - - {{vaahan_certifcate_date |date:"medium"}} - - - - - - -
- -
-
-

Documents Not Uploaded

-
+ + Vahan Certificate + + + + + + + + + + + + Not Available + + + + + + {{vaahan_certifcate_date |date:"medium"}} + + + + + + + + + + + + + + + + + + +
+

Documents Not Uploaded

+
+
- - - - - - - - - - - +
- {{item}} -
- {{value[i]}} -
+ + + + + + + + + + -
+ {{item}} +
+ {{value[i]}} +
+
- +
- - + \ No newline at end of file diff --git a/src/app/kyc-approval/device-kyc/device-kyc.component.html b/src/app/kyc-approval/device-kyc/device-kyc.component.html index c1b1e93..ec66610 100644 --- a/src/app/kyc-approval/device-kyc/device-kyc.component.html +++ b/src/app/kyc-approval/device-kyc/device-kyc.component.html @@ -161,6 +161,16 @@ {{ "RTO City" | translate }} + + {{ "Ignition" | translate }} + {{ "Power" | translate }} + {{ "Last Update" | translate }} + {{ "Address" | translate }} + {{ "Speed" | translate }} + {{ "GPS" | translate }} + {{ "gsm" | translate }} + {{ "Panic" | translate }} + {{ "Followup Contact" | translate }} {{ "KYC Status" | translate }} @@ -170,7 +180,7 @@ {{ "View" | translate }} - + {{ "Edit" | translate }} @@ -302,6 +312,18 @@ cust_array.transportOfficeCity ? cust_array.transportOfficeCity : "" }} + + + {{cust_array.last_ACC ? (cust_array.last_ACC == "1"? 'On':'Off') : ""}} + {{cust_array.power ? (cust_array.power == "1"? 'On':'Off') : ""}} + {{cust_array.last_ping_on ?( cust_array.last_ping_on | date: "medium" ): ""}} + {{cust_array.lastAddress ? cust_array.lastAddress : ""}} + {{cust_array.last_speed ? cust_array.last_speed : ""}} + {{cust_array.gpsTracking ? (cust_array.gpsTracking == "1"? 'Fixed':'Unfixed') : ""}} + {{cust_array.gsmSignal ? cust_array.gsmSignal : ""}} + {{cust_array.sos ? cust_array.sos : ""}} + {{cust_array.CID_No ? cust_array.CID_No : ""}} + + + + + + +
+
+ + + + + + + + + + + + + + + + + + +
Host IMEI Port Model
{{vdevice.host}}{{vdevice.imei}}{{vdevice.port}}{{vdevice.model}}
+
+
+ + + + \ No newline at end of file diff --git a/src/app/virtual-device/virtual-device.component.scss b/src/app/virtual-device/virtual-device.component.scss new file mode 100644 index 0000000..065ecad --- /dev/null +++ b/src/app/virtual-device/virtual-device.component.scss @@ -0,0 +1,84 @@ +.limiter{ + width:100%; + height:100vh; + padding-top: 7vh; + +} + +.rowStyle{ + width:100%; + margin: 0; + height:100vh; +} + + +.container { + padding: 2rem 0rem; + } + + h4 { + margin: 2rem 0rem 1rem; + } + + .table-image { + td, th { + vertical-align: middle; + } + } + + + .table-wrap { + height: 80px; + overflow-y: auto; + } + + + #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; +} \ No newline at end of file diff --git a/src/app/virtual-device/virtual-device.component.spec.ts b/src/app/virtual-device/virtual-device.component.spec.ts new file mode 100644 index 0000000..85bee3e --- /dev/null +++ b/src/app/virtual-device/virtual-device.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { VirtualDeviceComponent } from './virtual-device.component'; + +describe('VirtualDeviceComponent', () => { + let component: VirtualDeviceComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ VirtualDeviceComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(VirtualDeviceComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should be created', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/virtual-device/virtual-device.component.ts b/src/app/virtual-device/virtual-device.component.ts new file mode 100644 index 0000000..bbb5b59 --- /dev/null +++ b/src/app/virtual-device/virtual-device.component.ts @@ -0,0 +1,156 @@ +import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { ContactService } from '../contact.service'; +import { Router } from '@angular/router'; +import * as XLSX from 'xlsx'; + +declare var $:any; + +@Component({ + selector: 'app-virtual-device', + templateUrl: './virtual-device.component.html', + styleUrls: ['./virtual-device.component.scss'] +}) +export class VirtualDeviceComponent implements OnInit { + errorMsg=''; + showError; + arrayBuffer:any; + file:File; + submittedList = []; + virtualDevice ={ + "imei":"", + "port":'', + "host":"", + "model":"", + "route":[ + ] + } + tabelObj: any; + useridd: any; + superAdmin: any; + custtype: any; + orgChek: any; + supAdminDropDown = false; + +distributerValue +dealerValue; +@ViewChild("fileInput") + + // this InputVar is a reference to our input. + + InputVar: ElementRef; + constructor(private contactService: ContactService,private router: Router) { + + + } + + selectedItems=[]; + resetData() { + this.InputVar.nativeElement.value = ""; + this.errorMsg = ''; + this.file = null; + this.virtualDevice = { + "imei":"", + "port":'', + "host":"", + "model":"", + "route":[ + ] + } + } + ngOnInit() { + + + if(this.orgChek === true){ + this.supAdminDropDown = true; + } + // this.loadropdown(); + + + var that = this; + + + + } + + onChange(event) { + this.file = event.target.files[0]; + } + onUpload() { + this.showError = false; + if(this.file) { + + this.realExcelData(); + } else { + this.showError = true; + this.errorMsg = 'Please select file' + } + + + + } + realExcelData() { + let fileReader = new FileReader(); + fileReader.onload = (e) => { + this.arrayBuffer = fileReader.result; + var data = new Uint8Array(this.arrayBuffer); + var arr = new Array(); + for(var i = 0; i != data.length; ++i) arr[i] = String.fromCharCode(data[i]); + var bstr = arr.join(""); + var workbook = XLSX.read(bstr, {type:"binary"}); + var first_sheet_name = workbook.SheetNames[0]; + var worksheet = workbook.Sheets[first_sheet_name]; + this.setDataToAPI(XLSX.utils.sheet_to_json(worksheet,{raw:true})) + + } + fileReader.readAsArrayBuffer(this.file); + } + setDataToAPI(data) { + console.log(data) + let newData = []; + if(data.length) { + data = data.forEach(d => { + if(d.Lattitude && d.Longitude) { + newData.push( { + lat:d.Lattitude, + lng:d.Longitude + }) + } + }); + } + this.virtualDevice.route = newData; + this.submit(this.virtualDevice); + + } +successMesssage = ''; +submit(virtualDevice,isAdd =true){ + this.successMesssage = ''; + if(!virtualDevice.route.length) { + this.errorMsg = 'Please Upload Lat/long' + } else if(!virtualDevice.host) { + this.errorMsg = 'Please enter Host' + } else if(!virtualDevice.imei) { + this.errorMsg = 'Please enter IMEI' + } else if(!virtualDevice.port) { + this.errorMsg = 'Please enter port' + } else if(!virtualDevice.model) { + this.errorMsg = 'Please enter model' + } else { + let postObj = Object.assign({},virtualDevice); + if(isAdd) { + this.submittedList.unshift(postObj); + } + this.contactService.post('/virtualDevice',postObj,false).subscribe(resp => { +this.resetData(); +this.successMesssage = 'Data uploaded successfully' + console.log(resp) + + + },err=>{ + this.errorMsg = 'Request Failed' + }) + } + + +} + +} diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 3e9a61d..d499034 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,7 +1,9 @@ export const environment = { production: true, - hostUrl: "https://www.oneqlik.in", - hostUrl2: "https://www.oneqlik.in", + hostUrl: document.location.origin != 'http://localhost:4200'? document.location.origin : "https://www.oneqlik.in", + hostUrl2: document.location.origin != 'http://localhost:4200'? document.location.origin : "https://www.oneqlik.in", + //hostUrl:"https://www.oneqlik.in", + //hostUrl2:"https://www.oneqlik.in", // hostUrl:"https://socket.oneqlik.in", // hostUrl2:"https://socket.oneqlik.in", diff --git a/src/environments/environment.ts b/src/environments/environment.ts index f500afd..f640085 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -5,12 +5,10 @@ export const environment = { production: false, - // hostUrl: "http://localhost:3000", - // hostUrl2: "http://localhost:3000", - // hostUrl: "https://socket.oneqlik.in", - // hostUrl2: "https://socket.oneqlik.in", - hostUrl: "https://www.oneqlik.in", - hostUrl2: "https://www.oneqlik.in", + // hostUrl:"https://dev.oneqlik.in", + // hostUrl2:"https://dev.oneqlik.in", + hostUrl: document.location.origin != 'http://localhost:4200'? document.location.origin : "https://www.oneqlik.in", + hostUrl2: document.location.origin != 'http://localhost:4200'? document.location.origin : "https://www.oneqlik.in", socket5000: "", showLandingpageMenu: ["www.drsupergps.com", "www.vpngps.tech", "www.globaltechnohelp.com", "www.tracktive.in", "www.sohamshakti.in", "www.spygpstrack.com", "www.mtelematics.in", "www.dstrackingsolutions.com", "www.vctrack.in", "www.hltgps.in", "www.xcelgps.com"] diff --git a/src/index.html b/src/index.html index c32a28b..844b7aa 100644 --- a/src/index.html +++ b/src/index.html @@ -357,7 +357,7 @@ - + diff --git a/src/styles.css b/src/styles.css index 05f9775..b3d63e1 100644 --- a/src/styles.css +++ b/src/styles.css @@ -5,7 +5,10 @@ body { margin: 0; font-family: Roboto, sans-serif; } - +.ftd-mp { + padding-top: 13px !important; + padding-bottom: 12.5px !important; +} md-card { max-width: 80%; margin: 2em auto;