mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Withdrew alert and replaced them with toasted error or console.log, withdrew non required props from the test files.
This commit is contained in:
parent
b8854f9365
commit
9e8e5e56ab
@ -34,7 +34,6 @@ const mocks = {
|
|||||||
|
|
||||||
const propsData = {
|
const propsData = {
|
||||||
type: '',
|
type: '',
|
||||||
item: {},
|
|
||||||
creation: [],
|
creation: [],
|
||||||
itemsMassCreation: {},
|
itemsMassCreation: {},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -197,26 +197,26 @@ export default {
|
|||||||
submitCreation() {
|
submitCreation() {
|
||||||
// Formular Prüfen ob ein Zeitraum ausgewählt wurde. Ansonsten abbrechen und Hinweis anzeigen
|
// Formular Prüfen ob ein Zeitraum ausgewählt wurde. Ansonsten abbrechen und Hinweis anzeigen
|
||||||
if (this.radioSelected === '') {
|
if (this.radioSelected === '') {
|
||||||
return alert('Bitte wähle einen Zeitraum!')
|
return this.$toasted.error('Bitte wähle einen Zeitraum!')
|
||||||
}
|
}
|
||||||
// Formular Prüfen ob der GDD Betrag grösser 0 ist. Ansonsten abbrechen und Hinweis anzeigen
|
// Formular Prüfen ob der GDD Betrag grösser 0 ist. Ansonsten abbrechen und Hinweis anzeigen
|
||||||
if (this.value === 0) {
|
if (this.value <= 0) {
|
||||||
return alert('Bitte gib einen GDD Betrag an!')
|
return this.$toasted.error('Bitte gib einen GDD Betrag an!')
|
||||||
}
|
}
|
||||||
// Formular Prüfen ob der Text vorhanden ist. Ansonsten abbrechen und Hinweis anzeigen
|
// Formular Prüfen ob der Text vorhanden ist. Ansonsten abbrechen und Hinweis anzeigen
|
||||||
if (this.text === '') {
|
if (this.text === '') {
|
||||||
return alert('Bitte gib einen Text ein!')
|
return this.$toasted.error('Bitte gib einen Text ein!')
|
||||||
}
|
}
|
||||||
// Formular Prüfen ob der Text länger als 10 Zeichen hat. Ansonsten abbrechen und Hinweis anzeigen
|
// Formular Prüfen ob der Text länger als 10 Zeichen hat. Ansonsten abbrechen und Hinweis anzeigen
|
||||||
if (this.text.length < 10) {
|
if (this.text.length < 10) {
|
||||||
return alert('Bitte gib einen Text ein der länger als 10 Zeichen ist!')
|
return this.$toasted.error('Bitte gib einen Text ein der länger als 10 Zeichen ist!')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.type === 'massCreation') {
|
if (this.type === 'massCreation') {
|
||||||
// Die anzahl der Mitglieder aus der Mehrfachschöpfung
|
// Die anzahl der Mitglieder aus der Mehrfachschöpfung
|
||||||
const i = Object.keys(this.itemsMassCreation).length
|
const i = Object.keys(this.itemsMassCreation).length
|
||||||
// hinweis das eine Mehrfachschöpfung ausgeführt wird an (Anzahl der MItgleider an die geschöpft wird)
|
// hinweis das eine Mehrfachschöpfung ausgeführt wird an (Anzahl der MItgleider an die geschöpft wird)
|
||||||
alert('SUBMIT CREATION => ' + this.type + ' >> für VIELE ' + i + ' Mitglieder')
|
console.log('SUBMIT CREATION => ' + this.type + ' >> für VIELE ' + i + ' Mitglieder')
|
||||||
this.submitObj = [
|
this.submitObj = [
|
||||||
{
|
{
|
||||||
item: this.itemsMassCreation,
|
item: this.itemsMassCreation,
|
||||||
@ -227,7 +227,7 @@ export default {
|
|||||||
moderator: this.$store.state.moderator.id,
|
moderator: this.$store.state.moderator.id,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
alert('MehrfachSCHÖPFUNG ABSENDEN FÜR >> ' + i + ' Mitglieder')
|
console.log('MehrfachSCHÖPFUNG ABSENDEN FÜR >> ' + i + ' Mitglieder')
|
||||||
|
|
||||||
// $store - offene Schöpfungen hochzählen
|
// $store - offene Schöpfungen hochzählen
|
||||||
this.$store.commit('openCreationsPlus', i)
|
this.$store.commit('openCreationsPlus', i)
|
||||||
|
|||||||
@ -45,8 +45,6 @@ const mocks = {
|
|||||||
|
|
||||||
const propsData = {
|
const propsData = {
|
||||||
type: '',
|
type: '',
|
||||||
item: {},
|
|
||||||
row: [],
|
|
||||||
creation: [],
|
creation: [],
|
||||||
itemsMassCreation: {},
|
itemsMassCreation: {},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -149,7 +149,7 @@ export default {
|
|||||||
},
|
},
|
||||||
row: {
|
row: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: Object,
|
required: false,
|
||||||
default() {
|
default() {
|
||||||
return []
|
return []
|
||||||
},
|
},
|
||||||
@ -225,19 +225,19 @@ export default {
|
|||||||
submitCreation() {
|
submitCreation() {
|
||||||
// Formular Prüfen ob ein Zeitraum ausgewählt wurde. Ansonsten abbrechen und Hinweis anzeigen
|
// Formular Prüfen ob ein Zeitraum ausgewählt wurde. Ansonsten abbrechen und Hinweis anzeigen
|
||||||
if (this.radioSelected === '') {
|
if (this.radioSelected === '') {
|
||||||
return alert('Bitte wähle einen Zeitraum!')
|
return this.$toasted.error('Bitte wähle einen Zeitraum!')
|
||||||
}
|
}
|
||||||
// Formular Prüfen ob der GDD Betrag grösser 0 ist. Ansonsten abbrechen und Hinweis anzeigen
|
// Formular Prüfen ob der GDD Betrag grösser 0 ist. Ansonsten abbrechen und Hinweis anzeigen
|
||||||
if (this.value <= 0) {
|
if (this.value <= 0) {
|
||||||
return alert('Bitte gib einen GDD Betrag an!')
|
return this.$toasted.error('Bitte gib einen GDD Betrag an!')
|
||||||
}
|
}
|
||||||
// Formular Prüfen ob der Text vorhanden ist. Ansonsten abbrechen und Hinweis anzeigen
|
// Formular Prüfen ob der Text vorhanden ist. Ansonsten abbrechen und Hinweis anzeigen
|
||||||
if (this.text === '') {
|
if (this.text === '') {
|
||||||
return alert('Bitte gib einen Text ein!')
|
return this.$toasted.error('Bitte gib einen Text ein!')
|
||||||
}
|
}
|
||||||
// Formular Prüfen ob der Text länger als 10 Zeichen hat. Ansonsten abbrechen und Hinweis anzeigen
|
// Formular Prüfen ob der Text länger als 10 Zeichen hat. Ansonsten abbrechen und Hinweis anzeigen
|
||||||
if (this.text.length < 10) {
|
if (this.text.length < 10) {
|
||||||
return alert('Bitte gib einen Text ein der länger als 10 Zeichen ist!')
|
return this.$toasted.error('Bitte gib einen Text ein der länger als 10 Zeichen ist!')
|
||||||
}
|
}
|
||||||
this.submitObj = {
|
this.submitObj = {
|
||||||
id: this.item.id,
|
id: this.item.id,
|
||||||
@ -282,16 +282,16 @@ export default {
|
|||||||
this.value = 0
|
this.value = 0
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
searchModeratorData() {
|
||||||
searchModeratorData() {
|
this.$apollo
|
||||||
this.$apollo
|
.query({ query: verifyLogin })
|
||||||
.query({ query: verifyLogin })
|
.then((result) => {
|
||||||
.then((result) => {
|
this.$store.commit('moderator', result.data.verifyLogin)
|
||||||
this.$store.commit('moderator', result.data.verifyLogin)
|
})
|
||||||
})
|
.catch(() => {
|
||||||
.catch(() => {
|
this.$store.commit('moderator', { id: 0, name: 'Test Moderator' })
|
||||||
this.$store.commit('moderator', { id: 0, name: 'Test Moderator' })
|
})
|
||||||
})
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user