Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drawer Section Done, #125

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/new_ui/screens/committees_screen/committees_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ class _CommitteesScreenState extends State<CommitteesScreen> {
double _height = MediaQuery.of(context).size.height;
double _width = MediaQuery.of(context).size.width;
return Scaffold(
appBar: CommonAppbar(),
appBar: const CommonAppbar(),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
/*Padding(
padding: const EdgeInsets.all(8.0).copyWith(
top: 15,
),
Expand All @@ -58,7 +58,7 @@ class _CommitteesScreenState extends State<CommitteesScreen> {
.titleMedium!
.copyWith(fontWeight: FontWeight.bold, fontSize: 30),
),
),
),*/
const SizedBox(
height: 25,
),
Expand Down
608 changes: 305 additions & 303 deletions lib/new_ui/screens/main_screen/main_screen.dart

Large diffs are not rendered by default.

25 changes: 10 additions & 15 deletions lib/new_ui/screens/main_screen/widgets/main_bottom_nav_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import 'package:tsec_app/provider/auth_provider.dart';
import 'package:tsec_app/new_ui/screens/profile_screen/profile_screen.dart';
import 'package:tsec_app/provider/railway_concession_provider.dart';

import '../../notes_screen/notes_screen.dart';

class MainBottomNavBar extends ConsumerStatefulWidget {
String currentBottomNavPage;
Function changeCurrentBottomNavPage;
Expand Down Expand Up @@ -48,7 +50,7 @@ class _HomeScreenState extends ConsumerState<MainBottomNavBar> {
});
},
),
"attendance": ERPScreen(),
"notes": NotesScreen(),
"timetable": const TimeTable(),
"concession": const RailwayConcessionScreen(),
"profile": ProfilePage(
Expand All @@ -64,7 +66,6 @@ class _HomeScreenState extends ConsumerState<MainBottomNavBar> {
});
},
),
"attendance": ERPScreen(),
"profile": ProfilePage(
justLoggedIn: false,
)
Expand All @@ -89,27 +90,21 @@ class _HomeScreenState extends ConsumerState<MainBottomNavBar> {
elevation: 0,
showSelectedLabels: false,
showUnselectedLabels: false,
unselectedItemColor: Colors.white,
selectedItemColor: Colors.white,
unselectedItemColor: Colors.blue,
selectedItemColor: Colors.blue,
items: [
BottomNavigationBarItem(
backgroundColor: Colors.transparent,
activeIcon: Icon(Icons.home),
icon: Icon(Icons.home_outlined),
activeIcon: Icon(Icons.home,),
icon: Icon(Icons.home_outlined,),
label: "Home",
),
BottomNavigationBarItem(
backgroundColor: Colors.transparent,
icon: Icon(Icons.people_outline),
activeIcon: Icon(Icons.people_rounded),
label: "Library",
),
if(user.isStudent) ...[
BottomNavigationBarItem(
backgroundColor: Colors.transparent,
activeIcon: Icon(Icons.calendar_today),
icon: Icon(Icons.calendar_today_outlined),
label: "Time Table",
activeIcon: Icon(Icons.notes),
icon: Icon(Icons.notes_outlined),
label: "Notes",
),
BottomNavigationBarItem(
backgroundColor: Colors.transparent,
Expand Down
6 changes: 2 additions & 4 deletions lib/new_ui/screens/notes_screen/notes_screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import 'dart:collection';
import 'dart:ui';

import 'package:animations/animations.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
Expand Down Expand Up @@ -188,13 +186,13 @@ class _NotesScreenState extends ConsumerState<NotesScreen> {
child: CustomScrollView(
slivers: [
SliverAppBar(
leading: _buildNavigation(
/*leading: _buildNavigation(
context,
icon: const Icon(Icons.chevron_left_rounded),
onPressed: () {
GoRouter.of(context).pop();
},
),
),*/
backgroundColor: Colors.transparent,
floating: false,
pinned: false,
Expand Down
55 changes: 33 additions & 22 deletions lib/new_ui/screens/railway_screen/railway_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -825,30 +825,41 @@ class _RailwayConcessionScreenState
? Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.start,
children: [
FilledButton(
onPressed: () {
ref
.read(railwayConcessionOpenProvider.state)
.state = true;
},
style: FilledButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
10.0), // Set the border radius
),
SizedBox(
width: 10,
),
Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(color: Theme.of(context).colorScheme.tertiaryContainer,blurRadius: 5,spreadRadius: 3)
],
),
child: Padding(
padding:
const EdgeInsets.fromLTRB(22, 12, 22, 12),
child: Text('Apply',
style: Theme.of(context)
.textTheme
.headlineMedium!
.copyWith(
color: Colors.black,
)),
child: FilledButton(
onPressed: () {
ref
.read(railwayConcessionOpenProvider.state)
.state = true;
},
style: FilledButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
10.0), // Set the border radius
),
backgroundColor: Theme.of(context).colorScheme.tertiaryContainer,
),
child: Padding(
padding:
const EdgeInsets.fromLTRB(22, 12, 22, 12),
child: Text('Apply',
style: Theme.of(context)
.textTheme
.headlineMedium!
.copyWith(
color: Colors.white,
)),
),
),
),
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:tsec_app/models/concession_details_model/concession_details_model.dart';
import 'package:tsec_app/provider/concession_provider.dart';
import 'package:tsec_app/utils/railway_enum.dart';
Expand Down Expand Up @@ -44,6 +45,9 @@ class _ConcessionStatusModalState extends ConsumerState<ConcessionStatusModal> {
height: 50,
width: size.width*0.6,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(color: Colors.green.shade400,spreadRadius: 3,blurRadius: 5),
],
color: concessionDetails?.status == ConcessionStatus.rejected
? Theme.of(context).colorScheme.error
: widget.canIssuePass(concessionDetails, lastPassIssued, duration)
Expand All @@ -57,15 +61,16 @@ class _ConcessionStatusModalState extends ConsumerState<ConcessionStatusModal> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Status : ${concessionDetails?.status == ConcessionStatus.rejected
concessionDetails?.status != null ? getStatusText(concessionDetails!.status) : "",
/*"Status : ${concessionDetails?.status == ConcessionStatus.rejected
? "Rejected"
: concessionDetails?.status ==
ConcessionStatus.unserviced
? "Pending"
: widget.canIssuePass(
concessionDetails, lastPassIssued, duration)
? "Can apply"
: ""}",
: ""}",*/
style: Theme.of(context).textTheme.headlineSmall!.copyWith(
color: Colors.black,
fontWeight: FontWeight.w600,
Expand All @@ -75,4 +80,13 @@ class _ConcessionStatusModalState extends ConsumerState<ConcessionStatusModal> {
),
);
}

String getStatusText(String status){
if(status == ConcessionStatus.rejected){
return "Sorry Cnncession Rejected";
}else if(status == ConcessionStatus.unserviced){
return "Pending";
}
return "You can apply for new pass";
}
}
21 changes: 11 additions & 10 deletions lib/screens/departmentlist_screen/department_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,42 @@ class DepartmentList extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Scaffold(
return const Scaffold(
appBar: CommonAppbar(),
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
/*Padding(
padding: const EdgeInsets.all(8.0),
child: Text("Department", style: Theme.of(context).textTheme.titleLarge),
),
const DeptWidget(
),*/
DeptWidget(
image: "aids",
department: DepartmentEnum.aids,
),
const DeptWidget(
DeptWidget(
image: "extc",
department: DepartmentEnum.extc,
),
const DeptWidget(
DeptWidget(
image: "cs",
department: DepartmentEnum.cs,
),
const DeptWidget(
DeptWidget(
image: "it",
department: DepartmentEnum.it,
),
const DeptWidget(
DeptWidget(
image: "biomed",
department: DepartmentEnum.biomed,
),
const DeptWidget(
DeptWidget(
image: "biotech",
department: DepartmentEnum.biotech,
),
const DeptWidget(
DeptWidget(
image: "chem",
department: DepartmentEnum.chem,
),
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/notification_screen/notification_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class _NotificationScreenState extends State<NotificationScreen> {
title: "Notifications",
image: Image.asset(ImageAssets.committes),
),
)
),
], body: Column(),
/*body: FirestoreListView<NotificationModel>(
query: locator<NotificationService>()
Expand Down
Loading