From 4ef7ecba4109035505f14655fcf45459608d2c87 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Sun, 6 Sep 2015 17:29:34 +0200 Subject: [PATCH] mozo-user connection changes --- app/controllers/pages_controller.rb | 8 + .../users/application_controller.rb | 2 +- app/controllers/users/orders_controller.rb | 2 +- app/views/user/obtain_token.html.slim | 2 +- bin/set_translations_to_apps.rb | 42 +++++ config/application.rb | 13 +- .../register_json_api_mime_type.rb | 8 + config/locales/user.en.yml | 149 ------------------ config/locales/user.nl.yml | 149 ------------------ config/routes.rb | 26 +-- config/user_locales/en.yml | 148 +++++++++++++++++ config/user_locales/nl.yml | 148 +++++++++++++++++ lib/qwaiter/user_base_serializer.rb | 1 + 13 files changed, 379 insertions(+), 319 deletions(-) create mode 100755 bin/set_translations_to_apps.rb create mode 100644 config/initializers/register_json_api_mime_type.rb delete mode 100644 config/locales/user.en.yml delete mode 100644 config/locales/user.nl.yml create mode 100644 config/user_locales/en.yml create mode 100644 config/user_locales/nl.yml diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 41c6656b..a1fa5923 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -1,3 +1,11 @@ class PagesController < ::ApplicationController include Cmtool::Includes::PagesController + + def show + if request.format.json? + render json: {}, status: :not_found + else + super + end + end end diff --git a/app/controllers/users/application_controller.rb b/app/controllers/users/application_controller.rb index dfd64bf5..a35a3db6 100644 --- a/app/controllers/users/application_controller.rb +++ b/app/controllers/users/application_controller.rb @@ -10,7 +10,7 @@ module Users user = User.find_by_authentication_token(params[:auth_token]) sign_in user if user sign_out current_user if current_user && !user # Other token attempt of logged in user - else + elsif request.format.html? return if Rails.env.test? and action_name == 'index' authenticate_user! end diff --git a/app/controllers/users/orders_controller.rb b/app/controllers/users/orders_controller.rb index 3186e46b..a48f3cff 100644 --- a/app/controllers/users/orders_controller.rb +++ b/app/controllers/users/orders_controller.rb @@ -8,7 +8,7 @@ module Users @list = List.find(params[:list_id]) render json: {}, status: :not_found and return unless @list.present? && Array.wrap(@list.user_ids).include?(current_user.id) orders = @list.orders.include_relation(:product_orders) - render json: JSONAPI::Serializer.serialize(orders, serializer: Users::OrderSerializer, include: %w[product_orders product_orders.order], is_collection: true) + render json: JSONAPI::Serializer.serialize(orders, serializer: Users::OrderSerializer, include: %w[list product_orders product_orders.order], is_collection: true) end # Used by the user Ember app diff --git a/app/views/user/obtain_token.html.slim b/app/views/user/obtain_token.html.slim index 54fbe01f..4b42bf5b 100644 --- a/app/views/user/obtain_token.html.slim +++ b/app/views/user/obtain_token.html.slim @@ -1,5 +1,5 @@ .row - h1 data-t='obtain_token.title' = t('user.obtain_token.title') + h1 Obtain authentication token... hr - if current_user.present? p Waiting for authentication to complete..... diff --git a/bin/set_translations_to_apps.rb b/bin/set_translations_to_apps.rb new file mode 100755 index 00000000..74a5ec0e --- /dev/null +++ b/bin/set_translations_to_apps.rb @@ -0,0 +1,42 @@ +#!/usr/bin/env ruby +#require 'pathname' +#require 'active_support/all' +#require 'yaml' +#require 'pry' +#$root = Pathname.new File.expand_path('../../', __FILE__) +class UserApp + def path + Pathname.new File.expand_path('../../../mozo-user', __FILE__) + end + + def user_translations + Dir.glob(Rails.root.join('config/user_locales/**/*.yml')).each_with_object({}) do |user_yaml, obj| + obj.deep_merge! YAML.load_file(user_yaml) + end + end + + def all_translations + user_translations.deep_merge general_translations + end + + def general_translations + Rails.application.config.i18n.available_locales.each_with_object({}) do |locale, obj| + obj[locale.to_s] = { + models: I18n.t('activemodel.models', locale: locale), + attributes: I18n.t('activemodel.attributes', locale: locale), + helpers: I18n.t('helpers', locale: locale), + pagination: I18n.t('views.pagination', locale: locale), + errors: I18n.t('errors', locale: locale), + date: {day_name: Hash[Date::DAYNAMES.map(&:downcase).zip(I18n.t('date.day_names', locale: locale))]} + } + end.deep_stringify_keys + end + + def write_translations + File.open path.join('vendor/i18n/translations.js'), 'w+' do |f| + f.puts "$translations = #{JSON.pretty_generate all_translations}" + end + end +end + +UserApp.new.write_translations diff --git a/config/application.rb b/config/application.rb index ad9602aa..cc8f181b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -138,12 +138,13 @@ module Qwaiter end end - #config.middleware.use Rack::Cors do - # allow do - # origins '*' - # resource '/user/*', :headers => '*,auth_token', :methods => '*' #[:get, :post, :options] - # end - #end + config.middleware.insert_before 0, "Rack::Cors" do + allow do + origins '*' + #resource '/user/*', :headers => '*', :methods => '*' #[:get, :post, :options] + resource '*', headers: :any, methods: '*' #[:get, :post, :options] + end + end # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' diff --git a/config/initializers/register_json_api_mime_type.rb b/config/initializers/register_json_api_mime_type.rb new file mode 100644 index 00000000..04aee07f --- /dev/null +++ b/config/initializers/register_json_api_mime_type.rb @@ -0,0 +1,8 @@ +api_mime_types = %W( + application/vnd.api+json + text/x-json + application/json +) + +Mime::Type.unregister :json +Mime::Type.register 'application/json', :json, api_mime_types diff --git a/config/locales/user.en.yml b/config/locales/user.en.yml deleted file mode 100644 index 61cb3d80..00000000 --- a/config/locales/user.en.yml +++ /dev/null @@ -1,149 +0,0 @@ -en: - user: - total: Total - messages: - general_error: Something went wrong - cannot_order_on_non_active_list: You cannot place an order on a closed list - no_active_list: There is no active 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 - 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 - unknown_supplier_name: unknown - unauthorized: Unauthorized action detected - order_could_not_be_processed: 'The order could not be processed' - authenticated: Successfully authenticated - - active_list: - title: Active list - needs_payment: Check please! - no_orders_explanation: You did not order anything yet - not_active: - message: At the moment there is no active list - home_button_text: Back - join_request: - existing_user: - title: '${models.plural.join_request}' - reject_request: Reject - approve_request: Approve - no_join_requests_message: No current join requests for your list - requestor: - join_this_table: Join this table - waiting_for_approval: Waiting for approval - join_request_rejected: Your request to join the table has been rejected - join_request_approved: Your request to join the table has been approved - - list_products: - title: Order - history_list: - title: Closed list - list_history: - title: Closed lists - show_products: - # The title gets products: Product.model_name.human_plural that can be used: e.g.: Showing %{products} - title: Menu - join_occupied_table: - title: This table is occupied - show_the_products: Show me the menu - back: Back - home: - scan_qr: Scan qr code - show_active_list: Show my orders - show_active_list_products: Go to the menu - basket: - total: Total - product_category: - other_name: Overig - obtain_token: - title: Authenticate mozo.bar - obtain: Authenticate - invalid_combination: The email password combination is incorrect - move_table: - cannot_move_to_occupied_table: 'You cannot move to an occupied table' - moved_to_another_table: 'The table is changed.' - confirmation_title: 'Move to another table?' - confirmation_body: 'Do you want to move to table %{number}?' - confirm: - cancel: Cancel - confirm: 'Yes' - list_needs_help: - help_is_on_its_way: 'Help is already on its way' - title: 'Request a waiter' - content: 'Request a waiter to your table' - list_needs_payment: - payment_already_requested: 'You already asked for the bill' - title: 'Ask for the check' - content: 'Do you want to pay?' - product_orders: - order_button: Order - total: Total - no_orders: No products - state: - list: - active: 'Active' - closed: 'Closed' - lists: - show_more: Show more - app: - error: - title: There is a problem with the application - body: Please try to restart - errors: - 404: - model: - message: Cannot find %{model} with id %{id} - general: - message: Cannot find resource - settings: - title: Settings - language: Language - reload_application: Reload application - about: - title: About Mozo - body: | - Mozo is an app that allows you to simply order products using your phone.
- The process is as follows: - - Now your order is received behind the bar.

