ability to mock stores stubbed
This commit is contained in:
+38
-5
@@ -1,11 +1,15 @@
|
||||
{{- $acctID := .PathParams.acctID }}
|
||||
{{- $platform := .PathParams.platform }}
|
||||
{{- $parsedPlatform := parsePlatform $platform }}
|
||||
|
||||
<details
|
||||
open
|
||||
name={{$platform}}
|
||||
class="
|
||||
flex flex-col items-center
|
||||
open:mb-[2em]
|
||||
open:pb-[1em]
|
||||
open:border-b-[1px]
|
||||
open:border-b-background
|
||||
open:mb-[1em]
|
||||
|
||||
group/create-mock-shop
|
||||
|
||||
@@ -52,7 +56,35 @@
|
||||
</h4>
|
||||
</summary>
|
||||
|
||||
<form class="px-[2em] py-[0.5em]">
|
||||
<ul class="flex flex-col items-center my-[0.5em]">
|
||||
{{- $shops := .Accounts.ListMockShopsForPlatform $acctID $parsedPlatform }}
|
||||
{{- range $shop := $shops }}
|
||||
<li>
|
||||
<a
|
||||
href={{ printf "/ui/accounts/%d/platforms/%s/mock-shops/%s" $acctID $platform $shop.ShopID }}
|
||||
hx-boost="false"
|
||||
class="
|
||||
border-foreground
|
||||
border-solid
|
||||
border-thin
|
||||
bg-card
|
||||
font-semibold
|
||||
rounded-md
|
||||
p-[0.5em]
|
||||
m-[0.25em]
|
||||
block
|
||||
"
|
||||
>
|
||||
{{ $shop.Name }}
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
|
||||
<form
|
||||
class="px-[2em] py-[0.5em]"
|
||||
hx-post={{printf "/api/accounts/%d/platforms/%s/shops/mocks" $acctID $platform}}
|
||||
>
|
||||
<div
|
||||
class="
|
||||
grid grid-cols-[max-content_max-content]
|
||||
@@ -72,6 +104,8 @@
|
||||
bg-card
|
||||
border-input border-[1px] rounded
|
||||
"
|
||||
required
|
||||
minlength="5"
|
||||
/>
|
||||
<!--label>
|
||||
TODO:
|
||||
@@ -95,7 +129,7 @@
|
||||
</details>
|
||||
|
||||
<details
|
||||
open
|
||||
name={{$platform}}
|
||||
class="
|
||||
flex flex-col items-center
|
||||
|
||||
@@ -144,6 +178,5 @@
|
||||
</h4>
|
||||
</summary>
|
||||
|
||||
{{/* TODO: how to remove the platform from the path twice? */}}
|
||||
{{ component ( printf "/accounts/%d/platform-links/%s" $acctID $platform ) }}
|
||||
</details>
|
||||
|
||||
Reference in New Issue
Block a user