mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE-435,436): Use location name as fallback for expense titles
This commit is contained in:
@@ -588,7 +588,9 @@ const ExpenseRequestContent = ({
|
||||
colSpan={5}
|
||||
className='font-bold text-center text-base-content text-lg'
|
||||
>
|
||||
Biaya {kandangExpense.name}
|
||||
{kandangExpense.name
|
||||
? `Biaya ${kandangExpense.name}`
|
||||
: `Biaya ${initialValues?.location.name || 'Umum'}`}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -128,7 +128,11 @@ const ExpenseRealizationKandangDetailExpense: React.FC<
|
||||
>
|
||||
<div>
|
||||
<h5 className='mb-2 text-lg font-bold text-center'>
|
||||
Biaya {kandangName?.name || location?.label || 'Umum'}
|
||||
{kandangName?.name
|
||||
? `Biaya ${kandangName.name}`
|
||||
: location?.label
|
||||
? `Biaya ${location.label}`
|
||||
: 'Biaya Umum'}
|
||||
</h5>
|
||||
|
||||
<div className='overflow-x-auto'>
|
||||
|
||||
@@ -340,7 +340,9 @@ const ExpensePDF = ({ expense }: ExpensePDFProps) => {
|
||||
style={ExpensePDFStyle.kandangExpenseContainer}
|
||||
>
|
||||
<Text style={ExpensePDFStyle.kandangExpenseTitle}>
|
||||
{kandangExpense.name}
|
||||
{kandangExpense.name
|
||||
? `Biaya ${kandangExpense.name}`
|
||||
: `Biaya ${expense?.location.name || 'Umum'}`}
|
||||
</Text>
|
||||
|
||||
<View style={ExpensePDFStyle.kandangExpenseTable}>
|
||||
|
||||
Reference in New Issue
Block a user