https://t.me/RX1948
Server : Apache/2.4.18 (Ubuntu)
System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64
User : oppastar ( 1041)
PHP Version : 7.0.33-0ubuntu0.16.04.15
Disable Function : 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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Directory :  /var/www/laciasmara.com/public_html/shop/application/views/admin/product_claim/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/laciasmara.com/public_html/shop/application/views/admin/product_claim/index.php
<div class="row">
    <div class="col-sm-12">
        <p><a href="<?= base_url('admin/product_index'); ?>"><i class="fa fa-arrow-left" aria-hidden="true"></i> Kembali ke Produk</a></p><br>
        <h2>Claim Garansi</h2>
        <?= $this->session->flashdata('success'); //to display success message 
        ?>
        <?= $this->session->flashdata('result'); //to display result message 
        ?>
    </div><!-- end class="col-sm-12" -->
</div> <!-- end row -->
<div class="row">
    <div class="col-sm-12">
        <div class="table-responsive">
            <table class="table table-striped">
                <thead>
                    <tr>
                        <th>ID Claim</th>
                        <th>Submit Date</th>
                        <th>Item</th>
                        <th>Reason Claim</th>
                        <th>Link Bukti</th>
                        <th>Customer Detail</th>
                        <th>Status</th>
                        <th>Keterangan</th>
                    </tr>
                </thead>
                <tbody>
                    <?php if (count($claim_garansi)) : ?>
                        <?php echo form_open('admin/product_claim/update_claim_status'); ?>
                        <tr>
                            <td colspan="8"><input type="submit" name="submit_status" value="Ubah Status" class="form-control" /></td>
                        </tr>
                        <?php foreach ($claim_garansi as $claim) : ?>
                            <tr>
                                <td><?php echo $claim->id_claim; ?></td>
                                <td><?php echo $claim->created; ?></td>
                                <td><?php echo $claim->item_name; ?></td>
                                <td><?php echo $claim->reason_claim; ?></td>
                                <td style="max-width: 100px; word-wrap: break-word; white-space: normal;">
                                    <div class="editable-link-container">
                                        <a href="<?php echo $claim->link_bukti; ?>" class="editable-link" data-id="<?php echo $claim->id_claim; ?>" target="_blank"><?php echo $claim->link_bukti; ?></a>
                                        <button type="button" class="btn btn-sm btn-primary btn-edit-link" data-id="<?php echo $claim->id_claim; ?>"><i class="fa fa-pencil"></i></button>
                                    </div>
                                </td>

                                <td>
                                    <button type="button" class="btn btn-success" data-toggle="modal" data-target="#customerModal<?php echo $claim->customer_id; ?>">
                                        Customer Detail
                                    </button>
                                </td>

                                <td>
                                    <input type="hidden" name="product_id" value="<?php echo $claim->product_id; ?>">
                                    <input type="hidden" name="id_claim[]" value="<?php echo $claim->id_claim; ?>">
                                    <select name="status[]" class="form-control" <?php echo ($claim->status == 3 || $claim->status == 4 || $claim->status == 5) ? 'readonly' : ''; ?>>
                                        <?php if ($claim->status == 1) : ?>
                                            <option value="3" <?php echo ($claim->status == 3) ? 'selected' : ''; ?>>&#x2718; Ditolak</option>
                                            <option value="1" <?php echo ($claim->status == 1) ? 'selected' : ''; ?>>&#x21ba; Proses Analisa</option>
                                            <option value="2" <?php echo ($claim->status == 2) ? 'selected' : ''; ?>>&#x2714; Disetujui Barang</option>
                                            <option value="6" <?php echo ($claim->status == 6) ? 'selected' : ''; ?>>&#x2714; Disetujui Voucher/Credit</option>
                                        <?php elseif ($claim->status == 2) : ?>
                                            <option value="2" <?php echo ($claim->status == 2) ? 'selected' : ''; ?>>&#x2714; Disetujui Barang</option>
                                            <option value="4" <?php echo ($claim->status == 4) ? 'selected' : ''; ?>>&#x21c9; Terkirim</option>
                                        <?php elseif ($claim->status == 6) : ?>
                                            <option value="6" <?php echo ($claim->status == 6) ? 'selected' : ''; ?>>&#x2714; Disetujui Voucher/Credit</option>
                                            <option value="5" <?php echo ($claim->status == 5) ? 'selected' : ''; ?>>&#x21c9; Terkirim Voucher/Credit</option>
                                        <?php elseif ($claim->status == 3) : ?>
                                            <option value="3" <?php echo ($claim->status == 3) ? 'selected' : ''; ?>>&#x2718; Ditolak</option>
                                        <?php elseif ($claim->status == 4) : ?>
                                            <option value="4" <?php echo ($claim->status == 4) ? 'selected' : ''; ?>>&#x21c9; Terkirim</option>
                                        <?php elseif ($claim->status == 5) : ?>
                                            <option value="4" <?php echo ($claim->status == 5) ? 'selected' : ''; ?>>&#x21c9; Terkirim Voucher/Credit </option>
                                        <?php endif; ?>
                                    </select>

                                </td>
                                <?php if ($claim->status == 1) : ?>
                                    <td style="max-width: 200px; word-wrap: break-word; white-space: normal; text-align: center;">
                                        <?php if ($claim->keterangan == '') : ?>
                                            <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#keteranganModal<?php echo $claim->id_claim; ?>">
                                                Tambah Keterangan
                                            </button>
                                        <?php else : ?>
                                            <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#keteranganModal<?php echo $claim->id_claim; ?>">
                                                Tambah Keterangan
                                            </button>
                                            <?php echo $claim->keterangan; ?>
                                        <?php endif; ?>
                                    </td>
                                <?php elseif ($claim->status == 2) : ?>
                                    <td style="max-width: 200px; word-wrap: break-word; white-space: normal; text-align: center;">
                                        <?php if ($claim->keterangan == '') : ?>
                                            <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#keteranganModal<?php echo $claim->id_claim; ?>">
                                                Tambah Resi Pengiriman
                                            </button>
                                            <a href="<?= base_url() . 'admin/product_claim/generate_deliveryreceipt/' . $claim->no_order_id . '/' . $claim->id_claim; ?>" target="_blank" class="btn btn-success">
                                                <i class="fa fa-print"></i>&nbsp;Print Delivery Receipt
                                            </a>
                                            <?php echo $claim->payment_confirm_detail; ?>
                                        <?php else : ?>
                                            <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#keteranganModal<?php echo $claim->id_claim; ?>">
                                                Tambah Resi Pengiriman
                                            </button>
                                            <a href="<?= base_url() . 'admin/product_claim/generate_deliveryreceipt/' . $claim->no_order_id . '/' . $claim->id_claim; ?>" target="_blank" class="btn btn-success">
                                                <i class="fa fa-print"></i>&nbsp;Print Delivery Receipt
                                            </a>
                                            <?php echo $claim->payment_confirm_detail; ?>
                                            <br>
                                            <?php echo $claim->keterangan; ?>
                                        <?php endif; ?>
                                    </td>
                                <?php else : ?>
                                    <td style="text-align: center;"><?php echo ($claim->keterangan != '') ? $claim->keterangan : '-'; ?></td>
                                <?php endif; ?>

                            </tr>
                        <?php endforeach; ?>
                        <tr>
                            <td colspan="8"><input type="submit" name="submit_status" value="Ubah Status" class="form-control" /></td>
                        </tr>
                        <?php echo form_close(); ?>
                    <?php else : ?>
                        <tr>
                            <td colspan="3">Kami tidak dapat menemukan ulasan produk apa pun.</td>
                        </tr>
                    <?php endif; ?>
                </tbody>
            </table>
            <?php echo $this->pagination->create_links(); ?>
        </div>
    </div> <!-- end class col-sm-12 -->
