Skip to content

Commit

Permalink
Minor journey UI tweaks (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
pushchris authored Oct 19, 2023
1 parent ae1648c commit b1507da
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions apps/platform/src/users/UserController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,16 @@ router.get('/:userId', async ctx => {
ctx.body = ctx.state.user
})

router.delete('/:userId', projectRoleMiddleware('editor'), async ctx => {
await App.main.queue.enqueue(UserDeleteJob.from({
project_id: ctx.state.project.id,
external_id: ctx.state.user!.external_id,
}))

ctx.status = 204
ctx.body = ''
})

router.get('/:userId/lists', async ctx => {
const params = extractQueryParams(ctx.query, searchParamsSchema)
ctx.body = await getUserLists(ctx.state.user!.id, params, ctx.state.project.id)
Expand Down
6 changes: 3 additions & 3 deletions apps/ui/src/views/journey/JourneyEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,21 +186,21 @@ function JourneyStepNode({
<h4 className="step-header-title">{name || type.name}</h4>
<div className="step-header-stats">
<span className="stat">
{stats.completed ?? 0}
{(stats.completed ?? 0).toLocaleString()}
{statIcons.completed}
</span>
{
(typeName === 'delay' || !!stats.delay) && (
<span className="stat">
{stats.delay ?? 0}
{(stats.delay ?? 0).toLocaleString()}
{statIcons.delay}
</span>
)
}
{
(typeName === 'action' || !!stats.action) && (
<span className="stat">
{stats.action ?? 0}
{(stats.action ?? 0).toLocaleString()}
{statIcons.action}
</span>
)
Expand Down
2 changes: 1 addition & 1 deletion apps/ui/src/views/journey/Journeys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function Journeys() {
},
{
key: 'usage',
cell: ({ item }) => item.stats?.entrance,
cell: ({ item }) => item.stats?.entrance.toLocaleString(),
},
{
key: 'created_at',
Expand Down

0 comments on commit b1507da

Please sign in to comment.