diff --git a/.gitignore b/.gitignore index bab620d..f334c22 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ # Ignore Byebug command history file. .byebug_history + +# Ignore the bane of all git repos. +.DS_Store diff --git a/Team-Manager/.gitignore b/Team-Manager/.gitignore new file mode 100644 index 0000000..bab620d --- /dev/null +++ b/Team-Manager/.gitignore @@ -0,0 +1,21 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore the default SQLite database. +/db/*.sqlite3 +/db/*.sqlite3-journal + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +# Ignore Byebug command history file. +.byebug_history diff --git a/Team-Manager/Gemfile b/Team-Manager/Gemfile new file mode 100644 index 0000000..4aa8f6b --- /dev/null +++ b/Team-Manager/Gemfile @@ -0,0 +1,48 @@ +source 'https://rubygems.org' + + +# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' +gem 'rails', '~> 5.0.0', '>= 5.0.0.1' +# Use sqlite3 as the database for Active Record +gem 'sqlite3' +# Use Puma as the app server +gem 'puma', '~> 3.0' +# Use SCSS for stylesheets +gem 'sass-rails', '~> 5.0' +# Use Uglifier as compressor for JavaScript assets +gem 'uglifier', '>= 1.3.0' +# Use CoffeeScript for .coffee assets and views +gem 'coffee-rails', '~> 4.2' +# See https://github.com/rails/execjs#readme for more supported runtimes +# gem 'therubyracer', platforms: :ruby + +# Use jquery as the JavaScript library +gem 'jquery-rails' +# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks +gem 'turbolinks', '~> 5' +# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder +gem 'jbuilder', '~> 2.5' +# Use Redis adapter to run Action Cable in production +# gem 'redis', '~> 3.0' +# Use ActiveModel has_secure_password +# gem 'bcrypt', '~> 3.1.7' + +# Use Capistrano for deployment +# gem 'capistrano-rails', group: :development + +group :development, :test do + # Call 'byebug' anywhere in the code to stop execution and get a debugger console + gem 'byebug', platform: :mri +end + +group :development do + # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. + gem 'web-console' + gem 'listen', '~> 3.0.5' + # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring + gem 'spring' + gem 'spring-watcher-listen', '~> 2.0.0' +end + +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem +gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] diff --git a/Team-Manager/Gemfile.lock b/Team-Manager/Gemfile.lock new file mode 100644 index 0000000..5ba3563 --- /dev/null +++ b/Team-Manager/Gemfile.lock @@ -0,0 +1,175 @@ +GEM + remote: https://rubygems.org/ + specs: + actioncable (5.0.0.1) + actionpack (= 5.0.0.1) + nio4r (~> 1.2) + websocket-driver (~> 0.6.1) + actionmailer (5.0.0.1) + actionpack (= 5.0.0.1) + actionview (= 5.0.0.1) + activejob (= 5.0.0.1) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (5.0.0.1) + actionview (= 5.0.0.1) + activesupport (= 5.0.0.1) + rack (~> 2.0) + rack-test (~> 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.0.0.1) + activesupport (= 5.0.0.1) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (5.0.0.1) + activesupport (= 5.0.0.1) + globalid (>= 0.3.6) + activemodel (5.0.0.1) + activesupport (= 5.0.0.1) + activerecord (5.0.0.1) + activemodel (= 5.0.0.1) + activesupport (= 5.0.0.1) + arel (~> 7.0) + activesupport (5.0.0.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (~> 0.7) + minitest (~> 5.1) + tzinfo (~> 1.1) + arel (7.1.2) + builder (3.2.2) + byebug (9.0.5) + coffee-rails (4.2.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.2.x) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + concurrent-ruby (1.0.2) + debug_inspector (0.0.2) + erubis (2.7.0) + execjs (2.7.0) + ffi (1.9.14) + globalid (0.3.7) + activesupport (>= 4.1.0) + i18n (0.7.0) + jbuilder (2.6.0) + activesupport (>= 3.0.0, < 5.1) + multi_json (~> 1.2) + jquery-rails (4.2.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + listen (3.0.8) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + loofah (2.0.3) + nokogiri (>= 1.5.9) + mail (2.6.4) + mime-types (>= 1.16, < 4) + method_source (0.8.2) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_portile2 (2.1.0) + minitest (5.9.1) + multi_json (1.12.1) + nio4r (1.2.1) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + pkg-config (1.1.7) + puma (3.6.0) + rack (2.0.1) + rack-test (0.6.3) + rack (>= 1.0) + rails (5.0.0.1) + actioncable (= 5.0.0.1) + actionmailer (= 5.0.0.1) + actionpack (= 5.0.0.1) + actionview (= 5.0.0.1) + activejob (= 5.0.0.1) + activemodel (= 5.0.0.1) + activerecord (= 5.0.0.1) + activesupport (= 5.0.0.1) + bundler (>= 1.3.0, < 2.0) + railties (= 5.0.0.1) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.1) + activesupport (>= 4.2.0, < 6.0) + nokogiri (~> 1.6.0) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + railties (5.0.0.1) + actionpack (= 5.0.0.1) + activesupport (= 5.0.0.1) + method_source + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (11.3.0) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) + ffi (>= 0.5.0) + sass (3.4.22) + sass-rails (5.0.6) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + spring (1.7.2) + spring-watcher-listen (2.0.0) + listen (>= 2.7, < 4.0) + spring (~> 1.2) + sprockets (3.7.0) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.0) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + sqlite3 (1.3.11) + thor (0.19.1) + thread_safe (0.3.5) + tilt (2.0.5) + turbolinks (5.0.1) + turbolinks-source (~> 5) + turbolinks-source (5.0.0) + tzinfo (1.2.2) + thread_safe (~> 0.1) + uglifier (3.0.2) + execjs (>= 0.3.0, < 3) + web-console (3.3.1) + actionview (>= 5.0) + activemodel (>= 5.0) + debug_inspector + railties (>= 5.0) + websocket-driver (0.6.4) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + +PLATFORMS + ruby + +DEPENDENCIES + byebug + coffee-rails (~> 4.2) + jbuilder (~> 2.5) + jquery-rails + listen (~> 3.0.5) + puma (~> 3.0) + rails (~> 5.0.0, >= 5.0.0.1) + sass-rails (~> 5.0) + spring + spring-watcher-listen (~> 2.0.0) + sqlite3 + turbolinks (~> 5) + tzinfo-data + uglifier (>= 1.3.0) + web-console + +BUNDLED WITH + 1.12.5 diff --git a/Team-Manager/README.md b/Team-Manager/README.md new file mode 100644 index 0000000..7db80e4 --- /dev/null +++ b/Team-Manager/README.md @@ -0,0 +1,24 @@ +# README + +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... diff --git a/Team-Manager/Rakefile b/Team-Manager/Rakefile new file mode 100644 index 0000000..e85f913 --- /dev/null +++ b/Team-Manager/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require_relative 'config/application' + +Rails.application.load_tasks diff --git a/Team-Manager/app/assets/config/manifest.js b/Team-Manager/app/assets/config/manifest.js new file mode 100644 index 0000000..b16e53d --- /dev/null +++ b/Team-Manager/app/assets/config/manifest.js @@ -0,0 +1,3 @@ +//= link_tree ../images +//= link_directory ../javascripts .js +//= link_directory ../stylesheets .css diff --git a/Team-Manager/app/assets/images/.keep b/Team-Manager/app/assets/images/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/app/assets/javascripts/application.js b/Team-Manager/app/assets/javascripts/application.js new file mode 100644 index 0000000..b12018d --- /dev/null +++ b/Team-Manager/app/assets/javascripts/application.js @@ -0,0 +1,16 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, +// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// compiled file. JavaScript code in this file should be added after the last require_* statement. +// +// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details +// about supported directives. +// +//= require jquery +//= require jquery_ujs +//= require turbolinks +//= require_tree . diff --git a/Team-Manager/app/assets/javascripts/cable.js b/Team-Manager/app/assets/javascripts/cable.js new file mode 100644 index 0000000..71ee1e6 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/cable.js @@ -0,0 +1,13 @@ +// Action Cable provides the framework to deal with WebSockets in Rails. +// You can generate new channels where WebSocket features live using the rails generate channel command. +// +//= require action_cable +//= require_self +//= require_tree ./channels + +(function() { + this.App || (this.App = {}); + + App.cable = ActionCable.createConsumer(); + +}).call(this); diff --git a/Team-Manager/app/assets/javascripts/certifications.coffee b/Team-Manager/app/assets/javascripts/certifications.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/certifications.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/channels/.keep b/Team-Manager/app/assets/javascripts/channels/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/app/assets/javascripts/coaches.coffee b/Team-Manager/app/assets/javascripts/coaches.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/coaches.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/emails.coffee b/Team-Manager/app/assets/javascripts/emails.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/emails.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/event_property_maps.coffee b/Team-Manager/app/assets/javascripts/event_property_maps.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/event_property_maps.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/event_types.coffee b/Team-Manager/app/assets/javascripts/event_types.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/event_types.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/events.coffee b/Team-Manager/app/assets/javascripts/events.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/events.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/organization_teams.coffee b/Team-Manager/app/assets/javascripts/organization_teams.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/organization_teams.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/organizations.coffee b/Team-Manager/app/assets/javascripts/organizations.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/organizations.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/parent_children.coffee b/Team-Manager/app/assets/javascripts/parent_children.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/parent_children.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/people.coffee b/Team-Manager/app/assets/javascripts/people.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/people.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/phone_numbers.coffee b/Team-Manager/app/assets/javascripts/phone_numbers.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/phone_numbers.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/player_statistics.coffee b/Team-Manager/app/assets/javascripts/player_statistics.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/player_statistics.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/players.coffee b/Team-Manager/app/assets/javascripts/players.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/players.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/team_people.coffee b/Team-Manager/app/assets/javascripts/team_people.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/team_people.coffee @@ -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/ diff --git a/Team-Manager/app/assets/javascripts/teams.coffee b/Team-Manager/app/assets/javascripts/teams.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/Team-Manager/app/assets/javascripts/teams.coffee @@ -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/ diff --git a/Team-Manager/app/assets/stylesheets/application.css b/Team-Manager/app/assets/stylesheets/application.css new file mode 100644 index 0000000..0ebd7fe --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/application.css @@ -0,0 +1,15 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, + * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the bottom of the + * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS + * files in this directory. Styles in this file should be added after the last require_* statement. + * It is generally better to create a new file per style scope. + * + *= require_tree . + *= require_self + */ diff --git a/Team-Manager/app/assets/stylesheets/certifications.scss b/Team-Manager/app/assets/stylesheets/certifications.scss new file mode 100644 index 0000000..2e35715 --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/certifications.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Certifications controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/coaches.scss b/Team-Manager/app/assets/stylesheets/coaches.scss new file mode 100644 index 0000000..3347e7f --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/coaches.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Coaches controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/emails.scss b/Team-Manager/app/assets/stylesheets/emails.scss new file mode 100644 index 0000000..35db24d --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/emails.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Emails controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/event_property_maps.scss b/Team-Manager/app/assets/stylesheets/event_property_maps.scss new file mode 100644 index 0000000..48567b8 --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/event_property_maps.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Event_property_maps controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/event_types.scss b/Team-Manager/app/assets/stylesheets/event_types.scss new file mode 100644 index 0000000..435d380 --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/event_types.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Event_types controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/events.scss b/Team-Manager/app/assets/stylesheets/events.scss new file mode 100644 index 0000000..e975d96 --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/events.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Events controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/organization_teams.scss b/Team-Manager/app/assets/stylesheets/organization_teams.scss new file mode 100644 index 0000000..7defcb6 --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/organization_teams.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Organization_teams controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/organizations.scss b/Team-Manager/app/assets/stylesheets/organizations.scss new file mode 100644 index 0000000..2cd042f --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/organizations.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Organizations controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/parent_children.scss b/Team-Manager/app/assets/stylesheets/parent_children.scss new file mode 100644 index 0000000..fe8c2fe --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/parent_children.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Parent_children controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/people.scss b/Team-Manager/app/assets/stylesheets/people.scss new file mode 100644 index 0000000..5217462 --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/people.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the People controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/phone_numbers.scss b/Team-Manager/app/assets/stylesheets/phone_numbers.scss new file mode 100644 index 0000000..26dc5d8 --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/phone_numbers.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Phone_Numbers controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/player_statistics.scss b/Team-Manager/app/assets/stylesheets/player_statistics.scss new file mode 100644 index 0000000..73ad348 --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/player_statistics.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Player_statistics controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/players.scss b/Team-Manager/app/assets/stylesheets/players.scss new file mode 100644 index 0000000..74426b3 --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/players.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Players controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/scaffolds.scss b/Team-Manager/app/assets/stylesheets/scaffolds.scss new file mode 100644 index 0000000..4ce4266 --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/scaffolds.scss @@ -0,0 +1,89 @@ +body { + background-color: #fff; + color: #333; + font-family: verdana, arial, helvetica, sans-serif; + font-size: 13px; + line-height: 18px; + margin: 33px; +} + +p, ol, ul, td { + font-family: verdana, arial, helvetica, sans-serif; + font-size: 13px; + line-height: 18px; + margin: 33px; +} + +pre { + background-color: #eee; + padding: 10px; + font-size: 11px; +} + +a { + color: #000; + + &:visited { + color: #666; + } + + &:hover { + color: #fff; + background-color: #000; + } +} + +th { + padding-bottom: 5px; +} + +td { + padding-bottom: 7px; + padding-left: 5px; + padding-right: 5px; +} + +div { + &.field, &.actions { + margin-bottom: 10px; + } +} + +#notice { + color: green; +} + +.field_with_errors { + padding: 2px; + background-color: red; + display: table; +} + +#error_explanation { + width: 450px; + border: 2px solid red; + padding: 7px; + padding-bottom: 0; + margin-bottom: 20px; + background-color: #f0f0f0; + + h2 { + text-align: left; + font-weight: bold; + padding: 5px 5px 5px 15px; + font-size: 12px; + margin: -7px; + margin-bottom: 0; + background-color: #c00; + color: #fff; + } + + ul li { + font-size: 12px; + list-style: square; + } +} + +label { + display: block; +} diff --git a/Team-Manager/app/assets/stylesheets/team_people.scss b/Team-Manager/app/assets/stylesheets/team_people.scss new file mode 100644 index 0000000..f946e8c --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/team_people.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Team_people controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/assets/stylesheets/teams.scss b/Team-Manager/app/assets/stylesheets/teams.scss new file mode 100644 index 0000000..bab9643 --- /dev/null +++ b/Team-Manager/app/assets/stylesheets/teams.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Teams controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/Team-Manager/app/channels/application_cable/channel.rb b/Team-Manager/app/channels/application_cable/channel.rb new file mode 100644 index 0000000..d672697 --- /dev/null +++ b/Team-Manager/app/channels/application_cable/channel.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Channel < ActionCable::Channel::Base + end +end diff --git a/Team-Manager/app/channels/application_cable/connection.rb b/Team-Manager/app/channels/application_cable/connection.rb new file mode 100644 index 0000000..0ff5442 --- /dev/null +++ b/Team-Manager/app/channels/application_cable/connection.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Connection < ActionCable::Connection::Base + end +end diff --git a/Team-Manager/app/controllers/application_controller.rb b/Team-Manager/app/controllers/application_controller.rb new file mode 100644 index 0000000..1c07694 --- /dev/null +++ b/Team-Manager/app/controllers/application_controller.rb @@ -0,0 +1,3 @@ +class ApplicationController < ActionController::Base + protect_from_forgery with: :exception +end diff --git a/Team-Manager/app/controllers/certifications_controller.rb b/Team-Manager/app/controllers/certifications_controller.rb new file mode 100644 index 0000000..f29f341 --- /dev/null +++ b/Team-Manager/app/controllers/certifications_controller.rb @@ -0,0 +1,74 @@ +class CertificationsController < ApplicationController + before_action :set_certification, only: [:show, :edit, :update, :destroy] + + # GET /certifications + # GET /certifications.json + def index + @certifications = Certification.all + end + + # GET /certifications/1 + # GET /certifications/1.json + def show + end + + # GET /certifications/new + def new + @certification = Certification.new + end + + # GET /certifications/1/edit + def edit + end + + # POST /certifications + # POST /certifications.json + def create + @certification = Certification.new(certification_params) + + respond_to do |format| + if @certification.save + format.html { redirect_to @certification, notice: 'Certification was successfully created.' } + format.json { render :show, status: :created, location: @certification } + else + format.html { render :new } + format.json { render json: @certification.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /certifications/1 + # PATCH/PUT /certifications/1.json + def update + respond_to do |format| + if @certification.update(certification_params) + format.html { redirect_to @certification, notice: 'Certification was successfully updated.' } + format.json { render :show, status: :ok, location: @certification } + else + format.html { render :edit } + format.json { render json: @certification.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /certifications/1 + # DELETE /certifications/1.json + def destroy + @certification.destroy + respond_to do |format| + format.html { redirect_to certifications_url, notice: 'Certification was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_certification + @certification = Certification.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def certification_params + params.require(:certification).permit(:person_id_id, :certification_name, :expiration_date, :note) + end +end diff --git a/Team-Manager/app/controllers/coaches_controller.rb b/Team-Manager/app/controllers/coaches_controller.rb new file mode 100644 index 0000000..e515a00 --- /dev/null +++ b/Team-Manager/app/controllers/coaches_controller.rb @@ -0,0 +1,74 @@ +class CoachesController < ApplicationController + before_action :set_coach, only: [:show, :edit, :update, :destroy] + + # GET /coaches + # GET /coaches.json + def index + @coaches = Coach.all + end + + # GET /coaches/1 + # GET /coaches/1.json + def show + end + + # GET /coaches/new + def new + @coach = Coach.new + end + + # GET /coaches/1/edit + def edit + end + + # POST /coaches + # POST /coaches.json + def create + @coach = Coach.new(coach_params) + + respond_to do |format| + if @coach.save + format.html { redirect_to @coach, notice: 'Coach was successfully created.' } + format.json { render :show, status: :created, location: @coach } + else + format.html { render :new } + format.json { render json: @coach.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /coaches/1 + # PATCH/PUT /coaches/1.json + def update + respond_to do |format| + if @coach.update(coach_params) + format.html { redirect_to @coach, notice: 'Coach was successfully updated.' } + format.json { render :show, status: :ok, location: @coach } + else + format.html { render :edit } + format.json { render json: @coach.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /coaches/1 + # DELETE /coaches/1.json + def destroy + @coach.destroy + respond_to do |format| + format.html { redirect_to coaches_url, notice: 'Coach was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_coach + @coach = Coach.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def coach_params + params.require(:coach).permit(:person_id_id, :coach_type, :coach_year_began, :coach_year_ended, :coach_id) + end +end diff --git a/Team-Manager/app/controllers/concerns/.keep b/Team-Manager/app/controllers/concerns/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/app/controllers/emails_controller.rb b/Team-Manager/app/controllers/emails_controller.rb new file mode 100644 index 0000000..a9fa1d1 --- /dev/null +++ b/Team-Manager/app/controllers/emails_controller.rb @@ -0,0 +1,74 @@ +class EmailsController < ApplicationController + before_action :set_email, only: [:show, :edit, :update, :destroy] + + # GET /emails + # GET /emails.json + def index + @emails = Email.all + end + + # GET /emails/1 + # GET /emails/1.json + def show + end + + # GET /emails/new + def new + @email = Email.new + end + + # GET /emails/1/edit + def edit + end + + # POST /emails + # POST /emails.json + def create + @email = Email.new(email_params) + + respond_to do |format| + if @email.save + format.html { redirect_to @email, notice: 'Email was successfully created.' } + format.json { render :show, status: :created, location: @email } + else + format.html { render :new } + format.json { render json: @email.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /emails/1 + # PATCH/PUT /emails/1.json + def update + respond_to do |format| + if @email.update(email_params) + format.html { redirect_to @email, notice: 'Email was successfully updated.' } + format.json { render :show, status: :ok, location: @email } + else + format.html { render :edit } + format.json { render json: @email.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /emails/1 + # DELETE /emails/1.json + def destroy + @email.destroy + respond_to do |format| + format.html { redirect_to emails_url, notice: 'Email was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_email + @email = Email.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def email_params + params.require(:email).permit(:email, :person_id) + end +end diff --git a/Team-Manager/app/controllers/event_property_maps_controller.rb b/Team-Manager/app/controllers/event_property_maps_controller.rb new file mode 100644 index 0000000..9ad7019 --- /dev/null +++ b/Team-Manager/app/controllers/event_property_maps_controller.rb @@ -0,0 +1,74 @@ +class EventPropertyMapsController < ApplicationController + before_action :set_event_property_map, only: [:show, :edit, :update, :destroy] + + # GET /event_property_maps + # GET /event_property_maps.json + def index + @event_property_maps = EventPropertyMap.all + end + + # GET /event_property_maps/1 + # GET /event_property_maps/1.json + def show + end + + # GET /event_property_maps/new + def new + @event_property_map = EventPropertyMap.new + end + + # GET /event_property_maps/1/edit + def edit + end + + # POST /event_property_maps + # POST /event_property_maps.json + def create + @event_property_map = EventPropertyMap.new(event_property_map_params) + + respond_to do |format| + if @event_property_map.save + format.html { redirect_to @event_property_map, notice: 'Event property map was successfully created.' } + format.json { render :show, status: :created, location: @event_property_map } + else + format.html { render :new } + format.json { render json: @event_property_map.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /event_property_maps/1 + # PATCH/PUT /event_property_maps/1.json + def update + respond_to do |format| + if @event_property_map.update(event_property_map_params) + format.html { redirect_to @event_property_map, notice: 'Event property map was successfully updated.' } + format.json { render :show, status: :ok, location: @event_property_map } + else + format.html { render :edit } + format.json { render json: @event_property_map.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /event_property_maps/1 + # DELETE /event_property_maps/1.json + def destroy + @event_property_map.destroy + respond_to do |format| + format.html { redirect_to event_property_maps_url, notice: 'Event property map was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_event_property_map + @event_property_map = EventPropertyMap.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def event_property_map_params + params.require(:event_property_map).permit(:event_id_id, :key, :value) + end +end diff --git a/Team-Manager/app/controllers/event_types_controller.rb b/Team-Manager/app/controllers/event_types_controller.rb new file mode 100644 index 0000000..168804b --- /dev/null +++ b/Team-Manager/app/controllers/event_types_controller.rb @@ -0,0 +1,74 @@ +class EventTypesController < ApplicationController + before_action :set_event_type, only: [:show, :edit, :update, :destroy] + + # GET /event_types + # GET /event_types.json + def index + @event_types = EventType.all + end + + # GET /event_types/1 + # GET /event_types/1.json + def show + end + + # GET /event_types/new + def new + @event_type = EventType.new + end + + # GET /event_types/1/edit + def edit + end + + # POST /event_types + # POST /event_types.json + def create + @event_type = EventType.new(event_type_params) + + respond_to do |format| + if @event_type.save + format.html { redirect_to @event_type, notice: 'Event type was successfully created.' } + format.json { render :show, status: :created, location: @event_type } + else + format.html { render :new } + format.json { render json: @event_type.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /event_types/1 + # PATCH/PUT /event_types/1.json + def update + respond_to do |format| + if @event_type.update(event_type_params) + format.html { redirect_to @event_type, notice: 'Event type was successfully updated.' } + format.json { render :show, status: :ok, location: @event_type } + else + format.html { render :edit } + format.json { render json: @event_type.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /event_types/1 + # DELETE /event_types/1.json + def destroy + @event_type.destroy + respond_to do |format| + format.html { redirect_to event_types_url, notice: 'Event type was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_event_type + @event_type = EventType.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def event_type_params + params.require(:event_type).permit(:event_type_id, :type_description) + end +end diff --git a/Team-Manager/app/controllers/events_controller.rb b/Team-Manager/app/controllers/events_controller.rb new file mode 100644 index 0000000..f136512 --- /dev/null +++ b/Team-Manager/app/controllers/events_controller.rb @@ -0,0 +1,74 @@ +class EventsController < ApplicationController + before_action :set_event, only: [:show, :edit, :update, :destroy] + + # GET /events + # GET /events.json + def index + @events = Event.all + end + + # GET /events/1 + # GET /events/1.json + def show + end + + # GET /events/new + def new + @event = Event.new + end + + # GET /events/1/edit + def edit + end + + # POST /events + # POST /events.json + def create + @event = Event.new(event_params) + + respond_to do |format| + if @event.save + format.html { redirect_to @event, notice: 'Event was successfully created.' } + format.json { render :show, status: :created, location: @event } + else + format.html { render :new } + format.json { render json: @event.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /events/1 + # PATCH/PUT /events/1.json + def update + respond_to do |format| + if @event.update(event_params) + format.html { redirect_to @event, notice: 'Event was successfully updated.' } + format.json { render :show, status: :ok, location: @event } + else + format.html { render :edit } + format.json { render json: @event.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /events/1 + # DELETE /events/1.json + def destroy + @event.destroy + respond_to do |format| + format.html { redirect_to events_url, notice: 'Event was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_event + @event = Event.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def event_params + params.require(:event).permit(:event_id, :event_type_id, :event_datetime, :team_id_id, :created_by, :open_to_public) + end +end diff --git a/Team-Manager/app/controllers/organization_teams_controller.rb b/Team-Manager/app/controllers/organization_teams_controller.rb new file mode 100644 index 0000000..bef2c0e --- /dev/null +++ b/Team-Manager/app/controllers/organization_teams_controller.rb @@ -0,0 +1,74 @@ +class OrganizationTeamsController < ApplicationController + before_action :set_organization_team, only: [:show, :edit, :update, :destroy] + + # GET /organization_teams + # GET /organization_teams.json + def index + @organization_teams = OrganizationTeam.all + end + + # GET /organization_teams/1 + # GET /organization_teams/1.json + def show + end + + # GET /organization_teams/new + def new + @organization_team = OrganizationTeam.new + end + + # GET /organization_teams/1/edit + def edit + end + + # POST /organization_teams + # POST /organization_teams.json + def create + @organization_team = OrganizationTeam.new(organization_team_params) + + respond_to do |format| + if @organization_team.save + format.html { redirect_to @organization_team, notice: 'Organization team was successfully created.' } + format.json { render :show, status: :created, location: @organization_team } + else + format.html { render :new } + format.json { render json: @organization_team.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /organization_teams/1 + # PATCH/PUT /organization_teams/1.json + def update + respond_to do |format| + if @organization_team.update(organization_team_params) + format.html { redirect_to @organization_team, notice: 'Organization team was successfully updated.' } + format.json { render :show, status: :ok, location: @organization_team } + else + format.html { render :edit } + format.json { render json: @organization_team.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /organization_teams/1 + # DELETE /organization_teams/1.json + def destroy + @organization_team.destroy + respond_to do |format| + format.html { redirect_to organization_teams_url, notice: 'Organization team was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_organization_team + @organization_team = OrganizationTeam.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def organization_team_params + params.require(:organization_team).permit(:organization_id_id, :team_id_id) + end +end diff --git a/Team-Manager/app/controllers/organizations_controller.rb b/Team-Manager/app/controllers/organizations_controller.rb new file mode 100644 index 0000000..f3e0fc1 --- /dev/null +++ b/Team-Manager/app/controllers/organizations_controller.rb @@ -0,0 +1,74 @@ +class OrganizationsController < ApplicationController + before_action :set_organization, only: [:show, :edit, :update, :destroy] + + # GET /organizations + # GET /organizations.json + def index + @organizations = Organization.all + end + + # GET /organizations/1 + # GET /organizations/1.json + def show + end + + # GET /organizations/new + def new + @organization = Organization.new + end + + # GET /organizations/1/edit + def edit + end + + # POST /organizations + # POST /organizations.json + def create + @organization = Organization.new(organization_params) + + respond_to do |format| + if @organization.save + format.html { redirect_to @organization, notice: 'Organization was successfully created.' } + format.json { render :show, status: :created, location: @organization } + else + format.html { render :new } + format.json { render json: @organization.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /organizations/1 + # PATCH/PUT /organizations/1.json + def update + respond_to do |format| + if @organization.update(organization_params) + format.html { redirect_to @organization, notice: 'Organization was successfully updated.' } + format.json { render :show, status: :ok, location: @organization } + else + format.html { render :edit } + format.json { render json: @organization.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /organizations/1 + # DELETE /organizations/1.json + def destroy + @organization.destroy + respond_to do |format| + format.html { redirect_to organizations_url, notice: 'Organization was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_organization + @organization = Organization.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def organization_params + params.require(:organization).permit(:organization_id, :name) + end +end diff --git a/Team-Manager/app/controllers/parent_children_controller.rb b/Team-Manager/app/controllers/parent_children_controller.rb new file mode 100644 index 0000000..d93be5a --- /dev/null +++ b/Team-Manager/app/controllers/parent_children_controller.rb @@ -0,0 +1,74 @@ +class ParentChildrenController < ApplicationController + before_action :set_parent_child, only: [:show, :edit, :update, :destroy] + + # GET /parent_children + # GET /parent_children.json + def index + @parent_children = ParentChild.all + end + + # GET /parent_children/1 + # GET /parent_children/1.json + def show + end + + # GET /parent_children/new + def new + @parent_child = ParentChild.new + end + + # GET /parent_children/1/edit + def edit + end + + # POST /parent_children + # POST /parent_children.json + def create + @parent_child = ParentChild.new(parent_child_params) + + respond_to do |format| + if @parent_child.save + format.html { redirect_to @parent_child, notice: 'Parent child was successfully created.' } + format.json { render :show, status: :created, location: @parent_child } + else + format.html { render :new } + format.json { render json: @parent_child.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /parent_children/1 + # PATCH/PUT /parent_children/1.json + def update + respond_to do |format| + if @parent_child.update(parent_child_params) + format.html { redirect_to @parent_child, notice: 'Parent child was successfully updated.' } + format.json { render :show, status: :ok, location: @parent_child } + else + format.html { render :edit } + format.json { render json: @parent_child.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /parent_children/1 + # DELETE /parent_children/1.json + def destroy + @parent_child.destroy + respond_to do |format| + format.html { redirect_to parent_children_url, notice: 'Parent child was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_parent_child + @parent_child = ParentChild.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def parent_child_params + params.require(:parent_child).permit(:parent_id_id, :child_id_id) + end +end diff --git a/Team-Manager/app/controllers/people_controller.rb b/Team-Manager/app/controllers/people_controller.rb new file mode 100644 index 0000000..6a60aac --- /dev/null +++ b/Team-Manager/app/controllers/people_controller.rb @@ -0,0 +1,74 @@ +class PeopleController < ApplicationController + before_action :set_person, only: [:show, :edit, :update, :destroy] + + # GET /people + # GET /people.json + def index + @people = Person.all + end + + # GET /people/1 + # GET /people/1.json + def show + end + + # GET /people/new + def new + @person = Person.new + end + + # GET /people/1/edit + def edit + end + + # POST /people + # POST /people.json + def create + @person = Person.new(person_params) + + respond_to do |format| + if @person.save + format.html { redirect_to @person, notice: 'Person was successfully created.' } + format.json { render :show, status: :created, location: @person } + else + format.html { render :new } + format.json { render json: @person.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /people/1 + # PATCH/PUT /people/1.json + def update + respond_to do |format| + if @person.update(person_params) + format.html { redirect_to @person, notice: 'Person was successfully updated.' } + format.json { render :show, status: :ok, location: @person } + else + format.html { render :edit } + format.json { render json: @person.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /people/1 + # DELETE /people/1.json + def destroy + @person.destroy + respond_to do |format| + format.html { redirect_to people_url, notice: 'Person was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_person + @person = Person.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def person_params + params.require(:person).permit(:first_name, :last_name, :addr_route, :addr_city, :addr_state, :addr_zip, :username, :pass_hash, :pass_salt, :bio, :birth_date, :gender, :height_in_inches, :weight_in_pounds, :shoe_size) + end +end diff --git a/Team-Manager/app/controllers/phone_numbers_controller.rb b/Team-Manager/app/controllers/phone_numbers_controller.rb new file mode 100644 index 0000000..ffce9b0 --- /dev/null +++ b/Team-Manager/app/controllers/phone_numbers_controller.rb @@ -0,0 +1,74 @@ +class PhoneNumbersController < ApplicationController + before_action :set_phone_number, only: [:show, :edit, :update, :destroy] + + # GET /phone_numbers + # GET /phone_numbers.json + def index + @phone_numbers = PhoneNumber.all + end + + # GET /phone_numbers/1 + # GET /phone_numbers/1.json + def show + end + + # GET /phone_numbers/new + def new + @phone_number = PhoneNumber.new + end + + # GET /phone_numbers/1/edit + def edit + end + + # POST /phone_numbers + # POST /phone_numbers.json + def create + @phone_number = PhoneNumber.new(phone_number_params) + + respond_to do |format| + if @phone_number.save + format.html { redirect_to @phone_number, notice: 'Phone number was successfully created.' } + format.json { render :show, status: :created, location: @phone_number } + else + format.html { render :new } + format.json { render json: @phone_number.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /phone_numbers/1 + # PATCH/PUT /phone_numbers/1.json + def update + respond_to do |format| + if @phone_number.update(phone_number_params) + format.html { redirect_to @phone_number, notice: 'Phone number was successfully updated.' } + format.json { render :show, status: :ok, location: @phone_number } + else + format.html { render :edit } + format.json { render json: @phone_number.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /phone_numbers/1 + # DELETE /phone_numbers/1.json + def destroy + @phone_number.destroy + respond_to do |format| + format.html { redirect_to phone_numbers_url, notice: 'Phone number was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_phone_number + @phone_number = PhoneNumber.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def phone_number_params + params.require(:phone_number).permit(:phone, :person_id) + end +end diff --git a/Team-Manager/app/controllers/player_statistics_controller.rb b/Team-Manager/app/controllers/player_statistics_controller.rb new file mode 100644 index 0000000..596b610 --- /dev/null +++ b/Team-Manager/app/controllers/player_statistics_controller.rb @@ -0,0 +1,74 @@ +class PlayerStatisticsController < ApplicationController + before_action :set_player_statistic, only: [:show, :edit, :update, :destroy] + + # GET /player_statistics + # GET /player_statistics.json + def index + @player_statistics = PlayerStatistic.all + end + + # GET /player_statistics/1 + # GET /player_statistics/1.json + def show + end + + # GET /player_statistics/new + def new + @player_statistic = PlayerStatistic.new + end + + # GET /player_statistics/1/edit + def edit + end + + # POST /player_statistics + # POST /player_statistics.json + def create + @player_statistic = PlayerStatistic.new(player_statistic_params) + + respond_to do |format| + if @player_statistic.save + format.html { redirect_to @player_statistic, notice: 'Player statistic was successfully created.' } + format.json { render :show, status: :created, location: @player_statistic } + else + format.html { render :new } + format.json { render json: @player_statistic.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /player_statistics/1 + # PATCH/PUT /player_statistics/1.json + def update + respond_to do |format| + if @player_statistic.update(player_statistic_params) + format.html { redirect_to @player_statistic, notice: 'Player statistic was successfully updated.' } + format.json { render :show, status: :ok, location: @player_statistic } + else + format.html { render :edit } + format.json { render json: @player_statistic.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /player_statistics/1 + # DELETE /player_statistics/1.json + def destroy + @player_statistic.destroy + respond_to do |format| + format.html { redirect_to player_statistics_url, notice: 'Player statistic was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_player_statistic + @player_statistic = PlayerStatistic.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def player_statistic_params + params.require(:player_statistic).permit(:player_id_id, :statistic_type, :statistic_value, :date_recorded, :stat_id) + end +end diff --git a/Team-Manager/app/controllers/players_controller.rb b/Team-Manager/app/controllers/players_controller.rb new file mode 100644 index 0000000..73cdd71 --- /dev/null +++ b/Team-Manager/app/controllers/players_controller.rb @@ -0,0 +1,74 @@ +class PlayersController < ApplicationController + before_action :set_player, only: [:show, :edit, :update, :destroy] + + # GET /players + # GET /players.json + def index + @players = Player.all + end + + # GET /players/1 + # GET /players/1.json + def show + end + + # GET /players/new + def new + @player = Player.new + end + + # GET /players/1/edit + def edit + end + + # POST /players + # POST /players.json + def create + @player = Player.new(player_params) + + respond_to do |format| + if @player.save + format.html { redirect_to @player, notice: 'Player was successfully created.' } + format.json { render :show, status: :created, location: @player } + else + format.html { render :new } + format.json { render json: @player.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /players/1 + # PATCH/PUT /players/1.json + def update + respond_to do |format| + if @player.update(player_params) + format.html { redirect_to @player, notice: 'Player was successfully updated.' } + format.json { render :show, status: :ok, location: @player } + else + format.html { render :edit } + format.json { render json: @player.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /players/1 + # DELETE /players/1.json + def destroy + @player.destroy + respond_to do |format| + format.html { redirect_to players_url, notice: 'Player was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_player + @player = Player.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def player_params + params.require(:player).permit(:player_coach_id_id, :player_jersey_id, :team_join_date, :team_left_date) + end +end diff --git a/Team-Manager/app/controllers/team_people_controller.rb b/Team-Manager/app/controllers/team_people_controller.rb new file mode 100644 index 0000000..15c9433 --- /dev/null +++ b/Team-Manager/app/controllers/team_people_controller.rb @@ -0,0 +1,74 @@ +class TeamPeopleController < ApplicationController + before_action :set_team_person, only: [:show, :edit, :update, :destroy] + + # GET /team_people + # GET /team_people.json + def index + @team_people = TeamPerson.all + end + + # GET /team_people/1 + # GET /team_people/1.json + def show + end + + # GET /team_people/new + def new + @team_person = TeamPerson.new + end + + # GET /team_people/1/edit + def edit + end + + # POST /team_people + # POST /team_people.json + def create + @team_person = TeamPerson.new(team_person_params) + + respond_to do |format| + if @team_person.save + format.html { redirect_to @team_person, notice: 'Team person was successfully created.' } + format.json { render :show, status: :created, location: @team_person } + else + format.html { render :new } + format.json { render json: @team_person.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /team_people/1 + # PATCH/PUT /team_people/1.json + def update + respond_to do |format| + if @team_person.update(team_person_params) + format.html { redirect_to @team_person, notice: 'Team person was successfully updated.' } + format.json { render :show, status: :ok, location: @team_person } + else + format.html { render :edit } + format.json { render json: @team_person.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /team_people/1 + # DELETE /team_people/1.json + def destroy + @team_person.destroy + respond_to do |format| + format.html { redirect_to team_people_url, notice: 'Team person was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_team_person + @team_person = TeamPerson.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def team_person_params + params.require(:team_person).permit(:person_id_id, :team_id_id) + end +end diff --git a/Team-Manager/app/controllers/teams_controller.rb b/Team-Manager/app/controllers/teams_controller.rb new file mode 100644 index 0000000..8d9fa87 --- /dev/null +++ b/Team-Manager/app/controllers/teams_controller.rb @@ -0,0 +1,74 @@ +class TeamsController < ApplicationController + before_action :set_team, only: [:show, :edit, :update, :destroy] + + # GET /teams + # GET /teams.json + def index + @teams = Team.all + end + + # GET /teams/1 + # GET /teams/1.json + def show + end + + # GET /teams/new + def new + @team = Team.new + end + + # GET /teams/1/edit + def edit + end + + # POST /teams + # POST /teams.json + def create + @team = Team.new(team_params) + + respond_to do |format| + if @team.save + format.html { redirect_to @team, notice: 'Team was successfully created.' } + format.json { render :show, status: :created, location: @team } + else + format.html { render :new } + format.json { render json: @team.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /teams/1 + # PATCH/PUT /teams/1.json + def update + respond_to do |format| + if @team.update(team_params) + format.html { redirect_to @team, notice: 'Team was successfully updated.' } + format.json { render :show, status: :ok, location: @team } + else + format.html { render :edit } + format.json { render json: @team.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /teams/1 + # DELETE /teams/1.json + def destroy + @team.destroy + respond_to do |format| + format.html { redirect_to teams_url, notice: 'Team was successfully destroyed.' } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_team + @team = Team.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def team_params + params.require(:team).permit(:team_id, :organization_id, :team_name, :competitive, :age_group) + end +end diff --git a/Team-Manager/app/helpers/application_helper.rb b/Team-Manager/app/helpers/application_helper.rb new file mode 100644 index 0000000..de6be79 --- /dev/null +++ b/Team-Manager/app/helpers/application_helper.rb @@ -0,0 +1,2 @@ +module ApplicationHelper +end diff --git a/Team-Manager/app/helpers/certifications_helper.rb b/Team-Manager/app/helpers/certifications_helper.rb new file mode 100644 index 0000000..906dc2e --- /dev/null +++ b/Team-Manager/app/helpers/certifications_helper.rb @@ -0,0 +1,2 @@ +module CertificationsHelper +end diff --git a/Team-Manager/app/helpers/coaches_helper.rb b/Team-Manager/app/helpers/coaches_helper.rb new file mode 100644 index 0000000..4a533de --- /dev/null +++ b/Team-Manager/app/helpers/coaches_helper.rb @@ -0,0 +1,2 @@ +module CoachesHelper +end diff --git a/Team-Manager/app/helpers/emails_helper.rb b/Team-Manager/app/helpers/emails_helper.rb new file mode 100644 index 0000000..b4dc6ec --- /dev/null +++ b/Team-Manager/app/helpers/emails_helper.rb @@ -0,0 +1,2 @@ +module EmailsHelper +end diff --git a/Team-Manager/app/helpers/event_property_maps_helper.rb b/Team-Manager/app/helpers/event_property_maps_helper.rb new file mode 100644 index 0000000..94eeab3 --- /dev/null +++ b/Team-Manager/app/helpers/event_property_maps_helper.rb @@ -0,0 +1,2 @@ +module EventPropertyMapsHelper +end diff --git a/Team-Manager/app/helpers/event_types_helper.rb b/Team-Manager/app/helpers/event_types_helper.rb new file mode 100644 index 0000000..bf74a6e --- /dev/null +++ b/Team-Manager/app/helpers/event_types_helper.rb @@ -0,0 +1,2 @@ +module EventTypesHelper +end diff --git a/Team-Manager/app/helpers/events_helper.rb b/Team-Manager/app/helpers/events_helper.rb new file mode 100644 index 0000000..8a9a878 --- /dev/null +++ b/Team-Manager/app/helpers/events_helper.rb @@ -0,0 +1,2 @@ +module EventsHelper +end diff --git a/Team-Manager/app/helpers/organization_teams_helper.rb b/Team-Manager/app/helpers/organization_teams_helper.rb new file mode 100644 index 0000000..3564b7e --- /dev/null +++ b/Team-Manager/app/helpers/organization_teams_helper.rb @@ -0,0 +1,2 @@ +module OrganizationTeamsHelper +end diff --git a/Team-Manager/app/helpers/organizations_helper.rb b/Team-Manager/app/helpers/organizations_helper.rb new file mode 100644 index 0000000..24cc9a8 --- /dev/null +++ b/Team-Manager/app/helpers/organizations_helper.rb @@ -0,0 +1,2 @@ +module OrganizationsHelper +end diff --git a/Team-Manager/app/helpers/parent_children_helper.rb b/Team-Manager/app/helpers/parent_children_helper.rb new file mode 100644 index 0000000..e9f7899 --- /dev/null +++ b/Team-Manager/app/helpers/parent_children_helper.rb @@ -0,0 +1,2 @@ +module ParentChildrenHelper +end diff --git a/Team-Manager/app/helpers/people_helper.rb b/Team-Manager/app/helpers/people_helper.rb new file mode 100644 index 0000000..b682fbf --- /dev/null +++ b/Team-Manager/app/helpers/people_helper.rb @@ -0,0 +1,2 @@ +module PeopleHelper +end diff --git a/Team-Manager/app/helpers/phone_numbers_helper.rb b/Team-Manager/app/helpers/phone_numbers_helper.rb new file mode 100644 index 0000000..cb4f200 --- /dev/null +++ b/Team-Manager/app/helpers/phone_numbers_helper.rb @@ -0,0 +1,2 @@ +module PhoneNumbersHelper +end diff --git a/Team-Manager/app/helpers/player_statistics_helper.rb b/Team-Manager/app/helpers/player_statistics_helper.rb new file mode 100644 index 0000000..25bc15e --- /dev/null +++ b/Team-Manager/app/helpers/player_statistics_helper.rb @@ -0,0 +1,2 @@ +module PlayerStatisticsHelper +end diff --git a/Team-Manager/app/helpers/players_helper.rb b/Team-Manager/app/helpers/players_helper.rb new file mode 100644 index 0000000..e8f775c --- /dev/null +++ b/Team-Manager/app/helpers/players_helper.rb @@ -0,0 +1,2 @@ +module PlayersHelper +end diff --git a/Team-Manager/app/helpers/team_people_helper.rb b/Team-Manager/app/helpers/team_people_helper.rb new file mode 100644 index 0000000..ce77501 --- /dev/null +++ b/Team-Manager/app/helpers/team_people_helper.rb @@ -0,0 +1,2 @@ +module TeamPeopleHelper +end diff --git a/Team-Manager/app/helpers/teams_helper.rb b/Team-Manager/app/helpers/teams_helper.rb new file mode 100644 index 0000000..5fb41eb --- /dev/null +++ b/Team-Manager/app/helpers/teams_helper.rb @@ -0,0 +1,2 @@ +module TeamsHelper +end diff --git a/Team-Manager/app/jobs/application_job.rb b/Team-Manager/app/jobs/application_job.rb new file mode 100644 index 0000000..a009ace --- /dev/null +++ b/Team-Manager/app/jobs/application_job.rb @@ -0,0 +1,2 @@ +class ApplicationJob < ActiveJob::Base +end diff --git a/Team-Manager/app/mailers/application_mailer.rb b/Team-Manager/app/mailers/application_mailer.rb new file mode 100644 index 0000000..286b223 --- /dev/null +++ b/Team-Manager/app/mailers/application_mailer.rb @@ -0,0 +1,4 @@ +class ApplicationMailer < ActionMailer::Base + default from: 'from@example.com' + layout 'mailer' +end diff --git a/Team-Manager/app/models/application_record.rb b/Team-Manager/app/models/application_record.rb new file mode 100644 index 0000000..10a4cba --- /dev/null +++ b/Team-Manager/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + self.abstract_class = true +end diff --git a/Team-Manager/app/models/certification.rb b/Team-Manager/app/models/certification.rb new file mode 100644 index 0000000..8903e84 --- /dev/null +++ b/Team-Manager/app/models/certification.rb @@ -0,0 +1,3 @@ +class Certification < ApplicationRecord + belongs_to :person_id +end diff --git a/Team-Manager/app/models/coach.rb b/Team-Manager/app/models/coach.rb new file mode 100644 index 0000000..634ea51 --- /dev/null +++ b/Team-Manager/app/models/coach.rb @@ -0,0 +1,3 @@ +class Coach < ApplicationRecord + belongs_to :person_id +end diff --git a/Team-Manager/app/models/concerns/.keep b/Team-Manager/app/models/concerns/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/app/models/email.rb b/Team-Manager/app/models/email.rb new file mode 100644 index 0000000..531d48b --- /dev/null +++ b/Team-Manager/app/models/email.rb @@ -0,0 +1,3 @@ +class Email < ApplicationRecord + belongs_to :person +end diff --git a/Team-Manager/app/models/event.rb b/Team-Manager/app/models/event.rb new file mode 100644 index 0000000..5b697f4 --- /dev/null +++ b/Team-Manager/app/models/event.rb @@ -0,0 +1,4 @@ +class Event < ApplicationRecord + belongs_to :event_type + belongs_to :team_id +end diff --git a/Team-Manager/app/models/event_property_map.rb b/Team-Manager/app/models/event_property_map.rb new file mode 100644 index 0000000..47973cd --- /dev/null +++ b/Team-Manager/app/models/event_property_map.rb @@ -0,0 +1,3 @@ +class EventPropertyMap < ApplicationRecord + belongs_to :event_id +end diff --git a/Team-Manager/app/models/event_type.rb b/Team-Manager/app/models/event_type.rb new file mode 100644 index 0000000..b071f50 --- /dev/null +++ b/Team-Manager/app/models/event_type.rb @@ -0,0 +1,2 @@ +class EventType < ApplicationRecord +end diff --git a/Team-Manager/app/models/organization.rb b/Team-Manager/app/models/organization.rb new file mode 100644 index 0000000..b27a6b4 --- /dev/null +++ b/Team-Manager/app/models/organization.rb @@ -0,0 +1,2 @@ +class Organization < ApplicationRecord +end diff --git a/Team-Manager/app/models/organization_team.rb b/Team-Manager/app/models/organization_team.rb new file mode 100644 index 0000000..27741e9 --- /dev/null +++ b/Team-Manager/app/models/organization_team.rb @@ -0,0 +1,4 @@ +class OrganizationTeam < ApplicationRecord + belongs_to :organization_id + belongs_to :team_id +end diff --git a/Team-Manager/app/models/parent_child.rb b/Team-Manager/app/models/parent_child.rb new file mode 100644 index 0000000..fcc6d86 --- /dev/null +++ b/Team-Manager/app/models/parent_child.rb @@ -0,0 +1,4 @@ +class ParentChild < ApplicationRecord + belongs_to :parent_id + belongs_to :child_id +end diff --git a/Team-Manager/app/models/person.rb b/Team-Manager/app/models/person.rb new file mode 100644 index 0000000..a55b109 --- /dev/null +++ b/Team-Manager/app/models/person.rb @@ -0,0 +1,4 @@ +class Person < ApplicationRecord + has_many :Emails + has_many :Phone_numbers +end diff --git a/Team-Manager/app/models/phone_number.rb b/Team-Manager/app/models/phone_number.rb new file mode 100644 index 0000000..5625bd5 --- /dev/null +++ b/Team-Manager/app/models/phone_number.rb @@ -0,0 +1,3 @@ +class PhoneNumber < ApplicationRecord + belongs_to :person +end diff --git a/Team-Manager/app/models/player.rb b/Team-Manager/app/models/player.rb new file mode 100644 index 0000000..448bdc4 --- /dev/null +++ b/Team-Manager/app/models/player.rb @@ -0,0 +1,3 @@ +class Player < ApplicationRecord + belongs_to :player_coach_id +end diff --git a/Team-Manager/app/models/player_statistic.rb b/Team-Manager/app/models/player_statistic.rb new file mode 100644 index 0000000..37e625e --- /dev/null +++ b/Team-Manager/app/models/player_statistic.rb @@ -0,0 +1,3 @@ +class PlayerStatistic < ApplicationRecord + belongs_to :player_id +end diff --git a/Team-Manager/app/models/team.rb b/Team-Manager/app/models/team.rb new file mode 100644 index 0000000..48a6c83 --- /dev/null +++ b/Team-Manager/app/models/team.rb @@ -0,0 +1,2 @@ +class Team < ApplicationRecord +end diff --git a/Team-Manager/app/models/team_person.rb b/Team-Manager/app/models/team_person.rb new file mode 100644 index 0000000..a122384 --- /dev/null +++ b/Team-Manager/app/models/team_person.rb @@ -0,0 +1,4 @@ +class TeamPerson < ApplicationRecord + belongs_to :person_id + belongs_to :team_id +end diff --git a/Team-Manager/app/views/certifications/_certification.json.jbuilder b/Team-Manager/app/views/certifications/_certification.json.jbuilder new file mode 100644 index 0000000..4f5f305 --- /dev/null +++ b/Team-Manager/app/views/certifications/_certification.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! certification, :id, :person_id_id, :certification_name, :expiration_date, :note, :created_at, :updated_at +json.url certification_url(certification, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/certifications/_form.html.erb b/Team-Manager/app/views/certifications/_form.html.erb new file mode 100644 index 0000000..fb5f457 --- /dev/null +++ b/Team-Manager/app/views/certifications/_form.html.erb @@ -0,0 +1,37 @@ +<%= form_for(certification) do |f| %> + <% if certification.errors.any? %> +
+

