mirror of
https://github.com/oonyeje/Pearlception_Website_RoR.git
synced 2025-12-25 03:37:40 +00:00
Added Distributor and Supplier Filters:
Remaing Bugs: - @Bug: With trying to select a different filter for supplier or distributor dropdown filtermenu popup closes. - @Bug: When filtering statistics, original chart appears as underlay to new filtered chart - @Bug: When logging out of the dashboard, the user is told there account was cancelled when they werent
This commit is contained in:
parent
a6dcc238cf
commit
44f716b568
12
Pearlception/.vscode/tasks.json
vendored
Normal file
12
Pearlception/.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"taskName": "echo",
|
||||
"command": "echo Hello",
|
||||
"type": "shell"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
lib/subdomain.rb 05d09bad9914c8468f62d18a7490bbff2a169e5b
|
||||
app/models/run.rb d365dad32d163ba2cb7dd1fa3c990b4c4023aeef
|
||||
app/models/run.rb 56667b48dc818963ee8e6576af6850be1388c4b9
|
||||
app/models/user.rb efde248eefff583ab5d6cc0efb455d33cdf8e0f8
|
||||
app/models/grade.rb 06b261d77e0f248d01783be7b756ef994287c386
|
||||
app/models/oyster.rb 7e618ccfa0ed1fc599cb10c7f015d8b5ebdc7add
|
||||
@ -23,10 +23,10 @@ app/controllers/runs_controller.rb cb314018e6aa86e0c9afc9d6a2fe563924000bca
|
||||
app/helpers/registrations_helper.rb 37b2a26d7a107fb24d0dc648ad6d739722dfec0f
|
||||
app/controllers/grades_controller.rb 30dc672b7759ad606bba5a9790a3c3bed7ac258d
|
||||
app/controllers/oysters_controller.rb eca3e0163cb4ec7f95c9f07f9991d1bd747fd52b
|
||||
app/controllers/sessions_controller.rb 83c887b904faf26afafa69872dce1250e638f225
|
||||
app/controllers/sessions_controller.rb 5fe6b0a8ddd3859642258e3fbb2ce58db84efd14
|
||||
app/controllers/companies_controller.rb 66866c361bc088440a0eb3a7704985171e4d96e6
|
||||
app/controllers/dashboard_controller.rb f9e7b2eec29e56c58c16524dca676b087678ad02
|
||||
app/controllers/statistics_controller.rb 38331e4fe96e77828c9f2029fe35533e84679e1f
|
||||
app/controllers/statistics_controller.rb bb0c96b7567285ca3c8a437ffcd8d8f95b3f1b51
|
||||
app/channels/application_cable/channel.rb 54156ee2853cfdea4e3147cdb260776b8d90b646
|
||||
app/controllers/application_controller.rb 7db6f6f427cff75fc496475e8f7226fc0d4deb88
|
||||
app/controllers/registrations_controller.rb bcb576011beb61b83c113556afe5db1091aaf8a2
|
||||
|
||||
Binary file not shown.
@ -48,6 +48,7 @@ gem 'rack-subdomain'
|
||||
group :development, :test do
|
||||
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
||||
gem 'byebug', platform: :mri
|
||||
gem 'meta_request'
|
||||
end
|
||||
|
||||
group :development do
|
||||
|
||||
@ -53,6 +53,7 @@ GEM
|
||||
bootstrap-popover-rails (0.1.0)
|
||||
builder (3.2.2)
|
||||
byebug (9.0.6)
|
||||
callsite (0.0.11)
|
||||
chart-js-rails (0.1.2)
|
||||
railties (> 3.1)
|
||||
coderay (1.1.1)
|
||||
@ -110,6 +111,10 @@ GEM
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.6.4)
|
||||
mime-types (>= 1.16, < 4)
|
||||
meta_request (0.4.3)
|
||||
callsite (~> 0.0, >= 0.0.11)
|
||||
rack-contrib (>= 1.1, < 3)
|
||||
railties (>= 3.0.0, < 5.2.0)
|
||||
method_source (0.8.2)
|
||||
mime-types (3.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
@ -136,6 +141,8 @@ GEM
|
||||
pry (>= 0.9.11)
|
||||
puma (3.6.2)
|
||||
rack (2.0.1)
|
||||
rack-contrib (1.2.0)
|
||||
rack (>= 0.9.1)
|
||||
rack-subdomain (0.0.2)
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
@ -230,6 +237,7 @@ DEPENDENCIES
|
||||
jquery-ui-rails
|
||||
kaminari
|
||||
listen (~> 3.0.5)
|
||||
meta_request
|
||||
mysql2 (>= 0.3.18, < 0.5)
|
||||
pry-byebug
|
||||
pry-stack_explorer
|
||||
@ -245,4 +253,4 @@ DEPENDENCIES
|
||||
web-console (>= 3.3.0)
|
||||
|
||||
BUNDLED WITH
|
||||
1.13.7
|
||||
1.14.3
|
||||
|
||||
@ -7,18 +7,46 @@ $('#to_datepicker').datepicker()
|
||||
$('#dateFilterButton').on('click',function(){
|
||||
var fromDate = $('#from_datepicker')[0].value;
|
||||
var toDate = $('#to_datepicker')[0].value;
|
||||
var queryString = "";
|
||||
var supplier = $('#supplier').find(":selected").text();
|
||||
var distributor = $('#distributor').find(":selected").text();
|
||||
var queryString = "statistics.json";
|
||||
if(fromDate != "" && toDate != ""){
|
||||
queryString = "statistics.json/?from_date="+encodeURI(fromDate)+"&to_date="+encodeURI(toDate);
|
||||
queryString = queryString + "/?from_date="+encodeURI(fromDate)+"&to_date="+encodeURI(toDate);
|
||||
}
|
||||
else{
|
||||
queryString = "statistics.json"
|
||||
if(supplier != ""){
|
||||
if(queryString.includes("/")){
|
||||
queryString = queryString + "&supplier="+encodeURI(supplier);
|
||||
}else{
|
||||
queryString = queryString + "/?supplier="+encodeURI(supplier);
|
||||
}
|
||||
}
|
||||
|
||||
if(distributor != ""){
|
||||
if(queryString.includes("/")){
|
||||
queryString = queryString + "&distributor="+encodeURI(distributor);
|
||||
}else{
|
||||
queryString = queryString + "/?distributor="+encodeURI(distributor);
|
||||
}
|
||||
}
|
||||
|
||||
$.get(queryString, function(gradeData){
|
||||
constructGradesGraph(gradeData);
|
||||
})
|
||||
});
|
||||
|
||||
(function($){ $(window).on("load",function(){
|
||||
$('.filter-dropdown').find('.filter-form').click(function (e) {
|
||||
e.stopPropagation();
|
||||
if ($(e.target).is('[name=supplier]')) {
|
||||
$($(e.target).data('target')).modal()
|
||||
}
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).ready(
|
||||
$.get("statistics.json", function(gradeData){
|
||||
constructGradesGraph(gradeData);
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
#@FIXME: When logging out users are prompted that there accounts have been cancelled when really they
|
||||
#just logged out.
|
||||
class SessionsController < Devise::RegistrationsController
|
||||
include ApplicationHelper
|
||||
|
||||
|
||||
@ -1,13 +1,26 @@
|
||||
class StatisticsController < ApplicationController
|
||||
|
||||
def index
|
||||
@suppliers = Supplier.all
|
||||
@distributors = Distributor.all
|
||||
#filterUsed = false
|
||||
runs = Run.all
|
||||
if params[:from_date] != nil && params[:to_date] != nil
|
||||
from_date = Date.strptime(params[:from_date], '%m/%d/%Y')
|
||||
to_date = Date.strptime(params[:to_date], '%m/%d/%Y')
|
||||
runs = Run.where(:runDate => from_date.beginning_of_day..to_date.end_of_day)
|
||||
else
|
||||
runs = Run.all
|
||||
#runs = Run.where(:runDate => from_date.beginning_of_day..to_date.end_of_day)
|
||||
runs = runs.by_date(from_date.beginning_of_day..to_date.end_of_day)
|
||||
end
|
||||
|
||||
if params[:supplier] != nil
|
||||
runs = runs.by_supplier(params[:supplier])
|
||||
end
|
||||
|
||||
if params[:distributor] != nil
|
||||
runs = runs.by_distributor(params[:distributor])
|
||||
end
|
||||
# runs = Run.all
|
||||
#end
|
||||
puts runs.inspect
|
||||
oysterData = []
|
||||
all_oysters = []
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
class Run < ApplicationRecord
|
||||
has_many :oysters
|
||||
scope :by_date, lambda { |runDate| where(:runDate => runDate)}
|
||||
scope :by_supplier, lambda { |supplier| where(:supplier => supplier)}
|
||||
scope :by_distributor, lambda { |distributor| where(:distributor => distributor)}
|
||||
end
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
</ul> -->
|
||||
</div>
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<%= link_to "Back", root_path( :page => params[:page_num]), :class => "btn btn-primary" %>
|
||||
<%= link_to "Back", root_path( :page => params[:page_num]) + "pearlception", :class => "btn btn-primary" %>
|
||||
<h1 class="page-header">Results of <%= Run.find(params[:result_id]).runDate %></h1>
|
||||
<h2 class="sub-header">Processed Oysters: <%= @oysters_count %> </h2>
|
||||
<% if @oysters.empty? %>
|
||||
|
||||
@ -48,7 +48,50 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<div class="col-md-6">
|
||||
<div class='dropdown' data-dropdown='dropdown'>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Add a Filter <b class="caret"></b></a>
|
||||
<div class='dropdown-menu' id='filter-dropdown'>
|
||||
<div id="filter-form">
|
||||
<fieldset class='textbox'>
|
||||
<div class="col-md-2">
|
||||
<p>From: <input type="text" id="from_datepicker" name="from_date"></p>
|
||||
</div><br/><br/>
|
||||
<div class="col-md-2">
|
||||
<p>To: <input type="text" id="to_datepicker" name="to_date"></p>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset >
|
||||
<div class="col-md-2">
|
||||
<!-@FIXME: select dropdowns not working in popup dropdown this has something to do with the jQuery script I suspect->
|
||||
<p>Supplier: <%= select_tag "supplier", (options_from_collection_for_select(@suppliers, "id", "name")) %></p>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset >
|
||||
<div class="col-md-2">
|
||||
<p>Distributor: <%= select_tag "distributor", (options_from_collection_for_select(@distributors, "id", "name")) %></p>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class='subchk'>
|
||||
<div class="col-md-2">
|
||||
<button class="btn btn-primary" id="dateFilterButton">Filter</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!--<div class="row">
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<div class="col-md-2">
|
||||
<p>From: <input type="text" id="from_datepicker" name="from_date"></p>
|
||||
@ -60,10 +103,13 @@
|
||||
<button class="btn btn-primary" id="dateFilterButton">Filter</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<div class="col-lg-12">
|
||||
<!-@FIXME: When filtering the original grades chart that displays
|
||||
when the page originally loads is underlayed beneath the filtered graph ->
|
||||
<canvas id="gradesChart"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -107,7 +107,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:17 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:17 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -118,7 +118,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:17 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -273,7 +273,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -118,7 +118,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -415,7 +415,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:17 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -122,7 +122,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -343,7 +343,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:17 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -122,7 +122,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -208,7 +208,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -469,7 +469,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -122,7 +122,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -122,7 +122,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -245,7 +245,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:17 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -357,7 +357,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:17 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -122,7 +122,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -122,7 +122,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -203,7 +203,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -106,7 +106,19 @@
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Overview</h2><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>@FIXME: When logging out users are prompted that there accounts have been
|
||||
cancelled when really they just logged out.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@ -201,8 +213,6 @@
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
@ -215,10 +225,12 @@
|
||||
19
|
||||
20
|
||||
21
|
||||
22</pre>
|
||||
22
|
||||
23
|
||||
24</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'app/controllers/sessions_controller.rb', line 8</span>
|
||||
<pre class="code"><span class="info file"># File 'app/controllers/sessions_controller.rb', line 10</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_create'>create</span>
|
||||
<span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_sign_in_params'>sign_in_params</span>
|
||||
@ -255,12 +267,12 @@
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
4
|
||||
5
|
||||
6</pre>
|
||||
6
|
||||
7
|
||||
8</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'app/controllers/sessions_controller.rb', line 4</span>
|
||||
<pre class="code"><span class="info file"># File 'app/controllers/sessions_controller.rb', line 6</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_new'>new</span>
|
||||
<span class='kw'>super</span>
|
||||
@ -275,7 +287,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:17 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -192,20 +192,46 @@
|
||||
21
|
||||
22
|
||||
23
|
||||
24</pre>
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'app/controllers/statistics_controller.rb', line 3</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_index'>index</span>
|
||||
<span class='ivar'>@suppliers</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Supplier.html" title="Supplier (class)">Supplier</a></span></span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span>
|
||||
<span class='ivar'>@distributors</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Distributor.html" title="Distributor (class)">Distributor</a></span></span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span>
|
||||
<span class='comment'>#filterUsed = false
|
||||
</span> <span class='id identifier rubyid_runs'>runs</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Run.html" title="Run (class)">Run</a></span></span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span>
|
||||
<span class='kw'>if</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:from_date</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:to_date</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='kw'>nil</span>
|
||||
<span class='id identifier rubyid_from_date'>from_date</span> <span class='op'>=</span> <span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_strptime'>strptime</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:from_date</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%m/%d/%Y</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_to_date'>to_date</span> <span class='op'>=</span> <span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_strptime'>strptime</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:to_date</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%m/%d/%Y</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_runs'>runs</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Run.html" title="Run (class)">Run</a></span></span><span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='symbol'>:runDate</span> <span class='op'>=></span> <span class='id identifier rubyid_from_date'>from_date</span><span class='period'>.</span><span class='id identifier rubyid_beginning_of_day'>beginning_of_day</span><span class='op'>..</span><span class='id identifier rubyid_to_date'>to_date</span><span class='period'>.</span><span class='id identifier rubyid_end_of_day'>end_of_day</span><span class='rparen'>)</span>
|
||||
<span class='kw'>else</span>
|
||||
<span class='id identifier rubyid_runs'>runs</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Run.html" title="Run (class)">Run</a></span></span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span>
|
||||
<span class='comment'>#runs = Run.where(:runDate => from_date.beginning_of_day..to_date.end_of_day)
|
||||
</span> <span class='id identifier rubyid_runs'>runs</span> <span class='op'>=</span> <span class='id identifier rubyid_runs'>runs</span><span class='period'>.</span><span class='id identifier rubyid_by_date'>by_date</span><span class='lparen'>(</span><span class='id identifier rubyid_from_date'>from_date</span><span class='period'>.</span><span class='id identifier rubyid_beginning_of_day'>beginning_of_day</span><span class='op'>..</span><span class='id identifier rubyid_to_date'>to_date</span><span class='period'>.</span><span class='id identifier rubyid_end_of_day'>end_of_day</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_runs'>runs</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span>
|
||||
|
||||
<span class='kw'>if</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:supplier</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='kw'>nil</span>
|
||||
<span class='id identifier rubyid_runs'>runs</span> <span class='op'>=</span> <span class='id identifier rubyid_runs'>runs</span><span class='period'>.</span><span class='id identifier rubyid_by_supplier'>by_supplier</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:supplier</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='kw'>if</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:distributor</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='kw'>nil</span>
|
||||
<span class='id identifier rubyid_runs'>runs</span> <span class='op'>=</span> <span class='id identifier rubyid_runs'>runs</span><span class='period'>.</span><span class='id identifier rubyid_by_distributor'>by_distributor</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:distributor</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='comment'># runs = Run.all
|
||||
</span> <span class='comment'>#end
|
||||
</span> <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_runs'>runs</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span>
|
||||
<span class='id identifier rubyid_oysterData'>oysterData</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
||||
<span class='id identifier rubyid_all_oysters'>all_oysters</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
||||
<span class='id identifier rubyid_runs'>runs</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_run'>run</span><span class='op'>|</span>
|
||||
@ -229,7 +255,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:17 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -202,7 +202,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -122,7 +122,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -677,7 +677,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:17 2017 by
|
||||
Generated on Fri Jul 21 16:12:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -199,7 +199,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -343,7 +343,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -86,7 +86,7 @@ application up and running.</p>
|
||||
</div></div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -86,7 +86,7 @@ application up and running.</p>
|
||||
</div></div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
@ -102,7 +102,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri Jul 7 17:36:16 2017 by
|
||||
Generated on Fri Jul 21 16:12:53 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.3.3).
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user