Listing
Fields
Problem
All the fields are selected and listed in the listing table
Solution
Add required field attribut to have the required fields from the api then to be checked and showed in the listing table.
Code example
let selectedList: string[] = ['id','fillType','url','status','impact','type',];
Filter
Problem
Can't show toString in filter
Solution
Add type async et target resource async with the name of entity to get the list
Code example
{
key: 'impact',
placeholder: 'impact',
type: 'select_async',
targetResourceAsync: 'ticket_impacts',
isMulti: true,
},
Problem
Can't show boolean value to filter with, example : replied (true/ false / none)
Solution
Add type select et options Array Finite with array of limited options
Code example
{
key: 'replied',
placeholder: 'replied',
type: 'select',
optionsArrayFinite: [{label:'--', value: ''},{label:'true', value: true},{label :'false', value: false}]
},
Actions
Problem
All the actions are selected and listed in the listing table
Solution
hide all actions and add only the action wanted
Code
setSelectedActions(
router.query.actions
? router.query.actions.toString().split(',')
: selectedActions
);
SideBox
Problem
Can't see the details of other entity that related to the entity example ticket and ticket_reply
Solution
Add sidebox in details page to see and navigate to the related entity
Code example
const sideBoxs: ISideBox[] = [
{
subresource: 'ticket_replies',
defaultColumns: [
{
title: 'ID',
key: 'id',
type: 'url',
},
{
title: 'Message',
key: 'message',
},
],
},
{
subresource: 'files',
defaultColumns: [
{
title: 'ID',
key: 'id',
type: 'url',
},
{
title: 'File Name',
key: 'fileName',
},
],
},
{
subresource: 'ticket_taggings',
defaultColumns: [
{
title: 'ID',
key: 'id',
type: 'url',
},
{
title: 'Tag',
key: 'tag.uniqueId',
type: 'url',
},
],
},
{
subresource: 'ticket_tasks',
defaultColumns: [
{
title: 'ID',
key: 'id',
type: 'url',
},
{
title: 'Uri',
key: 'uri',
},
],
},
]