issue screen with other Small fixes
This commit is contained in:
parent
69894ac132
commit
58fb99cc5b
15 changed files with 820 additions and 13 deletions
|
|
@ -281,6 +281,8 @@ import { DownloadCertificateComponent } from './dashboard/download-certificate/d
|
|||
import { DeviceSettingComponent } from './device-setting/device-setting.component';
|
||||
import { UserSettingComponent } from './user-setting/user-setting.component';
|
||||
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 { DisatanceReportComponent } from './report/disatance-report/disatance-report.component';
|
||||
// import { MainComponent } from './report/main/main.component';
|
||||
// import { AcReportsComponent } from './report/ac-report/ac-report.component';
|
||||
|
|
@ -533,6 +535,8 @@ export function createTranslateLoader(http: Http) {
|
|||
RtoMasterComponent,
|
||||
DeviceKYCComponent,
|
||||
DeviceDocComponent,
|
||||
IssueAddKycComponent,
|
||||
IssueListKycComponent,
|
||||
NewRoutePlanReportComponent,
|
||||
ModelMasterComponent,
|
||||
TrackedUntrackedVehiclesComponent,
|
||||
|
|
@ -621,8 +625,8 @@ export function createTranslateLoader(http: Http) {
|
|||
|
||||
],
|
||||
schemas: [ NO_ERRORS_SCHEMA ],
|
||||
entryComponents:[PoiDtlDelComponent,EditDeviceMasterComponent,AcreportInfoComponent,GpsEditMasterComponent,RenewalHistoryComponent,PoiMenuComponent,ExpenseComponentComponent,
|
||||
AddpoiBylocationComponent,CreateTripComponent,CommentWindowComponent,DetailComponent,DailyDetailsComponent,RenewVehicleComponent,ViewCustomerDetailsComponent,OtpScreenComponent,DeviceDocComponent,TrackedUntrackedVehiclesComponent,DownloadCertificateComponent,
|
||||
entryComponents:[IssueAddKycComponent, PoiDtlDelComponent,EditDeviceMasterComponent,AcreportInfoComponent,GpsEditMasterComponent,RenewalHistoryComponent,PoiMenuComponent,ExpenseComponentComponent,
|
||||
AddpoiBylocationComponent,CreateTripComponent,CommentWindowComponent,DetailComponent,DailyDetailsComponent,RenewVehicleComponent,ViewCustomerDetailsComponent,OtpScreenComponent,DeviceDocComponent,IssueAddKycComponent,IssueListKycComponent,TrackedUntrackedVehiclesComponent,DownloadCertificateComponent,
|
||||
AnnouncementComponent,SelectUntrackVehiclesComponent,ExpenselistComponent,AddPlanComponent,AddDriverComponent,ShowPullDataLinkComponent,HualtListComponent,ShoRoutePlanComponent,EChalanComponent,TrackedVehiclesComponent,ViewCertificateComponent,],
|
||||
providers: [/* AuthService , */ AlertService, Data, SimpleTimer,DatainjectionService,ContactService,ReportService,
|
||||
{ provide: MD_DIALOG_DATA, useValue: {} },
|
||||
|
|
|
|||
|
|
@ -1694,7 +1694,7 @@ testTable() {
|
|||
"data":null,
|
||||
"defaultContent": "",
|
||||
"render":function(data,type,row){
|
||||
if(row.kycStatus && row.kycStatus=="Approved") {
|
||||
if(row.kycStatus && row.kycStatus=="Approved" && !that.superAdmin) {
|
||||
return '<i title="Unable to edit" style="font-size:20px;color:gray;cursor: not-allowed;" class="fas fa-edit"></i>'
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ export class NewEditDeviceComponent implements OnInit {
|
|||
Mileage : "10",
|
||||
phn: this.deviceForm.value.contactNo,
|
||||
sim_number: this.deviceForm.value.contactNo,
|
||||
created_by: this.userId,
|
||||
created_by: this.deviceData.created_by && this.deviceData.created_by._id ? this.deviceData.created_by : this.userId,
|
||||
supAdmin: this.sup_admin,
|
||||
// driver_name: this.driver,
|
||||
// contact_number: this.dcontact,
|
||||
|
|
|
|||
100
src/app/kyc-approval/issue-add/issue-add.component.html
Normal file
100
src/app/kyc-approval/issue-add/issue-add.component.html
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
<div>
|
||||
<div class="card-body" style="height: 50vh;">
|
||||
<form class="form" [formGroup]="issueForm" (ngSubmit)="submit()">
|
||||
<div class="row">
|
||||
<!-- <div class="col-sm-6 col-md-6 mt-2">
|
||||
<label>Vehicle </label>
|
||||
<select class="form-control" placeholder="Enter Route Name" formControlName="routeName">
|
||||
<option disabled selected value="">Select Route Name</option>
|
||||
<option *ngFor="let route of route_detail_show" [value]="route._id">
|
||||
{{route.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div> -->
|
||||
<!-- <div class="col-sm-6 col-md-6 mt-2">
|
||||
<label>Vehicle Number</label>
|
||||
<select class="form-control" placeholder="Enter Vehicle Name" formControlName="fileName">
|
||||
<option disabled selected value="">Select Vehicle Name</option>
|
||||
<option *ngFor="let route_1 of devices" [value]="route_1._id">
|
||||
{{route_1.Device_Name}}
|
||||
</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-6 mt-2">
|
||||
<label>Device IMEI</label>
|
||||
<select class="form-control" placeholder="Enter Vehicle Name" formControlName="DeviceIMEI">
|
||||
<option disabled selected value="">Select Vehicle Name</option>
|
||||
<option *ngFor="let route_1 of devices" [value]="route_1._id">
|
||||
{{route_1.Device_Name}}
|
||||
</option>
|
||||
</select>
|
||||
|
||||
</div> -->
|
||||
<div class="col-sm-6 col-md-6 mt-2">
|
||||
<label>Vehicle No</label>
|
||||
<input type="text" class="form-control" placeholder="Vehicle No" formControlName="VehicleNo">
|
||||
|
||||
<div *ngIf="VehicleNo.invalid && (VehicleNo.dirty || VehicleNo.touched)"
|
||||
class="">
|
||||
|
||||
<div class="error-msg" *ngIf="VehicleNo.errors?.required">
|
||||
Required field.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-6 mt-2">
|
||||
<label>Device IMEI</label>
|
||||
<input type="text" class="form-control" placeholder="Device IMEI" formControlName="DeviceIMEI">
|
||||
<div *ngIf="DeviceIMEI.invalid && (DeviceIMEI.dirty || DeviceIMEI.touched)" class="">
|
||||
<div class="error-msg" *ngIf="DeviceIMEI.errors?.required">
|
||||
Required field.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-6 mt-2">
|
||||
<label>Email</label>
|
||||
<input type="text" class="form-control" placeholder="Enter email" formControlName="email">
|
||||
<div *ngIf="email.invalid && (email.dirty || email.touched)" class="">
|
||||
<div class="error-msg" *ngIf="email.errors?.required">
|
||||
Required field.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-6 mt-2">
|
||||
<label>Phone</label>
|
||||
<input type="text" class="form-control" placeholder="Enter mobile" formControlName="mobile">
|
||||
<div *ngIf="mobile.invalid && (mobile.dirty || mobile.touched)" class="">
|
||||
<div class="error-msg" *ngIf="mobile.errors?.required">
|
||||
Required field.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-6 mt-2">
|
||||
<label>File Name</label>
|
||||
<input type="text" class="form-control" placeholder="Enter file name" formControlName="fileName">
|
||||
<div *ngIf="fileName.invalid && (fileName.dirty || fileName.touched)" class="">
|
||||
<div class="error-msg" *ngIf="fileName.errors?.required">
|
||||
Required field.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-6 mt-2">
|
||||
<label>Description</label>
|
||||
<textarea class="form-control" formControlName="msg" rows=""></textarea>
|
||||
<div *ngIf="msg.invalid && (msg.dirty || msg.touched)" class="">
|
||||
<div class="error-msg" *ngIf="msg.errors?.required">
|
||||
Required field.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-footer text-center mt-4">
|
||||
<button type="submit" class="btn btn-primary btn-md">Save</button>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
111
src/app/kyc-approval/issue-add/issue-add.component.scss
Normal file
111
src/app/kyc-approval/issue-add/issue-add.component.scss
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
.headStyle {
|
||||
text-align: center;
|
||||
font-size: 22px;
|
||||
font-weight: 500;
|
||||
margin-top: 10px;
|
||||
color: #6b6a6a;
|
||||
}
|
||||
.error-msg {
|
||||
color: red;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
25
src/app/kyc-approval/issue-add/issue-add.component.spec.ts
Normal file
25
src/app/kyc-approval/issue-add/issue-add.component.spec.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { IssueListKycComponent } from './issue-list.component';
|
||||
|
||||
describe('IssueListKycComponent', () => {
|
||||
let component: IssueListKycComponent;
|
||||
let fixture: ComponentFixture<IssueListKycComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ IssueListKycComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(IssueListKycComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
70
src/app/kyc-approval/issue-add/issue-add.component.ts
Normal file
70
src/app/kyc-approval/issue-add/issue-add.component.ts
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
import { Component, OnInit, TemplateRef } from '@angular/core';
|
||||
import { BsDatepickerConfig, BsModalRef, BsModalService } from 'ngx-bootstrap';
|
||||
|
||||
declare var $: any;
|
||||
declare var swal: any
|
||||
import * as moment from 'moment';
|
||||
import { ContactService } from '../../contact.service';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { MdDialogRef } from '@angular/material';
|
||||
@Component({
|
||||
selector: 'app-issue-add-kyc',
|
||||
templateUrl: './issue-add.component.html',
|
||||
styleUrls: ['./issue-add.component.scss']
|
||||
})
|
||||
export class IssueAddKycComponent implements OnInit {
|
||||
issues=[];
|
||||
|
||||
bsConfig: Partial<BsDatepickerConfig>;
|
||||
issueForm:FormGroup;
|
||||
userId
|
||||
colorTheme = 'theme-dark-blue';
|
||||
Load: boolean;
|
||||
constructor(private contactService:ContactService,private dialogRef: MdDialogRef<IssueAddKycComponent>) {
|
||||
this.bsConfig = Object.assign({ dateInputFormat: 'DD-MM-YYYY, h:mm:ss a' }, { containerClass: this.colorTheme });
|
||||
this.issueForm = new FormGroup({
|
||||
VehicleNo:new FormControl('',[Validators.required,]),
|
||||
DeviceIMEI:new FormControl('',[Validators.required,]),
|
||||
email:new FormControl('',[Validators.required,]),
|
||||
mobile:new FormControl('',[Validators.required,]),
|
||||
fileName:new FormControl(''),
|
||||
msg:new FormControl('',[Validators.required,]),
|
||||
})
|
||||
}
|
||||
get VehicleNo() { return this.issueForm.get('VehicleNo'); }
|
||||
get DeviceIMEI() { return this.issueForm.get('DeviceIMEI'); }
|
||||
get email() { return this.issueForm.get('email'); }
|
||||
get mobile() { return this.issueForm.get('mobile'); }
|
||||
get fileName() { return this.issueForm.get('fileName'); }
|
||||
get msg() { return this.issueForm.get('msg'); }
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.userId= JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id;
|
||||
// this.getIssues()
|
||||
}
|
||||
submit() {
|
||||
if(this.issueForm.valid) {
|
||||
let postObj = this.issueForm.value;
|
||||
postObj.user = this.userId
|
||||
this.contactService.post('/customer_support/post_inquiry',postObj).subscribe(res=>{
|
||||
console.log(res);
|
||||
swal({
|
||||
title: 'Saved!',
|
||||
html: 'Your Issue has been Created.',
|
||||
icon: 'success'
|
||||
})
|
||||
this.dialogRef.close()
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
62
src/app/kyc-approval/issue-list/issue-list.component.html
Normal file
62
src/app/kyc-approval/issue-list/issue-list.component.html
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<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>{{'Issue List' | translate}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row rowStyle">
|
||||
<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="col-sm-12 col-md-12 col-lg-12">
|
||||
<!-- <div *ngIf="Load" class="loading">Loading…</div>
|
||||
<div id="toast">
|
||||
<div id="desc">{{data_descip}}</div>
|
||||
</div> -->
|
||||
<div class="row" style="padding: 8px;margin-bottom: 8px;">
|
||||
<div class="col-md-4">
|
||||
<div class="col-sm-9 col-md-9 col-lg-9" style="padding:0px">
|
||||
<!-- from datetime picker -->
|
||||
<label>From</label>
|
||||
<input id="from_date" bsDatepicker class="form-control form-control-sm" [(ngModel)]="fromDate" (ngModelChange)="changeDate()" style="height: 25px;" [bsConfig]="bsConfig"
|
||||
type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-sm-9 col-md-9 col-lg-9" style="padding:0px">
|
||||
<!-- from datetime picker -->
|
||||
<label>To</label>
|
||||
<input id="todate" bsDatepicker class="form-control form-control-sm" [(ngModel)]="toDate" (ngModelChange)="changeDate()" style="height: 25px;" [bsConfig]="bsConfig"
|
||||
type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" style="text-align: right;">
|
||||
<button title="Add Issue" style="border:1px solid transparent; background-color: transparent;margin-top:8px;cursor:pointer" (click)='addIssue()'> <md-icon style="float: right;width:30px;height:30px;cursor:pointer">add</md-icon>Add Issue</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width: 100%;height:84vh;">
|
||||
<table id="deviceTable" cellspacing="0" class="display nowrap" style="width: 100%;font-size: 14px;">
|
||||
<thead style="background-color:#e0e0e0;color: #444444;">
|
||||
<tr>
|
||||
<th style="text-align:left;width:100px">{{'Ticket ID'|translate}} </th>
|
||||
<th style="text-align:left;width:100px">{{'Posted By'|translate}} </th>
|
||||
<th style="text-align:left;width:100px">{{'Email'|translate}} </th>
|
||||
<th style="text-align:left;width:100px">{{'Phone'|translate}} </th>
|
||||
<th style="text-align:left;width:100px">{{'Posted On' | translate}}</th>
|
||||
<th style="text-align:left;width:100px">{{'Assigned To' | translate}}</th>
|
||||
<th style="text-align:left;width:100px">{{'Message' | translate}}</th>
|
||||
<th style="text-align:left;width:100px">{{'Status' | translate}}</th>
|
||||
<th style="text-align:left;width:100px">{{'Remark' | translate}}</th>
|
||||
<th style="text-align:left;width:100px">{{'Closed Date' | translate}}</th>
|
||||
<th style="text-align:left;width:100px">{{'Update Status' | translate}}</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
109
src/app/kyc-approval/issue-list/issue-list.component.scss
Normal file
109
src/app/kyc-approval/issue-list/issue-list.component.scss
Normal file
|
|
@ -0,0 +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;
|
||||
}
|
||||
25
src/app/kyc-approval/issue-list/issue-list.component.spec.ts
Normal file
25
src/app/kyc-approval/issue-list/issue-list.component.spec.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { IssueListKycComponent } from './issue-list.component';
|
||||
|
||||
describe('IssueListKycComponent', () => {
|
||||
let component: IssueListKycComponent;
|
||||
let fixture: ComponentFixture<IssueListKycComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ IssueListKycComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(IssueListKycComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
292
src/app/kyc-approval/issue-list/issue-list.component.ts
Normal file
292
src/app/kyc-approval/issue-list/issue-list.component.ts
Normal file
|
|
@ -0,0 +1,292 @@
|
|||
import { Component, OnInit, TemplateRef } from '@angular/core';
|
||||
import { BsDatepickerConfig, BsModalRef, BsModalService } from 'ngx-bootstrap';
|
||||
import {MdDialog} from '@angular/material';
|
||||
declare var $: any;
|
||||
declare var swal: any
|
||||
import * as moment from 'moment';
|
||||
import { ContactService } from '../../contact.service';
|
||||
import { IssueAddKycComponent } from '../issue-add/issue-add.component';
|
||||
@Component({
|
||||
selector: 'app-issue-list-kyc',
|
||||
templateUrl: './issue-list.component.html',
|
||||
styleUrls: ['./issue-list.component.scss']
|
||||
})
|
||||
export class IssueListKycComponent implements OnInit {
|
||||
issues=[];
|
||||
modalRef: BsModalRef;
|
||||
bsConfig: Partial<BsDatepickerConfig>;
|
||||
fromDate=new Date();
|
||||
toDate=new Date();
|
||||
tabelObj: any;
|
||||
userId
|
||||
colorTheme = 'theme-dark-blue';
|
||||
Load: boolean;
|
||||
constructor(private contactService:ContactService,private modalService: BsModalService,private dialog:MdDialog) {
|
||||
this.bsConfig = Object.assign({ dateInputFormat: 'DD-MM-YYYY, h:mm:ss a' }, { containerClass: this.colorTheme });
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
var fTime = new Date();
|
||||
fTime.setHours(0,0,0,0);
|
||||
this.fromDate = new Date(fTime);
|
||||
|
||||
var today = new Date();
|
||||
var startDate = new Date(today.getFullYear(), today.getMonth(), 1);
|
||||
this.fromDate=startDate
|
||||
this.userId= JSON.parse(window.atob(window.localStorage.token.split('.')[1]))._id;
|
||||
// this.getIssues()
|
||||
this.testTable()
|
||||
}
|
||||
|
||||
getIssues(){
|
||||
|
||||
|
||||
this.contactService.get("/customer_support/getIssues?user="+this.userId+"&from="+this.fromDate+"&to="+this.toDate).subscribe((res:any)=>{
|
||||
console.log(res);
|
||||
this.issues=res;
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
addIssue(): void {
|
||||
const dialogRef = this.dialog.open(IssueAddKycComponent, {
|
||||
data: {},
|
||||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe(result => {
|
||||
this.testTable();
|
||||
});
|
||||
}
|
||||
testTable() {
|
||||
const that = this;
|
||||
console.log("inside function");
|
||||
$(document).ready(function () {
|
||||
that.tabelObj = $('#deviceTable').DataTable({
|
||||
// dom: 'Bfrtip',
|
||||
// buttons: [ 'copy', 'csv', 'ex cel', 'pdf', 'print' ],
|
||||
"autoWidth": true,
|
||||
'deferRender':true,
|
||||
"processing": true,
|
||||
"searching": true,
|
||||
pagingType: 'full_numbers',
|
||||
pageLength: 25,
|
||||
serverSide: false,
|
||||
"scrollX": true,
|
||||
"scrollY": '65vh',
|
||||
"scrollCollapse": true,
|
||||
lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
|
||||
"rowCallback": function(row: Node, data: any | Object, index: number){
|
||||
$('#edit', row).bind('click', () => {
|
||||
|
||||
console.log(data);
|
||||
|
||||
var body={}
|
||||
if(data.support_status=='OPEN'){
|
||||
body={
|
||||
title: "Update Status",
|
||||
// text: "Please Enter Solution Remark:",
|
||||
// input: 'text',
|
||||
showCancelButton: true ,
|
||||
confirmButtonColor: 'green',
|
||||
confirmButtonText:'IN PROGRESS'
|
||||
}
|
||||
}else{
|
||||
body={
|
||||
title: "Update Status",
|
||||
text: "Please Enter Solution Remark:",
|
||||
input: 'text',
|
||||
showCancelButton: true ,
|
||||
confirmButtonColor: 'green',
|
||||
|
||||
}
|
||||
}
|
||||
// var req={
|
||||
// id:data._id,
|
||||
// ticketStatus:'RESOLVED'
|
||||
// }
|
||||
// that.contactService.post('/customer_support/updateCustomerQuery',req).subscribe(res=>{
|
||||
// console.log(res);
|
||||
// that.tabelObj.ajax.reload()
|
||||
// })
|
||||
swal(body
|
||||
// {
|
||||
// // title: 'Are you sure?',
|
||||
// title: "Update Status",
|
||||
// text: "Please Enter Solution Remark:",
|
||||
// input: 'text',
|
||||
// showCancelButton: true ,
|
||||
// confirmButtonColor: 'green',
|
||||
// }
|
||||
).then((result) =>{
|
||||
if(result){
|
||||
console.log(result);
|
||||
var req={
|
||||
id:data._id,
|
||||
solutionRemarks:data.support_status=='OPEN'?undefined:result,
|
||||
ticketStatus:data.support_status=='OPEN'?'IN PROGRESS':'CLOSE'
|
||||
}
|
||||
that.contactService.post('/customer_support/updateCustomerQuery',req).subscribe(res=>{
|
||||
console.log(res);
|
||||
that.tabelObj.ajax.reload()
|
||||
})
|
||||
|
||||
}else{
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
},
|
||||
ajax: (dataTablesParameters, callback) => {
|
||||
console.log('temptemptemptemptemp', dataTablesParameters);
|
||||
that.Load = true;
|
||||
var suburl = "";
|
||||
that.contactService.get("/customer_support/getIssues?user="+that.userId+"&from="+that.fromDate+"&to="+that.toDate).subscribe((res:any)=>{
|
||||
console.log(res);
|
||||
that.issues=res;
|
||||
for(var i=0;i<res.length;i++){
|
||||
if(!res[i].ticketId){
|
||||
res[i].ticketId='N/A'
|
||||
}
|
||||
if(!res[i].solutionRemarks){
|
||||
res[i].solutionRemarks='N/A'
|
||||
}
|
||||
if(!res[i].closedDate){
|
||||
res[i].closedDate='N/A'
|
||||
}
|
||||
// console.log(res);
|
||||
|
||||
}
|
||||
|
||||
that.Load = false
|
||||
callback({ data: res });
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
"columns": [
|
||||
{
|
||||
"data": "ticketId",
|
||||
|
||||
"render": function (data, row) {
|
||||
// console.log(row);
|
||||
|
||||
return data?data:'N/A';
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "posted_by",
|
||||
|
||||
"render": function (data, row) {
|
||||
return data.first_name+" "+data.last_name;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "posted_by",
|
||||
|
||||
"render": function (data, row) {
|
||||
return data.email;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "posted_by",
|
||||
|
||||
"render": function (data, row) {
|
||||
return data.phone;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "posted_on",
|
||||
"render": function (data, type, row) {
|
||||
var reportDate = new Date(data);
|
||||
return data ? (moment(reportDate).format('LL')) : "";
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "assigned_to",
|
||||
"render": function (data, type, row) {
|
||||
return data.first_name+" "+data.last_name;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "message",
|
||||
"render": function (data, type, row) {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "support_status",
|
||||
"render": function (data, type, row) {
|
||||
return data=='CLOSE' || data=='CLOSED'?'CLOSED':data=='IN PROGRESS'?data:'OPEN';
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "solutionRemarks",
|
||||
"render": function (data, type, row) {
|
||||
var solutionRemarks= data?data:'N/A';
|
||||
return solutionRemarks
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "closedDate",
|
||||
"render": function (data, type, row) {
|
||||
var closedDate= data!='N/A'? moment(data).format('llll'):'N/A';
|
||||
|
||||
return closedDate
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "support_status",
|
||||
"render": function (data, type, row) {
|
||||
var button
|
||||
if(row.support_status=='CLOSE') {
|
||||
button= `<button disabled class="btn btn=info btn-sm"><i title="Query Closed" style="font-size:20px;color: green" class="fas fa-check"></i></button>`;
|
||||
} else{
|
||||
button=`<button class="btn btn=info btn-sm"><i id="edit" title="Resolve Query" style="font-size:20px;color: green" class="fas fa-edit"></i></button>`;
|
||||
}
|
||||
return button
|
||||
}
|
||||
},
|
||||
|
||||
],
|
||||
"columnDefs": [
|
||||
{ className: "dt-body-left", "targets": [0,1,2,3,4,5,6,7,8,9,10] },
|
||||
{
|
||||
"targets": '_all',
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
$(td).css('padding', '18px')
|
||||
}
|
||||
},
|
||||
{ "width": "10px", "targets": 0 },
|
||||
{ "width": "40px", "targets": 1 },
|
||||
{ "width": "100px", "targets": 2 },
|
||||
{ "width": "70px", "targets": 3 },
|
||||
{ "width": "70px", "targets": 4 },
|
||||
{ "width": "70px", "targets": 5 },
|
||||
{ "width": "70px", "targets": 6 },
|
||||
{ "width": "70px", "targets": 7 },
|
||||
{ "width": "70px", "targets": 8 },
|
||||
{ "width": "70px", "targets": 9 },
|
||||
{ "width": "70px", "targets": 10 },
|
||||
|
||||
], order: [[ 4, 'desc' ], [ 0, 'asc' ]]
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
changeDate(){
|
||||
console.log("chabjhdsb",this.toDate,this.fromDate);
|
||||
|
||||
this.tabelObj.ajax.reload();
|
||||
}
|
||||
|
||||
openModal(template: TemplateRef<any>,data) {
|
||||
this.modalRef = this.modalService.show(template,{'backdrop':'static',class:'modal-lg modal-dialog-centered'});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -26,7 +26,10 @@
|
|||
<a class="nav-link active" data-toggle="tab" href="#CustomerKYC" (click)="changeTab('customerKYC')" role="tab">Customer KYC</a>
|
||||
</li> -->
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href="#DeviceKYC" (click)="changeTab('deviceKYC')" role="tab">Device KYC</a>
|
||||
<a class="nav-link active" data-toggle="tab" (click)="changeTab('deviceKYC')" role="tab">Device KYC</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" (click)="changeTab('issues')" role="tab">Issues</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
@ -50,7 +53,7 @@
|
|||
<div id="desc">{{ data_descip }}</div>
|
||||
</div>
|
||||
<div class="loading" *ngIf="Load">Loading…</div>
|
||||
<div class="card">
|
||||
<div *ngIf="!isIssueScreen" class="card">
|
||||
<div>
|
||||
<!-- <div class="row card-header"> -->
|
||||
<!-- <div class="col-5" style="
|
||||
|
|
@ -229,4 +232,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="isIssueScreen">
|
||||
<app-issue-list-kyc></app-issue-list-kyc>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,20 +1,20 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IssueAddKycComponent } from './issue-add/issue-add.component';
|
||||
|
||||
import { KycApprovalComponent } from './kyc-approval.component';
|
||||
|
||||
describe('KycApprovalComponent', () => {
|
||||
let component: KycApprovalComponent;
|
||||
let fixture: ComponentFixture<KycApprovalComponent>;
|
||||
describe('IssueAddKycComponent', () => {
|
||||
let component: IssueAddKycComponent;
|
||||
let fixture: ComponentFixture<IssueAddKycComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ KycApprovalComponent ]
|
||||
declarations: [ IssueAddKycComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(KycApprovalComponent);
|
||||
fixture = TestBed.createComponent(IssueAddKycComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ declare var swal: any;
|
|||
})
|
||||
export class KycApprovalComponent implements OnInit {
|
||||
modelChanged: Subject<string> = new Subject<string>();
|
||||
isIssueScreen = false;
|
||||
status
|
||||
isCustomerKYC:Boolean=false;
|
||||
kycStatus=[{Name:'Approved',value:'Approved'},{Name:'Reject',value:'Reject'},{Name:'Pending',value:'Pending'}]
|
||||
|
|
@ -538,8 +539,10 @@ logout() {
|
|||
|
||||
changeTab(type){
|
||||
if(type=="deviceKYC"){
|
||||
this.isIssueScreen = false;
|
||||
this.isCustomerKYC=false
|
||||
}else{
|
||||
this.isIssueScreen = true;
|
||||
this.isCustomerKYC=true
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6135,7 +6135,7 @@ export class LocationComponent implements OnInit, OnDestroy {
|
|||
createTrip(dev) {
|
||||
// console.log('devicedevicedevice=>', dev);
|
||||
|
||||
var DeviceObj = JSON.parse(localStorage.getItem('devDetail'));
|
||||
var DeviceObj = localStorage.getItem('devDetail') ? JSON.parse(localStorage.getItem('devDetail')) : {};
|
||||
|
||||
|
||||
var vehicleLatLng = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue