diff --git a/Gemfile b/Gemfile index f95c7b95..593b31db 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem 'rack-cors', require: 'rack/cors' # gem 'rails', git: 'git://github.com/rails/rails.git' # gem 'sqlite3' - +gem 'exception_notification' gem 'slim-rails' # Gems used only for assets and not required @@ -26,7 +26,7 @@ group :assets do #gem 'twitter-bootstrap-rails' # Only for mobile assets precompile, not used in this project #gem 'bootstrap-sass', '~>2.3' - gem 'bourbon' #, '4.0.2' + gem 'bourbon' #, '4.0.2' #animation keyframes #gem 'compass-rails' gem 'js-routes' gem "font-awesome-rails" diff --git a/Gemfile.lock b/Gemfile.lock index b0d9e286..56fa6d16 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -205,6 +205,9 @@ GEM railties erubis (2.7.0) eventmachine (1.0.8) + exception_notification (4.1.1) + actionmailer (>= 3.0.4) + activesupport (>= 3.0.4) execjs (2.6.0) factory_girl (4.5.0) activesupport (>= 3.0.0) @@ -500,6 +503,7 @@ DEPENDENCIES ember-emblem-template! ember-rails! ember-validations-rails + exception_notification factory_girl_rails faye font-awesome-rails diff --git a/app/assets/javascripts/supplier/app/controllers/section_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/section_controller.js.coffee index 62c13f75..dfdda652 100644 --- a/app/assets/javascripts/supplier/app/controllers/section_controller.js.coffee +++ b/app/assets/javascripts/supplier/app/controllers/section_controller.js.coffee @@ -12,21 +12,17 @@ App.SectionController = Ember.Controller.extend @get('model.section_areas').filterBy('hasDirtyAttributes').invoke 'save' rollbackEditable: -> @get('model').rollbackAttributes() - @get('model.tables').forEach (table) -> - if table.get('isNew') - table.deleteRecord() - else - table.rollbackAttributes() - @get('model.section_elements').forEach (section_element) -> - if section_element.get('isNew') - section_element.deleteRecord() - else - section_element.rollbackAttributes() - @get('model.section_areas').forEach (section_area) -> - if section_area.get('isNew') - section_area.deleteRecord() - else - section_area.rollbackAttributes() + tables = @get('model.tables') + tables.filterBy('isNew').invoke 'unloadRecord' + tables.rejectBy('isNew').invoke 'rollbackAttributes' + + section_elements = @get('model.section_elements') + section_elements.filterBy('isNew').invoke 'unloadRecord' + section_elements.rejectBy('isNew').invoke 'rollbackAttributes' + + section_areas = @get('model.section_areas') + section_areas.filterBy('isNew').invoke 'unloadRecord' + section_areas.rejectBy('isNew').invoke 'rollbackAttributes' @set('model.editmode', false) addSection: -> @modal 'add_section', model: @get('model') addTables: -> @modal 'section_add_tables', model: @get('model') diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb index 48c29dbb..47357204 100644 --- a/app/mailers/notifier.rb +++ b/app/mailers/notifier.rb @@ -1,5 +1,5 @@ class Notifier < ActionMailer::Base - default from: "Qwaiter " + default from: "Mozo " layout 'mail' def contact_form(contact_form_id) diff --git a/app/mailers/supplier_mailer.rb b/app/mailers/supplier_mailer.rb index 210a3be7..45a54325 100644 --- a/app/mailers/supplier_mailer.rb +++ b/app/mailers/supplier_mailer.rb @@ -1,5 +1,5 @@ class SupplierMailer < ActionMailer::Base - default from: "Qwaiter " + default from: "Mozo " layout 'mail' def creation(supplier) diff --git a/config/environments/production.rb b/config/environments/production.rb index d9b1ee16..8136d1d9 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -76,6 +76,12 @@ Qwaiter::Application.configure do #password: "BjTKct22", #enable_starttls_auto: true #} + config.middleware.use ExceptionNotification::Rack, + email: { + email_prefix: "[MOZO][EXCEPTION] ", + sender_address: %|"notifier" |, + exception_recipients: %w[bterkuile@gmail.com] + } # Enable threaded mode # config.threadsafe! diff --git a/wip.md b/wip.md index d6d883b7..d73dfcdb 100644 --- a/wip.md +++ b/wip.md @@ -9,11 +9,8 @@ Release todos: signed in - Add got it button to bottom of supplier User info modal - User move table alert flash_message for suppliers -- When an employee schedule is added the color is not immediate taken - from the selected employee - User app authorizations - identity -- Add exception notifier Supplier -------- @@ -44,6 +41,8 @@ Supplier User ---- +- BUG when move to another table popup is shown and cancel chosen + nothing happens. Should be redirect to active list - Check test ordering just inactivated product - Implement https://github.com/EddyVerbruggen/Custom-URL-scheme with mozo:// scheme - test met veel producten