Skip to content

Commit

Permalink
penyesuaian icon lokasi pelapak sesuai pengaturan
Browse files Browse the repository at this point in the history
  • Loading branch information
andifahruddinakas committed Apr 30, 2024
1 parent d3fcfd3 commit 64c7568
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 59 deletions.
13 changes: 3 additions & 10 deletions catatan_rilis.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
Catatan Rilis v2404.0.0 :
Catatan Rilis v2405.0.0 :

### FITUR :
1. Penambahan opsi pengaturan tema.
2. Penambahan komentar dari admin.
3. Penambahan media sosial yang dimuat secara dinamis.

### BUG :
1. Perbaikan kesalahan tag d() jadi e() untuk filter input yang ditampilkan pada pembangunan.
2. Perbaikan pengecekan array jika kosong.
3. Perbaikan halaman virifikasi surat jika tidak ada penduduk (untuk surat dinas).
### TEKNIS :
1. Penyesuaian icon lokasi pelapak sesuai pengaturan.
100 changes: 51 additions & 49 deletions partials/lapak/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,70 +17,70 @@
</select>
<input type="text" name="keyword" maxlength="50" class="form-control" value="<?= e($keyword); ?>" placeholder="Cari Produk">
<button type="submit" class="btn btn-primary">Cari</button>
<?php if (e($keyword)): ?>
<a href="<?=site_url('lapak')?>" class="btn btn-info">Tampilkan Semua</a>
<?php if (e($keyword)) : ?>
<a href="<?= site_url('lapak') ?>" class="btn btn-info">Tampilkan Semua</a>
<?php endif ?>
</div>
</div>
</form>
<br/>
<?php if ($produk): ?>
<br />
<?php if ($produk) : ?>
<div class="row">
<?php foreach ($produk as $in => $pro): ?>
<?php $foto = json_decode($pro->foto); ?>
<div class="col-md-4">
<div class="card mb-4 box-shadow">
<?php if ($pro->foto): ?>
<div class="slick_slider" style="margin-bottom:5px; max-height: 250px;">
<?php for ($i = 0; $i < $this->setting->banyak_foto_tiap_produk; $i++): ?>
<?php if ($foto[$i]): ?>
<?php foreach ($produk as $in => $pro) : ?>
<?php $foto = json_decode($pro->foto); ?>
<div class="col-md-4">
<div class="card mb-4 box-shadow">
<?php if ($pro->foto) : ?>
<div class="slick_slider" style="margin-bottom:5px; max-height: 250px;">
<?php for ($i = 0; $i < $this->setting->banyak_foto_tiap_produk; $i++) : ?>
<?php if ($foto[$i]) : ?>
<div class="item <?= jecho($i, 0, 'active'); ?>">
<?php if (is_file(LOKASI_PRODUK . $foto[$i])): ?>
<?php if (is_file(LOKASI_PRODUK . $foto[$i])) : ?>
<div class="single_iteam">
<img class="tlClogo" src="<?= base_url(LOKASI_PRODUK . $foto[$i]); ?>" alt="Foto <?= ($i+1); ?>">
<img class="tlClogo" src="<?= base_url(LOKASI_PRODUK . $foto[$i]); ?>" alt="Foto <?= ($i + 1); ?>">
<!-- <?= jecho($pro->kategori, true, '<div class="textgambar hidden-xs">' . $pro->kategori . '</div>'); ?> -->
</div>
<?php else: ?>
<img class="card-img-top" style="width: auto; max-height: 250px;" src="<?= asset('images/404-image-not-found.jpg') ?>" alt="Foto Produk"/>
<?php else : ?>
<img class="card-img-top" style="width: auto; max-height: 250px;" src="<?= asset('images/404-image-not-found.jpg') ?>" alt="Foto Produk" />
<?php endif; ?>
</div>
<?php endif; ?>
<?php endfor; ?>
</div>
<?php else: ?>
<img class="card-img-top" style="width: auto; max-height: 250px;" src="<?= asset('images/404-image-not-found.jpg') ?>" alt="Foto Produk"/>
<?php endif; ?>
<div class="card-body">
<!--
</div>
<?php else : ?>
<img class="card-img-top" style="width: auto; max-height: 250px;" src="<?= asset('images/404-image-not-found.jpg') ?>" alt="Foto Produk" />
<?php endif; ?>
<div class="card-body">
<!--
Jika ingin menambahkan badge potongan dalam persen
<?= persen(($pro->tipe_potongan == 1) ? $pro->potongan/100 : $pro->potongan / $pro->harga); ?>
<?= persen(($pro->tipe_potongan == 1) ? $pro->potongan / 100 : $pro->potongan / $pro->harga); ?>
-->
<h4><b><?= $pro->nama; ?></b></h4>
<?php $harga_potongan = ($pro->tipe_potongan == 1) ? ($pro->harga * ($pro->potongan / 100)) : $pro->potongan; ?>
<h6><b style="color:green;">Harga : <?= rupiah($pro->harga - $harga_potongan); ?>
<?php if ($pro->potongan != 0): ?>
<h4><b><?= $pro->nama; ?></b></h4>
<?php $harga_potongan = ($pro->tipe_potongan == 1) ? ($pro->harga * ($pro->potongan / 100)) : $pro->potongan; ?>
<h6><b style="color:green;">Harga : <?= rupiah($pro->harga - $harga_potongan); ?>
<?php if ($pro->potongan != 0) : ?>
&nbsp;&nbsp;<small style="color:red; text-decoration: line-through red;"><?= rupiah($pro->harga); ?></small>
<?php endif; ?>
</b></h6>
<p class="card-text">
<b>Deskripsi :</b>
<br/>
<?= nl2br(e($pro->deskripsi)); ?>
</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<?php if ($pro->telepon): ?>
<?php $pesan = strReplaceArrayRecursive(['[nama_produk]' => $pro->nama, '[link_web]' => base_url('lapak'), '<br />' => "%0A"], nl2br($this->setting->pesan_singkat_wa)); ?>
<a class="btn btn-sm btn-success" href="https://api.whatsapp.com/send?phone=<?=format_telpon($pro->telepon); ?>&amp;text=<?= $pesan; ?>" rel="noopener noreferrer" target="_blank" title="WhatsApp"><i class="fa fa-whatsapp"></i> Beli</a>
<?php endif; ?>
<a class="btn btn-sm btn-primary lokasi-pelapak" data-remote="false" data-toggle="modal" data-target="#map-modal" title="Lokasi" data-lat="<?= $pro->lat?>" data-lng="<?= $pro->lng?>" data-zoom="<?= $pro->zoom?>" data-title="Lokasi Pelapak (<?= $pro->pelapak?>)"><i class="fa fa fa-map"></i> Lokasi</a>
</div>
<small class="text-muted"><b><i class="fa fa-user"></i>&nbsp;<?= $pro->pelapak; ?></b></small>
<p class="card-text">
<b>Deskripsi :</b>
<br />
<?= nl2br(e($pro->deskripsi)); ?>
</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<?php if ($pro->telepon) : ?>
<?php $pesan = strReplaceArrayRecursive(['[nama_produk]' => $pro->nama, '[link_web]' => base_url('lapak'), '<br />' => "%0A"], nl2br($this->setting->pesan_singkat_wa)); ?>
<a class="btn btn-sm btn-success" href="https://api.whatsapp.com/send?phone=<?= format_telpon($pro->telepon); ?>&amp;text=<?= $pesan; ?>" rel="noopener noreferrer" target="_blank" title="WhatsApp"><i class="fa fa-whatsapp"></i> Beli</a>
<?php endif; ?>
<a class="btn btn-sm btn-primary lokasi-pelapak" data-remote="false" data-toggle="modal" data-target="#map-modal" title="Lokasi" data-lat="<?= $pro->lat ?>" data-lng="<?= $pro->lng ?>" data-zoom="<?= $pro->zoom ?>" data-title="Lokasi Pelapak (<?= $pro->pelapak ?>)"><i class="fa fa fa-map"></i> Lokasi</a>
</div>
<small class="text-muted"><b><i class="fa fa-user"></i>&nbsp;<?= $pro->pelapak; ?></b></small>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</div>

