> For the complete documentation index, see [llms.txt](https://feathersjs-mongoose.gitbook.io/feathers-mongoose-casl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://feathersjs-mongoose.gitbook.io/feathers-mongoose-casl/docs/guides/dashboard/service-configuration.md).

# Dashboard Config

| key                    | type                          | info                                                                                                                                                                                                              | example                           |
| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| hide                   | boolean                       | set true to hide this service from dashboard                                                                                                                                                                      |                                   |
| sideBarIconName        | string                        | <p>allow you to change the default icon on the dashboard sidebar</p><p>can be of of the <a href="https://material-ui.com/components/material-icons/"><https://material-ui.com/components/material-icons/></a></p> | 'user'                            |
| defaultFieldsToDisplay | array                         | to hide default fields without using the layout                                                                                                                                                                   | \['\_id','createdAt','updatedAt'] |
| docLayout              | array                         | <p>controll the layout of the document</p><p></p><p>add custom fields</p>                                                                                                                                         |                                   |
| docTitleField          | string                        | The field to display as page title when edit a document                                                                                                                                                           | <p></p><p></p>                    |
| populate               | array                         | <p>Use populate When you want the table to populate fields</p><p><br>This property only adds the populate to client request, </p><p>you still need to handle the ability, read this</p>                           |                                   |
| hideNewButton          | boolean                       | set true to hide the new button                                                                                                                                                                                   |                                   |
| actionButtonsPosition  | string                        | <p>enums: 'start', 'end'</p><p>by default the action buttons render at the end of the row</p>                                                                                                                     |                                   |
| filterFields           | array                         | optioanl - pass an array of fields to display in the filters. when it is empty the all fields will display                                                                                                        |                                   |
| listFieldAlign         | 'left' \| 'right' \| 'center' | default 'right'                                                                                                                                                                                                   |                                   |
| errMessages            | object                        | <p>to translate the input validate errors</p><p>  errMessages: {                                                                                                                                                  |                                   |

</p><p>    default: JSON.stringify({</p><p>      name: {</p><p>        required: 'name is required'</p><p>      }</p><p>    }),</p><p>    i18n: {</p><p>      'heIL': JSON.stringify({</p><p>        name: {</p><p>          required: 'שדה שם הוא חובה'</p><p>        }</p><p>      })</p><p>    }</p><p>  }</p> |                                    |
| regex                  | Boolean \| array              | <p>set true to apply regex search on all string fields<br><br>or set specific fields <br>regex: ['email'] </p>                                                                                                                                                                                                                                                                                 |                                    |

### Example of dashboardConfig

```
     dashboardConfig: {
      sideBarIconName: 'SettingsInputComponent',
      docLayout: [
        '_id',
        'updatedAt',
        'createdAt',
        ['title',
          'description'],
        ['room',
          'controller'],
        'type',
        ['controllerType',
          'switchingType'],
        'schedules',
        'status',
        {
          when: {
            field: 'type',
            equalTo: OFFICES_TYPE.other,
            then: 'other_type'
          }
        },  
        {
          type: 'custom',
          customFieldType: 'link',
          style: 'button',
          linkTemplate: 'dashboard/floor-plan?floorId={{ _id }}',
          label: 'Plan',
          itemKey: 'linkToPlan',
          hideOnCreate: true,
          hideOnUpdate: false,
        }
      ],
      i18n: {
        'heIL': {
          serviceName: 'רכיבים',
          serviceNameMany: 'רכיבים',
          serviceNameOne: 'רכיב',
          fields: {
            '_id': 'מזהה',
            'updatedAt': 'עודכן',
            'createdAt': 'נוצר',
            title: 'כותרת',
            description: 'תיאור',
            room: 'חדש',
            controller: 'בקר',
            type: 'סוג',
            controllerType: 'סוג בקר',
            switchingType: 'סוג המתג',
            schedules: 'לוח זמנים',
            status: 'סטאטוס',
            floorPlan: 'תכנון קומה',
          }
        }
      }
    }
```

\
\
**related docs:**

{% content-ref url="/pages/-LjFgM9074Af3w0\_6Dr3" %}
[Dashboard Config](/feathers-mongoose-casl/docs/guides/dashboard/service-configuration.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LgWlVD57DLE\_2ZZvsij" %}
[$Populate](/feathers-mongoose-casl/docs/guides/populate.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LtJIwa0vyIH36efmikq" %}
[customElements](/feathers-mongoose-casl/docs/guides/dashboard/service-configuration/custom-fields/customelements.md)
{% endcontent-ref %}
