v1.1.0a - Added "andet option" til feedback

This commit is contained in:
Neerholt 2020-09-10 12:35:38 +02:00
parent 201e2b5b35
commit 89ea2c971b
5 changed files with 25 additions and 11 deletions

View File

@ -134,13 +134,13 @@ class FeedbackController extends Controller
$output = "<tr>".
"<th style='width: 6em;'>Dato</th>".
"<th>Feedback Besked</th>".
"<th style='width: 5em;'>Ris el. Ros</th>".
"<th style='width: 7em;'>Feedback type</th>".
"<th style=\"width: 1em;\"><img class=\"w-100\" src=".asset('/images/icons/trashcan.svg')." alt=\"Delete\"></th>".
"</tr>";
//$value = Feedbacks::query('feedbacks')->select('suggestion_form ')->dump();
//$value = DB::table('feedbacks')->select('suggestion_form ')->dump();
if($request->option === "Ris" || $request->option === "Ros")
if($request->option === "Ris" || $request->option === "Ros" || $request->option === "Andet")
$feedbacks = Feedbacks::query()->orderBy('created_at', 'desc')->where('suggestion_form', '=', $request->option)
->get();
else

View File

@ -67,5 +67,11 @@ return[
"403" => "Du har ikke rettigheder til denne side.",
"canceled" => "Aflyst",
"feedbacksendt" => "Tak for din feedback!",
"feedbackerror" => "Du skal skrive en besked."
"feedbackerror" => "Du skal skrive en besked.",
"risros" => "Vælg om du vil give ris, ros, eller andet form feedback",
"ros" => "Ros",
"ris" => "Ris",
"andet" => "Andet",
"besked" => "Besked",
"send" => "Send besked"
];

View File

@ -73,5 +73,11 @@ return[
"403" => "You don't have permissions to access this page.",
"canceled" => "Canceled",
"feedbacksendt" => "Thank you for your feedback!",
"feedbackerror" => "You have to write a feedback message."
"feedbackerror" => "You have to write a feedback message.",
"risros" => "Choose feedback type: positive, negative or other ",
"ris" => "Negative",
"ros" => "Positive",
"andet" => "Other",
"besked" => "Messages",
"send" => "Send messeags"
];

View File

@ -19,6 +19,7 @@
<option selected="selected" name="all" value="all">Alle</option>
<option name="ris" value="Ris">Ris</option>
<option name="ros" value="Ros">Ros</option>
<option name="andet" value="Andet">Andet</option>
</select>
<!-- Dont delete me sir :(
<input class="checkbox-inline" type="checkbox" name="checkbox" id="ris" value="ris">
@ -33,7 +34,7 @@
<tr>
<th style="width: 6em;">Dato</th>
<th>Feedback Besked</th>
<th style="width: 5em;">Ris el. Ros</th>
<th style="width: 7em;">Feedback type</th>
@if(auth()->user()->can('feedback.delete'))
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
@endif

View File

@ -13,14 +13,15 @@
<main style="min-height: calc(100% - 61.34px)" class="text-center">
<div method="post" style="margin-top: 4rem; margin-bottom: auto; max-width: 100%; padding: 0 0.45rem 0 0.45rem; display: flex; flex-direction: column; justify-content: center;">
@csrf
<span>Ris el. Ros?</span>
<span>{{__("msg.risros")}}</span>
<select id="suggestion_form" name="suggestion_form" class="mb-2" required>
<option selected>Ros</option>
<option>Ris</option>
<option selected value="Ros">{{__("msg.ros")}}</option>
<option value="Ris">{{__("msg.ris")}}</option>
<option value="Andet">{{__("msg.andet")}}</option>
</select>
<span>Besked:</span>
<textarea id="message" name="message" placeholder="Skriv Ris/Ros besked her" style="resize: vertical;" required></textarea>
<button onclick="ajaxCall(document.getElementById('suggestion_form'), document.getElementById('message'))" class="btn btn-sde-blue mt-2">Send Ris/Ros</button>
<span>{{__("msg.besked")}}:</span>
<textarea id="message" name="message" placeholder="{{__("msg.besked")}}" style="resize: vertical;" required></textarea>
<button onclick="ajaxCall(document.getElementById('suggestion_form'), document.getElementById('message'))" class="btn btn-sde-blue mt-2">{{__("msg.send")}}</button>
</div>
<div id="snackbar"></div>
</main>