more explicit manifest names
This commit is contained in:
@@ -17,8 +17,8 @@ export const manifest: UmbBackofficeManifestKind = {
|
||||
icon: 'icon-enter',
|
||||
label: '#actions_move',
|
||||
treeRepositoryAlias: '',
|
||||
moveRepositoryAlias: '',
|
||||
pickerModal: '',
|
||||
moveTpRepositoryAlias: '',
|
||||
treePickerModal: '',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -10,14 +10,14 @@ export class UmbMoveToEntityAction extends UmbEntityActionBase<MetaEntityActionM
|
||||
if (!this.args.entityType) throw new Error('Entity Type is not available');
|
||||
|
||||
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
|
||||
const modalContext = modalManager.open(this, this.args.meta.pickerModal) as any; // TODO: make generic picker interface with selection
|
||||
const modalContext = modalManager.open(this, this.args.meta.treePickerModal) as any; // TODO: make generic picker interface with selection
|
||||
const value = await modalContext.onSubmit();
|
||||
const destinationUnique = value.selection[0];
|
||||
if (destinationUnique === undefined) throw new Error('Destination Unique is not available');
|
||||
|
||||
const moveRepository = await createExtensionApiByAlias<UmbMoveToRepository>(
|
||||
this,
|
||||
this.args.meta.moveRepositoryAlias,
|
||||
this.args.meta.moveToRepositoryAlias,
|
||||
);
|
||||
if (!moveRepository) throw new Error('Move Repository is not available');
|
||||
|
||||
|
||||
@@ -125,16 +125,16 @@ export interface MetaEntityActionDuplicateKind extends MetaEntityActionDefaultKi
|
||||
pickerModal: UmbModalToken | string;
|
||||
}
|
||||
|
||||
// MOVE
|
||||
// MOVE TO
|
||||
export interface ManifestEntityActionMoveToKind extends ManifestEntityAction<MetaEntityActionMoveToKind> {
|
||||
type: 'entityAction';
|
||||
kind: 'moveTo';
|
||||
}
|
||||
|
||||
export interface MetaEntityActionMoveToKind extends MetaEntityActionDefaultKind {
|
||||
moveRepositoryAlias: string;
|
||||
itemRepositoryAlias: string;
|
||||
pickerModal: UmbModalToken | string;
|
||||
moveToRepositoryAlias: string;
|
||||
treeRepositoryAlias: string;
|
||||
treePickerModal: UmbModalToken | string;
|
||||
}
|
||||
|
||||
// FOLDER
|
||||
|
||||
@@ -13,9 +13,8 @@ const entityActions: Array<ManifestTypes> = [
|
||||
forEntityTypes: [UMB_DATA_TYPE_ENTITY_TYPE],
|
||||
meta: {
|
||||
treeRepositoryAlias: UMB_DATA_TYPE_TREE_REPOSITORY_ALIAS,
|
||||
moveRepositoryAlias: UMB_MOVE_DATA_TYPE_REPOSITORY_ALIAS,
|
||||
pickerModal: UMB_DATA_TYPE_PICKER_MODAL,
|
||||
foldersOnly: true,
|
||||
moveToRepositoryAlias: UMB_MOVE_DATA_TYPE_REPOSITORY_ALIAS,
|
||||
treePickerModal: UMB_DATA_TYPE_PICKER_MODAL,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user