- storing ||= f.object
- variant = Maybe(storing.parcel_item.variant)

.nested-fields.storing-fields
  .delivery-item
    = f.referenced_association :storage, source: :storage, label: false, input_html: { class: 'storing-storage', data: { product_of_delivery_item: { url: backend_product_path("RECORD_ID", format: :json), scope: 'storage' }, required: true } }
    %input.hidden{data: { 'when-item': 'name', 'when-set-value': 'RECORD_VALUE', 'when-scope': 'storage'}}
  .storing-quantifier
    = f.input :quantity, label: false, wrapper: :append do
      = f.input_field :quantity, class: 'storing-quantity', placeholder: '0', data: { required: true }
      %span.add-on.storage-unit-name{data: { 'when-item': 'unit_name', 'when-set-value': 'RECORD_VALUE', 'when-scope': 'unit'}}
        = variant.unit_name.or_else('#')
  .nested-remove.act
    - if f.object.destroyable?
      = link_to_remove_association(content_tag(:i) + h(:destroy.tl), f, 'data-no-turbolink' => true, class: 'destroy remove remove-item')
- storing ||= f.object
- variant = Maybe(storing.parcel_item.variant)

.nested-fields.storing-fields
  .delivery-item
    = f.referenced_association :storage, source: :storage, label: false, input_html: { class: 'storing-storage', data: { product_of_delivery_item: { url: backend_product_path("RECORD_ID", format: :json), scope: 'storage' }, required: true } }
    %input.hidden{data: { 'when-item': 'name', 'when-set-value': 'RECORD_VALUE', 'when-scope': 'storage'}}
  .storing-quantifier
    = f.input :quantity, label: false, wrapper: :append do
      = f.input_field :quantity, class: 'storing-quantity', placeholder: '0', data: { required: true }
      %span.add-on.item-population-unit-name.storage-unit-name{data: { 'when-item': 'unit_name', 'when-set-value': 'RECORD_VALUE', 'when-scope': 'unit'}}
        = variant.unit_name.or_else('#')
  .nested-remove.act
    - if f.object.destroyable?
      = link_to_remove_association(content_tag(:i) + h(:destroy.tl), f, 'data-no-turbolink' => true, class: 'destroy remove remove-item')
Fix bug where unit name didn't display correctly when adding a storage zone
Fix bug where unit name didn't display correctly when adding a storage zone