<%= pluralize(certification.errors.count, "error") %> prohibited this certification from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :person_id_id %> + <%= f.text_field :person_id_id %> +
+ +
+ <%= f.label :certification_name %> + <%= f.text_field :certification_name %> +
+ +
+ <%= f.label :expiration_date %> + <%= f.date_select :expiration_date %> +
+ +
+ <%= f.label :note %> + <%= f.text_area :note %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/certifications/edit.html.erb b/Team-Manager/app/views/certifications/edit.html.erb new file mode 100644 index 0000000..107468d --- /dev/null +++ b/Team-Manager/app/views/certifications/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Certification

+ +<%= render 'form', certification: @certification %> + +<%= link_to 'Show', @certification %> | +<%= link_to 'Back', certifications_path %> diff --git a/Team-Manager/app/views/certifications/index.html.erb b/Team-Manager/app/views/certifications/index.html.erb new file mode 100644 index 0000000..e6b28af --- /dev/null +++ b/Team-Manager/app/views/certifications/index.html.erb @@ -0,0 +1,33 @@ +

<%= notice %>

+ +

Certifications

+ + + + + + + + + + + + + + <% @certifications.each do |certification| %> + + + + + + + + + + <% end %> + +
PersonCertification nameExpiration dateNote
<%= certification.person_id %><%= certification.certification_name %><%= certification.expiration_date %><%= certification.note %><%= link_to 'Show', certification %><%= link_to 'Edit', edit_certification_path(certification) %><%= link_to 'Destroy', certification, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Certification', new_certification_path %> diff --git a/Team-Manager/app/views/certifications/index.json.jbuilder b/Team-Manager/app/views/certifications/index.json.jbuilder new file mode 100644 index 0000000..d9e30b8 --- /dev/null +++ b/Team-Manager/app/views/certifications/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @certifications, partial: 'certifications/certification', as: :certification \ No newline at end of file diff --git a/Team-Manager/app/views/certifications/new.html.erb b/Team-Manager/app/views/certifications/new.html.erb new file mode 100644 index 0000000..8ff7737 --- /dev/null +++ b/Team-Manager/app/views/certifications/new.html.erb @@ -0,0 +1,5 @@ +

