PluginProbe
The Innovative Form Builder – IvyForms / 1.0
The Innovative Form Builder – IvyForms v1.0
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / backend / src / Services / Template / TechnicalInterviewFeedbackFormTemplate.php

TechnicalInterviewFeedbackFormTemplate.php in The Innovative Form Builder – IvyForms 1.0, at backend/src/Services/Template/TechnicalInterviewFeedbackFormTemplate.php

370 lines 13.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IvyForms\Services\Template;
4
5 use IvyForms\Services\Translations\BackendStrings;
6
7 class TechnicalInterviewFeedbackFormTemplate
8 {
9 /**
10 * Get the Technical Interview Feedback Form template
11 *
12 * @return array<string, mixed>
13 */
14 public static function getTemplate(): array
15 {
16 return [
17 'id' => 'technical_interview_feedback_form',
18 'name' => BackendStrings::getTemplateStrings()['technical_interview_feedback_form'],
19 'description' => BackendStrings::getTemplateStrings()['technical_interview_feedback_form_desc'],
20 'category' => 'feedback-forms',
21 'subcategory' => 'interview-feedback-forms',
22 'is_pro' => false,
23 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'technical-interview-feedback-form.svg',
24 'form_data' => [
25 'name' => BackendStrings::getTemplateStrings()['technical_interview_feedback_form'],
26 'published' => 1,
27 'showTitle' => 1,
28 'storeEntries' => 1,
29 'integrationSettings' => TemplateDefaults::getDefaultIntegrationSettings(),
30 'fields' => array_merge(
31 self::getCandidateInformationFields(),
32 self::getInterviewOutcomeFields(),
33 self::getRatingFields(),
34 self::getKeyAreasFields(),
35 self::getRecommendationFields(),
36 self::getInterviewerInformationFields()
37 ),
38 'settings' => []
39 ]
40 ];
41 }
42
43 /**
44 * Get candidate information fields
45 *
46 * @return array<int, array<string, mixed>>
47 */
48 private static function getCandidateInformationFields(): array
49 {
50 return [
51 // Candidate Name or Reference (Text Field)
52 [
53 'id' => 1,
54 'fieldIndex' => 1,
55 'type' => 'text',
56 'label' => BackendStrings::getTemplateStrings()['candidate_name_or_id'],
57 'placeholder' => BackendStrings::getTemplateStrings()['enter_candidate_name_or_id'],
58 'required' => false,
59 'parentId' => null,
60 'defaultValue' => '',
61 'position' => 1,
62 ],
63 ];
64 }
65
66 /**
67 * Get interview outcome fields
68 *
69 * @return array<int, array<string, mixed>>
70 */
71 private static function getInterviewOutcomeFields(): array
72 {
73 return [
74 // Overall Interview Outcome
75 [
76 'id' => 7,
77 'fieldIndex' => 2,
78 'type' => 'radio',
79 'label' => BackendStrings::getTemplateStrings()['overall_interview_outcome'],
80 'required' => true,
81 'parentId' => null,
82 'defaultValue' => '',
83 'placeholder' => '',
84 'position' => 2,
85 'fieldOptions' => [
86 [
87 'id' => 2,
88 'label' => BackendStrings::getTemplateStrings()['very_positive'],
89 'value' => 'very_positive',
90 'isDefault' => false,
91 'position' => 1
92 ],
93 [
94 'id' => 3,
95 'label' => BackendStrings::getTemplateStrings()['mostly_positive'],
96 'value' => 'mostly_positive',
97 'isDefault' => false,
98 'position' => 2
99 ],
100 [
101 'id' => 4,
102 'label' => BackendStrings::getTemplateStrings()['neutral'],
103 'value' => 'neutral',
104 'isDefault' => false,
105 'position' => 3
106 ],
107 [
108 'id' => 5,
109 'label' => BackendStrings::getTemplateStrings()['mostly_negative'],
110 'value' => 'mostly_negative',
111 'isDefault' => false,
112 'position' => 4
113 ],
114 [
115 'id' => 6,
116 'label' => BackendStrings::getTemplateStrings()['very_negative'],
117 'value' => 'very_negative',
118 'isDefault' => false,
119 'position' => 5
120 ],
121 ],
122 ],
123 ];
124 }
125
126 /**
127 * Get rating fields
128 *
129 * @return array<int, array<string, mixed>>
130 */
131 private static function getRatingFields(): array
132 {
133 return [
134 // Overall Candidate Fit Rating
135 [
136 'id' => 13,
137 'fieldIndex' => 3,
138 'type' => 'rating',
139 'label' => BackendStrings::getTemplateStrings()['overall_candidate_fit'],
140 'required' => true,
141 'defaultValue' => '',
142 'placeholder' => '',
143 'position' => 3,
144 'labelPosition' => 'default',
145 'ratingIcon' => 'star',
146 'description' => '',
147 'fieldOptions' => [
148 [
149 'id' => 8,
150 'label' => BackendStrings::getNewFormStrings()['good'],
151 'value' => '1',
152 'isDefault' => false,
153 'position' => 1
154 ],
155 [
156 'id' => 9,
157 'label' => BackendStrings::getNewFormStrings()['nice'],
158 'value' => '2',
159 'isDefault' => false,
160 'position' => 2
161 ],
162 [
163 'id' => 10,
164 'label' => BackendStrings::getNewFormStrings()['very_good'],
165 'value' => '3',
166 'isDefault' => false,
167 'position' => 3
168 ],
169 [
170 'id' => 11,
171 'label' => BackendStrings::getNewFormStrings()['awesome'],
172 'value' => '4',
173 'isDefault' => false,
174 'position' => 4
175 ],
176 [
177 'id' => 12,
178 'label' => BackendStrings::getNewFormStrings()['amazing'],
179 'value' => '5',
180 'isDefault' => false,
181 'position' => 5
182 ],
183 ],
184 'showValues' => false,
185 'showRatingText' => false,
186 ],
187 ];
188 }
189
190 /**
191 * Get key areas fields
192 *
193 * @return array<int, array<string, mixed>>
194 */
195 private static function getKeyAreasFields(): array
196 {
197 return [
198 // Key Areas Observed
199 [
200 'id' => 19,
201 'fieldIndex' => 4,
202 'type' => 'checkbox',
203 'label' => BackendStrings::getTemplateStrings()['key_areas_observed'],
204 'required' => false,
205 'parentId' => null,
206 'defaultValue' => '',
207 'placeholder' => '',
208 'position' => 4,
209 'fieldOptions' => [
210 [
211 'id' => 14,
212 'label' => BackendStrings::getTemplateStrings()['communication'],
213 'value' => 'Communication',
214 'isDefault' => false,
215 'position' => 1
216 ],
217 [
218 'id' => 15,
219 'label' => BackendStrings::getTemplateStrings()['problem_solving'],
220 'value' => 'Problem-solving',
221 'isDefault' => false,
222 'position' => 2
223 ],
224 [
225 'id' => 16,
226 'label' => BackendStrings::getTemplateStrings()['technical_or_role_specific_skills'],
227 'value' => 'Technical or role-specific skills',
228 'isDefault' => false,
229 'position' => 3
230 ],
231 [
232 'id' => 17,
233 'label' => BackendStrings::getTemplateStrings()['cultural_fit'],
234 'value' => 'Cultural fit',
235 'isDefault' => false,
236 'position' => 4
237 ],
238 [
239 'id' => 18,
240 'label' => BackendStrings::getTemplateStrings()['professionalism'],
241 'value' => 'Professionalism',
242 'isDefault' => false,
243 'position' => 5
244 ],
245 ]
246 ],
247 // Key Observations
248 [
249 'id' => 20,
250 'fieldIndex' => 5,
251 'type' => 'textarea',
252 'label' => BackendStrings::getTemplateStrings()['key_observations'],
253 'placeholder' => BackendStrings::getTemplateStrings()['key_observations_placeholder'],
254 'required' => false,
255 'parentId' => null,
256 'defaultValue' => '',
257 'position' => 5,
258 'rows' => 3,
259 ],
260 ];
261 }
262
263 /**
264 * Get recommendation fields
265 *
266 * @return array<int, array<string, mixed>>
267 */
268 private static function getRecommendationFields(): array
269 {
270 return [
271 // Recommendation
272 [
273 'id' => 25,
274 'fieldIndex' => 6,
275 'type' => 'radio',
276 'label' => BackendStrings::getTemplateStrings()['recommendation'],
277 'required' => true,
278 'parentId' => null,
279 'defaultValue' => '',
280 'placeholder' => '',
281 'position' => 6,
282 'fieldOptions' => [
283 [
284 'id' => 21,
285 'label' => BackendStrings::getTemplateStrings()['strong_hire'],
286 'value' => 'Strong hire',
287 'isDefault' => false,
288 'position' => 1
289 ],
290 [
291 'id' => 22,
292 'label' => BackendStrings::getTemplateStrings()['hire'],
293 'value' => 'Hire',
294 'isDefault' => false,
295 'position' => 2
296 ],
297 [
298 'id' => 23,
299 'label' => BackendStrings::getTemplateStrings()['consider'],
300 'value' => 'Consider',
301 'isDefault' => false,
302 'position' => 3
303 ],
304 [
305 'id' => 24,
306 'label' => BackendStrings::getTemplateStrings()['do_not_proceed'],
307 'value' => 'Do not proceed',
308 'isDefault' => false,
309 'position' => 4
310 ],
311 ]
312 ],
313 ];
314 }
315
316 /**
317 * Get interviewer information fields
318 *
319 * @return array<int, array<string, mixed>>
320 */
321 private static function getInterviewerInformationFields(): array
322 {
323 return [
324 // Interviewer Name
325 [
326 'id' => 26,
327 'fieldIndex' => 7,
328 'type' => 'name',
329 'label' => BackendStrings::getTemplateStrings()['interviewer_name'],
330 'parentId' => null,
331 'defaultValue' => '',
332 'placeholder' => '',
333 'required' => false,
334 'readonly' => false,
335 'position' => 7,
336 ],
337 // First Name - Child of Name Field
338 [
339 'id' => 27,
340 'type' => 'text',
341 'label' => BackendStrings::getNewFormStrings()['first_name'],
342 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_first_name'],
343 'required' => false,
344 'parentId' => 7,
345 'fieldIndex' => 7,
346 'defaultValue' => '',
347 'position' => 1,
348 'optionHide' => false,
349 'description' => '',
350 'settings' => json_encode(['nameFieldType' => 'nameField1']),
351 ],
352 // Last Name - Child of Name Field
353 [
354 'id' => 28,
355 'type' => 'text',
356 'label' => BackendStrings::getNewFormStrings()['last_name'],
357 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_last_name'],
358 'required' => false,
359 'parentId' => 7,
360 'fieldIndex' => 7,
361 'defaultValue' => '',
362 'position' => 2,
363 'optionHide' => false,
364 'description' => '',
365 'settings' => json_encode(['nameFieldType' => 'nameField2']),
366 ],
367 ];
368 }
369 }
370