<commit_before>%h1 #{@record.position.name} Application Record

submitted
= format_date_time @record.created_at
by:
= @record.user.name_and_email
= button_to 'Print this page',
  application_record_path(@record, format: :pdf), method: :get

.data_container
  .data_row
    %h2.prompt_item Question
    %h2.response_item Response
  - @record.data.each do |prompt, response, data_type, question_id|
    - if data_type == 'heading'
      .data_row
        .heading_item= prompt.upcase
    - elsif data_type == 'explanation'
      .data_row
        .explanation_item= render_markdown prompt
    - else
      .data_row
        .prompt_item= prompt
        .response_item= response

-if @record.unavailability.present?
  %strong Unavailability
  =fields_for :unavailability do |u|
    =render partial: "unavailabilities_calendar_staff",
      locals: { unavailability: @record.unavailability }
  %p Grey boxes indicate that applicant is unavailable

- if @current_user.staff?
  - if @record.pending?
    %h3 Review application
    = form_tag controller: :application_records,
      action: :review,
      id: @record.id,
      accepted: false do
      .field.note_item
        Reason for rejection:
        = text_area_tag :staff_note, '', required: true
      .text.note_item
        - if configured_value [:on_application_denial, :provide_reason],
                              default: true
          These notes will be provided to the applicant.
        - else
          These notes will not be provided to the applicant.
      .note_item
        = submit_tag 'Review application without scheduling interview'
    = form_tag controller: :application_records,
      action: :review,
      id: @record.id,
      accepted: true do
      = fields_for :interview do |f|
        .field.note_item
          = f.label :scheduled, 'Date and time of interview'
          = f.text_field :scheduled,
            class: 'datetimepicker',
            placeholder: 'Click here to select date/time...',
            size: 40, required: true
        .field.note_item
          = f.label :location
          = f.text_field :location,
                         required: true,
                         value: @record.position.default_interview_location
      .note_item= submit_tag 'Review application and schedule interview'
    - if !@record.saved_for_later
      %h3 Save application for later review
      = form_tag controller: :application_records,
        action: :save_for_later,
        id: @record.id do
        .field.note_item
          Note
          = text_area_tag :note_for_later
        .field.note_item
          Select a date for later review
          = text_field_tag :date_for_later, '', class: 'datepicker'
        .note_item
          If a date is selected, the application will move back onto the
          dashboard at that time.
          .note_item
          = submit_tag 'Save for later'
    - if @record.saved_for_later
      = button_to 'Move back to dashboard',
        unsave_for_later_application_record_url(@record)
      this button will delete your note

  - else
    .note_item
      Application reviewed on:
      = format_date_time @record.updated_at
    - if @record.staff_note.present?<commit_msg>shows note if record is saved for later<commit_after>%h1 #{@record.position.name} Application Record

submitted
= format_date_time @record.created_at
by:
= @record.user.name_and_email
= button_to 'Print this page',
  application_record_path(@record, format: :pdf), method: :get

.data_container
  .data_row
    %h2.prompt_item Question
    %h2.response_item Response
  - @record.data.each do |prompt, response, data_type, question_id|
    - if data_type == 'heading'
      .data_row
        .heading_item= prompt.upcase
    - elsif data_type == 'explanation'
      .data_row
        .explanation_item= render_markdown prompt
    - else
      .data_row
        .prompt_item= prompt
        .response_item= response

-if @record.unavailability.present?
  %strong Unavailability
  =fields_for :unavailability do |u|
    =render partial: "unavailabilities_calendar_staff",
      locals: { unavailability: @record.unavailability }
  %p Grey boxes indicate that applicant is unavailable

- if @current_user.staff?
  - if @record.pending?
    %h3 Review application
    = form_tag controller: :application_records,
      action: :review,
      id: @record.id,
      accepted: false do
      .field.note_item
        Reason for rejection:
        = text_area_tag :staff_note, '', required: true
      .text.note_item
        - if configured_value [:on_application_denial, :provide_reason],
                              default: true
          These notes will be provided to the applicant.
        - else
          These notes will not be provided to the applicant.
      .note_item
        = submit_tag 'Review application without scheduling interview'
    = form_tag controller: :application_records,
      action: :review,
      id: @record.id,
      accepted: true do
      = fields_for :interview do |f|
        .field.note_item
          = f.label :scheduled, 'Date and time of interview'
          = f.text_field :scheduled,
            class: 'datetimepicker',
            placeholder: 'Click here to select date/time...',
            size: 40, required: true
        .field.note_item
          = f.label :location
          = f.text_field :location,
                         required: true,
                         value: @record.position.default_interview_location
      .note_item= submit_tag 'Review application and schedule interview'
    - if !@record.saved_for_later
      %h3 Save application for later review
      = form_tag controller: :application_records,
        action: :save_for_later,
        id: @record.id do
        .field.note_item
          Note
          = text_area_tag :note_for_later
        .field.note_item
          Select a date for later review
          = text_field_tag :date_for_later, '', class: 'datepicker'
        .note_item
          If a date is selected, the application will move back onto the
          dashboard at that time.
          .note_item
          = submit_tag 'Save for later'
    - if @record.saved_for_later
      Note:
      .note_item= @record.note_for_later
      = button_to 'Move back to dashboard',
        unsave_for_later_application_record_url(@record)
      this action will delete your note

  - else
    .note_item
      Application reviewed on:
      = format_date_time @record.updated_at
    - if @record.staff_note.present?
{'fraction_non_alphanumeric': 0.08030093658836174, 'fraction_numerical': 0.0021495470597267005, 'mean_word_length': 2.3594636410520886, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3733240', 'n_tokens_mistral': 1901, 'n_tokens_neox': 1845, 'n_words': 521}