public function createOrUpdate(Domain $domain, SubmitAnswer $request, ApplicantService $applicantService): JsonResource 	{ 		$applicant = $applicantService->getApplicantByCode($request->code);  		$client_survey = $applicant->survey;  		$this->validate($request, [ 			'location' => ['nullable', 'uuid', 'exists:' . Location::class . ',id', Rule::requiredIf($client_survey->location_answer_required), Rule::in($client_survey->locations()->pluck('id')->all())], 			'department' => ['nullable', 'uuid', 'exists:' . Department::class . ',id', Rule::requiredIf($client_survey->department_answer_required), Rule::in($client_survey->departments()->pluck('id')->all())], 		]);  		if ($applicantService->isInFillablePeriod($client_survey)) { 			abort(403, (string) __('applicant-surveys.answer-validation.not-in-fillable-period')); 		}  		if ($applicantService->checkIfDraftPossible($applicant, $request->validated())) { 			abort(422, (string) __('applicant-surveys.answer-validation.answers-not-filled')); 		}  		if ($applicantService->checkIfAnswerIdsMatchQuestionIds($client_survey, array_keys($request->answer_values))) { 			abort(422, (string) __('applicant-surveys.answer-validation.answer-question-mismatch')); 		}  		$applicantService->handleUpdateOrCreateAnswers($request->validated(), $applicant, $client_survey);  		$applicantService->handleUpdateApplicantData($applicant, $request);  		if ($applicantService->checkApplicantCompletedSurvey($client_survey, $request->validated())) { 			$applicantService->markApplicantHasCompletedSurvey($applicant); 			$applicantService->updateApplicantAnswerCombination($applicant); 		}  		$applicant->storeMetadata($request->collect());  		return new AnswerApplicantResource($applicant); 	}