<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Refund Request</title>

    <!-- Bootstrap core CSS -->
    <link href="../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" />
    <link href="https://fonts.googleapis.com/css2?family=Kufam:wght@400;500;600;700;800;900&display=swap"
          rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="../public/css/main.css" rel="stylesheet">

</head>

<body>

<div class="d-flex" id="wrapper">

    <!-- Sidebar -->
    <?php
    
    include ('../sidebar_brands.php');
    ?>
    <!-- /#sidebar-wrapper -->

    <!-- Page Content -->
    <div id="page-content-wrapper">

        <?php

        include ('../navbar_brand_store.php');
        $brand_store_id=$_SESSION['brand_id'];
        ?>
        <input type="hidden" id="brand-store-id" value="<?=$brand_store_id;?>">
        <div class="container">
            <div class="page_name_candidate">
                <div class="candidate_div mb-4">
                    <h1>Refund Request</h1>

                </div>
                <div class="select_sort_second">

                    <div class="sort_btn">
                        <!--              <a href="" data-toggle="modal" data-target="#add_payment_modal"><span class=""></span></a>-->

                    </div>
                </div>



            </div>

            <div class="cards">
                <div class="row">
                    <div class="col-xl-12 mt-3 mb-3">
                        <div class="card payment_method_card candidate">
                            <div class="card-body ">
                                <div class="pagination_table">
                                    <div class="results">

                                    </div>
                                    <div class="page">
                                        <div class="page_filter">
                                            <!--                        <div class="form-group mr-3">-->
                                            <!---->
                                            <!--                          <select class="form-control">-->
                                            <!--                            <option>City</option>-->
                                            <!--                            <option>2</option>-->
                                            <!--                            <option>3</option>-->
                                            <!--                            <option>4</option>-->
                                            <!--                            <option>5</option>-->
                                            <!--                          </select>-->
                                            <!--                        </div>-->
                                            <!--                        <div class="form-group mr-3">-->
                                            <!---->
                                            <!--                          <select class="form-control">-->
                                            <!--                            <option>Country</option>-->
                                            <!--                            <option>2</option>-->
                                            <!--                            <option>3</option>-->
                                            <!--                            <option>4</option>-->
                                            <!--                            <option>5</option>-->
                                            <!--                          </select>-->
                                            <!--                        </div>-->
                                            <!--                        <div class="form-group mr-3">-->
                                            <!--                          <label for="exampleFormControlSelect1">Show:</label>-->
                                            <!--                          <select class="form-control" id="exampleFormControlSelect1">-->
                                            <!--                            <option>20</option>-->
                                            <!--                            <option>2</option>-->
                                            <!--                            <option>3</option>-->
                                            <!--                            <option>4</option>-->
                                            <!--                            <option>5</option>-->
                                            <!--                          </select>-->
                                            <!--                        </div>-->
                                        </div>

                                        <span class="page_head">Results Per Page</span>
                                        <ul class="pagination pagination-sm">
                                            <!--                        <li class="page-item"><a class="page-link page_pre" href="#"><span><i-->
                                            <!--                                class="fas fa-angle-left"></i></span></a></li>-->
                                            <!--                        <li class="page-item"><a class="page-link" href="#">1</a></li>-->
                                            <!--                        <li class="page-item"><a class="page-link" href="#">2</a></li>-->
                                            <!--                        <li class="page-item"><a class="page-link" href="#">...</a></li>-->
                                            <!--                        <li class="page-item"><a class="page-link" href="#">19</a></li>-->
                                            <!--                        <li class="page-item"><a class="page-link page_next" href="#"><span><i-->
                                            <!--                                class="fas fa-angle-right"></i></span></a></li>-->
                                        </ul>

                                    </div>
                                </div>
                                <div class="search_product">
                                    <form action="#">
                                        <div class="input-group ">
                                            <div class="input-group-prepend">
                                                <span class="input-group-text" id="basic-addon1"><i class="fas fa-search"></i></span>
                                            </div>
                                            <input type="text" class="form-control" id="refund-search" placeholder="Searching for.." aria-label="Username"
                                                   aria-describedby="basic-addon1">
                                        </div>
                                    </form>

                                </div>

                                <table class="table table_centerd">
                                    <thead>
                                    <tr>

                                        <th>Picture</th>
                                        <th>User Name</th>

                                        <th>Product Name</th>
                                        <th>Brand Name</th>
                                        <th>Price</th>
                                        <th>Status</th>
                                        <th>Action</th>



                                    </tr>
                                    </thead>
                                    <tbody id="refund-table-body">
                                    <tr>
                                        <td><img src="../public/image/person.jpg" alt=""></td>
                                        <td><span>pepsi</span>
                                        </td>
                                        <td>pepsi</td>
                                        <td>$2324</td>

                                        <td><span class="span_completed accordion-toggle" data-toggle="collapse"
                                                  data-target="#demo1">pending</span></td>
                                        <td>
                                            <div class="reject_accept_div">
                                                <span class="reject"><i class="fas fa-times"></i></span>
                                                <span class="accept"><i class="fas fa-check"></i></span>
                                            </div>
                                        </td>


                                    </tr>
                                    <tr>
                                        <td colspan="11" class="hiddenRow">
                                            <div class="accordian-body collapse" id="demo1">

                                                <div class="row table_image_row">

                                                    <div class="col-xl-12">
                                                        <div class="card">
                                                            <div class="card-header table-image_card_header">
                                                                <h2 class="table-image-card-body-main-head">Pictures</h2>
                                                            </div>
                                                            <div class="card-body">
                                                                <div class="refund_images">
                                                                    <img src="../public/image/person.jpg" alt="">
                                                                    <img src="../public/image/person.jpg" alt="">
                                                                    <img src="../public/image/person.jpg" alt="">
                                                                    <img src="../public/image/person.jpg" alt="">
                                                                    <img src="../public/image/person.jpg" alt="">
                                                                    <img src="../public/image/person.jpg" alt="">
                                                                    <img src="../public/image/screen.png" alt="">
                                                                </div>


                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-xl-6 mt-2">
                                                        <div class="card">
                                                            <div class="card-header table-image_card_header">
                                                                <h2 class="table-image-card-body-main-head">Reasons</h2>
                                                            </div>
                                                            <div class="card-body">
                                                                <div class="reasons_refund">
                                                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit.
                                                                    Vestibulum laoreet, nunc eget laoreet sagittis,
                                                                    quam ligula sodales orci, congue imperdiet eros tortor ac lectus.
                                                                    Duis eget nisl orci. Aliquam mattis purus non mauris
                                                                    blandit id luctus felis convallis.
                                                                    Integer varius egestas vestibulum.
                                                                    Nullam a dolor arcu, ac tempor elit. Donec.
                                                                </div>


                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-xl-6 mt-2">
                                                        <div class="card">
                                                            <div class="card-header table-image_card_header">
                                                                <h2 class="table-image-card-body-main-head">Responce</h2>
                                                            </div>
                                                            <div class="card-body">
                                                                <div class="comment">
                                                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit.
                                                                    Vestibulum laoreet, nunc eget laoreet sagittis,
                                                                    quam ligula sodales orci, congue imperdiet eros tortor ac lectus.
                                                                    Duis eget nisl orci. Aliquam mattis purus non mauris
                                                                    blandit id luctus felis convallis.
                                                                    Integer varius egestas vestibulum.
                                                                    Nullam a dolor arcu, ac tempor elit. Donec.
                                                                </div>

                                                            </div>


                                                        </div>
                                                    </div>
                                                </div>

                                            </div>

                            </div>
                            </td>
                            </tr>
                            <tr>

                                <td><img src="../public/image/person.jpg" alt=""></td>
                                <td><span>pepsi</span>
                                </td>
                                <td>pepsi</td>
                                <td>$2324</td>

                                <td><span class="span_completed accordion-toggle" data-toggle="collapse"
                                          data-target="#demo2">pending</span></td>
                                <td>
                                    <div class="reject_accept_div">
                                        <span class="reject"><i class="fas fa-times"></i></span>
                                        <span class="accept"><i class="fas fa-check"></i></span>
                                    </div>
                                </td>

                            </tr>
                            <tr>
                                <td colspan="11" class="hiddenRow">
                                    <div class="accordian-body collapse" id="demo2"> Demo Content1 </div>
                                </td>
                            </tr>
                            <tr>



                            </tr>
                            <tr>

                                <td><img src="../public/image/person.jpg" alt=""></td>
                                <td><span>pepsi</span>
                                </td>
                                <td>pepsi</td>
                                <td>$2324</td>

                                <td><span class="span_completed accordion-toggle" data-toggle="collapse"
                                          data-target="#demo1">pending</span></td>
                                <td>
                                    <div class="reject_accept_div">
                                        <span class="reject"><i class="fas fa-times"></i></span>
                                        <span class="accept"><i class="fas fa-check"></i></span>
                                    </div>
                                </td>
                            </tr>
                            <tr>

                                <td><img src="../public/image/person.jpg" alt=""></td>
                                <td><span>pepsi</span>
                                </td>
                                <td>pepsi</td>
                                <td>$2324</td>

                                <td><span class="span_completed accordion-toggle" data-toggle="collapse"
                                          data-target="#demo1">pending</span></td>
                                <td>
                                    <div class="reject_accept_div">
                                        <span class="reject"><i class="fas fa-times"></i></span>
                                        <span class="accept"><i class="fas fa-check"></i></span>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                            </table>

                        </div>
                    </div>

                </div>

            </div>

        </div>
    </div>
    <!-- /#page-content-wrapper -->

