diff --git a/android/build.gradle b/android/build.gradle index b3a325d5..aa32674d 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,7 +6,8 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.2.2' + // classpath 'com.android.tools.build:gradle:4.2.2' + classpath 'com.android.tools.build:gradle:7.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/h.json b/h.json new file mode 100644 index 00000000..92e3cdba --- /dev/null +++ b/h.json @@ -0,0 +1,63 @@ +[ + { + "status": "200", + "message": "Previous Scholarship and Awards Details", + "data": [ + { + "application_id": 1, + "type": "Award", + "data": [ + { + "Award_Name": "Name", + "Winner": "winner Name", + "Email": "email@gmail.com", + "Year": "2018", + "Phone Number": "984635378", + "Description": "This is Description" + } + ] + }, + { + "application_id": 2, + "type": "Scholarship", + "data": [ + { + "Scholarship_Name": "Name", + "Winner": "winner name", + "Email": "email@gmail.com", + "Year": "2018", + "Phone Number": "984635378", + "Description": "This is Description" + } + ] + } + ] + }, + { + "status": "200", + "message": "SPACS Applications", + "data": [ + { + "application_id": 1, + "data": { + "Name": "Application Name", + "Applied Date": "2021-03-14", + "Status": "Pending" + } + }, + { + "application_id": 2, + "data": { + "Name": "Application Name", + "Applied Date": "2020-08-12", + "Status": "Pending" + } + } + ] + }, + { + "status": "200", + "data": "Application added successfully" + } + +] diff --git a/j.md b/j.md new file mode 100644 index 00000000..67f1ad7c --- /dev/null +++ b/j.md @@ -0,0 +1,11 @@ +url(r'^$', views.spacs, name='spacs'), + url(r'^student_view/$', views.student_view, name='student_view'), + url(r'^convener_view/$', views.convener_view, name='convener_view'), + url(r'^staff_view/$', views.staff_view, name='staff_view'), + url(r'^stats/$', views.stats, name='stats'), + url(r'^convenerCatalogue/$', views.convenerCatalogue, name='convenerCatalogue'), + url(r'^getWinners/$', views.getWinners, name='getWinners'), + url(r'^get_MCM_Flag/$', views.get_MCM_Flag, name='get_MCM_Flag'), + url(r'^getConvocationFlag/$', views.getConvocationFlag, name='getConvocationFlag'), + url(r'^getContent/$', views.getContent, name='getContent'), + url(r'^updateEndDate/$', views.updateEndDate, name='updateEndDate'), \ No newline at end of file diff --git a/lib.zip b/lib.zip new file mode 100644 index 00000000..02dd53ab Binary files /dev/null and b/lib.zip differ diff --git a/lib/Components/appBar.dart b/lib/Components/appBar.dart index 9f4cb686..5746a53d 100644 --- a/lib/Components/appBar.dart +++ b/lib/Components/appBar.dart @@ -27,3 +27,4 @@ class DefaultAppBar { ); } } + diff --git a/lib/Components/button.dart b/lib/Components/button.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/Components/side_drawer.dart b/lib/Components/side_drawer.dart index be08db0e..8ac362a0 100644 --- a/lib/Components/side_drawer.dart +++ b/lib/Components/side_drawer.dart @@ -122,25 +122,36 @@ class _SideDrawerState extends State { isActive: true, ), ModulesPadding( - line: 'Gymkhana Module', - pageMover: '/gymkhana_homepage'), + line: 'Gymkhana Module', + pageMover: '/gymkhana_homepage', + isActive: true,), + ModulesPadding( line: 'Establishment Module', - pageMover: '/establishment'), + pageMover: '/establishment', + isActive: true,), ModulesPadding( line: 'Library Module', - pageMover: '/library_homepage'), - ModulesPadding(line: 'Awards & Scholarship Module'), + pageMover: '/library_homepage', + isActive: true,), ModulesPadding( - line: 'Complaint Module', pageMover: '/complaint'), - ModulesPadding(line: 'Central Mess Module'), - ModulesPadding(line: 'Feeds Module'), + line: 'Awards & Scholarship Module', + pageMover: '/scholarship_awards', + isActive: true, + ), + ModulesPadding( + line: 'Complaint Module', pageMover: '/complaint', + isActive: true,), + ModulesPadding(line: 'Central Mess Module', + isActive: true,), + ModulesPadding(line: 'Feeds Module', + isActive: true,), ModulesPadding( line: 'Health Center Module', pageMover: '/health_center', ), ModulesPadding(line: 'Leave Module'), - ModulesPadding(line: 'Placement Module'), + ModulesPadding(line: 'Placement Module', isActive:true), ModulesPadding(line: 'Visitors Hostel Module'), ModulesPadding(line: 'File Tracking Module'), ], diff --git a/lib/api.dart b/lib/api.dart index 802bee2d..30beca0f 100644 --- a/lib/api.dart +++ b/lib/api.dart @@ -1,9 +1,9 @@ //Server and local links String klocalLink = "127.0.0.1:8000"; -String kserverLink = "172.27.16.215:80"; +String kserverLink = "172.27.16.214:80"; //Login Service -String kAuthUrl = "172.27.16.215:80"; +String kAuthUrl = "172.27.16.214:80"; String kAuthLogin = "/api/auth/login/"; //Profile Service @@ -29,6 +29,9 @@ const kGymkhanaMemberRecords = '/api/gymkhana/members_record'; //HealthCentre String kHealthCentreStudent = "/healthcenter/api/student"; +// Scholarship +String kAwardsCatalogue = "/spacs/api/awardcatalogue"; + //------------Screens------------ //screens/Academic/Current_Semester diff --git a/lib/main.dart b/lib/main.dart index 9ca81ff8..7389fd06 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -131,4 +131,4 @@ class MyApp extends StatelessWidget { ), ); } -} +} \ No newline at end of file diff --git a/lib/screens/Gymkhana/Apply.dart b/lib/screens/Gymkhana/Apply.dart index 20874f9e..9ca09a1c 100644 --- a/lib/screens/Gymkhana/Apply.dart +++ b/lib/screens/Gymkhana/Apply.dart @@ -37,7 +37,6 @@ class _ApplyState extends State with SingleTickerProviderStateMixin { @override Widget build(BuildContext context) { - //TODO : Create Drop Down For Club Selection, Automatic Form Filling //final GymkhanaData data = ModalRoute.of(context)!.settings.arguments as GymkhanaData; @@ -112,7 +111,8 @@ class _ApplyState extends State with SingleTickerProviderStateMixin { contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), border: OutlineInputBorder( - borderRadius: BorderRadius.circular(32.0), + borderRadius: BorderRadius.circular(0), + // borderRadius: BorderRadius.zero(32.0) ), ), validator: formvalidate, @@ -126,7 +126,7 @@ class _ApplyState extends State with SingleTickerProviderStateMixin { contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), border: OutlineInputBorder( - borderRadius: BorderRadius.circular(32.0), + borderRadius: BorderRadius.circular(0), ), ), validator: formvalidate, @@ -140,7 +140,7 @@ class _ApplyState extends State with SingleTickerProviderStateMixin { contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), border: OutlineInputBorder( - borderRadius: BorderRadius.circular(32.0), + borderRadius: BorderRadius.circular(0), ), ), validator: formvalidate, @@ -149,13 +149,14 @@ class _ApplyState extends State with SingleTickerProviderStateMixin { Padding( padding: EdgeInsets.only(top: 20.0), child: TextFormField( - maxLength: 3, + maxLength: 8, + maxLines: 5, decoration: InputDecoration( hintText: "Achievements", contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), border: OutlineInputBorder( - borderRadius: BorderRadius.circular(32.0), + borderRadius: BorderRadius.circular(0), ), ), validator: formvalidate, @@ -173,6 +174,11 @@ class _ApplyState extends State with SingleTickerProviderStateMixin { ), ), style: ButtonStyle( + shape: MaterialStateProperty.all< + RoundedRectangleBorder>( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18.0), + side: BorderSide(color: Colors.red))), backgroundColor: MaterialStateProperty.resolveWith( (Set states) { @@ -241,7 +247,7 @@ class _ApplyState extends State with SingleTickerProviderStateMixin { contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), border: OutlineInputBorder( - borderRadius: BorderRadius.circular(32.0), + borderRadius: BorderRadius.circular(0), ), ), validator: formvalidate, @@ -255,7 +261,7 @@ class _ApplyState extends State with SingleTickerProviderStateMixin { contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), border: OutlineInputBorder( - borderRadius: BorderRadius.circular(32.0), + borderRadius: BorderRadius.circular(0), ), ), validator: formvalidate, @@ -269,7 +275,7 @@ class _ApplyState extends State with SingleTickerProviderStateMixin { contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), border: OutlineInputBorder( - borderRadius: BorderRadius.circular(32.0), + borderRadius: BorderRadius.circular(0), ), ), validator: formvalidate, @@ -283,7 +289,7 @@ class _ApplyState extends State with SingleTickerProviderStateMixin { contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), border: OutlineInputBorder( - borderRadius: BorderRadius.circular(32.0), + borderRadius: BorderRadius.circular(0), ), ), validator: formvalidate, @@ -297,21 +303,53 @@ class _ApplyState extends State with SingleTickerProviderStateMixin { contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), border: OutlineInputBorder( - borderRadius: BorderRadius.circular(32.0), + borderRadius: BorderRadius.circular(0), ), ), validator: formvalidate, ), ), + Padding( + padding: EdgeInsets.all(25.0), + child: ElevatedButton( + onPressed: validate, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Choose File", + style: TextStyle(fontSize: 14.0), + ), + ), + style: ButtonStyle( + padding: MaterialStateProperty.all( + EdgeInsets.all(4)), + shape: MaterialStateProperty.all< + RoundedRectangleBorder>( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18.0), + side: BorderSide(color: Colors.red))), + backgroundColor: + MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.pressed)) + return Colors.deepOrange; + return Colors + .deepOrangeAccent; // Use the component's default. + }, + ), + ), + ), + ), Padding( padding: EdgeInsets.only(top: 20.0), child: TextFormField( + maxLines: 5, decoration: InputDecoration( hintText: "Detail and Description", contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), border: OutlineInputBorder( - borderRadius: BorderRadius.circular(32.0), + borderRadius: BorderRadius.circular(0), ), ), validator: formvalidate, @@ -329,6 +367,11 @@ class _ApplyState extends State with SingleTickerProviderStateMixin { ), ), style: ButtonStyle( + shape: MaterialStateProperty.all< + RoundedRectangleBorder>( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18.0), + side: BorderSide(color: Colors.red))), backgroundColor: MaterialStateProperty.resolveWith( (Set states) { diff --git a/lib/screens/Gymkhana/Club.dart b/lib/screens/Gymkhana/Club.dart index 84a2e567..c1da2563 100644 --- a/lib/screens/Gymkhana/Club.dart +++ b/lib/screens/Gymkhana/Club.dart @@ -63,6 +63,7 @@ class _ClubState extends State { border: Border(top: BorderSide(color: Colors.grey, width: 0.5))), child: TabBarView( children: [ + clubDetails(data.clubDetails), //DropDownDemo(), //Center(child: Text("Working on...."),), @@ -76,7 +77,9 @@ class _ClubState extends State { } Widget clubEvents(data) { + TableRow header = TableRow(children: [ + Center( child: Text("\nClub\n", style: TextStyle( @@ -149,6 +152,7 @@ class _ClubState extends State { } Widget clubDetails(data) { + TableRow header = TableRow(children: [ Center( child: Text("\nClub\n", @@ -246,6 +250,7 @@ class _ClubState extends State { return Container( color: Colors.white, padding: EdgeInsets.symmetric(vertical: 15, horizontal: 5), + child: Table( border: TableBorder.all(color: Colors.black), children: [ diff --git a/lib/screens/Gymkhana/FestBudget.dart b/lib/screens/Gymkhana/FestBudget.dart new file mode 100644 index 00000000..cdc5c578 --- /dev/null +++ b/lib/screens/Gymkhana/FestBudget.dart @@ -0,0 +1,223 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class FestBudget extends StatefulWidget { + @override + _FestBudgetState createState() => _FestBudgetState(); +} + +class _FestBudgetState extends State + with SingleTickerProviderStateMixin { + late TabController _controller; + + @override + void initState() { + // TODO: implement initState + super.initState(); + _controller = TabController(length: 2, vsync: this, initialIndex: 1); + } + + final GlobalKey formkey = GlobalKey(); + + void validate() { + if (formkey.currentState!.validate()) { + print("ok"); + } else { + print("Error"); + } + } + + String? formvalidate(value) { + //form validate function + if (value.isEmpty) { + return "Error"; + } else { + return null; + } + } + + @override + Widget build(BuildContext context) { + //TODO : Create Drop Down For Club Selection, Automatic Form Filling + //final GymkhanaData data = ModalRoute.of(context)!.settings.arguments as GymkhanaData; + + return Scaffold( + appBar: AppBar( + backgroundColor: Colors.black, + title: Text( + 'FestBudget', + style: TextStyle(fontSize: 25), + ), + ), + body: TabBarView( + controller: _controller, + children: [ + Padding( + padding: EdgeInsets.all(18.0), + child: Center( + child: Form( + key: formkey, + child: ListView( + children: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Center( + child: Container( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Text( + "Fest Budget Form", + style: TextStyle( + fontSize: 20.0, + ), + )), + ), + decoration: new BoxDecoration( + color: Colors.deepOrangeAccent, + border: new Border.all( + color: Colors.deepOrange, + width: 1.0, + style: BorderStyle.solid, + ), + boxShadow: [ + BoxShadow( + color: Colors.black, + offset: Offset(0.0, 1.0), + blurRadius: 2.0, + ) + ], + borderRadius: new BorderRadius.all( + new Radius.circular(5.0)), + ), + ), + ), + ), + SizedBox( + height: 30, + ), + TextFormField( + keyboardType: TextInputType.name, + decoration: InputDecoration( + hintText: "Fest", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(0), + ), + ), + validator: formvalidate, + ), + Padding( + padding: EdgeInsets.only(top: 20.0), + child: TextFormField( + keyboardType: TextInputType.emailAddress, + decoration: InputDecoration( + hintText: "Year", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(0), + ), + ), + validator: formvalidate, + ), + ), + Padding( + padding: EdgeInsets.only(top: 20.0), + child: TextFormField( + decoration: InputDecoration( + hintText: "Budget Amt. ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(0), + ), + ), + validator: formvalidate, + ), + ), + Padding( + padding: EdgeInsets.all(25.0), + child: ElevatedButton( + onPressed: validate, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Choose File", + style: TextStyle(fontSize: 14.0), + ), + ), + style: ButtonStyle( + padding: MaterialStateProperty.all( + EdgeInsets.all(4)), + shape: MaterialStateProperty.all< + RoundedRectangleBorder>( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18.0), + side: BorderSide(color: Colors.red))), + backgroundColor: + MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.pressed)) + return Colors.deepOrange; + return Colors + .deepOrangeAccent; // Use the component's default. + }, + ), + ), + ), + ), + Padding( + padding: EdgeInsets.only(top: 20.0), + child: TextFormField( + maxLines: 5, + decoration: InputDecoration( + hintText: "Detail and Description", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(0), + ), + ), + validator: formvalidate, + ), + ), + Padding( + padding: EdgeInsets.all(25.0), + child: ElevatedButton( + onPressed: validate, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Submit", + style: TextStyle(fontSize: 20.0), + ), + ), + style: ButtonStyle( + shape: MaterialStateProperty.all< + RoundedRectangleBorder>( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18.0), + side: BorderSide(color: Colors.red))), + backgroundColor: + MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.pressed)) + return Colors.deepOrange; + return Colors + .deepOrangeAccent; // Use the component's default. + }, + ), + ), + ), + ) + ], + ), + ), + ), + ), + ], + )); + } +} diff --git a/lib/screens/Gymkhana/GymkhanaHomepage.dart b/lib/screens/Gymkhana/GymkhanaHomepage.dart index 8b0345cb..abd9f9d5 100644 --- a/lib/screens/Gymkhana/GymkhanaHomepage.dart +++ b/lib/screens/Gymkhana/GymkhanaHomepage.dart @@ -39,16 +39,32 @@ class _GymkhanaHomepageState extends State { } Padding myContainer(String text) { - return Padding( - padding: const EdgeInsets.all(8.0), - child: Container( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: myText(text), + if (data!.profile!['user_type'] == "faculty" && text == 'Apply') { + return Padding( + padding: const EdgeInsets.all(0), + ); + } else if (data!.profile!['user_type'] == "student" && + text == 'Fest Budget') { + return Padding( + padding: const EdgeInsets.all(0), + ); + } else if (data!.profile!['user_type'] == "student" && + text == 'Submit Event Report') { + return Padding( + padding: const EdgeInsets.all(0), + ); + } else { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: myText(text), + ), + decoration: myBoxDecoration(), ), - decoration: myBoxDecoration(), - ), - ); + ); + } } @override @@ -85,58 +101,82 @@ class _GymkhanaHomepageState extends State { ], membersDetails: [ { - 'name': 'Aaaa', - 'rollno': '2019029', + 'name': 'Arnav', + 'rollno': '20bcs040', 'club': 'Cricket', 'category': 'sports' }, { - 'name': 'baaa', - 'rollno': '2019129', + 'name': 'Bhushan', + 'rollno': '21bsm015', 'club': 'Saaz', 'category': 'cultural' }, + { + 'name': 'Anjali', + 'rollno': '22bcs020', + 'club': 'Dance', + 'category': 'cultural' + }, ], clubDetails: [ { 'club': 'Avartan', - 'coord': '2018037', - 'coco': '2019008', + 'coord': '20bcs178', + 'coco': '21bds025', 'activitycal': '' }, { - 'club': 'Avartan', - 'coord': '2018037', - 'coco': '2019008', + 'club': 'Cricket', + 'coord': '20bsm037', + 'coco': '21bcs117', + 'activitycal': '' + }, + { + 'club': 'Badminton', + 'coord': '20bcs009', + 'coco': '21bec140', 'activitycal': '' }, ], clubSessions: [ { - 'venue': 'L-201', - 'date': '22 Mar 21', + 'venue': 'Sac', + 'date': '10 April 23', 'time': '6:00 PM', 'details': '' }, { - 'venue': 'L-201', - 'date': '22 Mar 21', - 'time': '6:00 PM', + 'venue': 'Oat', + 'date': '15 April 23', + 'time': '7:00 PM', + 'details': '' + }, + { + 'venue': 'L-104', + 'date': '9 April 23', + 'time': '5:00 PM', 'details': '' }, ], clubEvents: [ { - 'club': 'Avartan', - 'eventname': 'footloose', - 'incharge': 'Dr Deepmala', - 'date': '23 Aug 20' + 'club': 'Badminton ', + 'eventname': 'Tournament', + 'incharge': 'Dr Seetharam', + 'date': '10 April 23' + }, + { + 'club': 'Cricket Club', + 'eventname': 'Tournament', + 'incharge': 'Dr Seetharam', + 'date': '5 April 23' }, { 'club': 'Avartan', - 'eventname': 'footloose', - 'incharge': 'Dr Deepmala', - 'date': '23 Aug 20' + 'eventname': 'Vishu', + 'incharge': 'Dr Vijaypal', + 'date': '15 April 23' }, ], ); @@ -233,7 +273,7 @@ class _GymkhanaHomepageState extends State { ) ], borderRadius: - new BorderRadius.all(new Radius.circular(5.0)), + new BorderRadius.all(new Radius.circular(20.0)), ), ), ), @@ -246,10 +286,15 @@ class _GymkhanaHomepageState extends State { crossAxisAlignment: CrossAxisAlignment.stretch, children: [ InkWell( - child: myContainer("Apply"), + child: myContainer('Apply'), onTap: () { - Navigator.pushNamed( - context, '/gymkhana_homepage/apply'); + if (data!.profile!['user_type'] == "faculty") { + Navigator.pushNamed( + context, '/gymkhana_homepage'); + } else { + Navigator.pushNamed( + context, '/gymkhana_homepage/apply'); + } }, ), InkWell( @@ -260,7 +305,21 @@ class _GymkhanaHomepageState extends State { }, ), InkWell( - child: myContainer("Club Details"), + child: myContainer("Fest Budget"), + onTap: () { + Navigator.pushNamed( + context, '/gymkhana_homepage/festbudget'); + }, + ), + InkWell( + child: myContainer("Submit Event Report"), + onTap: () { + Navigator.pushNamed(context, + '/gymkhana_homepage/submiteventreport'); + }, + ), + InkWell( + child: myContainer("View Club Details"), onTap: () { Navigator.pushNamed( context, diff --git a/lib/screens/Gymkhana/Record.dart b/lib/screens/Gymkhana/Record.dart index adcfacf2..39feaf56 100644 --- a/lib/screens/Gymkhana/Record.dart +++ b/lib/screens/Gymkhana/Record.dart @@ -55,14 +55,33 @@ class _RecordsState extends State { @override Widget build(BuildContext context) { + final GymkhanaData data = + ModalRoute.of(context)!.settings.arguments as GymkhanaData; + Srecords = data.membersDetails! + .map((member) => Srecord( + Name: member['name'], + Rollno: member['rollno'], + Club: member['club'], + Category: member['category'])) + .toList(); - final GymkhanaData data = ModalRoute.of(context)!.settings.arguments as GymkhanaData; - Srecords = data.membersDetails!.map((member) => Srecord(Name: member['name'], Rollno: member['rollno'], Club: member['club'], Category: member['category'])).toList(); - - // Srecords = [ - // Srecord(Name: "Pawan", Rollno: "430", Club: "Cricket", Category: "sports"), - // Srecord(Name: "Pawergeran", Rollno: "430", Club: "Cricket", Category: "sports"), - // ]; + Srecords = [ + Srecord( + Name: "Abhishek", + Rollno: "22bcs012", + Club: "Badminton", + Category: "Sports"), + Srecord( + Name: "Pawan Singh", + Rollno: "21bec098", + Club: "Dance", + Category: "Cultural"), + Srecord( + Name: "Rajat ", + Rollno: "20bcs140", + Club: "Basketball", + Category: "Sports"), + ]; return Scaffold( appBar: AppBar( @@ -130,5 +149,6 @@ class Srecord { } var Srecords = [ - Srecord(Name: "default", Rollno: "default", Club: "default", Category: "default"), + Srecord( + Name: "default", Rollno: "default", Club: "default", Category: "default"), ]; diff --git a/lib/screens/Gymkhana/SubmitEventReport.dart b/lib/screens/Gymkhana/SubmitEventReport.dart new file mode 100644 index 00000000..df1489be --- /dev/null +++ b/lib/screens/Gymkhana/SubmitEventReport.dart @@ -0,0 +1,237 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SubmitEventReport extends StatefulWidget { + @override + _SubmitEventReportState createState() => _SubmitEventReportState(); +} + +class _SubmitEventReportState extends State + with SingleTickerProviderStateMixin { + late TabController _controller; + + @override + void initState() { + // TODO: implement initState + super.initState(); + _controller = TabController(length: 2, vsync: this, initialIndex: 1); + } + + final GlobalKey formkey = GlobalKey(); + + void validate() { + if (formkey.currentState!.validate()) { + print("ok"); + } else { + print("Error"); + } + } + + String? formvalidate(value) { + //form validate function + if (value.isEmpty) { + return "Error"; + } else { + return null; + } + } + + @override + Widget build(BuildContext context) { + //TODO : Create Drop Down For Club Selection, Automatic Form Filling + //final GymkhanaData data = ModalRoute.of(context)!.settings.arguments as GymkhanaData; + + return Scaffold( + appBar: AppBar( + backgroundColor: Colors.black, + title: Text( + 'Submit Event Report', + style: TextStyle(fontSize: 25), + ), + ), + body: TabBarView( + controller: _controller, + children: [ + Padding( + padding: EdgeInsets.all(18.0), + child: Center( + child: Form( + key: formkey, + child: ListView( + children: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Center( + child: Container( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Text( + "Event Form", + style: TextStyle( + fontSize: 20.0, + ), + )), + ), + decoration: new BoxDecoration( + color: Colors.deepOrangeAccent, + border: new Border.all( + color: Colors.deepOrange, + width: 1.0, + style: BorderStyle.solid, + ), + boxShadow: [ + BoxShadow( + color: Colors.black, + offset: Offset(0.0, 1.0), + blurRadius: 2.0, + ) + ], + borderRadius: new BorderRadius.all( + new Radius.circular(5.0)), + ), + ), + ), + ), + SizedBox( + height: 30, + ), + TextFormField( + keyboardType: TextInputType.name, + decoration: InputDecoration( + hintText: "Event Name", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(0), + ), + ), + validator: formvalidate, + ), + Padding( + padding: EdgeInsets.only(top: 20.0), + child: TextFormField( + keyboardType: TextInputType.emailAddress, + decoration: InputDecoration( + hintText: "Student Incharge", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(0), + ), + ), + validator: formvalidate, + ), + ), + Padding( + padding: EdgeInsets.all(25.0), + child: ElevatedButton( + onPressed: validate, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Upload Report File", + style: TextStyle(fontSize: 14.0), + ), + ), + style: ButtonStyle( + padding: MaterialStateProperty.all( + EdgeInsets.all(4)), + shape: MaterialStateProperty.all< + RoundedRectangleBorder>( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18.0), + side: BorderSide(color: Colors.red))), + backgroundColor: + MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.pressed)) + return Colors.deepOrange; + return Colors + .deepOrangeAccent; // Use the component's default. + }, + ), + ), + ), + ), + Padding( + padding: EdgeInsets.only(top: 20.0), + child: TextFormField( + decoration: InputDecoration( + hintText: "Date ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(0), + ), + ), + validator: formvalidate, + ), + ), + Padding( + padding: EdgeInsets.only(top: 20.0), + child: TextFormField( + decoration: InputDecoration( + hintText: "Time", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(0), + ), + ), + validator: formvalidate, + ), + ), + Padding( + padding: EdgeInsets.only(top: 20.0), + child: TextFormField( + maxLines: 5, + decoration: InputDecoration( + hintText: "Detail and Description", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(0), + ), + ), + validator: formvalidate, + ), + ), + Padding( + padding: EdgeInsets.all(25.0), + child: ElevatedButton( + onPressed: validate, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Submit", + style: TextStyle(fontSize: 20.0), + ), + ), + style: ButtonStyle( + shape: MaterialStateProperty.all< + RoundedRectangleBorder>( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18.0), + side: BorderSide(color: Colors.red))), + backgroundColor: + MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.pressed)) + return Colors.deepOrange; + return Colors + .deepOrangeAccent; // Use the component's default. + }, + ), + ), + ), + ) + ], + ), + ), + ), + ), + ], + )); + } +} diff --git a/lib/screens/Gymkhana/Votingpolls.dart b/lib/screens/Gymkhana/Votingpolls.dart new file mode 100644 index 00000000..d1fe2fe1 --- /dev/null +++ b/lib/screens/Gymkhana/Votingpolls.dart @@ -0,0 +1,2 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/models/gymkhana.dart'; diff --git a/lib/screens/Gymkhana/clubsession.dart b/lib/screens/Gymkhana/clubsession.dart index 2cd90e2d..63f97fff 100644 --- a/lib/screens/Gymkhana/clubsession.dart +++ b/lib/screens/Gymkhana/clubsession.dart @@ -77,7 +77,7 @@ class _ClubSessionState extends State { child: ListView( children: [ Text( - "Club", + "Club Sessions", style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), textAlign: TextAlign.start, ), @@ -95,24 +95,32 @@ class _ClubSessionState extends State { elevation: 16, value: _value, isExpanded: true, - hint: Text("-SELECT-"), + hint: Text("Select Club"), items: [ DropdownMenuItem( - child: Text("--SELECT--"), + child: Text("Select Club"), value: 1, ), DropdownMenuItem( - child: Text("Saaz"), + child: Text("Cricket"), value: 2, ), DropdownMenuItem( - child: Text("Avartan"), + child: Text("Badminton"), value: 3, ), DropdownMenuItem( - child: Text("Electronics"), + child: Text("Saaz"), value: 4, ), + DropdownMenuItem( + child: Text("Avartan"), + value: 5, + ), + DropdownMenuItem( + child: Text("Electronics"), + value: 6, + ), ], onChanged: (int? value) { setState(() { diff --git a/lib/screens/Healthcenter/Appointment.dart b/lib/screens/Healthcenter/Appointment.dart index 8188e9d5..6bff140e 100644 --- a/lib/screens/Healthcenter/Appointment.dart +++ b/lib/screens/Healthcenter/Appointment.dart @@ -142,4 +142,4 @@ class _AppointmentState extends State { ), ); } -} +} \ No newline at end of file diff --git a/lib/screens/Healthcenter/ambulanceRequest.dart b/lib/screens/Healthcenter/ambulanceRequest.dart index 41e92bc1..f7e29bac 100644 --- a/lib/screens/Healthcenter/ambulanceRequest.dart +++ b/lib/screens/Healthcenter/ambulanceRequest.dart @@ -76,4 +76,4 @@ class _AmbulanceRequestState extends State { ), ); } -} +} \ No newline at end of file diff --git a/lib/screens/LoginandDashboard/dashboard.dart b/lib/screens/LoginandDashboard/dashboard.dart index 80c2719f..2b84ad2a 100644 --- a/lib/screens/LoginandDashboard/dashboard.dart +++ b/lib/screens/LoginandDashboard/dashboard.dart @@ -56,6 +56,8 @@ class _DashboardState extends State { studentType = data2.profile!['department']!['name'] + ' ' + data2.profile!['user_type']; + // print(studentType); + } catch (e) { print(e); } diff --git a/lib/screens/Scholarships_Awards/ApplyForAwards/Convocation.dart b/lib/screens/Scholarships_Awards/ApplyForAwards/Convocation.dart new file mode 100644 index 00000000..8a8d6d09 --- /dev/null +++ b/lib/screens/Scholarships_Awards/ApplyForAwards/Convocation.dart @@ -0,0 +1,147 @@ +import 'package:flutter/material.dart'; +// import 'package:fusion/Components/appBar.dart'; +// import 'package:fusion/Components/side_drawer.dart'; + +//TODO: Update Elevated Button + +class Convocation extends StatefulWidget { + @override + _ConvocationState createState() => _ConvocationState(); +} + +class _ConvocationState extends State { + final GlobalKey _formKey = GlobalKey(); + String? programme_type; + List complaintTypeItem = [ + "Directors Gold Medal", + "Directors Silver Medal", + 'Notional Prizes', + 'MCM Scholarship', + 'D&M Proficiency Gold Medal', + ]; + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Padding( + padding: const EdgeInsets.all(18.0), + child: Column( + children: [ + // SizedBox(height: 10), + // Container( + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: Center( + // child: Text( + // "Apply", + // style: TextStyle( + // fontSize: 20.0, + // // color: Colors.deepOrangeAccent, + // ), + // )), + // ), + // decoration: new BoxDecoration( + // color: Colors.deepOrangeAccent, + // border: new Border.all( + // color: Colors.deepOrange, + // width: 1.0, + // style: BorderStyle.solid, + // ), + // boxShadow: [ + // BoxShadow( + // color: Colors.black, + // offset: Offset(0.0, 1.0), + // blurRadius: 2.0, + // ) + // ], + // borderRadius: new BorderRadius.all(new Radius.circular(5.0)), + // ), + // ), + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 4, vertical: 16), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 16), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey, + ), + borderRadius: BorderRadius.circular(15), + ), + child: DropdownButton( + hint: Text('Enter Award'), + dropdownColor: Colors.grey[200], + icon: Icon(Icons.arrow_drop_down), + isExpanded: true, + underline: SizedBox(), + style: TextStyle(color: Colors.black, fontSize: 16), + onChanged: (newValue) { + // print(service.userInDB?.token); + // print(complainer); + setState(() { + programme_type = newValue.toString(); + }); + print(programme_type); + //print(valueItem); + }, + value: programme_type, + items: complaintTypeItem.map((valueItem) { + return DropdownMenuItem( + value: valueItem, + child: Text(valueItem), + ); + }).toList(), + ), + ), + ), + // SizedBox( + // height: 30, + // ), + // SizedBox(height: 28), + // TextField( + // decoration: InputDecoration( + // hintText: 'Enter Scholarship Name', + // contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + // border: OutlineInputBorder( + // borderRadius: BorderRadius.circular(32.0), + // ), + // ), + // ), + SizedBox(height: 20), + // ElevatedButton( + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: Text( + // 'Search', + // style: TextStyle(fontSize: 20.0), + // ), + // ), + // onPressed: () { + // // Respond to button press + // }, + // style: ButtonStyle( + // backgroundColor: MaterialStateProperty.resolveWith( + // (Set states) { + // if (states.contains(MaterialState.pressed)) + // return Colors.deepOrange; + // return Colors + // .deepOrangeAccent; // Use the component's default. + // }, + // ), + // ), + // ), + SizedBox(height: 20), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 40), + child: Divider( + thickness: 1, + color: Colors.black54, + ), + ), + ] + ), + ), + ), + ); + } +} diff --git a/lib/screens/Scholarships_Awards/ApplyForAwards/MCMScholarship.dart b/lib/screens/Scholarships_Awards/ApplyForAwards/MCMScholarship.dart new file mode 100644 index 00000000..e3bd52e9 --- /dev/null +++ b/lib/screens/Scholarships_Awards/ApplyForAwards/MCMScholarship.dart @@ -0,0 +1,1351 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +// import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/services/complaint_service.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +// import 'package:fusion/Components/side_drawer.dart'; + +//TODO: Update Elevated Button + +class MCMScholarship extends StatefulWidget { + @override + _MCMScholarshipState createState() => _MCMScholarshipState(); +} + +class _MCMScholarshipState extends State { + final GlobalKey _formKey = GlobalKey(); + String? fatherocc_type; + List fatheroccTypeItem = [ + "Government", + "Private", + "Public", + "Business", + "Medical", + "Consultant", + "Pensioners", + ]; + String? motherocc_type; + List motheroccTypeItem = [ + "EMPLOYED", + "HOUSE_WIFE", + ]; + String? house_type; + List houseTypeItem = [ + 'RENTED', + 'OWNED', + ]; + @override + Widget build(BuildContext context) { + String? specific_location; + return Scaffold( + body: SingleChildScrollView( + child: new Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + new Container( + child: new Column( + children: [ + SizedBox(height: 20), + Text( + "MCM Scholarship Application Form:", + textAlign: TextAlign.center, + style: const TextStyle( + fontWeight: FontWeight.bold, fontSize: 16), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 4), + child: Divider( + thickness: 1, + color: Colors.black54, + ), + ), + ], + ), + ), + new Container( + child: new Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox(height: 15), + ElevatedButton.icon( + onPressed: () {}, + icon: Icon( + Icons.download, + size: 24.0, + ), + label: Text('Form A'), + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(Colors.blue), + ), + ), + SizedBox(height: 15), + ElevatedButton.icon( + onPressed: () {}, + icon: Icon( + Icons.download, + size: 24.0, + ), + label: Text('Form B'), + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(Colors.blue), + ), + ), + SizedBox(height: 15), + ElevatedButton.icon( + onPressed: () {}, + icon: Icon( + Icons.download, + size: 24.0, + ), + label: Text('Form C'), + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(Colors.blue), + ), + ), + ], + ), + ), + new Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + new Container( + padding: const EdgeInsets.fromLTRB(40, 20, 20, 0), + child: Row( + children: [ + SizedBox( + height: 40, + ), + Text( + 'Category: ', + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: 'Category', + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: new Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + 'Hall No. :', + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: 'Hall No.', + contentPadding: EdgeInsets.fromLTRB( + 20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + 'Room No. :', + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: 'Room No. ', + contentPadding: EdgeInsets.fromLTRB( + 20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + ], + ), + ), + ], + ), + ), + new Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Father's Name :", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Father's Name", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: Column(children: [ + SizedBox( + height: 16, + ), + Text( + "Father's Occupation :", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 4, vertical: 2), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 6), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey, + ), + borderRadius: BorderRadius.circular(15), + ), + width: 140.0, + child: DropdownButton( + hint: Text('Select Item'), + dropdownColor: Colors.grey[200], + icon: Icon(Icons.arrow_drop_down), + underline: SizedBox(), + style: TextStyle(color: Colors.black, fontSize: 14), + onChanged: (newValue) { + setState(() { + fatherocc_type = newValue.toString(); + }); + print(fatherocc_type); + //print(valueItem); + }, + value: fatherocc_type, + items: fatheroccTypeItem.map((valueItem) { + return DropdownMenuItem( + value: valueItem, + child: Text(valueItem), + ); + }).toList(), + ), + ), + ), + ]), + ) + ], + ), + ), + new Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Mother's Name :", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Mother's Name ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: Column(children: [ + SizedBox( + height: 16, + ), + Text( + "Mother's Occupation :", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 4, vertical: 2), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 6), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey, + ), + borderRadius: BorderRadius.circular(15), + ), + width: 140.0, + child: DropdownButton( + hint: Text('Select Item'), + dropdownColor: Colors.grey[200], + icon: Icon(Icons.arrow_drop_down), + underline: SizedBox(), + style: TextStyle(color: Colors.black, fontSize: 14), + onChanged: (newValue) { + setState(() { + motherocc_type = newValue.toString(); + }); + print(motherocc_type); + //print(valueItem); + }, + value: motherocc_type, + items: motheroccTypeItem.map((valueItem) { + return DropdownMenuItem( + value: valueItem, + child: Text(valueItem), + ); + }).toList(), + ), + ), + ), + ]), + ), + ], + ), + ), + new Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + Text( + "Father's Occupation Description *", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 15, + ), + ), + SizedBox( + height: 40, + width: 350.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Father Occupation Description ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + Text( + "Mother's Occupation Description *", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 15, + ), + ), + SizedBox( + height: 40, + width: 350.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Mother Occupation Description ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: new Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Brother's Name: ", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Brother's Name", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Brother's Occupation: ", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Occup.. ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + ], + ), + ), + new Container( + child: new Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Sister's Name: ", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Name", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Sister's Occupation: ", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Occup.. ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + ], + ), + ), + new Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + Text( + "Father's Annual Income: ", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 15, + ), + ), + SizedBox( + height: 40, + width: 350.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Father Annual Income", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + Text( + "Mother's Annual Income: ", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 15, + ), + ), + SizedBox( + height: 40, + width: 350.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Mother Annual Income: ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + Text( + "Other sources Annual Income: ", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 15, + ), + ), + SizedBox( + height: 40, + width: 350.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Other sources Annual Income ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + padding: const EdgeInsets.fromLTRB(40, 20, 20, 0), + child: Row( + children: [ + SizedBox( + height: 40, + ), + Text( + '# of Four Wheeler : ', + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: 'Number of 4 Wheelers', + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + Text( + "Four Wheeler Description: ", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 15, + ), + ), + SizedBox( + height: 40, + width: 350.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Four Wheeler Description ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + padding: const EdgeInsets.fromLTRB(40, 20, 20, 0), + child: Row( + children: [ + SizedBox( + height: 40, + ), + Text( + '# of Two Wheeler : ', + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: 'Number of 2 Wheelers', + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + Text( + "Two Wheeler Description: ", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 15, + ), + ), + SizedBox( + height: 40, + width: 350.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Two Wheeler Description ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + padding: const EdgeInsets.fromLTRB(40, 20, 20, 0), + child: Row( + children: [ + SizedBox( + height: 16, + ), + Text( + "House Type :", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 4, vertical: 2), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 6), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey, + ), + borderRadius: BorderRadius.circular(15), + ), + width: 140.0, + child: DropdownButton( + hint: Text('Select Item'), + dropdownColor: Colors.grey[200], + icon: Icon(Icons.arrow_drop_down), + underline: SizedBox(), + style: TextStyle(color: Colors.black, fontSize: 14), + onChanged: (newValue) { + setState(() { + house_type = newValue.toString(); + }); + print(house_type); + //print(valueItem); + }, + value: house_type, + items: houseTypeItem.map((valueItem) { + return DropdownMenuItem( + value: valueItem, + child: Text(valueItem), + ); + }).toList(), + ), + ), + ), + ], + ), + ), + new Container( + child: new Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Plot Area: ", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Area ...", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Constructed Area: ", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Area.. ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + ], + ), + ), + new Container( + child: new Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Fees 10th Standard: ", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Fees ...", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Name of School: ", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "School.. ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + ], + ), + ), + new Container( + child: new Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Fees 12th Standard: ", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Fees ...", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Name of College: ", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "College.. ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + ], + ), + ), + new Container( + child: new Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Amount of Edu. Bank loan: ", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Amount ...", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + new Container( + child: new Column( + children: [ + SizedBox( + height: 16, + ), + Text( + "Bank Name: ", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + SizedBox( + height: 40, + width: 140.0, + child: TextFormField( + autofocus: false, + style: TextStyle( + color: Colors.black, + ), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + hintText: "Bank.. ", + contentPadding: + EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(32)), + ), + ), + ), + ), + ], + ), + ), + ], + ), + ), + new Container( + child: new Column( + children: [ + SizedBox( + height: 20, + ), + Center( + child: ElevatedButton( + onPressed: () async {}, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + 'Submit', + style: TextStyle(fontSize: 20), + ), + ), + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.pressed)) + return Colors.deepOrange; + return Colors + .deepOrangeAccent; // Use the component's default. + }, + ), + ), + ), + ), + ], + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/screens/Scholarships_Awards/ApplyForAwards/ViewApplications.dart b/lib/screens/Scholarships_Awards/ApplyForAwards/ViewApplications.dart new file mode 100644 index 00000000..89853add --- /dev/null +++ b/lib/screens/Scholarships_Awards/ApplyForAwards/ViewApplications.dart @@ -0,0 +1,174 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:fusion/models/complaints.dart'; +import 'package:fusion/services/complaint_service.dart'; +import 'package:toggle_switch/toggle_switch.dart'; +import 'package:http/http.dart'; + +class ViewApplications extends StatefulWidget { + @override + _ViewApplicationsState createState() => _ViewApplicationsState(); +} + +//A dummy list of sample json returned by backend (this onHoldComplains will bew removed when backend is available) +final List> onHoldComplains = [ + { + "Name": " ", + "Application ID": " ", + "Applied Date": " ", + "Status": " ", + } +]; + +class _ViewApplicationsState extends State { + bool _loading = true; + late StreamController _complaintController; + late ComplaintService complaintService; + late ComplaintDataUserStudent data; + + @override + void initState() { + // TODO: implement initState + super.initState(); + _complaintController = StreamController(); + complaintService = ComplaintService(); + getData(); + } + + getData() async { + //print('token-'+widget.token!); + try { + Response response = await complaintService.getComplaint(); + setState(() { + data = ComplaintDataUserStudent.fromJson(jsonDecode(response.body)); + print(data.student_complain); + //print(data); + _loading = false; + }); + } catch (e) { + print(e); + } + } + + loadData() async { + getData().then((res) { + _complaintController.add(res); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: _loading == true + ? Center(child: CircularProgressIndicator()) + : listView(), + ); + } +} + +//Main component to render the table.. +ListView listView() { + return ListView( + children: [ + new Container( + child: new Column( + children: [ + SizedBox(height: 20), + Text( + "Application Status:", + textAlign: TextAlign.center, + style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 4), + child: Divider( + thickness: 1, + color: Colors.black54, + ), + ), + ], + ), + ), + + SizedBox(height: 20), + new Container( + padding: const EdgeInsets.symmetric(horizontal: 100), + child: new Row( + children: [ + ToggleSwitch( + minWidth: 90.0, + minHeight: 50.0, + fontSize: 16.0, + activeBgColor: [Colors.orange], + activeFgColor: Colors.white, + inactiveBgColor: Color.fromARGB(255, 215, 214, 214), + inactiveFgColor: Colors.grey[900], + totalSwitches: 2, + labels: ['Current', 'History'], + ), + ], + ), + ), + SizedBox(height: 20), + //To scroll pass the width + SingleChildScrollView( + scrollDirection: Axis.horizontal, + //Component to lay table on the page + child: DataTable( + // headingRowColor: + // MaterialStateColor.resolveWith((states) => Colors.blue), + dataRowHeight: 80.0, + columnSpacing: 28.0, + columns: [ + //DataColumns to lay columns of the table + DataColumn( + label: Text('Name', + style: + TextStyle(fontSize: 13, fontWeight: FontWeight.bold))), + DataColumn( + label: Text('Application ID', + style: + TextStyle(fontSize: 14, fontWeight: FontWeight.bold))), + DataColumn( + label: Text('Applied Date', + style: + TextStyle(fontSize: 14, fontWeight: FontWeight.bold))), + DataColumn( + label: Text('Status', + style: + TextStyle(fontSize: 14, fontWeight: FontWeight.bold))), + ], + //This method will get lay all the rows + rows: complaintList(), + ), + ), + ], + ); +} + +List complaintList() { + //Get the list of json and map through, to select each json and lay row to the table.. + return onHoldComplains + .map( + ((element) => DataRow( + cells: [ + DataCell(Container( + width: 40, //SET width + child: Text(element[ + "Name"]!))), //Extracting from Map element the value + DataCell(Container( + width: 57, //SET width + child: Text(element["Application ID"]!))), + DataCell(Container( + width: 57, //SET width + child: Text(element["Applied Date"]!))), + DataCell(Container( + width: 57, //SET width + child: Text(element["Status"]!))), + ], + )), + ) + .toList(); +} diff --git a/lib/screens/Scholarships_Awards/ApplyForAwards/applyforawards.dart b/lib/screens/Scholarships_Awards/ApplyForAwards/applyforawards.dart new file mode 100644 index 00000000..cc67fa71 --- /dev/null +++ b/lib/screens/Scholarships_Awards/ApplyForAwards/applyforawards.dart @@ -0,0 +1,87 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:fusion/screens/Scholarships_Awards/ApplyForAwards/Convocation.dart'; +import 'package:fusion/screens/Scholarships_Awards/ApplyForAwards/MCMScholarship.dart'; +import 'package:fusion/screens/Scholarships_Awards/ApplyForAwards/ViewApplications.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/catalogue.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/previous_winners.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/spacs_memebers_details.dart'; +import 'package:http/http.dart'; + +class ApplyForAwards extends StatefulWidget { + @override + _ApplyForAwardsState createState() => _ApplyForAwardsState(); +} + +class _ApplyForAwardsState extends State { + bool _loading1 = true; + + @override + Widget build(BuildContext context) { + return DefaultTabController( + length: 3, + child: Scaffold( + appBar: AppBar( + backgroundColor: Colors.black, + title: Text( + "Apply For Awards", + style: TextStyle(color: Colors.white), + ), + actions: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.search), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.notifications), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.more_vert), + ), + ], + //TabBar for a horizontal scrollable tob bar + bottom: TabBar( + isScrollable: true, + indicatorColor: Colors.white, + indicatorWeight: 6.0, + tabs: [ + Tab( + child: Container( + child: Text( + 'MCM Scholarship', + ), + ), + ), + Tab( + child: Container( + child: Text( + 'Convocation Medals', + ), + ), + ), + Tab( + child: Container( + child: Text( + 'View Applications Status', + ), + ), + ), + ], + ), + ), + //TabBarView contains all the children to be called when tapped. + body: TabBarView( + children: [ + MCMScholarship(), + Convocation(), + ViewApplications(), + ], + ), + ), + ); + } +} diff --git a/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/award_catalogue.dart b/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/award_catalogue.dart new file mode 100644 index 00000000..67009115 --- /dev/null +++ b/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/award_catalogue.dart @@ -0,0 +1,95 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/Faculty/manage_catalogue.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/catalogue.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/previous_winners.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/spacs_memebers_details.dart'; +import 'package:http/http.dart'; + +class ManageAwardCatalogueFaculty extends StatefulWidget { + @override + _ManageAwardCatalogueFacultyState createState() => _ManageAwardCatalogueFacultyState(); +} + +class _ManageAwardCatalogueFacultyState extends State { + bool _loading1 = true; + + int step = 0; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return DefaultTabController( + //Default TabController for tab scrollbar with number of elements equal to 4 + length: 3, + child: Scaffold( + appBar: AppBar( + backgroundColor: Colors.black, + title: Text( + "Manage Award Catalogue", + style: TextStyle(color: Colors.white), + ), + actions: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.search), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.notifications), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.more_vert), + ), + ], + //TabBar for a horizontal scrollable tob bar + bottom: TabBar( + isScrollable: true, + indicatorColor: Colors.white, + indicatorWeight: 6.0, + tabs: [ + Tab( + child: Container( + child: Text( + 'Cataloge', + ), + ), + ), + Tab( + child: Container( + child: Text( + 'Spacs Members', + ), + ), + ), + Tab( + child: Container( + child: Text( + 'Previous Winners', + ), + ), + ), + ], + ), + ), + //TabBarView contains all the children to be called when tapped. + body: TabBarView( + children: [ + ManageCatalogue(), + SpacsMembersDetails( + ModalRoute.of(context)!.settings.arguments.toString()), + PreviousWinners( + ModalRoute.of(context)!.settings.arguments.toString()), + ], + ), + ), + ); + } +} diff --git a/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/invite_app.dart b/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/invite_app.dart new file mode 100644 index 00000000..436e8aa3 --- /dev/null +++ b/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/invite_app.dart @@ -0,0 +1,177 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/services/complaint_service.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:fusion/services/profile_service.dart'; + +class InviteApplications extends StatefulWidget { + @override + _InviteApplicationsState createState() => _InviteApplicationsState(); +} + +class _InviteApplicationsState extends State { + final GlobalKey _formKey = GlobalKey(); + String? programme_type; + List programmeTypeItem = [ + 'B.Tech', + 'B.des', + 'M.Tech', + 'PhD', + ]; + String? scholarship_type; + List scholarshipTypeItem = [ + 'MCM', + 'NSP', + 'Random', + ]; + String? academicyear; + List academicyearTypeItem = [ + '1st', + '2nd', + '3rd', + '4th', + ]; + // String? programme_type; + List complaintTypeItem = [ + "Directors Gold Medal", + "Directors Silver Medal", + 'Notional Prizes', + 'MCM Scholarship', + 'D&M Proficiency Gold Medal', + ]; + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Padding( + padding: const EdgeInsets.all(18.0), + child: Column(children: [ + SizedBox(height: 10), + Container( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Text( + "Invite Applications", + style: TextStyle( + fontSize: 24.0, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + )), + ), + ), + new Container( + child: new Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + new Container( + padding: const EdgeInsets.fromLTRB(40, 20, 20, 0), + child: new Column( + children: [ + Text( + 'Programme', + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 15, + ), + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 4, vertical: 16), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 6), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey, + ), + borderRadius: BorderRadius.circular(15), + ), + width: 140.0, + child: DropdownButton( + hint: Text('Select Item'), + dropdownColor: Colors.grey[200], + icon: Icon(Icons.arrow_drop_down), + underline: SizedBox(), + style: + TextStyle(color: Colors.black, fontSize: 14), + onChanged: (newValue) { + setState(() { + programme_type = newValue.toString(); + }); + print(programme_type); + //print(valueItem); + }, + value: programme_type, + items: programmeTypeItem.map((valueItem) { + return DropdownMenuItem( + value: valueItem, + child: Text(valueItem), + ); + }).toList(), + ), + ), + ), + ], + ), + ), + new Container( + padding: const EdgeInsets.fromLTRB(0, 20, 40, 0), + child: new Column( + children: [ + Text( + 'Academic Year*', + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 15, + ), + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 0, vertical: 16), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 6), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey, + ), + borderRadius: BorderRadius.circular(15), + ), + width: 140.0, + child: DropdownButton( + hint: Text('Select Item'), + dropdownColor: Colors.grey[200], + icon: Icon(Icons.arrow_drop_down), + isExpanded: true, + underline: SizedBox(), + style: + TextStyle(color: Colors.black, fontSize: 14), + onChanged: (newValue) { + setState(() { + academicyear = newValue.toString(); + }); + }, + value: academicyear, + items: academicyearTypeItem.map((valueItem) { + return DropdownMenuItem( + value: valueItem, + child: Text(valueItem), + ); + }).toList(), + ), + ), + ), + ], + ), + ), + ], + ), + ), + ]), + ), + ), + ); + } +} diff --git a/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/invite_application.dart b/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/invite_application.dart new file mode 100644 index 00000000..3851576d --- /dev/null +++ b/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/invite_application.dart @@ -0,0 +1,88 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/Faculty/invite_app.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/Faculty/recent_app.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/catalogue.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/previous_winners.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/spacs_memebers_details.dart'; +import 'package:http/http.dart'; + +class InviteApplication extends StatefulWidget { + @override + _InviteApplicationState createState() => + _InviteApplicationState(); +} + +class _InviteApplicationState + extends State { + bool _loading1 = true; + + int step = 0; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return DefaultTabController( + //Default TabController for tab scrollbar with number of elements equal to 4 + length: 3, + child: Scaffold( + appBar: AppBar( + backgroundColor: Colors.black, + title: Text( + "Invite Applications", + style: TextStyle(color: Colors.white), + ), + actions: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.search), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.notifications), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.more_vert), + ), + ], + //TabBar for a horizontal scrollable tob bar + bottom: TabBar( + isScrollable: true, + indicatorColor: Colors.white, + indicatorWeight: 6.0, + tabs: [ + Tab( + child: Container( + child: Text( + 'Invite Applications', + ), + ), + ), + Tab( + child: Container( + child: Text( + 'Recent Invite Applications', + ), + ), + ), + ], + ), + ), + //TabBarView contains all the children to be called when tapped. + body: TabBarView( + children: [ + InviteApplications(), + RecentInviteApplications(), + ], + ), + ), + ); + } +} diff --git a/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/manage_catalogue.dart b/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/manage_catalogue.dart new file mode 100644 index 00000000..7bdf87df --- /dev/null +++ b/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/manage_catalogue.dart @@ -0,0 +1,203 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/services/complaint_service.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:fusion/services/profile_service.dart'; + +class ManageCatalogue extends StatefulWidget { + @override + _ManageCatalogueState createState() => _ManageCatalogueState(); +} + +class _ManageCatalogueState extends State { + final GlobalKey _formKey = GlobalKey(); + String? programme_type; + List complaintTypeItem = [ + "Directors Gold Medal", + "Directors Silver Medal", + 'Notional Prizes', + 'MCM Scholarship', + 'D&M Proficiency Gold Medal', + ]; + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Padding( + padding: const EdgeInsets.all(18.0), + child: Column(children: [ + SizedBox(height: 10), + Container( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Text( + "Manage Award Scholarship Catalogue", + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + )), + ), + ), + SizedBox(height: 10), + new Container( + alignment: Alignment.center, + child: Column(children: [ + TextButton( + style: ButtonStyle( + padding: MaterialStateProperty.all( + EdgeInsets.all(14)), + backgroundColor: + MaterialStateProperty.all(Colors.orange)), + onPressed: () {}, + child: Column( + children: [ + Text( + "Directors Gold Medal", + textAlign: TextAlign.center, + style: TextStyle( + fontWeight: FontWeight.w800, + fontSize: 18, + color: Color.fromARGB(255, 255, 255, 255), + ), + ), + ], + ), + ), + ]), + ), + SizedBox(height: 10), + new Container( + alignment: Alignment.center, + child: Column(children: [ + TextButton( + style: ButtonStyle( + padding: MaterialStateProperty.all( + EdgeInsets.all(14)), + backgroundColor: + MaterialStateProperty.all(Color.fromARGB(255, 220, 202, 176))), + onPressed: () {}, + child: Column( + children: [ + Text( + "Directors Silver Medal", + textAlign: TextAlign.center, + style: TextStyle( + fontWeight: FontWeight.w800, + fontSize: 18, + color: Color.fromARGB(255, 255, 255, 255), + ), + ), + ], + ), + ), + ]), + ), + SizedBox(height: 10), + new Container( + alignment: Alignment.center, + child: Column(children: [ + TextButton( + style: ButtonStyle( + padding: MaterialStateProperty.all( + EdgeInsets.all(14)), + backgroundColor: + MaterialStateProperty.all(Color.fromARGB(255, 220, 202, 176))), + onPressed: () {}, + child: Column( + children: [ + Text( + "Notional Prizes", + textAlign: TextAlign.center, + style: TextStyle( + fontWeight: FontWeight.w800, + fontSize: 18, + color: Color.fromARGB(255, 255, 255, 255), + ), + ), + ], + ), + ), + ]), + ), + SizedBox(height: 10), + new Container( + alignment: Alignment.center, + child: Column(children: [ + TextButton( + style: ButtonStyle( + padding: MaterialStateProperty.all( + EdgeInsets.all(14)), + backgroundColor: + MaterialStateProperty.all(Color.fromARGB(255, 220, 202, 176))), + onPressed: () {}, + child: Column( + children: [ + Text( + "MCM Scholarship", + textAlign: TextAlign.center, + style: TextStyle( + fontWeight: FontWeight.w800, + fontSize: 18, + color: Color.fromARGB(255, 255, 255, 255), + ), + ), + ], + ), + ), + ]), + ), + SizedBox(height: 10), + new Container( + alignment: Alignment.center, + child: Column(children: [ + TextButton( + style: ButtonStyle( + padding: MaterialStateProperty.all( + EdgeInsets.all(14)), + backgroundColor: + MaterialStateProperty.all(Color.fromARGB(255, 220, 202, 176))), + onPressed: () {}, + child: Column( + children: [ + Text( + "D&M Proficiency Gold Medal", + textAlign: TextAlign.center, + style: TextStyle( + fontWeight: FontWeight.w800, + fontSize: 18, + color: Color.fromARGB(255, 255, 255, 255), + ), + ), + ], + ), + ), + ]), + ), + SizedBox(height: 20), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 40), + child: Divider( + thickness: 1, + color: Colors.black54, + ), + ), + Text( + "Director's Gold Medal:", + textAlign: TextAlign.left, + style: const TextStyle(fontWeight: FontWeight.bold), + ), + Text( + "4.2 DirectorΓÇÖs Gold Medals 4.2.1 DirectorΓÇÖs Gold Medals (DGMs), to be presented at the Institute Convocation every year, shall be awarded for the best all round performance from among the graduating", + textAlign: TextAlign.start, + style: const TextStyle(fontWeight: FontWeight.normal), + ), + ]), + ), + ), + ); + } +} diff --git a/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/recent_app.dart b/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/recent_app.dart new file mode 100644 index 00000000..76b380e0 --- /dev/null +++ b/lib/screens/Scholarships_Awards/AwardCatalogue/Faculty/recent_app.dart @@ -0,0 +1,100 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/services/complaint_service.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:fusion/services/profile_service.dart'; + +class RecentInviteApplications extends StatefulWidget { + @override + _RecentInviteApplicationsState createState() => + _RecentInviteApplicationsState(); +} + +class _RecentInviteApplicationsState extends State { + final GlobalKey _formKey = GlobalKey(); + String? programme_type; + List complaintTypeItem = [ + "Directors Gold Medal", + "Directors Silver Medal", + 'Notional Prizes', + 'MCM Scholarship', + 'D&M Proficiency Gold Medal', + ]; + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Padding( + padding: const EdgeInsets.all(18.0), + child: Column(children: [ + SizedBox(height: 10), + Container( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Text( + "Recent Invite Applications", + style: TextStyle( + fontSize: 24.0, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + )), + ), + ), + Container( + + child: ListView( + shrinkWrap: true, + physics: ClampingScrollPhysics(), + padding: EdgeInsets.all(4), + children: [ + Card( + elevation: 2.0, + margin: EdgeInsets.symmetric(horizontal: 50, vertical: 20), + shadowColor: Colors.black, + color: Color.fromARGB(153, 204, 204, 204), + child: Column( + children: [ + SizedBox(height: 10), + Padding(padding: EdgeInsets.all(40)), + new Container( + alignment: Alignment.center, + child: Column(children: [ + TextButton( + style: ButtonStyle( + padding: + MaterialStateProperty.all( + EdgeInsets.all(14)), + backgroundColor: + MaterialStateProperty.all(Colors.orange)), + onPressed: () {}, + child: Column( + children: [ + Text( + "Update", + textAlign: TextAlign.center, + style: TextStyle( + fontWeight: FontWeight.w800, + fontSize: 18, + color: Color.fromARGB(255, 255, 255, 255), + ), + ), + ], + ), + ), + ]), + ), + ], + ), + ), + ], + ), + ), + ]), + ), + ), + ); + } +} diff --git a/lib/screens/Scholarships_Awards/AwardCatalogue/award_catalogue.dart b/lib/screens/Scholarships_Awards/AwardCatalogue/award_catalogue.dart new file mode 100644 index 00000000..5c681280 --- /dev/null +++ b/lib/screens/Scholarships_Awards/AwardCatalogue/award_catalogue.dart @@ -0,0 +1,94 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/catalogue.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/previous_winners.dart'; +import 'package:fusion/screens/Scholarships_Awards/AwardCatalogue/spacs_memebers_details.dart'; +import 'package:http/http.dart'; + +class BrowseAwardCatalogue extends StatefulWidget { + @override + _BrowseAwardCatalogueState createState() => _BrowseAwardCatalogueState(); +} + +class _BrowseAwardCatalogueState extends State { + bool _loading1 = true; + + int step = 0; + + @override + void initState() { + super.initState(); + + } + + + @override + Widget build(BuildContext context) { + return DefaultTabController( + //Default TabController for tab scrollbar with number of elements equal to 4 + length: 3, + child: Scaffold( + appBar: AppBar( + backgroundColor: Colors.black, + title: Text( + "Browse Award Catalogue", + style: TextStyle(color: Colors.white), + ), + actions: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.search), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.notifications), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.more_vert), + ), + ], + //TabBar for a horizontal scrollable tob bar + bottom: TabBar( + isScrollable: true, + indicatorColor: Colors.white, + indicatorWeight: 6.0, + tabs: [ + Tab( + child: Container( + child: Text( + 'Catalogue', + ), + ), + ), + Tab( + child: Container( + child: Text( + 'Spacs Members Details', + ), + ), + ), + Tab( + child: Container( + child: Text( + 'Previous Winners', + ), + ), + ), + ], + ), + ), + //TabBarView contains all the children to be called when tapped. + body: TabBarView( + children: [ + Catalogue(), + SpacsMembersDetails(ModalRoute.of(context)!.settings.arguments.toString()), + PreviousWinners(ModalRoute.of(context)!.settings.arguments.toString()), + ], + ), + ), + ); + } +} diff --git a/lib/screens/Scholarships_Awards/AwardCatalogue/catalogue.dart b/lib/screens/Scholarships_Awards/AwardCatalogue/catalogue.dart new file mode 100644 index 00000000..f2804524 --- /dev/null +++ b/lib/screens/Scholarships_Awards/AwardCatalogue/catalogue.dart @@ -0,0 +1,130 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/services/complaint_service.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:fusion/services/profile_service.dart'; + + +class Catalogue extends StatefulWidget { + @override + _CatalogueState createState() => _CatalogueState(); +} + +class _CatalogueState extends State { + final GlobalKey _formKey = GlobalKey(); + String? programme_type; + List complaintTypeItem = [ + "Directors Gold Medal", + "Directors Silver Medal", + 'Notional Prizes', + 'MCM Scholarship', + 'D&M Proficiency Gold Medal', + ]; + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Padding( + padding: const EdgeInsets.all(18.0), + child: Column(children: [ + SizedBox(height: 10), + Container( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Text( + "Catalogue", + style: TextStyle( + fontSize: 24.0, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + )), + ), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 16), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 16), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey, + ), + borderRadius: BorderRadius.circular(15), + ), + child: DropdownButton( + hint: Text('Select Scholarship/Award'), + dropdownColor: Colors.grey[200], + icon: Icon(Icons.arrow_drop_down), + isExpanded: true, + underline: SizedBox(), + style: TextStyle(color: Colors.black, fontSize: 16), + onChanged: (newValue) { + setState(() { + programme_type = newValue.toString(); + }); + print(programme_type); + }, + value: programme_type, + items: complaintTypeItem.map((valueItem) { + return DropdownMenuItem( + value: valueItem, + child: Text(valueItem), + ); + }).toList(), + ), + ), + ), + SizedBox(height: 20), + ElevatedButton( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + 'Search', + style: TextStyle(fontSize: 20.0), + ), + ), + onPressed: () { + // Respond to button press + }, + style: ButtonStyle( + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18.0), + side: BorderSide(color: Colors.red))), + backgroundColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.pressed)) + return Colors.deepOrange; + return Colors + .deepOrangeAccent; // Use the component's default. + }, + ), + ), + ), + SizedBox(height: 20), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 40), + child: Divider( + thickness: 1, + color: Colors.black54, + ), + ), + + Text( + "Director's Gold Medal:", + textAlign: TextAlign.left, + style: const TextStyle(fontWeight: FontWeight.bold), + ), + Text( + "4.2 DirectorΓÇÖs Gold Medals 4.2.1 DirectorΓÇÖs Gold Medals (DGMs), to be presented at the Institute Convocation every year, shall be awarded for the best all round performance from among the graduating", + textAlign: TextAlign.start, + style: const TextStyle(fontWeight: FontWeight.normal), + ), + ]), + ), + ), + ); + } +} diff --git a/lib/screens/Scholarships_Awards/AwardCatalogue/previous_winners.dart b/lib/screens/Scholarships_Awards/AwardCatalogue/previous_winners.dart new file mode 100644 index 00000000..c8cc5d30 --- /dev/null +++ b/lib/screens/Scholarships_Awards/AwardCatalogue/previous_winners.dart @@ -0,0 +1,314 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_html/shims/dart_ui_real.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:intl/intl.dart'; + +const kTextFieldInputDecoration = InputDecoration( + filled: true, + fillColor: Colors.white, + contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(32)), + ), +); + +class PreviousWinners extends StatefulWidget { + final String? studentRollNo; + PreviousWinners(this.studentRollNo); + @override + _PreviousWinnersState createState() => _PreviousWinnersState(); +} + +class _PreviousWinnersState extends State { + final GlobalKey _formKey = GlobalKey(); + + String? programme_type; + List programmeTypeItem = [ + 'B.Tech', + 'B.des', + 'M.Tech', + 'PhD', + ]; + String? scholarship_type; + List scholarshipTypeItem = [ + 'MCM', + 'NSP', + 'Random', + ]; + String? academicyear; + List academicyearTypeItem = [ + '1st', + '2nd', + '3rd', + '4th', + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + body: SingleChildScrollView( + child: new Column( + children: [ + new Container( + child: new Column( + children: [ + SizedBox(height: 20), + Text( + "Previous Winners:", + textAlign: TextAlign.center, + style: const TextStyle( + fontWeight: FontWeight.bold, fontSize: 16), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 4), + child: Divider( + thickness: 1, + color: Colors.black54, + ), + ), + ], + ), + ), + new Container( + child: new Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + new Container( + padding: const EdgeInsets.fromLTRB(40, 20, 20, 0), + child: new Column( + children: [ + Text( + 'Programme', + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 15, + ), + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 4, vertical: 16), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 6), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey, + ), + borderRadius: BorderRadius.circular(15), + ), + width: 140.0, + child: DropdownButton( + hint: Text('Select Item'), + dropdownColor: Colors.grey[200], + icon: Icon(Icons.arrow_drop_down), + underline: SizedBox(), + style: + TextStyle(color: Colors.black, fontSize: 14), + onChanged: (newValue) { + setState(() { + programme_type = newValue.toString(); + }); + print(programme_type); + //print(valueItem); + }, + value: programme_type, + items: programmeTypeItem.map((valueItem) { + return DropdownMenuItem( + value: valueItem, + child: Text(valueItem), + ); + }).toList(), + ), + ), + ), + ], + ), + ), + new Container( + padding: const EdgeInsets.fromLTRB(0, 20, 40, 0), + child: new Column( + children: [ + Text( + 'Academic Year*', + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 15, + ), + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 0, vertical: 16), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 6), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey, + ), + borderRadius: BorderRadius.circular(15), + ), + width: 140.0, + child: DropdownButton( + hint: Text('Select Item'), + dropdownColor: Colors.grey[200], + icon: Icon(Icons.arrow_drop_down), + isExpanded: true, + underline: SizedBox(), + style: + TextStyle(color: Colors.black, fontSize: 14), + onChanged: (newValue) { + setState(() { + academicyear = newValue.toString(); + }); + }, + value: academicyear, + items: academicyearTypeItem.map((valueItem) { + return DropdownMenuItem( + value: valueItem, + child: Text(valueItem), + ); + }).toList(), + ), + ), + ), + ], + ), + ), + ], + ), + ), + new Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + new Container( + padding: const EdgeInsets.fromLTRB(40, 20, 20, 0), + child: new Column( + children: [ + Text( + 'Scholarship/Awards', + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 15, + ), + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 4, vertical: 16), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 16), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey, + ), + borderRadius: BorderRadius.circular(15), + ), + width: 150.0, + child: DropdownButton( + hint: Text('Select Item'), + dropdownColor: Colors.grey[200], + icon: Icon(Icons.arrow_drop_down), + isExpanded: true, + underline: SizedBox(), + style: + TextStyle(color: Colors.black, fontSize: 14), + onChanged: (newValue) { + setState(() { + scholarship_type = newValue.toString(); + }); + print(scholarship_type); + //print(valueItem); + }, + value: scholarship_type, + items: scholarshipTypeItem.map((valueItem) { + return DropdownMenuItem( + value: valueItem, + child: Text(valueItem), + ); + }).toList(), + ), + ), + ), + ], + ), + ), + ], + ), + ), + new Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 80, + ), + Center( + child: ElevatedButton( + onPressed: () async { + TextInput.finishAutofillContext(); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + 'Submit', + style: TextStyle(fontSize: 20), + ), + ), + style: ButtonStyle( + shape: + MaterialStateProperty.all( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18.0), + side: BorderSide(color: Colors.red))), + backgroundColor: + MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.pressed)) + return Colors.deepOrange; + return Colors.deepOrangeAccent; + }, + ), + ), + ), + ), + ], + ), + ), + new Container( + child: Column(children: [ + Container( + margin: EdgeInsets.all(20), + child: Table( + defaultColumnWidth: FixedColumnWidth(120.0), + border: TableBorder.all( + color: Colors.black, style: BorderStyle.solid, width: 2), + children: [ + TableRow(children: [ + Column(children: [ + Text('Award Name', style: TextStyle(fontSize: 14.0)) + ]), + Column(children: [ + Text('Winner', style: TextStyle(fontSize: 14.0)) + ]), + Column(children: [ + Text('Batch', style: TextStyle(fontSize: 14.0)) + ]), + ]), + TableRow(children: [ + Column(children: [Text('Award_Name')]), + Column(children: [Text('Student_Name')]), + Column(children: [Text('2020')]), + ]), + ], + ), + ), + ])) + ], + ), + + //Table + ), + ); + } +} diff --git a/lib/screens/Scholarships_Awards/AwardCatalogue/spacs_memebers_details.dart b/lib/screens/Scholarships_Awards/AwardCatalogue/spacs_memebers_details.dart new file mode 100644 index 00000000..fff8d373 --- /dev/null +++ b/lib/screens/Scholarships_Awards/AwardCatalogue/spacs_memebers_details.dart @@ -0,0 +1,116 @@ +import 'dart:async'; +import 'dart:convert'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:http/http.dart'; +// import 'SpacsMembersDetailsHistory/complain_history.dart'; +import 'package:flutter/material.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'dart:ui'; +// import 'LodgeSpacsMembersDetails/lodge_SpacsMembersDetails.dart'; +// import 'Feedback/feedback.dart'; +import 'package:provider/provider.dart'; + +class SpacsMembersDetails extends StatefulWidget { + String? token; + SpacsMembersDetails(this.token); + @override + _SpacsMembersDetailsState createState() => _SpacsMembersDetailsState(); +} + +class _SpacsMembersDetailsState extends State { + bool _loading1 = true; + bool _loading2 = false; + bool _loading3 = false; + bool _loading = true; + + late StreamController _profileController; + late ProfileService profileService; + late ProfileData data; + @override + void initState() { + super.initState(); + + _profileController = StreamController(); + profileService = ProfileService(); + + getData(); + } + + getData() async { + //print('token-'+widget.token!); + try { + Response response = await profileService.getProfile(); + setState(() { + data = ProfileData.fromJson(jsonDecode(response.body)); + print(data.user!['username']); + _loading = false; + }); + } catch (e) { + print(e); + } + } + + loadData() async { + getData().then((res) { + _profileController.add(res); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: _loading == true + ? Center(child: CircularProgressIndicator()) + : Container( + color: Colors.white60, + child: ListView( + shrinkWrap: true, + physics: ClampingScrollPhysics(), + children: [ + Card( + elevation: 2.0, + margin: EdgeInsets.symmetric(horizontal: 50, vertical: 20), + shadowColor: Colors.black, + child: Column( + children: [ + Container( + margin: EdgeInsets.only(top: 20), + width: 170, + height: 170, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/profile_pic.png'), + fit: BoxFit.cover, + ), + ), + ), + SizedBox(height: 10), + Text( + data.user != null + ? (data.user!['first_name'] + + ' ' + + data.user!['last_name']) + : "User does not exist on data", + style: TextStyle(color: Colors.black, fontSize: 20), + ), + SizedBox(height: 10), + Text( + data.profile != null + ? (data.profile!['department']!['name'] + + ' ' + + data.profile!['user_type']) + : "No Profile", + style: TextStyle(color: Colors.black, fontSize: 15), + ), + SizedBox(height: 10), + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/screens/Scholarships_Awards/scholarship_awards.dart b/lib/screens/Scholarships_Awards/scholarship_awards.dart new file mode 100644 index 00000000..e48c2d5e --- /dev/null +++ b/lib/screens/Scholarships_Awards/scholarship_awards.dart @@ -0,0 +1,241 @@ +import 'dart:async'; +import 'dart:convert'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:http/http.dart'; +// import 'ScholarshipAwardsHistory/complain_history.dart'; +import 'package:flutter/material.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'dart:ui'; +// import 'LodgeScholarshipAwards/lodge_ScholarshipAwards.dart'; +// import 'Feedback/feedback.dart'; +import 'package:provider/provider.dart'; + +class ScholarshipAwards extends StatefulWidget { + String? token; + ScholarshipAwards(this.token); + @override + _ScholarshipAwardsState createState() => _ScholarshipAwardsState(); +} + +main() async { + late ProfileService profileService; + late ProfileData data; + bool _loading = true; + late String studentType; + profileService = ProfileService(); + try { + Response response = await profileService.getProfile(); + + data = ProfileData.fromJson(jsonDecode(response.body)); + + print(data.user!['username']); + _loading = false; + studentType = data.profile!['department']!['name'] + + ' ' + + data.profile!['user_type']; + print(studentType); + } catch (e) { + print(e); + } +} + +class _ScholarshipAwardsState extends State { + bool _loading1 = true; + bool _loading2 = false; + bool _loading3 = false; + bool _loading = true; + + late StreamController _profileController; + late String studentType; + late ProfileService profileService; + late ProfileData data; + @override + void initState() { + super.initState(); + + _profileController = StreamController(); + profileService = ProfileService(); + + getData(); + } + + getData() async { + //print('token-'+widget.token!); + try { + Response response = await profileService.getProfile(); + setState(() { + data = ProfileData.fromJson(jsonDecode(response.body)); + + print(data.user!['username']); + _loading = false; + }); + studentType = data.profile!['department']!['name'] + + ' ' + + data.profile!['user_type']; + // print(studentType); + } catch (e) { + print(e); + } + } + + loadData() async { + getData().then((res) { + _profileController.add(res); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: _loading == true + ? Center(child: CircularProgressIndicator()) + : Container( + color: Colors.white60, + child: ListView( + shrinkWrap: true, + physics: ClampingScrollPhysics(), + children: [ + Card( + elevation: 2.0, + margin: EdgeInsets.symmetric(horizontal: 50, vertical: 20), + shadowColor: Colors.black, + child: Column( + children: [ + Container( + margin: EdgeInsets.only(top: 20), + width: 170, + height: 170, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/profile_pic.png'), + fit: BoxFit.cover, + ), + ), + ), + SizedBox(height: 10), + Text( + data.user != null + ? (data.user!['first_name'] + + ' ' + + data.user!['last_name']) + : "User does not exist on data", + style: TextStyle(color: Colors.black, fontSize: 20, fontWeight: FontWeight.bold), + ), + SizedBox(height: 10), + Text( + data.profile != null + ? (data.profile!['department']!['name'] + + ' ' + + data.profile!['user_type']) + : "No Profile", + style: TextStyle(color: Colors.black, fontSize: 15, fontWeight: FontWeight.w500), + ), + SizedBox(height: 10), + ], + ), + ), + Card( + elevation: 6.0, + margin: EdgeInsets.symmetric(horizontal: 40, vertical: 40), + shadowColor: Colors.black, + child: Column( + + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextButton( + style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Colors.orange)), + onPressed: () { + setState(() { + _loading1 = true; + _loading2 = false; + _loading3 = false; + if (data.profile!['user_type'] == 'faculty') { + Navigator.pushNamed(context, + '/scholarship_awards/manage_award_catalogue_fac', + arguments: data.user != null + ? data.user!['username'] + : "null"); + } else { + Navigator.pushNamed(context, + '/scholarship_awards/browse_award_catalogue', + arguments: data.user != null + ? data.user!['username'] + : "null"); + } + }); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + data.profile!['user_type'] == 'faculty' + ? "Manage Catalogue" + : "Browse Award Catalogue", + style: TextStyle( + fontWeight: FontWeight.w800, + fontSize: 18, + color: Colors.white + ), + ), + Icon( + Icons.arrow_forward, + color: Colors.white, + ) + ], + ), + ), + SizedBox(height: 10), + TextButton( + style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Colors.orange)), + onPressed: () { + setState(() { + _loading1 = false; + _loading2 = true; + _loading3 = false; + if (data.profile!['user_type'] == 'faculty') { + Navigator.pushNamed( + context, + '/scholarship_awards/invite_application', + ); + } else { + Navigator.pushNamed( + context, + '/scholarship_awards/apply_for_awards', + ); + } + }); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + data.profile!['user_type'] == 'faculty' + ? "Invite Application" + : "Apply For Awards", + style: TextStyle( + fontWeight: FontWeight.w800, + fontSize: 18, + color: Color.fromARGB(255, 255, 255, 255), + ), + ), + Icon( + Icons.arrow_forward, + color: Colors.white, + ) + ], + ), + ), + SizedBox(height: 10), + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml index 49030f0b..621df6e3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,6 +39,7 @@ dependencies: path_provider: ^2.0.8 open_file: ^3.2.1 flutter_html: ^2.2.1 + toggle_switch: ^2.0.1