Merge pull request #1332 from gradido/1325-creation-confirm-text-falsy

Changed the toasted message for successful creating a creation.
This commit is contained in:
Hannes Heine 2022-01-22 13:04:16 +01:00 committed by GitHub
commit b7b018f811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 6 deletions

View File

@ -12,6 +12,9 @@
"select_value": "Betrag auswählen", "select_value": "Betrag auswählen",
"submit_creation": "Schöpfung einreichen", "submit_creation": "Schöpfung einreichen",
"toasted": "Offene Schöpfung ({value} GDD) für {email} wurde gespeichert und liegt zur Bestätigung bereit", "toasted": "Offene Schöpfung ({value} GDD) für {email} wurde gespeichert und liegt zur Bestätigung bereit",
"toasted_created": "Schöpfung wurde erfolgreich gespeichert",
"toasted_default": "`Fall {event} wird nicht unterstützt`",
"toasted_delete": "Offene Schöpfung wurde gelöscht",
"toasted_update": "`Offene Schöpfung {value} GDD) für {email} wurde geändert und liegt zur Bestätigung bereit", "toasted_update": "`Offene Schöpfung {value} GDD) für {email} wurde geändert und liegt zur Bestätigung bereit",
"update_creation": "Schöpfung aktualisieren" "update_creation": "Schöpfung aktualisieren"
}, },

View File

@ -12,6 +12,9 @@
"select_value": "Select amount", "select_value": "Select amount",
"submit_creation": "Submit creation", "submit_creation": "Submit creation",
"toasted": "Open creation ({value} GDD) for {email} has been saved and is ready for confirmation.", "toasted": "Open creation ({value} GDD) for {email} has been saved and is ready for confirmation.",
"toasted_created": "Creation has been successfully saved",
"toasted_default": "`Case {event} is not supported`",
"toasted_delete": "Open creation has been deleted",
"toasted_update": "Open creation {value} GDD) for {email} has been changed and is ready for confirmation.", "toasted_update": "Open creation {value} GDD) for {email} has been changed and is ready for confirmation.",
"update_creation": "Creation update" "update_creation": "Creation update"
}, },

View File

@ -127,7 +127,7 @@ describe('CreationConfirm', () => {
}) })
it('toasts a success message', () => { it('toasts a success message', () => {
expect(toastedSuccessMock).toBeCalledWith('Pending Creation has been deleted') expect(toastedSuccessMock).toBeCalledWith('creation_form.toasted_delete')
}) })
}) })
@ -189,7 +189,7 @@ describe('CreationConfirm', () => {
}) })
it('toasts a success message', () => { it('toasts a success message', () => {
expect(toastedSuccessMock).toBeCalledWith('Pending Creation has been deleted') expect(toastedSuccessMock).toBeCalledWith('creation_form.toasted_created')
}) })
}) })
@ -201,7 +201,7 @@ describe('CreationConfirm', () => {
}) })
it('toasts an error message', () => { it('toasts an error message', () => {
expect(toastedErrorMock).toBeCalledWith('Case confirm is not supported') expect(toastedErrorMock).toBeCalledWith('creation_form.toasted_default')
}) })
}) })

View File

@ -66,7 +66,7 @@ export default {
index = this.confirmResult.indexOf(findArr) index = this.confirmResult.indexOf(findArr)
this.confirmResult.splice(index, 1) this.confirmResult.splice(index, 1)
this.$store.commit('openCreationsMinus', 1) this.$store.commit('openCreationsMinus', 1)
this.$toasted.success('Pending Creation has been deleted') this.$toasted.success(this.$t('creation_form.toasted_delete'))
}) })
.catch((error) => { .catch((error) => {
this.$toasted.error(error.message) this.$toasted.error(error.message)
@ -75,10 +75,10 @@ export default {
case 'confirmed': case 'confirmed':
this.confirmResult.splice(index, 1) this.confirmResult.splice(index, 1)
this.$store.commit('openCreationsMinus', 1) this.$store.commit('openCreationsMinus', 1)
this.$toasted.success('Pending Creation has been deleted') this.$toasted.success(this.$t('creation_form.toasted_created'))
break break
default: default:
this.$toasted.error('Case ' + event + ' is not supported') this.$toasted.error(this.$t('creation_form.toasted_default', { event }))
} }
}, },
getPendingCreations() { getPendingCreations() {