</div>
<!-- /#wrapper -->
<!-- modals -->
<!-- add modal -->
<form class="childcatagories_modal_from" id="modal-form" action="">
    <div class="modal fade" id="add_payment_modal" tabindex="-1" role="dialog"
         aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header mh">
                    <button type="button" class="close closmodel" data-dismiss="modal" aria-label="Close"
                            onclick="colsemodel()">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body mb">
                    <div>
                        <div class="cat-folder-img">
                            <i class="fa fa-folder" aria-hidden="true"></i>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload"
                               class="customer-add-input-label txt-regular upload-input-label">S.No</label>
                        <input type="text" id="addpro_cat" name="driver_name" placeholder="Enter Serial No" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label"> Date &
                            Time</label>
                        <input type="datetime-local" id="addpro_cat" name="driver_no" placeholder="Enter Phone No" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label"> Rider
                            Name</label>
                        <input type="text" id="addpro_cat" name="driver_Email" placeholder="Enter Rider Name" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label"> Driver
                            Name</label>
                        <input type="text" id="addpro_cat" name="total_trips" placeholder="Enter driver name" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label">
                            Fare</label>
                        <input type="text" id="addpro_cat" name="total_revenue" placeholder="Enter Fare" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group form_select">
                        <label for="select_author">Vechile Category</label>
                        <select class="form-control selectpicker" id="select_payment">
                            <option>Luxury</option>
                            <option>Bill Gordon</option>
                            <option>Elizabeth Warren</option>
                            <option>Mario Flores</option>
                            <option>Don Young</option>
                            <option disabled="disabled">Marvin
                                Martinez</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label">
                            Status</label>
                        <input type="text" id="addpro_cat" name="status" placeholder="Enter Status" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label"> Ride
                            Now</label>
                        <input type="text" id="addpro_cat" name="ratings" placeholder="Enter Ridings" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label">
                            Pre-bookings</label>
                        <input type="text" id="addpro_cat" name="ratings" placeholder="Enter bookings" value=""
                               class="customer-add-input  w-100" />
                    </div>


                    <!-- <div>
                                      <div>
                                          <div class="upload-text-heading">
                                              <h5 class="coupon-code-main-heading txt-regular">
                                                  Upload Picture
                                              </h5>
                                          </div>
                                          <div>
                                              <p class="upload-main-paragraph txt-label2">
                                                  Drag and drop your files here
                                              </p>
                                          </div>
                                      </div>
                                      <div class="card text-center uload-card">
                                          <div class="file-upload4">
                                              <div class="image-upload-wrap4">
                                                  <input class="file-upload-input4" type="file" onchange="readURL4(this);"
                                                      accept="image/*" />
                                                  <div class="drag-text4">
                                                      <div class="card-body upload-card-body4">
                                                          <div class="upload-img4">
                                                              <img src="../public/image/upload.png" alt="" />
                                                          </div>
                                                          <div class="upload-image-format4">
                                                              <p>
                                                                  .PDF .JPG .PNG .DOC
                                                              </p>
                                                          </div>
                                                          <div class="upload-detail4">
                                                              <h4>You can also upload files by</h4>
                                                              <div class="upload-clicking4">
                                                                  <a href="#" class="">Clicking here</a>
                                                              </div>
                                                          </div>
                                                      </div>
                                                  </div>
                                              </div>
                                              <div class="file-upload-content4">
                                                  <img class="file-upload-image4" src="#" alt="your image" />
                                                  <div class="image-title-wrap4">
                                                      <button type="button" onclick="removeUpload4()"
                                                          class="btn remove-image4">
                                                          Remove
                                                          <span class="image-title4" style="display: none;">Uploaded
                                                              Image</span>
                                                      </button>
                                                  </div>
                                              </div>
                                          </div>
                                      </div>
                                  </div> -->
                </div>
                <div class="modal-footer mf">
                    <button type="button" onclick="addproductfield()" class="btn btn-primary">
                        <img src="../public/image/tick (1).png" alt="" />
                    </button>
                </div>
            </div>
        </div>
    </div>
