Merge pull request 'Hid admin comment button when not in recruiter view' (#90) from #86-internal-comment-button-visibility-fix into main
All checks were successful
Continuous Integration / Update Development (push) Successful in 2m24s

Reviewed-on: #90
This commit was merged in pull request #90.
This commit is contained in:
2025-12-14 12:59:41 -06:00
2 changed files with 7 additions and 4 deletions

View File

@@ -17,9 +17,12 @@ import { Dot } from 'lucide-vue-next'
import { ref } from 'vue'
import MemberCard from '../members/MemberCard.vue'
const props = defineProps<{
const props = withDefaults(defineProps<{
messages: CommentRow[]
}>()
adminMode?: boolean
}>(), {
adminMode: false,
})
const emit = defineEmits<{
(e: 'post', text: string): void
@@ -60,7 +63,7 @@ function onSubmit(values: { text: string }, { resetForm }: { resetForm: () => vo
<!-- Button below, right-aligned -->
<div class="mt-2 flex justify-end gap-2">
<Button type="submit" @click="submitMode = 'internal'" variant="outline">Post (Internal)</Button>
<Button v-if="adminMode" type="submit" @click="submitMode = 'internal'" variant="outline">Post (Internal)</Button>
<Button type="submit" @click="submitMode = 'public'">Post (Public)</Button>
</div>
</Form>

View File

@@ -164,7 +164,7 @@ async function handleDeny(id) {
</ApplicationForm>
<div v-if="!newApp" class="pb-15">
<h3 class="scroll-m-20 text-2xl font-semibold tracking-tight mb-4">Discussion</h3>
<ApplicationChat :messages="chatData" @post="postComment" @post-internal="postCommentInternal">
<ApplicationChat :messages="chatData" @post="postComment" @post-internal="postCommentInternal" :admin-mode="finalMode === 'view-recruiter'">
</ApplicationChat>
</div>
</div>