feat(kyc): add demo KYC profile page with mock data
All checks were successful
Build Docker Image / build (push) Successful in 4m1s
All checks were successful
Build Docker Image / build (push) Successful in 4m1s
- Always show 'view full profile' button with fallback to demo UUID - KYC page shows mock data when demo UUID is used - Add i18n translations for demo page
This commit is contained in:
@@ -90,9 +90,8 @@
|
||||
|
||||
<!-- View Full Profile Button -->
|
||||
<button
|
||||
v-if="entity?.kycProfileUuid"
|
||||
class="btn btn-ghost btn-xs text-primary mt-3 w-full"
|
||||
@click="emit('open-kyc', entity.kycProfileUuid)"
|
||||
@click="emit('open-kyc', kycProfileUuid)"
|
||||
>
|
||||
<Icon name="lucide:external-link" size="14" />
|
||||
{{ $t('catalog.info.viewFullKyc') }}
|
||||
@@ -317,6 +316,12 @@ const kycTeaser = computed(() => {
|
||||
}
|
||||
})
|
||||
|
||||
// KYC Profile UUID - use real if available, otherwise mock for demo
|
||||
const MOCK_KYC_UUID = 'demo-kyc-profile'
|
||||
const kycProfileUuid = computed(() => {
|
||||
return props.entity?.kycProfileUuid || MOCK_KYC_UUID
|
||||
})
|
||||
|
||||
// Handlers for selecting related items
|
||||
const onProductSelect = (product: InfoProductItem) => {
|
||||
emit('select-product', product.uuid)
|
||||
|
||||
@@ -2,13 +2,74 @@
|
||||
<div class="min-h-screen bg-base-200">
|
||||
<div class="container mx-auto px-4 py-8 max-w-4xl">
|
||||
<!-- Back button -->
|
||||
<NuxtLink :to="localePath('/catalog')" class="btn btn-ghost btn-sm mb-4">
|
||||
<NuxtLink :to="backUrl" class="btn btn-ghost btn-sm mb-4">
|
||||
<Icon name="lucide:arrow-left" size="16" />
|
||||
{{ $t('common.back') }}
|
||||
</NuxtLink>
|
||||
|
||||
<!-- KYC Profile Card -->
|
||||
<KycProfileCard :kyc-profile-uuid="uuid" />
|
||||
<!-- Mock KYC Profile (demo mode) -->
|
||||
<Card v-if="isDemo" padding="md">
|
||||
<Stack gap="4">
|
||||
<!-- Header -->
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<Text weight="semibold" size="lg">{{ $t('kyc.demo.companyName') }}</Text>
|
||||
<div class="flex items-center gap-2 mt-1">
|
||||
<span class="badge badge-outline badge-sm">ООО</span>
|
||||
<span class="text-xs text-base-content/60">с 2018 г.</span>
|
||||
<span class="badge badge-success badge-xs">{{ $t('catalog.info.active') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Details grid -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<Text tone="muted" size="sm">ИНН</Text>
|
||||
<Text weight="medium">7707083893</Text>
|
||||
</div>
|
||||
<div>
|
||||
<Text tone="muted" size="sm">ОГРН</Text>
|
||||
<Text weight="medium">1027700132195</Text>
|
||||
</div>
|
||||
<div>
|
||||
<Text tone="muted" size="sm">{{ $t('kyc.demo.director') }}</Text>
|
||||
<Text weight="medium">Иванов Иван Иванович</Text>
|
||||
</div>
|
||||
<div>
|
||||
<Text tone="muted" size="sm">{{ $t('kyc.demo.capital') }}</Text>
|
||||
<Text weight="medium">10 000 ₽</Text>
|
||||
</div>
|
||||
<div class="md:col-span-2">
|
||||
<Text tone="muted" size="sm">{{ $t('kyc.demo.address') }}</Text>
|
||||
<Text weight="medium">г. Москва, ул. Примерная, д. 1</Text>
|
||||
</div>
|
||||
<div class="md:col-span-2">
|
||||
<Text tone="muted" size="sm">{{ $t('kyc.demo.activities') }}</Text>
|
||||
<div class="flex flex-wrap gap-1 mt-1">
|
||||
<span class="badge badge-ghost badge-sm">Оптовая торговля</span>
|
||||
<span class="badge badge-ghost badge-sm">Логистика</span>
|
||||
<span class="badge badge-ghost badge-sm">Складские услуги</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="flex items-center justify-between text-xs text-base-content/50 pt-2 border-t border-base-200">
|
||||
<span>{{ $t('kyc.demo.sources') }}: ЕГРЮЛ, ФНС, Росстат</span>
|
||||
<span>{{ $t('kyc.demo.updated') }}: {{ new Date().toLocaleDateString('ru-RU') }}</span>
|
||||
</div>
|
||||
|
||||
<!-- Demo notice -->
|
||||
<div class="alert alert-info">
|
||||
<Icon name="lucide:info" size="16" />
|
||||
<span>{{ $t('kyc.demo.notice') }}</span>
|
||||
</div>
|
||||
</Stack>
|
||||
</Card>
|
||||
|
||||
<!-- Real KYC Profile Card -->
|
||||
<KycProfileCard v-else :kyc-profile-uuid="uuid" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -22,4 +83,11 @@ const route = useRoute()
|
||||
const localePath = useLocalePath()
|
||||
|
||||
const uuid = computed(() => route.params.uuid as string)
|
||||
const isDemo = computed(() => uuid.value === 'demo-kyc-profile')
|
||||
|
||||
// Back URL - try to go back to previous page or catalog
|
||||
const backUrl = computed(() => {
|
||||
// If there's a referrer from catalog, use it
|
||||
return localePath('/catalog')
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -3,6 +3,16 @@
|
||||
"verification_status": "Verification Status",
|
||||
"team_verification_description": "Complete team verification to create orders",
|
||||
"start_verification": "Start Verification",
|
||||
"check_status_in_odoo": "Status is being reviewed by administrator"
|
||||
"check_status_in_odoo": "Status is being reviewed by administrator",
|
||||
"demo": {
|
||||
"companyName": "Demo Company LLC",
|
||||
"director": "Director",
|
||||
"capital": "Authorized Capital",
|
||||
"address": "Legal Address",
|
||||
"activities": "Business Activities",
|
||||
"sources": "Sources",
|
||||
"updated": "Updated",
|
||||
"notice": "This is demo data. Real company information will be available after connecting to the database."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,16 @@
|
||||
"verification_status": "Статус верификации",
|
||||
"team_verification_description": "Пройдите верификацию команды для создания заказов",
|
||||
"start_verification": "Начать верификацию",
|
||||
"check_status_in_odoo": "Статус проверяется администратором"
|
||||
"check_status_in_odoo": "Статус проверяется администратором",
|
||||
"demo": {
|
||||
"companyName": "ООО \"Демо Компания\"",
|
||||
"director": "Руководитель",
|
||||
"capital": "Уставный капитал",
|
||||
"address": "Юридический адрес",
|
||||
"activities": "Виды деятельности",
|
||||
"sources": "Источники",
|
||||
"updated": "Обновлено",
|
||||
"notice": "Это демонстрационные данные. Реальная информация о компании будет доступна после подключения к базе данных."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user