fix: report ttd
This commit is contained in:
@ -48,6 +48,10 @@ const formatMetaData = (reportMeta: any) => {
|
||||
|
||||
const exportToPDF = (reportMeta: any, data: any) => {
|
||||
const meta = formatMetaData(reportMeta)
|
||||
const day = new Date().toLocaleString('id-ID', { weekday: 'long' })
|
||||
const date = new Date().getDate()
|
||||
const month = new Date().toLocaleString('id-ID', { month: 'long' })
|
||||
const year = new Date().getFullYear()
|
||||
const doc = new jsPDF({
|
||||
orientation: 'landscape'
|
||||
})
|
||||
@ -173,7 +177,7 @@ const exportToPDF = (reportMeta: any, data: any) => {
|
||||
|
||||
autoTable(doc, {
|
||||
head: [
|
||||
[`${meta.dayTo}, ${meta.dateToFormat}`],
|
||||
[`${day}, ${date}-${month}-${year}`],
|
||||
[
|
||||
{
|
||||
content: '(.........................................)',
|
||||
@ -275,6 +279,10 @@ const exportToXLSX = (reportMeta: any, data: any, e: any) => {
|
||||
}
|
||||
|
||||
const exportToDOCX = (reportMeta: any, data: any) => {
|
||||
const day = new Date().toLocaleString('id-ID', { weekday: 'long' })
|
||||
const date = new Date().getDate()
|
||||
const month = new Date().toLocaleString('id-ID', { month: 'long' })
|
||||
const year = new Date().getFullYear()
|
||||
const meta = formatMetaData(reportMeta)
|
||||
|
||||
const generateRows = () => {
|
||||
@ -494,7 +502,7 @@ const exportToDOCX = (reportMeta: any, data: any) => {
|
||||
alignment: AlignmentType.RIGHT,
|
||||
children: [
|
||||
new TextRun({
|
||||
text: `${meta.dayTo}, ${meta.dateToFormat}`,
|
||||
text: `${day}, ${date}-${month}-${year}`,
|
||||
bold: true,
|
||||
size: 5
|
||||
})
|
||||
|
Reference in New Issue
Block a user