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

RSPC (GAD-10) : Module Added to App #128

Open
wants to merge 15 commits into
base: test
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions db/patents.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"Patend ID","IPD Form","Patent PDF","Status"
"17","EDP_Presentation_tGhmx5M.pdf","EDP_Presentation_cjWYh29.pdf","Pending"
"16","EDP_Presentation_dDC7iY8.pdf","EDP_Presentation_gtDJ0Gy.pdf","Approved"
"19","EDP_Presentation_QwCDZAv.pdf","EDP_Presenstation_gethd0.pdf","Disapproved"
"15","EDP_Presentation_QWWeeee.pdf","EDP_Presentation_G2vrh3s.pdf","Pending"
26 changes: 19 additions & 7 deletions lib/Components/side_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,27 +122,39 @@ class _SideDrawerState extends State<SideDrawer> {
isActive: true,
),
ModulesPadding(
line: 'Gymkhana Module',
pageMover: '/gymkhana_homepage'),
line: 'Gymkhana Module',
pageMover: '/gymkhana_homepage',
),

ModulesPadding(
line: 'Establishment Module',
pageMover: '/establishment'),
line: 'Establishment Module',
pageMover: '/establishment',
),
ModulesPadding(
line: 'Library Module',
pageMover: '/library_homepage'),
line: 'Library Module',
pageMover: '/library_homepage',
),
ModulesPadding(line: 'Awards & Scholarship Module'),
ModulesPadding(
line: 'Complaint Module', pageMover: '/complaint'),
line: 'Complaint Module',
pageMover: '/complaint',
),
ModulesPadding(line: 'Central Mess Module'),
ModulesPadding(line: 'Feeds Module'),
ModulesPadding(
line: 'Health Center Module',
pageMover: '/health_center',
),

ModulesPadding(line: 'Leave Module'),
ModulesPadding(line: 'Placement Module'),
ModulesPadding(line: 'Visitors Hostel Module'),
ModulesPadding(line: 'File Tracking Module'),
ModulesPadding(
line: 'RSPC Module',
pageMover: '/rspc',
isActive: true,
),
],
),
)
Expand Down
20 changes: 20 additions & 0 deletions lib/Components/utils.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import 'package:flutter/material.dart';

class Utils {
final primarycolor = Colors.purple;
final primarybackgroundcolor = Colors.white;
final lightgrey = Colors.grey;
Decoration containerBorder(Color col) {
return BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(color: primarycolor));
}

Widget leadingPopIconsButton(Color cc, BuildContext context) {
return IconButton(
onPressed: () {
Navigator.pop(context);
},
icon: Icon(Icons.arrow_back_ios));
}
}
9 changes: 9 additions & 0 deletions lib/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ const kGymkhanaMemberRecords = '/api/gymkhana/members_record';
//HealthCentre
String kHealthCentreStudent = "/healthcenter/api/student";

//RSPC

String kResearchProjectNew = "/research_procedures/api/new_research_project";
String kConsultantProjectNew =
"/research_procedures/api/new_consultant_project";
String kResearchProjects = "/research_procedures/api/get_research_projects";
String kConsultancyProjects =
"/research_procedures/api/get_consultancy_projects";

//------------Screens------------

//screens/Academic/Current_Semester
Expand Down
24 changes: 21 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,19 @@ import 'package:fusion/screens/Programme_Curriculum/Discipline/discipline.dart';
import 'package:fusion/screens/Programme_Curriculum/Programme/programme_home_page.dart';
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/RSPC/Patents/patents.dart';
import 'package:fusion/screens/RSPC/ConsultancyProject/consultancy_project.dart';
import 'package:fusion/screens/RSPC/ResearchProject/research_project.dart';
import 'package:fusion/screens/RSPC/ViewProject/consultancy_projects.dart';
import 'package:fusion/screens/RSPC/ViewProject/research_projects.dart';
import 'package:fusion/screens/landing_page.dart';
import 'package:fusion/screens/Healthcenter/healthcentermodule.dart';
import 'package:fusion/screens/Healthcenter/feedback.dart';
import 'package:fusion/screens/Healthcenter/viewschedule.dart';
import 'package:fusion/screens/Healthcenter/history.dart';
import 'package:fusion/screens/Healthcenter/HealthCenter.dart';
import 'package:fusion/services/service_locator.dart';
import 'screens/RSPC/rspc.dart';

