2020-06-29 10:56:08 +00:00
@ extends ( " admin.layout.base " )
@ extends ( " admin.layout.header " )
@ section ( " title " )
Feedback - Vis
@ endsection
@ section ( " path " )
< a href = " { { route('feedbacks.index') }} " class = " text-white " > Vis Feedback </ a > /
@ endsection
2020-08-03 08:08:03 +00:00
2020-06-29 10:56:08 +00:00
@ section ( " content " )
2020-08-03 08:08:03 +00:00
< div class = " risRos " >
< label for = " risros " > Vælg type feedback :</ label >
< select name = " risRosName " id = " risRosValue " >
< option selected = " selected " name = " all " value = " all " > Alle </ option >
< option name = " ris " value = " Ris " > Ris </ option >
< option name = " ros " value = " Ros " > Ros </ option >
</ select >
2020-08-24 07:00:15 +00:00
<!-- Dont delete me sir : (
< input class = " checkbox-inline " type = " checkbox " name = " checkbox " id = " ris " value = " ris " >
< label for = " efternavn " > Ris </ label >
< input class = " checkbox-inline " type = " checkbox " name = " checkbox " id = " ros " value = " ros " >
< label for = " efternavn " > Ros </ label >
-->
2020-08-03 08:08:03 +00:00
</ div >
2020-06-29 10:56:08 +00:00
< table class = " tbl " >
< tr >
2020-08-18 11:01:39 +00:00
< th style = " width: 6em; " > Dato </ th >
2020-06-29 10:56:08 +00:00
< th > Feedback Besked </ th >
2020-08-18 11:01:39 +00:00
< th style = " width: 5em; " > Ris el . Ros </ th >
2020-08-13 07:08:34 +00:00
< th style = " width: 1em; " >< img class = " w-100 " src = " { { asset('/images/icons/trashcan.svg') }} " alt = " Delete " ></ th >
2020-06-29 10:56:08 +00:00
</ tr >
@ foreach ( $feedback as $fb )
< tr >
2020-08-18 11:01:39 +00:00
< td > {{ date ( 'd-m-Y' , strtotime ( $fb -> created_at )) }} </ td >
2020-08-13 07:08:34 +00:00
< td > {{ $fb -> message }} </ td >
< td > {{ $fb -> suggestion_form }} </ td >
< td >< form method = " post " action = " { { route( " feedbacks . destroy " , [ " feedback " => $fb ]) }} " class = " w-100 nostyle " >
@ csrf
@ method ( " delete " )
< button onclick = " return confirm('Are you sure you want to delete?'); " class = " w-100 nostyle " type = " submit " >< img class = " w-100 cursor-pointer " src = " { { asset('/images/icons/trashcan-dark.svg') }} " alt = " Delete " ></ button >
</ form >
</ td >
2020-06-29 10:56:08 +00:00
</ tr >
@ endforeach
</ table >
{{ $feedback -> links () }}
2020-08-03 08:08:03 +00:00
< script >
$ ( '#risRosValue' ) . change ( function () {
$value = $ ( '#risRosValue' ) . find ( " :selected " ) . val ();
$ . ajax ({
type : 'get' ,
url : '{{route(' feedbacks . search ')}}' ,
data : { 'option' : $value },
success : function ( data ) {
$ ( 'tbody' ) . html ( data );
},
error : function ( data ) {
console . log ( data );
}
});
})
</ script >
2020-06-29 10:56:08 +00:00
@ endsection