mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
Start Actions New, Edit, Delete
This commit is contained in:
@@ -160,18 +160,6 @@ class Prestudent extends FHC_Controller
|
||||
$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()
|
||||
{
|
||||
$this->load->model('codex/Zgv_model', 'ZgvModel');
|
||||
@@ -268,5 +256,45 @@ class Prestudent extends FHC_Controller
|
||||
$this->outputJson($result);
|
||||
}
|
||||
|
||||
public function getStudiensemester()
|
||||
{
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
$this->StudiensemesterModel->addOrder('start', 'DESC');
|
||||
$this->StudiensemesterModel->addLimit(20);
|
||||
|
||||
$result = $this->StudiensemesterModel->load();
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
$this->outputJson($result);
|
||||
}
|
||||
|
||||
public function getStudienplaene($prestudent_id)
|
||||
{
|
||||
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
|
||||
$result = $this->PrestudentModel->loadWhere(
|
||||
array('prestudent_id' => $prestudent_id)
|
||||
);
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
$result = current(getData($result));
|
||||
$studiengang_kz = $result->studiengang_kz;
|
||||
|
||||
$this->load->model('organisation/Studienplan_model', 'StudienplanModel');
|
||||
|
||||
$this->StudienplanModel->addOrder('studienplan_id', 'DESC');
|
||||
|
||||
$result = $this->StudienplanModel->getStudienplaene($studiengang_kz);
|
||||
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
$this->outputJson($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \DateTime as DateTime;
|
||||
|
||||
class Status extends FHC_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Load Libraries
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
|
||||
// Load language phrases
|
||||
/* $this->loadPhrases([
|
||||
'ui'
|
||||
]);*/
|
||||
}
|
||||
|
||||
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 getStatusgruende()
|
||||
{
|
||||
$this->load->model('crm/Statusgrund_model', 'StatusgrundModel');
|
||||
|
||||
$result = $this->StatusgrundModel->load();
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
$this->outputJson($result);
|
||||
}
|
||||
|
||||
public function addNewStatus($prestudent_id)
|
||||
{
|
||||
/* $this->load->library('form_validation');
|
||||
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}*/
|
||||
|
||||
$_POST = json_decode(utf8_encode($this->input->raw_input_stream), true);
|
||||
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
|
||||
|
||||
//var_dump($_POST);
|
||||
|
||||
$status_kurzbz = $this->input->post('status_kurzbz');
|
||||
$ausbildungssemester = $this->input->post('ausbildungssemester');
|
||||
$datum = $this->input->post('datum');
|
||||
$bestaetigtam = $this->input->post('bestaetigtam');
|
||||
$bewerbung_abgeschicktamum = $this->input->post('bewerbung_abgeschicktamum');
|
||||
$studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
|
||||
$studienplan_id = $this->input->post('studienplan_id');
|
||||
$anmerkung = $this->input->post('anmerkung ');
|
||||
$statusgrund_id = $this->input->post('statusgrund_id');
|
||||
$rt_stufe = $this->input->post('rt_stufe');
|
||||
$bestaetigtvon = $this->input->post('bestaetigtvon');
|
||||
|
||||
// Start DB transaction
|
||||
//$this->db->trans_start(false);
|
||||
|
||||
$result = $this->PrestudentstatusModel->insert(
|
||||
[
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'status_kurzbz' => $status_kurzbz,
|
||||
'bewerbung_abgeschicktamum' => $bewerbung_abgeschicktamum,
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'studienplan_id' => $studienplan_id,
|
||||
'ausbildungssemester' => $ausbildungssemester,
|
||||
'anmerkung' => $anmerkung,
|
||||
'statusgrund_id' => $statusgrund_id,
|
||||
'insertvon' => 'uid',
|
||||
'insertamum' => date('c'),
|
||||
'bestaetigtam' => $bestaetigtam,
|
||||
'bestaetigtvon' => $bestaetigtvon,
|
||||
'datum' => $datum,
|
||||
'rt_stufe' => $rt_stufe
|
||||
]
|
||||
);
|
||||
if (isError($result))
|
||||
{
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
return $this->outputJson(getError($result));
|
||||
}
|
||||
return $this->outputJsonSuccess(true);
|
||||
}
|
||||
|
||||
public function loadStatus()
|
||||
{
|
||||
$_POST = json_decode(utf8_encode($this->input->raw_input_stream), true);
|
||||
|
||||
$prestudent_id = $this->input->post('prestudent_id');
|
||||
$status_kurzbz = $this->input->post('status_kurzbz');
|
||||
$ausbildungssemester = $this->input->post('ausbildungssemester');
|
||||
$studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
|
||||
//echo $prestudent_id . $status_kurzbz . $ausbildungssemester . $studiensemester_kurzbz;
|
||||
|
||||
|
||||
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
|
||||
|
||||
$result = $this->PrestudentstatusModel->loadWhere(
|
||||
array(
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'status_kurzbz' => $status_kurzbz,
|
||||
'ausbildungssemester' => $ausbildungssemester,
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz
|
||||
)
|
||||
);
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
$this->outputJson($result);
|
||||
}
|
||||
|
||||
elseif (!hasData($result)) {
|
||||
$this->outputJson($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
//var_dump($result);
|
||||
$this->outputJsonSuccess(current(getData($result)));
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteStatus()
|
||||
{
|
||||
$_POST = json_decode(utf8_encode($this->input->raw_input_stream), true);
|
||||
|
||||
$prestudent_id = $this->input->post('prestudent_id');
|
||||
$status_kurzbz = $this->input->post('status_kurzbz');
|
||||
$ausbildungssemester = $this->input->post('ausbildungssemester');
|
||||
$studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
|
||||
|
||||
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
|
||||
|
||||
$result = $this->PrestudentstatusModel->delete(
|
||||
array(
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'status_kurzbz' => $status_kurzbz,
|
||||
'ausbildungssemester' => $ausbildungssemester,
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz
|
||||
)
|
||||
);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
$this->outputJson($result);
|
||||
}
|
||||
elseif (!hasData($result)) {
|
||||
$this->outputJson($result);
|
||||
}
|
||||
return $this->outputJsonSuccess(current(getData($result)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -754,8 +754,10 @@ class Prestudent_model extends DB_Model
|
||||
ps.anmerkung,
|
||||
ps.bestaetigtvon,
|
||||
ps.insertamum,
|
||||
TO_CHAR(ps.insertamum::timestamp, 'DD.MM.YYYY HH24:MI:SS') AS format_insertamum,
|
||||
ps.insertvon,
|
||||
ps.updateamum,
|
||||
TO_CHAR(ps.updateamum::timestamp, 'DD.MM.YYYY HH24:MI:SS') AS format_updateamum,
|
||||
ps.updatevon
|
||||
FROM public.tbl_prestudentstatus ps
|
||||
JOIN public.tbl_student st USING (prestudent_id)
|
||||
@@ -768,6 +770,8 @@ class Prestudent_model extends DB_Model
|
||||
ORDER BY datum DESC
|
||||
";
|
||||
|
||||
// var_dump($query);
|
||||
|
||||
return $this->execQuery($query, array($prestudent_id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
import {CoreFilterCmpt} from "../../../../filter/Filter.js";
|
||||
import {CoreRESTClient} from "../../../../../RESTClient";
|
||||
import BsModal from "../../../../Bootstrap/Modal.js";
|
||||
import FormForm from '../../../../Form/Form.js';
|
||||
import FormInput from '../../../../Form/Input.js';
|
||||
|
||||
export default{
|
||||
components: {
|
||||
CoreFilterCmpt
|
||||
CoreFilterCmpt,
|
||||
BsModal,
|
||||
FormForm,
|
||||
FormInput,
|
||||
},
|
||||
props: {
|
||||
prestudent_id: String
|
||||
@@ -11,143 +17,562 @@ export default{
|
||||
data() {
|
||||
return {
|
||||
tabulatorOptions: {
|
||||
ajaxURL: CoreRESTClient._generateRouterURI('components/stv/Prestudent/getHistoryPrestudent/' + this.prestudent_id),
|
||||
ajaxURL: CoreRESTClient._generateRouterURI('components/stv/Status/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"},
|
||||
columns: [
|
||||
{title: "Kurzbz", field: "status_kurzbz", tooltip: true},
|
||||
{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", visible: false},
|
||||
{title: "Organisationsform", field: "ps.orgform_kurzbz", visible: false},
|
||||
{title: "PrestudentInId", field: "prestudent_id", visible: false},
|
||||
{title: "StudienplanId", field: "studienplan_id", visible: false},
|
||||
{title: "Anmerkung", field: "anmerkung", visible: false},
|
||||
{title: "BestätigtVon", field: "bestaetigtvon", visible: false},
|
||||
{title: "InsertAmUm", field: "format_insertamum", visible: false},
|
||||
{title: "InsertVon", field: "insertvon", visible: false},
|
||||
{title: "UpdateAmUm", field: "format_updateamum", visible: false},
|
||||
{title: "UpdateVon", field: "updatevon", visible: false},
|
||||
{
|
||||
title: 'Aktionen', field: 'actions',
|
||||
minWidth: 150, // Ensures Action-buttons will be always fully displayed
|
||||
formatter: (cell, formatterParams, onRendered) => {
|
||||
let container = document.createElement('div');
|
||||
container.className = "d-flex gap-2";
|
||||
|
||||
let button = document.createElement('button');
|
||||
button.className = 'btn btn-outline-secondary btn-action';
|
||||
button.innerHTML = '<i class="fa fa-forward"></i>';
|
||||
button.title = 'Status vorrücken';
|
||||
button.addEventListener('click', () =>
|
||||
this.actionAdvanceStatus(cell.getData().status_kurzbz, cell.getData().studiensemester_kurzbz, cell.getData().ausbildungssemester)
|
||||
);
|
||||
container.append(button);
|
||||
|
||||
button = document.createElement('button');
|
||||
button.className = 'btn btn-outline-secondary btn-action';
|
||||
button.innerHTML = '<i class="fa fa-check"></i>';
|
||||
button.title = 'Status bestätigen';
|
||||
button.addEventListener('click', () =>
|
||||
this.actionConfirmStatus(cell.getData().status_kurzbz, cell.getData().studiensemester_kurzbz, cell.getData().ausbildungssemester)
|
||||
);
|
||||
container.append(button);
|
||||
|
||||
button = document.createElement('button');
|
||||
button.className = 'btn btn-outline-secondary btn-action';
|
||||
button.innerHTML = '<i class="fa fa-edit"></i>';
|
||||
button.title = 'Status bearbeiten';
|
||||
button.addEventListener('click', (event) =>
|
||||
this.actionEditStatus(cell.getData().status_kurzbz, cell.getData().studiensemester_kurzbz, cell.getData().ausbildungssemester)
|
||||
);
|
||||
container.append(button);
|
||||
|
||||
button = document.createElement('button');
|
||||
button.className = 'btn btn-outline-secondary btn-action';
|
||||
button.innerHTML = '<i class="fa fa-xmark"></i>';
|
||||
button.title = 'Status löschen';
|
||||
button.addEventListener('click', () =>
|
||||
this.actionDeleteStatus(cell.getData().status_kurzbz, cell.getData().studiensemester_kurzbz, cell.getData().ausbildungssemester)
|
||||
);
|
||||
container.append(button);
|
||||
|
||||
return container;
|
||||
},
|
||||
frozen: true
|
||||
},
|
||||
],
|
||||
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");
|
||||
}
|
||||
},
|
||||
]*/
|
||||
layoutColumnsOnNewData: false,
|
||||
height: 'auto',
|
||||
selectable: false,
|
||||
},
|
||||
tabulatorEvents: [],
|
||||
statusData: {},
|
||||
listStudiensemester: [],
|
||||
//maySem: [0,1,2,4,6,7],
|
||||
maxSem: Array.from({ length: 11 }, (_, index) => index),
|
||||
listStudienplaene: [],
|
||||
aufnahmestufen: {'': '-- keine Auswahl --', 1: 1, 2: 2, 3: 3},
|
||||
listStatusgruende: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
gruende() {
|
||||
return this.listStatusgruende.filter(grund => grund.status_kurzbz == this.statusData.status_kurzbz);
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
actionNewStatus(){
|
||||
console.log("Action: Neuen Status hinzufügen");
|
||||
this.$refs.newStatusModal.show();
|
||||
},
|
||||
actionEditStatus(status, stdsem, ausbildungssemester){
|
||||
console.log("Action: Status bearbeiten: (" + status + ": " + stdsem + "/" + ausbildungssemester + ")")
|
||||
this.loadStatus({
|
||||
'prestudent_id': this.prestudent_id,
|
||||
'status_kurzbz': status,
|
||||
'studiensemester_kurzbz': stdsem,
|
||||
'ausbildungssemester': ausbildungssemester
|
||||
}).then(() => {
|
||||
if(this.statusData)
|
||||
this.$refs.editStatusModal.show();
|
||||
});
|
||||
},
|
||||
actionDeleteStatus(status, stdsem, ausbildungssemester){
|
||||
console.log("Action: Status löschen: (" + status + ": " + stdsem + "/" + ausbildungssemester + ")")
|
||||
//this.$refs.deleteStatusModal.show();
|
||||
|
||||
this.loadStatus({
|
||||
'prestudent_id': this.prestudent_id,
|
||||
'status_kurzbz': status,
|
||||
'studiensemester_kurzbz': stdsem,
|
||||
'ausbildungssemester': ausbildungssemester
|
||||
}).then(() => {
|
||||
if(this.statusData)
|
||||
this.$refs.deleteStatusModal.show();
|
||||
});
|
||||
},
|
||||
actionAdvanceStatus(status, stdsem, ausbildungssemester){
|
||||
console.log("Action: Status vorrücken: (" + status + ": " + stdsem + "/" + ausbildungssemester + ")")
|
||||
//this.$refs.deleteStatusModal.show();
|
||||
|
||||
/* this.loadStatus(status_id).then(() => {
|
||||
if(this.statusData.bankverbindung_id)
|
||||
this.$refs.deleteStatusModal.show();
|
||||
});*/
|
||||
},
|
||||
actionConfirmStatus(status, stdsem, ausbildungssemester){
|
||||
console.log("Action: Status bestätigen: (" + status + ": " + stdsem + "/" + ausbildungssemester + ")")
|
||||
//this.$refs.deleteStatusModal.show();
|
||||
|
||||
/* this.loadStatus(status_id).then(() => {
|
||||
if(this.statusData.bankverbindung_id)
|
||||
this.$refs.deleteStatusModal.show();
|
||||
});*/
|
||||
},
|
||||
addNewStatus(statusData){
|
||||
CoreRESTClient.post('components/stv/Status/addNewStatus/' + this.prestudent_id,
|
||||
this.statusData
|
||||
).then(response => {
|
||||
if (!response.data.error) {
|
||||
this.$fhcAlert.alertSuccess('Speichern erfolgreich');
|
||||
this.hideModal('newStatusModal');
|
||||
this.resetModal();
|
||||
} else {
|
||||
const errorData = response.data.retval;
|
||||
Object.entries(errorData).forEach(entry => {
|
||||
const [key, value] = entry;
|
||||
this.$fhcAlert.alertError(value);
|
||||
});
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$fhcAlert.alertError('Fehler bei Speichern Status aufgetreten');
|
||||
}).finally(() => {
|
||||
window.scrollTo(0, 0);
|
||||
this.reload();
|
||||
});
|
||||
},
|
||||
loadStatus(status_id){
|
||||
return CoreRESTClient.post('components/stv/Status/loadStatus/',
|
||||
status_id)
|
||||
.then(
|
||||
result => {
|
||||
if(result.data.retval)
|
||||
this.statusData = result.data.retval;
|
||||
else
|
||||
{
|
||||
this.statusData = {};
|
||||
this.$fhcAlert.alertError('Kein Status mit Id ' + status_id + ' gefunden');
|
||||
}
|
||||
return result;
|
||||
}
|
||||
);
|
||||
},
|
||||
reload(){
|
||||
this.$refs.table.reloadTable();
|
||||
},
|
||||
hideModal(modalRef){
|
||||
this.$refs[modalRef].hide();
|
||||
},
|
||||
resetModal(){
|
||||
this.statusData = {};
|
||||
},
|
||||
},
|
||||
created(){
|
||||
CoreRESTClient
|
||||
.get('components/stv/Prestudent/getStudiensemester')
|
||||
.then(result => CoreRESTClient.getData(result.data) || [])
|
||||
.then(result => {
|
||||
this.listStudiensemester = result;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
CoreRESTClient
|
||||
.get('components/stv/Prestudent/getStudienplaene/' + this.prestudent_id)
|
||||
.then(result => CoreRESTClient.getData(result.data) || [])
|
||||
.then(result => {
|
||||
this.listStudienplaene = result;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
CoreRESTClient
|
||||
.get('components/stv/Status/getStatusgruende/')
|
||||
.then(result => CoreRESTClient.getData(result.data) || [])
|
||||
.then(result => {
|
||||
this.listStatusgruende = result;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
template: `
|
||||
<div class="stv-list h-100 pt-3">
|
||||
|
||||
|
||||
<p>TestData</p>
|
||||
{{statusData}}
|
||||
|
||||
<!--Modal: Add New Status-->
|
||||
<BsModal ref="newStatusModal">
|
||||
<template #title>Neuen Status hinzufügen</template>
|
||||
|
||||
<form-form class="row g-3" ref="statusData">
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="status_kurzbz" class="form-label col-sm-4">Rolle</label>
|
||||
<div class="col-sm-6">
|
||||
<!-- <form-input type="text" :readonly="readonly" class="form-control" id="status_kurzbz" v-model="statusData['status_kurzbz']">-->
|
||||
<form-input
|
||||
required
|
||||
v-model="statusData['status_kurzbz']"
|
||||
name="status_kurzbz"
|
||||
type="select"
|
||||
>
|
||||
<option value="Interessent">InteressentIn</option>
|
||||
<option value="Bewerber">BewerberIn</option>
|
||||
<option value="Aufgenommener">Aufgenommene/r</option>
|
||||
<option value="Student">StudentIn</option>
|
||||
<option value="Unterbrecher">UnterbrecherIn</option>
|
||||
<option value="Diplomand">DiplomandIn</option>
|
||||
<option value="Incoming">Incoming</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="studiensemester_kurzbz" class="form-label col-sm-4">Studiensemester</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
:readonly="readonly"
|
||||
type="select"
|
||||
name="studiensemester_kurzbz"
|
||||
v-model="statusData['studiensemester_kurzbz']"
|
||||
> <!--TODO(manu) default aktueller Eintrag-->
|
||||
<option v-for="sem in listStudiensemester" :key="sem.studiensemester_kurzbz" :value="sem.studiensemester_kurzbz">{{sem.studiensemester_kurzbz}}</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<!-- TODO(manu) if(defined('VORRUECKUNG_STATUS_MAX_SEMESTER') && VORRUECKUNG_STATUS_MAX_SEMESTER==false)-->
|
||||
<div class="row mb-3">
|
||||
<label for="ausbildungssemester" class="form-label col-sm-4">Ausbildungssemester</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="select"
|
||||
:readonly="readonly"
|
||||
name="ausbildungssemester"
|
||||
v-model="statusData['ausbildungssemester']"
|
||||
>
|
||||
<option v-for="number in maxSem" :key="number" :value="number">{{ number }}</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="datum" class="form-label col-sm-4">Datum</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="DatePicker"
|
||||
:readonly="readonly"
|
||||
name="datum"
|
||||
v-model="statusData['datum']"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
format="dd.MM.yyyy"
|
||||
preview-format="dd.MM.yyyy"
|
||||
:teleport="true"
|
||||
></form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="bestaetigtam" class="form-label col-sm-4">Bestätigt am</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="DatePicker"
|
||||
:readonly="readonly"
|
||||
name="datum"
|
||||
v-model="statusData['bestaetigtam']"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
format="dd.MM.yyyy"
|
||||
preview-format="dd.MM.yyyy"
|
||||
:teleport="true"
|
||||
></form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="bewerbung_abgeschicktamum" class="form-label col-sm-4">B. abgeschickt am</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="DatePicker"
|
||||
:readonly="readonly"
|
||||
name="datum"
|
||||
v-model="statusData['bewerbung_abgeschicktamum']"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
format="dd.MM.yyyy"
|
||||
preview-format="dd.MM.yyyy"
|
||||
:teleport="true"
|
||||
></form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="bezeichnung" class="form-label col-sm-4">Studienplan</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
:readonly="readonly"
|
||||
type="select"
|
||||
name="studienplan"
|
||||
v-model="statusData['studienplan_id']"
|
||||
>
|
||||
<option v-for="sp in listStudienplaene" :key="sp.studienplan_id" :value="sp.studienplan_id">{{sp.bezeichnung}}</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="anmerkung" class="form-label col-sm-4">Anmerkung</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="anmerkung"
|
||||
v-model="statusData['anmerkung']"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="aufnahmestufe" class="form-label col-sm-4">Aufnahmestufe</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="select"
|
||||
:readonly="readonly"
|
||||
name="aufnahmestufe"
|
||||
v-model="statusData['rt_stufe']"
|
||||
>
|
||||
<option v-for="entry in aufnahmestufen" :key="entry" :value="entry">{{entry}}</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--TODO(manu): ganzes Feld ausblenden, wenn kein Statusgrund?-->
|
||||
<div class="row mb-3">
|
||||
<label for="grund" class="form-label col-sm-4">Grund</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="select"
|
||||
:readonly="readonly"
|
||||
name="statusgrund"
|
||||
v-model="statusData['statusgrund_id']"
|
||||
>
|
||||
<option v-for="grund in gruende" :key="grund.statusgrund_id" :value="grund.statusgrund_id">{{grund.beschreibung[0]}}</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form-form>
|
||||
|
||||
<template #footer>
|
||||
<button type="button" class="btn btn-primary" @click="addNewStatus()">OK</button>
|
||||
</template>
|
||||
|
||||
</BsModal>
|
||||
|
||||
<!--Modal: Edit Status-->
|
||||
<BsModal ref="editStatusModal">
|
||||
<template #title>Status bearbeiten</template>
|
||||
<form-form class="row g-3" ref="statusData">
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="status_kurzbz" class="form-label col-sm-4">Rolle</label>
|
||||
<div class="col-sm-6">
|
||||
<!-- <form-input type="text" :readonly="readonly" class="form-control" id="status_kurzbz" v-model="statusData['status_kurzbz']">-->
|
||||
<form-input
|
||||
required
|
||||
v-model="statusData['status_kurzbz']"
|
||||
name="status_kurzbz"
|
||||
type="select"
|
||||
>
|
||||
<option value="Interessent">InteressentIn</option>
|
||||
<option value="Bewerber">BewerberIn</option>
|
||||
<option value="Aufgenommener">Aufgenommene/r</option>
|
||||
<option value="Student">StudentIn</option>
|
||||
<option value="Unterbrecher">UnterbrecherIn</option>
|
||||
<option value="Diplomand">DiplomandIn</option>
|
||||
<option value="Incoming">Incoming</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="studiensemester_kurzbz" class="form-label col-sm-4">Studiensemester</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
:readonly="readonly"
|
||||
type="select"
|
||||
name="studiensemester_kurzbz"
|
||||
v-model="statusData['studiensemester_kurzbz']"
|
||||
> <!--TODO(manu) default aktueller Eintrag-->
|
||||
<option v-for="sem in listStudiensemester" :key="sem.studiensemester_kurzbz" :value="sem.studiensemester_kurzbz">{{sem.studiensemester_kurzbz}}</option>
|
||||
</form-input>f
|
||||
</div>
|
||||
</div>
|
||||
<!-- TODO(manu) if(defined('VORRUECKUNG_STATUS_MAX_SEMESTER') && VORRUECKUNG_STATUS_MAX_SEMESTER==false)-->
|
||||
<div class="row mb-3">
|
||||
<label for="ausbildungssemester" class="form-label col-sm-4">Ausbildungssemester</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="select"
|
||||
:readonly="readonly"
|
||||
name="ausbildungssemester"
|
||||
v-model="statusData['ausbildungssemester']"
|
||||
>
|
||||
<option v-for="number in maxSem" :key="number" :value="number">{{ number }}</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="datum" class="form-label col-sm-4">Datum</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="DatePicker"
|
||||
:readonly="readonly"
|
||||
name="datum"
|
||||
v-model="statusData['datum']"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
format="dd.MM.yyyy"
|
||||
preview-format="dd.MM.yyyy"
|
||||
:teleport="true"
|
||||
></form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="bestaetigtam" class="form-label col-sm-4">Bestätigt am</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="DatePicker"
|
||||
:readonly="readonly"
|
||||
name="datum"
|
||||
v-model="statusData['bestaetigtam']"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
format="dd.MM.yyyy"
|
||||
preview-format="dd.MM.yyyy"
|
||||
:teleport="true"
|
||||
></form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="bewerbung_abgeschicktamum" class="form-label col-sm-4">B. abgeschickt am</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="DatePicker"
|
||||
:readonly="readonly"
|
||||
name="datum"
|
||||
v-model="statusData['bewerbung_abgeschicktamum']"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
format="dd.MM.yyyy"
|
||||
preview-format="dd.MM.yyyy"
|
||||
:teleport="true"
|
||||
></form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="bezeichnung" class="form-label col-sm-4">Studienplan</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
:readonly="readonly"
|
||||
type="select"
|
||||
name="studienplan"
|
||||
v-model="statusData['studienplan_id']"
|
||||
>
|
||||
<option v-for="sp in listStudienplaene" :key="sp.studienplan_id" :value="sp.studienplan_id">{{sp.bezeichnung}}</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="anmerkung" class="form-label col-sm-4">Anmerkung</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="anmerkung"
|
||||
v-model="statusData['anmerkung']"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="aufnahmestufe" class="form-label col-sm-4">Aufnahmestufe</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="select"
|
||||
:readonly="readonly"
|
||||
name="aufnahmestufe"
|
||||
v-model="statusData['rt_stufe']"
|
||||
>
|
||||
<option v-for="entry in aufnahmestufen" :key="entry" :value="entry">{{entry}}</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--TODO(manu): ganzes Feld ausblenden, wenn kein Statusgrund?-->
|
||||
<div class="row mb-3">
|
||||
<label for="grund" class="form-label col-sm-4">Grund</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="select"
|
||||
:readonly="readonly"
|
||||
name="statusgrund"
|
||||
v-model="statusData['statusgrund_id']"
|
||||
>
|
||||
<option v-for="grund in gruende" :key="grund.statusgrund_id" :value="grund.statusgrund_id">{{grund.beschreibung[0]}}</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form-form>
|
||||
|
||||
<template #footer>
|
||||
<button type="button" class="btn btn-primary" @click="editStatus()">OK</button>
|
||||
</template>
|
||||
|
||||
</BsModal>
|
||||
|
||||
<!--Modal: Delete Status-->
|
||||
<BsModal ref="deleteStatusModal">
|
||||
<template #title>Status löschen</template>
|
||||
<template #default>
|
||||
<p>Prestudentstatus {{statusData.status_kurzbz}} (id: {{statusData.prestudent_id}}
|
||||
/ {{statusData.studiensemester_kurzbz}}) im {{statusData.ausbildungssemester}}. Ausbildungssemester wirklich löschen?</p>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button ref="Close" type="button" class="btn btn-primary" @click="deleteStatus()">OK</button>
|
||||
</template>
|
||||
</BsModal>
|
||||
|
||||
|
||||
<core-filter-cmpt
|
||||
ref="table"
|
||||
:tabulator-options="tabulatorOptions"
|
||||
@@ -156,9 +581,10 @@ export default{
|
||||
:side-menu="false"
|
||||
reload
|
||||
new-btn-show
|
||||
new-btn-label="Neu"
|
||||
@click:new="actionNewAdress"
|
||||
new-btn-label="Status"
|
||||
@click:new="actionNewStatus"
|
||||
>
|
||||
</core-filter-cmpt>
|
||||
|
||||
</div>`
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user