Delete measurement
This commit is contained in:
parent
b2fa171d17
commit
c1ff0d57b4
7 changed files with 28 additions and 7 deletions
|
@ -24,5 +24,13 @@ export default Controller.extend(SaveModel, {
|
|||
});
|
||||
},
|
||||
|
||||
deleteMeasurement: function(measurement) {
|
||||
const characteristic = measurement.get('characteristic');
|
||||
if (characteristic.get('isNew')) {
|
||||
characteristic.destroyRecord();
|
||||
}
|
||||
measurement.destroyRecord();
|
||||
},
|
||||
|
||||
},
|
||||
});
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
add-characteristic=(action "addCharacteristic")
|
||||
allCharacteristics=allCharacteristics
|
||||
save-measurement=(action "saveMeasurement")
|
||||
delete-measurement=(action "deleteMeasurement")
|
||||
on-save=(action "save")
|
||||
on-cancel=(action "cancel")
|
||||
}}
|
||||
|
|
Reference in a new issue