Files
RecruIT/resources/js/Components/Rq/RqBadge.vue

36 lines
1013 B
Vue

<script setup>
/**
* RqBadge.vue — Badge de statut candidat
*
* @prop status 'en_attente' | 'en_cours' | 'termine' | 'refuse'
* @prop label Override du texte affiché (optionnel)
*/
const props = defineProps({
status: { type: String, required: true },
label: { type: String, default: null },
});
const labels = {
en_attente: 'En attente',
en_cours: 'En cours',
termine: 'Terminé',
refuse: 'Refusé',
};
const displayLabel = props.label ?? labels[props.status] ?? props.status;
</script>
<template>
<span
:class="[
'inline-block px-2.5 py-0.5 rounded-full text-2xs font-black uppercase tracking-[0.12em]',
status === 'en_attente' && 'bg-ink/5 text-ink/55',
status === 'en_cours' && 'bg-primary/10 text-primary',
status === 'termine' && 'bg-success/10 text-success',
status === 'refuse' && 'bg-accent/10 text-accent',
]"
>
{{ displayLabel }}
</span>
</template>