feat: enhance post creation feedback and improve table layout in Post Management
This commit is contained in:
parent
a577f94acd
commit
aed4102878
@ -26,6 +26,7 @@
|
||||
const state = await createPost(params);
|
||||
|
||||
if (state.isSuccess()) {
|
||||
loadPosts({ showUnpublished: true });
|
||||
toast.success(`Post created successfully with ID: ${state.data.id}`);
|
||||
} else if (state.isError()) {
|
||||
toast.error('Failed to create post', {
|
||||
@ -56,13 +57,15 @@
|
||||
{#each postsListedState.data as postInfo (postInfo.id)}
|
||||
<TableRow>
|
||||
<TableCell>{postInfo.id}</TableCell>
|
||||
<TableCell>{postInfo.title}</TableCell>
|
||||
<TableCell class="flex flex-row flex-wrap gap-2">
|
||||
{#each postInfo.labels as label (label.id)}
|
||||
<PostLabel {label} />
|
||||
{/each}
|
||||
<TableCell><span class="text-wrap">{postInfo.title}</span></TableCell>
|
||||
<TableCell>
|
||||
<div class="flex flex-row flex-wrap gap-2">
|
||||
{#each postInfo.labels as label (label.id)}
|
||||
<PostLabel {label} />
|
||||
{/each}
|
||||
</div>
|
||||
</TableCell>
|
||||
<TableCell>{postInfo.formattedPublishedTime || '---'}</TableCell>
|
||||
<TableCell>{postInfo.formattedPublishedTime}</TableCell>
|
||||
</TableRow>
|
||||
{/each}
|
||||
{/if}
|
||||
|
Loading…
x
Reference in New Issue
Block a user