Skip to content

Commit

Permalink
fix: equality message on indicator2and3 (#2066)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonat75 authored Jan 25, 2024
1 parent c0968c6 commit 8bd8e25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const Indicateur2et3Note = ({ computed, isValid, simple, noBorder, detail
let advantageText = "";

if (computed) {
if (computed.favorablePopulation === "equality") advantageText += "Les femmes et les hommes sont à parité";
if (computed.favorablePopulation === "equality" || computed.result === 0)
advantageText += "Les femmes et les hommes sont à parité";
else {
advantageText += "Un écart d'augmentations ";
advantageText += `est en faveur des ${computed.favorablePopulation === "women" ? "femmes" : "hommes"}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ export class IndicateurDeuxTroisComputer extends AbstractComputer<RaisedCount, A
const result = Math.round(Math.abs(rawGap * 100) * 10) / 10;

let ifadvantage: AdditionalOutput["ifadvantage"] = "equality";
if (equivalentEmployeeCountGapRaw >= 0.0005 && this.input.menCount >= this.input.womenCount) {
if (result === 0) ifadvantage = "equality";
else if (equivalentEmployeeCountGapRaw >= 0.0005 && this.input.menCount >= this.input.womenCount) {
ifadvantage = "men-women";
} else if (equivalentEmployeeCountGapRaw >= 0.0005 && this.input.menCount < this.input.womenCount) {
ifadvantage = "men-men";
Expand Down

0 comments on commit 8bd8e25

Please sign in to comment.