Merge branch 'master' of uflows.com:/var/git/qwaiter
This commit is contained in:
@@ -16,7 +16,6 @@ App.List = DS.Model.extend
|
||||
table: DS.belongsTo('table')
|
||||
join_requests: DS.hasMany('join_request')
|
||||
users: DS.hasMany('user')
|
||||
supplier_name: (-> @get('cached_supplier_name') or @get('supplier.name')).property('cached_supplier_name', 'supplier.name')
|
||||
|
||||
is_extended_version: ->
|
||||
@get('extended_version')
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
.row
|
||||
h2=t 'models.plural.list'
|
||||
each list in lists: = view "list-index" contentBinding='list'
|
||||
each list in lists
|
||||
= view "list-index" content=list
|
||||
.clearfix
|
||||
if hasMore
|
||||
button{action "showMore"}=t 'lists.show_more'
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
span.created_at=time list.created_at
|
||||
span.price.currency= currency list.price
|
||||
span.name= list.supplier_name
|
||||
span.name= list.cached_supplier_name
|
||||
|
||||
@@ -22,6 +22,7 @@ module Users
|
||||
|
||||
def show
|
||||
list = List.find(params[:id])
|
||||
render json: {}, status: :not_found and return unless list.present? && Array.wrap(list.user_ids).include?(current_user.id)
|
||||
[list].include_relation(supplier: {product_categories: :products}, orders: :product_orders) # table also when it is a real array :)
|
||||
render json: list, serializer: UserExtendedListSerializer
|
||||
end
|
||||
|
||||
@@ -9,12 +9,16 @@ class UserExtendedListSerializer < Qwaiter::Serializer
|
||||
# user ids for facebook pictures
|
||||
self.root = :list
|
||||
attributes :extended_version, :state, :needs_help, :needs_payment, :user_requests_closing, :is_paid, :price,
|
||||
:table_id, :table_number, :section_id, :user_ids, :supplier_id, :closed_at
|
||||
:table_id, :table_number, :section_id, :user_ids, :supplier_id, :closed_at, :cached_supplier_name
|
||||
#:supplier_orders_in_process_count, :supplier_orders_placed_count
|
||||
|
||||
def has_active_orders
|
||||
object.has_active_orders?
|
||||
end
|
||||
|
||||
def cached_supplier_name
|
||||
object.supplier.name
|
||||
end
|
||||
has_many :orders
|
||||
#has_many :product_categories
|
||||
has_one :table, serializer: UserExtendedTableSerializer # this one add a lot of stuff
|
||||
|
||||
@@ -12,8 +12,8 @@ h2= t('devise.sessions.title')
|
||||
= f.label :remember_me do
|
||||
= f.check_box :remember_me
|
||||
|
|
||||
= t('devise.sessions.remember_me')
|
||||
= t('devise.sign_in.remember_me')
|
||||
.control-group
|
||||
.controls
|
||||
= f.submit t('devise.sessions.button'), class: 'btn btn-primary'
|
||||
= f.submit t('devise.sign_in.button'), class: 'button'
|
||||
= render "links"
|
||||
|
||||
+16
-24
@@ -4,18 +4,10 @@ en:
|
||||
hello: "Hello world"
|
||||
page:
|
||||
not_found: "404 The page you were looking for could not be found"
|
||||
menu:
|
||||
home: Home
|
||||
about: About
|
||||
bars_restaurants: 'Bars & Restaurants'
|
||||
clients: Gebruikers
|
||||
enquete: Enquete
|
||||
cartoon: Cartoon
|
||||
contact: Contact
|
||||
helpers:
|
||||
links:
|
||||
are_you_sure: 'Are you sure?'
|
||||
place_order: Place order
|
||||
place_order: Place ${models.order}
|
||||
show_active_list: Show %{list}
|
||||
edit: Edit
|
||||
show: Show
|
||||
@@ -37,22 +29,22 @@ en:
|
||||
title: Actions
|
||||
#depricated, moved to user
|
||||
messages:
|
||||
cannot_order_on_non_active_list: You cannot place an order on a closed list
|
||||
no_active_list: There is no active list
|
||||
cannot_order_on_non_active_list: You cannot place an ${models.order} on a closed ${models.list}
|
||||
no_active_list: There is no active ${models.list}
|
||||
order_is_placed: Your order has been received in good order
|
||||
new_list_created: A new ${models.list} has been created
|
||||
the_list_has_been_closed: The list has been closed
|
||||
illegal_history_list_attempt: The list you want to access is not yours
|
||||
table_not_found: The requested table cannot be found or is not given
|
||||
table_is_occupied: The table you want to sit on is already occupied
|
||||
table_is_reserved: The table you want to sit on is reserved by someone else
|
||||
table_is_closed: The table you want to sit on is not available for service
|
||||
supplier_is_closed: The owner of this table is currently not handling orders
|
||||
join_request_rejected: Your request to join the table has been rejected
|
||||
join_request_approved: Your request to join the table has been approved
|
||||
table_is_from_other_supplier: You cannot move to another table when you have an open list
|
||||
moved_to_another_table: You successfully moved to another table
|
||||
cannot_identify_table: The application cannot determine the table number
|
||||
the_list_has_been_closed: The ${models.list} has been closed
|
||||
illegal_history_list_attempt: The ${models.list} you want to access is not yours
|
||||
table_not_found: The requested ${models.table} cannot be found or is not given
|
||||
table_is_occupied: The ${models.table} you want to sit on is already occupied
|
||||
table_is_reserved: The ${models.table} you want to sit on is reserved by someone else
|
||||
table_is_closed: The ${models.table} you want to sit on is not available for service
|
||||
supplier_is_closed: The owner of this ${models.table} is currently not handling orders
|
||||
join_request_rejected: Your request to join the ${models.table} has been rejected
|
||||
join_request_approved: Your request to join the ${models.table} has been approved
|
||||
table_is_from_other_supplier: You cannot move to another ${models.table} when you have an open ${models.list}
|
||||
moved_to_another_table: You successfully moved to another ${models.table}
|
||||
cannot_identify_table: The application cannot determine the ${models.table} ${attributes.table.number}
|
||||
action:
|
||||
index:
|
||||
label: Listing %{models}
|
||||
@@ -69,7 +61,7 @@ en:
|
||||
destroy:
|
||||
successfull: '%{model} is successfully destroyed'
|
||||
table:
|
||||
is_occupied: This table is occupied
|
||||
is_occupied: This ${models.table} is occupied
|
||||
general:
|
||||
boolean:
|
||||
boolean_yes: "Yes"
|
||||
|
||||
@@ -3,14 +3,6 @@
|
||||
nl:
|
||||
page:
|
||||
not_found: "404 de pagina die u probeert te bereiken kan niet worden gevonden"
|
||||
menu:
|
||||
home: Home
|
||||
about: Over mozo.bar
|
||||
bars_restaurants: 'Horeca'
|
||||
clients: Gebruikers
|
||||
enquete: Enquete
|
||||
cartoon: Cartoon
|
||||
contact: Contact
|
||||
helpers:
|
||||
links:
|
||||
are_you_sure: 'Weet je dit zeker?'
|
||||
|
||||
Reference in New Issue
Block a user