Skip to content

Commit

Permalink
Add detail widget
Browse files Browse the repository at this point in the history
  • Loading branch information
bochoven committed Sep 21, 2019
1 parent d2a102f commit 23ad351
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions provides.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php

return array(
'detail_widgets' => [
'warranty_detail' => ['view' => 'warranty_detail_widget'],
],
'listings' => array(
'warranty' => array('view' => 'warranty_listing', 'i18n' => 'warranty.warranty'),
),
Expand Down
24 changes: 24 additions & 0 deletions views/warranty_detail_widget.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<div class="col-lg-4">
<h4><i class="fa fa-umbrella"></i> <span data-i18n="warranty.warranty"></span></h4>
<table>
<tr>
<th data-i18n="warranty.coverage"></th><td class="mr-warranty_status"></td>
</tr>
<tr>
<th data-i18n="warranty.est_manufacture_date"></th><td class="mr-manufacture_date"></td>
</tr>
<tr>
<th data-i18n="warranty.est_purchase_date"></th><td class="mr-purchase_date"></td>
</tr>
</table>
</div>

<script>
$(document).on('appReady', function(e, lang) {
// Get estimate_manufactured_date
$.getJSON( appUrl + '/module/warranty/estimate_manufactured_date/' + serialNumber, function( data ) {
$('.mr-manufacture_date').html(data.date)
});
});
</script>

0 comments on commit 23ad351

Please sign in to comment.