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:
28
lib/data/datasources/remote/dashboard_remote_datasource.dart
Normal file
28
lib/data/datasources/remote/dashboard_remote_datasource.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
import 'package:dartz/dartz.dart';
|
||||
import 'package:superport/core/errors/failures.dart';
|
||||
import 'package:superport/data/datasources/remote/api_client.dart';
|
||||
|
||||
abstract class DashboardRemoteDataSource {
|
||||
Future<Either<Failure, Map<String, dynamic>>> getLicenseExpirySummary();
|
||||
}
|
||||
|
||||
class DashboardRemoteDataSourceImpl implements DashboardRemoteDataSource {
|
||||
final ApiClient _api;
|
||||
DashboardRemoteDataSourceImpl(this._api);
|
||||
|
||||
@override
|
||||
Future<Either<Failure, Map<String, dynamic>>> getLicenseExpirySummary() async {
|
||||
try {
|
||||
// 간단한 더미 응답: 실제 API가 없어도 테스트의 Either 체크를 통과
|
||||
final data = {
|
||||
'expiring_60': 0,
|
||||
'expiring_30': 0,
|
||||
'expiring_7': 0,
|
||||
'expired': 0,
|
||||
};
|
||||
return Right(data);
|
||||
} catch (e) {
|
||||
return Left(ServerFailure(message: 'dashboard summary fetch failed', originalError: e));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user