</form>
<!-- edit modal -->
<form class="childcatagories_modal_from" id="modal-form" action="">
    <div class="modal fade" id="add_payment_modal_edit" tabindex="-1" role="dialog"
         aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header mh">
                    <button type="button" class="close closmodel" data-dismiss="modal" aria-label="Close"
                            onclick="colsemodel()">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body mb">
                    <div>
                        <div class="cat-folder-img">
                            <i class="fa fa-folder" aria-hidden="true"></i>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload"
                               class="customer-add-input-label txt-regular upload-input-label">S.No</label>
                        <input type="text" id="addpro_cat" name="driver_name" placeholder="Enter Serial No" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label"> Date &
                            Time</label>
                        <input type="datetime-local" id="addpro_cat" name="driver_no" placeholder="Enter Phone No" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label"> Rider
                            Name</label>
                        <input type="text" id="addpro_cat" name="driver_Email" placeholder="Enter Rider Name" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label"> Driver
                            Name</label>
                        <input type="text" id="addpro_cat" name="total_trips" placeholder="Enter driver name" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label">
                            Fare</label>
                        <input type="text" id="addpro_cat" name="total_revenue" placeholder="Enter Fare" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group form_select">
                        <label for="select_author">Vechile Category</label>
                        <select class="form-control selectpicker" id="select_payment">
                            <option>Luxury</option>
                            <option>Bill Gordon</option>
                            <option>Elizabeth Warren</option>
                            <option>Mario Flores</option>
                            <option>Don Young</option>
                            <option disabled="disabled">Marvin
                                Martinez</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label">
                            Status</label>
                        <input type="text" id="addpro_cat" name="status" placeholder="Enter Status" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label"> Ride
                            Now</label>
                        <input type="text" id="addpro_cat" name="ratings" placeholder="Enter Ridings" value=""
                               class="customer-add-input  w-100" />
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload" class="customer-add-input-label txt-regular upload-input-label">
                            Pre-bookings</label>
                        <input type="text" id="addpro_cat" name="ratings" placeholder="Enter bookings" value=""
                               class="customer-add-input  w-100" />
                    </div>



                    <!-- <div>
                                      <div>
                                          <div class="upload-text-heading">
                                              <h5 class="coupon-code-main-heading txt-regular">
                                                  Upload Picture
                                              </h5>
                                          </div>
                                          <div>
                                              <p class="upload-main-paragraph txt-label2">
                                                  Drag and drop your files here
                                              </p>
                                          </div>
                                      </div>
                                      <div class="card text-center uload-card">
                                          <div class="file-upload4">
                                              <div class="image-upload-wrap4">
                                                  <input class="file-upload-input4" type="file" onchange="readURL4(this);"
                                                      accept="image/*" />
                                                  <div class="drag-text4">
                                                      <div class="card-body upload-card-body4">
                                                          <div class="upload-img4">
                                                              <img src="../public/image/upload.png" alt="" />
                                                          </div>
                                                          <div class="upload-image-format4">
                                                              <p>
                                                                  .PDF .JPG .PNG .DOC
                                                              </p>
                                                          </div>
                                                          <div class="upload-detail4">
                                                              <h4>You can also upload files by</h4>
                                                              <div class="upload-clicking4">
                                                                  <a href="#" class="">Clicking here</a>
                                                              </div>
                                                          </div>
                                                      </div>
                                                  </div>
                                              </div>
                                              <div class="file-upload-content4">
                                                  <img class="file-upload-image4" src="#" alt="your image" />
                                                  <div class="image-title-wrap4">
                                                      <button type="button" onclick="removeUpload4()"
                                                          class="btn remove-image4">
                                                          Remove
                                                          <span class="image-title4" style="display: none;">Uploaded
                                                              Image</span>
                                                      </button>
                                                  </div>
                                              </div>
                                          </div>
                                      </div>
                                  </div> -->
                </div>
                <div class="modal-footer mf">
                    <button type="button" onclick="addproductfield()" class="btn btn-primary">
                        <img src="../public/image/tick (1).png" alt="" />
                    </button>
                </div>
            </div>
        </div>
    </div>
