Compare commits

..

4 Commits

  1. 8
      edit-mode/function/reportActivity.js
  2. 20
      edit-mode/index.html

8
edit-mode/function/reportActivity.js

@ -546,7 +546,13 @@ $(document).ready(function () {
return false; return false;
} }
if (data && data.image) { if (data && data.image) {
$("#report-image").html(`<img src="${base_url_image}${moment(data.created_at).format('YYYY-MM')}/image/${data.image}" class="img-responsive" style="height: 75vh;" />`); $format = data.image.split('.').pop();
console.log($format);
if ($format == 'pdf') {
$("#report-pdf").html(`<embed src="${base_url_image}image/${data.image}" type="application/pdf" frameBorder="0" scrolling="auto" height="100%" width="100%" ></embed>`);
} else {
$("#report-image").html(`<img src="${base_url_image}image/${data.image}" class="img-responsive" style="height: 75vh;" />`);
}
$('#modal-report-image').modal('show'); $('#modal-report-image').modal('show');
} }
// kalo gambarnya banyak belum di handle... // kalo gambarnya banyak belum di handle...

20
edit-mode/index.html

@ -645,16 +645,16 @@
<div class="modal fade" id="modal_report_activity" tabindex="-1" role="dialog"> <div class="modal fade" id="modal_report_activity" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document"> <div class="modal-dialog modal-lg" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header d-flex flex-row justify-content-between" style="width: 100%;"> <div class="modal-header d-flex justify-content-start" style="width: 100%;">
<button type="button" class="btn btn-sm btn-danger mr-2 mt-2" data-dismiss="modal" aria-label="Close"><i
class="fas fa-times fa-lg"></i></button>
<button id="show_form_ra" type="button" class="success btn btn-success btn-sm btn-update-status mr-2 mt-2"
data-toggle="tooltip" title="Input Update Status" data-placement="top" aria-hidden="true"><i class="fa fa-cog"
aria-hidden="true"></i></button>
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<h5 class="modal-title" id="report_activity_title">Report Activity</h5> <h5 class="modal-title" id="report_activity_title">Report Activity</h5>
<h6 id="report_activity_sub_title"></h6> <h6 id="report_activity_sub_title"></h6>
</div> </div>
<div>
<button id="show_form_ra" type="button" class="success btn btn-success btn-sm btn-update-status"
data-toggle="tooltip" title="Input Update Status" data-placement="top" aria-hidden="true"><i
class="fa fa-cog" aria-hidden="true"></i></button>
</div>
</div> </div>
<div class="modal-body"> <div class="modal-body">
@ -724,8 +724,8 @@
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal" <!-- <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal"
aria-label="Close">Close</button> aria-label="Close">Close</button> -->
</div> </div>
</div> </div>
</div> </div>
@ -867,9 +867,9 @@
<div class="modal-dialog modal-lg" role="document"> <div class="modal-dialog modal-lg" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header d-flex flex-row justify-content-between" style="width: 100%;"> <div class="modal-header d-flex flex-row justify-content-between" style="width: 100%;">
<h5 class="modal-title" id="report_activity_location">Report Image</h5> <h5 class="modal-title" id="report_activity_location">Report File</h5>
</div> </div>
<div class="modal-body"> <div class="modal-body" id="report-pdf">
<div id="report-image"></div> <div id="report-image"></div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">

Loading…
Cancel
Save