</div> <!-- end class="row" -->

<!-- Modal -->
<?php foreach ($claim_garansi as $claim) : ?>
    <div class="modal fade" id="customerModal<?php echo $claim->customer_id; ?>" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="customerModalLabel<?php echo $claim->customer_id; ?>">Customer Detail</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">

                    <?php
                    $customer = $this->db->get_where('customers', array('id_customers' => $claim->customer_id))->row();
                    if ($customer) {
                        echo 'Name: ' . $customer->name . '<br>';
                        echo 'Email: ' . $customer->email . '<br>';
                        echo 'Address: ' . $customer->address . '<br>';
                        echo 'Phone: ' . $customer->phone . '<br>';
                    } else {
                        echo 'Customer not found';
                    }
                    ?>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                </div>
            </div>
        </div>
    </div>
<?php endforeach; ?>

<?php foreach ($claim_garansi as $claim) : ?>
    <?php if ($claim->status == 1) : ?>
        <div class="modal fade" id="keteranganModal<?php echo $claim->id_claim; ?>" tabindex="-1" role="dialog" aria-labelledby="keteranganModal<?php echo $claim->id_claim; ?>Label" aria-hidden="true">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <?php echo form_open('admin/product_claim/update_claim_keterangan'); ?>
                    <div class="modal-header">
                        <h5 class="modal-title" id="keteranganModal<?php echo $claim->id_claim; ?>Label">Tambah Keterangan</h5>
                        <br>
                        <p> Ditolak = Alasanya apa, to the point ada kata2 di template email<li> IND : "Claim garansi yang anda ajukan kami tolak karena (keterangan yang diinput)"</li>
                            <li> ENG : "We reject the warranty claim that you submitted because (keterangan yang diinput)"</li> Contoh : " Kerusakan disebabkan kesalahan pengguna "
                        </p>
                        <p> Disetujui Barang = Ongkir(angkanya saja ) Contoh : " 23.400 "</p>
                        <p> Disetujui Voucher = Kode Vouchernya Contoh : "dokter20"</p>
                        <p> Disetujui Credit = Jumlah credit(angkanya saja ) Contoh : " 230.000 "</p>


                        <h3><strong>Email Berbahasa : <?= $claim->lang ?></strong></h3>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body">
                        <input type="hidden" name="id_claim" value="<?php echo $claim->id_claim; ?>">
                        <textarea name="keterangan" class="form-control"></textarea>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
                        <input type="submit" name="submit_keterangan" value="Simpan" class="btn btn-primary" />
                    </div>
                    <?php echo form_close(); ?>
                </div>
            </div>
        </div>

    <?php endif; ?>
    <?php if ($claim->status == 2) : ?>
        <div class="modal fade" id="keteranganModal<?php echo $claim->id_claim; ?>" tabindex="-1" role="dialog" aria-labelledby="keteranganModal<?php echo $claim->id_claim; ?>Label" aria-hidden="true">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <?php echo form_open('admin/product_claim/update_claim_keterangan'); ?>
                    <div class="modal-header">
                        <h5 class="modal-title" id="keteranganModal<?php echo $claim->id_claim; ?>Label">Tambah Resi Pengiriman</h5>
                        <br>
                        <p>Format : Kurir - No.Resi</p>
                        <p>Contoh : JNE-TJL2866258CGK</p>

                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body">
                        <input type="hidden" name="id_claim" value="<?php echo $claim->id_claim; ?>">
                        <textarea name="keterangan" class="form-control"></textarea>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
                        <input type="submit" name="submit_keterangan" value="Simpan" class="btn btn-primary" />
                    </div>
                    <?php echo form_close(); ?>
                </div>
            </div>
        </div>

    <?php endif; ?>
