Files
web-frontend/app/components/orders/OrderStatusBadge.vue
2026-04-02 18:28:57 +07:00

31 lines
1.3 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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>