fix
This commit is contained in:
@@ -15,23 +15,14 @@ const emit = defineEmits<{
|
||||
<template>
|
||||
<van-cell
|
||||
:title="
|
||||
'employee_from' in props.item
|
||||
? props.item.task.text?.trim() || `Задача #${props.item.task.id}`
|
||||
: props.item.text?.trim() ||
|
||||
props.item.result?.trim() ||
|
||||
`Задача #${props.item.id}`
|
||||
props.item.text?.trim() ||
|
||||
props.item.result?.trim() ||
|
||||
`Задача #${props.item.id}`
|
||||
"
|
||||
center
|
||||
is-link
|
||||
:class="`task-row task-row-${/success|done|complete|green/i.test('employee_from' in props.item ? props.item.task.status : props.item.get_status_class || 'status-default') ? 'success' : /warning|pending|wait|yellow|orange/i.test('employee_from' in props.item ? props.item.task.status : props.item.get_status_class || 'status-default') ? 'warning' : /danger|error|red|fail/i.test('employee_from' in props.item ? props.item.task.status : props.item.get_status_class || 'status-default') ? 'danger' : 'primary'}`"
|
||||
@click="
|
||||
emit(
|
||||
'open',
|
||||
'employee_from' in props.item
|
||||
? `/tasks/${props.item.task.id}`
|
||||
: `/tasks/${props.item.id}`,
|
||||
)
|
||||
"
|
||||
:class="`task-row task-row-${/success|done|complete|green/i.test(props.item.get_status_class || 'status-default') ? 'success' : /warning|pending|wait|yellow|orange/i.test(props.item.get_status_class || 'status-default') ? 'warning' : /danger|error|red|fail/i.test(props.item.get_status_class || 'status-default') ? 'danger' : 'primary'}`"
|
||||
@click="emit('open', `/tasks/${props.item.id}`)"
|
||||
>
|
||||
<template #icon>
|
||||
<van-image
|
||||
@@ -52,38 +43,24 @@ const emit = defineEmits<{
|
||||
{{ props.item.author?.short_name }}
|
||||
</div>
|
||||
|
||||
<div>объект строительства: {{ props.item.project_id }}</div>
|
||||
<div>объект строительства: {{ props.item.project }}</div>
|
||||
</template>
|
||||
<template #right-icon>
|
||||
<van-tag
|
||||
plain
|
||||
:type="
|
||||
/success|done|complete|green/i.test(
|
||||
'employee_from' in props.item
|
||||
? props.item.task.status
|
||||
: props.item.get_status_class || 'status-default',
|
||||
)
|
||||
/success|done|complete|green/i.test(props.item.get_status_class)
|
||||
? 'success'
|
||||
: /warning|pending|wait|yellow|orange/i.test(
|
||||
'employee_from' in props.item
|
||||
? props.item.task.status
|
||||
: props.item.get_status_class || 'status-default',
|
||||
props.item.get_status_class,
|
||||
)
|
||||
? 'warning'
|
||||
: /danger|error|red|fail/i.test(
|
||||
'employee_from' in props.item
|
||||
? props.item.task.status
|
||||
: props.item.get_status_class || 'status-default',
|
||||
)
|
||||
: /danger|error|red|fail/i.test(props.item.get_status_class)
|
||||
? 'danger'
|
||||
: 'primary'
|
||||
"
|
||||
>
|
||||
{{
|
||||
"employee_from" in props.item
|
||||
? props.item.task.deadline
|
||||
: props.item.deadline
|
||||
}}
|
||||
{{ props.item.deadline }}
|
||||
</van-tag>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
Reference in New Issue
Block a user