Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
fc25c3e
added submissions and assignments
Mar 28, 2023
2ccd6a1
added method for dates
Mar 28, 2023
c7e22ca
created sets
Apr 11, 2023
c2dc913
fjdsalf
Apr 12, 2023
8986722
merge conflicts resolved
junjasminenie Apr 13, 2023
b15a929
gemfile fixes
junjasminenie Apr 13, 2023
1cfa911
added some assignments views
junjasminenie Apr 14, 2023
cd73fe4
added parent_assignment links so that assignments are seen through pa…
junjasminenie Apr 18, 2023
01a12ed
more changes
junjasminenie Apr 18, 2023
f68fd52
status updates done, assignments creation and parent linking progress
junjasminenie Apr 18, 2023
a199c30
erased case worker id from assignments
junjasminenie Apr 18, 2023
3f36f1e
assignments enabled
junjasminenie Apr 18, 2023
83c12a7
able to see assignments on parent view. able to see checklist categor…
junjasminenie Apr 22, 2023
f06869e
parent view item done
junjasminenie Apr 22, 2023
eb18a8c
submissions enabled on parents view
junjasminenie Apr 23, 2023
90af0c3
create, delete, and view submissions achieved. models edited so that …
junjasminenie Apr 23, 2023
d021ade
caseworker submissions view enabled
junjasminenie Apr 23, 2023
b4bd1ec
most main functionalities achieved
junjasminenie Apr 23, 2023
239190d
added some deletion allowances
junjasminenie Apr 23, 2023
0e35f15
category and item views per parent is available. All views are comple…
junjasminenie Apr 23, 2023
a309660
fixed bugs and added checks
Apr 24, 2023
c68e6b7
to-do list number defined globally in application controller for fost…
junjasminenie Apr 24, 2023
ed09df9
fixed final 2 bugs
Apr 24, 2023
122df4a
Update README.md
zeptose Apr 24, 2023
c3c802a
Update README.md
zeptose Apr 24, 2023
1621615
delete buttons implemented using icons in recent submissions
junjasminenie Apr 24, 2023
acd2081
readme
junjasminenie Apr 24, 2023
aaac967
added names to recent submissions on foster parent view
junjasminenie Apr 24, 2023
809b34d
home page links refined
junjasminenie Apr 25, 2023
9275047
favicon added, parent model with phone number changed back to 10 digits
junjasminenie Apr 25, 2023
f4d8942
changed colors of status to make it more clear
junjasminenie Apr 25, 2023
1547ba8
fixed bug with items#show which @parent is not defined
junjasminenie Apr 25, 2023
d5bb597
slight change to parent model
annieeng17 Apr 26, 2023
a58e3d2
added parent files, trying to make assignment test
annieeng17 Apr 27, 2023
b5cd3e2
added new files
annieeng17 Apr 27, 2023
eeccb7c
solved submission test
annieeng17 Apr 27, 2023
2af77d3
made changes
annieeng17 Apr 27, 2023
ec85dd6
working on assignment methods
annieeng17 Apr 27, 2023
f6c0080
editing submissions tests
annieeng17 Apr 28, 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
Binary file added .id_ed25519.pub.swp
Binary file not shown.
7 changes: 0 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ gem 'jbuilder', '~> 2.5'
gem 'bcrypt', '3.1.16'
gem 'nokogiri', '1.13.3'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '1.10.2', require: false # '1.4.6'

