Request cleanup
This commit is contained in:
@@ -13,4 +13,4 @@ Qsupplier.App.ApplicationController = Ember.Controller.extend
|
|||||||
#error_supplier.eraseRecord()
|
#error_supplier.eraseRecord()
|
||||||
#@set 'supplier', null
|
#@set 'supplier', null
|
||||||
#@store.find('supplier', 'current').then success, error
|
#@store.find('supplier', 'current').then success, error
|
||||||
@set 'supplier', @store.find('supplier', supplier_id)
|
# @set 'supplier', @store.find('supplier', supplier_id)
|
||||||
|
|||||||
@@ -4,7 +4,13 @@ Qsupplier.App.ApplicationRoute = Ember.Route.extend
|
|||||||
@store.find 'product_category'
|
@store.find 'product_category'
|
||||||
#@store.find 'order', state: 'active' included in list
|
#@store.find 'order', state: 'active' included in list
|
||||||
setupController: (controller)->
|
setupController: (controller)->
|
||||||
|
# @set 'supplier', @store.find('supplier', supplier_id)
|
||||||
|
supplier = @store.push 'supplier', supplier_object
|
||||||
|
controller.set 'supplier', supplier
|
||||||
|
|
||||||
@store.find 'list', state: 'active'
|
@store.find 'list', state: 'active'
|
||||||
|
@store.find 'section'
|
||||||
|
|
||||||
controller.set 'product_categories', @store.all('product_category')
|
controller.set 'product_categories', @store.all('product_category')
|
||||||
actions:
|
actions:
|
||||||
openModal: (modalName, model)->
|
openModal: (modalName, model)->
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Qsupplier.App.IndexRoute = Ember.Route.extend
|
|||||||
# mayby @store.all 'list' will work better!!!! (2014-04-24 a more experienced benjamin :)
|
# mayby @store.all 'list' will work better!!!! (2014-04-24 a more experienced benjamin :)
|
||||||
#orders: @store.filter 'order', -> true
|
#orders: @store.filter 'order', -> true
|
||||||
orders: @store.all 'order'
|
orders: @store.all 'order'
|
||||||
sections: @store.find 'section'
|
sections: @store.all 'section'
|
||||||
setupController: (controller, model)->
|
setupController: (controller, model)->
|
||||||
controller.set('model', model)
|
controller.set('model', model)
|
||||||
#$('#section_selector').on 'change', (-> controller.set('sectionId', $(this).val()))
|
#$('#section_selector').on 'change', (-> controller.set('sectionId', $(this).val()))
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Qsupplier.App.SectionsRoute = Ember.Route.extend
|
Qsupplier.App.SectionsRoute = Ember.Route.extend
|
||||||
model: -> @store.find 'section'
|
model: -> @store.all 'section'
|
||||||
|
|
||||||
setupController: (controller, collection) ->
|
setupController: (controller, collection) ->
|
||||||
controller.set 'content', collection
|
controller.set 'content', collection
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ root = exports ? this
|
|||||||
root.Qsupplier=
|
root.Qsupplier=
|
||||||
watch_events: ->
|
watch_events: ->
|
||||||
faye = new Faye.Client(event_host)
|
faye = new Faye.Client(event_host)
|
||||||
faye.subscribe "/supplier/#{supplier_id}", (e)=>
|
faye.subscribe "/supplier/#{supplier_object.id}", (e)=>
|
||||||
console.log "Event: #{e.event}"
|
console.log "Event: #{e.event}"
|
||||||
console.log e.data
|
console.log e.data
|
||||||
if(e.event == 'new_order')
|
if(e.event == 'new_order')
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ html lang="en"
|
|||||||
= javascript_include_tag "supplier/foundation1/application"
|
= javascript_include_tag "supplier/foundation1/application"
|
||||||
= yield :head
|
= yield :head
|
||||||
/= javascript_include_tag "https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places&language=#{I18n.locale}"
|
/= javascript_include_tag "https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places&language=#{I18n.locale}"
|
||||||
javascript:
|
|
||||||
supplier_id="#{current_supplier.id}";
|
|
||||||
|
|
||||||
body
|
body
|
||||||
= render 'suppliers/application/top_menu'
|
= render 'suppliers/application/top_menu'
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
var $locale = '<%= I18n.locale %>';
|
//var $locale = '<%= I18n.locale %>';
|
||||||
var supplier_id = '<%= current_supplier.id %>';
|
//var supplier_id = '<%= current_supplier.id %>';
|
||||||
|
var supplier_object=<%= SupplierSupplierSerializer.new(current_supplier).as_json(root: false).to_json.html_safe %>;
|
||||||
var data_host = '';
|
var data_host = '';
|
||||||
var event_host = '<%= Qwaiter.event_host %>';
|
var event_host = '<%= Qwaiter.event_host %>';
|
||||||
var datepicker_options = {dateFormat: 'yy-mm-dd', firstDay: <%= current_supplier.week_starts_on_monday? ? 1 : 0 %>};
|
//var datepicker_options = {dateFormat: 'yy-mm-dd', firstDay: <%= current_supplier.week_starts_on_monday? ? 1 : 0 %>};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ class << uc
|
|||||||
end
|
end
|
||||||
uc.instance_variable_set('@_request', uc.request)
|
uc.instance_variable_set('@_request', uc.request)
|
||||||
for action in uc.action_methods
|
for action in uc.action_methods
|
||||||
|
next unless action == 'index'
|
||||||
if File.exist?(Rails.root.join('app', 'views', 'user', "#{action}.html.slim"))
|
if File.exist?(Rails.root.join('app', 'views', 'user', "#{action}.html.slim"))
|
||||||
puts "action #{action} found"
|
puts "action #{action} found"
|
||||||
result = uc.render_to_string(action: action.dup)
|
result = uc.render_to_string(action: action.dup)
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
rm -rf public/assets;
|
rm -rf public/assets;
|
||||||
QWAITER_MOBILE_EXPORT=yes RAILS_ENV=production bundle exec rake assets:precompile;
|
QWAITER_MOBILE_EXPORT=yes RAILS_ENV=production bundle exec rake assets:precompile;
|
||||||
|
rm -rf public/assets/cmtool;
|
||||||
|
rm -rf public/assets/jquery-ui;
|
||||||
|
rm -rf public/assets/admin;
|
||||||
|
rm -rf public/assets/waiter;
|
||||||
|
rm -rf public/assets/supplier;
|
||||||
|
rm -rf public/assets/site;
|
||||||
|
rm -rf public/assets/cartoon;
|
||||||
|
rm -rf public/assets/frames;
|
||||||
QWAITER_MOBILE_EXPORT=yes RAILS_ENV=production TEST_HOST=$1 bundle exec rails runner bin/build_mobile_app.rb;
|
QWAITER_MOBILE_EXPORT=yes RAILS_ENV=production TEST_HOST=$1 bundle exec rails runner bin/build_mobile_app.rb;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ Supplier
|
|||||||
User
|
User
|
||||||
----
|
----
|
||||||
|
|
||||||
|
- Cleanup UserController
|
||||||
- Add product info (look at waiter app)
|
- Add product info (look at waiter app)
|
||||||
- translate join table strings
|
- translate join table strings
|
||||||
- Add order plus button
|
- Add order plus button
|
||||||
@@ -60,4 +61,4 @@ Bugs
|
|||||||
Post release
|
Post release
|
||||||
============
|
============
|
||||||
|
|
||||||
Chromecast app Waiter app Users can disable their own help request (maak ongedaan?) Users can disable their own bill request (maak ongedaan?) Think about extra confirmation box for these requests Supplier section 100% on ember :)
|
- Chromecast app Waiter app Users can disable their own help request (maak ongedaan?) Users can disable their own bill request (maak ongedaan?) Think about extra confirmation box for these requests Supplier section 100% on ember :)
|
||||||
|
|||||||
Reference in New Issue
Block a user