diff --git a/app/controllers/AreaController.scala b/app/controllers/AreaController.scala
index 1f07134b8..a61923469 100644
--- a/app/controllers/AreaController.scala
+++ b/app/controllers/AreaController.scala
@@ -108,8 +108,7 @@ case class AreaController @Inject() (
"CDAD",
"La Poste",
"MSA",
- "Pôle emploi",
- "Sous-Préf"
+ "Pôle emploi"
).map(Set(_))
).map(_.flatMap(id => Organisation.byId(Organisation.Id(id))))
@@ -137,7 +136,7 @@ case class AreaController @Inject() (
}
val data = for {
- area <- request.currentUser.areas.flatMap(Area.fromId)
+ area <- request.currentUser.areas.flatMap(Area.fromId).filterNot(_.name == "Demo")
} yield {
val organisationMap: List[(Set[Organisation], Int)] = for {
organisations <- organisationGrouping
diff --git a/app/models/Area.scala b/app/models/Area.scala
index 92c0d452a..64110f9bb 100644
--- a/app/models/Area.scala
+++ b/app/models/Area.scala
@@ -49,8 +49,8 @@ object Area {
Area("Cher", "Cher", "18"),
Area("Correze", "Corrèze", "19"),
Area("Corse-du-Sud", "Corse-du-Sud", "2A"),
- Area("Cote-d'Or", "Côte-d'Or", "21"),
- Area("Cotes-d'Armor", "Côtes-d'Armor", "22"),
+ Area("Cote-d'Or", "Côte-d’Or", "21"),
+ Area("Cotes-d'Armor", "Côtes-d’Armor", "22"),
Area("Creuse", "Creuse", "23"),
Area("Deux-Sevres", "Deux-Sèvres", "79"),
Area("dordogne", "Dordogne", "24"),
@@ -121,7 +121,7 @@ object Area {
Area("Tarn", "Tarn", "81"),
Area("Tarn-et-Garonne", "Tarn-et-Garonne", "82"),
Area("Territoire de Belfort", "Territoire de Belfort", "90"),
- Area("argenteuil", "Val-d'Oise", "95"),
+ Area("argenteuil", "Val-d’Oise", "95"),
Area("val-de-marne", "Val-de-Marne", "94"),
Area("var", "Var", "83"),
Area("vaucluse", "Vaucluse", "84"),
diff --git a/app/views/deploymentDashboard.scala.html b/app/views/deploymentDashboard.scala.html
index 8c86f4f15..de1596b32 100644
--- a/app/views/deploymentDashboard.scala.html
+++ b/app/views/deploymentDashboard.scala.html
@@ -34,12 +34,19 @@
Nombre d'agents instructeurs par organisation
},
}
{
- area: "TOTAUX (de structure)",
+ area: "Couverture",
@for((organisations, count) <- organisationSetToCountOfCounts) {
- @{organisations.map(_.id.toString).mkString} : @count,
+ @{organisations.map(_.id.toString).mkString} : "@count",
}
- total: ""
- }
+ total: "",
+ },
+ {
+ area: "Avancement",
+ @for((organisations, count) <- organisationSetToCountOfCounts) {
+ @{organisations.map(_.id.toString).mkString} : "@(math.round(count*1000/data.length).toFloat/10) %",
+ }
+ total: "",
+ },
]
var columns = [
@@ -53,7 +60,7 @@ Nombre d'agents instructeurs par organisation
headerVertical:true,
formatter: function(cell, formatterParams, onRendered) {
var value = cell.getValue();
- if (cell._cell.row.data.area == "TOTAUX (de structure)") {
+ if (cell._cell.row.data.area == "Couverture") {
if (value < 1) {
cell._cell.element.classList.add("mdl-color--red");
} else if (value <= 4) {
@@ -63,34 +70,40 @@ Nombre d'agents instructeurs par organisation
} else {
cell._cell.element.classList.add("mdl-color--dark-green");
}
+ value = value + ' / @data.length';
return value;
}
- if (value < 1) {
- cell._cell.element.classList.add("mdl-color--red");
- } else if (value >= 2) {
- cell._cell.element.classList.add("mdl-color--green");
- } else {
- cell._cell.element.classList.add("mdl-color--yellow");
+ if (cell._cell.row.data.area !== "Avancement") {
+ if (value < 1) {
+ cell._cell.element.classList.add("mdl-color--red");
+ } else if (value >= 2) {
+ cell._cell.element.classList.add("mdl-color--green");
+ } else {
+ cell._cell.element.classList.add("mdl-color--yellow");
+ }
}
return value;
}
},
},
{
- title: "TOTAUX (de structure)",
+ title: "Couverture",
field: "total",
sorter: "number",
headerVertical: true,
formatter: function(cell, formatterParams, onRendered) {
var value = cell.getValue();
- if (value < 1) {
- cell._cell.element.classList.add("mdl-color--red");
- } else if (value <= 4) {
- cell._cell.element.classList.add("mdl-color--light-green");
- } else if (value <= 7){
- cell._cell.element.classList.add("mdl-color--medium-green");
- } else {
- cell._cell.element.classList.add("mdl-color--dark-green");
+ if (value !== '') {
+ if (value < 1) {
+ cell._cell.element.classList.add("mdl-color--red");
+ } else if (value <= 4) {
+ cell._cell.element.classList.add("mdl-color--light-green");
+ } else if (value <= 7){
+ cell._cell.element.classList.add("mdl-color--medium-green");
+ } else {
+ cell._cell.element.classList.add("mdl-color--dark-green");
+ }
+ value = value + ' / @data.head._2.length';
}
return value;
}