User flow updates
This commit is contained in:
@@ -73,8 +73,8 @@ gem 'simply_stored', github: 'bterkuile/simply_stored', branch: :master
|
|||||||
gem 'devise' #, github: 'plataformatec/devise', branch: 'lm-rails-4-2' #, '3.1.0' #, '2.0.4'
|
gem 'devise' #, github: 'plataformatec/devise', branch: 'lm-rails-4-2' #, '3.1.0' #, '2.0.4'
|
||||||
gem 'devise_simply_stored', github: 'bterkuile/devise_simply_stored', branch: :master
|
gem 'devise_simply_stored', github: 'bterkuile/devise_simply_stored', branch: :master
|
||||||
gem 'devise-i18n'
|
gem 'devise-i18n'
|
||||||
gem 'omniauth-facebook'
|
#gem 'omniauth-facebook'
|
||||||
gem 'omniauth-instagram'
|
#gem 'omniauth-instagram'
|
||||||
#gem 'simple_form'
|
#gem 'simple_form'
|
||||||
gem 'active_decorator' #, path: '/Users/bterkuile/companytools/development/rails/components/active_decorator'
|
gem 'active_decorator' #, path: '/Users/bterkuile/companytools/development/rails/components/active_decorator'
|
||||||
#gem 'cmtool', github: 'bterkuile/cmtool'
|
#gem 'cmtool', github: 'bterkuile/cmtool'
|
||||||
|
|||||||
+31
-68
@@ -151,9 +151,9 @@ GEM
|
|||||||
airbrussh (1.5.3)
|
airbrussh (1.5.3)
|
||||||
sshkit (>= 1.6.1, != 1.7.0)
|
sshkit (>= 1.6.1, != 1.7.0)
|
||||||
base64 (0.3.0)
|
base64 (0.3.0)
|
||||||
bcrypt (3.1.20)
|
bcrypt (3.1.21)
|
||||||
bcrypt_pbkdf (1.1.1)
|
bcrypt_pbkdf (1.1.1)
|
||||||
bigdecimal (3.3.1)
|
bigdecimal (4.0.1)
|
||||||
builder (3.3.0)
|
builder (3.3.0)
|
||||||
cancancan (3.6.1)
|
cancancan (3.6.1)
|
||||||
capistrano (3.19.2)
|
capistrano (3.19.2)
|
||||||
@@ -197,8 +197,8 @@ GEM
|
|||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.12.2)
|
coffee-script-source (1.12.2)
|
||||||
concurrent-ruby (1.3.5)
|
concurrent-ruby (1.3.6)
|
||||||
connection_pool (2.5.4)
|
connection_pool (3.0.2)
|
||||||
cookiejar (0.3.4)
|
cookiejar (0.3.4)
|
||||||
couchrest (2.0.1)
|
couchrest (2.0.1)
|
||||||
httpclient (~> 2.8)
|
httpclient (~> 2.8)
|
||||||
@@ -213,11 +213,11 @@ GEM
|
|||||||
cucumber-messages (29.0.1)
|
cucumber-messages (29.0.1)
|
||||||
cuke_modeler (3.26.0)
|
cuke_modeler (3.26.0)
|
||||||
cucumber-gherkin (< 37.0)
|
cucumber-gherkin (< 37.0)
|
||||||
date (3.5.0)
|
date (3.5.1)
|
||||||
devise (4.9.4)
|
devise (5.0.0)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
orm_adapter (~> 0.1)
|
orm_adapter (~> 0.1)
|
||||||
railties (>= 4.1.0)
|
railties (>= 7.0)
|
||||||
responders
|
responders
|
||||||
warden (~> 1.2.3)
|
warden (~> 1.2.3)
|
||||||
devise-i18n (1.15.0)
|
devise-i18n (1.15.0)
|
||||||
@@ -238,7 +238,7 @@ GEM
|
|||||||
eventmachine (>= 1.0.0.beta.4)
|
eventmachine (>= 1.0.0.beta.4)
|
||||||
email_validator (2.2.4)
|
email_validator (2.2.4)
|
||||||
activemodel
|
activemodel
|
||||||
erb (6.0.0)
|
erb (6.0.1)
|
||||||
erubi (1.13.1)
|
erubi (1.13.1)
|
||||||
eventmachine (1.2.7)
|
eventmachine (1.2.7)
|
||||||
exception_notification (5.0.1)
|
exception_notification (5.0.1)
|
||||||
@@ -250,12 +250,6 @@ GEM
|
|||||||
factory_bot_rails (6.5.1)
|
factory_bot_rails (6.5.1)
|
||||||
factory_bot (~> 6.5)
|
factory_bot (~> 6.5)
|
||||||
railties (>= 6.1.0)
|
railties (>= 6.1.0)
|
||||||
faraday (2.14.0)
|
|
||||||
faraday-net_http (>= 2.0, < 3.5)
|
|
||||||
json
|
|
||||||
logger
|
|
||||||
faraday-net_http (3.4.2)
|
|
||||||
net-http (~> 0.5)
|
|
||||||
faye (1.4.1)
|
faye (1.4.1)
|
||||||
cookiejar (>= 0.3.0)
|
cookiejar (>= 0.3.0)
|
||||||
em-http-request (>= 1.1.6)
|
em-http-request (>= 1.1.6)
|
||||||
@@ -303,15 +297,15 @@ GEM
|
|||||||
google-protobuf (>= 3.25, < 5.0)
|
google-protobuf (>= 3.25, < 5.0)
|
||||||
googleapis-common-protos-types (~> 1.0)
|
googleapis-common-protos-types (~> 1.0)
|
||||||
hashdiff (1.2.1)
|
hashdiff (1.2.1)
|
||||||
hashie (5.0.0)
|
|
||||||
http_parser.rb (0.8.0)
|
http_parser.rb (0.8.0)
|
||||||
httpclient (2.9.0)
|
httpclient (2.9.0)
|
||||||
mutex_m
|
mutex_m
|
||||||
i18n (1.14.7)
|
i18n (1.14.8)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
io-console (0.8.1)
|
io-console (0.8.2)
|
||||||
irb (1.15.3)
|
irb (1.17.0)
|
||||||
pp (>= 0.6.0)
|
pp (>= 0.6.0)
|
||||||
|
prism (>= 1.3.0)
|
||||||
rdoc (>= 4.0.0)
|
rdoc (>= 4.0.0)
|
||||||
reline (>= 0.4.2)
|
reline (>= 0.4.2)
|
||||||
iso_country_codes (0.7.8)
|
iso_country_codes (0.7.8)
|
||||||
@@ -324,9 +318,7 @@ GEM
|
|||||||
js-routes (2.3.5)
|
js-routes (2.3.5)
|
||||||
railties (>= 5)
|
railties (>= 5)
|
||||||
sorbet-runtime
|
sorbet-runtime
|
||||||
json (2.16.0)
|
json (2.18.1)
|
||||||
jwt (3.1.2)
|
|
||||||
base64
|
|
||||||
kaminari (1.2.2)
|
kaminari (1.2.2)
|
||||||
activesupport (>= 4.1.0)
|
activesupport (>= 4.1.0)
|
||||||
kaminari-actionview (= 1.2.2)
|
kaminari-actionview (= 1.2.2)
|
||||||
@@ -352,7 +344,7 @@ GEM
|
|||||||
letter_opener (1.10.0)
|
letter_opener (1.10.0)
|
||||||
launchy (>= 2.2, < 4)
|
launchy (>= 2.2, < 4)
|
||||||
logger (1.7.0)
|
logger (1.7.0)
|
||||||
loofah (2.24.1)
|
loofah (2.25.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.12.0)
|
nokogiri (>= 1.12.0)
|
||||||
mail (2.9.0)
|
mail (2.9.0)
|
||||||
@@ -374,16 +366,13 @@ GEM
|
|||||||
mini_magick (5.3.1)
|
mini_magick (5.3.1)
|
||||||
logger
|
logger
|
||||||
mini_mime (1.1.5)
|
mini_mime (1.1.5)
|
||||||
minitest (5.26.2)
|
minitest (6.0.1)
|
||||||
|
prism (~> 1.5)
|
||||||
momentjs-rails (2.29.4.1)
|
momentjs-rails (2.29.4.1)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
multi_json (1.17.0)
|
multi_json (1.17.0)
|
||||||
multi_xml (0.7.2)
|
|
||||||
bigdecimal (~> 3.1)
|
|
||||||
mutex_m (0.3.0)
|
mutex_m (0.3.0)
|
||||||
naught (1.1.0)
|
naught (1.1.0)
|
||||||
net-http (0.8.0)
|
|
||||||
uri (>= 0.11.1)
|
|
||||||
net-imap (0.5.12)
|
net-imap (0.5.12)
|
||||||
date
|
date
|
||||||
net-protocol
|
net-protocol
|
||||||
@@ -399,32 +388,12 @@ GEM
|
|||||||
net-protocol
|
net-protocol
|
||||||
net-ssh (7.3.0)
|
net-ssh (7.3.0)
|
||||||
nio4r (2.7.5)
|
nio4r (2.7.5)
|
||||||
nokogiri (1.18.10-aarch64-linux-gnu)
|
nokogiri (1.19.0-aarch64-linux-gnu)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.18.10-x86_64-darwin)
|
nokogiri (1.19.0-x86_64-darwin)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.18.10-x86_64-linux-gnu)
|
nokogiri (1.19.0-x86_64-linux-gnu)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
oauth2 (2.0.18)
|
|
||||||
faraday (>= 0.17.3, < 4.0)
|
|
||||||
jwt (>= 1.0, < 4.0)
|
|
||||||
logger (~> 1.2)
|
|
||||||
multi_xml (~> 0.5)
|
|
||||||
rack (>= 1.2, < 4)
|
|
||||||
snaky_hash (~> 2.0, >= 2.0.3)
|
|
||||||
version_gem (~> 1.1, >= 1.1.9)
|
|
||||||
omniauth (1.9.2)
|
|
||||||
hashie (>= 3.4.6)
|
|
||||||
rack (>= 1.6.2, < 3)
|
|
||||||
omniauth-facebook (10.0.0)
|
|
||||||
bigdecimal
|
|
||||||
omniauth-oauth2 (>= 1.2, < 3)
|
|
||||||
omniauth-instagram (1.3.0)
|
|
||||||
omniauth (~> 1)
|
|
||||||
omniauth-oauth2 (~> 1)
|
|
||||||
omniauth-oauth2 (1.7.3)
|
|
||||||
oauth2 (>= 1.4, < 3)
|
|
||||||
omniauth (>= 1.9, < 3)
|
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
ostruct (0.6.3)
|
ostruct (0.6.3)
|
||||||
paperclip (6.1.0)
|
paperclip (6.1.0)
|
||||||
@@ -443,6 +412,7 @@ GEM
|
|||||||
pp (0.6.3)
|
pp (0.6.3)
|
||||||
prettyprint
|
prettyprint
|
||||||
prettyprint (0.2.0)
|
prettyprint (0.2.0)
|
||||||
|
prism (1.9.0)
|
||||||
pry (0.15.2)
|
pry (0.15.2)
|
||||||
coderay (~> 1.1)
|
coderay (~> 1.1)
|
||||||
method_source (~> 1.0)
|
method_source (~> 1.0)
|
||||||
@@ -451,23 +421,23 @@ GEM
|
|||||||
yard (~> 0.9.11)
|
yard (~> 0.9.11)
|
||||||
pry-rails (0.3.11)
|
pry-rails (0.3.11)
|
||||||
pry (>= 0.13.0)
|
pry (>= 0.13.0)
|
||||||
psych (5.2.6)
|
psych (5.3.1)
|
||||||
date
|
date
|
||||||
stringio
|
stringio
|
||||||
public_suffix (6.0.2)
|
public_suffix (6.0.2)
|
||||||
puma (7.1.0)
|
puma (7.1.0)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
racc (1.8.1)
|
racc (1.8.1)
|
||||||
rack (2.2.21)
|
rack (3.2.4)
|
||||||
rack-cors (2.0.2)
|
rack-cors (2.0.2)
|
||||||
rack (>= 2.0.0)
|
rack (>= 2.0.0)
|
||||||
rack-session (1.0.2)
|
rack-session (2.1.1)
|
||||||
rack (< 3)
|
base64 (>= 0.1.0)
|
||||||
|
rack (>= 3.0.0)
|
||||||
rack-test (2.2.0)
|
rack-test (2.2.0)
|
||||||
rack (>= 1.3)
|
rack (>= 1.3)
|
||||||
rackup (1.0.1)
|
rackup (2.3.1)
|
||||||
rack (< 3)
|
rack (>= 3)
|
||||||
webrick
|
|
||||||
rails (8.1.1)
|
rails (8.1.1)
|
||||||
actioncable (= 8.1.1)
|
actioncable (= 8.1.1)
|
||||||
actionmailbox (= 8.1.1)
|
actionmailbox (= 8.1.1)
|
||||||
@@ -506,7 +476,7 @@ GEM
|
|||||||
tsort (>= 0.2)
|
tsort (>= 0.2)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
rake (13.3.1)
|
rake (13.3.1)
|
||||||
rdoc (6.15.1)
|
rdoc (7.2.0)
|
||||||
erb
|
erb
|
||||||
psych (>= 4.0.0)
|
psych (>= 4.0.0)
|
||||||
tsort
|
tsort
|
||||||
@@ -573,9 +543,6 @@ GEM
|
|||||||
actionpack (>= 3.1)
|
actionpack (>= 3.1)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
slim (>= 3.0, < 6.0, != 5.0.0)
|
slim (>= 3.0, < 6.0, != 5.0.0)
|
||||||
snaky_hash (2.0.3)
|
|
||||||
hashie (>= 0.1.0, < 6)
|
|
||||||
version_gem (>= 1.1.8, < 3)
|
|
||||||
sorbet-runtime (0.6.12780)
|
sorbet-runtime (0.6.12780)
|
||||||
sprockets (4.2.2)
|
sprockets (4.2.2)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
@@ -592,13 +559,13 @@ GEM
|
|||||||
net-sftp (>= 2.1.2)
|
net-sftp (>= 2.1.2)
|
||||||
net-ssh (>= 2.8.0)
|
net-ssh (>= 2.8.0)
|
||||||
ostruct
|
ostruct
|
||||||
stringio (3.1.8)
|
stringio (3.2.0)
|
||||||
temple (0.10.4)
|
temple (0.10.4)
|
||||||
terrapin (0.6.0)
|
terrapin (0.6.0)
|
||||||
climate_control (>= 0.0.3, < 1.0)
|
climate_control (>= 0.0.3, < 1.0)
|
||||||
test_squad (0.1.3)
|
test_squad (0.1.3)
|
||||||
rails
|
rails
|
||||||
thor (1.4.0)
|
thor (1.5.0)
|
||||||
tilt (2.6.1)
|
tilt (2.6.1)
|
||||||
timecop (0.9.10)
|
timecop (0.9.10)
|
||||||
timeout (0.4.4)
|
timeout (0.4.4)
|
||||||
@@ -612,14 +579,12 @@ GEM
|
|||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
uri (1.1.1)
|
uri (1.1.1)
|
||||||
useragent (0.16.11)
|
useragent (0.16.11)
|
||||||
version_gem (1.1.9)
|
|
||||||
warden (1.2.9)
|
warden (1.2.9)
|
||||||
rack (>= 2.0.9)
|
rack (>= 2.0.9)
|
||||||
webmock (3.26.1)
|
webmock (3.26.1)
|
||||||
addressable (>= 2.8.0)
|
addressable (>= 2.8.0)
|
||||||
crack (>= 0.3.2)
|
crack (>= 0.3.2)
|
||||||
hashdiff (>= 0.4.0, < 2.0.0)
|
hashdiff (>= 0.4.0, < 2.0.0)
|
||||||
webrick (1.9.1)
|
|
||||||
websocket-driver (0.8.0)
|
websocket-driver (0.8.0)
|
||||||
base64
|
base64
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
@@ -627,7 +592,7 @@ GEM
|
|||||||
xpath (3.2.0)
|
xpath (3.2.0)
|
||||||
nokogiri (~> 1.8)
|
nokogiri (~> 1.8)
|
||||||
yard (0.9.37)
|
yard (0.9.37)
|
||||||
zeitwerk (2.7.3)
|
zeitwerk (2.7.4)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
aarch64-linux
|
aarch64-linux
|
||||||
@@ -674,8 +639,6 @@ DEPENDENCIES
|
|||||||
mini_magick
|
mini_magick
|
||||||
mutex_m
|
mutex_m
|
||||||
naught
|
naught
|
||||||
omniauth-facebook
|
|
||||||
omniauth-instagram
|
|
||||||
pickadate-rails
|
pickadate-rails
|
||||||
poltergeist
|
poltergeist
|
||||||
pry-doc
|
pry-doc
|
||||||
|
|||||||
@@ -28,6 +28,12 @@
|
|||||||
h3
|
h3
|
||||||
color: $form-error-color
|
color: $form-error-color
|
||||||
font-size: 1.2em
|
font-size: 1.2em
|
||||||
|
// Temporary hack for some forms
|
||||||
|
.control-group
|
||||||
|
.controls
|
||||||
|
.error
|
||||||
|
// compensate the margin-bottom of the input above
|
||||||
|
margin-top: -16px
|
||||||
body
|
body
|
||||||
label
|
label
|
||||||
&.number
|
&.number
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# Contact page form
|
||||||
class ContactFormsController < ApplicationController
|
class ContactFormsController < ApplicationController
|
||||||
def create
|
def create
|
||||||
@contact_form = Cmtool::ContactForm.new(contact_form_params)
|
@contact_form = Cmtool::ContactForm.new(contact_form_params)
|
||||||
|
|||||||
+2
-1
@@ -1,4 +1,4 @@
|
|||||||
class Suppliers::SessionsController < Devise::SessionsController
|
class Employees::SessionsController < Devise::SessionsController
|
||||||
respond_to :json
|
respond_to :json
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@@ -10,6 +10,7 @@ class Suppliers::SessionsController < Devise::SessionsController
|
|||||||
render json: {employee_id: current_employee.id, auth_token: current_employee.authentication_token}
|
render json: {employee_id: current_employee.id, auth_token: current_employee.authentication_token}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# deprecated?
|
||||||
def destroy
|
def destroy
|
||||||
session[:supplier_id] = nil
|
session[:supplier_id] = nil
|
||||||
super
|
super
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
class ErrorsController < ApplicationController
|
||||||
|
def not_found
|
||||||
|
head :not_found # Renders an empty body with 404 status [5]
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
class RegistrationsController < Devise::RegistrationsController
|
# class RegistrationsController < Devise::RegistrationsController
|
||||||
protected
|
# protected
|
||||||
|
#
|
||||||
#def after_sign_up_path(resource)
|
# #def after_sign_up_path(resource)
|
||||||
#end
|
# #end
|
||||||
|
#
|
||||||
private
|
# private
|
||||||
|
#
|
||||||
# override devise internal to allow name as sign_up param
|
# # override devise internal to allow name as sign_up param
|
||||||
def sign_up_params
|
# def sign_up_params
|
||||||
params.require(resource_name).permit resource_class.authentication_keys + [:name, :password, :password_confirmation]
|
# params.require(resource_name).permit resource_class.authentication_keys + [:name, :password, :password_confirmation]
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
class Users::RegistrationsController < Devise::RegistrationsController
|
||||||
|
def create
|
||||||
|
devise_parameter_sanitizer.permit(:sign_up, keys: [:name])
|
||||||
|
super
|
||||||
|
# if resource.persisted?
|
||||||
|
# self.response_body = nil
|
||||||
|
# end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
class UsersController < ApplicationController
|
||||||
|
def show
|
||||||
|
authenticate_user!
|
||||||
|
@user = current_user
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
class WaiterController < ApplicationController
|
# class WaiterController < ApplicationController
|
||||||
layout 'waiter'
|
# layout 'waiter'
|
||||||
def index
|
# def index
|
||||||
|
#
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
def product_categories
|
# def product_categories
|
||||||
respond_to do |format|
|
# respond_to do |format|
|
||||||
format.html { redirect_to '/waiter'}
|
# format.html { redirect_to '/waiter'}
|
||||||
format.json { render json: ProductCategory.all.include_relation(:product), root: 'product_categories', each_serializer: ProductCategorySerializer }
|
# format.json { render json: ProductCategory.all.include_relation(:product), root: 'product_categories', each_serializer: ProductCategorySerializer }
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
def order_products
|
# def order_products
|
||||||
@table= Table.find_by_supplier_id_and_id!(current_supplier.id, params[:table_id])
|
# @table= Table.find_by_supplier_id_and_id!(current_supplier.id, params[:table_id])
|
||||||
@list = List.from_table_by_employee(@table, current_employee)
|
# @list = List.from_table_by_employee(@table, current_employee)
|
||||||
@list.place_order products: params[:order], employee: current_employee
|
# @list.place_order products: params[:order], employee: current_employee
|
||||||
render nothing: true
|
# render nothing: true
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ class User
|
|||||||
property :oauth_expires_at
|
property :oauth_expires_at
|
||||||
property :auth_data
|
property :auth_data
|
||||||
|
|
||||||
devise_plugins = [:database_authenticatable, :recoverable, :rememberable, :trackable, :omniauthable, {omniauth_providers: [:facebook, :instagram]}] #, :token_authenticatable , :registerable
|
devise_plugins = [:database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :trackable] #, :omniauthable, {omniauth_providers: [:facebook, :instagram]}] #, :token_authenticatable , :registerable
|
||||||
devise_plugins -= [:trackable] if Rails.env.test? # creates conflicts
|
devise_plugins -= [:trackable] if Rails.env.test? # creates conflicts
|
||||||
devise *devise_plugins
|
devise *devise_plugins
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -2,6 +2,7 @@ h2= t('devise.registrations.title')
|
|||||||
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
||||||
= devise_error_messages!
|
= devise_error_messages!
|
||||||
.control-group
|
.control-group
|
||||||
|
- binding.pry
|
||||||
= f.label :name, class: 'control-label'
|
= f.label :name, class: 'control-label'
|
||||||
.controls= f.text_field :name
|
.controls= f.text_field :name
|
||||||
.control-group
|
.control-group
|
||||||
@@ -15,5 +16,5 @@ h2= t('devise.registrations.title')
|
|||||||
.controls= f.password_field :password_confirmation
|
.controls= f.password_field :password_confirmation
|
||||||
.control-group
|
.control-group
|
||||||
.controls
|
.controls
|
||||||
= f.submit t('devise.registrations.button'), class: 'btn btn-primary'
|
= f.submit t('devise.registrations.button'), class: 'button2'
|
||||||
= render "devise_links"
|
= render "devise/links"
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
<h2>Sign up</h2>
|
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
|
||||||
<%= devise_error_messages! %>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :email %><br />
|
|
||||||
<%= f.email_field :email, autofocus: true %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :password %>
|
|
||||||
<% if @validatable %>
|
|
||||||
<em>(<%= @minimum_password_length %> characters minimum)</em>
|
|
||||||
<% end %><br />
|
|
||||||
<%= f.password_field :password, autocomplete: "off" %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :password_confirmation %><br />
|
|
||||||
<%= f.password_field :password_confirmation, autocomplete: "off" %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="actions">
|
|
||||||
<%= f.submit "Sign up" %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
<h2>Resend confirmation instructions</h2>
|
|
||||||
|
|
||||||
<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
|
|
||||||
<%= devise_error_messages! %>
|
|
||||||
|
|
||||||
<div><%= f.label :email %><br />
|
|
||||||
<%= f.email_field :email %></div>
|
|
||||||
|
|
||||||
<div><%= f.submit "Resend confirmation instructions" %></div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= render "links" %>
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
h2= t('devise.user.confirmations.title')
|
||||||
|
= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
||||||
|
= devise_error_messages!
|
||||||
|
.control-group
|
||||||
|
= f.label :email, class: 'control-label'
|
||||||
|
.controls
|
||||||
|
= f.email_field :email
|
||||||
|
.control-group
|
||||||
|
.controls
|
||||||
|
= f.submit t('devise.user.confirmations.button'), class: 'button'
|
||||||
|
= render 'users/devise/links'
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
dl.devise-links
|
||||||
|
- devise_mapping = Devise.mappings[resource_name]
|
||||||
|
dt= t 'devise.links.prefix'
|
||||||
|
- if controller_name != 'sessions'
|
||||||
|
dd= link_to t('devise.user.sign_in.link'), new_session_path(resource_name), class: ['devise-link', 'new-session']
|
||||||
|
|
||||||
|
- if devise_mapping.registerable? && controller_name != 'registrations'
|
||||||
|
dd= link_to t('devise.user.registrations.link'), new_registration_path(resource_name), class: ['devise-link', 'new-registration']
|
||||||
|
- if resource_name == :employee and controller_name != 'new_suppliers'
|
||||||
|
dd= link_to t('devise.user.registrations.link'), new_suppliers_path, class: ['devise-link', 'new-registration']
|
||||||
|
|
||||||
|
- if devise_mapping.recoverable? && controller_name != 'passwords'
|
||||||
|
dd= link_to t('devise.user.passwords.link'), new_password_path(resource_name), class: ['devise-link', 'forgot-password']
|
||||||
|
|
||||||
|
- if devise_mapping.confirmable? && controller_name != 'confirmations'
|
||||||
|
dd= link_to t('devise.user.confirmations.did_not_receive_instructions_link'), new_confirmation_path(resource_name), class: ['devise-link', 'did-not-receive-instructions']
|
||||||
|
|
||||||
|
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
|
||||||
|
dd= link_to t('devise.user.unlocks.did_not_receive_instructions_link'), new_unlock_path(resource_name), class: ['devise-link', 'did-not-receive-instructions']
|
||||||
|
|
||||||
|
- if devise_mapping.omniauthable?
|
||||||
|
- resource_class.omniauth_providers.each do |provider|
|
||||||
|
dd= link_to t('devise.user.omniauth_callbacks.sign_in_with', provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider), class: ['devise-link', 'omniauth', provider]
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
p= t('devise.mailer.confirmation_instructions.salutation', email: @resource.email)
|
p== t('mailer.user.confirmation_instructions.salutation', email: @resource.email)
|
||||||
|
|
||||||
p=raw t \
|
p== t \
|
||||||
'devise.mailer.confirmation_instructions.body',
|
'mailer.user.confirmation_instructions.body',
|
||||||
unconfirmed_email: @resource.unconfirmed_email,
|
unconfirmed_email: @resource.unconfirmed_email,
|
||||||
confirm_url: confirmation_url(@resource, :confirmation_token => @token)
|
confirm_url: confirmation_url(@resource, confirmation_token: @token)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
h2= t('devise.passwords.edit.title')
|
h2= t('devise.user.passwords.edit.title')
|
||||||
= form_for(resource, :as => resource_name, :url => password_path(resource_name), html: {class: 'form-horizontal', method: :put}) do |f|
|
= form_for(resource, :as => resource_name, :url => password_path(resource_name), html: {class: 'form-horizontal', method: :put}) do |f|
|
||||||
= devise_error_messages!
|
= devise_error_messages!
|
||||||
= f.hidden_field :reset_password_token
|
= f.hidden_field :reset_password_token
|
||||||
@@ -10,5 +10,5 @@ h2= t('devise.passwords.edit.title')
|
|||||||
.controls= f.password_field :password_confirmation
|
.controls= f.password_field :password_confirmation
|
||||||
.control-group
|
.control-group
|
||||||
.controls
|
.controls
|
||||||
= f.submit t('devise.passwords.edit.button'), class: 'btn btn-primary'
|
= f.submit t('devise.user.passwords.edit.button'), class: 'button'
|
||||||
= render "links"
|
= render 'users/devise/links'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
h2= t('devise.passwords.title')
|
h2= t('devise.user.passwords.title')
|
||||||
= form_for(resource, :as => resource_name, :url => password_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
= form_for(resource, :as => resource_name, :url => password_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
||||||
= devise_error_messages!
|
= devise_error_messages!
|
||||||
.control-group
|
.control-group
|
||||||
@@ -6,5 +6,5 @@ h2= t('devise.passwords.title')
|
|||||||
.controls= f.email_field :email
|
.controls= f.email_field :email
|
||||||
.control-group
|
.control-group
|
||||||
.controls
|
.controls
|
||||||
= f.submit t('devise.passwords.button'), class: 'btn btn-primary'
|
= f.submit t('devise.user.passwords.button'), class: 'button'
|
||||||
= render "links"
|
= render 'users/devise/links'
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
h2= t('devise.registrations.title')
|
h2= t('devise.user.registrations.title')
|
||||||
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
||||||
= devise_error_messages!
|
= devise_error_messages!
|
||||||
.control-group
|
.control-group
|
||||||
= f.label :name, class: 'control-label'
|
= f.label :name, class: 'control-label'
|
||||||
.controls= f.text_field :name
|
.controls= f.text_field :name
|
||||||
.control-group
|
.control-group
|
||||||
= f.label :email, class: 'control-label'
|
= f.label :email, class: 'control-label'
|
||||||
.controls= f.email_field :email
|
.controls
|
||||||
|
= f.email_field :email
|
||||||
|
- if f.object.errors[:email].present?
|
||||||
|
small.error= f.object.errors[:email].to_sentence
|
||||||
.control-group
|
.control-group
|
||||||
= f.label :password, class: 'control-label'
|
= f.label :password, class: 'control-label'
|
||||||
.controls= f.password_field :password
|
.controls= f.password_field :password
|
||||||
.control-group
|
.control-group
|
||||||
= f.label :password_confirmation, class: 'control-label'
|
= f.label :password_confirmation, class: 'control-label'
|
||||||
.controls= f.password_field :password_confirmation
|
.controls= f.password_field :password_confirmation
|
||||||
.control-group
|
.control-group
|
||||||
.controls
|
.controls
|
||||||
= f.submit t('devise.registrations.button'), class: 'btn btn-primary'
|
= f.submit t('devise.user.registrations.button'), class: 'button'
|
||||||
= render "links"
|
= render 'users/devise/links'
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
h2= t('devise.sessions.title')
|
h2= t('devise.user.sign_in.title')
|
||||||
= form_for(resource, :as => resource_name, :url => session_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
= form_for(resource, :as => resource_name, :url => session_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
||||||
= devise_error_messages!
|
= devise_error_messages!
|
||||||
.control-group
|
.control-group
|
||||||
= f.label :email, class: 'control-label'
|
= f.label :email, class: 'control-label'
|
||||||
.controls= f.email_field :email
|
.controls
|
||||||
|
= f.email_field :email
|
||||||
|
- if f.object.errors[:email].present?
|
||||||
|
small.error= f.object.errors[:email].to_sentence
|
||||||
.control-group
|
.control-group
|
||||||
= f.label :password, class: 'control-label'
|
= f.label :password, class: 'control-label'
|
||||||
.controls= f.password_field :password
|
.controls
|
||||||
|
= f.password_field :password
|
||||||
|
- if f.object.errors[:password].present?
|
||||||
|
small.error= f.object.errors[:password].to_sentence
|
||||||
.control-group
|
.control-group
|
||||||
.controls
|
.controls
|
||||||
= f.label :remember_me do
|
= f.label :remember_me do
|
||||||
= f.check_box :remember_me
|
= f.check_box :remember_me
|
||||||
|
|
|
|
||||||
= t('devise.sign_in.remember_me')
|
= t('devise.user.sign_in.remember_me')
|
||||||
.control-group
|
.control-group
|
||||||
.controls
|
.controls
|
||||||
= f.submit t('devise.sign_in.button'), class: 'button'
|
= f.submit t('devise.user.sign_in.button'), class: 'button'
|
||||||
= render "links"
|
= render 'users/devise/links'
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ if Rails.env.development?
|
|||||||
alias_method :old_execute, :execute
|
alias_method :old_execute, :execute
|
||||||
def execute(method, path, options, payload = nil, &block)
|
def execute(method, path, options, payload = nil, &block)
|
||||||
Rails.logger.debug "Couch: #{method} #{Rack::Utils.unescape path} #{options}"
|
Rails.logger.debug "Couch: #{method} #{Rack::Utils.unescape path} #{options}"
|
||||||
puts "Couch: #{method} #{Rack::Utils.unescape path} #{options}"
|
#puts "Couch: #{method} #{Rack::Utils.unescape path} #{options}"
|
||||||
old_execute(method, path, options, payload, &block)
|
old_execute(method, path, options, payload, &block)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -256,10 +256,10 @@ Devise.setup do |config|
|
|||||||
provider_ignores_state: true
|
provider_ignores_state: true
|
||||||
config.omniauth :instagram, "cd7bdfbee825499b94fb3783d1bc143b", "6b4f9ecf251c462993a696eebc0189be"
|
config.omniauth :instagram, "cd7bdfbee825499b94fb3783d1bc143b", "6b4f9ecf251c462993a696eebc0189be"
|
||||||
else
|
else
|
||||||
config.omniauth :facebook, "168928633304849", "22bc53e1a390c1e62d004195c55fe336",
|
# config.omniauth :facebook, "168928633304849", "22bc53e1a390c1e62d004195c55fe336",
|
||||||
scope: 'email,user_birthday,user_gender,user_hometown,user_link,user_location',
|
# scope: 'email,user_birthday,user_gender,user_hometown,user_link,user_location',
|
||||||
provider_ignores_state: true
|
# provider_ignores_state: true
|
||||||
config.omniauth :instagram, "81c78b969a7046d6b6b5b5fe3f30929c", "3697c16762ad4f1ca088e829efbaddde"
|
# config.omniauth :instagram, "81c78b969a7046d6b6b5b5fe3f30929c", "3697c16762ad4f1ca088e829efbaddde"
|
||||||
end
|
end
|
||||||
|
|
||||||
# ==> Warden configuration
|
# ==> Warden configuration
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
OmniAuth.config.full_host = Rails.env.production? ? 'https://www.mozo.bar' : 'https://localhost:3002'
|
#OmniAuth.config.full_host = Rails.env.production? ? 'https://www.mozo.bar' : 'https://localhost:3002'
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,24 @@
|
|||||||
en:
|
en:
|
||||||
devise:
|
devise:
|
||||||
sign_in:
|
user:
|
||||||
title: Sign in
|
sign_in:
|
||||||
remember_me: Remember me
|
title: Sign in
|
||||||
link: Sign in
|
remember_me: Remember me
|
||||||
button: Sign in
|
link: Sign in
|
||||||
passwords:
|
button: Sign in
|
||||||
title: Recover password
|
passwords:
|
||||||
link: Recover password
|
title: Recover password
|
||||||
button: Send reset
|
link: Recover password
|
||||||
edit:
|
button: Send reset
|
||||||
title: Change your password
|
edit:
|
||||||
button: Change password
|
title: Change your password
|
||||||
registrations:
|
button: Change password
|
||||||
title: Sign up for mozo as a restaurant
|
registrations:
|
||||||
link: Sign up
|
title: Sign up for mozo as a user
|
||||||
|
link: Sign up
|
||||||
|
button: Sign up
|
||||||
|
confirmations:
|
||||||
|
title: Resend confirmation instructions
|
||||||
|
button: Resend confirmation instructions
|
||||||
links:
|
links:
|
||||||
prefix: 'OR:'
|
prefix: 'OR:'
|
||||||
|
|||||||
@@ -1,19 +1,24 @@
|
|||||||
nl:
|
nl:
|
||||||
devise:
|
devise:
|
||||||
sign_in:
|
user:
|
||||||
title: Inloggen
|
sign_in:
|
||||||
remember_me: Mij onthouden
|
title: Inloggen
|
||||||
link: Inloggen
|
remember_me: Mij onthouden
|
||||||
button: Inloggen
|
link: Inloggen
|
||||||
passwords:
|
button: Inloggen
|
||||||
title: Wachtwoord vergeten
|
passwords:
|
||||||
link: Wachtwoord vergeten
|
title: Wachtwoord vergeten
|
||||||
button: Stuur reset
|
link: Wachtwoord vergeten
|
||||||
edit:
|
button: Stuur reset
|
||||||
title: Change your password
|
edit:
|
||||||
button: Change password
|
title: Change your password
|
||||||
registrations:
|
button: Change password
|
||||||
title: Aanmelden als restaurant
|
registrations:
|
||||||
link: Aanmelden
|
title: Aanmelden als gebruiker
|
||||||
|
link: Aanmelden
|
||||||
|
button: Aanmelden
|
||||||
|
confirmations:
|
||||||
|
title: Resend confirmation instructions
|
||||||
|
button: Resend confirmation instructions
|
||||||
links:
|
links:
|
||||||
prefix: 'OF:'
|
prefix: 'OF:'
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
en:
|
||||||
|
mailer:
|
||||||
|
supplier:
|
||||||
|
creation:
|
||||||
|
subject: 'Weklom bij mozo.bar'
|
||||||
|
title: 'De aanmelding van %{name} bij mozo.bar is gelukt!'
|
||||||
|
user:
|
||||||
|
confirmation_instructions:
|
||||||
|
salutation: Welcome to mozo.bar. You registered a new account as %{email}
|
||||||
|
body: |
|
||||||
|
Your registration at the moment is unconfirmed. To confirm your email, click on the following link:
|
||||||
|
<a href="%{confirm_url}">Confirm %{unconfirmed_email}</a>
|
||||||
@@ -4,3 +4,9 @@ nl:
|
|||||||
creation:
|
creation:
|
||||||
subject: 'Weklom bij mozo.bar'
|
subject: 'Weklom bij mozo.bar'
|
||||||
title: 'De aanmelding van %{name} bij mozo.bar is gelukt!'
|
title: 'De aanmelding van %{name} bij mozo.bar is gelukt!'
|
||||||
|
user:
|
||||||
|
confirmation_instructions:
|
||||||
|
salutation: Welcome to mozo.bar. You registered a new account as %{email}
|
||||||
|
body: |
|
||||||
|
Your registration at the moment is unconfirmed. To confirm your email, click on the following link:
|
||||||
|
<a href="%{confirm_url}">Confirm %{unconfirmed_email}>
|
||||||
|
|||||||
+8
-2
@@ -1,13 +1,19 @@
|
|||||||
ALLOWED_LOCALES = /nl|de|fr|en|es/
|
ALLOWED_LOCALES = /nl|de|fr|en|es/
|
||||||
Mozo::Application.routes.draw do
|
Mozo::Application.routes.draw do
|
||||||
devise_for :users, controllers: { omniauth_callbacks: "users/omniauth_callbacks" }
|
match '/.well-known/*rest', to: 'errors#not_found', via: :all
|
||||||
|
match '/system/*rest', to: 'errors#not_found', via: :all
|
||||||
|
devise_for :users, controllers: {
|
||||||
|
registrations: 'users/registrations'
|
||||||
|
} #, controllers: { omniauth_callbacks: "users/omniauth_callbacks" }
|
||||||
|
resources :users, only: [:show]
|
||||||
#devise_for :suppliers, controllers: { confirmations: 'confirmations', registrations: 'registrations' }
|
#devise_for :suppliers, controllers: { confirmations: 'confirmations', registrations: 'registrations' }
|
||||||
devise_for :employees, controllers: {
|
devise_for :employees, controllers: {
|
||||||
#confirmations: 'confirmations',
|
#confirmations: 'confirmations',
|
||||||
#registrations: 'registrations',
|
#registrations: 'registrations',
|
||||||
sessions: 'suppliers/sessions'
|
sessions: 'employees/sessions'
|
||||||
}
|
}
|
||||||
devise_for :administrators
|
devise_for :administrators
|
||||||
|
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
resources :users do
|
resources :users do
|
||||||
collection do
|
collection do
|
||||||
|
|||||||
Reference in New Issue
Block a user