Skip to content

Commit

Permalink
Merge pull request #10582 from woocommerce/issue/10574-edit-budget-sc…
Browse files Browse the repository at this point in the history
…reen-ui

Issue/10574 edit budget screen UI
  • Loading branch information
JorgeMucientes authored Jan 24, 2024
2 parents e54905d + 11dc849 commit 099d3af
Show file tree
Hide file tree
Showing 5 changed files with 429 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ class BlazeRepository @Inject constructor(
private val timezoneProvider: TimezoneProvider,
) {
companion object {
const val DEFAULT_CURRENCY_CODE = "USD" // For now only USD are supported
const val BLAZE_DEFAULT_CURRENCY_CODE = "USD" // For now only USD are supported
const val DEFAULT_CAMPAIGN_DURATION = 7 // Days
const val DEFAULT_CAMPAIGN_TOTAL_BUDGET = 35F // USD
const val CAMPAIGN_MINIMUM_DAILY_SPEND_LIMIT = 5F // USD
const val CAMPAIGN_MAXIMUM_DAILY_SPEND_LIMIT = 50F // USD
const val CAMPAIGN_MAX_DURATION = 28 // Days
const val ONE_DAY_IN_MILLIS = 1000 * 60 * 60 * 24
}

Expand All @@ -30,7 +33,7 @@ class BlazeRepository @Inject constructor(
budget = Budget(
totalBudget = DEFAULT_CAMPAIGN_TOTAL_BUDGET,
spentBudget = 0f,
currencyCode = DEFAULT_CURRENCY_CODE,
currencyCode = BLAZE_DEFAULT_CURRENCY_CODE,
durationInDays = DEFAULT_CAMPAIGN_DURATION,
startDate = Date().apply { time += ONE_DAY_IN_MILLIS }, // By default start tomorrow
),
Expand Down
Loading

0 comments on commit 099d3af

Please sign in to comment.