add uids to success and error alerts

This commit is contained in:
ma0068
2026-06-29 11:16:10 +02:00
parent 90907d4276
commit 3e48401a04
2 changed files with 50 additions and 13 deletions
@@ -78,7 +78,7 @@ export default {
layout: 'fitDataStretchFrozen',
layoutColumnsOnNewData: false,
height: 'auto',
minHeight: '200',
minHeight: '200'
}
},
computed: {
@@ -437,20 +437,37 @@ export default {
},
async addNewAbschlusspruefungMulti(){
try {
for (const student of this.studentUids) {
const arraySuccessfullySent = [];
const arrayError = [];
await this.$refs.formFinalExam.call(
ApiStvAbschlusspruefung.addNewAbschlusspruefung({
uid: student,
formData: this.formData
})
);
for (const student of this.studentUids) {
try {
await this.$refs.formFinalExam.call(
ApiStvAbschlusspruefung.addNewAbschlusspruefung({
uid: student,
formData: this.formData
})
);
arraySuccessfullySent.push(student);
} catch (error) {
arrayError.push(student);
}
}
if (arraySuccessfullySent.length) {
//this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
//TODO(Manu) check if really needed in case of success
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave') + ': Uids: ' + arraySuccessfullySent.join(", "));
}
if (arrayError.length) {
this.$fhcAlert.alertError(this.$p.t('ui', 'errorSavingData') + ': Uids: ' + arrayError.join(", "));
}
if (arraySuccessfullySent.length) {
this.saveOrUpdateLocalStorage();
this.hideModal("finalexamModal");
this.resetForm();
}
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
//save formData fields in LocalStorage
this.saveOrUpdateLocalStorage();
this.hideModal('finalexamModal');
this.resetForm();
} catch (error) {
this.$fhcAlert.handleSystemError(error);
}
+20
View File
@@ -58377,6 +58377,26 @@ I have been informed that I am under no obligation to consent to the transmissio
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'errorSavingData',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Speichern der Daten nicht erfolgreich',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' =>'Data saving failed',
'description' => '',
'insertvon' => 'system'
)
)
),
);