Skip to content

Instantly share code, notes, and snippets.

View sidtri's full-sized avatar
🎯
Focusing

sid d sidtri

🎯
Focusing
View GitHub Profile
diff --git a/app/assets/javascripts/angular/trips/edit/move-modal.tmpl.html.haml b/app/assets/javascripts/angular/trips/edit/move-modal.tmpl.html.haml
index 8844a8e..ec73110 100644
--- a/app/assets/javascripts/angular/trips/edit/move-modal.tmpl.html.haml
+++ b/app/assets/javascripts/angular/trips/edit/move-modal.tmpl.html.haml
@@ -29,6 +29,8 @@
%th End Location
%th Status
%th Action
+ %tr{"ng-hide" => "load.moves.length"}
+ %td{"colspan" => '6'} Search and choose load from above search bar which contains moves and make sure those were not assigned.
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 92f1fd9..42959c6 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -227,8 +227,7 @@ Devise.setup do |config|
# should add them to the navigational formats lists.
#
# The "*/*" below is required to match Internet Explorer requests.
- # config.navigational_formats = ['*/*', :html]
- config.navigational_formats = [:json]
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 92f1fd9..42959c6 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -227,8 +227,7 @@ Devise.setup do |config|
# should add them to the navigational formats lists.
#
# The "*/*" below is required to match Internet Explorer requests.
- # config.navigational_formats = ['*/*', :html]
- config.navigational_formats = [:json]
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 92f1fd9..42959c6 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -227,8 +227,7 @@ Devise.setup do |config|
# should add them to the navigational formats lists.
#
# The "*/*" below is required to match Internet Explorer requests.
- # config.navigational_formats = ['*/*', :html]
- config.navigational_formats = [:json]
diff --git a/app/models/concerns/event_status_update.rb b/app/models/concerns/event_status_update.rb
index e69de29..793294c 100644
--- a/app/models/concerns/event_status_update.rb
+++ b/app/models/concerns/event_status_update.rb
@@ -0,0 +1,48 @@
+require 'active_support/concern'
+
+module EventStatusUpdate
+ extend ActiveSupport::Concern
+
diff --git a/app/models/event.rb b/app/models/event.rb
index 6e9e48d..47a95c4 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -8,14 +8,17 @@ class Event < ActiveRecord::Base
has_many :attachments
has_many :forms, -> { order 'created_at' }
has_one :order, through: :move
- belongs_to :move
+ belongs_to :move, autosave: true
diff --git a/app/models/event.rb b/app/models/event.rb
index 6e9e48d..34eb106 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -59,20 +59,17 @@ class Event < ActiveRecord::Base
def set_move_status
return unless status_changed?
- move_statuses = move.events.map(&:status)
- if move_statuses.size == 2
* Unmerged path app/assets/javascripts/pagination.js
* Unmerged path app/assets/stylesheets/style.css
* Unmerged path node_modules/@angular/router-deprecated/esm/src/facade/promise.js
* Unmerged path node_modules/@angular/router-deprecated/src/facade/collection.js
* Unmerged path node_modules/@angular/router-deprecated/src/facade/promise.js
* Unmerged path node_modules/reflect-metadata/Reflect.js
* Unmerged path node_modules/reflect-metadata/Reflect.js.map
* Unmerged path node_modules/reflect-metadata/Reflect.ts
* Unmerged path node_modules/reflect-metadata/reflect-metadata.d.ts
* Unmerged path node_modules/reflect-metadata/temp/Reflect.js
diff --git a/app/models/event.rb b/app/models/event.rb
index 6e9e48d..a84ad0c 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -67,11 +67,11 @@ class Event < ActiveRecord::Base
move_status = "In Progress"
elsif move_statuses.include?("Unable To Finish")
move_status = "Exception"
- elsif move_statuses.include?("Finished")
+ elsif move_statuses == ["Finished", "Finished"]
diff --git a/app/assets/javascripts/angular/orders/moves/move.tmpl.html.haml b/app/assets/javascripts/angular/orders/moves/move.tmpl.html.haml
index e1aa4c8..1e65d78 100644
--- a/app/assets/javascripts/angular/orders/moves/move.tmpl.html.haml
+++ b/app/assets/javascripts/angular/orders/moves/move.tmpl.html.haml
@@ -16,7 +16,6 @@
%th Type
%th Start Location
%th End Location
- %th Carrier
%th Status