From bfd6f534828b6733741140e0528f36cab9bdd5b3 Mon Sep 17 00:00:00 2001 From: Vyacheslav Tumanov Date: Wed, 29 Mar 2023 16:45:07 +0500 Subject: [PATCH] TSK-903: do not allow saving if set to private with no members Signed-off-by: Vyacheslav Tumanov --- .../src/components/projects/CreateProject.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/tracker-resources/src/components/projects/CreateProject.svelte b/plugins/tracker-resources/src/components/projects/CreateProject.svelte index 81dfc01b01b..426cb70ac72 100644 --- a/plugins/tracker-resources/src/components/projects/CreateProject.svelte +++ b/plugins/tracker-resources/src/components/projects/CreateProject.svelte @@ -119,7 +119,7 @@ label={isNew ? tracker.string.NewProject : tracker.string.EditProject} okLabel={isNew ? presentation.string.Create : presentation.string.Save} okAction={handleSave} - canSave={name.length > 0 && !!selectedWorkDayType} + canSave={name.length > 0 && !!selectedWorkDayType && !(members.length === 0 && isPrivate)} on:close={() => { dispatch('close') }} @@ -153,6 +153,7 @@ label={presentation.string.MakePrivate} description={presentation.string.MakePrivateDescription} bind:on={isPrivate} + disabled={!isPrivate && members.length === 0} />