feathers-mongoose-casl
Version 2.1.2
Version 2.1.2
  • feathers-mongoose-casl
  • Docs
    • Migrating
    • START A NEW PROJECT
      • Generate a new project.
      • install feathers-mongoose-casl
      • feathers-logger
      • Update config
      • Add mongoose
      • Email service
      • App hooks
      • Import required services
      • Verify user and filter user fields
      • Swagger, Logger, BodyParser
      • Email templates
      • public HTML
      • Run the server
      • Create you first user
      • vs code snippet extension
      • Test Login
      • Dashboard
      • Create a new Service with casl&Dashboard
      • Posts Postman snippet
      • Add Admin role
      • Done!
    • Advanced
      • Security - eslint-plugin-security
      • Security - rate limiting
      • Development tools
    • Guides
      • Throw errors
      • Auth Flow
      • Authentication
      • Authouriztion
      • /me
      • Rules Cache
      • Create a new service
      • Custom service validtor client data
      • validators
        • Example of use
        • Types
        • Mongoose schema
      • Default value
      • $Populate
      • Upload service
      • Upload files
        • Create upload service
        • Sign File After Populate
        • Storage support
          • Google-cloud
      • Error
      • feathers Client examples
      • Dashboard
        • Dashboard Config
          • Field configuration
          • doc Layout
          • custom Fields
            • customElements
        • Online dashboard
        • Add to your react app
      • customized feathers-mongoose-casl/services
      • Redis - in progress
      • S3
      • Postman
      • Swagger
      • debug
    • Production
      • ENV
    • Feathers wiki
      • Good links
    • utils
      • send email example
      • Async For Each
      • Create heroku server
      • pick
      • vs code snippet extension
      • Persist user request
    • Ecosystem
    • TODO
    • Versions updates
Powered by GitBook
On this page

Was this helpful?

  1. Docs
  2. Guides
  3. Dashboard

Dashboard Config

key

type

info

example

hide

boolean

set true to hide this service from dashboard

sideBarIconName

string

allow you to change the default icon on the dashboard sidebar

'user'

defaultFieldsToDisplay

array

to hide default fields without using the layout

['_id','createdAt','updatedAt']

docLayout

array

controll the layout of the document

add custom fields

docTitleField

string

The field to display as page title when edit a document

populate

array

Use populate When you want the table to populate fields

This property only adds the populate to client request,

you still need to handle the ability, read this

hideNewButton

boolean

set true to hide the new button

actionButtonsPosition

string

enums: 'start', 'end'

by default the action buttons render at the end of the row

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

to translate the input validate errors

errMessages: {

default: JSON.stringify({

name: {

required: 'name is required'

}

}),

i18n: {

'heIL': JSON.stringify({

name: {

required: 'שדה שם הוא חובה'

}

})

}

}

regex

Boolean | array

set true to apply regex search on all string fields or set specific fields regex: ['email']

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:

PreviousDashboardNextField configuration

Last updated 5 years ago

Was this helpful?

can be of of the

Dashboard Config
$Populate
customElements
https://material-ui.com/components/material-icons/