fix: 보고 모달에서 빈 카테고리 탭에 안내 텍스트 표시
전체가 비었을 때만 안내하던 것을 현재 탭 기준으로 변경 — 특정 카테고리에 항목이 없으면 ''X' 분류에 항목이 없습니다' 안내. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -391,6 +391,12 @@ const writeSummary = computed(() =>
|
||||
n: reportItems.value.filter((i) => i.workStatus === k).length,
|
||||
})),
|
||||
)
|
||||
// 현재 탭에서 보이는 항목 수(0이면 빈 안내 표시)
|
||||
const writeVisible = computed(() =>
|
||||
writeTab.value === 'all'
|
||||
? reportItems.value.length
|
||||
: writeCatCount(writeTab.value),
|
||||
)
|
||||
function cancelReportForm() {
|
||||
reportingCpId.value = null
|
||||
reportItems.value = []
|
||||
@@ -440,6 +446,10 @@ const viewGroups = computed(() => {
|
||||
function viewCatCount(cat: ChecklistCategory): number {
|
||||
return viewItems.value.filter((i) => i.category === cat).length
|
||||
}
|
||||
// 현재 탭에서 보이는 항목 수(0이면 빈 안내 표시)
|
||||
const viewVisible = computed(() =>
|
||||
viewTab.value === 'all' ? viewItems.value.length : viewCatCount(viewTab.value),
|
||||
)
|
||||
const reporterInitial = computed(() => openedReport.value?.reporterName?.[0] ?? '?')
|
||||
// 담당자 액션 카드 테마(시안): changes→빨강 / review→앰버 / done→초록 / 그 외→accent
|
||||
const assigneeCardClass = computed(() => {
|
||||
@@ -1680,10 +1690,10 @@ function badgeFor(name: string | undefined): { label: string; cls: string } {
|
||||
</div>
|
||||
</template>
|
||||
<div
|
||||
v-if="viewItems.length === 0"
|
||||
v-if="viewVisible === 0"
|
||||
class="pr-empty"
|
||||
>
|
||||
보고된 항목이 없습니다.
|
||||
{{ viewTab === 'all' ? '보고된 항목이 없습니다.' : `'${viewTab}' 분류에 항목이 없습니다.` }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1808,10 +1818,10 @@ function badgeFor(name: string | undefined): { label: string; cls: string } {
|
||||
</div>
|
||||
</template>
|
||||
<div
|
||||
v-if="reportItems.length === 0"
|
||||
v-if="writeVisible === 0"
|
||||
class="pr-empty"
|
||||
>
|
||||
보고할 할 일이 없습니다. 메모만 전송됩니다.
|
||||
{{ writeTab === 'all' ? '보고할 할 일이 없습니다. 메모만 전송됩니다.' : `'${writeTab}' 분류에 할 일이 없습니다.` }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user