Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2021-02-04 18:44:25 +01:00
commit f041e0d897
6 changed files with 13 additions and 4 deletions

View File

@ -57,6 +57,9 @@ module.exports = Self => {
const entity = await models[imageCollection.model].findById(id, {
fields: ['id', imageCollection.property]
});
if (!entity) return false;
const image = await models.Image.findOne({where: {
collectionFk: collection,
name: entity[imageCollection.property]}

View File

@ -26,7 +26,7 @@
"nRefs": {
"type": "Number",
"required": true,
"default": 0
"default": 1
}
},
"relations": {

View File

@ -48,7 +48,11 @@ module.exports = Self => {
const srcFile = image.url.split('/').pop();
const dotIndex = srcFile.lastIndexOf('.');
const fileName = srcFile.substring(0, dotIndex);
let fileName = srcFile.substring(0, dotIndex);
if (dotIndex == -1)
fileName = srcFile;
const file = `${fileName}.png`;
const filePath = path.join(tempPath, file);

View File

@ -68,7 +68,8 @@
"stemMultiplier": {
"type": "number",
"description": "Multiplier"
},"image": {
},
"image": {
"type": "string",
"description": "Image"
},

View File

@ -367,6 +367,7 @@ class Controller extends Section {
notAvailables
};
this.newSMS = {
ticketId: this.ticket.id,
destinationFk: this.ticket.clientFk,
destination: phone,
message: this.$t('Product not available', params)

View File

@ -57,7 +57,7 @@ class Controller extends Descriptor {
onUploadResponse() {
const timestamp = new Date().getTime();
const src = this.$rootScope.imagePath('user', '520x520', this.worker.id);
const zoomSrc = this.$rootScope.imagePath('user', '1600x900', this.worker.id);
const zoomSrc = this.$rootScope.imagePath('user', '1600x1600', this.worker.id);
const newSrc = `${src}&t=${timestamp}`;
const newZoomSrc = `${zoomSrc}&t=${timestamp}`;