From 1fb239c9d1dfcf881681fc62f1ad5ed7b2db8a57 Mon Sep 17 00:00:00 2001 From: MayTekayaa <100131287+MayTekayaa@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:41:47 +0100 Subject: [PATCH] feat: Disable send kudos button when no receiver has been added - MEED-2418 - Meeds-io/MIPs#54 (#340) This change will disable the send kudos button when no receiver has been added. --- .../src/main/webapp/vue-app/kudos/components/KudosApp.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kudos-webapps/src/main/webapp/vue-app/kudos/components/KudosApp.vue b/kudos-webapps/src/main/webapp/vue-app/kudos/components/KudosApp.vue index 801b9663c..693033fed 100644 --- a/kudos-webapps/src/main/webapp/vue-app/kudos/components/KudosApp.vue +++ b/kudos-webapps/src/main/webapp/vue-app/kudos/components/KudosApp.vue @@ -37,6 +37,7 @@ :labels="receiverSuggesterLabels" :search-options="searchOptions" :type-of-relations="typeOfRelation" + :autofocus="readOnlySpace" include-users name="kudosReceiver" width="220" @@ -137,8 +138,8 @@ :suggester-space-u-r-l="spaceURL" :object-id="metadataObjectId" :object-type="objectType" - class="flex" - autofocus /> + :autofocus="!readOnlySpace" + class="flex" />
@@ -304,7 +305,7 @@ export default { return this.numberOfKudosAllowed - this.remainingKudos; }, sendButtonDisabled() { - return !this.kudosMessageText|| this.kudosMessageTextLength > this.MESSAGE_MAX_LENGTH || this.kudosMessageValidityLabel ; + return !this.kudosMessageText|| this.kudosMessageTextLength > this.MESSAGE_MAX_LENGTH || this.kudosMessageValidityLabel || !this.selectedReceiver; }, remainingPeriodLabel() { return this.remainingDaysToReset === 1 ? this.$t('exoplatform.kudos.label.day') : this.$t('exoplatform.kudos.label.days') ;