v1.1.0a - Added "andet option" til feedback
This commit is contained in:
parent
201e2b5b35
commit
89ea2c971b
|
@ -134,13 +134,13 @@ class FeedbackController extends Controller
|
||||||
$output = "<tr>".
|
$output = "<tr>".
|
||||||
"<th style='width: 6em;'>Dato</th>".
|
"<th style='width: 6em;'>Dato</th>".
|
||||||
"<th>Feedback Besked</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>".
|
"<th style=\"width: 1em;\"><img class=\"w-100\" src=".asset('/images/icons/trashcan.svg')." alt=\"Delete\"></th>".
|
||||||
"</tr>";
|
"</tr>";
|
||||||
|
|
||||||
//$value = Feedbacks::query('feedbacks')->select('suggestion_form ')->dump();
|
//$value = Feedbacks::query('feedbacks')->select('suggestion_form ')->dump();
|
||||||
//$value = DB::table('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)
|
$feedbacks = Feedbacks::query()->orderBy('created_at', 'desc')->where('suggestion_form', '=', $request->option)
|
||||||
->get();
|
->get();
|
||||||
else
|
else
|
||||||
|
|
|
@ -67,5 +67,11 @@ return[
|
||||||
"403" => "Du har ikke rettigheder til denne side.",
|
"403" => "Du har ikke rettigheder til denne side.",
|
||||||
"canceled" => "Aflyst",
|
"canceled" => "Aflyst",
|
||||||
"feedbacksendt" => "Tak for din feedback!",
|
"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"
|
||||||
];
|
];
|
||||||
|
|
|
@ -73,5 +73,11 @@ return[
|
||||||
"403" => "You don't have permissions to access this page.",
|
"403" => "You don't have permissions to access this page.",
|
||||||
"canceled" => "Canceled",
|
"canceled" => "Canceled",
|
||||||
"feedbacksendt" => "Thank you for your feedback!",
|
"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"
|
||||||
];
|
];
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
<option selected="selected" name="all" value="all">Alle</option>
|
<option selected="selected" name="all" value="all">Alle</option>
|
||||||
<option name="ris" value="Ris">Ris</option>
|
<option name="ris" value="Ris">Ris</option>
|
||||||
<option name="ros" value="Ros">Ros</option>
|
<option name="ros" value="Ros">Ros</option>
|
||||||
|
<option name="andet" value="Andet">Andet</option>
|
||||||
</select>
|
</select>
|
||||||
<!-- Dont delete me sir :(
|
<!-- Dont delete me sir :(
|
||||||
<input class="checkbox-inline" type="checkbox" name="checkbox" id="ris" value="ris">
|
<input class="checkbox-inline" type="checkbox" name="checkbox" id="ris" value="ris">
|
||||||
|
@ -33,7 +34,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 6em;">Dato</th>
|
<th style="width: 6em;">Dato</th>
|
||||||
<th>Feedback Besked</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'))
|
@if(auth()->user()->can('feedback.delete'))
|
||||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||||
@endif
|
@endif
|
||||||
|
|
|
@ -13,14 +13,15 @@
|
||||||
<main style="min-height: calc(100% - 61.34px)" class="text-center">
|
<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;">
|
<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
|
@csrf
|
||||||
<span>Ris el. Ros?</span>
|
<span>{{__("msg.risros")}}</span>
|
||||||
<select id="suggestion_form" name="suggestion_form" class="mb-2" required>
|
<select id="suggestion_form" name="suggestion_form" class="mb-2" required>
|
||||||
<option selected>Ros</option>
|
<option selected value="Ros">{{__("msg.ros")}}</option>
|
||||||
<option>Ris</option>
|
<option value="Ris">{{__("msg.ris")}}</option>
|
||||||
|
<option value="Andet">{{__("msg.andet")}}</option>
|
||||||
</select>
|
</select>
|
||||||
<span>Besked:</span>
|
<span>{{__("msg.besked")}}:</span>
|
||||||
<textarea id="message" name="message" placeholder="Skriv Ris/Ros besked her" style="resize: vertical;" required></textarea>
|
<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">Send Ris/Ros</button>
|
<button onclick="ajaxCall(document.getElementById('suggestion_form'), document.getElementById('message'))" class="btn btn-sde-blue mt-2">{{__("msg.send")}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="snackbar"></div>
|
<div id="snackbar"></div>
|
||||||
</main>
|
</main>
|
||||||
|
|
Loading…
Reference in New Issue