mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
chore: Use availability in dashboard presence toggle (#3212)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="status">
|
||||
<div class="status-view">
|
||||
<availability-status-badge :status="currentUserAvailabilityStatus" />
|
||||
<availability-status-badge :status="currentUserAvailability" />
|
||||
<div class="status-view--title">
|
||||
{{ availabilityDisplayLabel }}
|
||||
</div>
|
||||
@@ -77,12 +77,12 @@ export default {
|
||||
|
||||
computed: {
|
||||
...mapGetters({
|
||||
getCurrentUserAvailabilityStatus: 'getCurrentUserAvailabilityStatus',
|
||||
getCurrentUserAvailability: 'getCurrentUserAvailability',
|
||||
getCurrentAccountId: 'getCurrentAccountId',
|
||||
}),
|
||||
availabilityDisplayLabel() {
|
||||
const availabilityIndex = AVAILABILITY_STATUS_KEYS.findIndex(
|
||||
key => key === this.currentUserAvailabilityStatus
|
||||
key => key === this.currentUserAvailability
|
||||
);
|
||||
return this.$t('PROFILE_SETTINGS.FORM.AVAILABILITY.STATUSES_LIST')[
|
||||
availabilityIndex
|
||||
@@ -91,8 +91,8 @@ export default {
|
||||
currentAccountId() {
|
||||
return this.getCurrentAccountId;
|
||||
},
|
||||
currentUserAvailabilityStatus() {
|
||||
return this.getCurrentUserAvailabilityStatus;
|
||||
currentUserAvailability() {
|
||||
return this.getCurrentUserAvailability;
|
||||
},
|
||||
availabilityStatuses() {
|
||||
return this.$t('PROFILE_SETTINGS.FORM.AVAILABILITY.STATUSES_LIST').map(
|
||||
@@ -100,7 +100,7 @@ export default {
|
||||
label: statusLabel,
|
||||
value: AVAILABILITY_STATUS_KEYS[index],
|
||||
disabled:
|
||||
this.currentUserAvailabilityStatus ===
|
||||
this.currentUserAvailability ===
|
||||
AVAILABILITY_STATUS_KEYS[index],
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user