Implement close window on server level
This commit is contained in:
@@ -12,6 +12,10 @@ class DashboardController < ApplicationController
|
|||||||
log.save
|
log.save
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def close_window
|
||||||
|
render layout: false
|
||||||
|
end
|
||||||
|
|
||||||
# Testing action
|
# Testing action
|
||||||
def select_qrcode
|
def select_qrcode
|
||||||
#@tables = Table.all.sample(2) | List.active.map(&:table)
|
#@tables = Table.all.sample(2) | List.active.map(&:table)
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script>localStorage.setItem('auth_token', '<%= params[:authentication_token] %>'); localStorage.setItem('user_id', '<%= params[:user_id] %>');window.close()</script>
|
||||||
|
</head>
|
||||||
|
<body></body>
|
||||||
|
</html>
|
||||||
@@ -71,6 +71,7 @@ Qwaiter::Application.routes.draw do
|
|||||||
post '/user/check_table_join_status' => 'user#check_table_join_status'
|
post '/user/check_table_join_status' => 'user#check_table_join_status'
|
||||||
get '/user/obtain_token' => 'user#obtain_token', as: :user_obtain_token
|
get '/user/obtain_token' => 'user#obtain_token', as: :user_obtain_token
|
||||||
post '/user/obtain_token' => 'user#obtain_token', constraints: {format: :json}
|
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' do
|
||||||
resources :product_categories, only: [:index]
|
resources :product_categories, only: [:index]
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ step "There is no user information stored in the local storage" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
step "I visit the user obtain token path" do
|
step "I visit the user obtain token path" do
|
||||||
visit user_obtain_token_path
|
visit user_root_path # obtain token through ember application
|
||||||
end
|
end
|
||||||
|
|
||||||
step "I am signed in as a user" do
|
step "I am signed in as a user" do
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ User
|
|||||||
----
|
----
|
||||||
|
|
||||||
- test met veel producten
|
- test met veel producten
|
||||||
- Only show join requests menu when there actually are join requests
|
- splash screen
|
||||||
|
|
||||||
Bugs
|
Bugs
|
||||||
----
|
----
|
||||||
@@ -71,5 +71,5 @@ User
|
|||||||
Integrations
|
Integrations
|
||||||
------------
|
------------
|
||||||
|
|
||||||
- Payleven? Payment
|
|
||||||
- Bonnetjes machine
|
- Bonnetjes machine
|
||||||
|
- Payleven? Payment
|
||||||
|
|||||||
Reference in New Issue
Block a user