Merge branch 'feature-69452/studvw_status_aktion_vorruecken_ausblenden_via_config'

This commit is contained in:
Harald Bamberger
2025-12-10 14:07:45 +01:00
5 changed files with 38 additions and 13 deletions
@@ -331,7 +331,10 @@ class Config extends FHCAPI_Controller
];
$result['status'] = [
'title' => 'Status',
'component' => absoluteJsImportUrl('public/js/components/Stv/Studentenverwaltung/Details/MultiStatus.js')
'component' => absoluteJsImportUrl('public/js/components/Stv/Studentenverwaltung/Details/MultiStatus.js'),
'config' => [
'showStatusVorruecken' => defined('STATUS_VORRUECKEN_ANZEIGEN') ? STATUS_VORRUECKEN_ANZEIGEN : true,
]
];
$result['documents'] = [
'title' => $this->p->t('stv', 'tab_documents'),
@@ -1341,6 +1341,7 @@ class Status extends FHCAPI_Controller
'updateamum' => date('c'),
'updatevon' => $authUID
];
$nullableFields = ['statusgrund_id', 'anmerkung', 'rt_stufe'];
foreach ([
'orgform_kurzbz',
'anmerkung',
@@ -1349,8 +1350,17 @@ class Status extends FHCAPI_Controller
'rt_stufe',
'statusgrund_id'
] as $key)
if ($this->input->post($key))
{
if (in_array($key, $nullableFields))
{
$updateData[$key] = ($this->input->post($key) === '') ? null : $this->input->post($key);
}
else if ($this->input->post($key))
{
$updateData[$key] = $this->input->post($key);
}
}
if ($this->input->post('bestaetigtam')) {
$updateData['bestaetigtam'] = $this->input->post('bestaetigtam');
+4
View File
@@ -360,4 +360,8 @@ define('SANCHO_MAIL_HEADER_IMG', 'sancho_header_DEFAULT.jpg');
// footer image for eigene Mails
define('SANCHO_MAIL_FOOTER_IMG', 'sancho_footer_DEFAULT.jpg');
// Gibt an, ob in der StudVW der Status vorgerueckt werden kann
define('STATUS_VORRUECKEN_ANZEIGEN', true);
?>
@@ -7,10 +7,14 @@ export default {
},
props: {
modelValue: Object,
config: {
type: Object,
default: {}
}
},
template: `
<div class="stv-details-multistatus h-100">
<tbl-multi-status :model-value="modelValue"></tbl-multi-status>
<tbl-multi-status :model-value="modelValue" :config="config"></tbl-multi-status>
</div>
`
}
@@ -51,7 +51,8 @@ export default{
}
},
props: {
modelValue: Object
modelValue: Object,
config: Object,
},
data() {
return {
@@ -175,15 +176,18 @@ export default{
const data = cell.getData();
let button = document.createElement('button');
button.className = 'btn btn-outline-secondary btn-action';
button.innerHTML = '<i class="fa fa-forward"></i>';
button.title = this.$p.t('ui', 'btn_statusVorruecken');
button.addEventListener('click', () =>
this.actionAdvanceStatus(data.status_kurzbz, data.studiensemester_kurzbz, data.ausbildungssemester)
);
if (!['Student', 'Diplomand', 'Unterbrecher'].includes(data.status_kurzbz))
button.disabled = true;
container.append(button);
if (this.config?.showStatusVorruecken !== false)
{
button.className = 'btn btn-outline-secondary btn-action';
button.innerHTML = '<i class="fa fa-forward"></i>';
button.title = this.$p.t('ui', 'btn_statusVorruecken');
button.addEventListener('click', () =>
this.actionAdvanceStatus(data.status_kurzbz, data.studiensemester_kurzbz, data.ausbildungssemester)
);
if (!['Student', 'Diplomand', 'Unterbrecher'].includes(data.status_kurzbz))
button.disabled = true;
container.append(button);
}
button = document.createElement('button');
button.className = 'btn btn-outline-secondary btn-action';