DOCUMENT rekapitulasi
This commit is contained in:
@ -427,30 +427,27 @@ const exportToXLSX = (reportMeta: any, e: any) => {
|
||||
worksheet,
|
||||
2,
|
||||
1,
|
||||
`UNIT INDUK : ${
|
||||
reportMeta.uid
|
||||
? reportMeta.uid.name.toUpperCase()
|
||||
: 'Semua Unit Induk Distribusi/Wilayah'.toUpperCase()
|
||||
`UNIT INDUK : ${reportMeta.uid
|
||||
? reportMeta.uid.name.toUpperCase()
|
||||
: 'Semua Unit Induk Distribusi/Wilayah'.toUpperCase()
|
||||
}`
|
||||
)
|
||||
setHeaderStyle(
|
||||
worksheet,
|
||||
3,
|
||||
1,
|
||||
`UNIT PELAKSANA PELAYANAN PELANGGAN : ${
|
||||
reportMeta.up3
|
||||
? reportMeta.up3.name.toUpperCase()
|
||||
: 'Semua Unit Pelaksanaan Pelayanan Pelanggan'.toUpperCase()
|
||||
`UNIT PELAKSANA PELAYANAN PELANGGAN : ${reportMeta.up3
|
||||
? reportMeta.up3.name.toUpperCase()
|
||||
: 'Semua Unit Pelaksanaan Pelayanan Pelanggan'.toUpperCase()
|
||||
}`
|
||||
)
|
||||
setHeaderStyle(
|
||||
worksheet,
|
||||
4,
|
||||
1,
|
||||
`UNIT LAYANAN PELANGGAN : ${
|
||||
reportMeta.ulp
|
||||
? reportMeta.ulp.name.toUpperCase()
|
||||
: 'Semua Unit Layanan Pelanggan'.toUpperCase()
|
||||
`UNIT LAYANAN PELANGGAN : ${reportMeta.ulp
|
||||
? reportMeta.ulp.name.toUpperCase()
|
||||
: 'Semua Unit Layanan Pelanggan'.toUpperCase()
|
||||
}`
|
||||
)
|
||||
|
||||
@ -525,5 +522,10 @@ const exportDetailToXLSX = (reportMeta: any, e: any) => {
|
||||
|
||||
e.cancel = true
|
||||
}
|
||||
|
||||
const exportToDOCX = (reportMeta: any, rawData: any, filename: any, periode: any) => {
|
||||
exportToDOCX(reportMeta, rawData, filename, periode)
|
||||
}
|
||||
const exportDetailToDOCX = (reportMeta: any, rawData: any, filename: any, periode: any) => {
|
||||
exportDetailToDOCX(reportMeta, rawData, filename, periode)
|
||||
}
|
||||
export { exportToPDF, exportToXLSX, exportDetailToPDF, exportDetailToXLSX }
|
||||
|
@ -19,11 +19,9 @@ import { Workbook } from 'exceljs'
|
||||
import { formatWaktu } from '@/components/Form/FiltersType/reference'
|
||||
import { setHeaderStyle } from '@/report/utils/xlsx'
|
||||
import { formatNumber, formatPercentage } from '@/utils/numbers'
|
||||
|
||||
const reportName = 'Rekapitulasi Keluhan Per Tanggal'
|
||||
const fontSize = 5
|
||||
const detailFontSize = 3
|
||||
|
||||
const groupingData = (data: any) => {
|
||||
const groupedData: any = {}
|
||||
|
||||
@ -167,7 +165,7 @@ const formatData = (rawData: any, groupBy: boolean) => {
|
||||
formatNumber(
|
||||
total.total_response_time_rata_rata.length
|
||||
? total.total_response_time_rata_rata.reduce((a: any, b: any) => a + b) /
|
||||
total.total_response_time_rata_rata.length
|
||||
total.total_response_time_rata_rata.length
|
||||
: 0
|
||||
),
|
||||
formatWaktu(Math.max(...total.total_response_time_max)),
|
||||
@ -178,7 +176,7 @@ const formatData = (rawData: any, groupBy: boolean) => {
|
||||
formatNumber(
|
||||
total.total_recovery_time_rata_rata.length
|
||||
? total.total_recovery_time_rata_rata.reduce((a: any, b: any) => a + b) /
|
||||
total.total_recovery_time_rata_rata.length
|
||||
total.total_recovery_time_rata_rata.length
|
||||
: 0
|
||||
),
|
||||
formatWaktu(Math.max(...total.total_recovery_time_max)),
|
||||
@ -256,7 +254,7 @@ const formatData = (rawData: any, groupBy: boolean) => {
|
||||
formatNumber(
|
||||
grandTotal.total_response_time_rata_rata.length
|
||||
? grandTotal.total_response_time_rata_rata.reduce((a: any, b: any) => a + b) /
|
||||
grandTotal.total_response_time_rata_rata.length
|
||||
grandTotal.total_response_time_rata_rata.length
|
||||
: 0
|
||||
),
|
||||
formatWaktu(Math.max(...grandTotal.total_response_time_max)),
|
||||
@ -267,7 +265,7 @@ const formatData = (rawData: any, groupBy: boolean) => {
|
||||
formatNumber(
|
||||
grandTotal.total_recovery_time_rata_rata.length
|
||||
? grandTotal.total_recovery_time_rata_rata.reduce((a: any, b: any) => a + b) /
|
||||
grandTotal.total_recovery_time_rata_rata.length
|
||||
grandTotal.total_recovery_time_rata_rata.length
|
||||
: 0
|
||||
),
|
||||
formatWaktu(Math.max(...grandTotal.total_recovery_time_max)),
|
||||
@ -655,30 +653,27 @@ const exportToXLSX = (reportMeta: any, e: any) => {
|
||||
worksheet,
|
||||
2,
|
||||
1,
|
||||
`UNIT INDUK : ${
|
||||
reportMeta.uid
|
||||
? reportMeta.uid.name.toUpperCase()
|
||||
: 'Semua Unit Induk Distribusi/Wilayah'.toUpperCase()
|
||||
`UNIT INDUK : ${reportMeta.uid
|
||||
? reportMeta.uid.name.toUpperCase()
|
||||
: 'Semua Unit Induk Distribusi/Wilayah'.toUpperCase()
|
||||
}`
|
||||
)
|
||||
setHeaderStyle(
|
||||
worksheet,
|
||||
3,
|
||||
1,
|
||||
`UNIT PELAKSANA PELAYANAN PELANGGAN : ${
|
||||
reportMeta.up3
|
||||
? reportMeta.up3.name.toUpperCase()
|
||||
: 'Semua Unit Pelaksanaan Pelayanan Pelanggan'.toUpperCase()
|
||||
`UNIT PELAKSANA PELAYANAN PELANGGAN : ${reportMeta.up3
|
||||
? reportMeta.up3.name.toUpperCase()
|
||||
: 'Semua Unit Pelaksanaan Pelayanan Pelanggan'.toUpperCase()
|
||||
}`
|
||||
)
|
||||
setHeaderStyle(
|
||||
worksheet,
|
||||
4,
|
||||
1,
|
||||
`UNIT LAYANAN PELANGGAN : ${
|
||||
reportMeta.ulp
|
||||
? reportMeta.ulp.name.toUpperCase()
|
||||
: 'Semua Unit Layanan Pelanggan'.toUpperCase()
|
||||
`UNIT LAYANAN PELANGGAN : ${reportMeta.ulp
|
||||
? reportMeta.ulp.name.toUpperCase()
|
||||
: 'Semua Unit Layanan Pelanggan'.toUpperCase()
|
||||
}`
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user