commit
f8f39d9535
10 changed files with 33 additions and 12 deletions
|
@ -250,7 +250,11 @@ class ApplicationController < ActionController::Base
|
||||||
email: current_administrateur&.email,
|
email: current_administrateur&.email,
|
||||||
DS_SIGN_IN_COUNT: current_administrateur&.sign_in_count,
|
DS_SIGN_IN_COUNT: current_administrateur&.sign_in_count,
|
||||||
DS_CREATED_AT: current_administrateur&.created_at,
|
DS_CREATED_AT: current_administrateur&.created_at,
|
||||||
DS_ID: current_administrateur&.id
|
DS_ID: current_administrateur&.id,
|
||||||
|
DS_NB_DEMARCHES_BROUILLONS: current_administrateur&.procedures&.brouillons&.count,
|
||||||
|
DS_NB_DEMARCHES_ACTIVES: current_administrateur&.procedures&.publiees&.count,
|
||||||
|
DS_NB_DEMARCHES_ARCHIVES: current_administrateur&.procedures&.archivees&.count
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -22,9 +22,8 @@ module Manager
|
||||||
|
|
||||||
def hide
|
def hide
|
||||||
dossier = Dossier.find(params[:id])
|
dossier = Dossier.find(params[:id])
|
||||||
deleted_dossier = dossier.hide!(current_administration)
|
dossier.hide!(current_administration)
|
||||||
|
|
||||||
DossierMailer.notify_deletion_to_user(deleted_dossier, dossier.user.email).deliver_later
|
|
||||||
logger.info("Le dossier #{dossier.id} est supprimé par #{current_administration.email}")
|
logger.info("Le dossier #{dossier.id} est supprimé par #{current_administration.email}")
|
||||||
flash[:notice] = "Le dossier #{dossier.id} est supprimé"
|
flash[:notice] = "Le dossier #{dossier.id} est supprimé"
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,12 @@ if (enabled) {
|
||||||
[
|
[
|
||||||
['DS_ID', administrateur.email],
|
['DS_ID', administrateur.email],
|
||||||
['DS_SIGN_IN_COUNT', administrateur.DS_SIGN_IN_COUNT],
|
['DS_SIGN_IN_COUNT', administrateur.DS_SIGN_IN_COUNT],
|
||||||
|
[
|
||||||
|
'DS_NB_DEMARCHES_BROUILLONS',
|
||||||
|
administrateur.DS_NB_DEMARCHES_BROUILLONS
|
||||||
|
],
|
||||||
|
['DS_NB_DEMARCHES_ACTIVES', administrateur.DS_NB_DEMARCHES_ACTIVES],
|
||||||
|
['DS_NB_DEMARCHES_ARCHIVES', administrateur.DS_NB_DEMARCHES_ARCHIVES],
|
||||||
[
|
[
|
||||||
'URL_MANAGER',
|
'URL_MANAGER',
|
||||||
'https://www.demarches-simplifiees.fr/manager/administrateurs/' +
|
'https://www.demarches-simplifiees.fr/manager/administrateurs/' +
|
||||||
|
@ -29,4 +35,9 @@ if (enabled) {
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
window.$crisp.push([
|
||||||
|
'set',
|
||||||
|
'session:event',
|
||||||
|
[[['PAGE_VIEW', { URL: window.location.pathname }]]]
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -412,7 +412,8 @@ class Dossier < ApplicationRecord
|
||||||
def hide!(administration)
|
def hide!(administration)
|
||||||
update(hidden_at: Time.zone.now)
|
update(hidden_at: Time.zone.now)
|
||||||
|
|
||||||
DeletedDossier.create_from_dossier(self)
|
deleted_dossier = DeletedDossier.create_from_dossier(self)
|
||||||
|
DossierMailer.notify_deletion_to_user(deleted_dossier, user.email).deliver_later
|
||||||
log_dossier_operation(administration, :supprimer, self)
|
log_dossier_operation(administration, :supprimer, self)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ require Rails.root.join('lib', 'percentile')
|
||||||
class Procedure < ApplicationRecord
|
class Procedure < ApplicationRecord
|
||||||
MAX_DUREE_CONSERVATION = 36
|
MAX_DUREE_CONSERVATION = 36
|
||||||
|
|
||||||
self.ignored_columns = [:individual_with_siret, :expects_multiple_submissions]
|
|
||||||
|
|
||||||
has_many :types_de_piece_justificative, -> { ordered }, inverse_of: :procedure, dependent: :destroy
|
has_many :types_de_piece_justificative, -> { ordered }, inverse_of: :procedure, dependent: :destroy
|
||||||
has_many :types_de_champ, -> { root.public_only.ordered }, inverse_of: :procedure, dependent: :destroy
|
has_many :types_de_champ, -> { root.public_only.ordered }, inverse_of: :procedure, dependent: :destroy
|
||||||
has_many :types_de_champ_private, -> { root.private_only.ordered }, class_name: 'TypeDeChamp', inverse_of: :procedure, dependent: :destroy
|
has_many :types_de_champ_private, -> { root.private_only.ordered }, class_name: 'TypeDeChamp', inverse_of: :procedure, dependent: :destroy
|
||||||
|
|
|
@ -5,5 +5,5 @@
|
||||||
#procedure_new.section.section-label
|
#procedure_new.section.section-label
|
||||||
= form_for @procedure, url: { controller: 'admin/procedures', action: :create }, multipart: true do |f|
|
= form_for @procedure, url: { controller: 'admin/procedures', action: :create }, multipart: true do |f|
|
||||||
= render partial: 'informations', locals: { f: f }
|
= render partial: 'informations', locals: { f: f }
|
||||||
.text-right
|
.text-center
|
||||||
= f.button 'Valider', class: 'btn btn-info', id: 'save-procedure'
|
= f.button 'Valider', class: 'btn btn-info btn-lg btn-block', id: 'save-procedure'
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#navbar-body
|
#navbar-body
|
||||||
.row
|
.row
|
||||||
%div{ style: "vertical-align: middle;float:left;position:absolute;line-height: 60px;z-index:2;" }
|
%div{ style: "vertical-align: middle;float:left;position:absolute;line-height: 60px;z-index:2;" }
|
||||||
👉 Besoin d'aide? Contactez-nous par <a style="cursor:hand" onclick="$crisp.push(['do', 'chat:open'])">chat</a>, <a href="#{contact_admin_path}" target="_blank" rel="noopener">email</a> ou <a target="_blank" rel="noopener" href="https://calendly.com/demarches-simplifiees/accompagnement-administrateur-demarches-simplifiees-fr">prenez rendez-vous avec nous</a>.
|
👉Besoin d'aide? Contactez-nous par <a style="cursor:hand" onclick="$crisp.push(['do', 'chat:open'])">chat</a>, <a href="#{contact_admin_path}" target="_blank" rel="noopener">email</a> ou <a target="_blank" rel="noopener" href="https://calendly.com/demarches-simplifiees/accompagnement-administrateur-demarches-simplifiees-fr">prenez RDV</a>
|
||||||
-# BEST WTF EVER
|
-# BEST WTF EVER
|
||||||
-# this begin rescue hides potentials bugs by displaying another navbar
|
-# this begin rescue hides potentials bugs by displaying another navbar
|
||||||
- begin
|
- begin
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class RemoveExpectsMultipleSubmissionsFromProcedure < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
remove_column :procedures, :expects_multiple_submissions, :boolean, default: false, null: false
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class RemoveIndividualWithSiretFromProcedure < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
remove_column :procedures, :individual_with_siret, :boolean, default: false
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 2019_07_04_144304) do
|
ActiveRecord::Schema.define(version: 2019_07_11_135457) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
@ -481,7 +481,6 @@ ActiveRecord::Schema.define(version: 2019_07_04_144304) do
|
||||||
t.string "lien_site_web"
|
t.string "lien_site_web"
|
||||||
t.string "lien_notice"
|
t.string "lien_notice"
|
||||||
t.boolean "for_individual", default: false
|
t.boolean "for_individual", default: false
|
||||||
t.boolean "individual_with_siret", default: false
|
|
||||||
t.date "auto_archive_on"
|
t.date "auto_archive_on"
|
||||||
t.datetime "published_at"
|
t.datetime "published_at"
|
||||||
t.datetime "hidden_at"
|
t.datetime "hidden_at"
|
||||||
|
@ -500,7 +499,6 @@ ActiveRecord::Schema.define(version: 2019_07_04_144304) do
|
||||||
t.boolean "juridique_required", default: true
|
t.boolean "juridique_required", default: true
|
||||||
t.boolean "durees_conservation_required", default: true
|
t.boolean "durees_conservation_required", default: true
|
||||||
t.string "path"
|
t.string "path"
|
||||||
t.boolean "expects_multiple_submissions", default: false, null: false
|
|
||||||
t.string "declarative_with_state"
|
t.string "declarative_with_state"
|
||||||
t.index ["declarative_with_state"], name: "index_procedures_on_declarative_with_state"
|
t.index ["declarative_with_state"], name: "index_procedures_on_declarative_with_state"
|
||||||
t.index ["hidden_at"], name: "index_procedures_on_hidden_at"
|
t.index ["hidden_at"], name: "index_procedures_on_hidden_at"
|
||||||
|
|
Loading…
Reference in a new issue