fix: export in rekapitulasi gangguan alll
This commit is contained in:
parent
4943cbec09
commit
80a0510f6e
@ -2,6 +2,6 @@ VITE_BASE_URL=http://localhost:5173
|
||||
VITE_BASE_DIRECTORY=/
|
||||
VITE_APP_VERSION=0.0.1
|
||||
VITE_APP_NAME='Executive Information System'
|
||||
VITE_APP_GRAPHQL_ENDPOINT=http://10.8.0.13:32169/graphql
|
||||
# VITE_APP_GRAPHQL_ENDPOINT=http://10.1.50.173:32180/graphql
|
||||
# VITE_APP_GRAPHQL_ENDPOINT=http://10.8.0.13:32169/graphql
|
||||
VITE_APP_GRAPHQL_ENDPOINT=http://10.1.50.173:32180/graphql
|
||||
VITE_APP_REST_ENDPOINT=http://10.1.50.173:32181
|
@ -3715,16 +3715,6 @@ body {
|
||||
color: rgb(102 102 0 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-slate-300 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(203 213 225 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-slate-500 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(100 116 139 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-opacity-40 {
|
||||
--tw-text-opacity: 0.4;
|
||||
}
|
||||
@ -3733,10 +3723,6 @@ body {
|
||||
text-decoration-line: underline;
|
||||
}
|
||||
|
||||
.no-underline {
|
||||
text-decoration-line: none;
|
||||
}
|
||||
|
||||
.placeholder-gray-500::-moz-placeholder {
|
||||
--tw-placeholder-opacity: 1;
|
||||
color: rgb(107 114 128 / var(--tw-placeholder-opacity));
|
||||
@ -5266,11 +5252,6 @@ body {
|
||||
color: rgb(51 51 0 / 0.9);
|
||||
}
|
||||
|
||||
:is(.dark .dark\:text-slate-500) {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(100 116 139 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
:is(.dark .dark\:text-opacity-70) {
|
||||
--tw-text-opacity: 0.7;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,17 +1,4 @@
|
||||
import { exportDataGrid as exportToExcel } from 'devextreme/excel_exporter'
|
||||
import {
|
||||
Document,
|
||||
AlignmentType,
|
||||
Packer,
|
||||
Paragraph,
|
||||
Table,
|
||||
TableCell,
|
||||
TableRow,
|
||||
VerticalAlign,
|
||||
TextRun,
|
||||
WidthType,
|
||||
PageOrientation
|
||||
} from 'docx'
|
||||
import { saveAs } from 'file-saver'
|
||||
import { jsPDF } from 'jspdf'
|
||||
import autoTable from 'jspdf-autotable'
|
||||
@ -25,247 +12,172 @@ const reportName = 'Rekapitulasi Gangguan All'
|
||||
const fontSize = 5
|
||||
const detailFontSize = 3
|
||||
|
||||
const groupingData = (data: any) => {
|
||||
const groupedData: any = {}
|
||||
|
||||
data.forEach((item: any) => {
|
||||
const { nama_regional, nama_uid } = item
|
||||
|
||||
if (!groupedData[nama_regional]) {
|
||||
groupedData[nama_regional] = {}
|
||||
}
|
||||
|
||||
if (!groupedData[nama_regional][nama_uid]) {
|
||||
groupedData[nama_regional][nama_uid] = { data: [] }
|
||||
}
|
||||
|
||||
groupedData[nama_regional][nama_uid].data.push(item)
|
||||
})
|
||||
|
||||
for (const regional in groupedData) {
|
||||
for (const uid in groupedData[regional]) {
|
||||
const data = groupedData[regional][uid].data
|
||||
|
||||
data.forEach((item: any) => {
|
||||
if (!groupedData[regional][uid].summary) {
|
||||
groupedData[regional][uid].summary = {
|
||||
total: 0,
|
||||
total_selesai: 0,
|
||||
total_inproses: 0,
|
||||
avg_durasi_dispatch: [],
|
||||
max_durasi_dispatch: 0,
|
||||
min_durasi_dispatch: item.min_durasi_dispatch,
|
||||
total_diatas_sla_dispatch: 0,
|
||||
total_dibawah_sla_dispatch: 0,
|
||||
avg_durasi_response: [],
|
||||
max_durasi_response: 0,
|
||||
min_durasi_response: item.min_durasi_response,
|
||||
total_diatas_sla_response: 0,
|
||||
total_dibawah_sla_response: 0,
|
||||
avg_durasi_recovery: [],
|
||||
max_durasi_recovery: 0,
|
||||
min_durasi_recovery: item.min_durasi_recovery,
|
||||
total_diatas_sla_recovery: 0,
|
||||
total_dibawah_sla_recovery: 0
|
||||
}
|
||||
}
|
||||
|
||||
groupedData[regional][uid].summary.total += item.total
|
||||
groupedData[regional][uid].summary.total_selesai += item.total_selesai
|
||||
groupedData[regional][uid].summary.total_inproses += item.total_inproses
|
||||
groupedData[regional][uid].summary.avg_durasi_dispatch.push(item.avg_durasi_dispatch)
|
||||
groupedData[regional][uid].summary.max_durasi_dispatch =
|
||||
groupedData[regional][uid].summary.max_durasi_dispatch < item.max_durasi_dispatch
|
||||
? item.max_durasi_dispatch
|
||||
: groupedData[regional][uid].summary.max_durasi_dispatch
|
||||
groupedData[regional][uid].summary.min_durasi_dispatch =
|
||||
groupedData[regional][uid].summary.min_durasi_dispatch > item.min_durasi_dispatch
|
||||
? item.min_durasi_dispatch
|
||||
: groupedData[regional][uid].summary.min_durasi_dispatch
|
||||
groupedData[regional][uid].summary.total_diatas_sla_dispatch +=
|
||||
item.total_diatas_sla_dispatch
|
||||
groupedData[regional][uid].summary.total_dibawah_sla_dispatch +=
|
||||
item.total_dibawah_sla_dispatch
|
||||
groupedData[regional][uid].summary.avg_durasi_response.push(item.avg_durasi_response)
|
||||
groupedData[regional][uid].summary.max_durasi_response =
|
||||
groupedData[regional][uid].summary.max_durasi_response < item.max_durasi_response
|
||||
? item.max_durasi_response
|
||||
: groupedData[regional][uid].summary.max_durasi_response
|
||||
groupedData[regional][uid].summary.min_durasi_response =
|
||||
groupedData[regional][uid].summary.min_durasi_response > item.min_durasi_response
|
||||
? item.min_durasi_response
|
||||
: groupedData[regional][uid].summary.min_durasi_response
|
||||
groupedData[regional][uid].summary.total_diatas_sla_response +=
|
||||
item.total_diatas_sla_response
|
||||
groupedData[regional][uid].summary.total_dibawah_sla_response +=
|
||||
item.total_dibawah_sla_response
|
||||
groupedData[regional][uid].summary.avg_durasi_recovery.push(item.avg_durasi_recovery)
|
||||
groupedData[regional][uid].summary.max_durasi_recovery =
|
||||
groupedData[regional][uid].summary.max_durasi_recovery < item.max_durasi_recovery
|
||||
? item.max_durasi_recovery
|
||||
: groupedData[regional][uid].summary.max_durasi_recovery
|
||||
groupedData[regional][uid].summary.min_durasi_recovery =
|
||||
groupedData[regional][uid].summary.min_durasi_recovery > item.min_durasi_recovery
|
||||
? item.min_durasi_recovery
|
||||
: groupedData[regional][uid].summary.min_durasi_recovery
|
||||
groupedData[regional][uid].summary.total_diatas_sla_recovery +=
|
||||
item.total_diatas_sla_recovery
|
||||
groupedData[regional][uid].summary.total_dibawah_sla_recovery +=
|
||||
item.total_dibawah_sla_recovery
|
||||
})
|
||||
const getGroupParent = (reportMeta: any) => {
|
||||
if (reportMeta.posko.id != 0) {
|
||||
return {
|
||||
parent: reportMeta.up3.name,
|
||||
summaryName: reportMeta.posko.name,
|
||||
summaryKey: 'nama_posko'
|
||||
}
|
||||
}
|
||||
|
||||
return groupedData
|
||||
if (reportMeta.up3.id != 0) {
|
||||
return {
|
||||
parent: reportMeta.uid.name,
|
||||
summaryName: reportMeta.up3.name,
|
||||
summaryKey: 'nama_up3'
|
||||
}
|
||||
}
|
||||
|
||||
if (reportMeta.uid.id != 0) {
|
||||
return {
|
||||
parent: 'regional',
|
||||
summaryName: reportMeta.uid.name,
|
||||
summaryKey: 'nama_uid'
|
||||
}
|
||||
}
|
||||
|
||||
return ''
|
||||
}
|
||||
|
||||
const formatData = (rawData: any) => {
|
||||
const data = groupingData(rawData)
|
||||
const groupingData = (data: any, reportMeta: any) => {
|
||||
const groupedData: any = {}
|
||||
const groupParent = getGroupParent(reportMeta)
|
||||
|
||||
if (groupParent === '') {
|
||||
return {
|
||||
data,
|
||||
parent: '',
|
||||
summaryName: ''
|
||||
}
|
||||
}
|
||||
|
||||
data.forEach((item: any) => {
|
||||
const group = item[groupParent.summaryKey]
|
||||
|
||||
if (!groupedData[group]) {
|
||||
groupedData[group] = []
|
||||
}
|
||||
|
||||
groupedData[group].push(item)
|
||||
})
|
||||
|
||||
return {
|
||||
data: groupedData,
|
||||
parent: groupParent.parent,
|
||||
summaryName: groupParent.summaryName
|
||||
}
|
||||
}
|
||||
|
||||
const formatData = (rawData: any, reportMeta: any) => {
|
||||
const tempData = groupingData(rawData, reportMeta)
|
||||
const data = tempData.data[tempData.summaryName] || tempData.data
|
||||
console.log(tempData.data)
|
||||
const formattedData: any = []
|
||||
|
||||
for (const regional in data) {
|
||||
let no = 1
|
||||
const total: any = {
|
||||
total: 0,
|
||||
total_selesai: 0,
|
||||
persen_selesai: 0,
|
||||
total_inproses: 0,
|
||||
persen_inproses: 0,
|
||||
avg_durasi_dispatch: [],
|
||||
max_durasi_dispatch: [],
|
||||
min_durasi_dispatch: [],
|
||||
total_diatas_sla_dispatch: 0,
|
||||
total_dibawah_sla_dispatch: 0,
|
||||
avg_durasi_response: [],
|
||||
max_durasi_response: [],
|
||||
min_durasi_response: [],
|
||||
total_diatas_sla_response: 0,
|
||||
total_dibawah_sla_response: 0,
|
||||
avg_durasi_recovery: [],
|
||||
max_durasi_recovery: [],
|
||||
min_durasi_recovery: [],
|
||||
total_diatas_sla_recovery: 0,
|
||||
total_dibawah_sla_recovery: 0
|
||||
}
|
||||
let parentName = ''
|
||||
let summaryName = tempData.summaryName ? tempData.summaryName : 'Seluruh Unit'
|
||||
|
||||
formattedData.push([{ content: regional, colSpan: 22, styles: { fontStyle: 'bold' } }])
|
||||
|
||||
for (const uid in data[regional]) {
|
||||
const summary = data[regional][uid].summary
|
||||
const avgDurasiDispatch = summary.avg_durasi_dispatch.length
|
||||
? summary.avg_durasi_dispatch.reduce((a: any, b: any) => a + b) /
|
||||
summary.avg_durasi_dispatch.length
|
||||
: 0
|
||||
const avgDurasiResponse = summary.avg_durasi_response.length
|
||||
? summary.avg_durasi_response.reduce((a: any, b: any) => a + b) /
|
||||
summary.avg_durasi_response.length
|
||||
: 0
|
||||
const avgDurasiRecovery = summary.avg_durasi_recovery.length
|
||||
? summary.avg_durasi_recovery.reduce((a: any, b: any) => a + b) /
|
||||
summary.avg_durasi_recovery.length
|
||||
: 0
|
||||
|
||||
formattedData.push([
|
||||
{ content: no++, styles: { halign: 'right' } },
|
||||
uid,
|
||||
formatNumber(summary.total),
|
||||
formatNumber(summary.total_selesai),
|
||||
summary.total_selesai != summary.total
|
||||
? formatPercentage((summary.total_selesai / summary.total) * 100)
|
||||
: '100%',
|
||||
formatNumber(summary.total_inproses),
|
||||
formatPercentage(
|
||||
!summary.total_inproses || !summary.total
|
||||
? '0%'
|
||||
: (summary.total_inproses / summary.total) * 100
|
||||
),
|
||||
formatNumber(avgDurasiDispatch),
|
||||
formatWaktu(summary.max_durasi_dispatch),
|
||||
formatWaktu(summary.min_durasi_dispatch),
|
||||
formatNumber(summary.total_diatas_sla_dispatch),
|
||||
formatNumber(summary.total_dibawah_sla_dispatch),
|
||||
formatNumber(avgDurasiResponse),
|
||||
formatWaktu(summary.max_durasi_response),
|
||||
formatWaktu(summary.min_durasi_response),
|
||||
formatNumber(summary.total_diatas_sla_response),
|
||||
formatNumber(summary.total_dibawah_sla_response),
|
||||
formatNumber(avgDurasiRecovery),
|
||||
formatWaktu(summary.max_durasi_recovery),
|
||||
formatWaktu(summary.min_durasi_recovery),
|
||||
formatNumber(summary.total_diatas_sla_recovery),
|
||||
formatNumber(summary.total_dibawah_sla_recovery)
|
||||
])
|
||||
|
||||
total.total += summary.total
|
||||
total.total_selesai += summary.total_selesai
|
||||
total.total_inproses += summary.total_inproses
|
||||
total.avg_durasi_dispatch.push(avgDurasiDispatch)
|
||||
|
||||
total.max_durasi_dispatch.push(summary.max_durasi_dispatch)
|
||||
total.min_durasi_dispatch.push(summary.min_durasi_dispatch)
|
||||
|
||||
total.total_diatas_sla_dispatch += summary.total_diatas_sla_dispatch
|
||||
total.total_dibawah_sla_dispatch += summary.total_dibawah_sla_dispatch
|
||||
total.avg_durasi_response.push(avgDurasiResponse)
|
||||
|
||||
total.max_durasi_response.push(summary.max_durasi_response)
|
||||
total.min_durasi_response.push(summary.min_durasi_response)
|
||||
|
||||
total.total_diatas_sla_response += summary.total_diatas_sla_response
|
||||
total.total_dibawah_sla_response += summary.total_dibawah_sla_response
|
||||
total.avg_durasi_recovery.push(avgDurasiRecovery)
|
||||
|
||||
total.max_durasi_recovery.push(summary.max_durasi_recovery)
|
||||
total.min_durasi_recovery.push(summary.min_durasi_recovery)
|
||||
|
||||
total.total_diatas_sla_recovery += summary.total_diatas_sla_recovery
|
||||
total.total_dibawah_sla_recovery += summary.total_dibawah_sla_recovery
|
||||
}
|
||||
|
||||
formattedData.push([
|
||||
{ content: 'TOTAL', colSpan: 2, styles: { fontStyle: 'bold' } },
|
||||
formatNumber(total.total),
|
||||
formatNumber(total.total_selesai),
|
||||
formatPercentage(
|
||||
!total.total_selesai || !total.total ? '0%' : (total.total_selesai / total.total) * 100
|
||||
),
|
||||
formatNumber(total.total_inproses),
|
||||
formatPercentage(
|
||||
!total.total_inproses || !total.total ? '0%' : (total.total_inproses / total.total) * 100
|
||||
),
|
||||
formatNumber(
|
||||
total.avg_durasi_dispatch.length
|
||||
? total.avg_durasi_dispatch.reduce((a: any, b: any) => a + b) /
|
||||
total.avg_durasi_dispatch.length
|
||||
: 0
|
||||
),
|
||||
formatWaktu(Math.max(...total.max_durasi_dispatch)),
|
||||
formatWaktu(Math.min(...total.min_durasi_dispatch)),
|
||||
formatNumber(total.total_diatas_sla_dispatch),
|
||||
formatNumber(total.total_dibawah_sla_dispatch),
|
||||
formatNumber(
|
||||
total.avg_durasi_response.length
|
||||
? total.avg_durasi_response.reduce((a: any, b: any) => a + b) /
|
||||
total.avg_durasi_response.length
|
||||
: 0
|
||||
),
|
||||
formatWaktu(Math.max(...total.max_durasi_response)),
|
||||
formatWaktu(Math.min(...total.min_durasi_response)),
|
||||
formatNumber(total.total_diatas_sla_response),
|
||||
formatNumber(total.total_dibawah_sla_response),
|
||||
formatNumber(
|
||||
total.avg_durasi_recovery.length
|
||||
? total.avg_durasi_recovery.reduce((a: any, b: any) => a + b) /
|
||||
total.avg_durasi_recovery.length
|
||||
: 0
|
||||
),
|
||||
formatWaktu(Math.max(...total.max_durasi_recovery)),
|
||||
formatWaktu(Math.min(...total.min_durasi_recovery)),
|
||||
formatNumber(total.total_diatas_sla_recovery),
|
||||
formatNumber(total.total_dibawah_sla_recovery)
|
||||
])
|
||||
if (tempData.parent === '') {
|
||||
parentName = 'Seluruh Unit'
|
||||
} else if (tempData.parent === 'regional') {
|
||||
parentName = tempData.data[tempData.summaryName][0].nama_regional
|
||||
} else {
|
||||
parentName = tempData.parent
|
||||
}
|
||||
|
||||
const total: any = {
|
||||
total: 0,
|
||||
total_selesai: 0,
|
||||
// persen_selesai: 0,
|
||||
total_inproses: 0,
|
||||
// persen_inproses: 0,
|
||||
avg_durasi_dispatch: [],
|
||||
max_durasi_dispatch: [],
|
||||
min_durasi_dispatch: [],
|
||||
total_diatas_sla_dispatch: 0,
|
||||
total_dibawah_sla_dispatch: 0,
|
||||
avg_durasi_response: [],
|
||||
max_durasi_response: [],
|
||||
min_durasi_response: [],
|
||||
total_diatas_sla_response: 0,
|
||||
total_dibawah_sla_response: 0,
|
||||
avg_durasi_recovery: [],
|
||||
max_durasi_recovery: [],
|
||||
min_durasi_recovery: [],
|
||||
total_diatas_sla_recovery: 0,
|
||||
total_dibawah_sla_recovery: 0
|
||||
}
|
||||
|
||||
data.forEach((item: any) => {
|
||||
total.total += item.total
|
||||
total.total_selesai += item.total_selesai
|
||||
total.total_inproses += item.total_inproses
|
||||
total.avg_durasi_dispatch.push(item.avg_durasi_dispatch)
|
||||
total.max_durasi_dispatch.push(item.max_durasi_dispatch)
|
||||
total.min_durasi_dispatch.push(item.min_durasi_dispatch)
|
||||
total.total_diatas_sla_dispatch += item.total_diatas_sla_dispatch
|
||||
total.total_dibawah_sla_dispatch += item.total_dibawah_sla_dispatch
|
||||
total.avg_durasi_response.push(item.avg_durasi_response)
|
||||
total.max_durasi_response.push(item.max_durasi_response)
|
||||
total.min_durasi_response.push(item.min_durasi_response)
|
||||
total.total_diatas_sla_response += item.total_diatas_sla_response
|
||||
total.total_dibawah_sla_response += item.total_dibawah_sla_response
|
||||
total.avg_durasi_recovery.push(item.avg_durasi_recovery)
|
||||
total.max_durasi_recovery.push(item.max_durasi_recovery)
|
||||
total.min_durasi_recovery.push(item.min_durasi_recovery)
|
||||
total.total_diatas_sla_recovery += item.total_diatas_sla_recovery
|
||||
total.total_dibawah_sla_recovery += item.total_dibawah_sla_recovery
|
||||
})
|
||||
|
||||
const persenSelesai =
|
||||
total.total_selesai != total.total ? (total.total_selesai / total.total) * 100 : 100
|
||||
const persenInproses =
|
||||
total.total_inproses != total.total ? (total.total_inproses / total.total) * 100 : 100
|
||||
|
||||
formattedData.push([{ content: parentName, colSpan: 22, styles: { fontStyle: 'bold' } }])
|
||||
|
||||
const result = [
|
||||
formatNumber(total.total),
|
||||
formatNumber(total.total_selesai),
|
||||
formatPercentage(persenSelesai),
|
||||
formatNumber(total.total_inproses),
|
||||
formatPercentage(persenInproses),
|
||||
formatNumber(
|
||||
total.avg_durasi_dispatch.length
|
||||
? total.avg_durasi_dispatch.reduce((a: any, b: any) => a + b) /
|
||||
total.avg_durasi_dispatch.length
|
||||
: 0
|
||||
),
|
||||
formatWaktu(Math.max(...total.max_durasi_dispatch)),
|
||||
formatWaktu(Math.min(...total.min_durasi_dispatch)),
|
||||
formatNumber(total.total_diatas_sla_dispatch),
|
||||
formatNumber(total.total_dibawah_sla_dispatch),
|
||||
formatNumber(
|
||||
total.avg_durasi_response.length
|
||||
? total.avg_durasi_response.reduce((a: any, b: any) => a + b) /
|
||||
total.avg_durasi_response.length
|
||||
: 0
|
||||
),
|
||||
formatWaktu(Math.max(...total.max_durasi_response)),
|
||||
formatWaktu(Math.min(...total.min_durasi_response)),
|
||||
formatNumber(total.total_diatas_sla_response),
|
||||
formatNumber(total.total_dibawah_sla_response),
|
||||
formatNumber(
|
||||
total.avg_durasi_recovery.length
|
||||
? total.avg_durasi_recovery.reduce((a: any, b: any) => a + b) /
|
||||
total.avg_durasi_recovery.length
|
||||
: 0
|
||||
),
|
||||
formatWaktu(Math.max(...total.max_durasi_recovery)),
|
||||
formatWaktu(Math.min(...total.min_durasi_recovery)),
|
||||
formatNumber(total.total_diatas_sla_recovery),
|
||||
formatNumber(total.total_dibawah_sla_recovery)
|
||||
]
|
||||
|
||||
formattedData.push(['1', summaryName, ...result])
|
||||
formattedData.push([{ content: 'TOTAL', colSpan: 2, styles: { fontStyle: 'bold' } }, ...result])
|
||||
|
||||
return formattedData
|
||||
}
|
||||
|
||||
@ -295,7 +207,7 @@ const formatMetaData = (reportMeta: any) => {
|
||||
}
|
||||
|
||||
const exportToPDF = (reportMeta: any, rawData: any, preview: boolean = false) => {
|
||||
const data = formatData(rawData)
|
||||
const data = formatData(rawData, reportMeta)
|
||||
const meta = formatMetaData(reportMeta)
|
||||
const doc = new jsPDF({
|
||||
orientation: 'landscape'
|
||||
@ -643,25 +555,28 @@ 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,
|
||||
`POSKO : ${reportMeta.posko ? reportMeta.posko.name.toUpperCase() : 'Semua Posko'.toUpperCase()
|
||||
`POSKO : ${
|
||||
reportMeta.posko ? reportMeta.posko.name.toUpperCase() : 'Semua Posko'.toUpperCase()
|
||||
}`
|
||||
)
|
||||
|
||||
@ -736,9 +651,16 @@ const exportDetailToXLSX = (reportMeta: any, e: any) => {
|
||||
e.cancel = true
|
||||
}
|
||||
const exportToDOCX = (reportMeta: any, rawData: any) => {
|
||||
exportToWord(reportMeta, formatData(rawData), reportName, formatMetaData(reportMeta))
|
||||
exportToWord(reportMeta, formatData(rawData, reportMeta), reportName, formatMetaData(reportMeta))
|
||||
}
|
||||
const exportDetailToDOCX = (reportMeta: any, rawData: any) => {
|
||||
exportDetailToWord(reportMeta, rawData, `Detail ${reportName}`, formatMetaData(reportMeta))
|
||||
}
|
||||
export { exportToPDF, exportToXLSX, exportDetailToPDF, exportDetailToXLSX, exportToDOCX, exportDetailToDOCX }
|
||||
export {
|
||||
exportToPDF,
|
||||
exportToXLSX,
|
||||
exportDetailToPDF,
|
||||
exportDetailToXLSX,
|
||||
exportToDOCX,
|
||||
exportDetailToDOCX
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user