Skip to content

Commit

Permalink
Fixed various bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
PavlosIsaris committed Dec 16, 2024
1 parent 02f9073 commit 5713802
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class="btn btn-primary btn-lg w-100 dashboard-btn">
{{-- IF HE HAS NOT RESPONDEDED TO THE FEEDBACK, INVITE HIM TO DO SO--}}
@if ($viewModel->displayFeedbackQuestionnaire())
<div class="col-md-9 col-sm-12 mx-auto">
<a href="{{ route('show-questionnaire-page', ['project' => $viewModel->project->slug,'questionnaire' => $viewModel->feedbackQuestionnaire->id]) }}"
<a href="{{ route('show-questionnaire-page', ['locale' => app()->getLocale(), 'project' => $viewModel->project->slug,'questionnaire' => $viewModel->feedbackQuestionnaire->id]) }}"
class="btn btn-primary w-100 respond-questionnaire call-to-action">
{{__("questionnaire.give_us_feedback")}}
</a>
Expand All @@ -109,7 +109,7 @@ class="btn btn-primary w-100 respond-questionnaire call-to-action">
@else
{{-- INVITE HIM TO RESPOND TO THE PROJECT QUESTIONNAIRE --}}
<div class="col-md-9 col-sm-12 mx-auto">
<a href="{{ route('show-questionnaire-page', ['project' => $viewModel->project->slug,'questionnaire' => $viewModel->questionnaire->id]) }}"
<a href="{{ route('show-questionnaire-page', ['locale' => app()->getLocale(), 'project' => $viewModel->project->slug,'questionnaire' => $viewModel->questionnaire->id]) }}"
class="btn btn-primary w-100 respond-questionnaire call-to-action
{{ !$viewModel->project->lp_show_speak_up_btn ? 'hidden' : '' }}">
{{__("questionnaire.answer_the_questionnaire")}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class="align-items-center mx-0"
<div class="col-lg-10 col-md-10 col-sm-11 mx-auto">
<div class="row">
<div class="col-md-9 col-sm-12 mx-auto mt-5">
<a href="{{ route('show-questionnaire-page', ['project' => $viewModel->project->slug,'questionnaire' => $viewModel->questionnaire->id]) }}"
<a href="{{ route('show-questionnaire-page', ['locale' => app()->getLocale(), 'project' => $viewModel->project->slug,'questionnaire' => $viewModel->questionnaire->id]) }}"
class="btn btn-primary w-100 respond-questionnaire call-to-action
{{ !$viewModel->project->lp_show_speak_up_btn ? 'hidden' : '' }}">
{{__("questionnaire.start_answering")}}
Expand Down Expand Up @@ -52,7 +52,7 @@ class="btn btn-primary w-100 respond-questionnaire call-to-action
@if($viewModel->userFeedbackQuestionnaireResponse)
<p>{{__("questionnaire.user_feedback_given_message")}}</p>
@else
<a href="{{ route('show-questionnaire-page', ['project' => $viewModel->project->slug,'questionnaire' => $viewModel->feedbackQuestionnaire->id]) }}"
<a href="{{ route('show-questionnaire-page', ['locale' => app()->getLocale(), 'project' => $viewModel->project->slug,'questionnaire' => $viewModel->feedbackQuestionnaire->id]) }}"
class="btn btn-primary w-100 respond-questionnaire call-to-action">
{{__("questionnaire.answer_to_feedback_questionnaire")}}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public function itCanShowQuestionnairePage() {
$this->assertDatabaseHas('questionnaires', ['id' => $questionnaire->id]);


$response = $this->get(route('show-questionnaire-page', ['project' => $project->slug, 'questionnaire' => $questionnaire->id]));
$response = $this->get(route('show-questionnaire-page', ['locale' => 'en', 'project' => $project->slug, 'questionnaire' => $questionnaire->id]));

$response->assertStatus(200);
$response->assertViewIs('questionnaire.questionnaire-page');
Expand Down Expand Up @@ -462,7 +462,7 @@ public function itCannotShowQuestionnairePageForNonPublishedQuestionnaire() {
$this->assertDatabaseHas('questionnaires', ['id' => $questionnaire->id]);


$response = $this->get(route('show-questionnaire-page', ['project' => $project->slug, 'questionnaire' => $questionnaire->id]));
$response = $this->get(route('show-questionnaire-page', ['locale' => 'en', 'project' => $project->slug, 'questionnaire' => $questionnaire->id]));

$response->assertStatus(302);
$response->assertSessionHas('flash_message_error', 'The questionnaire is not active.');
Expand Down Expand Up @@ -493,7 +493,7 @@ public function itCannotShowQuestionnairePageForNonPublishedProject() {
$this->assertDatabaseHas('questionnaires', ['id' => $questionnaire->id]);


$response = $this->get(route('show-questionnaire-page', ['project' => $project->slug, 'questionnaire' => $questionnaire->id]));
$response = $this->get(route('show-questionnaire-page', ['locale' => 'en', 'project' => $project->slug, 'questionnaire' => $questionnaire->id]));

$response->assertStatus(302);
$response->assertSessionHas('flash_message_error', 'The project is not active.');
Expand Down

0 comments on commit 5713802

Please sign in to comment.