Fix delete function and type
This commit is contained in:
parent
94e9a09aea
commit
3d22ee9cfa
@ -110,11 +110,11 @@ onMounted(() => {
|
||||
</q-card-actions>
|
||||
<q-card-section class="text-center q-pa-none">
|
||||
<p class="text-grey-6">
|
||||
{{ isRegistration ? 'Have an account?' : 'Not reigistered?' }}
|
||||
{{ isRegistration ? 'Have an account?' : 'Not registered?' }}
|
||||
<a
|
||||
href="#"
|
||||
@click="isRegistration = !isRegistration; checkForm()"
|
||||
>{{ isRegistration ? 'Login' : 'Created an Account' }}</a>
|
||||
>{{ isRegistration ? 'Login' : 'Create an Account' }}</a>
|
||||
</p>
|
||||
</q-card-section>
|
||||
</template>
|
||||
|
@ -385,16 +385,7 @@ const deleteEditorPage = async (close = false) => {
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
})
|
||||
|
||||
const result = (await response.json()) as unknown as any
|
||||
if (!result.success) {
|
||||
return alert('Failed to delete page: ' + result.message)
|
||||
}
|
||||
|
||||
editorPageId.value = result.data.pageId
|
||||
if ( close ) {
|
||||
await router.push('/Listings')
|
||||
}
|
||||
}
|
||||
|
||||
const loadEditorPage = async () => {
|
||||
@ -597,7 +588,7 @@ onMounted(() => {
|
||||
<q-btn fab icon="close" title="Save and close" color="primary" @click="() => saveEditorPage(true)"/>
|
||||
</q-page-sticky>
|
||||
<q-page-sticky position="top-right" :offset="[18, 162]">
|
||||
<q-btn fab icon="delete_forever" title="Delete forever" color="primary" @click=""/>
|
||||
<q-btn fab icon="delete_forever" title="Delete forever" color="primary" @click="() => deleteEditorPage()"/>
|
||||
</q-page-sticky>
|
||||
|
||||
<q-page-sticky position="bottom-right" :offset="[32, 32]">
|
||||
|
Loading…
Reference in New Issue
Block a user