feat: job application modal

This commit is contained in:
Jannat Patel
2024-02-19 16:54:07 +05:30
parent 084eeba2ed
commit 36c4e2f4dc
5 changed files with 64 additions and 11 deletions

View File

@@ -0,0 +1,49 @@
<template>
<Dialog
:options="{
title: __('Apply for this job'),
size: '2xl',
actions: [
{
label: 'Submit',
variant: 'solid',
onClick: (close) => submitResume(close),
},
],
}"
>
<template #body-content>
<div class="flex flex-col gap-4">
<div>
<div class="mb-1.5 text-sm text-gray-600">
{{ __('Title') }}
</div>
<FileUploader
:fileTypes="['pdf']"
:validateFile="validateFile"
@success="(file) => (resume.value = file.file_url)"
/>
</div>
</div>
</template>
</Dialog>
</template>
<script setup>
import { Dialog, FileUploader } from 'frappe-ui'
const props = defineProps({
email: {
type: String,
required: true,
},
})
const resume = ref(null)
const validateFile = (file) => {
let extension = file.name.split('.').pop().toLowerCase()
if (extension != 'pdf') {
return 'Only PDF file is allowed'
}
}
</script>

View File

@@ -10,7 +10,7 @@
<div class="grid grid-cols-2 gap-4">
<div v-for="evl in upcoming_evals.data">
<div class="border rounded-md p-3">
<div class="font-medium mb-3">
<div class="font-semibold mb-3">
{{ evl.course_title }}
</div>
<div class="flex items-center mb-2">

View File

@@ -23,7 +23,7 @@
</template>
{{ __('Report') }}
</Button>
<Button variant="solid">
<Button variant="solid" @click="openApplicationModal()">
<template #prefix>
<SendHorizonal class="h-4 w-4" />
</template>
@@ -96,4 +96,8 @@ const job = createResource({
cache: ['job', props.job],
auto: true,
})
const openApplicationModal = () => {
console.log('openApplicationModal')
}
</script>