- zoom dialog immagine

This commit is contained in:
Surya Paolo
2024-02-28 23:56:23 +01:00
parent b60f0f9e34
commit 1017a3dfe2
2 changed files with 16 additions and 15 deletions

View File

@@ -25,10 +25,12 @@ const ContribtypeSchema = new Schema({
}); });
ContribtypeSchema.statics.getFieldsForSearch = function () { ContribtypeSchema.statics.getFieldsForSearch = function () {
return [{field: 'label', type: tools.FieldType.string}] return [{field: 'label', type: tools.FieldType.string}]
}; };
ContribtypeSchema.statics.executeQueryTable = function (idapp, params) { ContribtypeSchema.statics.executeQueryTable = function (idapp, params) {
params.fieldsearch = this.getFieldsForSearch(); params.fieldsearch = this.getFieldsForSearch();
return tools.executeQueryTable(this, idapp, params); return tools.executeQueryTable(this, idapp, params);
}; };

View File

@@ -1,17 +1,13 @@
const os = require('os'); const os = require('os');
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
require('../config/config'); require('../config/config');
require('../models/subscribers'); require('../models/subscribers');
const printf = require('util').format; const printf = require('util').format;
const CryptoJS = require('crypto-js'); const CryptoJS = require('crypto-js');
const Url = require('url-parse'); const Url = require('url-parse');
const { ObjectID, ObjectId } = require('mongodb'); const { ObjectID, ObjectId } = require('mongodb');
@@ -19,24 +15,13 @@ const { ObjectID, ObjectId } = require('mongodb');
const shared_consts = require('./shared_nodejs'); const shared_consts = require('./shared_nodejs');
const mongoose = require('mongoose').set('debug', false); const mongoose = require('mongoose').set('debug', false);
const Subscription = require('../models/subscribers');
const { Contribtype } = require('../models/contribtype');
const { Skill } = require('../models/skill');
const { Sector } = require('../models/sector');
const { Good } = require('../models/good');
const { SectorGood } = require('../models/sectorgood');
const server_constants = require('./server_constants'); const server_constants = require('./server_constants');
const download = require('image-downloader');
// SETTINGS WebPush Configuration // SETTINGS WebPush Configuration
const webpush = require('web-push'); const webpush = require('web-push');
const i18n = require('i18n'); const i18n = require('i18n');
const { StatusSkill } = require('../models/statusSkill');
const FILELOG = 'filelog.txt'; const FILELOG = 'filelog.txt';
const FILEEVENTS = 'logevents.txt'; const FILEEVENTS = 'logevents.txt';
@@ -731,6 +716,7 @@ module.exports = {
}, },
sendBackNotif: function (subscription, payload) { sendBackNotif: function (subscription, payload) {
const Subscription = require('../models/subscribers');
// console.log('sendBackNotif:', subscription, payload); // console.log('sendBackNotif:', subscription, payload);
@@ -764,6 +750,7 @@ module.exports = {
}, },
sendNotificationToUser: async function (userId, title, content, openUrl, openUrl2, tag, actions, id) { sendNotificationToUser: async function (userId, title, content, openUrl, openUrl2, tag, actions, id) {
const Subscription = require('../models/subscribers');
content = this.convertHTMLtoText(content); content = this.convertHTMLtoText(content);
@@ -4066,6 +4053,8 @@ module.exports = {
}, },
downloadImage(url, filepath) { downloadImage(url, filepath) {
const download = require('image-downloader');
try { try {
return download.image({ return download.image({
url, url,
@@ -4436,6 +4425,8 @@ module.exports = {
}, },
async getInCambioDiByRec(myrec) { async getInCambioDiByRec(myrec) {
const { Contribtype } = require('../models/contribtype');
const contribtype = await Contribtype.findAllIdApp(idapp); const contribtype = await Contribtype.findAllIdApp(idapp);
try { try {
@@ -4456,6 +4447,8 @@ module.exports = {
}, },
async getStatusSkillByRec(myrec, onlyifNoDiPersona) { async getStatusSkillByRec(myrec, onlyifNoDiPersona) {
const { StatusSkill } = require('../models/statusSkill');
const statusskill = await StatusSkill.findAllIdApp(idapp); const statusskill = await StatusSkill.findAllIdApp(idapp);
try { try {
@@ -4489,6 +4482,9 @@ module.exports = {
}, },
async getCategoriaSkillByRec(myrec) { async getCategoriaSkillByRec(myrec) {
const { Skill } = require('../models/skill');
const { Sector } = require('../models/sector');
const skillrec = await Skill.findAllIdApp(idapp); const skillrec = await Skill.findAllIdApp(idapp);
const sectorrec = await Sector.findAllIdApp(idapp); const sectorrec = await Sector.findAllIdApp(idapp);
@@ -4508,6 +4504,9 @@ module.exports = {
} }
}, },
async getCategoriaGoodByRec(myrec) { async getCategoriaGoodByRec(myrec) {
const { SectorGood } = require('../models/sectorgood');
// const { Good } = require('../models/good');
// const goodrec = await Good.findAllIdApp(idapp); // const goodrec = await Good.findAllIdApp(idapp);
const secgoodrec = await SectorGood.findAllIdApp(idapp); const secgoodrec = await SectorGood.findAllIdApp(idapp);