mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
legacy cis abgabetool routes; abgabetool.css for legacy cis; endupload & fixtermin logic enabled; paabgabe template rearranged; legacy view, controller has cis4 switch; viewData & router props workaround with CI3 router logic; wrapper app legacy cis; fix enduplaod validation;
This commit is contained in:
@@ -844,7 +844,7 @@ html {
|
||||
|
||||
#cis-main .modal-header{
|
||||
background-color: var(--fhc-primary);
|
||||
color: var(--fhc-light);
|
||||
color: var(--fhc-white-50);
|
||||
}
|
||||
|
||||
#cis-main .modal-header .btn-close{
|
||||
|
||||
@@ -138,3 +138,22 @@
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.12);
|
||||
}
|
||||
|
||||
#abgabetoolroot .modal-header{
|
||||
background-color: var(--fhc-blue-primary);
|
||||
color: var(--fhc-white-50);
|
||||
}
|
||||
|
||||
#abgabetoolroot .modal-header .btn-close{
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
#abgabetoolroot .modal-footer {
|
||||
background-color: var(--fhc-white-20);
|
||||
|
||||
}
|
||||
|
||||
.bordered-modal {
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
import PluginsPhrasen from '../../plugins/Phrasen.js';
|
||||
import AbgabetoolStudent from "../../components/Cis/Abgabetool/AbgabetoolStudent.js";
|
||||
import AbgabetoolMitarbeiter from "../../components/Cis/Abgabetool/AbgabetoolMitarbeiter.js";
|
||||
import DeadlineOverview from "../../components/Cis/Abgabetool/DeadlineOverview.js";
|
||||
|
||||
const app = Vue.createApp({
|
||||
name: 'AbgabetoolApp',
|
||||
components: {
|
||||
AbgabetoolStudent,
|
||||
AbgabetoolMitarbeiter,
|
||||
DeadlineOverview
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
comp: null,
|
||||
uid: null,
|
||||
student_uid: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
computed: {
|
||||
viewData() {
|
||||
return { uid: this.uid}
|
||||
},
|
||||
student_uid_computed() {
|
||||
return this.student_uid ?? null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
|
||||
const root = document.getElementById('abgabetoolroot')
|
||||
const route = root.getAttribute("route");
|
||||
this.comp = route
|
||||
|
||||
const uid = root.getAttribute("uid");
|
||||
this.uid = uid
|
||||
|
||||
const student_uid = root.getAttribute("student_uid_prop");
|
||||
this.student_uid = student_uid
|
||||
|
||||
},
|
||||
template: `
|
||||
<template v-if="comp && uid">
|
||||
<AbgabetoolStudent v-if="comp == 'AbgabetoolStudent'" :viewData="viewData" :student_uid_prop="student_uid_computed"></AbgabetoolStudent>
|
||||
<AbgabetoolMitarbeiter v-if="comp == 'AbgabetoolMitarbeiter'" :viewData="viewData"></AbgabetoolMitarbeiter>
|
||||
<DeadlineOverview v-if="comp == 'DeadlinesOverview'" :viewData="viewData"></DeadlineOverview>
|
||||
</template>
|
||||
`
|
||||
});
|
||||
app.use(primevue.config.default, {
|
||||
zIndex: {
|
||||
overlay: 9000,
|
||||
tooltip: 8000
|
||||
}
|
||||
})
|
||||
app.use(PluginsPhrasen);
|
||||
app.mount('#abgabetoolroot');
|
||||
@@ -251,16 +251,7 @@ export const AbgabeMitarbeiterDetail = {
|
||||
|
||||
return true
|
||||
},
|
||||
async handleSaveNewAbgabe(termin) {
|
||||
|
||||
if(!this.validateTermin(termin)) {
|
||||
this.$fhcAlert.alertWarning('invalid termin')
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
await this.saveTermin(termin)
|
||||
|
||||
handleModalClose() {
|
||||
// determined inside saveTermin api.then()
|
||||
if(this.showAutomagicModalPhrase) {
|
||||
this.$refs.modalContainerCreateNewAbgabe.show()
|
||||
@@ -280,7 +271,20 @@ export const AbgabeMitarbeiterDetail = {
|
||||
'abgabedatum': null,
|
||||
'insertvon': this.viewData?.uid ?? ''
|
||||
}
|
||||
}
|
||||
},
|
||||
async handleSaveNewAbgabe(termin) {
|
||||
|
||||
if(!this.validateTermin(termin)) {
|
||||
this.$fhcAlert.alertWarning('invalid termin')
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
await this.saveTermin(termin)
|
||||
|
||||
this.handleModalClose()
|
||||
|
||||
},
|
||||
handleChangeAbgabetyp(termin) {
|
||||
// if paabgabetype qualgate is selected, fill out kurzbz textfield with bezeichnung of quality gate so users
|
||||
@@ -321,6 +325,15 @@ export const AbgabeMitarbeiterDetail = {
|
||||
return 'position: static !important;'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'newTermin.bezeichnung'(newVal) {
|
||||
console.log('\'newTermin.bezeichnung\' watcher', newVal)
|
||||
|
||||
if(newVal?.paabgabetyp_kurzbz === 'qualgate1' || newVal?.paabgabetyp_kurzbz === 'qualgate2') {
|
||||
this.newTermin.kurzbz = newVal.bezeichnung
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
@@ -344,7 +357,7 @@ export const AbgabeMitarbeiterDetail = {
|
||||
<template v-slot:default>
|
||||
<div v-if="showAutomagicModalPhrase" class="text-center"><p>{{$p.t('abgabetool/c4abgabeQualGateNegativAddNewAutomagisch')}}</p></div>
|
||||
<!-- minheight to avoid z-index magic for the datepicker inside the modal inside the modal...-->
|
||||
<div v-if="newTermin" style="min-height: 600px">
|
||||
<div v-if="newTermin">
|
||||
<!-- fixtermin is not an option for lektors-->
|
||||
<!-- <div class="row">-->
|
||||
<!-- <div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4fixtermin')}}</div>-->
|
||||
@@ -376,24 +389,12 @@ export const AbgabeMitarbeiterDetail = {
|
||||
<Dropdown
|
||||
:style="{'width': '100%'}"
|
||||
v-model="newTermin.bezeichnung"
|
||||
@change="handleChangeAbgabetyp(newTermin)"
|
||||
:options="abgabeTypeOptions"
|
||||
:optionLabel="getOptionLabelAbgabetyp"
|
||||
scrollHeight="300px">
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2" v-if="newTermin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || newTermin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4note')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Dropdown
|
||||
:style="{'width': '100%'}"
|
||||
v-model="newTermin.note"
|
||||
:options="allowedNotenOptions"
|
||||
:optionLabel="getNotenOptionLabel">
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2" v-if="newTermin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || newTermin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4upload_allowed')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
@@ -405,16 +406,10 @@ export const AbgabeMitarbeiterDetail = {
|
||||
</Checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2" v-if="newTermin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || newTermin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4notizQualGate')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="newTermin.beurteilungsnotiz" :rows=" isMobile ? 2 : 4" :cols=" isMobile ? 30 : 90"></Textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4abgabekurzbz')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="newTermin.kurzbz" :rows=" isMobile ? 2 : 4" :cols=" isMobile ? 30 : 90"></Textarea>
|
||||
<Textarea style="margin-bottom: 4px;" v-model="newTermin.kurzbz" rows="1" :cols=" isMobile ? 30 : 90"></Textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -453,7 +448,7 @@ export const AbgabeMitarbeiterDetail = {
|
||||
<AccordionTab :header="getAccTabHeaderForTermin(termin)" :headerClass="getDateStyle(termin)">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4fixtermin')}}</div>
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4fixterminv2')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<!-- always keep fixtermin checkbox disabled for mitarbeiter tool -->
|
||||
<Checkbox
|
||||
@@ -492,17 +487,6 @@ export const AbgabeMitarbeiterDetail = {
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2" v-if="termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4note')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Dropdown
|
||||
:style="{'width': '100%'}"
|
||||
v-model="termin.note"
|
||||
:options="allowedNotenOptions"
|
||||
:optionLabel="getNotenOptionLabel">
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2" v-if="termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4upload_allowed')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
@@ -515,15 +499,27 @@ export const AbgabeMitarbeiterDetail = {
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2" v-if="termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4notizQualGate')}}</div>
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4note')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="termin.beurteilungsnotiz" :rows=" isMobile ? 2 : 4" :cols=" isMobile ? 30 : 90" :disabled="!termin.allowedToSave"></Textarea>
|
||||
<Dropdown
|
||||
:style="{'width': '100%'}"
|
||||
v-model="termin.note"
|
||||
:options="allowedNotenOptions"
|
||||
:optionLabel="getNotenOptionLabel">
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2" v-if="termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4notizQualGatev2')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="termin.beurteilungsnotiz" rows="1" :cols=" isMobile ? 30 : 90" :disabled="!termin.allowedToSave"></Textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4abgabekurzbz')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="termin.kurzbz" :rows=" isMobile ? 2 : 4" :cols=" isMobile ? 30 : 90" :disabled="!termin.allowedToSave"></Textarea>
|
||||
<Textarea style="margin-bottom: 4px;" v-model="termin.kurzbz" rows="1" :cols=" isMobile ? 30 : 90" :disabled="!termin.allowedToSave"></Textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
|
||||
@@ -110,7 +110,7 @@ export const AbgabeStudentDetail = {
|
||||
},
|
||||
async triggerEndupload() {
|
||||
|
||||
if (!await this.validate(this.enduploadTermin))
|
||||
if (!await this.validate(this.enduploadTermin, true))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -192,13 +192,13 @@ export const AbgabeStudentDetail = {
|
||||
},
|
||||
handleUploadRes(res, termin) {
|
||||
if(res.meta.status == "success") {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('abgabetool/c4fileUploadSuccess'))
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('abgabetool/c4fileUploadSuccessv3'))
|
||||
|
||||
// update 'abgabedatum' for successful upload -> shows the pdf icon and date once set
|
||||
termin.abgabedatum = new Date().toISOString().split('T')[0];
|
||||
|
||||
} else {
|
||||
this.$fhcAlert.alertError(this.$p.t('abgabetool/c4fileUploadError'))
|
||||
this.$fhcAlert.alertError(this.$p.t('abgabetool/c4fileUploadErrorv3'))
|
||||
}
|
||||
|
||||
if(res.meta.signaturInfo) {
|
||||
@@ -303,7 +303,7 @@ export const AbgabeStudentDetail = {
|
||||
<template v-for="termin in this.projektarbeit?.abgabetermine">
|
||||
<AccordionTab :header="getAccTabHeaderForTermin(termin)" :headerClass="getDateStyle(termin)">
|
||||
<div class="row">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4fixtermin')}}</div>
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4fixterminv2')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Checkbox
|
||||
disabled
|
||||
@@ -349,10 +349,17 @@ export const AbgabeStudentDetail = {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2" v-if="termin.paabgabetyp_kurzbz === 'qualgate1' || termin.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4notizQualGatev2')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="termin.beurteilungsnotiz" rows="1" :cols=" isMobile ? 30 : 90" disabled></Textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="termin.kurzbz && termin.kurzbz.length > 0" class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4abgabekurzbz')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="termin.kurzbz" :rows=" isMobile ? 2 : 4" :cols=" isMobile ? 25 : 90" :disabled="true"></Textarea>
|
||||
<Textarea style="margin-bottom: 4px;" v-model="termin.kurzbz" rows="1" :cols=" isMobile ? 25 : 90" :disabled="true"></Textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@ export const AbgabetoolMitarbeiter = {
|
||||
</Dropdown>
|
||||
</div>
|
||||
<div class="col-6 d-flex justify-content-center align-items-center">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="serienTermin.kurzbz" rows="3" cols="40"></Textarea>
|
||||
<Textarea style="margin-bottom: 4px;" v-model="serienTermin.kurzbz" rows="1" cols="40"></Textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -72,11 +72,13 @@ export const AbgabetoolStudent = {
|
||||
termin.allowedToUpload = false
|
||||
// termin.datum = '2025-10-16'
|
||||
// TODO: fixtermin logic?
|
||||
if(termin.paabgabetyp_kurzbz == 'enda') {
|
||||
if(termin.paabgabetyp_kurzbz == 'end') {
|
||||
|
||||
termin.allowedToUpload = !this.isPastDate(termin.datum) && this.checkQualityGates(pa.abgabetermine)
|
||||
} else if(termin.paabgabetyp_kurzbz == 'qualgate1' || termin.paabgabetyp_kurzbz == 'qualgate2') {
|
||||
termin.allowedToUpload = termin.upload_allowed
|
||||
} else if(termin.fixtermin) {
|
||||
termin.allowedToUpload = !this.isPastDate(termin.datum)
|
||||
} else {
|
||||
termin.allowedToUpload = true
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ export const DeadlineOverview = {
|
||||
placeholder: this.$p.t('global/noDataAvailable'),
|
||||
columns: [
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4zieldatum')), field: 'datum', formatter: this.centeredTextFormatter, widthGrow: 1, tooltip: false},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4fixtermin')), field: 'fixterminstring', formatter: this.centeredTextFormatter, widthGrow: 1, tooltip: false},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4fixterminv2')), field: 'fixterminstring', formatter: this.centeredTextFormatter, widthGrow: 1, tooltip: false},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4abgabetyp')), field: 'typ_bezeichnung', formatter: this.centeredTextFormatter, widthGrow: 1},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4abgabekurzbz')), field: 'kurzbz', formatter: this.centeredTextFormatter, widthGrow: 3},
|
||||
{title: Vue.computed(() => this.$p.t('person/studentIn')), field: 'student', formatter: this.centeredTextFormatter, widthGrow: 2},
|
||||
|
||||
Reference in New Issue
Block a user