diff --git a/public/css/Cis4/Cis.css b/public/css/Cis4/Cis.css index ff1b181dd..3056d36b6 100644 --- a/public/css/Cis4/Cis.css +++ b/public/css/Cis4/Cis.css @@ -854,4 +854,10 @@ html { #cis-main .modal-footer { background-color: var(--fhc-secondary); +} + +.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); } \ No newline at end of file diff --git a/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js b/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js index 569262fd2..6fa929dec 100644 --- a/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js +++ b/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js @@ -30,29 +30,51 @@ export const AbgabeMitarbeiterDetail = { enduploadTermin: null, allActiveLanguages: FHC_JS_DATA_STORAGE_OBJECT.server_languages, speedDialItems: [{ - label: "Create New", - icon: "pi pi-plus", - command: this.createNew + label: Vue.computed(() => this.$p.t('abgabetool/c4newAbgabetermin')), + icon: "fa fa-plus", + command: this.openCreateNewAbgabeModal + }, + { + label: Vue.computed(() => this.$p.t('abgabetool/c4benoten')), + icon: "fa fa-user-check", + command: this.openBenotung + }, + { + label: Vue.computed(() => this.$p.t('abgabetool/c4plagiatcheck_link')), + icon: "fa fa-clipboard-check", + command: this.openPlagiatcheck + }, + { + label: Vue.computed(() => this.$p.t('abgabetool/c4student_perspective')), + icon: "fa fa-eye", + command: this.openStudentPage }], newTermin: null } }, methods: { - createNew(){ - console.log('create new') - }, openZusatzdatenModal(termin) { }, saveTermin(termin) { const paabgabe_id = termin.paabgabe_id - termin.note_pk = termin.note?.note ?? null termin.betreuer_person_id = this.projektarbeit.betreuer_person_id - this.$api.call(ApiAbgabe.postProjektarbeitAbgabe(termin)).then( (res) => { + return this.$api.call(ApiAbgabe.postProjektarbeitAbgabe(termin)).then( (res) => { if(res?.meta?.status == 'success') { + this.$fhcAlert.alertSuccess(this.$p.t('ui/gespeichert')) + const newTerminRes = { + ...res.data + } + newTerminRes.bezeichnung = { + bezeichnung: termin.bezeichnung?.bezeichnung, + paabgabetyp_kurzbz: termin.bezeichnung?.paabgabetyp_kurzbz + } + + this.projektarbeit.abgabetermine.push(newTerminRes) + // if(paabgabe_id === -1) { // new abgabe has been inserted // termin.paabgabe_id = res?.data?.paabgabe_id // this.projektarbeit.abgabetermine.push({ // new abgatermin row @@ -186,21 +208,41 @@ export const AbgabeMitarbeiterDetail = { openCreateNewAbgabeModal() { if(!this.newTermin) { this.newTermin = { - // 'paabgabe_id': -1, - // 'projektarbeit_id': this.projektarbeit.projektarbeit_id, - // 'fixtermin': false, - // 'kurzbz': '', - // 'datum': new Date().toISOString().split('T')[0], - // 'note': this.allowedNotenOptions.find(opt => opt.note == 9), - // 'upload_allowed': false, - // 'paabgabetyp_kurzbz': '', - // 'bezeichnung': '', - // 'abgabedatum': null, - // 'insertvon': this.viewData?.uid ?? '' + 'paabgabe_id': -1, + 'projektarbeit_id': this.projektarbeit.projektarbeit_id, + 'fixtermin': false, + 'kurzbz': '', + 'datum': new Date().toISOString().split('T')[0], + 'note': this.allowedNotenOptions.find(opt => opt.note == 9), + 'notiz': '', + 'upload_allowed': false, + 'paabgabetyp_kurzbz': '', + 'bezeichnung': '', + 'abgabedatum': null, + 'insertvon': this.viewData?.uid ?? '' } } - + console.log(this.$refs.modalContainerCreateNewAbgabe) this.$refs.modalContainerCreateNewAbgabe.show() + }, + async handleSaveNewAbgabe(termin) { + await this.saveTermin(termin) + + this.$refs.modalContainerCreateNewAbgabe.hide() + this.newTermin = { + 'paabgabe_id': -1, + 'projektarbeit_id': this.projektarbeit.projektarbeit_id, + 'fixtermin': false, + 'kurzbz': '', + 'datum': new Date().toISOString().split('T')[0], + 'note': this.allowedNotenOptions.find(opt => opt.note == 9), + 'notiz': '', + 'upload_allowed': false, + 'paabgabetyp_kurzbz': '', + 'bezeichnung': '', + 'abgabedatum': null, + 'insertvon': this.viewData?.uid ?? '' + } } }, computed: { @@ -230,7 +272,7 @@ export const AbgabeMitarbeiterDetail = { return 'position: relative; min-height: 100vh;' }, getSpeedDialStyle() { - return 'position: absolute; right: 1rem; bottom: 1rem;' + return 'position: static !important;' } }, created() { @@ -240,10 +282,10 @@ export const AbgabeMitarbeiterDetail = { }, template: ` - +
+
+ +
{{$p.t('abgabetool/c4abgabeMitarbeiterbereich')}}
diff --git a/public/js/components/Cis/Abgabetool/AbgabeStudentDetail.js b/public/js/components/Cis/Abgabetool/AbgabeStudentDetail.js index 8bf02780e..df88720e5 100644 --- a/public/js/components/Cis/Abgabetool/AbgabeStudentDetail.js +++ b/public/js/components/Cis/Abgabetool/AbgabeStudentDetail.js @@ -17,7 +17,7 @@ export const AbgabeStudentDetail = { AccordionTab: primevue.accordiontab, VueDatePicker }, - inject: ['notenOptions', 'isMobile'], + inject: ['notenOptions', 'isMobile', 'isViewMode'], props: { projektarbeit: { type: Object, @@ -320,10 +320,10 @@ export const AbgabeStudentDetail = {
- +
- diff --git a/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js b/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js index 089a1af43..c4f790336 100644 --- a/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js +++ b/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js @@ -12,7 +12,7 @@ export const AbgabetoolStudent = { AbgabeDetail, VerticalSplit }, - inject: ['isMobile'], + inject: ['isMobile', 'isViewMode'], provide() { return { notenOptions: Vue.computed(() => this.notenOptions) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 46df5493e..676b8dd06 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -42396,6 +42396,46 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'abgabetool', + 'phrase' => 'c4newAbgabetermin', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Neuen Abgabetermin erstellen", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Create new Deadline', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'abgabetool', + 'phrase' => 'c4saveNewAbgabetermin', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Neuen Abgabetermin speichern", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Save new Deadline', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'abgabetool',