first commit
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<h5>Email Parsed Fail</h5>
|
||||
</div>
|
||||
<div class="panel-body tbl-sm-pad" style="padding: 4px">
|
||||
<?php echo $member_parsedemailfail; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function( $ ) {
|
||||
$(function() {
|
||||
var customizer = {
|
||||
locked: false,
|
||||
init: function() {
|
||||
this.process();
|
||||
},
|
||||
/**
|
||||
* Parse email receipt manually
|
||||
* @return {json}
|
||||
*/
|
||||
process: function() {
|
||||
$(document.body).on('click', '.manually-parse', function(event) {
|
||||
|
||||
// locked
|
||||
if ( customizer.locked ) { return; }
|
||||
customizer.locked = true;
|
||||
|
||||
var id = $(this).attr('data-id');
|
||||
var urlPath = '/member/parse?id=' + id;
|
||||
|
||||
$.get( urlPath, function(data) {
|
||||
if ( data.data.parsed_status == 1 ) {
|
||||
alert( 'Successfully parsed the email manually!' );
|
||||
$(this).closest('tr').fadeOut('slow', function() {
|
||||
$(this).remove();
|
||||
});
|
||||
} else {
|
||||
alert( 'Parsed the email getting an errors, please check Slack!' );
|
||||
}
|
||||
customizer.locked = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
customizer.init();
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
Reference in New Issue
Block a user