diff --git a/public/css/Studentenverwaltung.css b/public/css/Studentenverwaltung.css index cb4b8f2e9..11d4a2ac6 100644 --- a/public/css/Studentenverwaltung.css +++ b/public/css/Studentenverwaltung.css @@ -281,3 +281,7 @@ html.fs_huge { } */ /* slim ende */ + +.fhc-xxl-modal { + min-width: 80vw; +} diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Projektarbeit/Details.js b/public/js/components/Stv/Studentenverwaltung/Details/Projektarbeit/Details.js index 3b414bef5..bccbd96c2 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Projektarbeit/Details.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Projektarbeit/Details.js @@ -288,7 +288,7 @@ export default {
-
+
-
+
{{ $p.t('projektarbeit', 'zurFirmenverwaltung') }} @@ -311,7 +311,7 @@ export default {
{ + const AAAWidth = '44px'; + const AAAHeight = '44px'; let container = document.createElement('div'); container.className = "d-flex gap-2"; @@ -206,6 +208,8 @@ export default { button.className = 'btn btn-outline-secondary btn-action'; button.innerHTML = ''; button.title = this.$p.t('ui', 'bearbeiten'); + button.style.minWidth = AAAWidth; + button.style.minHeight = AAAHeight; button.addEventListener('click', (event) => { let data = cell.getData(); this.editedProjektarbeit = data; @@ -213,21 +217,23 @@ export default { }); container.append(button); - button = document.createElement('button'); - button.className = 'btn btn-outline-secondary btn-action'; - button.innerHTML = ''; - button.title = this.$p.t('projektarbeit', 'betreuerBearbeiten'); - button.addEventListener('click', (event) => { - let data = cell.getData(); - this.editedProjektarbeit = data; - this.actionEditBetreuer(); - }); - container.append(button); + // button = document.createElement('button'); + // button.className = 'btn btn-outline-secondary btn-action'; + // button.innerHTML = ''; + // button.title = this.$p.t('projektarbeit', 'betreuerBearbeiten'); + // button.addEventListener('click', (event) => { + // let data = cell.getData(); + // this.editedProjektarbeit = data; + // this.actionEditBetreuer(); + // }); + // container.append(button); button = document.createElement('button'); button.className = 'btn btn-outline-secondary btn-action'; button.innerHTML = ''; button.title = this.$p.t('ui', 'loeschen'); + button.style.minWidth = AAAWidth; + button.style.minHeight = AAAHeight; button.addEventListener('click', () => this.actionDeleteProjektarbeit(cell.getData().projektarbeit_id) ); @@ -280,9 +286,14 @@ export default { .then(this.deleteProjektarbeit) .catch(this.$fhcAlert.handleSystemError); }, + saveProjektarbeit() { + if(this.statusNew) this.addNewProjektarbeit() + else this.updateProjektarbeit() + }, addNewProjektarbeit() { this.$refs.projektarbeitDetails.addNewProjektarbeit() .then((result) => { + console.log('res add new', result) this.projektarbeitSaved(); }) .catch(this.$fhcAlert.handleSystemError); @@ -290,6 +301,7 @@ export default { updateProjektarbeit() { this.$refs.projektarbeitDetails.updateProjektarbeit() .then((result) => { + console.log('res update', result) this.projektarbeitSaved(); }) .catch(this.$fhcAlert.handleSystemError); @@ -308,7 +320,8 @@ export default { projektarbeitSaved() { this.reload(); this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); - this.hideModal('projektarbeitModal'); + if(!this.statusNew) this.hideModal('projektarbeitModal'); + else this.statusNew = false }, setDefaultStunden(projekttyp_kurzbz) { this.$refs.projektbetreuer.setDefaultStunden(projekttyp_kurzbz); @@ -358,46 +371,26 @@ export default { - + - - -
-
-
-
- - -
-
+
+
+ +
-
-
-
- -
-
+
+
diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Projektarbeit/Projektbetreuer.js b/public/js/components/Stv/Studentenverwaltung/Details/Projektarbeit/Projektbetreuer.js index a68a06b93..bddfc8f6a 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Projektarbeit/Projektbetreuer.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Projektarbeit/Projektbetreuer.js @@ -41,20 +41,20 @@ export default { return { tabulatorOptions: { columns: [ - {title: "Nachname", field: "nachname"}, - {title: "Vorname", field: "vorname"}, - {title: "Note", field: "note"}, - {title: "Punkte", field: "punkte"}, - {title: "Stunden", field: "stunden"}, - {title: "Stundensatz", field: "stundensatz", visible: false}, - {title: "Art", field: "betreuerart_kurzbz", visible: false}, - {title: "Person ID", field: "person_id", visible: false}, - {title: "Vertrag ID", field: "vertrag_id", visible: false}, - {title: "Projektarbeit ID", field: "projektarbeit_id", visible: false}, + {title: "Nachname", field: "nachname", widthGrow: 2}, + {title: "Vorname", field: "vorname", widthGrow: 2}, + {title: "Note", field: "note", widthGrow: 1}, + {title: "Punkte", field: "punkte", widthGrow: 1}, + {title: "Stunden", field: "stunden", widthGrow: 1}, + {title: "Stundensatz", field: "stundensatz", visible: false, widthGrow: 1}, + {title: "Art", field: "betreuerart_kurzbz", visible: false, widthGrow: 2}, + {title: "Person ID", field: "person_id", visible: false, widthGrow: 1}, + {title: "Vertrag ID", field: "vertrag_id", visible: false, widthGrow: 1}, + {title: "Projektarbeit ID", field: "projektarbeit_id", visible: false, widthGrow: 1}, { title: 'Aktionen', field: 'actions', - minWidth: 150, // Ensures Action-buttons will be always fully displayed + minWidth: 100, // Ensures Action-buttons will be always fully displayed formatter: (cell, formatterParams, onRendered) => { let container = document.createElement('div'); container.className = "d-flex gap-2"; @@ -116,7 +116,7 @@ export default { frozen: true }, ], - layout: 'fitData', + layout: 'fitColumns', layoutColumnsOnNewData: false, height: 'auto', minHeight: '100',