mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +00:00
fixes bug when getting all the profil update requests and makes it possible to add a message when dening or accepting a profil update
This commit is contained in:
@@ -45,7 +45,7 @@ export default {
|
||||
methods: {
|
||||
acceptRequest: function(){
|
||||
console.log(this.data.profil_update_id);
|
||||
Vue.$fhcapi.ProfilUpdate.acceptProfilRequest(this.data.profil_update_id).then(res =>{
|
||||
Vue.$fhcapi.ProfilUpdate.acceptProfilRequest(this.data).then(res =>{
|
||||
console.log("res",res);
|
||||
console.log("res.data",res.data);
|
||||
this.result = true;
|
||||
@@ -55,7 +55,7 @@ export default {
|
||||
|
||||
denyRequest: function(){
|
||||
console.log(this.data.profil_update_id);
|
||||
Vue.$fhcapi.ProfilUpdate.denyProfilRequest(this.data.profil_update_id).then(res =>{
|
||||
Vue.$fhcapi.ProfilUpdate.denyProfilRequest(this.data).then(res =>{
|
||||
console.log("res",res);
|
||||
console.log("res.data",res.data);
|
||||
this.result = true;
|
||||
@@ -116,44 +116,97 @@ export default {
|
||||
|
||||
|
||||
<template v-slot:default>
|
||||
<pre>{{JSON.stringify(data.profil_update_id,null,2)}}</pre>
|
||||
|
||||
<!-- debugging prints
|
||||
<pre>{{JSON.stringify(data.profil_update_id,null,2)}}</pre>
|
||||
<pre>view {{getComponentView}}</pre>
|
||||
<pre>topic {{JSON.stringify(data.topic,null,2)}}</pre>
|
||||
<pre>data {{JSON.stringify(data.requested_change,null,2)}}</pre>
|
||||
-->
|
||||
<div class="row">
|
||||
<div class="form-underline mb-2 col">
|
||||
<div class="form-underline-titel">Status: </div>
|
||||
|
||||
<div class="form-underline mb-2">
|
||||
<span class="form-underline-content" >{{data.status}}</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-underline mb-2 col">
|
||||
<div class="form-underline-titel">Date of Status: </div>
|
||||
|
||||
<span class="form-underline-content" >{{data.status_timestamp}}</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-underline mb-2 col">
|
||||
<div class="form-underline-titel">Status message: </div>
|
||||
|
||||
<span class="form-underline-content" >{{data.status_message? data.status_message : '-'}}</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-underline mb-2 col">
|
||||
<div class="form-underline-titel">UserID: </div>
|
||||
|
||||
<span class="form-underline-content" >{{data.uid}}</span>
|
||||
</div>
|
||||
|
||||
<div class="form-underline mb-2">
|
||||
|
||||
|
||||
|
||||
<div class="form-underline mb-2 col">
|
||||
<div class="form-underline-titel">Topic of Request: </div>
|
||||
|
||||
<span class="form-underline-content" >{{data.topic}}</span>
|
||||
</div>
|
||||
|
||||
<div class="form-underline mb-2">
|
||||
|
||||
|
||||
|
||||
<div class="form-underline mb-2 col">
|
||||
<div class="form-underline-titel">Date of Request:</div>
|
||||
|
||||
<span class="form-underline-content" >{{data.change_timestamp}}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row my-4">
|
||||
<div class="col ">
|
||||
<div class="card">
|
||||
<div class="card-header">update</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div v-if="getComponentView==='text_input'" class="form-underline mb-2">
|
||||
<div class="form-underline-titel">{{data.topic}}</div>
|
||||
|
||||
<span class="form-underline-content" >{{data.requested_change}}</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<component v-else :is="getComponentView" :data="data.requested_change"></component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<template v-slot:footer>
|
||||
<button @click="acceptRequest" class="btn btn-primary">Accept <i class="fa fa-check"></i></button>
|
||||
<button @click="denyRequest" class="btn btn-danger">Deny <i class="fa fa-xmark"></i></button>
|
||||
<template v-if="data.status === 'pending'" v-slot:footer>
|
||||
<div class="form-underline flex-fill">
|
||||
<div class="form-underline-titel">Message</div>
|
||||
|
||||
<div class="d-flex flex-row gap-2">
|
||||
<input class="form-control " v-model="data.status_message" >
|
||||
<button @click="acceptRequest" class="text-nowrap btn btn-primary">Accept <i class="fa fa-check"></i></button>
|
||||
<button @click="denyRequest" class="text-nowrap btn btn-danger">Deny <i class="fa fa-xmark"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
</bs-modal>`,
|
||||
|
||||
Reference in New Issue
Block a user