feat(admin): Owner column on All Users' Events card
Some checks failed
lint.yml / feat(admin): Owner column on All Users' Events card (pull_request) Failing after 0s
Some checks failed
lint.yml / feat(admin): Owner column on All Users' Events card (pull_request) Failing after 0s
Adds the event's wallet owner (user_id) as the first column of the admin-only All Users' Events table so cross-tenant rows are attributable at a glance. Server-side join: GET /events/all now resolves each event.wallet -> wallet.user and stamps the result on the response as wallet_user_id. Frontend gets a dedicated allUsersEventsTable.columns definition so the user's own-events table stays unchanged. Follow-up #22 covers letting the admin actually edit those events once attributed.
This commit is contained in:
parent
66d263ef14
commit
3606fd9a0a
3 changed files with 62 additions and 4 deletions
|
|
@ -14,6 +14,51 @@ window.PageEvents = {
|
|||
settings: {
|
||||
auto_approve: false
|
||||
},
|
||||
allUsersEventsTable: {
|
||||
// Shown on the admin All Users' Events card. Includes the
|
||||
// wallet owner (`wallet_user_id` resolved server-side) so
|
||||
// cross-tenant rows are attributable to a user.
|
||||
columns: [
|
||||
{
|
||||
name: 'wallet_user_id',
|
||||
align: 'left',
|
||||
label: 'Owner',
|
||||
field: 'wallet_user_id'
|
||||
},
|
||||
{name: 'id', align: 'left', label: 'ID', field: 'id'},
|
||||
{name: 'name', align: 'left', label: 'Name', field: 'name'},
|
||||
{
|
||||
name: 'event_start_date',
|
||||
align: 'left',
|
||||
label: 'Start date',
|
||||
field: 'event_start_date'
|
||||
},
|
||||
{
|
||||
name: 'event_end_date',
|
||||
align: 'left',
|
||||
label: 'End date',
|
||||
field: 'event_end_date'
|
||||
},
|
||||
{
|
||||
name: 'closing_date',
|
||||
align: 'left',
|
||||
label: 'Ticket close',
|
||||
field: 'closing_date'
|
||||
},
|
||||
{
|
||||
name: 'canceled',
|
||||
align: 'left',
|
||||
label: 'Canceled',
|
||||
field: row => {
|
||||
if (row.extra && row.extra.conditional && row.canceled) {
|
||||
return 'Yes'
|
||||
}
|
||||
return 'No'
|
||||
}
|
||||
},
|
||||
{name: 'status', align: 'left', label: 'Status', field: 'status'}
|
||||
]
|
||||
},
|
||||
eventsTable: {
|
||||
columns: [
|
||||
{name: 'id', align: 'left', label: 'ID', field: 'id'},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue