Ejemplo n.º 1
0
        public static HtmlString ToBadge(this Core.Entities.CampaignStatus status)
        {
            var type = "primary";

            if (status == CampaignStatus.Canceled)
            {
                type = "dark";
            }
            else if (status == CampaignStatus.Error || status == CampaignStatus.Locked)
            {
                type = "danger";
            }
            else if (status == CampaignStatus.Started)
            {
                type = "warning";
            }

            else if (status == CampaignStatus.Ended)
            {
                type = "info";
            }
            else if (status == CampaignStatus.Completed)
            {
                type = "success";
            }
            return(new HtmlString($"<span class='badge badge-{type}'>{status.ToDisplayName()}</span>"));
        }
Ejemplo n.º 2
0
        public static HtmlString ToBadge(this Core.Entities.CampaignStatus status)
        {
            var type = "warning";

            if (status == CampaignStatus.Canceled)
            {
                type = "dark";
                //return new HtmlString($"<div class=\"d-inline-flex p-2\"><img src=\"/img/icon_dot_chiendichbihuy.png\" width=\"16px\" height=\"16px\"/>&nbsp;{status.ToDisplayName()}</div>");
            }
            else if (status == CampaignStatus.Error || status == CampaignStatus.Locked)
            {
                type = "danger";
                //return new HtmlString($"<div class=\"d-inline-flex p-2\"><img src=\"/img/icon_dot_tamkhoa.png\" width=\"16px\" height=\"16px\"/>&nbsp;{status.ToDisplayName()}</div>");
            }
            else if (status == CampaignStatus.Started)
            {
                type = "warning";
                //return new HtmlString($"<div class=\"d-inline-flex p-2\"><img src=\"/img/icon_dot_chopheduyet.png\" width=\"16px\" height=\"16px\"/>&nbsp;{status.ToDisplayName()}</div>");
            }

            else if (status == CampaignStatus.Ended)
            {
                type = "info";
                //return new HtmlString($"<div class=\"d-inline-flex p-2\"><img src=\"/img/icon_dot_tamkhoa.png\" width=\"16px\" height=\"16px\"/>&nbsp;{status.ToDisplayName()}</div>");
            }
            else if (status == CampaignStatus.Completed)
            {
                type = "success";
                //return new HtmlString($"<div class=\"d-inline-flex p-2\"><img src=\"/img/icon_dot_hoanthanh.png\" width=\"16px\" height=\"16px\"/>&nbsp;{status.ToDisplayName()}</div>");
            }
            else if (status == CampaignStatus.Confirmed)
            {
                type = "primary";
                // return new HtmlString($"<div class=\"d-inline-flex p-2\"><img src=\"/img/icon_dot_dapheduyet.png\" width=\"16px\" height=\"16px\" />&nbsp;{status.ToDisplayName()}</div>");
            }

            return(new HtmlString($"<i class='fas fa-circle text-{type}'></i> <span>{status.ToDisplayName()}</span>"));
            // return new HtmlString($"<div class=\"d-inline-flex p-2\"><img src=\"/img/icon_dot_dapheduyet.png\" width=\"16px\" height=\"16px\"/>&nbsp;{status.ToDisplayName()}</div>");
        }
Ejemplo n.º 3
0
        public static HtmlString ToBadge(this Core.Entities.CampaignStatus status)
        {
            var type = "primary";

            if (status == CampaignStatus.Canceled)
            {
                type = "warning";
            }
            else if (status == CampaignStatus.Error || status == CampaignStatus.Locked)
            {
                type = "danger";
            }
            else if (status == CampaignStatus.Started)
            {
                type = "info";
            }

            else if (status == CampaignStatus.Ended)
            {
                type = "accent";
            }
            else if (status == CampaignStatus.Completed)
            {
                type = "success";
            }
            else if (status == CampaignStatus.Confirmed)
            {
                type = "primary";
            }
            else
            {
                type = "meta";
            }

            return(new HtmlString($"<span class='m-badge m-badge--{type} m-badge--wide'>{status.ToShowName()}</span>"));
        }