ability to delete mock sync groups

This commit is contained in:
2026-02-10 18:05:30 -07:00
parent 0944703d2a
commit 95ef64ce18
15 changed files with 963 additions and 13 deletions
@@ -70,12 +70,16 @@
value="{{$shop.Platform}}-{{$shop.ShopID}}"
{{- if $isSelectedShop }}selected{{- end }}
>
{{ $shop.Name }} - {{$shop.Platform}} - {{$shop.ShopID}} - {{(eq $selectedShopPlatform $shop.Platform)}} - {{(eq $selectedShopID $shop.ShopID)}}
{{ $shop.Name }}
</option>
{{- end }}
</select>
</td>
<td>
{{- if $entry.Platform }}{{ $entry.Platform }}{{ else }}-{{ end }}
</td>
<td>
{{- $selectedListing := "" }}
{{- if $selectedShopID }}
@@ -17,6 +17,9 @@
<th>
Shop
</th>
<th>
Platform
</th>
<th>
Listing
</th>
@@ -52,7 +55,7 @@
on rowUpdated
checkIfAllRowsAreFilledOut()
send setDisabled(disabled: not allRowsFilledOut or numRows < 2) to #create-sync-group-button
send setDisabled(disabled: not allRowsFilledOut or numRows < 2) to #create-mock-sync-group-button
"
>
{{- $listings := .Accounts.GetMockSyncGroupListingDrafts $acctID }}
@@ -67,6 +70,9 @@
<th>
Shop
</th>
<th>
Platform
</th>
<th>
Listing
</th>
@@ -98,7 +104,7 @@
hidden
hx-get="{{ printf "/ui/accounts/%d/inventory/sync-groups/mock/draft/table/save-sync-group-button" $acctID }}"
hx-trigger="{{ (printf "sse:accounts_%d_inventory_sync-groups_mock_draft_listings" $acctID) }}"
hx-target="#create-sync-group-button"
hx-target="#create-mock-sync-group-button"
hx-swap="outerHTML"
>
</div>
@@ -2,7 +2,7 @@
{{- $acctID := .PathParams.acctID }}
{{- $listings := .Accounts.GetSyncGroupListingDrafts $acctID }}
{{- $listings := .Accounts.GetMockSyncGroupListingDrafts $acctID }}
{{- $numCompletedListings := 0 }}
{{- range $l := $listings }}
@@ -17,8 +17,7 @@
{{ component "button"
"ID" "create-sync-group-button"
"HXPost" (printf "/api/accounts/%d/sync-groups/mock" $acctID)
"ID" "create-mock-sync-group-button"
"Class" "mt-[1em] mb-[1em]"
"Text" "Save Sync Group"
"Disabled" (or (not $enoughListings) (not $allCompleted))
+1 -1
View File
@@ -39,7 +39,7 @@
hx-swap="{{.HXSwap}}"
{{- end }}
{{- if .HXVals }}
hx-vals="{{.HXVals}}"
hx-vals='{{.HXVals}}'
{{- end }}
{{- if .Disabled}}
disabled