mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
refactor
This commit is contained in:
@@ -149,6 +149,15 @@ class Content_model extends DB_Model
|
||||
"menu_open": false,
|
||||
"aktiv": true,
|
||||
"childs": []
|
||||
},
|
||||
{
|
||||
"content_id": 1000007,
|
||||
"template_kurzbz": "redirect",
|
||||
"titel": "Anrechnung",
|
||||
"content": "<content><url><![CDATA[' . site_url('/lehre/anrechnung/RequestAnrechnung') . ']]></url><target><![CDATA[]]></target></content>",
|
||||
"menu_open": false,
|
||||
"aktiv": true,
|
||||
"childs": []
|
||||
}
|
||||
]
|
||||
}');
|
||||
|
||||
@@ -46,7 +46,7 @@ if (!isset($menu)) {
|
||||
<img src="<?= site_url('Cis/Pub/bild/person/' . getAuthPersonId()); ?>" class="avatar rounded-circle"/>
|
||||
</button>
|
||||
<ul id="nav-user-menu" class="collapse list-unstyled" aria-labelledby="nav-user-btn">
|
||||
<li><a class="btn btn-level-2 rounded-0 d-block" href="/cis.php/Cis/Profil" id="menu-profil">Profil</a></li>
|
||||
<li><a class="btn btn-level-2 rounded-0 d-block" href="<?= site_url('Cis/Profil'); ?>" id="menu-profil">Profil</a></li>
|
||||
<li><a class="btn btn-level-2 rounded-0 d-block" href="#">Ampeln</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="btn btn-level-2 rounded-0 d-block" href="<?= site_url('Cis/Auth/logout'); ?>">Logout</a></li>
|
||||
|
||||
@@ -234,6 +234,13 @@ const profilApp = Vue.createApp({
|
||||
data:kontakt
|
||||
}})
|
||||
},
|
||||
Password_Change : {
|
||||
title:"Passwort Ändern",
|
||||
view:"ChangePassword",
|
||||
data:{
|
||||
test:"testvalue",
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
@@ -174,7 +174,7 @@ export default {
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<edit-profil-select @submit="submitProfilChange" v-model:breadcrumb="breadcrumb" v-model:topic="topic" v-model:profilUpdate="profilUpdate" ariaLabel="test" :list="editData"></edit-profil-select>
|
||||
<edit-profil-select @submit="submitProfilChange" v-model:breadcrumb="breadcrumb" v-model:topic="topic" v-model:profilUpdate="profilUpdate" ariaLabel="select" :list="editData"></edit-profil-select>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
@@ -71,7 +71,7 @@ export default {
|
||||
typ: null,
|
||||
plz: null,
|
||||
ort: null,
|
||||
zustelladresse:false,
|
||||
zustelladresse: false,
|
||||
}
|
||||
: {
|
||||
//? add flag
|
||||
@@ -133,47 +133,30 @@ export default {
|
||||
},
|
||||
mounted() {},
|
||||
|
||||
template: `
|
||||
template: /*html*/ `
|
||||
<template v-if="!view">
|
||||
|
||||
<div class="list-group">
|
||||
<template v-for="item in data">
|
||||
<div class="d-flex flex-row align-items-center">
|
||||
<button style="position:relative" type="button" class=" list-group-item list-group-item-action" @click="updateOptions($event,item)" >
|
||||
|
||||
<p v-if="item.title" class="my-1" >{{item.title}}</p>
|
||||
<!-- this is used for multiple elements in the select -->
|
||||
<div class="my-2 me-4" v-else>
|
||||
<component :is="item.listview" v-bind="item"></component>
|
||||
</div>
|
||||
</button>
|
||||
<button v-if="item.listview" @click="deleteItem(item)" type="button" class="mx-3 btn btn-danger btn-circle"><i class="fa fa-trash"></i>
|
||||
<div class="list-group">
|
||||
<template v-for="item in data">
|
||||
<div class="d-flex flex-row align-items-center">
|
||||
<button style="position:relative" type="button" class=" list-group-item list-group-item-action" @click="updateOptions($event,item)" >
|
||||
<!-- render title of options -->
|
||||
<p v-if="item.title" class="my-1" >{{item.title}}</p>
|
||||
<!-- else render list view of items -->
|
||||
<div v-else class="my-2 me-4" >
|
||||
<component :is="item.listview" v-bind="item"></component>
|
||||
</div>
|
||||
</button>
|
||||
<button v-if="item.listview" @click="deleteItem(item)" type="button" class="mx-3 btn btn-danger btn-circle"><i class="fa fa-trash"></i>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div v-if="Array.isArray(data)" class="mt-4 d-flex justify-content-center">
|
||||
<button @click="addItem" type="button" class="btn btn-primary btn-circle"><i class="fa fa-plus"></i>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div v-if="Array.isArray(data)" class="mt-4 d-flex justify-content-center">
|
||||
|
||||
<button @click="addItem" type="button" class="btn btn-primary btn-circle"><i class="fa fa-plus"></i>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<div v-else-if="view==='text_input'" class="form-underline">
|
||||
|
||||
<div class="form-underline-titel">{{data.titel?data.titel:'titel'}}</div>
|
||||
|
||||
<input class="form-control" @input="$emit('update:profilUpdate',data.value)" v-model="data.value" :placeholder="data.value">
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if it not a normal text input field then reder the custom edit input component -->
|
||||
<!-- custom component is required to emit an profilUpdate event to register the new entered value -->
|
||||
<template v-else>
|
||||
|
||||
<!-- receives two events, one for normal data update and one when a file has to be stored to the database -->
|
||||
<component @profilUpdate="profilUpdateEmit" :is="view" v-bind="properties" :data="data" ></component>
|
||||
<component @profilUpdate="profilUpdateEmit" :is="view" v-bind="properties" :data="data" ></component>
|
||||
</template>
|
||||
`,
|
||||
};
|
||||
|
||||
@@ -160,7 +160,7 @@ export default {
|
||||
setLoading:this.setLoading,
|
||||
|
||||
}).then((popup_result) => {
|
||||
console.log("hello test");
|
||||
|
||||
if(popup_result){
|
||||
Vue.$fhcapi.ProfilUpdate.selectProfilRequest()
|
||||
.then((res) =>{
|
||||
|
||||
Reference in New Issue
Block a user