Files
InvoiceShelf/resources/scripts-v2/components/base/BaseEstimateStatusLabel.vue
Darko Gjorgjijoski cab785172e Add missing base components and global alias registrations
Create BaseCustomTag (dynamic tag render), BaseFormatMoney,
BaseHeading, BaseScrollPane, BaseDescriptionList/Item, BaseLabel,
BaseCustomerSelectInput, BaseSpinner, BaseRating, and status label
components. Register all renamed v2 components under their old
Base* names (BaseInputGroup->FormGroup, BasePage->Page,
BaseTable->DataTable, etc.) so templates resolve correctly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:45:00 +02:00

45 lines
968 B
Vue

<script setup lang="ts">
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { EstimateStatus } from '@v2/types/domain'
interface Props {
status?: string
}
const props = withDefaults(defineProps<Props>(), {
status: '',
})
const { t } = useI18n()
const labelStatus = computed<string>(() => {
switch (props.status) {
case EstimateStatus.DRAFT:
case 'DRAFT':
return t('estimates.draft')
case EstimateStatus.SENT:
case 'SENT':
return t('estimates.sent')
case EstimateStatus.VIEWED:
case 'VIEWED':
return t('estimates.viewed')
case EstimateStatus.EXPIRED:
case 'EXPIRED':
return t('estimates.expired')
case EstimateStatus.ACCEPTED:
case 'ACCEPTED':
return t('estimates.accepted')
case EstimateStatus.REJECTED:
case 'REJECTED':
return t('estimates.rejected')
default:
return props.status
}
})
</script>
<template>
{{ labelStatus }}
</template>