feat(inventory): 재고 현황 요약/상세 플로우를 릴리스
- lib/features/inventory/summary 계층과 warehouse select 위젯을 추가해 목록/상세, 자동 새로고침, 필터, 상세 시트를 구현 - PermissionBootstrapper, scope 파서, 라우트 가드로 inventory.view 기반 권한 부여와 메뉴 노출을 통합(lib/core, lib/main.dart 등) - Inventory Summary API/QA/Audit 문서와 PR 템플릿, CHANGELOG를 신규 스펙과 검증 커맨드로 업데이트 - DTO 직렬화 의존성을 추가하고 Golden·Widget·단위 테스트를 작성했으며 flutter analyze / flutter test --coverage를 통과
This commit is contained in:
@@ -35,7 +35,7 @@ class AppShell extends StatelessWidget {
|
||||
final filteredPages = <AppPageDescriptor>[
|
||||
for (final section in appSections)
|
||||
for (final page in section.pages)
|
||||
if (manager.can(page.path, PermissionAction.view)) page,
|
||||
if (_hasPageAccess(manager, page)) page,
|
||||
];
|
||||
final pages = filteredPages.isEmpty ? allAppPages : filteredPages;
|
||||
final themeController = ThemeControllerScope.of(context);
|
||||
@@ -404,6 +404,19 @@ int _selectedIndex(String location, List<AppPageDescriptor> pages) {
|
||||
return prefix == -1 ? 0 : prefix;
|
||||
}
|
||||
|
||||
bool _hasPageAccess(PermissionManager manager, AppPageDescriptor page) {
|
||||
final requirements = <String>{page.path, ...page.extraRequiredResources};
|
||||
for (final resource in requirements) {
|
||||
if (resource.isEmpty) {
|
||||
continue;
|
||||
}
|
||||
if (!manager.can(resource, PermissionAction.view)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// 계정 정보를 확인하고 로그아웃을 수행하는 상단바 버튼.
|
||||
class _AccountMenuButton extends StatelessWidget {
|
||||
const _AccountMenuButton({required this.service});
|
||||
|
||||
Reference in New Issue
Block a user