end of day commit
This commit is contained in:
@@ -5,5 +5,8 @@
|
||||
#= require_directory .
|
||||
#= require_self
|
||||
$ ->
|
||||
# Responsive menu
|
||||
$('.menu-secondary-toggle').click -> $('.nav.secondary').toggleClass('active')
|
||||
|
||||
# Foundation javascript support
|
||||
$(document).foundation()
|
||||
|
||||
@@ -8,7 +8,7 @@ App.Table = DS.Model.extend
|
||||
occupied: attr 'boolean'
|
||||
section: DS.belongsTo('section')
|
||||
product_orders: DS.hasMany('product_order')
|
||||
#active_list: DS.belongsTo('list')
|
||||
active_list: DS.belongsTo('list')
|
||||
#active_list: (->
|
||||
#@get('list')
|
||||
#).property('list')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# http://emberjs.com/guides/models/defining-a-store/
|
||||
DS.RESTAdapter.reopen
|
||||
namespace: 'waiter'
|
||||
#DS.RESTAdapter.reopen
|
||||
#namespace: 'waiter'
|
||||
|
||||
App.ApplicationSerializer = DS.ActiveModelSerializer
|
||||
App.CustomAdapter = DS.RESTAdapter.extend
|
||||
@@ -9,5 +9,8 @@ App.CustomAdapter = DS.RESTAdapter.extend
|
||||
pathForType: (type)->
|
||||
decamelized = Ember.String.decamelize(type)
|
||||
Ember.String.pluralize(decamelized)
|
||||
App.Store = DS.Store.extend
|
||||
adapter: App.CustomAdapter
|
||||
#App.Store = DS.Store.extend
|
||||
#adapter: App.CustomAdapter
|
||||
App.ApplicationStore = DS.Store.extend
|
||||
adapter: DS.ActiveModelAdapter.extend
|
||||
namespace: 'waiter'
|
||||
|
||||
@@ -5,5 +5,5 @@ each product_category in controller
|
||||
ul.product_category-products
|
||||
each product in product_category.products
|
||||
li
|
||||
a{action addProduct product } href="#" = product.name
|
||||
a{action "addProduct" product } href="#" = product.name
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
position: relative
|
||||
list-style: none
|
||||
float: left
|
||||
&.contact
|
||||
float: right
|
||||
a
|
||||
border: 0
|
||||
color: white
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
class ContactFormsController < ApplicationController
|
||||
def create
|
||||
@contact_form = Cmtool::ContactForm.new(contact_form_params)
|
||||
if @contact_form.save
|
||||
redirect_to root_path, notice: t('contact_form.submitted')
|
||||
else
|
||||
redirect_to go_to_path('contact', locale: I18n.locale), alert: @contact_form.errors.full_messages.join(', ')
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def contact_form_params
|
||||
params.require(:contact_form).permit!
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
class Waiter::ApplicationController < Suppliers::ApplicationController
|
||||
layout 'waiter'
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class Waiter::DashboardController < Waiter::ApplicationController
|
||||
skip_load_and_authorize_resource
|
||||
def index
|
||||
|
||||
end
|
||||
end
|
||||
@@ -5,10 +5,10 @@ class WaiterController < ApplicationController
|
||||
end
|
||||
|
||||
def sections
|
||||
json = '{"tables":[{"id":"0903d04a003991835f9f32d1821ee05c","number":102,"width":2.0,"height":2.0,"position_x":14.242294520547945,"position_y":3.1862955032119915,"section_id":"1a9d4cc551dac96f87a21c97ba1e710b","occupied":true,"active_list_id":"1cef487ec268169687f481cb828924c2"},{"id":"0903d04a003991835f9f32d1821efb50","number":100,"width":2.0,"height":2.0,"position_x":6.5,"position_y":6.5,"section_id":"1a9d4cc551dac96f87a21c97ba1e710b","occupied":false,"active_list_id":null},{"id":"1a9d4cc551dac96f87a21c97ba3d15fa","number":11,"width":2.0,"height":2.0,"position_x":6.5,"position_y":1.5,"section_id":"1a9d4cc551dac96f87a21c97ba1e710b","occupied":false,"active_list_id":null},{"id":"0903d04a003991835f9f32d1821ededd","number":103,"width":2.0,"height":2.0,"position_x":9.0,"position_y":6.5,"section_id":"222fcd43b55e397d11d92ccb601e70dc","occupied":false,"active_list_id":null},{"id":"0903d04a003991835f9f32d1821eee07","number":101,"width":2.0,"height":2.0,"position_x":2.3333333333333335,"position_y":6.5,"section_id":"222fcd43b55e397d11d92ccb601e70dc","occupied":false,"active_list_id":null},{"id":"1a9d4cc551dac96f87a21c97ba3d0dbd","number":12,"width":2.0,"height":2.0,"position_x":9.854452054794521,"position_y":2.7054794520547945,"section_id":"222fcd43b55e397d11d92ccb601e70dc","occupied":false,"active_list_id":null},{"id":"1a9d4cc551dac96f87a21c97ba3d2221","number":10,"width":2.0,"height":2.0,"position_x":6.4811643835616435,"position_y":2.0034246575342465,"section_id":"222fcd43b55e397d11d92ccb601e70dc","occupied":false,"active_list_id":null},{"id":"1a9d4cc551dac96f87a21c97ba3d2cf7","number":1,"width":2.0,"height":2.0,"position_x":2.3333333333333335,"position_y":1.5,"section_id":"222fcd43b55e397d11d92ccb601e70dc","occupied":false,"active_list_id":null}],"lists":[{"id":"1cef487ec268169687f481cb828924c2","state":"active","needs_help":true,"needs_payment":false,"is_paid":false,"price":46.8,"table_id":"0903d04a003991835f9f32d1821ee05c","table_number":102,"section_id":"1a9d4cc551dac96f87a21c97ba1e710b","has_active_orders":true,"user_ids":["8afe7cccf1c690e60aa2ace1bf1d8a71"]}],"sections":[{"id":"1a9d4cc551dac96f87a21c97ba1e710b","title":"Ruimte2","path":[[0.0,0.0],[30.0,12.0],[30.0,12.0],[0.0,12.0]],"width":30.0,"height":12.0,"table_ids":["0903d04a003991835f9f32d1821ee05c","0903d04a003991835f9f32d1821efb50","1a9d4cc551dac96f87a21c97ba3d15fa"]},{"id":"222fcd43b55e397d11d92ccb601e70dc","title":"Buiten","path":[[0.0,0.0],[20.0,20.0],[20.0,20.0],[0.0,20.0]],"width":20.0,"height":20.0,"table_ids":["0903d04a003991835f9f32d1821ededd","0903d04a003991835f9f32d1821eee07","1a9d4cc551dac96f87a21c97ba3d0dbd","1a9d4cc551dac96f87a21c97ba3d2221","1a9d4cc551dac96f87a21c97ba3d2cf7"]}]}'
|
||||
sections = current_supplier.sections.include_relation(:tables)
|
||||
respond_to do |format|
|
||||
format.html { redirect_to '/waiter'}
|
||||
format.json { render json: json }
|
||||
format.json { render json: sections, each_serializer: Waiter::SectionSerializer }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
class Waiter::SectionSerializer < Qwaiter::Serializer
|
||||
self.root = :section
|
||||
attributes :title, :path, :width, :height
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
class Waiter::TableSerializer < Qwaiter::Serializer
|
||||
attributes :number, :width, :height, :position_x, :position_y, :section_id, :needs_help
|
||||
end
|
||||
@@ -3,6 +3,6 @@ h2= t('devise.passwords.title')
|
||||
= devise_error_messages!
|
||||
= f.row :email do
|
||||
.form-label= f.label :email, class: 'control-label'
|
||||
.form-field= f.email_field :email
|
||||
.form-field= f.email_field :email, autofocus: true
|
||||
.form-row.form-actions= f.submit t('devise.passwords.button'), class: 'button'
|
||||
= render "devise/links"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
h1.page-title= t 'devise.registrations.title'
|
||||
.row
|
||||
.small-12.columns
|
||||
ul
|
||||
@@ -10,28 +11,28 @@
|
||||
li Download the app on your phone to test as a user
|
||||
li Scan a qr-code from you restaurant screen with your phone, and you can test ordering products!!!
|
||||
.row
|
||||
.large-7.large-offset-1.columns
|
||||
.large-8.large-offset-1.columns
|
||||
= form_for @new_supplier do |f|
|
||||
= f.row :supplier_name
|
||||
.large-4.columns= f.label :supplier_name
|
||||
.large-4.columns= f.text_field :supplier_name
|
||||
.large-4.columns= f.error_message :supplier_name
|
||||
.large-6.columns= f.text_field :supplier_name, autofocus: true
|
||||
.large-2.columns= f.error_message :supplier_name
|
||||
= f.row :email
|
||||
.large-4.columns= f.label :email
|
||||
.large-4.columns
|
||||
.large-6.columns
|
||||
- if @new_supplier.current_employee.present?
|
||||
= @new_supplier.current_employee.email
|
||||
- else
|
||||
= f.email_field :email
|
||||
.large-4.columns= f.error_message :email
|
||||
.large-2.columns= f.error_message :email
|
||||
- if not @new_supplier.current_employee.present?
|
||||
= f.row :password
|
||||
.large-4.columns= f.label :password
|
||||
.large-4.columns= f.text_field :password
|
||||
.large-4.columns= f.password_field :password
|
||||
.large-4.columns= f.error_message :password
|
||||
= f.row :password_confirmation
|
||||
.large-4.columns= f.label :password_confirmation
|
||||
.large-4.columns= f.text_field :password_confirmation
|
||||
.large-4.columns= f.password_field :password_confirmation
|
||||
.large-4.columns= f.error_message :password_confirmation
|
||||
|
||||
.form-actions
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
.row
|
||||
.large-9.columns
|
||||
.row: .small-12.columns=raw @page.body
|
||||
= form_for Cmtool::ContactForm.new, url: contact_forms_path, html: {class: 'contact'} do |f|
|
||||
.row
|
||||
.large-4.columns: label Uw naam:
|
||||
.large-2.columns= f.select :gender, [['Dhr.', 'male'], ['Mevr.', 'female']]
|
||||
.large-6.columns.end= f.text_field :name
|
||||
.row
|
||||
.small-12.columns.end
|
||||
label Uw vraag of opmerking:*
|
||||
br
|
||||
= f.text_area :body, cols: 32, rows: 8
|
||||
.row
|
||||
.large-4.columns: label Uw e-mail adres:*
|
||||
.large-8.columns.end= f.email_field :email
|
||||
.row
|
||||
.large-12.columns
|
||||
= f.submit 'verstuur', class: 'button'
|
||||
br
|
||||
span * Verplicht veld
|
||||
.large-3.columns== @page.sidebar
|
||||
@@ -6,7 +6,7 @@ h2= t('devise.sign_in.title')
|
||||
.form-field= f.email_field :email
|
||||
= f.row :email do
|
||||
.form-label= f.label :password
|
||||
.form-field= f.password_field :password
|
||||
.form-field= f.password_field :password, autofocus: true
|
||||
.form-row
|
||||
= f.label :remember_me do
|
||||
= f.check_box :remember_me
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
a.menu-secondary-toggle href="#"
|
||||
span
|
||||
ul.nav
|
||||
li[class=(current_page?(controller: '/pages', action: 'home') ? :active : nil)]= link_to find_page('home').try(:menu_text), locale_root_path
|
||||
li[class=(current_page?(controller: '/pages', action: 'show', name: 'about') ? :active : nil)]= link_to find_page('about').try(:menu_text), page_path('about')
|
||||
li[class=(current_page?(controller: '/pages', action: 'home') ? ['home', :active] : ['home'])]= link_to find_page('home').try(:menu_text), locale_root_path
|
||||
li[class=(current_page?(controller: '/pages', action: 'show', name: 'about') ? ['about', :active] : ['about'])]= link_to find_page('about').try(:menu_text), page_path('about')
|
||||
ul.nav.secondary
|
||||
- Page.menu_roots.each do |page|
|
||||
li[class=(current_page?(controller: '/pages', action: 'show', name: page.name) ? :active : nil)]= link_to page.menu_text, page_path(page.name)
|
||||
li[class=(current_page?(controller: '/pages', action: 'show', name: page.name) ? [page.name, :active] : [page.name])]= link_to page.menu_text, page_path(page.name)
|
||||
|
||||
Reference in New Issue
Block a user