mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge branch 'master' into feature-25999/C4
This commit is contained in:
@@ -15,7 +15,6 @@ class PlausicheckDefinitionLib
|
||||
'AktSemesterNull' => 'AktSemesterNull',
|
||||
'AktiverStudentOhneStatus' => 'AktiverStudentOhneStatus',
|
||||
'AusbildungssemPrestudentUngleichAusbildungssemStatus' => 'AusbildungssemPrestudentUngleichAusbildungssemStatus',
|
||||
'BewerberNichtZumRtAngetreten' => 'BewerberNichtZumRtAngetreten',
|
||||
'DatumAbschlusspruefungFehlt' => 'DatumAbschlusspruefungFehlt',
|
||||
'DatumSponsionFehlt' => 'DatumSponsionFehlt',
|
||||
'DatumStudiensemesterFalscheReihenfolge' => 'DatumStudiensemesterFalscheReihenfolge',
|
||||
@@ -36,6 +35,7 @@ class PlausicheckDefinitionLib
|
||||
'StudentstatusNachAbbrecher' => 'StudentstatusNachAbbrecher',
|
||||
'DualesStudiumOhneMarkierung' => 'DualesStudiumOhneMarkierung'
|
||||
//'StudienplanUngueltig' => 'StudienplanUngueltig'
|
||||
//'BewerberNichtZumRtAngetreten' => 'BewerberNichtZumRtAngetreten'
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,6 +33,23 @@ class Bismeldestichtag_model extends DB_Model
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert nächstliegenden Bismeldestichtag.
|
||||
* @return object success or error
|
||||
*/
|
||||
public function getNextMeldestichtag()
|
||||
{
|
||||
$this->addSelect('meldestichtag');
|
||||
$this->addSelect('studiensemester_kurzbz');
|
||||
|
||||
$this->addOrder('meldestichtag', 'ASC');
|
||||
$this->addLimit(1);
|
||||
|
||||
return $this->loadWhere([
|
||||
'meldestichtag >= NOW()' => null
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prüft, ob Meldestichtag für ein bestimmtes Statusdatum und Studiensemester erreicht ist.
|
||||
*
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {BismeldestichtagTabulatorOptions} from './TabulatorSetup.js';
|
||||
import {BismeldestichtagTabulatorEventHandlers} from './TabulatorSetup.js';
|
||||
import {BismeldestichtagHelper} from './BismeldestichtagHelper.js';
|
||||
|
||||
import {CoreFilterCmpt} from '../../components/filter/Filter.js';
|
||||
import {CoreNavigationCmpt} from '../../components/navigation/Navigation.js';
|
||||
@@ -29,8 +28,60 @@ import Phrasen from '../../plugin/Phrasen.js';
|
||||
const bismeldestichtagApp = Vue.createApp({
|
||||
data: function() {
|
||||
return {
|
||||
bismeldestichtagTabulatorOptions: BismeldestichtagTabulatorOptions,
|
||||
bismeldestichtagTabulatorEventHandlers: BismeldestichtagTabulatorEventHandlers,
|
||||
bismeldestichtagTabulatorOptions: {
|
||||
maxHeight: "100%",
|
||||
minHeight: 50,
|
||||
layout: 'fitColumns',
|
||||
index: 'meldestichtag_id',
|
||||
initialSort:[
|
||||
{column:"meldestichtag", dir:"desc"}
|
||||
],
|
||||
columns: [
|
||||
{title: 'Meldestichtag', field: 'meldestichtag', headerFilter: true, formatter: function(cell){
|
||||
return BismeldestichtagHelper.formatDate(cell.getValue());
|
||||
}
|
||||
},
|
||||
{title: 'Studiensemester', field: 'studiensemester_kurzbz', headerFilter: true, sorter:function(a, b, aRow, bRow, column, dir, sorterParams) {
|
||||
|
||||
//aRow, bRow - the row components for the values being compared
|
||||
let semesterStartA = new Date(aRow.getData().semester_start);
|
||||
let semesterStartB = new Date(bRow.getData().semester_start);
|
||||
|
||||
return semesterStartA - semesterStartB; // difference between studiensemester start dates
|
||||
}
|
||||
},
|
||||
{title: 'Semesterstart',field: 'semester_start', headerFilter: true, visible: false, formatter: function(cell){
|
||||
return BismeldestichtagHelper.formatDate(cell.getValue());
|
||||
}
|
||||
},
|
||||
{title: 'ID', field: 'meldestichtag_id', headerFilter: true, visible: false},
|
||||
{title: 'Insertamum', field: 'insertamum', headerFilter: true, visible: false},
|
||||
{title: 'Insertvon', field: 'insertvon', headerFilter: true, visible: false},
|
||||
{title: 'Löschen', field: 'loeschen', headerFilter: false, formatter:function(cell){
|
||||
return '<button class="btn btn-outline-secondary delete-btn" data-meldestichtag-id="'+cell.getRow().getIndex()+'">'+
|
||||
'<i class="fa fa-xmark"></i>'+
|
||||
'</button>';
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
bismeldestichtagTabulatorEventHandlers: [
|
||||
{
|
||||
event: "rowClick",
|
||||
handler: function(e, row) {
|
||||
if (e.target.nodeName == 'DIV') {
|
||||
let data = row.getData();
|
||||
alert(data.studiensemester_kurzbz + ': ' + BismeldestichtagHelper.formatDate(data.meldestichtag));
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
event: "tableBuilt",
|
||||
handler: () => {
|
||||
this.handlerStudiensemester();
|
||||
}
|
||||
}
|
||||
],
|
||||
meldestichtag: null, // date of Meldestichtag
|
||||
semList: null, // all Studiensemester for dropdown
|
||||
currSem: null, // selected Studiensemester
|
||||
@@ -47,9 +98,6 @@ const bismeldestichtagApp = Vue.createApp({
|
||||
CoreFetchCmpt,
|
||||
"datepicker": VueDatePicker
|
||||
},
|
||||
created() {
|
||||
this.handlerStudiensemester();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Define Studiensemester call and method to be executed after the call
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright (C) 2022 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export const BismeldestichtagHelper = {
|
||||
formatDate: function(date) {
|
||||
return date.replace(/(.*)-(.*)-(.*)/, '$3.$2.$1');
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
/**
|
||||
* Copyright (C) 2022 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const BismeldestichtagTabulatorOptions = {
|
||||
maxHeight: "100%",
|
||||
minHeight: 50,
|
||||
layout: 'fitColumns',
|
||||
index: 'meldestichtag_id',
|
||||
columns: [
|
||||
{title: 'Meldestichtag',field: 'meldestichtag', headerFilter: true, formatter: function(cell){
|
||||
return BismeldestichtagTabulatorHelperFunctions._formatDate(cell.getValue());
|
||||
}
|
||||
},
|
||||
{title: 'Studiensemester', field: 'studiensemester_kurzbz', headerFilter: true, sorter:function(a, b, aRow, bRow, column, dir, sorterParams) {
|
||||
|
||||
//aRow, bRow - the row components for the values being compared
|
||||
let semesterStartA = new Date(aRow.getData().semester_start);
|
||||
let semesterStartB = new Date(bRow.getData().semester_start);
|
||||
|
||||
return semesterStartA - semesterStartB; // difference between studiensemester start dates
|
||||
}
|
||||
},
|
||||
{title: 'Semesterstart',field: 'semester_start', headerFilter: true, visible: false, formatter: function(cell){
|
||||
return BismeldestichtagTabulatorHelperFunctions._formatDate(cell.getValue());
|
||||
}
|
||||
},
|
||||
{title: 'ID', field: 'meldestichtag_id', headerFilter: true, visible: false},
|
||||
{title: 'Insertamum', field: 'insertamum', headerFilter: true, visible: false},
|
||||
{title: 'Insertvon', field: 'insertvon', headerFilter: true, visible: false},
|
||||
{title: 'Löschen', field: 'loeschen', headerFilter: false, formatter:function(cell){
|
||||
return '<button class="btn btn-outline-secondary delete-btn" data-meldestichtag-id="'+cell.getRow().getIndex()+'">'+
|
||||
'<i class="fa fa-xmark"></i>'+
|
||||
'</button>';
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const BismeldestichtagTabulatorEventHandlers = [
|
||||
{
|
||||
event: "rowClick",
|
||||
handler: function(e, row) {
|
||||
if (e.target.nodeName == 'DIV') {
|
||||
let data = row.getData();
|
||||
alert(data.studiensemester_kurzbz + ': ' + BismeldestichtagTabulatorHelperFunctions._formatDate(data.meldestichtag));
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
let BismeldestichtagTabulatorHelperFunctions = {
|
||||
_formatDate: function(date) {
|
||||
return date.replace(/(.*)-(.*)-(.*)/, '$3.$2.$1');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user