mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
Component Status: Tabelle
This commit is contained in:
@@ -157,9 +157,19 @@ class Prestudent extends FHC_Controller
|
|||||||
{
|
{
|
||||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->outputJson(getData($result) ?: []);
|
$this->outputJson(getData($result) ?: []);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHistoryPrestudent($prestudent_id)
|
||||||
|
{
|
||||||
|
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||||
|
|
||||||
|
$result = $this->PrestudentModel->getHistoryPrestudent($prestudent_id);
|
||||||
|
if (isError($result))
|
||||||
|
{
|
||||||
|
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||||
|
}
|
||||||
|
$this->outputJson(getData($result) ?: []);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBezeichnungZgv()
|
public function getBezeichnungZgv()
|
||||||
|
|||||||
@@ -701,7 +701,7 @@ class Prestudent_model extends DB_Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets history of all prestudents, person given
|
* Gets history of all prestudents, person_id given
|
||||||
* @param int $person_id
|
* @param int $person_id
|
||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
@@ -726,4 +726,48 @@ class Prestudent_model extends DB_Model
|
|||||||
|
|
||||||
return $this->execQuery($query, array($person_id));
|
return $this->execQuery($query, array($person_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets history of prestudent, prestudent_id given
|
||||||
|
* @param int $prestudent_id
|
||||||
|
* @return object
|
||||||
|
*/
|
||||||
|
public function getHistoryPrestudent($prestudent_id)
|
||||||
|
{
|
||||||
|
$query = "
|
||||||
|
SELECT
|
||||||
|
ps.status_kurzbz,
|
||||||
|
ps.studiensemester_kurzbz,
|
||||||
|
ps.ausbildungssemester,
|
||||||
|
CASE WHEN ps.status_kurzbz = 'Student' THEN CONCAT(lv.semester, lv.verband, lv.gruppe) END AS lehrverband,
|
||||||
|
ps.datum,
|
||||||
|
TO_CHAR(ps.datum::timestamp, 'DD.MM.YYYY') AS format_datum,
|
||||||
|
sp.bezeichnung,
|
||||||
|
ps.bestaetigtam,
|
||||||
|
TO_CHAR(ps.bestaetigtam::timestamp, 'DD.MM.YYYY') AS format_bestaetigtam,
|
||||||
|
ps.bewerbung_abgeschicktamum,
|
||||||
|
TO_CHAR(ps.bewerbung_abgeschicktamum::timestamp, 'DD.MM.YYYY HH24:MI:SS') AS format_bewerbung_abgeschicktamum,
|
||||||
|
stg.statusgrund_kurzbz,
|
||||||
|
ps.orgform_kurzbz,
|
||||||
|
ps.prestudent_id,
|
||||||
|
sp.studienplan_id,
|
||||||
|
ps.anmerkung,
|
||||||
|
ps.bestaetigtvon,
|
||||||
|
ps.insertamum,
|
||||||
|
ps.insertvon,
|
||||||
|
ps.updateamum,
|
||||||
|
ps.updatevon
|
||||||
|
FROM public.tbl_prestudentstatus ps
|
||||||
|
JOIN public.tbl_student st USING (prestudent_id)
|
||||||
|
JOIN public.tbl_studentlehrverband lv ON (st.student_uid = lv.student_uid)
|
||||||
|
JOIN public.tbl_studiengang sg ON (lv.studiengang_kz = sg.studiengang_kz)
|
||||||
|
LEFT JOIN lehre.tbl_studienplan sp USING (studienplan_id)
|
||||||
|
LEFT JOIN public.tbl_status_grund stg USING (statusgrund_id)
|
||||||
|
WHERE prestudent_id = ?
|
||||||
|
and lv.studiensemester_kurzbz = ps.studiensemester_kurzbz
|
||||||
|
ORDER BY datum DESC
|
||||||
|
";
|
||||||
|
|
||||||
|
return $this->execQuery($query, array($prestudent_id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {CoreRESTClient} from '../../../../RESTClient.js';
|
|||||||
import FormForm from '../../../Form/Form.js';
|
import FormForm from '../../../Form/Form.js';
|
||||||
import FormInput from '../../../Form/Input.js';
|
import FormInput from '../../../Form/Input.js';
|
||||||
import TblHistory from "./Prestudent/History.js";
|
import TblHistory from "./Prestudent/History.js";
|
||||||
/*import TblStatus from "./Prestudent/Status.js";*/
|
import TblStatus from "./Prestudent/Status.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -10,7 +10,7 @@ export default {
|
|||||||
FormForm,
|
FormForm,
|
||||||
FormInput,
|
FormInput,
|
||||||
TblHistory,
|
TblHistory,
|
||||||
/* TblStatus*/
|
TblStatus
|
||||||
},
|
},
|
||||||
inject: {
|
inject: {
|
||||||
lists: {
|
lists: {
|
||||||
@@ -541,18 +541,26 @@ export default {
|
|||||||
</form-form>
|
</form-form>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-6">
|
|
||||||
<legend>Status</legend>
|
|
||||||
<!-- <TblStatus :prestudent_id="modelValue.prestudent_id"></TblStatus> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-6">
|
<div class="col-12 pb-3">
|
||||||
|
<legend>Status</legend>
|
||||||
|
<TblStatus :prestudent_id="modelValue.prestudent_id"></TblStatus>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- <div class="row mb-3">
|
||||||
|
<div class="col-8">
|
||||||
|
<legend>Status</legend>
|
||||||
|
<TblStatus :prestudent_id="modelValue.prestudent_id"></TblStatus>
|
||||||
|
</div>-->
|
||||||
|
|
||||||
|
<div class="col-8">
|
||||||
<legend>Gesamthistorie</legend>
|
<legend>Gesamthistorie</legend>
|
||||||
<TblHistory :person_id="modelValue.person_id"></TblHistory>
|
<TblHistory :person_id="modelValue.person_id"></TblHistory>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,164 @@
|
|||||||
|
import {CoreFilterCmpt} from "../../../../filter/Filter.js";
|
||||||
|
import {CoreRESTClient} from "../../../../../RESTClient";
|
||||||
|
|
||||||
|
export default{
|
||||||
|
components: {
|
||||||
|
CoreFilterCmpt
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
prestudent_id: String
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tabulatorOptions: {
|
||||||
|
ajaxURL: CoreRESTClient._generateRouterURI('components/stv/Prestudent/getHistoryPrestudent/' + this.prestudent_id),
|
||||||
|
//autoColumns: true,
|
||||||
|
columns:[
|
||||||
|
{title:"Kurzbz", field:"status_kurzbz"},
|
||||||
|
{title:"StSem", field:"studiensemester_kurzbz"},
|
||||||
|
{title:"Sem", field:"ausbildungssemester"},
|
||||||
|
{title:"Lehrverband", field:"lehrverband"},
|
||||||
|
{title:"Datum", field:"format_datum"},
|
||||||
|
{title:"Studienplan", field:"bezeichnung"},
|
||||||
|
{title:"BestätigtAm", field:"format_bestaetigtam"},
|
||||||
|
{title:"AbgeschicktAm", field:"format_bewerbung_abgeschicktamum"},
|
||||||
|
{title:"Statusgrund", field:"statusgrund_kurzbz"},
|
||||||
|
{title:"Organisationsform", field:"ps.orgform_kurzbz"},
|
||||||
|
{title:"PrestudentInId", field:"prestudent_id"},
|
||||||
|
{title:"StudienplanId", field:"studienplan_id"},
|
||||||
|
{title:"Anmerkung", field:"anmerkung"},
|
||||||
|
{title:"BestätigtVon", field:"bestaetigtvon"},
|
||||||
|
{title:"InsertAmUm", field:"insertamum"},
|
||||||
|
{title:"InsertVon", field:"insertvon"},
|
||||||
|
{title:"UpdateAmUm", field:"updateamum"},
|
||||||
|
{title:"UpdateVon", field:"updatevon"},
|
||||||
|
],
|
||||||
|
layout: 'fitDataFill',
|
||||||
|
layoutColumnsOnNewData: false,
|
||||||
|
height: 'auto',
|
||||||
|
selectable: false,
|
||||||
|
rowClickMenu:[
|
||||||
|
{
|
||||||
|
label:"Bearbeiten",
|
||||||
|
action:function(e, row){
|
||||||
|
console.log("bearbeiten: " + row.getData().status_kurzbz + ' ' + row.getData().prestudent_id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
separator:true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
disabled:true,
|
||||||
|
label:"Status bestätigen",
|
||||||
|
action:function(e, column){
|
||||||
|
column.move("col");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
separator:true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
disabled:true,
|
||||||
|
label:"Neuen Status hinzufügen",
|
||||||
|
action:function(e, column){
|
||||||
|
column.move("col");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
separator:true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
disabled:true,
|
||||||
|
label:"Entfernen",
|
||||||
|
action:function(e, column){
|
||||||
|
column.move("col");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
separator:true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
disabled:true,
|
||||||
|
label:"Status vorrücken",
|
||||||
|
action:function(e, column){
|
||||||
|
column.move("col");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
separator:true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"<i class='fas fa-check-square'></i> Select Row",
|
||||||
|
action:function(e, row){
|
||||||
|
row.select();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
],
|
||||||
|
/* rowContextMenu:[
|
||||||
|
{
|
||||||
|
label:"Bearbeiten",
|
||||||
|
action:function(e, column){
|
||||||
|
console.log("bearbeiten" + column);
|
||||||
|
column.hide();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
separator:true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
disabled:true,
|
||||||
|
label:"Status bestätigen",
|
||||||
|
action:function(e, column){
|
||||||
|
column.move("col");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
separator:true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
disabled:true,
|
||||||
|
label:"Neuen Status hinzufügen",
|
||||||
|
action:function(e, column){
|
||||||
|
column.move("col");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
separator:true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
disabled:true,
|
||||||
|
label:"Entfernen",
|
||||||
|
action:function(e, column){
|
||||||
|
column.move("col");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
separator:true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
disabled:true,
|
||||||
|
label:"Status vorrücken",
|
||||||
|
action:function(e, column){
|
||||||
|
column.move("col");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]*/
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
template: `
|
||||||
|
<div class="stv-list h-100 pt-3">
|
||||||
|
<core-filter-cmpt
|
||||||
|
ref="table"
|
||||||
|
:tabulator-options="tabulatorOptions"
|
||||||
|
:tabulator-events="tabulatorEvents"
|
||||||
|
table-only
|
||||||
|
:side-menu="false"
|
||||||
|
reload
|
||||||
|
new-btn-show
|
||||||
|
new-btn-label="Neu"
|
||||||
|
@click:new="actionNewAdress"
|
||||||
|
>
|
||||||
|
</core-filter-cmpt>
|
||||||
|
</div>`
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user