mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 23:42:17 +00:00
Feld Bpk
This commit is contained in:
@@ -14,6 +14,13 @@ class Studentenverwaltung extends FHC_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('Studentenverwaltung');
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('PermissionLib');
|
||||
|
||||
$this->load->view('Studentenverwaltung', [
|
||||
'permissions' => [
|
||||
'student/bpk' => $this->permissionlib->isBerechtigt('student/bpk')
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
?>
|
||||
|
||||
<div id="main">
|
||||
<router-view active-addons="<?= defined('ACTIVE_ADDONS') ? ACTIVE_ADDONS : ''; ?>" cis-root="<?= CIS_ROOT; ?>"></router-view>
|
||||
<router-view active-addons="<?= defined('ACTIVE_ADDONS') ? ACTIVE_ADDONS : ''; ?>" cis-root="<?= CIS_ROOT; ?>" :permissions="<?= htmlspecialchars(json_encode($permissions)); ?>"></router-view>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer', $includesArray); ?>
|
||||
|
||||
@@ -31,11 +31,13 @@ export default {
|
||||
VerticalSplit
|
||||
},
|
||||
props: {
|
||||
permissions: Object,
|
||||
cisRoot: String,
|
||||
activeAddons: String // semicolon separated list of active addons
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
hasBpkPermission: this.permissions['student/bpk'],
|
||||
cisRoot: this.cisRoot,
|
||||
activeAddonBewerbung: this.activeAddons.split(';').includes('bewerbung')
|
||||
}
|
||||
|
||||
@@ -8,6 +8,10 @@ export default {
|
||||
FormUploadImage
|
||||
},
|
||||
inject: {
|
||||
showBpk: {
|
||||
from: 'hasBpkPermission',
|
||||
default: false
|
||||
},
|
||||
showZugangscode: {
|
||||
from: 'activeAddonBewerbung',
|
||||
default: false
|
||||
@@ -53,17 +57,6 @@ export default {
|
||||
.catch(err => {
|
||||
console.error(err.response.data || err.message);
|
||||
});
|
||||
/*CoreRESTClient
|
||||
.get('components/stv/Student/getStudent/' + n.uid)
|
||||
.then(result => result.data)
|
||||
.then(result => {
|
||||
// TODO(chris): IMPLEMENT HERE!
|
||||
console.log(result);
|
||||
this.studentIn = result;
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err.response.data || err.message);
|
||||
});*/
|
||||
},
|
||||
save() {
|
||||
CoreRESTClient
|
||||
@@ -98,9 +91,6 @@ export default {
|
||||
this.updateStudent(this.student);
|
||||
},
|
||||
//TODO(chris): Felder student_uid, person_id sperren, Personenkz
|
||||
/**
|
||||
* BPK: isBerechtigt 'student/bpk'
|
||||
*/
|
||||
template: `
|
||||
<div class="stv-details-details h-100 pb-3">
|
||||
<fieldset>
|
||||
@@ -115,8 +105,8 @@ export default {
|
||||
<div v-if="showZugangscode" class="col-sm-3">
|
||||
<a :href="cisRoot + 'addons/bewerbung/cis/registration.php?code=' + data.zugangscode + '&emailAdresse=' + data.email_privat" target="_blank">{{data.zugangscode}}</a>
|
||||
</div>
|
||||
<label for="stv-details-bpk" class="col-sm-1 col-form-label">BPK</label>
|
||||
<div class="col-sm-3">
|
||||
<label v-if="showBpk" for="stv-details-bpk" class="col-sm-1 col-form-label">BPK</label>
|
||||
<div v-if="showBpk" class="col-sm-3">
|
||||
<input id="stv-details-bpk" type="text" class="form-control" v-model="data.bpk">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user