mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-03-22 13:19:50 +01:00
fix setting.get for boolean
This commit is contained in:
parent
98c63e8327
commit
01017f3012
@ -41,7 +41,7 @@ class PDF::Invoice < Prawn::Document
|
||||
else
|
||||
text I18n.t('invoices.invoice_reference', REF: invoice.reference), leading: 3
|
||||
end
|
||||
if Setting.get('invoice_code-active') == 'true'
|
||||
if Setting.get('invoice_code-active')
|
||||
text I18n.t('invoices.code', CODE: Setting.get('invoice_code-value')), leading: 3
|
||||
end
|
||||
if invoice.invoiced_type != WalletTransaction.name
|
||||
@ -251,7 +251,7 @@ class PDF::Invoice < Prawn::Document
|
||||
row(0).font_style = :bold
|
||||
column(1).style align: :right
|
||||
|
||||
if Setting.get('invoice_VAT-active') == 'true'
|
||||
if Setting.get('invoice_VAT-active')
|
||||
# Total incl. taxes
|
||||
row(-1).style align: :right
|
||||
row(-1).background_color = 'E4E4E4'
|
||||
|
@ -5,7 +5,7 @@ class SlotPolicy < ApplicationPolicy
|
||||
def update?
|
||||
# check that the update is allowed and the prevention delay has not expired
|
||||
delay = Setting.get('booking_move_delay').to_i
|
||||
enabled = (Setting.get('booking_move_enable') == 'true')
|
||||
enabled = Setting.get('booking_move_enable')
|
||||
|
||||
# these condition does not apply to admins
|
||||
user.admin? || user.manager? ||
|
||||
|
@ -4,7 +4,7 @@
|
||||
class Availabilities::PublicAvailabilitiesService
|
||||
def initialize(current_user)
|
||||
@current_user = current_user
|
||||
@service = Availabilities::StatusService.new('')
|
||||
@service = Availabilities::StatusService.new('public')
|
||||
end
|
||||
|
||||
# provides a list of slots and availabilities for the machines, between the given dates
|
||||
|
@ -4,7 +4,7 @@
|
||||
class Availabilities::StatusService
|
||||
def initialize(current_user_role)
|
||||
@current_user_role = current_user_role
|
||||
@show_name = (%w[admin manager].include?(@current_user_role) || Setting.get('display_name_enable') == 'true')
|
||||
@show_name = (%w[admin manager].include?(@current_user_role) || Setting.get('display_name_enable'))
|
||||
end
|
||||
|
||||
# check that the provided machine slot is reserved or not and modify it accordingly
|
||||
|
Loading…
x
Reference in New Issue
Block a user