zet-lib 1.2.84 → 1.2.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/zRoute.js +2 -2
  2. package/package.json +1 -1
package/lib/zRoute.js CHANGED
@@ -2592,12 +2592,12 @@ zRoute.viewFormsSync = async (req, res, MYMODEL, data = {}) => {
2592
2592
  </div>
2593
2593
  </div>
2594
2594
 
2595
- <span class="icon-small icons-primary" title="History" style="position: fixed;bottom: 10px;left: 400px" data-bs-toggle="modal" data-bs-target="#modal-history"><img class="icons-bg-white icon-image-large" src="/assets/icons/history.svg"></span>
2595
+ <div class="ps-lg-4 my-5 text-lg-start col-lg-3 mb-3 float-end divhistory"><button title="History" class="btn btn-success image-button btn-rounded dimens2x" style="position: fixed;bottom: 100px;right: -40px; transform: rotate(90deg);" data-bs-toggle="modal" data-bs-target="#modal-history"><img src="/assets/icons/history.svg" class="icons-bg-white" alt="Delete"> <span>History Data</span></button></div>
2596
2596
  `
2597
2597
 
2598
2598
  moduleLib.slugHTML(req, res, contentModal)
2599
2599
  let contentScript = `$(function(){
2600
- ajaxPost("/zhistory-data",{id:${data.id},table:"${MYMODEL.table}"},(data) => {$("#modal-body-history").html(data)});
2600
+ ajaxPost("/zhistory-data",{id:${data.id},table:"${MYMODEL.table}"},(data) => {$("#modal-body-history").html(data); if(data == "") {$(".divhistory").remove()}});
2601
2601
  $("#${MYMODEL.table}-delete").on("click", (() => {
2602
2602
  window.confirm("Sure to remove data ?") && ajaxDelete("/${MYMODEL.table}/delete", {id: "${data.id}"}, (function (e) {
2603
2603
  toastrForm(e), 1 == e.status && (location.href = "/${MYMODEL.table}")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zet-lib",
3
- "version": "1.2.84",
3
+ "version": "1.2.85",
4
4
  "description": "zet is a library that part of zet generator.",
5
5
  "engines": {
6
6
  "node": ">=18"