feat(ui): full‑width ShadTable across app; fix rent dialog width; correct equipment pagination
- ShadTable: ensure full-width via LayoutBuilder+ConstrainedBox minWidth - BaseListScreen: default data area padding = 0 for table edge-to-edge - Vendor/Model/User/Company/Inventory/Zipcode: set columnSpanExtent per column and add final filler column to absorb remaining width; pin date/status/actions widths; ensure date text is single-line - Equipment: unify card/border style; define fixed column widths + filler; increase checkbox column to 56px to avoid overflow - Rent list: migrate to ShadTable.list with fixed widths + filler column - Rent form dialog: prevent infinite width by bounding ShadProgress with SizedBox and remove Expanded from option rows; add safe selectedOptionBuilder - Admin list: fix const with non-const argument in table column extents - Services/Controller: remove hardcoded perPage=10; use BaseListController perPage; trust server meta (total/totalPages) in equipment pagination - widgets/shad_table: ConstrainedBox(minWidth=viewport) so table stretches Run: flutter analyze → 0 errors (warnings remain).
This commit is contained in:
@@ -99,15 +99,8 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(24),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withValues(alpha: 0.1),
|
||||
spreadRadius: 1,
|
||||
blurRadius: 3,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
color: ShadcnTheme.card,
|
||||
boxShadow: ShadcnTheme.shadowSm,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -132,7 +125,7 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
.length;
|
||||
return Text(
|
||||
'완료된 유지보수: $completedCount건',
|
||||
style: TextStyle(color: Colors.grey[600]),
|
||||
style: ShadcnTheme.bodySmall.copyWith(color: ShadcnTheme.mutedForeground),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -272,9 +265,9 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: ShadcnTheme.card,
|
||||
border: Border(
|
||||
bottom: BorderSide(color: Colors.grey[300]!),
|
||||
bottom: BorderSide(color: ShadcnTheme.border),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
@@ -298,7 +291,7 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected ? Theme.of(context).primaryColor : Colors.grey[100],
|
||||
color: isSelected ? ShadcnTheme.primary : ShadcnTheme.muted,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
@@ -307,13 +300,13 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
Icon(
|
||||
icon,
|
||||
size: 20,
|
||||
color: isSelected ? Colors.white : Colors.grey[600],
|
||||
color: isSelected ? ShadcnTheme.primaryForeground : ShadcnTheme.mutedForeground,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: isSelected ? Colors.white : Colors.grey[600],
|
||||
style: ShadcnTheme.bodySmall.copyWith(
|
||||
color: isSelected ? ShadcnTheme.primaryForeground : ShadcnTheme.mutedForeground,
|
||||
fontWeight: isSelected ? FontWeight.bold : FontWeight.normal,
|
||||
),
|
||||
),
|
||||
@@ -374,8 +367,8 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
),
|
||||
child: Text(
|
||||
DateFormat('yyyy년 MM월 dd일').format(DateTime.parse(date)),
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
style: TextStyle(
|
||||
color: ShadcnTheme.primaryForeground,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
@@ -394,15 +387,9 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
margin: const EdgeInsets.only(left: 20, bottom: 12),
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: ShadcnTheme.card,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withValues(alpha: 0.1),
|
||||
blurRadius: 4,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
boxShadow: ShadcnTheme.shadowSm,
|
||||
border: Border(
|
||||
left: BorderSide(
|
||||
color: Theme.of(context).primaryColor,
|
||||
@@ -547,8 +534,8 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
color: index.isEven
|
||||
? ShadcnTheme.muted.withValues(alpha: 0.1)
|
||||
: null,
|
||||
border: const Border(
|
||||
bottom: BorderSide(color: Colors.black),
|
||||
border: Border(
|
||||
bottom: BorderSide(color: ShadcnTheme.border),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
@@ -634,7 +621,7 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
return Container(
|
||||
margin: const EdgeInsets.all(24),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.black),
|
||||
border: Border.all(color: ShadcnTheme.border),
|
||||
borderRadius: BorderRadius.circular(ShadcnTheme.radiusMd),
|
||||
),
|
||||
child: Column(
|
||||
@@ -644,7 +631,7 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: ShadcnTheme.muted.withValues(alpha: 0.3),
|
||||
border: Border(bottom: BorderSide(color: Colors.black)),
|
||||
border: Border(bottom: BorderSide(color: ShadcnTheme.border)),
|
||||
),
|
||||
child: Row(children: _buildHeaderCells()),
|
||||
),
|
||||
@@ -743,15 +730,9 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: ShadcnTheme.card,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withValues(alpha: 0.1),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
boxShadow: ShadcnTheme.shadowMd,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -931,10 +912,10 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
Text(
|
||||
'통계 요약',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
color: ShadcnTheme.primaryForeground,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -961,15 +942,15 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: Colors.white.withValues(alpha: 0.8),
|
||||
color: ShadcnTheme.primaryForeground.withValues(alpha: 0.8),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
value,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
style: TextStyle(
|
||||
color: ShadcnTheme.primaryForeground,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -1048,4 +1029,4 @@ class _MaintenanceHistoryScreenState extends State<MaintenanceHistoryScreen>
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user