Working on dossiers#show recapitulatif for users
This commit is contained in:
parent
0c90c2c122
commit
27cc62ea1e
11 changed files with 212 additions and 92 deletions
|
@ -3,6 +3,8 @@ $(document).ready(init_default_data_block);
|
||||||
|
|
||||||
function init_default_data_block() {
|
function init_default_data_block() {
|
||||||
$('.default_data_block #dossier .body').toggle();
|
$('.default_data_block #dossier .body').toggle();
|
||||||
|
$('.default_data_block #dossier .carret-right').toggle();
|
||||||
|
$('.default_data_block #dossier .carret-down').toggle();
|
||||||
|
|
||||||
$('.default_data_block .title').click(function () {
|
$('.default_data_block .title').click(function () {
|
||||||
toggle_default_data_bloc(this, 400);
|
toggle_default_data_bloc(this, 400);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#backoffice_dossier_show {
|
#backoffice_dossier_show, #users_recapitulatif_dossier_show {
|
||||||
|
|
||||||
#messages {
|
#messages {
|
||||||
.last-commentaire {
|
.last-commentaire {
|
||||||
|
@ -71,8 +71,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#infos {
|
#infos {
|
||||||
|
.split-row {
|
||||||
|
margin: 0 0 20px 0;
|
||||||
}
|
}
|
||||||
#dossier {
|
.entreprise-info {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.entreprise-label {
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#dossier, #infos {
|
||||||
.body {
|
.body {
|
||||||
padding: 0 20px 0 20px;
|
padding: 0 20px 0 20px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
|
@ -91,15 +101,19 @@
|
||||||
}
|
}
|
||||||
.dossier-title {
|
.dossier-title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
height: 40px;
|
min-height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.split-hr {
|
.split-hr {
|
||||||
border-bottom: 1px solid #979797;
|
border-bottom: 1px solid #979797;
|
||||||
height: 12px;
|
height: 12px;
|
||||||
|
min-height: 10px;
|
||||||
}
|
}
|
||||||
.title-row {
|
.title-row {
|
||||||
margin: 20px 10px 20px 10px;
|
margin: 20px 10px 10px 10px;
|
||||||
|
}
|
||||||
|
.margin-top-40 {
|
||||||
|
margin-top: 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
margin: 0 10px 0 0;
|
margin: 0 10px 0 0;
|
||||||
height: 40px;
|
min-height: 40px;
|
||||||
line-height: 40px;
|
padding: 5px;
|
||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
@ -63,6 +63,10 @@
|
||||||
width: 400px;
|
width: 400px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
|
.centered-option {
|
||||||
|
line-height: 40px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#sign_in{
|
#sign_in{
|
||||||
|
|
|
@ -66,5 +66,3 @@
|
||||||
EDITER
|
EDITER
|
||||||
%div.body
|
%div.body
|
||||||
= render partial: '/dossiers/infos_dossier'
|
= render partial: '/dossiers/infos_dossier'
|
||||||
- if false
|
|
||||||
= render partial: 'dossiers/tab_objects_dossier'
|
|
||||||
|
|
|
@ -20,11 +20,13 @@
|
||||||
%div.col-md-6.col-lg-6.depositaire-info= @facade.individual.birthdate
|
%div.col-md-6.col-lg-6.depositaire-info= @facade.individual.birthdate
|
||||||
|
|
||||||
- unless @facade.champs.nil?
|
- unless @facade.champs.nil?
|
||||||
.row.title-row
|
|
||||||
%div.col-md-4.col-lg-4.split-hr
|
|
||||||
%div.col-md-4.col-lg-4.dossier-title= t('dynamics.dossiers.liste_champs').upcase
|
|
||||||
%div.col-md-4.col-lg-4.split-hr
|
|
||||||
- @facade.champs.each do |champ|
|
- @facade.champs.each do |champ|
|
||||||
|
- if champ.type_champ == 'header_section'
|
||||||
|
.row.title-row.margin-top-40
|
||||||
|
%div.col-md-3.col-lg-3.split-hr
|
||||||
|
%div.col-md-6.col-lg-6.dossier-title= champ.libelle.upcase
|
||||||
|
%div.col-md-3.col-lg-3.split-hr
|
||||||
|
- else
|
||||||
.row
|
.row
|
||||||
%div.col-md-6.col-lg-6.depositaire-label= champ.libelle
|
%div.col-md-6.col-lg-6.depositaire-label= champ.libelle
|
||||||
%div.col-md-1.col-lg-1.comments
|
%div.col-md-1.col-lg-1.comments
|
||||||
|
@ -37,7 +39,7 @@
|
||||||
%div.col-md-5.col-lg-5.depositaire-info
|
%div.col-md-5.col-lg-5.depositaire-info
|
||||||
- unless champ.decorate.value.blank?
|
- unless champ.decorate.value.blank?
|
||||||
= champ.decorate.value.html_safe
|
= champ.decorate.value.html_safe
|
||||||
.row
|
.row.margin-top-40
|
||||||
.col-lg-12.col-md-12= render partial: '/dossiers/pieces_justificatives'
|
.col-lg-12.col-md-12= render partial: '/dossiers/pieces_justificatives'
|
||||||
|
|
||||||
- if @facade.dossier.mandataire_social && gestionnaire_signed_in?
|
- if @facade.dossier.mandataire_social && gestionnaire_signed_in?
|
||||||
|
|
|
@ -1,59 +1,60 @@
|
||||||
.col-md-12.col-xs-12
|
.col-md-12.col-xs-12
|
||||||
%h4
|
%h4
|
||||||
= @facade.entreprise.raison_sociale_or_name
|
= @facade.entreprise.raison_sociale_or_name
|
||||||
|
.row.split-row
|
||||||
|
%div.col-md-12.col-lg-12.split-hr
|
||||||
|
%div.row
|
||||||
|
.col-lg-12.col-md-12
|
||||||
|
|
||||||
.row#infos_entreprise
|
.row
|
||||||
.col-lg-6.col-md-6.col-xs-12.col-sm-12
|
%div.col-md-4.col-lg-4.entreprise-label Siret :
|
||||||
%dl.dl-horizontal
|
%div.col-md-8.col-lg-8.entreprise-info= @facade.etablissement.siret
|
||||||
%dt Siret :
|
|
||||||
%dd.text-success= @facade.etablissement.siret
|
|
||||||
|
|
||||||
- if @facade.etablissement.siret != @facade.entreprise.siret_siege_social
|
- if @facade.etablissement.siret != @facade.entreprise.siret_siege_social
|
||||||
%dt SIRET siège social :
|
.row
|
||||||
%dd= @facade.entreprise.siret_siege_social
|
%div.col-md-4.col-lg-4.entreprise-label SIRET siège social :
|
||||||
|
%div.col-md-8.col-lg-8.entreprise-info= @facade.entreprise.siret_siege_social
|
||||||
|
.row
|
||||||
|
%div.col-md-4.col-lg-4.entreprise-label Forme juridique :
|
||||||
|
%div.col-md-8.col-lg-8.entreprise-info= @facade.entreprise.forme_juridique
|
||||||
|
.row
|
||||||
|
%div.col-md-4.col-lg-4.entreprise-label Libellé naf :
|
||||||
|
%div.col-md-8.col-lg-8.entreprise-info= @facade.etablissement.libelle_naf
|
||||||
|
.row
|
||||||
|
%div.col-md-4.col-lg-4.entreprise-label Code naf :
|
||||||
|
%div.col-md-8.col-lg-8.entreprise-info= @facade.etablissement.naf
|
||||||
|
.row
|
||||||
|
%div.col-md-4.col-lg-4.entreprise-label Date de création :
|
||||||
|
%div.col-md-8.col-lg-8.entreprise-info= Time.at(@facade.entreprise.date_creation).strftime "%d-%m-%Y"
|
||||||
|
.row
|
||||||
|
%div.col-md-4.col-lg-4.entreprise-label Effectif organisation :
|
||||||
|
%div.col-md-8.col-lg-8.entreprise-info= @facade.entreprise.effectif
|
||||||
|
.row
|
||||||
|
%div.col-md-4.col-lg-4.entreprise-label Code effectif :
|
||||||
|
%div.col-md-8.col-lg-8.entreprise-info= @facade.entreprise.code_effectif_entreprise
|
||||||
|
.row
|
||||||
|
%div.col-md-4.col-lg-4.entreprise-label Numéro TVA intracommunautaire :
|
||||||
|
%div.col-md-8.col-lg-8.entreprise-info= @facade.entreprise.numero_tva_intracommunautaire
|
||||||
|
|
||||||
%dt Forme juridique :
|
.row
|
||||||
%dd= @facade.entreprise.forme_juridique
|
%div.col-md-4.col-lg-4.entreprise-label Adresse :
|
||||||
|
%div.col-md-8.col-lg-8.entreprise-info
|
||||||
%dt Libellé naf :
|
|
||||||
%dd= @facade.etablissement.libelle_naf
|
|
||||||
|
|
||||||
%dt Code naf :
|
|
||||||
%dd= @facade.etablissement.naf
|
|
||||||
|
|
||||||
%dt Date de création :
|
|
||||||
%dd= Time.at(@facade.entreprise.date_creation).strftime "%d-%m-%Y"
|
|
||||||
|
|
||||||
%dt Effectif organisation :
|
|
||||||
%dd= @facade.entreprise.effectif
|
|
||||||
|
|
||||||
%dt Code effectif :
|
|
||||||
%dd= @facade.entreprise.code_effectif_entreprise
|
|
||||||
|
|
||||||
%dt Numéro TVA intracommunautaire :
|
|
||||||
%dd= @facade.entreprise.numero_tva_intracommunautaire
|
|
||||||
|
|
||||||
|
|
||||||
.col-lg-6.col-md-6.col-xs-12.col-sm-12
|
|
||||||
%dl.dl-horizontal
|
|
||||||
%dt Adresse :
|
|
||||||
%dd
|
|
||||||
%address
|
|
||||||
- @facade.etablissement.adresse.split("\n").each do |line|
|
- @facade.etablissement.adresse.split("\n").each do |line|
|
||||||
= line
|
= line
|
||||||
%br
|
.row
|
||||||
|
%div.col-md-4.col-lg-4.entreprise-label Capital social :
|
||||||
|
%div.col-md-8.col-lg-8.entreprise-info= @facade.entreprise.pretty_capital_social
|
||||||
|
|
||||||
%dt Capital social :
|
.row
|
||||||
%dd= @facade.entreprise.pretty_capital_social
|
%div.col-md-4.col-lg-4.entreprise-label Exercices :
|
||||||
|
%div.col-md-8.col-lg-8.entreprise-info
|
||||||
%dt Exercices :
|
|
||||||
%dd
|
|
||||||
%address
|
|
||||||
- @facade.etablissement.exercices.each_with_index do |exercice, index|
|
- @facade.etablissement.exercices.each_with_index do |exercice, index|
|
||||||
%strong
|
%strong
|
||||||
= "#{exercice.dateFinExercice.year} : "
|
= "#{exercice.dateFinExercice.year} : "
|
||||||
= number_to_currency(exercice.ca)
|
= number_to_currency(exercice.ca)
|
||||||
%br
|
%br
|
||||||
|
|
||||||
|
.row.split-row
|
||||||
|
%div.col-md-12.col-lg-12.split-hr
|
||||||
- unless @facade.entreprise.rna_information.nil?
|
- unless @facade.entreprise.rna_information.nil?
|
||||||
= render partial: '/dossiers/infos_rna'
|
= render partial: '/dossiers/infos_rna'
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
%div#first-block
|
||||||
|
%div.en-cours
|
||||||
|
%h2 Récapitulatif
|
||||||
|
%div.infos
|
||||||
|
%div #{@facade.dossier.nom_projet}
|
||||||
|
%div= t('dynamics.dossiers.numéro') + @facade.dossier.id.to_s
|
||||||
|
|
||||||
|
%div#action-block
|
||||||
|
- if @facade.dossier.validated?
|
||||||
|
= form_tag(url_for({controller: :recapitulatif, action: :submit, dossier_id: @facade.dossier.id}), method: 'POST') do
|
||||||
|
%button.action= 'Procéder au dépôt définitif'
|
||||||
|
|
||||||
|
%div#menu-block
|
||||||
|
|
||||||
|
%div#infos-block
|
||||||
|
- if user_signed_in? && current_user.email == @facade.dossier.user.email
|
||||||
|
%div.split-hr-left
|
||||||
|
%div.dossier-state= @facade.dossier.display_state
|
||||||
|
%div.split-hr-left
|
|
@ -0,0 +1,29 @@
|
||||||
|
%div.col-lg-8.col-md-8.main-info
|
||||||
|
%span{ 'data-toggle' => :tooltip, "data-placement" => :bottom, title: @facade.dossier.procedure.libelle }
|
||||||
|
= @facade.dossier.procedure.libelle.truncate(60)
|
||||||
|
%div.col-lg-3.col-md-3.options
|
||||||
|
%div.row.centered-option
|
||||||
|
%div.col-lg-12.col-md-12
|
||||||
|
%div.dropdown-toggle{ 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false }
|
||||||
|
%i.fa.fa-user
|
||||||
|
= t('dynamics.dossiers.involved')
|
||||||
|
%div.dropdown-menu.dropdown-menu-right.dropdown-pannel
|
||||||
|
%h4= t('dynamics.dossiers.followers.title')
|
||||||
|
%ul
|
||||||
|
- unless @facade.followers.empty?
|
||||||
|
- @facade.followers.each do |follower|
|
||||||
|
%li= follower.email
|
||||||
|
- else
|
||||||
|
= t('dynamics.dossiers.followers.empty')
|
||||||
|
%h4= t('dynamics.dossiers.invites.title')
|
||||||
|
%ul
|
||||||
|
- unless @facade.invites.empty?
|
||||||
|
- @facade.invites.each do |invite|
|
||||||
|
%li= invite.email
|
||||||
|
- else
|
||||||
|
= t('dynamics.dossiers.invites.empty')
|
||||||
|
|
||||||
|
%li
|
||||||
|
=form_tag invites_dossier_path(dossier_id: @facade.dossier.id), method: :post, class: 'form-inline' do
|
||||||
|
=text_field_tag :email, '', class: 'form-control', placeholder: 'Envoyer une invitation'
|
||||||
|
=submit_tag 'Ajouter', class: 'btn btn-success'
|
14
app/views/users/commentaires/_commentaire.html.haml
Normal file
14
app/views/users/commentaires/_commentaire.html.haml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
%div.commentaire
|
||||||
|
.row
|
||||||
|
%div.col-lg-12.col-md-12.comment-header
|
||||||
|
= commentaire.header
|
||||||
|
.row
|
||||||
|
%div.col-lg-12.col-md-12.content
|
||||||
|
= commentaire.body.html_safe
|
||||||
|
- if file = commentaire.piece_justificative
|
||||||
|
.row
|
||||||
|
%div.col-lg-12.col-md-12.file
|
||||||
|
= link_to file.content_url, class: 'link', target: '_blank' do
|
||||||
|
%span.fa.fa-file
|
||||||
|
%div
|
||||||
|
= file.original_filename
|
|
@ -1,31 +1,68 @@
|
||||||
.row#recap_dossier
|
%div.col-lg-12.col-md-12#users_recapitulatif_dossier_show
|
||||||
.col-md-4.col-lg-4
|
|
||||||
|
.default_data_block
|
||||||
|
.row.show-block#messages
|
||||||
|
%div.header
|
||||||
|
%div.col-lg-10.col-md-10.title
|
||||||
|
.carret-right
|
||||||
|
.carret-down
|
||||||
|
MESSAGES
|
||||||
|
%div.col-lg-2.col-md-2.count
|
||||||
|
- message_count = @facade.commentaires.count
|
||||||
|
= (message_count == 1) ? "1 message" : "#{message_count} messages"
|
||||||
|
%div.body
|
||||||
|
%div.commentaires
|
||||||
|
- @facade.commentaires.object.sort.each do |commentaire|
|
||||||
|
= render partial: commentaire
|
||||||
.row
|
.row
|
||||||
.col-md-6.col-lg-6
|
.col-lg-12.col-md-12
|
||||||
%h2 Récapitulatif
|
%div.split-hr
|
||||||
|
.row
|
||||||
|
%div.col-lg-12.col-md-12#new-commentaire
|
||||||
|
= form_tag(url_for({ controller: 'commentaires', action: :create, dossier_id: @facade.dossier.id, champ_id: @facade.champ_id }), class: 'form-inline', method: 'POST', multipart: true) do
|
||||||
|
%textarea.form-control{id: 'texte_commentaire', class: 'wysihtml5', name: 'texte_commentaire', style: 'width: 100%; margin-bottom:2%', rows: '5', placeholder:"Commentaire"}
|
||||||
|
%h4.text-primary{style: 'margin-top: 0px'} Ajouter un fichier
|
||||||
|
= file_field_tag "piece_justificative[content]", accept: PieceJustificative.accept_format, style: 'float: left; margin-left: 20px'
|
||||||
|
%input.form-control.btn.btn-send{ type: 'submit', value: 'ENVOYER' }
|
||||||
|
- if last_comment = @facade.commentaires.first
|
||||||
|
%div.last-commentaire
|
||||||
|
.row
|
||||||
|
%div.col-lg-12.col-md-12.comment-header
|
||||||
|
= "DERNIER MESSAGE (#{last_comment.header})"
|
||||||
|
.row
|
||||||
|
%div.col-lg-12.col-md-12.content
|
||||||
|
= last_comment.body.html_safe
|
||||||
|
- if file = last_comment.piece_justificative
|
||||||
|
.row
|
||||||
|
%div.col-lg-12.col-md-12.file
|
||||||
|
= link_to file.content_url, class: 'link', target: '_blank' do
|
||||||
|
%span.fa.fa-file
|
||||||
|
%div
|
||||||
|
= file.original_filename
|
||||||
|
.row
|
||||||
|
.col-lg-12.col-md-12
|
||||||
|
%div.new-action
|
||||||
|
ENVOYER UN MESSAGE
|
||||||
|
|
||||||
.col-md-5.col-lg-5
|
|
||||||
|
|
||||||
.col-md-3.col-lg-3
|
|
||||||
%h2#dossier_id{:class => 'text-info', :style => 'text-align:right; margin-bottom:15px'}
|
|
||||||
= t('dynamics.dossiers.numéro') + @facade.dossier.id.to_s
|
|
||||||
|
|
||||||
- if user_signed_in? && current_user.email == @facade.dossier.user.email
|
|
||||||
-if @facade.dossier.validated?
|
|
||||||
%br
|
|
||||||
= form_tag(url_for({controller: :recapitulatif, action: :submit, dossier_id: @facade.dossier.id}), method: 'POST') do
|
|
||||||
%button#validate_button.btn.btn-success
|
|
||||||
= 'Procéder au dépôt définitif'
|
|
||||||
-else
|
|
||||||
%h3{:class => 'text-success', :style => 'text-align:right'}
|
|
||||||
= @facade.dossier.display_state
|
|
||||||
|
|
||||||
%br
|
|
||||||
- unless @facade.entreprise.nil?
|
- unless @facade.entreprise.nil?
|
||||||
|
.default_data_block
|
||||||
|
%div.row.show-block#infos
|
||||||
|
%div.header
|
||||||
|
%div.col-lg-12.col-md-12.title
|
||||||
|
%div.carret-right
|
||||||
|
%div.carret-down
|
||||||
|
INFORMATIONS ENTREPRISE / ASSOCIATION / INDIVIDU
|
||||||
|
%div.body
|
||||||
= render partial: '/dossiers/infos_entreprise'
|
= render partial: '/dossiers/infos_entreprise'
|
||||||
|
|
||||||
|
.default_data_block
|
||||||
|
%div.row.show-block#dossier
|
||||||
|
%div.header
|
||||||
|
%div.col-lg-10.col-md-10.title
|
||||||
|
%div.carret-right
|
||||||
|
%div.carret-down
|
||||||
|
CONSTRUCTION DU DOSSIER
|
||||||
|
%div.col-lg-2.col-md-2.action
|
||||||
|
EDITER
|
||||||
|
%div.body
|
||||||
= render partial: '/dossiers/infos_dossier'
|
= render partial: '/dossiers/infos_dossier'
|
||||||
|
|
||||||
%div
|
|
||||||
%br
|
|
||||||
= render partial: 'dossiers/tab_objects_dossier'
|
|
Loading…
Add table
Reference in a new issue