Skip to content

Commit

Permalink
feat: decouple workqueue from TCME (#8372)
Browse files Browse the repository at this point in the history
* feat: workqueue wip

* fix: update types

* fix: update types

* feat: use default columns from defination of all workqueue

* feat: use correct anchor

* fix: get config of correct event

* fix: use same format for intl as in summarypage

* fix: use flattened intl

* fix: await not return

* fix: revert changes in indexing

* fix: revert changes in initialValue

* add ready for review and ready to print workqueue

* feat: add validation

* fix: workqueue in fixture

* chore: unused export and import and fixtures

* chore: bump up toolkit

* fix: refactor and fix types

Co-authored-by: Markus Laurila <[email protected]>

---------

Co-authored-by: Markus Laurila <[email protected]>
  • Loading branch information
jamil314 and makelicious authored Jan 28, 2025
1 parent 05b3e1b commit 208f991
Show file tree
Hide file tree
Showing 16 changed files with 431 additions and 198 deletions.
73 changes: 22 additions & 51 deletions packages/client/src/v2-events/features/events/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,51 +157,30 @@ export const tennisClubMembershipEvent = {
},
workqueues: [
{
id: 'in-progress',
title: {
defaultMessage: 'In progress',
description: 'Label for in progress workqueue',
id: 'event.tennis-club-membership.workqueue.in-progress.label'
},
id: 'all',
fields: [
{
id: 'applicant.firstname'
},
{
id: 'event.type'
},
{
id: 'event.createdAt'
},
{
id: 'event.modifiedAt'
column: 'title',
label: {
defaultMessage: '{applicant.firstname} {applicant.surname}',
description: 'Label for name in all workqueue',
id: 'event.tennis-club-membership.workqueue.all.name.label'
}
}
],
filters: [
{
status: ['CREATED']
}
]
filters: []
},
{
id: 'ready-for-review',
title: {
defaultMessage: 'Ready for review',
description: 'Label for in review workqueue',
id: 'event.tennis-club-membership.workqueue.in-review.label'
},

fields: [
{
id: 'applicant.firstname'
},
{
id: 'event.type'
},
{
id: 'event.createdAt'
},
{
id: 'event.modifiedAt'
column: 'title',
label: {
defaultMessage: '{applicant.firstname} {applicant.surname}',
description: 'Label for name in all workqueue',
id: 'event.tennis-club-membership.workqueue.readyForReview.name.label'
}
}
],
filters: [
Expand All @@ -212,23 +191,15 @@ export const tennisClubMembershipEvent = {
},
{
id: 'registered',
title: {
defaultMessage: 'Ready to print',
description: 'Label for registered workqueue',
id: 'event.tennis-club-membership.workqueue.registered.label'
},

fields: [
{
id: 'applicant.firstname'
},
{
id: 'event.type'
},
{
id: 'event.createdAt'
},
{
id: 'event.modifiedAt'
column: 'title',
label: {
defaultMessage: '{applicant.firstname} {applicant.surname}',
description: 'Label for name in all workqueue',
id: 'event.tennis-club-membership.workqueue.registered.name.label'
}
}
],
filters: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,21 @@ function EventOverviewContainer() {
const { getEvents, getEvent } = useEvents()
const { getUsers } = useUsers()

const [config] = useEventConfigurations()
const configs = useEventConfigurations()

const [fullEvent] = getEvent.useSuspenseQuery(params.eventId)
const [events] = getEvents.useSuspenseQuery()
const event = events.find((e) => e.id === params.eventId)

const config = configs.find((c) => c.id === event?.type)

const userIds = getUserIdsFromActions(fullEvent.actions)
const [users] = getUsers.useSuspenseQuery(userIds)
const locations = useSelector(getLocations)

if (!config) {
return null
}
if (!event) {
return null
}
Expand Down
Loading

0 comments on commit 208f991

Please sign in to comment.