Mace moving table in supplier main board work and specced
This commit is contained in:
@@ -9,7 +9,7 @@ Qsupplier.App.List = DS.Model.extend
|
||||
has_active_orders: attr 'boolean'
|
||||
price: attr 'number'
|
||||
closed_at: DS.attr('date')
|
||||
table_number: attr 'number'
|
||||
#table_number: attr 'number'
|
||||
table: DS.belongsTo('table', inverse: 'active_list')
|
||||
#users: DS.hasMany('user', inverse: 'active_list')
|
||||
orders: DS.hasMany('order')
|
||||
|
||||
@@ -4,7 +4,7 @@ td.status-icons
|
||||
if view.content.needs_payment
|
||||
|
|
||||
span.icon.needs-payment
|
||||
td.numeric.table_number {{view.content.table_number}}
|
||||
td.numeric.table_number {{view.content.table.number}}
|
||||
td.section_title {{view.content.section.title}}
|
||||
td.currency.total_list_amount {{currency view.content.price}}
|
||||
td.actions
|
||||
|
||||
@@ -3,7 +3,7 @@ td.status-icons
|
||||
td {{view.content.display}}
|
||||
td.numeric.table_number
|
||||
view Qsupplier.App.ActiveOrderTableNumberView contextBinding="view.content"
|
||||
td.section_title {{view.content.section.title}}
|
||||
td.section_title {{view.content.list.section.title}}
|
||||
td.currency {{currency view.content.total }}
|
||||
td.actions
|
||||
if view.content.placed
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
.number= list.table_number
|
||||
.number= list.table.number
|
||||
.extra-list-info
|
||||
img.spinner src="/assets/spinner.gif" alt=""
|
||||
|
||||
@@ -29,10 +29,8 @@
|
||||
view Ember.TextField valueBinding="width" class="dimension section-edit-width-field"
|
||||
span x
|
||||
view Ember.TextField valueBinding="height" class="dimension section-edit-height-field"
|
||||
a.btn.btn-mini.section-normal-mode-button{ action finishEditable }
|
||||
span.icon-ok
|
||||
a.section-normal-mode-button{ action finishEditable }: span
|
||||
else
|
||||
a.btn.btn-mini.section-edit-mode-button{ action makeEditable }
|
||||
span.icon-pencil
|
||||
a.section-edit-mode-button{ action makeEditable }: span
|
||||
each table in tables
|
||||
view 'Qsupplier.App.SectionTableView' contentBinding="table"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
.section-edit-mode-button
|
||||
span
|
||||
@extend .fa
|
||||
@extend .fa-lg
|
||||
@extend .fa-edit
|
||||
.section-normal-mode-button
|
||||
span
|
||||
@extend .fa
|
||||
@extend .fa-lg
|
||||
@extend .fa-save
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
@import ./qforms
|
||||
@import ./menu_main
|
||||
@import ./menu_side
|
||||
@import ./qsections
|
||||
@import ./product_categories
|
||||
@import ./products_preview
|
||||
@import ./qtables
|
||||
|
||||
+1
-1
@@ -211,7 +211,7 @@ class List
|
||||
end
|
||||
# user performs a client side refresh
|
||||
broadcast_users 'list_changed_table', list_id: id #, from_table_id: from_table, to_table_id: to_table.id
|
||||
broadcast_supplier supplier_id, 'list_changed_table', list: as_json, section_title: to_table.section.try(:title), from_table_id: from_table
|
||||
broadcast_supplier supplier_id, 'list_changed_table', ListSerializer.new(list).as_json
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ class User
|
||||
end
|
||||
|
||||
def self.from_omniauth(auth)
|
||||
binding.pry
|
||||
#binding.pry
|
||||
end
|
||||
|
||||
def list_is_closed!
|
||||
|
||||
@@ -2,7 +2,7 @@ class SupplierExtendedListSerializer < Qwaiter::Serializer
|
||||
# user ids for facebook pictures
|
||||
embed :ids, include: true
|
||||
root 'list'
|
||||
attributes :state, :needs_help, :needs_payment, :user_requests_closing, :is_paid, :price, :table_id, :table_number, :section_id, :supplier_id, :closed_at #, :has_active_orders
|
||||
attributes :state, :needs_help, :needs_payment, :user_requests_closing, :is_paid, :price, :table_id, :section_id, :supplier_id, :closed_at #, :has_active_orders
|
||||
|
||||
#def has_active_orders
|
||||
#object.has_active_orders?
|
||||
|
||||
@@ -128,15 +128,17 @@ step "I click on the section main board section jumper" do
|
||||
end
|
||||
|
||||
step "the active list changes to another table in another section" do
|
||||
@other_section = create :section, supplier: @supplier
|
||||
@other_section = create :section, supplier: @supplier, title: 'New Section'
|
||||
@other_table = create :table, section: @other_section, supplier: @supplier, number: 65
|
||||
@list.move_to_table! @other_table
|
||||
end
|
||||
|
||||
step "the supplier main board table number should be updated to the new table number" do
|
||||
binding.pry
|
||||
expect( find(".list-row-#{@list.id} .table_number").text ).to eq "65"
|
||||
expect( find(".order-row-#{@list.orders.first.id} .table_number").text ).to eq "65"
|
||||
end
|
||||
|
||||
step "the supplier main board section name should be updated to the new section" do
|
||||
|
||||
expect( find(".list-row-#{@list.id} .section_title").text ).to eq "New Section"
|
||||
expect( find(".order-row-#{@list.orders.first.id} .section_title").text ).to eq "New Section"
|
||||
end
|
||||
|
||||
@@ -20,6 +20,11 @@ Release
|
||||
- Add list link
|
||||
- List
|
||||
- Translate and prettify got to lists link helpers.links.index
|
||||
- Section table view
|
||||
- click on table side menu buttons
|
||||
- Do not show side menu if there is no active list
|
||||
- Edit mode section is out of order and styling
|
||||
- Add border around a section
|
||||
- Settings
|
||||
- html structure
|
||||
- styling
|
||||
@@ -35,6 +40,10 @@ Release
|
||||
- lists#show goto list button better
|
||||
- side menu cleaner
|
||||
|
||||
General:
|
||||
- search for class btn and replace with font awesome correct styling if
|
||||
needed
|
||||
|
||||
Post release
|
||||
------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user