| Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## Description de la PR ## Modification du .env ## Check list - [ ] Pas de régression - [ ] TU/TI/TF rédigée - [ ] TU/TI/TF OK - [ ] CHANGELOG modifié --------- Co-authored-by: admin malio <malio@yuno.malio.fr> Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-authored-by: matthieu <matthieu@yuno.malio.fr> Reviewed-on: #84 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #84.
This commit is contained in:
@@ -9,14 +9,19 @@
|
||||
type="button"
|
||||
data-test="month"
|
||||
:data-month="index"
|
||||
:disabled="!isMonthInRange(currentYear, index, min, max)"
|
||||
:aria-disabled="!isMonthInRange(currentYear, index, min, max)"
|
||||
class="flex h-[45px] w-full items-center justify-center"
|
||||
:class="isMonthInRange(currentYear, index, min, max) ? 'cursor-pointer' : 'cursor-not-allowed'"
|
||||
@click="emit('select', index)"
|
||||
>
|
||||
<span
|
||||
class="flex h-[30px] w-full items-center justify-center rounded text-sm transition-colors duration-100"
|
||||
:class="index === selectedMonth
|
||||
? 'bg-m-primary text-white'
|
||||
: 'text-black hover:bg-m-primary/10'"
|
||||
: isMonthInRange(currentYear, index, min, max)
|
||||
? 'text-black hover:bg-m-primary/10'
|
||||
: 'text-m-muted/30'"
|
||||
>
|
||||
{{ name }}
|
||||
</span>
|
||||
@@ -25,9 +30,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {isMonthInRange} from '../composables/dateFormat'
|
||||
|
||||
defineOptions({name: 'MalioDateMonthPicker'})
|
||||
|
||||
defineProps<{selectedMonth?: number}>()
|
||||
defineProps<{
|
||||
currentYear: number
|
||||
selectedMonth?: number
|
||||
min?: string
|
||||
max?: string
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{(e: 'select', month: number): void}>()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user