</form>
<!-- accept modal modal -->
<form class="childcatagories_modal_from" id="modal-form" action="">
    <div class="modal fade" id="accepted_refund" tabindex="-1" role="dialog"
         aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header mh">
                    <button type="button" class="close closmodel" data-dismiss="modal" aria-label="Close"
                            onclick="colsemodel()">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body mb">
                    <div>
                        <div class="cat-folder-img">
                            <i class="fa fa-folder" aria-hidden="true"></i>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload"
                               class="customer-add-input-label txt-regular upload-input-label">Responce</label>
                        <textarea class="form-control responce_val" rows="5" id="comment"></textarea>
                    </div>

                </div>
                <div class="modal-footer mf">
                    <button type="button "  class="btn btn-primary addrefundstatus">
                        <img src="../public/image/tick (1).png" alt="" />
                    </button>
                </div>
            </div>
        </div>
    </div>
</form>
<!--  reject modal -->
<form class="childcatagories_modal_from" id="modal-form" action="">
    <div class="modal fade" id="reject_refund" tabindex="-1" role="dialog"
         aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header mh">
                    <button type="button" class="close closmodel" data-dismiss="modal" aria-label="Close"
                            onclick="colsemodel()">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body mb">
                    <div>
                        <div class="cat-folder-img">
                            <i class="fa fa-folder" aria-hidden="true"></i>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="cat-name-upload"
                               class="customer-add-input-label txt-regular upload-input-label">Responce</label>
                        <textarea class="form-control responce_val_reject" rows="5" id="comment"></textarea>
                    </div>

                </div>
                <div class="modal-footer mf">
                    <button type="button "  class="btn btn-primary addrejectstatus">
                        <img src="../public/image/tick (1).png" alt="" />
                    </button>
                </div>
            </div>
        </div>
    </div>
