HEX
Server: Apache/2.4.46 (Ubuntu)
System: Linux localhost 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64
User: root (0)
PHP: 7.4.16
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/sarvodayahospital/resources/views/pages/appointment-thanks.blade.php
@extends('layouts.main')

@section('content')
    <section class="thank-you-sec py-md-5 py-4">
        <div class="container">
            <div class="row">
                <div class="col-md-4 mb-4 order-md-0 order-2">
                    <div class="thank-you-box-left">
                        <div id="feedback-form">
                            <h3 class="clrBlueDark f-20 f-sm-20 mb-2 text-center fw-700">Got Suggestions? We'd love to hear from you!</h3>
                            <p class="f-16 mb-2 f-sm-16 clr5c text-center">Rate your overall experience </p>
                            <div class="reviews-wrapper text-center starrr" id='star1'>
                            </div>
                            @if (($order_status == 'hospital') ||   ($order_status=="Success"))
                            <input type="hidden" id="orderid" name="orderid" value="{{$book['OrderID']}}">
                            <input type="hidden" id="PatientName" name="PatientName" value="{{$book['patient_name']}}">
                            <input type="hidden" id="PatientMobile" name="PatientMobile" value="{{$book['patient_mobile']}}">
                            @else
                            <input type="hidden" id="orderid" name="orderid" value="{{@$data['order_id']}}">
                                <input type="hidden" id="PatientName" name="PatientName" value="{{@$data['billing_name']}}">
                                <input type="hidden" id="PatientMobile" name="PatientMobile" value="{{@$data['billing_tel']}}">
                            @endif
                            <input type="hidden" id="rating" name="rating" value="">
                            <input type="hidden" name="_token" value="{{ csrf_token() }}">
                            <textarea placeholder="Please share your feedback" class="form-control mt-3" id="feedback" name="feedback"></textarea>
                            <input class="submit" type="submit" value="Submit" name=""/>
                            {{-- <button class="submit btn" name="" >Submit</button> --}}
                        </div>
                    </div>
                </div>
                <div  class="col-md-8">
                @if ($order_status == 'hospital')
                    @include('partials.cc-success')
                @elseif($order_status=="Success")
                    @include('partials.cc-success')
                @elseif($order_status=="Aborted")
                <p> Transaction Aborted</p>
                    @include('partials.cc-failed')
                @elseif($order_status=="Failure")
                <p> Transaction Failure</p>
                    @include('partials.cc-failed')
                @elseif($order_status=="NotBooked")
                <p> Booking Not Done slot already booked</p>
                    @include('partials.cc-failed')
                @else
                <p>Security Error. Illegal access detected</p>
                @endif
                <div class=" mt-md-3 text-center">
                    <a href="{{ route('home') }}" class="back-to-home-btn btn">Back to Home Page</a>
                </div>
            </div>
            </div>
        </div>
    </section>
@endsection

@section('javascript')
    <script src="{{ asset('js/starrr.js') }}"></script>
    <script type="text/javascript">
        $(function() {
            var ratingsField = $('#rating');
            $('.starrr').on('starrr:change', function(e, value) {
                ratingsField.val(value);
            });
        });
    </script>
    <script type="text/javascript">
        $(document).ready(function() {
            window.history.pushState(null, "", window.location.href);
            window.onpopstate = function() {
                window.history.pushState(null, "", window.location.href);
            };
        });
    </script>
    <script type="text/javascript">
$.ajaxSetup({
    headers: {'X-CSRF-TOKEN': '{{ csrf_token() }}'}
});
$(document).ready(function() {
    $(".submit").click(function(e){
            $.ajax({
                type: "POST",
                url: "{{ route('appointment.feedback') }}",
                dataType: "json",
                data: {
                    PatientName: $("#PatientName").val(),
                    PatientMobile: $("#PatientMobile").val(),
                    Rating:$("#rating").val(),
                    orderid:$("#orderid").val(),
                    Feedback:$("#feedback").val(),
                },
                success: function(response) {
                    if ((response.ok == 'success')) {
                        $('#feedback-form').hide();
                        $('.thank-you-box-left').html('<p>Your feedback is valuable to us</p>');
                    } else {
                        $(".thank-you-box-left").prepend("<b>Some error happend</b>. ");
                    }
                }
            });
        });
});
    </script>
@endsection