Fix build errors: localization syntax, key paths, and ViewOrderCard widget
This commit is contained in:
@@ -227,23 +227,23 @@ class ClientHubsPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
Future<void> _confirmDeleteHub(BuildContext context, Hub hub) async {
|
||||
final String hubName = hub.name.isEmpty ? 'this hub' : hub.name;
|
||||
final String hubName = hub.name.isEmpty ? t.client_hubs.title : hub.name;
|
||||
return showDialog<void>(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (BuildContext dialogContext) {
|
||||
return AlertDialog(
|
||||
title: const Text('Confirm Hub Deletion'),
|
||||
title: Text(t.client_hubs.delete_dialog.title),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text('Are you sure you want to delete "$hubName"?'),
|
||||
Text(t.client_hubs.delete_dialog.message(hubName: hubName)),
|
||||
const SizedBox(height: UiConstants.space2),
|
||||
const Text('This action cannot be undone.'),
|
||||
Text(t.client_hubs.delete_dialog.undo_warning),
|
||||
const SizedBox(height: UiConstants.space2),
|
||||
Text(
|
||||
'Note that if there are any shifts/orders assigned to this hub we shouldn\'t be able to delete the hub.',
|
||||
t.client_hubs.delete_dialog.dependency_warning,
|
||||
style: UiTypography.footnote1r.copyWith(
|
||||
color: UiColors.textSecondary,
|
||||
),
|
||||
@@ -253,7 +253,7 @@ class ClientHubsPage extends StatelessWidget {
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () => Modular.to.pop(),
|
||||
child: const Text('Cancel'),
|
||||
child: Text(t.client_hubs.delete_dialog.cancel),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
@@ -265,7 +265,7 @@ class ClientHubsPage extends StatelessWidget {
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: UiColors.destructive,
|
||||
),
|
||||
child: const Text('Delete'),
|
||||
child: Text(t.client_hubs.delete_dialog.delete),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user