ministryofjustice/civil-claims-frontend-claimant

View on GitHub
app/views/claims/check_details.html.haml

Summary

Maintainability
Test Coverage
= render partial: 'shared/header_message', :locals => {:title => "Start a property repossession case"}

.container
  %nav.progress
    %ol
      %li.completed
        = link_to 'Personal details', action: 'edit', id: @claim.id, page_id: 'personal_details'
      %li.completed
        = link_to 'Case details', action: 'edit', id: @claim.id, page_id: 'case_details'
      %li.active
        %span Check details
      %li
        %span Pay court fee
      %li
        %span Confirmation

%header.content-header
  %h2= @page_title
  %p Check through the information you have given to ensure it’s all correct.

%section.review#property
  %h3.section-header
    Property
    = link_to 'Make changes', {action: 'edit', id: @claim.id, page_id: 'personal_details', anchor: "property"}, class: "right edit"
  .moj-panel
    .row.address
      .key
        Address
      .value
        = @claim.property.address.html_safe

%section.review#claimant
  %h3.section-header
    Council (claimant)
    = link_to 'Make changes', {action: 'edit', id: @claim.id, page_id: 'personal_details', anchor: "council"}, class: "right edit"
    - landlord = @claim.landlords.first
  .moj-panel
    .row.organisation_name
      .key
        Council
      .value
        = landlord.organisation_name
    .row.address
      .key
        Address
      .value
        = landlord.address.html_safe
    .row.full_name
      .key
        Full name
      .value
        = landlord.display_name
    .row.phone
      .key
        Phone
      .value
        = landlord.phone
    .row.email
      .key
        Email
      .value
        = landlord.email

%section.review#tenants
  %h3.section-header
    Tenant (defendant)
    = link_to 'Make changes', {action: 'edit', id: @claim.id, page_id: 'personal_details', anchor: "tenant"}, class: "right edit"
  .moj-panel
    - @claim.tenants.each.with_index do |tenant, i|
      - unless tenant.blank?
        - if i >= 1
          .row.divider
        .sub-panel.tenant(id="tenant-#{i}")
          .row.full_name
            .key Name
            .value= tenant.display_name
          .row.address
            .key Address
            .value
              - if tenant.address.blank?
                Living in the property
              - else
                = tenant.address.html_safe
          - unless tenant.phone.blank?
            .row.phone
              .key Phone
              .value= tenant.phone
          - unless tenant.email.blank?
            .row.email
              .key Email
              .value= tenant.email

%section.review#about-tenancy
  %h3.section-header
    About the tenancy
    = link_to 'Make changes', {action: 'edit', id: @claim.id, page_id: 'case_details', anchor: "about-the-tenancy"}, class: "right edit"
  .moj-panel
    .row.tenancy_type
      .key Tenancy type
      .value= @claim.case_detail.tenancy_type.humanize
    .row.tenancy_start_date
      .key Tenancy start date
      .value= Date.parse(@claim.case_detail.tenancy_start_date).strftime("%e %B %Y")
    .row.rent_amount
      .key Rent amount
      .value
        %span> £
        %span.number= number_to_currency(@claim.case_detail.rental_amount, unit: '').gsub(/\.00$/, '')
        = case @claim.case_detail.payment_frequency
          - when "weekly" then "per week"
          - when "monthly" then "per month"
    .row.daily_rent_amount
      .key
        Daily rent amount
      .value
        %span> £
        - rent_amount = number_with_precision(@claim.case_detail.daily_rent_amount, precision: 2) || ''
        %span.number= rent_amount.gsub(/\.00$/, '')
        per day

%section.review#about-case
  %h3.section-header
    About the case
    = link_to 'Make changes', {action: 'edit', id: @claim.id, page_id: 'case_details', anchor: "about-the-case"}, class: "right edit"
  .moj-panel
    .row.notice_served
      .key Notice served
      .value= @claim.case_detail.type_of_notice_served.humanize
    .row.date_notice_served
      .key Date notice served
      .value= Date.parse(@claim.case_detail.notice_served_date).strftime("%e %B %Y")
    .row.total_unpaid_rent
      .key Total unpaid rent
      .value
        %span> £
        %span.number= number_to_currency(@claim.case_detail.total_unpaid_rent, unit: '').gsub(/\.00$/, '')

- unless @claim.case_detail.other_information.blank?
  %section.review#further-information
    %h3.section-header
      Further information
      = link_to 'Make changes', {action: 'edit', id: @claim.id, page_id: 'case_details', anchor: "further-information"}, class: "right edit"
    .moj-panel
      .row.full
        .value.highlight
          = @claim.case_detail.other_information

- unless @claim.case_detail.recovery_steps.blank?
  %section.review#recovery-steps
    %h3.section-header
      Further information
      = link_to 'Make changes', {action: 'edit', id: @claim.id, page_id: 'case_details', anchor: "recovery-steps-section"}, class: "right edit"
    .moj-panel
      .row.full
        .value.highlight
          = @claim.case_detail.recovery_steps

- unless @claim.case_detail.about_defendant.blank?
  %section.review#about-defendant
    %h3.section-header
      About the defendant
      = link_to 'Make changes', {action: 'edit', id: @claim.id, page_id: 'case_details', anchor: "about-defendant-section"}, class: "right edit"
    .moj-panel
      .row.full
        .value.highlight
          = @claim.case_detail.about_defendant

- unless @claim.case_detail.about_claimant.blank?
  %section.review#about-claimant
    %h3.section-header
      About the claimant
      = link_to 'Make changes', {action: 'edit', id: @claim.id, page_id: 'case_details', anchor: "about-claimant-section"}, class: "right edit"
    .moj-panel
      .row.full
        .value.highlight
          = @claim.case_detail.about_claimant

= form_for @claim do |claim_form|
  %section
    %h3.section-header
      Statement of truth
    .moj-panel
      .row.full
        = claim_form.check_box :statement_of_truth, id: "confirm-details"
        - label = "I <strong>#{@claim.landlords.first.full_name}</strong>, <strong class='todo'>-=TODO: JOB TITLE=-</strong> at <strong>#{@claim.landlords.first.organisation_name}</strong>, believe the facts stated on this form are true."
        = claim_form.label :statement_of_truth, label.html_safe
          
      .row.rel.full.warning
        Proceedings for contempt of court may be brought against a person if he makes, or causes to be made, a false statement in a document verified by a statement of truth without an honest belief in its truth.

    %section
      .action-buttons.cf
        %button.button.primary.large.chevron.left{name: 'next_page', value: 'pay_court_fee'} Continue to next step