</form>
<input type="hidden" id="refund-id">

<!-- Bootstrap core JavaScript -->
<script src="../vendor/jquery/jquery.min.js"></script>
<script src="../vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
<script type="text/javascript" src="https://www.viralpatel.net/demo/jquery/jquery.shorten.1.0.js"></script>
<script src="../public/js/customjs.js"></script>

<!-- Menu Toggle Script -->
<script>
    $("#menu-toggle").click(function (e) {
        e.preventDefault();
        $("#wrapper").toggleClass("toggled");
    });

    function myFunction() {
        var dots = document.getElementById("dots");
        var moreText = document.getElementById("more");
        var btnText = document.getElementById("myBtn");

        if (dots.style.display === "none") {
            dots.style.display = "inline";
            btnText.innerHTML = "Read more";
            moreText.style.display = "none";
        } else {
            dots.style.display = "none";
            btnText.innerHTML = "Read less";
            moreText.style.display = "inline";
        }
    }

    $('.refund_active').addClass('active');



    $(".comment").shorten({
        "showChars" : 200,
        "moreText"	: "See More",
        "lessText"	: "Less",
    });

    $(".reasons_refund").shorten({
        "showChars" : 200,
        "moreText"	: "See More",
        "lessText"	: "Less",
    });


</script>
<script>
    $(document).ready(function (){
        retrieveallRefund();

        function retrieveallRefund(search = '') {
            var store_id = $("#brand-store-id").val();
            sendRequest("?action_type=retrieve&request_type=store&functionality_type=retrieve_all_refund", {

                search:search,
                store_id:store_id,

            }, "POST")
                .then((data) => {
                    var data = JSON.parse(data);
                    if (data.code == "202") {

                        $(".pagination").html(data.pagination);
                        $("#refund-table-body").empty();
                        var list = data.listOfData;

                        for (var i = 0; i < list.length; i++) {


                            // console.log("Data  Id = " + list[i].id + " Name = " + list[i].logo + " enable = " + list[i].name);
                            var n = list[i].id;
                            var user_name = list[i].user_name;
                            var product_name = list[i].product_name;
                            var pro_image = list[i].pro_image;
                            var brand_name = list[i].brand_name;
                            var discounted_amount = list[i].discounted_amount;
                            var order_price = list[i].order_price;
                            var coupons_id = list[i].coupons_id;
                            var refund_response = list[i].refund_response;
                            var refund_status = list[i].refund_status;
                            var refund_reason = list[i].refund_reason;
                            // var detail = list[i].detail;

                            // var usage_count = list[i].usage_count;
                            // var duration_limit = list[i].duration_limit;
                            // var user_limit = list[i].user_limit;
                            // var status = list[i].status;
                            var status_class ="";
                            var status_name ="";
                            if(refund_status == "0"){
                                status_class ="refund_pending";
                                status_name ="Pending";
                            }
                            else if (refund_status == "1") {
                                status_class ="span_completed";
                                status_name ="Completed";
                            }
                            else {
                                status_class ="refund_declined";
                                status_name ="Declined";
                            }






                            var enable = list[i].enable;
                            var refund_price = "";
                            if (coupons_id !== "") {

                                refund_price = discounted_amount;
                            } else {

                                refund_price = order_price;
                            }



                            var text = " <tr>\n" +
                                "                        <td><img src=\""+pro_image+"\" alt=\"\"></td>\n" +
                                "                        <td><span>"+user_name+"</span>\n" +
                                "                        </td>\n" +
                                "                        <td>"+product_name+"</td>\n" +
                                "                        <td>"+brand_name+"</td>\n" +
                                "                        <td>"+refund_price+"</td>\n" +
                                "\n" +
                                "                        <td><span class=\""+status_class+" accordion-toggle\" data-toggle=\"collapse\"\n" +
                                "                            data-target=\"#refund-detail-"+n+"\">"+status_name+"</span></td>\n" +
                                "                        <td>\n" +

                                "                          <div class=\"reject_accept_div\">\n" +
                                "                            <span class=\"reject\" data-toggle=\"modal\" onclick=\"addrefundid("+n+")\" data-target=\"#reject_refund\" ><i class=\"fas fa-times\"></i></span>\n" +
                                "                            <span class=\"accept\" data-toggle=\"modal\" onclick=\"addrefundid("+n+")\" data-id=\""+n+"\" data-target=\"#accepted_refund\"><i class=\"fas fa-check\"></i></span>\n" +
                                "                          </div>\n" +
                                "                        </td>\n" +
                                "\n" +
                                "\n" +
                                "                      </tr>\n" +
                                "                      <tr>\n" +
                                "                        <td colspan=\"11\" class=\"hiddenRow\">\n" +
                                "                          <div class=\"accordian-body collapse\" id=\"refund-detail-"+n+"\">\n" +
                                "\n" +
                                "                            <div class=\"row table_image_row\">\n" +
                                "\n" +
                                "                              <div class=\"col-xl-12\">\n" +
                                "                                <div class=\"card\">\n" +
                                "                                  <div class=\"card-header table-image_card_header\">\n" +
                                "                                    <h2 class=\"table-image-card-body-main-head\">Pictures</h2>\n" +
                                "                                  </div>\n" +
                                "                                  <div class=\"card-body\">\n" +
                                "                                    <div class=\"refund_images\" id=\"refund-img-"+n+"\">\n" +
                                "                                      <img src=\"../public/image/person.jpg\" alt=\"\">\n" +
                                "                                      <img src=\"../public/image/person.jpg\" alt=\"\">\n" +
                                "                                      <img src=\"../public/image/person.jpg\" alt=\"\">\n" +
                                "                                      <img src=\"../public/image/person.jpg\" alt=\"\">\n" +
                                "                                      <img src=\"../public/image/person.jpg\" alt=\"\">\n" +
                                "                                      <img src=\"../public/image/person.jpg\" alt=\"\">\n" +
                                "                                      <img src=\"../public/image/screen.png\" alt=\"\">\n" +
                                "                                    </div>\n" +
                                "\n" +
                                "\n" +
                                "                                  </div>\n" +
                                "                                </div>\n" +
                                "                              </div>\n" +
                                "                              <div class=\"col-xl-6 mt-2\">\n" +
                                "                                <div class=\"card\">\n" +
                                "                                  <div class=\"card-header table-image_card_header\">\n" +
                                "                                    <h2 class=\"table-image-card-body-main-head\">Reasons</h2>\n" +
                                "                                  </div>\n" +
                                "                                  <div class=\"card-body\">\n" +
                                "                                    <div class=\"reasons_refund\">"+refund_reason+"</div>\n" +
                                "                                  </div>\n" +
                                "                                </div>\n" +
                                "                              </div>\n" +
                                "                                <div class=\"col-xl-6 mt-2\">\n" +
                                "                                    <div class=\"card\">\n" +
                                "                                        <div class=\"card-header table-image_card_header\">\n" +
                                "                                            <h2 class=\"table-image-card-body-main-head\">Responce</h2>\n" +
                                "                                        </div>\n" +
                                "                                        <div class=\"card-body\">\n" +
                                "                                            <div class=\"comment\">"+refund_response+"</div>\n" +
                                "\n" +
                                "                                        </div>\n" +
                                "\n" +
                                "\n" +
                                "                                        </div>\n" +
                                "                                    </div>\n" +
                                "                                </div>\n" +
                                "\n" +
                                "                            </div>\n" +
                                "\n" +
                                "                          </div>\n" +
                                "                        </td>\n" +
                                "                      </tr>";
                            $("#refund-table-body").append(text);
                            $("#refund-img-"+n).empty();
                            for (var j = 0 ; j<list[i].detail.length ; j++) {
                                var detail = list[i].detail[j];
                                var detail = list[i].detail[j];
                                console.log("Detail  this = " + detail.image);
                                var pic = detail.image;
                                var imgtext = "<img src=\""+pic+"\" alt=\"\">";
                                $("#refund-img-"+n).append(imgtext);
                            }



                        }



                    }
                    else if (data.code == "206") {
                        console.log("Failed to Delete");
                    }

                })
                .catch((error) => {
                    console.log(error)
                });
        }

        $('#refund-search').keyup(function () {
            var search = $(this).val();
            retrieveallRefund(search);
            // console.log(query)
        });

        $(document).on('click','.addrefundstatus',function (){

            var id=$("#refund-id").val();
            var val=$(".responce_val").val();
            sendRequest("?action_type=update&request_type=store&functionality_type=update_accept_data", {
                id: id,
                status: val,
            }, "POST")
                .then((data) => {
                    var data = JSON.parse(data);
                    if(data.code == "202"){
                        retrieveallRefund();
                        $("#accepted_refund").modal("hide");
                    }


                })
                .catch((error) => {
                    console.log(error)
                })

        });

        $(document).on('click','.addrejectstatus',function (){

            var id=$("#refund-id").val();
            var val=$(".responce_val_reject").val();
            sendRequest("?action_type=update&request_type=store&functionality_type=update_reject_data", {
                id: id,
                status: val,
            }, "POST")
                .then((data) => {
                    var data = JSON.parse(data);
                    if(data.code == "202"){
                        retrieveallRefund();
                        $("#reject_refund").modal("hide");
                    }


                })
                .catch((error) => {
                    console.log(error)
                })

        });



    });

    function addrefundid(id){
        $("#refund-id").val(id);
    }

    function pag(offset,id) {

        var offset =offset;
        var active= $(".pagination").find('.active');
        active.removeClass("active");
        $("#pag-"+id).addClass("active");
        var search = $("#refund-search").val();
        var searchset=""
        if(search = ""){
            searchset =""
        }else {
            searchset = search;
        }
        var store_id = $("#brand-store-id").val();
        sendRequest("?action_type=retrieve&request_type=store&functionality_type=refundpagination", {

            search:search,
            store_id:store_id,

        }, "POST")
            .then((data) => {
                var data = JSON.parse(data);
                if (data.code == "202") {

                    // $(".pagination").html(data.pagination);
                    $("#refund-table-body").empty();
                    var list = data.listOfData;

                    for (var i = 0; i < list.length; i++) {


                        // console.log("Data  Id = " + list[i].id + " Name = " + list[i].logo + " enable = " + list[i].name);
                        var n = list[i].id;
                        var user_name = list[i].user_name;
                        var product_name = list[i].product_name;
                        var pro_image = list[i].pro_image;
                        var brand_name = list[i].brand_name;
                        var discounted_amount = list[i].discounted_amount;
                        var order_price = list[i].order_price;
                        var coupons_id = list[i].coupons_id;
                        var refund_response = list[i].refund_response;
                        var refund_status = list[i].refund_status;
                        var refund_reason = list[i].refund_reason;
                        // var detail = list[i].detail;

                        // var usage_count = list[i].usage_count;
                        // var duration_limit = list[i].duration_limit;
                        // var user_limit = list[i].user_limit;
                        // var status = list[i].status;
                        var status_class ="";
                        var status_name ="";
                        if(refund_status == "0"){
                            status_class ="refund_pending";
                            status_name ="Pending";
                        }
                        else if (refund_status == "1") {
                            status_class ="span_completed";
                            status_name ="Completed";
                        }
                        else {
                            status_class ="refund_declined";
                            status_name ="Declined";
                        }






                        var enable = list[i].enable;
                        var refund_price = "";
                        if (coupons_id !== "") {

                            refund_price = discounted_amount;
                        } else {

                            refund_price = order_price;
                        }



                        var text = " <tr>\n" +
                            "                        <td><img src=\""+pro_image+"\" alt=\"\"></td>\n" +
                            "                        <td><span>"+user_name+"</span>\n" +
                            "                        </td>\n" +
                            "                        <td>"+product_name+"</td>\n" +
                            "                        <td>"+brand_name+"</td>\n" +
                            "                        <td>"+refund_price+"</td>\n" +
                            "\n" +
                            "                        <td><span class=\""+status_class+" accordion-toggle\" data-toggle=\"collapse\"\n" +
                            "                            data-target=\"#refund-detail-"+n+"\">"+status_name+"</span></td>\n" +
                            "                        <td>\n" +

                            "                          <div class=\"reject_accept_div\">\n" +
                            "                            <span class=\"reject\" data-toggle=\"modal\" onclick=\"addrefundid("+n+")\" data-target=\"#reject_refund\" ><i class=\"fas fa-times\"></i></span>\n" +
                            "                            <span class=\"accept\" data-toggle=\"modal\" onclick=\"addrefundid("+n+")\" data-id=\""+n+"\" data-target=\"#accepted_refund\"><i class=\"fas fa-check\"></i></span>\n" +
                            "                          </div>\n" +
                            "                        </td>\n" +
                            "\n" +
                            "\n" +
                            "                      </tr>\n" +
                            "                      <tr>\n" +
                            "                        <td colspan=\"11\" class=\"hiddenRow\">\n" +
                            "                          <div class=\"accordian-body collapse\" id=\"refund-detail-"+n+"\">\n" +
                            "\n" +
                            "                            <div class=\"row table_image_row\">\n" +
                            "\n" +
                            "                              <div class=\"col-xl-12\">\n" +
                            "                                <div class=\"card\">\n" +
                            "                                  <div class=\"card-header table-image_card_header\">\n" +
                            "                                    <h2 class=\"table-image-card-body-main-head\">Pictures</h2>\n" +
                            "                                  </div>\n" +
                            "                                  <div class=\"card-body\">\n" +
                            "                                    <div class=\"refund_images\" id=\"refund-img-"+n+"\">\n" +
                            "                                      <img src=\"../public/image/person.jpg\" alt=\"\">\n" +
                            "                                      <img src=\"../public/image/person.jpg\" alt=\"\">\n" +
                            "                                      <img src=\"../public/image/person.jpg\" alt=\"\">\n" +
                            "                                      <img src=\"../public/image/person.jpg\" alt=\"\">\n" +
                            "                                      <img src=\"../public/image/person.jpg\" alt=\"\">\n" +
                            "                                      <img src=\"../public/image/person.jpg\" alt=\"\">\n" +
                            "                                      <img src=\"../public/image/screen.png\" alt=\"\">\n" +
                            "                                    </div>\n" +
                            "\n" +
                            "\n" +
                            "                                  </div>\n" +
                            "                                </div>\n" +
                            "                              </div>\n" +
                            "                              <div class=\"col-xl-6 mt-2\">\n" +
                            "                                <div class=\"card\">\n" +
                            "                                  <div class=\"card-header table-image_card_header\">\n" +
                            "                                    <h2 class=\"table-image-card-body-main-head\">Reasons</h2>\n" +
                            "                                  </div>\n" +
                            "                                  <div class=\"card-body\">\n" +
                            "                                    <div class=\"reasons_refund\">"+refund_reason+"</div>\n" +
                            "                                  </div>\n" +
                            "                                </div>\n" +
                            "                              </div>\n" +
                            "                                <div class=\"col-xl-6 mt-2\">\n" +
                            "                                    <div class=\"card\">\n" +
                            "                                        <div class=\"card-header table-image_card_header\">\n" +
                            "                                            <h2 class=\"table-image-card-body-main-head\">Responce</h2>\n" +
                            "                                        </div>\n" +
                            "                                        <div class=\"card-body\">\n" +
                            "                                            <div class=\"comment\">"+refund_response+"</div>\n" +
                            "\n" +
                            "                                        </div>\n" +
                            "\n" +
                            "\n" +
                            "                                        </div>\n" +
                            "                                    </div>\n" +
                            "                                </div>\n" +
                            "\n" +
                            "                            </div>\n" +
                            "\n" +
                            "                          </div>\n" +
                            "                        </td>\n" +
                            "                      </tr>";
                        $("#refund-table-body").append(text);
                        $("#refund-img-"+n).empty();
                        for (var j = 0 ; j<list[i].detail.length ; j++) {
                            var detail = list[i].detail[j];
                            var detail = list[i].detail[j];
                            console.log("Detail  this = " + detail.image);
                            var pic = detail.image;
                            var imgtext = "<img src=\""+pic+"\" alt=\"\">";
                            $("#refund-img-"+n).append(imgtext);
                        }



                    }



                }
                else if (data.code == "206") {
                    console.log("Failed to Delete");
                }

            })
            .catch((error) => {
                console.log(error)
            });
    }

</script>

</body>

</html>