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

Long overdue #98

Merged
merged 141 commits into from
Sep 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
1d8f102
Minor changes to credits popup button
jydv402 Jun 14, 2023
34a8f8f
Reduced the toggle switch size
jydv402 Jun 16, 2023
4bb0e76
Added new Neumorphic Package
jydv402 Jun 16, 2023
83a5bfa
minor alignment fix
aminafayaz Jun 18, 2023
d36b1e2
added neumorphic buttons to generate pg
Karthi-R-K Jun 18, 2023
63be0d0
set min window resize value
aminafayaz Jun 19, 2023
b477d6e
Added basic framework
jydv402 Jun 28, 2023
01fdcf7
comments
officiallyaninja Jun 30, 2023
14430e0
added columns (rollno and class) to table schema
sibycr18 Jun 30, 2023
23e3f63
adds rollno,class to students table seperately
sibycr18 Jun 30, 2023
0904284
added ClassViewRow class
sibycr18 Jul 1, 2023
7e79fe6
managed to make the data appear in the 3rd view
sibycr18 Jul 1, 2023
247822d
Merge branch 'dev' of https://github.com/Govind-S-B/ExamHall-SeatAllo…
officiallyaninja Jul 2, 2023
4923ef4
modified some methods and variables
sibycr18 Jul 3, 2023
b00ff23
implemented delete class row functionality
sibycr18 Jul 3, 2023
a683f4a
Merge pull request #79 from Govind-S-B/main
Govind-S-B Jul 3, 2023
6f15e24
sorted the roll list before viewing
sibycr18 Jul 3, 2023
ba24981
added in field buttons for view 3 in students page
Govind-S-B Jul 3, 2023
9fe1102
added in field buttons for view 3 in students page , more shit
Govind-S-B Jul 3, 2023
f098f99
Added initial button arrangement...
jydv402 Jul 3, 2023
829deb0
Merge pull request #81 from Govind-S-B/main
Govind-S-B Jul 4, 2023
7e48863
implemented update functions for 3rd view
sibycr18 Jul 4, 2023
96ef7cb
removed console log printers
sibycr18 Jul 4, 2023
06eef03
removed production comments
sibycr18 Jul 4, 2023
9063a45
sorts rollList after every update
sibycr18 Jul 4, 2023
be572c1
Merge pull request #82 from Govind-S-B/new-table-view
Govind-S-B Jul 4, 2023
2295742
Merge branch 'dev' into uiMrk2
Govind-S-B Jul 4, 2023
fc998bd
Merge pull request #83 from Govind-S-B/uiMrk2
Govind-S-B Jul 4, 2023
f516f6e
Merge branch 'dev' of https://github.com/Govind-S-B/ExamHall-SeatAllo…
officiallyaninja Jul 4, 2023
be2c69a
future (and present) proofing db selects
officiallyaninja Jul 4, 2023
2aac438
added [] to each error site
officiallyaninja Jul 4, 2023
45d4fb6
some artifacts generated
Govind-S-B Jul 5, 2023
49d84ff
Merge branch 'dev' of https://github.com/Govind-S-B/ExamHall-SeatAllo…
Govind-S-B Jul 5, 2023
9e7e8af
Merge pull request #85 from Govind-S-B/main
Govind-S-B Jul 5, 2023
bcaecf7
Removed neumorphic buttons , cause it added weird dependency stuff
Govind-S-B Jul 5, 2023
7c6ea7a
Update build_flutter_win.bat with few more dependency dll
Govind-S-B Jul 5, 2023
4bc9ff0
fix typo
Govind-S-B Jul 5, 2023
68cbcee
Update pubspec.yaml
Govind-S-B Jul 5, 2023
5d78463
Update pubspec.yaml
Govind-S-B Jul 5, 2023
97bde6d
removed quotes
sibycr18 Jul 6, 2023
1b5dc18
Update .gitignore
officiallyaninja Jul 6, 2023
6691b8f
deleted non working exit code handler
officiallyaninja Jul 6, 2023
83ea6aa
improved error messages
officiallyaninja Jul 6, 2023
198abe3
following conventions (*cough* govind)
officiallyaninja Jul 6, 2023
f52a250
made adding session id work with enter
officiallyaninja Jul 6, 2023
bc314cf
Merge pull request #86 from Govind-S-B/better-allocator-errors-in-flu…
officiallyaninja Jul 6, 2023
72439b9
Fixed the roll no. overlapping issue in Class Based view
jydv402 Jul 8, 2023
db97a09
removed print console log
sibycr18 Jul 8, 2023
a66cc27
Merge branch 'cbv-mrk2' of https://github.com/Govind-S-B/ExamHall-Sea…
sibycr18 Jul 8, 2023
301d1b5
updated query
sibycr18 Jul 8, 2023
6bbb37e
fixed student delete bug
sibycr18 Jul 8, 2023
1a0ad5c
Finished functionalities on Class Based View
jydv402 Jul 8, 2023
f35705a
fixed subject change bug
sibycr18 Jul 8, 2023
ee80578
fixed class change bug
sibycr18 Jul 8, 2023
b170e7d
fixed deletion bug
sibycr18 Jul 8, 2023
cf04d1d
Minor UI change
jydv402 Jul 8, 2023
25adf59
Merge pull request #87 from Govind-S-B/cbv-mrk2
officiallyaninja Jul 8, 2023
64ffdbe
Created Todo.txt and added some todos
officiallyaninja Jul 10, 2023
38df6ab
Revert "Created Todo.txt and added some todos"
officiallyaninja Jul 10, 2023
53fe042
Create todo.txt
officiallyaninja Jul 10, 2023
ae6153a
Merge pull request #88 from Govind-S-B/Test-teaching-todo-list
officiallyaninja Jul 10, 2023
fa513b6
blah blah blah
officiallyaninja Jul 10, 2023
bcc35d7
Merge pull request #90 from Govind-S-B/removing-todo.txt
officiallyaninja Jul 10, 2023
52e05d3
Hall pages focuses set up
officiallyaninja Jul 10, 2023
1060a37
renaming TextEditingControllers
officiallyaninja Jul 12, 2023
9f14839
focus node list and check if all fields full helper function
officiallyaninja Jul 12, 2023
e7cab16
moved form submission into a separate function
officiallyaninja Jul 12, 2023
790ac9e
changed text field checking function to return appropriate focusnode
officiallyaninja Jul 12, 2023
ccf672f
rename onSubmitForm to trySubmitForm
officiallyaninja Jul 12, 2023
09d0f76
better focusing system
officiallyaninja Jul 13, 2023
e6845da
added focus node logic tot students page
officiallyaninja Jul 13, 2023
4cc5893
added rolno/range regex checking
officiallyaninja Jul 13, 2023
08b9ae5
bugfix: insertion of duplicate subject
officiallyaninja Jul 13, 2023
3406285
removed selectedSubject variable
officiallyaninja Jul 13, 2023
938f111
removed clearing subject field on enter
officiallyaninja Jul 13, 2023
42d2da5
added focus reset to class field on form submission
officiallyaninja Jul 13, 2023
06701fc
focus on selecting already used subject
officiallyaninja Jul 13, 2023
5c8e4d2
cleaning up commented code
officiallyaninja Jul 13, 2023
7bbda2a
improved sql insert performance using concatenation
officiallyaninja Jul 13, 2023
8ac3d24
removing commented code
officiallyaninja Jul 13, 2023
5092652
Merge pull request #91 from Govind-S-B/focus-on-enter
Govind-S-B Jul 15, 2023
78189b9
Update main.rs
officiallyaninja Jul 15, 2023
a736927
Update main.rs
officiallyaninja Jul 15, 2023
0ad350a
Added initial framework for credits revamp
jydv402 Jul 16, 2023
a6375fa
Changed up the look
jydv402 Jul 16, 2023
080a9ad
Applied credits to all
jydv402 Jul 16, 2023
77fca3a
Updated url9
jydv402 Jul 16, 2023
51c8a40
Entirely new arrangement for Credits Overlay
jydv402 Jul 16, 2023
07c2f0d
Commented some codes
jydv402 Jul 17, 2023
a770263
Some more codes commented
jydv402 Jul 17, 2023
546de4f
Minor adjustments
jydv402 Jul 17, 2023
0a1a008
Removed commented codes
jydv402 Jul 18, 2023
a5f6a3e
added functionality to open generated pdfs Pending:Error Msg Format O…
Govind-S-B Jul 18, 2023
4d3e3fe
Merge pull request #92 from Govind-S-B/rust-cleanup
Govind-S-B Jul 18, 2023
54a4176
Merge pull request #93 from Govind-S-B/credits_V2
Govind-S-B Jul 18, 2023
7b19f4e
added role corrections
Govind-S-B Jul 18, 2023
3b04fef
Update README.md
Govind-S-B Jul 18, 2023
0f793bd
base for manual edit mode
Govind-S-B Jul 18, 2023
c6d557f
Merge branch 'dev' of https://github.com/Govind-S-B/ExamHall-SeatAllo…
Govind-S-B Jul 18, 2023
63d46dc
Update README.md
Govind-S-B Aug 3, 2023
5801a08
Fix : macos podfile issus
Vishnuxx Aug 3, 2023
d836863
Added fluent_ui dependency
Vishnuxx Aug 3, 2023
8487b64
Decoupled Pages enum from main.dart
Vishnuxx Aug 3, 2023
811a63e
Created Contributor model
Vishnuxx Aug 3, 2023
264fbb3
Created Contributor tile widget
Vishnuxx Aug 3, 2023
4fe8b20
Created Contributor data
Vishnuxx Aug 3, 2023
801ba10
Created Contributor Widget and implemented Contributor Tiles
Vishnuxx Aug 3, 2023
6b71acc
Moved stateless widgets inside widgets/stateless/
Vishnuxx Aug 4, 2023
ac43005
Enabled network client permission for macos
Vishnuxx Aug 4, 2023
d48c8d4
Added flutter_bloc dependency
Vishnuxx Aug 4, 2023
70f6ba7
Created bloc for main screen
Vishnuxx Aug 4, 2023
515e8ed
removed debug print
Vishnuxx Aug 4, 2023
cbab36b
Refactored and Implemented bloc in main.dart
Vishnuxx Aug 4, 2023
4f9ecc6
fixed class name typo
Vishnuxx Aug 4, 2023
352d8f8
Replaced _buildOffstageNavigator with IndexedStack for drawer Items
Vishnuxx Aug 4, 2023
e2cf6ce
Decoupled Hall class from hall_page
Vishnuxx Aug 4, 2023
38ec1be
Created HallsDatabase Service
Vishnuxx Aug 4, 2023
8f4df70
Merge pull request #95 from Govind-S-B/manual_edit
Govind-S-B Aug 9, 2023
46f342d
Added initial UI layout for Manual Edit mode
jydv402 Sep 6, 2023
506a187
Added a real button(Generate)
jydv402 Sep 7, 2023
60b586b
Added Framework for dropdown selection
jydv402 Sep 7, 2023
b475be3
Added Alert Dialogue Boxes to halls and students pages (for clear tab…
jydv402 Sep 8, 2023
4a74b9c
The Drop down menu now populates with halls from report.db
jydv402 Sep 9, 2023
5494091
Cleared an unwanted list
jydv402 Sep 9, 2023
171338b
displays details of the selected hall
aminafayaz Sep 10, 2023
3c52e1e
unallocated seats shown
aminafayaz Sep 13, 2023
1f19736
Applied the dragging action
jydv402 Sep 14, 2023
298049d
Working Drag and drop feature
jydv402 Sep 14, 2023
82185b5
Display Unallocated seats after drag and drop
jydv402 Sep 14, 2023
874ae2d
minor tweaks in drag action
jydv402 Sep 14, 2023
9d659e9
reverse drag and drop feature
aminafayaz Sep 14, 2023
7df4914
Minor tweaks
jydv402 Sep 14, 2023
514ca4f
Minor UI tweaks
jydv402 Sep 14, 2023
4625422
Fixed recurring entries in the right list
jydv402 Sep 14, 2023
5030c58
Fixed unexpected data entry
jydv402 Sep 14, 2023
712fa69
Entries now reflect to report.db
jydv402 Sep 15, 2023
64a2f1a
Fixed errors in adding to the database
jydv402 Sep 15, 2023
5d28ccc
Code clean up
jydv402 Sep 15, 2023
db2ee05
Implemented Generate button function
jydv402 Sep 15, 2023
9adb3f7
Fixed drag and drop leading to the creation of duplicate values
jydv402 Sep 16, 2023
a136ea5
Merge pull request #97 from Govind-S-B/manual_edit
Govind-S-B Sep 16, 2023
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
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,13 @@ allocator/test/bin/*.db
allocator/test/bin/*.exe
allocator/test/reports/*.db
allocator/test/logs/*.txt
ehsa_frontend/build/windows/runner/Debug/ehsa_frontend.exe
ehsa_frontend/build/windows/runner/Debug/flutter_windows.dll
ehsa_frontend/build/windows/runner/Debug/url_launcher_windows_plugin.dll
ehsa_frontend/linux/flutter/generated_plugin_registrant.cc
ehsa_frontend/linux/flutter/generated_plugin_registrant.h
ehsa_frontend/linux/flutter/generated_plugins.cmake
ehsa_frontend/macos/Flutter/GeneratedPluginRegistrant.swift
ehsa_frontend/windows/flutter/generated_plugin_registrant.cc
ehsa_frontend/windows/flutter/generated_plugin_registrant.h
ehsa_frontend/windows/flutter/generated_plugins.cmake
4 changes: 2 additions & 2 deletions EHSA_V3/bin/config.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[exam info]
name="Marian Engineering College"
title="Internal Examination"
name=Marian Engineering College
title=Internal Examination
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ExamHall-SeatAllocator
A GUI application built in Flutter, Rust, and Python that automates the assignment of student seats in examinations and generates appropriate PDFs
A GUI application built in Flutter, Rust, and Python that automates the assignment of student seats in examinations and generates appropriate PDFs.

# Requirements
Windows 10 and above
Expand All @@ -8,7 +8,7 @@ MSVC++ Redist. ( packaged with installer )
# How to use
- go to [releases](https://github.com/Govind-S-B/ExamHall-SeatAllocator/releases)
- get the latest installer and run it
- to learn more about usage refer the (wiki)[todo: write wikipage and add link]
- to learn more about usage refer the [wiki](https://github.com/Govind-S-B/ExamHall-SeatAllocator/wiki)

# Algorithm
the seat assignment algorithm has 3 modes: `subject`, `class`, and `any`
Expand Down
6 changes: 3 additions & 3 deletions allocator/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ pub fn get() -> Arguments {
"-r" | "--randomize" => {
delta = Some(
args.next()
.expect("no argument after -r flag")
.expect("[ no argument after -r flag ]")
.parse()
.expect("invalid argument for delta"),
.expect("[ invalid argument for delta ]"),
)
}
_ => paths.push(arg),
Expand All @@ -26,7 +26,7 @@ pub fn get() -> Arguments {
let [_, input_db_path, output_db_path] = paths.as_slice()
else {
eprintln!("args given are {paths:?}");
panic!("INVALID ARGUMENTS: arguments should be \" ./allocator <input_db_path> <output_db_path> [-r | --randomize]");
panic!("[ INVALID ARGUMENTS: arguments should be \" ./allocator <input_db_path> <output_db_path> [-r | --randomize] ]");
};

Arguments {
Expand Down
20 changes: 11 additions & 9 deletions allocator/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use sqlite as sq;
use std::collections::hash_map::HashMap;

pub fn read_halls_table(conn: &Connection) -> Vec<Hall> {
let query = "SELECT * FROM halls ORDER BY capacity DESC";
let query = "SELECT name, capacity FROM halls ORDER BY capacity DESC";
let mut halls: Vec<Hall> = vec![];
conn.iterate(query, |pair| {
//pair is an array slice of the columns and the values in the colums
Expand All @@ -14,12 +14,12 @@ pub fn read_halls_table(conn: &Connection) -> Vec<Hall> {

let &(_, Some(hall_name)) = iter.next().unwrap()
else {
panic!("DATABASE NOT VALID")
panic!("[ HALL DATABASE NOT VALID ]")
};

let &(_, Some(capacity)) = iter.next().unwrap()
else {
panic!("DATABASE NOT VALID")
panic!("[ HALL DATABASE NOT VALID ]")
};

halls.push(Hall::new(hall_name, capacity.parse().unwrap()));
Expand All @@ -30,7 +30,7 @@ pub fn read_halls_table(conn: &Connection) -> Vec<Hall> {
halls
}
pub fn read_students_table(conn: &Connection) -> HashMap<String, Vec<Student>> {
let query = "SELECT * FROM students";
let query = "SELECT id, subject FROM students";
let mut students: HashMap<String, Vec<Student>> = HashMap::new();
conn.iterate(query, |pair| {
//pair is an array slice of the columns and the values in the colums
Expand All @@ -39,11 +39,11 @@ pub fn read_students_table(conn: &Connection) -> HashMap<String, Vec<Student>> {
let mut iter = pair.iter();
let &(_, Some(id)) = iter.next().unwrap()
else {
panic!("DATABASE NOT VALID")
panic!("[ STUDENT DATABASE NOT VALID ]")
};
let &(_, Some(subject)) = iter.next().unwrap()
else {
panic!("DATABASE NOT VALID")
panic!("[ STUDENT DATABASE NOT VALID ]")
};

let student = Student::new(id.to_owned(), subject.to_owned());
Expand All @@ -65,7 +65,8 @@ pub fn read_students_table(conn: &Connection) -> HashMap<String, Vec<Student>> {
}
pub fn write_report_table(conn: &Connection, halls: &Vec<Hall>) {
let query = "DROP TABLE IF EXISTS report";
conn.execute(query).expect("error dropping report table");
conn.execute(query)
.expect("[ error dropping report table ]");
let command = "
CREATE TABLE report
(id CHAR(15) PRIMARY KEY NOT NULL,
Expand All @@ -75,7 +76,8 @@ pub fn write_report_table(conn: &Connection, halls: &Vec<Hall>) {
seat_no INT NOT NULL,
subject CHAR(50) NOT NULL)";

conn.execute(command).expect("error creating report table");
conn.execute(command)
.expect("[ error creating report table ]");

let mut command =
"INSERT INTO report (id,class,roll_no,subject,hall,seat_no) VALUES".to_owned();
Expand All @@ -102,5 +104,5 @@ pub fn write_report_table(conn: &Connection, halls: &Vec<Hall>) {
command.pop();
command += ";";
conn.execute(command)
.expect("error inserting row into report table");
.expect("[ error inserting row into report table ]");
}
26 changes: 13 additions & 13 deletions allocator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ enum AllocationMode {
fn main() {
let args = args::get();

let conn = sqlite::open(args.input_db_path).expect("Error connecting to input.db");
let conn = sqlite::open(args.input_db_path).expect("[ Error connecting to input.db ]");
let mut students = db::read_students_table(&conn);
let mut halls = db::read_halls_table(&conn);
if let Some(delta) = args.randomize {
if delta == 0 {
panic!("delta is 0")
panic!("[ delta(CLI Argument) is 0 ]")
}
let mut rng = rand::thread_rng();
halls = {
Expand Down Expand Up @@ -78,9 +78,8 @@ fn main() {
let mut extra_seats = {
let total_seats: usize = halls.iter().map(|h| h.seats_left()).sum();
let total_students: usize = students.values().map(|s| s.len()).sum();

if total_students > total_seats {
panic!("ERROR: more students than seats")
panic!("[ more students than seats ]")
}
total_seats - total_students
};
Expand All @@ -95,7 +94,7 @@ fn main() {
let next_student = get_next_student(&mut students, &next_key);

hall.push(next_student)
.expect("tried to push student into full hall");
.expect("[ tried to push student into full hall ]");
placed_keys.insert(next_key.clone());
previously_placed_key = Some(next_key);
continue;
Expand All @@ -104,7 +103,7 @@ fn main() {
// run out of subjects and now must leave empty seats between students
if extra_seats > 0 {
hall.push_empty()
.expect("tried to push empty on full hall (error should never happer)");
.expect("[ tried to push empty on full hall (error should never happer) ]");
previously_placed_key = None;
extra_seats -= 1;
continue;
Expand Down Expand Up @@ -158,7 +157,7 @@ fn main() {
}
}

let conn = sqlite::open(args.output_db_path).expect("Error connecting to report.db");
let conn = sqlite::open(args.output_db_path).expect("[ Error connecting to report.db ]");
db::write_report_table(&conn, &halls);
log_sparse_halls(&halls);
}
Expand All @@ -167,11 +166,11 @@ fn main() {
fn get_next_student(students: &mut HashMap<String, Vec<Student>>, key: &str) -> Student {
let students_in_key = students
.get_mut(key)
.expect("trying to take a student from subject that doesn't exist");
.expect("[ trying to take a student from subject that doesn't exist ]");

let next_student = students_in_key
.pop()
.expect("trying to take student from empty subject list");
.expect("[ trying to take student from empty subject list ]");

if students_in_key.is_empty() {
students.remove(key);
Expand Down Expand Up @@ -218,24 +217,25 @@ pub fn log_sparse_halls(halls: &[Hall]) {
.create(true)
.append(true)
.open("logs\\logs.txt")
.expect("err opening log file");
.expect("[ err opening log file ]");
let mut sparse_hall_count = 0;
for hall in halls {
let num_students = hall.students().len();
if num_students > 0 && num_students < 20 {
sparse_hall_count += 1;
let content = format!("{}: {}, ", hall.name(), num_students);
file.write_all(content.as_bytes())
.expect("file write error");
.expect("[ file write error ]");
}
}
if sparse_hall_count == 0 {
let content = format!("No sparse halls :D");
file.write_all(content.as_bytes())
.expect("file write error")
.expect("[ file write error ]")
}

file.write_all("\n".as_bytes()).expect("file write error")
file.write_all("\n".as_bytes())
.expect("[ file write error ]")
}

#[cfg(not(debug_assertions))]
Expand Down
12 changes: 10 additions & 2 deletions allocator/src/student.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ pub struct Student {
impl Student {
pub fn new(id: String, subject: String) -> Self {
let id_clone = id.clone();
let (class, roll_no) = id_clone.split_once('-').expect("invalid id format");
let roll_no: i32 = roll_no.parse().expect("invalid roll number");
let (class, roll_no) = id_clone
.split_once('-')
.unwrap_or_else(|| panic!("[ invalid id format (id is {})]", id));
let roll_no: i32 = roll_no.parse().unwrap_or_else(|e| {
panic!(
"[ invalid roll number (id is {}) (error is {1:?}; {1})]",
id, e
)
});
// expect("[ invalid roll number ]");
let class = class.to_owned();
Self {
id,
Expand Down
2 changes: 1 addition & 1 deletion build_flutter_win.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rmdir /s /q EHSA_V3\bin\data && del /q EHSA_V3\bin\ehsa_frontend.exe del /q EHSA_V3\bin\flutter_windows.dll del /q EHSA_V3\bin\url_launcher_windows_plugin.dll
cd ehsa_frontend && flutter build windows && cd ../ && move ehsa_frontend\build\windows\runner\Release\data EHSA_V3\bin && move ehsa_frontend\build\windows\runner\Release\ehsa_frontend.exe EHSA_V3\bin && move ehsa_frontend\build\windows\runner\Release\flutter_windows.dll EHSA_V3\bin && move ehsa_frontend\build\windows\runner\Release\url_launcher_windows_plugin.dll EHSA_V3\bin
cd ehsa_frontend && flutter build windows && cd ../ && move ehsa_frontend\build\windows\runner\Release\data EHSA_V3\bin && move ehsa_frontend\build\windows\runner\Release\ehsa_frontend.exe EHSA_V3\bin && move ehsa_frontend\build\windows\runner\Release\flutter_windows.dll EHSA_V3\bin && move ehsa_frontend\build\windows\runner\Release\url_launcher_windows_plugin.dll EHSA_V3\bin && move ehsa_frontend\build\windows\runner\Release\window_manager_plugin.dll EHSA_V3\bin && move ehsa_frontend\build\windows\runner\Release\screen_retriever_plugin.dll EHSA_V3\bin
4 changes: 3 additions & 1 deletion ehsa_frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
.history
.svn/
migrate_working_dir/

*.exe
*.txt
*.db
# IntelliJ related
*.iml
*.ipr
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed ehsa_frontend/input.db
Binary file not shown.
1 change: 1 addition & 0 deletions ehsa_frontend/ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 1 addition & 0 deletions ehsa_frontend/ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
44 changes: 44 additions & 0 deletions ehsa_frontend/ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
25 changes: 25 additions & 0 deletions ehsa_frontend/lib/bloc/main_screen/main_screen_cubit.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import 'package:bloc/bloc.dart';
import 'package:ehsa_frontend/enums/page_type.dart';
import 'package:flutter/material.dart';

part 'main_screen_state.dart';

class MainScreenCubit extends Cubit<MainScreenInitial> {
MainScreenCubit()
: super(MainScreenInitial(
isOverlayOpen: true,
isDrawerOpen: false,
pagesection: Pages.HALLS));

void showOverlay(bool show) {
emit(state.copyWith(isOverlayOpen: show));
}

void openDrawer(bool open) {
emit(state.copyWith(isDrawerOpen: open));
}

void setPageSection(Pages pagesection) {
emit(state.copyWith(pagesection: pagesection));
}
}
25 changes: 25 additions & 0 deletions ehsa_frontend/lib/bloc/main_screen/main_screen_state.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
part of 'main_screen_cubit.dart';

@immutable
class MainScreenInitial {
bool isOverlayOpen;
bool isDrawerOpen;
Pages pagesection;

MainScreenInitial(
{required this.isOverlayOpen,
required this.isDrawerOpen,
required this.pagesection});

MainScreenInitial copyWith({
bool? isOverlayOpen,
bool? isDrawerOpen,
Pages? pagesection,
}) {
return MainScreenInitial(
isOverlayOpen: isOverlayOpen ?? this.isOverlayOpen,
isDrawerOpen: isDrawerOpen ?? this.isDrawerOpen,
pagesection: pagesection ?? this.pagesection,
);
}
}
Loading
Loading