53 lines
2.0 KiB
JavaScript
53 lines
2.0 KiB
JavaScript
import { dropdownMap } from '@/api/dropdowns';
|
|
|
|
const tracks = {
|
|
service: 'events',
|
|
module: 'track',
|
|
title: 'Track',
|
|
subtitle: 'Events',
|
|
baseUrl: '/track',
|
|
listPath: '/tracks',
|
|
listFields: [
|
|
{ key: 'actions', title: 'Actions', buttons: ['edit', 'delete'] },
|
|
{ key: 'name', title: 'Track Name', type: 'text' },
|
|
{ key: 'track_type', title: 'Type', type: 'select' },
|
|
{ key: 'event_id', title: 'Event', type: 'text' },
|
|
{ key: 'room', title: 'Room', type: 'text' },
|
|
{ key: 'max_attendees', title: 'Max Attendees', type: 'number' },
|
|
{ key: 'order', title: 'Order', type: 'number' },
|
|
{ key: 'status', title: 'Status', type: 'select' },
|
|
],
|
|
formFields: async () => {
|
|
const events = await dropdownMap('events', 'event', (item) => item.name);
|
|
return [
|
|
{ key: 'event_id', title: 'Event', type: 'select', required: true, values: events },
|
|
{ key: 'name', title: 'Track Name', type: 'text', required: true },
|
|
{ key: 'description', title: 'Description', type: 'textarea' },
|
|
{
|
|
key: 'track_type',
|
|
title: 'Track Type',
|
|
type: 'select',
|
|
required: true,
|
|
values: {
|
|
general: 'General',
|
|
technical: 'Technical',
|
|
business: 'Business',
|
|
networking: 'Networking',
|
|
workshop: 'Workshop',
|
|
panel: 'Panel Discussion',
|
|
keynote: 'Keynote',
|
|
other: 'Other',
|
|
},
|
|
},
|
|
{ key: 'status', title: 'Status', type: 'select', required: true, values: { active: 'Active', inactive: 'Inactive', completed: 'Completed' } },
|
|
{ key: 'max_attendees', title: 'Max Attendees', type: 'number', default: 0 },
|
|
{ key: 'is_parallel', title: 'Parallel Track', type: 'yesno', required: true },
|
|
{ key: 'order', title: 'Display Order', type: 'number', default: 0 },
|
|
{ key: 'room', title: 'Room/Venue', type: 'text' },
|
|
{ key: 'virtual_link', title: 'Virtual Link', type: 'text' },
|
|
];
|
|
},
|
|
};
|
|
|
|
export default tracks;
|