installed gin

This commit is contained in:
2026-01-13 22:07:20 -07:00
parent 851234d9fa
commit 7481cec0d5
29 changed files with 544 additions and 1094 deletions
@@ -33,7 +33,7 @@
{{- $shops := $dot.Accounts.GetShops $acctID -}}
<select
class="min-w-fit cursor-pointer"
hx-put="/accounts/{{$acctID}}/inventory/sync-groups/draft/listings/{{$orderIndex}}/shop"
hx-put="/api/accounts/{{$acctID}}/inventory/sync-groups/draft/listings/{{$orderIndex}}/shop"
hx-vals='js:{
platform: event.target.value.replace(/-[^ ]*/, ""),
"shop-id": event.target.value.replace(/[^ ]*-/, "")
@@ -69,7 +69,7 @@
<select
class="min-w-fit cursor-pointer"
hx-put="/accounts/{{$acctID}}/inventory/sync-groups/draft/listings/{{$orderIndex}}/listing"
hx-put="/api/accounts/{{$acctID}}/inventory/sync-groups/draft/listings/{{$orderIndex}}/listing"
hx-vals='js:{
"listing-id": event.target.value,
}'
@@ -117,7 +117,7 @@
<td data-id="remove">
{{ componentBody "button-dev"
"HXDelete" (printf "/accounts/%d/inventory/sync-groups/draft/listings/%d" $acctID $orderIndex)
"HXDelete" (printf "/api/accounts/%d/inventory/sync-groups/draft/listings/%d" $acctID $orderIndex)
"HXTarget" "closest tr"
"HXSwap" "outerHTML"
"Text" "Remove"
@@ -59,9 +59,9 @@
"
>
{{- $listings := $dot.Accounts.GetSyncGroupListingDrafts $acctID }}
{{- range $i, $listing := $listings }}
{{- range $listing := $listings }}
{{- componentBody "accounts/{acctID}/inventory/sync-groups/draft/listings/{orderIndex}"
"dot" ($dot | addPathParam "orderIndex" $i)
"dot" ($dot | addPathParam "orderIndex" $listing.OrderIndex)
}}
{{- end }}
</tbody>
+6 -6
View File
@@ -17,7 +17,7 @@
>
<ul>
<li>
<a href="/">
<a href="/ui">
Home
</a>
</li>
@@ -33,7 +33,7 @@
{{- if not $userID }}
<li>
<a href="/login">
<a href="/api/auth/login">
Log In / Sign Up
</a>
</li>
@@ -41,25 +41,25 @@
{{- else if $acctID }}
<li>
<a href="/accounts/{{$acctID}}">
<a href="/ui/accounts/{{$acctID}}">
Account
</a>
</li>
<li>
<a href="/accounts/{{$acctID}}/reports">
<a href="/ui/accounts/{{$acctID}}/reports">
Reports
</a>
</li>
<li>
<a href="/accounts/{{$acctID}}/inventory">
<a href="/ui/accounts/{{$acctID}}/inventory">
Inventory
</a>
</li>
<li>
<a href="/logout">
<a href="/api/auth/logout">
Log Out
</a>
</li>
+6 -6
View File
@@ -29,7 +29,7 @@
<ul class="flex text-nowrap overflow-x-scroll overflow-y-hidden">
<li class="pt-[1em] pb-[1em]">
<a href="/" class="p-[1em] font-bold {{ if eq $path "/" }}selected{{ end }}">
<a href="/ui" class="p-[1em] font-bold {{ if eq $path "/" }}selected{{ end }}">
Home
</a>
</li>
@@ -45,7 +45,7 @@
{{- if not $userID }}
<li class="pt-[1em] pb-[1em]">
<a href="/auth/login" class="p-[1em] font-bold {{ if eq $path "/auth/login" }}selected{{ end }}">
<a href="/api/auth/login" class="p-[1em] font-bold {{ if eq $path "/auth/login" }}selected{{ end }}">
Log In / Sign Up
</a>
</li>
@@ -53,25 +53,25 @@
{{- else if $acctID }}
<li class="pt-[1em] pb-[1em]">
<a href="/accounts/{{$acctID}}" class="p-[1em] font-bold {{ if eq $path (printf "/accounts/%d" $acctID) }}selected{{ end }}">
<a href="/ui/accounts/{{$acctID}}" class="p-[1em] font-bold {{ if eq $path (printf "/accounts/%d" $acctID) }}selected{{ end }}">
Account
</a>
</li>
<li class="pt-[1em] pb-[1em]">
<a href="/accounts/{{$acctID}}/inventory" class="p-[1em] font-bold {{ if eq $path (printf "/accounts/%d/inventory" $acctID) }}selected{{ end }}">
<a href="/ui/accounts/{{$acctID}}/inventory" class="p-[1em] font-bold {{ if eq $path (printf "/accounts/%d/inventory" $acctID) }}selected{{ end }}">
Inventory
</a>
</li>
<li class="pt-[1em] pb-[1em]">
<a href="/accounts/{{$acctID}}/reports" class="p-[1em] font-bold {{ if eq $path (printf "/accounts/%d/reports" $acctID) }}selected{{ end }}">
<a href="/ui/accounts/{{$acctID}}/reports" class="p-[1em] font-bold {{ if eq $path (printf "/accounts/%d/reports" $acctID) }}selected{{ end }}">
Reports
</a>
</li>
<li class="pt-[1em] pb-[1em]">
<a href="/auth/logout" class="p-[1em] font-bold">
<a href="/api/auth/logout" class="p-[1em] font-bold">
Log Out
</a>
</li>
@@ -17,4 +17,4 @@
</a>
</h3>
{{- end }}
<h2><a href="/accounts/{{$acctID.AccountID}}/reports">View Reports</a></h2>
<h2><a href="/ui/accounts/{{$acctID.AccountID}}/reports">View Reports</a></h2>
@@ -21,7 +21,7 @@
<div>
{{ componentBody "button-dev"
"HXPost" (printf "/accounts/%d/inventory/sync-groups/draft/listings" $acctID)
"HXPost" (printf "/api/accounts/%d/inventory/sync-groups/draft/listings" $acctID)
"HXTarget" "previous table > tbody"
"HXSwap" "beforeend"
"Class" "mt-[1em] mb-[1em]"
@@ -36,7 +36,7 @@
{{/* TODO: save the listings as a sync group on click */}}
{{ componentBody "button-dev"
"ID" "create-sync-group-button"
"HXPost" (printf "/accounts/%d/sync-groups" $acctID)
"HXPost" (printf "/api/accounts/%d/sync-groups" $acctID)
"Class" "mt-[1em] mb-[1em]"
"Text" "Save Sync Group"
"Disabled" true
@@ -65,7 +65,7 @@
<section class="w-full flex justify-center mt-[1em]">
{{ componentBody "button-dev"
"HXGet" (printf "/accounts/%d/inventory/sync-table/new-row" $acctID)
"HXGet" (printf "/api/accounts/%d/inventory/sync-table/new-row" $acctID)
"HXTarget" "#inventory-table > tbody"
"HXSwap" "beforeend"
"Class" "mt-[1em] mb-[1em]"
+1 -1
View File
@@ -7,5 +7,5 @@
<section>
<a href="/">Return Home</a>
<a href="/ui">Return Home</a>
</section>
+2 -2
View File
@@ -7,7 +7,7 @@
{{- if and .Identity.User.UserID (not .Identity.Account) }}
{{/* TODO: make account creation automatic as part of the user creation process */}}
<h2><a href="/account-creation">New Account</a></h2>
<h2><a href="/ui/account-creation">New Account</a></h2>
{{- end }}
<section class="flex flex-col items-center max-w-full mt-[1em] mb-[1em] gap-y-[2em]">
@@ -16,7 +16,7 @@
</p>
<div class="border-button border-sidebar-border bg-card text-lg text-center max-w-[50%]">
<a href="/login" class="block p-[1em] font-bold">
<a href="/ui/login" class="block p-[1em] font-bold">
Create an Account
</a>
</div>
+1 -1
View File
@@ -7,5 +7,5 @@
<section>
<a href="/">Return Home</a>
<a href="/ui">Return Home</a>
</section>