daily pastebin goal
20%
SHARE
TWEET

Untitled

a guest Dec 19th, 2018 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .container-fluid.app-frame__container
  2.   = 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] }
  3.   = render layout: 'shared/design_system/empty_section' do
  4.     .card.col.p-3.inspection-label
  5.       .card__section
  6.         .inspection_label.d-flex.flex-column
  7.           .row.first-info.d-flex
  8.             .leftdescription.col-8.d-flex.flex-column.text-center
  9.               .description
  10.                 = @operation[:product].partnumber.description
  11.               .partnumber
  12.                 = @operation[:product].partnumber.code
  13.               .serial
  14.                 = @operation[:product].code_number_label
  15.             .right_description.col-4.text-center.d-flex.flex-column
  16.               .row.first_row
  17.                 .product.col-6.d-flex.flex-column.justify-content-center
  18.                   = @operation[:product].partnumber.partnumber_category.human_type_of
  19.                 .condition.col-6.d-flex.flex-column.justify-content-center
  20.                   = @operation[:product].condition.name.humanize
  21.               .row.second_row
  22.                 .quantity.col-6.d-flex.flex-column.justify-content-center
  23.                   = join_quantity_amount(@operation)
  24.                 .status.col-6.d-flex.flex-column.justify-content-center
  25.                   = label_approval_text(@operation[:product]&.last_inspection)          
  26.           .mid-info.d-flex.flex-column
  27.             .row.label_row
  28.               .provider_label.col-3.text-center.font-weight-bold
  29.                 = t('application.products.label_preview.provider')
  30.               .next_inspection_label.col-3.text-center.font-weight-bold
  31.                 = inspection_date_label_and_field(@operation[:product].partnumber.type_of, @operation[:product]&.last_inspection)[:label]
  32.               .manufacture_label.col-3.text-center.font-weight-bold
  33.                 = t('application.products.label_preview.manufacture_date')
  34.               .reception_label.col-3.text-center.font-weight-bold
  35.                 = t('application.products.label_preview.reception_date')
  36.             .row.mid-info_data_row
  37.               .provider_data.col-3.text-center
  38.                 = @operation[:product]&.last_inspection&.provider&.name || t('application.products.label_preview.unknown')
  39.               .next_inspection_data.col-3.text-center
  40.                 = inspection_date_label_and_field(@operation[:product].partnumber.type_of, @operation[:product]&.last_inspection)[:field]
  41.               .manufacture_data.col-3.text-center
  42.                 = format_date_label(@operation[:product]&.last_inspection&.aditional_information&.manufacture_date)
  43.               .reception_data.col-3.text-center
  44.                 = format_date_label(@operation[:product]&.last_inspection&.created_at)
  45.             - if @operation[:product].partnumber.type_of === 'component'
  46.               .row.label_row
  47.                 .tsn_label.col-3.text-center.font-weight-bold
  48.                   = t('application.products.label_preview.tsn')
  49.                 .csn_label.col-3.text-center.font-weight-bold
  50.                   = t('application.products.label_preview.csn')
  51.                 .tso_label.col-3.text-center.font-weight-bold
  52.                   = t('application.products.label_preview.tso')
  53.                 .cso_label.col-3.text-center.font-weight-bold
  54.                   = t('application.products.label_preview.cso')
  55.               .row.mid-info_data_row
  56.                 .tsn_data.col-3.text-center
  57.                   = @operation[:product]&.last_inspection&.aditional_information&.tsn || t('application.products.label_preview.unknown')
  58.                 .csn_data.col-3.text-center
  59.                   = @operation[:product]&.last_inspection&.aditional_information&.csn || t('application.products.label_preview.unknown')
  60.                 .tso_data.col-3.text-center
  61.                   = @operation[:product]&.last_inspection&.aditional_information&.tso || t('application.products.label_preview.unknown')
  62.                 .cso_data.col-3.text-center
  63.                   = @operation[:product]&.last_inspection&.aditional_information&.cso || t('application.products.label_preview.unknown')
  64.             - if @operation[:product].partnumber.type_of === 'tool'
  65.               .row.label_row
  66.                 .calibration_date_label.col-6.text-center.font-weight-bold
  67.                   = t('application.products.label_preview.last_calibration_date')
  68.                 .calibrated_by_label.col-6.text-center.font-weight-bold
  69.                   = t('application.products.label_preview.calibrated_by')
  70.               .row.mid-info_data_row
  71.                 .calibration_date_data.col-6.text-center
  72.                   = @operation[:product]&.last_inspection&.aditional_information&.formatted_date_short(@operation[:product]&.last_inspection&.aditional_information&.last_calibration_date) || t('application.products.label_preview.unknown')
  73.                 .calibrated_by_data.col-6.text-center
  74.                   = @operation[:product]&.last_inspection&.adi    
  75.           .row.last-info
  76.             .col-12
  77.               .row.label_row
  78.                 .inspector_label.col-6.text-center.font-weight-bold  
  79.                   = t('application.products.label_preview.inspector')      
  80.                 .barcode_label.col-6.text-center.font-weight-bold
  81.                   = t('application.products.label_preview.bar_code')
  82.             .col-12
  83.               .row
  84.                 .inspector_data.col-6.d-flex.flex-column.text-center
  85.                   .row
  86.                     .col-12.d-flex.flex-column.text-center
  87.                       .fullname
  88.                         = @operation[:product]&.last_inspection&.inspector&.full_name || t('application.products.label_preview.unknown')
  89.                       .license
  90.                         = 'Licencia'
  91.                       .signature
  92.                 .barcodedata.col-6
  93.                   .row
  94.                     .barcodediv.d-flex.flex-column.text-center.col-12
  95.                       .barcode
  96.                         = barcode_image_tag(@operation[:product].reference_code, height: 80, width: 150)
  97.                       .barcode_string
  98.                         = @operation[:product].reference_code
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.           -#  codigo con la tabla nueva fija, sin display-none
  112.           -# %table
  113.           -#   %tr
  114.           -#     %td
  115.           -#       %table
  116.           -#         %tr
  117.           -#           %td.text-center
  118.           -#             = @operation[:product].partnumber.description
  119.           -#         %tr
  120.           -#           %td.text-center
  121.           -#             = @operation[:product].partnumber.code
  122.           -#         %tr
  123.           -#           %td.text-center
  124.           -#             = @operation[:product].code_number_label
  125.           -#     %td
  126.           -#       %table
  127.           -#         %tr
  128.           -#           %td.text-center
  129.           -#             = @operation[:product].partnumber.partnumber_category.human_type_of
  130.           -#           %td.text-center
  131.           -#             = @operation[:product].condition.name.humanize
  132.           -#         %tr
  133.           -#           %td.text-center
  134.           -#             = join_quantity_amount(@operation)
  135.           -#           %td.text-center
  136.           -#             = label_approval_text(@operation[:product]&.last_inspection)
  137.           -#   %tr
  138.           -#     %table
  139.           -#       %tr
  140.           -#         %td.font-weight-bold.text-center
  141.           -#           = t('application.products.label_preview.provider')
  142.           -#         %td.font-weight-bold.text-center
  143.           -#           = inspection_date_label_and_field(@operation[:product].partnumber.type_of, @operation[:product]&.last_inspection)[:label]
  144.           -#         %td.font-weight-bold.text-center
  145.           -#           = t('application.products.label_preview.manufacture_date')
  146.           -#         %td.font-weight-bold.text-center
  147.           -#           = t('application.products.label_preview.reception_date')
  148.           -#       %tr
  149.           -#         %td.text-center
  150.           -#           = @operation[:product]&.last_inspection&.provider&.name || t('application.products.label_preview.unknown')
  151.           -#         %td.text-center
  152.           -#           = inspection_date_label_and_field(@operation[:product].partnumber.type_of, @operation[:product]&.last_inspection)[:field]
  153.           -#         %td.text-center
  154.           -#           = format_date_label(@operation[:product]&.last_inspection&.aditional_information&.manufacture_date)
  155.           -#         %td.text-center
  156.           -#           = format_date_label(@operation[:product]&.last_inspection&.created_at)
  157.           -#       - if @operation[:product].partnumber.type_of === 'component'
  158.           -#         %tr
  159.           -#           %td.font-weight-bold.text-center
  160.           -#             = t('application.products.label_preview.tsn')
  161.           -#           %td.font-weight-bold.text-center
  162.           -#             = t('application.products.label_preview.csn')
  163.           -#           %td.font-weight-bold.text-center
  164.           -#             = t('application.products.label_preview.tso')
  165.           -#           %td.font-weight-bold.text-center
  166.           -#             = t('application.products.label_preview.cso')
  167.           -#         %tr
  168.           -#           %td.text-center
  169.           -#             = @operation[:product]&.last_inspection&.aditional_information&.tsn || t('application.products.label_preview.unknown')
  170.           -#           %td.text-center
  171.           -#             = @operation[:product]&.last_inspection&.aditional_information&.csn || t('application.products.label_preview.unknown')
  172.           -#           %td.text-center
  173.           -#             = @operation[:product]&.last_inspection&.aditional_information&.tso || t('application.products.label_preview.unknown')
  174.           -#           %td.text-center
  175.           -#             = @operation[:product]&.last_inspection&.aditional_information&.cso || t('application.products.label_preview.unknown')
  176.           -#       - if @operation[:product].partnumber.type_of === 'tool'
  177.           -#         %tr
  178.           -#           %table
  179.           -#             %tr
  180.           -#               %td.font-weight-bold.text-center
  181.           -#                 = t('application.products.label_preview.last_calibration_date')
  182.           -#               %td.font-weight-bold.text-center
  183.           -#                 = t('application.products.label_preview.calibrated_by')
  184.           -#             %tr
  185.           -#               %td.text-center
  186.           -#                 = @operation[:product]&.last_inspection&.aditional_information&.formatted_date_short(@operation[:product]&.last_inspection&.aditional_information&.last_calibration_date) || t('application.products.label_preview.unknown')
  187.           -#               %td.text-center
  188.           -#                 = @operation[:product]&.last_inspection&.aditional_information&.calibrated_by&.present? ? @operation[:product]&.last_inspection&.aditional_information&.calibrated_by : t('application.products.label_preview.unknown')
  189.           -#   %tr
  190.           -#     %table
  191.           -#       %tr
  192.           -#         %td.font-weight-bold.text-center
  193.           -#           = t('application.products.label_preview.inspector')
  194.           -#         %td.font-weight-bold.text-center
  195.           -#           = t('application.products.label_preview.bar_code')
  196.           -#       %tr
  197.           -#         %td
  198.           -#           %table
  199.           -#             %tr
  200.           -#               %td.text-center
  201.           -#                 = @operation[:product]&.last_inspection&.inspector&.full_name || t('application.products.label_preview.unknown')
  202.           -#             %tr
  203.           -#               %td.text-center
  204.           -#                 = 'Licencia'
  205.           -#             %tr
  206.           -#               %td
  207.           -#         %td
  208.           -#           %table
  209.           -#             %tr
  210.           -#               %div.text-center.py-5.user-carnet-barcode
  211.           -#                 = barcode_image_tag(@operation[:product].reference_code, height: 80, width: 150)
  212.           -#                 %span.d-block
  213.           -#                   = @operation[:product].reference_code
  214.            
  215.  
  216.  
  217.  
  218.  
  219. -# codigo con la tabla vieja y la tabla nueva con display-none
  220.         -# %table.border.escondidito
  221.         -#   %tbody
  222.         -#     %tr
  223.         -#       %td.border.font-weight-bold= t('application.products.label_preview.description')
  224.         -#       %td.border.font-weight-bold= t('application.products.label_preview.partnumber_code')
  225.         -#       %td.border.font-weight-bold= t('application.products.label_preview.number')
  226.         -#       %td.border.font-weight-bold= t('application.products.label_preview.condition')
  227.         -#       %td.border.font-weight-bold= t('application.products.label_preview.provider')
  228.         -#     %tr
  229.         -#       %td.border
  230.         -#         = @operation[:product].partnumber.description
  231.         -#       %td.border
  232.         -#         = @operation[:product].partnumber.code
  233.         -#       %td.border
  234.         -#         = @operation[:product].code_number_label
  235.         -#       %td.border
  236.         -#         = @operation[:product].condition.name.humanize
  237.         -#       %td.border
  238.         -#         = @operation[:product]&.last_inspection&.provider&.name || t('application.products.label_preview.unknown')
  239.         -#     %tr
  240.         -#       %td.border.font-weight-bold= inspection_date_label_and_field(@operation[:product].partnumber.type_of, @operation[:product]&.last_inspection)[:label]
  241.         -#       %td.border.font-weight-bold= t('application.products.label_preview.manufacture_date')
  242.         -#       %td.border.font-weight-bold= t('application.products.label_preview.product_type')
  243.         -#       %td.border.font-weight-bold= t('application.products.label_preview.reception_date')
  244.         -#       %td.border.font-weight-bold= t('application.products.label_preview.quantity')
  245.         -#     %tr
  246.         -#       %td.border
  247.         -#         = inspection_date_label_and_field(@operation[:product].partnumber.type_of, @operation[:product]&.last_inspection)[:field]
  248.         -#       %td.border
  249.         -#         = @operation[:product]&.last_inspection&.aditional_information&.formatted_date_short(@operation[:product]&.last_inspection&.aditional_information&.manufacture_date) || t('application.products.label_preview.unknown')
  250.         -#       %td.border
  251.         -#         = @operation[:product].partnumber.partnumber_category.human_type_of
  252.         -#       %td.border
  253.         -#         = @operation[:product]&.last_inspection&.formatted_date(@operation[:product]&.last_inspection&.created_at) || t('application.products.label_preview.unknown')
  254.         -#       %td.border
  255.         -#         = @operation[:product].try(:quantity) || '1'
  256.         -#     - if @operation[:product].partnumber.type_of === 'tool'
  257.         -#       %tr
  258.         -#         %td.border.font-weight-bold{colspan:2}= t('application.products.label_preview.last_calibration_date')
  259.         -#         %td.border.font-weight-bold{colspan:3}= t('application.products.label_preview.calibrated_by')
  260.         -#       %tr
  261.         -#         %td.border{colspan:2}
  262.         -#           = @operation[:product]&.last_inspection&.aditional_information&.formatted_date_short(@operation[:product]&.last_inspection&.aditional_information&.last_calibration_date) || t('application.products.label_preview.unknown')
  263.         -#         %td.border{colspan:3}
  264.         -#           = @operation[:product]&.last_inspection&.aditional_information&.calibrated_by&.present? ? @operation[:product]&.last_inspection&.aditional_information&.calibrated_by : t('application.products.label_preview.unknown')
  265.         -#     %tr
  266.         -#       %td.border.font-weight-bold= t('application.products.label_preview.unit_measure')
  267.         -#       %td.border.font-weight-bold= t('application.products.label_preview.ata')
  268.         -#       %td.border.font-weight-bold= t('application.products.label_preview.subata')
  269.         -#       %td.border.font-weight-bold= t('application.products.label_preview.item')
  270.         -#       %td.border.font-weight-bold= t('application.products.label_preview.inspector')
  271.         -#     %tr
  272.         -#       %td.border
  273.         -#         = t("activerecord.attributes.unit_measure.names.#{@operation[:product].unit_measure.name}")
  274.         -#       %td.border
  275.         -#         = @operation[:product].partnumber.ata.present? ? @operation[:product].partnumber.ata : t('application.products.label_preview.unknown')
  276.         -#       %td.border
  277.         -#         = @operation[:product].partnumber.subata.present? ? @operation[:product].partnumber.subata :  t('application.products.label_preview.unknown')
  278.         -#       %td.border
  279.         -#         = @operation[:product].partnumber.item.present? ? @operation[:product].partnumber.item :  t('application.products.label_preview.unknown')
  280.         -#       %td.border
  281.         -#         = @operation[:product]&.last_inspection&.inspector&.full_name || t('application.products.label_preview.unknown')
  282.         -#     - if @operation[:product].partnumber.type_of === 'component'
  283.         -#       %tr
  284.         -#         %td.border.font-weight-bold= t('application.products.label_preview.tsn')
  285.         -#         %td.border.font-weight-bold= t('application.products.label_preview.csn')
  286.         -#         %td.border.font-weight-bold= t('application.products.label_preview.tso')
  287.         -#         %td.border.font-weight-bold{colspan:2}= t('application.products.label_preview.cso')
  288.         -#       %tr
  289.         -#         %td.border
  290.         -#           = @operation[:product]&.last_inspection&.aditional_information&.tsn || t('application.products.label_preview.unknown')
  291.         -#         %td.border
  292.         -#           = @operation[:product]&.last_inspection&.aditional_information&.csn || t('application.products.label_preview.unknown')
  293.         -#         %td.border
  294.         -#           = @operation[:product]&.last_inspection&.aditional_information&.tso || t('application.products.label_preview.unknown')
  295.         -#         %td.border{colspan: 2}
  296.         -#           = @operation[:product]&.last_inspection&.aditional_information&.cso || t('application.products.label_preview.unknown')
  297.         -#     %tr
  298.         -#       %td.border.font-weight-bold= t('application.products.label_preview.license')
  299.         -#       %td.border.font-weight-bold= t('application.products.label_preview.inspector_sign')
  300.         -#       %td.border.font-weight-bold= t('application.products.label_preview.status')
  301.         -#       %td.border.font-weight-bold.text-center{colspan:2}= t('application.products.label_preview.bar_code')
  302.         -#     %tr
  303.         -#       %td.border
  304.         -#         = 'Licencia'
  305.         -#       %td.border
  306.         -#         = 'Firma'
  307.         -#       %td.border.text-center
  308.         -#         %span.tag{class: label_approval_color(@operation[:product]&.last_inspection)}
  309.         -#           = label_approval_text(@operation[:product]&.last_inspection)
  310.         -#       %td.border.text-center{colspan:2}
  311.         -#         = barcode_image_tag(@operation[:product].reference_code, height: 50, width: 150)
  312.         -#         %br
  313.         -#         %strong.text-center
  314.         -#           = @operation[:product].reference_code
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top