@websolutespa/payload-plugin-bowl
Version:
Bowl PayloadCms plugin of the BOM Repository
36 lines (35 loc) • 968 B
JavaScript
import { hasRole } from '../core';
import { roles } from '../types';
export const SubContinent = (options)=>({
type: 'withStatic',
src: 'https://actarian.github.io/cms-i18n-react/api/subContinent.json',
slug: options.slug.subContinent,
admin: {
hidden: (args)=>!hasRole(args.user, roles.Admin)
},
/*
map: {
continentId: 'continent',
},
*/ fields: [
{
name: 'id',
label: 'ID',
type: 'text'
},
{
name: 'name',
label: 'Name',
type: 'text'
},
{
name: 'continent',
label: 'Continent',
type: 'relationship',
relationTo: options.slug.continent,
hasMany: false,
required: true
}
]
});
//# sourceMappingURL=SubContinent.js.map