@brightspace-hmc/siren-sdk
Advanced tools
Comparing version 2.50.1 to 2.50.2
{ | ||
"name": "@brightspace-hmc/siren-sdk", | ||
"version": "2.50.1", | ||
"version": "2.50.2", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -72,2 +72,22 @@ import { Actions } from '../hypermedia-constants.js'; | ||
/** | ||
* @summary Checks if evaluation entity has changed, primarily used for dirty check | ||
* @param {object} evaluation the evaluation that's being modified | ||
*/ | ||
equals(evaluation) { | ||
const diffs = [ | ||
[evaluation.allowMultiple, this.getAllowMultiple()], | ||
[evaluation.unevalAsZero, this.getUnevalAsZero()], | ||
[evaluation.calculationMethodSelection, this.getCalculationMethodSelection()], | ||
]; | ||
for (const [current, initial] of diffs) { | ||
if (current !== initial) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
async save(evaluation) { | ||
@@ -74,0 +94,0 @@ if (!evaluation) { |
362794
9983