feat: add loading at cancel and req bill

This commit is contained in:
Pyae Bhone Zaw
2025-06-20 10:58:31 +06:30
parent 1112d80fc4
commit cc32bb0b16
2 changed files with 85 additions and 0 deletions

View File

@@ -29,6 +29,17 @@
}
}
#fullpage-loading {
display: none;
position: fixed;
z-index: 9999;
top: 0; left: 0;
width: 100vw; height: 100vh;
background: rgba(0, 0, 0, 0.712);
align-items: center;
justify-content: center;
}
</style>
<div class="container-fluid h-100">
@@ -47,6 +58,17 @@
%>
<% end %>
<div id="fullpage-loading" style="display:none; position:fixed; z-index:9999; top:0; left:0; width:100vw; height:100vh; background:rgba(0,0,0,0.35); align-items:center; justify-content:center;">
<div>
<div style="display:flex; gap:10px; justify-content:center;">
<div class="processing-dot"></div>
<div class="processing-dot"></div>
<div class="processing-dot"></div>
</div>
<div style="color:white; text-align:center; margin-top:1rem; font-size:1.2rem;">Please Wait...</div>
</div>
</div>
<div class="row clearfix h-100">
<% if @error %>
<input type="hidden" name="error_message" id="error_message" value="<%= json_escape(@error.to_json) %>">
@@ -419,6 +441,11 @@ $(document).ready(function() {
}
$('#cancel-btn').on('click', function(e) {
document.getElementById('fullpage-loading').style.display = 'flex';
setTimeout(function() {
document.getElementById('fullpage-loading').style.display = 'none';
}, 5000);
const postData = {
sale_id: "<%= @sale_data.sale_id %>"
};