mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
AbgabetoolAssistenz download latest uploaded file action button; UX changes Projektarbeit Tab Stv; fix stv form input bug after invalidation for selects;
This commit is contained in:
@@ -847,9 +847,10 @@ class Abgabe extends FHCAPI_Controller
|
||||
private function getProjektbetreuerEmailByProjektarbeitID($projektarbeit_id) {
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
$result = $this->ProjektarbeitModel->getProjektbetreuerEmail($projektarbeit_id);
|
||||
$email = $this->getDataOrTerminateWithError($result, 'general');
|
||||
|
||||
return $email[0]->uid ? $email[0]->uid.'@'.DOMAIN : $email[0]->private_email;
|
||||
if(count($result->retval) > 0) {
|
||||
$email = getData($result);
|
||||
return $email[0]->uid ? $email[0]->uid.'@'.DOMAIN : $email[0]->private_email;
|
||||
} else return '';
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -675,8 +675,20 @@ export const AbgabetoolAssistenz = {
|
||||
createButton('fa fa-timeline', 'abgabetool/c4termineTimeLine', () => this.openTimeline(val))
|
||||
);
|
||||
|
||||
if(val.latestTerminWithUpload) {
|
||||
actionButtons.append(
|
||||
createButton('fa fa-download', 'abgabetool/c4downloadLatestAbgabe', () => this.downloadAbgabe(val.latestTerminWithUpload.paabgabe_id, val.student_uid, val.projektarbeit_id))
|
||||
)
|
||||
}
|
||||
|
||||
return actionButtons;
|
||||
},
|
||||
downloadAbgabe(paabgabe_id, student_uid, projektarbeit_id) {
|
||||
const url = `/api/frontend/v1/Abgabe/getStudentProjektarbeitAbgabeFile?paabgabe_id=${paabgabe_id}&student_uid=${student_uid}&projektarbeit_id=${projektarbeit_id}`;
|
||||
|
||||
window.open(FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + url)
|
||||
// this.$api.call(ApiAbgabe.getStudentProjektarbeitAbgabeFile(termin.paabgabe_id, this.projektarbeit.student_uid))
|
||||
},
|
||||
|
||||
undoSelection(cell) {
|
||||
// checks if cells row is selected and unselects -> imitates columns which dont trigger row selection
|
||||
@@ -780,6 +792,8 @@ export const AbgabetoolAssistenz = {
|
||||
// TODO: mehrsprachig englisch
|
||||
projekt.note_bez = opt.bezeichnung
|
||||
}
|
||||
|
||||
const latestTerminWithUpload = this.findLatestTerminWithUpload(projekt)
|
||||
|
||||
return {
|
||||
...projekt,
|
||||
@@ -787,6 +801,7 @@ export const AbgabetoolAssistenz = {
|
||||
details: {
|
||||
student_uid: projekt.student_uid,
|
||||
projektarbeit_id: projekt.projektarbeit_id,
|
||||
latestTerminWithUpload: latestTerminWithUpload ?? null
|
||||
},
|
||||
pkz: this.buildPKZ(projekt),
|
||||
beurteilung: projekt.beurteilungLink ?? null,
|
||||
@@ -800,6 +815,15 @@ export const AbgabetoolAssistenz = {
|
||||
}
|
||||
})
|
||||
},
|
||||
findLatestTerminWithUpload(projekt) {
|
||||
const withAbgabedatumSorted = projekt?.abgabetermine?.filter(t => t.abgabedatum != null)?.sort((a,b) => a < b)
|
||||
|
||||
if(withAbgabedatumSorted.length) {
|
||||
return withAbgabedatumSorted[0]
|
||||
}
|
||||
|
||||
return null
|
||||
},
|
||||
createInfoString(data) {
|
||||
let str = '';
|
||||
|
||||
@@ -1413,9 +1437,12 @@ export const AbgabetoolAssistenz = {
|
||||
|
||||
<div id="abgabetable" style="max-height:40vw;">
|
||||
<div class="row">
|
||||
<div class="col-auto">
|
||||
<div class="col-auto me-auto">
|
||||
<h2 tabindex="1">{{$p.t('abgabetool/abgabetoolTitle')}}</h2>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label class="col-form-label">{{$capitalize($p.t('lehre/studiengang'))}}:</label>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<Dropdown
|
||||
:placeholder="$capitalize($p.t('lehre/studiengang'))"
|
||||
@@ -1430,6 +1457,9 @@ export const AbgabetoolAssistenz = {
|
||||
</template>
|
||||
</Dropdown>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label class="col-form-label">{{$capitalize($p.t('lehre/note'))}}:</label>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<Dropdown
|
||||
:placeholder="$p.t('lehre/note')"
|
||||
|
||||
@@ -667,8 +667,10 @@ export const AbgabetoolMitarbeiter = {
|
||||
setDetailComponent(details){
|
||||
this.loading=true
|
||||
|
||||
const pa = this.projektarbeiten?.retval?.find(projekarbeit => projekarbeit.projektarbeit_id == details.projektarbeit_id)
|
||||
const projektarbeiten = this.projektarbeiten?.retval ?? this.projektarbeiten
|
||||
|
||||
const pa = projektarbeiten.find(projekarbeit => projekarbeit.projektarbeit_id == details.projektarbeit_id)
|
||||
|
||||
let paIsBenotet = false
|
||||
if(pa.note !== undefined && pa.note !== null) {
|
||||
// check if the note is not defined as a non final projektarbeit note
|
||||
|
||||
@@ -170,6 +170,7 @@ export default {
|
||||
return this.$attrs.modelValue;
|
||||
},
|
||||
set(v) {
|
||||
this.clearValidationForThisName()
|
||||
if (!this.$attrs.hasOwnProperty('modelValue'))
|
||||
this.modelValueDummy = v;
|
||||
this.$emit('update:modelValue', v);
|
||||
@@ -242,9 +243,9 @@ export default {
|
||||
template: `
|
||||
<component :is="!hasContainer ? 'FhcFragment' : 'div'" class="position-relative" :class="autoContainerClass">
|
||||
<label v-if="label && lcType != 'radio' && lcType != 'checkbox'" :class="!noAutoClass && 'form-label'" :for="idCmp">{{label}}</label>
|
||||
<input v-if="tag == 'input'" :type="lcType" ref="input" v-model="modelValueCmp" v-bind="$attrs" :id="idCmp" :name="name" :class="validationClass" :modelValue="undefined" @input="clearValidationForThisName(); $emit('input', $event)">
|
||||
<textarea v-else-if="tag == 'textarea'" ref="input" v-model="modelValueCmp" v-bind="$attrs" :id="idCmp" :name="name" :class="validationClass" :modelValue="undefined" @input="clearValidationForThisName(); $emit('input', $event)"></textarea>
|
||||
<select v-else-if="tag == 'select'" ref="input" v-model="modelValueCmp" v-bind="$attrs" :id="idCmp" :name="name" :class="validationClass" :modelValue="undefined" @input="clearValidationForThisName(); $emit('input', $event)">
|
||||
<input v-if="tag == 'input'" :type="lcType" ref="input" v-model="modelValueCmp" v-bind="$attrs" :id="idCmp" :name="name" :class="validationClass" :modelValue="undefined" @input="$emit('input', $event)">
|
||||
<textarea v-else-if="tag == 'textarea'" ref="input" v-model="modelValueCmp" v-bind="$attrs" :id="idCmp" :name="name" :class="validationClass" :modelValue="undefined" @input="$emit('input', $event)"></textarea>
|
||||
<select v-else-if="tag == 'select'" ref="input" v-model="modelValueCmp" v-bind="$attrs" :id="idCmp" :name="name" :class="validationClass" :modelValue="undefined" @input="$emit('input', $event)">
|
||||
<slot></slot>
|
||||
</select>
|
||||
<component
|
||||
|
||||
@@ -14,6 +14,9 @@ export default {
|
||||
inject: {
|
||||
defaultSemester: {
|
||||
from: 'defaultSemester'
|
||||
},
|
||||
currentSemester: {
|
||||
from: 'currentSemester'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -95,8 +98,9 @@ export default {
|
||||
this.formData.themenbereich = null;
|
||||
this.formData.projekttyp_kurzbz = null;
|
||||
this.formData.firma = null;
|
||||
this.formData.lehrveranstaltung_id = null;
|
||||
this.formData.lehreinheit_id = null;
|
||||
// dont reset these form fields for UX reasons
|
||||
// this.formData.lehrveranstaltung_id = null;
|
||||
// this.formData.lehreinheit_id = null;
|
||||
this.formData.beginn = null;
|
||||
this.formData.ende = null;
|
||||
this.formData.freigegeben = true;
|
||||
@@ -109,7 +113,7 @@ export default {
|
||||
getFormData(newProjektarbeit, studiensemester_kurzbz, additional_lehrveranstaltung_id) {
|
||||
|
||||
this.additional_lehrveranstaltung_id = additional_lehrveranstaltung_id;
|
||||
this.studiensemester = studiensemester_kurzbz || this.defaultSemester;
|
||||
this.studiensemester = studiensemester_kurzbz || this.currentSemester;
|
||||
this.newProjektarbeit = newProjektarbeit;
|
||||
|
||||
this.$api
|
||||
|
||||
@@ -121,7 +121,6 @@ export default {
|
||||
height: 'auto',
|
||||
minHeight: '100',
|
||||
selectable: true,
|
||||
selectable: 1,
|
||||
index: 'betreuer_id',
|
||||
persistence:{
|
||||
columns: true, //persist column layout
|
||||
|
||||
@@ -45173,6 +45173,46 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4downloadLatestAbgabe',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Zuletzt getätigte Abgabe herunterladen",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Download latest uploaded File',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4termineTimeLine',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Zeitstrahl Termine',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Timeline Deadlines',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
|
||||
Reference in New Issue
Block a user