feat: display POS name in order cards on the orders screen
This commit is contained in:
parent
4e6ce85953
commit
3bd6eb83ac
@ -119,6 +119,7 @@ class _OrdersScreenState extends State<OrdersScreen> {
|
||||
final isEarn = item['type'] == 'earn';
|
||||
final orderRef = item['order_ref'] as String? ?? '';
|
||||
final rawDate = item['date'] as String? ?? '';
|
||||
final posName = item['pos_name'] as String? ?? '';
|
||||
|
||||
return Card(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 6),
|
||||
@ -146,12 +147,37 @@ class _OrdersScreenState extends State<OrdersScreen> {
|
||||
),
|
||||
subtitle: Padding(
|
||||
padding: const EdgeInsets.only(top: 6.0),
|
||||
child: Text(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (posName.isNotEmpty) ...[
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.storefront_rounded,
|
||||
size: 14,
|
||||
color: theme.colorScheme.primary,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
posName,
|
||||
style: theme.textTheme.bodySmall?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: theme.colorScheme.primary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
],
|
||||
Text(
|
||||
_formatDate(rawDate),
|
||||
style: theme.textTheme.bodySmall?.copyWith(
|
||||
color: AppTheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
trailing: Text(
|
||||
'${isEarn ? '+' : ''}${item['points']} pts',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user