chore: passes allowCreate into list drawer and adds test (#11284)
### What? We had an `allowCreate` prop for the list drawer that doesn't do anything. This PR passes the prop through so it can be used. ### How? Passes `allowCreate` down to the list view and ties it with `hasCreatePermission` #### Testing - Use `admin` test suite and `withListDrawer` collection. - Test added to the `admin/e2e/list-view`. Fixes #11246
This commit is contained in:
committed by
GitHub
parent
26163a7535
commit
c05f10abbc
@@ -83,6 +83,7 @@ export interface Config {
|
||||
'disable-duplicate': DisableDuplicate;
|
||||
'base-list-filters': BaseListFilter;
|
||||
with300documents: With300Document;
|
||||
'with-list-drawer': WithListDrawer;
|
||||
'payload-locked-documents': PayloadLockedDocument;
|
||||
'payload-preferences': PayloadPreference;
|
||||
'payload-migrations': PayloadMigration;
|
||||
@@ -106,6 +107,7 @@ export interface Config {
|
||||
'disable-duplicate': DisableDuplicateSelect<false> | DisableDuplicateSelect<true>;
|
||||
'base-list-filters': BaseListFiltersSelect<false> | BaseListFiltersSelect<true>;
|
||||
with300documents: With300DocumentsSelect<false> | With300DocumentsSelect<true>;
|
||||
'with-list-drawer': WithListDrawerSelect<false> | WithListDrawerSelect<true>;
|
||||
'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
|
||||
'payload-preferences': PayloadPreferencesSelect<false> | PayloadPreferencesSelect<true>;
|
||||
'payload-migrations': PayloadMigrationsSelect<false> | PayloadMigrationsSelect<true>;
|
||||
@@ -445,6 +447,18 @@ export interface With300Document {
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "with-list-drawer".
|
||||
*/
|
||||
export interface WithListDrawer {
|
||||
id: string;
|
||||
title?: string | null;
|
||||
description?: string | null;
|
||||
number?: number | null;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "payload-locked-documents".
|
||||
@@ -519,6 +533,10 @@ export interface PayloadLockedDocument {
|
||||
| ({
|
||||
relationTo: 'with300documents';
|
||||
value: string | With300Document;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: 'with-list-drawer';
|
||||
value: string | WithListDrawer;
|
||||
} | null);
|
||||
globalSlug?: string | null;
|
||||
user: {
|
||||
@@ -822,6 +840,17 @@ export interface With300DocumentsSelect<T extends boolean = true> {
|
||||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "with-list-drawer_select".
|
||||
*/
|
||||
export interface WithListDrawerSelect<T extends boolean = true> {
|
||||
title?: T;
|
||||
description?: T;
|
||||
number?: T;
|
||||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "payload-locked-documents_select".
|
||||
|
||||
Reference in New Issue
Block a user