Fix closing list problem not unlinking the table active list
This commit is contained in:
@@ -21,6 +21,7 @@ App.List = DS.Model.extend
|
||||
markClosed: ->
|
||||
@set('state', 'closed')
|
||||
#@set 'has_active_orders', false
|
||||
@set 'table', null
|
||||
@markHelped()
|
||||
@markIsPaid()
|
||||
markHelped: ->
|
||||
|
||||
@@ -32,3 +32,7 @@ App.Order = DS.Model.extend
|
||||
display: (->
|
||||
@get('product_orders').map((po) -> "#{po.get('quantity')} x #{po.get('product.name')}").join(', ')
|
||||
).property('product_orders.@each.quantity', 'product_orders.@each.product.@each.name')
|
||||
|
||||
display_tag: (->
|
||||
"<span class='display order-display order-#{@get('id')} #{@get('state')}'><span class='pre-display'></span>#{@get('display')}<span class='post-display'></span></span>".htmlSafe()
|
||||
).property('display', 'state')
|
||||
|
||||
@@ -6,10 +6,15 @@
|
||||
if table.active_list
|
||||
div.table-actions
|
||||
.title= table.number
|
||||
.table-action-row
|
||||
= view "mark-list-helped-button" contentBinding="table.active_list"
|
||||
= view "close-list-button" contentBinding="table.active_list"
|
||||
.table-action-row=currency table.active_list.total
|
||||
if table.active_list
|
||||
.table-action-row
|
||||
= view "mark-list-helped-button" contentBinding="table.active_list"
|
||||
= view "close-list-button" contentBinding="table.active_list"
|
||||
each order in table.active_list.active_orders
|
||||
.table-action-row= order.display_tag
|
||||
.table-action-row.total
|
||||
= link-to "list" table.active_list
|
||||
=currency table.active_list.total
|
||||
/.table-action-row
|
||||
a{action "editTable" table}: span.fa.fa-lg.fa-wrench
|
||||
each user in table.active_list.users
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
if content.list.needs_help
|
||||
li
|
||||
button.btn.btn-info.btn-small id="list-is-helped-button-#{content.list.id}" onclick="Qsupplier.mark_list_as_helped('{{content.list.id}}')" {{t "list.is_helped_button"}}
|
||||
button.btn.btn-warning.btn-small class="of-list-#{content.list.id}" onclick="Qsupplier.close_list('#{content.list.id}')" data-t="list.close_list"
|
||||
li
|
||||
a data-t='section.tables_view.table_actions.got_to_table' href="suppliers_table_path(@table)" {{t 'section.tables_view.table_actions.got_to_table'}}
|
||||
@@ -1,3 +0,0 @@
|
||||
App.TableActionsView = Ember.Component.extend
|
||||
tagName: 'ul'
|
||||
templateName: 'table_actions'
|
||||
@@ -102,6 +102,15 @@
|
||||
background-color: #aaa
|
||||
.table-action-row
|
||||
margin-top: 10px
|
||||
&.total
|
||||
font-size: 1.2em
|
||||
font-weight: bold
|
||||
.order-display
|
||||
&.active
|
||||
.post-display
|
||||
margin-left: 10px
|
||||
@extend .fa
|
||||
@extend .fa-check
|
||||
.table-settings
|
||||
width: 200px
|
||||
height: 30px
|
||||
|
||||
@@ -74,6 +74,7 @@ step "the section table should not have any active list markings anymore" do
|
||||
css_class.should_not include 'occupied'
|
||||
css_class.should_not include 'active_order'
|
||||
css_class.should_not include 'needs_payment'
|
||||
ember_find('table', @table.id)['active_list_id'].should_not be_present
|
||||
end
|
||||
|
||||
step "I should be redirected to the supplier section view" do
|
||||
|
||||
@@ -16,8 +16,6 @@ User
|
||||
----
|
||||
|
||||
- test met veel producten
|
||||
- splash screen
|
||||
- ios
|
||||
- product variants
|
||||
- remove active orders on list close
|
||||
|
||||
@@ -32,7 +30,6 @@ General
|
||||
|
||||
- split off faye server
|
||||
- split off counter server
|
||||
- rails runner Supplier.reset_counters on start!
|
||||
|
||||
Post release
|
||||
============
|
||||
@@ -61,13 +58,8 @@ Promotion
|
||||
Supplier
|
||||
--------
|
||||
|
||||
- Counters display similar to users
|
||||
- tables#index Make table actions available
|
||||
- Products to ember
|
||||
- Product categories to ember
|
||||
- Event stream to ember
|
||||
- Section view, add go to list button right next to edit section button
|
||||
- Replace product categories jquery sortable by ember version
|
||||
- https://github.com/buytruckload/geonames_api
|
||||
- Section view
|
||||
- add order vinkjes (active, delivered) management to table actions (post release)
|
||||
|
||||
Reference in New Issue
Block a user