@@ -74,15 +74,12 @@ const descriptionBackup = ref(resource.description)
7474
7575function 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
8482async 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() {
171164const titleEditMode = ref <boolean >(false )
172165
173166async 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