<style type="text/css">
Expand All @@ -96,7 +96,7 @@
<div class='modal-content'>
<div class='modal-header'>
<button type='button' class='close' data-dismiss='modal' aria-hidden='true'>&times;</button>
<h4 class='modal-title'></h4>
<h4 class='modal-title'></h4>
</div>
<div class="modal-body">
</div>
Expand All @@ -106,14 +106,14 @@

<?php $this->load->view("$folder_themes/commons/page"); ?>

<?php else: ?>
<?php else : ?>
<h5>Belum ada produk yang ditawarkan.</h5>
<?php endif;?>
<?php endif; ?>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$(document).on('shown.bs.modal','#map-modal', function(event) {
$(document).on('shown.bs.modal', '#map-modal', function(event) {
let link = $(event.relatedTarget);
let title = link.data('title');
let modal = $(this);
Expand All @@ -123,9 +123,9 @@
let posisi = [link.data('lat'), link.data('lng')];
let zoom = link.data('zoom');
let logo = L.icon({
iconUrl: "<?= asset('images/gis/point/fastfood.png'); ?>",
iconUrl: "<?= setting('icon_lapak_peta') ?>",
});

$("#lat").val(link.data('lat'));
$("#lng").val(link.data('lng'));

Expand All @@ -136,7 +136,9 @@

pelapak = L.map('map', options).setView(posisi, zoom);
getBaseLayers(pelapak, "<?= setting('mapbox_key') ?>", "<?= setting('jenis_peta') ?>");
pelapak.addLayer(new L.Marker(posisi, {icon:logo}));
pelapak.addLayer(new L.Marker(posisi, {
icon: logo
}));
});
});
</script>

0 comments on commit 64c7568

Please sign in to comment.