- Feedback of your order is given by one or two checks next to your order. - feedback: - title: Feedback - subtitle: We gladly improve our app using your feedback! - submit: Submit feedback - received: Thank you for your feedback. We appreciate your opinion! - empty_content: No feedback given - sign_in: - title: Sign in - introduction: | - In order to be recognizable for the place where you want to order you have to authenticate using - a well known identity platform. Your information will be handled with extreme care and not shared - with external parties. -
- footer:
- supplier_status_info: - title: "%{name} info" - header: | - The icons at the top right corner contain information about the place where you - are currently ordering. The number prefixed with # is your table number. - orders_placed_count_explanation: "  means that there are %{count} orders placed and not yet processing or finished" - orders_in_process_count_explanation: "  means that there are %{count} orders currently processing" - close: Got it - modal: - info: - close: Close - product_variant: - select_on_order: - title: "What variant of %{name} do you want?" - choose: Choose diff --git a/config/locales/user.nl.yml b/config/locales/user.nl.yml deleted file mode 100644 index 90c0c8bf..00000000 --- a/config/locales/user.nl.yml +++ /dev/null @@ -1,149 +0,0 @@ -nl: - user: - total: Totaal - messages: - general_error: Er is iets misgegaan - cannot_order_on_non_active_list: Je kan niet bestellen op een gesloten lijst - no_active_list: Er is momenteel geen lijst actief - order_is_placed: Je bestelling is in goede orde aangekomen - new_list_created: Een nieuwe ${models.list} is aangemaakt - the_list_has_been_closed: De lijst is afgesloten - illegal_history_list_attempt: Je probeert een lijst op te vragen die niet van jou is - table_not_found: De gezochte tafel kan niet worden gevonden of is niet opgegeven - table_is_occupied: De tafel waar je aan wil gaan zitten is reeds bezet - table_is_reserved: De tafel waar je aan wil gaan zitten is gereserveerd - table_is_closed: De tafel waar je aan wil gaan zitten is niet beschikbaar voor bediening - supplier_is_closed: De eigenaar van deze tafel is momenteel gesloten - table_is_from_other_supplier: Je kan geen lijst openen bij een andere zaak zolang je huidige lijst nog niet is afgesloten - moved_to_another_table: De tafel is gewijzigd - cannot_identify_table: De applicatie kan niet bepalen om welke tafel het gaat - unknown_supplier_name: onbekend - unauthorized: Niet toegestane actie - order_could_not_be_processed: 'De bestelling kan niet worden uitgevoerd' - authenticated: Succesvolle login - active_list: - title: Actieve lijst - needs_payment: Rekening vragen! - no_orders_explanation: Je hebt nog niks besteld - not_active: - message: Momenteel is er geen lijst actief - home_button_text: Terug - list_products: - title: Bestel - join_request: - existing_user: - title: '${models.plural.join_request}' - reject_request: Afwijzen - approve_request: Toestaan - no_join_requests_message: Geen deelname verzoeken voor de huidige ${models.list} - requestor: - waiting_for_approval: Wachten op toestemming - join_this_table: Ik wil ook bestellen bij deze tafel - join_request_rejected: Je verzoek om deel te nemen aan de ${models.list|downcase} is afgewezen - join_request_approved: Je verzoek om deel te nemen aan de ${models.list|downcase} is goedgekeurd - history_list: - title: Afgesloten lijst - list_history: - title: Afgesloten lijsten - show_products: - # The title gets products: Product.model_name.human_plural that can be used: e.g.: Showing %{products} - title: Menu - join_occupied_table: - title: Deze tafel is bezet - show_the_products: Laat me het menu zien - back: Terug - home: - scan_qr: Scan qr code - show_active_list: Toon mijn bestellingen - show_active_list_products: Ga naar het menu - basket: - total: Totaal - product_category: - other_name: Overig - obtain_token: - title: Aanmelden bij mozo.bar - obtain: Aanmelden - invalid_combination: De inloggegevens zijn onjuist - move_table: - cannot_move_to_occupied_table: 'Je kan niet verhuizen naar een tafel die reeds gebruikt wordt.' - moved_to_another_table: 'De tafel is gewijzigd.' - confirmation_title: 'Naar een andere tafel verhuizen?' - confirmation_body: 'Wil je verplaatsen naar tafel %{number}?' - confirm: - cancel: Annuleer - confirm: 'Ja' - list_needs_help: - help_is_on_its_way: 'Er wordt al iemand naar je tafel gestuurd' - title: 'Ik heb een vraag' - content: 'Wil je een vraag stellen?' - list_needs_payment: - payment_already_requested: 'De rekening is reeds gevraagd' - title: 'Vraag om de rekening' - content: 'Wil je betalen?' - product_orders: - order_button: Bestel - total: Totaal - no_orders: Geen bestellingen - state: - list: - active: 'Actief' - closed: 'Afgesloten' - lists: - show_more: Meer tonen - app: - error: - title: Er is een probleem met de applicatie - body: Herstart de applicatie om het op te lossen - - errors: - 404: - model: - message: '%{model} met id %{id} kan niet worden gevonden' - general: - message: Data niet beschikbaar - - settings: - title: Settings - language: Taal - reload_application: Applicatie herstarten - about: - title: Over Mozo - body: | - Mozo is een app waarme je producten kan bestellen met je telefoon.
- Het proces is als volgt: - - Nu komt je bestelling achter de bar binnen.

