Skip to content

Commit

Permalink
feat: fees tool done
Browse files Browse the repository at this point in the history
  • Loading branch information
IamMuuo committed Jul 7, 2024
1 parent 0eb40c8 commit 9d2e570
Show file tree
Hide file tree
Showing 11 changed files with 253 additions and 261 deletions.
4 changes: 3 additions & 1 deletion lib/constants/tools.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ final List<Map<String, dynamic>> allTools = [
"name": "Fees statements",
"action": "Preview my fees statements",
"image": "assets/images/coin.png",
"ontap": () {},
"ontap": () {
Get.to(const FeesPage());
},
"description": "Having trouble tracking your finaces? We're here for you"
},

Expand Down
21 changes: 21 additions & 0 deletions lib/controllers/user_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,27 @@ class UserController extends GetxController {

if (loadedUser != null) {
user.value = loadedUser;
final data = await login(
user.value!.admissionNumber,
user.value!.password,
);

data.fold((l) {
Get.rawSnackbar(
messageText: const Text(
"Failed login",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
),
),
duration: const Duration(seconds: 5),
isDismissible: false,
backgroundColor: Colors.red[400]!,
icon: const Icon(Ionicons.magnet, color: Colors.white),
);
}, (r) {});

isLoggedIn.value = true;
}
}
Expand Down
1 change: 0 additions & 1 deletion lib/exports/barrel.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export 'package:academia/tools/exam_timetable/exams_timetable_page.dart';
export 'package:academia/tools/fees/fees_page.dart';
export 'package:flutter_pdfview/flutter_pdfview.dart';
export 'package:academia/widgets/info_card.dart';
export 'package:cached_network_image/cached_network_image.dart';
Expand Down
27 changes: 13 additions & 14 deletions lib/pages/dashboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,19 @@ class DashBoard extends StatelessWidget {
floating: false,
snap: false,
),
Obx(
() => SliverVisibility(
visible: storyController.stories.isNotEmpty,
sliver: const SliverToBoxAdapter(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
HomeScreenStoryWidget(),
],
),
),
),
),
// Obx(
// () => const SliverVisibility(
// sliver: SliverToBoxAdapter(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.stretch,
// children: [
// HomeScreenStoryWidget(),
// ],
// ),
// ),
// ),
// ),
SliverToBoxAdapter(
child: Container(
padding: const EdgeInsets.all(22),
Expand Down
1 change: 0 additions & 1 deletion lib/pages/layout_page.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:academia/exports/barrel.dart';
import 'package:academia/pages/profile_page.dart';
import 'package:get/get.dart';

class LayoutPage extends StatefulWidget {
Expand Down
1 change: 1 addition & 0 deletions lib/tools/fees/fees.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export 'pages/pages.dart';
244 changes: 0 additions & 244 deletions lib/tools/fees/fees_page.dart

This file was deleted.

Loading

0 comments on commit 9d2e570

Please sign in to comment.