feat: Update AvailableOrderCard to display pay details for long-term orders
This commit is contained in:
@@ -85,6 +85,7 @@ class AvailableOrderCard extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final AvailableOrderSchedule schedule = order.schedule;
|
||||
final int spotsLeft = order.requiredWorkerCount - order.filledCount;
|
||||
final bool isLongTerm = order.orderType == OrderType.permanent;
|
||||
final double durationHours = _durationHours();
|
||||
final double estimatedTotal = order.hourlyRate * durationHours;
|
||||
final String dateRange =
|
||||
@@ -135,7 +136,7 @@ class AvailableOrderCard extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
// Role name + estimated total
|
||||
// Role name + pay headline
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
spacing: UiConstants.space1,
|
||||
@@ -148,12 +149,14 @@ class AvailableOrderCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'\$${estimatedTotal.toStringAsFixed(0)}',
|
||||
isLongTerm
|
||||
? '\$${order.hourlyRate.toInt()}/hr'
|
||||
: '\$${estimatedTotal.toStringAsFixed(0)}',
|
||||
style: UiTypography.title1m.textPrimary,
|
||||
),
|
||||
],
|
||||
),
|
||||
// Time subtitle + hourly rate
|
||||
// Time subtitle + pay detail
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
spacing: UiConstants.space1,
|
||||
@@ -162,6 +165,7 @@ class AvailableOrderCard extends StatelessWidget {
|
||||
timeRange,
|
||||
style: UiTypography.body3r.textSecondary,
|
||||
),
|
||||
if (!isLongTerm)
|
||||
Text(
|
||||
'\$${order.hourlyRate.toInt()}/hr \u00b7 ${durationHours.toInt()}h',
|
||||
style: UiTypography.footnote2r.textSecondary,
|
||||
|
||||
Reference in New Issue
Block a user