- Feedback van je bestelling krijg je dmv een of twee vinkjes naast je bestelling. - feedback: - title: Feedback - subtitle: We verbeteren graag de app aan de hand van jouw feedback! - submit: Geef feedback - received: Dank je voor het meedenken! - empty_content: Geen feedback gegeven - sign_in: - title: Aanmelden - introduction: | - Om herkenbaar te zijn voor de horeca ondernemer is de aanmelding via een bekend identiteits platform. - Je gegevens worden niet gedeeld met andere partijen, behalve basisinformatie zoals je naam voor de - horeca onderneming waar je wat bestelt. -
- footer:
- supplier_status_info: - title: "%{name} info" - header: | - De icoontjes rechtsboven geven informatie over de plek waar je aan het bestellen bent. - Het getal met # is je tafelnummer. - orders_placed_count_explanation: "  betekent dat er %{count} nog niet in behandeling of afgesloten bestellingen zijn" - orders_in_process_count_explanation: "  betekent dat er %{count} bestellingen in behandeling zijn" - close: Got it - modal: - info: - close: Sluit - product_variant: - select_on_order: - title: "Selecteer welke variant %{name} je wilt" - choose: Kies diff --git a/config/routes.rb b/config/routes.rb index 13d862b3..0ad6d6ad 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -53,39 +53,41 @@ Qwaiter::Application.routes.draw do # USER #default_url_options format: 'html' - get '/user/index' => 'user#index', as: :user_root - get '/user' => 'user#index' - get '/user/active_list(.:format)' => 'user#active_list', as: :user_active_list - get '/user/list_info' => 'user#list_info', as: :user_list_info, via: [:get, :options] + #get '/user/index' => 'user#index', as: :user_root + #get '/user' => 'user#index' + #get '/user/active_list(.:format)' => 'user#active_list', as: :user_active_list + #get '/user/list_info' => 'user#list_info', as: :user_list_info, via: [:get, :options] post '/user/needs_help' => 'user#needs_help', as: :user_needs_help post '/user/list_needs_payment' => 'user#list_needs_payment', as: :user_list_needs_payment - post '/user/create_list' => 'user#create_list', as: :user_create_list - get '/user/list_products' => 'user#list_products', as: :user_list_products - get '/user/list_products_for_table' => 'user#list_products_for_table', as: :user_list_products_for_table - get '/user/list_history' => 'user#list_history', as: :user_list_history - get '/user/history_list' => 'user#history_list', as: :user_history_list - post '/user/order_selected_products' => 'user#order_selected_products', as: :user_order_selected_products + #post '/user/create_list' => 'user#create_list', as: :user_create_list + #get '/user/list_products' => 'user#list_products', as: :user_list_products + #get '/user/list_products_for_table' => 'user#list_products_for_table', as: :user_list_products_for_table + #get '/user/list_history' => 'user#list_history', as: :user_list_history + #get '/user/history_list' => 'user#history_list', as: :user_history_list + #post '/user/order_selected_products' => 'user#order_selected_products', as: :user_order_selected_products post '/user/move_table' => 'user#move_table', as: :user_move_table get '/user/table_info' => 'user#table_info', as: :user_table_info # get '/user/join_occupied_table' => 'user#join_occupied_table', as: :user_join_occupied_table post '/user/join_occupied_table' => 'user#request_to_join_occupied_table' post '/user/reject_join_request' => 'user#reject_join_request' post '/user/approve_join_request' => 'user#approve_join_request' + + post '/user/check_table_join_status' => 'user#check_table_join_status' get '/user/obtain_token' => 'user#obtain_token', as: :user_obtain_token post '/user/obtain_token' => 'user#obtain_token', constraints: {format: :json} get '/close_window' => 'dashboard#close_window' - namespace :users, path: '/user' do + namespace :users, path: '/user/api/v1' do resources :product_categories, only: [:index] resources :lists, only: [:index, :show] do collection do get :current end - resources :orders, only: [:index] member do get :table end + resources :orders, only: [:index] end resources :orders, only: [:create] diff --git a/config/user_locales/en.yml b/config/user_locales/en.yml new file mode 100644 index 00000000..df123838 --- /dev/null +++ b/config/user_locales/en.yml @@ -0,0 +1,148 @@ +en: + total: Total + messages: + general_error: Something went wrong + cannot_order_on_non_active_list: You cannot place an order on a closed list + no_active_list: There is no active 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 + 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 + unknown_supplier_name: unknown + unauthorized: Unauthorized action detected + order_could_not_be_processed: 'The order could not be processed' + authenticated: Successfully authenticated + + active_list: + title: Active list + needs_payment: Check please! + no_orders_explanation: You did not order anything yet + not_active: + message: At the moment there is no active list + home_button_text: Back + join_request: + existing_user: + title: '${models.plural.join_request}' + reject_request: Reject + approve_request: Approve + no_join_requests_message: No current join requests for your list + requestor: + join_this_table: Join this table + waiting_for_approval: Waiting for approval + join_request_rejected: Your request to join the table has been rejected + join_request_approved: Your request to join the table has been approved + + list_products: + title: Order + history_list: + title: Closed list + list_history: + title: Closed lists + show_products: + # The title gets products: Product.model_name.human_plural that can be used: e.g.: Showing %{products} + title: Menu + join_occupied_table: + title: This table is occupied + show_the_products: Show me the menu + back: Back + home: + scan_qr: Scan qr code + show_active_list: Show my orders + show_active_list_products: Go to the menu + basket: + total: Total + product_category: + other_name: Overig + obtain_token: + title: Authenticate mozo.bar + obtain: Authenticate + invalid_combination: The email password combination is incorrect + move_table: + cannot_move_to_occupied_table: 'You cannot move to an occupied table' + moved_to_another_table: 'The table is changed.' + confirmation_title: 'Move to another table?' + confirmation_body: 'Do you want to move to table %{number}?' + confirm: + cancel: Cancel + confirm: 'Yes' + list_needs_help: + help_is_on_its_way: 'Help is already on its way' + title: 'Request a waiter' + content: 'Request a waiter to your table' + list_needs_payment: + payment_already_requested: 'You already asked for the bill' + title: 'Ask for the check' + content: 'Do you want to pay?' + product_orders: + order_button: Order + total: Total + no_orders: No products + state: + list: + active: 'Active' + closed: 'Closed' + lists: + show_more: Show more + app: + error: + title: There is a problem with the application + body: Please try to restart + errors: + 404: + model: + message: Cannot find %{model} with id %{id} + general: + message: Cannot find resource + settings: + title: Settings + language: Language + reload_application: Reload application + about: + title: About Mozo + body: | + Mozo is an app that allows you to simply order products using your phone.
+ The process is as follows: + + Now your order is received behind the bar.

