Refactor brand service and related components
- Removed ListQuestionVersions method and associated types from BrandService and Queries. - Updated PromptRuleGenerationService to change task naming and handling. - Enhanced ScheduleTaskService to support filtering by created date range and keyword. - Introduced InstantTaskService for managing instant tasks with appropriate filtering and response structures. - Added InstantTaskHandler for handling API requests related to instant tasks. - Created InstantTaskTab component for the admin web interface to display and manage instant tasks. - Updated database migrations to rename source types for articles and generation tasks. - Adjusted models and repository queries to reflect the removal of question version handling.
This commit is contained in:
@@ -172,7 +172,8 @@ const articleColumns = computed<TableColumnsType<ArticleListItem>>(() => [
|
||||
{
|
||||
title: t("common.actions"),
|
||||
key: "actions",
|
||||
width: 180,
|
||||
width: 120,
|
||||
align: "right",
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -447,24 +448,36 @@ async function handleDelete(articleId: number): Promise<void> {
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.key === 'actions'">
|
||||
<div class="templates-view__actions">
|
||||
<div class="table-actions-row">
|
||||
<a-tooltip
|
||||
:title="canEditArticle(record.generate_status) ? t('templates.list.edit') : t('templates.list.editDisabled')"
|
||||
>
|
||||
<a-button
|
||||
size="small"
|
||||
:disabled="!canEditArticle(record.generate_status)"
|
||||
@click="openEditor(record)"
|
||||
>
|
||||
<template #icon><EditOutlined /></template>
|
||||
</a-button>
|
||||
<span>
|
||||
<a-button
|
||||
type="text"
|
||||
shape="circle"
|
||||
size="small"
|
||||
class="action-btn action-edit"
|
||||
:disabled="!canEditArticle(record.generate_status)"
|
||||
@click="openEditor(record)"
|
||||
>
|
||||
<EditOutlined />
|
||||
</a-button>
|
||||
</span>
|
||||
</a-tooltip>
|
||||
<a-popconfirm
|
||||
:title="t('templates.list.deleteConfirm')"
|
||||
@confirm="handleDelete(record.id)"
|
||||
>
|
||||
<a-button size="small" danger :loading="deleteMutation.isPending.value">
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
<a-button
|
||||
type="text"
|
||||
shape="circle"
|
||||
size="small"
|
||||
class="action-btn action-delete"
|
||||
:loading="deleteMutation.isPending.value"
|
||||
:title="t('common.delete')"
|
||||
>
|
||||
<DeleteOutlined />
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
</div>
|
||||
@@ -624,11 +637,6 @@ async function handleDelete(articleId: number): Promise<void> {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.templates-view__actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.templates-view__status-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user