feat: Display order event name with a new calendar check icon and update associated styles in the order card.
This commit is contained in:
@@ -28,6 +28,9 @@ class UiIcons {
|
|||||||
/// Calendar icon for shifts or schedules
|
/// Calendar icon for shifts or schedules
|
||||||
static const IconData calendar = _IconLib.calendar;
|
static const IconData calendar = _IconLib.calendar;
|
||||||
|
|
||||||
|
/// Calender check icon for shifts or schedules
|
||||||
|
static const IconData calendarCheck = _IconLib.calendarCheck;
|
||||||
|
|
||||||
/// Briefcase icon for jobs
|
/// Briefcase icon for jobs
|
||||||
static const IconData briefcase = _IconLib.briefcase;
|
static const IconData briefcase = _IconLib.briefcase;
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
|||||||
backgroundColor: UiColors.transparent,
|
backgroundColor: UiColors.transparent,
|
||||||
builder: (BuildContext context) => OrderEditSheet(
|
builder: (BuildContext context) => OrderEditSheet(
|
||||||
order: order,
|
order: order,
|
||||||
onUpdated: () => this.context.read<ViewOrdersCubit>().updateWeekOffset(0),
|
onUpdated: () =>
|
||||||
|
this.context.read<ViewOrdersCubit>().updateWeekOffset(0),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -171,7 +172,9 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
|||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: UiConstants.space1 + 2),
|
const SizedBox(
|
||||||
|
width: UiConstants.space1 + 2,
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
statusLabel.toUpperCase(),
|
statusLabel.toUpperCase(),
|
||||||
style: UiTypography.footnote2b.copyWith(
|
style: UiTypography.footnote2b.copyWith(
|
||||||
@@ -202,20 +205,23 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
|||||||
// Title
|
// Title
|
||||||
Text(
|
Text(
|
||||||
order.title,
|
order.title,
|
||||||
style: UiTypography.headline4m.textPrimary,
|
style: UiTypography.headline3m.textPrimary,
|
||||||
),
|
),
|
||||||
const SizedBox(height: UiConstants.space1),
|
|
||||||
// Client & Date
|
|
||||||
Row(
|
Row(
|
||||||
|
spacing: UiConstants.space1,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
const Icon(
|
||||||
order.clientName,
|
UiIcons.calendarCheck,
|
||||||
style: UiTypography.body3r.textSecondary,
|
size: 14,
|
||||||
|
color: UiColors.iconSecondary,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
order.eventName,
|
||||||
|
style: UiTypography.headline5m.textSecondary,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 0),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: UiConstants.space2),
|
const SizedBox(height: UiConstants.space4),
|
||||||
// Location (Hub name + Address)
|
// Location (Hub name + Address)
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -236,14 +242,17 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
|||||||
if (order.location.isNotEmpty)
|
if (order.location.isNotEmpty)
|
||||||
Text(
|
Text(
|
||||||
order.location,
|
order.location,
|
||||||
style: UiTypography.footnote1b.textPrimary,
|
style:
|
||||||
|
UiTypography.footnote1b.textPrimary,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
if (order.locationAddress.isNotEmpty)
|
if (order.locationAddress.isNotEmpty)
|
||||||
Text(
|
Text(
|
||||||
order.locationAddress,
|
order.locationAddress,
|
||||||
style: UiTypography.footnote2r.textSecondary,
|
style: UiTypography
|
||||||
|
.footnote2r
|
||||||
|
.textSecondary,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
@@ -273,8 +282,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
|||||||
: UiIcons.chevronDown,
|
: UiIcons.chevronDown,
|
||||||
color: UiColors.iconSecondary,
|
color: UiColors.iconSecondary,
|
||||||
bgColor: UiColors.bgSecondary,
|
bgColor: UiColors.bgSecondary,
|
||||||
onTap: () =>
|
onTap: () => setState(() => _expanded = !_expanded),
|
||||||
setState(() => _expanded = !_expanded),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -340,22 +348,24 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
|||||||
Row(
|
Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (coveragePercent != 100)
|
if (coveragePercent != 100)
|
||||||
const Icon(
|
const Icon(
|
||||||
UiIcons.error,
|
UiIcons.error,
|
||||||
size: 16,
|
size: 16,
|
||||||
color: UiColors.textError,
|
color: UiColors.textError,
|
||||||
),
|
),
|
||||||
if (coveragePercent == 100)
|
if (coveragePercent == 100)
|
||||||
const Icon(
|
const Icon(
|
||||||
UiIcons.checkCircle,
|
UiIcons.checkCircle,
|
||||||
size: 16,
|
size: 16,
|
||||||
color: UiColors.textSuccess,
|
color: UiColors.textSuccess,
|
||||||
),
|
),
|
||||||
const SizedBox(width: UiConstants.space2),
|
const SizedBox(width: UiConstants.space2),
|
||||||
Text(
|
Text(
|
||||||
coveragePercent == 100
|
coveragePercent == 100
|
||||||
? t.client_view_orders.card.all_confirmed
|
? t.client_view_orders.card.all_confirmed
|
||||||
: t.client_view_orders.card.workers_needed(count: order.workersNeeded),
|
: t.client_view_orders.card.workers_needed(
|
||||||
|
count: order.workersNeeded,
|
||||||
|
),
|
||||||
style: UiTypography.body2m.textPrimary,
|
style: UiTypography.body2m.textPrimary,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -391,7 +401,9 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 12),
|
padding: const EdgeInsets.only(left: 12),
|
||||||
child: Text(
|
child: Text(
|
||||||
t.client_view_orders.card.show_more_workers(count: order.confirmedApps.length - 3),
|
t.client_view_orders.card.show_more_workers(
|
||||||
|
count: order.confirmedApps.length - 3,
|
||||||
|
),
|
||||||
style: UiTypography.footnote2r.textSecondary,
|
style: UiTypography.footnote2r.textSecondary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -446,7 +458,9 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
|||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: () {},
|
onPressed: () {},
|
||||||
child: Text(
|
child: Text(
|
||||||
t.client_view_orders.card.show_more_workers(count: order.confirmedApps.length - 5),
|
t.client_view_orders.card.show_more_workers(
|
||||||
|
count: order.confirmedApps.length - 5,
|
||||||
|
),
|
||||||
style: UiTypography.body2m.copyWith(
|
style: UiTypography.body2m.copyWith(
|
||||||
color: UiColors.primary,
|
color: UiColors.primary,
|
||||||
),
|
),
|
||||||
@@ -588,7 +602,8 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
] else if ((app['status'] as String?)?.isNotEmpty ?? false) ...<Widget>[
|
] else if ((app['status'] as String?)?.isNotEmpty ??
|
||||||
|
false) ...<Widget>[
|
||||||
const SizedBox(width: UiConstants.space2),
|
const SizedBox(width: UiConstants.space2),
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
@@ -629,7 +644,9 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
|||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text(t.client_view_orders.card.call_dialog.title),
|
title: Text(t.client_view_orders.card.call_dialog.title),
|
||||||
content: Text(t.client_view_orders.card.call_dialog.message(phone: phone)),
|
content: Text(
|
||||||
|
t.client_view_orders.card.call_dialog.message(phone: phone),
|
||||||
|
),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.of(context).pop(false),
|
onPressed: () => Navigator.of(context).pop(false),
|
||||||
@@ -716,4 +733,3 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user