feat(ui): full‑width ShadTable across app; fix rent dialog width; correct equipment pagination
Some checks failed
Flutter Test & Quality Check / Test on macos-latest (push) Has been cancelled
Flutter Test & Quality Check / Test on ubuntu-latest (push) Has been cancelled
Flutter Test & Quality Check / Build APK (push) Has been cancelled

- 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:
JiWoong Sul
2025-09-09 22:38:08 +09:00
parent 655d473413
commit 49b203d366
67 changed files with 2305 additions and 1933 deletions

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:superport/screens/common/theme_shadcn.dart';
import 'package:superport/data/models/maintenance_dto.dart';
import 'package:superport/data/models/equipment_history_dto.dart';
import 'package:superport/data/repositories/equipment_history_repository.dart';
@@ -563,7 +564,7 @@ class MaintenanceController extends ChangeNotifier {
case '완료': return Colors.grey;
case '만료됨': return Colors.red;
case '삭제됨': return Colors.grey.withValues(alpha: 0.5);
default: return Colors.black;
default: return ShadcnTheme.foreground;
}
}
@@ -636,8 +637,13 @@ class MaintenanceController extends ChangeNotifier {
// 백엔드에서 직접 제공하는 company_name 사용
debugPrint('getCompanyName - ID: ${maintenance.id}, companyName: "${maintenance.companyName}", companyId: ${maintenance.companyId}');
if (maintenance.companyName != null && maintenance.companyName!.isNotEmpty) {
return maintenance.companyName!;
final name = maintenance.companyName;
if (name != null) {
final trimmed = name.trim();
// 백엔드가 문자열 'null'을 반환하는 케이스 방지
if (trimmed.isNotEmpty && trimmed.toLowerCase() != 'null') {
return trimmed;
}
}
return '-';
}
@@ -707,4 +713,4 @@ class MaintenanceController extends ChangeNotifier {
reset();
super.dispose();
}
}
}