Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

SA 4 - Placement Module #176

Open
wants to merge 46 commits into
base: sa-4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1505674
script structured
Arindam2002 Mar 27, 2023
aa2e579
Server Url updated
AgPriyanshu18 Nov 17, 2023
838008a
Merge pull request #137 from AgPriyanshu18/main
Shivkant-Chauhan Nov 17, 2023
d329bf3
Gad 5 to main (#162)
PraneGIT Apr 17, 2024
3d44184
Create tpo_home.dart
Haritha-Murukutla Apr 23, 2024
072aa73
Add files via upload
Haritha-Murukutla Apr 23, 2024
1bd442c
Create demo.txt
Haritha-Murukutla Apr 23, 2024
b7e3c1b
Create placement_cell_home.dart
Haritha-Murukutla Apr 23, 2024
ccd660c
view_statistics\statistics.dart
Haritha-Murukutla Apr 23, 2024
4c68617
Delete student directory
Haritha-Murukutla Apr 23, 2024
25e8d5a
Create placement_cell_home.dart
Haritha-Murukutla Apr 23, 2024
2f6e176
Create statistics.dart
Haritha-Murukutla Apr 23, 2024
455a80e
Create schedule.dart
Haritha-Murukutla Apr 23, 2024
3bb9ec0
Create jobs.dart
Haritha-Murukutla Apr 23, 2024
6ed9718
Create resume_landing.dart
Haritha-Murukutla Apr 23, 2024
98f2c38
Add files via upload
Haritha-Murukutla Apr 23, 2024
d99879d
Update placement_cell_home.dart
Haritha-Murukutla Apr 23, 2024
0e8f81e
Update tpo_home.dart
Haritha-Murukutla Apr 23, 2024
c338a5d
Update statistics.dart
Haritha-Murukutla Apr 23, 2024
0f43ac7
Update schedule.dart
Haritha-Murukutla Apr 23, 2024
f88e97b
Update jobs.dart
Haritha-Murukutla Apr 23, 2024
1323301
Update resume_landing.dart
Haritha-Murukutla Apr 23, 2024
b239357
Delete lib/screens/Placement/demo.txt
Haritha-Murukutla Apr 23, 2024
7e02b94
Create Student
Haritha-Murukutla Apr 23, 2024
e51bacf
Delete lib/screens/Placement directory
Haritha-Murukutla Apr 23, 2024
5dd7c12
Create placement_cell_home.dart
Haritha-Murukutla Apr 23, 2024
a26b4f4
Update placement_cell_home.dart
Haritha-Murukutla Apr 23, 2024
6fcd7fe
Create tpo_home.dart
Haritha-Murukutla Apr 23, 2024
cd00c04
Update tpo_home.dart
Haritha-Murukutla Apr 23, 2024
e784874
Create faculty_stats.dart
Haritha-Murukutla Apr 23, 2024
531d628
Create chairman_statistics.dart
Haritha-Murukutla Apr 23, 2024
48d5a5a
Create statistics.dart
Haritha-Murukutla Apr 23, 2024
303a33b
Create jobs.dart
Haritha-Murukutla Apr 23, 2024
9e9479a
Create schedule.dart
Haritha-Murukutla Apr 23, 2024
7d5befa
Create resume_landing.dart
Haritha-Murukutla Apr 23, 2024
496dea7
Add files via upload
Haritha-Murukutla Apr 23, 2024
bc92385
Add files via upload
Haritha-Murukutla Apr 23, 2024
4218c7d
Add files via upload
Haritha-Murukutla Apr 23, 2024
9f03b9f
Update api.dart
Haritha-Murukutla Apr 23, 2024
57297ca
Update main.dart
Haritha-Murukutla Apr 23, 2024
1dabed8
Add files via upload
Haritha-Murukutla Apr 23, 2024
192e867
Add files via upload
Haritha-Murukutla Apr 23, 2024
014154a
Update side_drawer.dart
Haritha-Murukutla Apr 23, 2024
7654aa2
Update side_drawer2.dart
Haritha-Murukutla Apr 23, 2024
787c752
Update pubspec.yaml
Haritha-Murukutla Apr 23, 2024
70a70f7
Update tpo_home.dart
Haritha-Murukutla Apr 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.8.21'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
13 changes: 0 additions & 13 deletions clone.sh

This file was deleted.

106 changes: 106 additions & 0 deletions lib/Components/appBar2.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import 'package:flutter/material.dart';
import 'package:fusion/constants.dart';
import 'package:fusion/services/service_locator.dart';
import 'package:fusion/services/storage_service.dart';

class CustomAppBar extends StatefulWidget implements PreferredSizeWidget {
final String curr_desig;
final String headerTitle;

final ValueChanged<String> onDesignationChanged;

const CustomAppBar({
Key? key,
required this.curr_desig,
required this.headerTitle,

required this.onDesignationChanged,
}) : super(key: key);

@override
_CustomAppBarState createState() => _CustomAppBarState();

@override
Size get preferredSize => Size.fromHeight(kToolbarHeight);
}

class _CustomAppBarState extends State<CustomAppBar> {
late List<String> designations;
late String current;
var service = locator<StorageService>();

@override
void initState() {
super.initState();
designations = (service!.getFromDisk('designations') as List<dynamic>)
.map((dynamic item) => item.toString())
.toList();

current = service!.getFromDisk(
'Current_designation'); // Ensure designations is not null before accessing index 0
}

@override
Widget build(BuildContext context) {
return AppBar(
iconTheme: IconThemeData(color: Colors.white),
backgroundColor: kPrimaryColor,
title: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Flexible(
child: Padding(
padding: EdgeInsets.only(right: 20.0), // Add some right padding to ensure space for the dropdown
child: Text(
widget.headerTitle, // Example of a long title
overflow: TextOverflow.ellipsis, // Prevents overflow by adding ellipsis
style: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
),
),
DropdownButtonHideUnderline(
child: DropdownButton<String>(
padding: const EdgeInsets.all(15),
borderRadius: BorderRadius.circular(5),
value: current,
icon: Icon(Icons.arrow_drop_down, color: Colors.white),
iconSize: 24,
style: TextStyle(color: Colors.white, fontSize: 18),
dropdownColor:
kPrimaryColor, // Set the dropdown background color to orange
onChanged: (String? newValue) {
widget.onDesignationChanged(newValue!);
setState(() {
current = newValue!;
service!.saveToDisk('Current_designation', current);
});
},
items: designations.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(
value,
style: TextStyle(
color: Colors.white), // Set the text color to white
),
);
}).toList(),
onTap: () {
// Find the index of the selected value
int index = designations.indexOf(current);
// Scroll the dropdown to the selected value
Scrollable.ensureVisible(context,
alignment: 0.5, duration: Duration(milliseconds: 300));
},
),
),
],
),
actions: <Widget>[],
);
}
}
148 changes: 148 additions & 0 deletions lib/Components/bottom_navigation_bar.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
import 'package:flutter/material.dart';

