Remove unused carto from instructeur interface
This commit is contained in:
parent
9ff65efea8
commit
c6ef30f3e1
9 changed files with 3 additions and 95 deletions
|
@ -17,22 +17,6 @@
|
|||
- if champs.any?
|
||||
= render partial: "shared/dossiers/champs", locals: { champs: champs, dossier: @dossier, demande_seen_at: nil, profile: 'instructeur' }
|
||||
|
||||
- if @dossier.use_legacy_carto?
|
||||
%h3 Cartographie
|
||||
- if @dossier.quartier_prioritaires.any?
|
||||
%h4 Quartiers prioritaires
|
||||
%table
|
||||
- @dossier.quartier_prioritaires.each do |q|
|
||||
%tr
|
||||
%td= q.nom
|
||||
|
||||
- if @dossier.cadastres.any?
|
||||
%h4 Parcelles cadastrales
|
||||
%table
|
||||
- @dossier.cadastres.each do |p|
|
||||
%tr
|
||||
%td= "Parcelle n° #{p.numero} - Feuille #{p.code_arr} #{p.section} #{p.feuille}"
|
||||
|
||||
- if @dossier.types_de_piece_justificative.any?
|
||||
%h3 Pièces jointes
|
||||
|
||||
|
|
|
@ -24,12 +24,4 @@
|
|||
|
||||
.actions
|
||||
= link_to 'Utiliser un autre numéro SIRET', siret_dossier_path(@dossier), class: 'button'
|
||||
|
||||
- if @dossier.use_legacy_carto?
|
||||
/ Until the old layout is gone, we need to disable turbolinks
|
||||
/ to avoid the map loading twice (once for the turbolinks preview,
|
||||
/ once when turbolinks notices the layout are differents and reloads
|
||||
/ the page.)
|
||||
= link_to 'Continuer avec ces informations', users_dossier_carte_path(@dossier), class: 'button primary', data: { turbolinks: false }
|
||||
- else
|
||||
= link_to 'Continuer avec ces informations', brouillon_dossier_path(@dossier), class: 'button primary'
|
||||
= link_to 'Continuer avec ces informations', brouillon_dossier_path(@dossier), class: 'button primary'
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
:javascript
|
||||
DATA.push({
|
||||
carto: {
|
||||
position: #{raw(dossier.geo_position.to_json)},
|
||||
selection: #{raw(ensure_safe_json(dossier.json_latlngs))},
|
||||
cadastres: #{raw(dossier.cadastres.to_json)},
|
||||
quartiersPrioritaires: #{raw(dossier.quartier_prioritaires.to_json)}
|
||||
}
|
||||
});
|
|
@ -15,11 +15,6 @@
|
|||
.card
|
||||
= render partial: "shared/dossiers/champs", locals: { champs: champs, demande_seen_at: demande_seen_at, profile: profile }
|
||||
|
||||
- if dossier.use_legacy_carto?
|
||||
.tab-title Cartographie
|
||||
.card
|
||||
= render partial: "shared/dossiers/map", locals: { dossier: dossier }
|
||||
|
||||
- if dossier.types_de_piece_justificative.any?
|
||||
.tab-title Pièces jointes
|
||||
.card
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
- if dossier.json_latlngs.nil?
|
||||
%h2.empty-text Non renseigné
|
||||
- else
|
||||
#map
|
||||
|
||||
- if dossier.quartier_prioritaires.any?
|
||||
.card-title Quartiers prioritaires
|
||||
%ul
|
||||
- dossier.quartier_prioritaires.each do |q|
|
||||
%li= q.nom
|
||||
|
||||
- if dossier.cadastres.any?
|
||||
.card-title Parcelles cadastrales
|
||||
%ul
|
||||
- dossier.cadastres.each do |p|
|
||||
%li
|
||||
= "Parcelle n° #{p.numero} - Feuille #{p.code_arr} #{p.section} #{p.feuille}"
|
||||
|
||||
= render partial: 'shared/champs/carte/init', locals: { dossier: dossier }
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'new_user/dossiers/brouillon.html.haml', type: :view do
|
||||
let(:procedure) { create(:procedure, :with_api_carto, :with_two_type_de_piece_justificative, :with_notice, for_individual: true) }
|
||||
let(:procedure) { create(:procedure, :with_two_type_de_piece_justificative, :with_notice, for_individual: true) }
|
||||
let(:dossier) { create(:dossier, :with_entreprise, :with_service, state: Dossier.states.fetch(:brouillon), procedure: procedure) }
|
||||
let(:footer) { view.content_for(:footer) }
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'new_user/dossiers/identite.html.haml', type: :view do
|
||||
let(:dossier) { create(:dossier, :with_entreprise, :with_service, state: Dossier.states.fetch(:brouillon), procedure: create(:procedure, :with_api_carto, :with_two_type_de_piece_justificative, for_individual: true)) }
|
||||
let(:dossier) { create(:dossier, :with_entreprise, :with_service, state: Dossier.states.fetch(:brouillon), procedure: create(:procedure, :with_two_type_de_piece_justificative, for_individual: true)) }
|
||||
let(:footer) { view.content_for(:footer) }
|
||||
|
||||
before do
|
||||
|
|
|
@ -59,12 +59,4 @@ describe 'shared/dossiers/demande.html.haml', type: :view do
|
|||
expect(rendered).to have_text('Pièces jointes')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the dossier uses maps' do
|
||||
let(:procedure) { create(:procedure, :published, :with_api_carto) }
|
||||
|
||||
it 'renders the maps infos' do
|
||||
expect(rendered).to have_text('Cartographie')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'shared/dossiers/map.html.haml', type: :view do
|
||||
subject do
|
||||
render(partial: 'shared/dossiers/map.html.haml', locals: { dossier: dossier })
|
||||
end
|
||||
|
||||
describe "javascript variables printing" do
|
||||
let(:dossier) { create(:dossier, json_latlngs: json_latlngs) }
|
||||
|
||||
context 'with a correct json' do
|
||||
let(:json_latlngs) { "[[{\"lat\":50.659255436656736,\"lng\":3.080635070800781},{\"lat\":50.659255436656736,\"lng\":3.079690933227539},{\"lat\":50.659962770886516,\"lng\":3.0800342559814453},{\"lat\":50.659962770886516,\"lng\":3.0811500549316406},{\"lat\":50.659255436656736,\"lng\":3.080635070800781}]]" }
|
||||
|
||||
before { subject }
|
||||
|
||||
it { expect(rendered).to have_content('selection: [[{"lat":50.659255436656736,"lng":3.080635070800781},{"lat":50.659255436656736,"lng":3.079690933227539},{"lat":50.659962770886516,"lng":3.0800342559814453},{"lat":50.659962770886516,"lng":3.0811500549316406},{"lat":50.659255436656736,"lng":3.080635070800781}]],') }
|
||||
end
|
||||
|
||||
context 'without a correct json' do
|
||||
let(:json_latlngs) { "dossier" }
|
||||
|
||||
before { subject }
|
||||
|
||||
it { expect(rendered).to have_content('selection: {},') }
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue