♻️ (notif) add queue notif service to lazy load notif lib
This commit is contained in:
@@ -240,7 +240,7 @@ import accountService from '@/services/AccountService'
|
||||
import exchangeService from '@/services/ExchangeService'
|
||||
import transactionService from '@/services/TransactionService'
|
||||
import formatDate from '@/utils/format-date'
|
||||
import notif from '@/utils/notif'
|
||||
import queueNotifService from '@/services/QueueNotifService'
|
||||
import { money } from '@/utils/filters'
|
||||
import { confirmation, alertMessage, findContrastColor } from '@/utils'
|
||||
import ILocation from '@/models/ILocation'
|
||||
@@ -437,21 +437,21 @@ export default class TransactionCreate extends Vue {
|
||||
(!this.currency && !this.date && this.payFor.length === 0)
|
||||
) {
|
||||
if (this.amount === 0) {
|
||||
notif.error('Le montant doit être supérieur à 0.')
|
||||
queueNotifService.error('Le montant doit être supérieur à 0.')
|
||||
} else {
|
||||
notif.error('Tous les champs sont requis.')
|
||||
queueNotifService.error('Tous les champs sont requis.')
|
||||
}
|
||||
return false
|
||||
}
|
||||
if (isNaN(this.amount) || this.amount > this.maxAmount) {
|
||||
const maxAmount = money(this.maxAmount, this.currency)
|
||||
notif.error(
|
||||
queueNotifService.error(
|
||||
`Veuillez saisir un montant numérique inférieur à ${maxAmount}.`
|
||||
)
|
||||
return false
|
||||
}
|
||||
if (this.amount < 0) {
|
||||
notif.error('Le montant doit être supérieur à 0.')
|
||||
queueNotifService.error('Le montant doit être supérieur à 0.')
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user