UNPKG

@websolutespa/payload-plugin-bowl

Version:

Bowl PayloadCms plugin of the BOM Repository

45 lines (44 loc) 1.23 kB
import { hasRole } from '../core'; import { roles } from '../types'; export const Region = (options)=>({ type: 'withStatic', src: 'https://actarian.github.io/cms-i18n-react/api/region.json', slug: options.slug.region, admin: { hidden: (args)=>!hasRole(args.user, roles.Admin) }, /* map: { countryId: 'country', countryZoneId: 'countryZone', }, */ fields: [ { name: 'id', label: 'ID', type: 'text' }, { name: 'name', label: 'Name', type: 'text' }, { name: 'country', label: 'Country', type: 'relationship', relationTo: options.slug.country, hasMany: false, required: true }, { name: 'countryZone', label: 'Country Zone', type: 'relationship', relationTo: options.slug.countryZone, hasMany: false, required: true } ] }); //# sourceMappingURL=Region.js.map