Merge pull request #1108 from iamejaaz/required-indicator-job

feat: add required indicator in jobs and quiz
This commit is contained in:
Jannat Patel
2024-11-27 22:26:08 +05:30
committed by GitHub
3 changed files with 17 additions and 1 deletions

View File

@@ -56,12 +56,14 @@
type="select" type="select"
:options="['Choices', 'User Input', 'Open Ended']" :options="['Choices', 'User Input', 'Open Ended']"
class="pb-2" class="pb-2"
:required="true"
/> />
<div v-if="question.type == 'Choices'" class="divide-y border-t"> <div v-if="question.type == 'Choices'" class="divide-y border-t">
<div v-for="n in 4" class="space-y-4 py-2"> <div v-for="n in 4" class="space-y-4 py-2">
<FormControl <FormControl
:label="__('Option') + ' ' + n" :label="__('Option') + ' ' + n"
v-model="question[`option_${n}`]" v-model="question[`option_${n}`]"
:required="n <= 2 ? true : false"
/> />
<FormControl <FormControl
:label="__('Explanation')" :label="__('Explanation')"
@@ -82,6 +84,7 @@
<FormControl <FormControl
:label="__('Possibility') + ' ' + n" :label="__('Possibility') + ' ' + n"
v-model="question[`possibility_${n}`]" v-model="question[`possibility_${n}`]"
:required="n == 1 ? true : false"
/> />
</div> </div>
</div> </div>

View File

@@ -19,8 +19,13 @@
v-model="job.job_title" v-model="job.job_title"
:label="__('Title')" :label="__('Title')"
class="mb-4" class="mb-4"
:required="true"
/>
<FormControl
v-model="job.location"
:label="__('Location')"
:required="true"
/> />
<FormControl v-model="job.location" :label="__('Location')" />
</div> </div>
<div> <div>
<FormControl <FormControl
@@ -29,18 +34,21 @@
type="select" type="select"
:options="jobTypes" :options="jobTypes"
class="mb-4" class="mb-4"
:required="true"
/> />
<FormControl <FormControl
v-model="job.status" v-model="job.status"
:label="__('Status')" :label="__('Status')"
type="select" type="select"
:options="jobStatuses" :options="jobStatuses"
:required="true"
/> />
</div> </div>
</div> </div>
<div class="mt-4"> <div class="mt-4">
<label class="block text-gray-600 text-xs mb-1"> <label class="block text-gray-600 text-xs mb-1">
{{ __('Description') }} {{ __('Description') }}
<span class="text-red-500">*</span>
</label> </label>
<TextEditor <TextEditor
:content="job.description" :content="job.description"
@@ -61,10 +69,12 @@
v-model="job.company_name" v-model="job.company_name"
:label="__('Company Name')" :label="__('Company Name')"
class="mb-4" class="mb-4"
:required="true"
/> />
<FormControl <FormControl
v-model="job.company_website" v-model="job.company_website"
:label="__('Company Website')" :label="__('Company Website')"
:required="true"
/> />
</div> </div>
<div> <div>
@@ -72,9 +82,11 @@
v-model="job.company_email_address" v-model="job.company_email_address"
:label="__('Company Email Address')" :label="__('Company Email Address')"
class="mb-4" class="mb-4"
:required="true"
/> />
<label class="block text-gray-600 text-xs mb-1 mt-4"> <label class="block text-gray-600 text-xs mb-1 mt-4">
{{ __('Company Logo') }} {{ __('Company Logo') }}
<span class="text-red-500">*</span>
</label> </label>
<FileUploader <FileUploader
v-if="!job.image" v-if="!job.image"

View File

@@ -48,6 +48,7 @@
? __('Title') ? __('Title')
: __('Enter a title and save the quiz to proceed') : __('Enter a title and save the quiz to proceed')
" "
:required="true"
/> />
<div v-if="quizDetails.data?.name"> <div v-if="quizDetails.data?.name">
<div class="grid grid-cols-2 gap-5 mt-4 mb-8"> <div class="grid grid-cols-2 gap-5 mt-4 mb-8">