Skip to content

Commit

Permalink
Evarisk#3856 [RiskAssessment] fix: update environmental risk cotations
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-micka committed Apr 26, 2024
1 parent ee3c313 commit 893c65e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion js/digiriskdolibarr.min.js

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions js/modules/riskAssessment.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ window.digiriskdolibarr.evaluation.createEvaluation = function ( event ) {
date: date,
riskId: riskToAssign,
criteres: {
gravite: criteres['gravite'] ? criteres['gravite'] : 0,
occurrence: criteres['occurrence'] ? criteres['occurrence'] : 0,
protection: criteres['protection'] ? criteres['protection'] : 0,
formation: criteres['formation'] ? criteres['formation'] : 0,
exposition: criteres['exposition'] ? criteres['exposition'] : 0
gravite: criteres['gravite'] ? criteres['gravite'] : 0,
occurrence: criteres['occurrence'] ? criteres['occurrence'] : (criteres['frequence'] ? criteres['frequence'] : 0),
protection: criteres['protection'] ? criteres['protection'] : (criteres['historique'] ? criteres['historique'] : 0),
formation: criteres['formation'] ? criteres['formation'] : (criteres['maitrise'] ? criteres['maitrise'] : 0),
exposition: criteres['exposition'] ? criteres['exposition'] : (criteres['milieu'] ? criteres['milieu'] : 0)
}
}),
processData: false,
Expand Down Expand Up @@ -341,10 +341,10 @@ window.digiriskdolibarr.evaluation.saveEvaluation = function ( event ) {
evaluationID: evaluationID,
criteres: {
gravite: criteres['gravite'] ? criteres['gravite'] : 0,
occurrence: criteres['occurrence'] ? criteres['occurrence'] : 0,
protection: criteres['protection'] ? criteres['protection'] : 0,
formation: criteres['formation'] ? criteres['formation'] : 0,
exposition: criteres['exposition'] ? criteres['exposition'] : 0
occurrence: criteres['occurrence'] ? criteres['occurrence'] : (criteres['frequence'] ? criteres['frequence'] : 0),
protection: criteres['protection'] ? criteres['protection'] : (criteres['historique'] ? criteres['historique'] : 0),
formation: criteres['formation'] ? criteres['formation'] : (criteres['maitrise'] ? criteres['maitrise'] : 0),
exposition: criteres['exposition'] ? criteres['exposition'] : (criteres['milieu'] ? criteres['milieu'] : 0)
}
}),
contentType: false,
Expand Down

0 comments on commit 893c65e

Please sign in to comment.