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

Don't merge - review Tuesday #33

Open
wants to merge 72 commits into
base: review-base
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
a9886c5
Create Migration and Models
Jan 8, 2016
5ff2147
Add badge model and migration
Jan 8, 2016
c073021
Update README.rdoc
aquarian5 Jan 8, 2016
a4ca6cf
Add geocode capabilitity to PC and OCC
Jan 8, 2016
1d36805
Add geocode capability to PC and OCC
Jan 8, 2016
e2a8b39
fix fields in migration and create seeds
Jan 8, 2016
c54e360
Add geocode gem
Jan 8, 2016
bc55a06
create search routes and controllers
Jan 8, 2016
24cebab
Merge pull request #1 from nyc-copperheads-2016/search_for_occ_by_zip
aquarian5 Jan 8, 2016
fac7727
Add User Login
Jan 8, 2016
61d965f
User Login Form Complete; Includes Associated Views
Jan 8, 2016
74b9c39
Merge pull request #2 from nyc-copperheads-2016/fix_user_login_views
dfroberts2 Jan 8, 2016
5ab6b91
Added calender, some functionality
eshou1014 Jan 8, 2016
df63182
Added calender
eshou1014 Jan 9, 2016
7ce53af
Merge pull request #4 from nyc-copperheads-2016/Add-calender-to-app
dfroberts2 Jan 9, 2016
e389652
Add Link To Login For Users
Jan 9, 2016
473dc6d
Create Dropdown Menu For PrimaryCare and OnCall Caregivers
Jan 9, 2016
5e4ff2b
Merge pull request #5 from nyc-copperheads-2016/add_link_to_login
dfroberts2 Jan 9, 2016
22e28fb
Add search and return methods for searching for OCCs
Jan 8, 2016
bc21602
Render a proper organized view for OCC and PC search results
Jan 9, 2016
474228d
Continue working on registration and validation
Jan 9, 2016
5d4a384
Merge pull request #7 from nyc-copperheads-2016/search_for_occ_by_zip
eshou1014 Jan 9, 2016
856fe11
Added appointment functionality. MVP
eshou1014 Jan 9, 2016
70756fb
Merge pull request #8 from nyc-copperheads-2016/Add-calender-to-app
dfroberts2 Jan 9, 2016
0be1f87
Search function works on current user
Jan 9, 2016
587dc71
Merge pull request #9 from nyc-copperheads-2016/search_for_occ_by_zip
eshou1014 Jan 9, 2016
3d754e6
add primary and oncall controllers
Jan 9, 2016
2e9a2b3
Merge pull request #10 from nyc-copperheads-2016/add_controllers_for_…
dfroberts2 Jan 9, 2016
4d8eeda
Added edit forms for both caregivers routes
eshou1014 Jan 9, 2016
35eb8fe
Merge pull request #11 from nyc-copperheads-2016/Edit-profile-routes-…
eshou1014 Jan 9, 2016
de2d652
Routes are correct but cant edit info in the profile for both caregiv…
eshou1014 Jan 10, 2016
b51235b
Merge pull request #12 from nyc-copperheads-2016/Edit-profile-routes-…
dfroberts2 Jan 10, 2016
608191e
Add show profile pages for OCC and PC
Jan 9, 2016
e858e76
Add scheduling features
Jan 10, 2016
9f9529f
Merge pull request #13 from nyc-copperheads-2016/add_controllers_for_…
dfroberts2 Jan 10, 2016
fded56a
Added Edit profile functionality to PrimaryCaregiver only
eshou1014 Jan 10, 2016
d4f989b
Merge pull request #14 from nyc-copperheads-2016/Edit-profile-routes-…
aquarian5 Jan 10, 2016
7e07c63
Add appointment time and details to calendar view, finish PC appointm…
Jan 10, 2016
c8e60ea
add calendar to pc show page, add confirmed field to appointment
Jan 10, 2016
3b89c87
add applications table and confirmation field to appointments
Jan 10, 2016
5735602
Merge pull request #15 from nyc-copperheads-2016/pc_apply_appointments
aquarian5 Jan 10, 2016
6fd417c
add text messaging functionality so that Primary Caregivers and On Ca…
Jan 10, 2016
d5081f3
Merge pull request #16 from nyc-copperheads-2016/add_text_messaging_f…
dfroberts2 Jan 10, 2016
d0eaaf7
Add functionality so that OCCs can create 'applications' on appointme…
Jan 10, 2016
1a9e933
Merge pull request #17 from nyc-copperheads-2016/pc_apply_appointments
aquarian5 Jan 10, 2016
7cce5cd
PC can select applications from occs
Jan 11, 2016
4dd3fa7
Merge pull request #18 from nyc-copperheads-2016/pc_apply_appointments
aquarian5 Jan 11, 2016
bba4a5b
Add Email Capablity When Primary Caregiver Wants To Message An On Cal…
Jan 11, 2016
41be6ea
Merge pull request #19 from nyc-copperheads-2016/add_email_for_pc_on_occ
dfroberts2 Jan 11, 2016
b202c2f
Add Email Functionality
Jan 11, 2016
0ace1e2
Merge pull request #20 from nyc-copperheads-2016/add_email_for_pc_on_occ
dfroberts2 Jan 11, 2016
e7c3a0b
Incomplete view of show appointments
Jan 11, 2016
f8146fc
Merge pull request #21 from nyc-copperheads-2016/show_appointments
dfroberts2 Jan 11, 2016
a5e73a1
add ENV Variables To Text Messaging and Email Code For Privacy
Jan 11, 2016
b915283
Merge pull request #22 from nyc-copperheads-2016/add_ENV_to_text_and_…
dfroberts2 Jan 11, 2016
92fffda
complete confirmed appointments page
Jan 11, 2016
2ba4e0d
Merge pull request #23 from nyc-copperheads-2016/add_confirmed_appoin…
eshou1014 Jan 11, 2016
306c812
Added badges functionality
eshou1014 Jan 11, 2016
0c08709
Merge pull request #24 from nyc-copperheads-2016/Edit-profile-routes-…
dfroberts2 Jan 11, 2016
93fb7a8
add action mailer files
Jan 11, 2016
1378ba3
Merge pull request #25 from nyc-copperheads-2016/add_email_confirmati…
dfroberts2 Jan 11, 2016
dd34615
Integrate bootstrap setup
eshou1014 Jan 11, 2016
65c38fc
Merge pull request #27 from nyc-copperheads-2016/Integrate-Bootstrap-…
eshou1014 Jan 11, 2016
335e335
Added video background
eshou1014 Jan 12, 2016
2068baa
Deleted video and added video background functionality
eshou1014 Jan 12, 2016
2fa3a53
Merge pull request #28 from nyc-copperheads-2016/Integrate-Bootstrap-…
aquarian5 Jan 12, 2016
b266865
add email confirmation to appointment scheduling events
Jan 12, 2016
0a2cec1
add reminders to appointments
Jan 12, 2016
0531047
Attempt delayed text reminders implementation--incomplete
Jan 12, 2016
8e1ce63
Merge pull request #29 from nyc-copperheads-2016/add_email_confirmati…
eshou1014 Jan 12, 2016
c8f2ca0
add text reminders that are delayed and sent according to reminder time
Jan 12, 2016
4225625
Merge pull request #31 from nyc-copperheads-2016/add_text_reminders_f…
eshou1014 Jan 12, 2016
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
4 changes: 4 additions & 0 deletions .byebug_history
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
exit
exit!!!
!!!
params
20 changes: 19 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source 'https://rubygems.org'
ruby '2.2.3'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5'
Expand Down Expand Up @@ -27,13 +27,31 @@ gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'geocoder'
gem "simple_calendar", "~> 2.0"
gem "combined_time_select", "~> 1.0.1"

