This commit is contained in:
2023-07-28 08:38:41 +10:00
parent 31ed355d64
commit ac94068864
5 changed files with 33 additions and 37 deletions

View File

@@ -6,29 +6,29 @@
:back-link="{ name: 'dashboard-article-list' }"
back-title="Back to Articles" />
<SMLoading v-if="form.loading()" />
<div v-else class="max-w-7xl mx-auto px-8 mt-8">
<div v-else class="max-w-4xl mx-auto px-4 mt-8">
<SMForm
:model-value="form"
@submit="handleSubmit"
@failed-validation="handleFailValidation">
<div>
<SMInput
class="mb-8"
class="mb-4"
control="title"
autofocus
@blur="updateSlug()" />
</div>
<div class="flex flex-col md:flex-row gap-4">
<SMInput class="mb-8" control="slug" />
<SMInput class="mb-4" control="slug" />
<SMInput
class="mb-8"
class="mb-4"
type="datetime"
control="publish_at"
label="Publish Date" />
</div>
<div>
<SMSelectImage
class="mb-8"
class="mb-4"
control="hero"
label="Hero image"
required
@@ -36,7 +36,7 @@
</div>
<div>
<SMDropdown
class="mb-8"
class="mb-4"
control="user_id"
label="Created By"
type="select"
@@ -44,20 +44,18 @@
</div>
<div>
<SMEditor
class="mb-8"
class="mb-4"
v-model:model-value="form.controls.content.value" />
</div>
<div class="mb-8">
<h3>Gallery</h3>
<p class="small">
{{ gallery.length }} image{{
gallery.length != 1 ? "s" : ""
}}
</p>
<SMImageGallery show-editor v-model:model-value="gallery" />
</div>
<h2 class="mt-8">Gallery</h2>
<p class="small">
{{ gallery.length }} image{{
gallery.length != 1 ? "s" : ""
}}
</p>
<SMImageGallery show-editor v-model:model-value="gallery" />
<SMAttachments
class="mb-8"
class="mb-4"
show-editor
v-model:model-value="attachments" />
<div class="flex flex-justify-end">

View File

@@ -5,16 +5,17 @@
:title="pageHeading"
:back-link="{ name: 'dashboard-event-list' }"
back-title="Back to Events" />
<div class="max-w-7xl mx-auto mt-8 px-8">
<div class="max-w-4xl mx-auto px-4 mt-8">
<SMLoading v-if="pageLoading" />
<SMForm
v-else
:model-value="form"
@submit="handleSubmit"
@failed-validation="handleFailValidation">
<div class="flex gap-4 mb-8">
<SMInput control="title" />
<div class="flex gap-4">
<SMInput class="mb-4" control="title" />
<SMDropdown
class="mb-4"
control="location"
type="select"
:options="{
@@ -87,17 +88,17 @@
:label="registration_data?.title"
:type="registration_data?.type" />
</div>
<div class="mb-8">
<div class="mb-4">
<SMSelectImage
control="hero"
label="Hero image"
allow-upload />
</div>
<SMEditor
class="mb-8"
class="mb-4"
v-model:model-value="form.controls.content.value" />
<SMAttachments
class="mb-8"
class="mb-4"
show-editor
v-model:model-value="attachments" />
<div class="flex flex-justify-end">

View File

@@ -6,7 +6,7 @@
:back-link="{ name: 'dashboard-media-list' }"
back-title="Back to Media" />
<SMLoading v-if="form.loading()" />
<div v-else class="max-w-7xl mx-auto px-8 mt-8">
<div v-else class="max-w-4xl mx-auto px-4 mt-8">
<SMForm
:model-value="form"
@submit="handleSubmit"

View File

@@ -14,15 +14,15 @@
: 'Back to Dashboard'
" />
<SMLoading v-if="form.loading()" />
<div v-else class="max-w-4xl mx-auto px-4 mt-12">
<div v-else class="max-w-4xl mx-auto px-4 mt-8">
<SMForm :model-value="form" @submit="handleSubmit">
<SMInput class="mb-8" control="code" />
<SMInput class="mb-4" control="code" />
<SMInput
class="mb-8"
class="mb-4"
type="static"
v-model="used"
label="Times used" />
<SMInput class="mb-8" control="url" />
<SMInput class="mb-4" control="url" />
<input
role="button"

View File

@@ -16,17 +16,17 @@
: 'Back to Dashboard'
" />
<SMLoading v-if="form.loading()" />
<div v-else class="max-w-4xl mx-auto px-8 mb-8">
<div v-else class="max-w-4xl mx-auto px-4 mt-8">
<SMForm :model-value="form" @submit="handleSubmit">
<SMInput class="mb-8" control="display_name" autofocus />
<SMInput class="mb-8" control="email" type="email" />
<SMInput class="mb-8" control="first_name"
<SMInput class="mb-4" control="display_name" autofocus />
<SMInput class="mb-4" control="email" type="email" />
<SMInput class="mb-4" control="first_name"
>This field is optional</SMInput
>
<SMInput class="mb-8" control="last_name"
<SMInput class="mb-4" control="last_name"
>This field is optional</SMInput
>
<SMInput class="mb-8" control="phone"
<SMInput class="mb-4" control="phone"
>This field is optional</SMInput
>
<template v-if="userStore.permissions.includes('admin/users')">
@@ -79,7 +79,6 @@ import { userHasPermission } from "../../helpers/utils";
import SMLoading from "../../components/SMLoading.vue";
import SMPageStatus from "../../components/SMPageStatus.vue";
import SMCheckbox from "../../components/SMCheckbox.vue";
import { initCard } from "../../helpers/square";
const route = useRoute();
const router = useRouter();
@@ -259,8 +258,6 @@ const computedSubmitLabel = computed(() => {
return isCreating ? "Create" : "Update";
});
const refPaymentForm = ref(null);
loadData();
// initCard();
</script>