Skip to content

Commit c0685ff

Browse files
authored
Merge pull request #431 from bcgov/bugfix/contact-disabled-tooltip
fix: show tooltip when hovering disabled edit contact button
2 parents fe6b32e + 83225a1 commit c0685ff

2 files changed

Lines changed: 33 additions & 12 deletions

File tree

frontend/src/components/contact/ContactsProponentsList.vue

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -235,19 +235,39 @@ onBeforeMount(() => {
235235
>
236236
<font-awesome-icon icon="fa fa-eye" />
237237
</Button>
238-
<Button
239-
aria-label="Edit contact"
240-
class="p-button-lg p-button-text p-0"
241-
:disabled="data.userId"
242-
@click="
243-
() => {
244-
selection = data;
245-
updateContactModalVisible = true;
246-
}
247-
"
238+
<span
239+
v-if="data.userId"
240+
v-tooltip="t('contactsProponentsList.editDisabledReason')"
248241
>
249-
<font-awesome-icon icon="fa fa-pen-to-square" />
250-
</Button>
242+
<Button
243+
aria-label="Edit contact"
244+
class="p-button-lg p-button-text p-0"
245+
:disabled="data.userId"
246+
@click="
247+
() => {
248+
selection = data;
249+
updateContactModalVisible = true;
250+
}
251+
"
252+
>
253+
<font-awesome-icon icon="fa fa-pen-to-square" />
254+
</Button>
255+
</span>
256+
<span v-else>
257+
<Button
258+
aria-label="Edit contact"
259+
class="p-button-lg p-button-text p-0"
260+
:disabled="data.userId"
261+
@click="
262+
() => {
263+
selection = data;
264+
updateContactModalVisible = true;
265+
}
266+
"
267+
>
268+
<font-awesome-icon icon="fa fa-pen-to-square" />
269+
</Button>
270+
</span>
251271
<Button
252272
aria-label="Delete contact"
253273
class="p-button-lg p-button-text p-button-danger p-0"

frontend/src/locales/en-CA.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@
672672
"deleteContactNotLoaded": "Contact not loaded into Contact Details page",
673673
"deleteContactSuccess": "Contact deleted",
674674
"deleteContactSuccessMessage": "has been deleted.",
675+
"editDisabledReason": "Edit is disabled because this is a not a manually entered contact",
675676
"email": "Email",
676677
"firstName": "First name",
677678
"lastName": "Last name",

0 commit comments

Comments
 (0)