void main() {
WidgetsFlutterBinding.ensureInitialized();
Expand All @@ -60,7 +66,7 @@ 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,
);
Expand All @@ -71,10 +77,10 @@ class MyApp extends StatelessWidget {
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 @@ -127,6 +133,18 @@ class MyApp extends StatelessWidget {
'/health_center/feedback': (context) => FeedBack(),
'/health_center/viewschedule': (context) => ViewSchedule(),
'/health_center/history': (context) => History(),
'/rspc': (context) =>
RSPCModule(ModalRoute.of(context)!.settings.arguments.toString()),
'/rspc/research_project': (context) => AddResearchProject(
ModalRoute.of(context)!.settings.arguments.toString()),
'/rspc/consultancy_project': (context) => AddConsultancyProject(
ModalRoute.of(context)!.settings.arguments.toString()),
'/rspc/patents': (context) =>
Patents(ModalRoute.of(context)!.settings.arguments.toString()),
'/rspc/view_research_project': (context) => ResearchProject(
ModalRoute.of(context)!.settings.arguments.toString()),
'/rspc/view_consultancy_project': (context) => ConsultancyProject(
ModalRoute.of(context)!.settings.arguments.toString()),
},
),
);
Expand Down
19 changes: 19 additions & 0 deletions lib/models/project.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class ProjectData {
List? projects;

ProjectData({
this.projects,
});

factory ProjectData.fromJson(Map json) {
return ProjectData(
projects: json["projects"],
);
}

Map<String, dynamic> toJson() {
return {
"projects": this.projects,
};
}
}
4 changes: 3 additions & 1 deletion lib/screens/Gymkhana/GymkhanaHomepage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import 'package:fusion/models/profile.dart';
import 'package:fusion/services/gymkhana_service.dart';
import 'package:fusion/services/service_locator.dart';
import 'package:fusion/services/storage_service.dart';
import 'package:http/http.dart' as http;
import 'package:http/http.dart';

class GymkhanaHomepage extends StatefulWidget {
@override
Expand Down Expand Up @@ -70,7 +72,7 @@ class _GymkhanaHomepageState extends State<GymkhanaHomepage> {
//TODO: uncomment when API is functioning

try {
//Response response = await gymkhanaService.getGymkhanaData();
Response response = await gymkhanaService.getGymkhanaData();

setState(() {
//TODO: uncomment when API is functioning
Expand Down
1 change: 0 additions & 1 deletion lib/screens/Healthcenter/Appointment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class Appointment extends StatefulWidget {

class _AppointmentState extends State<Appointment> {
int _value = 1;

@override
Widget build(BuildContext context) {
return Container(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class _InfoCardState extends State<InfoCard> {
setState(() {
try {
service.markRead(widget.notification.id!.toString());
}catch(e){
} catch (e) {
print(e);
}
});
Expand Down
3 changes: 3 additions & 0 deletions lib/screens/LoginandDashboard/dashboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:fusion/models/dashboard.dart';
import 'package:fusion/screens/LoginandDashboard/DashboardComponents/cardItems.dart';
import 'package:fusion/services/dashboard_service.dart';
import 'package:http/http.dart';
import 'dart:convert';

class Dashboard extends StatefulWidget {
static String tag = 'home-page';
Expand Down Expand Up @@ -46,9 +47,11 @@ class _DashboardState extends State<Dashboard> {
getData() async {
try {
Response response = await dashboardService.getDashboard();

Response response2 = await profileService.getProfile();
setState(() {
data = DashboardData.fromJson(jsonDecode(response.body));

data2 = ProfileData.fromJson(jsonDecode(response2.body));
_loading = false;
});
Expand Down
33 changes: 18 additions & 15 deletions lib/screens/LoginandDashboard/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class _LoginPageState extends State<LoginPage> {

@override
Widget build(BuildContext context) {

final Widget logoWidget = CircleAvatar(
backgroundColor: Colors.transparent,
radius: 54.0,
Expand All @@ -30,25 +29,26 @@ class _LoginPageState extends State<LoginPage> {
keyboardType: TextInputType.emailAddress,
autofocus: false,
decoration: InputDecoration(
label: Text('Username', style: TextStyle(
fontSize: 12.0,
),),
label: Text(
'Username',
style: TextStyle(
fontSize: 12.0,
),
),
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
border: OutlineInputBorder(
// borderRadius: BorderRadius.circular(32.0),
),
// borderRadius: BorderRadius.circular(32.0),
),
),
onChanged: (input) {
username = input;
},
validator: (String? value) {
if (value?.length == 0) {
return 'Please enter username';
}
else if (value?.contains('@') == true) {
} else if (value?.contains('@') == true) {
return 'Please enter username only';
}

},
autofillHints: [AutofillHints.username],
);
Expand All @@ -57,13 +57,16 @@ class _LoginPageState extends State<LoginPage> {
autofocus: false,
obscureText: true,
decoration: InputDecoration(
label: Text('Password', style: TextStyle(
fontSize: 12.0,
),),
label: Text(
'Password',
style: TextStyle(
fontSize: 12.0,
),
),
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
border: OutlineInputBorder(
// borderRadius: BorderRadius.circular(32.0),
),
// borderRadius: BorderRadius.circular(32.0),
),
),
onChanged: (input) {
pass = input;
Expand Down Expand Up @@ -141,7 +144,7 @@ class _LoginPageState extends State<LoginPage> {
),
Padding(
padding: EdgeInsets.only(bottom: 15),
child: emailFormField,
child: emailFormField,
),
Padding(
padding: EdgeInsets.only(bottom: 15),
Expand Down
Loading