Skip to content

Modular logistics and supply chain operating system (LSOS)

1.5 KB
Raw Blame
<div class="admin-dashboard-widget admin-kpi-tile {{this.accentClass}} h-full overflow-hidden rounded-md border shadow-sm" ...attributes>
    <div class="flex h-full flex-col justify-between p-3">
        <div class="flex items-start justify-between gap-2">
            <div class="min-w-0">
                <div class="truncate text-[10px] font-bold uppercase text-gray-500 dark:text-gray-400">{{this.title}}</div>
                {{#if this.error}}
                    <div class="mt-2 truncate text-xs font-semibold text-rose-600 dark:text-rose-300">{{this.error}}</div>
                {{else if this.load.isRunning}}
                    <div class="mt-3"><Spinner /></div>
                {{else}}
                    <div class="mt-2 truncate text-2xl font-bold leading-none {{this.valueTextClass}}">{{this.formattedValue}}</div>
                {{/if}}
            </div>
            <div class="{{this.iconClass}} flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md">
                <FaIcon @icon={{this.displayIcon}} />
            </div>
        </div>

        <div class="mt-3 flex items-center justify-between gap-2 text-[11px]">
            <span class="truncate text-gray-500 dark:text-gray-400">{{this.footnote}}</span>
            <span class="{{this.deltaClass}} inline-flex items-center gap-1 rounded-full px-2 py-0.5 font-semibold">
                <FaIcon @icon={{this.deltaIcon}} />
                {{this.deltaText}}
            </span>
        </div>
    </div>
</div>