This commit is contained in:
Viet An
2026-07-04 13:46:14 +07:00
parent b06907097c
commit b6766ba7d0
19 changed files with 397 additions and 680 deletions

View File

@@ -0,0 +1,20 @@
<script setup>
const props = defineProps({
variant: Object,
});
const status = computed(() => {
const stock = props.variant.imei_count - 0; // imei sold
if (stock === 0) return { text: "Hết", color: "red" };
if (stock < 10) return { text: "Thấp", color: "yellow" };
return { text: "OK", color: "green" };
});
</script>
<template>
<span
:class="['tag is-rounded is-light fs-12', `is-${status.color}`]"
:style="{ border: `1px solid var(--bulma-${status.color}-80)` }"
>{{ status.text }}</span
>
</template>