This commit is contained in:
Joan Sanchez 2021-01-04 13:50:55 +01:00
commit 062e1514c9
409 changed files with 10107 additions and 3834 deletions

6
.gitignore vendored
View File

@ -1,11 +1,7 @@
coverage coverage
node_modules node_modules
dist dist
e2e/dms/*/ storage
!e2e/dms/c4c
!e2e/dms/c81
!e2e/dms/ecc
!e2e/dms/a87
npm-debug.log npm-debug.log
.eslintcache .eslintcache
datasources.*.json datasources.*.json

14
Jenkinsfile vendored
View File

@ -71,13 +71,13 @@ pipeline {
} }
} }
} }
/* stage('Backend') { // stage('Backend') {
steps { // steps {
nodejs('node-lts') { // nodejs('node-lts') {
sh 'gulp launchBackTest --ci' // sh 'gulp launchBackTest --ci'
} // }
} // }
} */ // }
} }
} }
stage('Build') { stage('Build') {

View File

@ -8,7 +8,7 @@ Salix is also the scientific name of a beautifull tree! :)
Required applications. Required applications.
* Node.js = 12.17.0 LTS * Node.js = 14.15.1 LTS
* Docker * Docker
You will need to install globally the following items. You will need to install globally the following items.

View File

@ -1,5 +1,6 @@
const UserError = require('vn-loopback/util/user-error'); const UserError = require('vn-loopback/util/user-error');
const fs = require('fs-extra'); const fs = require('fs-extra');
const path = require('path');
module.exports = Self => { module.exports = Self => {
Self.remoteMethodCtx('updateFile', { Self.remoteMethodCtx('updateFile', {
@ -84,66 +85,46 @@ module.exports = Self => {
}; };
async function uploadNewFile(ctx, dms, myOptions) { async function uploadNewFile(ctx, dms, myOptions) {
const storageConnector = Self.app.dataSources.storage.connector;
const models = Self.app.models; const models = Self.app.models;
const TempContainer = models.TempContainer;
const DmsContainer = models.DmsContainer;
const fileOptions = {}; const fileOptions = {};
const tempContainer = await TempContainer.container('dms');
const tempContainer = await getContainer('temp'); const makeUpload = await TempContainer.upload(tempContainer.name, ctx.req, ctx.result, fileOptions);
const makeUpload = await models.Container.upload(tempContainer.name, ctx.req, ctx.result, fileOptions);
const keys = Object.values(makeUpload.files); const keys = Object.values(makeUpload.files);
const files = keys.map(file => file[0]); const files = keys.map(file => file[0]);
const file = files[0]; const uploadedFile = files[0];
if (file) { if (uploadedFile) {
const oldExtension = storageConnector.getFileExtension(dms.file); const oldExtension = DmsContainer.getFileExtension(dms.file);
const newExtension = storageConnector.getFileExtension(file.name); const newExtension = DmsContainer.getFileExtension(uploadedFile.name);
const fileName = `${dms.id}.${newExtension}`; const fileName = `${dms.id}.${newExtension}`;
try { try {
if (oldExtension != newExtension) { if (oldExtension != newExtension) {
const pathHash = storageConnector.getPathHash(dms.id); const pathHash = DmsContainer.getHash(dms.id);
await models.Container.removeFile(pathHash, dms.file); await DmsContainer.removeFile(pathHash, dms.file);
} }
} catch (err) {} } catch (err) {}
const updatedDms = await dms.updateAttributes({ const updatedDms = await dms.updateAttributes({
contentType: file.type, contentType: uploadedFile.type,
file: fileName file: fileName
}, myOptions); }, myOptions);
const pathHash = storageConnector.getPathHash(updatedDms.id); const file = await TempContainer.getFile(tempContainer.name, uploadedFile.name);
const container = await getContainer(pathHash); const srcFile = path.join(file.client.root, file.container, file.name);
const originPath = `${tempContainer.client.root}/${tempContainer.name}/${file.name}`; const pathHash = DmsContainer.getHash(updatedDms.id);
const destinationPath = `${container.client.root}/${pathHash}/${updatedDms.file}`; const dmsContainer = await DmsContainer.container(pathHash);
const dstFile = path.join(dmsContainer.client.root, pathHash, updatedDms.file);
fs.rename(originPath, destinationPath); await fs.move(srcFile, dstFile, {
overwrite: true
});
return updatedDms; return updatedDms;
} }
} }
/**
* Returns a container instance
* If doesn't exists creates a new one
*
* @param {String} name Container name
* @return {Object} Container instance
*/
async function getContainer(name) {
const models = Self.app.models;
let container;
try {
container = await models.Container.getContainer(name);
} catch (err) {
if (err.code === 'ENOENT') {
container = await models.Container.createContainer({
name: name
});
} else throw err;
}
return container;
}
}; };

View File

@ -1,5 +1,6 @@
const UserError = require('vn-loopback/util/user-error'); const UserError = require('vn-loopback/util/user-error');
const fs = require('fs-extra'); const fs = require('fs-extra');
const path = require('path');
module.exports = Self => { module.exports = Self => {
Self.remoteMethodCtx('uploadFile', { Self.remoteMethodCtx('uploadFile', {
@ -46,8 +47,9 @@ module.exports = Self => {
}); });
Self.uploadFile = async(ctx, options) => { Self.uploadFile = async(ctx, options) => {
const storageConnector = Self.app.dataSources.storage.connector;
const models = Self.app.models; const models = Self.app.models;
const TempContainer = models.TempContainer;
const DmsContainer = models.DmsContainer;
const fileOptions = {}; const fileOptions = {};
const args = ctx.args; const args = ctx.args;
@ -62,28 +64,33 @@ module.exports = Self => {
myOptions.transaction = tx; myOptions.transaction = tx;
} }
let srcFile;
try { try {
const hasWriteRole = await models.DmsType.hasWriteRole(ctx, args.dmsTypeId, myOptions); const hasWriteRole = await models.DmsType.hasWriteRole(ctx, args.dmsTypeId, myOptions);
if (!hasWriteRole) if (!hasWriteRole)
throw new UserError(`You don't have enough privileges`); throw new UserError(`You don't have enough privileges`);
// Upload file to temporary path // Upload file to temporary path
const tempContainer = await getContainer('temp'); const tempContainer = await TempContainer.container('dms');
const uploaded = await models.Container.upload(tempContainer.name, ctx.req, ctx.result, fileOptions); const uploaded = await TempContainer.upload(tempContainer.name, ctx.req, ctx.result, fileOptions);
const files = Object.values(uploaded.files).map(file => { const files = Object.values(uploaded.files).map(file => {
return file[0]; return file[0];
}); });
const addedDms = []; const addedDms = [];
for (const file of files) { for (const uploadedFile of files) {
const newDms = await createDms(ctx, file, myOptions); const newDms = await createDms(ctx, uploadedFile, myOptions);
const pathHash = storageConnector.getPathHash(newDms.id); const pathHash = DmsContainer.getHash(newDms.id);
const container = await getContainer(pathHash);
const originPath = `${tempContainer.client.root}/${tempContainer.name}/${file.name}`; const file = await TempContainer.getFile(tempContainer.name, uploadedFile.name);
const destinationPath = `${container.client.root}/${pathHash}/${newDms.file}`; srcFile = path.join(file.client.root, file.container, file.name);
await fs.rename(originPath, destinationPath); const dmsContainer = await DmsContainer.container(pathHash);
const dstFile = path.join(dmsContainer.client.root, pathHash, newDms.file);
await fs.move(srcFile, dstFile, {
overwrite: true
});
addedDms.push(newDms); addedDms.push(newDms);
} }
@ -92,13 +99,16 @@ module.exports = Self => {
return addedDms; return addedDms;
} catch (e) { } catch (e) {
if (tx) await tx.rollback(); if (tx) await tx.rollback();
if (fs.existsSync(srcFile))
await fs.unlink(srcFile);
throw e; throw e;
} }
}; };
async function createDms(ctx, file, myOptions) { async function createDms(ctx, file, myOptions) {
const models = Self.app.models; const models = Self.app.models;
const storageConnector = Self.app.dataSources.storage.connector;
const myUserId = ctx.req.accessToken.userId; const myUserId = ctx.req.accessToken.userId;
const myWorker = await models.Worker.findOne({where: {userFk: myUserId}}, myOptions); const myWorker = await models.Worker.findOne({where: {userFk: myUserId}}, myOptions);
const args = ctx.args; const args = ctx.args;
@ -115,33 +125,9 @@ module.exports = Self => {
}, myOptions); }, myOptions);
let fileName = file.name; let fileName = file.name;
const extension = storageConnector.getFileExtension(fileName); const extension = models.DmsContainer.getFileExtension(fileName);
fileName = `${newDms.id}.${extension}`; fileName = `${newDms.id}.${extension}`;
return newDms.updateAttribute('file', fileName, myOptions); return newDms.updateAttribute('file', fileName, myOptions);
} }
/**
* Returns a container instance
* If doesn't exists creates a new one
*
* @param {String} name Container name
* @return {Object} Container instance
*/
async function getContainer(name) {
const models = Self.app.models;
let container;
try {
container = await models.Container.getContainer(name);
} catch (err) {
if (err.code === 'ENOENT') {
container = await models.Container.createContainer({
name: name
});
} else throw err;
}
return container;
}
}; };

View File

@ -1,8 +1,9 @@
const UserError = require('vn-loopback/util/user-error'); const UserError = require('vn-loopback/util/user-error');
const fs = require('fs-extra'); const fs = require('fs-extra');
const path = require('path');
module.exports = Self => { module.exports = Self => {
Self.remoteMethod('download', { Self.remoteMethodCtx('download', {
description: 'Get the user image', description: 'Get the user image',
accessType: 'READ', accessType: 'READ',
accepts: [ accepts: [
@ -49,15 +50,9 @@ module.exports = Self => {
} }
}); });
Self.download = async function(collection, size, id) { Self.download = async function(ctx, collection, size, id) {
const models = Self.app.models; const models = Self.app.models;
const filter = { const filter = {where: {name: collection}};
where: {
name: collection},
include: {
relation: 'readRole'
}
};
const imageCollection = await models.ImageCollection.findOne(filter); const imageCollection = await models.ImageCollection.findOne(filter);
const entity = await models[imageCollection.model].findById(id, { const entity = await models[imageCollection.model].findById(id, {
fields: ['id', imageCollection.property] fields: ['id', imageCollection.property]
@ -69,28 +64,23 @@ module.exports = Self => {
if (!image) return false; if (!image) return false;
const imageRole = imageCollection.readRole().name; const hasReadRole = models.ImageCollection.hasReadRole(ctx, collection);
const hasRole = await models.Account.hasRole(id, imageRole); if (!hasReadRole)
if (!hasRole)
throw new UserError(`You don't have enough privileges`); throw new UserError(`You don't have enough privileges`);
let file; const container = await models.ImageContainer.getContainer(collection);
let env = process.env.NODE_ENV; const rootPath = container.client.root;
if (env && env != 'development') { const fileSrc = path.join(rootPath, collection, size);
file = { const file = {
path: `/var/lib/salix/image/${collection}/${size}/${image.name}.png`, path: `${fileSrc}/${image.name}.png`,
contentType: 'image/png', contentType: 'image/png',
name: `${image.name}.png` name: `${image.name}.png`
}; };
} else {
file = { if (!fs.existsSync(file.path)) return [];
path: `${process.cwd()}/storage/image/${collection}/${size}/${image.name}.png`,
contentType: 'image/png',
name: `${image.name}.png`
};
}
await fs.access(file.path); await fs.access(file.path);
let stream = fs.createReadStream(file.path); const stream = fs.createReadStream(file.path);
return [stream, file.contentType, `filename="${file.name}"`]; return [stream, file.contentType, `filename="${file.name}"`];
}; };
}; };

View File

@ -3,10 +3,12 @@ const app = require('vn-loopback/server/server');
describe('image download()', () => { describe('image download()', () => {
const collection = 'user'; const collection = 'user';
const size = '160x160'; const size = '160x160';
const employeeId = 1;
const ctx = {req: {accessToken: {userId: employeeId}}};
it('should return the image content-type of the user', async() => { it('should return the image content-type of the user', async() => {
const userId = 9; const userId = 9;
const image = await app.models.Image.download(collection, size, userId); const image = await app.models.Image.download(ctx, collection, size, userId);
const contentType = image[1]; const contentType = image[1];
expect(contentType).toEqual('image/png'); expect(contentType).toEqual('image/png');
@ -14,7 +16,7 @@ describe('image download()', () => {
it(`should return false if the user doesn't have image`, async() => { it(`should return false if the user doesn't have image`, async() => {
const userId = 110; const userId = 110;
const image = await app.models.Image.download(collection, size, userId); const image = await app.models.Image.download(ctx, collection, size, userId);
expect(image).toBeFalse(); expect(image).toBeFalse();
}); });

View File

@ -0,0 +1,129 @@
const app = require('vn-loopback/server/server');
describe('image upload()', () => {
describe('as buyer', () => {
const buyerId = 35;
const workerId = 106;
const itemId = 4;
it('should try to upload a file for the collection "catalog" and throw a privileges error', async() => {
const ctx = {req: {accessToken: {userId: buyerId}},
args: {
id: workerId,
collection: 'user'
}
};
let error;
try {
await app.models.Image.upload(ctx);
} catch (err) {
error = err;
}
expect(error.message).toEqual(`You don't have enough privileges`);
});
it('should call to the TempContainer upload method for the collection "catalog"', async() => {
const containerModel = app.models.TempContainer;
spyOn(containerModel, 'upload');
const ctx = {req: {accessToken: {userId: buyerId}},
args: {
id: itemId,
collection: 'catalog'
}
};
try {
await app.models.Image.upload(ctx);
} catch (err) { }
expect(containerModel.upload).toHaveBeenCalled();
});
});
describe('as marketing', () => {
const marketingId = 51;
const workerId = 106;
const itemId = 4;
it('should be able to call to the TempContainer upload method for the collection "user"', async() => {
const containerModel = app.models.TempContainer;
spyOn(containerModel, 'upload');
const ctx = {req: {accessToken: {userId: marketingId}},
args: {
id: workerId,
collection: 'user'
}
};
try {
await app.models.Image.upload(ctx);
} catch (err) { }
expect(containerModel.upload).toHaveBeenCalled();
});
it('should be able to call to the TempContainer upload method for the collection "catalog"', async() => {
const containerModel = app.models.TempContainer;
spyOn(containerModel, 'upload');
const ctx = {req: {accessToken: {userId: marketingId}},
args: {
id: itemId,
collection: 'catalog'
}
};
try {
await app.models.Image.upload(ctx);
} catch (err) { }
expect(containerModel.upload).toHaveBeenCalled();
});
});
describe('as hhrr', () => {
const hhrrId = 37;
const workerId = 106;
const itemId = 4;
it('should upload a file for the collection "user" and call to the TempContainer upload method', async() => {
const containerModel = app.models.TempContainer;
spyOn(containerModel, 'upload');
const ctx = {req: {accessToken: {userId: hhrrId}},
args: {
id: itemId,
collection: 'user'
}
};
try {
await app.models.Image.upload(ctx);
} catch (err) { }
expect(containerModel.upload).toHaveBeenCalled();
});
it('should try to upload a file for the collection "catalog" and throw a privilege error', async() => {
const ctx = {req: {accessToken: {userId: hhrrId}},
args: {
id: workerId,
collection: 'catalog'
}
};
let error;
try {
await app.models.Image.upload(ctx);
} catch (err) {
error = err;
}
expect(error.message).toEqual(`You don't have enough privileges`);
});
});
});

View File

@ -0,0 +1,70 @@
const UserError = require('vn-loopback/util/user-error');
const fs = require('fs-extra');
const path = require('path');
module.exports = Self => {
Self.remoteMethodCtx('upload', {
description: 'Uploads a file and inserts into dms model',
accessType: 'WRITE',
accepts: [
{
arg: 'id',
type: 'Number',
description: 'The entity id',
required: true
},
{
arg: 'collection',
type: 'string',
description: 'The collection name',
required: true
},
{
arg: 'fileName',
type: 'string',
description: 'The file name',
required: true
}],
returns: {
type: 'Object',
root: true
},
http: {
path: `/upload`,
verb: 'POST'
}
});
Self.upload = async ctx => {
const models = Self.app.models;
const TempContainer = models.TempContainer;
const fileOptions = {};
const args = ctx.args;
let srcFile;
try {
const hasWriteRole = await models.ImageCollection.hasWriteRole(ctx, args.collection);
if (!hasWriteRole)
throw new UserError(`You don't have enough privileges`);
if (process.env.NODE_ENV == 'test')
throw new UserError(`You can't upload images on the test instance`);
// Upload file to temporary path
const tempContainer = await TempContainer.container(args.collection);
const uploaded = await TempContainer.upload(tempContainer.name, ctx.req, ctx.result, fileOptions);
const [uploadedFile] = Object.values(uploaded.files).map(file => {
return file[0];
});
const file = await TempContainer.getFile(tempContainer.name, uploadedFile.name);
srcFile = path.join(file.client.root, file.container, file.name);
await models.Image.registerImage(args.collection, srcFile, args.fileName, args.id);
} catch (e) {
if (fs.existsSync(srcFile))
await fs.unlink(srcFile);
throw e;
}
};
};

View File

@ -17,9 +17,6 @@
"Company": { "Company": {
"dataSource": "vn" "dataSource": "vn"
}, },
"Container": {
"dataSource": "storage"
},
"Continent": { "Continent": {
"dataSource": "vn" "dataSource": "vn"
}, },
@ -35,6 +32,9 @@
"Delivery": { "Delivery": {
"dataSource": "vn" "dataSource": "vn"
}, },
"DmsContainer": {
"dataSource": "dmsStorage"
},
"Image": { "Image": {
"dataSource": "vn" "dataSource": "vn"
}, },
@ -44,12 +44,18 @@
"ImageCollectionSize": { "ImageCollectionSize": {
"dataSource": "vn" "dataSource": "vn"
}, },
"ImageContainer": {
"dataSource": "imageStorage"
},
"Language": { "Language": {
"dataSource": "vn" "dataSource": "vn"
}, },
"Province": { "Province": {
"dataSource": "vn" "dataSource": "vn"
}, },
"TempContainer": {
"dataSource": "tempStorage"
},
"UserConfig": { "UserConfig": {
"dataSource": "vn" "dataSource": "vn"
}, },

View File

@ -1,13 +0,0 @@
{
"name": "Container",
"base": "VnModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {},
"validations": [],
"relations": {},
"acls": [],
"methods": []
}

View File

@ -0,0 +1,10 @@
{
"name": "DmsContainer",
"base": "Container",
"acls": [{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}]
}

View File

@ -14,12 +14,12 @@ module.exports = Self => {
}; };
Self.getFile = async function(id) { Self.getFile = async function(id) {
const storageConnector = Self.app.dataSources.storage.connector;
const models = Self.app.models; const models = Self.app.models;
const DmsContainer = models.DmsContainer;
const dms = await Self.findById(id); const dms = await Self.findById(id);
const pathHash = storageConnector.getPathHash(dms.id); const pathHash = DmsContainer.getHash(dms.id);
try { try {
await models.Container.getFile(pathHash, dms.file); await DmsContainer.getFile(pathHash, dms.file);
} catch (e) { } catch (e) {
if (e.code != 'ENOENT') if (e.code != 'ENOENT')
throw e; throw e;
@ -30,7 +30,7 @@ module.exports = Self => {
throw error; throw error;
} }
const stream = models.Container.downloadStream(pathHash, dms.file); const stream = DmsContainer.downloadStream(pathHash, dms.file);
return [stream, dms.contentType, `filename="${dms.file}"`]; return [stream, dms.contentType, `filename="${dms.file}"`];
}; };

View File

@ -0,0 +1,64 @@
module.exports = Self => {
/**
* Checks if current user has
* read privileges over a collection
*
* @param {object} ctx - Request context
* @param {interger} name - Collection name
* @param {object} options - Query options
* @return {boolean} True for user with read privileges
*/
Self.hasReadRole = async(ctx, name, options) => {
const collection = await Self.findOne({where: {name}}, {
include: {
relation: 'readRole'
}
}, options);
return await hasRole(ctx, collection, options);
};
/**
* Checks if current user has
* write privileges over a collection
*
* @param {object} ctx - Request context
* @param {string} name - Collection name
* @param {object} options - Query options
* @return {boolean} True for user with write privileges
*/
Self.hasWriteRole = async(ctx, name, options) => {
const collection = await Self.findOne({
include: {
relation: 'writeRole'
},
where: {name}
}, options);
return await hasRole(ctx, collection, options);
};
/**
* Checks if current user has
* read or write privileges
* @param {Object} ctx - Context
* @param {Object} collection - Collection [read/write]
* @param {Object} options - Query options
*/
async function hasRole(ctx, collection, options) {
const models = Self.app.models;
const myUserId = ctx.req.accessToken.userId;
const readRole = collection.readRole() && collection.readRole().name;
const writeRole = collection.writeRole() && collection.writeRole().name;
const requiredRole = readRole || writeRole;
const hasRequiredRole = await models.Account.hasRole(myUserId, requiredRole, options);
const isRoot = await models.Account.hasRole(myUserId, 'root', options);
if (isRoot || hasRequiredRole)
return true;
return false;
}
};

View File

@ -48,7 +48,12 @@
"type": "belongsTo", "type": "belongsTo",
"model": "Role", "model": "Role",
"foreignKey": "readRoleFk" "foreignKey": "readRoleFk"
} },
"writeRole": {
"type": "belongsTo",
"model": "Role",
"foreignKey": "writeRoleFk"
}
}, },
"acls": [ "acls": [
{ {

View File

@ -0,0 +1,10 @@
{
"name": "ImageContainer",
"base": "Container",
"acls": [{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}]
}

View File

@ -4,12 +4,9 @@ const path = require('path');
module.exports = Self => { module.exports = Self => {
require('../methods/image/download')(Self); require('../methods/image/download')(Self);
require('../methods/image/upload')(Self);
Self.getPath = function() { Self.registerImage = async(collectionName, srcFilePath, fileName, entityId) => {
return '/var/lib/salix/image';
};
Self.registerImage = async(collectionName, file, srcFilePath) => {
const models = Self.app.models; const models = Self.app.models;
const tx = await Self.beginTransaction({}); const tx = await Self.beginTransaction({});
const myOptions = {transaction: tx}; const myOptions = {transaction: tx};
@ -33,13 +30,10 @@ module.exports = Self => {
} }
}, myOptions); }, myOptions);
const fileName = file.split('.')[0];
const rootPath = Self.getPath();
const data = { const data = {
name: fileName, name: fileName,
collectionFk: collectionName collectionFk: collectionName
}; };
const newImage = await Self.upsertWithWhere(data, { const newImage = await Self.upsertWithWhere(data, {
name: fileName, name: fileName,
collectionFk: collectionName, collectionFk: collectionName,
@ -47,7 +41,10 @@ module.exports = Self => {
}, myOptions); }, myOptions);
// Resizes and saves the image // Resizes and saves the image
const container = await models.ImageContainer.container(collectionName);
const rootPath = container.client.root;
const collectionDir = path.join(rootPath, collectionName); const collectionDir = path.join(rootPath, collectionName);
const file = `${fileName}.png`;
const dstDir = path.join(collectionDir, 'full'); const dstDir = path.join(collectionDir, 'full');
const dstFile = path.join(dstDir, file); const dstFile = path.join(dstDir, file);
@ -83,7 +80,7 @@ module.exports = Self => {
if (!model) if (!model)
throw new Error('Matching model not found'); throw new Error('Matching model not found');
const item = await model.findById(fileName, null, myOptions); const item = await model.findById(entityId, null, myOptions);
if (item) { if (item) {
await item.updateAttribute( await item.updateAttribute(
collection.property, collection.property,

View File

@ -0,0 +1,10 @@
{
"name": "TempContainer",
"base": "Container",
"acls": [{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}]
}

View File

@ -0,0 +1,2 @@
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId) VALUES ('Image', '*', 'WRITE', 'ALLOW', 'ROLE', 'employee');
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('PayDem', '*', 'READ', 'ALLOW', 'ROLE', 'employee');

View File

@ -0,0 +1,14 @@
CREATE TABLE `vn`.`entryObservation` (
id int NOT NULL AUTO_INCREMENT,
entryFk int NOT NULL,
observationTypeFk TINYINT(3) UNSIGNED,
description TEXT,
PRIMARY KEY (id),
CONSTRAINT entry_id_entryFk
FOREIGN KEY (entryFk) REFERENCES entry(id),
CONSTRAINT observationType_id_observationTypeFk
FOREIGN KEY (observationTypeFk) REFERENCES observationType(id)
);
ALTER TABLE `vn`.`entryObservation`
ADD UNIQUE INDEX `entryFk_observationTypeFk_UNIQUE` (`entryFk` ASC,`observationTypeFk` ASC);

View File

@ -0,0 +1,135 @@
-- DROP PROCEDURE `vn`.`clonTravelComplete`;
DELIMITER $$
USE `vn`$$
CREATE
DEFINER = root@`%` PROCEDURE `vn`.`travel_cloneWithEntries`(IN vTravelFk INT, IN vDateStart DATE, IN vDateEnd DATE,
IN vRef VARCHAR(255), OUT vNewTravelFk INT)
BEGIN
DECLARE vEntryNew INT;
DECLARE vDone BOOLEAN DEFAULT FALSE;
DECLARE vAuxEntryFk INT;
DECLARE vRsEntry CURSOR FOR
SELECT e.id
FROM entry e
JOIN travel t
ON t.id = e.travelFk
WHERE e.travelFk = vTravelFk;
DECLARE vRsBuy CURSOR FOR
SELECT b.*
FROM buy b
JOIN entry e
ON b.entryFk = e.id
WHERE e.travelFk = vNewTravelFk and b.entryFk=vNewTravelFk
ORDER BY e.id;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
RESIGNAL;
END;
START TRANSACTION;
INSERT INTO travel (shipped,landed, warehouseInFk, warehouseOutFk, agencyFk, ref, isDelivered, isReceived, m3, kg)
SELECT vDateStart, vDateEnd,warehouseInFk, warehouseOutFk, agencyFk, vRef, isDelivered, isReceived, m3, kg
FROM travel
WHERE id = vTravelFk;
SET vNewTravelFk = LAST_INSERT_ID();
SET vDone = FALSE;
OPEN vRsEntry ;
FETCH vRsEntry INTO vAuxEntryFk;
WHILE NOT vDone DO
INSERT INTO entry (supplierFk,
ref,
isInventory,
isConfirmed,
isOrdered,
isRaid,
commission,
created,
evaNotes,
travelFk,
currencyFk,
companyFk,
gestDocFk,
invoiceInFk)
SELECT supplierFk,
ref,
isInventory,
isConfirmed,
isOrdered,
isRaid,
commission,
created,
evaNotes,
vNewTravelFk,
currencyFk,
companyFk,
gestDocFk,
invoiceInFk
FROM entry
WHERE id = vAuxEntryFk;
SET vEntryNew = LAST_INSERT_ID();
INSERT INTO buy (entryFk,
itemFk,
quantity,
buyingValue,
packageFk,
stickers,
freightValue,
packageValue,
comissionValue,
packing,
`grouping`,
groupingMode,
location,
price1,
price2,
price3,
minPrice,
producer,
printedStickers,
isChecked,
weight)
SELECT vEntryNew,
itemFk,
quantity,
buyingValue,
packageFk,
stickers,
freightValue,
packageValue,
comissionValue,
packing,
`grouping`,
groupingMode,
location,
price1,
price2,
price3,
minPrice,
producer,
printedStickers,
isChecked,
weight
FROM buy
WHERE entryFk = vAuxEntryFk;
FETCH vRsEntry INTO vAuxEntryFk;
END WHILE;
CLOSE vRsEntry;
COMMIT;
END;$$
DELIMITER ;

View File

@ -0,0 +1,18 @@
CREATE TABLE `vn`.`zoneLog` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`originFk` int(10) NOT NULL,
`userFk` int(10) unsigned DEFAULT NULL,
`action` set('insert','update','delete') COLLATE utf8_unicode_ci NOT NULL,
`creationDate` timestamp NULL DEFAULT current_timestamp(),
`description` text CHARACTER SET utf8 DEFAULT NULL,
`changedModel` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`oldInstance` text COLLATE utf8_unicode_ci DEFAULT NULL,
`newInstance` text COLLATE utf8_unicode_ci DEFAULT NULL,
`changedModelId` int(11) DEFAULT NULL,
`changedModelValue` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `originFk` (`originFk`),
KEY `userFk` (`userFk`),
CONSTRAINT `zoneLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `vn`.`zone` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `zoneLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

View File

@ -0,0 +1,13 @@
INSERT INTO account.role (id, name, description)
VALUES
(74, 'userPhotos', 'Privilegios para subir fotos de usuario'),
(75, 'catalogPhotos', 'Privilegios para subir fotos del catálogo');
INSERT INTO account.roleInherit (role, inheritsFrom)
VALUES
(37, (SELECT id FROM account.role WHERE name = 'userPhotos')),
(51, (SELECT id FROM account.role WHERE name = 'userPhotos')),
(51, (SELECT id FROM account.role WHERE name = 'catalogPhotos')),
(35, (SELECT id FROM account.role WHERE name = 'catalogPhotos'));
CALL account.role_sync();

View File

@ -0,0 +1,27 @@
ALTER TABLE `hedera`.`imageCollection`
ADD writeRoleFk INT UNSIGNED NULL DEFAULT 1;
ALTER TABLE `hedera`.`imageCollection`
ADD CONSTRAINT role_id_writeRoleFk
FOREIGN KEY (writeRoleFk) REFERENCES account.role (id)
ON UPDATE CASCADE;
ALTER TABLE `hedera`.`imageCollection` modify readRoleFk INT UNSIGNED default 1 null;
ALTER TABLE `hedera`.`imageCollection`
ADD CONSTRAINT role_id_readRoleFk
FOREIGN KEY (readRoleFk) REFERENCES account.role (id)
ON UPDATE CASCADE;
UPDATE hedera.imageCollection t SET t.writeRoleFk = (
SELECT id FROM `account`.`role` WHERE name = 'catalogPhotos'
)
WHERE t.name = 'catalog';
UPDATE hedera.imageCollection t SET t.writeRoleFk = (
SELECT id FROM `account`.`role` WHERE name = 'userPhotos'
)
WHERE t.name = 'user';
UPDATE hedera.imageCollection t SET t.writeRoleFk = 9
WHERE t.name IN ('link', 'news');

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,7 @@ UPDATE `account`.`role` SET id = 100 WHERE id = 0;
CALL `account`.`role_sync`; CALL `account`.`role_sync`;
INSERT INTO `account`.`user`(`id`,`name`, `nickname`, `password`,`role`,`active`,`email`, `lang`, `image`) INSERT INTO `account`.`user`(`id`,`name`, `nickname`, `password`,`role`,`active`,`email`, `lang`, `image`)
SELECT id, name, CONCAT(name, 'Nick'),MD5('nightmare'), id, 1, CONCAT(name, '@mydomain.com'), 'en', 'e7723f0b24ff05b32ed09d95196f2f29' SELECT id, name, CONCAT(name, 'Nick'),MD5('nightmare'), id, 1, CONCAT(name, '@mydomain.com'), 'en', '4fa3ada0-3ac4-11eb-9ab8-27f6fc3b85fd'
FROM `account`.`role` WHERE id <> 20 FROM `account`.`role` WHERE id <> 20
ORDER BY id; ORDER BY id;
@ -92,6 +92,13 @@ INSERT INTO `vn`.`worker`(`id`, `code`, `firstName`, `lastName`, `userFk`,`bossF
(109, 'HLK', 'Bruce' , 'Banner', 109, 19, 432978109), (109, 'HLK', 'Bruce' , 'Banner', 109, 19, 432978109),
(110, 'JJJ', 'Jessica' , 'Jones' , 110, 19, 432978110); (110, 'JJJ', 'Jessica' , 'Jones' , 110, 19, 432978110);
INSERT INTO `vn`.`currency`(`id`, `code`, `name`, `ratio`)
VALUES
(1, 'EUR', 'Euro', 1),
(2, 'USD', 'Dollar USA', 1.4),
(3, 'GBP', 'Libra', 1),
(4, 'JPY', 'Yen Japones', 1);
INSERT INTO `vn`.`country`(`id`, `country`, `isUeeMember`, `code`, `currencyFk`, `ibanLength`, `continentFk`) INSERT INTO `vn`.`country`(`id`, `country`, `isUeeMember`, `code`, `currencyFk`, `ibanLength`, `continentFk`)
VALUES VALUES
(1, 'España', 1, 'ES', 1, 24, 4), (1, 'España', 1, 'ES', 1, 24, 4),
@ -141,25 +148,23 @@ INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `isPrinted`, `priority`, `park
('GVC', '1', '0', '1', '0', '106'), ('GVC', '1', '0', '1', '0', '106'),
('HEJ', '2', '0', '1', '0', '106'); ('HEJ', '2', '0', '1', '0', '106');
INSERT INTO `vn`.`accountingType`(`id`, `description`, `receiptDescription`) INSERT INTO `vn`.`accountingType`(`id`, `description`, `receiptDescription`,`code`)
VALUES VALUES
(1, 'Digital money', ''), (1, 'CC y Polizas de crédito', NULL, NULL),
(2, 'Cash', 'Cash'), (2, 'Caja registradora', NULL, NULL),
(3, 'Card', 'Pay on receipt'), (3, 'Tarjeta de credito', NULL, NULL),
(4, 'Stolen Money', ''), (4, 'Lineas de financiacion', NULL, NULL),
(5, 'Miscellaneous', ''); (5, 'Otros productos', NULL, NULL),
(6, 'Prestamos', NULL, NULL),
INSERT INTO `vn`.`currency`(`id`, `code`, `name`, `ratio`) (7, 'Leasing', NULL, NULL),
VALUES (8, 'Compensaciones', NULL, NULL),
(1, 'EUR', 'Euro', 1), (9, 'Cash', 'Cash', NULL),
(2, 'USD', 'Dollar USA', 1.4), (10, 'Card', 'Pay on receipt', NULL);
(3, 'GBP', 'Libra', 1),
(4, 'JPY', 'Yen Japones', 1);
INSERT INTO `vn`.`bank`(`id`, `bank`, `account`, `cash`, `entityFk`, `isActive`, `currencyFk`) INSERT INTO `vn`.`bank`(`id`, `bank`, `account`, `cash`, `entityFk`, `isActive`, `currencyFk`)
VALUES VALUES
(1, 'Pay on receipt', '0000000000', 3, 0, 1, 1), (1, 'Pay on receipt', '0000000000', 10, 0, 1, 1),
(2, 'Cash', '1111111111', 2, 0, 1, 1); (2, 'Cash', '1111111111', 9, 0, 1, 1);
INSERT INTO `vn`.`deliveryMethod`(`id`, `code`, `description`) INSERT INTO `vn`.`deliveryMethod`(`id`, `code`, `description`)
VALUES VALUES
@ -442,13 +447,13 @@ INSERT INTO `vn`.`supplierAccount`(`id`, `supplierFk`, `iban`, `bankEntityFk`)
VALUES VALUES
(241, 442, 'ES111122333344111122221111', 128); (241, 442, 'ES111122333344111122221111', 128);
INSERT INTO `vn`.`company`(`id`, `code`, `supplierAccountFk`, `workerManagerFk`, `companyCode`, `sage200Company`, `expired`) INSERT INTO `vn`.`company`(`id`, `code`, `supplierAccountFk`, `workerManagerFk`, `companyCode`, `sage200Company`, `expired`, `phytosanitary`)
VALUES VALUES
(69 , 'CCs', NULL, 30, NULL, 0, NULL), (69 , 'CCs', NULL, 30, NULL, 0, NULL, NULL),
(442 , 'VNL', 241, 30, 2 , 1, NULL), (442 , 'VNL', 241, 30, 2 , 1, NULL, 'VNL Company - Plant passport'),
(567 , 'VNH', NULL, 30, NULL, 4, NULL), (567 , 'VNH', NULL, 30, NULL, 4, NULL, 'VNH Company - Plant passport'),
(791 , 'FTH', NULL, 30, NULL, 3, '2015-11-30'), (791 , 'FTH', NULL, 30, NULL, 3, '2015-11-30', NULL),
(1381, 'ORN', NULL, 30, NULL, 7, NULL); (1381, 'ORN', NULL, 30, NULL, 7, NULL, 'ORN Company - Plant passport');
INSERT INTO `vn`.`invoiceOut`(`id`, `serial`, `amount`, `issued`,`clientFk`, `created`, `companyFk`, `dued`, `booked`, `bankFk`, `hasPdf`) INSERT INTO `vn`.`invoiceOut`(`id`, `serial`, `amount`, `issued`,`clientFk`, `created`, `companyFk`, `dued`, `booked`, `bankFk`, `hasPdf`)
VALUES VALUES
@ -767,23 +772,23 @@ INSERT INTO `vn`.`intrastat`(`id`, `description`, `taxClassFk`, `taxCodeFk`)
INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `isOnOffer`, `expenceFk`, `isBargain`, `comment`, `relevancy`, `image`, `taxClassFk`, `subName`, `minPrice`) INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `isOnOffer`, `expenceFk`, `isBargain`, `comment`, `relevancy`, `image`, `taxClassFk`, `subName`, `minPrice`)
VALUES VALUES
(1, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 67, 1, NULL, 0), (1, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '1', 1, NULL, 0),
(2, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 66, 1, NULL, 0), (2, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '2', 1, NULL, 0),
(3, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 65, 1, NULL, 0), (3, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, '3', 1, NULL, 0),
(4, 1, 60, 'YEL', 1, 1, 'Increases block', 1, 05080000, 1, 4751000000, 0, NULL, 0, 69, 2, NULL, 0), (4, 1, 60, 'YEL', 1, 1, 'Increases block', 1, 05080000, 1, 4751000000, 0, NULL, 0, '4', 2, NULL, 0),
(5, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 74, 2, NULL, 0), (5, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, '5', 2, NULL, 0),
(6, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 62, 2, NULL, 0), (6, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '6', 2, NULL, 0),
(7, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 64, 2, NULL, 0), (7, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '7', 2, NULL, 0),
(8, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 75, 1, NULL, 0), (8, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '8', 1, NULL, 0),
(9, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 76, 1, NULL, 0), (9, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '9', 1, NULL, 0),
(10, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 77, 1, NULL, 0), (10, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, '10', 1, NULL, 0),
(11, 1, 60, 'YEL', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, 78, 2, NULL, 0), (11, 1, 60, 'YEL', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, '11', 2, NULL, 0),
(12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 82, 2, NULL, 0), (12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, '12', 2, NULL, 0),
(13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 83, 2, NULL, 0), (13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '13', 2, NULL, 0),
(14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 84, 2, NULL, 0), (14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', 2, NULL, 0),
(15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 88, 2, NULL, 0), (15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', 2, NULL, 0),
(16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 88, 2, NULL, 0), (16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', 2, NULL, 0),
(71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, 88, 2, NULL, 0); (71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, '', 2, NULL, 0);
INSERT INTO `vn`.`priceFixed`(`id`, `itemFk`, `rate0`, `rate1`, `rate2`, `rate3`, `started`, `ended`, `bonus`, `warehouseFk`, `created`) INSERT INTO `vn`.`priceFixed`(`id`, `itemFk`, `rate0`, `rate1`, `rate2`, `rate3`, `started`, `ended`, `bonus`, `warehouseFk`, `created`)
VALUES VALUES
@ -1633,7 +1638,7 @@ INSERT INTO `vn`.`orderTicket`(`orderFk`, `ticketFk`)
INSERT INTO `vn`.`userConfig` (`userFk`, `warehouseFk`, `companyFk`) INSERT INTO `vn`.`userConfig` (`userFk`, `warehouseFk`, `companyFk`)
VALUES VALUES
(1, 2, 69), (1, 1, 69),
(5, 1, 442), (5, 1, 442),
(9, 1, 442), (9, 1, 442),
(18, 3, 567); (18, 3, 567);
@ -1753,16 +1758,16 @@ INSERT INTO `postgresql`.`calendar_employee` (`business_id`, `calendar_state_id`
(106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -11 DAY), DATE_ADD(CURDATE(), INTERVAL 11 DAY))), (106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -11 DAY), DATE_ADD(CURDATE(), INTERVAL 11 DAY))),
(106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -12 DAY), DATE_ADD(CURDATE(), INTERVAL 12 DAY))), (106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -12 DAY), DATE_ADD(CURDATE(), INTERVAL 12 DAY))),
(106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -20 DAY), DATE_ADD(CURDATE(), INTERVAL 20 DAY))), (106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -20 DAY), DATE_ADD(CURDATE(), INTERVAL 20 DAY))),
(106, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -13 DAY), DATE_ADD(CURDATE(), INTERVAL 13 DAY))), (106, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -13 DAY), DATE_ADD(CURDATE(), INTERVAL 8 DAY))),
(106, 1, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -14 DAY), DATE_ADD(CURDATE(), INTERVAL 14 DAY))), (106, 1, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -14 DAY), DATE_ADD(CURDATE(), INTERVAL 9 DAY))),
(106, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -15 DAY), DATE_ADD(CURDATE(), INTERVAL 15 DAY))), (106, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -15 DAY), DATE_ADD(CURDATE(), INTERVAL 7 DAY))),
(107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -10 DAY), DATE_ADD(CURDATE(), INTERVAL 10 DAY))), (107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -10 DAY), DATE_ADD(CURDATE(), INTERVAL 10 DAY))),
(107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -11 DAY), DATE_ADD(CURDATE(), INTERVAL 11 DAY))), (107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -11 DAY), DATE_ADD(CURDATE(), INTERVAL 11 DAY))),
(107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -12 DAY), DATE_ADD(CURDATE(), INTERVAL 12 DAY))), (107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -12 DAY), DATE_ADD(CURDATE(), INTERVAL 12 DAY))),
(107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -20 DAY), DATE_ADD(CURDATE(), INTERVAL 20 DAY))), (107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -20 DAY), DATE_ADD(CURDATE(), INTERVAL 20 DAY))),
(107, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -13 DAY), DATE_ADD(CURDATE(), INTERVAL 13 DAY))), (107, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -13 DAY), DATE_ADD(CURDATE(), INTERVAL 8 DAY))),
(107, 1, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -14 DAY), DATE_ADD(CURDATE(), INTERVAL 14 DAY))), (107, 1, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -14 DAY), DATE_ADD(CURDATE(), INTERVAL 9 DAY))),
(107, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -15 DAY), DATE_ADD(CURDATE(), INTERVAL 15 DAY))); (107, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -15 DAY), DATE_ADD(CURDATE(), INTERVAL 7 DAY)));
INSERT INTO `vn`.`smsConfig` (`id`, `uri`, `title`) INSERT INTO `vn`.`smsConfig` (`id`, `uri`, `title`)
VALUES VALUES
@ -2150,7 +2155,7 @@ INSERT INTO `vn`.`campaign`(`code`, `dated`)
INSERT INTO `hedera`.`image`(`collectionFk`, `name`) INSERT INTO `hedera`.`image`(`collectionFk`, `name`)
VALUES VALUES
('user', 'e7723f0b24ff05b32ed09d95196f2f29'); ('user', '4fa3ada0-3ac4-11eb-9ab8-27f6fc3b85fd');
INSERT INTO `hedera`.`imageCollectionSize`(`id`, `collectionFk`,`width`, `height`) INSERT INTO `hedera`.`imageCollectionSize`(`id`, `collectionFk`,`width`, `height`)
VALUES VALUES

