Merge remote-tracking branch 'origin/312-feature-integrate-google-maps-places-autocomplete-for-hub-address-validation' into 298-bug-enhance-order-creation-flow-implement-robust-timezone-handling-in-mobile-client-app
This commit is contained in:
@@ -2,16 +2,16 @@ import 'package:design_system/design_system.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
|
||||
import '../blocs/billing_bloc.dart';
|
||||
import '../blocs/billing_event.dart';
|
||||
import '../blocs/billing_state.dart';
|
||||
import '../widgets/billing_header.dart';
|
||||
import '../widgets/pending_invoices_section.dart';
|
||||
import '../widgets/payment_method_card.dart';
|
||||
import '../widgets/spending_breakdown_card.dart';
|
||||
import '../widgets/savings_card.dart';
|
||||
import '../widgets/invoice_history_section.dart';
|
||||
import '../widgets/export_invoices_button.dart';
|
||||
import '../widgets/payment_method_card.dart';
|
||||
import '../widgets/pending_invoices_section.dart';
|
||||
import '../widgets/savings_card.dart';
|
||||
import '../widgets/spending_breakdown_card.dart';
|
||||
|
||||
/// The entry point page for the client billing feature.
|
||||
///
|
||||
@@ -43,7 +43,6 @@ class BillingView extends StatelessWidget {
|
||||
return BlocBuilder<BillingBloc, BillingState>(
|
||||
builder: (BuildContext context, BillingState state) {
|
||||
return Scaffold(
|
||||
backgroundColor: UiColors.bgPrimary,
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
BillingHeader(
|
||||
@@ -89,9 +88,7 @@ class BillingView extends StatelessWidget {
|
||||
SavingsCard(savings: state.savings),
|
||||
const SizedBox(height: UiConstants.space6),
|
||||
InvoiceHistorySection(invoices: state.invoiceHistory),
|
||||
const SizedBox(height: UiConstants.space6),
|
||||
const ExportInvoicesButton(),
|
||||
const SizedBox(height: UiConstants.space6),
|
||||
const SizedBox(height: UiConstants.space24),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: billing
|
||||
description: Client Billing feature package
|
||||
publish_to: 'none'
|
||||
version: 1.0.0+1
|
||||
version: 0.0.1
|
||||
resolution: workspace
|
||||
|
||||
environment:
|
||||
|
||||
@@ -24,7 +24,6 @@ class CoveragePage extends StatelessWidget {
|
||||
create: (BuildContext context) => Modular.get<CoverageBloc>()
|
||||
..add(CoverageLoadRequested(date: DateTime.now())),
|
||||
child: Scaffold(
|
||||
backgroundColor: UiColors.background,
|
||||
body: BlocBuilder<CoverageBloc, CoverageState>(
|
||||
builder: (BuildContext context, CoverageState state) {
|
||||
return Column(
|
||||
@@ -121,6 +120,7 @@ class CoveragePage extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
CoverageShiftList(shifts: state.shifts),
|
||||
const SizedBox(height: 100),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -35,24 +35,23 @@ class CoverageShiftList extends StatelessWidget {
|
||||
if (shifts.isEmpty) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(UiConstants.space8),
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.bgPopup,
|
||||
borderRadius: UiConstants.radiusLg,
|
||||
border: Border.all(color: UiColors.border),
|
||||
),
|
||||
child: Column(
|
||||
spacing: UiConstants.space4,
|
||||
children: <Widget>[
|
||||
const Icon(
|
||||
UiIcons.users,
|
||||
size: UiConstants.space12,
|
||||
color: UiColors.mutedForeground,
|
||||
color: UiColors.textSecondary,
|
||||
),
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
Text(
|
||||
'No shifts scheduled for this day',
|
||||
style: UiTypography.body2r.copyWith(
|
||||
color: UiColors.mutedForeground,
|
||||
),
|
||||
style: UiTypography.body2r.textSecondary,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -160,12 +159,15 @@ class _ShiftHeader extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
spacing: UiConstants.space4,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: UiConstants.space2,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
spacing: UiConstants.space2,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: UiConstants.space2,
|
||||
@@ -175,42 +177,43 @@ class _ShiftHeader extends StatelessWidget {
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Text(
|
||||
title,
|
||||
style: UiTypography.body1b.copyWith(
|
||||
color: UiColors.textPrimary,
|
||||
),
|
||||
style: UiTypography.body1b.textPrimary,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: UiConstants.space2),
|
||||
Row(
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
const Icon(
|
||||
UiIcons.mapPin,
|
||||
size: UiConstants.space3,
|
||||
color: UiColors.mutedForeground,
|
||||
Row(
|
||||
spacing: UiConstants.space1,
|
||||
children: <Widget>[
|
||||
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),
|
||||
Text(
|
||||
location,
|
||||
style: UiTypography.body3r.copyWith(
|
||||
color: UiColors.mutedForeground,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: UiConstants.space3),
|
||||
const Icon(
|
||||
UiIcons.clock,
|
||||
size: UiConstants.space3,
|
||||
color: UiColors.mutedForeground,
|
||||
),
|
||||
const SizedBox(width: UiConstants.space1),
|
||||
Text(
|
||||
startTime,
|
||||
style: UiTypography.body3r.copyWith(
|
||||
color: UiColors.mutedForeground,
|
||||
),
|
||||
Row(
|
||||
spacing: UiConstants.space1,
|
||||
children: <Widget>[
|
||||
const Icon(
|
||||
UiIcons.clock,
|
||||
size: UiConstants.space3,
|
||||
color: UiColors.iconSecondary,
|
||||
),
|
||||
Text(
|
||||
startTime,
|
||||
style: UiTypography.body3r.textSecondary,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: client_coverage
|
||||
description: Client coverage feature for tracking daily shift coverage and worker status
|
||||
version: 1.0.0
|
||||
version: 0.0.1
|
||||
publish_to: none
|
||||
resolution: workspace
|
||||
|
||||
@@ -33,4 +33,4 @@ dependencies:
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^5.0.0
|
||||
flutter_lints: ^6.0.0
|
||||
|
||||
@@ -30,7 +30,7 @@ class ClientMainPage extends StatelessWidget {
|
||||
BlocProvider.of<ClientMainCubit>(context).navigateToTab(index);
|
||||
},
|
||||
);
|
||||
},
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -99,13 +99,6 @@ class ClientMainBottomBar extends StatelessWidget {
|
||||
activeColor: activeColor,
|
||||
inactiveColor: inactiveColor,
|
||||
),
|
||||
_buildNavItem(
|
||||
index: 4,
|
||||
icon: UiIcons.chart,
|
||||
label: t.client_main.tabs.reports,
|
||||
activeColor: activeColor,
|
||||
inactiveColor: inactiveColor,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
library client_home;
|
||||
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:krow_data_connect/krow_data_connect.dart';
|
||||
import 'src/data/repositories_impl/home_repository_impl.dart';
|
||||
|
||||
@@ -26,6 +26,8 @@ class ClientHomeBloc extends Bloc<ClientHomeEvent, ClientHomeState> {
|
||||
on<ClientHomeWidgetVisibilityToggled>(_onWidgetVisibilityToggled);
|
||||
on<ClientHomeWidgetReordered>(_onWidgetReordered);
|
||||
on<ClientHomeLayoutReset>(_onLayoutReset);
|
||||
|
||||
add(ClientHomeStarted());
|
||||
}
|
||||
|
||||
Future<void> _onStarted(
|
||||
|
||||
@@ -24,8 +24,7 @@ class ClientHomePage extends StatelessWidget {
|
||||
final TranslationsClientHomeEn i18n = t.client_home;
|
||||
|
||||
return BlocProvider<ClientHomeBloc>(
|
||||
create: (BuildContext context) =>
|
||||
Modular.get<ClientHomeBloc>()..add(ClientHomeStarted()),
|
||||
create: (BuildContext context) => Modular.get<ClientHomeBloc>(),
|
||||
child: Scaffold(
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
@@ -59,19 +58,15 @@ class ClientHomePage extends StatelessWidget {
|
||||
100,
|
||||
),
|
||||
onReorder: (int oldIndex, int newIndex) {
|
||||
BlocProvider.of<ClientHomeBloc>(context).add(
|
||||
ClientHomeWidgetReordered(oldIndex, newIndex),
|
||||
);
|
||||
BlocProvider.of<ClientHomeBloc>(
|
||||
context,
|
||||
).add(ClientHomeWidgetReordered(oldIndex, newIndex));
|
||||
},
|
||||
children: state.widgetOrder.map((String id) {
|
||||
return Container(
|
||||
key: ValueKey(id),
|
||||
key: ValueKey<String>(id),
|
||||
margin: const EdgeInsets.only(bottom: UiConstants.space4),
|
||||
child: DashboardWidgetBuilder(
|
||||
id: id,
|
||||
state: state,
|
||||
isEditMode: true,
|
||||
),
|
||||
child: DashboardWidgetBuilder(id: id, state: state, isEditMode: true),
|
||||
);
|
||||
}).toList(),
|
||||
);
|
||||
|
||||
@@ -24,21 +24,22 @@ class ActionsWidget extends StatelessWidget {
|
||||
|
||||
return Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: _ActionCard(
|
||||
title: i18n.rapid,
|
||||
subtitle: i18n.rapid_subtitle,
|
||||
icon: UiIcons.zap,
|
||||
color: const Color(0xFFFEF2F2),
|
||||
borderColor: const Color(0xFFFECACA),
|
||||
iconBgColor: const Color(0xFFFEE2E2),
|
||||
iconColor: const Color(0xFFDC2626),
|
||||
textColor: const Color(0xFF7F1D1D),
|
||||
subtitleColor: const Color(0xFFB91C1C),
|
||||
onTap: onRapidPressed,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
/// TODO: FEATURE_NOT_YET_IMPLEMENTED
|
||||
// Expanded(
|
||||
// child: _ActionCard(
|
||||
// title: i18n.rapid,
|
||||
// subtitle: i18n.rapid_subtitle,
|
||||
// icon: UiIcons.zap,
|
||||
// color: const Color(0xFFFEF2F2),
|
||||
// borderColor: const Color(0xFFFECACA),
|
||||
// iconBgColor: const Color(0xFFFEE2E2),
|
||||
// iconColor: const Color(0xFFDC2626),
|
||||
// textColor: const Color(0xFF7F1D1D),
|
||||
// subtitleColor: const Color(0xFFB91C1C),
|
||||
// onTap: onRapidPressed,
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(width: UiConstants.space2),
|
||||
Expanded(
|
||||
child: _ActionCard(
|
||||
title: i18n.create_order,
|
||||
|
||||
@@ -22,6 +22,7 @@ dependencies:
|
||||
core_localization:
|
||||
path: ../../../core_localization
|
||||
krow_domain: ^0.0.1
|
||||
krow_data_connect: ^0.0.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: view_orders
|
||||
description: Client View Orders feature package
|
||||
publish_to: 'none'
|
||||
version: 1.0.0+1
|
||||
version: 0.0.1
|
||||
resolution: workspace
|
||||
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user