moved website content to root
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
{{/* TODO: delete when done with the newer draft */}}
|
||||
{{- $dot := or .dot .}}
|
||||
|
||||
{{- $dot.Auth.ByMatchingAccountID 2 }}
|
||||
|
||||
{{- $acctID := $dot.Identity.Account.AccountID }}
|
||||
{{- $shops := $dot.Accounts.GetShops $acctID -}}
|
||||
|
||||
|
||||
<tr>
|
||||
{{- range $shop := $shops }}
|
||||
<td>
|
||||
<select
|
||||
class="min-w-fit cursor-pointer"
|
||||
_="
|
||||
on change
|
||||
set dataset to the dataset of the first of my selectedOptions
|
||||
|
||||
set listingShowcase to the <#listing-showcase/>
|
||||
if <#listing-showcase/> then
|
||||
send displayListing(
|
||||
id: dataset.id,
|
||||
name: dataset.name,
|
||||
description: dataset.description,
|
||||
count: dataset.count
|
||||
) to listingShowcase
|
||||
end
|
||||
|
||||
set the innerHTML of the next <td/> to the dataset.count
|
||||
"
|
||||
>
|
||||
<option disabled selected>- Listings -</option>
|
||||
{{/*- $listings := $dot.Accounts.GetListingsForShop $acctID $shop.ShopID }}
|
||||
{{- range $listing := $listings }}
|
||||
<option
|
||||
value="{{$listing.ListingID}}"
|
||||
data-id="{{$listing.ListingID}}"
|
||||
data-name="{{$listing.Name}}"
|
||||
data-description="{{$listing.Description}}"
|
||||
data-count="{{$listing.Count}}"
|
||||
>
|
||||
{{ $listing.Name }}
|
||||
</option>
|
||||
{{- end */}}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
{{- end }}
|
||||
<td>
|
||||
<button class="cursor-pointer underline w-full">
|
||||
Save
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<table class="max-w-full"
|
||||
id="listing-showcase"
|
||||
_="
|
||||
on displayListing(id, name, description, count)
|
||||
set innerHTML of <#listing-showcase-id/> to id
|
||||
set innerHTML of <#listing-showcase-name/> to name
|
||||
set innerHTML of <#listing-showcase-description/> to description
|
||||
set innerHTML of <#listing-showcase-count/> to count
|
||||
"
|
||||
>
|
||||
<thead>
|
||||
<th>
|
||||
ID
|
||||
</th>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Description
|
||||
</th>
|
||||
<th>
|
||||
Count
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<th id="listing-showcase-id">
|
||||
-
|
||||
</th>
|
||||
<th id="listing-showcase-name">
|
||||
-
|
||||
</th>
|
||||
<th id="listing-showcase-description">
|
||||
-
|
||||
</th>
|
||||
<th id="listing-showcase-count">
|
||||
-
|
||||
</th>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user