mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
refactor(FE): Refactor getDetailData to remove unused parameters
This commit is contained in:
@@ -203,11 +203,7 @@ const getDetailColumns = (): PdfColumn[] => [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const getDetailData = (
|
const getDetailData = (rows: HppPerKandangRow[]): PdfTbodyCell[][] => {
|
||||||
rows: HppPerKandangRow[],
|
|
||||||
allFeedSuppliers: string,
|
|
||||||
allDocSuppliers: string
|
|
||||||
): PdfTbodyCell[][] => {
|
|
||||||
return rows.map((item, index) => [
|
return rows.map((item, index) => [
|
||||||
{ key: 'no', value: index + 1 },
|
{ key: 'no', value: index + 1 },
|
||||||
{ key: 'kandang', value: item.kandang?.name || '-' },
|
{ key: 'kandang', value: item.kandang?.name || '-' },
|
||||||
@@ -370,11 +366,7 @@ const createPDFDocument = (
|
|||||||
</PdfTypography>
|
</PdfTypography>
|
||||||
<PdfTable
|
<PdfTable
|
||||||
columns={getDetailColumns()}
|
columns={getDetailColumns()}
|
||||||
data={getDetailData(
|
data={getDetailData(params.data.rows)}
|
||||||
params.data.rows,
|
|
||||||
allFeedSuppliers,
|
|
||||||
allDocSuppliers
|
|
||||||
)}
|
|
||||||
footer={
|
footer={
|
||||||
params.data.summary
|
params.data.summary
|
||||||
? getDetailFooter(
|
? getDetailFooter(
|
||||||
|
|||||||
Reference in New Issue
Block a user