const progress = useProgressStore();
-const currentMouseOver = ref();
+const currentMouseOver = ref();
-const tileProgress = ref({
- finished: {
- classes: "bg-success text-bg-success",
- styles: "border-radius: 50rem 0 0 50rem;",
- text: "finished",
- },
- inProgress: {
- classes: "bg-primary text-bg-primary",
- styles: "",
- text: "in-progress",
- },
- reserved: {
- classes: "bg-danger text-bg-danger",
- styles: "",
- text: "reserved",
- },
- availableInStock: {
- classes: "bg-warning text-bg-warning",
- styles: "border-radius: 0 50rem 50rem 0;",
- text: "available-in-stock",
- },
- availableOutOfStock: {
- classes: "bg-info text-bg-info",
- styles: "border-radius: 0 50rem 50rem 0;",
- text: "available-out-of-stock",
- },
-});
+const tileProgress = computed(() =>
+ [
+ {
+ classes: "bg-success text-bg-success",
+ styles: "border-radius: 50rem 0 0 50rem;",
+ text: "finished",
+ progress: progress.finished.length,
+ },
+ {
+ classes: "bg-primary text-bg-primary",
+ styles: "",
+ text: "in-progress",
+ progress: progress.inProgress.length,
+ },
+ {
+ classes: "bg-danger text-bg-danger",
+ styles: "",
+ text: "reserved",
+ progress: progress.reserved.length,
+ },
+ {
+ classes: "bg-warning text-bg-warning",
+ styles: "border-radius: 0 50rem 50rem 0;",
+ text: "available-in-stock",
+ progress: progress.availableInStock.length,
+ },
+ {
+ classes: "bg-info text-bg-info",
+ styles: "border-radius: 0 50rem 50rem 0;",
+ text: "available-out-of-stock",
+ progress: progress.availableOutOfStock.length,
+ },
+ ].filter((p) => p.progress > 0),
+);