Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
nobu-web-v2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ari_darmawan
nobu-web-v2
Commits
36673c29
Commit
36673c29
authored
Aug 30, 2022
by
ari_darmawan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
export excel dinamis
parent
5d33b150
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
267 additions
and
161 deletions
+267
-161
admin-dashboard-logboook.component.html
...ashboard-logboook/admin-dashboard-logboook.component.html
+35
-114
admin-dashboard-logboook.component.ts
...-dashboard-logboook/admin-dashboard-logboook.component.ts
+80
-18
admin-dashboard-report.component.html
...in-dashboard-report/admin-dashboard-report.component.html
+110
-17
admin-dashboard-report.component.ts
...dmin-dashboard-report/admin-dashboard-report.component.ts
+42
-12
No files found.
src/app/admin/admin-dashboard/admin-dashboard-logboook/admin-dashboard-logboook.component.html
View file @
36673c29
...
...
@@ -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>
...
...
src/app/admin/admin-dashboard/admin-dashboard-logboook/admin-dashboard-logboook.component.ts
View file @
36673c29
...
...
@@ -47,9 +47,12 @@ 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,76 @@ export class AdminDashboardLogboookComponent implements OnInit, OnChanges {
}
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
.
isTicketReportEmpty
=
true
;
this
.
isTicketReportLoading
=
false
;
...
...
@@ -91,6 +162,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
);
...
...
@@ -108,17 +183,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
,
})
}
...
...
@@ -155,7 +219,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
){
...
...
@@ -174,7 +237,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
...
...
@@ -191,10 +253,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);
...
...
@@ -220,7 +283,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);
...
...
src/app/admin/admin-dashboard/admin-dashboard-report/admin-dashboard-report.component.html
View file @
36673c29
...
...
@@ -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'}" -->
...
...
@@ -44,8 +131,12 @@
<td>
{{data.ticket_no}}
</td>
<td>
{{data.ticket_title}}
</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>
...
...
@@ -61,6 +152,8 @@
</div>
</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>
...
...
src/app/admin/admin-dashboard/admin-dashboard-report/admin-dashboard-report.component.ts
View file @
36673c29
...
...
@@ -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
:
8
,
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
,
...
...
@@ -82,6 +107,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
;
...
...
@@ -99,7 +129,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
})
}
...
...
@@ -161,7 +192,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
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment