2022-07-09 17:58:13 +00:00
|
|
|
import {allResourceActions, FieldType, Renderer, ResourceAction, ResourceConfiguration} from '../cobalt'
|
2022-07-04 08:04:11 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
resources: [
|
|
|
|
{
|
|
|
|
key: 'workItem',
|
|
|
|
primaryKey: 'work_item_id',
|
|
|
|
collection: 'work_items',
|
|
|
|
display: {
|
|
|
|
field: 'name',
|
|
|
|
singular: 'Work Item',
|
|
|
|
plural: 'Work Items',
|
|
|
|
},
|
|
|
|
supportedActions: allResourceActions,
|
|
|
|
fields: [
|
|
|
|
{
|
|
|
|
key: 'name',
|
|
|
|
display: 'Name',
|
|
|
|
type: FieldType.text,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'description',
|
|
|
|
display: 'Description',
|
2022-07-09 17:58:13 +00:00
|
|
|
type: FieldType.html,
|
2022-07-04 08:04:11 +00:00
|
|
|
required: true,
|
|
|
|
renderer: Renderer.html,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'start_date',
|
|
|
|
display: 'Start Date',
|
|
|
|
type: FieldType.date,
|
|
|
|
required: true,
|
|
|
|
sort: 'desc',
|
|
|
|
renderer: Renderer.date,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'end_date',
|
|
|
|
display: 'End Date',
|
|
|
|
type: FieldType.date,
|
|
|
|
required: false,
|
|
|
|
renderer: Renderer.date,
|
|
|
|
}
|
|
|
|
],
|
|
|
|
},
|
2022-07-09 17:58:13 +00:00
|
|
|
{
|
|
|
|
key: 'snippet',
|
|
|
|
primaryKey: 'snippet_id',
|
|
|
|
collection: 'snippets',
|
|
|
|
display: {
|
|
|
|
field: 'slug',
|
|
|
|
singular: 'Snippet',
|
|
|
|
plural: 'Snippets',
|
|
|
|
},
|
|
|
|
supportedActions: allResourceActions,
|
|
|
|
fields: [
|
|
|
|
{
|
|
|
|
key: 'slug',
|
|
|
|
display: 'Slug',
|
|
|
|
type: FieldType.text,
|
|
|
|
required: true,
|
|
|
|
sort: 'asc',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'syntax',
|
|
|
|
display: 'Syntax',
|
|
|
|
type: FieldType.text,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'users_only',
|
|
|
|
display: 'Users only?',
|
|
|
|
type: FieldType.bool,
|
|
|
|
required: true,
|
|
|
|
renderer: Renderer.bool,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'single_access_only',
|
|
|
|
display: 'Single-access only?',
|
|
|
|
type: FieldType.bool,
|
|
|
|
required: true,
|
|
|
|
renderer: Renderer.bool,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'access_key',
|
|
|
|
display: 'Access key',
|
|
|
|
type: FieldType.text,
|
|
|
|
required: false,
|
|
|
|
hideOn: {
|
|
|
|
listing: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'body',
|
|
|
|
display: 'Content',
|
|
|
|
type: FieldType.textarea,
|
|
|
|
required: true,
|
|
|
|
hideOn: {
|
|
|
|
listing: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'contactSubmission',
|
|
|
|
primaryKey: 'contact_submission_id',
|
|
|
|
collection: 'contact_submissions',
|
|
|
|
display: {
|
|
|
|
field: 'name',
|
|
|
|
singular: 'Contact Submission',
|
|
|
|
plural: 'Contact Submissions',
|
|
|
|
},
|
|
|
|
supportedActions: [
|
|
|
|
ResourceAction.read, ResourceAction.readOne, ResourceAction.delete,
|
|
|
|
],
|
|
|
|
fields: [
|
|
|
|
{
|
|
|
|
key: 'name',
|
|
|
|
display: 'Name',
|
|
|
|
type: FieldType.text,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'email',
|
|
|
|
display: 'E-Mail Address',
|
|
|
|
type: FieldType.text,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'message',
|
|
|
|
display: 'Message',
|
|
|
|
type: FieldType.textarea,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'sent_at',
|
|
|
|
display: 'Sent At',
|
|
|
|
type: FieldType.date,
|
|
|
|
renderer: FieldType.date,
|
|
|
|
required: false,
|
|
|
|
sort: 'desc',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'goLink',
|
|
|
|
primaryKey: 'go_link_id',
|
|
|
|
collection: 'go_links',
|
|
|
|
display: {
|
|
|
|
field: 'short',
|
|
|
|
singular: 'Go Link',
|
|
|
|
plural: 'Go Links',
|
|
|
|
},
|
|
|
|
supportedActions: allResourceActions,
|
|
|
|
fields: [
|
|
|
|
{
|
|
|
|
key: 'short',
|
|
|
|
display: 'Slug',
|
|
|
|
type: FieldType.text,
|
|
|
|
required: true,
|
|
|
|
sort: 'asc',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'url',
|
|
|
|
display: 'URL',
|
|
|
|
type: FieldType.text,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'active',
|
|
|
|
display: 'Active?',
|
|
|
|
type: FieldType.bool,
|
|
|
|
renderer: Renderer.bool,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'feedPost',
|
|
|
|
primaryKey: 'feed_post_id',
|
|
|
|
collection: 'feed_posts',
|
|
|
|
display: {
|
|
|
|
// field: '',
|
|
|
|
singular: 'Feed Post',
|
|
|
|
plural: 'Feed Posts',
|
|
|
|
},
|
|
|
|
supportedActions: allResourceActions,
|
|
|
|
fields: [
|
|
|
|
{
|
|
|
|
key: 'posted_at',
|
|
|
|
display: 'Posted At',
|
|
|
|
type: FieldType.date,
|
|
|
|
sort: 'desc',
|
|
|
|
required: false,
|
|
|
|
renderer: Renderer.date,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'tag',
|
|
|
|
display: 'Tag',
|
|
|
|
type: FieldType.text,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'body',
|
|
|
|
display: 'Body',
|
|
|
|
type: FieldType.html,
|
|
|
|
renderer: Renderer.html,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'visible',
|
|
|
|
display: 'Visible?',
|
|
|
|
type: FieldType.bool,
|
|
|
|
renderer: Renderer.bool,
|
|
|
|
required: false,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
2022-07-04 08:04:11 +00:00
|
|
|
] as ResourceConfiguration[],
|
|
|
|
}
|