stubbed mock shop creation route
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@
|
||||
{{- range $shop := $shops }}
|
||||
<li>
|
||||
<a
|
||||
href={{ printf "/ui/accounts/%d/platforms/%s/mock-shops/%s" $acctID $platform $shop.ShopID }}
|
||||
href={{ printf "/ui/accounts/%d/platforms/%s/shops/mocks/%s" $acctID $platform $shop.ShopID }}
|
||||
hx-boost="false"
|
||||
class="
|
||||
border-foreground
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
{{ $acctID := .Identity.Account.AccountID }}
|
||||
{{ $platform := parsePlatform .PathParams.platform }}
|
||||
{{ $shopID := .PathParams.shopID }}
|
||||
{{- $shop := .Accounts.GetMockShop $acctID $platform $shopID }}
|
||||
|
||||
<h1 class="mt-[1em] text-center">
|
||||
{{ $shop.Name }}
|
||||
</h1>
|
||||
|
||||
<p class="m-[1em] text-center font-display">
|
||||
{{ .PathParams.platform | splitSnakeCase | capitalize }}
|
||||
</p>
|
||||
|
||||
<h2 class="mt-[5em] text-center block">
|
||||
A work in progress...
|
||||
</h2>
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
{{ $acctID := .Identity.Account.AccountID }}
|
||||
{{ $platform := parsePlatform .PathParams.platform }}
|
||||
{{ $shopID := .PathParams.shopID }}
|
||||
{{- $shop := .Accounts.GetMockShop $acctID $platform $shopID }}
|
||||
|
||||
<h1 class="mt-[1em] text-center">
|
||||
{{ $shop.Name }}
|
||||
</h1>
|
||||
|
||||
<p class="m-[1em] text-center font-display">
|
||||
{{ .PathParams.platform | splitSnakeCase | capitalize }}
|
||||
</p>
|
||||
|
||||
<section
|
||||
id="listing-section"
|
||||
hx-get={{ printf "/ui/accounts/%d/platforms/amazon/shops/mocks/%s" $acctID $shopID }}
|
||||
hx-trigger={{ printf "sse:accounts_%d_platforms_amazon_shops_mocks_%s_listings" $acctID $shopID }}
|
||||
hx-select="#listing-section"
|
||||
hx-swap="morph"
|
||||
>
|
||||
<header class="p-[1em]">
|
||||
<h2 class="text-center">
|
||||
Listings
|
||||
</h2>
|
||||
<h3 class="text-center">
|
||||
Add listings to your mock store to begin mocking store synchronization
|
||||
</h3>
|
||||
</header>
|
||||
|
||||
<div class="grid grid-cols-[1fr_1fr]">
|
||||
<form
|
||||
id="new-listing-form"
|
||||
hx-post={{ printf "/api/accounts/%d/platforms/amazon/shops/mocks/%s/listings" $acctID $shopID }}
|
||||
hx-swap="none"
|
||||
class="
|
||||
grid
|
||||
grid-cols-[max-content_1fr]
|
||||
grid-rows-[auto_auto_auto]
|
||||
gap-[0.5em]
|
||||
m-[0.5em]
|
||||
"
|
||||
>
|
||||
<label for="name">
|
||||
Name:
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="name"
|
||||
required
|
||||
minlength="5"
|
||||
placeholder="What's in a name..."
|
||||
class="bg-card p-[0.25em]"
|
||||
/>
|
||||
<label for="sku">
|
||||
SKU:
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="sku"
|
||||
required
|
||||
class="bg-card p-[0.25em]"
|
||||
/>
|
||||
<label for="description">
|
||||
Description:
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="description"
|
||||
required
|
||||
minlength="10"
|
||||
placeholder="Anything will do..."
|
||||
class="bg-card p-[0.25em]"
|
||||
/>
|
||||
{{ component "button"
|
||||
"Text" "Save Listing"
|
||||
"Class" "self-center p-[1em] col-span-2"
|
||||
}}
|
||||
</form>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
Listing 1
|
||||
</li>
|
||||
<li>
|
||||
Listing 2
|
||||
</li>
|
||||
<li>
|
||||
Listing 3
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<h2 class="mt-[5em] text-center block">
|
||||
A work in progress...
|
||||
</h2>
|
||||
Reference in New Issue
Block a user