Expand Down Expand Up @@ -63,10 +60,6 @@ group :development, :test do
# gem 'better_errors'
# gem 'binding_of_caller'
# gem 'meta_request'
gem 'capistrano', '2.15.5'
gem 'capistrano-rails', '1.4.0'
gem 'capistrano-rbenv', '2.1.4 '
gem 'capistrano-passenger', '0.2.0'
gem 'hirb', '0.7.3'
gem 'faker', '2.16.0'
gem 'populator', '1.0.0'
Expand Down
34 changes: 11 additions & 23 deletions Gemfile 2.lock → Gemfile 3.lock
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ GEM
autoprefixer-rails (10.4.13.0)
execjs (~> 2)
bcrypt (3.1.16)
bcrypt_pbkdf (1.1.0)
best_in_place (3.0.3)
actionpack (>= 3.2)
railties (>= 3.2)
Expand All @@ -65,12 +64,6 @@ GEM
builder (3.2.4)
byebug (11.1.3)
cancancan (3.1.0)
capistrano (2.15.5)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
capybara (3.35.3)
addressable
mini_mime (>= 0.1.3)
Expand Down Expand Up @@ -135,7 +128,6 @@ GEM
date (3.3.3)
diff-lcs (1.5.0)
docile (1.4.0)
ed25519 (1.3.0)
erubi (1.12.0)
execjs (2.8.1)
factory_bot (6.2.1)
Expand All @@ -150,7 +142,6 @@ GEM
ffi (1.15.5)
globalid (1.1.0)
activesupport (>= 5.0)
highline (2.1.0)
hirb (0.7.3)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -196,7 +187,7 @@ GEM
builder
minitest (>= 5.0)
ruby-progressbar
msgpack (1.7.0)
msgpack (1.6.1)
multi_test (0.1.2)
net-imap (0.3.4)
date
Expand All @@ -207,24 +198,16 @@ GEM
timeout
net-scp (4.0.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-sftp (4.0.0)
net-ssh (>= 5.0.0, < 8.0.0)
net-smtp (0.3.3)
net-protocol
net-ssh (7.1.0)
net-ssh-gateway (2.0.0)
net-ssh (>= 4.0.0)
nio4r (2.5.8)
nokogiri (1.13.3)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.13.3-arm64-darwin)
racc (~> 1.4)
nokogiri (1.13.3-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.13.3-x86_64-linux)
racc (~> 1.4)
pg (1.4.6)
populator (1.0.0)
protobuf-cucumber (3.10.8)
activesupport (>= 3.2)
Expand Down Expand Up @@ -309,6 +292,11 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.6.1)
mini_portile2 (~> 2.8.0)
sshkit (1.21.4)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
sys-uname (1.2.2)
ffi (~> 1.1)
thor (1.2.1)
Expand Down Expand Up @@ -341,24 +329,24 @@ GEM

PLATFORMS
arm64-darwin-21
ruby
x86_64-darwin-20
x86_64-linux

