Skip to content

Commit

Permalink
feat: Disable send kudos button when no receiver has been added - ME…
Browse files Browse the repository at this point in the history
…ED-2418 - Meeds-io/MIPs#54 (#340)

This change will disable the send kudos button when no receiver has been added.
  • Loading branch information
MayTekayaa committed Sep 27, 2023
1 parent cdac156 commit 8fa9484
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
:labels="receiverSuggesterLabels"
:search-options="searchOptions"
:type-of-relations="typeOfRelation"
:autofocus="readOnlySpace"
include-users
name="kudosReceiver"
width="220"
Expand Down Expand Up @@ -137,8 +138,8 @@
:suggester-space-u-r-l="spaceURL"
:object-id="metadataObjectId"
:object-type="objectType"
class="flex"
autofocus />
:autofocus="!readOnlySpace"
class="flex" />
</div>
<div v-if="kudosMessageValidityLabel" class="d-flex flex-row pt-3">
<span class="text-sm-caption error--text">
Expand Down Expand Up @@ -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') ;
Expand Down

0 comments on commit 8fa9484

Please sign in to comment.