summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard
diff options
context:
space:
mode:
authorikram <ikram@research.att.com>2020-08-12 16:31:06 -0400
committerRachitha Ramappa <rachitha.ramappa@att.com>2020-08-28 17:37:52 +0530
commit43b7ae5f11c2ef00ef737d179dda894c51594f45 (patch)
tree9829441f892cb02f916270b9dfb495ecd5e957bb /vid-webpack-master/src/app/drawingBoard
parent0864a22ae604219f87dfa9b4833026b85bb2af6e (diff)
Other Pause and Resume Related Scenarios
Please see the user story for more details. Issue-ID: VID-875 Signed-off-by: Rachitha Ramappa <rachitha.ramappa@att.com> Change-Id: Ib2b9f62c6c0c5f0f8c162cc776dc128d39dbb37e
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard')
-rw-r--r--vid-webpack-master/src/app/drawingBoard/drawingBoard.routing.ts9
-rw-r--r--vid-webpack-master/src/app/drawingBoard/guards/servicePlanningGuard/drawingBoardGuard.ts4
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts6
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board.modes.ts3
4 files changed, 19 insertions, 3 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/drawingBoard.routing.ts b/vid-webpack-master/src/app/drawingBoard/drawingBoard.routing.ts
index aebbdee5a..dd3b6766a 100644
--- a/vid-webpack-master/src/app/drawingBoard/drawingBoard.routing.ts
+++ b/vid-webpack-master/src/app/drawingBoard/drawingBoard.routing.ts
@@ -45,6 +45,15 @@ export const DrawingBoardRoutes: Route[] = [
canActivate: [DrawingBoardGuard]
},
{
+ path: 'RESUME',
+ component: ServicePlanningComponent,
+ resolve: {
+ flags: FlagsResolve,
+ viewEditResolver: RetryResolver
+ },
+ canActivate: [DrawingBoardGuard]
+ },
+ {
path: 'RETRY',
component: ServicePlanningComponent,
resolve: {
diff --git a/vid-webpack-master/src/app/drawingBoard/guards/servicePlanningGuard/drawingBoardGuard.ts b/vid-webpack-master/src/app/drawingBoard/guards/servicePlanningGuard/drawingBoardGuard.ts
index d486fb4fa..8b5058011 100644
--- a/vid-webpack-master/src/app/drawingBoard/guards/servicePlanningGuard/drawingBoardGuard.ts
+++ b/vid-webpack-master/src/app/drawingBoard/guards/servicePlanningGuard/drawingBoardGuard.ts
@@ -12,7 +12,9 @@ export class DrawingBoardGuard implements CanActivate {
constructor(private store: NgRedux<AppState>, private _http: HttpClient, private _router : Router) { }
canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
let url : string = `../../roles/service_permissions?subscriberId=${next.queryParams['subscriberId']}&serviceType=${next.queryParams['serviceType']}`;
- const viewMode = state.url.includes(DrawingBoardModes.RETRY_EDIT)? DrawingBoardModes.RETRY: DrawingBoardModes.VIEW;
+ const viewMode = state.url.includes(DrawingBoardModes.RETRY_EDIT)? DrawingBoardModes.RETRY:
+ state.url.includes(DrawingBoardModes.RESUME)? DrawingBoardModes.RESUME:
+ DrawingBoardModes.VIEW;
return this._http.get(url)
.map((result : DrawingBoardPermissions) => {
if(!result.isEditPermitted){
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts
index 4e8e31163..8cebb23e9 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts
@@ -68,7 +68,7 @@ export class DrawingBoardHeaderService{
if (!_.isNil(this.errorMsgService.errorMsgObject) && mode !== DrawingBoardModes.RETRY_EDIT) return true;
if(validationCounter > 0) return true;
if(serviceInstance.action !== ServiceInstanceActions.None) return false;
- if(mode === DrawingBoardModes.RETRY_EDIT) return false;
+ if(mode === DrawingBoardModes.RETRY_EDIT || mode === DrawingBoardModes.RESUME) return false;
return !serviceInstance.isDirty;
}
return true;
@@ -80,6 +80,8 @@ export class DrawingBoardHeaderService{
return 'UPDATE';
case DrawingBoardModes.RETRY_EDIT:
return 'REDEPLOY';
+ case DrawingBoardModes.RESUME:
+ return 'RESUME';
default: return 'DEPLOY';
}
}
@@ -91,6 +93,8 @@ export class DrawingBoardHeaderService{
case DrawingBoardModes.RETRY_EDIT:
case DrawingBoardModes.RETRY:
return 'REDEPLOY';
+ case DrawingBoardModes.RESUME:
+ return 'RESUME';
}
}
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board.modes.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board.modes.ts
index 78e2b629e..427c6915d 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board.modes.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board.modes.ts
@@ -5,5 +5,6 @@ export enum DrawingBoardModes {
EDIT = 'EDIT',
OLD_VIEW_EDIT = 'OLD_VIEW_EDIT',
CREATE = 'CREATE',
- RECREATE = 'RECREATE'
+ RECREATE = 'RECREATE',
+ RESUME = 'RESUME'
}