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']
|
@route '/', queryParams: ['section_id']
|
||||||
@resource 'sections', ->
|
@resource 'sections', ->
|
||||||
@resource 'section', path: ':section_id'
|
@resource 'section', path: ':section_id'
|
||||||
|
@resource 'tables', ->
|
||||||
|
@resource 'table', path: ':table_id'
|
||||||
@resource 'lists', ->
|
@resource 'lists', ->
|
||||||
@resource 'list', path: ':list_id'
|
@resource 'list', path: ':list_id'
|
||||||
@route 'settings'
|
@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-root': '/'
|
||||||
'.top-menu-lists': 'lists'
|
'.top-menu-lists': 'lists'
|
||||||
'.top-menu-sections': 'sections'
|
'.top-menu-sections': 'sections'
|
||||||
|
'.top-menu-tables': 'tables'
|
||||||
'.top-menu-lists': 'lists'
|
'.top-menu-lists': 'lists'
|
||||||
'.supplier-settings-link': 'settings'
|
'.supplier-settings-link': 'settings'
|
||||||
|
|
||||||
|
|||||||
@@ -26,13 +26,13 @@ class DashboardController < ApplicationController
|
|||||||
def table_qr_image
|
def table_qr_image
|
||||||
@table = Table.find(params[:table_id])
|
@table = Table.find(params[:table_id])
|
||||||
#code = [get_the_app_url, {table_id: @table.id}.to_json].join('?')
|
#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)
|
size = RQRCode.minimum_qr_size_from_string(code)
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
format.svg { render qrcode: code, level: :l, unit: 10, table_number: @table.number, qcontainer: true }
|
format.svg { render qrcode: code, level: :l, unit: 10, table_number: @table.number, qcontainer: true }
|
||||||
format.png do
|
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)
|
size = RQRCode.minimum_qr_size_from_string(code)
|
||||||
level = :l
|
level = :l
|
||||||
qrcode = RQRCode::QRCode.new(code, size: size, level: level)
|
qrcode = RQRCode::QRCode.new(code, size: size, level: level)
|
||||||
|
|||||||
@@ -1,35 +1,37 @@
|
|||||||
- model_class = Table
|
- content_for :head do
|
||||||
div.page-header= title :index, model_class
|
= javascript_include_tag 'supplier/app/application'
|
||||||
= form_tag({}, method: :get) do
|
/ - model_class = Table
|
||||||
label.number for="filter-from_number" data-t="attributes.table.from_number"
|
/ div.page-header= title :index, model_class
|
||||||
input#filter-from_number.number type="number" size=4 value=params[:from_number] name="from_number"
|
/ = form_tag({}, method: :get) do
|
||||||
label.number for="filter-to_number" data-t="attributes.table.to_number"
|
/ label.number for="filter-from_number" data-t="attributes.table.from_number"
|
||||||
input#filter-to_number.number type="number" size=4 value=params[:to_number] name="to_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"
|
||||||
= submit_tag 'Filter', class: 'apply-filter'
|
/ input#filter-to_number.number type="number" size=4 value=params[:to_number] name="to_number"
|
||||||
- if @tables.any?
|
/ '
|
||||||
= paginate @tables
|
/ = submit_tag 'Filter', class: 'apply-filter'
|
||||||
table.table
|
/ - if @tables.any?
|
||||||
thead
|
/ = paginate @tables
|
||||||
tr
|
/ table.table
|
||||||
th.link data-t="attributes.table.number"= model_class.human_attribute_name(:number)
|
/ thead
|
||||||
th.link data-t="models.section"= Section.model_name.human
|
/ tr
|
||||||
th.timestamp data-t="attributes.table.created_at"= model_class.human_attribute_name(:created_at)
|
/ th.link data-t="attributes.table.number"= model_class.human_attribute_name(:number)
|
||||||
th.actions data-t="helpers.actions.title"=t 'helpers.actions.title'
|
/ th.link data-t="models.section"= Section.model_name.human
|
||||||
tbody
|
/ th.timestamp data-t="attributes.table.created_at"= model_class.human_attribute_name(:created_at)
|
||||||
- @tables.each do |table|
|
/ th.actions data-t="helpers.actions.title"=t 'helpers.actions.title'
|
||||||
tr
|
/ tbody
|
||||||
td.link= link_to table.number, [:suppliers, table]
|
/ - @tables.each do |table|
|
||||||
td.link= link_to_if table.section.present?, table.section.try(:title), [:suppliers, table.section]
|
/ tr
|
||||||
td.timestamp data-time=table.created_at.try(:utc).try(:iso8601)
|
/ td.link= link_to table.number, [:suppliers, table]
|
||||||
td.actions
|
/ td.link= link_to_if table.section.present?, table.section.try(:title), [:suppliers, table.section]
|
||||||
= link_to [:edit, :suppliers, table], class: 'table-edit' do
|
/ td.timestamp data-time=table.created_at.try(:utc).try(:iso8601)
|
||||||
span data-title="helpers.links.edit"
|
/ td.actions
|
||||||
= link_to [:suppliers, table], method: :delete, data: {confirm: are_you_sure? }, class: 'table-destroy' do
|
/ = link_to [:edit, :suppliers, table], class: 'table-edit' do
|
||||||
span data-title="helpers.links.destroy"
|
/ span data-title="helpers.links.edit"
|
||||||
- else
|
/ = link_to [:suppliers, table], method: :delete, data: {confirm: are_you_sure? }, class: 'table-destroy' do
|
||||||
= no_content_given model_class
|
/ span data-title="helpers.links.destroy"
|
||||||
|
/ - else
|
||||||
= supplier_form_actions :new, for: :tables do
|
/ = no_content_given model_class
|
||||||
= 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"
|
/ = 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
|
- Side menu
|
||||||
- Open shop button nice
|
- Open shop button nice
|
||||||
- Close shop button nice
|
- Close shop button nice
|
||||||
|
- Title mooi en zichtbaar
|
||||||
- Product category looks for foundation
|
- Product category looks for foundation
|
||||||
- form action button looks (Roos)
|
- form action button looks (Roos)
|
||||||
- Dashboard
|
- Dashboard
|
||||||
@@ -33,8 +34,10 @@ User
|
|||||||
- Cleanup UserController
|
- Cleanup UserController
|
||||||
- translate join table strings
|
- translate join table strings
|
||||||
- test met veel producten
|
- test met veel producten
|
||||||
- lists#show goto list button better
|
|
||||||
- side menu cleaner
|
- side menu cleaner
|
||||||
|
- Title zichtbaar
|
||||||
|
- Icons before texts
|
||||||
|
- remove debugger link
|
||||||
|
|
||||||
General
|
General
|
||||||
-------
|
-------
|
||||||
@@ -45,8 +48,7 @@ Bugs
|
|||||||
----
|
----
|
||||||
|
|
||||||
- Dragging supplier table from one section to the other fails
|
- Dragging supplier table from one section to the other fails
|
||||||
- Supplier section print qr codes does not give proper images
|
- Supplier tables pagination styling (make ember!)
|
||||||
- Supplier tables pagination styling
|
|
||||||
- supplier counters in user view (no supplier in active list?)
|
- 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 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
|
- Supplier
|
||||||
|
|||||||
Reference in New Issue
Block a user