Files
2026-08-20 00:35:05 -06:00

49 lines
1.6 KiB
Cheetah

{{- $acctID := .Identity.Account.AccountID -}}
{{- $shops := .Accounts.GetMockShops $acctID -}}
{{- $formSelections := .Accounts.GetMockEventFormValues $acctID -}}
{{- $saleShopListings := "" }}
{{- if $formSelections.SaleShopID }}
{{ $saleShopListings = .Accounts.GetMockListingsForShop $acctID $formSelections.SalePlatform $formSelections.SaleShopID }}
{{- end }}
{{- $refundShopListings := "" }}
{{- if $formSelections.RefundShopID }}
{{ $refundShopListings = .Accounts.GetMockListingsForShop $acctID $formSelections.SalePlatform $formSelections.RefundShopID }}
{{- end }}
{{- $setInventoryShopListings := "" }}
{{- if $formSelections.CountShopID }}
{{ $setInventoryShopListings = .Accounts.GetMockListingsForShop $acctID $formSelections.SalePlatform $formSelections.CountShopID }}
{{- end }}
<h1 class="text-center my-[0.5em]">
Simulate
</h1>
{{/* SALES */}}
{{ component (printf "/accounts/%d/simulations/sales-form" $acctID)
"Shops" $shops
"SelectedPlatform" $formSelections.SalePlatform
"SelectedShopID" $formSelections.SaleShopID
"Listings" $saleShopListings
}}
{{/* REFUNDS */}}
{{ component (printf "/accounts/%d/simulations/refund-form" $acctID)
"Shops" $shops
"SelectedPlatform" $formSelections.RefundPlatform
"SelectedShopID" $formSelections.RefundShopID
"Listings" $refundShopListings
}}
{{/* SET INVENTORY */}}
{{ component (printf "/accounts/%d/simulations/set-inventory-form" $acctID)
"Shops" $shops
"SelectedPlatform" $formSelections.CountPlatform
"SelectedShopID" $formSelections.CountShopID
"Listings" $setInventoryShopListings
}}