<?php endforeach; ?>
<?php foreach ($claim_garansi as $claim) : ?>
    <!-- ... -->
    <div class="modal fade" id="linkModal_<?php echo $claim->id_claim; ?>" tabindex="-1" role="dialog" aria-labelledby="linkModal_<?php echo $claim->id_claim; ?>_label" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <?php echo form_open('admin/product_claim/update_link'); ?>
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="linkModal_<?php echo $claim->id_claim; ?>_label">Edit Link</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <input type="hidden" name="claim_id" value="<?php echo $claim->id_claim; ?>">
                    <input type="text" class="form-control" name="new_link" value="<?php echo $claim->link_bukti; ?>">
                    <div class="error-message" style="display: none;"></div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                    <input type="submit" class="btn btn-primary" value="Save">
                </div>
            </div>
            <?php echo form_close(); ?>
        </div>
    </div>
    <!-- ... -->
<?php endforeach; ?>

<script>
    $(document).ready(function() {
        $('.btn-edit-link').click(function() {
            var claimId = $(this).data('id');
            $('#linkModal_' + claimId).modal('show');
        });

        $('.save-link-btn').click(function() {
            var claimId = $(this).data('id');
            var newLink = $('#editLink_' + claimId).val();
            var errorContainer = $('#linkError_' + claimId);

            // Kirim permintaan AJAX ke controller
            $.ajax({
                url: '<?php echo site_url("admin/product_claim/update_link"); ?>',
                type: 'POST',
                data: {
                    claim_id: claimId,
                    new_link: newLink
                },
                success: function(response) {
                    if (response == 'success') {
                        // Tampilkan pesan sukses atau lakukan tindakan lain yang diinginkan
                        alert('Link berhasil diperbarui.');
                        // Atur tindakan lain setelah berhasil diperbarui
                        errorContainer.hide();
                    } else {
                        // Tampilkan pesan error atau lakukan tindakan lain yang diinginkan
                        errorContainer.text('Gagal memperbarui link.');
                        errorContainer.show();
                    }
                    $('#link_' + claimId).text(newLink);
                    $('#linkModal_' + claimId).modal('hide');
                },
                error: function() {
                    // Tampilkan pesan error atau lakukan tindakan lain yang diinginkan
                    errorContainer.text('Terjadi kesalahan saat memperbarui link.');
                    errorContainer.show();
                }
            });
        });
    });
</script>

https://t.me/RX1948 - 2025