fix: align risk frontend field names with API response
- email -> account_name - is_overridden -> idle_override
This commit is contained in:
parent
3333307ec1
commit
cdbf05bf1c
@ -11,12 +11,12 @@ export interface RiskSummary {
|
|||||||
|
|
||||||
export interface RiskAccountListItem {
|
export interface RiskAccountListItem {
|
||||||
account_id: number
|
account_id: number
|
||||||
email: string
|
account_name: string
|
||||||
platform: string
|
platform: string
|
||||||
risk_level: string
|
risk_level: string
|
||||||
risk_score: number
|
risk_score: number
|
||||||
scored_at: string
|
scored_at: string
|
||||||
is_overridden: boolean
|
idle_override: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RiskAccountList {
|
export interface RiskAccountList {
|
||||||
@ -35,12 +35,12 @@ export interface RiskBehaviorHour {
|
|||||||
|
|
||||||
export interface RiskAccountDetail {
|
export interface RiskAccountDetail {
|
||||||
account_id: number
|
account_id: number
|
||||||
email: string
|
account_name: string
|
||||||
platform: string
|
platform: string
|
||||||
risk_level: string
|
risk_level: string
|
||||||
risk_score: number
|
risk_score: number
|
||||||
scored_at: string
|
scored_at: string
|
||||||
is_overridden: boolean
|
idle_override: boolean
|
||||||
override_reason: string
|
override_reason: string
|
||||||
overridden_at: string
|
overridden_at: string
|
||||||
behavior_24h: RiskBehaviorHour[]
|
behavior_24h: RiskBehaviorHour[]
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
<div class="space-y-2 mb-6">
|
<div class="space-y-2 mb-6">
|
||||||
<div class="flex justify-between text-sm">
|
<div class="flex justify-between text-sm">
|
||||||
<span class="text-gray-500 dark:text-gray-400">{{ t('admin.risk.drawer.email') }}</span>
|
<span class="text-gray-500 dark:text-gray-400">{{ t('admin.risk.drawer.email') }}</span>
|
||||||
<span class="font-medium text-gray-900 dark:text-white">{{ detail.email }}</span>
|
<span class="font-medium text-gray-900 dark:text-white">{{ detail.account_name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-between text-sm">
|
<div class="flex justify-between text-sm">
|
||||||
<span class="text-gray-500 dark:text-gray-400">{{ t('admin.risk.drawer.platform') }}</span>
|
<span class="text-gray-500 dark:text-gray-400">{{ t('admin.risk.drawer.platform') }}</span>
|
||||||
@ -135,7 +135,7 @@ watch(
|
|||||||
if (id != null) {
|
if (id != null) {
|
||||||
await riskStore.fetchAccountDetail(id)
|
await riskStore.fetchAccountDetail(id)
|
||||||
detail.value = riskStore.accountDetail
|
detail.value = riskStore.accountDetail
|
||||||
overrideLevel.value = riskStore.accountDetail?.risk_level ?? 'low'
|
overrideLevel.value = (riskStore.accountDetail?.risk_level ?? 'low').toLowerCase()
|
||||||
overrideReason.value = ''
|
overrideReason.value = ''
|
||||||
} else {
|
} else {
|
||||||
detail.value = null
|
detail.value = null
|
||||||
|
|||||||
@ -58,8 +58,8 @@
|
|||||||
@click="openDetail(item.account_id)"
|
@click="openDetail(item.account_id)"
|
||||||
>
|
>
|
||||||
<td class="px-4 py-3 text-gray-900 dark:text-white truncate max-w-[200px]">
|
<td class="px-4 py-3 text-gray-900 dark:text-white truncate max-w-[200px]">
|
||||||
{{ item.email }}
|
{{ item.account_name }}
|
||||||
<span v-if="item.is_overridden" class="ml-1 text-xs text-blue-500">{{ t('admin.risk.overridden') }}</span>
|
<span v-if="item.idle_override" class="ml-1 text-xs text-blue-500">{{ t('admin.risk.overridden') }}</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="px-4 py-3 text-gray-600 dark:text-gray-400 capitalize">{{ item.platform }}</td>
|
<td class="px-4 py-3 text-gray-600 dark:text-gray-400 capitalize">{{ item.platform }}</td>
|
||||||
<td class="px-4 py-3">
|
<td class="px-4 py-3">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user