File diff suppressed because it is too large Load Diff

View File

@ -69,6 +69,8 @@ TABLES=(
imageCollection imageCollection
tpvError tpvError
tpvResponse tpvResponse
imageCollectionSize
) )
dump_tables ${TABLES[@]} dump_tables ${TABLES[@]}

View File

@ -300,9 +300,14 @@ let actions = {
}, },
waitForNumberOfElements: async function(selector, count) { waitForNumberOfElements: async function(selector, count) {
return await this.waitForFunction((selector, count) => { try {
return document.querySelectorAll(selector).length == count; await this.waitForFunction((selector, count) => {
}, {}, selector, count); return document.querySelectorAll(selector).length == count;
}, {}, selector, count);
} catch (error) {
const amount = await this.countElement(selector);
throw new Error(`actual amount of elements was: ${amount} instead of ${count}, ${error}`);
}
}, },
waitForClassNotPresent: async function(selector, className) { waitForClassNotPresent: async function(selector, className) {

View File

@ -636,7 +636,7 @@ export default {
orderSummary: { orderSummary: {
id: 'vn-order-summary vn-one:nth-child(1) > vn-label-value:nth-child(1) span', id: 'vn-order-summary vn-one:nth-child(1) > vn-label-value:nth-child(1) span',
alias: 'vn-order-summary vn-one:nth-child(1) > vn-label-value:nth-child(2) span', alias: 'vn-order-summary vn-one:nth-child(1) > vn-label-value:nth-child(2) span',
consignee: 'vn-order-summary vn-one:nth-child(2) > vn-label-value:nth-child(3) span', consignee: 'vn-order-summary vn-one:nth-child(2) > vn-label-value:nth-child(6) span',
subtotal: 'vn-order-summary vn-one.taxes > p:nth-child(1)', subtotal: 'vn-order-summary vn-one.taxes > p:nth-child(1)',
vat: 'vn-order-summary vn-one.taxes > p:nth-child(2)', vat: 'vn-order-summary vn-one.taxes > p:nth-child(2)',
total: 'vn-order-summary vn-one.taxes > p:nth-child(3)', total: 'vn-order-summary vn-one.taxes > p:nth-child(3)',
@ -663,7 +663,7 @@ export default {
client: 'vn-autocomplete[label="Client"]', client: 'vn-autocomplete[label="Client"]',
address: 'vn-autocomplete[label="Address"]', address: 'vn-autocomplete[label="Address"]',
agency: 'vn-autocomplete[label="Agency"]', agency: 'vn-autocomplete[label="Agency"]',
observation: 'vn-textarea[label="Observation"]', observation: 'vn-textarea[label="Notes"]',
saveButton: `button[type=submit]`, saveButton: `button[type=submit]`,
acceptButton: '.vn-confirm.shown button[response="accept"]' acceptButton: '.vn-confirm.shown button[response="accept"]'
}, },
@ -674,7 +674,14 @@ export default {
confirmButton: '.vn-confirm.shown button[response="accept"]', confirmButton: '.vn-confirm.shown button[response="accept"]',
}, },
routeIndex: { routeIndex: {
addNewRouteButton: 'vn-route-index a[ui-sref="route.create"]' anyResult: 'vn-table a',
firstRouteCheckbox: 'a:nth-child(1) vn-td:nth-child(1) > vn-check',
addNewRouteButton: 'vn-route-index a[ui-sref="route.create"]',
cloneButton: 'vn-route-index button > vn-icon[icon="icon-clone"]',
submitClonationButton: 'tpl-buttons > button[response="accept"]',
openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]',
searchAgencyAutocomlete: 'vn-route-search-panel vn-autocomplete[ng-model="filter.agencyModeFk"]',
advancedSearchButton: 'vn-route-search-panel button[type=submit]',
}, },
createRouteView: { createRouteView: {
worker: 'vn-route-create vn-autocomplete[ng-model="$ctrl.route.workerFk"]', worker: 'vn-route-create vn-autocomplete[ng-model="$ctrl.route.workerFk"]',
@ -824,10 +831,11 @@ export default {
firstSearchResult: 'vn-travel-index vn-tbody > a:nth-child(1)' firstSearchResult: 'vn-travel-index vn-tbody > a:nth-child(1)'
}, },
travelExtraCommunity: { travelExtraCommunity: {
firstTravelReference: 'vn-travel-extra-community > vn-data-viewer div > vn-tbody > vn-tr > vn-td-editable', anySearchResult: 'vn-travel-extra-community > vn-data-viewer div > vn-tbody > vn-tr',
firstTravelReference: 'vn-travel-extra-community vn-card:nth-child(1) vn-td-editable',
removeContinentFilter: 'vn-searchbar > form > vn-textfield > div.container > div.prepend > prepend > div > span:nth-child(3) > vn-icon > i' removeContinentFilter: 'vn-searchbar > form > vn-textfield > div.container > div.prepend > prepend > div > span:nth-child(3) > vn-icon > i'
}, },
travelBasicDada: { travelBasicData: {
reference: 'vn-travel-basic-data vn-textfield[ng-model="$ctrl.travel.ref"]', reference: 'vn-travel-basic-data vn-textfield[ng-model="$ctrl.travel.ref"]',
agency: 'vn-travel-basic-data vn-autocomplete[ng-model="$ctrl.travel.agencyModeFk"]', agency: 'vn-travel-basic-data vn-autocomplete[ng-model="$ctrl.travel.agencyModeFk"]',
deliveryDate: 'vn-travel-basic-data vn-date-picker[ng-model="$ctrl.travel.landed"]', deliveryDate: 'vn-travel-basic-data vn-date-picker[ng-model="$ctrl.travel.landed"]',
@ -856,7 +864,18 @@ export default {
travelDescriptor: { travelDescriptor: {
filterByAgencyButton: 'vn-descriptor-content .quicklinks > div:nth-child(1) > vn-quick-link > a[vn-tooltip="All travels with current agency"]', filterByAgencyButton: 'vn-descriptor-content .quicklinks > div:nth-child(1) > vn-quick-link > a[vn-tooltip="All travels with current agency"]',
dotMenu: 'vn-travel-descriptor vn-icon-button[icon="more_vert"]', dotMenu: 'vn-travel-descriptor vn-icon-button[icon="more_vert"]',
dotMenuClone: '#clone' dotMenuClone: '#clone',
dotMenuCloneWithEntries: '#cloneWithEntries',
acceptClonation: 'tpl-buttons > button[response="accept"]'
},
travelCreate: {
reference: 'vn-travel-create vn-textfield[ng-model="$ctrl.travel.ref"]',
agency: 'vn-travel-create vn-autocomplete[ng-model="$ctrl.travel.agencyModeFk"]',
shipped: 'vn-travel-create vn-date-picker[ng-model="$ctrl.travel.shipped"]',
landed: 'vn-travel-create vn-date-picker[ng-model="$ctrl.travel.landed"]',
warehouseOut: 'vn-travel-create vn-autocomplete[ng-model="$ctrl.travel.warehouseOutFk"]',
warehouseIn: 'vn-travel-create vn-autocomplete[ng-model="$ctrl.travel.warehouseInFk"]',
saveButton: 'vn-travel-create vn-submit[label="Save"]'
}, },
zoneIndex: { zoneIndex: {
searchResult: 'vn-zone-index a.vn-tr', searchResult: 'vn-zone-index a.vn-tr',
@ -920,6 +939,14 @@ export default {
newEntryCompany: 'vn-entry-create vn-autocomplete[ng-model="$ctrl.entry.companyFk"]', newEntryCompany: 'vn-entry-create vn-autocomplete[ng-model="$ctrl.entry.companyFk"]',
saveNewEntry: 'vn-entry-create button[type="submit"]' saveNewEntry: 'vn-entry-create button[type="submit"]'
}, },
entryObservations: {
addNewObservation: 'vn-entry-observation vn-icon-button[icon="add_circle"]',
firstObservationType: 'vn-entry-observation vn-horizontal:nth-child(1) > vn-autocomplete[ng-model="observation.observationTypeFk"]',
secondObservationType: 'vn-entry-observation vn-horizontal:nth-child(2) > vn-autocomplete[ng-model="observation.observationTypeFk"]',
firstObservationDescription: 'vn-entry-observation vn-horizontal:nth-child(1) > vn-textfield[ng-model="observation.description"]',
secondObservationDescription: 'vn-entry-observation vn-horizontal:nth-child(2) > vn-textfield[ng-model="observation.description"]',
saveObservationsButton: 'vn-entry-observation vn-submit > button'
},
supplierSummary: { supplierSummary: {
header: 'vn-supplier-summary > vn-card > h5', header: 'vn-supplier-summary > vn-card > h5',
basicDataId: 'vn-supplier-summary vn-label-value[label="Id"]', basicDataId: 'vn-supplier-summary vn-label-value[label="Id"]',
@ -960,5 +987,11 @@ export default {
province: 'vn-supplier-fiscal-data vn-autocomplete[ng-model="$ctrl.supplier.provinceFk"]', province: 'vn-supplier-fiscal-data vn-autocomplete[ng-model="$ctrl.supplier.provinceFk"]',
country: 'vn-supplier-fiscal-data vn-autocomplete[ng-model="$ctrl.supplier.countryFk"]', country: 'vn-supplier-fiscal-data vn-autocomplete[ng-model="$ctrl.supplier.countryFk"]',
saveButton: 'vn-supplier-fiscal-data button[type="submit"]', saveButton: 'vn-supplier-fiscal-data button[type="submit"]',
},
supplierBillingData: {
payMethod: 'vn-supplier-billing-data vn-autocomplete[ng-model="$ctrl.supplier.payMethodFk"]',
payDem: 'vn-supplier-billing-data vn-autocomplete[ng-model="$ctrl.supplier.payDemFk"]',
payDay: 'vn-supplier-billing-data vn-input-number[ng-model="$ctrl.supplier.payDay"]',
saveButton: 'vn-supplier-billing-data button[type=submit]'
} }
}; };

View File

@ -27,13 +27,6 @@ describe('Client create path', () => {
await page.waitForState('client.create'); await page.waitForState('client.create');
}); });
it('should receive an error when clicking the create button having all the form fields empty', async() => {
await page.waitToClick(selectors.createClientView.createButton);
const message = await page.waitForSnackbar();
expect(message.text).toContain('Some fields are invalid');
});
it('should receive an error when clicking the create button having name and Business name fields empty', async() => { it('should receive an error when clicking the create button having name and Business name fields empty', async() => {
await page.write(selectors.createClientView.taxNumber, '74451390E'); await page.write(selectors.createClientView.taxNumber, '74451390E');
await page.write(selectors.createClientView.userName, 'CaptainMarvel'); await page.write(selectors.createClientView.userName, 'CaptainMarvel');

View File

@ -200,7 +200,7 @@ describe('Client Edit fiscalData path', () => {
it('should confirm the sageTransaction have been edited', async() => { it('should confirm the sageTransaction have been edited', async() => {
const result = await page.waitToGetProperty(selectors.clientFiscalData.sageTransaction, 'value'); const result = await page.waitToGetProperty(selectors.clientFiscalData.sageTransaction, 'value');
expect(result).toEqual('Regularización de inversiones'); expect(result).toEqual('36: Regularización de inversiones');
}); });
it('should confirm the transferor have been edited', async() => { it('should confirm the transferor have been edited', async() => {

View File

@ -71,7 +71,7 @@ describe('User config', () => {
expect(expectedLocalWarehouse).toBeTruthy(); expect(expectedLocalWarehouse).toBeTruthy();
expect(expectedLocalBank).toBeTruthy(); expect(expectedLocalBank).toBeTruthy();
expect(expectedLocalCompany).toBeTruthy(); expect(expectedLocalCompany).toBeTruthy();
expect(userWarehouse).toEqual('Warehouse Two'); expect(userWarehouse).toEqual('Warehouse One');
expect(userCompany).toEqual('CCs'); expect(userCompany).toEqual('CCs');
}); });

View File

@ -20,6 +20,7 @@ describe('Client credit insurance path', () => {
}); });
it('should open the create a new credit contract form', async() => { it('should open the create a new credit contract form', async() => {
await page.waitForTimeout(1000);
await page.waitToClick(selectors.clientCreditInsurance.addNewContract); await page.waitToClick(selectors.clientCreditInsurance.addNewContract);
await page.waitForState('client.card.creditInsurance.create'); await page.waitForState('client.card.creditInsurance.create');
}); });

View File

@ -54,7 +54,8 @@ describe('Item edit tax path', () => {
expect(firstVatType).toEqual('Reduced VAT'); expect(firstVatType).toEqual('Reduced VAT');
}); });
it(`should now click the undo changes button and see the changes works`, async() => { // # #2680 Undo changes button bugs
xit(`should now click the undo changes button and see the form is restored`, async() => {
await page.waitToClick(selectors.itemTax.undoChangesButton); await page.waitToClick(selectors.itemTax.undoChangesButton);
const firstVatType = await page.waitToGetProperty(selectors.itemTax.firstClass, 'value'); const firstVatType = await page.waitToGetProperty(selectors.itemTax.firstClass, 'value');

View File

@ -16,14 +16,6 @@ describe('Item descriptor path', () => {
await browser.close(); await browser.close();
}); });
it('should check the descriptor inactive icon is dark as the item is active', async() => {
await page.waitForSelector(selectors.itemDescriptor.inactiveIcon);
await page.waitForClassNotPresent(selectors.itemDescriptor.inactiveIcon, 'bright');
const darkIcon = await page.isVisible(selectors.itemDescriptor.inactiveIcon);
expect(darkIcon).toBeTruthy();
});
it('should set the item to inactive', async() => { it('should set the item to inactive', async() => {
await page.waitToClick(selectors.itemBasicData.isActiveCheckbox); await page.waitToClick(selectors.itemBasicData.isActiveCheckbox);
await page.waitToClick(selectors.itemBasicData.submitBasicDataButton); await page.waitToClick(selectors.itemBasicData.submitBasicDataButton);
@ -32,12 +24,11 @@ describe('Item descriptor path', () => {
expect(message.text).toContain('Data saved!'); expect(message.text).toContain('Data saved!');
}); });
it('should reload the section and check the inactive icon is bright', async() => { it('should reload the section and check the inactive icon is visible', async() => {
await page.reloadSection('item.card.basicData'); await page.reloadSection('item.card.basicData');
await page.waitForClassPresent(selectors.itemDescriptor.inactiveIcon, 'bright'); const visibleIcon = await page.isVisible(selectors.itemDescriptor.inactiveIcon);
const brightIcon = await page.isVisible(selectors.itemDescriptor.inactiveIcon);
expect(brightIcon).toBeTruthy(); expect(visibleIcon).toBeTruthy();
}); });
it('should set the item back to active', async() => { it('should set the item back to active', async() => {

View File

@ -397,6 +397,5 @@ describe('Ticket Edit sale path', () => {
it(`should check the ticket is deleted`, async() => { it(`should check the ticket is deleted`, async() => {
await page.waitForSelector(selectors.ticketDescriptor.isDeletedIcon); await page.waitForSelector(selectors.ticketDescriptor.isDeletedIcon);
await page.waitForClassPresent(selectors.ticketDescriptor.isDeletedIcon, 'bright');
}); });
}); });

View File

@ -24,13 +24,6 @@ describe('Ticket Create new tracking state path', () => {
await page.waitForState('ticket.card.tracking.edit'); await page.waitForState('ticket.card.tracking.edit');
}); });
it(`should attempt create a new state but receive an error if state is empty`, async() => {
await page.waitToClick(selectors.createStateView.saveStateButton);
const message = await page.waitForSnackbar();
expect(message.text).toContain('State cannot be blank');
});
it(`should create a new state`, async() => { it(`should create a new state`, async() => {
await page.autocompleteSearch(selectors.createStateView.state, '¿Fecha?'); await page.autocompleteSearch(selectors.createStateView.state, '¿Fecha?');
await page.waitToClick(selectors.createStateView.saveStateButton); await page.waitToClick(selectors.createStateView.saveStateButton);

View File

@ -56,7 +56,7 @@ describe('Ticket descriptor path', () => {
await page.write(selectors.ticketsIndex.topbarSearch, '18'); await page.write(selectors.ticketsIndex.topbarSearch, '18');
await page.waitToClick(selectors.globalItems.searchButton); await page.waitToClick(selectors.globalItems.searchButton);
await page.waitForState('ticket.card.summary'); await page.waitForState('ticket.card.summary');
await page.waitForClassPresent(selectors.ticketDescriptor.isDeletedIcon, 'bright'); await page.isVisible(selectors.ticketDescriptor.isDeletedIcon);
const result = await page.waitToGetProperty(selectors.ticketsIndex.searchResultDate, 'innerText'); const result = await page.waitToGetProperty(selectors.ticketsIndex.searchResultDate, 'innerText');
expect(result).toContain(2000); expect(result).toContain(2000);
@ -73,10 +73,6 @@ describe('Ticket descriptor path', () => {
expect(message.text).toContain('Data saved!'); expect(message.text).toContain('Data saved!');
}); });
it('should make sure the ticketDeleted icon is no longer bright', async() => {
await page.waitForClassNotPresent(selectors.ticketDescriptor.isDeletedIcon, 'bright');
});
}); });
describe('Add stowaway', () => { describe('Add stowaway', () => {

View File

@ -1,7 +1,7 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer'; import getBrowser from '../../helpers/puppeteer';
describe('claim Summary path', () => { describe('Claim summary path', () => {
let browser; let browser;
let page; let page;
const claimId = '4'; const claimId = '4';

View File

@ -1,7 +1,7 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer'; import getBrowser from '../../helpers/puppeteer';
describe('claim Descriptor path', () => { describe('Claim descriptor path', () => {
let browser; let browser;
let page; let page;
const claimId = '1'; const claimId = '1';

View File

@ -57,5 +57,37 @@ describe('Route create path', () => {
it(`should confirm the redirection to the created route summary`, async() => { it(`should confirm the redirection to the created route summary`, async() => {
await page.waitForState('route.card.summary'); await page.waitForState('route.card.summary');
}); });
it(`should navigate back to the route index`, async() => {
await page.waitToClick(selectors.globalItems.returnToModuleIndexButton);
await page.waitForState('route.index');
});
let count;
it(`should count the amount of routes before clonation`, async() => {
await page.waitForFunction(selector => {
return document.querySelectorAll(selector).length > 6;
}, {}, selectors.routeIndex.anyResult);
count = await page.countElement(selectors.routeIndex.anyResult);
expect(count).toBeGreaterThanOrEqual(7);
});
it(`should clone the first route`, async() => {
await page.waitForTimeout(1000); // needs time for the index to show all items
await page.waitToClick(selectors.routeIndex.firstRouteCheckbox);
await page.waitToClick(selectors.routeIndex.cloneButton);
await page.waitToClick(selectors.routeIndex.submitClonationButton);
const message = await page.waitForSnackbar();
expect(message.text).toContain('Data saved!');
});
it(`should reload the section and count the amount of routes after clonation`, async() => {
await page.waitForNumberOfElements(selectors.routeIndex.anyResult, count + 1);
const result = await page.countElement(selectors.routeIndex.anyResult);
expect(result).toEqual(count + 1);
});
}); });
}); });

View File

@ -38,7 +38,7 @@ describe('Travel thermograph path', () => {
it('should select the file to upload', async() => { it('should select the file to upload', async() => {
let currentDir = process.cwd(); let currentDir = process.cwd();
let filePath = `${currentDir}/e2e/dms/ecc/3.jpeg`; let filePath = `${currentDir}/storage/dms/ecc/3.jpeg`;
const [fileChooser] = await Promise.all([ const [fileChooser] = await Promise.all([
page.waitForFileChooser(), page.waitForFileChooser(),

View File

@ -25,31 +25,32 @@ describe('Travel basic data path', () => {
const lastMonth = new Date(); const lastMonth = new Date();
lastMonth.setMonth(lastMonth.getMonth() - 1); lastMonth.setMonth(lastMonth.getMonth() - 1);
await page.pickDate(selectors.travelBasicDada.deliveryDate, lastMonth); await page.pickDate(selectors.travelBasicData.deliveryDate, lastMonth);
await page.waitToClick(selectors.travelBasicDada.save); await page.waitToClick(selectors.travelBasicData.save);
const message = await page.waitForSnackbar(); const message = await page.waitForSnackbar();
expect(message.text).toContain('Landing cannot be lesser than shipment'); expect(message.text).toContain('Landing cannot be lesser than shipment');
}); });
it('should undo the changes', async() => { it('should undo the changes', async() => {
await page.waitToClick(selectors.travelBasicDada.undoChanges); await page.clearInput(selectors.travelBasicData.reference);
await page.waitToClick(selectors.travelBasicDada.save); await page.write(selectors.travelBasicData.reference, 'totally pointless ref');
const message = await page.waitForSnackbar(); await page.waitToClick(selectors.travelBasicData.undoChanges);
const result = await page.waitToGetProperty(selectors.travelBasicData.reference, 'value');
expect(message.text).toContain('No changes to save'); expect(result).toEqual('third travel');
}); });
it('should now edit the whole form then save', async() => { it('should now edit the whole form then save', async() => {
await page.clearInput(selectors.travelBasicDada.reference); await page.clearInput(selectors.travelBasicData.reference);
await page.write(selectors.travelBasicDada.reference, 'new reference!'); await page.write(selectors.travelBasicData.reference, 'new reference!');
await page.waitForTimeout(2000); await page.waitForTimeout(2000);
await page.autocompleteSearch(selectors.travelBasicDada.agency, 'Entanglement'); await page.autocompleteSearch(selectors.travelBasicData.agency, 'Entanglement');
await page.autocompleteSearch(selectors.travelBasicDada.outputWarehouse, 'Warehouse Three'); await page.autocompleteSearch(selectors.travelBasicData.outputWarehouse, 'Warehouse Three');
await page.autocompleteSearch(selectors.travelBasicDada.inputWarehouse, 'Warehouse Four'); await page.autocompleteSearch(selectors.travelBasicData.inputWarehouse, 'Warehouse Four');
await page.waitToClick(selectors.travelBasicDada.delivered); await page.waitToClick(selectors.travelBasicData.delivered);
await page.waitToClick(selectors.travelBasicDada.received); await page.waitToClick(selectors.travelBasicData.received);
await page.waitToClick(selectors.travelBasicDada.save); await page.waitToClick(selectors.travelBasicData.save);
const message = await page.waitForSnackbar(); const message = await page.waitForSnackbar();
expect(message.text).toContain('Data saved!'); expect(message.text).toContain('Data saved!');
@ -57,35 +58,35 @@ describe('Travel basic data path', () => {
it('should reload the section and check the reference was saved', async() => { it('should reload the section and check the reference was saved', async() => {
await page.reloadSection('travel.card.basicData'); await page.reloadSection('travel.card.basicData');
const result = await page.waitToGetProperty(selectors.travelBasicDada.reference, 'value'); const result = await page.waitToGetProperty(selectors.travelBasicData.reference, 'value');
expect(result).toEqual('new reference!'); expect(result).toEqual('new reference!');
}); });
it('should check the agency was saved', async() => { it('should check the agency was saved', async() => {
const result = await page.waitToGetProperty(selectors.travelBasicDada.agency, 'value'); const result = await page.waitToGetProperty(selectors.travelBasicData.agency, 'value');
expect(result).toEqual('Entanglement'); expect(result).toEqual('Entanglement');
}); });
it('should check the output warehouse date was saved', async() => { it('should check the output warehouse date was saved', async() => {
const result = await page.waitToGetProperty(selectors.travelBasicDada.outputWarehouse, 'value'); const result = await page.waitToGetProperty(selectors.travelBasicData.outputWarehouse, 'value');
expect(result).toEqual('Warehouse Three'); expect(result).toEqual('Warehouse Three');
}); });
it('should check the input warehouse date was saved', async() => { it('should check the input warehouse date was saved', async() => {
const result = await page.waitToGetProperty(selectors.travelBasicDada.inputWarehouse, 'value'); const result = await page.waitToGetProperty(selectors.travelBasicData.inputWarehouse, 'value');
expect(result).toEqual('Warehouse Four'); expect(result).toEqual('Warehouse Four');
}); });
it(`should check the delivered checkbox was saved even tho it doesn't make sense`, async() => { it(`should check the delivered checkbox was saved even tho it doesn't make sense`, async() => {
await page.waitForClassPresent(selectors.travelBasicDada.delivered, 'checked'); await page.waitForClassPresent(selectors.travelBasicData.delivered, 'checked');
}); });
it(`should check the received checkbox was saved even tho it doesn't make sense`, async() => { it(`should check the received checkbox was saved even tho it doesn't make sense`, async() => {
await page.waitForClassPresent(selectors.travelBasicDada.received, 'checked'); await page.waitForClassPresent(selectors.travelBasicData.received, 'checked');
}); });
it('should navigate to the travel logs', async() => { it('should navigate to the travel logs', async() => {

View File

@ -42,4 +42,48 @@ describe('Travel descriptor path', () => {
expect(state).toBe('travel.create'); expect(state).toBe('travel.create');
}); });
it('should edit the data to clone and then get redirected to the cloned travel basic data', async() => {
await page.clearInput(selectors.travelCreate.reference);
await page.write(selectors.travelCreate.reference, 'reference');
await page.autocompleteSearch(selectors.travelCreate.agency, 'entanglement');
await page.pickDate(selectors.travelCreate.shipped);
await page.pickDate(selectors.travelCreate.landed);
await page.autocompleteSearch(selectors.travelCreate.warehouseOut, 'warehouse one');
await page.autocompleteSearch(selectors.travelCreate.warehouseIn, 'warehouse two');
await page.waitToClick(selectors.travelCreate.saveButton);
await page.waitForState('travel.card.basicData');
const message = await page.waitForSnackbar();
expect(message.text).toContain('Data saved!');
});
it('should atempt to clone the travel and its entries using the descriptor menu but receive an error', async() => {
await page.waitToClick(selectors.travelDescriptor.dotMenu);
await page.waitToClick(selectors.travelDescriptor.dotMenuCloneWithEntries);
await page.waitToClick(selectors.travelDescriptor.acceptClonation);
const message = await page.waitForSnackbar();
expect(message.text).toContain('A travel with this data already exists');
});
it('should update the landed date to a future date to enable cloneWithEntries', async() => {
const nextMonth = new Date();
nextMonth.setMonth(nextMonth.getMonth() + 1);
await page.pickDate(selectors.travelBasicData.deliveryDate, nextMonth);
await page.waitToClick(selectors.travelBasicData.save);
await page.waitForState('travel.card.basicData');
const message = await page.waitForSnackbar();
expect(message.text).toContain('Data saved!');
});
it('should navigate to the summary and then clone the travel and its entries using the descriptor menu to get redirected to the cloned travel basic data', async() => {
await page.waitToClick('vn-icon[icon="preview"]'); // summary icon
await page.waitForState('travel.card.summary');
await page.waitToClick(selectors.travelDescriptor.dotMenu);
await page.waitToClick(selectors.travelDescriptor.dotMenuCloneWithEntries);
await page.waitToClick(selectors.travelDescriptor.acceptClonation);
await page.waitForState('travel.card.basicData');
});
}); });

View File

@ -18,6 +18,7 @@ describe('Travel extra community path', () => {
it('should edit the travel reference', async() => { it('should edit the travel reference', async() => {
await page.waitToClick(selectors.travelExtraCommunity.removeContinentFilter); await page.waitToClick(selectors.travelExtraCommunity.removeContinentFilter);
await page.waitForSpinnerLoad();
await page.writeOnEditableTD(selectors.travelExtraCommunity.firstTravelReference, 'edited reference'); await page.writeOnEditableTD(selectors.travelExtraCommunity.firstTravelReference, 'edited reference');
}); });

View File

@ -0,0 +1,66 @@
import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
describe('Entry observations path', () => {
let browser;
let page;
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
// await page.loginAndModule('buyer', 'entry'); // access denied, awaiting role confirmation
await page.loginAndModule('developer', 'entry');
await page.accessToSearchResult('2');
await page.accessToSection('entry.card.observation');
});
afterAll(async() => {
await browser.close();
});
it(`should add two new observations of the same type then fail to save as they can't be repeated`, async() => {
await page.waitToClick(selectors.entryObservations.addNewObservation);
await page.waitToClick(selectors.entryObservations.addNewObservation);
await page.autocompleteSearch(selectors.entryObservations.firstObservationType, 'comercial');
await page.autocompleteSearch(selectors.entryObservations.secondObservationType, 'comercial');
await page.write(selectors.entryObservations.firstObservationDescription, 'first observation');
await page.write(selectors.entryObservations.secondObservationDescription, 'second observation');
await page.waitToClick(selectors.entryObservations.saveObservationsButton);
const message = await page.waitForSnackbar();
expect(message.text).toContain(`The observation type can't be repeated`);
});
it('should set the 2nd observation of a different one and successfully save both', async() => {
await page.autocompleteSearch(selectors.entryObservations.secondObservationType, 'delivery');
await page.waitToClick(selectors.entryObservations.saveObservationsButton);
const message = await page.waitForSnackbar();
expect(message.text).toContain('Data saved!');
});
it('should reload the section and make sure the first observation type was saved correctly', async() => {
await page.reloadSection('entry.card.observation');
const result = await page.waitToGetProperty(selectors.entryObservations.firstObservationType, 'value');
expect(result).toEqual('comercial');
});
it('should make sure the first observation description was saved correctly', async() => {
const result = await page.waitToGetProperty(selectors.entryObservations.firstObservationDescription, 'value');
expect(result).toEqual('first observation');
});
it('should make sure the second observation type was saved correctly', async() => {
const result = await page.waitToGetProperty(selectors.entryObservations.secondObservationType, 'value');
expect(result).toEqual('delivery');
});
it('should make sure the second observation description was saved correctly', async() => {
const result = await page.waitToGetProperty(selectors.entryObservations.secondObservationDescription, 'value');
expect(result).toEqual('second observation');
});
});

View File

@ -23,10 +23,13 @@ describe('Supplier fiscal data path', () => {
await page.clearInput(selectors.supplierFiscalData.country); await page.clearInput(selectors.supplierFiscalData.country);
await page.clearInput(selectors.supplierFiscalData.postCode); await page.clearInput(selectors.supplierFiscalData.postCode);
await page.write(selectors.supplierFiscalData.city, 'Valencia'); await page.write(selectors.supplierFiscalData.city, 'Valencia');
await page.waitForTimeout(1000); // must repeat this action twice or fails. also #2699 may be a cool solution to this.
await page.clearInput(selectors.supplierFiscalData.city);
await page.write(selectors.supplierFiscalData.city, 'Valencia');
await page.clearInput(selectors.supplierFiscalData.socialName); await page.clearInput(selectors.supplierFiscalData.socialName);
await page.write(selectors.supplierFiscalData.socialName, 'Farmer King SL'); await page.write(selectors.supplierFiscalData.socialName, 'Farmer King SL');
await page.clearInput(selectors.supplierFiscalData.taxNumber); await page.clearInput(selectors.supplierFiscalData.taxNumber);
await page.write(selectors.supplierFiscalData.taxNumber, 'invalid tax number'); await page.write(selectors.supplierFiscalData.taxNumber, 'Wrong tax number');
await page.clearInput(selectors.supplierFiscalData.account); await page.clearInput(selectors.supplierFiscalData.account);
await page.write(selectors.supplierFiscalData.account, 'edited account number'); await page.write(selectors.supplierFiscalData.account, 'edited account number');
await page.autocompleteSearch(selectors.supplierFiscalData.sageWihholding, 'retencion estimacion objetiva'); await page.autocompleteSearch(selectors.supplierFiscalData.sageWihholding, 'retencion estimacion objetiva');

View File

@ -0,0 +1,52 @@
import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
describe('Supplier billing data path', () => {
let browser;
let page;
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('administrative', 'supplier');
await page.accessToSearchResult('442');
await page.accessToSection('supplier.card.billingData');
});
afterAll(async() => {
await browser.close();
});
it('should edit the billing data', async() => {
await page.autocompleteSearch(selectors.supplierBillingData.payMethod, 'PayMethod with IBAN');
await page.autocompleteSearch(selectors.supplierBillingData.payDem, '10');
await page.clearInput(selectors.supplierBillingData.payDay);
await page.write(selectors.supplierBillingData.payDay, '19');
await page.waitToClick(selectors.supplierBillingData.saveButton);
const message = await page.waitForSnackbar();
expect(message.text).toContain('Data saved!');
});
it('should reload the section', async() => {
await page.reloadSection('supplier.card.billingData');
});
it('should check the pay method was edited', async() => {
const result = await page.waitToGetProperty(selectors.supplierBillingData.payMethod, 'value');
expect(result).toEqual('PayMethod with IBAN');
});
it('should check the payDem was edited', async() => {
const result = await page.waitToGetProperty(selectors.supplierBillingData.payDem, 'value');
expect(result).toEqual('10');
});
it('should check the pay day was edited', async() => {
const result = await page.waitToGetProperty(selectors.supplierBillingData.payDay, 'value');
expect(result).toEqual('19');
});
});

View File

@ -76,6 +76,13 @@
&:hover, &:hover,
&:focus { &:focus {
outline: none; outline: none;
&.cancel {
&:hover,
&:focus {
background-color: transparent;
}
}
} }
&.round { &.round {
border-radius: 50%; border-radius: 50%;
@ -106,4 +113,14 @@
opacity: .7; opacity: .7;
cursor: initial; cursor: initial;
} }
&.cancel {
color: $color-button;
background-color: transparent;
box-shadow: none;
&:not(.disabled) {
&:hover {
color: lighten($color-button, 10%);
}
}
}
} }

View File

@ -2,6 +2,6 @@
{{::$ctrl.question}} {{::$ctrl.question}}
</tpl-body> </tpl-body>
<tpl-buttons> <tpl-buttons>
<button response="cancel" translate>Cancel</button> <input type="button" response="cancel" translate-attr="{value: 'Cancel'}">
<button response="accept" translate vn-focus>Accept</button> <button response="accept" translate>Accept</button>
</tpl-buttons> </tpl-buttons>

View File

@ -34,7 +34,6 @@
input[type="button"], input[type="button"],
input[type="submit"], input[type="submit"],
input[type="reset"] { input[type="reset"] {
@extend %clickable;
text-transform: uppercase; text-transform: uppercase;
background-color: transparent; background-color: transparent;
border: none; border: none;
@ -44,6 +43,20 @@
padding: 11px; padding: 11px;
margin: -11px; margin: -11px;
margin-left: 11px; margin-left: 11px;
&:hover,
&:focus {
color: lighten($color-button, 10%);
}
}
button {
background-color: $color-button;
color: white;
&:hover,
&:focus {
background-color: lighten($color-button, 10%);
color: white;
}
} }
} }
} }

View File

@ -7,3 +7,10 @@ vn-label-value > section {
font-size: 1.2rem font-size: 1.2rem
} }
} }
vn-label-value[no-ellipsize] > section,
vn-label-value.no-ellipsize > section {
text-overflow: '';
white-space: normal;
overflow: auto;
}

View File

@ -46,7 +46,7 @@ export function directive($timeout) {
$element.on('click', function(event) { $element.on('click', function(event) {
if (event.defaultPrevented) return; if (event.defaultPrevented) return;
let src = $attrs.zoomImage || $attrs.src; let src = $element[0].getAttribute('zoom-image') || $element[0].src;
if (src) if (src)
createContainers(src); createContainers(src);
else else

View File

@ -22,10 +22,18 @@
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-invoiceIn:before {
content: "\e960";
color: #5f5f5f;
}
.icon-invoiceOut:before {
content: "\e961";
color: #5f5f5f;
}
.icon-supplier:before { .icon-supplier:before {
content: "\e936"; content: "\e936";
} }
.icon-latestBuys:before { .icon-latestBuy:before {
content: "\e95f"; content: "\e95f";
} }
.icon-zone:before { .icon-zone:before {
@ -99,6 +107,7 @@
} }
.icon-invoices:before { .icon-invoices:before {
content: "\e91c"; content: "\e91c";
color: #5f5f5f;
} }
.icon-pets:before { .icon-pets:before {
content: "\e94e"; content: "\e94e";
@ -295,9 +304,6 @@
.icon-stowaway:before { .icon-stowaway:before {
content: "\e92c"; content: "\e92c";
} }
.icon-supplier:before {
content: "\e936";
}
.icon-tags:before { .icon-tags:before {
content: "\e937"; content: "\e937";
} }

View File

@ -35,7 +35,7 @@
<glyph unicode="&#xe919;" glyph-name="grid" d="M0 704h256v256h-256v-256zM384-64h256v256h-256v-256zM0-64h256v256h-256v-256zM0 320h256v256h-256v-256zM384 320h256v256h-256v-256zM768 960v-256h256v256h-256zM384 704h256v256h-256v-256zM768 320h256v256h-256v-256zM768-64h256v256h-256v-256z" /> <glyph unicode="&#xe919;" glyph-name="grid" d="M0 704h256v256h-256v-256zM384-64h256v256h-256v-256zM0-64h256v256h-256v-256zM0 320h256v256h-256v-256zM384 320h256v256h-256v-256zM768 960v-256h256v256h-256zM384 704h256v256h-256v-256zM768 320h256v256h-256v-256zM768-64h256v256h-256v-256z" />
<glyph unicode="&#xe91a;" glyph-name="history" d="M554.667 934.4c-260.267 0-469.333-209.067-469.333-469.333h-85.333l136.533-209.067 140.8 209.067h-85.333c0 200.533 162.133 362.667 362.667 362.667s362.667-162.133 362.667-362.667-162.133-362.667-362.667-362.667c-98.133 0-192 42.667-251.733 106.667l-72.533-72.533c85.333-85.333 200.533-136.533 332.8-136.533 260.267 0 465.067 209.067 465.067 465.067s-217.6 469.333-473.6 469.333zM503.467 674.133v-260.267l221.867-132.267 34.133 64-179.2 106.667v221.867h-76.8z" /> <glyph unicode="&#xe91a;" glyph-name="history" d="M554.667 934.4c-260.267 0-469.333-209.067-469.333-469.333h-85.333l136.533-209.067 140.8 209.067h-85.333c0 200.533 162.133 362.667 362.667 362.667s362.667-162.133 362.667-362.667-162.133-362.667-362.667-362.667c-98.133 0-192 42.667-251.733 106.667l-72.533-72.533c85.333-85.333 200.533-136.533 332.8-136.533 260.267 0 465.067 209.067 465.067 465.067s-217.6 469.333-473.6 469.333zM503.467 674.133v-260.267l221.867-132.267 34.133 64-179.2 106.667v221.867h-76.8z" />
<glyph unicode="&#xe91b;" glyph-name="disabled" d="M98.133 174.933v17.067c0 76.8 81.067 128 179.2 162.133l-179.2-179.2zM247.467 42.667h678.4v149.333c0 110.933-183.467 179.2-328.533 200.533l-349.867-349.867zM686.933 763.733c-38.4 55.467-102.4 89.6-174.933 89.6-115.2 0-209.067-89.6-209.067-204.8 0-68.267 38.4-132.267 98.133-170.667l285.867 285.867zM0-4.267l59.733-59.733 964.267 964.267-59.733 59.733-964.267-964.267z" /> <glyph unicode="&#xe91b;" glyph-name="disabled" d="M98.133 174.933v17.067c0 76.8 81.067 128 179.2 162.133l-179.2-179.2zM247.467 42.667h678.4v149.333c0 110.933-183.467 179.2-328.533 200.533l-349.867-349.867zM686.933 763.733c-38.4 55.467-102.4 89.6-174.933 89.6-115.2 0-209.067-89.6-209.067-204.8 0-68.267 38.4-132.267 98.133-170.667l285.867 285.867zM0-4.267l59.733-59.733 964.267 964.267-59.733 59.733-964.267-964.267z" />
<glyph unicode="&#xe91c;" glyph-name="invoices" d="M345.6 174.933h-89.6v102.4h81.067c4.267 34.133 8.533 68.267 21.333 102.4h-102.4v102.4h162.133c34.133 42.667 72.533 76.8 119.467 102.4h-281.6v102.4h520.533v-55.467c4.267 0 12.8 0 17.067 0 42.667 0 85.333-4.267 128-17.067v243.2c0 55.467-46.933 102.4-102.4 102.4h-622.933c-55.467 0-102.4-46.933-102.4-102.4v-819.2c0-55.467 46.933-102.4 102.4-102.4h302.933c-81.067 55.467-136.533 140.8-153.6 238.933zM942.933 119.467l85.333-81.067c-25.6-34.133-59.733-59.733-102.4-76.8s-85.333-25.6-136.533-25.6c-46.933 0-93.867 8.533-132.267 25.6s-76.8 42.667-106.667 72.533c-29.867 29.867-51.2 68.267-64 110.933h-93.867v68.267h81.067c0 4.267 0 12.8 0 21.333s0 17.067 0 21.333h-81.067v68.267h93.867c12.8 42.667 34.133 76.8 64 110.933 29.867 29.867 64 55.467 106.667 72.533s85.333 25.6 132.267 25.6c51.2 0 93.867-8.533 136.533-25.6s76.8-42.667 102.4-76.8l-85.333-81.067c-38.4 46.933-89.6 68.267-145.067 68.267-38.4 0-68.267-8.533-98.133-25.6s-51.2-38.4-68.267-68.267h209.067v-68.267h-230.4c0-4.267 0-12.8 0-21.333s0-17.067 0-21.333h230.4v-68.267h-209.067c17.067-29.867 38.4-51.2 68.267-68.267s59.733-25.6 98.133-25.6c55.467 0 102.4 21.333 145.067 68.267z" /> <glyph unicode="&#xe91c;" glyph-name="invoices" d="M320 576h341.333c12.8 0 21.333 8.533 21.333 21.333s-8.533 21.333-21.333 21.333h-341.333c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333zM320 469.333h341.333c12.8 0 21.333 8.533 21.333 21.333s-8.533 21.333-21.333 21.333h-341.333c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333zM320 358.4h128c12.8 0 21.333 8.533 21.333 21.333s-8.533 21.333-21.333 21.333h-128c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333zM917.333 960h-682.667c-59.733 0-106.667-46.933-106.667-106.667v-682.667c0-12.8 8.533-21.333 21.333-21.333s21.333 8.533 21.333 21.333v682.667c0 34.133 29.867 64 64 64h597.333c-12.8-17.067-21.333-38.4-21.333-64v-810.667c0-34.133-29.867-64-64-64s-64 29.867-64 64v42.667c0 12.8-8.533 21.333-21.333 21.333h-640c-12.8 0-21.333-8.533-21.333-21.333v-42.667c0-59.733 46.933-106.667 106.667-106.667h640c59.733 0 106.667 46.933 106.667 106.667v810.667c0 34.133 29.867 64 64 64s64-29.867 64-64v-42.667h-64c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333h85.333c12.8 0 21.333 8.533 21.333 21.333v64c0 59.733-46.933 106.667-106.667 106.667zM42.667 42.667v21.333h597.333v-21.333c0-25.6 8.533-46.933 21.333-64h-554.667c-34.133 0-64 29.867-64 64zM657.067 247.467c-12.8-8.533-25.6-12.8-42.667-12.8-12.8 0-25.6 4.267-38.4 12.8-8.533 4.267-12.8 12.8-21.333 21.333h64c4.267 0 8.533 4.267 12.8 4.267 0 0 4.267 4.267 4.267 12.8 0 4.267 0 8.533-4.267 12.8 0 0-4.267 4.267-12.8 4.267h-72.533c0 0 0 0 0 4.267 0 0 0 4.267 0 4.267h89.6c4.267 0 8.533 4.267 12.8 4.267 4.267 4.267 4.267 8.533 4.267 12.8s0 8.533-4.267 12.8c0 0-4.267 4.267-12.8 4.267h-76.8c4.267 8.533 12.8 12.8 17.067 21.333 12.8 8.533 21.333 12.8 34.133 12.8 8.533 0 17.067 0 21.333-4.267s12.8-4.267 17.067-8.533c4.267-4.267 12.8-4.267 17.067-4.267 0 0 4.267 4.267 4.267 4.267s4.267 4.267 4.267 4.267c0 4.267 4.267 4.267 4.267 8.533s0 8.533-4.267 12.8c-8.533 8.533-17.067 12.8-29.867 17.067-17.067-4.267-46.933-4.267-72.533-17.067-12.8-4.267-25.6-12.8-34.133-25.6-8.533-8.533-12.8-21.333-17.067-29.867h-17.067c-4.267 0-8.533 0-12.8-4.267s-4.267-8.533-4.267-12.8c0-4.267 0-8.533 4.267-12.8s8.533-4.267 12.8-4.267h8.533c0 0 0-4.267 0-4.267s0 0 0-4.267h-8.533c-4.267 0-8.533 0-12.8-4.267s-4.267-8.533-4.267-12.8c0-4.267 0-8.533 4.267-12.8s8.533-4.267 12.8-4.267h12.8c4.267-12.8 8.533-21.333 17.067-34.133s21.333-21.333 34.133-25.6c12.8-4.267 25.6-8.533 42.667-8.533 25.6 0 46.933 8.533 64 21.333 8.533 8.533 8.533 12.8 8.533 21.333 0 4.267 0 8.533-4.267 12.8-8.533 4.267-12.8 4.267-21.333 0z" />
<glyph unicode="&#xe91d;" glyph-name="languaje" d="M512 960c-281.6 0-512-230.4-512-512s230.4-512 512-512c281.6 0 512 230.4 512 512s-230.4 512-512 512zM866.133 652.8h-149.333c-17.067 64-38.4 123.733-72.533 183.467 93.867-34.133 174.933-98.133 221.867-183.467zM512 857.6c42.667-59.733 76.8-128 98.133-204.8h-196.267c21.333 72.533 55.467 140.8 98.133 204.8zM115.2 345.6c-8.533 34.133-12.8 68.267-12.8 102.4s4.267 68.267 12.8 102.4h174.933c-4.267-34.133-8.533-68.267-8.533-102.4s4.267-68.267 8.533-102.4h-174.933zM157.867 243.2h149.333c17.067-64 38.4-123.733 72.533-183.467-93.867 34.133-174.933 98.133-221.867 183.467zM307.2 652.8h-149.333c51.2 85.333 128 149.333 221.867 183.467-29.867-59.733-55.467-119.467-72.533-183.467zM512 38.4c-42.667 59.733-76.8 128-98.133 204.8h196.267c-21.333-72.533-55.467-140.8-98.133-204.8zM631.467 345.6h-238.933c-4.267 34.133-8.533 68.267-8.533 102.4s4.267 68.267 8.533 102.4h238.933c4.267-34.133 8.533-68.267 8.533-102.4s-4.267-68.267-8.533-102.4zM644.267 59.733c29.867 55.467 55.467 119.467 72.533 183.467h149.333c-46.933-85.333-128-149.333-221.867-183.467zM733.867 345.6c4.267 34.133 8.533 68.267 8.533 102.4s-4.267 68.267-8.533 102.4h174.933c8.533-34.133 12.8-68.267 12.8-102.4s-4.267-68.267-12.8-102.4h-174.933z" /> <glyph unicode="&#xe91d;" glyph-name="languaje" d="M512 960c-281.6 0-512-230.4-512-512s230.4-512 512-512c281.6 0 512 230.4 512 512s-230.4 512-512 512zM866.133 652.8h-149.333c-17.067 64-38.4 123.733-72.533 183.467 93.867-34.133 174.933-98.133 221.867-183.467zM512 857.6c42.667-59.733 76.8-128 98.133-204.8h-196.267c21.333 72.533 55.467 140.8 98.133 204.8zM115.2 345.6c-8.533 34.133-12.8 68.267-12.8 102.4s4.267 68.267 12.8 102.4h174.933c-4.267-34.133-8.533-68.267-8.533-102.4s4.267-68.267 8.533-102.4h-174.933zM157.867 243.2h149.333c17.067-64 38.4-123.733 72.533-183.467-93.867 34.133-174.933 98.133-221.867 183.467zM307.2 652.8h-149.333c51.2 85.333 128 149.333 221.867 183.467-29.867-59.733-55.467-119.467-72.533-183.467zM512 38.4c-42.667 59.733-76.8 128-98.133 204.8h196.267c-21.333-72.533-55.467-140.8-98.133-204.8zM631.467 345.6h-238.933c-4.267 34.133-8.533 68.267-8.533 102.4s4.267 68.267 8.533 102.4h238.933c4.267-34.133 8.533-68.267 8.533-102.4s-4.267-68.267-8.533-102.4zM644.267 59.733c29.867 55.467 55.467 119.467 72.533 183.467h149.333c-46.933-85.333-128-149.333-221.867-183.467zM733.867 345.6c4.267 34.133 8.533 68.267 8.533 102.4s-4.267 68.267-8.533 102.4h174.933c8.533-34.133 12.8-68.267 12.8-102.4s-4.267-68.267-12.8-102.4h-174.933z" />
<glyph unicode="&#xe91e;" glyph-name="lines" d="M0 814.933h1024v-149.333h-1024v149.333zM0 524.8h1024v-149.333h-1024v149.333zM0 230.4h1024v-149.333h-1024v149.333z" /> <glyph unicode="&#xe91e;" glyph-name="lines" d="M0 814.933h1024v-149.333h-1024v149.333zM0 524.8h1024v-149.333h-1024v149.333zM0 230.4h1024v-149.333h-1024v149.333z" />
<glyph unicode="&#xe91f;" glyph-name="logout" d="M405.333 243.2l81.067-81.067 281.6 285.867-285.867 285.867-76.8-81.067 145.067-149.333h-550.4v-115.2h550.4l-145.067-145.067zM908.8 960h-793.6c-64 0-115.2-51.2-115.2-115.2v-226.133h115.2v226.133h797.867v-797.867h-797.867v230.4h-115.2v-226.133c0-64 51.2-115.2 115.2-115.2h797.867c64 0 115.2 51.2 115.2 115.2v793.6c-4.267 64-55.467 115.2-119.467 115.2z" /> <glyph unicode="&#xe91f;" glyph-name="logout" d="M405.333 243.2l81.067-81.067 281.6 285.867-285.867 285.867-76.8-81.067 145.067-149.333h-550.4v-115.2h550.4l-145.067-145.067zM908.8 960h-793.6c-64 0-115.2-51.2-115.2-115.2v-226.133h115.2v226.133h797.867v-797.867h-797.867v230.4h-115.2v-226.133c0-64 51.2-115.2 115.2-115.2h797.867c64 0 115.2 51.2 115.2 115.2v793.6c-4.267 64-55.467 115.2-119.467 115.2z" />
@ -61,7 +61,7 @@
<glyph unicode="&#xe933;" glyph-name="solclaim" d="M1024 917.333v-938.667h-938.667v68.267h234.667v51.2h38.4c8.533-4.267 17.067-4.267 29.867-4.267h298.667c42.667 0 76.8 34.133 76.8 76.8 0 0 0 0 0 0 29.867 12.8 46.933 38.4 46.933 72.533 0 0 0 0 0 0 29.867 12.8 46.933 38.4 46.933 72.533s-21.333 59.733-46.933 72.533c0 0 0 0 0 0 0 42.667-34.133 76.8-76.8 76.8h-106.667c21.333 21.333 29.867 55.467 17.067 89.6-12.8 25.6-38.4 42.667-68.267 42.667-12.8 0-21.333-4.267-34.133-8.533l-217.6-98.133v29.867h-238.933v396.8h362.667v-209.067h209.067v209.067h366.933zM0 89.6h281.6v51.2h89.6c4.267-4.267 12.8-4.267 17.067-4.267h298.667c21.333 0 34.133 12.8 34.133 34.133s-12.8 34.133-34.133 34.133h-136.533v12.8h183.467c21.333 0 34.133 12.8 34.133 29.867 0 21.333-12.8 29.867-34.133 29.867h-179.2v12.8h234.667c21.333 0 34.133 8.533 34.133 29.867s-12.8 29.867-34.133 29.867h-230.4v12.8h183.467c21.333 0 29.867 12.8 29.867 34.133s-12.8 34.133-34.133 34.133h-230.4l93.867 64c12.8 8.533 21.333 29.867 12.8 46.933s-29.867 25.6-51.2 17.067l-251.733-119.467c-4.267 0-4.267-4.267-8.533-4.267-4.267-4.267-8.533-8.533-12.8-12.8h-8.533v55.467h-281.6v-388.267z" /> <glyph unicode="&#xe933;" glyph-name="solclaim" d="M1024 917.333v-938.667h-938.667v68.267h234.667v51.2h38.4c8.533-4.267 17.067-4.267 29.867-4.267h298.667c42.667 0 76.8 34.133 76.8 76.8 0 0 0 0 0 0 29.867 12.8 46.933 38.4 46.933 72.533 0 0 0 0 0 0 29.867 12.8 46.933 38.4 46.933 72.533s-21.333 59.733-46.933 72.533c0 0 0 0 0 0 0 42.667-34.133 76.8-76.8 76.8h-106.667c21.333 21.333 29.867 55.467 17.067 89.6-12.8 25.6-38.4 42.667-68.267 42.667-12.8 0-21.333-4.267-34.133-8.533l-217.6-98.133v29.867h-238.933v396.8h362.667v-209.067h209.067v209.067h366.933zM0 89.6h281.6v51.2h89.6c4.267-4.267 12.8-4.267 17.067-4.267h298.667c21.333 0 34.133 12.8 34.133 34.133s-12.8 34.133-34.133 34.133h-136.533v12.8h183.467c21.333 0 34.133 12.8 34.133 29.867 0 21.333-12.8 29.867-34.133 29.867h-179.2v12.8h234.667c21.333 0 34.133 8.533 34.133 29.867s-12.8 29.867-34.133 29.867h-230.4v12.8h183.467c21.333 0 29.867 12.8 29.867 34.133s-12.8 34.133-34.133 34.133h-230.4l93.867 64c12.8 8.533 21.333 29.867 12.8 46.933s-29.867 25.6-51.2 17.067l-251.733-119.467c-4.267 0-4.267-4.267-8.533-4.267-4.267-4.267-8.533-8.533-12.8-12.8h-8.533v55.467h-281.6v-388.267z" />
<glyph unicode="&#xe934;" glyph-name="solunion" d="M759.467 870.4v-136.533h-601.6c0 0-128-341.333 106.667-341.333s469.333 0 469.333 0 34.133 0 34.133-34.133-8.533-98.133-8.533-98.133h-541.867c0 0-247.467 29.867-204.8 320 0 0 8.533 140.8 72.533 298.667 0 0 21.333-8.533 85.333-8.533h588.8zM853.333 25.6c64 0 85.333-8.533 85.333-8.533 64 153.6 72.533 298.667 72.533 298.667 42.667 290.133-204.8 320-204.8 320h-541.867c0 0-8.533-64-8.533-98.133s34.133-34.133 34.133-34.133 238.933 0 469.333 0 106.667-341.333 106.667-341.333h-601.6v-136.533h588.8z" /> <glyph unicode="&#xe934;" glyph-name="solunion" d="M759.467 870.4v-136.533h-601.6c0 0-128-341.333 106.667-341.333s469.333 0 469.333 0 34.133 0 34.133-34.133-8.533-98.133-8.533-98.133h-541.867c0 0-247.467 29.867-204.8 320 0 0 8.533 140.8 72.533 298.667 0 0 21.333-8.533 85.333-8.533h588.8zM853.333 25.6c64 0 85.333-8.533 85.333-8.533 64 153.6 72.533 298.667 72.533 298.667 42.667 290.133-204.8 320-204.8 320h-541.867c0 0-8.533-64-8.533-98.133s34.133-34.133 34.133-34.133 238.933 0 469.333 0 106.667-341.333 106.667-341.333h-601.6v-136.533h588.8z" />
<glyph unicode="&#xe935;" glyph-name="splur" d="M640 960l145.067-145.067-183.467-183.467 89.6-89.6 183.467 183.467 149.333-149.333v384h-384zM384 960h-384v-384l145.067 145.067 302.933-302.933v-482.133h128v537.6l-337.067 341.333 145.067 145.067z" /> <glyph unicode="&#xe935;" glyph-name="splur" d="M640 960l145.067-145.067-183.467-183.467 89.6-89.6 183.467 183.467 149.333-149.333v384h-384zM384 960h-384v-384l145.067 145.067 302.933-302.933v-482.133h128v537.6l-337.067 341.333 145.067 145.067z" />
<glyph unicode="&#xe936;" glyph-name="supplier" d="M608 755.2c0-113.108-90.259-204.8-201.6-204.8s-201.6 91.692-201.6 204.8c0 113.108 90.259 204.8 201.6 204.8s201.6-91.692 201.6-204.8zM534.4 342.4c-9.6 0-19.2 3.2-28.8 9.6-16 9.6-25.6 25.6-28.8 41.6l-12.8 54.4c-3.2 19.2 0 35.2 9.6 51.2-25.6 3.2-51.2 6.4-73.6 6.4-128-6.4-400-73.6-400-211.2v-144h582.4l-48 192zM832 192l-51.2-12.8-16 64-57.6-16 35.2-134.4c22.4-3.2 41.6-16 54.4-35.2l163.2 41.6-44.8 176-38.4-12.8-60.8-6.4 16-64zM758.4 256l51.2 12.8 60.8 16-38.4 153.6-38.4-6.4 16-54.4-41.6-9.6-16 54.4-89.6-22.4 38.4-156.8 57.6 12.8zM1014.4 108.8l-227.2-57.6c-12.8 19.2-35.2 35.2-60.8 38.4l-92.8 364.8c-3.2 16-19.2 22.4-35.2 19.2l-70.4-16 12.8-54.4 41.6 12.8 83.2-342.4c-19.2-16-25.6-35.2-25.6-57.6 0-41.6 35.2-76.8 76.8-76.8 38.4 0 70.4 25.6 73.6 60.8l227.2 57.6-3.2 51.2z" /> <glyph unicode="&#xe936;" glyph-name="supplier" d="M797.867 405.333l98.133 34.133 21.333-59.733-98.133-34.133-21.333 59.733zM1019.733 341.333c-4.267-8.533-8.533-12.8-17.067-17.067l-332.8-119.467c4.267-4.267 8.533-12.8 12.8-17.067l277.333 102.4 21.333-59.733-277.333-102.4c0-8.533 4.267-12.8 4.267-21.333 0-85.333-68.267-157.867-157.867-157.867-85.333 0-157.867 68.267-157.867 157.867 0 55.467 29.867 106.667 72.533 132.267l-217.6 610.133c-8.533 25.6-38.4 42.667-68.267 29.867l-157.867-55.467-21.333 59.733 157.867 59.733c59.733 17.067 123.733-12.8 149.333-72.533l221.867-614.4c8.533 0 12.8 0 21.333 4.267l-119.467 332.8c-4.267 17.067 4.267 34.133 17.067 38.4l136.533 51.2c0 0 0 0 0 0l115.2 42.667c0 0 0 0 0 0l136.533 51.2c8.533 4.267 17.067 4.267 25.6 0s12.8-8.533 17.067-17.067l145.067-396.8c0-4.267 0-12.8-4.267-21.333zM695.467 657.067l-59.733-21.333 8.533-21.333 59.733 21.333-8.533 21.333zM644.267 106.667c0 51.2-42.667 93.867-93.867 93.867s-93.867-42.667-93.867-93.867c0-51.2 42.667-93.867 93.867-93.867s93.867 38.4 93.867 93.867zM951.467 371.2l-119.467 332.8-76.8-29.867 17.067-51.2c4.267-8.533 4.267-17.067 0-25.6s-8.533-12.8-17.067-17.067l-115.2-42.667c-4.267 0-8.533 0-12.8 0-12.8 0-25.6 8.533-29.867 21.333l-17.067 51.2-76.8-29.867 119.467-332.8 328.533 123.733z" />
<glyph unicode="&#xe937;" glyph-name="tags" d="M729.6 960c-42.667 0-89.6 0-132.267 0-21.333 0-38.4-8.533-51.2-21.333-140.8-140.8-281.6-281.6-422.4-422.4-25.6-25.6-25.6-51.2 0-76.8 93.867-93.867 187.733-187.733 281.6-281.6 25.6-25.6 51.2-25.6 76.8 0 140.8 140.8 281.6 281.6 422.4 422.4 17.067 12.8 21.333 29.867 21.333 51.2 0 93.867 0 183.467 0 277.333 0 34.133-17.067 51.2-51.2 51.2-51.2 0-98.133 0-145.067 0zM682.667 763.733c0 25.6 17.067 46.933 42.667 46.933s46.933-21.333 46.933-46.933c0-25.6-21.333-46.933-46.933-46.933-21.333 0-42.667 21.333-42.667 46.933zM878.933 482.133c4.267-12.8 0-21.333-8.533-29.867-34.133-51.2-64-98.133-98.133-149.333-76.8-115.2-153.6-234.667-230.4-349.867-12.8-17.067-21.333-21.333-38.4-8.533-115.2 76.8-226.133 149.333-337.067 226.133-17.067 8.533-17.067 21.333-8.533 38.4 12.8 21.333 29.867 46.933 42.667 68.267 8.533 12.8 8.533 12.8 17.067 0 55.467-55.467 115.2-115.2 170.667-170.667 8.533-8.533 17.067-17.067 29.867-21.333 29.867-12.8 55.467-4.267 76.8 21.333 123.733 123.733 247.467 247.467 371.2 371.2 4.267 4.267 4.267 8.533 8.533 12.8 0-8.533 0-8.533 4.267-8.533z" /> <glyph unicode="&#xe937;" glyph-name="tags" d="M729.6 960c-42.667 0-89.6 0-132.267 0-21.333 0-38.4-8.533-51.2-21.333-140.8-140.8-281.6-281.6-422.4-422.4-25.6-25.6-25.6-51.2 0-76.8 93.867-93.867 187.733-187.733 281.6-281.6 25.6-25.6 51.2-25.6 76.8 0 140.8 140.8 281.6 281.6 422.4 422.4 17.067 12.8 21.333 29.867 21.333 51.2 0 93.867 0 183.467 0 277.333 0 34.133-17.067 51.2-51.2 51.2-51.2 0-98.133 0-145.067 0zM682.667 763.733c0 25.6 17.067 46.933 42.667 46.933s46.933-21.333 46.933-46.933c0-25.6-21.333-46.933-46.933-46.933-21.333 0-42.667 21.333-42.667 46.933zM878.933 482.133c4.267-12.8 0-21.333-8.533-29.867-34.133-51.2-64-98.133-98.133-149.333-76.8-115.2-153.6-234.667-230.4-349.867-12.8-17.067-21.333-21.333-38.4-8.533-115.2 76.8-226.133 149.333-337.067 226.133-17.067 8.533-17.067 21.333-8.533 38.4 12.8 21.333 29.867 46.933 42.667 68.267 8.533 12.8 8.533 12.8 17.067 0 55.467-55.467 115.2-115.2 170.667-170.667 8.533-8.533 17.067-17.067 29.867-21.333 29.867-12.8 55.467-4.267 76.8 21.333 123.733 123.733 247.467 247.467 371.2 371.2 4.267 4.267 4.267 8.533 8.533 12.8 0-8.533 0-8.533 4.267-8.533z" />
<glyph unicode="&#xe938;" glyph-name="tax" d="M448 192c0 174.933 145.067 320 320 320 76.8 0 145.067-25.6 196.267-68.267v324.267c4.267 51.2-38.4 98.133-93.867 98.133h-204.8c-21.333 55.467-72.533 93.867-136.533 93.867s-115.2-38.4-136.533-98.133h-209.067c-55.467 0-98.133-42.667-98.133-93.867v-674.133c0-51.2 42.667-98.133 98.133-98.133h332.8c-42.667 55.467-68.267 123.733-68.267 196.267zM529.067 861.867c29.867 0 46.933-21.333 46.933-46.933 0-29.867-25.6-46.933-46.933-46.933-29.867 0-46.933 21.333-46.933 46.933-4.267 29.867 17.067 46.933 46.933 46.933zM708.267 247.467c-8.533 0-12.8 4.267-17.067 8.533s-8.533 8.533-8.533 17.067v17.067c0 8.533 0 12.8 4.267 17.067s8.533 8.533 17.067 8.533c8.533 0 12.8-4.267 17.067-8.533s4.267-12.8 4.267-17.067v-12.8c4.267-21.333-4.267-29.867-17.067-29.867zM870.4 132.267c4.267-4.267 4.267-12.8 4.267-17.067v-21.333c0-12.8-8.533-21.333-21.333-21.333-8.533 0-12.8 4.267-17.067 8.533s-8.533 12.8-8.533 17.067v17.067c0 8.533 4.267 12.8 8.533 17.067s8.533 8.533 17.067 8.533c8.533 0 12.8-4.267 17.067-8.533zM768 448c-140.8 0-256-115.2-256-256s115.2-256 256-256 256 115.2 256 256-115.2 256-256 256zM635.733 273.067v17.067c0 21.333 4.267 34.133 17.067 46.933s29.867 17.067 51.2 17.067c21.333 0 38.4-4.267 51.2-17.067s17.067-29.867 17.067-46.933v-17.067c0-21.333-4.267-34.133-17.067-46.933s-29.867-17.067-51.2-17.067c-21.333 0-38.4 4.267-51.2 17.067-8.533 12.8-17.067 29.867-17.067 46.933zM721.067 59.733l-34.133 17.067 153.6 243.2 34.133-17.067-153.6-243.2zM925.867 98.133c0-21.333-4.267-34.133-17.067-46.933s-29.867-17.067-51.2-17.067c-21.333 0-38.4 4.267-51.2 17.067s-21.333 25.6-21.333 46.933v17.067c0 21.333 4.267 34.133 17.067 46.933s29.867 17.067 51.2 17.067c21.333 0 38.4-4.267 51.2-17.067s17.067-29.867 17.067-46.933v-17.067z" /> <glyph unicode="&#xe938;" glyph-name="tax" d="M448 192c0 174.933 145.067 320 320 320 76.8 0 145.067-25.6 196.267-68.267v324.267c4.267 51.2-38.4 98.133-93.867 98.133h-204.8c-21.333 55.467-72.533 93.867-136.533 93.867s-115.2-38.4-136.533-98.133h-209.067c-55.467 0-98.133-42.667-98.133-93.867v-674.133c0-51.2 42.667-98.133 98.133-98.133h332.8c-42.667 55.467-68.267 123.733-68.267 196.267zM529.067 861.867c29.867 0 46.933-21.333 46.933-46.933 0-29.867-25.6-46.933-46.933-46.933-29.867 0-46.933 21.333-46.933 46.933-4.267 29.867 17.067 46.933 46.933 46.933zM708.267 247.467c-8.533 0-12.8 4.267-17.067 8.533s-8.533 8.533-8.533 17.067v17.067c0 8.533 0 12.8 4.267 17.067s8.533 8.533 17.067 8.533c8.533 0 12.8-4.267 17.067-8.533s4.267-12.8 4.267-17.067v-12.8c4.267-21.333-4.267-29.867-17.067-29.867zM870.4 132.267c4.267-4.267 4.267-12.8 4.267-17.067v-21.333c0-12.8-8.533-21.333-21.333-21.333-8.533 0-12.8 4.267-17.067 8.533s-8.533 12.8-8.533 17.067v17.067c0 8.533 4.267 12.8 8.533 17.067s8.533 8.533 17.067 8.533c8.533 0 12.8-4.267 17.067-8.533zM768 448c-140.8 0-256-115.2-256-256s115.2-256 256-256 256 115.2 256 256-115.2 256-256 256zM635.733 273.067v17.067c0 21.333 4.267 34.133 17.067 46.933s29.867 17.067 51.2 17.067c21.333 0 38.4-4.267 51.2-17.067s17.067-29.867 17.067-46.933v-17.067c0-21.333-4.267-34.133-17.067-46.933s-29.867-17.067-51.2-17.067c-21.333 0-38.4 4.267-51.2 17.067-8.533 12.8-17.067 29.867-17.067 46.933zM721.067 59.733l-34.133 17.067 153.6 243.2 34.133-17.067-153.6-243.2zM925.867 98.133c0-21.333-4.267-34.133-17.067-46.933s-29.867-17.067-51.2-17.067c-21.333 0-38.4 4.267-51.2 17.067s-21.333 25.6-21.333 46.933v17.067c0 21.333 4.267 34.133 17.067 46.933s29.867 17.067 51.2 17.067c21.333 0 38.4-4.267 51.2-17.067s17.067-29.867 17.067-46.933v-17.067z" />
<glyph unicode="&#xe939;" glyph-name="ticket" d="M200.533 311.467c12.8 38.4 25.6 76.8 38.4 115.2 8.533 25.6 17.067 55.467 29.867 81.067 29.867 81.067 55.467 166.4 85.333 247.467 21.333 55.467 38.4 110.933 59.733 166.4 4.267 12.8 8.533 21.333 12.8 34.133 0 4.267 4.267 4.267 8.533 4.267 59.733-12.8 115.2-21.333 174.933-34.133 81.067-17.067 157.867-34.133 238.933-46.933 55.467-12.8 110.933-21.333 170.667-34.133 4.267-4.267 4.267-4.267 4.267-12.8-29.867-89.6-59.733-179.2-89.6-264.533-21.333-64-42.667-128-64-187.733-25.6-68.267-46.933-140.8-76.8-209.067-17.067-51.2-38.4-98.133-59.733-145.067-12.8-25.6-25.6-51.2-46.933-68.267-17.067-17.067-34.133-21.333-59.733-12.8-59.733 17.067-93.867 59.733-106.667 119.467-4.267 25.6-8.533 51.2-8.533 76.8 0 12.8 0 25.6 0 38.4s-8.533 21.333-17.067 25.6c-76.8 29.867-153.6 64-234.667 93.867-25.6 0-42.667 4.267-59.733 12.8zM554.667 550.4c-17.067 0-29.867-4.267-29.867-17.067-4.267-12.8 4.267-25.6 17.067-29.867 59.733-21.333 123.733-42.667 183.467-59.733 12.8-4.267 25.6 0 29.867 8.533 8.533 17.067 4.267 29.867-12.8 38.4-46.933 17.067-98.133 34.133-145.067 46.933-17.067 4.267-34.133 8.533-42.667 12.8zM477.867 375.467c-4.267 0-8.533 0-12.8-4.267-8.533-4.267-12.8-12.8-12.8-21.333 0-12.8 8.533-21.333 21.333-25.6 59.733-21.333 119.467-38.4 183.467-59.733 17.067-4.267 29.867 0 34.133 12.8s-4.267 25.6-17.067 29.867c-42.667 12.8-85.333 29.867-132.267 42.667-25.6 12.8-46.933 21.333-64 25.6zM806.4 631.467c21.333 0 29.867 4.267 34.133 21.333 4.267 8.533-8.533 21.333-21.333 25.6-21.333 4.267-42.667 12.8-68.267 17.067-38.4 12.8-76.8 21.333-119.467 34.133-17.067 4.267-34.133-8.533-29.867-25.6 0-12.8 12.8-17.067 25.6-21.333 42.667-12.8 89.6-25.6 132.267-38.4 17.067-4.267 34.133-8.533 46.933-12.8zM516.267 746.667c0 12.8-12.8 25.6-25.6 25.6-17.067 0-25.6-8.533-25.6-21.333s12.8-25.6 29.867-25.6c12.8-4.267 21.333 4.267 21.333 21.333zM426.667 541.867c12.8 0 25.6 8.533 25.6 21.333s-12.8 25.6-25.6 25.6c-17.067 0-29.867-8.533-25.6-21.333-4.267-12.8 4.267-25.6 25.6-25.6zM354.133 422.4c-17.067 0-25.6-8.533-25.6-25.6s12.8-25.6 29.867-25.6c12.8 0 25.6 8.533 25.6 21.333-4.267 17.067-17.067 29.867-29.867 29.867zM4.267 341.333c25.6-12.8 55.467-21.333 81.067-34.133 59.733-25.6 119.467-46.933 174.933-72.533 51.2-21.333 102.4-42.667 157.867-64 8.533-4.267 17.067-8.533 25.6-12.8s12.8-8.533 12.8-17.067c0-42.667 4.267-89.6 21.333-128 8.533-17.067 17.067-38.4 25.6-55.467-12.8 4.267-29.867 8.533-42.667 17.067-46.933 17.067-93.867 38.4-145.067 55.467-42.667 17.067-85.333 38.4-128 55.467-29.867 12.8-59.733 25.6-89.6 38.4s-55.467 38.4-72.533 64c-21.333 42.667-25.6 85.333-25.6 132.267 0 4.267 4.267 12.8 4.267 21.333z" /> <glyph unicode="&#xe939;" glyph-name="ticket" d="M200.533 311.467c12.8 38.4 25.6 76.8 38.4 115.2 8.533 25.6 17.067 55.467 29.867 81.067 29.867 81.067 55.467 166.4 85.333 247.467 21.333 55.467 38.4 110.933 59.733 166.4 4.267 12.8 8.533 21.333 12.8 34.133 0 4.267 4.267 4.267 8.533 4.267 59.733-12.8 115.2-21.333 174.933-34.133 81.067-17.067 157.867-34.133 238.933-46.933 55.467-12.8 110.933-21.333 170.667-34.133 4.267-4.267 4.267-4.267 4.267-12.8-29.867-89.6-59.733-179.2-89.6-264.533-21.333-64-42.667-128-64-187.733-25.6-68.267-46.933-140.8-76.8-209.067-17.067-51.2-38.4-98.133-59.733-145.067-12.8-25.6-25.6-51.2-46.933-68.267-17.067-17.067-34.133-21.333-59.733-12.8-59.733 17.067-93.867 59.733-106.667 119.467-4.267 25.6-8.533 51.2-8.533 76.8 0 12.8 0 25.6 0 38.4s-8.533 21.333-17.067 25.6c-76.8 29.867-153.6 64-234.667 93.867-25.6 0-42.667 4.267-59.733 12.8zM554.667 550.4c-17.067 0-29.867-4.267-29.867-17.067-4.267-12.8 4.267-25.6 17.067-29.867 59.733-21.333 123.733-42.667 183.467-59.733 12.8-4.267 25.6 0 29.867 8.533 8.533 17.067 4.267 29.867-12.8 38.4-46.933 17.067-98.133 34.133-145.067 46.933-17.067 4.267-34.133 8.533-42.667 12.8zM477.867 375.467c-4.267 0-8.533 0-12.8-4.267-8.533-4.267-12.8-12.8-12.8-21.333 0-12.8 8.533-21.333 21.333-25.6 59.733-21.333 119.467-38.4 183.467-59.733 17.067-4.267 29.867 0 34.133 12.8s-4.267 25.6-17.067 29.867c-42.667 12.8-85.333 29.867-132.267 42.667-25.6 12.8-46.933 21.333-64 25.6zM806.4 631.467c21.333 0 29.867 4.267 34.133 21.333 4.267 8.533-8.533 21.333-21.333 25.6-21.333 4.267-42.667 12.8-68.267 17.067-38.4 12.8-76.8 21.333-119.467 34.133-17.067 4.267-34.133-8.533-29.867-25.6 0-12.8 12.8-17.067 25.6-21.333 42.667-12.8 89.6-25.6 132.267-38.4 17.067-4.267 34.133-8.533 46.933-12.8zM516.267 746.667c0 12.8-12.8 25.6-25.6 25.6-17.067 0-25.6-8.533-25.6-21.333s12.8-25.6 29.867-25.6c12.8-4.267 21.333 4.267 21.333 21.333zM426.667 541.867c12.8 0 25.6 8.533 25.6 21.333s-12.8 25.6-25.6 25.6c-17.067 0-29.867-8.533-25.6-21.333-4.267-12.8 4.267-25.6 25.6-25.6zM354.133 422.4c-17.067 0-25.6-8.533-25.6-25.6s12.8-25.6 29.867-25.6c12.8 0 25.6 8.533 25.6 21.333-4.267 17.067-17.067 29.867-29.867 29.867zM4.267 341.333c25.6-12.8 55.467-21.333 81.067-34.133 59.733-25.6 119.467-46.933 174.933-72.533 51.2-21.333 102.4-42.667 157.867-64 8.533-4.267 17.067-8.533 25.6-12.8s12.8-8.533 12.8-17.067c0-42.667 4.267-89.6 21.333-128 8.533-17.067 17.067-38.4 25.6-55.467-12.8 4.267-29.867 8.533-42.667 17.067-46.933 17.067-93.867 38.4-145.067 55.467-42.667 17.067-85.333 38.4-128 55.467-29.867 12.8-59.733 25.6-89.6 38.4s-55.467 38.4-72.533 64c-21.333 42.667-25.6 85.333-25.6 132.267 0 4.267 4.267 12.8 4.267 21.333z" />
@ -103,6 +103,8 @@
<glyph unicode="&#xe95d;" glyph-name="zone" d="M243.2 448c-12.8 17.067-25.6 34.133-38.4 51.2-34.133 46.933-68.267 98.133-89.6 153.6-17.067 34.133-25.6 72.533-17.067 110.933 8.533 51.2 38.4 89.6 85.333 110.933 59.733 25.6 132.267 8.533 174.933-34.133 34.133-38.4 42.667-81.067 34.133-132.267-8.533-46.933-29.867-85.333-51.2-123.733-29.867-46.933-59.733-89.6-89.6-132.267-4.267 0-4.267 0-8.533-4.267zM247.467 823.467c-46.933 0-89.6-38.4-89.6-89.6 0-46.933 38.4-89.6 85.333-89.6s89.6 38.4 89.6 85.333c0 55.467-38.4 93.867-85.333 93.867zM490.667 379.733l-17.067 25.6 12.8 8.533-34.133 183.467c0 0 0 8.533-8.533 8.533l-42.667 4.267c0 0-68.267-110.933-157.867-217.6 4.267 4.267-93.867 110.933-132.267 187.733l-110.933-51.2c0 0-4.267 0-4.267-8.533l25.6-145.067 34.133-21.333-8.533-21.333-17.067 8.533 59.733-332.8 213.333 102.4 238.933-21.333-51.2 290.133zM149.333 285.867c-12.8 4.267-29.867 12.8-42.667 17.067 4.267 8.533 4.267 17.067 8.533 21.333 17.067 0 29.867-4.267 42.667-12.8-4.267-8.533-4.267-17.067-8.533-25.6zM256 268.8c-17.067 0-34.133 4.267-46.933 4.267 0 8.533 4.267 17.067 4.267 25.6 12.8 0 29.867-4.267 42.667-4.267 0-8.533 0-17.067 0-25.6zM315.733 277.333c-4.267 8.533-4.267 12.8-8.533 21.333 17.067 8.533 29.867 17.067 42.667 21.333 4.267-8.533 8.533-12.8 8.533-21.333-12.8-8.533-25.6-12.8-42.667-21.333zM405.333 328.533c-4.267 8.533-8.533 12.8-12.8 21.333 12.8 8.533 25.6 17.067 38.4 25.6 4.267-4.267 8.533-12.8 12.8-21.333-8.533-8.533-21.333-17.067-38.4-25.6zM972.8 460.8l-29.867 25.6 12.8 21.333 12.8-8.533-34.133 187.733c0 0 0 8.533-8.533 8.533l-226.133 17.067-209.067-93.867c0 0-8.533-4.267-4.267-12.8l29.867-170.667 21.333-12.8-17.067-17.067 55.467-307.2 213.333 102.4 234.667-21.333-51.2 281.6zM580.267 465.067c-4.267 4.267-8.533 12.8-12.8 17.067 12.8 12.8 21.333 21.333 29.867 34.133 4.267-4.267 12.8-12.8 17.067-17.067-12.8-8.533-25.6-21.333-34.133-34.133zM657.067 541.867c-4.267 4.267-8.533 12.8-12.8 21.333 12.8 8.533 25.6 17.067 38.4 25.6 8.533-8.533 12.8-17.067 12.8-21.333-12.8-8.533-25.6-17.067-38.4-25.6zM797.867 571.733c-12.8 4.267-25.6 4.267-42.667 4.267 0 8.533 0 17.067 0 25.6 17.067 0 34.133 0 51.2-4.267-4.267-8.533-4.267-17.067-8.533-25.6zM891.733 520.533c-12.8 8.533-25.6 17.067-38.4 25.6 4.267 8.533 8.533 12.8 12.8 21.333 12.8-8.533 25.6-17.067 38.4-25.6-4.267-8.533-8.533-12.8-12.8-21.333z" /> <glyph unicode="&#xe95d;" glyph-name="zone" d="M243.2 448c-12.8 17.067-25.6 34.133-38.4 51.2-34.133 46.933-68.267 98.133-89.6 153.6-17.067 34.133-25.6 72.533-17.067 110.933 8.533 51.2 38.4 89.6 85.333 110.933 59.733 25.6 132.267 8.533 174.933-34.133 34.133-38.4 42.667-81.067 34.133-132.267-8.533-46.933-29.867-85.333-51.2-123.733-29.867-46.933-59.733-89.6-89.6-132.267-4.267 0-4.267 0-8.533-4.267zM247.467 823.467c-46.933 0-89.6-38.4-89.6-89.6 0-46.933 38.4-89.6 85.333-89.6s89.6 38.4 89.6 85.333c0 55.467-38.4 93.867-85.333 93.867zM490.667 379.733l-17.067 25.6 12.8 8.533-34.133 183.467c0 0 0 8.533-8.533 8.533l-42.667 4.267c0 0-68.267-110.933-157.867-217.6 4.267 4.267-93.867 110.933-132.267 187.733l-110.933-51.2c0 0-4.267 0-4.267-8.533l25.6-145.067 34.133-21.333-8.533-21.333-17.067 8.533 59.733-332.8 213.333 102.4 238.933-21.333-51.2 290.133zM149.333 285.867c-12.8 4.267-29.867 12.8-42.667 17.067 4.267 8.533 4.267 17.067 8.533 21.333 17.067 0 29.867-4.267 42.667-12.8-4.267-8.533-4.267-17.067-8.533-25.6zM256 268.8c-17.067 0-34.133 4.267-46.933 4.267 0 8.533 4.267 17.067 4.267 25.6 12.8 0 29.867-4.267 42.667-4.267 0-8.533 0-17.067 0-25.6zM315.733 277.333c-4.267 8.533-4.267 12.8-8.533 21.333 17.067 8.533 29.867 17.067 42.667 21.333 4.267-8.533 8.533-12.8 8.533-21.333-12.8-8.533-25.6-12.8-42.667-21.333zM405.333 328.533c-4.267 8.533-8.533 12.8-12.8 21.333 12.8 8.533 25.6 17.067 38.4 25.6 4.267-4.267 8.533-12.8 12.8-21.333-8.533-8.533-21.333-17.067-38.4-25.6zM972.8 460.8l-29.867 25.6 12.8 21.333 12.8-8.533-34.133 187.733c0 0 0 8.533-8.533 8.533l-226.133 17.067-209.067-93.867c0 0-8.533-4.267-4.267-12.8l29.867-170.667 21.333-12.8-17.067-17.067 55.467-307.2 213.333 102.4 234.667-21.333-51.2 281.6zM580.267 465.067c-4.267 4.267-8.533 12.8-12.8 17.067 12.8 12.8 21.333 21.333 29.867 34.133 4.267-4.267 12.8-12.8 17.067-17.067-12.8-8.533-25.6-21.333-34.133-34.133zM657.067 541.867c-4.267 4.267-8.533 12.8-12.8 21.333 12.8 8.533 25.6 17.067 38.4 25.6 8.533-8.533 12.8-17.067 12.8-21.333-12.8-8.533-25.6-17.067-38.4-25.6zM797.867 571.733c-12.8 4.267-25.6 4.267-42.667 4.267 0 8.533 0 17.067 0 25.6 17.067 0 34.133 0 51.2-4.267-4.267-8.533-4.267-17.067-8.533-25.6zM891.733 520.533c-12.8 8.533-25.6 17.067-38.4 25.6 4.267 8.533 8.533 12.8 12.8 21.333 12.8-8.533 25.6-17.067 38.4-25.6-4.267-8.533-8.533-12.8-12.8-21.333z" />
<glyph unicode="&#xe95e;" glyph-name="inventory" d="M273.067 226.133c4.267 0 8.533 4.267 8.533 8.533v85.333h98.133v-221.867h-217.6v221.867h98.133v-81.067c0-8.533 8.533-12.8 12.8-12.8zM512 226.133c4.267 0 8.533 4.267 8.533 8.533v85.333h98.133v-221.867h-217.6v221.867h98.133v-81.067c0-8.533 8.533-12.8 12.8-12.8zM750.933 226.133c4.267 0 8.533 4.267 8.533 8.533v85.333h98.133v-221.867h-217.6v221.867h98.133v-81.067c4.267-8.533 8.533-12.8 12.8-12.8zM644.267 780.8h98.133v-81.067c0-4.267 4.267-8.533 8.533-8.533s8.533 4.267 8.533 8.533v81.067h98.133v-221.867h-217.6v221.867h4.267zM401.067 780.8h98.133v-81.067c0-4.267 4.267-8.533 8.533-8.533s8.533 4.267 8.533 8.533v81.067h98.133v-221.867h-213.333v221.867zM162.133 780.8h98.133v-81.067c0-4.267 4.267-8.533 8.533-8.533s8.533 4.267 8.533 8.533v81.067h98.133v-221.867h-213.333v221.867zM153.6 537.6h780.8v-38.4h-844.8v38.4zM68.267-42.667h-42.667v981.333h42.667v-908.8zM89.6 38.4v38.4h844.8v-38.4zM998.4-42.667h-42.667v981.333h42.667z" /> <glyph unicode="&#xe95e;" glyph-name="inventory" d="M273.067 226.133c4.267 0 8.533 4.267 8.533 8.533v85.333h98.133v-221.867h-217.6v221.867h98.133v-81.067c0-8.533 8.533-12.8 12.8-12.8zM512 226.133c4.267 0 8.533 4.267 8.533 8.533v85.333h98.133v-221.867h-217.6v221.867h98.133v-81.067c0-8.533 8.533-12.8 12.8-12.8zM750.933 226.133c4.267 0 8.533 4.267 8.533 8.533v85.333h98.133v-221.867h-217.6v221.867h98.133v-81.067c4.267-8.533 8.533-12.8 12.8-12.8zM644.267 780.8h98.133v-81.067c0-4.267 4.267-8.533 8.533-8.533s8.533 4.267 8.533 8.533v81.067h98.133v-221.867h-217.6v221.867h4.267zM401.067 780.8h98.133v-81.067c0-4.267 4.267-8.533 8.533-8.533s8.533 4.267 8.533 8.533v81.067h98.133v-221.867h-213.333v221.867zM162.133 780.8h98.133v-81.067c0-4.267 4.267-8.533 8.533-8.533s8.533 4.267 8.533 8.533v81.067h98.133v-221.867h-213.333v221.867zM153.6 537.6h780.8v-38.4h-844.8v38.4zM68.267-42.667h-42.667v981.333h42.667v-908.8zM89.6 38.4v38.4h844.8v-38.4zM998.4-42.667h-42.667v981.333h42.667z" />
<glyph unicode="&#xe95f;" glyph-name="latestBuy" d="M183.467 750.933h712.533v-38.4h-768v38.4zM89.6 64c8.533 0 12.8 0 21.333-4.267v900.267h-42.667v-900.267c8.533 4.267 12.8 4.267 21.333 4.267zM955.733 512v448h-42.667v-413.867c17.067-12.8 29.867-21.333 42.667-34.133zM145.067-8.533c0-30.633-24.833-55.467-55.467-55.467s-55.467 24.833-55.467 55.467c0 30.633 24.833 55.467 55.467 55.467s55.467-24.833 55.467-55.467zM418.133 426.667h-290.133v-38.4h273.067c4.267 17.067 8.533 29.867 17.067 38.4zM392.533 106.667h-264.533v-38.4h281.6c-8.533 12.8-12.8 25.6-17.067 38.4zM725.333 247.467c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333c12.8 0 21.333 8.533 21.333 21.333 0 8.533-12.8 21.333-21.333 21.333zM721.067 541.867c-166.4 0-298.667-136.533-298.667-302.933s132.267-302.933 298.667-302.933c166.4 0 298.667 136.533 298.667 302.933 0 170.667-132.267 302.933-298.667 302.933zM725.333 34.133c-98.133 0-174.933 72.533-187.733 162.133h-34.133l51.2 64 59.733-64h-38.4c8.533-68.267 72.533-123.733 149.333-123.733 81.067 0 149.333 64 149.333 145.067s-68.267 145.067-149.333 145.067c-68.267 0-128-46.933-145.067-110.933l-21.333 29.867-17.067-12.8c8.533 29.867 25.6 55.467 46.933 76.8l-25.6 21.333c-4.267 4.267-4.267 12.8 0 17.067l12.8 12.8c4.267 4.267 12.8 4.267 17.067 0l25.6-25.6c21.333 12.8 51.2 25.6 76.8 25.6v29.867h-8.533c-8.533 0-12.8 4.267-12.8 12.8v17.067c0 8.533 4.267 12.8 12.8 12.8h59.733c8.533 0 12.8-4.267 12.8-12.8v-17.067c0-8.533-4.267-12.8-12.8-12.8h-8.533v-21.333c29.867-4.267 55.467-12.8 81.067-29.867l34.133 29.867c4.267 4.267 12.8 4.267 17.067 0l12.8-12.8c4.267-4.267 4.267-12.8 0-17.067l-25.6-25.6c29.867-34.133 51.2-76.8 51.2-128 4.267-102.4-81.067-187.733-183.467-187.733zM772.267 226.133c0-25.6-21.333-46.933-46.933-46.933s-46.933 21.333-46.933 46.933c0 25.6 21.333 46.933 46.933 46.933 8.533 0 17.067-4.267 21.333-4.267l46.933 46.933 21.333-21.333-46.933-46.933c4.267-4.267 4.267-12.8 4.267-21.333z" /> <glyph unicode="&#xe95f;" glyph-name="latestBuy" d="M183.467 750.933h712.533v-38.4h-768v38.4zM89.6 64c8.533 0 12.8 0 21.333-4.267v900.267h-42.667v-900.267c8.533 4.267 12.8 4.267 21.333 4.267zM955.733 512v448h-42.667v-413.867c17.067-12.8 29.867-21.333 42.667-34.133zM145.067-8.533c0-30.633-24.833-55.467-55.467-55.467s-55.467 24.833-55.467 55.467c0 30.633 24.833 55.467 55.467 55.467s55.467-24.833 55.467-55.467zM418.133 426.667h-290.133v-38.4h273.067c4.267 17.067 8.533 29.867 17.067 38.4zM392.533 106.667h-264.533v-38.4h281.6c-8.533 12.8-12.8 25.6-17.067 38.4zM725.333 247.467c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333c12.8 0 21.333 8.533 21.333 21.333 0 8.533-12.8 21.333-21.333 21.333zM721.067 541.867c-166.4 0-298.667-136.533-298.667-302.933s132.267-302.933 298.667-302.933c166.4 0 298.667 136.533 298.667 302.933 0 170.667-132.267 302.933-298.667 302.933zM725.333 34.133c-98.133 0-174.933 72.533-187.733 162.133h-34.133l51.2 64 59.733-64h-38.4c8.533-68.267 72.533-123.733 149.333-123.733 81.067 0 149.333 64 149.333 145.067s-68.267 145.067-149.333 145.067c-68.267 0-128-46.933-145.067-110.933l-21.333 29.867-17.067-12.8c8.533 29.867 25.6 55.467 46.933 76.8l-25.6 21.333c-4.267 4.267-4.267 12.8 0 17.067l12.8 12.8c4.267 4.267 12.8 4.267 17.067 0l25.6-25.6c21.333 12.8 51.2 25.6 76.8 25.6v29.867h-8.533c-8.533 0-12.8 4.267-12.8 12.8v17.067c0 8.533 4.267 12.8 12.8 12.8h59.733c8.533 0 12.8-4.267 12.8-12.8v-17.067c0-8.533-4.267-12.8-12.8-12.8h-8.533v-21.333c29.867-4.267 55.467-12.8 81.067-29.867l34.133 29.867c4.267 4.267 12.8 4.267 17.067 0l12.8-12.8c4.267-4.267 4.267-12.8 0-17.067l-25.6-25.6c29.867-34.133 51.2-76.8 51.2-128 4.267-102.4-81.067-187.733-183.467-187.733zM772.267 226.133c0-25.6-21.333-46.933-46.933-46.933s-46.933 21.333-46.933 46.933c0 25.6 21.333 46.933 46.933 46.933 8.533 0 17.067-4.267 21.333-4.267l46.933 46.933 21.333-21.333-46.933-46.933c4.267-4.267 4.267-12.8 4.267-21.333z" />
<glyph unicode="&#xe960;" glyph-name="invoiceIn" d="M320 358.4h128c12.8 0 21.333 8.533 21.333 21.333s-8.533 21.333-21.333 21.333h-128c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333zM832 396.8c-8.533 0-12.8 0-21.333 4.267v-358.4c0-34.133-29.867-64-64-64s-64 29.867-64 64v42.667c0 12.8-8.533 21.333-21.333 21.333h-640c-12.8 0-21.333-8.533-21.333-21.333v-42.667c0-59.733 46.933-106.667 106.667-106.667h640c59.733 0 106.667 46.933 106.667 106.667v358.4c-8.533 0-12.8-4.267-21.333-4.267zM128-21.333h-21.333c-34.133 0-64 29.867-64 64v21.333h597.333v-21.333c0-25.6 8.533-46.933 21.333-64h-533.333zM149.333 149.333c12.8 0 21.333 8.533 21.333 21.333v682.667c0 34.133 29.867 64 64 64h597.333c-12.8-17.067-21.333-38.4-21.333-64v-68.267c8.533 0 12.8 4.267 21.333 4.267s12.8 0 21.333-4.267v68.267c0 34.133 29.867 64 64 64s64-29.867 64-64v-42.667h-64c-12.8 0-21.333-8.533-21.333-21.333 0-4.267 4.267-12.8 4.267-12.8 4.267 0 8.533-4.267 12.8-8.533 0 0 0 0 0 0h85.333c17.067 0 25.6 8.533 25.6 21.333v64c0 59.733-46.933 106.667-106.667 106.667h-682.667c-59.733 0-106.667-46.933-106.667-106.667v-682.667c0-12.8 8.533-21.333 21.333-21.333zM614.4 366.933c8.533 0 17.067 0 21.333-4.267s12.8-4.267 17.067-8.533c4.267-4.267 12.8-4.267 17.067-4.267 0 0 4.267 4.267 4.267 4.267s4.267 4.267 4.267 4.267c0 4.267 4.267 4.267 4.267 8.533s0 8.533-4.267 12.8c-8.533 8.533-17.067 12.8-29.867 17.067-21.333 8.533-51.2 8.533-76.8-4.267-12.8-4.267-25.6-12.8-34.133-25.6-8.533-8.533-12.8-21.333-17.067-29.867h-17.067c-4.267 0-8.533 0-12.8-4.267s-4.267-8.533-4.267-12.8c0-4.267 0-8.533 4.267-12.8s8.533-4.267 12.8-4.267h8.533c0 0 0-4.267 0-4.267s0 0 0-4.267h-8.533c-4.267 0-8.533 0-12.8-4.267s-4.267-8.533-4.267-12.8c0-4.267 0-8.533 4.267-12.8s8.533-4.267 12.8-4.267h12.8c4.267-12.8 8.533-21.333 17.067-34.133s21.333-21.333 34.133-25.6c12.8-4.267 25.6-8.533 42.667-8.533 25.6 0 46.933 8.533 64 21.333 8.533 8.533 8.533 12.8 8.533 21.333 0 4.267 0 8.533-4.267 12.8s-12.8 8.533-21.333 0c-12.8-8.533-25.6-12.8-42.667-12.8-12.8 0-25.6 4.267-38.4 12.8-8.533 4.267-12.8 12.8-21.333 21.333h64c4.267 0 8.533 4.267 12.8 4.267 0 0 4.267 4.267 4.267 12.8 0 4.267 0 8.533-4.267 12.8 0 0-4.267 4.267-12.8 4.267h-72.533c0 0 0 0 0 4.267 0 0 0 4.267 0 4.267h89.6c4.267 0 8.533 4.267 12.8 4.267 4.267 4.267 4.267 8.533 4.267 12.8s0 8.533-4.267 12.8c0 0-4.267 4.267-12.8 4.267h-76.8c4.267 8.533 12.8 12.8 17.067 21.333 12.8-4.267 25.6 0 38.4 0zM635.733 593.067c0 8.533 0 17.067 4.267 25.6h-320c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333h320c0 4.267-4.267 12.8-4.267 17.067zM657.067 512h-337.067c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333h341.333c8.533 0 12.8 4.267 17.067 8.533-8.533 8.533-17.067 21.333-21.333 34.133zM832 746.667c-85.333 0-153.6-68.267-153.6-153.6s68.267-153.6 153.6-153.6 153.6 68.267 153.6 153.6c0 85.333-68.267 153.6-153.6 153.6zM921.6 576h-81.067v-42.667c0-8.533-4.267-12.8-12.8-8.533l-98.133 55.467c-8.533 4.267-8.533 12.8 0 17.067l98.133 55.467c8.533 4.267 12.8 0 12.8-8.533v-42.667h81.067c8.533 0 17.067-8.533 17.067-17.067 0 0-4.267-8.533-17.067-8.533z" />
<glyph unicode="&#xe961;" glyph-name="invoiceOut" d="M320 358.4h128c12.8 0 21.333 8.533 21.333 21.333s-8.533 21.333-21.333 21.333h-128c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333zM832 396.8c-8.533 0-12.8 0-21.333 4.267v-358.4c0-34.133-29.867-64-64-64s-64 29.867-64 64v42.667c0 12.8-8.533 21.333-21.333 21.333h-640c-12.8 0-21.333-8.533-21.333-21.333v-42.667c0-59.733 46.933-106.667 106.667-106.667h640c59.733 0 106.667 46.933 106.667 106.667v358.4c-8.533 0-12.8-4.267-21.333-4.267zM128-21.333h-21.333c-34.133 0-64 29.867-64 64v21.333h597.333v-21.333c0-25.6 8.533-46.933 21.333-64h-533.333zM149.333 149.333c12.8 0 21.333 8.533 21.333 21.333v682.667c0 34.133 29.867 64 64 64h597.333c-12.8-17.067-21.333-38.4-21.333-64v-68.267c8.533 0 12.8 4.267 21.333 4.267s12.8 0 21.333-4.267v68.267c0 34.133 29.867 64 64 64s64-29.867 64-64v-42.667h-64c-12.8 0-21.333-8.533-21.333-21.333 0-4.267 4.267-12.8 4.267-12.8 4.267 0 8.533-4.267 12.8-8.533 0 0 0 0 0 0h85.333c17.067 0 25.6 8.533 25.6 21.333v64c0 59.733-46.933 106.667-106.667 106.667h-682.667c-59.733 0-106.667-46.933-106.667-106.667v-682.667c0-12.8 8.533-21.333 21.333-21.333zM614.4 366.933c8.533 0 17.067 0 21.333-4.267s12.8-4.267 17.067-8.533c4.267-4.267 12.8-4.267 17.067-4.267 0 0 4.267 4.267 4.267 4.267s4.267 4.267 4.267 4.267c0 4.267 4.267 4.267 4.267 8.533s0 8.533-4.267 12.8c-8.533 8.533-17.067 12.8-29.867 17.067-21.333 8.533-51.2 8.533-76.8-4.267-12.8-4.267-25.6-12.8-34.133-25.6-8.533-8.533-12.8-21.333-17.067-29.867h-17.067c-4.267 0-8.533 0-12.8-4.267s-4.267-8.533-4.267-12.8c0-4.267 0-8.533 4.267-12.8s8.533-4.267 12.8-4.267h8.533c0 0 0-4.267 0-4.267s0 0 0-4.267h-8.533c-4.267 0-8.533 0-12.8-4.267s-4.267-8.533-4.267-12.8c0-4.267 0-8.533 4.267-12.8s8.533-4.267 12.8-4.267h12.8c4.267-12.8 8.533-21.333 17.067-34.133s21.333-21.333 34.133-25.6c12.8-4.267 25.6-8.533 42.667-8.533 25.6 0 46.933 8.533 64 21.333 8.533 8.533 8.533 12.8 8.533 21.333 0 4.267 0 8.533-4.267 12.8s-12.8 8.533-21.333 0c-12.8-8.533-25.6-12.8-42.667-12.8-12.8 0-25.6 4.267-38.4 12.8-8.533 4.267-12.8 12.8-21.333 21.333h64c4.267 0 8.533 4.267 12.8 4.267 0 0 4.267 4.267 4.267 12.8 0 4.267 0 8.533-4.267 12.8 0 0-4.267 4.267-12.8 4.267h-72.533c0 0 0 0 0 4.267 0 0 0 4.267 0 4.267h89.6c4.267 0 8.533 4.267 12.8 4.267 4.267 4.267 4.267 8.533 4.267 12.8s0 8.533-4.267 12.8c0 0-4.267 4.267-12.8 4.267h-76.8c4.267 8.533 12.8 12.8 17.067 21.333 12.8-4.267 25.6 0 38.4 0zM635.733 593.067c0 8.533 0 17.067 4.267 25.6h-320c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333h320c0 4.267-4.267 12.8-4.267 17.067zM657.067 512h-337.067c-12.8 0-21.333-8.533-21.333-21.333s8.533-21.333 21.333-21.333h341.333c8.533 0 12.8 4.267 17.067 8.533-8.533 8.533-17.067 21.333-21.333 34.133zM832 746.667c-85.333 0-153.6-68.267-153.6-153.6s68.267-153.6 153.6-153.6 153.6 68.267 153.6 153.6c0 85.333-68.267 153.6-153.6 153.6zM934.4 584.533l-98.133-55.467c-8.533-4.267-12.8 0-12.8 8.533v38.4h-81.067c-12.8 0-17.067 8.533-17.067 17.067s8.533 17.067 17.067 17.067h81.067v42.667c0 8.533 4.267 12.8 12.8 8.533l98.133-55.467c8.533-8.533 8.533-17.067 0-21.333z" />
<glyph unicode="&#xe968;" glyph-name="wiki" d="M793.6 733.867c0 0 4.267 0 4.267 0l76.8 12.8v-42.667c0-34.133-21.333-68.267-46.933-72.533 0 0-4.267 0-4.267 0l-76.8-12.8v42.667c0 34.133 21.333 64 46.933 72.533zM742.4 597.333l38.4 4.267c12.8 0 25.6-12.8 25.6-29.867v-21.333l-38.4-4.267c-12.8 0-25.6 12.8-25.6 29.867v21.333zM618.667 699.733l68.267 8.533c25.6 4.267 42.667-21.333 42.667-55.467v-38.4l-68.267-8.533c-25.6-4.267-42.667 21.333-42.667 55.467v38.4zM665.6 588.8c4.267 0 4.267 0 0 0l59.733 4.267v-29.867c0-25.6-17.067-46.933-34.133-55.467 0 0-4.267 0-4.267 0l-55.467-8.533v29.867c4.267 29.867 17.067 51.2 34.133 59.733zM443.733 648.533c0 0-4.267 0-4.267 0-119.467 85.333-273.067 46.933-277.333 46.933s-8.533 0-12.8 8.533c0 4.267 0 8.533 8.533 12.8 0 0 42.667 12.8 98.133 8.533 51.2 0 128-12.8 196.267-59.733 4.267-4.267 4.267-8.533 4.267-12.8-4.267-4.267-8.533-4.267-12.8-4.267zM443.733 512c0 0-4.267 0-4.267 0-119.467 85.333-273.067 46.933-277.333 46.933s-8.533 0-12.8 8.533c0 4.267 0 8.533 8.533 12.8 0 0 42.667 12.8 98.133 8.533 51.2 0 128-12.8 196.267-59.733 4.267-4.267 4.267-8.533 4.267-12.8-4.267 0-8.533-4.267-12.8-4.267zM443.733 379.733c0 0-4.267 0-4.267 0-119.467 85.333-273.067 46.933-277.333 46.933s-8.533 0-12.8 8.533c0 4.267 0 8.533 8.533 12.8 0 0 42.667 12.8 98.133 8.533 51.2 0 128-12.8 196.267-59.733 4.267-4.267 4.267-8.533 4.267-12.8-4.267 0-8.533-4.267-12.8-4.267zM443.733 247.467c0 0-4.267 0-4.267 0-119.467 85.333-273.067 46.933-277.333 46.933s-8.533 0-12.8 8.533c0 4.267 0 8.533 8.533 12.8 0 0 42.667 12.8 98.133 8.533 51.2 0 128-12.8 196.267-59.733 4.267-4.267 4.267-8.533 4.267-12.8-4.267 0-8.533-4.267-12.8-4.267zM588.8 379.733c-4.267 0-4.267 0-8.533 4.267s0 8.533 4.267 12.8c68.267 46.933 140.8 59.733 196.267 59.733s93.867-8.533 98.133-8.533c4.267 0 8.533-8.533 8.533-12.8s-8.533-8.533-12.8-8.533v0c0 0-153.6 38.4-277.333-46.933-4.267 4.267-4.267 0-8.533 0zM588.8 247.467c-4.267 0-4.267 0-8.533 4.267s0 8.533 4.267 12.8c68.267 46.933 140.8 59.733 196.267 59.733s93.867-8.533 98.133-8.533c4.267 0 8.533-8.533 8.533-12.8s-8.533-8.533-12.8-8.533v0c0 0-153.6 38.4-277.333-46.933-4.267 4.267-4.267 0-8.533 0zM985.6 738.133v64l-8.533 4.267c-4.267 0-81.067 29.867-179.2 29.867-106.667 0-200.533-34.133-277.333-98.133-76.8 64-170.667 98.133-277.333 98.133-102.4 0-174.933-29.867-179.2-29.867l-12.8-4.267v-59.733c-34.133-4.267-51.2-17.067-51.2-34.133v-614.4h452.267c17.067-12.8 38.4-21.333 64-21.333s46.933 8.533 64 21.333h443.733v614.4c0 17.067-17.067 25.6-38.4 29.867v0zM512 145.067c-38.4 17.067-166.4 64-298.667 64-51.2 0-98.133-8.533-136.533-21.333v597.333c21.333 8.533 85.333 25.6 162.133 25.6 98.133 0 183.467-29.867 256-89.6v-358.4l17.067 17.067v-234.667zM955.733 183.467c-42.667 17.067-89.6 25.6-140.8 25.6-128 0-251.733-51.2-290.133-64v238.933l17.067-17.067v349.867c68.267 59.733 153.6 89.6 256 89.6 76.8 0 136.533-17.067 162.133-25.6v-597.333z" /> <glyph unicode="&#xe968;" glyph-name="wiki" d="M793.6 733.867c0 0 4.267 0 4.267 0l76.8 12.8v-42.667c0-34.133-21.333-68.267-46.933-72.533 0 0-4.267 0-4.267 0l-76.8-12.8v42.667c0 34.133 21.333 64 46.933 72.533zM742.4 597.333l38.4 4.267c12.8 0 25.6-12.8 25.6-29.867v-21.333l-38.4-4.267c-12.8 0-25.6 12.8-25.6 29.867v21.333zM618.667 699.733l68.267 8.533c25.6 4.267 42.667-21.333 42.667-55.467v-38.4l-68.267-8.533c-25.6-4.267-42.667 21.333-42.667 55.467v38.4zM665.6 588.8c4.267 0 4.267 0 0 0l59.733 4.267v-29.867c0-25.6-17.067-46.933-34.133-55.467 0 0-4.267 0-4.267 0l-55.467-8.533v29.867c4.267 29.867 17.067 51.2 34.133 59.733zM443.733 648.533c0 0-4.267 0-4.267 0-119.467 85.333-273.067 46.933-277.333 46.933s-8.533 0-12.8 8.533c0 4.267 0 8.533 8.533 12.8 0 0 42.667 12.8 98.133 8.533 51.2 0 128-12.8 196.267-59.733 4.267-4.267 4.267-8.533 4.267-12.8-4.267-4.267-8.533-4.267-12.8-4.267zM443.733 512c0 0-4.267 0-4.267 0-119.467 85.333-273.067 46.933-277.333 46.933s-8.533 0-12.8 8.533c0 4.267 0 8.533 8.533 12.8 0 0 42.667 12.8 98.133 8.533 51.2 0 128-12.8 196.267-59.733 4.267-4.267 4.267-8.533 4.267-12.8-4.267 0-8.533-4.267-12.8-4.267zM443.733 379.733c0 0-4.267 0-4.267 0-119.467 85.333-273.067 46.933-277.333 46.933s-8.533 0-12.8 8.533c0 4.267 0 8.533 8.533 12.8 0 0 42.667 12.8 98.133 8.533 51.2 0 128-12.8 196.267-59.733 4.267-4.267 4.267-8.533 4.267-12.8-4.267 0-8.533-4.267-12.8-4.267zM443.733 247.467c0 0-4.267 0-4.267 0-119.467 85.333-273.067 46.933-277.333 46.933s-8.533 0-12.8 8.533c0 4.267 0 8.533 8.533 12.8 0 0 42.667 12.8 98.133 8.533 51.2 0 128-12.8 196.267-59.733 4.267-4.267 4.267-8.533 4.267-12.8-4.267 0-8.533-4.267-12.8-4.267zM588.8 379.733c-4.267 0-4.267 0-8.533 4.267s0 8.533 4.267 12.8c68.267 46.933 140.8 59.733 196.267 59.733s93.867-8.533 98.133-8.533c4.267 0 8.533-8.533 8.533-12.8s-8.533-8.533-12.8-8.533v0c0 0-153.6 38.4-277.333-46.933-4.267 4.267-4.267 0-8.533 0zM588.8 247.467c-4.267 0-4.267 0-8.533 4.267s0 8.533 4.267 12.8c68.267 46.933 140.8 59.733 196.267 59.733s93.867-8.533 98.133-8.533c4.267 0 8.533-8.533 8.533-12.8s-8.533-8.533-12.8-8.533v0c0 0-153.6 38.4-277.333-46.933-4.267 4.267-4.267 0-8.533 0zM985.6 738.133v64l-8.533 4.267c-4.267 0-81.067 29.867-179.2 29.867-106.667 0-200.533-34.133-277.333-98.133-76.8 64-170.667 98.133-277.333 98.133-102.4 0-174.933-29.867-179.2-29.867l-12.8-4.267v-59.733c-34.133-4.267-51.2-17.067-51.2-34.133v-614.4h452.267c17.067-12.8 38.4-21.333 64-21.333s46.933 8.533 64 21.333h443.733v614.4c0 17.067-17.067 25.6-38.4 29.867v0zM512 145.067c-38.4 17.067-166.4 64-298.667 64-51.2 0-98.133-8.533-136.533-21.333v597.333c21.333 8.533 85.333 25.6 162.133 25.6 98.133 0 183.467-29.867 256-89.6v-358.4l17.067 17.067v-234.667zM955.733 183.467c-42.667 17.067-89.6 25.6-140.8 25.6-128 0-251.733-51.2-290.133-64v238.933l17.067-17.067v349.867c68.267 59.733 153.6 89.6 256 89.6 76.8 0 136.533-17.067 162.133-25.6v-597.333z" />
<glyph unicode="&#xe96c;" glyph-name="attach" d="M960 866.133c-42.667 42.667-98.133 64-157.867 64s-115.2-21.333-157.867-64l-593.067-593.067c-34.133-34.133-55.467-85.333-51.2-136.533 0-42.667 17.067-81.067 46.933-110.933 34.133-38.4 81.067-59.733 132.267-59.733 46.933 0 93.867 17.067 128 51.2l541.867 546.133c25.6 25.6 42.667 64 42.667 98.133s-12.8 68.267-38.4 93.867c-25.6 25.6-59.733 38.4-98.133 38.4-34.133 0-72.533-17.067-98.133-42.667l-354.133-354.133c-4.267 0-4.267-4.267-4.267-12.8s4.267-12.8 8.533-17.067 25.6-8.533 34.133 0l354.133 354.133c12.8 17.067 38.4 25.6 59.733 25.6 25.6 0 51.2-12.8 68.267-34.133 8.533-12.8 17.067-25.6 17.067-42.667 4.267-25.6-4.267-55.467-25.6-72.533l-541.867-541.867c-25.6-25.6-55.467-38.4-93.867-38.4-34.133 0-68.267 12.8-93.867 38.4s-38.4 59.733-38.4 93.867c0 34.133 12.8 68.267 38.4 93.867l588.8 584.533c34.133 34.133 76.8 51.2 123.733 51.2s89.6-17.067 123.733-51.2c34.133-34.133 51.2-76.8 51.2-123.733s-17.067-89.6-51.2-123.733l-401.067-401.067c-4.267-4.267-8.533-12.8-8.533-17.067 0-8.533 4.267-12.8 8.533-17.067 8.533-8.533 25.6-8.533 34.133 0l401.067 401.067c89.6 89.6 89.6 230.4 4.267 320z" /> <glyph unicode="&#xe96c;" glyph-name="attach" d="M960 866.133c-42.667 42.667-98.133 64-157.867 64s-115.2-21.333-157.867-64l-593.067-593.067c-34.133-34.133-55.467-85.333-51.2-136.533 0-42.667 17.067-81.067 46.933-110.933 34.133-38.4 81.067-59.733 132.267-59.733 46.933 0 93.867 17.067 128 51.2l541.867 546.133c25.6 25.6 42.667 64 42.667 98.133s-12.8 68.267-38.4 93.867c-25.6 25.6-59.733 38.4-98.133 38.4-34.133 0-72.533-17.067-98.133-42.667l-354.133-354.133c-4.267 0-4.267-4.267-4.267-12.8s4.267-12.8 8.533-17.067 25.6-8.533 34.133 0l354.133 354.133c12.8 17.067 38.4 25.6 59.733 25.6 25.6 0 51.2-12.8 68.267-34.133 8.533-12.8 17.067-25.6 17.067-42.667 4.267-25.6-4.267-55.467-25.6-72.533l-541.867-541.867c-25.6-25.6-55.467-38.4-93.867-38.4-34.133 0-68.267 12.8-93.867 38.4s-38.4 59.733-38.4 93.867c0 34.133 12.8 68.267 38.4 93.867l588.8 584.533c34.133 34.133 76.8 51.2 123.733 51.2s89.6-17.067 123.733-51.2c34.133-34.133 51.2-76.8 51.2-123.733s-17.067-89.6-51.2-123.733l-401.067-401.067c-4.267-4.267-8.533-12.8-8.533-17.067 0-8.533 4.267-12.8 8.533-17.067 8.533-8.533 25.6-8.533 34.133 0l401.067 401.067c89.6 89.6 89.6 230.4 4.267 320z" />
<glyph unicode="&#xe96d;" glyph-name="zone2" d="M98.133 17.067c-4.267 29.867-12.8 64-17.067 93.867-17.067 98.133-34.133 192-51.2 290.133-12.8 46.933-21.333 98.133-29.867 149.333 0 4.267 0 8.533 4.267 8.533 42.667 21.333 85.333 42.667 128 59.733 0 0 0 0 4.267 0 4.267-8.533 8.533-12.8 12.8-21.333-21.333-8.533-42.667-21.333-64-29.867-17.067-8.533-34.133-17.067-51.2-21.333-4.267 0-4.267-4.267-4.267-8.533 8.533-42.667 17.067-85.333 25.6-132.267 0-4.267 4.267-4.267 4.267-8.533 8.533-4.267 17.067-8.533 25.6-17.067 0-4.267-4.267-12.8-8.533-17.067-4.267 4.267-12.8 4.267-17.067 8.533 17.067-102.4 38.4-209.067 55.467-311.467 17.067 8.533 29.867 12.8 42.667 21.333 51.2 25.6 102.4 51.2 153.6 72.533 4.267 0 8.533 0 17.067 0 68.267-4.267 136.533-12.8 204.8-17.067 0 0 4.267 0 8.533 0-4.267 17.067-4.267 34.133-8.533 51.2-12.8 68.267-25.6 136.533-38.4 204.8 0 8.533-4.267 17.067-12.8 25.6-4.267 4.267-4.267 8.533-8.533 12.8 12.8 4.267 8.533 17.067 8.533 25.6-8.533 51.2-17.067 106.667-29.867 157.867 0 4.267 0 4.267-8.533 4.267-17.067 0-38.4 4.267-55.467 4.267 4.267 8.533 8.533 17.067 12.8 21.333 0 0 4.267 4.267 8.533 4.267 17.067 0 34.133-4.267 46.933-4.267 4.267 0 8.533 0 12.8 0 68.267 29.867 132.267 64 200.533 93.867 4.267 4.267 8.533 8.533 12.8 8.533 68.267-4.267 136.533-8.533 204.8-17.067 8.533 0 17.067 0 29.867-4.267 4.267 0 8.533-4.267 8.533-8.533 12.8-64 25.6-132.267 34.133-196.267 17.067-102.4 38.4-204.8 55.467-311.467 0-8.533 4.267-17.067 4.267-25.6-17.067 0-34.133 4.267-51.2 4.267-42.667 4.267-89.6 8.533-132.267 12.8-17.067 0-38.4 4.267-55.467 4.267-4.267 0-12.8 0-17.067-4.267-68.267-29.867-132.267-64-200.533-93.867 0 0-4.267 0-8.533 0-76.8 8.533-149.333 12.8-226.133 21.333-4.267 0-8.533 0-12.8 0-72.533-34.133-140.8-68.267-213.333-102.4 0-4.267 0-8.533-4.267-8.533zM989.867 217.6c0 4.267 0 4.267 0 8.533-8.533 34.133-12.8 72.533-21.333 106.667-8.533 46.933-17.067 89.6-25.6 136.533 0 8.533-4.267 12.8-8.533 17.067-8.533 4.267-12.8 12.8-21.333 17.067 4.267 8.533 8.533 12.8 12.8 17.067 4.267-4.267 8.533-4.267 12.8-8.533-4.267 12.8-4.267 21.333-4.267 34.133-8.533 46.933-17.067 93.867-25.6 145.067 0 4.267-4.267 8.533-8.533 8.533-68.267 4.267-136.533 12.8-209.067 17.067-4.267 0-8.533 0-12.8-4.267-64-29.867-123.733-59.733-187.733-85.333-4.267-4.267-8.533-4.267-4.267-12.8 4.267-29.867 12.8-64 17.067-93.867 4.267-21.333 8.533-42.667 12.8-59.733 12.8-4.267 12.8-12.8 21.333-21.333-12.8-4.267-12.8-12.8-12.8-25.6 12.8-68.267 25.6-132.267 38.4-200.533 4.267-25.6 8.533-51.2 12.8-76.8 4.267 0 4.267 0 8.533 4.267 59.733 29.867 119.467 59.733 183.467 89.6-4.267 4.267 0 4.267 4.267 4.267 51.2-4.267 106.667-8.533 157.867-12.8 21.333 0 38.4-4.267 59.733-4.267zM260.267 469.333c-12.8 17.067-25.6 34.133-38.4 46.933-29.867 46.933-59.733 93.867-85.333 145.067-12.8 29.867-21.333 64-17.067 102.4 8.533 51.2 34.133 85.333 81.067 102.4 55.467 21.333 123.733 8.533 162.133-34.133 34.133-34.133 42.667-76.8 34.133-123.733-8.533-42.667-25.6-76.8-46.933-115.2-25.6-42.667-55.467-81.067-85.333-123.733 0 4.267-4.267 0-4.267 0zM260.267 819.2c-46.933 0-81.067-34.133-81.067-81.067s38.4-81.067 81.067-81.067c46.933 0 81.067 38.4 85.333 81.067 0 42.667-38.4 81.067-85.333 81.067zM358.4 349.867c4.267-8.533 4.267-12.8 8.533-21.333-12.8-4.267-25.6-12.8-38.4-17.067-4.267 8.533-4.267 12.8-8.533 21.333 12.8 4.267 25.6 12.8 38.4 17.067zM226.133 302.933c0 8.533 4.267 17.067 4.267 21.333 12.8 0 25.6-4.267 38.4-4.267 0-8.533 0-12.8 0-25.6-12.8 8.533-29.867 8.533-42.667 8.533zM413.867 354.133c-4.267 8.533-8.533 12.8-12.8 21.333 12.8 8.533 21.333 17.067 34.133 25.6 4.267-4.267 8.533-12.8 12.8-17.067-12.8-12.8-21.333-21.333-34.133-29.867zM179.2 341.333c-4.267-8.533-4.267-12.8-8.533-21.333-12.8 4.267-25.6 8.533-38.4 17.067 4.267 8.533 4.267 12.8 8.533 21.333 12.8-8.533 25.6-12.8 38.4-17.067zM682.667 580.267c-12.8-8.533-21.333-17.067-34.133-21.333-4.267 4.267-8.533 12.8-12.8 17.067 12.8 8.533 25.6 17.067 38.4 25.6 4.267-8.533 4.267-17.067 8.533-21.333zM878.933 558.933c-4.267-8.533-8.533-12.8-12.8-21.333-12.8 8.533-25.6 17.067-34.133 21.333 4.267 8.533 8.533 12.8 8.533 21.333 12.8-8.533 25.6-17.067 38.4-21.333zM571.733 486.4c-4.267 4.267-8.533 12.8-12.8 17.067 8.533 8.533 21.333 21.333 29.867 29.867 4.267-4.267 8.533-12.8 12.8-17.067-8.533-8.533-17.067-21.333-29.867-29.867zM785.067 610.133c-4.267-8.533-4.267-17.067-8.533-21.333-12.8 0-25.6 4.267-38.4 4.267 0 8.533 0 12.8 0 21.333 17.067 0 29.867-4.267 46.933-4.267z" /> <glyph unicode="&#xe96d;" glyph-name="zone2" d="M98.133 17.067c-4.267 29.867-12.8 64-17.067 93.867-17.067 98.133-34.133 192-51.2 290.133-12.8 46.933-21.333 98.133-29.867 149.333 0 4.267 0 8.533 4.267 8.533 42.667 21.333 85.333 42.667 128 59.733 0 0 0 0 4.267 0 4.267-8.533 8.533-12.8 12.8-21.333-21.333-8.533-42.667-21.333-64-29.867-17.067-8.533-34.133-17.067-51.2-21.333-4.267 0-4.267-4.267-4.267-8.533 8.533-42.667 17.067-85.333 25.6-132.267 0-4.267 4.267-4.267 4.267-8.533 8.533-4.267 17.067-8.533 25.6-17.067 0-4.267-4.267-12.8-8.533-17.067-4.267 4.267-12.8 4.267-17.067 8.533 17.067-102.4 38.4-209.067 55.467-311.467 17.067 8.533 29.867 12.8 42.667 21.333 51.2 25.6 102.4 51.2 153.6 72.533 4.267 0 8.533 0 17.067 0 68.267-4.267 136.533-12.8 204.8-17.067 0 0 4.267 0 8.533 0-4.267 17.067-4.267 34.133-8.533 51.2-12.8 68.267-25.6 136.533-38.4 204.8 0 8.533-4.267 17.067-12.8 25.6-4.267 4.267-4.267 8.533-8.533 12.8 12.8 4.267 8.533 17.067 8.533 25.6-8.533 51.2-17.067 106.667-29.867 157.867 0 4.267 0 4.267-8.533 4.267-17.067 0-38.4 4.267-55.467 4.267 4.267 8.533 8.533 17.067 12.8 21.333 0 0 4.267 4.267 8.533 4.267 17.067 0 34.133-4.267 46.933-4.267 4.267 0 8.533 0 12.8 0 68.267 29.867 132.267 64 200.533 93.867 4.267 4.267 8.533 8.533 12.8 8.533 68.267-4.267 136.533-8.533 204.8-17.067 8.533 0 17.067 0 29.867-4.267 4.267 0 8.533-4.267 8.533-8.533 12.8-64 25.6-132.267 34.133-196.267 17.067-102.4 38.4-204.8 55.467-311.467 0-8.533 4.267-17.067 4.267-25.6-17.067 0-34.133 4.267-51.2 4.267-42.667 4.267-89.6 8.533-132.267 12.8-17.067 0-38.4 4.267-55.467 4.267-4.267 0-12.8 0-17.067-4.267-68.267-29.867-132.267-64-200.533-93.867 0 0-4.267 0-8.533 0-76.8 8.533-149.333 12.8-226.133 21.333-4.267 0-8.533 0-12.8 0-72.533-34.133-140.8-68.267-213.333-102.4 0-4.267 0-8.533-4.267-8.533zM989.867 217.6c0 4.267 0 4.267 0 8.533-8.533 34.133-12.8 72.533-21.333 106.667-8.533 46.933-17.067 89.6-25.6 136.533 0 8.533-4.267 12.8-8.533 17.067-8.533 4.267-12.8 12.8-21.333 17.067 4.267 8.533 8.533 12.8 12.8 17.067 4.267-4.267 8.533-4.267 12.8-8.533-4.267 12.8-4.267 21.333-4.267 34.133-8.533 46.933-17.067 93.867-25.6 145.067 0 4.267-4.267 8.533-8.533 8.533-68.267 4.267-136.533 12.8-209.067 17.067-4.267 0-8.533 0-12.8-4.267-64-29.867-123.733-59.733-187.733-85.333-4.267-4.267-8.533-4.267-4.267-12.8 4.267-29.867 12.8-64 17.067-93.867 4.267-21.333 8.533-42.667 12.8-59.733 12.8-4.267 12.8-12.8 21.333-21.333-12.8-4.267-12.8-12.8-12.8-25.6 12.8-68.267 25.6-132.267 38.4-200.533 4.267-25.6 8.533-51.2 12.8-76.8 4.267 0 4.267 0 8.533 4.267 59.733 29.867 119.467 59.733 183.467 89.6-4.267 4.267 0 4.267 4.267 4.267 51.2-4.267 106.667-8.533 157.867-12.8 21.333 0 38.4-4.267 59.733-4.267zM260.267 469.333c-12.8 17.067-25.6 34.133-38.4 46.933-29.867 46.933-59.733 93.867-85.333 145.067-12.8 29.867-21.333 64-17.067 102.4 8.533 51.2 34.133 85.333 81.067 102.4 55.467 21.333 123.733 8.533 162.133-34.133 34.133-34.133 42.667-76.8 34.133-123.733-8.533-42.667-25.6-76.8-46.933-115.2-25.6-42.667-55.467-81.067-85.333-123.733 0 4.267-4.267 0-4.267 0zM260.267 819.2c-46.933 0-81.067-34.133-81.067-81.067s38.4-81.067 81.067-81.067c46.933 0 81.067 38.4 85.333 81.067 0 42.667-38.4 81.067-85.333 81.067zM358.4 349.867c4.267-8.533 4.267-12.8 8.533-21.333-12.8-4.267-25.6-12.8-38.4-17.067-4.267 8.533-4.267 12.8-8.533 21.333 12.8 4.267 25.6 12.8 38.4 17.067zM226.133 302.933c0 8.533 4.267 17.067 4.267 21.333 12.8 0 25.6-4.267 38.4-4.267 0-8.533 0-12.8 0-25.6-12.8 8.533-29.867 8.533-42.667 8.533zM413.867 354.133c-4.267 8.533-8.533 12.8-12.8 21.333 12.8 8.533 21.333 17.067 34.133 25.6 4.267-4.267 8.533-12.8 12.8-17.067-12.8-12.8-21.333-21.333-34.133-29.867zM179.2 341.333c-4.267-8.533-4.267-12.8-8.533-21.333-12.8 4.267-25.6 8.533-38.4 17.067 4.267 8.533 4.267 12.8 8.533 21.333 12.8-8.533 25.6-12.8 38.4-17.067zM682.667 580.267c-12.8-8.533-21.333-17.067-34.133-21.333-4.267 4.267-8.533 12.8-12.8 17.067 12.8 8.533 25.6 17.067 38.4 25.6 4.267-8.533 4.267-17.067 8.533-21.333zM878.933 558.933c-4.267-8.533-8.533-12.8-12.8-21.333-12.8 8.533-25.6 17.067-34.133 21.333 4.267 8.533 8.533 12.8 8.533 21.333 12.8-8.533 25.6-17.067 38.4-21.333zM571.733 486.4c-4.267 4.267-8.533 12.8-12.8 17.067 8.533 8.533 21.333 21.333 29.867 29.867 4.267-4.267 8.533-12.8 12.8-17.067-8.533-8.533-17.067-21.333-29.867-29.867zM785.067 610.133c-4.267-8.533-4.267-17.067-8.533-21.333-12.8 0-25.6 4.267-38.4 4.267 0 8.533 0 12.8 0 21.333 17.067 0 29.867-4.267 46.933-4.267z" />

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 115 KiB

View File

@ -4,6 +4,8 @@ import './style.scss';
export default class DescriptorPopover extends Popover { export default class DescriptorPopover extends Popover {
show(parent, id) { show(parent, id) {
if (!id) return;
super.show(parent); super.show(parent);
this.id = id; this.id = id;

View File

@ -5,6 +5,24 @@
vn-descriptor-content { vn-descriptor-content {
display: block; display: block;
.photo {
position: relative;
& > img[ng-src] {
min-height: 16em;
display: block;
height: 100%;
width: 100%;
}
vn-float-button {
position: absolute;
margin: 1em;
bottom: 0;
right: 0
}
}
& > vn-spinner { & > vn-spinner {
display: block; display: block;
height: 40px; height: 40px;
@ -71,13 +89,9 @@ vn-descriptor-content {
& > vn-icon { & > vn-icon {
padding: $spacing-xs $spacing-sm; padding: $spacing-xs $spacing-sm;
color: $color-marginal;
font-size: 1.5rem; font-size: 1.5rem;
color: $color-main;
&.bright { opacity: 1;
color: $color-main;
opacity: 1;
}
} }
} }
& > .quicklinks { & > .quicklinks {

View File

@ -13,3 +13,4 @@ import './section';
import './summary'; import './summary';
import './topbar/topbar'; import './topbar/topbar';
import './user-popover'; import './user-popover';
import './upload-photo';

View File

@ -109,14 +109,15 @@ vn-layout {
} }
} }
} }
img { .buttonAccount {
width: 40px;
border-radius: 50%;
}
.buttonAccount {
background: none; background: none;
border: none; border: none;
}
img {
width: 40px;
border-radius: 50%;
}
}
@media screen and (max-width: $mobile-width) { @media screen and (max-width: $mobile-width) {
& > vn-topbar { & > vn-topbar {
& > .start > .logo { & > .start > .logo {

View File

@ -0,0 +1,39 @@
<vn-dialog class="edit"
vn-id="dialog"
on-accept="$ctrl.onUploadAccept()"
message="Upload new photo">
<tpl-body class="upload-photo">
<vn-horizontal ng-show="file.value" class="photo vn-mb-md">
<div><img vn-id="photo" ng-src=""/></div>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="File name"
ng-model="$ctrl.newPhoto.fileName"
required="true">
</vn-input-file>
</vn-horizontal>
<vn-horizontal>
<vn-input-file vn-id="file"
vn-one
label="File"
ng-model="$ctrl.newPhoto.files"
on-change="$ctrl.updatePhotoPreview(value)"
accept="{{$ctrl.allowedContentTypes}}"
required="true">
<append>
<vn-icon vn-none
color-marginal
title="{{$ctrl.contentTypesInfo}}"
icon="info">
</vn-icon>
</append>
</vn-input-file>
</vn-horizontal>
</tpl-body>
<tpl-buttons>
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
<button response="accept" translate>Upload</button>
</tpl-buttons>
</vn-dialog>

View File

@ -0,0 +1,105 @@
import ngModule from '../../module';
import Component from 'core/lib/component';
import './style.scss';
/**
* Small card with basing entity information and actions.
*/
export default class UploadPhoto extends Component {
/**
* Opens the dialog and sets the default data
* @param {*} collection - Collection name
* @param {*} id - Entity id
*/
show(collection, id) {
this.newPhoto = {
id: id,
collection: collection,
fileName: id
};
this.$.dialog.show();
this.getAllowedContentTypes();
}
getAllowedContentTypes() {
this.$http.get('ImageContainers/allowedContentTypes').then(res => {
const contentTypes = res.data.join(', ');
this.allowedContentTypes = contentTypes;
});
}
get contentTypesInfo() {
return this.$t('ContentTypesInfo', {
allowedContentTypes: this.allowedContentTypes
});
}
/**
* Updates the image preview
*
* @param {string} value
*/
updatePhotoPreview(value) {
if (value && value[0]) {
const reader = new FileReader();
reader.onload = e => this.$.photo.src = e.target.result;
reader.readAsDataURL(value[0]);
}
}
/**
* Dialog response handler
*
* @return {boolean} Response
*/
onUploadAccept() {
try {
if (!this.newPhoto.files)
throw new Error(`Select an image`);
this.makeRequest();
} catch (e) {
this.vnApp.showError(this.$t(e.message));
return false;
}
return true;
}
/**
* Performs a cancellable request.
*
*/
makeRequest() {
if (this.canceler) this.canceler.resolve();
this.canceler = this.$q.defer();
const options = {
method: 'POST',
url: `Images/upload`,
params: this.newPhoto,
headers: {'Content-Type': undefined},
timeout: this.canceler.promise,
transformRequest: files => {
const formData = new FormData();
for (let i = 0; i < files.length; i++)
formData.append(files[i].name, files[i]);
return formData;
},
data: this.newPhoto.files
};
this.$http(options)
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')))
.then(() => this.emit('response'))
.finally(() => this.canceler = null);
}
}
ngModule.vnComponent('vnUploadPhoto', {
controller: UploadPhoto,
template: require('./index.html'),
bindings: {
data: '<'
}
});

View File

@ -0,0 +1,57 @@
import './index.js';
describe('Salix', () => {
describe('Component vnUploadPhoto', () => {
let controller;
let $scope;
let $httpBackend;
beforeEach(ngModule('salix'));
beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
$scope = $rootScope.$new();
$httpBackend = _$httpBackend_;
const $element = angular.element('<vn-upload-photo></vn-upload-photo>');
controller = $componentController('vnUploadPhoto', {$element, $scope});
controller.newPhoto = {};
}));
afterEach(() => {
$scope.$destroy();
});
describe('onUploadAccept()', () => {
it('should throw an error message containing "Select an image"', () => {
jest.spyOn(controller.vnApp, 'showError');
controller.onUploadAccept();
expect(controller.vnApp.showError).toHaveBeenCalledWith('Select an image');
});
it('should call to the makeRequest() method', () => {
jest.spyOn(controller, 'makeRequest');
controller.newPhoto.files = [0];
controller.onUploadAccept();
expect(controller.makeRequest).toHaveBeenCalledWith();
});
});
describe('makeRequest()', () => {
it('should make an http query and then emit a response event', () => {
jest.spyOn(controller.vnApp, 'showSuccess');
jest.spyOn(controller, 'emit');
controller.newPhoto.files = [{name: 'hola'}];
$httpBackend.expectRoute('POST', 'Images/upload').respond(200);
controller.makeRequest();
$httpBackend.flush();
expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Data saved!');
expect(controller.emit).toHaveBeenCalledWith('response');
});
});
});
});

View File

@ -0,0 +1,3 @@
Upload new photo: Subir una nueva foto
Select an image: Selecciona una imagen
File name: Nombre del fichero

View File

@ -0,0 +1,39 @@
@import "./variables";
.upload-photo {
.photo {
position: relative;
margin: 0 auto;
text-align: center;
& > div {
border: 3px solid $color-primary;
max-width: 256px;
max-height: 256px;
border-radius: 50%;
overflow: hidden
}
& > div > img[ng-src] {
width: 256px;
height: 256px;
display: block;
height: 100%;
width: 100%;
}
}
& > vn-spinner {
display: block;
height: 40px;
padding: $spacing-md;
}
vn-input-file {
max-width: 256px;
div.control {
overflow: hidden
}
}
}

View File

@ -14,7 +14,7 @@
<vn-vertical class="user-popover vn-pa-md"> <vn-vertical class="user-popover vn-pa-md">
<div class="profile-card vn-pb-md"> <div class="profile-card vn-pb-md">
<img <img
ng-src="{{$ctrl.getImageUrl($root.user.id)}}" ng-src="{{::$root.imagePath('user', '160x160', $root.user.id)}}"
on-error-src/> on-error-src/>
<div class="vn-pl-sm"> <div class="vn-pl-sm">
<div> <div>

View File

@ -78,10 +78,6 @@ class Controller {
this.$.companies.refresh(); this.$.companies.refresh();
this.$.popover.show(event.target); this.$.popover.show(event.target);
} }
getImageUrl(userId) {
return '/api/Images/user/160x160/' + userId + '/download?access_token=' + this.vnToken.token;
}
} }
Controller.$inject = ['$scope', '$translate', 'vnConfig', 'vnAuth', 'vnToken']; Controller.$inject = ['$scope', '$translate', 'vnConfig', 'vnAuth', 'vnToken'];

View File

@ -2,14 +2,16 @@ import './index.js';
describe('Salix', () => { describe('Salix', () => {
describe('Component vnUserPopover', () => { describe('Component vnUserPopover', () => {
const userId = 9;
let controller; let controller;
let $scope; let $scope;
let $root;
beforeEach(ngModule('salix')); beforeEach(ngModule('salix'));
beforeEach(inject(($componentController, $rootScope, $httpBackend) => { beforeEach(inject(($componentController, $rootScope, $httpBackend) => {
$httpBackend.expectGET('UserConfigs/getUserConfig'); $httpBackend.expectGET('UserConfigs/getUserConfig');
$root = $rootScope;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
controller = $componentController('vnUserPopover', {$scope}); controller = $componentController('vnUserPopover', {$scope});
})); }));
@ -60,9 +62,10 @@ describe('Salix', () => {
describe('getImageUrl()', () => { describe('getImageUrl()', () => {
it('should return de url image', () => { it('should return de url image', () => {
const url = controller.getImageUrl(); const url = $root.imagePath('user', '160x160', userId);
expect(url).toBeDefined(); expect(url).toBeDefined();
expect(url).toEqual(`/api/Images/user/160x160/${userId}/download?access_token=null`);
}); });
}); });
}); });

View File

@ -7,9 +7,14 @@ export const appName = 'salix';
const ngModule = ng.module('salix', ['vnCore']); const ngModule = ng.module('salix', ['vnCore']);
export default ngModule; export default ngModule;
run.$inject = ['$window', '$rootScope', 'vnAuth', 'vnApp', '$state']; run.$inject = ['$window', '$rootScope', 'vnAuth', 'vnApp', 'vnToken', '$state'];
export function run($window, $rootScope, vnAuth, vnApp, $state) { export function run($window, $rootScope, vnAuth, vnApp, vnToken, $state) {
$rootScope.imagePath = appConfig.imagePath; $rootScope.imagePath = (collection, size, id) => {
if (!collection || !size || !id) return;
const basePath = `/api/Images/${collection}/${size}/${id}`;
return `${basePath}/download?access_token=${vnToken.token}`;
};
$window.validations = {}; $window.validations = {};
vnApp.name = appName; vnApp.name = appName;

View File

@ -1,206 +0,0 @@
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
// All imported modules in your tests should be mocked automatically
// automock: false,
// Stop running tests after `n` failures
// bail: 0,
// Respect "browser" field in package.json when resolving modules
// browser: false,
// The directory where Jest should store its cached dependency information
// cacheDirectory: "/private/var/folders/_b/2qg94x6n3kd0h_71bp2426wm0000gn/T/jest_dx",
// Automatically clear mock calls and instances between every test
// clearMocks: true,
// Indicates whether the coverage information should be collected while executing the test
// collectCoverage: false,
// An array of glob patterns indicating a set of files for which coverage information should be collected
// collectCoverageFrom: null,
// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
// An array of regexp pattern strings used to skip coverage collection
coveragePathIgnorePatterns: [
'/node_modules/',
'.spec.js'
],
// A list of reporter names that Jest uses when writing coverage reports
// coverageReporters: [
// "json",
// "text",
// "lcov",
// "clover"
// ],
// An object that configures minimum threshold enforcement for coverage results
// coverageThreshold: null,
// A path to a custom dependency extractor
// dependencyExtractor: null,
// Make calling deprecated APIs throw helpful error messages
// errorOnDeprecated: false,
// Force coverage collection from ignored files using an array of glob patterns
// forceCoverageMatch: [],
// A path to a module which exports an async function that is triggered once before all test suites
// globalSetup: null,
// A path to a module which exports an async function that is triggered once after all test suites
// globalTeardown: null,
// A set of global variables that need to be available in all test environments
// globals: {},
// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
// maxWorkers: "50%",
// An array of directory names to be searched recursively up from the requiring module's location
moduleDirectories: [
`front`,
`modules`,
`front/node_modules`,
`node_modules`,
`print`
],
// An array of file extensions your modules use
moduleFileExtensions: [
'js',
// "json",
// "jsx",
// "ts",
// "tsx",
// "node"
],
// A map from regular expressions to module names that allow to stub out resources with a single module
moduleNameMapper: {
'\\.(css|scss)$': 'identity-obj-proxy',
'\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/fileMock.js',
},
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
// modulePathIgnorePatterns: [],
// Activates notifications for test results
// notify: false,
// An enum that specifies notification mode. Requires { notify: true }
// notifyMode: "failure-change",
// A preset that is used as a base for Jest's configuration
// preset: null,
// Run tests from one or more projects
// projects: null,
// Use this configuration option to add custom reporters to Jest
// reporters: undefined,
// Automatically reset mock state between every test
// resetMocks: false,
// Reset the module registry before running each individual test
// resetModules: false,
// A path to a custom resolver
// resolver: null,
// Automatically restore mock state between every test
// restoreMocks: false,
// The root directory that Jest should scan for tests and modules within
// rootDir: null,
// A list of paths to directories that Jest should use to search for files in
// roots: [
// "<rootDir>"
// ],
// Allows you to use a custom runner instead of Jest's default test runner
// runner: "jest-runner",
// The paths to modules that run some code to configure or set up the testing environment before each test
// setupFiles: [],
// A list of paths to modules that run some code to configure or set up the testing framework before each test
setupFilesAfterEnv: [
'./jest-front.js'
],
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
// snapshotSerializers: [],
// The test environment that will be used for testing
// testEnvironment: 'node',
// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},
// Adds a location field to test results
// testLocationInResults: false,
// The glob patterns Jest uses to detect test files
testMatch: [
'**/front/**/*.spec.js',
'**/print/**/*.spec.js',
// 'loopback/**/*.spec.js',
// 'modules/*/back/**/*.spec.js'
// "**/__tests__/**/*.[jt]s?(x)",
// "**/?(*.)+(spec|test).[tj]s?(x)"
],
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
// "/node_modules/"
// ],
// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],
// This option allows the use of a custom results processor
// testResultsProcessor: null,
// This option allows use of a custom test runner
// testRunner: "jasmine2",
// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
testURL: 'http://localhost',
// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
// timers: "real",
// A map from regular expressions to paths to transformers
transform: {
'^.+\\.js?$': 'babel-jest',
'^.+\\.html$': 'html-loader-jest'
},
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
// '/node_modules/'
// ],
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,
// Indicates whether each individual test should be reported during the run
verbose: false,
// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
// watchPathIgnorePatterns: [],
// Whether to use watchman for file crawling
// watchman: true,
};

51
jest.front.config.js Normal file
View File

@ -0,0 +1,51 @@
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
name: 'front end',
displayName: {
name: 'Front end',
color: 'cyan',
},
testEnvironment: 'jsdom',
setupFilesAfterEnv: [
'./jest-front.js'
],
testMatch: [
'**/front/**/*.spec.js',
'**/print/**/*.spec.js',
'loopback/**/*.spec.js',
'modules/*/back/**/*.spec.js'
],
testPathIgnorePatterns: [
'/node_modules/'
],
coveragePathIgnorePatterns: [
'/node_modules/',
'.spec.js'
],
moduleDirectories: [
`front`,
`modules`,
`front/node_modules`,
`node_modules`,
`print`
],
moduleFileExtensions: [
'js',
],
moduleNameMapper: {
'\\.(css|scss)$': 'identity-obj-proxy',
'\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/fileMock.js',
},
testURL: 'http://localhost',
verbose: false,
errorOnDeprecated: true,
restoreMocks: true,
timers: 'real',
transform: {
'^.+\\.js?$': 'babel-jest',
'^.+\\.html$': 'html-loader-jest'
},
};

View File

@ -0,0 +1,57 @@
const md5 = require('md5');
module.exports = function(Self) {
Self.setup = function() {
Self.super_.setup.call(this);
this.remoteMethod('allowedContentTypes', {
description: 'Returns a list of allowed contentTypes',
accessType: 'READ',
returns: {
type: ['Object'],
root: true
},
http: {
path: `/allowedContentTypes`,
verb: 'GET'
}
});
};
/**
* Returns a container instance
* If doesn't exists creates a new one
*
* @param {String} name Container name
* @return {Object} Container instance
*/
Self.container = async function(name) {
const models = Self.app.models;
let container;
try {
container = await models[this.modelName].getContainer(name);
} catch (err) {
if (err.code === 'ENOENT') {
container = await models[this.modelName].createContainer({
name: name
});
} else throw err;
}
return container;
};
Self.getHash = function(id) {
return md5(id.toString()).substring(0, 3);
};
Self.getFileExtension = function(fileName) {
return fileName.split('.').pop().toLowerCase();
};
Self.allowedContentTypes = async function() {
const connector = this.dataSource.connector;
const allowedContentTypes = connector.allowedContentTypes;
return allowedContentTypes;
};
};

View File

@ -0,0 +1,12 @@
{
"name": "Container",
"base": "VnModel",
"acls": [
{
"property": "status",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}
]
}

View File

@ -145,9 +145,15 @@ module.exports = function(Self) {
rewriteDbError(replaceErrFunc) { rewriteDbError(replaceErrFunc) {
function replaceErr(err, replaceErrFunc) { function replaceErr(err, replaceErrFunc) {
if (Array.isArray(err)) { if (Array.isArray(err)) {
const errors = err.filter(error => {
return error != undefined && error != null;
});
let errs = []; let errs = [];
for (let e of err) for (let e of errors) {
errs.push(replaceErrFunc(e)); if (!(e instanceof UserError))
errs.push(replaceErrFunc(e));
else errs.push(e);
}
return errs; return errs;
} }
return replaceErrFunc(err); return replaceErrFunc(err);

View File

@ -84,5 +84,7 @@
"companyFk": "Company", "companyFk": "Company",
"You need to fill sage information before you check verified data": "You need to fill sage information before you check verified data", "You need to fill sage information before you check verified data": "You need to fill sage information before you check verified data",
"The social name cannot be empty": "The social name cannot be empty", "The social name cannot be empty": "The social name cannot be empty",
"The nif cannot be empty": "The nif cannot be empty" "The nif cannot be empty": "The nif cannot be empty",
"A travel with this data already exists": "A travel with this data already exists",
"The observation type can't be repeated": "The observation type can't be repeated"
} }

View File

@ -160,5 +160,9 @@
"The social name cannot be empty": "La razón social no puede quedar en blanco", "The social name cannot be empty": "La razón social no puede quedar en blanco",
"The nif cannot be empty": "El NIF no puede quedar en blanco", "The nif cannot be empty": "El NIF no puede quedar en blanco",
"You need to fill sage information before you check verified data": "Debes rellenar la información de sage antes de marcar datos comprobados", "You need to fill sage information before you check verified data": "Debes rellenar la información de sage antes de marcar datos comprobados",
"ASSIGN_ZONE_FIRST": "Asigna una zona primero" "ASSIGN_ZONE_FIRST": "Asigna una zona primero",
"You can not select this payment method without a registered bankery account": "No se puede utilizar este método de pago si no has registrado una cuenta bancaria",
"You can't upload images on the test environment": "No puedes subir imágenes en el entorno de pruebas",
"The selected ticket is not suitable for this route": "El ticket seleccionado no es apto para esta ruta",
"Sorts whole route": "Reordena ruta entera"
} }

View File

@ -1,18 +0,0 @@
const uuid = require('uuid/v1');
const md5 = require('md5');
module.exports = app => {
const storageConnector = app.dataSources.storage.connector;
storageConnector.getFilename = function(file) {
return `${uuid()}.${storageConnector.getFileExtension(file.name)}`;
};
storageConnector.getFileExtension = function(fileName) {
return fileName.split('.').pop().toLowerCase();
};
storageConnector.getPathHash = function(id) {
return md5(id.toString()).substring(0, 3);
};
};

View File

@ -246,3 +246,98 @@ exports.initialize = function initialize(dataSource, callback) {
dataSource.connector.connect(callback); dataSource.connector.connect(callback);
} }
}; };
MySQL.prototype.connect = function(callback) {
const self = this;
const options = generateOptions(this.settings);
if (this.client) {
if (callback) {
process.nextTick(function() {
callback(null, self.client);
});
}
} else
this.client = connectionHandler(options, callback);
function connectionHandler(options, callback) {
const client = mysql.createPool(options);
client.getConnection(function(err, connection) {
const conn = connection;
if (!err) {
if (self.debug)
debug('MySQL connection is established: ' + self.settings || {});
connection.release();
} else {
if (err.code == 'ECONNREFUSED' || err.code == 'PROTOCOL_CONNECTION_LOST') { // PROTOCOL_CONNECTION_LOST
console.error(`MySQL connection lost (${err.code}). Retrying..`);
return setTimeout(() =>
connectionHandler(options, callback), 5000);
}
if (self.debug || !callback)
console.error('MySQL connection is failed: ' + self.settings || {}, err);
}
callback && callback(err, conn);
});
return client;
}
};
function generateOptions(settings) {
const s = settings || {};
if (s.collation) {
// Charset should be first 'chunk' of collation.
s.charset = s.collation.substr(0, s.collation.indexOf('_'));
} else {
s.collation = 'utf8_general_ci';
s.charset = 'utf8';
}
s.supportBigNumbers = (s.supportBigNumbers || false);
s.timezone = (s.timezone || 'local');
if (isNaN(s.connectionLimit))
s.connectionLimit = 10;
let options;
if (s.url) {
// use url to override other settings if url provided
options = s.url;
} else {
options = {
host: s.host || s.hostname || 'localhost',
port: s.port || 3306,
user: s.username || s.user,
password: s.password,
timezone: s.timezone,
socketPath: s.socketPath,
charset: s.collation.toUpperCase(), // Correct by docs despite seeming odd.
supportBigNumbers: s.supportBigNumbers,
connectionLimit: s.connectionLimit,
};
// Don't configure the DB if the pool can be used for multiple DBs
if (!s.createDatabase)
options.database = s.database;
// Take other options for mysql driver
// See https://github.com/strongloop/loopback-connector-mysql/issues/46
for (const p in s) {
if (p === 'database' && s.createDatabase)
continue;
if (options[p] === undefined)
options[p] = s[p];
}
// Legacy UTC Date Processing fallback - SHOULD BE TRANSITIONAL
if (s.legacyUtcDateProcessing === undefined)
s.legacyUtcDateProcessing = true;
if (s.legacyUtcDateProcessing)
options.timezone = 'Z';
}
return options;
}

View File

@ -17,11 +17,11 @@
"connectTimeout": 40000, "connectTimeout": 40000,
"acquireTimeout": 20000 "acquireTimeout": 20000
}, },
"storage": { "tempStorage": {
"name": "storage", "name": "tempStorage",
"connector": "loopback-component-storage", "connector": "loopback-component-storage",
"provider": "filesystem", "provider": "filesystem",
"root": "./e2e/dms", "root": "./storage/tmp",
"maxFileSize": "262144000", "maxFileSize": "262144000",
"allowedContentTypes": [ "allowedContentTypes": [
"application/x-7z-compressed", "application/x-7z-compressed",
@ -36,5 +36,37 @@
"image/jpeg", "image/jpeg",
"image/jpg" "image/jpg"
] ]
},
"dmsStorage": {
"name": "dmsStorage",
"connector": "loopback-component-storage",
"provider": "filesystem",
"root": "./storage/dms",
"maxFileSize": "262144000",
"allowedContentTypes": [
"application/x-7z-compressed",
"application/x-zip-compressed",
"application/x-rar-compressed",
"application/octet-stream",
"application/pdf",
"application/zip",
"application/rar",
"multipart/x-zip",
"image/png",
"image/jpeg",
"image/jpg"
]
},
"imageStorage": {
"name": "imageStorage",
"connector": "loopback-component-storage",
"provider": "filesystem",
"root": "./storage/image",
"maxFileSize": "52428800",
"allowedContentTypes": [
"image/png",
"image/jpeg",
"image/jpg"
]
} }
} }

View File

@ -49,5 +49,8 @@
}, },
"Application": { "Application": {
"dataSource": "vn" "dataSource": "vn"
},
"Container": {
"dataSource": "vn"
} }
} }

View File

@ -5,7 +5,6 @@
*/ */
exports.translateValues = async(instance, changes) => { exports.translateValues = async(instance, changes) => {
const models = instance.app.models; const models = instance.app.models;
function getRelation(instance, property) { function getRelation(instance, property) {
const relations = instance.definition.settings.relations; const relations = instance.definition.settings.relations;
for (let relationName in relations) { for (let relationName in relations) {
@ -34,16 +33,26 @@ exports.translateValues = async(instance, changes) => {
}).format(date); }).format(date);
} }
if (changes instanceof instance)
changes = changes.__data;
const properties = Object.assign({}, changes); const properties = Object.assign({}, changes);
for (let property in properties) { for (let property in properties) {
const relation = getRelation(instance, property); const relation = getRelation(instance, property);
const value = properties[property]; const value = properties[property];
let finalValue = value; let finalValue = value;
if (relation) { if (relation) {
const model = relation.model; let fieldsToShow = ['alias', 'name', 'code', 'description'];
const row = await models[model].findById(value, { const modelName = relation.model;
fields: ['alias', 'name', 'code', 'description'] const model = models[modelName];
const log = model.definition.settings.log;
if (log && log.showField)
fieldsToShow = [log.showField];
const row = await model.findById(value, {
fields: fieldsToShow
}); });
const newValue = getValue(row); const newValue = getValue(row);
if (newValue) finalValue = newValue; if (newValue) finalValue = newValue;

View File

@ -53,33 +53,32 @@
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit
disabled="!watcher.dataChanged()"
label="Save">
</vn-submit>
<vn-button <vn-button
label="Undo changes" disabled="!watcher.dataChanged()"
ng-if="watcher.dataChanged()"
ng-click="watcher.loadOriginalData()">
</vn-button>
<vn-button
ng-if="!watcher.dataChanged()"
label="Synchronize all" label="Synchronize all"
ng-click="$ctrl.onSynchronizeAll()"> ng-click="$ctrl.onSynchronizeAll()">
</vn-button> </vn-button>
<vn-button <vn-button
ng-if="!watcher.dataChanged()" disabled="!watcher.dataChanged()"
label="Synchronize user" label="Synchronize user"
ng-click="syncUser.show()"> ng-click="syncUser.show()">
</vn-button> </vn-button>
<vn-button <vn-button
ng-if="!watcher.dataChanged()" disabled="!watcher.dataChanged()"
label="Synchronize roles" label="Synchronize roles"
ng-click="$ctrl.onSynchronizeRoles()"> ng-click="$ctrl.onSynchronizeRoles()">
</vn-button> </vn-button>
<vn-button
class="cancel"
label="Undo changes"
disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()">
</vn-button>
</vn-button-bar> </vn-button-bar>
<vn-submit
icon="save"
vn-tooltip="Save"
class="round"
fixed-bottom-right>
</vn-submit>
</form> </form>
<vn-dialog <vn-dialog
vn-id="syncUser" vn-id="syncUser"

View File

@ -56,10 +56,15 @@
</vn-autocomplete> </vn-autocomplete>
</vn-horizontal> </vn-horizontal>
</vn-card> </vn-card>
<vn-submit <vn-button-bar>
icon="check" <vn-submit
vn-tooltip="Create" disabled="!watcher.dataChanged()"
class="round" label="Save">
fixed-bottom-right> </vn-submit>
</vn-submit> <vn-button
class="cancel"
label="Cancel"
ui-sref="account.acl">
</vn-button>
</vn-button-bar>
</form> </form>

View File

@ -29,16 +29,15 @@
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit
disabled="!watcher.dataChanged()"
label="Save">
</vn-submit>
<vn-button <vn-button
class="cancel"
label="Undo changes" label="Undo changes"
ng-if="watcher.dataChanged()" disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()"> ng-click="watcher.loadOriginalData()">
</vn-button> </vn-button>
</vn-button-bar> </vn-button-bar>
<vn-submit
icon="save"
vn-tooltip="Save"
class="round"
fixed-bottom-right>
</vn-submit>
</form> </form>

View File

@ -24,10 +24,15 @@
</vn-textfield> </vn-textfield>
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-submit <vn-button-bar>
icon="check" <vn-submit
vn-tooltip="Create" disabled="!watcher.dataChanged()"
class="round" label="Create">
fixed-bottom-right> </vn-submit>
</vn-submit> <vn-button
class="cancel"
label="Cancel"
ui-sref="account.alias">
</vn-button>
</vn-button-bar>
</form> </form>

View File

@ -37,16 +37,15 @@
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit
disabled="!watcher.dataChanged()"
label="Save">
</vn-submit>
<vn-button <vn-button
class="cancel"
label="Undo changes" label="Undo changes"
ng-if="watcher.dataChanged()" disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()"> ng-click="watcher.loadOriginalData()">
</vn-button> </vn-button>
</vn-button-bar> </vn-button-bar>
<vn-submit
icon="save"
vn-tooltip="Save"
class="round"
fixed-bottom-right>
</vn-submit>
</form> </form>

View File

@ -44,10 +44,14 @@
</vn-check> </vn-check>
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-submit <vn-button-bar>
icon="check" <vn-submit
vn-tooltip="Create" label="Create">
class="round" </vn-submit>
fixed-bottom-right> <vn-button
</vn-submit> class="cancel"
label="Cancel"
ui-sref="account.index">
</vn-button>
</vn-button-bar>
</form> </form>

View File

@ -78,12 +78,12 @@
<vn-icon <vn-icon
vn-tooltip="User deactivated" vn-tooltip="User deactivated"
icon="icon-disabled" icon="icon-disabled"
ng-class="{bright: !$ctrl.user.active}"> ng-if="!$ctrl.user.active">
</vn-icon> </vn-icon>
<vn-icon <vn-icon
vn-tooltip="Account enabled" vn-tooltip="Account enabled"
icon="contact_mail" icon="contact_mail"
ng-class="{bright: $ctrl.hasAccount}"> ng-if="$ctrl.hasAccount">
</vn-icon> </vn-icon>
</div> </div>
</slot-body> </slot-body>

View File

@ -48,21 +48,20 @@
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit
disabled="!watcher.dataChanged()"
label="Save">
</vn-submit>
<vn-button <vn-button
disabled="watcher.dataChanged()" disabled="watcher.dataChanged()"
label="Test connection" label="Test connection"
ng-click="$ctrl.onTestConection()"> ng-click="$ctrl.onTestConection()">
</vn-button> </vn-button>
<vn-button <vn-button
class="cancel"
label="Undo changes" label="Undo changes"
ng-if="watcher.dataChanged()" disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()"> ng-click="watcher.loadOriginalData()">
</vn-button> </vn-button>
</vn-button-bar> </vn-button-bar>
<vn-submit
icon="save"
vn-tooltip="Save"
class="round"
fixed-bottom-right>
</vn-submit>
</form> </form>

View File

@ -27,12 +27,18 @@
</vn-textfield> </vn-textfield>
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-submit <vn-button-bar>
icon="save" <vn-submit
vn-tooltip="Save" disabled="!watcher.dataChanged()"
class="round" label="Save">
fixed-bottom-right> </vn-submit>
</vn-submit> <vn-button
class="cancel"
label="Undo changes"
disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()">
</vn-button>
</vn-button-bar>
</form> </form>
</div> </div>
<div <div

View File

@ -24,16 +24,15 @@
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit
disabled="!watcher.dataChanged()"
label="Save">
</vn-submit>
<vn-button <vn-button
class="cancel"
label="Undo changes" label="Undo changes"
ng-if="watcher.dataChanged()" disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()"> ng-click="watcher.loadOriginalData()">
</vn-button> </vn-button>
</vn-button-bar> </vn-button-bar>
<vn-submit
icon="save"
vn-tooltip="Save"
class="round"
fixed-bottom-right>
</vn-submit>
</form> </form>

View File

@ -24,10 +24,15 @@
</vn-textfield> </vn-textfield>
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-submit <vn-button-bar>
icon="check" <vn-submit
vn-tooltip="Create" disabled="!watcher.dataChanged()"
class="round" label="Create">
fixed-bottom-right> </vn-submit>
</vn-submit> <vn-button
class="cancel"
label="Cancel"
ui-sref="account.role">
</vn-button>
</vn-button-bar>
</form> </form>

View File

@ -47,21 +47,20 @@
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit
disabled="!watcher.dataChanged()"
label="Save">
</vn-submit>
<vn-button <vn-button
disabled="watcher.dataChanged()" disabled="watcher.dataChanged()"
label="Test connection" label="Test connection"
ng-click="$ctrl.onTestConection()"> ng-click="$ctrl.onTestConection()">
</vn-button> </vn-button>
<vn-button <vn-button
class="cancel"
label="Undo changes" label="Undo changes"
ng-if="watcher.dataChanged()" disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()"> ng-click="watcher.loadOriginalData()">
</vn-button> </vn-button>
</vn-button-bar> </vn-button-bar>
<vn-submit
icon="save"
vn-tooltip="Save"
class="round"
fixed-bottom-right>
</vn-submit>
</form> </form>

View File

@ -13,7 +13,7 @@ module.exports = Self => {
}); });
Self.allowedContentTypes = async() => { Self.allowedContentTypes = async() => {
const storageConnector = Self.app.dataSources.storage.connector; const storageConnector = Self.app.dataSources.dmsStorage.connector;
const allowedContentTypes = storageConnector.allowedContentTypes; const allowedContentTypes = storageConnector.allowedContentTypes;
const modelAllowedContentTypes = Self.definition.settings.allowedContentTypes; const modelAllowedContentTypes = Self.definition.settings.allowedContentTypes;

View File

@ -1,8 +1,9 @@
<mg-ajax path="Claims/updateClaim/{{patch.params.id}}" options="vnPatch"></mg-ajax>
<vn-watcher <vn-watcher
vn-id="watcher" vn-id="watcher"
url="Claims/updateClaim"
data="$ctrl.claim" data="$ctrl.claim"
form="form"> form="form"
save="patch">
</vn-watcher> </vn-watcher>
<vn-crud-model <vn-crud-model
auto-load="true" auto-load="true"
@ -62,9 +63,14 @@
</vn-horizontal> </vn-horizontal>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit label="Save"></vn-submit> <vn-submit
<vn-button label="Undo changes" disabled="!watcher.dataChanged()"
ng-if="$ctrl.$.form.$dirty" label="Save">
</vn-submit>
<vn-button
class="cancel"
label="Undo changes"
disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()"> ng-click="watcher.loadOriginalData()">
</vn-button> </vn-button>
</vn-button-bar> </vn-button-bar>

View File

@ -106,8 +106,16 @@
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit <vn-submit
label="Save" disabled="!watcher.dataChanged()"
ng-click="$ctrl.onSubmit()"> ng-click="$ctrl.onSubmit()"
label="Save">
</vn-submit> </vn-submit>
<!-- # #2680 Undo changes button bugs -->
<!-- <vn-button
class="cancel"
label="Undo changes"
disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()">
</vn-button> -->
</vn-button-bar> </vn-button-bar>
</vn-vertical> </vn-vertical>

Some files were not shown because too many files have changed in this diff Show More