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