mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-10 05:05:34 +02:00
Added text for empty table and cascade delete for slack bot deletion (#3390)
* fixed fk issue for slack bot deletion * Added text for empty table and cascade delete for slack bot deletion
This commit is contained in:
@@ -1521,6 +1521,7 @@ class SlackBot(Base):
|
|||||||
slack_channel_configs: Mapped[list[SlackChannelConfig]] = relationship(
|
slack_channel_configs: Mapped[list[SlackChannelConfig]] = relationship(
|
||||||
"SlackChannelConfig",
|
"SlackChannelConfig",
|
||||||
back_populates="slack_bot",
|
back_populates="slack_bot",
|
||||||
|
cascade="all, delete-orphan",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -96,6 +96,16 @@ export function SlackBotTable({ slackBots }: { slackBots: SlackBot[] }) {
|
|||||||
</ClickableTableRow>
|
</ClickableTableRow>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
{slackBots.length === 0 && (
|
||||||
|
<TableRow>
|
||||||
|
<TableCell
|
||||||
|
colSpan={4}
|
||||||
|
className="text-center text-muted-foreground"
|
||||||
|
>
|
||||||
|
Please add a New Slack Bot to begin chatting with Danswer!
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</Table>
|
||||||
{slackBots.length > NUM_IN_PAGE && (
|
{slackBots.length > NUM_IN_PAGE && (
|
||||||
|
Reference in New Issue
Block a user