fix report
This commit is contained in:
parent
b22f400534
commit
e8609a0ab9
@ -16,7 +16,7 @@ import ReportHeader from '@/views/dashboards/daily-report/report-header'
|
||||
import React, { useEffect, useRef, useState } from 'react'
|
||||
|
||||
// Dummy HPP values — ganti dengan data real nantinya
|
||||
const DUMMY_STD_HPP = 0 // % — ganti dengan data real nantinya
|
||||
const DUMMY_STD_HPP = 30 // % — ganti dengan data real nantinya
|
||||
const DUMMY_REAL_HPP = 0 // % — ganti dengan kalkulasi real nantinya
|
||||
|
||||
const getHppStatus = (stdHpp: number, realHpp: number): 'Sehat' | 'Tidak Sehat' =>
|
||||
|
||||
@ -115,7 +115,7 @@ const getStatusStyle = (status: 'Sehat' | 'Tidak Sehat', isAlt: boolean): Partia
|
||||
}
|
||||
|
||||
// Dummy HPP values — ganti dengan data real nantinya
|
||||
const DUMMY_STD_HPP = 0 // 0% — ganti dengan data real nantinya
|
||||
const DUMMY_STD_HPP = 30 // 30% — ganti dengan data real nantinya
|
||||
const DUMMY_REAL_HPP = 0 // 0% — ganti dengan kalkulasi real nantinya
|
||||
const getDummyStatus = (stdHpp: number, realHpp: number): 'Sehat' | 'Tidak Sehat' =>
|
||||
realHpp <= stdHpp ? 'Sehat' : 'Tidak Sehat'
|
||||
|
||||
@ -238,7 +238,7 @@ export const generatePDF = async (params: PDFGeneratorParams) => {
|
||||
pdf.text('Ringkasan Kategori', 14, currentY)
|
||||
currentY += 15
|
||||
|
||||
const DUMMY_STD_HPP = 0 // % (nilai dummy — ganti dengan data real nantinya)
|
||||
const DUMMY_STD_HPP = 30 // % (nilai dummy — ganti dengan data real nantinya)
|
||||
|
||||
const categoryBody =
|
||||
category?.data?.map((c: any) => {
|
||||
@ -437,9 +437,9 @@ export const generatePDF = async (params: PDFGeneratorParams) => {
|
||||
lineWidth: 0.1
|
||||
},
|
||||
columnStyles: {
|
||||
0: { cellWidth: 50 },
|
||||
0: { cellWidth: 44 },
|
||||
1: { halign: 'center', cellWidth: 20 },
|
||||
2: { halign: 'right', cellWidth: 42 },
|
||||
2: { halign: 'right', cellWidth: 50 },
|
||||
3: { halign: 'center', cellWidth: 22 },
|
||||
4: { halign: 'center', cellWidth: 22 },
|
||||
5: { halign: 'center', cellWidth: 22 }
|
||||
@ -505,9 +505,9 @@ export const generatePDF = async (params: PDFGeneratorParams) => {
|
||||
lineWidth: 0.2
|
||||
},
|
||||
columnStyles: {
|
||||
0: { cellWidth: 50 },
|
||||
0: { cellWidth: 44 },
|
||||
1: { halign: 'center', cellWidth: 20 },
|
||||
2: { halign: 'right', cellWidth: 42 },
|
||||
2: { halign: 'right', cellWidth: 50 },
|
||||
3: { cellWidth: 22 },
|
||||
4: { cellWidth: 22 },
|
||||
5: { cellWidth: 22 }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user