class MyBottomNavigationBar extends StatefulWidget {
@override
_MyBottomNavigationBarState createState() => _MyBottomNavigationBarState();
}

class _MyBottomNavigationBarState extends State<MyBottomNavigationBar> {
bool _notificationsBool = false;
bool _announcementsBool = false;
bool _newsBool = false;
bool _homeBool = false;

@override
Widget build(BuildContext context) {
return SizedBox(
height: 100.0,
child: Padding(
padding: EdgeInsets.only(bottom: 40),
child: Card(
color: Colors.deepOrangeAccent,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(17.0),
),
child: Padding(
padding: const EdgeInsets.only(
left: 13.0, right: 10.0, top: 5.0, bottom: 5.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
GestureDetector(
onTap: () {
_notificationsBool = false;
_announcementsBool = false;
_newsBool = false;
_homeBool = true;
setState(() {
_notificationsBool = false;
_announcementsBool = false;
_newsBool = false;
_homeBool = true;
});
Navigator.pushReplacementNamed(context, "/dashboard");

},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Icon(
Icons.home_rounded,
color: Colors.white,
size: _homeBool ? 30.0 : 25.0,
),
],
),
),
GestureDetector(
onTap: () {
_newsBool = true;
_announcementsBool = false;
_notificationsBool = false;
_homeBool = false;

setState(() {
_newsBool = true;
_announcementsBool = false;
_notificationsBool = false;
_homeBool = false;
});
Navigator.pushReplacementNamed(context, "/news");
},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Icon(
Icons.newspaper_rounded,
color: Colors.white,
size: _newsBool ? 30.0 : 25.0,
),
],
),
),
GestureDetector(
onTap: () {
_announcementsBool = false;
_newsBool = false;
_notificationsBool = true;
_homeBool = false;

setState(() {
_announcementsBool = false;
_newsBool = false;
_notificationsBool = true;
_homeBool = false;
});
Navigator.pushReplacementNamed(context, "/notification");
},
child: Padding(
padding: const EdgeInsets.only(right: 16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Icon(
Icons.notifications_active_rounded,
color: Colors.white,
size: _notificationsBool ? 30.0 : 25.0,
),
],
),
),
),
GestureDetector(
onTap: () {
_announcementsBool = true;
_newsBool = false;
_notificationsBool = false;
_homeBool = false;

setState(() {
_announcementsBool = true;
_newsBool = false;
_notificationsBool = false;
_homeBool = false;
});
Navigator.pushReplacementNamed(context, "/announcement");
},
child: Padding(
padding: const EdgeInsets.only(right: 16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Icon(
Icons.campaign_rounded,
color: Colors.white,
size: _announcementsBool ? 30.0 : 25.0,
),
],
),
),
),
],
),
),
),
),
);
}
}
22 changes: 20 additions & 2 deletions lib/Components/side_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class _SideDrawerState extends State<SideDrawer> {
" " +
service.profileData.profile!['user_type'];
}

late String user;
@override
Widget build(BuildContext context) {
return SafeArea(
Expand Down Expand Up @@ -140,7 +140,25 @@ class _SideDrawerState extends State<SideDrawer> {
pageMover: '/health_center',
),
ModulesPadding(line: 'Leave Module'),
ModulesPadding(line: 'Placement Module'),
user.toLowerCase().contains("student")?
ModulesPadding(
line: 'Placement Module',
pageMover: '/student/placement_cell_home',
isActive: true
):user.toLowerCase().contains("faculty")?
ModulesPadding(
line: 'Placement Module',
pageMover: '/faculty/faculty_stats',
isActive: true
):user.toLowerCase().contains("chairman")?
ModulesPadding(
line: 'Placement Module',
pageMover: '/chairman/chairman_statistics',
isActive: true
) :ModulesPadding(
line: 'Placement Module',
pageMover: '/tpo/tpo_home',
isActive: true),
ModulesPadding(line: 'Visitors Hostel Module'),
ModulesPadding(line: 'File Tracking Module'),
],
Expand Down
Loading