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 Oct 2, 2023
1 parent a3027c1 commit e7efd62
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
:labels="receiverSuggesterLabels"
:search-options="searchOptions"
:type-of-relations="typeOfRelation"
:autofocus="readOnlySpace"
include-users
name="kudosReceiver"
width="220"
Expand Down Expand Up @@ -133,8 +134,8 @@
:placeholder="$t('exoplatform.kudos.label.kudosMessagePlaceholder')"
:suggestor-type-of-relation="typeOfRelation"
:suggester-space-u-r-l="spaceURL"
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 @@ -298,7 +299,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 e7efd62

Please sign in to comment.