Commit 36673c29 authored by ari_darmawan's avatar ari_darmawan

export excel dinamis

parent 5d33b150
...@@ -28,139 +28,60 @@ ...@@ -28,139 +28,60 @@
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Pengaduan Dashboard SD'"> <ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Pengaduan Dashboard SD'">
<tr> <tr>
<th rowspan="2" style="max-width: 15px;">#</th> <th rowspan="2" style="max-width: 15px;">#</th>
<th rowspan="2">No Ticket CRM</th> <th *ngFor="let data of fieldExport; let i = index">
<th rowspan="2">Nama User</th> <div class="form-check">
<th rowspan="2">Assigned Agent</th> <input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<th rowspan="2">Unit Pengaduan (Cabang/ Call Center/ Sociomile Staff)</th> <label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
<th rowspan="2">Tgl Pengaduan</th> </div>
<th rowspan="2">Nama Nasabah</th> </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>
</tr> </tr>
<tr> <!-- <tr>
<th>Nasabah</th> <th>Nasabah</th>
<th>Bank</th> <th>Bank</th>
</tr> </tr> -->
</ng-container> </ng-container>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Permintaan Dashboard SD'"> <ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Permintaan Dashboard SD'">
<tr> <tr>
<th rowspan="2" style="max-width: 15px;">#</th> <th rowspan="2" style="max-width: 15px;">#</th>
<th rowspan="2">No Ticket CRM</th> <th *ngFor="let data of fieldExport; let i = index">
<th rowspan="2">Nama User</th> <div class="form-check">
<th rowspan="2">Assigned Agent</th> <input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<th rowspan="2">Unit Permintaan (Cabang/ Call Center/ Sociomile Staff)</th> <label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
<th rowspan="2">Tgl Permintaan</th> </div>
<th rowspan="2">Nama Nasabah</th> </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>
</tr> </tr>
</ng-container> </ng-container>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Permintaan Dashboard Agent Nobucall'"> <ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Permintaan Dashboard Agent Nobucall'">
<tr> <tr>
<th style="max-width: 15px;">#</th> <th rowspan="2" style="max-width: 15px;">#</th>
<th>No Ticket CRM</th> <th *ngFor="let data of fieldExport; let i = index">
<th>Nama User</th> <div class="form-check">
<th>Tgl Permintaan</th> <input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<th>Nama Nasabah</th> <label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
<th>No Telepon</th> </div>
<th>No Rekening</th> </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>
</tr> </tr>
</ng-container> </ng-container>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Inquiry Call Center & NWB'"> <ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Inquiry Call Center & NWB'">
<tr> <tr>
<th style="max-width: 15px;">#</th> <th rowspan="2" style="max-width: 15px;">#</th>
<th>No Ticket CRM</th> <th *ngFor="let data of fieldExport; let i = index">
<th>Nama User</th> <div class="form-check">
<th>Tgl Inquiry</th> <input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<th>Nama Nasabah</th> <label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
<th>No Telepon</th> </div>
<th>No Rekening</th> </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>
</tr> </tr>
</ng-container> </ng-container>
<ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Telepon terputus Call Center & NWB'"> <ng-container *ngIf="TicketReportRequest.servicefamily_name == 'Telepon terputus Call Center & NWB'">
<tr> <tr>
<th style="max-width: 15px;">#</th> <th rowspan="2" style="max-width: 15px;">#</th>
<th>No Ticket CRM</th> <th *ngFor="let data of fieldExport; let i = index">
<th>Nama User</th> <div class="form-check">
<th>Tgl Telepon</th> <input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<th>Nama Nasabah</th> <label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
<th>No Telepon</th> </div>
<th>Topik</th> </th>
<th>Deskripsi</th>
<th>Status</th>
<th>Tanggal Closed</th>
<th>Target Penyelesaian</th>
<th>Hari SLA</th>
</tr> </tr>
</ng-container> </ng-container>
</thead> </thead>
......
...@@ -47,8 +47,11 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges { ...@@ -47,8 +47,11 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
servicefamily_name : null, servicefamily_name : null,
is_export : null, is_export : null,
team_id : null, team_id : null,
user_id : null user_id : null,
field_export: []
} }
fieldExport: any[] = [];
public TicketReportData = undefined public TicketReportData = undefined
public ListDataPagingReport = {count : 0} public ListDataPagingReport = {count : 0}
...@@ -75,7 +78,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges { ...@@ -75,7 +78,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
ngOnInit() { ngOnInit() {
console.log(JSON.stringify(this._SP.getUserInformation.values.user_id))
} }
ngOnChanges(changes: SimpleChanges) { ngOnChanges(changes: SimpleChanges) {
...@@ -83,7 +85,76 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges { ...@@ -83,7 +85,76 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
} }
ngOnInitAfter(_RequestList, _Model){ ngOnInitAfter(_RequestList, _Model){
this.TicketReportRequest =_RequestList this.TicketReportRequest =_RequestList;
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.ModelReportCategoryLogBook =_Model
this.isTicketReportEmpty = true; this.isTicketReportEmpty = true;
this.isTicketReportLoading = false; this.isTicketReportLoading = false;
...@@ -91,6 +162,10 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges { ...@@ -91,6 +162,10 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
// this.GettingTicketReportDataAPI(this.TicketReportRequest) // this.GettingTicketReportDataAPI(this.TicketReportRequest)
} }
onChangeFieldReport(i: number, evt: any) {
this.fieldExport[i]['value'] = evt.target.checked;
}
requestAPI() { requestAPI() {
this.isDisabledButtonSearch = true; this.isDisabledButtonSearch = true;
this.GettingTicketReportDataAPI(this.TicketReportRequest); this.GettingTicketReportDataAPI(this.TicketReportRequest);
...@@ -108,17 +183,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges { ...@@ -108,17 +183,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
team_id : this.TicketReportRequest.team_id, team_id : this.TicketReportRequest.team_id,
user_id : this.TicketReportRequest.user_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,
})
} }
...@@ -155,7 +219,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges { ...@@ -155,7 +219,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
this.Subscribtion = this._DashboardService.ReportTicketLogBook(_Request) this.Subscribtion = this._DashboardService.ReportTicketLogBook(_Request)
.subscribe((result: any) => { .subscribe((result: any) => {
console.log("Report Response nih", result)
this.isDisabledButtonSearch = false; this.isDisabledButtonSearch = false;
if(result.values.data.length != 0){ if(result.values.data.length != 0){
...@@ -174,7 +237,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges { ...@@ -174,7 +237,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
this._cRef.detectChanges(); this._cRef.detectChanges();
}, },
(err: HttpErrorResponse) => { (err: HttpErrorResponse) => {
console.log(JSON.stringify(err.error))
//AratakaConfig.Alert.showAlert(err.error.detail,'alert-danger',2000) //AratakaConfig.Alert.showAlert(err.error.detail,'alert-danger',2000)
this.isDisabledButtonSearch = false; this.isDisabledButtonSearch = false;
this.isTicketReportLoading = false this.isTicketReportLoading = false
...@@ -191,10 +253,11 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges { ...@@ -191,10 +253,11 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
_Request.end_date = this.endDate; _Request.end_date = this.endDate;
} }
_Request.field_export = this.fieldExport;
AratakaConfig.LoadingPage.showLoading('Please wait.., perparing excel.') AratakaConfig.LoadingPage.showLoading('Please wait.., perparing excel.')
this.Subscribtion = this._DashboardService.downloadFileExcelReportLogBook(_Request) this.Subscribtion = this._DashboardService.downloadFileExcelReportLogBook(_Request)
.subscribe((result: any) => { .subscribe((result: any) => {
console.log("Response Nih", JSON.stringify(result))
//this.downloadFile2(result); //this.downloadFile2(result);
...@@ -220,7 +283,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges { ...@@ -220,7 +283,6 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
AratakaConfig.LoadingPage.hideLoading() AratakaConfig.LoadingPage.hideLoading()
}, },
(err: HttpErrorResponse) => { (err: HttpErrorResponse) => {
console.log(JSON.stringify(err))
// const b: any = new Blob([err.error.text], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); // const b: any = new Blob([err.error.text], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
// const url = window.URL.createObjectURL(b); // const url = window.URL.createObjectURL(b);
// window.open(url); // window.open(url);
......
...@@ -17,23 +17,110 @@ ...@@ -17,23 +17,110 @@
<thead> <thead>
<tr> <tr>
<th>#</th> <th>#</th>
<th>Ticket Numb</th> <!-- <ng-container > -->
<th>Title</th> <th *ngFor="let data of fieldExportReport; let i = index">
<th>Created Date</th> <div class="form-check">
<th>Cust Type</th> <input type="checkbox" class="form-check-input" [checked]="data['value']" id="exampleCheck1" (change)="onChangeFieldReport(i, $event)">
<th>Cust Name</th> <label class="form-check-label" for="exampleCheck1">{{data['field']}}</label>
<th>Identity Type</th> </div>
<th>Identity Numb</th> </th>
<th>Mobile Phone 1</th> <!-- </ng-container> -->
<th>Mobile Phone 2</th> <!-- <th>
<th>E-mail</th> <div class="form-check">
<th>Penyebab Pengaduan</th> <input type="checkbox" class="form-check-input" id="exampleCheck1">
<th>Topic</th> <label class="form-check-label" for="exampleCheck1">Title</label>
<th>Sub Topic</th> </div>
<th>Description</th> </th>
<th>Status</th> <th>
<th>Resolved</th> <div class="form-check">
<th>Day Resolve</th> <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> </tr>
</thead> </thead>
<!-- [ngStyle]="{'background-color': (i%2 == 0)? '#ccc' : '#fff'}" --> <!-- [ngStyle]="{'background-color': (i%2 == 0)? '#ccc' : '#fff'}" -->
...@@ -44,8 +131,12 @@ ...@@ -44,8 +131,12 @@
<td>{{data.ticket_no}}</td> <td>{{data.ticket_no}}</td>
<td>{{data.ticket_title}}</td> <td>{{data.ticket_title}}</td>
<td>{{data.ticket_created_time | date: 'dd MMMM yyyy HH:mm'}}</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_type}}</td>
<td>{{data.customer_name}}</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_type_id}}</td>
<td>{{data.customer_id_number}}</td> <td>{{data.customer_id_number}}</td>
<td>{{data.customer_mobile_phone}}</td> <td>{{data.customer_mobile_phone}}</td>
...@@ -61,6 +152,8 @@ ...@@ -61,6 +152,8 @@
</div> </div>
</td> </td>
<td>{{data.ticket_resolved_date | date: 'dd MMMM yyyy HH:mm'}}</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> <td>{{data.ticket_total_days_resolved}}</td>
</tr> </tr>
</ng-container> </ng-container>
......
...@@ -7,7 +7,7 @@ import { FormBuilder, FormGroup } from '@angular/forms'; ...@@ -7,7 +7,7 @@ import { FormBuilder, FormGroup } from '@angular/forms';
import { DashboardService } from '../../../../shared/serviceproxy/service-proxy.service'; import { DashboardService } from '../../../../shared/serviceproxy/service-proxy.service';
import { ServiceProxyWeb } 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'; import { ChangeDetectorRef } from '@angular/core';
...@@ -37,15 +37,31 @@ export class AdminDashboardReportComponent implements OnInit { ...@@ -37,15 +37,31 @@ export class AdminDashboardReportComponent implements OnInit {
Count : 0 Count : 0
} }
fieldExportReport: any[] = [
public TicketReportRequest = { {name: 'ticket_no', value: false, field: "Ticket No"},
page : 1, {name: 'ticket_title', value: false, field: "Title"},
perpage : 8, {name: 'ticket_created_time', value: false, field: "Created Date"},
user_id : null, {name: 'team_name', value: false, field: "Team Name"},
start_date : null, {name: 'customer_type', value: false, field: "Customer Type"},
end_date : null, {name: 'customer_name', value: false, field: "Customer Name"},
servicefamily_id : null {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 TicketReportData = undefined
public ListDataPagingReport = {count : 0} public ListDataPagingReport = {count : 0}
...@@ -60,6 +76,15 @@ export class AdminDashboardReportComponent implements OnInit { ...@@ -60,6 +76,15 @@ export class AdminDashboardReportComponent implements OnInit {
//String variable for information paging //String variable for information paging
public PagingDisplay = ""; 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, constructor(injector: Injector,
private _cRef: ChangeDetectorRef, private _cRef: ChangeDetectorRef,
...@@ -82,6 +107,11 @@ export class AdminDashboardReportComponent implements OnInit { ...@@ -82,6 +107,11 @@ export class AdminDashboardReportComponent implements OnInit {
// this.GettingTicketReportDataAPI(this.TicketReportRequest) // this.GettingTicketReportDataAPI(this.TicketReportRequest)
} }
onChangeFieldReport(i: number, evt: any) {
console.log(evt.target.checked)
this.fieldExportReport[i]['value'] = evt.target.checked;
}
requestAPI() { requestAPI() {
this.GettingTicketReportDataAPI(this.TicketReportRequest) this.GettingTicketReportDataAPI(this.TicketReportRequest)
this.isDisabledButtonSearch = true; this.isDisabledButtonSearch = true;
...@@ -99,7 +129,8 @@ export class AdminDashboardReportComponent implements OnInit { ...@@ -99,7 +129,8 @@ export class AdminDashboardReportComponent implements OnInit {
start_date : this.TicketReportRequest.start_date, start_date : this.TicketReportRequest.start_date,
end_date : this.TicketReportRequest.end_date, end_date : this.TicketReportRequest.end_date,
servicefamily_id : this.ModelReportCategory.ID, servicefamily_id : this.ModelReportCategory.ID,
servicefamily_name : this.ModelReportCategory.Name servicefamily_name : this.ModelReportCategory.Name,
field_export: this.fieldExportReport
}) })
} }
...@@ -161,7 +192,6 @@ export class AdminDashboardReportComponent implements OnInit { ...@@ -161,7 +192,6 @@ export class AdminDashboardReportComponent implements OnInit {
} }
GettingExcelForReportDataAPI(_Request){ GettingExcelForReportDataAPI(_Request){
console.log("Request Ticket Report", JSON.stringify(_Request))
AratakaConfig.LoadingPage.showLoading('Please wait.., perparing excel.') AratakaConfig.LoadingPage.showLoading('Please wait.., perparing excel.')
this.Subscribtion = this._DashboardService.downloadFileExcelReport(_Request) this.Subscribtion = this._DashboardService.downloadFileExcelReport(_Request)
.subscribe((result: any) => { .subscribe((result: any) => {
......
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