ability to delete mock sync groups
This commit is contained in:
+5
-1
@@ -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 }}
|
||||
|
||||
+8
-2
@@ -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
-3
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user