Commit 2e74826e authored by Ahmed Awan's avatar Ahmed Awan
Browse files

replace switch with if-else; improve disabled tooltip message

parent a4cd1e93
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -225,16 +225,16 @@ export default {
            return this.uuid || this.formConfig.uuid;
        },
        tooltip() {
            switch (true) {
                case !this.canMutateHistory:
            if (!this.canMutateHistory) {
                return this.immutableHistoryMessage;
                case this.hasConfigOrValErrors:
                    return "Please correct errors before running the tool.";
                case this.showExecuting:
            }
            if (this.hasConfigOrValErrors) {
                return "Please resolve highlighted issues before running the tool.";
            }
            if (this.showExecuting) {
                return "Tool is being executed...";
                default:
                    return `Run tool: ${this.formConfig.name} (${this.formConfig.version})`;
            }
            return `Run tool: ${this.formConfig.name} (${this.formConfig.version})`;
        },
        errorContentPretty() {
            return JSON.stringify(this.errorContent, null, 4);