feat(benefit_history): enhance layout of benefit history row with improved structure and styling
This commit is contained in:
@@ -22,30 +22,36 @@ class BenefitHistoryRow extends StatelessWidget {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: UiConstants.space2),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
// Date column
|
||||
// Left: notes + date
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
if (history.notes != null && history.notes!.isNotEmpty)
|
||||
Text(
|
||||
history.notes!,
|
||||
style: UiTypography.body2r,
|
||||
),
|
||||
const SizedBox(height: UiConstants.space2),
|
||||
Text(
|
||||
DateFormat('d MMM, yyyy').format(history.effectiveAt),
|
||||
style: UiTypography.footnote1r.textSecondary,
|
||||
),
|
||||
const SizedBox(width: UiConstants.space3),
|
||||
// Notes (takes remaining space)
|
||||
Expanded(
|
||||
child: history.notes != null && history.notes!.isNotEmpty
|
||||
? Text(
|
||||
history.notes!,
|
||||
style: UiTypography.body3r.textSecondary,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
],
|
||||
),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
// Hours badge
|
||||
_buildHoursBadge(i18n),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
// Status chip
|
||||
),
|
||||
const SizedBox(width: UiConstants.space3),
|
||||
// Right: status chip + hours badge
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
_buildStatusChip(i18n),
|
||||
const SizedBox(height: UiConstants.space2),
|
||||
_buildHoursBadge(i18n),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -56,7 +62,7 @@ class BenefitHistoryRow extends StatelessWidget {
|
||||
final String label = '+${history.trackedHours}h';
|
||||
return Text(
|
||||
label,
|
||||
style: UiTypography.footnote2b.copyWith(color: UiColors.textSuccess),
|
||||
style: UiTypography.footnote1r.textSecondary,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user