Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/lib/components/TagListForEdit.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
</Label>
</TableBodyCell>
<TableBodyCell>
{#if tag.id !== 'undefined'}
<!-- Note: temp_ prefix = not yet in DB; show edit link only for registered tags -->
{#if !tag.id.startsWith('temp_')}
<a href={resolve('/(admin)/tags/[tag_id]', { tag_id: tag.id })}>編集</a>
{:else}
未登録
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(admin)/tasks/[task_id]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function load({ locals, params, url }) {
for (let i = 0; i < importTags.length; i++) {
if (!tagMap.has(importTags[i])) {
const tmpTag = {
id: 'undefined',
id: `temp_${importTags[i]}`, // Note: temp_ prefix = not yet in DB; used to distinguish from existing tags in the UI
Comment thread
KATO-Hiro marked this conversation as resolved.
name: importTags[i],
is_published: false,
is_official: false,
Expand Down
Loading