feat: create cashbox removal notifications

This commit is contained in:
Sérgio Salgado 2021-05-20 14:40:38 +01:00 committed by Josh Harvey
parent 73bd11b38b
commit 598135ccaf
6 changed files with 92 additions and 4 deletions

View file

@ -9,7 +9,8 @@ const {
LOW_CRYPTO_BALANCE,
HIGH_CRYPTO_BALANCE,
CASH_BOX_FULL,
LOW_CASH_OUT
LOW_CASH_OUT,
SECURITY
} = require('./codes')
function alertSubject (alertRec, config) {
@ -79,6 +80,8 @@ function emailAlert (alert) {
return `Cash box full on ${alert.machineName} [${alert.notes} banknotes]`
case LOW_CASH_OUT:
return `Cassette for ${alert.denomination} ${alert.fiatCode} low [${alert.notes} banknotes]`
case SECURITY:
return `Cashbox removed on ${alert.machineName}`
}
}