mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Provide defaults for missing info_umum fields
This commit is contained in:
@@ -119,11 +119,13 @@ const UniformityDetail: React.FC<UniformityDetailProps> = ({
|
||||
const statusValue = latest_approval?.action ?? '-';
|
||||
|
||||
const valueMap: Record<string, string> = {
|
||||
tanggal: formatDate(info_umum.tanggal, 'DD MMMM YYYY'),
|
||||
'lokasi-farm': info_umum.lokasi_farm,
|
||||
'project-flock': info_umum.project_flock,
|
||||
kandang: info_umum.kandang,
|
||||
'document-name': info_umum.file_name,
|
||||
tanggal: info_umum?.tanggal
|
||||
? formatDate(info_umum.tanggal, 'DD MMMM YYYY')
|
||||
: '-',
|
||||
'lokasi-farm': info_umum?.lokasi_farm ?? '-',
|
||||
'project-flock': info_umum?.project_flock ?? '-',
|
||||
kandang: info_umum?.kandang ?? '-',
|
||||
'document-name': info_umum?.file_name ?? '-',
|
||||
'approval-status': statusValue,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user