31 lines
1.3 KiB
Vue
31 lines
1.3 KiB
Vue
<script setup lang="ts">
|
||
const props = defineProps<{
|
||
status: string;
|
||
}>();
|
||
|
||
const statusLabel = computed(() => {
|
||
if (props.status === 'NEW') return 'Уточнение цены';
|
||
if (props.status === 'MANAGER_PROCESSING') return 'В работе у менеджера';
|
||
if (props.status === 'WAITING_DOUBLE_CONFIRM') return 'Ожидает подтверждения';
|
||
if (props.status === 'CONFIRMED') return 'Подтвержден';
|
||
if (props.status === 'IN_PROGRESS') return 'Выполняется';
|
||
if (props.status === 'COMPLETED') return 'Завершен';
|
||
if (props.status === 'CLIENT_REJECTED') return 'Отклонен клиентом';
|
||
if (props.status === 'MANAGER_REJECTED') return 'Отклонен менеджером';
|
||
if (props.status === 'MANAGER_BLOCKED') return 'Заблокирован';
|
||
return props.status;
|
||
});
|
||
|
||
const className = computed(() => {
|
||
if (props.status === 'COMPLETED') return 'badge badge-success';
|
||
if (props.status === 'CLIENT_REJECTED' || props.status === 'MANAGER_REJECTED') return 'badge badge-error';
|
||
if (props.status === 'MANAGER_BLOCKED') return 'badge badge-warning';
|
||
if (props.status === 'NEW') return 'badge badge-warning';
|
||
return 'badge badge-info';
|
||
});
|
||
</script>
|
||
|
||
<template>
|
||
<span :class="className">{{ statusLabel }}</span>
|
||
</template>
|