#gem for SMS messaging between Primary Caregivers and On Call Caregivers.
gem 'twilio-ruby'

#gem for sending email between PCC and OCC
gem 'mail'

#gem for adding rankings and points to users.
gem 'merit'

#gem for running code asynchronously
gem 'delayed_job_active_record'
#gem for running delayed jobs
gem "daemons"

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
gem 'rspec-rails'
gem 'faker'
gem 'factory_girl_rails'
gem 'pry'
end

group :development do
Expand Down
36 changes: 35 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,23 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
ambry (0.3.1)
arel (6.0.3)
bcrypt (3.1.10)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
byebug (8.2.1)
coderay (1.1.0)
combined_time_select (1.0.1)
concurrent-ruby (1.0.0)
daemons (1.2.3)
debug_inspector (0.0.2)
delayed_job (4.1.1)
activesupport (>= 3.0, < 5.0)
delayed_job_active_record (4.1.0)
activerecord (>= 3.0, < 5)
delayed_job (>= 3.0, < 5)
diff-lcs (1.2.5)
erubis (2.7.0)
execjs (2.6.0)
Expand All @@ -54,6 +63,7 @@ GEM
railties (>= 3.0.0)
faker (1.6.1)
i18n (~> 0.5)
geocoder (1.2.14)
globalid (0.3.6)
activesupport (>= 4.1.0)
i18n (0.7.0)
Expand All @@ -65,17 +75,25 @@ GEM
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
jwt (1.5.2)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
merit (2.3.2)
ambry (~> 0.3.0)
method_source (0.8.2)
mime-types (2.99)
mini_portile2 (2.0.0)
minitest (5.8.3)
multi_json (1.11.2)
nokogiri (1.6.7.1)
mini_portile2 (~> 2.0.0.rc2)
pg (0.18.4)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
Expand Down Expand Up @@ -133,6 +151,9 @@ GEM
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
simple_calendar (2.0.3)
rails (>= 3.0)
slop (3.6.0)
spring (1.6.1)
sprockets (3.5.2)
concurrent-ruby (~> 1.0)
Expand All @@ -144,6 +165,10 @@ GEM
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.2)
twilio-ruby (4.9.0)
builder (>= 2.1.2)
jwt (~> 1.0)
multi_json (>= 1.3.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.2)
Expand All @@ -161,18 +186,27 @@ PLATFORMS
DEPENDENCIES
bcrypt (~> 3.1.7)
byebug
combined_time_select (~> 1.0.1)
daemons
delayed_job_active_record
factory_girl_rails
faker
geocoder
jbuilder (~> 2.0)
jquery-rails
mail
merit
pg (~> 0.15)
pry
rails (= 4.2.5)
rspec-rails
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
simple_calendar (~> 2.0)
spring
twilio-ruby
uglifier (>= 1.3.0)
web-console (~> 2.0)

