Commit 19a05923 authored by ari_darmawan's avatar ari_darmawan

Merge branch 'update-feature-v2' into development

# Conflicts:
#	src/app/admin/admin-dashboard/admin-dashboard-report/admin-dashboard-report.component.html
#	src/app/admin/admin-dashboard/admin-dashboard-report/admin-dashboard-report.component.ts
#	src/assets/configAPI.json
parents 910293e9 a6f8d10a
......@@ -28,139 +28,60 @@
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Pengaduan Dashboard SD'">
<tr>
<th rowspan="2" style="max-width: 15px;">#</th>
<th rowspan="2">No Ticket CRM</th>
<th rowspan="2">Nama User</th>
<th rowspan="2">Assigned Agent</th>
<th rowspan="2">Unit Pengaduan (Cabang/ Call Center/ Sociomile Staff)</th>
<th rowspan="2">Tgl Pengaduan</th>
<th rowspan="2">Nama Nasabah</th>
<th rowspan="2">No Telepon</th>
<th rowspan="2">No Rekening</th>
<th rowspan="2">No Kartu ATM</th>
<th rowspan="2">Penyebab Pengaduan</th>
<th rowspan="2">Topik</th>
<th rowspan="2">Sub Topik</th>
<th rowspan="2">Kategori</th>
<th rowspan="2">Deskripsi Pengaduan</th>
<th rowspan="2">Tanggal Transaksi</th>
<th rowspan="2">E-channel/Non-E-channel</th>
<th rowspan="2">Kategori Pengaduan</th>
<th rowspan="2">Tindak Lanjut Pengaduan</th>
<th rowspan="2">Unit Terkait (Divisi)</th>
<th rowspan="2">PIC</th>
<th rowspan="2">Tindak lanjut oleh Unit Terkait </th>
<th rowspan="2">Status Pengaduan</th>
<th rowspan="2">Tanggal Resolved</th>
<th rowspan="2">SLA Internal</th>
<th rowspan="2">Hari SLA</th>
<th rowspan="2">Target Penyelesaian</th>
<th rowspan="2">Remark</th>
<th colspan="2">Potensi Kerugian</th>
<th *ngFor="let data of fieldExport; let i = index">
<div class="form-check">
<input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
</div>
</th>
</tr>
<tr>
<!-- <tr>
<th>Nasabah</th>
<th>Bank</th>
</tr>
</tr> -->
</ng-container>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Permintaan Dashboard SD'">
<tr>
<th rowspan="2" style="max-width: 15px;">#</th>
<th rowspan="2">No Ticket CRM</th>
<th rowspan="2">Nama User</th>
<th rowspan="2">Assigned Agent</th>
<th rowspan="2">Unit Permintaan (Cabang/ Call Center/ Sociomile Staff)</th>
<th rowspan="2">Tgl Permintaan</th>
<th rowspan="2">Nama Nasabah</th>
<th rowspan="2">No Telpon</th>
<th rowspan="2">No Rekening</th>
<th rowspan="2">No Kartu ATM</th>
<th rowspan="2">Penyebab Pengaduan</th>
<th rowspan="2">Topik</th>
<th rowspan="2">Sub Topik</th>
<th rowspan="2">Kategori</th>
<th rowspan="2">Deskripsi Permintaan</th>
<th rowspan="2">Tanggal Transaksi</th>
<th rowspan="2">E-channel/Non-E-channel</th>
<th rowspan="2">Kategori Permintaan</th>
<th rowspan="2">Tindak Lanjut Permintaan</th>
<th rowspan="2">Unit Terkait (Divisi)</th>
<th rowspan="2">PIC</th>
<th rowspan="2">Tindak lanjut oleh Unit Terkait </th>
<th rowspan="2">Status Permintaan</th>
<th rowspan="2">Tanggal Resolved</th>
<th rowspan="2">SLA Internal</th>
<th rowspan="2">Hari SLA</th>
<th rowspan="2">Target Penyelesaian</th>
<th rowspan="2">Remark</th>
<th colspan="2">Potensi Kerugian</th>
</tr>
<tr>
<th>Nasabah</th>
<th>Bank</th>
<th *ngFor="let data of fieldExport; let i = index">
<div class="form-check">
<input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
</div>
</th>
</tr>
</ng-container>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Permintaan Dashboard Agent Nobucall'">
<tr>
<th style="max-width: 15px;">#</th>
<th>No Ticket CRM</th>
<th>Nama User</th>
<th>Tgl Permintaan</th>
<th>Nama Nasabah</th>
<th>No Telepon</th>
<th>No Rekening</th>
<th>No Kartu ATM</th>
<th>Topik</th>
<th>Sub Topik</th>
<th>Kategori</th>
<th>Deskripsi Permintaan</th>
<th>E-channel/Non-E-channel</th>
<th>Kategori Permintaan</th>
<th>Tindak Lanjut</th>
<th>Unit Terkait (Divisi)</th>
<th>Status Informasi</th>
<th>Tanggal</th>
<th>Target Penyelesaian</th>
<th>Hari SLA</th>
<th rowspan="2" style="max-width: 15px;">#</th>
<th *ngFor="let data of fieldExport; let i = index">
<div class="form-check">
<input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
</div>
</th>
</tr>
</ng-container>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Inquiry Call Center & NWB'">
<tr>
<th style="max-width: 15px;">#</th>
<th>No Ticket CRM</th>
<th>Nama User</th>
<th>Tgl Inquiry</th>
<th>Nama Nasabah</th>
<th>No Telepon</th>
<th>No Rekening</th>
<th>No Kartu ATM</th>
<th>Topik</th>
<th>Sub Topik</th>
<th>Kategori</th>
<th>Deskripsi Pengaduan</th>
<th>E-channel/Non-E-channel</th>
<th>Kategori Pengaduan</th>
<th>Tindak Lanjut</th>
<th>Unit Terkait (Divisi)</th>
<th>Status Informasi</th>
<th>Tanggal</th>
<th>Target Penyelesaian</th>
<th>Hari SLA</th>
<th rowspan="2" style="max-width: 15px;">#</th>
<th *ngFor="let data of fieldExport; let i = index">
<div class="form-check">
<input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
</div>
</th>
</tr>
</ng-container>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Telepon terputus Call Center & NWB'">
<tr>
<th style="max-width: 15px;">#</th>
<th>No Ticket CRM</th>
<th>Nama User</th>
<th>Tgl Telepon</th>
<th>Nama Nasabah</th>
<th>No Telepon</th>
<th>Topik</th>
<th>Deskripsi</th>
<th>Status</th>
<th>Tanggal Closed</th>
<th>Target Penyelesaian</th>
<th>Hari SLA</th>
<th rowspan="2" style="max-width: 15px;">#</th>
<th *ngFor="let data of fieldExport; let i = index">
<div class="form-check">
<input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
</div>
</th>
</tr>
</ng-container>
</thead>
......@@ -318,78 +239,46 @@
<thead>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Pengaduan Dashboard SD'">
<tr>
<th style="max-width: 15px;">#</th>
<th>No Ticket CRM</th>
<th>Nama User</th>
<th>Tgl & Waktu Pengaduan</th>
<th>Nama Nasabah</th>
<th>No Telepon 1</th>
<th>Jenis Topik</th>
<th>Sub Topik</th>
<th>Kategori</th>
<th>Deskripsi Pengaduan</th>
<th>Unit Terkait</th>
<th>SLA Internal</th>
<th>Status Pengaduan</th>
<th>Tanggal & Waktu Resolved</th>
<th>Nama Staff</th>
<th rowspan="2" style="max-width: 15px;">#</th>
<th *ngFor="let data of fieldExport; let i = index">
<div class="form-check">
<input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
</div>
</th>
</tr>
</ng-container>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Permintaan Dashboard SD'">
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Permintaan Dashboard SD'"> -->
<tr>
<th style="max-width: 15px;">#</th>
<th>No Ticket CRM</th>
<th>Nama User</th>
<th>Tgl & Waktu Permintaan</th>
<th>Nama Nasabah</th>
<th>No Telepon 1</th>
<th>Jenis Topik</th>
<th>Sub Topik</th>
<th>Kategori</th>
<th>Deskripsi Permintaan</th>
<th>Unit Terkait</th>
<th>SLA Internal</th>
<th>Status Permintaan</th>
<th>Tanggal & Waktu Resolved</th>
<th>Nama Staff</th>
<th rowspan="2" style="max-width: 15px;">#</th>
<th *ngFor="let data of fieldExport; let i = index">
<div class="form-check">
<input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
</div>
</th>
</tr>
</ng-container>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Inquiry Call Center & NWB'">
<tr>
<th style="max-width: 15px;">#</th>
<th>No Ticket CRM</th>
<th>Nama User</th>
<th>Tgl & Waktu Inquiry</th>
<th>Nama Nasabah</th>
<th>No Telepon 1</th>
<th>Jenis Topik</th>
<th>Sub Topik</th>
<th>Kategori</th>
<th>Deskripsi Inquiry</th>
<th>Unit Terkait</th>
<th>SLA Internal</th>
<th>Status Inquiry</th>
<th>Tanggal & Waktu Resolved</th>
<th>Nama Staff</th>
<th rowspan="2" style="max-width: 15px;">#</th>
<th *ngFor="let data of fieldExport; let i = index">
<div class="form-check">
<input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
</div>
</th>
</tr>
</ng-container>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Telepon terputus Call Center & NWB'">
<tr>
<th style="max-width: 15px;">#</th>
<th>No Ticket CRM</th>
<th>Nama User</th>
<th>Tgl & Waktu Telepon terputus</th>
<th>Nama Nasabah</th>
<th>No Telepon 1</th>
<th>Jenis Topik</th>
<th>Sub Topik</th>
<th>Kategori</th>
<th>Deskripsi Telepon terputus</th>
<th>Unit Terkait</th>
<th>SLA Internal</th>
<th>Status Telepon terputus</th>
<th>Tanggal & Waktu Resolved</th>
<th>Nama Staff</th>
<th rowspan="2" style="max-width: 15px;">#</th>
<th *ngFor="let data of fieldExport; let i = index">
<div class="form-check">
<input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
</div>
</th>
</tr>
</ng-container>
</thead>
......@@ -489,40 +378,24 @@
<thead>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Pengaduan Dashboard SD'">
<tr>
<th style="max-width: 15px;">#</th>
<th>No Ticket CRM</th>
<th>Nama User</th>
<th>Tgl & Waktu Pengaduan</th>
<th>Nama Nasabah</th>
<th>No Telepon 1</th>
<th>Jenis Produk</th>
<th>Kategori Produk</th>
<th>Deskripsi Pengaduan</th>
<th>Unit Terkait</th>
<th>SLA Internal</th>
<th>Status Pengaduan</th>
<th>Tanggal & Waktu Resolved</th>
<th>Nama CS</th>
<th>Nama SPV/BOH</th>
<th rowspan="2" style="max-width: 15px;">#</th>
<th *ngFor="let data of fieldExport; let i = index">
<div class="form-check">
<input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
</div>
</th>
</tr>
</ng-container>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Permintaan Dashboard SD'">
<tr>
<th style="max-width: 15px;">#</th>
<th>No Ticket CRM</th>
<th>Nama User</th>
<th>Tgl & Waktu Permintaan</th>
<th>Nama Nasabah</th>
<th>No Telepon 1</th>
<th>Jenis Produk</th>
<th>Kategori Produk</th>
<th>Deskripsi Permintaan</th>
<th>Unit Terkait</th>
<th>SLA Internal</th>
<th>Status Permintaan</th>
<th>Tanggal & Waktu Resolved</th>
<th>Nama CS</th>
<th>Nama SPV/BOH</th>
<th rowspan="2" style="max-width: 15px;">#</th>
<th *ngFor="let data of fieldExport; let i = index">
<div class="form-check">
<input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
</div>
</th>
</tr>
</ng-container>
</thead>
......
......@@ -47,8 +47,11 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
servicefamily_name : null,
is_export : null,
team_id : null,
user_id : null
user_id : null,
field_export: []
}
fieldExport: any[] = [];
public TicketReportData = undefined
public ListDataPagingReport = {count : 0}
......@@ -75,7 +78,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
ngOnInit() {
console.log(JSON.stringify(this._SP.getUserInformation.values.user_id))
}
ngOnChanges(changes: SimpleChanges) {
......@@ -83,7 +85,135 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
}
ngOnInitAfter(_RequestList, _Model){
this.TicketReportRequest =_RequestList
this.TicketReportRequest =_RequestList;
let start_date_ticket = '';
let deskripsi = '';
let status= '';
switch (_RequestList.servicefamily_id[0]) {
case 2:
start_date_ticket += " Pengaduan";
deskripsi += " Pengaduan";
status += " Pengaduan";
break;
case 4:
start_date_ticket += " Permintaan";
deskripsi += " Permintaan";
status += " Permintaan";
break;
case 1:
start_date_ticket += " Inquery";
deskripsi += " Inquery";
status += " Inquery";
break;
case 6:
start_date_ticket += " Telpon Terputus";
deskripsi += " Telpon Terputus";
status += " Telpon Terputus";
break;
}
if (this.TeamID == this.Env.Team.SociomileStaff){
this.fieldExport = [
{"name": 'ref', "value": false, "field": "No Ticket CRM"},
{"name": 'createdby_name', "value": false, "field": "Nama User"},
{"name": 'start_date', "value": false, "field": start_date_ticket},
{"name": 'caller_name', "value": false, "field": "Nama Nasabah"},
{"name": 'caller_mobile_phone', "value": false, "field": "No Telepon 1"},
{"name": 'ticket_servicefamiliy_name', "value": false, "field": "Jenis Topik"},
{"name": 'ticket_service_name', "value": false, "field": "Sub Topik"},
{"name": 'ticket_servicesubcategory_name', "value": false, "field": "Kategori"},
{"name": 'title', "value": false, "field": deskripsi},
{"name": 'team_name', "value": false, "field": 'Unit Terkait'},
{"name": 'sla_internal', "value": false, "field": "SLA Internal"},
{"name": 'ticket_status', "value": false, "field": status},
{"name": 'resolve_date', "value": false, "field": "Tanggal & Waktu Resolved"},
{"name": 'cscabang', "value": false, "field": "Nama Staff"},
]
} else if (this.TeamID == this.Env.Team.CsCabangBranchAgent) {
this.fieldExport = [
{"name": 'ref', "value": false, "field": "No Ticket CRM"},
{"name": 'createdby_name', "value": false, "field": "Nama User"},
{"name": 'start_date', "value": false, "field": start_date_ticket},
{"name": 'caller_name', "value": false, "field": "Nama Nasabah"},
{"name": 'caller_mobile_phone', "value": false, "field": "No Telepon 1"},
{"name": 'ticket_servicefamiliy_name', "value": false, "field": "Jenis Topik"},
{"name": 'ticket_service_name', "value": false, "field": "Sub Topik"},
{"name": 'ticket_servicesubcategory_name', "value": false, "field": "Kategori"},
{"name": 'title', "value": false, "field": deskripsi},
{"name": 'team_name', "value": false, "field": 'Unit Terkait'},
{"name": 'sla_internal', "value": false, "field": "SLA Internal"},
{"name": 'ticket_status', "value": false, "field": status},
{"name": 'resolve_date', "value": false, "field": "Tanggal & Waktu Resolved"},
{"name": 'cscabang', "value": false, "field": "Nama Staff"},
]
} else if (_RequestList.servicefamily_id[0] == 2 || _RequestList.servicefamily_id[0] == 4) {
this.fieldExport = [
{"name": 'ref', "value": false, "field": "No Ticket CRM"},
{"name": 'createdby_name', "value": false, "field": "Nama User"},
{"name": 'agent_name', "value": false, "field": "Assigned Agent"},
{"name": 'unit_pengaduan', "value": false, "field": "Unit Pengaduan (Cabang/ Call Center/ Sociomile Staff)"},
{"name": 'start_date', "value": false, "field": 'Tanggal ' + ((_RequestList.servicefamily_id[0] == 2) ? 'Pengaduan' : 'Permintaan')},
{"name": 'caller_name', "value": false, "field": "Nama Nasabah"},
{"name": 'caller_mobile_phone', "value": false, "field": "No Telepon"},
{"name": 'no_rekening', "value": false, "field": "No Rekening"},
{"name": 'no_kartu_atm', "value": false, "field": "No Kartu ATM"},
{"name": 'penyebab_pengaduan', "value": false, "field": "Penyebab Pengaduan"},
{"name": 'ticket_servicefamiliy_name', "value": false, "field": "Topik"},
{"name": 'ticket_service_name', "value": false, "field": "Sub Topik"},
{"name": 'ticket_servicesubcategory_name', "value": false, "field": "Kategori"},
{"name": 'deskripsi', "value": false, "field": 'Deskripsi ' + ((_RequestList.servicefamily_id[0] == 2) ? 'Pengaduan' : 'Permintaan')},
{"name": 'tanggal_transaksi', "value": false, "field": "Tanggal Transaksi"},
{"name": 'e_channel', "value": false, "field": "E-channel/Non-E-channel"},
{"name": 'kategori', "value": false, "field": 'Kategori ' + ((_RequestList.servicefamily_id[0] == 2) ? 'Pengaduan' : 'Permintaan')},
{"name": 'tidak_lanjut', "value": false, "field": 'Tindak Lanjut ' + ((_RequestList.servicefamily_id[0] == 2) ? 'Pengaduan' : 'Permintaan')},
{"name": 'team_name', "value": false, "field": "Unit Terkait (Divisi)"},
{"name": 'pic', "value": false, "field": "PIC"},
{"name": 'ticket_solution', "value": false, "field": "Tindak lanjut oleh Unit Terkait"},
{"name": 'ticket_status', "value": false, "field": 'Status ' + ((_RequestList.servicefamily_id[0] == 2) ? 'Pengaduan' : 'Permintaan')},
{"name": 'resolve_date', "value": false, "field": "Tanggal Resolved"},
{"name": 'sla_internal', "value": false, "field": "SLA Internal"},
{"name": 'sla_hari_kerja', "value": false, "field": "Hari SLA"},
{"name": 'target_penyelesaian', "value": false, "field": "Target Penyelesaian"},
{"name": 'remark', "value": false, "field": "Remark"},
{"name": 'nasabah', "value": false, "field": "Nasabah"},
{"name": 'bank', "value": false, "field": "Bank"}
]
} else if (_RequestList.servicefamily_id[0] == 1 || _RequestList.servicefamily_id[0] == 5) {
this.fieldExport = [
{"name": 'ref', "value": false, "field": "No Ticket CRM"},
{"name": 'createdby_name', "value": false, "field": "Nama User"},
{"name": 'start_date', "value": false, "field": 'Tanggal ' + ((_RequestList.servicefamily_id[0] == 1) ? 'Inquery' : 'Permintaan')},
{"name": 'caller_name', "value": false, "field": "Nama Nasabah"},
{"name": 'caller_mobile_phone', "value": false, "field": "No Telepon"},
{"name": 'no_rekening', "value": false, "field": "No Rekening"},
{"name": 'no_kartu_atm', "value": false, "field": "No Kartu ATM"},
{"name": 'ticket_servicefamiliy_name', "value": false, "field": "Topik"},
{"name": 'ticket_service_name', "value": false, "field": "Sub Topik"},
{"name": 'ticket_servicesubcategory_name', "value": false, "field": "Kategori"},
{"name": 'deskripsi', "value": false, "field": 'Deskripsi ' + ((_RequestList.servicefamily_id[0] == 1) ? 'Inquery' : 'Permintaan')},
{"name": 'e_channel', "value": false, "field": "E-channel/Non-E-channel"},
{"name": 'kategori', "value": false, "field": 'Kategori ' + ((_RequestList.servicefamily_id[0] == 1) ? 'Inquery' : 'Permintaan')},
{"name": 'tidak_lanjut', "value": false, "field": 'Tindak Lanjut'},
{"name": 'team_name', "value": false, "field": "Unit Terkait (Divisi)"},
{"name": 'ticket_status', "value": false, "field": 'Status ' + ((_RequestList.servicefamily_id[0] == 1) ? 'Inquery' : 'Permintaan')},
{"name": 'resolve_date', "value": false, "field": "Tanggal Resolved"},
{"name": 'target_penyelesaian', "value": false, "field": "Target Penyelesaian"},
{"name": 'sla_hari_kerja', "value": false, "field": "Hari SLA"},
]
} else {
this.fieldExport = [
{"name": 'ref', "value": false, "field": "No Ticket CRM"},
{"name": 'createdby_name', "value": false, "field": "Nama User"},
{"name": 'start_date', "value": false, "field": 'Tanggal Telepon'},
{"name": 'caller_name', "value": false, "field": "Nama Nasabah"},
{"name": 'caller_mobile_phone', "value": false, "field": "No Telepon"},
{"name": 'ticket_servicefamiliy_name', "value": false, "field": "Topik"},
{"name": 'deskripsi', "value": false, "field": 'Deskripsi'},
{"name": 'ticket_status', "value": false, "field": 'Status'},
{"name": 'resolve_date', "value": false, "field": "Tanggal Resolved"},
{"name": 'target_penyelesaian', "value": false, "field": "Target Penyelesaian"},
{"name": 'sla_hari_kerja', "value": false, "field": "Hari SLA"},
]
}
this.ModelReportCategoryLogBook =_Model
this.isTicketReportEmpty = true;
this.isTicketReportLoading = false;
......@@ -93,6 +223,10 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
// this.GettingTicketReportDataAPI(this.TicketReportRequest)
}
onChangeFieldReport(i: number, evt: any) {
this.fieldExport[i]['value'] = evt.target.checked;
}
requestAPI() {
this.isDisabledButtonSearch = true;
this.GettingTicketReportDataAPI(this.TicketReportRequest);
......@@ -110,17 +244,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
team_id : this.TicketReportRequest.team_id,
user_id : this.TicketReportRequest.user_id,
})
console.log({
page : this.TicketReportRequest.page,
perpage : this.TicketReportRequest.perpage,
start_date : this.TicketReportRequest.start_date,
end_date : this.TicketReportRequest.end_date,
servicefamily_id : this.TicketReportRequest.servicefamily_id,
servicefamily_name : this.TicketReportRequest.servicefamily_name,
is_export : 'excel',
team_id : this.TicketReportRequest.team_id,
user_id : this.TicketReportRequest.user_id,
})
}
......@@ -157,7 +280,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
this.Subscribtion = this._DashboardService.ReportTicketLogBook(_Request)
.subscribe((result: any) => {
console.log("Report Response nih", result)
this.isDisabledButtonSearch = false;
if(result.values.data.length != 0){
......@@ -176,7 +298,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
this._cRef.detectChanges();
},
(err: HttpErrorResponse) => {
console.log(JSON.stringify(err.error))
//AratakaConfig.Alert.showAlert(err.error.detail,'alert-danger',2000)
this.isDisabledButtonSearch = false;
this.isTicketReportLoading = false
......@@ -193,10 +314,11 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
_Request.end_date = this.endDate;
}
_Request.field_export = this.fieldExport;
AratakaConfig.LoadingPage.showLoading('Please wait.., perparing excel.')
this.Subscribtion = this._DashboardService.downloadFileExcelReportLogBook(_Request)
.subscribe((result: any) => {
console.log("Response Nih", JSON.stringify(result))
//this.downloadFile2(result);
......@@ -222,7 +344,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
AratakaConfig.LoadingPage.hideLoading()
},
(err: HttpErrorResponse) => {
console.log(JSON.stringify(err))
// const b: any = new Blob([err.error.text], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
// const url = window.URL.createObjectURL(b);
// window.open(url);
......
......@@ -17,23 +17,110 @@
<thead>
<tr>
<th>#</th>
<th>Ticket Numb</th>
<th>Title</th>
<th>Created Date</th>
<th>Cust Type</th>
<th>Cust Name</th>
<th>Identity Type</th>
<th>Identity Numb</th>
<th>Mobile Phone 1</th>
<th>Mobile Phone 2</th>
<th>E-mail</th>
<th>Penyebab Pengaduan</th>
<th>Topic</th>
<th>Sub Topic</th>
<th>Description</th>
<th>Status</th>
<th>Resolved</th>
<th>Day Resolve</th>
<!-- <ng-container > -->
<th *ngFor="let data of fieldExportReport; let i = index">
<div class="form-check">
<input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
</div>
</th>
<!-- </ng-container> -->
<!-- <th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Title</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Created Date</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Cust Type</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Cust Name</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Identity Type</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Identity Numb</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Mobile Phone 1</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Mobile Phone 2</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">E-mail</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Penyebab Pengaduan</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Topic</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Sub Topic</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Description</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Status</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Resolved</label>
</div>
</th>
<th>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Day Resolve</label>
</div>
</th> -->
</tr>
</thead>
<!-- [ngStyle]="{'background-color': (i%2 == 0)? '#ccc' : '#fff'}" -->
......@@ -43,9 +130,13 @@
<td>{{((i+1) + ((TicketReportRequest.perpage * TicketReportRequest.page) - TicketReportRequest.perpage))}}.</td>
<td>{{data.ticket_no}}</td>
<td>{{data.ticket_title}}</td>
<td>{{data.ticket_created_time | date: 'dd MMMM yyyy HH:mm:ss'}}</td>
<td>{{data.ticket_created_time | date: 'dd MMMM yyyy HH:mm'}}</td>
<td>team_name</td>
<td>{{data.customer_type}}</td>
<td>{{data.customer_name}}</td>
<td>{{customer_birth_date}}</td>
<td>{{customer_mother_name}}</td>
<td>{{customer_address}}</td>
<td>{{data.customer_type_id}}</td>
<td>{{data.customer_id_number}}</td>
<td>{{data.customer_mobile_phone}}</td>
......@@ -60,7 +151,9 @@
( Defect )
</div>
</td>
<td>{{data.ticket_resolved_date | date: 'dd MMMM yyyy HH:mm:ss'}}</td>
<td>{{data.ticket_resolved_date | date: 'dd MMMM yyyy HH:mm'}}</td>
<td>{{start_date | date: 'dd MMMM yyyy HH:mm'}}</td>
<td>{{resolution_date | date: 'dd MMMM yyyy HH:mm'}}</td>
<td>{{data.ticket_total_days_resolved}}</td>
</tr>
</ng-container>
......
......@@ -7,7 +7,7 @@ import { FormBuilder, FormGroup } from '@angular/forms';
import { DashboardService } from '../../../../shared/serviceproxy/service-proxy.service';
import { ServiceProxyWeb } from '../../../../shared/serviceproxy/service-proxy.service';
import { Router } from '@angular/router';
import { Data, Router } from '@angular/router';
import { ChangeDetectorRef } from '@angular/core';
......@@ -37,15 +37,31 @@ export class AdminDashboardReportComponent implements OnInit {
Count : 0
}
public TicketReportRequest = {
page : 1,
perpage : 10,
user_id : null,
start_date : null,
end_date : null,
servicefamily_id : null
}
fieldExportReport: any[] = [
{name: 'ticket_no', value: false, field: "Ticket No"},
{name: 'ticket_title', value: false, field: "Title"},
{name: 'ticket_created_time', value: false, field: "Created Date"},
{name: 'team_name', value: false, field: "Team Name"},
{name: 'customer_type', value: false, field: "Customer Type"},
{name: 'customer_name', value: false, field: "Customer Name"},
{name: 'customer_birth_date', value: false, field: "Customer Birth Date"},
{name: 'customer_mother_name', value: false, field: "Customer Mother Name"},
{name: 'customer_address', value: false, field: "Customer Address"},
{name: 'customer_type_id', value: false, field: "Identitiy Type"},
{name: 'customer_id_number', value: false, field: "Identity No"},
{name: 'customer_mobile_phone', value: false, field: "Mobile Phone 1"},
{name: 'customer_mobile_phone2', value: false, field: "Mobile Phone 2"},
{name: 'customer_email', value: false, field: "Email"},
{name: 'penyebab_pengaduan', value: false, field: "Penyebab Pengaduan"},
{name: 'ticket_service_name', value: false, field: "Topic"},
{name: 'ticket_servicesubcategory_name', value: false, field: "Sub Topic"},
{name: 'ticket_description', value: false, field: "Description"},
{name: 'ticket_status', value: false, field: "Status"},
{name: 'ticket_resolved_date', value: false, field: "Resolved Date"},
{name: 'start_date', value: false, field: "Start Date"},
{name: 'resolution_date', value: false, field: "Resolution Date"},
{name: 'ticket_total_days_resolved', value: false, field: "Day Resolve"}
]
public TicketReportData = undefined
public ListDataPagingReport = {count : 0}
......@@ -60,6 +76,15 @@ export class AdminDashboardReportComponent implements OnInit {
//String variable for information paging
public PagingDisplay = "";
public TicketReportRequest = {
page : 1,
perpage : 8,
user_id : null,
start_date : null,
end_date : null,
servicefamily_id : null,
field_export: null
}
constructor(injector: Injector,
private _cRef: ChangeDetectorRef,
......@@ -84,6 +109,11 @@ export class AdminDashboardReportComponent implements OnInit {
// this.GettingTicketReportDataAPI(this.TicketReportRequest)
}
onChangeFieldReport(i: number, evt: any) {
console.log(evt.target.checked)
this.fieldExportReport[i]['value'] = evt.target.checked;
}
requestAPI() {
this.GettingTicketReportDataAPI(this.TicketReportRequest)
this.isDisabledButtonSearch = true;
......@@ -101,7 +131,8 @@ export class AdminDashboardReportComponent implements OnInit {
start_date : this.TicketReportRequest.start_date,
end_date : this.TicketReportRequest.end_date,
servicefamily_id : this.ModelReportCategory.ID,
servicefamily_name : this.ModelReportCategory.Name
servicefamily_name : this.ModelReportCategory.Name,
field_export: this.fieldExportReport
})
}
......@@ -163,7 +194,6 @@ export class AdminDashboardReportComponent implements OnInit {
}
GettingExcelForReportDataAPI(_Request){
console.log("Request Ticket Report", JSON.stringify(_Request))
AratakaConfig.LoadingPage.showLoading('Please wait.., perparing excel.')
this.Subscribtion = this._DashboardService.downloadFileExcelReport(_Request)
.subscribe((result: any) => {
......
......@@ -127,7 +127,7 @@ export class AdminDashboardComponent implements OnInit {
//this.GettingMetabaseDataAPI()
var StartD= new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate());
StartD.setMonth(StartD.getMonth() -3)
StartD.setMonth(StartD.getMonth() -6)
var EndD = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate());
......
......@@ -26,6 +26,11 @@
margin-right: 7px;
}
.input-information {
width: 100%;
height: 30px;
}
.custom-minus-date:hover{
background: #D50000;
border: 1px solid #D50000;
......
......@@ -172,7 +172,7 @@
</div>
<div class="modal fade" id="SelectCustomer-MD" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-md" role="document">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<p class="modal-title">
......
<div class="row">
<div class="col-12">
<div class="col-6">
<div class="form-group" *ngIf="CustomerType != ''" >
<label><small>Customer Type <span class="text-danger">*</span></small></label>
<select type="text"
......@@ -132,24 +133,88 @@
class="form-control form-control-sm" style="resize: none" [(ngModel)]="Address"></textarea>
</div>
</div>
<ng-container *ngIf="CustomerType != ''">
<div class="col-4">
<button class="btn btn-sm btn-block btn-danger" style="border-radius: 3px" (click)="CancelClick()"><i class="fas fa-times"></i> Cancel</button>
</div>
<div class="col-4" *ngIf="IsFormDisabled && !isEditCustomerType">
<button class="btn btn-sm btn-block arataka-btn-default" (click)="EditCsutomerData()"><i class="fas fa-user-edit"></i> Edit Customer</button>
<div class="col-6" *ngIf="isTicketHistoryEmpty">
<p><b>Ticket History</b></p>
<p style="font-size:18px;" class="text-muted text-center">
<i class="fas fa-table fa-3x"></i>
<br> Empty Data
</p>
</div>
<div class="col-8" *ngIf="IsFormDisabledCSType && isEditCustomerType">
<button class="btn btn-sm btn-block arataka-btn-default" (click)="EditCsutomerDataSubmit()"><i class="far fa-paper-plane"></i> Save Customer</button>
<div class="col-6" *ngIf="isLoadingTicketHistory">
<p><b>Ticket History</b></p>
<p style="font-size:18px;" class="text-muted text-center">
<i class="fas fa-spinner fa-spin"></i>
Retrieving data
</p>
</div>
<div class="col-4" *ngIf="!IsFormDisabledCSType">
<button class="btn btn-sm btn-block arataka-btn-primary" (click)="SubmitNewCustomer()"><i class="fas fa-plus-circle"></i> Add Customer</button>
<div class="col-6" *ngIf="!isTicketHistoryEmpty && !isLoadingTicketHistory">
<p><b>{{FirstName}} {{LastName}}'s Ticket History</b></p>
<div class="card">
<div class="card-body" style="max-height: 440px;overflow-y: scroll;">
<ng-container *ngFor="let data of listTicketHistory">
<p class="m-1">
<a href="javascript:;" target="_blank" class="text-info">
{{data.ref}}
</a>
</p>
<span *ngIf="data.status == 'rejected'" class='badge badge-pill badge-dark'>REJECTED</span>
<span *ngIf="data.status == 'new'" class='badge badge-pill badge-warning'>NEW</span>
<span *ngIf="data.status == 'resolved'" class='badge badge-pill badge-secondary'>SOLVED</span>
<span *ngIf="data.status == 'closed'" class='badge badge-pill badge-success'>CLOSED</span>
<span *ngIf="data.status == 'escalated_tto'" class='badge badge-pill badge-danger'>ESCALATED TTO</span>
<span *ngIf="data.status == 'escalated_ttr'"class='badge badge-pill badge-danger'>ESCALATED TTR</span>
<span *ngIf="data.status == 'assigned'" class='badge badge-pill badge-primary'>ASSIGNED</span>
<span *ngIf="data.status == 'dispatched'" class='badge badge-pill badge-danger'>DISPATCH</span>
<span *ngIf="data.agent_id == 0" class='badge badge-pill' style="background-color: orange;">Defect</span>
<p class="m-1"><small>{{data.title}}</small></p>
<p class="m-1">
<small>
<b>{{data.start_date | date: 'dd MMMM yyyy HH:mm'}}</b>
</small>
</p>
<hr>
</ng-container>
</div>
</div>
</div>
</div>
<div class="row">
<ng-container *ngIf="CustomerType != ''">
<div class="col-3">
<button class="btn btn-sm btn-block btn-danger" style="border-radius: 3px" (click)="CancelClick()">
<i class="fas fa-times"></i>
Cancel
</button>
</div>
<div class="col-3" *ngIf="IsFormDisabled && !isEditCustomerType">
<button class="btn btn-sm btn-block arataka-btn-default" (click)="EditCsutomerData()">
<i class="fas fa-user-edit"></i>
Edit Customer
</button>
</div>
<div class="col-4" *ngIf="IsFormDisabledCSType && isEditCustomerType">
<button class="btn btn-sm btn-block arataka-btn-default" (click)="EditCsutomerDataSubmit()">
<i class="far fa-paper-plane"></i>
Save Customer
</button>
</div>
<div class="col-3" *ngIf="!IsFormDisabledCSType">
<button class="btn btn-sm btn-block arataka-btn-primary" (click)="SubmitNewCustomer()">
<i class="fas fa-plus-circle"></i>
Add Customer
</button>
</div>
</ng-container>
<ng-container *ngIf="CustomerType == ''">
<div class="col-12">
<p class="text-warning"><small>Note : this Customer doesn't match any Customer Type</small></p>
<button class="btn btn-sm btn-block btn-danger" style="border-radius: 3px" (click)="CancelDosentMatchCustType()"><i class="fas fa-times"></i> Cancel</button>
<button class="btn btn-sm btn-block btn-danger" style="border-radius: 3px" (click)="CancelDosentMatchCustType()">
<i class="fas fa-times"></i>
Cancel
</button>
</div>
</ng-container>
</div>
\ No newline at end of file
......@@ -100,6 +100,10 @@ export class AdminTicketCustomerMdComponent implements OnInit {
type : null
}
listTicketHistory: any[] = [];
isTicketHistoryEmpty: boolean = true;
isLoadingTicketHistory: boolean = false;
constructor(injector: Injector,
private router: Router,
private FormBuilder : FormBuilder,
......@@ -351,6 +355,9 @@ export class AdminTicketCustomerMdComponent implements OnInit {
this.IsFormDisabledCSType = false;
this.IsFormDisabled = true;
}
this.listTicketHistory = [];
this.isTicketHistoryEmpty = true;
this.isLoadingTicketHistory = false;
}
SubmitNewCustomer(){
......@@ -489,9 +496,8 @@ export class AdminTicketCustomerMdComponent implements OnInit {
//API Function ---------------------------------------------------------------------------------------
GettingPersonByMobileNumberListAPI(_Request){
//AratakaConfig.LoadingPage.showLoading('Checking Person by Mobile Number')
console.log(this.MobileNumber)
this._CustomerService.GetPersonByMobileNumber(_Request)
.subscribe((result: any) => {
.subscribe((result: any) => {
if(result != null){
// console.log(JSON.stringify(result))
......@@ -539,6 +545,7 @@ export class AdminTicketCustomerMdComponent implements OnInit {
this.MobileNumber2 = result.values[0].mobile_phone2
this.MothersName = result.values[0].nama_ibu_kandung
this.Address = result.values[0].alamat
this.requestHistoryTicket(result.values[0].id)
AratakaConfig.BootstrapDateCustomPicker({
ID: '#DOBDate',
DateValue: result.values[0].tanggal_lahir,
......@@ -639,7 +646,7 @@ export class AdminTicketCustomerMdComponent implements OnInit {
Format: 'DD-MM-YYYY',
isGet: false,
})
// this.requestHistoryTicket()
this.CustomerID = result.values[0].id;
this.IsFormDisabled = true;
......@@ -749,4 +756,26 @@ export class AdminTicketCustomerMdComponent implements OnInit {
});
}
requestHistoryTicket(caller_id: number) {
this.listTicketHistory = [];
this.isLoadingTicketHistory = true;
this.isTicketHistoryEmpty = false;
this._TicketService.listTicketToCallerID(caller_id)
.subscribe((res: any) => {
console.log(res)
if (res.values.tickets.length > 0) {
this.listTicketHistory = res.values.tickets;
this.isTicketHistoryEmpty = false;
} else {
this.listTicketHistory = [];
this.isTicketHistoryEmpty = true;
}
this.isLoadingTicketHistory = false;
}, (err: HttpErrorResponse) => {
this.listTicketHistory = [];
this.isLoadingTicketHistory = false;
this.isTicketHistoryEmpty = true;
})
}
}
......@@ -60,3 +60,8 @@
.fileEmailLogsDetail:hover{
background: #FFB74D;
}
.input-information {
width: 100%;
height: 30px;
}
{
"APIBASEURL" : "http://localhost:9825/",
"MICROSERVICEURL" : "http://crm.nobubank.com/nobucall-api-log/api/v1/",
"APIBASEURL" : "http://innodev.vnetcloud.com/nobucall-api-v2/",
"MICROSERVICEURL" : "hhttp://innodev.vnetcloud.com/nobu-history-login/api/v1/",
"SITE_NAME" : "Visionet Helpdesk System",
"SITE_LOGO" : "https://i0.wp.com/jogorogo.info/wp-content/uploads/2017/07/logo_visionet.png?fit=879%2C227",
"COMPANY_NAME" : "PT. Visionet Data Internasional",
......
......@@ -207,6 +207,16 @@ export class TicketService {
constructor(private injector: Injector, private http : HttpClient) { }
listTicketToCallerID(idCaller: number) {
const service = this.injector.get(ServiceProxyWeb)
let headers = new HttpHeaders({
'Content-Type': 'application/json',
'Authorization' : 'Bearer '+ service.getUserInformation.values.access_token
});
let options = { headers: headers };
return this.http.get(API_URL +'v3/nobutickets/0/0/'+idCaller+'/0/0/1/300' , options);
}
List(_data) {
const service = this.injector.get(ServiceProxyWeb)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment