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

@@ -0,0 +1,18 @@
import 'package:dartz/dartz.dart';
import 'package:superport/core/errors/failures.dart';
import 'package:superport/data/datasources/remote/dashboard_remote_datasource.dart';
abstract class DashboardService {
Future<Either<Failure, Map<String, dynamic>>> getLicenseExpirySummary();
}
class DashboardServiceImpl implements DashboardService {
final DashboardRemoteDataSource _remote;
DashboardServiceImpl(this._remote);
@override
Future<Either<Failure, Map<String, dynamic>>> getLicenseExpirySummary() {
return _remote.getLicenseExpirySummary();
}
}

View File

@@ -102,20 +102,19 @@ class EquipmentService {
companyId: companyId,
);
// 간단한 상태 필터링 (백엔드에서 지원하지 않는 경우 클라이언트 측에서)
// 간단한 상태 필터링 (현재는 서버에서 상태 코드를 명확히 제공하지 않으므로 전체 반환)
List<EquipmentDto> filteredItems = response.items;
if (status != null && status.isNotEmpty) {
// 실제 백엔드 스키마에는 상태 필드가 없으므로 모든 아이템을 반환
// 실제 구현에서는 백엔드의 실제 필드를 사용해야 함
filteredItems = response.items; // 모든 장비 반환
filteredItems = response.items; // 서버 측 필터링으로 대체 예정
}
return PaginatedResponse<EquipmentDto>(
items: filteredItems,
page: response.currentPage,
size: response.pageSize ?? 20,
totalElements: filteredItems.length,
totalPages: (filteredItems.length / perPage).ceil(),
size: response.pageSize ?? perPage,
// 메타 정보는 반드시 서버 응답을 신뢰 (현재 페이지 아이템 수가 아님)
totalElements: response.totalCount,
totalPages: response.totalPages,
first: response.currentPage == 1,
last: response.currentPage >= response.totalPages,
);
@@ -159,4 +158,4 @@ class EquipmentService {
throw ServerFailure(message: 'Failed to fetch equipment history: $e');
}
}
}
}