fix: improve layout and styling for empty state and shift header in CoverageShiftList
This commit is contained in:
@@ -35,24 +35,23 @@ class CoverageShiftList extends StatelessWidget {
|
|||||||
if (shifts.isEmpty) {
|
if (shifts.isEmpty) {
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.all(UiConstants.space8),
|
padding: const EdgeInsets.all(UiConstants.space8),
|
||||||
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: UiColors.bgPopup,
|
color: UiColors.bgPopup,
|
||||||
borderRadius: UiConstants.radiusLg,
|
borderRadius: UiConstants.radiusLg,
|
||||||
border: Border.all(color: UiColors.border),
|
border: Border.all(color: UiColors.border),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
spacing: UiConstants.space4,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
const Icon(
|
const Icon(
|
||||||
UiIcons.users,
|
UiIcons.users,
|
||||||
size: UiConstants.space12,
|
size: UiConstants.space12,
|
||||||
color: UiColors.mutedForeground,
|
color: UiColors.textSecondary,
|
||||||
),
|
),
|
||||||
const SizedBox(height: UiConstants.space3),
|
|
||||||
Text(
|
Text(
|
||||||
'No shifts scheduled for this day',
|
'No shifts scheduled for this day',
|
||||||
style: UiTypography.body2r.copyWith(
|
style: UiTypography.body2r.textSecondary,
|
||||||
color: UiColors.mutedForeground,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -160,12 +159,15 @@ class _ShiftHeader extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
spacing: UiConstants.space4,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
spacing: UiConstants.space2,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Row(
|
Row(
|
||||||
|
spacing: UiConstants.space2,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
width: UiConstants.space2,
|
width: UiConstants.space2,
|
||||||
@@ -175,42 +177,43 @@ class _ShiftHeader extends StatelessWidget {
|
|||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: UiConstants.space2),
|
|
||||||
Text(
|
Text(
|
||||||
title,
|
title,
|
||||||
style: UiTypography.body1b.copyWith(
|
style: UiTypography.body1b.textPrimary,
|
||||||
color: UiColors.textPrimary,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: UiConstants.space2),
|
Column(
|
||||||
Row(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
const Icon(
|
Row(
|
||||||
UiIcons.mapPin,
|
spacing: UiConstants.space1,
|
||||||
size: UiConstants.space3,
|
children: <Widget>[
|
||||||
color: UiColors.mutedForeground,
|
const Icon(
|
||||||
|
UiIcons.mapPin,
|
||||||
|
size: UiConstants.space3,
|
||||||
|
color: UiColors.iconSecondary,
|
||||||
|
),
|
||||||
|
Expanded(child: Text(
|
||||||
|
location,
|
||||||
|
style: UiTypography.body3r.textSecondary,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
)),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(width: UiConstants.space1),
|
Row(
|
||||||
Text(
|
spacing: UiConstants.space1,
|
||||||
location,
|
children: <Widget>[
|
||||||
style: UiTypography.body3r.copyWith(
|
const Icon(
|
||||||
color: UiColors.mutedForeground,
|
UiIcons.clock,
|
||||||
),
|
size: UiConstants.space3,
|
||||||
),
|
color: UiColors.iconSecondary,
|
||||||
const SizedBox(width: UiConstants.space3),
|
),
|
||||||
const Icon(
|
Text(
|
||||||
UiIcons.clock,
|
startTime,
|
||||||
size: UiConstants.space3,
|
style: UiTypography.body3r.textSecondary,
|
||||||
color: UiColors.mutedForeground,
|
),
|
||||||
),
|
],
|
||||||
const SizedBox(width: UiConstants.space1),
|
|
||||||
Text(
|
|
||||||
startTime,
|
|
||||||
style: UiTypography.body3r.copyWith(
|
|
||||||
color: UiColors.mutedForeground,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user