Skip to content

Commit

Permalink
fix(applicants): disable resume button when unavailable (profilecity#178
Browse files Browse the repository at this point in the history
)
  • Loading branch information
shivam-sharma7 committed Sep 24, 2024
1 parent 22fae7d commit de9e613
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions app/components/admin/ApplicationRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const props = defineProps<{
}>();
const user = props.applicant.user;
const resume = props.applicant.handles.find((h) => h.key == 'resume')?.value;
const isResumeAvailable = Boolean(resume);
</script>

<template>
Expand Down Expand Up @@ -39,12 +41,7 @@ const user = props.applicant.user;
{{ timeAgo(new Date(application.createdAt)) }}
</div>
</div>
<InputButton
variant="secondary"
as="a"
target="_blank"
:href="props.applicant.handles.find((h) => h.key == 'resume')?.value"
>
<InputButton variant="secondary" as="a" target="_blank" :href="resume" :disabled="!isResumeAvailable">
View Resume
</InputButton>
</div>
Expand Down

0 comments on commit de9e613

Please sign in to comment.