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:
@@ -6,6 +6,7 @@ import '../../domain/entities/maintenance_schedule.dart';
|
||||
import 'controllers/maintenance_controller.dart';
|
||||
import 'maintenance_form_dialog.dart';
|
||||
import 'components/maintenance_calendar.dart';
|
||||
import 'package:superport/screens/common/theme_shadcn.dart';
|
||||
|
||||
class MaintenanceScheduleScreen extends StatefulWidget {
|
||||
const MaintenanceScheduleScreen({super.key});
|
||||
@@ -42,7 +43,7 @@ class _MaintenanceScheduleScreenState extends State<MaintenanceScheduleScreen>
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.grey[100],
|
||||
backgroundColor: ShadcnTheme.backgroundSecondary,
|
||||
body: Column(
|
||||
children: [
|
||||
_buildHeader(),
|
||||
@@ -97,15 +98,8 @@ class _MaintenanceScheduleScreenState extends State<MaintenanceScheduleScreen>
|
||||
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(
|
||||
children: [
|
||||
@@ -128,9 +122,7 @@ class _MaintenanceScheduleScreenState extends State<MaintenanceScheduleScreen>
|
||||
'총 ${controller.totalCount}건 | '
|
||||
'예정 ${controller.upcomingCount}건 | '
|
||||
'지연 ${controller.overdueCount}건',
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
style: ShadcnTheme.bodySmall.copyWith(color: ShadcnTheme.mutedForeground),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -183,8 +175,8 @@ class _MaintenanceScheduleScreenState extends State<MaintenanceScheduleScreen>
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
border: Border(bottom: BorderSide(color: Colors.grey[300]!)),
|
||||
color: ShadcnTheme.card,
|
||||
border: Border(bottom: BorderSide(color: ShadcnTheme.border)),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
@@ -201,7 +193,7 @@ class _MaintenanceScheduleScreenState extends State<MaintenanceScheduleScreen>
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.grey[300]!),
|
||||
border: Border.all(color: ShadcnTheme.border),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
@@ -464,7 +456,7 @@ class _MaintenanceScheduleScreenState extends State<MaintenanceScheduleScreen>
|
||||
return Chip(
|
||||
label: Text(
|
||||
'${alert.daysUntilDue < 0 ? "지연 " : ""}${alert.daysUntilDue.abs()}일',
|
||||
style: TextStyle(fontSize: 12, color: Colors.white),
|
||||
style: TextStyle(fontSize: 12, color: ShadcnTheme.primaryForeground),
|
||||
),
|
||||
backgroundColor: color,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
|
||||
Reference in New Issue
Block a user