mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-04 04:19:28 +00:00
add uids to success and error alerts
This commit is contained in:
+30
-13
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
)
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user