DEPENDENCIES
bcrypt (= 3.1.16)
bcrypt_pbkdf
best_in_place (= 3.0.3)
bootsnap (= 1.10.2)
byebug
cancancan (= 3.1.0)
capistrano (= 2.15.5)
capistrano (= 3.11.2)
capistrano-passenger (= 0.2.0)
capistrano-rails (= 1.4.0)
capistrano-rbenv (= 2.1.4)
capybara (= 3.35.3)
coffee-rails (~> 4.2)
cucumber (= 5.3.0)
cucumber-rails (= 2.2.0)
database_cleaner (= 2.0.1)
ed25519
factory_bot_rails (= 6.2.0)
faker (= 2.16.0)
fast_jsonapi (= 1.5)
Expand All @@ -373,7 +361,6 @@ DEPENDENCIES
minitest-rails (= 3.0.0)
minitest-reporters (= 1.1.19)
nokogiri (= 1.13.3)
pg
populator (= 1.0.0)
puma (~> 3.11)
rails (= 5.2.6)
Expand All @@ -385,6 +372,7 @@ DEPENDENCIES
simplecov (= 0.21.2)
spring (= 2.1.1)
spring-watcher-listen (= 2.0.1)
sqlite3
time_date_helpers (= 0.0.4)
turbolinks (~> 5)
tzinfo-data
Expand Down
10 changes: 0 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,8 @@ GEM
net-protocol
net-protocol (0.2.1)
timeout
net-scp (4.0.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-smtp (0.3.3)
net-protocol
net-ssh (7.1.0)
nio4r (2.5.8)
nokogiri (1.13.3-arm64-darwin)
racc (~> 1.4)
Expand Down Expand Up @@ -294,9 +291,6 @@ GEM
sprockets (>= 3.0.0)
sqlite3 (1.6.1)
mini_portile2 (~> 2.8.0)
sshkit (1.21.4)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
sys-uname (1.2.2)
ffi (~> 1.1)
thor (1.2.1)
Expand Down Expand Up @@ -338,10 +332,6 @@ DEPENDENCIES
bootsnap (= 1.10.2)
byebug
cancancan (= 3.1.0)
capistrano (= 3.11.2)
capistrano-passenger (= 0.2.0)
capistrano-rails (= 1.4.0)
capistrano-rbenv (= 2.1.4)
capybara (= 3.35.3)
coffee-rails (~> 4.2)
cucumber (= 5.3.0)
Expand Down
34 changes: 20 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# README
README for Submission System

This README would normally document whatever steps are necessary to get the
application up and running.
This is a submission system built with Ruby on Rails, aimed at helping foster parents and case workers manage submissions for foster children. The system allows for the submission of documents and other important information pertaining to the foster child, making it easier for case workers and foster parents to keep track of the child's progress and any updates.

Things you may want to cover:
The project is currently includes the following features:

* Ruby version
1. Ability to create and manage submissions for a child
2. Ability to upload and view documents related to the child's submissions
3. Ability to add and manage notes for a child's submissions
4. User authentication and authorization, with different access levels for case workers and foster parents
5. Search functionality to quickly find submissions based on specific criteria

* System dependencies
Getting started

* Configuration
To view the deployed app go to: https://rook-cmuis.net/

* Database creation
To get started with the Submission System locally, follow these steps:

* Database initialization
1. Clone the repo: git clone https://github.com/zeptose/Submission-System.git
2. Run Bundle Install
3. Migrate the Database: rails db:migrate
4. launch rails server: with "rails server"
4. open http://localhost:3000/ in your local browser

* How to run the test suite

* Services (job queues, cache servers, search engines, etc.)
Contributing
If you'd like to contribute to the Submission System, please read our contribution guidelines before submitting a pull request.

* Deployment instructions

* ...
License
The Submission System is licensed under the MIT License. See the LICENSE file for more information.
Binary file added app/assets/images/browser_logo.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/assets/javascripts/assignments.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
3 changes: 3 additions & 0 deletions app/assets/javascripts/submissions.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
61 changes: 0 additions & 61 deletions app/assets/stylesheets/application.css

This file was deleted.

14 changes: 14 additions & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* It is generally better to create a new file per style scope.
*
*= require_self
*= require_overrides
*/

@import "materialize";
Expand All @@ -26,6 +27,10 @@
margin: 0px;
}

#topbar_style a {
color: #518458;
}

#padded_content {
padding-left: 20px;
margin: 0px;
Expand Down Expand Up @@ -56,3 +61,12 @@
margin-left: 100px;
margin-right: 100px;
}

.completion_column_container {
display: flex;
}

.completion_column {
flex: 1; /* This will distribute the available space equally between columns */
padding: 10px; /* Adding some padding for visual spacing */
}
3 changes: 3 additions & 0 deletions app/assets/stylesheets/assignments.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the Assignments controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/submissions.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the Submissions controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
7 changes: 6 additions & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
before_action :fetch_incomplete_assignments, if: -> { !current_user.nil? && current_user.role?(:parent) }
# current user, check

# just show a flash message instead of full CanCan exception
rescue_from CanCan::AccessDenied do |exception|
flash[:error] = "You are not authorized to perform this action."
redirect_to home_path
end

# handle 404 errors with an exception as well
rescue_from ActiveRecord::RecordNotFound do |exception|
flash[:error] = "We apologize, but this information could not be found."
Expand All @@ -29,6 +30,10 @@ def logged_in?
def check_login
redirect_to login_path, alert: "You need to log in to view this page." if current_user.nil?
end

def fetch_incomplete_assignments
@incomplete_assignments = Assignment.incomplete.for_parent(current_user.parent.id).paginate(page: params[:page]).per_page(15)
end


end
Expand Down
Loading