feat(plugin-multi-tenant): allow tenant field overrides (#13316)

Allows user to override more of the tenant field config. Now you can
override most of the field config with:

### At the root level
```ts
/**
 * Field configuration for the field added to all tenant enabled collections
 */
tenantField?: RootTenantFieldConfigOverrides
```

### At the collection level
Setting collection level overrides will replace the root level overrides
shown above.

```ts
collections: {
  [key in CollectionSlug]?: {
    // ... rest of the types
    /**
     * Overrides for the tenant field, will override the entire tenantField configuration
     */
    tenantFieldOverrides?: CollectionTenantFieldConfigOverrides
  }
}
```
This commit is contained in:
Jarrod Flesch
2025-08-12 11:33:29 -04:00
committed by GitHub
parent 306b7f6943
commit 995f96bc70
52 changed files with 478 additions and 303 deletions

View File

@@ -44,7 +44,15 @@ export default buildConfigWithDefaults({
isGlobal: true,
},
},
tenantSelectorLabel: { en: 'Site', es: 'Site in es' },
i18n: {
translations: {
en: {
'field-assignedTenant-label': 'Currently Assigned Site',
'nav-tenantSelector-label': 'Filter By Site',
'confirm-modal-tenant-switch--heading': 'Confirm Site Change',
},
},
},
}),
],
typescript: {