Merge pull request 'hid the delete button from everyone but the owner of the list' (#13) from hide-delete-from-admin into main
Reviewed-on: #13
This commit is contained in:
commit
82043b4663
1 changed files with 3 additions and 1 deletions
|
|
@ -55,6 +55,8 @@ const deleteList = () => {
|
|||
|
||||
const roles = ref<Role[]>([])
|
||||
|
||||
const isOwner = computed(() => props.list.role === 'OWNER');
|
||||
|
||||
const getRoles = () => {
|
||||
return $api<ResourceResponse<Role[]>>(`/api/roles`, {
|
||||
method: 'GET'
|
||||
|
|
@ -127,7 +129,7 @@ getRoles()
|
|||
<span v-if="responseMessage">{{ responseMessage }}</span>
|
||||
</form>
|
||||
</li>
|
||||
<li class="list-setting">
|
||||
<li v-if="isOwner" class="list-setting">
|
||||
<label for="delete-list-button">Delete MovieList</label>
|
||||
<ButtonAction button-color="danger" button-text="Delete" @action="deleteList"/>
|
||||
</li>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue