
    <!--start main wrapper-->
    <main class="main-wrapper">
        <div class="main-content">
            <div class="d-flex justify-content-between flex-wrap gap-2">
                <button class="btn guestBtn d-flex gap-2 align-items-center" id="backBtn"><img
                        src="<?php echo base_url(); ?>assets/images/arowleft.svg" alt="" width="15px"> Back</button>
                <div class="d-flex gap-2 align-items-center">
                    <?php if($warning['status'] == "active"){ ?>
                    <button class="btn btn-approv px-3 solve-warning" 
                    data-warning-id="<?php echo $warningId; ?>"
                    data-bs-toggle="modal"
                        data-bs-target="#confirmModal">Solve</button>
                    <?php } ?>
                    <a href="<?php echo base_url().'site/editwarning'; ?>" class="btn btn-edit px-3">Edit</a>
                    <!-- <button class="btn btn-deny px-3">Deny</button> -->
                    <!-- Modal -->
                    <div class="modal fade" id="confirmModal" tabindex="-1" aria-labelledby="confirmModalLabel"
                        aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <h5 class="modal-title" id="confirmModalLabel">Confirm Action</h5>
                                    <button type="button" class="btn-close" data-bs-dismiss="modal"
                                        aria-label="Close"></button>
                                </div>
                                <div class="modal-body">
                                    Are you sure you want to solve this warning?
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-secondary"
                                        data-bs-dismiss="modal">Cancel</button>
                                    <button type="button" class="btn btn-primary" id="confirmSolve">Solve</button>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

            <!-- <div class="row my-3">

                <div class="col-md-12 my-3">
                    <div class="custom-toolbar px-3 py-2">
                        <p class="mb-0 ft8">Casa Club # 1</p>
                    </div>
                    <div class="card border-15 my-2">
                        <div class="card-body">
                            <p class="ft10 mb-1">Unit: <span>200</span></p>
                            <p class="ft10 mb-1">Reservation date: <span>21 May, 2024</span></p>
                            <p class="ft10 mb-1">Slot: <span>8-10AM</span></p>
                            <p class="ft10 mb-1">Price: <span>$25</span></p>
                            <p class="ft10 mb-1">Is Paid: <span>No</span></p>
                            <p class="ft10 mb-1">No. of people: <span>10</span></p>
                            <p class="ft10 mb-1">User: <span>Ernesto Candido Este</span></p>
                            <p class="ft10 mb-1">Issue No. Associated: <span>23</span></p>

                        </div>
                    </div>
                </div>
                <div class="col-md-12 my-3">
                    <div class="custom-toolbar px-3 py-2">
                        <p class="mb-0 ft8">User Notes</p>
                    </div>
                    <div class="card border-15 my-2">
                        <div class="card-body">
                            <p class="ft10 mb-1">Lorem Ipsum is simply dummy text of the printing and typesetting
                                industry.
                                Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an
                                unknown printer took a galley of type and scrambled it to make a type specimen book. It
                                has survived not only five centuries, but also the leap into electronic typesetting,
                                remaining essentially unchanged.</p>

                        </div>
                    </div>
                </div>
                <div class="col-md-12 my-3">
                    <div class="custom-toolbar px-3 py-2">
                        <p class="mb-0 ft8">Security Notes</p>
                    </div>
                    <div class="card border-15 my-2">
                        <div class="card-body">
                            <p class="ft10 mb-1">Lorem Ipsum is simply dummy text of the printing and typesetting
                                industry.
                                Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an
                                unknown printer took a galley of type and scrambled it to make a type specimen book. It
                                has survived not only five centuries, but also the leap into electronic typesetting,
                                remaining essentially unchanged.</p>

                        </div>
                    </div>
                </div>
            </div> -->
            <div class="row my-3">
                <div class="col-md-12 my-3">

                    <div class="card border-15 my-2">
                        <div class="card-body">
                            <?php
                            $i=1;
                            foreach($occurrences as $o=> $occurrence){
                                // echo "<pre>";
                                // print_r($occurrence);
                                // echo "</pre>";
                                
                                
                                ?>
                            <div class="row my-2">
                                <div class="col-md-3">
                                    <p class="mb-0 ft8 fw-bold">Occurrence <?php echo $i; ?></p>
                                </div>
                                <div class="col-md-9">
                                    <div class="    ">
                                        <p class="ft10">Occurrence Date <br> <span><?php echo date('d M, Y', $occurrence['dateMs']/1000); ?></span></p>
                                        <p class="ft10">Details <br><span><?php echo $occurrence['comment']; ?></span></p>
                                        <p class="ft10">Attachments</p>
                                        <div class="d-flex gap-3 align-items-center">
                                            <p class="ft10">
                                            <?php if($occurrence['pdfName'] != ""){ ?>
                                                <a href="<?php echo $occurrence['pdfUrl']; ?>" target="_blank">
                                                <img src="<?php echo base_url(); ?>assets/images/atachP2.png" alt="">
                                                <span><?php echo $occurrence['pdfName']; ?></span>
                                            <?php } ?>
                                            </p>
                                            
                                        </div>
                                    </div>


                                </div>
                            </div>
                            <hr>
                            <?php } ?>
                          
                        </div>
                    </div>
                </div>


            </div>
        </div>


    </main>
    <!--end main wrapper-->