package templates import ( "fmt" "git.preston-baxter.com/Preston_PLB/capstone/frontend-service/db/models" ) templ DashboardPage(user *models.User, vendorAccounts []models.VendorAccount) { @Head("Dashboard")
@DashboardNav(user) @DashboardContent(user, vendorAccounts) @Footer()
@DashboardScript() @toggleDropdown() } templ DashboardNav(user *models.User) { } templ DashboardNavItem(icon, name, link string, enabled bool) {
  • { name }
  • } //Break this up templ DashboardContentNav(user *models.User) { } templ DashboardCard(title, primaryVal, secondaryVal, subtitle string) {
    { title }
    { primaryVal }

    { secondaryVal } { subtitle }

    } templ DashboardVendorDropDown() {
    } templ DashboardVendorWidget(vendors []models.VendorAccount) {

    Vendors

    @DashboardVendorDropDown()
    if len(vendors) == 0 { } else { for _, vendor := range vendors { } }
    Name Status
    No accounts are available. Click + to add one
    { vendor.Name } if vendor.OauthCredentials != nil && vendor.OauthCredentials.AccessToken != "" { Active } else { }
    } templ DashboardContent(user *models.User, vendorAccounts []models.VendorAccount) {
    @DashboardContentNav(user)
    @DashboardCard("Events Recieved", "420,696", "3.3%", "Since Last Month") @DashboardCard("Live Streams Scheduled", "420,696", "3.3%", "Since Last Month") @DashboardCard("Failed Schedules", "420,696", "3.3%", "Since Last Month")
    @DashboardVendorWidget(vendorAccounts)
    } templ DashboardScript() { }