Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .container-fluid.app-frame__container
- = render partial: 'shared/design_system/title_bar', locals: { title: @operation[:title], actions: @operation[:actions], submit_button: nil, prev_link: nil, next_link: nil, back: @operation[:back_button] }
- = render layout: 'shared/design_system/empty_section' do
- .card.col.p-3.inspection-label
- .card__section
- .inspection_label.d-flex.flex-column
- .row.first-info.d-flex
- .leftdescription.col-8.d-flex.flex-column.text-center
- .description
- = @operation[:product].partnumber.description
- .partnumber
- = @operation[:product].partnumber.code
- .serial
- = @operation[:product].code_number_label
- .right_description.col-4.text-center.d-flex.flex-column
- .row.first_row
- .product.col-6.d-flex.flex-column.justify-content-center
- = @operation[:product].partnumber.partnumber_category.human_type_of
- .condition.col-6.d-flex.flex-column.justify-content-center
- = @operation[:product].condition.name.humanize
- .row.second_row
- .quantity.col-6.d-flex.flex-column.justify-content-center
- = join_quantity_amount(@operation)
- .status.col-6.d-flex.flex-column.justify-content-center
- = label_approval_text(@operation[:product]&.last_inspection)
- .mid-info.d-flex.flex-column
- .row.label_row
- .provider_label.col-3.text-center.font-weight-bold
- = t('application.products.label_preview.provider')
- .next_inspection_label.col-3.text-center.font-weight-bold
- = inspection_date_label_and_field(@operation[:product].partnumber.type_of, @operation[:product]&.last_inspection)[:label]
- .manufacture_label.col-3.text-center.font-weight-bold
- = t('application.products.label_preview.manufacture_date')
- .reception_label.col-3.text-center.font-weight-bold
- = t('application.products.label_preview.reception_date')
- .row.mid-info_data_row
- .provider_data.col-3.text-center
- = @operation[:product]&.last_inspection&.provider&.name || t('application.products.label_preview.unknown')
- .next_inspection_data.col-3.text-center
- = inspection_date_label_and_field(@operation[:product].partnumber.type_of, @operation[:product]&.last_inspection)[:field]
- .manufacture_data.col-3.text-center
- = format_date_label(@operation[:product]&.last_inspection&.aditional_information&.manufacture_date)
- .reception_data.col-3.text-center
- = format_date_label(@operation[:product]&.last_inspection&.created_at)
- - if @operation[:product].partnumber.type_of === 'component'
- .row.label_row
- .tsn_label.col-3.text-center.font-weight-bold
- = t('application.products.label_preview.tsn')
- .csn_label.col-3.text-center.font-weight-bold
- = t('application.products.label_preview.csn')
- .tso_label.col-3.text-center.font-weight-bold
- = t('application.products.label_preview.tso')
- .cso_label.col-3.text-center.font-weight-bold
- = t('application.products.label_preview.cso')
- .row.mid-info_data_row
- .tsn_data.col-3.text-center
- = @operation[:product]&.last_inspection&.aditional_information&.tsn || t('application.products.label_preview.unknown')
- .csn_data.col-3.text-center
- = @operation[:product]&.last_inspection&.aditional_information&.csn || t('application.products.label_preview.unknown')
- .tso_data.col-3.text-center
- = @operation[:product]&.last_inspection&.aditional_information&.tso || t('application.products.label_preview.unknown')
- .cso_data.col-3.text-center
- = @operation[:product]&.last_inspection&.aditional_information&.cso || t('application.products.label_preview.unknown')
- - if @operation[:product].partnumber.type_of === 'tool'
- .row.label_row
- .calibration_date_label.col-6.text-center.font-weight-bold
- = t('application.products.label_preview.last_calibration_date')
- .calibrated_by_label.col-6.text-center.font-weight-bold
- = t('application.products.label_preview.calibrated_by')
- .row.mid-info_data_row
- .calibration_date_data.col-6.text-center
- = @operation[:product]&.last_inspection&.aditional_information&.formatted_date_short(@operation[:product]&.last_inspection&.aditional_information&.last_calibration_date) || t('application.products.label_preview.unknown')
- .calibrated_by_data.col-6.text-center
- = @operation[:product]&.last_inspection&.adi
- .row.last-info
- .col-12
- .row.label_row
- .inspector_label.col-6.text-center.font-weight-bold
- = t('application.products.label_preview.inspector')
- .barcode_label.col-6.text-center.font-weight-bold
- = t('application.products.label_preview.bar_code')
- .col-12
- .row
- .inspector_data.col-6.d-flex.flex-column.text-center
- .row
- .col-12.d-flex.flex-column.text-center
- .fullname
- = @operation[:product]&.last_inspection&.inspector&.full_name || t('application.products.label_preview.unknown')
- .license
- = 'Licencia'
- .signature
- .barcodedata.col-6
- .row
- .barcodediv.d-flex.flex-column.text-center.col-12
- .barcode
- = barcode_image_tag(@operation[:product].reference_code, height: 80, width: 150)
- .barcode_string
- = @operation[:product].reference_code
- -# codigo con la tabla nueva fija, sin display-none
- -# %table
- -# %tr
- -# %td
- -# %table
- -# %tr
- -# %td.text-center
- -# = @operation[:product].partnumber.description
- -# %tr
- -# %td.text-center
- -# = @operation[:product].partnumber.code
- -# %tr
- -# %td.text-center
- -# = @operation[:product].code_number_label
- -# %td
- -# %table
- -# %tr
- -# %td.text-center
- -# = @operation[:product].partnumber.partnumber_category.human_type_of
- -# %td.text-center
- -# = @operation[:product].condition.name.humanize
- -# %tr
- -# %td.text-center
- -# = join_quantity_amount(@operation)
- -# %td.text-center
- -# = label_approval_text(@operation[:product]&.last_inspection)
- -# %tr
- -# %table
- -# %tr
- -# %td.font-weight-bold.text-center
- -# = t('application.products.label_preview.provider')
- -# %td.font-weight-bold.text-center
- -# = inspection_date_label_and_field(@operation[:product].partnumber.type_of, @operation[:product]&.last_inspection)[:label]
- -# %td.font-weight-bold.text-center
- -# = t('application.products.label_preview.manufacture_date')
- -# %td.font-weight-bold.text-center
- -# = t('application.products.label_preview.reception_date')
- -# %tr
- -# %td.text-center
- -# = @operation[:product]&.last_inspection&.provider&.name || t('application.products.label_preview.unknown')
- -# %td.text-center
- -# = inspection_date_label_and_field(@operation[:product].partnumber.type_of, @operation[:product]&.last_inspection)[:field]
- -# %td.text-center
- -# = format_date_label(@operation[:product]&.last_inspection&.aditional_information&.manufacture_date)
- -# %td.text-center
- -# = format_date_label(@operation[:product]&.last_inspection&.created_at)
- -# - if @operation[:product].partnumber.type_of === 'component'
- -# %tr
- -# %td.font-weight-bold.text-center
- -# = t('application.products.label_preview.tsn')
- -# %td.font-weight-bold.text-center
- -# = t('application.products.label_preview.csn')
- -# %td.font-weight-bold.text-center
- -# = t('application.products.label_preview.tso')
- -# %td.font-weight-bold.text-center
- -# = t('application.products.label_preview.cso')
- -# %tr
- -# %td.text-center
- -# = @operation[:product]&.last_inspection&.aditional_information&.tsn || t('application.products.label_preview.unknown')
- -# %td.text-center
- -# = @operation[:product]&.last_inspection&.aditional_information&.csn || t('application.products.label_preview.unknown')
- -# %td.text-center
- -# = @operation[:product]&.last_inspection&.aditional_information&.tso || t('application.products.label_preview.unknown')
- -# %td.text-center
- -# = @operation[:product]&.last_inspection&.aditional_information&.cso || t('application.products.label_preview.unknown')
- -# - if @operation[:product].partnumber.type_of === 'tool'
- -# %tr
- -# %table
- -# %tr
- -# %td.font-weight-bold.text-center
- -# = t('application.products.label_preview.last_calibration_date')
- -# %td.font-weight-bold.text-center
- -# = t('application.products.label_preview.calibrated_by')
- -# %tr
- -# %td.text-center
- -# = @operation[:product]&.last_inspection&.aditional_information&.formatted_date_short(@operation[:product]&.last_inspection&.aditional_information&.last_calibration_date) || t('application.products.label_preview.unknown')
- -# %td.text-center
- -# = @operation[:product]&.last_inspection&.aditional_information&.calibrated_by&.present? ? @operation[:product]&.last_inspection&.aditional_information&.calibrated_by : t('application.products.label_preview.unknown')
- -# %tr
- -# %table
- -# %tr
- -# %td.font-weight-bold.text-center
- -# = t('application.products.label_preview.inspector')
- -# %td.font-weight-bold.text-center
- -# = t('application.products.label_preview.bar_code')
- -# %tr
- -# %td
- -# %table
- -# %tr
- -# %td.text-center
- -# = @operation[:product]&.last_inspection&.inspector&.full_name || t('application.products.label_preview.unknown')
- -# %tr
- -# %td.text-center
- -# = 'Licencia'
- -# %tr
- -# %td
- -# %td
- -# %table
- -# %tr
- -# %div.text-center.py-5.user-carnet-barcode
- -# = barcode_image_tag(@operation[:product].reference_code, height: 80, width: 150)
- -# %span.d-block
- -# = @operation[:product].reference_code
- -# codigo con la tabla vieja y la tabla nueva con display-none
- -# %table.border.escondidito
- -# %tbody
- -# %tr
- -# %td.border.font-weight-bold= t('application.products.label_preview.description')
- -# %td.border.font-weight-bold= t('application.products.label_preview.partnumber_code')
- -# %td.border.font-weight-bold= t('application.products.label_preview.number')
- -# %td.border.font-weight-bold= t('application.products.label_preview.condition')
- -# %td.border.font-weight-bold= t('application.products.label_preview.provider')
- -# %tr
- -# %td.border
- -# = @operation[:product].partnumber.description
- -# %td.border
- -# = @operation[:product].partnumber.code
- -# %td.border
- -# = @operation[:product].code_number_label
- -# %td.border
- -# = @operation[:product].condition.name.humanize
- -# %td.border
- -# = @operation[:product]&.last_inspection&.provider&.name || t('application.products.label_preview.unknown')
- -# %tr
- -# %td.border.font-weight-bold= inspection_date_label_and_field(@operation[:product].partnumber.type_of, @operation[:product]&.last_inspection)[:label]
- -# %td.border.font-weight-bold= t('application.products.label_preview.manufacture_date')
- -# %td.border.font-weight-bold= t('application.products.label_preview.product_type')
- -# %td.border.font-weight-bold= t('application.products.label_preview.reception_date')
- -# %td.border.font-weight-bold= t('application.products.label_preview.quantity')
- -# %tr
- -# %td.border
- -# = inspection_date_label_and_field(@operation[:product].partnumber.type_of, @operation[:product]&.last_inspection)[:field]
- -# %td.border
- -# = @operation[:product]&.last_inspection&.aditional_information&.formatted_date_short(@operation[:product]&.last_inspection&.aditional_information&.manufacture_date) || t('application.products.label_preview.unknown')
- -# %td.border
- -# = @operation[:product].partnumber.partnumber_category.human_type_of
- -# %td.border
- -# = @operation[:product]&.last_inspection&.formatted_date(@operation[:product]&.last_inspection&.created_at) || t('application.products.label_preview.unknown')
- -# %td.border
- -# = @operation[:product].try(:quantity) || '1'
- -# - if @operation[:product].partnumber.type_of === 'tool'
- -# %tr
- -# %td.border.font-weight-bold{colspan:2}= t('application.products.label_preview.last_calibration_date')
- -# %td.border.font-weight-bold{colspan:3}= t('application.products.label_preview.calibrated_by')
- -# %tr
- -# %td.border{colspan:2}
- -# = @operation[:product]&.last_inspection&.aditional_information&.formatted_date_short(@operation[:product]&.last_inspection&.aditional_information&.last_calibration_date) || t('application.products.label_preview.unknown')
- -# %td.border{colspan:3}
- -# = @operation[:product]&.last_inspection&.aditional_information&.calibrated_by&.present? ? @operation[:product]&.last_inspection&.aditional_information&.calibrated_by : t('application.products.label_preview.unknown')
- -# %tr
- -# %td.border.font-weight-bold= t('application.products.label_preview.unit_measure')
- -# %td.border.font-weight-bold= t('application.products.label_preview.ata')
- -# %td.border.font-weight-bold= t('application.products.label_preview.subata')
- -# %td.border.font-weight-bold= t('application.products.label_preview.item')
- -# %td.border.font-weight-bold= t('application.products.label_preview.inspector')
- -# %tr
- -# %td.border
- -# = t("activerecord.attributes.unit_measure.names.#{@operation[:product].unit_measure.name}")
- -# %td.border
- -# = @operation[:product].partnumber.ata.present? ? @operation[:product].partnumber.ata : t('application.products.label_preview.unknown')
- -# %td.border
- -# = @operation[:product].partnumber.subata.present? ? @operation[:product].partnumber.subata : t('application.products.label_preview.unknown')
- -# %td.border
- -# = @operation[:product].partnumber.item.present? ? @operation[:product].partnumber.item : t('application.products.label_preview.unknown')
- -# %td.border
- -# = @operation[:product]&.last_inspection&.inspector&.full_name || t('application.products.label_preview.unknown')
- -# - if @operation[:product].partnumber.type_of === 'component'
- -# %tr
- -# %td.border.font-weight-bold= t('application.products.label_preview.tsn')
- -# %td.border.font-weight-bold= t('application.products.label_preview.csn')
- -# %td.border.font-weight-bold= t('application.products.label_preview.tso')
- -# %td.border.font-weight-bold{colspan:2}= t('application.products.label_preview.cso')
- -# %tr
- -# %td.border
- -# = @operation[:product]&.last_inspection&.aditional_information&.tsn || t('application.products.label_preview.unknown')
- -# %td.border
- -# = @operation[:product]&.last_inspection&.aditional_information&.csn || t('application.products.label_preview.unknown')
- -# %td.border
- -# = @operation[:product]&.last_inspection&.aditional_information&.tso || t('application.products.label_preview.unknown')
- -# %td.border{colspan: 2}
- -# = @operation[:product]&.last_inspection&.aditional_information&.cso || t('application.products.label_preview.unknown')
- -# %tr
- -# %td.border.font-weight-bold= t('application.products.label_preview.license')
- -# %td.border.font-weight-bold= t('application.products.label_preview.inspector_sign')
- -# %td.border.font-weight-bold= t('application.products.label_preview.status')
- -# %td.border.font-weight-bold.text-center{colspan:2}= t('application.products.label_preview.bar_code')
- -# %tr
- -# %td.border
- -# = 'Licencia'
- -# %td.border
- -# = 'Firma'
- -# %td.border.text-center
- -# %span.tag{class: label_approval_color(@operation[:product]&.last_inspection)}
- -# = label_approval_text(@operation[:product]&.last_inspection)
- -# %td.border.text-center{colspan:2}
- -# = barcode_image_tag(@operation[:product].reference_code, height: 50, width: 150)
- -# %br
- -# %strong.text-center
- -# = @operation[:product].reference_code
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement