Skip to content

Commit

Permalink
feat: add required indicator in jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
iamejaaz committed Nov 8, 2024
1 parent c5f091f commit 26f1e22
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions frontend/src/components/Modals/Question.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@
type="select"
:options="['Choices', 'User Input', 'Open Ended']"
class="pb-2"
:required="true"
/>
<div v-if="question.type == 'Choices'" class="divide-y border-t">
<div v-for="n in 4" class="space-y-4 py-2">
<FormControl
:label="__('Option') + ' ' + n"
v-model="question[`option_${n}`]"
:required="n == 1 ? true : false"
/>
<FormControl
:label="__('Explanation')"
Expand All @@ -82,6 +84,7 @@
<FormControl
:label="__('Possibility') + ' ' + n"
v-model="question[`possibility_${n}`]"
:required="n == 1 ? true : false"
/>
</div>
</div>
Expand Down
14 changes: 13 additions & 1 deletion frontend/src/pages/JobCreation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@
v-model="job.job_title"
:label="__('Title')"
class="mb-4"
:required="true"
/>
<FormControl
v-model="job.location"
:label="__('Location')"
:required="true"
/>
<FormControl v-model="job.location" :label="__('Location')" />
</div>
<div>
<FormControl
Expand All @@ -29,18 +34,21 @@
type="select"
:options="jobTypes"
class="mb-4"
:required="true"
/>
<FormControl
v-model="job.status"
:label="__('Status')"
type="select"
:options="jobStatuses"
:required="true"
/>
</div>
</div>
<div class="mt-4">
<label class="block text-gray-600 text-xs mb-1">
{{ __('Description') }}
<span class="text-red-500">*</span>
</label>
<TextEditor
:content="job.description"
Expand All @@ -61,20 +69,24 @@
v-model="job.company_name"
:label="__('Company Name')"
class="mb-4"
:required="true"
/>
<FormControl
v-model="job.company_website"
:label="__('Company Website')"
:required="true"
/>
</div>
<div>
<FormControl
v-model="job.company_email_address"
:label="__('Company Email Address')"
class="mb-4"
:required="true"
/>
<label class="block text-gray-600 text-xs mb-1 mt-4">
{{ __('Company Logo') }}
<span class="text-red-500">*</span>
</label>
<FileUploader
v-if="!job.image"
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/QuizForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
? __('Title')
: __('Enter a title and save the quiz to proceed')
"
:required="true"
/>
<div v-if="quizDetails.data?.name">
<div class="grid grid-cols-2 gap-5 mt-4 mb-8">
Expand Down

0 comments on commit 26f1e22

Please sign in to comment.