New Certification

+ +<%= render 'form', certification: @certification %> + +<%= link_to 'Back', certifications_path %> diff --git a/Team-Manager/app/views/certifications/show.html.erb b/Team-Manager/app/views/certifications/show.html.erb new file mode 100644 index 0000000..cbc3a07 --- /dev/null +++ b/Team-Manager/app/views/certifications/show.html.erb @@ -0,0 +1,24 @@ +

<%= notice %>

+ +

+ Person: + <%= @certification.person_id %> +

+ +

+ Certification name: + <%= @certification.certification_name %> +

+ +

+ Expiration date: + <%= @certification.expiration_date %> +

+ +

+ Note: + <%= @certification.note %> +

+ +<%= link_to 'Edit', edit_certification_path(@certification) %> | +<%= link_to 'Back', certifications_path %> diff --git a/Team-Manager/app/views/certifications/show.json.jbuilder b/Team-Manager/app/views/certifications/show.json.jbuilder new file mode 100644 index 0000000..ebdc71c --- /dev/null +++ b/Team-Manager/app/views/certifications/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "certifications/certification", certification: @certification \ No newline at end of file diff --git a/Team-Manager/app/views/coaches/_coach.json.jbuilder b/Team-Manager/app/views/coaches/_coach.json.jbuilder new file mode 100644 index 0000000..fa3c4e1 --- /dev/null +++ b/Team-Manager/app/views/coaches/_coach.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! coach, :id, :person_id_id, :coach_type, :coach_year_began, :coach_year_ended, :coach_id, :created_at, :updated_at +json.url coach_url(coach, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/coaches/_form.html.erb b/Team-Manager/app/views/coaches/_form.html.erb new file mode 100644 index 0000000..e25ddf5 --- /dev/null +++ b/Team-Manager/app/views/coaches/_form.html.erb @@ -0,0 +1,42 @@ +<%= form_for(coach) do |f| %> + <% if coach.errors.any? %> +
+

<%= pluralize(coach.errors.count, "error") %> prohibited this coach from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :person_id_id %> + <%= f.text_field :person_id_id %> +
+ +
+ <%= f.label :coach_type %> + <%= f.text_field :coach_type %> +
+ +
+ <%= f.label :coach_year_began %> + <%= f.date_select :coach_year_began %> +
+ +
+ <%= f.label :coach_year_ended %> + <%= f.date_select :coach_year_ended %> +
+ +
+ <%= f.label :coach_id %> + <%= f.number_field :coach_id %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/coaches/edit.html.erb b/Team-Manager/app/views/coaches/edit.html.erb new file mode 100644 index 0000000..7cd2abf --- /dev/null +++ b/Team-Manager/app/views/coaches/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Coach

+ +<%= render 'form', coach: @coach %> + +<%= link_to 'Show', @coach %> | +<%= link_to 'Back', coaches_path %> diff --git a/Team-Manager/app/views/coaches/index.html.erb b/Team-Manager/app/views/coaches/index.html.erb new file mode 100644 index 0000000..aa6be9c --- /dev/null +++ b/Team-Manager/app/views/coaches/index.html.erb @@ -0,0 +1,35 @@ +

<%= notice %>

+ +

Coaches

+ + + + + + + + + + + + + + + <% @coaches.each do |coach| %> + + + + + + + + + + + <% end %> + +
PersonCoach typeCoach year beganCoach year endedCoach
<%= coach.person_id %><%= coach.coach_type %><%= coach.coach_year_began %><%= coach.coach_year_ended %><%= coach.coach_id %><%= link_to 'Show', coach %><%= link_to 'Edit', edit_coach_path(coach) %><%= link_to 'Destroy', coach, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Coach', new_coach_path %> diff --git a/Team-Manager/app/views/coaches/index.json.jbuilder b/Team-Manager/app/views/coaches/index.json.jbuilder new file mode 100644 index 0000000..5db85c6 --- /dev/null +++ b/Team-Manager/app/views/coaches/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @coaches, partial: 'coaches/coach', as: :coach \ No newline at end of file diff --git a/Team-Manager/app/views/coaches/new.html.erb b/Team-Manager/app/views/coaches/new.html.erb new file mode 100644 index 0000000..f92ad88 --- /dev/null +++ b/Team-Manager/app/views/coaches/new.html.erb @@ -0,0 +1,5 @@ +

New Coach

+ +<%= render 'form', coach: @coach %> + +<%= link_to 'Back', coaches_path %> diff --git a/Team-Manager/app/views/coaches/show.html.erb b/Team-Manager/app/views/coaches/show.html.erb new file mode 100644 index 0000000..6366c2b --- /dev/null +++ b/Team-Manager/app/views/coaches/show.html.erb @@ -0,0 +1,29 @@ +

<%= notice %>

+ +

+ Person: + <%= @coach.person_id %> +

+ +

+ Coach type: + <%= @coach.coach_type %> +

+ +

+ Coach year began: + <%= @coach.coach_year_began %> +

+ +

+ Coach year ended: + <%= @coach.coach_year_ended %> +

+ +

+ Coach: + <%= @coach.coach_id %> +

+ +<%= link_to 'Edit', edit_coach_path(@coach) %> | +<%= link_to 'Back', coaches_path %> diff --git a/Team-Manager/app/views/coaches/show.json.jbuilder b/Team-Manager/app/views/coaches/show.json.jbuilder new file mode 100644 index 0000000..00a9132 --- /dev/null +++ b/Team-Manager/app/views/coaches/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "coaches/coach", coach: @coach \ No newline at end of file diff --git a/Team-Manager/app/views/emails/_email.json.jbuilder b/Team-Manager/app/views/emails/_email.json.jbuilder new file mode 100644 index 0000000..93410b1 --- /dev/null +++ b/Team-Manager/app/views/emails/_email.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! email, :id, :email, :person_id, :created_at, :updated_at +json.url email_url(email, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/emails/_form.html.erb b/Team-Manager/app/views/emails/_form.html.erb new file mode 100644 index 0000000..650ca4d --- /dev/null +++ b/Team-Manager/app/views/emails/_form.html.erb @@ -0,0 +1,27 @@ +<%= form_for(email) do |f| %> + <% if email.errors.any? %> +
+

<%= pluralize(email.errors.count, "error") %> prohibited this email from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :email %> + <%= f.text_field :email %> +
+ +
+ <%= f.label :person_id %> + <%= f.text_field :person_id %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/emails/edit.html.erb b/Team-Manager/app/views/emails/edit.html.erb new file mode 100644 index 0000000..1431b41 --- /dev/null +++ b/Team-Manager/app/views/emails/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Email

+ +<%= render 'form', email: @email %> + +<%= link_to 'Show', @email %> | +<%= link_to 'Back', emails_path %> diff --git a/Team-Manager/app/views/emails/index.html.erb b/Team-Manager/app/views/emails/index.html.erb new file mode 100644 index 0000000..04b9fb5 --- /dev/null +++ b/Team-Manager/app/views/emails/index.html.erb @@ -0,0 +1,29 @@ +

<%= notice %>

+ +

Emails

+ + + + + + + + + + + + <% @emails.each do |email| %> + + + + + + + + <% end %> + +
EmailPerson
<%= email.email %><%= email.person %><%= link_to 'Show', email %><%= link_to 'Edit', edit_email_path(email) %><%= link_to 'Destroy', email, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Email', new_email_path %> diff --git a/Team-Manager/app/views/emails/index.json.jbuilder b/Team-Manager/app/views/emails/index.json.jbuilder new file mode 100644 index 0000000..0a79192 --- /dev/null +++ b/Team-Manager/app/views/emails/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @emails, partial: 'emails/email', as: :email \ No newline at end of file diff --git a/Team-Manager/app/views/emails/new.html.erb b/Team-Manager/app/views/emails/new.html.erb new file mode 100644 index 0000000..61c2c95 --- /dev/null +++ b/Team-Manager/app/views/emails/new.html.erb @@ -0,0 +1,5 @@ +

New Email

+ +<%= render 'form', email: @email %> + +<%= link_to 'Back', emails_path %> diff --git a/Team-Manager/app/views/emails/show.html.erb b/Team-Manager/app/views/emails/show.html.erb new file mode 100644 index 0000000..215d0dc --- /dev/null +++ b/Team-Manager/app/views/emails/show.html.erb @@ -0,0 +1,14 @@ +

<%= notice %>

+ +

+ Email: + <%= @email.email %> +

+ +

+ Person: + <%= @email.person %> +

+ +<%= link_to 'Edit', edit_email_path(@email) %> | +<%= link_to 'Back', emails_path %> diff --git a/Team-Manager/app/views/emails/show.json.jbuilder b/Team-Manager/app/views/emails/show.json.jbuilder new file mode 100644 index 0000000..e3444f3 --- /dev/null +++ b/Team-Manager/app/views/emails/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "emails/email", email: @email \ No newline at end of file diff --git a/Team-Manager/app/views/event_property_maps/_event_property_map.json.jbuilder b/Team-Manager/app/views/event_property_maps/_event_property_map.json.jbuilder new file mode 100644 index 0000000..e27d8eb --- /dev/null +++ b/Team-Manager/app/views/event_property_maps/_event_property_map.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! event_property_map, :id, :event_id_id, :key, :value, :created_at, :updated_at +json.url event_property_map_url(event_property_map, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/event_property_maps/_form.html.erb b/Team-Manager/app/views/event_property_maps/_form.html.erb new file mode 100644 index 0000000..3625a73 --- /dev/null +++ b/Team-Manager/app/views/event_property_maps/_form.html.erb @@ -0,0 +1,32 @@ +<%= form_for(event_property_map) do |f| %> + <% if event_property_map.errors.any? %> +
+

<%= pluralize(event_property_map.errors.count, "error") %> prohibited this event_property_map from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :event_id_id %> + <%= f.text_field :event_id_id %> +
+ +
+ <%= f.label :key %> + <%= f.text_field :key %> +
+ +
+ <%= f.label :value %> + <%= f.text_field :value %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/event_property_maps/edit.html.erb b/Team-Manager/app/views/event_property_maps/edit.html.erb new file mode 100644 index 0000000..83def3d --- /dev/null +++ b/Team-Manager/app/views/event_property_maps/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Event Property Map

+ +<%= render 'form', event_property_map: @event_property_map %> + +<%= link_to 'Show', @event_property_map %> | +<%= link_to 'Back', event_property_maps_path %> diff --git a/Team-Manager/app/views/event_property_maps/index.html.erb b/Team-Manager/app/views/event_property_maps/index.html.erb new file mode 100644 index 0000000..b6d6d91 --- /dev/null +++ b/Team-Manager/app/views/event_property_maps/index.html.erb @@ -0,0 +1,31 @@ +

<%= notice %>

+ +

Event Property Maps

+ + + + + + + + + + + + + <% @event_property_maps.each do |event_property_map| %> + + + + + + + + + <% end %> + +
EventKeyValue
<%= event_property_map.event_id %><%= event_property_map.key %><%= event_property_map.value %><%= link_to 'Show', event_property_map %><%= link_to 'Edit', edit_event_property_map_path(event_property_map) %><%= link_to 'Destroy', event_property_map, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Event Property Map', new_event_property_map_path %> diff --git a/Team-Manager/app/views/event_property_maps/index.json.jbuilder b/Team-Manager/app/views/event_property_maps/index.json.jbuilder new file mode 100644 index 0000000..f1a67a1 --- /dev/null +++ b/Team-Manager/app/views/event_property_maps/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @event_property_maps, partial: 'event_property_maps/event_property_map', as: :event_property_map \ No newline at end of file diff --git a/Team-Manager/app/views/event_property_maps/new.html.erb b/Team-Manager/app/views/event_property_maps/new.html.erb new file mode 100644 index 0000000..de00c22 --- /dev/null +++ b/Team-Manager/app/views/event_property_maps/new.html.erb @@ -0,0 +1,5 @@ +

New Event Property Map

+ +<%= render 'form', event_property_map: @event_property_map %> + +<%= link_to 'Back', event_property_maps_path %> diff --git a/Team-Manager/app/views/event_property_maps/show.html.erb b/Team-Manager/app/views/event_property_maps/show.html.erb new file mode 100644 index 0000000..41aeae4 --- /dev/null +++ b/Team-Manager/app/views/event_property_maps/show.html.erb @@ -0,0 +1,19 @@ +

<%= notice %>

+ +

+ Event: + <%= @event_property_map.event_id %> +

+ +

+ Key: + <%= @event_property_map.key %> +

+ +

+ Value: + <%= @event_property_map.value %> +

+ +<%= link_to 'Edit', edit_event_property_map_path(@event_property_map) %> | +<%= link_to 'Back', event_property_maps_path %> diff --git a/Team-Manager/app/views/event_property_maps/show.json.jbuilder b/Team-Manager/app/views/event_property_maps/show.json.jbuilder new file mode 100644 index 0000000..27dfce2 --- /dev/null +++ b/Team-Manager/app/views/event_property_maps/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "event_property_maps/event_property_map", event_property_map: @event_property_map \ No newline at end of file diff --git a/Team-Manager/app/views/event_types/_event_type.json.jbuilder b/Team-Manager/app/views/event_types/_event_type.json.jbuilder new file mode 100644 index 0000000..2afa195 --- /dev/null +++ b/Team-Manager/app/views/event_types/_event_type.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! event_type, :id, :event_type_id, :type_description, :created_at, :updated_at +json.url event_type_url(event_type, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/event_types/_form.html.erb b/Team-Manager/app/views/event_types/_form.html.erb new file mode 100644 index 0000000..1d76acc --- /dev/null +++ b/Team-Manager/app/views/event_types/_form.html.erb @@ -0,0 +1,27 @@ +<%= form_for(event_type) do |f| %> + <% if event_type.errors.any? %> +
+

<%= pluralize(event_type.errors.count, "error") %> prohibited this event_type from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :event_type_id %> + <%= f.number_field :event_type_id %> +
+ +
+ <%= f.label :type_description %> + <%= f.text_field :type_description %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/event_types/edit.html.erb b/Team-Manager/app/views/event_types/edit.html.erb new file mode 100644 index 0000000..c75bdaa --- /dev/null +++ b/Team-Manager/app/views/event_types/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Event Type

+ +<%= render 'form', event_type: @event_type %> + +<%= link_to 'Show', @event_type %> | +<%= link_to 'Back', event_types_path %> diff --git a/Team-Manager/app/views/event_types/index.html.erb b/Team-Manager/app/views/event_types/index.html.erb new file mode 100644 index 0000000..df1bc3a --- /dev/null +++ b/Team-Manager/app/views/event_types/index.html.erb @@ -0,0 +1,29 @@ +

<%= notice %>

+ +

Event Types

+ + + + + + + + + + + + <% @event_types.each do |event_type| %> + + + + + + + + <% end %> + +
Event typeType description
<%= event_type.event_type_id %><%= event_type.type_description %><%= link_to 'Show', event_type %><%= link_to 'Edit', edit_event_type_path(event_type) %><%= link_to 'Destroy', event_type, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Event Type', new_event_type_path %> diff --git a/Team-Manager/app/views/event_types/index.json.jbuilder b/Team-Manager/app/views/event_types/index.json.jbuilder new file mode 100644 index 0000000..f5efd5f --- /dev/null +++ b/Team-Manager/app/views/event_types/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @event_types, partial: 'event_types/event_type', as: :event_type \ No newline at end of file diff --git a/Team-Manager/app/views/event_types/new.html.erb b/Team-Manager/app/views/event_types/new.html.erb new file mode 100644 index 0000000..8296355 --- /dev/null +++ b/Team-Manager/app/views/event_types/new.html.erb @@ -0,0 +1,5 @@ +

New Event Type

+ +<%= render 'form', event_type: @event_type %> + +<%= link_to 'Back', event_types_path %> diff --git a/Team-Manager/app/views/event_types/show.html.erb b/Team-Manager/app/views/event_types/show.html.erb new file mode 100644 index 0000000..e497542 --- /dev/null +++ b/Team-Manager/app/views/event_types/show.html.erb @@ -0,0 +1,14 @@ +

<%= notice %>

+ +

+ Event type: + <%= @event_type.event_type_id %> +

+ +

+ Type description: + <%= @event_type.type_description %> +

+ +<%= link_to 'Edit', edit_event_type_path(@event_type) %> | +<%= link_to 'Back', event_types_path %> diff --git a/Team-Manager/app/views/event_types/show.json.jbuilder b/Team-Manager/app/views/event_types/show.json.jbuilder new file mode 100644 index 0000000..3a08ca6 --- /dev/null +++ b/Team-Manager/app/views/event_types/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "event_types/event_type", event_type: @event_type \ No newline at end of file diff --git a/Team-Manager/app/views/events/_event.json.jbuilder b/Team-Manager/app/views/events/_event.json.jbuilder new file mode 100644 index 0000000..71449e8 --- /dev/null +++ b/Team-Manager/app/views/events/_event.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! event, :id, :event_id, :event_type_id, :event_datetime, :team_id_id, :created_by, :open_to_public, :created_at, :updated_at +json.url event_url(event, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/events/_form.html.erb b/Team-Manager/app/views/events/_form.html.erb new file mode 100644 index 0000000..4a06890 --- /dev/null +++ b/Team-Manager/app/views/events/_form.html.erb @@ -0,0 +1,47 @@ +<%= form_for(event) do |f| %> + <% if event.errors.any? %> +
+

<%= pluralize(event.errors.count, "error") %> prohibited this event from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :event_id %> + <%= f.number_field :event_id %> +
+ +
+ <%= f.label :event_type_id %> + <%= f.text_field :event_type_id %> +
+ +
+ <%= f.label :event_datetime %> + <%= f.date_select :event_datetime %> +
+ +
+ <%= f.label :team_id_id %> + <%= f.text_field :team_id_id %> +
+ +
+ <%= f.label :created_by %> + <%= f.number_field :created_by %> +
+ +
+ <%= f.label :open_to_public %> + <%= f.check_box :open_to_public %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/events/edit.html.erb b/Team-Manager/app/views/events/edit.html.erb new file mode 100644 index 0000000..6578b30 --- /dev/null +++ b/Team-Manager/app/views/events/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Event

+ +<%= render 'form', event: @event %> + +<%= link_to 'Show', @event %> | +<%= link_to 'Back', events_path %> diff --git a/Team-Manager/app/views/events/index.html.erb b/Team-Manager/app/views/events/index.html.erb new file mode 100644 index 0000000..92bba56 --- /dev/null +++ b/Team-Manager/app/views/events/index.html.erb @@ -0,0 +1,37 @@ +

<%= notice %>

+ +

Events

+ + + + + + + + + + + + + + + + <% @events.each do |event| %> + + + + + + + + + + + + <% end %> + +
EventEvent typeEvent datetimeTeamCreated byOpen to public
<%= event.event_id %><%= event.event_type %><%= event.event_datetime %><%= event.team_id %><%= event.created_by %><%= event.open_to_public %><%= link_to 'Show', event %><%= link_to 'Edit', edit_event_path(event) %><%= link_to 'Destroy', event, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Event', new_event_path %> diff --git a/Team-Manager/app/views/events/index.json.jbuilder b/Team-Manager/app/views/events/index.json.jbuilder new file mode 100644 index 0000000..df6aa4f --- /dev/null +++ b/Team-Manager/app/views/events/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @events, partial: 'events/event', as: :event \ No newline at end of file diff --git a/Team-Manager/app/views/events/new.html.erb b/Team-Manager/app/views/events/new.html.erb new file mode 100644 index 0000000..1feff5f --- /dev/null +++ b/Team-Manager/app/views/events/new.html.erb @@ -0,0 +1,5 @@ +

New Event

+ +<%= render 'form', event: @event %> + +<%= link_to 'Back', events_path %> diff --git a/Team-Manager/app/views/events/show.html.erb b/Team-Manager/app/views/events/show.html.erb new file mode 100644 index 0000000..016e37d --- /dev/null +++ b/Team-Manager/app/views/events/show.html.erb @@ -0,0 +1,34 @@ +

<%= notice %>

+ +

+ Event: + <%= @event.event_id %> +

+ +

+ Event type: + <%= @event.event_type %> +

+ +

+ Event datetime: + <%= @event.event_datetime %> +

+ +

+ Team: + <%= @event.team_id %> +

+ +

+ Created by: + <%= @event.created_by %> +

+ +

+ Open to public: + <%= @event.open_to_public %> +

+ +<%= link_to 'Edit', edit_event_path(@event) %> | +<%= link_to 'Back', events_path %> diff --git a/Team-Manager/app/views/events/show.json.jbuilder b/Team-Manager/app/views/events/show.json.jbuilder new file mode 100644 index 0000000..7e59004 --- /dev/null +++ b/Team-Manager/app/views/events/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "events/event", event: @event \ No newline at end of file diff --git a/Team-Manager/app/views/layouts/application.html.erb b/Team-Manager/app/views/layouts/application.html.erb new file mode 100644 index 0000000..b4a753f --- /dev/null +++ b/Team-Manager/app/views/layouts/application.html.erb @@ -0,0 +1,14 @@ + + + + TeamManager + <%= csrf_meta_tags %> + + <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> + <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> + + + + <%= yield %> + + diff --git a/Team-Manager/app/views/layouts/mailer.html.erb b/Team-Manager/app/views/layouts/mailer.html.erb new file mode 100644 index 0000000..cbd34d2 --- /dev/null +++ b/Team-Manager/app/views/layouts/mailer.html.erb @@ -0,0 +1,13 @@ + + + + + + + + + <%= yield %> + + diff --git a/Team-Manager/app/views/layouts/mailer.text.erb b/Team-Manager/app/views/layouts/mailer.text.erb new file mode 100644 index 0000000..37f0bdd --- /dev/null +++ b/Team-Manager/app/views/layouts/mailer.text.erb @@ -0,0 +1 @@ +<%= yield %> diff --git a/Team-Manager/app/views/organization_teams/_form.html.erb b/Team-Manager/app/views/organization_teams/_form.html.erb new file mode 100644 index 0000000..5633a35 --- /dev/null +++ b/Team-Manager/app/views/organization_teams/_form.html.erb @@ -0,0 +1,27 @@ +<%= form_for(organization_team) do |f| %> + <% if organization_team.errors.any? %> +
+

<%= pluralize(organization_team.errors.count, "error") %> prohibited this organization_team from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :organization_id_id %> + <%= f.text_field :organization_id_id %> +
+ +
+ <%= f.label :team_id_id %> + <%= f.text_field :team_id_id %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/organization_teams/_organization_team.json.jbuilder b/Team-Manager/app/views/organization_teams/_organization_team.json.jbuilder new file mode 100644 index 0000000..49fe398 --- /dev/null +++ b/Team-Manager/app/views/organization_teams/_organization_team.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! organization_team, :id, :organization_id_id, :team_id_id, :created_at, :updated_at +json.url organization_team_url(organization_team, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/organization_teams/edit.html.erb b/Team-Manager/app/views/organization_teams/edit.html.erb new file mode 100644 index 0000000..2a5000b --- /dev/null +++ b/Team-Manager/app/views/organization_teams/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Organization Team

+ +<%= render 'form', organization_team: @organization_team %> + +<%= link_to 'Show', @organization_team %> | +<%= link_to 'Back', organization_teams_path %> diff --git a/Team-Manager/app/views/organization_teams/index.html.erb b/Team-Manager/app/views/organization_teams/index.html.erb new file mode 100644 index 0000000..b5d41eb --- /dev/null +++ b/Team-Manager/app/views/organization_teams/index.html.erb @@ -0,0 +1,29 @@ +

<%= notice %>

+ +

Organization Teams

+ + + + + + + + + + + + <% @organization_teams.each do |organization_team| %> + + + + + + + + <% end %> + +
OrganizationTeam
<%= organization_team.organization_id %><%= organization_team.team_id %><%= link_to 'Show', organization_team %><%= link_to 'Edit', edit_organization_team_path(organization_team) %><%= link_to 'Destroy', organization_team, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Organization Team', new_organization_team_path %> diff --git a/Team-Manager/app/views/organization_teams/index.json.jbuilder b/Team-Manager/app/views/organization_teams/index.json.jbuilder new file mode 100644 index 0000000..f8f4082 --- /dev/null +++ b/Team-Manager/app/views/organization_teams/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @organization_teams, partial: 'organization_teams/organization_team', as: :organization_team \ No newline at end of file diff --git a/Team-Manager/app/views/organization_teams/new.html.erb b/Team-Manager/app/views/organization_teams/new.html.erb new file mode 100644 index 0000000..be683c7 --- /dev/null +++ b/Team-Manager/app/views/organization_teams/new.html.erb @@ -0,0 +1,5 @@ +

New Organization Team

+ +<%= render 'form', organization_team: @organization_team %> + +<%= link_to 'Back', organization_teams_path %> diff --git a/Team-Manager/app/views/organization_teams/show.html.erb b/Team-Manager/app/views/organization_teams/show.html.erb new file mode 100644 index 0000000..a56ee4c --- /dev/null +++ b/Team-Manager/app/views/organization_teams/show.html.erb @@ -0,0 +1,14 @@ +

<%= notice %>

+ +

+ Organization: + <%= @organization_team.organization_id %> +

+ +

+ Team: + <%= @organization_team.team_id %> +

+ +<%= link_to 'Edit', edit_organization_team_path(@organization_team) %> | +<%= link_to 'Back', organization_teams_path %> diff --git a/Team-Manager/app/views/organization_teams/show.json.jbuilder b/Team-Manager/app/views/organization_teams/show.json.jbuilder new file mode 100644 index 0000000..c98706f --- /dev/null +++ b/Team-Manager/app/views/organization_teams/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "organization_teams/organization_team", organization_team: @organization_team \ No newline at end of file diff --git a/Team-Manager/app/views/organizations/_form.html.erb b/Team-Manager/app/views/organizations/_form.html.erb new file mode 100644 index 0000000..adf119c --- /dev/null +++ b/Team-Manager/app/views/organizations/_form.html.erb @@ -0,0 +1,27 @@ +<%= form_for(organization) do |f| %> + <% if organization.errors.any? %> +
+

<%= pluralize(organization.errors.count, "error") %> prohibited this organization from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :organization_id %> + <%= f.number_field :organization_id %> +
+ +
+ <%= f.label :name %> + <%= f.text_field :name %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/organizations/_organization.json.jbuilder b/Team-Manager/app/views/organizations/_organization.json.jbuilder new file mode 100644 index 0000000..be773f3 --- /dev/null +++ b/Team-Manager/app/views/organizations/_organization.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! organization, :id, :organization_id, :name, :created_at, :updated_at +json.url organization_url(organization, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/organizations/edit.html.erb b/Team-Manager/app/views/organizations/edit.html.erb new file mode 100644 index 0000000..0514ab1 --- /dev/null +++ b/Team-Manager/app/views/organizations/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Organization

+ +<%= render 'form', organization: @organization %> + +<%= link_to 'Show', @organization %> | +<%= link_to 'Back', organizations_path %> diff --git a/Team-Manager/app/views/organizations/index.html.erb b/Team-Manager/app/views/organizations/index.html.erb new file mode 100644 index 0000000..19f370e --- /dev/null +++ b/Team-Manager/app/views/organizations/index.html.erb @@ -0,0 +1,29 @@ +

<%= notice %>

+ +

Organizations

+ + + + + + + + + + + + <% @organizations.each do |organization| %> + + + + + + + + <% end %> + +
OrganizationName
<%= organization.organization_id %><%= organization.name %><%= link_to 'Show', organization %><%= link_to 'Edit', edit_organization_path(organization) %><%= link_to 'Destroy', organization, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Organization', new_organization_path %> diff --git a/Team-Manager/app/views/organizations/index.json.jbuilder b/Team-Manager/app/views/organizations/index.json.jbuilder new file mode 100644 index 0000000..4b1811f --- /dev/null +++ b/Team-Manager/app/views/organizations/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @organizations, partial: 'organizations/organization', as: :organization \ No newline at end of file diff --git a/Team-Manager/app/views/organizations/new.html.erb b/Team-Manager/app/views/organizations/new.html.erb new file mode 100644 index 0000000..be2be97 --- /dev/null +++ b/Team-Manager/app/views/organizations/new.html.erb @@ -0,0 +1,5 @@ +

New Organization

+ +<%= render 'form', organization: @organization %> + +<%= link_to 'Back', organizations_path %> diff --git a/Team-Manager/app/views/organizations/show.html.erb b/Team-Manager/app/views/organizations/show.html.erb new file mode 100644 index 0000000..f62c0bc --- /dev/null +++ b/Team-Manager/app/views/organizations/show.html.erb @@ -0,0 +1,14 @@ +

<%= notice %>

+ +

+ Organization: + <%= @organization.organization_id %> +

+ +

+ Name: + <%= @organization.name %> +

+ +<%= link_to 'Edit', edit_organization_path(@organization) %> | +<%= link_to 'Back', organizations_path %> diff --git a/Team-Manager/app/views/organizations/show.json.jbuilder b/Team-Manager/app/views/organizations/show.json.jbuilder new file mode 100644 index 0000000..1f684e2 --- /dev/null +++ b/Team-Manager/app/views/organizations/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "organizations/organization", organization: @organization \ No newline at end of file diff --git a/Team-Manager/app/views/parent_children/_form.html.erb b/Team-Manager/app/views/parent_children/_form.html.erb new file mode 100644 index 0000000..a665636 --- /dev/null +++ b/Team-Manager/app/views/parent_children/_form.html.erb @@ -0,0 +1,27 @@ +<%= form_for(parent_child) do |f| %> + <% if parent_child.errors.any? %> +
+

<%= pluralize(parent_child.errors.count, "error") %> prohibited this parent_child from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :parent_id_id %> + <%= f.text_field :parent_id_id %> +
+ +
+ <%= f.label :child_id_id %> + <%= f.text_field :child_id_id %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/parent_children/_parent_child.json.jbuilder b/Team-Manager/app/views/parent_children/_parent_child.json.jbuilder new file mode 100644 index 0000000..7f29a0d --- /dev/null +++ b/Team-Manager/app/views/parent_children/_parent_child.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! parent_child, :id, :parent_id_id, :child_id_id, :created_at, :updated_at +json.url parent_child_url(parent_child, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/parent_children/edit.html.erb b/Team-Manager/app/views/parent_children/edit.html.erb new file mode 100644 index 0000000..de09f45 --- /dev/null +++ b/Team-Manager/app/views/parent_children/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Parent Child

+ +<%= render 'form', parent_child: @parent_child %> + +<%= link_to 'Show', @parent_child %> | +<%= link_to 'Back', parent_children_path %> diff --git a/Team-Manager/app/views/parent_children/index.html.erb b/Team-Manager/app/views/parent_children/index.html.erb new file mode 100644 index 0000000..f9ad56b --- /dev/null +++ b/Team-Manager/app/views/parent_children/index.html.erb @@ -0,0 +1,29 @@ +

<%= notice %>

+ +

Parent Children

+ + + + + + + + + + + + <% @parent_children.each do |parent_child| %> + + + + + + + + <% end %> + +
ParentChild
<%= parent_child.parent_id %><%= parent_child.child_id %><%= link_to 'Show', parent_child %><%= link_to 'Edit', edit_parent_child_path(parent_child) %><%= link_to 'Destroy', parent_child, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Parent Child', new_parent_child_path %> diff --git a/Team-Manager/app/views/parent_children/index.json.jbuilder b/Team-Manager/app/views/parent_children/index.json.jbuilder new file mode 100644 index 0000000..f6ce5f5 --- /dev/null +++ b/Team-Manager/app/views/parent_children/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @parent_children, partial: 'parent_children/parent_child', as: :parent_child \ No newline at end of file diff --git a/Team-Manager/app/views/parent_children/new.html.erb b/Team-Manager/app/views/parent_children/new.html.erb new file mode 100644 index 0000000..363e55d --- /dev/null +++ b/Team-Manager/app/views/parent_children/new.html.erb @@ -0,0 +1,5 @@ +

New Parent Child

+ +<%= render 'form', parent_child: @parent_child %> + +<%= link_to 'Back', parent_children_path %> diff --git a/Team-Manager/app/views/parent_children/show.html.erb b/Team-Manager/app/views/parent_children/show.html.erb new file mode 100644 index 0000000..8543cdb --- /dev/null +++ b/Team-Manager/app/views/parent_children/show.html.erb @@ -0,0 +1,14 @@ +

<%= notice %>

+ +

+ Parent: + <%= @parent_child.parent_id %> +

+ +

+ Child: + <%= @parent_child.child_id %> +

+ +<%= link_to 'Edit', edit_parent_child_path(@parent_child) %> | +<%= link_to 'Back', parent_children_path %> diff --git a/Team-Manager/app/views/parent_children/show.json.jbuilder b/Team-Manager/app/views/parent_children/show.json.jbuilder new file mode 100644 index 0000000..a46ea70 --- /dev/null +++ b/Team-Manager/app/views/parent_children/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "parent_children/parent_child", parent_child: @parent_child \ No newline at end of file diff --git a/Team-Manager/app/views/people/_form.html.erb b/Team-Manager/app/views/people/_form.html.erb new file mode 100644 index 0000000..dd42b1d --- /dev/null +++ b/Team-Manager/app/views/people/_form.html.erb @@ -0,0 +1,92 @@ +<%= form_for(person) do |f| %> + <% if person.errors.any? %> +
+

<%= pluralize(person.errors.count, "error") %> prohibited this person from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :first_name %> + <%= f.text_field :first_name %> +
+ +
+ <%= f.label :last_name %> + <%= f.text_field :last_name %> +
+ +
+ <%= f.label :addr_route %> + <%= f.text_field :addr_route %> +
+ +
+ <%= f.label :addr_city %> + <%= f.text_field :addr_city %> +
+ +
+ <%= f.label :addr_state %> + <%= f.text_field :addr_state %> +
+ +
+ <%= f.label :addr_zip %> + <%= f.number_field :addr_zip %> +
+ +
+ <%= f.label :username %> + <%= f.text_field :username %> +
+ +
+ <%= f.label :pass_hash %> + <%= f.text_field :pass_hash %> +
+ +
+ <%= f.label :pass_salt %> + <%= f.text_field :pass_salt %> +
+ +
+ <%= f.label :bio %> + <%= f.text_area :bio %> +
+ +
+ <%= f.label :birth_date %> + <%= f.date_select :birth_date %> +
+ +
+ <%= f.label :gender %> + <%= f.text_field :gender %> +
+ +
+ <%= f.label :height_in_inches %> + <%= f.number_field :height_in_inches %> +
+ +
+ <%= f.label :weight_in_pounds %> + <%= f.number_field :weight_in_pounds %> +
+ +
+ <%= f.label :shoe_size %> + <%= f.text_field :shoe_size %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/people/_person.json.jbuilder b/Team-Manager/app/views/people/_person.json.jbuilder new file mode 100644 index 0000000..2d9df6c --- /dev/null +++ b/Team-Manager/app/views/people/_person.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! person, :id, :first_name, :last_name, :addr_route, :addr_city, :addr_state, :addr_zip, :username, :pass_hash, :pass_salt, :bio, :birth_date, :gender, :height_in_inches, :weight_in_pounds, :shoe_size, :created_at, :updated_at +json.url person_url(person, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/people/edit.html.erb b/Team-Manager/app/views/people/edit.html.erb new file mode 100644 index 0000000..f5faa28 --- /dev/null +++ b/Team-Manager/app/views/people/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Person

+ +<%= render 'form', person: @person %> + +<%= link_to 'Show', @person %> | +<%= link_to 'Back', people_path %> diff --git a/Team-Manager/app/views/people/index.html.erb b/Team-Manager/app/views/people/index.html.erb new file mode 100644 index 0000000..bfef260 --- /dev/null +++ b/Team-Manager/app/views/people/index.html.erb @@ -0,0 +1,55 @@ +

<%= notice %>

+ +

People

+ + + + + + + + + + + + + + + + + + + + + + + + + <% @people.each do |person| %> + + + + + + + + + + + + + + + + + + + + + <% end %> + +
First nameLast nameAddr routeAddr cityAddr stateAddr zipUsernamePass hashPass saltBioBirth dateGenderHeight in inchesWeight in poundsShoe size
<%= person.first_name %><%= person.last_name %><%= person.addr_route %><%= person.addr_city %><%= person.addr_state %><%= person.addr_zip %><%= person.username %><%= person.pass_hash %><%= person.pass_salt %><%= person.bio %><%= person.birth_date %><%= person.gender %><%= person.height_in_inches %><%= person.weight_in_pounds %><%= person.shoe_size %><%= link_to 'Show', person %><%= link_to 'Edit', edit_person_path(person) %><%= link_to 'Destroy', person, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Person', new_person_path %> diff --git a/Team-Manager/app/views/people/index.json.jbuilder b/Team-Manager/app/views/people/index.json.jbuilder new file mode 100644 index 0000000..5db71b9 --- /dev/null +++ b/Team-Manager/app/views/people/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @people, partial: 'people/person', as: :person \ No newline at end of file diff --git a/Team-Manager/app/views/people/new.html.erb b/Team-Manager/app/views/people/new.html.erb new file mode 100644 index 0000000..103bac0 --- /dev/null +++ b/Team-Manager/app/views/people/new.html.erb @@ -0,0 +1,5 @@ +

New Person

+ +<%= render 'form', person: @person %> + +<%= link_to 'Back', people_path %> diff --git a/Team-Manager/app/views/people/show.html.erb b/Team-Manager/app/views/people/show.html.erb new file mode 100644 index 0000000..d61832e --- /dev/null +++ b/Team-Manager/app/views/people/show.html.erb @@ -0,0 +1,79 @@ +

<%= notice %>

+ +

+ First name: + <%= @person.first_name %> +

+ +

+ Last name: + <%= @person.last_name %> +

+ +

+ Addr route: + <%= @person.addr_route %> +

+ +

+ Addr city: + <%= @person.addr_city %> +

+ +

+ Addr state: + <%= @person.addr_state %> +

+ +

+ Addr zip: + <%= @person.addr_zip %> +

+ +

+ Username: + <%= @person.username %> +

+ +

+ Pass hash: + <%= @person.pass_hash %> +

+ +

+ Pass salt: + <%= @person.pass_salt %> +

+ +

+ Bio: + <%= @person.bio %> +

+ +

+ Birth date: + <%= @person.birth_date %> +

+ +

+ Gender: + <%= @person.gender %> +

+ +

+ Height in inches: + <%= @person.height_in_inches %> +

+ +

+ Weight in pounds: + <%= @person.weight_in_pounds %> +

+ +

+ Shoe size: + <%= @person.shoe_size %> +

+ +<%= link_to 'Edit', edit_person_path(@person) %> | +<%= link_to 'Back', people_path %> diff --git a/Team-Manager/app/views/people/show.json.jbuilder b/Team-Manager/app/views/people/show.json.jbuilder new file mode 100644 index 0000000..727d7ec --- /dev/null +++ b/Team-Manager/app/views/people/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "people/person", person: @person \ No newline at end of file diff --git a/Team-Manager/app/views/phone_numbers/_form.html.erb b/Team-Manager/app/views/phone_numbers/_form.html.erb new file mode 100644 index 0000000..67501ea --- /dev/null +++ b/Team-Manager/app/views/phone_numbers/_form.html.erb @@ -0,0 +1,27 @@ +<%= form_for(phone_number) do |f| %> + <% if phone_number.errors.any? %> +
+

<%= pluralize(phone_number.errors.count, "error") %> prohibited this phone_number from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :phone %> + <%= f.text_field :phone %> +
+ +
+ <%= f.label :person_id %> + <%= f.text_field :person_id %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/phone_numbers/_phone_number.json.jbuilder b/Team-Manager/app/views/phone_numbers/_phone_number.json.jbuilder new file mode 100644 index 0000000..34649b9 --- /dev/null +++ b/Team-Manager/app/views/phone_numbers/_phone_number.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! phone_number, :id, :phone, :person_id, :created_at, :updated_at +json.url phone_number_url(phone_number, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/phone_numbers/edit.html.erb b/Team-Manager/app/views/phone_numbers/edit.html.erb new file mode 100644 index 0000000..f69076d --- /dev/null +++ b/Team-Manager/app/views/phone_numbers/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Phone Number

+ +<%= render 'form', phone_number: @phone_number %> + +<%= link_to 'Show', @phone_number %> | +<%= link_to 'Back', phone_numbers_path %> diff --git a/Team-Manager/app/views/phone_numbers/index.html.erb b/Team-Manager/app/views/phone_numbers/index.html.erb new file mode 100644 index 0000000..7d314a7 --- /dev/null +++ b/Team-Manager/app/views/phone_numbers/index.html.erb @@ -0,0 +1,29 @@ +

<%= notice %>

+ +

Phone Numbers

+ + + + + + + + + + + + <% @phone_numbers.each do |phone_number| %> + + + + + + + + <% end %> + +
PhonePerson
<%= phone_number.phone %><%= phone_number.person %><%= link_to 'Show', phone_number %><%= link_to 'Edit', edit_phone_number_path(phone_number) %><%= link_to 'Destroy', phone_number, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Phone Number', new_phone_number_path %> diff --git a/Team-Manager/app/views/phone_numbers/index.json.jbuilder b/Team-Manager/app/views/phone_numbers/index.json.jbuilder new file mode 100644 index 0000000..4b32ac2 --- /dev/null +++ b/Team-Manager/app/views/phone_numbers/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @phone_numbers, partial: 'phone_numbers/phone_number', as: :phone_number \ No newline at end of file diff --git a/Team-Manager/app/views/phone_numbers/new.html.erb b/Team-Manager/app/views/phone_numbers/new.html.erb new file mode 100644 index 0000000..f77b22a --- /dev/null +++ b/Team-Manager/app/views/phone_numbers/new.html.erb @@ -0,0 +1,5 @@ +

New Phone Number

+ +<%= render 'form', phone_number: @phone_number %> + +<%= link_to 'Back', phone_numbers_path %> diff --git a/Team-Manager/app/views/phone_numbers/show.html.erb b/Team-Manager/app/views/phone_numbers/show.html.erb new file mode 100644 index 0000000..ca58bb5 --- /dev/null +++ b/Team-Manager/app/views/phone_numbers/show.html.erb @@ -0,0 +1,14 @@ +

<%= notice %>

+ +

+ Phone: + <%= @phone_number.phone %> +

+ +

+ Person: + <%= @phone_number.person %> +

+ +<%= link_to 'Edit', edit_phone_number_path(@phone_number) %> | +<%= link_to 'Back', phone_numbers_path %> diff --git a/Team-Manager/app/views/phone_numbers/show.json.jbuilder b/Team-Manager/app/views/phone_numbers/show.json.jbuilder new file mode 100644 index 0000000..ce3e6f9 --- /dev/null +++ b/Team-Manager/app/views/phone_numbers/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "phone_numbers/phone_number", phone_number: @phone_number \ No newline at end of file diff --git a/Team-Manager/app/views/player_statistics/_form.html.erb b/Team-Manager/app/views/player_statistics/_form.html.erb new file mode 100644 index 0000000..e71e8f8 --- /dev/null +++ b/Team-Manager/app/views/player_statistics/_form.html.erb @@ -0,0 +1,42 @@ +<%= form_for(player_statistic) do |f| %> + <% if player_statistic.errors.any? %> +
+

<%= pluralize(player_statistic.errors.count, "error") %> prohibited this player_statistic from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :player_id_id %> + <%= f.text_field :player_id_id %> +
+ +
+ <%= f.label :statistic_type %> + <%= f.text_field :statistic_type %> +
+ +
+ <%= f.label :statistic_value %> + <%= f.text_field :statistic_value %> +
+ +
+ <%= f.label :date_recorded %> + <%= f.date_select :date_recorded %> +
+ +
+ <%= f.label :stat_id %> + <%= f.number_field :stat_id %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/player_statistics/_player_statistic.json.jbuilder b/Team-Manager/app/views/player_statistics/_player_statistic.json.jbuilder new file mode 100644 index 0000000..7beffe5 --- /dev/null +++ b/Team-Manager/app/views/player_statistics/_player_statistic.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! player_statistic, :id, :player_id_id, :statistic_type, :statistic_value, :date_recorded, :stat_id, :created_at, :updated_at +json.url player_statistic_url(player_statistic, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/player_statistics/edit.html.erb b/Team-Manager/app/views/player_statistics/edit.html.erb new file mode 100644 index 0000000..a75c15d --- /dev/null +++ b/Team-Manager/app/views/player_statistics/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Player Statistic

+ +<%= render 'form', player_statistic: @player_statistic %> + +<%= link_to 'Show', @player_statistic %> | +<%= link_to 'Back', player_statistics_path %> diff --git a/Team-Manager/app/views/player_statistics/index.html.erb b/Team-Manager/app/views/player_statistics/index.html.erb new file mode 100644 index 0000000..0a371bf --- /dev/null +++ b/Team-Manager/app/views/player_statistics/index.html.erb @@ -0,0 +1,35 @@ +

<%= notice %>

+ +

Player Statistics

+ + + + + + + + + + + + + + + <% @player_statistics.each do |player_statistic| %> + + + + + + + + + + + <% end %> + +
PlayerStatistic typeStatistic valueDate recordedStat
<%= player_statistic.player_id %><%= player_statistic.statistic_type %><%= player_statistic.statistic_value %><%= player_statistic.date_recorded %><%= player_statistic.stat_id %><%= link_to 'Show', player_statistic %><%= link_to 'Edit', edit_player_statistic_path(player_statistic) %><%= link_to 'Destroy', player_statistic, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Player Statistic', new_player_statistic_path %> diff --git a/Team-Manager/app/views/player_statistics/index.json.jbuilder b/Team-Manager/app/views/player_statistics/index.json.jbuilder new file mode 100644 index 0000000..d90af0e --- /dev/null +++ b/Team-Manager/app/views/player_statistics/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @player_statistics, partial: 'player_statistics/player_statistic', as: :player_statistic \ No newline at end of file diff --git a/Team-Manager/app/views/player_statistics/new.html.erb b/Team-Manager/app/views/player_statistics/new.html.erb new file mode 100644 index 0000000..5ffcfbb --- /dev/null +++ b/Team-Manager/app/views/player_statistics/new.html.erb @@ -0,0 +1,5 @@ +

New Player Statistic

+ +<%= render 'form', player_statistic: @player_statistic %> + +<%= link_to 'Back', player_statistics_path %> diff --git a/Team-Manager/app/views/player_statistics/show.html.erb b/Team-Manager/app/views/player_statistics/show.html.erb new file mode 100644 index 0000000..6dcdab1 --- /dev/null +++ b/Team-Manager/app/views/player_statistics/show.html.erb @@ -0,0 +1,29 @@ +

<%= notice %>

+ +

+ Player: + <%= @player_statistic.player_id %> +

+ +

+ Statistic type: + <%= @player_statistic.statistic_type %> +

+ +

+ Statistic value: + <%= @player_statistic.statistic_value %> +

+ +

+ Date recorded: + <%= @player_statistic.date_recorded %> +

+ +

+ Stat: + <%= @player_statistic.stat_id %> +

+ +<%= link_to 'Edit', edit_player_statistic_path(@player_statistic) %> | +<%= link_to 'Back', player_statistics_path %> diff --git a/Team-Manager/app/views/player_statistics/show.json.jbuilder b/Team-Manager/app/views/player_statistics/show.json.jbuilder new file mode 100644 index 0000000..49a8738 --- /dev/null +++ b/Team-Manager/app/views/player_statistics/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "player_statistics/player_statistic", player_statistic: @player_statistic \ No newline at end of file diff --git a/Team-Manager/app/views/players/_form.html.erb b/Team-Manager/app/views/players/_form.html.erb new file mode 100644 index 0000000..579bb03 --- /dev/null +++ b/Team-Manager/app/views/players/_form.html.erb @@ -0,0 +1,37 @@ +<%= form_for(player) do |f| %> + <% if player.errors.any? %> +
+

<%= pluralize(player.errors.count, "error") %> prohibited this player from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :player_coach_id_id %> + <%= f.text_field :player_coach_id_id %> +
+ +
+ <%= f.label :player_jersey_id %> + <%= f.number_field :player_jersey_id %> +
+ +
+ <%= f.label :team_join_date %> + <%= f.date_select :team_join_date %> +
+ +
+ <%= f.label :team_left_date %> + <%= f.date_select :team_left_date %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/players/_player.json.jbuilder b/Team-Manager/app/views/players/_player.json.jbuilder new file mode 100644 index 0000000..59c6d63 --- /dev/null +++ b/Team-Manager/app/views/players/_player.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! player, :id, :player_coach_id_id, :player_jersey_id, :team_join_date, :team_left_date, :created_at, :updated_at +json.url player_url(player, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/players/edit.html.erb b/Team-Manager/app/views/players/edit.html.erb new file mode 100644 index 0000000..708f779 --- /dev/null +++ b/Team-Manager/app/views/players/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Player

+ +<%= render 'form', player: @player %> + +<%= link_to 'Show', @player %> | +<%= link_to 'Back', players_path %> diff --git a/Team-Manager/app/views/players/index.html.erb b/Team-Manager/app/views/players/index.html.erb new file mode 100644 index 0000000..7825690 --- /dev/null +++ b/Team-Manager/app/views/players/index.html.erb @@ -0,0 +1,33 @@ +

<%= notice %>

+ +

Players

+ + + + + + + + + + + + + + <% @players.each do |player| %> + + + + + + + + + + <% end %> + +
Player coachPlayer jerseyTeam join dateTeam left date
<%= player.player_coach_id %><%= player.player_jersey_id %><%= player.team_join_date %><%= player.team_left_date %><%= link_to 'Show', player %><%= link_to 'Edit', edit_player_path(player) %><%= link_to 'Destroy', player, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Player', new_player_path %> diff --git a/Team-Manager/app/views/players/index.json.jbuilder b/Team-Manager/app/views/players/index.json.jbuilder new file mode 100644 index 0000000..b5f2544 --- /dev/null +++ b/Team-Manager/app/views/players/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @players, partial: 'players/player', as: :player \ No newline at end of file diff --git a/Team-Manager/app/views/players/new.html.erb b/Team-Manager/app/views/players/new.html.erb new file mode 100644 index 0000000..828eb7f --- /dev/null +++ b/Team-Manager/app/views/players/new.html.erb @@ -0,0 +1,5 @@ +

New Player

+ +<%= render 'form', player: @player %> + +<%= link_to 'Back', players_path %> diff --git a/Team-Manager/app/views/players/show.html.erb b/Team-Manager/app/views/players/show.html.erb new file mode 100644 index 0000000..b9dfcee --- /dev/null +++ b/Team-Manager/app/views/players/show.html.erb @@ -0,0 +1,24 @@ +

<%= notice %>

+ +

+ Player coach: + <%= @player.player_coach_id %> +

+ +

+ Player jersey: + <%= @player.player_jersey_id %> +

+ +

+ Team join date: + <%= @player.team_join_date %> +

+ +

+ Team left date: + <%= @player.team_left_date %> +

+ +<%= link_to 'Edit', edit_player_path(@player) %> | +<%= link_to 'Back', players_path %> diff --git a/Team-Manager/app/views/players/show.json.jbuilder b/Team-Manager/app/views/players/show.json.jbuilder new file mode 100644 index 0000000..9325530 --- /dev/null +++ b/Team-Manager/app/views/players/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "players/player", player: @player \ No newline at end of file diff --git a/Team-Manager/app/views/team_people/_form.html.erb b/Team-Manager/app/views/team_people/_form.html.erb new file mode 100644 index 0000000..87610db --- /dev/null +++ b/Team-Manager/app/views/team_people/_form.html.erb @@ -0,0 +1,27 @@ +<%= form_for(team_person) do |f| %> + <% if team_person.errors.any? %> +
+

<%= pluralize(team_person.errors.count, "error") %> prohibited this team_person from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :person_id_id %> + <%= f.text_field :person_id_id %> +
+ +
+ <%= f.label :team_id_id %> + <%= f.text_field :team_id_id %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/team_people/_team_person.json.jbuilder b/Team-Manager/app/views/team_people/_team_person.json.jbuilder new file mode 100644 index 0000000..6474a42 --- /dev/null +++ b/Team-Manager/app/views/team_people/_team_person.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! team_person, :id, :person_id_id, :team_id_id, :created_at, :updated_at +json.url team_person_url(team_person, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/team_people/edit.html.erb b/Team-Manager/app/views/team_people/edit.html.erb new file mode 100644 index 0000000..88a8310 --- /dev/null +++ b/Team-Manager/app/views/team_people/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Team Person

+ +<%= render 'form', team_person: @team_person %> + +<%= link_to 'Show', @team_person %> | +<%= link_to 'Back', team_people_path %> diff --git a/Team-Manager/app/views/team_people/index.html.erb b/Team-Manager/app/views/team_people/index.html.erb new file mode 100644 index 0000000..b913f56 --- /dev/null +++ b/Team-Manager/app/views/team_people/index.html.erb @@ -0,0 +1,29 @@ +

<%= notice %>

+ +

Team People

+ + + + + + + + + + + + <% @team_people.each do |team_person| %> + + + + + + + + <% end %> + +
PersonTeam
<%= team_person.person_id %><%= team_person.team_id %><%= link_to 'Show', team_person %><%= link_to 'Edit', edit_team_person_path(team_person) %><%= link_to 'Destroy', team_person, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Team Person', new_team_person_path %> diff --git a/Team-Manager/app/views/team_people/index.json.jbuilder b/Team-Manager/app/views/team_people/index.json.jbuilder new file mode 100644 index 0000000..3d99fb9 --- /dev/null +++ b/Team-Manager/app/views/team_people/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @team_people, partial: 'team_people/team_person', as: :team_person \ No newline at end of file diff --git a/Team-Manager/app/views/team_people/new.html.erb b/Team-Manager/app/views/team_people/new.html.erb new file mode 100644 index 0000000..cbd5817 --- /dev/null +++ b/Team-Manager/app/views/team_people/new.html.erb @@ -0,0 +1,5 @@ +

New Team Person

+ +<%= render 'form', team_person: @team_person %> + +<%= link_to 'Back', team_people_path %> diff --git a/Team-Manager/app/views/team_people/show.html.erb b/Team-Manager/app/views/team_people/show.html.erb new file mode 100644 index 0000000..105b7d5 --- /dev/null +++ b/Team-Manager/app/views/team_people/show.html.erb @@ -0,0 +1,14 @@ +

<%= notice %>

+ +

+ Person: + <%= @team_person.person_id %> +

+ +

+ Team: + <%= @team_person.team_id %> +

+ +<%= link_to 'Edit', edit_team_person_path(@team_person) %> | +<%= link_to 'Back', team_people_path %> diff --git a/Team-Manager/app/views/team_people/show.json.jbuilder b/Team-Manager/app/views/team_people/show.json.jbuilder new file mode 100644 index 0000000..91a856f --- /dev/null +++ b/Team-Manager/app/views/team_people/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "team_people/team_person", team_person: @team_person \ No newline at end of file diff --git a/Team-Manager/app/views/teams/_form.html.erb b/Team-Manager/app/views/teams/_form.html.erb new file mode 100644 index 0000000..14e8e1d --- /dev/null +++ b/Team-Manager/app/views/teams/_form.html.erb @@ -0,0 +1,42 @@ +<%= form_for(team) do |f| %> + <% if team.errors.any? %> +
+

<%= pluralize(team.errors.count, "error") %> prohibited this team from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :team_id %> + <%= f.number_field :team_id %> +
+ +
+ <%= f.label :organization_id %> + <%= f.number_field :organization_id %> +
+ +
+ <%= f.label :team_name %> + <%= f.text_field :team_name %> +
+ +
+ <%= f.label :competitive %> + <%= f.check_box :competitive %> +
+ +
+ <%= f.label :age_group %> + <%= f.text_field :age_group %> +
+ +
+ <%= f.submit %> +
+<% end %> diff --git a/Team-Manager/app/views/teams/_team.json.jbuilder b/Team-Manager/app/views/teams/_team.json.jbuilder new file mode 100644 index 0000000..778e866 --- /dev/null +++ b/Team-Manager/app/views/teams/_team.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! team, :id, :team_id, :organization_id, :team_name, :competitive, :age_group, :created_at, :updated_at +json.url team_url(team, format: :json) \ No newline at end of file diff --git a/Team-Manager/app/views/teams/edit.html.erb b/Team-Manager/app/views/teams/edit.html.erb new file mode 100644 index 0000000..3df4bd5 --- /dev/null +++ b/Team-Manager/app/views/teams/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Team

+ +<%= render 'form', team: @team %> + +<%= link_to 'Show', @team %> | +<%= link_to 'Back', teams_path %> diff --git a/Team-Manager/app/views/teams/index.html.erb b/Team-Manager/app/views/teams/index.html.erb new file mode 100644 index 0000000..adcc656 --- /dev/null +++ b/Team-Manager/app/views/teams/index.html.erb @@ -0,0 +1,35 @@ +

<%= notice %>

+ +

Teams

+ + + + + + + + + + + + + + + <% @teams.each do |team| %> + + + + + + + + + + + <% end %> + +
TeamOrganizationTeam nameCompetitiveAge group
<%= team.team_id %><%= team.organization_id %><%= team.team_name %><%= team.competitive %><%= team.age_group %><%= link_to 'Show', team %><%= link_to 'Edit', edit_team_path(team) %><%= link_to 'Destroy', team, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Team', new_team_path %> diff --git a/Team-Manager/app/views/teams/index.json.jbuilder b/Team-Manager/app/views/teams/index.json.jbuilder new file mode 100644 index 0000000..3a38e1b --- /dev/null +++ b/Team-Manager/app/views/teams/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @teams, partial: 'teams/team', as: :team \ No newline at end of file diff --git a/Team-Manager/app/views/teams/new.html.erb b/Team-Manager/app/views/teams/new.html.erb new file mode 100644 index 0000000..4c4f21b --- /dev/null +++ b/Team-Manager/app/views/teams/new.html.erb @@ -0,0 +1,5 @@ +

New Team

+ +<%= render 'form', team: @team %> + +<%= link_to 'Back', teams_path %> diff --git a/Team-Manager/app/views/teams/show.html.erb b/Team-Manager/app/views/teams/show.html.erb new file mode 100644 index 0000000..b5b69dc --- /dev/null +++ b/Team-Manager/app/views/teams/show.html.erb @@ -0,0 +1,29 @@ +

<%= notice %>

+ +

+ Team: + <%= @team.team_id %> +

+ +

+ Organization: + <%= @team.organization_id %> +

+ +

+ Team name: + <%= @team.team_name %> +

+ +

+ Competitive: + <%= @team.competitive %> +

+ +

+ Age group: + <%= @team.age_group %> +

+ +<%= link_to 'Edit', edit_team_path(@team) %> | +<%= link_to 'Back', teams_path %> diff --git a/Team-Manager/app/views/teams/show.json.jbuilder b/Team-Manager/app/views/teams/show.json.jbuilder new file mode 100644 index 0000000..8a3edb3 --- /dev/null +++ b/Team-Manager/app/views/teams/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "teams/team", team: @team \ No newline at end of file diff --git a/Team-Manager/bin/bundle b/Team-Manager/bin/bundle new file mode 100755 index 0000000..66e9889 --- /dev/null +++ b/Team-Manager/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +load Gem.bin_path('bundler', 'bundle') diff --git a/Team-Manager/bin/rails b/Team-Manager/bin/rails new file mode 100755 index 0000000..5badb2f --- /dev/null +++ b/Team-Manager/bin/rails @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +APP_PATH = File.expand_path('../config/application', __dir__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/Team-Manager/bin/rake b/Team-Manager/bin/rake new file mode 100755 index 0000000..d87d5f5 --- /dev/null +++ b/Team-Manager/bin/rake @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/Team-Manager/bin/setup b/Team-Manager/bin/setup new file mode 100755 index 0000000..e620b4d --- /dev/null +++ b/Team-Manager/bin/setup @@ -0,0 +1,34 @@ +#!/usr/bin/env ruby +require 'pathname' +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a starting point to setup your application. + # Add necessary setup steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + # puts "\n== Copying sample files ==" + # unless File.exist?('config/database.yml') + # cp 'config/database.yml.sample', 'config/database.yml' + # end + + puts "\n== Preparing database ==" + system! 'bin/rails db:setup' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/Team-Manager/bin/spring b/Team-Manager/bin/spring new file mode 100755 index 0000000..7fe232c --- /dev/null +++ b/Team-Manager/bin/spring @@ -0,0 +1,15 @@ +#!/usr/bin/env ruby + +# This file loads spring without using Bundler, in order to be fast. +# It gets overwritten when you run the `spring binstub` command. + +unless defined?(Spring) + require 'rubygems' + require 'bundler' + + if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)) + Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) } + gem 'spring', match[1] + require 'spring/binstub' + end +end diff --git a/Team-Manager/bin/update b/Team-Manager/bin/update new file mode 100755 index 0000000..a8e4462 --- /dev/null +++ b/Team-Manager/bin/update @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +require 'pathname' +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a way to update your development environment automatically. + # Add necessary update steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + puts "\n== Updating database ==" + system! 'bin/rails db:migrate' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/Team-Manager/config.ru b/Team-Manager/config.ru new file mode 100644 index 0000000..f7ba0b5 --- /dev/null +++ b/Team-Manager/config.ru @@ -0,0 +1,5 @@ +# This file is used by Rack-based servers to start the application. + +require_relative 'config/environment' + +run Rails.application diff --git a/Team-Manager/config/application.rb b/Team-Manager/config/application.rb new file mode 100644 index 0000000..ab236a2 --- /dev/null +++ b/Team-Manager/config/application.rb @@ -0,0 +1,15 @@ +require_relative 'boot' + +require 'rails/all' + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) + +module TeamManager + class Application < Rails::Application + # Settings in config/environments/* take precedence over those specified here. + # Application configuration should go into files in config/initializers + # -- all .rb files in that directory are automatically loaded. + end +end diff --git a/Team-Manager/config/boot.rb b/Team-Manager/config/boot.rb new file mode 100644 index 0000000..30f5120 --- /dev/null +++ b/Team-Manager/config/boot.rb @@ -0,0 +1,3 @@ +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) + +require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/Team-Manager/config/cable.yml b/Team-Manager/config/cable.yml new file mode 100644 index 0000000..0bbde6f --- /dev/null +++ b/Team-Manager/config/cable.yml @@ -0,0 +1,9 @@ +development: + adapter: async + +test: + adapter: async + +production: + adapter: redis + url: redis://localhost:6379/1 diff --git a/Team-Manager/config/database.yml b/Team-Manager/config/database.yml new file mode 100644 index 0000000..1c1a37c --- /dev/null +++ b/Team-Manager/config/database.yml @@ -0,0 +1,25 @@ +# SQLite version 3.x +# gem install sqlite3 +# +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem 'sqlite3' +# +default: &default + adapter: sqlite3 + pool: 5 + timeout: 5000 + +development: + <<: *default + database: db/development.sqlite3 + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: db/test.sqlite3 + +production: + <<: *default + database: db/production.sqlite3 diff --git a/Team-Manager/config/environment.rb b/Team-Manager/config/environment.rb new file mode 100644 index 0000000..426333b --- /dev/null +++ b/Team-Manager/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative 'application' + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/Team-Manager/config/environments/development.rb b/Team-Manager/config/environments/development.rb new file mode 100644 index 0000000..6f71970 --- /dev/null +++ b/Team-Manager/config/environments/development.rb @@ -0,0 +1,54 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded on + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable/disable caching. By default caching is disabled. + if Rails.root.join('tmp/caching-dev.txt').exist? + config.action_controller.perform_caching = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + 'Cache-Control' => 'public, max-age=172800' + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + config.action_mailer.perform_caching = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. + config.assets.debug = true + + # Suppress logger output for asset requests. + config.assets.quiet = true + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true + + # Use an evented file watcher to asynchronously detect changes in source code, + # routes, locales, etc. This feature depends on the listen gem. + config.file_watcher = ActiveSupport::EventedFileUpdateChecker +end diff --git a/Team-Manager/config/environments/production.rb b/Team-Manager/config/environments/production.rb new file mode 100644 index 0000000..095a656 --- /dev/null +++ b/Team-Manager/config/environments/production.rb @@ -0,0 +1,86 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass + + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = 'http://assets.example.com' + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + + # Mount Action Cable outside main process or domain + # config.action_cable.mount_path = nil + # config.action_cable.url = 'wss://example.com/cable' + # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. + config.log_level = :debug + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Use a real queuing backend for Active Job (and separate queues per environment) + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "Team-Manager_#{Rails.env}" + config.action_mailer.perform_caching = false + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Send deprecation notices to registered listeners. + config.active_support.deprecation = :notify + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Use a different logger for distributed setups. + # require 'syslog/logger' + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') + + if ENV["RAILS_LOG_TO_STDOUT"].present? + logger = ActiveSupport::Logger.new(STDOUT) + logger.formatter = config.log_formatter + config.logger = ActiveSupport::TaggedLogging.new(logger) + end + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false +end diff --git a/Team-Manager/config/environments/test.rb b/Team-Manager/config/environments/test.rb new file mode 100644 index 0000000..30587ef --- /dev/null +++ b/Team-Manager/config/environments/test.rb @@ -0,0 +1,42 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # The test environment is used exclusively to run your application's + # test suite. You never need to work with it otherwise. Remember that + # your test database is "scratch space" for the test suite and is wiped + # and recreated between test runs. Don't rely on the data there! + config.cache_classes = true + + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + 'Cache-Control' => 'public, max-age=3600' + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + config.action_mailer.perform_caching = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true +end diff --git a/Team-Manager/config/initializers/application_controller_renderer.rb b/Team-Manager/config/initializers/application_controller_renderer.rb new file mode 100644 index 0000000..51639b6 --- /dev/null +++ b/Team-Manager/config/initializers/application_controller_renderer.rb @@ -0,0 +1,6 @@ +# Be sure to restart your server when you modify this file. + +# ApplicationController.renderer.defaults.merge!( +# http_host: 'example.org', +# https: false +# ) diff --git a/Team-Manager/config/initializers/assets.rb b/Team-Manager/config/initializers/assets.rb new file mode 100644 index 0000000..01ef3e6 --- /dev/null +++ b/Team-Manager/config/initializers/assets.rb @@ -0,0 +1,11 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = '1.0' + +# Add additional assets to the asset load path +# Rails.application.config.assets.paths << Emoji.images_path + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. +# Rails.application.config.assets.precompile += %w( search.js ) diff --git a/Team-Manager/config/initializers/backtrace_silencers.rb b/Team-Manager/config/initializers/backtrace_silencers.rb new file mode 100644 index 0000000..59385cd --- /dev/null +++ b/Team-Manager/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } + +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. +# Rails.backtrace_cleaner.remove_silencers! diff --git a/Team-Manager/config/initializers/cookies_serializer.rb b/Team-Manager/config/initializers/cookies_serializer.rb new file mode 100644 index 0000000..5a6a32d --- /dev/null +++ b/Team-Manager/config/initializers/cookies_serializer.rb @@ -0,0 +1,5 @@ +# Be sure to restart your server when you modify this file. + +# Specify a serializer for the signed and encrypted cookie jars. +# Valid options are :json, :marshal, and :hybrid. +Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/Team-Manager/config/initializers/filter_parameter_logging.rb b/Team-Manager/config/initializers/filter_parameter_logging.rb new file mode 100644 index 0000000..4a994e1 --- /dev/null +++ b/Team-Manager/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/Team-Manager/config/initializers/inflections.rb b/Team-Manager/config/initializers/inflections.rb new file mode 100644 index 0000000..ac033bf --- /dev/null +++ b/Team-Manager/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1en' +# inflect.singular /^(ox)en/i, '\1' +# inflect.irregular 'person', 'people' +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym 'RESTful' +# end diff --git a/Team-Manager/config/initializers/mime_types.rb b/Team-Manager/config/initializers/mime_types.rb new file mode 100644 index 0000000..dc18996 --- /dev/null +++ b/Team-Manager/config/initializers/mime_types.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Add new mime types for use in respond_to blocks: +# Mime::Type.register "text/richtext", :rtf diff --git a/Team-Manager/config/initializers/new_framework_defaults.rb b/Team-Manager/config/initializers/new_framework_defaults.rb new file mode 100644 index 0000000..0706caf --- /dev/null +++ b/Team-Manager/config/initializers/new_framework_defaults.rb @@ -0,0 +1,24 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 5.0 upgrade. +# +# Read the Rails 5.0 release notes for more info on each option. + +# Enable per-form CSRF tokens. Previous versions had false. +Rails.application.config.action_controller.per_form_csrf_tokens = true + +# Enable origin-checking CSRF mitigation. Previous versions had false. +Rails.application.config.action_controller.forgery_protection_origin_check = true + +# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. +# Previous versions had false. +ActiveSupport.to_time_preserves_timezone = true + +# Require `belongs_to` associations by default. Previous versions had false. +Rails.application.config.active_record.belongs_to_required_by_default = true + +# Do not halt callback chains when a callback returns false. Previous versions had true. +ActiveSupport.halt_callback_chains_on_return_false = false + +# Configure SSL options to enable HSTS with subdomains. Previous versions had false. +Rails.application.config.ssl_options = { hsts: { subdomains: true } } diff --git a/Team-Manager/config/initializers/session_store.rb b/Team-Manager/config/initializers/session_store.rb new file mode 100644 index 0000000..3453602 --- /dev/null +++ b/Team-Manager/config/initializers/session_store.rb @@ -0,0 +1,3 @@ +# Be sure to restart your server when you modify this file. + +Rails.application.config.session_store :cookie_store, key: '_Team-Manager_session' diff --git a/Team-Manager/config/initializers/wrap_parameters.rb b/Team-Manager/config/initializers/wrap_parameters.rb new file mode 100644 index 0000000..bbfc396 --- /dev/null +++ b/Team-Manager/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. + +# This file contains settings for ActionController::ParamsWrapper which +# is enabled by default. + +# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +ActiveSupport.on_load(:action_controller) do + wrap_parameters format: [:json] +end + +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/Team-Manager/config/locales/en.yml b/Team-Manager/config/locales/en.yml new file mode 100644 index 0000000..0653957 --- /dev/null +++ b/Team-Manager/config/locales/en.yml @@ -0,0 +1,23 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t 'hello' +# +# In views, this is aliased to just `t`: +# +# <%= t('hello') %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# To learn more, please read the Rails Internationalization guide +# available at http://guides.rubyonrails.org/i18n.html. + +en: + hello: "Hello world" diff --git a/Team-Manager/config/puma.rb b/Team-Manager/config/puma.rb new file mode 100644 index 0000000..c7f311f --- /dev/null +++ b/Team-Manager/config/puma.rb @@ -0,0 +1,47 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum, this matches the default thread size of Active Record. +# +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests, default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked webserver processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. If you use this option +# you need to make sure to reconnect any threads in the `on_worker_boot` +# block. +# +# preload_app! + +# The code in the `on_worker_boot` will be called if you are using +# clustered mode by specifying a number of `workers`. After each worker +# process is booted this block will be run, if you are using `preload_app!` +# option you will want to use this block to reconnect to any threads +# or connections that may have been created at application boot, Ruby +# cannot share connections between processes. +# +# on_worker_boot do +# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) +# end + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart diff --git a/Team-Manager/config/routes.rb b/Team-Manager/config/routes.rb new file mode 100644 index 0000000..e236de6 --- /dev/null +++ b/Team-Manager/config/routes.rb @@ -0,0 +1,18 @@ +Rails.application.routes.draw do + resources :phone_numbers + resources :emails + resources :people + resources :certifications + resources :parent_children + resources :event_property_maps + resources :event_types + resources :events + resources :organizations + resources :organization_teams + resources :teams + resources :player_statistics + resources :coaches + resources :players + resources :team_people + # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html +end diff --git a/Team-Manager/config/secrets.yml b/Team-Manager/config/secrets.yml new file mode 100644 index 0000000..50515fc --- /dev/null +++ b/Team-Manager/config/secrets.yml @@ -0,0 +1,22 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key is used for verifying the integrity of signed cookies. +# If you change this key, all old signed cookies will become invalid! + +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +# You can use `rails secret` to generate a secure secret key. + +# Make sure the secrets in this file are kept private +# if you're sharing your code publicly. + +development: + secret_key_base: c2d973a312a70becaeb33fae9698efdbb2472a55ae7e5530898f775963cd38fdee762ad171e80c983ab000e4f4e8d1ca3b16783b29f411c2ae08d58584a7b43b + +test: + secret_key_base: 88e13135f1589688d428975f49c2c4a2f788cbcdbdd698ba19e684023a90e5f8f7fff5e5fe41c9456d46d2e528c45176685df2ae9a266c67b230a6a61fe2d672 + +# Do not keep production secrets in the repository, +# instead read values from the environment. +production: + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/Team-Manager/config/spring.rb b/Team-Manager/config/spring.rb new file mode 100644 index 0000000..c9119b4 --- /dev/null +++ b/Team-Manager/config/spring.rb @@ -0,0 +1,6 @@ +%w( + .ruby-version + .rbenv-vars + tmp/restart.txt + tmp/caching-dev.txt +).each { |path| Spring.watch(path) } diff --git a/Team-Manager/db/migrate/20160926050909_create_people.rb b/Team-Manager/db/migrate/20160926050909_create_people.rb new file mode 100644 index 0000000..8ab8f84 --- /dev/null +++ b/Team-Manager/db/migrate/20160926050909_create_people.rb @@ -0,0 +1,22 @@ +class CreatePeople < ActiveRecord::Migration[5.0] + def change + create_table :people do |t| + t.string :first_name + t.string :last_name + t.string :addr_route + t.string :addr_city + t.string :addr_state + t.integer :addr_zip + t.string :username + t.string :pass_hash + t.string :pass_salt + t.text :bio + t.date :birth_date + t.string :gender + t.integer :height_in_inches + t.integer :weight_in_pounds + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160926051852_create_phone_numbers.rb b/Team-Manager/db/migrate/20160926051852_create_phone_numbers.rb new file mode 100644 index 0000000..d34b52a --- /dev/null +++ b/Team-Manager/db/migrate/20160926051852_create_phone_numbers.rb @@ -0,0 +1,10 @@ +class CreatePhoneNumbers < ActiveRecord::Migration[5.0] + def change + create_table :phone_numbers do |t| + t.string :phone + t.references :person_id, foreign_key: true + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160926051936_create_emails.rb b/Team-Manager/db/migrate/20160926051936_create_emails.rb new file mode 100644 index 0000000..da76119 --- /dev/null +++ b/Team-Manager/db/migrate/20160926051936_create_emails.rb @@ -0,0 +1,10 @@ +class CreateEmails < ActiveRecord::Migration[5.0] + def change + create_table :emails do |t| + t.string :email + t.references :person_id, foreign_key: true + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160926053714_create_phone_numbers.rb b/Team-Manager/db/migrate/20160926053714_create_phone_numbers.rb new file mode 100644 index 0000000..d34b52a --- /dev/null +++ b/Team-Manager/db/migrate/20160926053714_create_phone_numbers.rb @@ -0,0 +1,10 @@ +class CreatePhoneNumbers < ActiveRecord::Migration[5.0] + def change + create_table :phone_numbers do |t| + t.string :phone + t.references :person_id, foreign_key: true + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160926053723_create_emails.rb b/Team-Manager/db/migrate/20160926053723_create_emails.rb new file mode 100644 index 0000000..da76119 --- /dev/null +++ b/Team-Manager/db/migrate/20160926053723_create_emails.rb @@ -0,0 +1,10 @@ +class CreateEmails < ActiveRecord::Migration[5.0] + def change + create_table :emails do |t| + t.string :email + t.references :person_id, foreign_key: true + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160926053732_create_team_people.rb b/Team-Manager/db/migrate/20160926053732_create_team_people.rb new file mode 100644 index 0000000..135d2b7 --- /dev/null +++ b/Team-Manager/db/migrate/20160926053732_create_team_people.rb @@ -0,0 +1,10 @@ +class CreateTeamPeople < ActiveRecord::Migration[5.0] + def change + create_table :team_people do |t| + t.references :person_id, foreign_key: true + t.references :team_id, foreign_key: true + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160926053806_create_people.rb b/Team-Manager/db/migrate/20160926053806_create_people.rb new file mode 100644 index 0000000..b78c435 --- /dev/null +++ b/Team-Manager/db/migrate/20160926053806_create_people.rb @@ -0,0 +1,23 @@ +class CreatePeople < ActiveRecord::Migration[5.0] + def change + create_table :people do |t| + t.string :first_name + t.string :last_name + t.string :addr_route + t.string :addr_city + t.string :addr_state + t.integer :addr_zip + t.string :username + t.string :pass_hash + t.string :pass_salt + t.text :bio + t.date :birth_date + t.string :gender + t.integer :height_in_inches + t.integer :weight_in_pounds + t.string :shoe_size + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160926053858_create_players.rb b/Team-Manager/db/migrate/20160926053858_create_players.rb new file mode 100644 index 0000000..1b3ac1b --- /dev/null +++ b/Team-Manager/db/migrate/20160926053858_create_players.rb @@ -0,0 +1,12 @@ +class CreatePlayers < ActiveRecord::Migration[5.0] + def change + create_table :players do |t| + t.references :player_coach_id, foreign_key: true + t.integer :player_jersey_id + t.date :team_join_date + t.date :team_left_date + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927021433_create_coaches.rb b/Team-Manager/db/migrate/20160927021433_create_coaches.rb new file mode 100644 index 0000000..40718e4 --- /dev/null +++ b/Team-Manager/db/migrate/20160927021433_create_coaches.rb @@ -0,0 +1,13 @@ +class CreateCoaches < ActiveRecord::Migration[5.0] + def change + create_table :coaches do |t| + t.references :person_id, foreign_key: true + t.string :coach_type + t.date :coach_year_began + t.date :coach_year_ended + t.integer :coach_id + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927021915_create_player_statistics.rb b/Team-Manager/db/migrate/20160927021915_create_player_statistics.rb new file mode 100644 index 0000000..0a7c056 --- /dev/null +++ b/Team-Manager/db/migrate/20160927021915_create_player_statistics.rb @@ -0,0 +1,13 @@ +class CreatePlayerStatistics < ActiveRecord::Migration[5.0] + def change + create_table :player_statistics do |t| + t.references :player_id, foreign_key: true + t.string :statistic_type + t.string :statistic_value + t.date :date_recorded + t.integer :stat_id + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927022930_create_teams.rb b/Team-Manager/db/migrate/20160927022930_create_teams.rb new file mode 100644 index 0000000..8dafe59 --- /dev/null +++ b/Team-Manager/db/migrate/20160927022930_create_teams.rb @@ -0,0 +1,13 @@ +class CreateTeams < ActiveRecord::Migration[5.0] + def change + create_table :teams do |t| + t.integer :team_id + t.integer :organization_id + t.string :team_name + t.boolean :competitive + t.string :age_group + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927023204_create_people.rb b/Team-Manager/db/migrate/20160927023204_create_people.rb new file mode 100644 index 0000000..d2dd4f5 --- /dev/null +++ b/Team-Manager/db/migrate/20160927023204_create_people.rb @@ -0,0 +1,24 @@ +class CreatePeople < ActiveRecord::Migration[5.0] + def change + create_table :people do |t| + t.integer :person_id + t.string :first_name + t.string :last_name + t.string :addr_route + t.string :addr_city + t.string :addr_state + t.integer :addr_zip + t.string :username + t.string :pass_hash + t.string :pass_salt + t.text :bio + t.date :birth_date + t.string :gender + t.integer :height_in_inches + t.integer :weight_in_pounds + t.string :shoe_size + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927023500_create_organization_teams.rb b/Team-Manager/db/migrate/20160927023500_create_organization_teams.rb new file mode 100644 index 0000000..c71a310 --- /dev/null +++ b/Team-Manager/db/migrate/20160927023500_create_organization_teams.rb @@ -0,0 +1,10 @@ +class CreateOrganizationTeams < ActiveRecord::Migration[5.0] + def change + create_table :organization_teams do |t| + t.references :organization_id, foreign_key: true + t.references :team_id, foreign_key: true + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927023816_create_organizations.rb b/Team-Manager/db/migrate/20160927023816_create_organizations.rb new file mode 100644 index 0000000..b3136b3 --- /dev/null +++ b/Team-Manager/db/migrate/20160927023816_create_organizations.rb @@ -0,0 +1,10 @@ +class CreateOrganizations < ActiveRecord::Migration[5.0] + def change + create_table :organizations do |t| + t.integer :organization_id + t.string :name + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927024414_create_events.rb b/Team-Manager/db/migrate/20160927024414_create_events.rb new file mode 100644 index 0000000..937b4fb --- /dev/null +++ b/Team-Manager/db/migrate/20160927024414_create_events.rb @@ -0,0 +1,14 @@ +class CreateEvents < ActiveRecord::Migration[5.0] + def change + create_table :events do |t| + t.integer :event_id + t.references :event_type, foreign_key: true + t.date :event_datetime + t.references :team_id, foreign_key: true + t.integer :created_by + t.boolean :open_to_public + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927024645_create_event_types.rb b/Team-Manager/db/migrate/20160927024645_create_event_types.rb new file mode 100644 index 0000000..7700b59 --- /dev/null +++ b/Team-Manager/db/migrate/20160927024645_create_event_types.rb @@ -0,0 +1,10 @@ +class CreateEventTypes < ActiveRecord::Migration[5.0] + def change + create_table :event_types do |t| + t.integer :event_type_id + t.string :type_description + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927024802_create_event_property_maps.rb b/Team-Manager/db/migrate/20160927024802_create_event_property_maps.rb new file mode 100644 index 0000000..aea45d4 --- /dev/null +++ b/Team-Manager/db/migrate/20160927024802_create_event_property_maps.rb @@ -0,0 +1,11 @@ +class CreateEventPropertyMaps < ActiveRecord::Migration[5.0] + def change + create_table :event_property_maps do |t| + t.references :event_id, foreign_key: true + t.string :key + t.string :value + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927025028_create_parent_children.rb b/Team-Manager/db/migrate/20160927025028_create_parent_children.rb new file mode 100644 index 0000000..a037931 --- /dev/null +++ b/Team-Manager/db/migrate/20160927025028_create_parent_children.rb @@ -0,0 +1,10 @@ +class CreateParentChildren < ActiveRecord::Migration[5.0] + def change + create_table :parent_children do |t| + t.references :parent_id, foreign_key: true + t.references :child_id, foreign_key: true + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927025116_create_certifications.rb b/Team-Manager/db/migrate/20160927025116_create_certifications.rb new file mode 100644 index 0000000..7412367 --- /dev/null +++ b/Team-Manager/db/migrate/20160927025116_create_certifications.rb @@ -0,0 +1,12 @@ +class CreateCertifications < ActiveRecord::Migration[5.0] + def change + create_table :certifications do |t| + t.references :person_id, foreign_key: true + t.string :certification_name + t.date :expiration_date + t.body :note + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927030105_create_certifications.rb b/Team-Manager/db/migrate/20160927030105_create_certifications.rb new file mode 100644 index 0000000..628cc12 --- /dev/null +++ b/Team-Manager/db/migrate/20160927030105_create_certifications.rb @@ -0,0 +1,12 @@ +class CreateCertifications < ActiveRecord::Migration[5.0] + def change + create_table :certifications do |t| + t.references :person_id, foreign_key: true + t.string :certification_name + t.date :expiration_date + t.text :note + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927032106_create_people.rb b/Team-Manager/db/migrate/20160927032106_create_people.rb new file mode 100644 index 0000000..b78c435 --- /dev/null +++ b/Team-Manager/db/migrate/20160927032106_create_people.rb @@ -0,0 +1,23 @@ +class CreatePeople < ActiveRecord::Migration[5.0] + def change + create_table :people do |t| + t.string :first_name + t.string :last_name + t.string :addr_route + t.string :addr_city + t.string :addr_state + t.integer :addr_zip + t.string :username + t.string :pass_hash + t.string :pass_salt + t.text :bio + t.date :birth_date + t.string :gender + t.integer :height_in_inches + t.integer :weight_in_pounds + t.string :shoe_size + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927034853_create_emails.rb b/Team-Manager/db/migrate/20160927034853_create_emails.rb new file mode 100644 index 0000000..d5f5d04 --- /dev/null +++ b/Team-Manager/db/migrate/20160927034853_create_emails.rb @@ -0,0 +1,10 @@ +class CreateEmails < ActiveRecord::Migration[5.0] + def change + create_table :emails do |t| + t.string :email + t.references :person, foreign_key: true + + t.timestamps + end + end +end diff --git a/Team-Manager/db/migrate/20160927035528_create_phone_numbers.rb b/Team-Manager/db/migrate/20160927035528_create_phone_numbers.rb new file mode 100644 index 0000000..93dc0fa --- /dev/null +++ b/Team-Manager/db/migrate/20160927035528_create_phone_numbers.rb @@ -0,0 +1,10 @@ +class CreatePhoneNumbers < ActiveRecord::Migration[5.0] + def change + create_table :phone_numbers do |t| + t.string :phone + t.references :person, foreign_key: true + + t.timestamps + end + end +end diff --git a/Team-Manager/db/schema.rb b/Team-Manager/db/schema.rb new file mode 100644 index 0000000..a8a1057 --- /dev/null +++ b/Team-Manager/db/schema.rb @@ -0,0 +1,166 @@ +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 20160927035528) do + + create_table "certifications", force: :cascade do |t| + t.integer "person_id_id" + t.string "certification_name" + t.date "expiration_date" + t.text "note" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["person_id_id"], name: "index_certifications_on_person_id_id" + end + + create_table "coaches", force: :cascade do |t| + t.integer "person_id_id" + t.string "coach_type" + t.date "coach_year_began" + t.date "coach_year_ended" + t.integer "coach_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["person_id_id"], name: "index_coaches_on_person_id_id" + end + + create_table "emails", force: :cascade do |t| + t.string "email" + t.integer "person_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["person_id"], name: "index_emails_on_person_id" + end + + create_table "event_property_maps", force: :cascade do |t| + t.integer "event_id_id" + t.string "key" + t.string "value" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["event_id_id"], name: "index_event_property_maps_on_event_id_id" + end + + create_table "event_types", force: :cascade do |t| + t.integer "event_type_id" + t.string "type_description" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "events", force: :cascade do |t| + t.integer "event_id" + t.integer "event_type_id" + t.date "event_datetime" + t.integer "team_id_id" + t.integer "created_by" + t.boolean "open_to_public" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["event_type_id"], name: "index_events_on_event_type_id" + t.index ["team_id_id"], name: "index_events_on_team_id_id" + end + + create_table "organization_teams", force: :cascade do |t| + t.integer "organization_id_id" + t.integer "team_id_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["organization_id_id"], name: "index_organization_teams_on_organization_id_id" + t.index ["team_id_id"], name: "index_organization_teams_on_team_id_id" + end + + create_table "organizations", force: :cascade do |t| + t.integer "organization_id" + t.string "name" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "parent_children", force: :cascade do |t| + t.integer "parent_id_id" + t.integer "child_id_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["child_id_id"], name: "index_parent_children_on_child_id_id" + t.index ["parent_id_id"], name: "index_parent_children_on_parent_id_id" + end + + create_table "people", force: :cascade do |t| + t.string "first_name" + t.string "last_name" + t.string "addr_route" + t.string "addr_city" + t.string "addr_state" + t.integer "addr_zip" + t.string "username" + t.string "pass_hash" + t.string "pass_salt" + t.text "bio" + t.date "birth_date" + t.string "gender" + t.integer "height_in_inches" + t.integer "weight_in_pounds" + t.string "shoe_size" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "phone_numbers", force: :cascade do |t| + t.string "phone" + t.integer "person_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["person_id"], name: "index_phone_numbers_on_person_id" + end + + create_table "player_statistics", force: :cascade do |t| + t.integer "player_id_id" + t.string "statistic_type" + t.string "statistic_value" + t.date "date_recorded" + t.integer "stat_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["player_id_id"], name: "index_player_statistics_on_player_id_id" + end + + create_table "players", force: :cascade do |t| + t.integer "player_coach_id_id" + t.integer "player_jersey_id" + t.date "team_join_date" + t.date "team_left_date" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["player_coach_id_id"], name: "index_players_on_player_coach_id_id" + end + + create_table "team_people", force: :cascade do |t| + t.integer "person_id_id" + t.integer "team_id_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["person_id_id"], name: "index_team_people_on_person_id_id" + t.index ["team_id_id"], name: "index_team_people_on_team_id_id" + end + + create_table "teams", force: :cascade do |t| + t.integer "team_id" + t.integer "organization_id" + t.string "team_name" + t.boolean "competitive" + t.string "age_group" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + +end diff --git a/Team-Manager/db/seeds.rb b/Team-Manager/db/seeds.rb new file mode 100644 index 0000000..1beea2a --- /dev/null +++ b/Team-Manager/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). +# +# Examples: +# +# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) +# Character.create(name: 'Luke', movie: movies.first) diff --git a/Team-Manager/lib/assets/.keep b/Team-Manager/lib/assets/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/lib/tasks/.keep b/Team-Manager/lib/tasks/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/log/.keep b/Team-Manager/log/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/public/404.html b/Team-Manager/public/404.html new file mode 100644 index 0000000..b612547 --- /dev/null +++ b/Team-Manager/public/404.html @@ -0,0 +1,67 @@ + + + + The page you were looking for doesn't exist (404) + + + + + + +
+
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/Team-Manager/public/422.html b/Team-Manager/public/422.html new file mode 100644 index 0000000..a21f82b --- /dev/null +++ b/Team-Manager/public/422.html @@ -0,0 +1,67 @@ + + + + The change you wanted was rejected (422) + + + + + + +
+
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/Team-Manager/public/500.html b/Team-Manager/public/500.html new file mode 100644 index 0000000..061abc5 --- /dev/null +++ b/Team-Manager/public/500.html @@ -0,0 +1,66 @@ + + + + We're sorry, but something went wrong (500) + + + + + + +
+
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/Team-Manager/public/apple-touch-icon-precomposed.png b/Team-Manager/public/apple-touch-icon-precomposed.png new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/public/apple-touch-icon.png b/Team-Manager/public/apple-touch-icon.png new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/public/favicon.ico b/Team-Manager/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/public/robots.txt b/Team-Manager/public/robots.txt new file mode 100644 index 0000000..3c9c7c0 --- /dev/null +++ b/Team-Manager/public/robots.txt @@ -0,0 +1,5 @@ +# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file +# +# To ban all spiders from the entire site uncomment the next two lines: +# User-agent: * +# Disallow: / diff --git a/Team-Manager/test/controllers/.keep b/Team-Manager/test/controllers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/test/controllers/certifications_controller_test.rb b/Team-Manager/test/controllers/certifications_controller_test.rb new file mode 100644 index 0000000..0e24fa2 --- /dev/null +++ b/Team-Manager/test/controllers/certifications_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class CertificationsControllerTest < ActionDispatch::IntegrationTest + setup do + @certification = certifications(:one) + end + + test "should get index" do + get certifications_url + assert_response :success + end + + test "should get new" do + get new_certification_url + assert_response :success + end + + test "should create certification" do + assert_difference('Certification.count') do + post certifications_url, params: { certification: { certification_name: @certification.certification_name, expiration_date: @certification.expiration_date, note: @certification.note, person_id_id: @certification.person_id_id } } + end + + assert_redirected_to certification_url(Certification.last) + end + + test "should show certification" do + get certification_url(@certification) + assert_response :success + end + + test "should get edit" do + get edit_certification_url(@certification) + assert_response :success + end + + test "should update certification" do + patch certification_url(@certification), params: { certification: { certification_name: @certification.certification_name, expiration_date: @certification.expiration_date, note: @certification.note, person_id_id: @certification.person_id_id } } + assert_redirected_to certification_url(@certification) + end + + test "should destroy certification" do + assert_difference('Certification.count', -1) do + delete certification_url(@certification) + end + + assert_redirected_to certifications_url + end +end diff --git a/Team-Manager/test/controllers/coaches_controller_test.rb b/Team-Manager/test/controllers/coaches_controller_test.rb new file mode 100644 index 0000000..f425fd9 --- /dev/null +++ b/Team-Manager/test/controllers/coaches_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class CoachesControllerTest < ActionDispatch::IntegrationTest + setup do + @coach = coaches(:one) + end + + test "should get index" do + get coaches_url + assert_response :success + end + + test "should get new" do + get new_coach_url + assert_response :success + end + + test "should create coach" do + assert_difference('Coach.count') do + post coaches_url, params: { coach: { coach_id: @coach.coach_id, coach_type: @coach.coach_type, coach_year_began: @coach.coach_year_began, coach_year_ended: @coach.coach_year_ended, person_id_id: @coach.person_id_id } } + end + + assert_redirected_to coach_url(Coach.last) + end + + test "should show coach" do + get coach_url(@coach) + assert_response :success + end + + test "should get edit" do + get edit_coach_url(@coach) + assert_response :success + end + + test "should update coach" do + patch coach_url(@coach), params: { coach: { coach_id: @coach.coach_id, coach_type: @coach.coach_type, coach_year_began: @coach.coach_year_began, coach_year_ended: @coach.coach_year_ended, person_id_id: @coach.person_id_id } } + assert_redirected_to coach_url(@coach) + end + + test "should destroy coach" do + assert_difference('Coach.count', -1) do + delete coach_url(@coach) + end + + assert_redirected_to coaches_url + end +end diff --git a/Team-Manager/test/controllers/emails_controller_test.rb b/Team-Manager/test/controllers/emails_controller_test.rb new file mode 100644 index 0000000..0312252 --- /dev/null +++ b/Team-Manager/test/controllers/emails_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class EmailsControllerTest < ActionDispatch::IntegrationTest + setup do + @email = emails(:one) + end + + test "should get index" do + get emails_url + assert_response :success + end + + test "should get new" do + get new_email_url + assert_response :success + end + + test "should create email" do + assert_difference('Email.count') do + post emails_url, params: { email: { email: @email.email, person_id: @email.person_id } } + end + + assert_redirected_to email_url(Email.last) + end + + test "should show email" do + get email_url(@email) + assert_response :success + end + + test "should get edit" do + get edit_email_url(@email) + assert_response :success + end + + test "should update email" do + patch email_url(@email), params: { email: { email: @email.email, person_id: @email.person_id } } + assert_redirected_to email_url(@email) + end + + test "should destroy email" do + assert_difference('Email.count', -1) do + delete email_url(@email) + end + + assert_redirected_to emails_url + end +end diff --git a/Team-Manager/test/controllers/event_property_maps_controller_test.rb b/Team-Manager/test/controllers/event_property_maps_controller_test.rb new file mode 100644 index 0000000..1aa9cdc --- /dev/null +++ b/Team-Manager/test/controllers/event_property_maps_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class EventPropertyMapsControllerTest < ActionDispatch::IntegrationTest + setup do + @event_property_map = event_property_maps(:one) + end + + test "should get index" do + get event_property_maps_url + assert_response :success + end + + test "should get new" do + get new_event_property_map_url + assert_response :success + end + + test "should create event_property_map" do + assert_difference('EventPropertyMap.count') do + post event_property_maps_url, params: { event_property_map: { event_id_id: @event_property_map.event_id_id, key: @event_property_map.key, value: @event_property_map.value } } + end + + assert_redirected_to event_property_map_url(EventPropertyMap.last) + end + + test "should show event_property_map" do + get event_property_map_url(@event_property_map) + assert_response :success + end + + test "should get edit" do + get edit_event_property_map_url(@event_property_map) + assert_response :success + end + + test "should update event_property_map" do + patch event_property_map_url(@event_property_map), params: { event_property_map: { event_id_id: @event_property_map.event_id_id, key: @event_property_map.key, value: @event_property_map.value } } + assert_redirected_to event_property_map_url(@event_property_map) + end + + test "should destroy event_property_map" do + assert_difference('EventPropertyMap.count', -1) do + delete event_property_map_url(@event_property_map) + end + + assert_redirected_to event_property_maps_url + end +end diff --git a/Team-Manager/test/controllers/event_types_controller_test.rb b/Team-Manager/test/controllers/event_types_controller_test.rb new file mode 100644 index 0000000..f64b4e9 --- /dev/null +++ b/Team-Manager/test/controllers/event_types_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class EventTypesControllerTest < ActionDispatch::IntegrationTest + setup do + @event_type = event_types(:one) + end + + test "should get index" do + get event_types_url + assert_response :success + end + + test "should get new" do + get new_event_type_url + assert_response :success + end + + test "should create event_type" do + assert_difference('EventType.count') do + post event_types_url, params: { event_type: { event_type_id: @event_type.event_type_id, type_description: @event_type.type_description } } + end + + assert_redirected_to event_type_url(EventType.last) + end + + test "should show event_type" do + get event_type_url(@event_type) + assert_response :success + end + + test "should get edit" do + get edit_event_type_url(@event_type) + assert_response :success + end + + test "should update event_type" do + patch event_type_url(@event_type), params: { event_type: { event_type_id: @event_type.event_type_id, type_description: @event_type.type_description } } + assert_redirected_to event_type_url(@event_type) + end + + test "should destroy event_type" do + assert_difference('EventType.count', -1) do + delete event_type_url(@event_type) + end + + assert_redirected_to event_types_url + end +end diff --git a/Team-Manager/test/controllers/events_controller_test.rb b/Team-Manager/test/controllers/events_controller_test.rb new file mode 100644 index 0000000..8378e71 --- /dev/null +++ b/Team-Manager/test/controllers/events_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class EventsControllerTest < ActionDispatch::IntegrationTest + setup do + @event = events(:one) + end + + test "should get index" do + get events_url + assert_response :success + end + + test "should get new" do + get new_event_url + assert_response :success + end + + test "should create event" do + assert_difference('Event.count') do + post events_url, params: { event: { created_by: @event.created_by, event_datetime: @event.event_datetime, event_id: @event.event_id, event_type_id: @event.event_type_id, open_to_public: @event.open_to_public, team_id_id: @event.team_id_id } } + end + + assert_redirected_to event_url(Event.last) + end + + test "should show event" do + get event_url(@event) + assert_response :success + end + + test "should get edit" do + get edit_event_url(@event) + assert_response :success + end + + test "should update event" do + patch event_url(@event), params: { event: { created_by: @event.created_by, event_datetime: @event.event_datetime, event_id: @event.event_id, event_type_id: @event.event_type_id, open_to_public: @event.open_to_public, team_id_id: @event.team_id_id } } + assert_redirected_to event_url(@event) + end + + test "should destroy event" do + assert_difference('Event.count', -1) do + delete event_url(@event) + end + + assert_redirected_to events_url + end +end diff --git a/Team-Manager/test/controllers/organization_teams_controller_test.rb b/Team-Manager/test/controllers/organization_teams_controller_test.rb new file mode 100644 index 0000000..6a641a5 --- /dev/null +++ b/Team-Manager/test/controllers/organization_teams_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class OrganizationTeamsControllerTest < ActionDispatch::IntegrationTest + setup do + @organization_team = organization_teams(:one) + end + + test "should get index" do + get organization_teams_url + assert_response :success + end + + test "should get new" do + get new_organization_team_url + assert_response :success + end + + test "should create organization_team" do + assert_difference('OrganizationTeam.count') do + post organization_teams_url, params: { organization_team: { organization_id_id: @organization_team.organization_id_id, team_id_id: @organization_team.team_id_id } } + end + + assert_redirected_to organization_team_url(OrganizationTeam.last) + end + + test "should show organization_team" do + get organization_team_url(@organization_team) + assert_response :success + end + + test "should get edit" do + get edit_organization_team_url(@organization_team) + assert_response :success + end + + test "should update organization_team" do + patch organization_team_url(@organization_team), params: { organization_team: { organization_id_id: @organization_team.organization_id_id, team_id_id: @organization_team.team_id_id } } + assert_redirected_to organization_team_url(@organization_team) + end + + test "should destroy organization_team" do + assert_difference('OrganizationTeam.count', -1) do + delete organization_team_url(@organization_team) + end + + assert_redirected_to organization_teams_url + end +end diff --git a/Team-Manager/test/controllers/organizations_controller_test.rb b/Team-Manager/test/controllers/organizations_controller_test.rb new file mode 100644 index 0000000..8b17476 --- /dev/null +++ b/Team-Manager/test/controllers/organizations_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class OrganizationsControllerTest < ActionDispatch::IntegrationTest + setup do + @organization = organizations(:one) + end + + test "should get index" do + get organizations_url + assert_response :success + end + + test "should get new" do + get new_organization_url + assert_response :success + end + + test "should create organization" do + assert_difference('Organization.count') do + post organizations_url, params: { organization: { name: @organization.name, organization_id: @organization.organization_id } } + end + + assert_redirected_to organization_url(Organization.last) + end + + test "should show organization" do + get organization_url(@organization) + assert_response :success + end + + test "should get edit" do + get edit_organization_url(@organization) + assert_response :success + end + + test "should update organization" do + patch organization_url(@organization), params: { organization: { name: @organization.name, organization_id: @organization.organization_id } } + assert_redirected_to organization_url(@organization) + end + + test "should destroy organization" do + assert_difference('Organization.count', -1) do + delete organization_url(@organization) + end + + assert_redirected_to organizations_url + end +end diff --git a/Team-Manager/test/controllers/parent_children_controller_test.rb b/Team-Manager/test/controllers/parent_children_controller_test.rb new file mode 100644 index 0000000..fa87067 --- /dev/null +++ b/Team-Manager/test/controllers/parent_children_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class ParentChildrenControllerTest < ActionDispatch::IntegrationTest + setup do + @parent_child = parent_children(:one) + end + + test "should get index" do + get parent_children_url + assert_response :success + end + + test "should get new" do + get new_parent_child_url + assert_response :success + end + + test "should create parent_child" do + assert_difference('ParentChild.count') do + post parent_children_url, params: { parent_child: { child_id_id: @parent_child.child_id_id, parent_id_id: @parent_child.parent_id_id } } + end + + assert_redirected_to parent_child_url(ParentChild.last) + end + + test "should show parent_child" do + get parent_child_url(@parent_child) + assert_response :success + end + + test "should get edit" do + get edit_parent_child_url(@parent_child) + assert_response :success + end + + test "should update parent_child" do + patch parent_child_url(@parent_child), params: { parent_child: { child_id_id: @parent_child.child_id_id, parent_id_id: @parent_child.parent_id_id } } + assert_redirected_to parent_child_url(@parent_child) + end + + test "should destroy parent_child" do + assert_difference('ParentChild.count', -1) do + delete parent_child_url(@parent_child) + end + + assert_redirected_to parent_children_url + end +end diff --git a/Team-Manager/test/controllers/people_controller_test.rb b/Team-Manager/test/controllers/people_controller_test.rb new file mode 100644 index 0000000..3d1f22a --- /dev/null +++ b/Team-Manager/test/controllers/people_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class PeopleControllerTest < ActionDispatch::IntegrationTest + setup do + @person = people(:one) + end + + test "should get index" do + get people_url + assert_response :success + end + + test "should get new" do + get new_person_url + assert_response :success + end + + test "should create person" do + assert_difference('Person.count') do + post people_url, params: { person: { addr_city: @person.addr_city, addr_route: @person.addr_route, addr_state: @person.addr_state, addr_zip: @person.addr_zip, bio: @person.bio, birth_date: @person.birth_date, first_name: @person.first_name, gender: @person.gender, height_in_inches: @person.height_in_inches, last_name: @person.last_name, pass_hash: @person.pass_hash, pass_salt: @person.pass_salt, shoe_size: @person.shoe_size, username: @person.username, weight_in_pounds: @person.weight_in_pounds } } + end + + assert_redirected_to person_url(Person.last) + end + + test "should show person" do + get person_url(@person) + assert_response :success + end + + test "should get edit" do + get edit_person_url(@person) + assert_response :success + end + + test "should update person" do + patch person_url(@person), params: { person: { addr_city: @person.addr_city, addr_route: @person.addr_route, addr_state: @person.addr_state, addr_zip: @person.addr_zip, bio: @person.bio, birth_date: @person.birth_date, first_name: @person.first_name, gender: @person.gender, height_in_inches: @person.height_in_inches, last_name: @person.last_name, pass_hash: @person.pass_hash, pass_salt: @person.pass_salt, shoe_size: @person.shoe_size, username: @person.username, weight_in_pounds: @person.weight_in_pounds } } + assert_redirected_to person_url(@person) + end + + test "should destroy person" do + assert_difference('Person.count', -1) do + delete person_url(@person) + end + + assert_redirected_to people_url + end +end diff --git a/Team-Manager/test/controllers/phone_numbers_controller_test.rb b/Team-Manager/test/controllers/phone_numbers_controller_test.rb new file mode 100644 index 0000000..94824b2 --- /dev/null +++ b/Team-Manager/test/controllers/phone_numbers_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class PhoneNumbersControllerTest < ActionDispatch::IntegrationTest + setup do + @phone_number = phone_numbers(:one) + end + + test "should get index" do + get phone_numbers_url + assert_response :success + end + + test "should get new" do + get new_phone_number_url + assert_response :success + end + + test "should create phone_number" do + assert_difference('PhoneNumber.count') do + post phone_numbers_url, params: { phone_number: { person_id: @phone_number.person_id, phone: @phone_number.phone } } + end + + assert_redirected_to phone_number_url(PhoneNumber.last) + end + + test "should show phone_number" do + get phone_number_url(@phone_number) + assert_response :success + end + + test "should get edit" do + get edit_phone_number_url(@phone_number) + assert_response :success + end + + test "should update phone_number" do + patch phone_number_url(@phone_number), params: { phone_number: { person_id: @phone_number.person_id, phone: @phone_number.phone } } + assert_redirected_to phone_number_url(@phone_number) + end + + test "should destroy phone_number" do + assert_difference('PhoneNumber.count', -1) do + delete phone_number_url(@phone_number) + end + + assert_redirected_to phone_numbers_url + end +end diff --git a/Team-Manager/test/controllers/player_statistics_controller_test.rb b/Team-Manager/test/controllers/player_statistics_controller_test.rb new file mode 100644 index 0000000..16a69c7 --- /dev/null +++ b/Team-Manager/test/controllers/player_statistics_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class PlayerStatisticsControllerTest < ActionDispatch::IntegrationTest + setup do + @player_statistic = player_statistics(:one) + end + + test "should get index" do + get player_statistics_url + assert_response :success + end + + test "should get new" do + get new_player_statistic_url + assert_response :success + end + + test "should create player_statistic" do + assert_difference('PlayerStatistic.count') do + post player_statistics_url, params: { player_statistic: { date_recorded: @player_statistic.date_recorded, player_id_id: @player_statistic.player_id_id, stat_id: @player_statistic.stat_id, statistic_type: @player_statistic.statistic_type, statistic_value: @player_statistic.statistic_value } } + end + + assert_redirected_to player_statistic_url(PlayerStatistic.last) + end + + test "should show player_statistic" do + get player_statistic_url(@player_statistic) + assert_response :success + end + + test "should get edit" do + get edit_player_statistic_url(@player_statistic) + assert_response :success + end + + test "should update player_statistic" do + patch player_statistic_url(@player_statistic), params: { player_statistic: { date_recorded: @player_statistic.date_recorded, player_id_id: @player_statistic.player_id_id, stat_id: @player_statistic.stat_id, statistic_type: @player_statistic.statistic_type, statistic_value: @player_statistic.statistic_value } } + assert_redirected_to player_statistic_url(@player_statistic) + end + + test "should destroy player_statistic" do + assert_difference('PlayerStatistic.count', -1) do + delete player_statistic_url(@player_statistic) + end + + assert_redirected_to player_statistics_url + end +end diff --git a/Team-Manager/test/controllers/players_controller_test.rb b/Team-Manager/test/controllers/players_controller_test.rb new file mode 100644 index 0000000..50bee5e --- /dev/null +++ b/Team-Manager/test/controllers/players_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class PlayersControllerTest < ActionDispatch::IntegrationTest + setup do + @player = players(:one) + end + + test "should get index" do + get players_url + assert_response :success + end + + test "should get new" do + get new_player_url + assert_response :success + end + + test "should create player" do + assert_difference('Player.count') do + post players_url, params: { player: { player_coach_id_id: @player.player_coach_id_id, player_jersey_id: @player.player_jersey_id, team_join_date: @player.team_join_date, team_left_date: @player.team_left_date } } + end + + assert_redirected_to player_url(Player.last) + end + + test "should show player" do + get player_url(@player) + assert_response :success + end + + test "should get edit" do + get edit_player_url(@player) + assert_response :success + end + + test "should update player" do + patch player_url(@player), params: { player: { player_coach_id_id: @player.player_coach_id_id, player_jersey_id: @player.player_jersey_id, team_join_date: @player.team_join_date, team_left_date: @player.team_left_date } } + assert_redirected_to player_url(@player) + end + + test "should destroy player" do + assert_difference('Player.count', -1) do + delete player_url(@player) + end + + assert_redirected_to players_url + end +end diff --git a/Team-Manager/test/controllers/team_people_controller_test.rb b/Team-Manager/test/controllers/team_people_controller_test.rb new file mode 100644 index 0000000..823c777 --- /dev/null +++ b/Team-Manager/test/controllers/team_people_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class TeamPeopleControllerTest < ActionDispatch::IntegrationTest + setup do + @team_person = team_people(:one) + end + + test "should get index" do + get team_people_url + assert_response :success + end + + test "should get new" do + get new_team_person_url + assert_response :success + end + + test "should create team_person" do + assert_difference('TeamPerson.count') do + post team_people_url, params: { team_person: { person_id_id: @team_person.person_id_id, team_id_id: @team_person.team_id_id } } + end + + assert_redirected_to team_person_url(TeamPerson.last) + end + + test "should show team_person" do + get team_person_url(@team_person) + assert_response :success + end + + test "should get edit" do + get edit_team_person_url(@team_person) + assert_response :success + end + + test "should update team_person" do + patch team_person_url(@team_person), params: { team_person: { person_id_id: @team_person.person_id_id, team_id_id: @team_person.team_id_id } } + assert_redirected_to team_person_url(@team_person) + end + + test "should destroy team_person" do + assert_difference('TeamPerson.count', -1) do + delete team_person_url(@team_person) + end + + assert_redirected_to team_people_url + end +end diff --git a/Team-Manager/test/controllers/teams_controller_test.rb b/Team-Manager/test/controllers/teams_controller_test.rb new file mode 100644 index 0000000..68fa541 --- /dev/null +++ b/Team-Manager/test/controllers/teams_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class TeamsControllerTest < ActionDispatch::IntegrationTest + setup do + @team = teams(:one) + end + + test "should get index" do + get teams_url + assert_response :success + end + + test "should get new" do + get new_team_url + assert_response :success + end + + test "should create team" do + assert_difference('Team.count') do + post teams_url, params: { team: { age_group: @team.age_group, competitive: @team.competitive, organization_id: @team.organization_id, team_id: @team.team_id, team_name: @team.team_name } } + end + + assert_redirected_to team_url(Team.last) + end + + test "should show team" do + get team_url(@team) + assert_response :success + end + + test "should get edit" do + get edit_team_url(@team) + assert_response :success + end + + test "should update team" do + patch team_url(@team), params: { team: { age_group: @team.age_group, competitive: @team.competitive, organization_id: @team.organization_id, team_id: @team.team_id, team_name: @team.team_name } } + assert_redirected_to team_url(@team) + end + + test "should destroy team" do + assert_difference('Team.count', -1) do + delete team_url(@team) + end + + assert_redirected_to teams_url + end +end diff --git a/Team-Manager/test/fixtures/.keep b/Team-Manager/test/fixtures/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/test/fixtures/certifications.yml b/Team-Manager/test/fixtures/certifications.yml new file mode 100644 index 0000000..2d25390 --- /dev/null +++ b/Team-Manager/test/fixtures/certifications.yml @@ -0,0 +1,13 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + person_id: one + certification_name: MyString + expiration_date: 2016-09-26 + note: MyText + +two: + person_id: two + certification_name: MyString + expiration_date: 2016-09-26 + note: MyText diff --git a/Team-Manager/test/fixtures/coaches.yml b/Team-Manager/test/fixtures/coaches.yml new file mode 100644 index 0000000..8edc652 --- /dev/null +++ b/Team-Manager/test/fixtures/coaches.yml @@ -0,0 +1,15 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + person_id: one + coach_type: MyString + coach_year_began: 2016-09-26 + coach_year_ended: 2016-09-26 + coach_id: 1 + +two: + person_id: two + coach_type: MyString + coach_year_began: 2016-09-26 + coach_year_ended: 2016-09-26 + coach_id: 1 diff --git a/Team-Manager/test/fixtures/emails.yml b/Team-Manager/test/fixtures/emails.yml new file mode 100644 index 0000000..31c52c6 --- /dev/null +++ b/Team-Manager/test/fixtures/emails.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + email: MyString + person: one + +two: + email: MyString + person: two diff --git a/Team-Manager/test/fixtures/event_property_maps.yml b/Team-Manager/test/fixtures/event_property_maps.yml new file mode 100644 index 0000000..542669b --- /dev/null +++ b/Team-Manager/test/fixtures/event_property_maps.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + event_id: one + key: MyString + value: MyString + +two: + event_id: two + key: MyString + value: MyString diff --git a/Team-Manager/test/fixtures/event_types.yml b/Team-Manager/test/fixtures/event_types.yml new file mode 100644 index 0000000..fa2cc6e --- /dev/null +++ b/Team-Manager/test/fixtures/event_types.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + event_type_id: 1 + type_description: MyString + +two: + event_type_id: 1 + type_description: MyString diff --git a/Team-Manager/test/fixtures/events.yml b/Team-Manager/test/fixtures/events.yml new file mode 100644 index 0000000..259d9db --- /dev/null +++ b/Team-Manager/test/fixtures/events.yml @@ -0,0 +1,17 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + event_id: 1 + event_type: one + event_datetime: 2016-09-26 + team_id: one + created_by: 1 + open_to_public: false + +two: + event_id: 1 + event_type: two + event_datetime: 2016-09-26 + team_id: two + created_by: 1 + open_to_public: false diff --git a/Team-Manager/test/fixtures/files/.keep b/Team-Manager/test/fixtures/files/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/test/fixtures/organization_teams.yml b/Team-Manager/test/fixtures/organization_teams.yml new file mode 100644 index 0000000..5a5fbc3 --- /dev/null +++ b/Team-Manager/test/fixtures/organization_teams.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + organization_id: one + team_id: one + +two: + organization_id: two + team_id: two diff --git a/Team-Manager/test/fixtures/organizations.yml b/Team-Manager/test/fixtures/organizations.yml new file mode 100644 index 0000000..1bbf4c2 --- /dev/null +++ b/Team-Manager/test/fixtures/organizations.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + organization_id: 1 + name: MyString + +two: + organization_id: 1 + name: MyString diff --git a/Team-Manager/test/fixtures/parent_children.yml b/Team-Manager/test/fixtures/parent_children.yml new file mode 100644 index 0000000..5aff66b --- /dev/null +++ b/Team-Manager/test/fixtures/parent_children.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + parent_id: one + child_id: one + +two: + parent_id: two + child_id: two diff --git a/Team-Manager/test/fixtures/people.yml b/Team-Manager/test/fixtures/people.yml new file mode 100644 index 0000000..d600ded --- /dev/null +++ b/Team-Manager/test/fixtures/people.yml @@ -0,0 +1,35 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + first_name: MyString + last_name: MyString + addr_route: MyString + addr_city: MyString + addr_state: MyString + addr_zip: 1 + username: MyString + pass_hash: MyString + pass_salt: MyString + bio: MyText + birth_date: 2016-09-26 + gender: MyString + height_in_inches: 1 + weight_in_pounds: 1 + shoe_size: MyString + +two: + first_name: MyString + last_name: MyString + addr_route: MyString + addr_city: MyString + addr_state: MyString + addr_zip: 1 + username: MyString + pass_hash: MyString + pass_salt: MyString + bio: MyText + birth_date: 2016-09-26 + gender: MyString + height_in_inches: 1 + weight_in_pounds: 1 + shoe_size: MyString diff --git a/Team-Manager/test/fixtures/phone_numbers.yml b/Team-Manager/test/fixtures/phone_numbers.yml new file mode 100644 index 0000000..85f6a1a --- /dev/null +++ b/Team-Manager/test/fixtures/phone_numbers.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + phone: MyString + person: one + +two: + phone: MyString + person: two diff --git a/Team-Manager/test/fixtures/player_statistics.yml b/Team-Manager/test/fixtures/player_statistics.yml new file mode 100644 index 0000000..a9ba491 --- /dev/null +++ b/Team-Manager/test/fixtures/player_statistics.yml @@ -0,0 +1,15 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + player_id: one + statistic_type: MyString + statistic_value: MyString + date_recorded: 2016-09-26 + stat_id: 1 + +two: + player_id: two + statistic_type: MyString + statistic_value: MyString + date_recorded: 2016-09-26 + stat_id: 1 diff --git a/Team-Manager/test/fixtures/players.yml b/Team-Manager/test/fixtures/players.yml new file mode 100644 index 0000000..08c4f58 --- /dev/null +++ b/Team-Manager/test/fixtures/players.yml @@ -0,0 +1,13 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + player_coach_id: one + player_jersey_id: 1 + team_join_date: 2016-09-25 + team_left_date: 2016-09-25 + +two: + player_coach_id: two + player_jersey_id: 1 + team_join_date: 2016-09-25 + team_left_date: 2016-09-25 diff --git a/Team-Manager/test/fixtures/team_people.yml b/Team-Manager/test/fixtures/team_people.yml new file mode 100644 index 0000000..b2043f3 --- /dev/null +++ b/Team-Manager/test/fixtures/team_people.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + person_id: one + team_id: one + +two: + person_id: two + team_id: two diff --git a/Team-Manager/test/fixtures/teams.yml b/Team-Manager/test/fixtures/teams.yml new file mode 100644 index 0000000..d53a4f9 --- /dev/null +++ b/Team-Manager/test/fixtures/teams.yml @@ -0,0 +1,15 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + team_id: 1 + organization_id: 1 + team_name: MyString + competitive: false + age_group: MyString + +two: + team_id: 1 + organization_id: 1 + team_name: MyString + competitive: false + age_group: MyString diff --git a/Team-Manager/test/helpers/.keep b/Team-Manager/test/helpers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/test/integration/.keep b/Team-Manager/test/integration/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/test/mailers/.keep b/Team-Manager/test/mailers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/test/models/.keep b/Team-Manager/test/models/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/test/models/certification_test.rb b/Team-Manager/test/models/certification_test.rb new file mode 100644 index 0000000..ceadf95 --- /dev/null +++ b/Team-Manager/test/models/certification_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class CertificationTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/coach_test.rb b/Team-Manager/test/models/coach_test.rb new file mode 100644 index 0000000..0a258b8 --- /dev/null +++ b/Team-Manager/test/models/coach_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class CoachTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/email_test.rb b/Team-Manager/test/models/email_test.rb new file mode 100644 index 0000000..dc054e5 --- /dev/null +++ b/Team-Manager/test/models/email_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class EmailTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/event_property_map_test.rb b/Team-Manager/test/models/event_property_map_test.rb new file mode 100644 index 0000000..6e589c7 --- /dev/null +++ b/Team-Manager/test/models/event_property_map_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class EventPropertyMapTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/event_test.rb b/Team-Manager/test/models/event_test.rb new file mode 100644 index 0000000..c6f1566 --- /dev/null +++ b/Team-Manager/test/models/event_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class EventTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/event_type_test.rb b/Team-Manager/test/models/event_type_test.rb new file mode 100644 index 0000000..0d42331 --- /dev/null +++ b/Team-Manager/test/models/event_type_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class EventTypeTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/organization_team_test.rb b/Team-Manager/test/models/organization_team_test.rb new file mode 100644 index 0000000..b18d712 --- /dev/null +++ b/Team-Manager/test/models/organization_team_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class OrganizationTeamTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/organization_test.rb b/Team-Manager/test/models/organization_test.rb new file mode 100644 index 0000000..d144816 --- /dev/null +++ b/Team-Manager/test/models/organization_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class OrganizationTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/parent_child_test.rb b/Team-Manager/test/models/parent_child_test.rb new file mode 100644 index 0000000..2776530 --- /dev/null +++ b/Team-Manager/test/models/parent_child_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class ParentChildTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/person_test.rb b/Team-Manager/test/models/person_test.rb new file mode 100644 index 0000000..ad04ed8 --- /dev/null +++ b/Team-Manager/test/models/person_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PersonTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/phone_number_test.rb b/Team-Manager/test/models/phone_number_test.rb new file mode 100644 index 0000000..74b8739 --- /dev/null +++ b/Team-Manager/test/models/phone_number_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PhoneNumberTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/player_statistic_test.rb b/Team-Manager/test/models/player_statistic_test.rb new file mode 100644 index 0000000..db4fb71 --- /dev/null +++ b/Team-Manager/test/models/player_statistic_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlayerStatisticTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/player_test.rb b/Team-Manager/test/models/player_test.rb new file mode 100644 index 0000000..3cf71d7 --- /dev/null +++ b/Team-Manager/test/models/player_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlayerTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/team_person_test.rb b/Team-Manager/test/models/team_person_test.rb new file mode 100644 index 0000000..fbf2e89 --- /dev/null +++ b/Team-Manager/test/models/team_person_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TeamPersonTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/models/team_test.rb b/Team-Manager/test/models/team_test.rb new file mode 100644 index 0000000..8b101cb --- /dev/null +++ b/Team-Manager/test/models/team_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TeamTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/Team-Manager/test/test_helper.rb b/Team-Manager/test/test_helper.rb new file mode 100644 index 0000000..92e39b2 --- /dev/null +++ b/Team-Manager/test/test_helper.rb @@ -0,0 +1,10 @@ +ENV['RAILS_ENV'] ||= 'test' +require File.expand_path('../../config/environment', __FILE__) +require 'rails/test_help' + +class ActiveSupport::TestCase + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + + # Add more helper methods to be used by all tests here... +end diff --git a/Team-Manager/tmp/.keep b/Team-Manager/tmp/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/vendor/assets/javascripts/.keep b/Team-Manager/vendor/assets/javascripts/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Team-Manager/vendor/assets/stylesheets/.keep b/Team-Manager/vendor/assets/stylesheets/.keep new file mode 100644 index 0000000..e69de29 diff --git a/artifacts/sports_org_erd_v2.mwb b/artifacts/sports_org_erd_v2.mwb new file mode 100644 index 0000000..00be401 Binary files /dev/null and b/artifacts/sports_org_erd_v2.mwb differ diff --git a/artifacts/sports_org_erd_v3.mwb b/artifacts/sports_org_erd_v3.mwb new file mode 100644 index 0000000..567dc90 Binary files /dev/null and b/artifacts/sports_org_erd_v3.mwb differ diff --git a/artifacts/sports_org_erd_v4.mwb b/artifacts/sports_org_erd_v4.mwb new file mode 100644 index 0000000..8f01a6d Binary files /dev/null and b/artifacts/sports_org_erd_v4.mwb differ diff --git a/artifacts/sports_org_erd_v5.mwb b/artifacts/sports_org_erd_v5.mwb new file mode 100644 index 0000000..ae8ec92 Binary files /dev/null and b/artifacts/sports_org_erd_v5.mwb differ diff --git a/artifacts/sports_org_erd_v5.mwb.bak b/artifacts/sports_org_erd_v5.mwb.bak new file mode 100644 index 0000000..f67cb3b Binary files /dev/null and b/artifacts/sports_org_erd_v5.mwb.bak differ diff --git a/generating_script b/generating_script new file mode 100644 index 0000000..1869346 --- /dev/null +++ b/generating_script @@ -0,0 +1,33 @@ +rails generate scaffold Person first_name:string last_name:string addr_route:string addr_city:string addr_state:string addr_zip:integer username:string pass_hash:string pass_salt:string bio:text birth_date:date gender:string height_in_inches:integer weight_in_pounds:integer shoe_size:string + +rails generate scaffold Phone_Number phone:string person:references + +rails generate scaffold Email email:string person:references + +rails generate scaffold Team_people person_id:references team_id:references + +rails generate scaffold Player player_coach_id:references player_jersey_id:integer team_join_date:date team_left_date:date + +rails generate scaffold Coach person_id:references coach_type:string coach_year_began:date coach_year_ended:date coach_id:integer + +rails generate scaffold Player_statistics player_id:references statistic_type:string statistic_value:string date_recorded:date stat_id:integer + + +rails generate scaffold Team team_id:integer organization_id:integer team_name:string competitive:boolean age_group:string + +rails generate scaffold Organization_teams organization_id:references team_id:references + +rails generate scaffold Organization organization_id:integer name:string + +rails generate scaffold Event event_id:integer event_type:references event_datetime:date team_id:references created_by:integer open_to_public:boolean + +rails generate scaffold Event_type event_type_id:integer type_description:string + +rails generate scaffold Event_property_map event_id:references key:string value:string + +rails generate scaffold Parent_children parent_id:references child_id:references + +rails generate scaffold Certification person_id:references certification_name:string expiration_date:date note:text + + +