zet-lib 1.2.91 → 1.2.93

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.
package/lib/zCache.js CHANGED
@@ -246,7 +246,7 @@ zCache.MENU_SYSTEMS = () => {
246
246
  },
247
247
  {
248
248
  text: 'Custom Report',
249
- href: 'zreport',
249
+ href: 'zreports',
250
250
  },
251
251
  {
252
252
  text: 'Log Errors',
@@ -16,7 +16,7 @@ const ejs = require('ejs')
16
16
  var app = express()
17
17
  const path = require('path')
18
18
 
19
- const nots = ['index', 'uploads', 'js', 'css', 'log', 'generator', 'zmenu', 'zgenerator', 'zfields', 'zrole', 'zfunction', 'zgrid', 'zgrid_default', 'zreport', 'zpage', 'zlayout', 'zerror', 'zuser_company']
19
+ const nots = ['index', 'uploads', 'js', 'css', 'log', 'generator', 'zmenu', 'zgenerator', 'zfields', 'zrole', 'zfunction', 'zgrid', 'zgrid_default', 'zpage', 'zlayout', 'zerror', 'zuser_company']
20
20
  //const nots = [];
21
21
  //const generatorUrl = 'http://localhost:3005';
22
22
  const generatorUrl = 'https://generator.cmsqu.com'
package/lib/zRoute.js CHANGED
@@ -2598,7 +2598,7 @@ zRoute.viewFormsSync = async (req, res, MYMODEL, data = {}) => {
2598
2598
  <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>
2599
2599
 
2600
2600
  `
2601
- moduleLib.slugHTML(req, res, contentModal)
2601
+ moduleLib.slugHTML(req, res, contentModal)
2602
2602
  let contentScript = `$(function(){
2603
2603
  ajaxPost("/zhistory-data",{id:${data.id},table:"${MYMODEL.table}"},(data) => {$("#modal-body-history").html(data); if(data == "") {$(".divhistory").remove()}});
2604
2604
  $("#${MYMODEL.table}-delete").on("click", (() => {
@@ -3261,6 +3261,26 @@ zRoute.generateJS = (req, res, MYMODEL, relations, zForms = '', data = {}) => {
3261
3261
  dz.options.addedfile.call(dz, mockFile);
3262
3262
  dz.options.thumbnail.call(dz, mockFile, "${process.env.APP_URL}/uploads/${MYMODEL.table}/${item}/"+item.fileName);
3263
3263
  })
3264
+ setTimeout(function(){
3265
+ $(".dz-image-preview").each(function(){
3266
+ let src = $(this).find("img").attr("src");
3267
+ let ext = src.split('.').pop();
3268
+ ext = ext.toLowerCase();
3269
+ if(imagesTypeArray.includes(ext)) {
3270
+ $(this).on("click", function() {
3271
+ $(".zimage-modal").attr('src', src);
3272
+ $("#zmodal-image").modal("show");
3273
+ })
3274
+ } else {
3275
+ let mysrc = nonImagesTypeObject.hasOwnProperty(ext) ? nonImagesTypeObject[ext] : 'file.png';
3276
+ $(this).find("img").attr("src","/img/"+mysrc);
3277
+ $(this).on("click", function(){
3278
+ window.open(src, '_blank');
3279
+ })
3280
+ }
3281
+
3282
+ })
3283
+ },1000)
3264
3284
  };
3265
3285
  }
3266
3286
  }); `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zet-lib",
3
- "version": "1.2.91",
3
+ "version": "1.2.93",
4
4
  "description": "zet is a library that part of zet generator.",
5
5
  "engines": {
6
6
  "node": ">=18"