End of day commit
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
Qsupplier.App.TablesIndexController = Ember.ArrayController.extend
|
||||
tables: (-> @get('model')).property('model')
|
||||
@@ -8,6 +8,8 @@ Qsupplier.App.Router.map ->
|
||||
@route '/', queryParams: ['section_id']
|
||||
@resource 'sections', ->
|
||||
@resource 'section', path: ':section_id'
|
||||
@resource 'tables', ->
|
||||
@resource 'table', path: ':table_id'
|
||||
@resource 'lists', ->
|
||||
@resource 'list', path: ':list_id'
|
||||
@route 'settings'
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Qsupplier.App.TablesIndexRoute = Ember.Route.extend
|
||||
model: -> @store.all('table')
|
||||
@@ -0,0 +1 @@
|
||||
= outlet
|
||||
@@ -0,0 +1,18 @@
|
||||
h1=t 'models.plural.table'
|
||||
if tables
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
th=t 'attributes.table.number'
|
||||
th.link=t 'models.section'
|
||||
th.timestamp= t 'attributes.table.created_at'
|
||||
th.actions=t 'helpers.actions.title'
|
||||
tbody
|
||||
each table in tables
|
||||
tr
|
||||
td: a= table.number
|
||||
td.link
|
||||
if table.section
|
||||
= link-to 'sections:section' table.section
|
||||
td.numeric=time table.created_at
|
||||
td.actions
|
||||
@@ -5,6 +5,7 @@ Qsupplier.App.ApplicationView = Ember.View.extend
|
||||
'.top-menu-root': '/'
|
||||
'.top-menu-lists': 'lists'
|
||||
'.top-menu-sections': 'sections'
|
||||
'.top-menu-tables': 'tables'
|
||||
'.top-menu-lists': 'lists'
|
||||
'.supplier-settings-link': 'settings'
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@ class DashboardController < ApplicationController
|
||||
def table_qr_image
|
||||
@table = Table.find(params[:table_id])
|
||||
#code = [get_the_app_url, {table_id: @table.id}.to_json].join('?')
|
||||
code = "q.qwaiter.nl/s?t=#{@table.id}"
|
||||
code = "q.qwaiter.com/s?t=#{@table.id}"
|
||||
size = RQRCode.minimum_qr_size_from_string(code)
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.svg { render qrcode: code, level: :l, unit: 10, table_number: @table.number, qcontainer: true }
|
||||
format.png do
|
||||
#render qrcode: code, level: :l, table_number: @table.number, qcontainer: true
|
||||
#render qrcode: code, level: :l, table_number: @table.number, qcontainer: true
|
||||
size = RQRCode.minimum_qr_size_from_string(code)
|
||||
level = :l
|
||||
qrcode = RQRCode::QRCode.new(code, size: size, level: level)
|
||||
|
||||
@@ -1,35 +1,37 @@
|
||||
- model_class = Table
|
||||
div.page-header= title :index, model_class
|
||||
= form_tag({}, method: :get) do
|
||||
label.number for="filter-from_number" data-t="attributes.table.from_number"
|
||||
input#filter-from_number.number type="number" size=4 value=params[:from_number] name="from_number"
|
||||
label.number for="filter-to_number" data-t="attributes.table.to_number"
|
||||
input#filter-to_number.number type="number" size=4 value=params[:to_number] name="to_number"
|
||||
'
|
||||
= submit_tag 'Filter', class: 'apply-filter'
|
||||
- if @tables.any?
|
||||
= paginate @tables
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
th.link data-t="attributes.table.number"= model_class.human_attribute_name(:number)
|
||||
th.link data-t="models.section"= Section.model_name.human
|
||||
th.timestamp data-t="attributes.table.created_at"= model_class.human_attribute_name(:created_at)
|
||||
th.actions data-t="helpers.actions.title"=t 'helpers.actions.title'
|
||||
tbody
|
||||
- @tables.each do |table|
|
||||
tr
|
||||
td.link= link_to table.number, [:suppliers, table]
|
||||
td.link= link_to_if table.section.present?, table.section.try(:title), [:suppliers, table.section]
|
||||
td.timestamp data-time=table.created_at.try(:utc).try(:iso8601)
|
||||
td.actions
|
||||
= link_to [:edit, :suppliers, table], class: 'table-edit' do
|
||||
span data-title="helpers.links.edit"
|
||||
= link_to [:suppliers, table], method: :delete, data: {confirm: are_you_sure? }, class: 'table-destroy' do
|
||||
span data-title="helpers.links.destroy"
|
||||
- else
|
||||
= no_content_given model_class
|
||||
|
||||
= supplier_form_actions :new, for: :tables do
|
||||
= link_to qr_codes_suppliers_tables_path(params.slice(:from_number, :to_number)), class: 'form-action-qr-codes', target: :_blank
|
||||
span data-t="tables.qr_codes.link"
|
||||
- content_for :head do
|
||||
= javascript_include_tag 'supplier/app/application'
|
||||
/ - model_class = Table
|
||||
/ div.page-header= title :index, model_class
|
||||
/ = form_tag({}, method: :get) do
|
||||
/ label.number for="filter-from_number" data-t="attributes.table.from_number"
|
||||
/ input#filter-from_number.number type="number" size=4 value=params[:from_number] name="from_number"
|
||||
/ label.number for="filter-to_number" data-t="attributes.table.to_number"
|
||||
/ input#filter-to_number.number type="number" size=4 value=params[:to_number] name="to_number"
|
||||
/ '
|
||||
/ = submit_tag 'Filter', class: 'apply-filter'
|
||||
/ - if @tables.any?
|
||||
/ = paginate @tables
|
||||
/ table.table
|
||||
/ thead
|
||||
/ tr
|
||||
/ th.link data-t="attributes.table.number"= model_class.human_attribute_name(:number)
|
||||
/ th.link data-t="models.section"= Section.model_name.human
|
||||
/ th.timestamp data-t="attributes.table.created_at"= model_class.human_attribute_name(:created_at)
|
||||
/ th.actions data-t="helpers.actions.title"=t 'helpers.actions.title'
|
||||
/ tbody
|
||||
/ - @tables.each do |table|
|
||||
/ tr
|
||||
/ td.link= link_to table.number, [:suppliers, table]
|
||||
/ td.link= link_to_if table.section.present?, table.section.try(:title), [:suppliers, table.section]
|
||||
/ td.timestamp data-time=table.created_at.try(:utc).try(:iso8601)
|
||||
/ td.actions
|
||||
/ = link_to [:edit, :suppliers, table], class: 'table-edit' do
|
||||
/ span data-title="helpers.links.edit"
|
||||
/ = link_to [:suppliers, table], method: :delete, data: {confirm: are_you_sure? }, class: 'table-destroy' do
|
||||
/ span data-title="helpers.links.destroy"
|
||||
/ - else
|
||||
/ = no_content_given model_class
|
||||
/
|
||||
/ = supplier_form_actions :new, for: :tables do
|
||||
/ = link_to qr_codes_suppliers_tables_path(params.slice(:from_number, :to_number)), class: 'form-action-qr-codes', target: :_blank
|
||||
/ span data-t="tables.qr_codes.link"
|
||||
|
||||
@@ -12,6 +12,7 @@ Supplier
|
||||
- Side menu
|
||||
- Open shop button nice
|
||||
- Close shop button nice
|
||||
- Title mooi en zichtbaar
|
||||
- Product category looks for foundation
|
||||
- form action button looks (Roos)
|
||||
- Dashboard
|
||||
@@ -33,8 +34,10 @@ User
|
||||
- Cleanup UserController
|
||||
- translate join table strings
|
||||
- test met veel producten
|
||||
- lists#show goto list button better
|
||||
- side menu cleaner
|
||||
- Title zichtbaar
|
||||
- Icons before texts
|
||||
- remove debugger link
|
||||
|
||||
General
|
||||
-------
|
||||
@@ -45,8 +48,7 @@ Bugs
|
||||
----
|
||||
|
||||
- Dragging supplier table from one section to the other fails
|
||||
- Supplier section print qr codes does not give proper images
|
||||
- Supplier tables pagination styling
|
||||
- Supplier tables pagination styling (make ember!)
|
||||
- supplier counters in user view (no supplier in active list?)
|
||||
- supplier main board section selector selects first section option and not the supplier name, which is added using prompt thingy. Maybe setting ApplicationController.active_section in stead of IndexController.active_section for scope locking
|
||||
- Supplier
|
||||
|
||||
Reference in New Issue
Block a user