31 lines
583 B
Vue
31 lines
583 B
Vue
<template>
|
|
<v-chip :color="badgeColor" small>
|
|
{{ contractStatus }}
|
|
</v-chip>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { defineProps, computed } from 'vue';
|
|
import type { ContractStatus } from '~/utils/types';
|
|
|
|
const props = defineProps<{
|
|
contractStatus: ContractStatus;
|
|
}>();
|
|
|
|
const colorMapping: Record<ContractStatus, string> = {
|
|
"Pending": "amber",
|
|
"40% Received": "blue",
|
|
"Complete": "green"
|
|
};
|
|
|
|
const badgeColor = computed(() => {
|
|
return colorMapping[props.contractStatus] || 'grey';
|
|
});
|
|
</script>
|
|
|
|
<style scoped>
|
|
.v-chip {
|
|
font-size: 0.8rem;
|
|
}
|
|
</style>
|