Skip to content

Commit

Permalink
fix: requested ui changes
Browse files Browse the repository at this point in the history
  • Loading branch information
diegosteiner committed Jan 14, 2025
1 parent 3b56d77 commit 2b8fa30
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
22 changes: 11 additions & 11 deletions app/views/manage/bookings/_form.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,35 @@

= f.fields_for :tenant, (@booking.tenant || @booking.build_tenant) do |cf|
= cf.hidden_field :id
= f.email_field :email
= f.email_field :email, required: false
= f.check_box :notifications_enabled

.row
.col-sm-6.col-md-4
= cf.text_field :first_name
= cf.text_field :first_name, required: false

.col-sm-6.col-md-4
= cf.text_field :last_name
= cf.text_field :last_name, required: false

.col-md-4
- if current_organisation.show_nickname?
= cf.text_field :nickname, label: current_organisation.nickname_label

= cf.text_field :street_address
= cf.text_field :street_address, required: false
= cf.text_field :address_addon

.row
.col-sm-4
= cf.text_field :zipcode
= cf.text_field :zipcode, required: false
.col-sm-8
= cf.text_field :city
= cf.text_field :city, required: false

= cf.form_group :country_code, label: { text: Tenant.human_attribute_name(:country_code) } do
= cf.country_select :country_code, { default: "CH", priority_countries: %w[CH DE FR IT] }, class: 'form-control'

= cf.text_field :phone
= cf.text_field :phone, required: false
= cf.date_select :birth_date, use_two_digit_numbers: true, start_year: Time.zone.today.year - 75, end_year: Time.zone.today.year - 17, include_blank: true
= cf.select :locale, current_organisation.locales.map { [_1.upcase, _1.downcase] }
= cf.select :locale, current_organisation.locales.map { [_1.upcase, _1.downcase] }, required: false
= f.text_field :tenant_organisation
= f.text_area :invoice_address

Expand All @@ -77,12 +77,12 @@

- booking_categories = [current_organisation.booking_categories.kept, @booking.category].flatten.compact_blank.uniq
- if booking_categories.many?
= f.collection_select :booking_category_id, booking_categories, :id, :title, include_blank: true
= f.collection_select :booking_category_id, booking_categories, :id, :title, include_blank: true, required: false
- else
= f.hidden_field :booking_category_id, value: booking_categories.first&.id

= f.text_field :purpose_description
= f.text_field :approximate_headcount, inputmode: "numeric"
= f.text_field :purpose_description, required: false
= f.text_field :approximate_headcount, inputmode: "numeric" , required: false
= f.text_area :remarks
= f.text_area :internal_remarks
= f.text_area :cancellation_reason
Expand Down
8 changes: 6 additions & 2 deletions app/views/manage/invoices/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,19 @@
span.ms-2.fa.fa-print
- else
= link_to (invoice.ref || invoice.payment_ref), manage_invoice_path(invoice)
.small.text-muted
= invoice.payment_ref
td.align-middle
= invoice.model_name.human

td.align-middle
- if invoice.payable_until.present?
- if invoice.payable_until.past?
- if invoice.payable_until.past? && !invoice.paid?
.text-danger= l(invoice.payable_until, format: :date)
.text-danger= distance_of_time_in_words_to_now(invoice.payable_until)
- else
=l(invoice.payable_until, format: :date)
div=l(invoice.payable_until, format: :date)
div= distance_of_time_in_words_to_now(invoice.payable_until)
- if invoice.sent?
span.badge.badge-pill.bg-success.ms-1
span.fa.fa-envelope-open.text-white[title="#{Invoice.human_attribute_name(:sent_at)}: #{l(invoice.sent_at)}"]
Expand Down

0 comments on commit 2b8fa30

Please sign in to comment.