Merge branch 'dev'
This commit is contained in:
commit
91afd4fd64
40 changed files with 399 additions and 158 deletions
1
app/assets/images/icons/printer.svg
Normal file
1
app/assets/images/icons/printer.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg width="22" height="22" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>ic_form</title><defs><rect id="a" x="3" y="8" width="18" height="7" rx="1"/><path d="M7 3h10a1 1 0 0 1 1 1v2H6V4a1 1 0 0 1 1-1z" id="b"/><path d="M0 0h12v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V0z" id="c"/></defs><g fill="none" fill-rule="evenodd"><path d="M-1-1h24v24H-1z"/><g transform="translate(-1 -1)"><use fill="#FFF" xlink:href="#a"/><rect stroke="#4393F3" stroke-width="2" x="2" y="7" width="20" height="9" rx="1"/></g><g transform="translate(-1 -1)"><use fill="#FFF" xlink:href="#b"/><path stroke="#4393F3" stroke-width="2" d="M7 2h10a2 2 0 0 1 2 2v3H5V4a2 2 0 0 1 2-2z"/></g><g transform="translate(5 13)"><use fill="#FFF" xlink:href="#c"/><path stroke="#4393F3" stroke-width="2" d="M-1-1h14v7a2 2 0 0 1-2 2H1a2 2 0 0 1-2-2v-7z"/><rect fill="#4393F3" x="1" y="4" width="6" height="1.5" rx=".75"/><rect fill="#4393F3" x="1" y="1.5" width="10" height="1.5" rx=".75"/></g></g></svg>
|
After Width: | Height: | Size: 1,014 B |
|
@ -65,7 +65,7 @@
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
> i {
|
||||
> .icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-size: 18px 18px;
|
||||
|
@ -92,6 +92,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.icon-only .icon {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
|
@ -161,7 +165,7 @@
|
|||
color: $grey;
|
||||
}
|
||||
|
||||
i {
|
||||
.icon {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
|
|
71
app/assets/stylesheets/new_design/dossier_champs.scss
Normal file
71
app/assets/stylesheets/new_design/dossier_champs.scss
Normal file
|
@ -0,0 +1,71 @@
|
|||
@import "constants";
|
||||
|
||||
.dossier-champs {
|
||||
th,
|
||||
td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.libelle {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
i {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
b {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
list-style: inside;
|
||||
}
|
||||
|
||||
ol {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: $default-padding 0 $default-padding $default-padding;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: $default-padding;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin-bottom: $default-padding;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
|
@ -22,7 +22,7 @@
|
|||
display: block;
|
||||
}
|
||||
|
||||
i.folder {
|
||||
.icon.folder {
|
||||
margin-right: $default-spacer;
|
||||
position: relative;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
i {
|
||||
.icon {
|
||||
display: inline-block;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
|
@ -56,4 +56,8 @@ i {
|
|||
&.lock {
|
||||
background-image: image-url("icons/lock.svg");
|
||||
}
|
||||
|
||||
&.printer {
|
||||
background-image: image-url("icons/printer.svg");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
font-size: 22px;
|
||||
margin-bottom: $default-spacer * 2;
|
||||
|
||||
i {
|
||||
.icon {
|
||||
vertical-align: sub;
|
||||
margin-right: $default-spacer;
|
||||
}
|
||||
|
|
|
@ -7,3 +7,4 @@
|
|||
// = require select2
|
||||
// = require typeahead
|
||||
// = require_tree .
|
||||
// = stub "print"
|
||||
|
|
25
app/assets/stylesheets/new_design/print.scss
Normal file
25
app/assets/stylesheets/new_design/print.scss
Normal file
|
@ -0,0 +1,25 @@
|
|||
@import "colors";
|
||||
@import "fonts";
|
||||
|
||||
body {
|
||||
font-family: "Muli";
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
margin-top: -20px;
|
||||
color: $grey;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
|
||||
&.header-section {
|
||||
padding-top: 1.2em;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
}
|
|
@ -27,7 +27,7 @@
|
|||
}
|
||||
|
||||
&.vertical {
|
||||
font-size: 14px;
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
|
||||
tr {
|
||||
|
@ -36,17 +36,11 @@
|
|||
|
||||
th {
|
||||
@include vertical-padding($default-spacer);
|
||||
font-weight: normal;
|
||||
|
||||
&.header-section {
|
||||
color: $blue;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,6 +83,11 @@ module NewGestionnaire
|
|||
redirect_to annotations_privees_dossier_path(dossier.procedure, dossier)
|
||||
end
|
||||
|
||||
def print
|
||||
@dossier = dossier
|
||||
render layout: "print"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def dossier
|
||||
|
|
|
@ -124,12 +124,11 @@ class AttestationTemplate < ApplicationRecord
|
|||
|
||||
def replace_type_de_champ_tags(text, types_de_champ, dossier_champs)
|
||||
types_de_champ.inject(text) do |acc, tag|
|
||||
value = dossier_champs
|
||||
.select { |champ| champ.libelle == tag[:libelle] }
|
||||
champ = dossier_champs
|
||||
.select { |dossier_champ| dossier_champ.libelle == tag[:libelle] }
|
||||
.first
|
||||
.value
|
||||
|
||||
acc.gsub("--#{tag[:libelle]}--", value.to_s)
|
||||
acc.gsub("--#{tag[:libelle]}--", champ.to_s)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -57,6 +57,19 @@ class Champ < ActiveRecord::Base
|
|||
JSON.parse(Carto::GeoAPI::Driver.pays).inject([]) { |acc, liste| acc.push(liste['nom']) }
|
||||
end
|
||||
|
||||
def to_s
|
||||
if value.present?
|
||||
case type_champ
|
||||
when 'date'
|
||||
Date.parse(value).strftime('%d/%m/%Y')
|
||||
else
|
||||
value.to_s
|
||||
end
|
||||
else
|
||||
''
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def format_date_to_iso
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
:javascript
|
||||
window.$crisp=[];
|
||||
window.CRISP_WEBSITE_ID="779b5050-4cc1-4172-8dd0-bde55716a289";
|
||||
(function(){
|
||||
d=document;
|
||||
s=d.createElement("script");
|
||||
s.src="https://client.crisp.im/l.js";
|
||||
s.async=1;
|
||||
d.getElementsByTagName("head")[0].appendChild(s);
|
||||
})();
|
||||
window.$crisp.push(["do", "chat:hide"]);
|
||||
window.$crisp.push(["on", "chat:closed", function () {
|
||||
window.$crisp.push(["do", "chat:hide"]);
|
||||
}]);
|
|
@ -33,7 +33,6 @@
|
|||
= render partial: "layouts/new_footer"
|
||||
= render partial: "layouts/google_analytics"
|
||||
= render partial: "layouts/mailjet_newsletter"
|
||||
= render partial: "layouts/crisp"
|
||||
|
||||
= javascript_include_tag "new_design/application", "data-turbolinks-eval": false
|
||||
= yield :charts_js
|
||||
|
|
18
app/views/layouts/print.html.haml
Normal file
18
app/views/layouts/print.html.haml
Normal file
|
@ -0,0 +1,18 @@
|
|||
%html
|
||||
%head
|
||||
%meta{ "http-equiv": "Content-Type", content: "text/html; charset=UTF-8" }
|
||||
%meta{ "http-equiv": "X-UA-Compatible", content: "IE=edge" }
|
||||
%meta{ name: "viewport", content: "width=device-width, initial-scale=1" }
|
||||
= csrf_meta_tags
|
||||
|
||||
%title
|
||||
= t("dynamics.page_title")
|
||||
|
||||
= favicon_link_tag(image_url("favicons/16x16.png"), type: "image/png", sizes: "16x16")
|
||||
= favicon_link_tag(image_url("favicons/32x32.png"), type: "image/png", sizes: "32x32")
|
||||
= favicon_link_tag(image_url("favicons/96x96.png"), type: "image/png", sizes: "96x96")
|
||||
|
||||
= stylesheet_link_tag "new_design/print", media: "all"
|
||||
|
||||
%body
|
||||
= yield
|
|
@ -14,12 +14,12 @@
|
|||
- if avis.confidentiel?
|
||||
%span.confidentiel
|
||||
confidentiel
|
||||
%i.lock{ title: "Cet avis n'est pas affiché avec les autres experts consultés" }
|
||||
.icon.lock{ title: "Cet avis n'est pas affiché avec les autres experts consultés" }
|
||||
%span.date Demande d'avis envoyée le #{I18n.l(avis.created_at.localtime, format: '%d/%m/%y')}
|
||||
%p= avis.introduction
|
||||
|
||||
.answer.flex.align-start
|
||||
%i.bubble.avis-icon
|
||||
.icon.bubble.avis-icon
|
||||
.width-100
|
||||
%h2.gestionnaire
|
||||
= (avis.email_to_display == current_gestionnaire.email) ? 'Vous' : avis.email_to_display
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
%tr
|
||||
%td.number-col
|
||||
= link_to(avis_path(avis), class: 'cell-link') do
|
||||
%i.folder
|
||||
.icon.folder
|
||||
#{avis.dossier.id}
|
||||
%td= link_to(avis.dossier.user.email, avis_path(avis), class: 'cell-link')
|
||||
%td= link_to(avis.dossier.procedure.libelle, avis_path(avis), class: 'cell-link')
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
= f.text_area :answer, rows: 3, placeholder: 'Votre avis', required: true
|
||||
.flex.justify-between.align-baseline
|
||||
%p.confidentiel
|
||||
%i.lock
|
||||
.icon.lock
|
||||
Cet avis est confidentiel et n'est pas affiché aux autres experts consultés
|
||||
.send-wrapper
|
||||
= f.submit 'Envoyer votre avis', class: 'button send'
|
||||
|
@ -29,7 +29,7 @@
|
|||
.flex.justify-between.align-baseline
|
||||
- if @avis.confidentiel?
|
||||
%p.confidentiel
|
||||
%i.lock
|
||||
.icon.lock
|
||||
Cet avis est confidentiel et n'est pas affiché aux autres experts consultés
|
||||
.send-wrapper
|
||||
= f.submit 'Demander un avis', class: 'button send'
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
= render partial: 'header', locals: { avis: @avis, dossier: @dossier }
|
||||
|
||||
.container
|
||||
.backoffice-title Identité du demandeur
|
||||
.card
|
||||
.card-title Identité du demandeur
|
||||
- if @dossier.entreprise.present?
|
||||
= render partial: 'new_gestionnaire/dossiers/identite_entreprise', locals: { entreprise: @dossier.entreprise }
|
||||
|
||||
|
@ -11,37 +11,17 @@
|
|||
= render partial: 'new_gestionnaire/dossiers/identite_individual', locals: { individual: @dossier.individual }
|
||||
|
||||
.backoffice-title Formulaire
|
||||
|
||||
- champs = @dossier.ordered_champs.decorate
|
||||
- if champs.any?
|
||||
.card.featured
|
||||
.card
|
||||
= render partial: 'new_gestionnaire/dossiers/champs', locals: { champs: champs }
|
||||
|
||||
- if @dossier.procedure.use_api_carto
|
||||
.backoffice-title Cartographie
|
||||
.card
|
||||
= render partial: 'new_gestionnaire/dossiers/map', locals: { dossier: @dossier }
|
||||
|
||||
- if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
|
||||
.card.featured
|
||||
.card-title Pièces jointes
|
||||
|
||||
%table.table.vertical
|
||||
%tbody
|
||||
- if @dossier.procedure.cerfa_flag?
|
||||
%tr
|
||||
%th Formulaire :
|
||||
%td
|
||||
- if @dossier.cerfa_available?
|
||||
= link_to 'Télécharger', @dossier.cerfa.last.content_url, class: 'button', target: :blank
|
||||
- else
|
||||
Pièce non fournie
|
||||
|
||||
- @dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
|
||||
%tr
|
||||
%th= "#{type_de_piece_justificative.libelle} :"
|
||||
%td
|
||||
- pj = @dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)
|
||||
- if pj.present?
|
||||
Pièce fournie -
|
||||
= link_to "Consulter", pj.content_url, class: "link", target: :blank
|
||||
- else
|
||||
Pièce non fournie
|
||||
.backoffice-title Pièces jointes
|
||||
.card
|
||||
= render partial: "new_gestionnaire/dossiers/pieces_jointes", locals: { dossier: @dossier }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%table.table.vertical
|
||||
%table.table.vertical.dossier-champs
|
||||
%tbody
|
||||
- champs.each do |c|
|
||||
%tr
|
||||
|
@ -6,7 +6,7 @@
|
|||
%th.header-section{ colspan: 2 }
|
||||
= c.libelle
|
||||
- elsif c.type_champ != "explication"
|
||||
%th
|
||||
%th.libelle
|
||||
= "#{c.libelle} :"
|
||||
%td
|
||||
= c.value
|
||||
= sanitize(c.value)
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
%li
|
||||
= "Dossier nº #{dossier.id}"
|
||||
%div
|
||||
= link_to print_dossier_path(dossier.procedure, dossier), target: "_blank", class: "button icon-only" do
|
||||
.icon.printer>
|
||||
= render partial: "new_gestionnaire/procedures/dossier_actions", locals: { procedure: dossier.procedure, dossier: dossier, dossier_is_followed: current_gestionnaire&.follow?(dossier) }
|
||||
= render partial: "state_button", locals: { dossier: dossier }
|
||||
%ul.tabs
|
||||
|
|
|
@ -59,10 +59,10 @@
|
|||
%td= entreprise.rna_information.objet
|
||||
%tr
|
||||
%th Date de création :
|
||||
%td= entreprise.rna_information.date_creation
|
||||
%td= entreprise.rna_information.date_creation.strftime("%d/%m/%Y")
|
||||
%tr
|
||||
%th Date de publication :
|
||||
%td= entreprise.rna_information.date_publication
|
||||
%td= entreprise.rna_information.date_publication.strftime("%d/%m/%Y")
|
||||
%tr
|
||||
%th Date de déclaration :
|
||||
%td= entreprise.rna_information.date_declaration
|
||||
%td= entreprise.rna_information.date_declaration.strftime("%d/%m/%Y")
|
||||
|
|
|
@ -11,4 +11,4 @@
|
|||
%td= individual.nom
|
||||
%tr
|
||||
%th Date de naissance :
|
||||
%td= individual.birthdate
|
||||
%td= Date.parse(individual.birthdate).strftime("%d/%m/%Y")
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
.card.featured
|
||||
.card-title Cartographie
|
||||
#map
|
||||
#map
|
||||
|
||||
- if dossier.quartier_prioritaires.any?
|
||||
- if dossier.quartier_prioritaires.any?
|
||||
.card-title Quartiers prioritaires
|
||||
%ul
|
||||
- dossier.quartier_prioritaires.each do |q|
|
||||
%li= q.nom
|
||||
|
||||
- if dossier.cadastres.any?
|
||||
- if dossier.cadastres.any?
|
||||
.card-title Parcelles cadastrales
|
||||
%ul
|
||||
- dossier.cadastres.each do |p|
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
%table.table.vertical
|
||||
%tbody
|
||||
- if dossier.procedure.cerfa_flag?
|
||||
%tr
|
||||
%th Formulaire :
|
||||
%td
|
||||
- if @dossier.cerfa_available?
|
||||
= link_to "Télécharger", @dossier.cerfa.last.content_url, class: "link", target: :blank
|
||||
- else
|
||||
Pièce non fournie
|
||||
|
||||
- dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
|
||||
%tr
|
||||
%th= "#{type_de_piece_justificative.libelle} :"
|
||||
%td
|
||||
- pj = dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)
|
||||
- if pj.present?
|
||||
= link_to "Télécharger", pj.content_url, class: "link", target: :blank
|
||||
- else
|
||||
Pièce non fournie
|
|
@ -5,13 +5,13 @@
|
|||
%ul.dropdown-items
|
||||
- if dossier.en_construction?
|
||||
%li.selected
|
||||
%i.edit
|
||||
.icon.edit
|
||||
.description
|
||||
%h4 En construction
|
||||
Vous permettez à l'usager de modifier ses réponses au formulaire
|
||||
%li
|
||||
= link_to backoffice_dossier_receive_path(dossier, new_ui: true), method: :post, data: { confirm: "Confirmer vous le passage en instruction de ce dossier ?" } do
|
||||
%i.in-progress
|
||||
.icon.in-progress
|
||||
.description
|
||||
%h4 Passer en instruction
|
||||
L'usager ne pourra plus modifier le formulaire
|
||||
|
@ -19,35 +19,35 @@
|
|||
- if dossier.en_instruction?
|
||||
%li
|
||||
= link_to backoffice_dossier_reopen_path(dossier, new_ui: true), method: :post, data: { confirm: "Confirmer vous la réouverture de ce dossier ?" } do
|
||||
%i.edit
|
||||
.icon.edit
|
||||
.description
|
||||
%h4 Repasser en construction
|
||||
Vous permettrez à l'usager de modifier ses réponses au formulaire
|
||||
%li.selected
|
||||
%i.in-progress
|
||||
.icon.in-progress
|
||||
.description
|
||||
%h4 En instruction
|
||||
L'usager ne peut modifer son dossier pendant l'instruction
|
||||
%li{ onclick: "TPS.acceptDossier();" }
|
||||
%i.accept
|
||||
.icon.accept
|
||||
.description
|
||||
%h4 Accepter
|
||||
L'usager sera notifié que son dossier a été accepté
|
||||
%li
|
||||
= link_to backoffice_dossier_process_dossier_path(dossier, process_action: "without_continuation", new_ui: true), method: :post, data: { confirm: "Confirmer vous le classement sans suite de ce dossier ?" } do
|
||||
%i.without-continuation
|
||||
.icon.without-continuation
|
||||
.description
|
||||
%h4 Classer sans suite
|
||||
L'usager ne recevra aucune notification
|
||||
%li
|
||||
= link_to backoffice_dossier_process_dossier_path(dossier, process_action: "refuse", new_ui: true), method: :post, data: { confirm: "Confirmer vous le refus de ce dossier ?" } do
|
||||
%i.close
|
||||
.icon.close
|
||||
.description
|
||||
%h4 Refuser
|
||||
L'usager sera notifié que son dossier a été refusé
|
||||
.motivation
|
||||
%h3
|
||||
%i.accept
|
||||
.icon.accept
|
||||
Accepter le dossier
|
||||
= "nº #{dossier.id}"
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
- if file = commentaire.piece_justificative
|
||||
.attachment-link
|
||||
= link_to file.content_url, class: "button", target: "_blank", title: "Télécharger" do
|
||||
%i.attachment
|
||||
.icon.attachment
|
||||
= file.original_filename
|
||||
|
||||
= form_for(Commentaire.new, url: commentaire_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' }) do |f|
|
||||
|
|
106
app/views/new_gestionnaire/dossiers/print.html.haml
Normal file
106
app/views/new_gestionnaire/dossiers/print.html.haml
Normal file
|
@ -0,0 +1,106 @@
|
|||
%h1= "Dossier nº #{@dossier.id}"
|
||||
%h1.subtitle= "Procédure : #{@dossier.procedure.libelle}"
|
||||
|
||||
%h2 Identité du demandeur
|
||||
|
||||
- if @dossier.entreprise.present?
|
||||
= render partial: "identite_entreprise", locals: { entreprise: @dossier.entreprise }
|
||||
|
||||
- if @dossier.individual.present?
|
||||
= render partial: "identite_individual", locals: { individual: @dossier.individual }
|
||||
|
||||
%h2 Formulaire
|
||||
|
||||
- champs = @dossier.ordered_champs.decorate
|
||||
- if champs.any?
|
||||
= render partial: "champs", locals: { champs: champs }
|
||||
|
||||
- if @dossier.procedure.use_api_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.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
|
||||
%h3 Pièces jointes
|
||||
|
||||
%table
|
||||
- if @dossier.procedure.cerfa_flag?
|
||||
%tr
|
||||
%th Formulaire :
|
||||
%td
|
||||
- if @dossier.cerfa_available?
|
||||
Pièce fournie
|
||||
- else
|
||||
Pièce non fournie
|
||||
|
||||
- @dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
|
||||
%tr
|
||||
%th= "#{type_de_piece_justificative.libelle} :"
|
||||
%td
|
||||
- pj = @dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)
|
||||
- if pj.present?
|
||||
Pièce fournie
|
||||
- else
|
||||
Pièce non fournie
|
||||
|
||||
%h2 Annotations privées
|
||||
|
||||
- if @dossier.ordered_champs_private.present?
|
||||
%table
|
||||
- @dossier.champs_private.each do |champ|
|
||||
%tr
|
||||
%th
|
||||
= champ.libelle
|
||||
%td
|
||||
= champ.value
|
||||
- else
|
||||
Aucune annotation privée
|
||||
|
||||
%h2 Avis
|
||||
|
||||
- if @dossier.avis.present?
|
||||
%table
|
||||
- @dossier.avis.each do |avis|
|
||||
%tr
|
||||
%th
|
||||
= "Avis de #{avis.email_to_display}"
|
||||
- if avis.confidentiel?
|
||||
(confidentiel)
|
||||
%td
|
||||
- if avis.answer.present?
|
||||
= avis.answer
|
||||
- else
|
||||
En attente de réponse
|
||||
- else
|
||||
Aucun avis
|
||||
|
||||
%h2 Messagerie
|
||||
|
||||
%table
|
||||
- @dossier.commentaires.each do |commentaire|
|
||||
%tr
|
||||
%th
|
||||
= render partial: 'commentaire_issuer', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
|
||||
- if ![current_gestionnaire.email, @dossier.user.email, 'contact@tps.apientreprise.fr'].include?(commentaire.email)
|
||||
(invité)
|
||||
%br
|
||||
= I18n.l(commentaire.created_at.localtime, format: 'le %d/%m/%Y à %H:%M')
|
||||
%td
|
||||
%p= sanitize(commentaire.body)
|
||||
- if file = commentaire.piece_justificative
|
||||
%br
|
||||
= file.original_filename
|
||||
|
||||
%script{ type: "text/javascript" }
|
||||
window.print();
|
|
@ -1,8 +1,8 @@
|
|||
= render partial: "header", locals: { dossier: @dossier }
|
||||
|
||||
.container
|
||||
.backoffice-title Identité du demandeur
|
||||
.card
|
||||
.card-title Identité du demandeur
|
||||
- if @dossier.entreprise.present?
|
||||
= render partial: "identite_entreprise", locals: { entreprise: @dossier.entreprise }
|
||||
|
||||
|
@ -10,38 +10,17 @@
|
|||
= render partial: "identite_individual", locals: { individual: @dossier.individual }
|
||||
|
||||
.backoffice-title Formulaire
|
||||
|
||||
- champs = @dossier.ordered_champs.decorate
|
||||
- if champs.any?
|
||||
.card.featured
|
||||
.card
|
||||
= render partial: "champs", locals: { champs: champs }
|
||||
|
||||
- if @dossier.procedure.use_api_carto
|
||||
.backoffice-title Cartographie
|
||||
.card
|
||||
= render partial: "map", locals: { dossier: @dossier }
|
||||
|
||||
- if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
|
||||
.card.featured
|
||||
.card-title Pièces jointes
|
||||
|
||||
%table.table.vertical
|
||||
%tbody
|
||||
- if @dossier.procedure.cerfa_flag?
|
||||
%tr
|
||||
%th Formulaire :
|
||||
%td
|
||||
- if @dossier.cerfa_available?
|
||||
Pièce fournie -
|
||||
= link_to "Consulter", @dossier.cerfa.last.content_url, class: "link", target: :blank
|
||||
- else
|
||||
Pièce non fournie
|
||||
|
||||
- @dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
|
||||
%tr
|
||||
%th= "#{type_de_piece_justificative.libelle} :"
|
||||
%td
|
||||
- pj = @dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)
|
||||
- if pj.present?
|
||||
Pièce fournie -
|
||||
= link_to "Consulter", pj.content_url, class: "link", target: :blank
|
||||
- else
|
||||
Pièce non fournie
|
||||
.backoffice-title Pièces jointes
|
||||
.card
|
||||
= render partial: "pieces_jointes", locals: { dossier: @dossier }
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
- if dossier.en_construction_ou_instruction?
|
||||
- if dossier_is_followed
|
||||
= link_to unfollow_dossier_path(procedure, dossier), method: :patch, class: 'button' do
|
||||
%i.unfollow>
|
||||
.icon.unfollow>
|
||||
Ne plus suivre
|
||||
- else
|
||||
= link_to follow_dossier_path(procedure, dossier), method: :patch, class: 'button' do
|
||||
%i.follow>
|
||||
.icon.follow>
|
||||
Suivre le dossier
|
||||
|
||||
- elsif dossier.termine?
|
||||
- if dossier.archived
|
||||
= link_to unarchive_dossier_path(procedure, dossier), method: :patch, class: 'button' do
|
||||
%i.unarchive>
|
||||
.icon.unarchive>
|
||||
Désarchiver le dossier
|
||||
- else
|
||||
= link_to archive_dossier_path(procedure, dossier), method: :patch, class: 'button' do
|
||||
%i.archive>
|
||||
.icon.archive>
|
||||
Archiver le dossier
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
%tr
|
||||
%td.number-col
|
||||
= link_to(dossier_path(@procedure, dossier), class: 'cell-link') do
|
||||
%i.folder
|
||||
.icon.folder
|
||||
- if @followed_dossiers.with_unread_notifications.include?(dossier)
|
||||
%span.notifications{ 'aria-label': 'notifications' }
|
||||
= dossier.id
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
%tr
|
||||
%td.number-col
|
||||
= link_to(dossier_path(dossier.procedure, dossier), class: 'cell-link') do
|
||||
%i.folder>
|
||||
.icon.folder>
|
||||
= dossier.id
|
||||
%td= link_to(dossier.procedure.libelle, dossier_path(dossier.procedure, dossier), class: 'cell-link')
|
||||
%td= link_to(dossier.user.email, dossier_path(dossier.procedure, dossier), class: 'cell-link')
|
||||
|
|
|
@ -7,8 +7,11 @@
|
|||
%em.hero-tagline-em Dématérialisez
|
||||
%br
|
||||
vos procédures administratives en quelques minutes
|
||||
|
||||
%a.hero-button{ target: "_blank", onclick: "javascript: ga('send', 'pageview', '/demander-une-demo'); $crisp.push(['do', 'chat:show']); $crisp.push(['do', 'chat:open']);" } Demander une démo
|
||||
= link_to "Demander une démo",
|
||||
"mailto:#{t("dynamics.contact_email")}?subject=Demande de démo Téléprocédures Simplifiées",
|
||||
class: "hero-button",
|
||||
target: "_blank",
|
||||
onclick: "javascript: ga('send', 'pageview', '/demander-une-demo')"
|
||||
|
||||
%p.hero-phone-cta
|
||||
ou nous appeler au 09 72 62 57 12
|
||||
|
@ -128,6 +131,10 @@
|
|||
%h1.cta-panel-title Commencez à dématerialiser vos procédures
|
||||
%p.cta-panel-explanation Nous vous accompagnons dans la prise en main de l’outil
|
||||
%div
|
||||
%a.cta-panel-button{ target: "_blank", onclick: "javascript: ga('send', 'pageview', '/demander-une-demo'); $crisp.push(['do', 'chat:show']); $crisp.push(['do', 'chat:open']);" } Demander une démo
|
||||
= link_to "Demander une démo",
|
||||
"mailto:#{t("dynamics.contact_email")}?subject=Demande de démo Téléprocédures Simplifiées",
|
||||
class: "cta-panel-button",
|
||||
target: "_blank",
|
||||
onclick: "javascript: ga('send', 'pageview', '/demander-une-demo')"
|
||||
%p.cta-panel-phone-cta
|
||||
ou nous appeler au 09 72 62 57 12
|
||||
|
|
|
@ -2,19 +2,20 @@
|
|||
.container
|
||||
%h1 Icones
|
||||
|
||||
%i.follow
|
||||
%i.unfollow
|
||||
%i.archive
|
||||
%i.unarchive
|
||||
%i.folder
|
||||
%i.accept
|
||||
%i.close
|
||||
%i.without-continuation
|
||||
%i.edit
|
||||
%i.in-progress
|
||||
%i.bubble
|
||||
%i.attachment
|
||||
%i.lock
|
||||
.icon.follow
|
||||
.icon.unfollow
|
||||
.icon.archive
|
||||
.icon.unarchive
|
||||
.icon.folder
|
||||
.icon.accept
|
||||
.icon.close
|
||||
.icon.without-continuation
|
||||
.icon.edit
|
||||
.icon.in-progress
|
||||
.icon.bubble
|
||||
.icon.attachment
|
||||
.icon.lock
|
||||
.icon.printer
|
||||
|
||||
%h1 Formulaires
|
||||
|
||||
|
@ -47,17 +48,17 @@
|
|||
|
||||
%p
|
||||
= link_to "#", class: "button" do
|
||||
%i.follow
|
||||
= "%i.follow"
|
||||
.icon.follow
|
||||
= ".icon.follow"
|
||||
= link_to "#", class: "button" do
|
||||
%i.unfollow
|
||||
= "%i.unfollow"
|
||||
.icon.unfollow
|
||||
= ".icon.unfollow"
|
||||
= link_to "#", class: "button" do
|
||||
%i.archive
|
||||
= "%i.archive"
|
||||
.icon.archive
|
||||
= ".icon.archive"
|
||||
= link_to "#", class: "button" do
|
||||
%i.unarchive
|
||||
= "%i.unarchive"
|
||||
.icon.unarchive
|
||||
= ".icon.unarchive"
|
||||
%p
|
||||
= link_to ".button.primary.expand", "#", class: "button primary expand"
|
||||
|
||||
|
@ -190,7 +191,7 @@
|
|||
%p Bonjour, merci de me donner votre avis sur ce dossier.
|
||||
|
||||
.answer.flex.align-start
|
||||
%i.bubble.avis-icon
|
||||
.icon.bubble.avis-icon
|
||||
.width-100
|
||||
%h2.gestionnaire
|
||||
gestionnnaire@tps.com
|
||||
|
|
|
@ -8,4 +8,4 @@ Rails.application.config.assets.version = '1.0'
|
|||
|
||||
# Precompile additional assets.
|
||||
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
||||
Rails.application.config.assets.precompile += %w(print.css new_design/new_application.css new_design/application.js)
|
||||
Rails.application.config.assets.precompile += %w(print.css new_design/new_application.css new_design/print.css new_design/application.js)
|
||||
|
|
|
@ -258,6 +258,7 @@ Rails.application.routes.draw do
|
|||
get 'position'
|
||||
end
|
||||
post 'avis' => 'dossiers#create_avis'
|
||||
get 'print' => 'dossiers#print'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -59,10 +59,10 @@ feature "procedure filters" do
|
|||
expect(page).to have_content("#{type_de_champ.libelle} : #{champ.value}")
|
||||
|
||||
within ".dossiers-table" do
|
||||
expect(page).to have_link(new_unfollow_dossier.id)
|
||||
expect(page).to have_link(new_unfollow_dossier.id, exact: true)
|
||||
expect(page).to have_link(new_unfollow_dossier.user.email)
|
||||
|
||||
expect(page).not_to have_link(new_unfollow_dossier_2.id)
|
||||
expect(page).not_to have_link(new_unfollow_dossier_2.id, exact: true)
|
||||
expect(page).not_to have_link(new_unfollow_dossier_2.user.email)
|
||||
end
|
||||
|
||||
|
|
|
@ -255,5 +255,32 @@ describe AttestationTemplate, type: :model do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the procedure has 2 types de champ date and datetime' do
|
||||
let(:types_de_champ) do
|
||||
[create(:type_de_champ_public, libelle: 'date', type_champ: 'date'),
|
||||
create(:type_de_champ_public, libelle: 'datetime', type_champ: 'datetime')]
|
||||
end
|
||||
|
||||
context 'and the are used in the template title' do
|
||||
let(:template_title) { 'title --date-- --datetime--' }
|
||||
|
||||
context 'and its value in the dossier are not nil' do
|
||||
before :each do
|
||||
dossier.champs
|
||||
.select { |champ| champ.type_champ == 'date' }
|
||||
.first
|
||||
.value = '2017-04-15'
|
||||
|
||||
dossier.champs
|
||||
.select { |champ| champ.type_champ == 'datetime' }
|
||||
.first
|
||||
.value = '13/09/2017 09:00'
|
||||
end
|
||||
|
||||
it { expect(view_args[:title]).to eq('title 15/04/2017 13/09/2017 09:00') }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -30,6 +30,6 @@ describe 'new_gestionnaire/dossiers/show.html.haml', type: :view do
|
|||
it { expect(rendered).to include(individual.gender) }
|
||||
it { expect(rendered).to include(individual.nom) }
|
||||
it { expect(rendered).to include(individual.prenom) }
|
||||
it { expect(rendered).to include(individual.birthdate) }
|
||||
it { expect(rendered).to include(Date.parse(individual.birthdate).strftime("%d/%m/%Y")) }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue