移除系统化待办重复新增入口 #640

Merged
yueyang merged 1 commits from fix/yueyang-systemization-todo-remove-duplicate-create into main 2026-10-26 19:47:53 +08:00
2 changed files with 8 additions and 14 deletions

View File

@ -73,16 +73,13 @@
.sys-todo-shots { display:flex; flex-wrap:wrap; gap:.3rem; max-width:13rem; }
.sys-todo-shots button { display:block; width:4.25rem; height:3.2rem; padding:0; border:1px solid #ddd4c4; border-radius:.35rem; overflow:hidden; background:#faf8f3; cursor:zoom-in; }
.sys-todo-shots img { width:100%; height:100%; object-fit:cover; }
.sys-todo-table__add { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.65rem; margin-top:1rem; padding:.55rem .7rem; border:1px dashed #d8cdb8; border-radius:.55rem; background:#fcfaf5; color:#666; font-size:.72rem; }
.sys-todo-table__add { margin-top:1rem; padding:.55rem .7rem; border:1px dashed #d8cdb8; border-radius:.55rem; background:#fcfaf5; color:#666; font-size:.72rem; }
.sys-todo-scrollrail { position:fixed; bottom:.85rem; z-index:35; height:1.15rem; padding:2px; border:1px solid #d8cdb8; border-radius:999px; background:rgba(243,236,224,.96); box-shadow:0 5px 18px rgba(23,23,23,.16); opacity:0; pointer-events:none; overflow-x:scroll; overflow-y:hidden; transition:opacity 150ms ease; }
.sys-todo-scrollrail.is-visible { opacity:1; pointer-events:auto; }
.sys-todo-scrollrail__spacer { height:1px; }
.sys-todo-scrollrail::-webkit-scrollbar { height:.7rem; }
.sys-todo-scrollrail::-webkit-scrollbar-track { border-radius:999px; background:#eee7d9; }
.sys-todo-scrollrail::-webkit-scrollbar-thumb { border-radius:999px; background:var(--sys-gold); }
.sys-todo-table__add button { display:inline-flex; align-items:center; gap:.25rem; min-height:2rem; padding:0 .7rem; border:1px solid var(--sys-border); border-radius:.4rem; background:#fff; color:#51483c; font:inherit; font-size:.76rem; cursor:pointer; }
.sys-todo-table__add button:hover { border-color:#c7b687; background:var(--sys-gold-soft); }
.sys-todo-table__add .material-icons-outlined { font-size:1rem; }
.sys-todo-empty { padding:2rem 1rem; color:#777; text-align:center; }
.sys-todo-flash { margin:0 0 .85rem; padding:.65rem .85rem; border:1px solid #bad0ac; border-radius:.45rem; background:#f2f8ed; color:#53793e; font-size:.8125rem; }
.sys-todo-flash--error { border-color:#e7c3c3; background:#fff3f3; color:#b80000; }
@ -329,18 +326,11 @@
}
}
}
$lastItem = $items->last();
$lastSectionLabel = $items->isNotEmpty() ? ($sectionLabels[$items->count() - 1] ?? '') : '';
$highlightId = max(0, (int) request('highlight', 0));
@endphp
<div class="sys-todo-table__add">
<span>共 {{ number_format($items->count()) }} 条,已全部显示。点击序号旁的+可在该条之后插入,原后续序号自动顺延;点击待办事项编辑详情,点击类型或内容可单独修改该组名称。</span>
<button type="button" data-sys-todo-create
data-sys-todo-default-category="{{ $lastItem?->category ?? '' }}"
data-sys-todo-default-section="{{ $lastSectionLabel }}">
<span class="material-icons-outlined" aria-hidden="true">playlist_add</span>新增一条
</button>
共 {{ number_format($items->count()) }} 条,已全部显示。点击序号旁的+可在该条之后插入,原后续序号自动顺延;点击待办事项编辑详情,点击类型或内容可单独修改该组名称。
</div>
<div class="sys-todo-table-wrap" tabindex="0" aria-label="待办列表,可横向滚动查看全部内容" data-sys-todo-table-wrap>

View File

@ -17,7 +17,7 @@ class SystemizationTodosTest extends FeatureTestCase
{
Storage::fake('uploads');
$this->loginAs()
$pageResponse = $this->loginAs()
->get(route('business.pages.show', [
'section' => 'other',
'page' => 'systemization-todos',
@ -32,7 +32,6 @@ class SystemizationTodosTest extends FeatureTestCase
->assertSeeText('已逾期')
->assertSeeText('开始时间')
->assertSeeText('完成时间')
->assertSeeText('新增一条')
->assertSee('data-sys-todo-create', false)
->assertSee('data-sys-todo-owner-filter', false)
->assertSee('data-sys-todo-assignee-filter', false)
@ -59,9 +58,14 @@ class SystemizationTodosTest extends FeatureTestCase
->assertSee('id="sysTodoDeleteConfirm"', false)
->assertSee('data-sys-todo-table-wrap', false)
->assertSee('data-sys-todo-scrollrail', false)
->assertDontSee('playlist_add', false)
->assertDontSee('<th scope="col">操作</th>', false)
->assertDontSeeText('下一页')
->assertSee('id="sysTodoImageViewer"', false);
$this->assertSame(
1,
substr_count((string) $pageResponse->getContent(), 'data-sys-todo-create>'),
);
$storeResponse = $this->post(route('business.systemization-todos.store'), [
'category' => '收入',