feat: complete leave approval MVP

This commit is contained in:
selfrelease
2026-07-18 19:20:07 +08:00
parent 2105fe3bac
commit 090a7e33ce
133 changed files with 7845 additions and 100 deletions
+16 -2
View File
@@ -1,12 +1,26 @@
import 'package:aioa_mobile/app/router.dart';
import 'package:aioa_mobile/app/theme.dart';
import 'package:aioa_mobile/core/auth/auth_session_controller.dart';
import 'package:aioa_mobile/core/auth/login_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:aioa_mobile/core/notifications/push_registration_controller.dart';
class AioaApp extends StatelessWidget {
class AioaApp extends ConsumerWidget {
const AioaApp({super.key});
@override
Widget build(BuildContext context) {
Widget build(BuildContext context, WidgetRef ref) {
final auth = ref.watch(authSessionProvider);
if (auth.isLoading) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: buildAioaTheme(),
home: const Scaffold(body: Center(child: CircularProgressIndicator())),
);
}
if (auth.value == null) return const LoginPage();
ref.watch(pushRegistrationProvider);
return MaterialApp.router(
title: 'AIOA',
debugShowCheckedModeBanner: false,
+8
View File
@@ -2,6 +2,8 @@ import 'package:aioa_mobile/app/shell.dart';
import 'package:aioa_mobile/features/assistant/presentation/assistant_page.dart';
import 'package:aioa_mobile/features/form/presentation/leave_form_page.dart';
import 'package:aioa_mobile/features/profile/presentation/profile_page.dart';
import 'package:aioa_mobile/features/requests/presentation/leave_request_detail_page.dart';
import 'package:aioa_mobile/features/requests/presentation/leave_request_list_page.dart';
import 'package:aioa_mobile/features/tasks/presentation/tasks_page.dart';
import 'package:aioa_mobile/features/workspace/presentation/workspace_page.dart';
import 'package:flutter/material.dart';
@@ -27,5 +29,11 @@ final appRouter = GoRouter(
child: const LeaveFormPage(),
),
),
GoRoute(path: '/leave', builder: (_, _) => const LeaveRequestListPage()),
GoRoute(
path: '/leave/:id',
builder: (_, state) =>
LeaveRequestDetailPage(id: state.pathParameters['id']!),
),
],
);