Progress and cleanup code
This commit is contained in:
@@ -14,7 +14,7 @@ if list.closed_at
|
|||||||
.display-field: App.CloseListButtonView content=list
|
.display-field: App.CloseListButtonView content=list
|
||||||
.row
|
.row
|
||||||
each user in list.users
|
each user in list.users
|
||||||
img.facebook-image src="http://graph.facebook.com/#{unbound user.facebook_id}/picture?type=square" alt="f"
|
=user.facebook_image_tag
|
||||||
if list.sorted_orders
|
if list.sorted_orders
|
||||||
.list-orders-container
|
.list-orders-container
|
||||||
each order in list.sorted_orders
|
each order in list.sorted_orders
|
||||||
|
|||||||
@@ -55,14 +55,3 @@ App.SectionTableView = Ember.View.extend DragNDrop.Draggable,
|
|||||||
@$el.on 'click', =>
|
@$el.on 'click', =>
|
||||||
# duplication of .table-actions because variable gets unshadowed
|
# duplication of .table-actions because variable gets unshadowed
|
||||||
@$('.table-actions').toggle() if @$el.hasClass('occupied') and not @get('controller.editmode')
|
@$('.table-actions').toggle() if @$el.hasClass('occupied') and not @get('controller.editmode')
|
||||||
#@$el.qtip
|
|
||||||
#content:
|
|
||||||
#text: content
|
|
||||||
#title: title.html()
|
|
||||||
#style:
|
|
||||||
#classes: 'qtip-wiki qtip-light qtip-shadow'
|
|
||||||
#show: 'click'
|
|
||||||
#hide:
|
|
||||||
#fixed: true
|
|
||||||
#delay: 500
|
|
||||||
#prerender: true
|
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
|
//= require modernizr
|
||||||
//= require jquery
|
//= require jquery
|
||||||
//= require jquery_ujs
|
//= require jquery_ujs
|
||||||
//= require jquery-ui/sortable
|
//= require jquery-ui/sortable
|
||||||
//= require modernizr
|
|
||||||
// require foundation FOUNDATION 5 JAVASCRIPT IMPLEMENTATIONS AND EMBER ARE NOT COMPATIBLE, FOUNDATION IS TOO SIMPLISTIC AT THE MOMENT AND DESTROYS DOM EVENTS
|
// require foundation FOUNDATION 5 JAVASCRIPT IMPLEMENTATIONS AND EMBER ARE NOT COMPATIBLE, FOUNDATION IS TOO SIMPLISTIC AT THE MOMENT AND DESTROYS DOM EVENTS
|
||||||
//= require js-routes
|
//= require js-routes
|
||||||
|
//= require moment
|
||||||
//= require translations
|
//= require translations
|
||||||
//= require qwaiter
|
// require qwaiter
|
||||||
//= require ./qsupplier
|
//= require ./qsupplier
|
||||||
//= require handlebars
|
//= require handlebars
|
||||||
//= require faye
|
//= require faye
|
||||||
//= require ./base
|
//= require ./base
|
||||||
//= require qtip
|
// require qtip # was used for table actions in section view, now done by EMBER
|
||||||
//= require pickdate
|
//= require pickdate
|
||||||
//= require_directory .
|
//= require_directory .
|
||||||
//= require_self
|
//= require_self
|
||||||
//= require moment
|
|
||||||
var Qstorage = localStorage;
|
var Qstorage = localStorage;
|
||||||
|
|
||||||
$.extend($translations.en, <%= I18n.t('supplier', locale: :en).to_json %>);
|
$.extend($translations.en, <%= I18n.t('supplier', locale: :en).to_json %>);
|
||||||
$.extend($translations.nl, <%= I18n.t('supplier', locale: :nl).to_json %>);
|
$.extend($translations.nl, <%= I18n.t('supplier', locale: :nl).to_json %>);
|
||||||
|
|
||||||
String.prototype.capitalize = function() {
|
String.prototype.capitalize = function() { return this.charAt(0).toUpperCase() + this.slice(1); }
|
||||||
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
||||||
}
|
|
||||||
window.time_zones = <%= ActiveSupport::TimeZone.all.map{|tz| {name: tz.name, formatted: "GMT#{tz.formatted_offset} #{tz.name}"}}.to_json.html_safe %>;
|
window.time_zones = <%= ActiveSupport::TimeZone.all.map{|tz| {name: tz.name, formatted: "GMT#{tz.formatted_offset} #{tz.name}"}}.to_json.html_safe %>;
|
||||||
window.countries = <%= IsoCountryCodes.all.map{|cc| {name: cc.name}}.to_json.html_safe %>;
|
window.countries = <%= IsoCountryCodes.all.map{|cc| {name: cc.name}}.to_json.html_safe %>;
|
||||||
|
|
||||||
@@ -41,7 +41,12 @@ function redirect_to(mapping, variables){
|
|||||||
window.location = path_mapping[mapping] + '?' + vars.join('&')
|
window.location = path_mapping[mapping] + '?' + vars.join('&')
|
||||||
}
|
}
|
||||||
function currency(num) {
|
function currency(num) {
|
||||||
return Qwaiter.currency(num);
|
// num = 0.0 if isNaN(num) || num == '' || num == null
|
||||||
|
// '€ ' + parseFloat(num).toFixed(2)
|
||||||
|
if (isNaN(num) || num === '' || num === null) {
|
||||||
|
num = 0.0;
|
||||||
|
}
|
||||||
|
return '€ ' + parseFloat(num).toFixed(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
Handlebars.registerHelper('t', function(tlocation) {
|
Handlebars.registerHelper('t', function(tlocation) {
|
||||||
|
|||||||
@@ -14,3 +14,4 @@ aside.side-menu
|
|||||||
.supplier-close-shop
|
.supplier-close-shop
|
||||||
+alert($bg: $alert-color, $radius: true)
|
+alert($bg: $alert-color, $radius: true)
|
||||||
padding: 3px
|
padding: 3px
|
||||||
|
margin-right: 20px
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ $side-spacing: 0px
|
|||||||
+alert($bg: $secondary-color)
|
+alert($bg: $secondary-color)
|
||||||
.close
|
.close
|
||||||
+alert-close
|
+alert-close
|
||||||
.open-supplier-button
|
.supplier-open-shop
|
||||||
+button($padding: $button-tny)
|
+button($padding: $button-tny)
|
||||||
margin: 0
|
margin: 0
|
||||||
margin-left: 20px
|
margin-left: 20px
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
float: left
|
float: left
|
||||||
margin-left: 10px
|
margin-left: 10px
|
||||||
select
|
select
|
||||||
width: 50px
|
width: 70px
|
||||||
&:after
|
&:after
|
||||||
content: " :"
|
content: " :"
|
||||||
.products_preview-minute
|
.products_preview-minute
|
||||||
float: left
|
float: left
|
||||||
margin-left: 10px
|
margin-left: 10px
|
||||||
select
|
select
|
||||||
width: 50px
|
width: 70px
|
||||||
#products-table
|
#products-table
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|||||||
@@ -32,9 +32,11 @@ html lang="en"
|
|||||||
a.close data-dismiss="alert" ×
|
a.close data-dismiss="alert" ×
|
||||||
- if current_supplier.closed?
|
- if current_supplier.closed?
|
||||||
.supplier-is-closed
|
.supplier-is-closed
|
||||||
= t('supplier.you_are_currently_closed_alert')
|
span data-t="supplier.you_are_currently_closed_alert"
|
||||||
= form_tag supplier_mark_as_open_path do
|
= form_tag supplier_mark_as_open_path do
|
||||||
= submit_tag t('supplier.mark_as_open_button'), class: ['open-supplier-button']
|
/ = submit_tag t('supplier.mark_as_open_button'), class: ['open-supplier-button']
|
||||||
|
a.supplier-open-shop href="javascript:void(0)" onclick="$(this).parents('form').submit()"
|
||||||
|
span data-t="supplier.open_for_orders"
|
||||||
a.close{data-dismiss="alert"} ×
|
a.close{data-dismiss="alert"} ×
|
||||||
.row
|
.row
|
||||||
.span12
|
.span12
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
doctype html
|
doctype html
|
||||||
html lang="en"
|
html lang="en"
|
||||||
head
|
head
|
||||||
meta charset="utf-8"
|
meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi"
|
||||||
meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"
|
meta name="msapplication-tap-highlight" content="no"
|
||||||
meta name="viewport" content="width=device-width, initial-scale=1.0"
|
|
||||||
title= application_title
|
title= application_title
|
||||||
= javascript_include_tag "vendor/modernizr"
|
= javascript_include_tag "vendor/modernizr"
|
||||||
= stylesheet_link_tag "user/foundation/application"
|
= stylesheet_link_tag "user/foundation/application"
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ aside.side-menu
|
|||||||
- if current_supplier.open?
|
- if current_supplier.open?
|
||||||
li
|
li
|
||||||
= form_tag supplier_mark_as_closed_path do
|
= form_tag supplier_mark_as_closed_path do
|
||||||
= submit_tag t('supplier.close'), class: 'supplier-close-shop', onClick: %|$(this).parents('form').submit()|
|
a.supplier-close-shop href="javascript:void(0)" onclick="$(this).parents('form').submit()"
|
||||||
|
span data-t="supplier.close_for_orders"
|
||||||
li= link_to 'Settings', supplier_settings_path, class: 'supplier-settings-link'
|
li= link_to 'Settings', supplier_settings_path, class: 'supplier-settings-link'
|
||||||
li= link_to 'Logout', destroy_supplier_session_path, method: :delete, class: 'supplier-sign-out-link'
|
li= link_to 'Logout', destroy_supplier_session_path, method: :delete, class: 'supplier-sign-out-link'
|
||||||
/.navbar.navbar-fixed-top.navbar-inverse
|
/.navbar.navbar-fixed-top.navbar-inverse
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ SimpleForm.setup do |config|
|
|||||||
config.boolean_style = :nested
|
config.boolean_style = :nested
|
||||||
|
|
||||||
# Default class for buttons
|
# Default class for buttons
|
||||||
config.button_class = 'btn'
|
config.button_class = 'button'
|
||||||
|
|
||||||
# Method used to tidy up errors. Specify any Rails Array method.
|
# Method used to tidy up errors. Specify any Rails Array method.
|
||||||
# :first lists the first message for each field.
|
# :first lists the first message for each field.
|
||||||
|
|||||||
@@ -13,9 +13,10 @@ en:
|
|||||||
active_orders:
|
active_orders:
|
||||||
title: Active orders
|
title: Active orders
|
||||||
price: Price
|
price: Price
|
||||||
close: Close the shop
|
supplier:
|
||||||
you_are_currently_closed_alert: 'You are currently closed and not able to take orders'
|
close_for_orders: Close the shop
|
||||||
mark_as_open_button: 'Open up the place!'
|
open_for_orders: 'Open up the place!'
|
||||||
|
you_are_currently_closed_alert: 'You are currently closed and not able to take orders'
|
||||||
table_number: Table
|
table_number: Table
|
||||||
tables:
|
tables:
|
||||||
qr_codes:
|
qr_codes:
|
||||||
|
|||||||
@@ -13,9 +13,10 @@ nl:
|
|||||||
active_orders:
|
active_orders:
|
||||||
title: Actieve orders
|
title: Actieve orders
|
||||||
price: Prijs
|
price: Prijs
|
||||||
close: De zaak afsluiten voor bestellingen
|
supplier:
|
||||||
you_are_currently_closed_alert: 'Je bent momenteel gesloten en kan geen orders ontvangen'
|
close_for_orders: De zaak afsluiten voor bestellingen
|
||||||
mark_as_open_button: 'Open de zaak!'
|
open_for_orders: 'Open de zaak!'
|
||||||
|
you_are_currently_closed_alert: 'Je bent momenteel gesloten en kan geen orders ontvangen'
|
||||||
table_number: Tafel
|
table_number: Tafel
|
||||||
tables:
|
tables:
|
||||||
qr_codes:
|
qr_codes:
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
build_product_list_as_modal: ->
|
|
||||||
wrapper = $('<div class="modal"></div>')
|
|
||||||
callback_wrapper = ->
|
|
||||||
wrapper.modal('hide')
|
|
||||||
callback()
|
|
||||||
header = $('<div class="modal-header"></div>')
|
|
||||||
.append('<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>')
|
|
||||||
.append('<h3>Product list</h3>').appendTo(wrapper)
|
|
||||||
|
|
||||||
body = $('<div class="modal-body"></div>')
|
|
||||||
table = $('<table class="table"></table>').appendTo(body)
|
|
||||||
tbody = $('<tbody></tbody>').appendTo(table)
|
|
||||||
for product_id, info of window.active_products_list
|
|
||||||
row = $('<tr></tr>').appendTo(tbody)
|
|
||||||
row.append('<td>'+info.product.name+'</td>')
|
|
||||||
row.append('<td>'+info.number+'</td>')
|
|
||||||
row.append('<td>'+Qwaiter.currency(info.product.price * info.number)+'</td>')
|
|
||||||
|
|
||||||
body.appendTo(wrapper)
|
|
||||||
|
|
||||||
footer = $('<div class="modal-footer"></div>')
|
|
||||||
.append($('<a href="#" class="btn">Close</a>').click(-> wrapper.modal('hide')))
|
|
||||||
.append($('<a href="#" class="btn btn-primary">Yes</a>').click(callback_wrapper))
|
|
||||||
.appendTo(wrapper)
|
|
||||||
wrapper.modal()
|
|
||||||
@@ -4,20 +4,14 @@ Release
|
|||||||
Supplier
|
Supplier
|
||||||
--------
|
--------
|
||||||
|
|
||||||
- better product listing with time of day in products overview
|
|
||||||
- english emails
|
- english emails
|
||||||
- https://github.com/buytruckload/geonames_api
|
|
||||||
- website calls to action
|
|
||||||
- Side menu
|
- Side menu
|
||||||
- Open shop button nice
|
- Open shop button nice
|
||||||
- Close shop button nice
|
- Close shop button nice
|
||||||
- Title mooi en zichtbaar
|
- Title mooi en zichtbaar
|
||||||
- Product category looks for foundation
|
|
||||||
- form action button looks (Roos)
|
- form action button looks (Roos)
|
||||||
- Dashboard
|
- Dashboard
|
||||||
- Empty state
|
- Empty state
|
||||||
- Section table view
|
|
||||||
- add order vinkjes management (post release)
|
|
||||||
- Add qr print functionality offering to send the stickers
|
- Add qr print functionality offering to send the stickers
|
||||||
- Supplier sidebar open/close message seems untranslated
|
- Supplier sidebar open/close message seems untranslated
|
||||||
|
|
||||||
@@ -36,7 +30,6 @@ Bugs
|
|||||||
----
|
----
|
||||||
|
|
||||||
- Dragging supplier table from one section to the other fails
|
- Dragging supplier table from one section to the other fails
|
||||||
- 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
|
|
||||||
|
|
||||||
Post release
|
Post release
|
||||||
============
|
============
|
||||||
@@ -44,12 +37,24 @@ Post release
|
|||||||
- Chromecast app Waiter app Users can disable their own help request (maak ongedaan?) Users can disable their own bill request (maak ongedaan?) Think about extra confirmation box for these requests Supplier section 100% on ember :)
|
- Chromecast app Waiter app Users can disable their own help request (maak ongedaan?) Users can disable their own bill request (maak ongedaan?) Think about extra confirmation box for these requests Supplier section 100% on ember :)
|
||||||
- Do not destroy tables with active list
|
- Do not destroy tables with active list
|
||||||
- Test list view when table is destroyed
|
- Test list view when table is destroyed
|
||||||
|
- Test a whole bunch of destroy actions (soft delete? DestoyedTable model?)
|
||||||
|
|
||||||
|
Website
|
||||||
|
-------
|
||||||
|
|
||||||
|
- website calls to action
|
||||||
|
|
||||||
Supplier
|
Supplier
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
- Counters display similar to users
|
||||||
|
- Add image to products
|
||||||
- tables#index Make table actions available
|
- tables#index Make table actions available
|
||||||
- Products to ember
|
- Products to ember
|
||||||
- Product categories to ember
|
- Product categories to ember
|
||||||
- Event stream to ember
|
- Event stream to ember
|
||||||
- Section view, add go to list button right next to edit section button
|
- Section view, add go to list button right next to edit section button
|
||||||
|
- Replace product categories jquery sortable by ember version
|
||||||
|
- https://github.com/buytruckload/geonames_api
|
||||||
|
- Section view
|
||||||
|
- add order vinkjes (active, delivered) management to table actions (post release)
|
||||||
|
|||||||
Reference in New Issue
Block a user