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

            if (status == TransactionStatus.Canceled)
            {
                type = "warning";
            }
            else if (status == TransactionStatus.Error)
            {
                type = "danger";
            }
            else if (status == TransactionStatus.Processing)
            {
                type = "info";
            }

            else if (status == TransactionStatus.Created)
            {
                type = "accent";
            }
            else if (status == TransactionStatus.Completed)
            {
                type = "success";
            }
            else
            {
                type = "meta";
            }

            return(new HtmlString($"<span class='m-badge m-badge--{type} m-badge--wide'>{status.ToShowName()}</span>"));
        }
Ejemplo n.º 2
0
        public static HtmlString ToBadge(this Core.Entities.TransactionStatus status)
        {
            var type = "light";

            if (status == TransactionStatus.Error)
            {
                type = "danger";
            }
            else if (status == TransactionStatus.Created)
            {
                type = "info";
            }
            else if (status == TransactionStatus.Completed)
            {
                type = "success";
            }

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