updated templater
This commit is contained in:
+1
-1
@@ -116,7 +116,7 @@
|
||||
</td>
|
||||
|
||||
<td data-id="remove">
|
||||
{{ componentBody "button"
|
||||
{{ component "button"
|
||||
"HXDelete" (printf "/api/accounts/%d/inventory/sync-groups/draft/listings/%d" $acctID $orderIndex)
|
||||
"HXTarget" "#accounts-acct-id-inventory-sync-groups-draft-table"
|
||||
"HXSwap" "outerHTML"
|
||||
+1
-1
@@ -60,7 +60,7 @@
|
||||
>
|
||||
{{- $listings := $dot.Accounts.GetSyncGroupListingDrafts $acctID }}
|
||||
{{- range $listing := $listings }}
|
||||
{{- componentBody "accounts/{acctID}/inventory/sync-groups/draft/listings/{orderIndex}"
|
||||
{{- component "accounts/{acctID}/inventory/sync-groups/draft/listings/{orderIndex}"
|
||||
"dot" ($dot | addPathParam "orderIndex" $listing.OrderIndex)
|
||||
}}
|
||||
{{- end }}
|
||||
@@ -18,7 +18,7 @@
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
|
||||
<link rel="manifest" href="/favicon/site.webmanifest">
|
||||
|
||||
{{/* This is where the page_head template will be inserted into the page */}}
|
||||
{{/* This can be set by the template in ./pages being rendered */}}
|
||||
{{- block "head" . }}{{ end }}
|
||||
</head>
|
||||
|
||||
|
||||
+3
-3
@@ -17,10 +17,10 @@
|
||||
<h4>
|
||||
(Draft 2)
|
||||
</h4>
|
||||
{{ componentBody "accounts/{acctID}/inventory/sync-groups/draft/table" "dot" . }}
|
||||
{{ component "accounts/{acctID}/inventory/sync-groups/draft/table" "dot" . }}
|
||||
|
||||
<div>
|
||||
{{ componentBody "button"
|
||||
{{ component "button"
|
||||
"HXPost" (printf "/api/accounts/%d/inventory/sync-groups/draft/listings" $acctID)
|
||||
"HXTarget" "#accounts-acct-id-inventory-sync-groups-draft-table"
|
||||
"HXSwap" "outerHTML"
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
{{/* TODO: enable the button when all listings are filled and there are at least two listings */}}
|
||||
{{/* TODO: save the listings as a sync group on click */}}
|
||||
{{ componentBody "button"
|
||||
{{ component "button"
|
||||
"ID" "create-sync-group-button"
|
||||
"HXPost" (printf "/api/accounts/%d/sync-groups" $acctID)
|
||||
"Class" "mt-[1em] mb-[1em]"
|
||||
Reference in New Issue
Block a user