Commit aecb87d4 authored by ari_darmawan's avatar ari_darmawan

behavior export field dinamis

parent 36673c29
......@@ -239,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>
......@@ -410,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>
......
......@@ -86,7 +86,66 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
ngOnInitAfter(_RequestList, _Model){
this.TicketReportRequest =_RequestList;
if (_RequestList.servicefamily_id[0] == 2 || _RequestList.servicefamily_id[0] == 4) {
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"},
......
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