UNPKG

@websolutespa/payload-plugin-bowl

Version:

Bowl PayloadCms plugin of the BOM Repository

59 lines (58 loc) 1.63 kB
import { hasRole } from '../core'; import { roles } from '../types'; export const Province = (options)=>({ type: 'withStatic', src: 'https://actarian.github.io/cms-i18n-react/api/province.json', slug: options.slug.province, admin: { hidden: (args)=>!hasRole(args.user, roles.Admin) }, /* map: { countryId: 'country', countryZoneId: 'countryZone', regionId: 'region', }, */ fields: [ { name: 'id', label: 'ID', type: 'text' }, { name: 'name', label: 'Name', type: 'text' }, { name: 'code', label: 'Code', 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 }, { name: 'region', label: 'Region', type: 'relationship', relationTo: options.slug.region, hasMany: false, required: true } ] }); //# sourceMappingURL=Province.js.map