Skip to content

Commit

Permalink
Change digest format
Browse files Browse the repository at this point in the history
  • Loading branch information
ramikg committed Jun 18, 2024
1 parent a02d308 commit ef81b99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified docs/assets/examples/monthly_digest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions service/digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func buildTopVenuesMessageBlocks(monthlyTopVenues []order.VenueOrderCount, month
nil,
[]*slack.TextBlockObject{
slack.NewTextBlockObject("mrkdwn", ":cook: *Top restaurants*", false, false),
slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*%s/Total*", dateOneMonthAgo.Month().String()), false, false),
slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*%s (Total)*", dateOneMonthAgo.Month().String()), false, false),
},
nil,
)
Expand All @@ -53,7 +53,7 @@ func buildTopVenuesMessageBlocks(monthlyTopVenues []order.VenueOrderCount, month
leftColumnString += " :new:"
}

rightColumnString := fmt.Sprintf("%d/%d", venue.OrderCount, totalOrderCount)
rightColumnString := fmt.Sprintf("%d (%d)", venue.OrderCount, totalOrderCount)

topVenuesRows = append(topVenuesRows,
slack.NewTextBlockObject("mrkdwn", leftColumnString, false, false),
Expand All @@ -79,7 +79,7 @@ func buildTopHostsMessageBlocks(monthlyTopHosts []order.HostOrderCount, monthlyT
nil,
[]*slack.TextBlockObject{
slack.NewTextBlockObject("mrkdwn", ":star: *Top hosts*", false, false),
slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*%s/Total*", dateOneMonthAgo.Month().String()), false, false),
slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*%s (Total)*", dateOneMonthAgo.Month().String()), false, false),
},
nil,
)
Expand All @@ -101,7 +101,7 @@ func buildTopHostsMessageBlocks(monthlyTopHosts []order.HostOrderCount, monthlyT
leftColumnString += " :new:"
}

rightColumnString := fmt.Sprintf("%d/%d", host.OrderCount, totalOrderCount)
rightColumnString := fmt.Sprintf("%d (%d)", host.OrderCount, totalOrderCount)

topHostsRows = append(topHostsRows,
slack.NewTextBlockObject("mrkdwn", leftColumnString, false, false),
Expand Down

0 comments on commit ef81b99

Please sign in to comment.