+ Feedback of your order is given by one or two checks next to your order. + feedback: + title: Feedback + subtitle: We gladly improve our app using your feedback! + submit: Submit feedback + received: Thank you for your feedback. We appreciate your opinion! + empty_content: No feedback given + sign_in: + title: Sign in + introduction: | + In order to be recognizable for the place where you want to order you have to authenticate using + a well known identity platform. Your information will be handled with extreme care and not shared + with external parties. +
+ footer:
+ supplier_status_info: + title: "%{name} info" + header: | + The icons at the top right corner contain information about the place where you + are currently ordering. The number prefixed with # is your table number. + orders_placed_count_explanation: "  means that there are %{count} orders placed and not yet processing or finished" + orders_in_process_count_explanation: "  means that there are %{count} orders currently processing" + close: Got it + modal: + info: + close: Close + product_variant: + select_on_order: + title: "What variant of %{name} do you want?" + choose: Choose diff --git a/config/user_locales/nl.yml b/config/user_locales/nl.yml new file mode 100644 index 00000000..1eae0bc9 --- /dev/null +++ b/config/user_locales/nl.yml @@ -0,0 +1,148 @@ +nl: + total: Totaal + messages: + general_error: Er is iets misgegaan + cannot_order_on_non_active_list: Je kan niet bestellen op een gesloten lijst + no_active_list: Er is momenteel geen lijst actief + order_is_placed: Je bestelling is in goede orde aangekomen + new_list_created: Een nieuwe ${models.list} is aangemaakt + the_list_has_been_closed: De lijst is afgesloten + illegal_history_list_attempt: Je probeert een lijst op te vragen die niet van jou is + table_not_found: De gezochte tafel kan niet worden gevonden of is niet opgegeven + table_is_occupied: De tafel waar je aan wil gaan zitten is reeds bezet + table_is_reserved: De tafel waar je aan wil gaan zitten is gereserveerd + table_is_closed: De tafel waar je aan wil gaan zitten is niet beschikbaar voor bediening + supplier_is_closed: De eigenaar van deze tafel is momenteel gesloten + table_is_from_other_supplier: Je kan geen lijst openen bij een andere zaak zolang je huidige lijst nog niet is afgesloten + moved_to_another_table: De tafel is gewijzigd + cannot_identify_table: De applicatie kan niet bepalen om welke tafel het gaat + unknown_supplier_name: onbekend + unauthorized: Niet toegestane actie + order_could_not_be_processed: 'De bestelling kan niet worden uitgevoerd' + authenticated: Succesvolle login + active_list: + title: Actieve lijst + needs_payment: Rekening vragen! + no_orders_explanation: Je hebt nog niks besteld + not_active: + message: Momenteel is er geen lijst actief + home_button_text: Terug + list_products: + title: Bestel + join_request: + existing_user: + title: '${models.plural.join_request}' + reject_request: Afwijzen + approve_request: Toestaan + no_join_requests_message: Geen deelname verzoeken voor de huidige ${models.list} + requestor: + waiting_for_approval: Wachten op toestemming + join_this_table: Ik wil ook bestellen bij deze tafel + join_request_rejected: Je verzoek om deel te nemen aan de ${models.list|downcase} is afgewezen + join_request_approved: Je verzoek om deel te nemen aan de ${models.list|downcase} is goedgekeurd + history_list: + title: Afgesloten lijst + list_history: + title: Afgesloten lijsten + show_products: + # The title gets products: Product.model_name.human_plural that can be used: e.g.: Showing %{products} + title: Menu + join_occupied_table: + title: Deze tafel is bezet + show_the_products: Laat me het menu zien + back: Terug + home: + scan_qr: Scan qr code + show_active_list: Toon mijn bestellingen + show_active_list_products: Ga naar het menu + basket: + total: Totaal + product_category: + other_name: Overig + obtain_token: + title: Aanmelden bij mozo.bar + obtain: Aanmelden + invalid_combination: De inloggegevens zijn onjuist + move_table: + cannot_move_to_occupied_table: 'Je kan niet verhuizen naar een tafel die reeds gebruikt wordt.' + moved_to_another_table: 'De tafel is gewijzigd.' + confirmation_title: 'Naar een andere tafel verhuizen?' + confirmation_body: 'Wil je verplaatsen naar tafel %{number}?' + confirm: + cancel: Annuleer + confirm: 'Ja' + list_needs_help: + help_is_on_its_way: 'Er wordt al iemand naar je tafel gestuurd' + title: 'Ik heb een vraag' + content: 'Wil je een vraag stellen?' + list_needs_payment: + payment_already_requested: 'De rekening is reeds gevraagd' + title: 'Vraag om de rekening' + content: 'Wil je betalen?' + product_orders: + order_button: Bestel + total: Totaal + no_orders: Geen bestellingen + state: + list: + active: 'Actief' + closed: 'Afgesloten' + lists: + show_more: Meer tonen + app: + error: + title: Er is een probleem met de applicatie + body: Herstart de applicatie om het op te lossen + + errors: + 404: + model: + message: '%{model} met id %{id} kan niet worden gevonden' + general: + message: Data niet beschikbaar + + settings: + title: Settings + language: Taal + reload_application: Applicatie herstarten + about: + title: Over Mozo + body: | + Mozo is een app waarme je producten kan bestellen met je telefoon.
+ Het proces is als volgt: + + Nu komt je bestelling achter de bar binnen.

