Skip to content

Commit 7b387bf

Browse files
committed
chore: Clean up
1 parent 0f460b9 commit 7b387bf

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

components/card/name.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script setup lang="ts">
22
import {IconEdit, IconIdBadge2} from "@tabler/icons-vue";
3-
import type {v2Author, v2Stats} from "~/composables/aruna_api_json";
43
54
// v-model
65
const editMode = defineModel<boolean>('editMode')

pages/objects/[id].vue

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,12 @@ const descriptionBackup = ref(resource.description)
7474
7575
function isEditable(): boolean {
7676
if (resource) {
77-
return [v2PermissionLevel.PERMISSION_LEVEL_ADMIN,
78-
v2PermissionLevel.PERMISSION_LEVEL_WRITE].includes(resource.permission)
79-
//&& resource.variant !== v2ResourceVariant.RESOURCE_VARIANT_OBJECT
77+
return [v2PermissionLevel.PERMISSION_LEVEL_ADMIN, v2PermissionLevel.PERMISSION_LEVEL_WRITE].includes(resource.permission)
8078
}
8179
return false
8280
}
8381
8482
async function updateDescription(description: string) {
85-
console.info('[LandingPage] Updated description:', description)
8683
if (resource) {
8784
let apiEndpoint = undefined
8885
switch (resource.variant) {
@@ -100,7 +97,6 @@ async function updateDescription(description: string) {
10097
break
10198
}
10299
103-
const anyParent = incomingRelations.value.find(rel => rel?.definedVariant === v2InternalRelationVariant.INTERNAL_RELATION_VARIANT_BELONGS_TO)
104100
const request = resource.variant === v2ResourceVariant.RESOURCE_VARIANT_OBJECT ? {
105101
name: undefined,
106102
description: description,
@@ -118,14 +114,11 @@ async function updateDescription(description: string) {
118114
description: description,
119115
}
120116
121-
console.info('[LandingPage] Update description request:', request)
122-
123-
// Show error if somehow this gets called for an Object
117+
// Show error if somehow this gets called for an unspecified resource
124118
if (!apiEndpoint) {
125119
toast({
126120
title: 'Error',
127-
//description: 'Something went wrong. If this problem persists please contact an administrator.',
128-
description: `Title editing for the current resource is not yet implemented.`,
121+
description: `Title editing for the current resource should not be possible.`,
129122
variant: 'destructive',
130123
duration: 10000,
131124
})
@@ -171,7 +164,6 @@ function cancelDescriptionEdit() {
171164
const titleEditMode = ref<boolean>(false)
172165
173166
async function updateTitle(newTitle: string | undefined) {
174-
console.info('[LandingPage] Updated title:', newTitle)
175167
if (resource) {
176168
let apiEndpoint = undefined
177169
switch (resource.variant) {
@@ -189,19 +181,17 @@ async function updateTitle(newTitle: string | undefined) {
189181
break
190182
}
191183
192-
// Show error if somehow this gets called for an Object
184+
// Show error if somehow this gets called for an unspecified resource
193185
if (!apiEndpoint) {
194186
toast({
195187
title: 'Error',
196-
//description: 'Something went wrong. If this problem persists please contact an administrator.',
197-
description: `Title editing for the current resource is not yet implemented.`,
188+
description: `Title editing for the current resource should not be possible.`,
198189
variant: 'destructive',
199190
duration: 10000,
200191
})
201192
return
202193
}
203194
204-
console.info('[LandingPage] Call API endpoint:', apiEndpoint)
205195
await $fetch(apiEndpoint, {
206196
method: 'POST',
207197
body: {

0 commit comments

Comments
 (0)