Files
clientsflow/frontend/app/components/workspace/calendar/lab/CrmCalendarLabYearRect.vue

42 lines
1.1 KiB
Vue

<script setup lang="ts">
defineProps<{
isActive: boolean;
isLoading: boolean;
isLoaded: boolean;
showContent: boolean;
nextLabel?: string;
pulseScale: number;
}>();
</script>
<template>
<section
class="calendar-lab-rect calendar-lab-year"
:class="isActive ? 'calendar-lab-rect-active' : ''"
:style="{ transform: `scale(${pulseScale})` }"
>
<header class="calendar-lab-header">
<p class="calendar-lab-title">Year</p>
<p class="calendar-lab-subtitle">12 months overview</p>
</header>
<template v-if="showContent">
<p v-if="isLoading" class="calendar-lab-loading">Loading GraphQL year payload</p>
<p v-else-if="isLoaded" class="calendar-lab-meta">Data ready</p>
<div class="calendar-lab-grid-year">
<span
v-for="month in 12"
:key="`lab-year-month-${month}`"
class="calendar-lab-chip"
>
{{ month }}
</span>
</div>
</template>
<p v-else class="calendar-lab-hint">
Zoom into {{ nextLabel ?? "Month" }}
</p>
</section>
</template>