+ Feedback van je bestelling krijg je dmv een of twee vinkjes naast je bestelling. + feedback: + title: Feedback + subtitle: We verbeteren graag de app aan de hand van jouw feedback! + submit: Geef feedback + received: Dank je voor het meedenken! + empty_content: Geen feedback gegeven + sign_in: + title: Aanmelden + introduction: | + Om herkenbaar te zijn voor de horeca ondernemer is de aanmelding via een bekend identiteits platform. + Je gegevens worden niet gedeeld met andere partijen, behalve basisinformatie zoals je naam voor de + horeca onderneming waar je wat bestelt. +
+ footer:
+ supplier_status_info: + title: "%{name} info" + header: | + De icoontjes rechtsboven geven informatie over de plek waar je aan het bestellen bent. + Het getal met # is je tafelnummer. + orders_placed_count_explanation: "  betekent dat er %{count} nog niet in behandeling of afgesloten bestellingen zijn" + orders_in_process_count_explanation: "  betekent dat er %{count} bestellingen in behandeling zijn" + close: Got it + modal: + info: + close: Sluit + product_variant: + select_on_order: + title: "Selecteer welke variant %{name} je wilt" + choose: Kies diff --git a/lib/qwaiter/user_base_serializer.rb b/lib/qwaiter/user_base_serializer.rb index 844f46f0..9c3b4226 100644 --- a/lib/qwaiter/user_base_serializer.rb +++ b/lib/qwaiter/user_base_serializer.rb @@ -9,6 +9,7 @@ module Qwaiter::UserBaseSerializer def base_url "/user" + nil end def format_name(attribute_name)