BUNDLED WITH
1.10.6
1.11.2
2 changes: 2 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
== README
Trello: https://trello.com/b/KeXPScoS/communicare

External Resources
* Integrating Twilio Text Into A Rails App: https://www.twilio.com/blog/2012/02/adding-twilio-sms-messaging-to-your-rails-app.html
* Great CSS/style templates: http://templated.co/
Expand Down
3 changes: 3 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
//= require jquery
//= require jquery_ujs
//= require_tree .
//= require appointment.js
//= require patient.js
//= require bootstrap.min
21 changes: 21 additions & 0 deletions app/assets/javascripts/appointment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$(document).ready(function() {
$('.delete-confirmation').hide()
$('.delete-appointment').click(function(event){
$('.delete-appointment').hide()
$('.delete-confirmation').show()
$('.no-delete').click(function(event){
$('.delete-appointment').show()
$('.delete-confirmation').hide()
})
})

$('.select-confirmation').hide()
$('.select-application').click(function(event){
$('.select-application').hide()
$('.select-confirmation').show()
$('.no-select').click(function(event){
$('.select-application').show()
$('.select-confirmation').hide()
})
})
});
2 changes: 2 additions & 0 deletions app/assets/javascripts/login.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
2 changes: 2 additions & 0 deletions app/assets/javascripts/logins.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
6 changes: 6 additions & 0 deletions app/assets/javascripts/patient.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$(document).ready(function() {
$(".additional-patient-info").hide()
$('.patient').click(function(event){
$(".additional-patient-info").toggle();
})
})
2 changes: 2 additions & 0 deletions app/assets/javascripts/session.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
2 changes: 2 additions & 0 deletions app/assets/javascripts/sessions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
2 changes: 2 additions & 0 deletions app/assets/javascripts/welcome.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
2 changes: 2 additions & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@
*
*= require_tree .
*= require_self
*= require simple_calendar
*= require bootstrap.min
*/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/login.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the login 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/logins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the logins 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/session.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the session 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/sessions.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the sessions controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
78 changes: 78 additions & 0 deletions app/assets/stylesheets/simple_calendar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
.simple-calendar {
table {
-webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
background-color: rgba(0, 0, 0, 0);
border: 1px solid rgb(221, 221, 221);
border-collapse: collapse;
box-sizing: border-box;
max-width: 100%;
width: 100%;
}

tr {
border-collapse: collapse;
}

th {
padding: 6px;
border-bottom: 2px solid rgb(221, 221, 221);
border-collapse: collapse;
border-left: 1px solid rgb(221, 221, 221);
border-right: 1px solid rgb(221, 221, 221);
border-top: 0px none rgb(51, 51, 51);
box-sizing: border-box;
text-align: left;
}

td {
padding: 6px;
vertical-align: top;
width: 14%;

border: 1px solid #ddd;
border-top-color: rgb(221, 221, 221);
border-top-style: solid;
border-top-width: 1px;
border-right-color: rgb(221, 221, 221);
border-right-style: solid;
border-right-width: 1px;
border-bottom-color: rgb(221, 221, 221);
border-bottom-style: solid;
border-bottom-width: 1px;
border-left-color: rgb(221, 221, 221);
border-left-style: solid;
border-left-width: 1px;
}

.day {
height: 80px;
}

.wday-0 {}
.wday-1 {}
.wday-2 {}
.wday-3 {}
.wday-4 {}
.wday-5 {}
.wday-6 {}

.today {
background: #FFFFC0
}

.past {}
.future {}

.start-date {}

.prev-month {
background: #DDD;
}
.next-month {
background: #DDD;
}
.current-month {}

.has-events {}
}
22 changes: 22 additions & 0 deletions app/assets/stylesheets/video.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#background {
position: fixed;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
-webkit-filter: blur(1px);
-moz-filter: blur(1px);
-o-filter: blur(1px);
-ms-filter: blur(1px);
filter: blur(1px);
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
background: url(polina.jpg) no-repeat;
background-size: cover;
}
.container h1 {
color: white;
}
3 changes: 3 additions & 0 deletions app/assets/stylesheets/welcome.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the welcome controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
13 changes: 13 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,17 @@ class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
helper_method :current_user, :logged_in?

def current_user
@current_login ||= Login.find_by(id: session[:login_id]) if session[:login_id]
end

def logged_in?
!!current_user
end

def ensure_logged_in
redirect_to login_path unless current_user
end
end
29 changes: 29 additions & 0 deletions app/controllers/applications_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
class ApplicationsController < ApplicationController
def new
@appointment = Appointment.find_by(id: params[:appointment_id])
@application = Application.new
end

def create
@appointment = Appointment.find_by(id: params[:appointment_id])
if [email protected]?(current_user.loginable)
@application = Application.new(application_params)
@application.on_call_caregiver = current_user.loginable
@application.appointment = @appointment
if @application.save && @application.appointment
PrimaryCaregiverMailer.send_email_to(current_user.loginable, @appointment.caregiver_relationship.primary_caregiver, @application, params[:application][:body]).deliver
redirect_to primary_caregiver_path(@appointment.caregiver_relationship.primary_caregiver)
else
render :new
end
else
flash[:notice] = "You've already applied to this appointment."
redirect_to primary_caregiver_path(@appointment.caregiver_relationship.primary_caregiver)
end
end

private
def application_params
params.require(:application).permit(:body)
end
end
Loading