Added shop and checkout to the CMS
Checkout is done with stripe Added reservation system
This commit is contained in:
parent
09e54033dd
commit
702d99b9ed
42 changed files with 3332 additions and 21 deletions
31
app/src/lib/admin/editors/CheckoutBlockEditor.svelte
Normal file
31
app/src/lib/admin/editors/CheckoutBlockEditor.svelte
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<script lang="ts">
|
||||
import type { ContentBlock, CheckoutBlockData } from '$lib/types';
|
||||
|
||||
let {
|
||||
block,
|
||||
onChange = (b: ContentBlock) => {}
|
||||
} = $props<{
|
||||
block: ContentBlock;
|
||||
onChange?: (b: ContentBlock) => void;
|
||||
}>();
|
||||
|
||||
function updateData(patch: Partial<CheckoutBlockData>) {
|
||||
onChange({ ...block, data: { ...block.data, ...patch } });
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="space-y-4">
|
||||
<label class="form-control w-full">
|
||||
<div class="label"><span class="label-text">Title</span></div>
|
||||
<input class="input input-bordered w-full" value={block.data.title || ''} oninput={(e) => updateData({ title: e.currentTarget.value })} />
|
||||
</label>
|
||||
<label class="form-control w-full">
|
||||
<div class="label"><span class="label-text">Heading</span></div>
|
||||
<input class="input input-bordered w-full" value={block.data.heading || ''} oninput={(e) => updateData({ heading: e.currentTarget.value })} />
|
||||
</label>
|
||||
<label class="form-control w-full">
|
||||
<div class="label"><span class="label-text">Notes label</span></div>
|
||||
<input class="input input-bordered w-full" placeholder="Notes or special requests" value={block.data.notesLabel || ''} oninput={(e) => updateData({ notesLabel: e.currentTarget.value })} />
|
||||
</label>
|
||||
<p class="text-sm text-base-content/60">Customer fields (name, email, phone, notes) and the payment flow are fixed and cannot be changed here.</p>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue