mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACA-3379] Routing & skeleton for manage rules screen (#2575)
* [ACA-3379] Routing & skeleton for manage rules screen * Linting * Update routing so it's no longer lazy loaded * Reverted to using lazy-loaded routes * Remove action visibility from favourites, update e2e test data
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
"loginRoute": "login",
|
||||
"plugins": {
|
||||
"aosPlugin": ${APP_CONFIG_PLUGIN_AOS},
|
||||
"contentService": ${APP_CONFIG_PLUGIN_CONTENT_SERVICE}
|
||||
"contentService": ${APP_CONFIG_PLUGIN_CONTENT_SERVICE},
|
||||
"folderRules": ${APP_CONFIG_PLUGIN_FOLDER_RULES}
|
||||
},
|
||||
"oauth2": {
|
||||
"host": "${APP_CONFIG_OAUTH2_HOST}",
|
||||
|
||||
@@ -548,6 +548,15 @@ export const APP_ROUTES: Routes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'nodes/:nodeId',
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('@alfresco/aca-folder-rules').then((m) => m.AcaFolderRulesModule)
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '**',
|
||||
component: GenericErrorComponent
|
||||
|
||||
@@ -74,7 +74,6 @@ import { forkJoin, Observable, of, zip } from 'rxjs';
|
||||
import { catchError, map, mergeMap, take, tap } from 'rxjs/operators';
|
||||
import { NodeActionsService } from './node-actions.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { EditRuleDialogSmartComponent } from '@alfresco/aca-folder-rules';
|
||||
|
||||
interface RestoredNode {
|
||||
status: number;
|
||||
@@ -1079,13 +1078,4 @@ export class ContentManagementService {
|
||||
.onAction()
|
||||
.subscribe(() => this.undoMoveNodes(moveResponse, initialParentId));
|
||||
}
|
||||
|
||||
manageRules(node: any) {
|
||||
if (node && node.entry) {
|
||||
this.dialogRef.open(EditRuleDialogSmartComponent, {
|
||||
minWidth: '70%',
|
||||
panelClass: 'aca-edit-rule-dialog-container'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -428,14 +428,14 @@ export class NodeEffects {
|
||||
ofType<ManageRulesAction>(NodeActionTypes.ManageRules),
|
||||
map((action) => {
|
||||
if (action && action.payload) {
|
||||
this.contentService.manageRules(action.payload);
|
||||
this.store.dispatch(new NavigateRouteAction(['nodes', action.payload.entry.id, 'rules']));
|
||||
} else {
|
||||
this.store
|
||||
.select(getAppSelection)
|
||||
.pipe(take(1))
|
||||
.subscribe((selection) => {
|
||||
if (selection && !selection.isEmpty) {
|
||||
this.contentService.manageRules(selection.nodes[0]);
|
||||
this.store.dispatch(new NavigateRouteAction(['nodes', selection.first.entry.id, 'rules']));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -596,6 +596,18 @@
|
||||
"visible": "canManagePermissions"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "app.toolbar.rules",
|
||||
"title": "ACA_FOLDER_RULES.ACTIONS.MANAGE_RULES",
|
||||
"icon": "gavel",
|
||||
"order": 1300,
|
||||
"actions": {
|
||||
"click": "MANAGE_RULES"
|
||||
},
|
||||
"rules": {
|
||||
"visible": "rules.canManageFolderRules"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "app.toolbar.deleteLibrary",
|
||||
"order": 100,
|
||||
@@ -813,6 +825,18 @@
|
||||
"visible": "canManagePermissions"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "app.context.menu.rules",
|
||||
"title": "ACA_FOLDER_RULES.ACTIONS.MANAGE_RULES",
|
||||
"icon": "gavel",
|
||||
"order": 1600,
|
||||
"actions": {
|
||||
"click": "MANAGE_RULES"
|
||||
},
|
||||
"rules": {
|
||||
"visible": "rules.canManageFolderRules"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "app.context.menu.joinLibrary",
|
||||
"type": "custom",
|
||||
|
||||
Reference in New Issue
Block a user