Skip to content

Commit

Permalink
make announcements , sort announcements , faculty views
Browse files Browse the repository at this point in the history
  • Loading branch information
anoop-rkt committed Apr 19, 2024
1 parent 31280cf commit 8fc101c
Show file tree
Hide file tree
Showing 16 changed files with 1,106 additions and 699 deletions.
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true"
android:enableOnBackInvokedCallback="true">
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
Expand Down
12 changes: 0 additions & 12 deletions db/cse_faculty.csv

This file was deleted.

12 changes: 0 additions & 12 deletions db/ece_faculty.csv

This file was deleted.

12 changes: 0 additions & 12 deletions db/mech_faculty.csv

This file was deleted.

12 changes: 0 additions & 12 deletions db/sm_faculty.csv

This file was deleted.

9 changes: 4 additions & 5 deletions lib/api.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
//Server and local links
String klocalLink = "127.0.0.1:8000";
String kserverLink = "172.27.113.117:8000";
String kserverLink = "192.168.137.1:8000";
// String kserverLink = "172.27.16.214:8000";

//Login Service
String kAuthUrl = "172.27.113.117:8000";
String kAuthLogin = "/api/auth/login/";
// String kAuthUrl = "172.27.16.214:8000";
String kAuthUrl = "192.168.137.1:8000";
// String kAuthLogin = "/accounts/login";

//Profile Service
Expand All @@ -16,9 +15,9 @@ String kProfile = "/api/profile/";
String kAcademicProcedures = "/academic-procedures/api/stu/";

//Department details
String kFacView = "/dep/api/fac-view/";
String kDepMain = "/dep/api/dep-main/";
String kAllStudents = "/dep/api/all-students/";
String kDepartmentAnnouncements = "/dep/api/announcements/";
// String kDepMainAnnouncements = "/dep/api/dep-main/";

//Complaint
String kComplaintService = "/complaint/api/studentcomplain";
Expand Down
16 changes: 13 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ import 'package:fusion/screens/Programme_Curriculum/Programme/programme_home_pag
import 'package:fusion/screens/Programme_Curriculum/Programme_Info/programme_info.dart';
import 'package:fusion/screens/Programme_Curriculum/programme_curriculum_home.dart';
import 'package:fusion/screens/Department/department_homepage.dart';
import 'package:fusion/screens/Department/Student_details/student_details.dart';
import 'package:fusion/screens/Department/Alumni_details/alumni_details.dart';
import 'package:fusion/screens/Department/Announcements/make_announcement.dart';
import 'package:fusion/screens/Department/Announcements/browse_announcement.dart';

import 'package:fusion/screens/landing_page.dart';
import 'package:fusion/screens/Healthcenter/healthcentermodule.dart';
Expand All @@ -62,21 +66,23 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
MediaQueryData windowData =
MediaQueryData.fromWindow(WidgetsBinding.instance.window);
MediaQueryData.fromWindow(WidgetsBinding.instance.window);
windowData = windowData.copyWith(
textScaleFactor: 1,
);
var selectedProgramme;
Map<String, String> selectedDepartmentData;
return MediaQuery(
data: windowData,
child: MaterialApp(
useInheritedMediaQuery: true,
title: 'Fusion',
debugShowCheckedModeBanner: false,
theme: ThemeData(
// primarySwatch: Colors.blueGrey,
// primarySwatch: Colors.blueGrey,
// colorSchemeSeed: Color(0xFF2085D0),
colorSchemeSeed: Color(0xFFF36C35),
fontFamily: 'Nunito',
fontFamily: 'Nunito',
useMaterial3: true,
),
initialRoute: '/landing',
Expand Down Expand Up @@ -108,6 +114,10 @@ class MyApp extends StatelessWidget {
'/programme_curriculum_home/courses_info': (context) => CoursesInfo(),
'/department_home_page': (context) => DepartmentScreen(
ModalRoute.of(context)!.settings.arguments.toString()),
'/student_details': (context) => StudentDetails(),
'/alumni_details': (context) => AlumniDetails(),
'/browse_announcement': (context) => BrowseAnnouncement(),
'/make_announcement': (context) => MakeAnnouncement(),
'/establishment': (context) => Establishment(),
'/gymkhana_homepage': (context) => GymkhanaHomepage(),
'/gymkhana_homepage/apply': (context) => Apply(),
Expand Down
45 changes: 30 additions & 15 deletions lib/screens/Department/Alumni_details/alumni_details.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import 'package:flutter/material.dart';
import 'package:fusion/Components/appBar.dart';
import 'package:fusion/Components/side_drawer.dart';
import 'package:fusion/constants.dart';

class AlumniDetailsScreen extends StatefulWidget {
class AlumniDetails extends StatefulWidget {
@override
_AlumniDetailsState createState() => _AlumniDetailsState();
}

class _AlumniDetailsState extends State<AlumniDetailsScreen>
class _AlumniDetailsState extends State<AlumniDetails>
with SingleTickerProviderStateMixin {
late TabController _tabController;
List<String> departmentOptions = [
Expand Down Expand Up @@ -54,14 +55,12 @@ class _AlumniDetailsState extends State<AlumniDetailsScreen>
_tabController =
TabController(length: departmentOptions.length, vsync: this);
_tabController.addListener(_handleTabSelection);
_tabController.index = 0; // Initialize the index
// fetchAlumnniDetails();
_tabController.index = 0;
}

void _handleTabSelection() {
setState(() {
selectedDepartment = departmentOptions[_tabController.index];
// fetchAlumniDetails();
});
}

Expand All @@ -81,14 +80,14 @@ class _AlumniDetailsState extends State<AlumniDetailsScreen>
children: [
// SizedBox(height: 16),
Container(
color: Colors.deepOrangeAccent, // Set background color here
color: kPrimaryColor,
child: TabBar(
controller: _tabController,
isScrollable: true,
indicatorColor: Colors.black,
labelColor: Colors.black,
unselectedLabelColor:
Colors.white, // Set unselected font color here
Colors.white,
tabs: departmentOptions
.map((department) => Tab(
text: department,
Expand All @@ -109,32 +108,48 @@ class _AlumniDetailsState extends State<AlumniDetailsScreen>
borderRadius: BorderRadius.circular(10.0),
),
child: DataTable(
headingRowColor: MaterialStateColor.resolveWith(
(states) => Colors.black),
columns: [
DataColumn(
label: Text('ID',
style: TextStyle(color: Colors.white)),
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black)),
),
DataColumn(
label: Text('Alumni Name',
style: TextStyle(color: Colors.white)),
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black)),
),
DataColumn(
label: Text('Sex',
style: TextStyle(color: Colors.white)),
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black)),
),
DataColumn(
label: Text('Date of Birth',
style: TextStyle(color: Colors.white)),
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black)),
),
DataColumn(
label: Text('Address',
style: TextStyle(color: Colors.white)),
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black)),
),
DataColumn(
label: Text('Phone Number',
style: TextStyle(color: Colors.white)),
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black)),
),
],
rows: alumniDetails
Expand Down
Loading

0 comments on commit 8fc101c

Please sign in to comment.