From 3fe650873b8409098dca52c182fefdbb7aca3ac5 Mon Sep 17 00:00:00 2001 From: suvarnakale Date: Tue, 12 Sep 2023 17:12:59 +0530 Subject: [PATCH] #795 - View/add button on dashboard activated --- .../configurations/configurations.component.html | 2 +- .../admin/configurations/configurations.component.ts | 12 +++++++++++- .../admin/create-entity/create-entity.component.html | 8 ++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/app/admin/configurations/configurations.component.html b/src/app/admin/configurations/configurations.component.html index 71fa8d0..0ad0806 100644 --- a/src/app/admin/configurations/configurations.component.html +++ b/src/app/admin/configurations/configurations.component.html @@ -45,7 +45,7 @@

{{'SCHEMA' | translate}}

-
diff --git a/src/app/admin/configurations/configurations.component.ts b/src/app/admin/configurations/configurations.component.ts index 5233936..62e5318 100644 --- a/src/app/admin/configurations/configurations.component.ts +++ b/src/app/admin/configurations/configurations.component.ts @@ -74,5 +74,15 @@ export class ConfigurationsComponent implements OnInit { }); this.router.navigateByUrl('/create/' + this.currentTab + '/' + this.usecase + '/' + this.entityKey); } + + viewOrEditSchema(status: string, schemaName : string) { + this.entityKey = schemaName; + if (status === 'PUBLISHED') { + this.router.navigateByUrl('/create/0' + '/' + this.usecase + '/' + this.entityKey); + } else if (status === 'DRAFT') { + this.router.navigateByUrl('/create/0' + '/' + this.usecase + '/' + this.entityKey); + } + } + } + -} diff --git a/src/app/admin/create-entity/create-entity.component.html b/src/app/admin/create-entity/create-entity.component.html index 1df0aff..214025f 100644 --- a/src/app/admin/create-entity/create-entity.component.html +++ b/src/app/admin/create-entity/create-entity.component.html @@ -168,7 +168,7 @@

{{usecaseSchema[activeMenuNo]?.title}}

+ class="br-4 border-grey-3 bg-card fs-14 m-2 py-1 px-3 mr-3" [disabled]="usecaseSchema[activeMenuNo]['status'] == 'PUBLISHED'">