-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9969 from woocommerce/feature/9963-blaze-campaign…
…-list Feature/9963 blaze campaign list
- Loading branch information
Showing
13 changed files
with
523 additions
and
215 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/blaze/BlazeUiModels.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.woocommerce.android.ui.blaze | ||
|
||
import androidx.annotation.ColorRes | ||
import androidx.annotation.StringRes | ||
import com.woocommerce.android.R | ||
|
||
data class BlazeProductUi( | ||
val name: String, | ||
val imgUrl: String | ||
) | ||
|
||
data class BlazeCampaignUi( | ||
val product: BlazeProductUi, | ||
val status: CampaignStatusUi, | ||
val stats: List<BlazeCampaignStat>, | ||
) | ||
|
||
data class BlazeCampaignStat( | ||
@StringRes val name: Int, | ||
val value: Int | ||
) | ||
|
||
enum class CampaignStatusUi( | ||
@StringRes val statusDisplayText: Int, | ||
@ColorRes val textColor: Int, | ||
@ColorRes val backgroundColor: Int, | ||
) { | ||
InModeration( | ||
statusDisplayText = R.string.blaze_campaign_status_in_moderation, | ||
textColor = R.color.blaze_campaign_status_in_moderation_text, | ||
backgroundColor = R.color.blaze_campaign_status_in_moderation_background | ||
), | ||
Active( | ||
statusDisplayText = R.string.blaze_campaign_status_active, | ||
textColor = R.color.blaze_campaign_status_active_text, | ||
backgroundColor = R.color.blaze_campaign_status_active_background | ||
), | ||
Completed( | ||
statusDisplayText = R.string.blaze_campaign_status_completed, | ||
textColor = R.color.blaze_campaign_status_rejected_text, | ||
backgroundColor = R.color.blaze_campaign_status_rejected_background | ||
), | ||
Rejected( | ||
statusDisplayText = R.string.blaze_campaign_status_rejected, | ||
textColor = R.color.blaze_campaign_status_completed_text, | ||
backgroundColor = R.color.blaze_campaign_status_completed_background | ||
), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.