From d4fa0a4957b444affafa71fd909158088fff192d Mon Sep 17 00:00:00 2001 From: William Marques Date: Wed, 14 Sep 2022 16:15:57 +0200 Subject: [PATCH] Disable format button without Prettier applied --- .../primary/landscape/Landscape.component.ts | 5 +++++ .../app/module/primary/landscape/Landscape.html | 7 ++++++- .../primary/modules-patch/ModulesPatch.html | 7 ++++++- .../project-actions/ProjectActions.component.ts | 9 +++++++++ .../primary/project-actions/ProjectActions.html | 2 +- .../landscape/LandscapeComponent.spec.ts | 4 +++- .../ProjectActionsComponent.spec.ts | 17 ++++++++++++++++- 7 files changed, 46 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/app/module/primary/landscape/Landscape.component.ts b/src/main/webapp/app/module/primary/landscape/Landscape.component.ts index 99b66b53bc6..99a199f4584 100644 --- a/src/main/webapp/app/module/primary/landscape/Landscape.component.ts +++ b/src/main/webapp/app/module/primary/landscape/Landscape.component.ts @@ -367,6 +367,10 @@ export default defineComponent({ operationInProgress.value = false; }; + const isApplied = (moduleId: string): boolean => { + return landscapeValue().isApplied(new ModuleSlug(moduleId)); + }; + return { levels, isFeature, @@ -397,6 +401,7 @@ export default defineComponent({ applyNewModules, operationStarted, operationEnded, + isApplied, }; }, }); diff --git a/src/main/webapp/app/module/primary/landscape/Landscape.html b/src/main/webapp/app/module/primary/landscape/Landscape.html index 3e67d0ac8c9..4ff93b278c2 100644 --- a/src/main/webapp/app/module/primary/landscape/Landscape.html +++ b/src/main/webapp/app/module/primary/landscape/Landscape.html @@ -33,7 +33,12 @@ @propertyDeleted="deleteProperty" /> - +