master into test #1546

Merged
juan merged 44 commits from master into test 2023-05-22 17:04:33 +00:00
99 changed files with 567 additions and 385 deletions

View File

@ -2770,10 +2770,23 @@ UPDATE `account`.`user`
INSERT INTO `vn`.`ticketLog` (`originFk`, userFk, `action`, changedModel, oldInstance, newInstance, changedModelId, `description`) INSERT INTO `vn`.`ticketLog` (`originFk`, userFk, `action`, changedModel, oldInstance, newInstance, changedModelId, `description`)
VALUES VALUES
(7, 18, 'update', 'Sale', '{"quantity":1}', '{"quantity":10}', 1, NULL), (7, 18, 'update', 'Sale', '{"quantity":1}', '{"quantity":10}', 1, NULL),
(7, 18, 'update', 'Ticket', '{"quantity":1,"concept":"Chest ammo box"}', '{"quantity":10,"concept":"Chest ammo box"}', 1, NULL), (7, 18, 'update', 'Ticket', '{"quantity":1,"concept":"Chest ammo box"}', '{"quantity":10,"concept":"Chest ammo box"}', 1, NULL),
(7, 18, 'update', 'Sale', '{"price":3}', '{"price":5}', 1, NULL), (7, 18, 'update', 'Sale', '{"price":3}', '{"price":5}', 1, NULL),
(7, 18, 'update', NULL, NULL, NULL, NULL, "Cambio cantidad Melee weapon heavy shield 1x0.5m de '5' a '10'"); (7, 18, 'update', NULL, NULL, NULL, NULL, "Cambio cantidad Melee weapon heavy shield 1x0.5m de '5' a '10'");
INSERT INTO `vn`.`ticketLog` (originFk, userFk, `action`, creationDate, changedModel, changedModelId, changedModelValue, oldInstance, newInstance, description)
VALUES
(1, NULL, 'delete', '2001-06-09 11:00:04', 'Ticket', 45, 'Spider Man' , NULL, NULL, NULL),
(1, 18, 'select', '2001-06-09 11:00:03', 'Ticket', 45, 'Spider Man' , NULL, NULL, NULL),
(1, NULL, 'update', '2001-05-09 10:00:02', 'Sale', 69854, 'Armor' , '{"isPicked": false}','{"isPicked": true}', NULL),
(1, 18, 'update', '2001-01-01 10:05:01', 'Sale', 69854, 'Armor' , NULL, NULL, 'Armor quantity changed from ''15'' to ''10'''),
(1, NULL, 'delete', '2001-01-01 10:00:10', 'Sale', 5689, 'Shield' , '{"quantity":10,"concept":"Shield"}', NULL, NULL),
(1, 18, 'insert', '2000-12-31 15:00:05', 'Sale', 69854, 'Armor' , NULL,'{"quantity":15,"concept":"Armor", "price": 345.99, "itemFk": 2}', NULL),
(1, 18, 'update', '2000-12-28 08:40:45', 'Ticket', 45, 'Spider Man' , '{"warehouseFk":60,"shipped":"2023-05-16T22:00:00.000Z","nickname":"Super Man","isSigned":true,"isLabeled":true,"isPrinted":true,"packages":0,"hour":0,"isBlocked":false,"hasPriority":false,"companyFk":442,"landed":"2023-05-17T22:00:00.000Z","isBoxed":true,"isDeleted":true,"zoneFk":713,"zonePrice":13,"zoneBonus":0}','{"warehouseFk":61,"shipped":"2023-05-17T22:00:00.000Z","nickname":"Spider Man","isSigned":false,"isLabeled":false,"isPrinted":false,"packages":1,"hour":0,"isBlocked":true,"hasPriority":true,"companyFk":443,"landed":"2023-05-18T22:00:00.000Z","isBoxed":false,"isDeleted":false,"zoneFk":713,"zonePrice":13,"zoneBonus":1}', NULL),
(1, 18, 'select', '2000-12-27 03:40:30', 'Ticket', 45, NULL , NULL, NULL, NULL),
(1, 18, 'insert', '2000-04-10 09:40:15', 'Sale', 5689, 'Shield' , NULL, '{"quantity":10,"concept":"Shield", "price": 10.5, "itemFk": 1}', NULL),
(1, 18, 'insert', '1999-05-09 10:00:00', 'Ticket', 45, 'Super Man' , NULL, '{"id":45,"clientFk":8608,"warehouseFk":60,"shipped":"2023-05-16T22:00:00.000Z","nickname":"Super Man","addressFk":48637,"isSigned":true,"isLabeled":true,"isPrinted":true,"packages":0,"hour":0,"created":"2023-05-16T11:42:56.000Z","isBlocked":false,"hasPriority":false,"companyFk":442,"agencyModeFk":639,"landed":"2023-05-17T22:00:00.000Z","isBoxed":true,"isDeleted":true,"zoneFk":713,"zonePrice":13,"zoneBonus":0}', NULL);
INSERT INTO `vn`.`osTicketConfig` (`id`, `host`, `user`, `password`, `oldStatus`, `newStatusId`, `day`, `comment`, `hostDb`, `userDb`, `passwordDb`, `portDb`, `responseType`, `fromEmailId`, `replyTo`) INSERT INTO `vn`.`osTicketConfig` (`id`, `host`, `user`, `password`, `oldStatus`, `newStatusId`, `day`, `comment`, `hostDb`, `userDb`, `passwordDb`, `portDb`, `responseType`, `fromEmailId`, `replyTo`)
VALUES VALUES

View File

@ -5,8 +5,8 @@ const $ = {
userName: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.name"]', userName: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.name"]',
email: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.email"]', email: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.email"]',
saveButton: 'vn-client-web-access button[type=submit]', saveButton: 'vn-client-web-access button[type=submit]',
nameValue: 'vn-client-log .change:nth-child(1) .basic-json:nth-child(1) vn-json-value', nameValue: 'vn-client-log .change:nth-child(1) .basic-json:nth-child(2) vn-json-value',
activeValue: 'vn-client-log .change:nth-child(2) .basic-json:nth-child(2) vn-json-value' activeValue: 'vn-client-log .change:nth-child(2) .basic-json:nth-child(1) vn-json-value'
}; };
describe('Client web access path', () => { describe('Client web access path', () => {

View File

@ -1,5 +1,6 @@
import ngModule from '../../module'; import ngModule from '../../module';
import Component from 'core/lib/component'; import Component from 'core/lib/component';
import {hashToColor} from '../../lib/string';
import './style.scss'; import './style.scss';
/** /**
@ -16,13 +17,8 @@ export default class Avatar extends Component {
this._val = value; this._val = value;
const val = value || ''; const val = value || '';
let hash = 0;
for (let i = 0; i < val.length; i++)
hash += val.charCodeAt(i);
const color = '#' + colors[hash % colors.length];
const el = this.element; const el = this.element;
el.style.backgroundColor = color; el.style.backgroundColor = hashToColor(val);
el.title = val; el.title = val;
} }
} }
@ -35,29 +31,3 @@ ngModule.vnComponent('vnAvatar', {
}, },
transclude: true transclude: true
}); });
const colors = [
'e2553d', // Coral
'FFA07A', // Salmon
'FFDAB9', // Peach
'a17077', // Pink
'bf0e99', // Pink light
'52a500', // Green chartreuse
'00aeae', // Cian
'b754cf', // Purple middle
'8a69cd', // Blue lavender
'1fa8a1', // Green ocean
'DC143C', // Red crimson
'5681cf', // Blue steel
'FF1493', // Ping intense
'02ba02', // Green lime
'1E90FF', // Blue sky
'8B008B', // Purple dark
'cc7000', // Orange bright
'00b5b8', // Turquoise
'8B0000', // Red dark
'008080', // Green bluish
'2F4F4F', // Gray board
'7e7e7e', // Gray
'5d5d5d', // Gray dark
];

View File

@ -2,7 +2,7 @@ import ngModule from '../../module';
import Component from 'core/lib/component'; import Component from 'core/lib/component';
import './style.scss'; import './style.scss';
const maxStrLen = 50; const maxStrLen = 512;
/** /**
* Displays pretty JSON value. * Displays pretty JSON value.
@ -28,6 +28,12 @@ export default class Controller extends Component {
} else { } else {
cssClass = type; cssClass = type;
switch (type) { switch (type) {
case 'number':
if (Number.isInteger(value))
text = value;
else
text = Math.round((value + Number.EPSILON) * 1000) / 1000;
break;
case 'boolean': case 'boolean':
text = value ? '✓' : '✗'; text = value ? '✓' : '✗';
cssClass = value ? 'true' : 'false'; cssClass = value ? 'true' : 'false';

View File

@ -75,5 +75,19 @@ describe('Component vnJsonValue', () => {
expect(el.textContent).toEqual('2050'); expect(el.textContent).toEqual('2050');
expect(el.className).toContain('json-number'); expect(el.className).toContain('json-number');
}); });
it('should display number when value is decimal', () => {
controller.value = 10.1;
expect(el.textContent).toEqual('10.1');
expect(el.className).toContain('json-number');
});
it('should display rounded number when value is decimal with lot of decimals', () => {
controller.value = 10.124323234;
expect(el.textContent).toEqual('10.124');
expect(el.className).toContain('json-number');
});
}); });
}); });

View File

@ -1,3 +1,3 @@
SelectAllRows: Seleccionar las {{rows}} fila(s) SelectAllRows: Seleccionar las {{rows}} fila(s)
All: Se han seleccionado Have been selected: Se han seleccionado
row(s) have been selected.: fila(s). row(s) have been selected.: fila(s).

View File

@ -30,3 +30,39 @@ export function camelToKebab(str) {
export function firstUpper(str) { export function firstUpper(str) {
return str.charAt(0).toUpperCase() + str.substr(1); return str.charAt(0).toUpperCase() + str.substr(1);
} }
export function djb2a(string) {
let hash = 5381;
for (let i = 0; i < string.length; i++)
hash = ((hash << 5) + hash) ^ string.charCodeAt(i);
return hash >>> 0;
}
export function hashToColor(value) {
return '#' + colors[djb2a(value || '') % colors.length];
}
const colors = [
'b5b941', // Yellow
'ae9681', // Peach
'd78767', // Salmon
'cc7000', // Orange bright
'e2553d', // Coral
'8B0000', // Red dark
'de4362', // Red crimson
'FF1493', // Ping intense
'be39a2', // Pink light
'b754cf', // Purple middle
'a87ba8', // Pink
'8a69cd', // Blue lavender
'ab20ab', // Purple dark
'00b5b8', // Turquoise
'1fa8a1', // Green ocean
'5681cf', // Blue steel
'3399fe', // Blue sky
'6d9c3e', // Green chartreuse
'51bb51', // Green lime
'518b8b', // Gray board
'7e7e7e', // Gray
'5d5d5d', // Gray dark
];

View File

@ -38,6 +38,9 @@
.text-overline { .text-overline {
font-size: .8rem; font-size: .8rem;
} }
.text-capitalize {
text-transform: capitalize;
}
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
padding: 0; padding: 0;

View File

@ -10,19 +10,18 @@
</vn-crud-model> </vn-crud-model>
<vn-crud-model <vn-crud-model
url="{{$ctrl.url}}/{{$ctrl.originId}}/models" url="{{$ctrl.url}}/{{$ctrl.originId}}/models"
data="models" data="$ctrl.models"
order="changedModel" order="changedModel"
auto-load="true"> auto-load="true">
</vn-crud-model> </vn-crud-model>
<vn-data-viewer <vn-data-viewer
model="model" model="model"
is-loading="model.isLoading" class="vn-w-sm vn-px-sm">
class="vn-w-md vn-px-sm">
<div class="change vn-mb-sm" ng-repeat="log in $ctrl.logs"> <div class="change vn-mb-sm" ng-repeat="log in $ctrl.logs">
<div class="left"> <div class="left">
<vn-avatar class="vn-mt-xs" <vn-avatar class="vn-mt-xs"
ng-class="::{system: !log.user}" ng-class="::{system: !log.user}"
val="{{::log.user ? log.user.nickname : 'System'}}" val="{{::log.user ? log.user.nickname : $ctrl.$t('System')}}"
ng-click="$ctrl.showWorkerDescriptor($event, log)"> ng-click="$ctrl.showWorkerDescriptor($event, log)">
<img <img
ng-if="::log.user.image" ng-if="::log.user.image"
@ -32,80 +31,67 @@
<div class="arrow bg-panel"></div> <div class="arrow bg-panel"></div>
<div class="line"></div> <div class="line"></div>
</div> </div>
<vn-card class="detail vn-pa-sm"> <vn-card class="detail">
<div class="header vn-mb-sm"> <div class="header vn-pa-sm">
<div <div
class="date text-secondary text-caption" class="action-date text-secondary text-caption vn-mr-sm"
title="{{::log.creationDate | date:'dd/MM/yyyy HH:mm:ss'}}"> title="{{::log.creationDate | date:'dd/MM/yyyy HH:mm:ss'}}">
<vn-icon
class="action vn-mr-xs"
ng-class="::$ctrl.actionsClass[log.action]"
icon="{{::$ctrl.actionsIcon[log.action]}}"
translate-attr="::{title: $ctrl.actionsText[log.action]}">
</vn-icon>
{{::$ctrl.relativeDate(log.creationDate)}} {{::$ctrl.relativeDate(log.creationDate)}}
</div> </div>
<span class="chip" ng-class="::$ctrl.actionsClass[log.action]" translate> <div class="action-model">
{{::$ctrl.actionsText[log.action]}} <span class="model-name"
</span> ng-if="::$ctrl.showModelName && log.changedModel"
</div> ng-style="::{backgroundColor: $ctrl.hashToColor(log.changedModel)}"
<div title="{{::log.changedModel}}">
class="model vn-mb-sm" {{::log.changedModelI18n}}
title="{{::log.changedModelValue}}"
ng-if="::log.changedModel || log.changedModelValue">
<span class="model-name"
ng-if="::$ctrl.showModelName"
title="{{::log.changedModel}}">
{{::log.changedModelI18n}}
</span>
<span class="model-id"
ng-if="::log.changedModelId">
#{{::log.changedModelId}}
</span>
<span class="model-value">
{{::log.changedModelValue}}
</span>
</div>
<div class="changes"
ng-class="::log.props.length ? 'props' : 'no-props'"
vn-id="changes">
<vn-icon icon="visibility"
class="expand-button"
ng-click="$ctrl.toggleAttributes(log, changes, true)">
</vn-icon>
<vn-icon icon="visibility_off"
class="shrink-button"
ng-click="$ctrl.toggleAttributes(log, changes, false)">
</vn-icon>
<div class="changes-wrapper">
<span ng-if="::log.props.length"
class="attributes">
<span ng-if="!log.expand" ng-repeat="prop in ::log.props"
class="basic-json">
<span class="json-field"
title="{{::prop.name}}">
{{::prop.nameI18n}}:
</span>
<vn-json-value value="::$ctrl.mainVal(prop, log.action)"></vn-json-value><span ng-if="::!$last">,</span>
</span>
<div ng-if="log.expand"
class="expanded-json">
<div ng-repeat="prop in ::log.props">
<span class="json-field"
title="{{::prop.name}}">
{{::prop.nameI18n}}:
</span>
<vn-json-value value="::$ctrl.mainVal(prop, log.action)"></vn-json-value>
<span ng-if="::log.action == 'update'">
<vn-json-value value="::prop.old"></vn-json-value>
</span>
</div>
</div>
</span>
<span ng-if="::!log.props.length"
class="description">
{{::log.description}}
</span>
<span ng-if="::!log.description && !log.props.length"
class="no-changes"
translate>
No changes
</span> </span>
</div> </div>
</div>
<div
class="model vn-pb-sm vn-px-sm"
title="{{::log.changedModelValue}}"
ng-if="::log.changedModelId || log.changedModelValue">
<span class="model-id" ng-if="::log.changedModelId">#{{::log.changedModelId}}</span>
<span class="model-value">{{::log.changedModelValue}}</span>
</div>
<div class="changes vn-pa-sm"
ng-class="{expanded: log.expand}"
ng-if="::log.props.length || log.description">
<vn-icon
icon="expand_more"
translate-attr="{title: 'Details'}"
ng-click="log.expand = !log.expand">
</vn-icon>
<span ng-if="::log.props.length"
class="attributes">
<span ng-if="!log.expand" ng-repeat="prop in ::log.props"
class="basic-json">
<span class="json-field" title="{{::prop.name}}">
{{::prop.nameI18n}}:
</span>
<vn-json-value value="::$ctrl.mainVal(prop, log.action)"></vn-json-value><span ng-if="::!$last">,</span>
</span>
<div ng-if="log.expand" class="expanded-json">
<div ng-repeat="prop in ::log.props">
<span class="json-field" title="{{::prop.name}}">
{{::prop.nameI18n}}:
</span>
<vn-json-value value="::$ctrl.mainVal(prop, log.action)"></vn-json-value>
<span ng-if="::log.action == 'update'">
<vn-json-value value="::prop.old"></vn-json-value>
</span>
</div>
</div>
</span>
<span ng-if="::!log.props.length" class="description">
{{::log.description}}
</span>
</vn-card> </vn-card>
</div> </div>
</div> </div>
@ -114,10 +100,6 @@
<form vn-vertical <form vn-vertical
ng-model-options="{updateOn: 'change blur'}" ng-model-options="{updateOn: 'change blur'}"
class="vn-pa-md filter"> class="vn-pa-md filter">
<vn-textfield
label="Name"
ng-model="filter.changedModelValue">
</vn-textfield>
<vn-vertical> <vn-vertical>
<vn-radio <vn-radio
label="All" label="All"
@ -134,7 +116,7 @@
val="system" val="system"
ng-model="filter.who"> ng-model="filter.who">
</vn-radio> </vn-radio>
</div> </vn-vertical>
<vn-autocomplete <vn-autocomplete
ng-show="filter.who != 'system'" ng-show="filter.who != 'system'"
label="User" label="User"
@ -162,24 +144,38 @@
</div> </div>
</tpl-item> </tpl-item>
</vn-autocomplete> </vn-autocomplete>
<vn-textfield
label="Search"
ng-model="filter.search">
<append>
<vn-icon
icon="info_outline"
vn-tooltip="Search by id or concept"
pointer>
</vn-icon>
</append>
</vn-textfield>
<vn-autocomplete <vn-autocomplete
label="Model" label="Entity"
ng-model="filter.changedModel" ng-model="filter.changedModel"
value-field="changedModel" value-field="changedModel"
show-field="changedModel" show-field="changedModelI18n"
data="models"> data="$ctrl.models"
class="changed-model">
</vn-autocomplete> </vn-autocomplete>
<!-- FIXME: Cannot use LIKE with JSON columns
<vn-textfield <vn-textfield
label="Id" label="Changes"
ng-model="filter.changedModelId"> ng-model="filter.changes">
</vn-textfield> </vn-textfield>
-->
<vn-vertical> <vn-vertical>
<vn-check <vn-check
label="Creates" label="Creates"
ng-model="filter.actions.insert"> ng-model="filter.actions.insert">
</vn-check> </vn-check>
<vn-check <vn-check
label="Updates" label="Edits"
ng-model="filter.actions.update"> ng-model="filter.actions.update">
</vn-check> </vn-check>
<vn-check <vn-check
@ -187,10 +183,10 @@
ng-model="filter.actions.delete"> ng-model="filter.actions.delete">
</vn-check> </vn-check>
<vn-check <vn-check
label="Views" label="Accesses"
ng-model="filter.actions.select"> ng-model="filter.actions.select">
</vn-check> </vn-check>
</div> </vn-vertical>
<vn-date-picker <vn-date-picker
label="Date" label="Date"
ng-model="filter.from"> ng-model="filter.from">
@ -199,7 +195,7 @@
label="To" label="To"
ng-model="filter.to"> ng-model="filter.to">
</vn-date-picker> </vn-date-picker>
<vn-button-bar vn-vertical class="vn-mt-sm"> <vn-button-bar vn-vertical>
<vn-button <vn-button
label="Filter" label="Filter"
ng-click="$ctrl.applyFilter(filter)"> ng-click="$ctrl.applyFilter(filter)">

View File

@ -1,5 +1,6 @@
import ngModule from '../../module'; import ngModule from '../../module';
import Section from '../section'; import Section from '../section';
import {hashToColor} from 'core/lib/string';
import './style.scss'; import './style.scss';
const validDate = /^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$/; const validDate = /^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$/;
@ -7,11 +8,12 @@ const validDate = /^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[
export default class Controller extends Section { export default class Controller extends Section {
constructor($element, $) { constructor($element, $) {
super($element, $); super($element, $);
this.hashToColor = hashToColor;
this.actionsText = { this.actionsText = {
insert: 'Creates', insert: 'Creates',
update: 'Updates', update: 'Edits',
delete: 'Deletes', delete: 'Deletes',
select: 'Views' select: 'Accesses'
}; };
this.actionsClass = { this.actionsClass = {
insert: 'success', insert: 'success',
@ -19,6 +21,12 @@ export default class Controller extends Section {
delete: 'alert', delete: 'alert',
select: 'notice' select: 'notice'
}; };
this.actionsIcon = {
insert: 'add',
update: 'edit',
delete: 'remove',
select: 'visibility'
};
this.filter = { this.filter = {
include: [{ include: [{
relation: 'user', relation: 'user',
@ -55,14 +63,14 @@ export default class Controller extends Section {
set logs(value) { set logs(value) {
this._logs = value; this._logs = value;
if (!this.logs) return; if (!value) return;
const empty = {}; const empty = {};
const validations = window.validations; const validations = window.validations;
for (const log of value) { for (const log of value) {
const oldValues = log.oldInstance || empty; const oldValues = log.oldInstance || empty;
const newValues = log.newInstance || empty; const newValues = log.newInstance || empty;
const locale = validations[log.changedModel]?.locale || empty; const locale = validations[log.changedModel]?.locale || empty;
log.changedModelI18n = locale.name || log.changedModel; log.changedModelI18n = firstUpper(locale.name) || log.changedModel;
let props = Object.keys(oldValues).concat(Object.keys(newValues)); let props = Object.keys(oldValues).concat(Object.keys(newValues));
props = [...new Set(props)]; props = [...new Set(props)];
@ -71,11 +79,27 @@ export default class Controller extends Section {
for (const prop of props) { for (const prop of props) {
log.props.push({ log.props.push({
name: prop, name: prop,
nameI18n: locale.columns?.[prop] || prop, nameI18n: firstUpper(locale.columns?.[prop]) || prop,
old: this.castJsonValue(oldValues[prop]), old: this.castJsonValue(oldValues[prop]),
new: this.castJsonValue(newValues[prop]) new: this.castJsonValue(newValues[prop])
}); });
} }
log.props.sort(
(a, b) => a.nameI18n.localeCompare(b.nameI18n));
}
}
get models() {
return this._models;
}
set models(value) {
this._models = value;
if (!value) return;
for (const model of value) {
const name = model.changedModel;
model.changedModelI18n =
firstUpper(window.validations[name]?.locale?.name) || name;
} }
} }
@ -93,11 +117,6 @@ export default class Controller extends Section {
return action == 'delete' ? prop.old : prop.new; return action == 'delete' ? prop.old : prop.new;
} }
toggleAttributes(log, changesEl, force) {
log.expand = force;
changesEl.classList.toggle('expanded', force);
}
relativeDate(dateVal) { relativeDate(dateVal) {
if (dateVal == null) return ''; if (dateVal == null) return '';
const date = new Date(dateVal); const date = new Date(dateVal);
@ -130,8 +149,17 @@ export default class Controller extends Section {
function getParam(prop, value) { function getParam(prop, value) {
if (value == null || value == '') return null; if (value == null || value == '') return null;
switch (prop) { switch (prop) {
case 'changedModelValue': case 'search':
return {[prop]: {like: `%${value}%`}}; const or = [{changedModelId: value}];
if (!/^[0-9]+$/.test(value))
or.push({changedModelValue: {like: `%${value}%`}});
return {or};
case 'changes':
return {or: [
{oldInstance: {like: `%${value}%`}},
{newInstance: {like: `%${value}%`}},
{description: {like: `%${value}%`}}
]};
case 'who': case 'who':
switch (value) { switch (value) {
case 'all': case 'all':
@ -195,6 +223,10 @@ export default class Controller extends Section {
} }
} }
function firstUpper(str) {
return str && str.charAt(0).toUpperCase() + str.substr(1);
}
ngModule.vnComponent('vnLog', { ngModule.vnComponent('vnLog', {
controller: Controller, controller: Controller,
template: require('./index.html'), template: require('./index.html'),

View File

@ -1,5 +1,8 @@
Date: Fecha Date: Fecha
Model: Modelo Concept: Concepto
Search: Buscar
Search by id or concept: Buscar por identificador o concepto
Entity: Entidad
Action: Acción Action: Acción
Author: Autor Author: Autor
Before: Antes Before: Antes
@ -7,12 +10,12 @@ After: Despues
History: Historial History: Historial
Name: Nombre Name: Nombre
Creates: Crea Creates: Crea
Updates: Actualiza Edits: Modifica
Deletes: Elimina Deletes: Elimina
Views: Visualiza Accesses: Accede
System: Sistema System: Sistema
Details: Detalles
note: nota note: nota
Changes: Cambios Changes: Cambios
No changes: No hay cambios
today: hoy today: hoy
yesterday: ayer yesterday: ayer

View File

@ -1,4 +1,5 @@
@import "variables"; @import "variables";
@import "effects";
vn-log { vn-log {
.change { .change {
@ -45,31 +46,52 @@ vn-log {
overflow: hidden; overflow: hidden;
& > .header { & > .header {
display: flex;
justify-content: space-between;
align-items: center;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
& > .chip { & > .action-model {
padding: 2px 4px; display: inline-flex;
border-radius: 4px; overflow: hidden;
display: inline-block;
color: $color-font-bg;
&.notice { & > .model-name {
background-color: $color-notice-medium; display: inline-block;
} padding: 2px 5px;
&.success { color: $color-font-dark;
background-color: $color-success-medium; border-radius: 8px;
} overflow: hidden;
&.warning { text-overflow: ellipsis;
background-color: $color-main-medium; white-space: nowrap;
}
&.alert {
background-color: lighten($color-alert, 5%);
} }
} }
.date { & > .action-date {
float: right; white-space: nowrap;
& > .action {
display: inline-flex;
align-items: center;
justify-content: center;
color: $color-font-bg;
vertical-align: middle;
border-radius: 50%;
width: 24px;
height: 24px;
font-size: 1.4em;
&.notice {
background-color: $color-notice-medium
}
&.success {
background-color: $color-success-medium;
}
&.warning {
background-color: $color-main-medium;
}
&.alert {
background-color: lighten($color-alert, 5%);
}
}
} }
} }
& > .model { & > .model {
@ -77,16 +99,12 @@ vn-log {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
& > .model-name {
text-transform: capitalize;
}
& > .model-value { & > .model-value {
font-style: italic; font-style: italic;
color: #c7bd2b;
} }
& > .model-id { & > .model-id {
color: $color-font-secondary; color: $color-font-secondary;
font-size: .9em; font-size: .9rem;
} }
} }
} }
@ -94,59 +112,35 @@ vn-log {
.changes { .changes {
overflow: hidden; overflow: hidden;
background-color: rgba(255, 255, 255, .05); background-color: rgba(255, 255, 255, .05);
border-radius: 4px; color: $color-font-light;
color: $color-font-secondary;
transition: max-height 150ms ease-in-out;
max-height: 28px;
position: relative; position: relative;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-height: 34px;
box-sizing: border-box;
& > .expand-button, & > vn-icon {
& > .shrink-button { @extend %clickable;
display: none; float: right;
position: relative;
transition-property: transform, background-color;
transition-duration: 150ms;
margin: -5px;
margin-left: 4px;
padding: 1px;
border-radius: 50%;
} }
&.props { &.expanded {
padding-right: 24px; text-overflow: initial;
white-space: initial;
& > .expand-button, & > vn-icon {
& > .shrink-button { transform: rotate(180deg);
position: absolute;
top: 6px;
right: 8px;
font-size: inherit;
float: right;
cursor: pointer;
}
& > .expand-button {
display: block;
}
&.expanded {
max-height: 500px;
padding-right: 0;
& > .changes-wrapper {
text-overflow: initial;
white-space: initial;
}
& > .shrink-button {
display: block;
}
& > .expand-button {
display: none;
}
} }
} }
& > .changes-wrapper { & > .no-changes {
padding: 4px 6px; font-style: italic;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
& > .no-changes {
font-style: italic;
}
.json-field {
text-transform: capitalize;
}
} }
} }
} }

View File

@ -33,7 +33,7 @@ export default class Controller {
const newPassword = this.newPassword; const newPassword = this.newPassword;
this.$http.post('users/reset-password', {newPassword}, {headers}) this.$http.post('VnUsers/reset-password', {newPassword}, {headers})
.then(() => { .then(() => {
this.vnApp.showSuccess(this.$translate.instant('Password changed!')); this.vnApp.showSuccess(this.$translate.instant('Password changed!'));
this.$state.go('login'); this.$state.go('login');

View File

@ -0,0 +1,4 @@
name: mail forward
columns:
account: account
forwardTo: forward to

View File

@ -0,0 +1,4 @@
name: reenvio de correo
columns:
account: cuenta
forwardTo: reenviar a

View File

@ -1,4 +1,4 @@
name: mail name: correo electrónico
columns: columns:
id: id id: id
receiver: receptor receiver: receptor

View File

@ -0,0 +1,4 @@
name: subrole
columns:
role: rol
inheritsFrom: inherits

View File

@ -0,0 +1,4 @@
name: subrol
columns:
role: rol
inheritsFrom: hereda

View File

@ -0,0 +1,5 @@
name: role
columns:
id: id
name: name
description: description

View File

@ -0,0 +1,5 @@
name: rol
columns:
id: id
name: nombre
description: descripción

View File

@ -1,4 +1,4 @@
name: account name: user
columns: columns:
id: id id: id
name: name name: name
@ -6,7 +6,7 @@ columns:
nickname: nickname nickname: nickname
lang: lang lang: lang
password: password password: password
bcryptPassword: bcrypt password bcryptPassword: BCRYPT password
active: active active: active
email: email email: email
emailVerified: email verified emailVerified: email verified

View File

@ -1,4 +1,4 @@
name: cuenta name: usuario
columns: columns:
id: id id: id
name: nombre name: nombre
@ -6,12 +6,12 @@ columns:
nickname: apodo nickname: apodo
lang: idioma lang: idioma
password: contraseña password: contraseña
bcryptPassword: contraseña bcrypt bcryptPassword: contraseña BCRYPT
active: activo active: activo
email: email email: correo electrónico
emailVerified: email verificado emailVerified: correo verificado
created: creado created: creado
updated: actualizado updated: actualizado
image: imagen image: imagen
hasGrant: tiene permiso hasGrant: puede delegar
userFk: usuario userFk: usuario

View File

@ -1,4 +1,4 @@
name: claim beginning name: beginning
columns: columns:
id: id id: id
quantity: quantity quantity: quantity

View File

@ -1,4 +1,4 @@
name: comienzo reclamación name: comienzo
columns: columns:
id: id id: id
quantity: cantidad quantity: cantidad

View File

@ -1,4 +1,4 @@
name: claim development name: development
columns: columns:
id: id id: id
claimFk: claim claimFk: claim

View File

@ -1,4 +1,4 @@
name: desarrollo reclamación name: desarrollo
columns: columns:
id: id id: id
claimFk: reclamación claimFk: reclamación

View File

@ -1,4 +1,4 @@
name: claim dms name: document
columns: columns:
dmsFk: dms dmsFk: dms
claimFk: claim claimFk: claim

View File

@ -1,4 +1,4 @@
name: documento reclamación name: documento
columns: columns:
dmsFk: dms dmsFk: dms
claimFk: reclamación claimFk: reclamación

View File

@ -1,4 +1,4 @@
name: claim end name: end
columns: columns:
id: id id: id
claimFk: claim claimFk: claim

View File

@ -1,4 +1,4 @@
name: final reclamación name: finalización
columns: columns:
id: id id: id
claimFk: reclamación claimFk: reclamación

View File

@ -1,4 +1,4 @@
name: claim observation name: observation
columns: columns:
id: id id: id
claimFk: claim claimFk: claim

View File

@ -1,4 +1,4 @@
name: observación reclamación name: observación
columns: columns:
id: id id: id
claimFk: reclamación claimFk: reclamación

View File

@ -18,3 +18,4 @@ columns:
addressFk: address addressFk: address
incotermsFk: incoterms incotermsFk: incoterms
customsAgentFk: customs agent customsAgentFk: customs agent
isDefaultAddress: default

View File

@ -18,3 +18,4 @@ columns:
addressFk: dirección addressFk: dirección
incotermsFk: incoterms incotermsFk: incoterms
customsAgentFk: agente adunanas customsAgentFk: agente adunanas
isDefaultAddress: predeterminada

View File

@ -1,4 +1,4 @@
name: client contact name: contact
columns: columns:
id: id id: id
name: name name: name

View File

@ -1,4 +1,4 @@
name: contacto cliente name: contacto
columns: columns:
id: id id: id
name: nombre name: nombre

View File

@ -1,4 +1,4 @@
name: client dms name: document
columns: columns:
dmsFk: dms dmsFk: dms
clientFk: client clientFk: client

View File

@ -1,4 +1,4 @@
name: documento cliente name: documento
columns: columns:
dmsFk: dms dmsFk: dms
clientFk: client clientFk: client

View File

@ -1,4 +1,4 @@
name: client observation name: observation
columns: columns:
id: id id: id
clientFk: client clientFk: client

View File

@ -1,4 +1,4 @@
name: observación cliente name: observación
columns: columns:
id: id id: id
clientFk: cliente clientFk: cliente

View File

@ -1,4 +1,4 @@
name: client sample name: sample
columns: columns:
id: id id: id
created: created created: created
@ -6,3 +6,5 @@ columns:
typeFk: type typeFk: type
userFk: user userFk: user
companyFk: company companyFk: company
workerFk: worker
balance: balance

View File

@ -1,4 +1,4 @@
name: muestra cliente name: muestra
columns: columns:
id: id id: id
created: creado created: creado
@ -6,3 +6,5 @@ columns:
typeFk: tipo typeFk: tipo
userFk: usuario userFk: usuario
companyFk: compañia companyFk: compañia
workerFk: trabajador
balance: balance

View File

@ -2,7 +2,7 @@ name: client
columns: columns:
id: id id: id
name: name name: name
fi: fi fi: tax identifier
socialName: socialName socialName: socialName
contact: contact contact: contact
street: street street: street
@ -14,22 +14,22 @@ columns:
isActive: active isActive: active
credit: credit credit: credit
creditInsurance: credit insurance creditInsurance: credit insurance
iban: iban iban: IBAN
dueDay: due day dueDay: due day
isEqualizated: equalizated isEqualizated: equalizated
isFreezed: freezed isFreezed: freezed
hasToInvoiceByAddress: invoice by address hasToInvoiceByAddress: invoice by address
hasToInvoice: has to invoice hasToInvoice: has to invoice
isToBeMailed: be mailed isToBeMailed: mailed
hasSepaVnl: sepa nnl hasSepaVnl: sepa VNL
hasLcr: lcr hasLcr: LCR
hasCoreVnl: core vnl hasCoreVnl: core VNL
hasCoreVnh: core vnh hasCoreVnh: core VNH
hasIncoterms: incoterms hasIncoterms: incoterms
isTaxDataChecked: tax data checked isTaxDataChecked: tax data checked
eypbc: eypbc eypbc: EYPBC
quality: quality quality: quality
isVies: vies isVies: VIES
isRelevant: relevant isRelevant: relevant
accountingAccount: accounting account accountingAccount: accounting account
created: created created: created
@ -47,4 +47,9 @@ columns:
defaultAddressFk: default address defaultAddressFk: default address
bankEntityFk: bank entity bankEntityFk: bank entity
transferorFk: transferor transferorFk: transferor
riskCalculated: risk calculated
isCreatedAsServed: created as served
hasInvoiceSimplified: simplified invoice
typeFk: type
lastSalesPersonFk: last salesperson

View File

@ -2,7 +2,7 @@ name: cliente
columns: columns:
id: id id: id
name: nombre name: nombre
fi: fi fi: identificador fiscal
socialName: nombre social socialName: nombre social
contact: contacto contact: contacto
street: calle street: calle
@ -14,27 +14,27 @@ columns:
isActive: activo isActive: activo
credit: crédito credit: crédito
creditInsurance: seguro crédito creditInsurance: seguro crédito
iban: iban iban: IBAN
dueDay: día vencimiento dueDay: día vencimiento
isEqualizated: igualado isEqualizated: igualado
isFreezed: congelado isFreezed: congelado
hasToInvoiceByAddress: factura por dirección hasToInvoiceByAddress: factura por dirección
hasToInvoice: tiene que facturar hasToInvoice: tiene que facturar
isToBeMailed: envío por email isToBeMailed: envío por email
hasSepaVnl: sepa nnl hasSepaVnl: sepa VNL
hasLcr: lcr hasLcr: LCR
hasCoreVnl: centro vnl hasCoreVnl: centro VNL
hasCoreVnh: cenrto vnh hasCoreVnh: centro VNH
hasIncoterms: incoterms hasIncoterms: incoterms
isTaxDataChecked: datos fiscales comprobados isTaxDataChecked: datos fiscales comprobados
eypbc: eypbc eypbc: EYPBC
quality: calidad quality: calidad
isVies: vies isVies: VIES
isRelevant: importante isRelevant: importante
accountingAccount: cuenta contable accountingAccount: cuenta contable
created: creado created: creado
sageTaxTypeFk: tipo impuesto sage sageTaxTypeFk: tipo impuesto sage
sageTransactionTypeFk: tipo transacción sage sageTransactionTypeFk: tipo transacción Sage
businessTypeFk: tipo negocio businessTypeFk: tipo negocio
salesPersonFk: comercial salesPersonFk: comercial
hasElectronicInvoice: factura electrónica hasElectronicInvoice: factura electrónica
@ -47,4 +47,9 @@ columns:
defaultAddressFk: dirección predeterminada defaultAddressFk: dirección predeterminada
bankEntityFk: entidad bancaria bankEntityFk: entidad bancaria
transferorFk: cedente transferorFk: cedente
riskCalculated: riesgo calculado
isCreatedAsServed: creado como servido
hasInvoiceSimplified: factura simple
typeFk: tipo
lastSalesPersonFk: último comercial

View File

@ -1,4 +1,4 @@
name: tpv transaction name: TPV transaction
columns: columns:
id: id id: id
merchantFk: merchant merchantFk: merchant

View File

@ -1,4 +1,4 @@
name: transacción tpv name: transacción TPV
columns: columns:
id: id id: id
merchantFk: comerciante merchantFk: comerciante

View File

@ -1,4 +1,4 @@
name: entry observation name: observation
columns: columns:
id: id id: id
description: description description: description

View File

@ -1,4 +1,4 @@
name: observación entrada name: observación
columns: columns:
id: id id: id
description: descripción description: descripción

View File

@ -1,4 +1,4 @@
name: item barcode name: barcode
columns: columns:
id: id id: id
code: code code: code

View File

@ -1,4 +1,4 @@
name: código barras artículo name: código barras
columns: columns:
id: id id: id
code: código code: código

View File

@ -1,4 +1,4 @@
name: item botanical name: botanical
columns: columns:
itemFk: item itemFk: item
genusFk: genus genusFk: genus

View File

@ -1,4 +1,4 @@
name: artículo botánico name: botánico
columns: columns:
itemFk: artículo itemFk: artículo
genusFk: género genusFk: género

View File

@ -1,4 +1,4 @@
name: item tag name: tag
columns: columns:
id: id id: id
value: value value: value

View File

@ -1,4 +1,4 @@
name: etiqueta artículo name: etiqueta
columns: columns:
id: id id: id
value: valor value: valor

View File

@ -1,4 +1,4 @@
name: item tax country name: country tax
columns: columns:
id: id id: id
effectived: effectived effectived: effectived

View File

@ -1,7 +1,7 @@
name: impuesto país del artículo name: impuesto país
columns: columns:
id: id id: id
effectived: efectivo effectived: efectivo
itemFk: artículo itemFk: artículo
countryFk: país countryFk: país
taxClassFk: clase impuestos taxClassFk: clase impuesto

View File

@ -44,4 +44,6 @@ columns:
intrastatFk: intrastat intrastatFk: intrastat
genericFk: generic genericFk: generic
itemFk: item itemFk: item
density: density
compression: compression

View File

@ -27,8 +27,8 @@ columns:
value9: valor9 value9: valor9
tag10: etiqueta10 tag10: etiqueta10
value10: valor10 value10: valor10
itemPackingTypeFk: embalaje del artículo itemPackingTypeFk: tipo embalaje
hasKgPrice: tiene precio kg hasKgPrice: precio kg
family: familia family: familia
expenseFk: gasto expenseFk: gasto
minPrice: precio mínimo minPrice: precio mínimo
@ -44,4 +44,6 @@ columns:
intrastatFk: intrastat intrastatFk: intrastat
genericFk: genérico genericFk: genérico
itemFk: artículo itemFk: artículo
density: densidad
compression: compresión

View File

@ -1,14 +1,14 @@
name: ruta name: ruta
columns: columns:
id: id id: id
created: creado created: creada
time: tiempo time: tiempo
kmStart: km inicio kmStart: km inicio
kmEnd: km fin kmEnd: km fin
started: comenzado started: empezada
finished: terminado finished: terminada
gestdoc: gestdoc gestdoc: gestdoc
cost: costo cost: coste
m3: m3 m3: m3
description: descripción description: descripción
isOk: ok isOk: ok

View File

@ -1,7 +1,7 @@
name: supplier account name: account
columns: columns:
id: id id: id
iban: iban iban: IBAN
beneficiary: beneficiary beneficiary: beneficiary
supplierFk: supplier supplierFk: supplier
bankEntityFk: bank entity bankEntityFk: bank entity

View File

@ -1,7 +1,7 @@
name: cuenta proveedor name: cuenta
columns: columns:
id: id id: id
iban: iban iban: IBAN
beneficiary: beneficiario beneficiary: beneficiario
supplierFk: proveedor supplierFk: proveedor
bankEntityFk: entidad bancaria bankEntityFk: entidad bancaria

View File

@ -1,4 +1,4 @@
name: supplier contact name: contact
columns: columns:
id: id id: id
supplierFk: supplier supplierFk: supplier

View File

@ -1,4 +1,4 @@
name: contacto proveedor name: contacto
columns: columns:
id: id id: id
supplierFk: proveedor supplierFk: proveedor

View File

@ -4,7 +4,7 @@ columns:
name: name name: name
account: account account: account
countryFk: country countryFk: country
nif: nif nif: NIF
phone: phone phone: phone
retAccount: ret account retAccount: ret account
commission: commission commission: commission

View File

@ -4,7 +4,7 @@ columns:
name: nombre name: nombre
account: cuenta account: cuenta
countryFk: país countryFk: país
nif: nif nif: NIF
phone: teléfono phone: teléfono
retAccount: cuenta ret retAccount: cuenta ret
commission: comisión commission: comisión

View File

@ -8,3 +8,7 @@ columns:
agencyModeFk: agency agencyModeFk: agency
workerFk: worker workerFk: worker
packagingFk: packaging packagingFk: packaging
hasNewRoute: new route
hostFk: PC
isBox: box
itemPackingTypeFk: packing type

View File

@ -8,3 +8,7 @@ columns:
agencyModeFk: agencia agencyModeFk: agencia
workerFk: trabajador workerFk: trabajador
packagingFk: embalaje packagingFk: embalaje
hasNewRoute: nueva ruta
hostFk: PC
isBox: caja
itemPackingTypeFk: tipo empaquetado

View File

@ -1,5 +1,6 @@
name: sale name: sale
columns: columns:
id: id
concept: concept concept: concept
quantity: quantity quantity: quantity
price: price price: price
@ -11,3 +12,7 @@ columns:
itemFk: item itemFk: item
ticketFk: ticket ticketFk: ticket
saleFk: sale saleFk: sale
priceFixed: price fixed
isPriceFixed: has fixed price
isAdded: added
total: total

View File

@ -1,13 +1,18 @@
name: línea name: línea
columns: columns:
id: id
concept: concepto concept: concepto
quantity: cantidad quantity: cantidad
price: precio price: precio
discount: descuento discount: descuento
reserved: reservado reserved: reservado
isPicked: esta seleccionado isPicked: cogida
created: creado created: creado
originalQuantity: cantidad original originalQuantity: cantidad original
itemFk: artículo itemFk: artículo
ticketFk: ticket ticketFk: ticket
saleFk: línea saleFk: línea
priceFixed: precio fijado
isPriceFixed: tiene precio fijado
isAdded: añadida
total: total

View File

@ -1,4 +1,4 @@
name: ticket dms name: document
columns: columns:
dmsFk: dms dmsFk: dms
ticketFk: ticket ticketFk: ticket

View File

@ -1,4 +1,4 @@
name: documento ticket name: documento
columns: columns:
dmsFk: dms dmsFk: dms
ticketFk: ticket ticketFk: ticket

View File

@ -1,4 +1,4 @@
name: ticket observation name: observation
columns: columns:
id: id id: id
description: description description: description

View File

@ -1,4 +1,4 @@
name: observación ticket name: observación
columns: columns:
id: id id: id
description: descripción description: descripción

View File

@ -1,4 +1,4 @@
name: ticket packaging name: packaging
columns: columns:
id: id id: id
quantity: quantity quantity: quantity

View File

@ -1,4 +1,4 @@
name: embalaje ticket name: embalaje
columns: columns:
id: id id: id
quantity: cantidad quantity: cantidad

View File

@ -1,4 +1,4 @@
name: ticket refund name: refund
columns: columns:
id: id id: id
refundTicketFk: refund ticket refundTicketFk: refund ticket

View File

@ -1,4 +1,4 @@
name: ticket abono name: abono
columns: columns:
id: id id: id
refundTicketFk: ticket abono refundTicketFk: ticket abono

View File

@ -1,4 +1,4 @@
name: ticket request name: request
columns: columns:
id: id id: id
description: description description: description

View File

@ -1,4 +1,4 @@
name: peticiones ticket name: peticion
columns: columns:
id: id id: id
description: descripción description: descripción

View File

@ -1,4 +1,4 @@
name: ticket service name: service
columns: columns:
id: id id: id
ticketFk: ticket ticketFk: ticket

View File

@ -1,4 +1,4 @@
name: servicios ticket name: servicio
columns: columns:
id: id id: id
ticketFk: ticket ticketFk: ticket

View File

@ -1,7 +1,8 @@
name: ticket tracking name: state
columns: columns:
id: id id: id
created: created created: created
ticketFk: ticket ticketFk: ticket
stateFk: state stateFk: state
workerFk: worker workerFk: worker
failFk: fail

View File

@ -1,7 +1,8 @@
name: seguimiento ticket name: estado
columns: columns:
id: id id: id
created: creado created: creado
ticketFk: ticket ticketFk: ticket
stateFk: estado stateFk: estado
workerFk: trabajador workerFk: trabajador
failFk: fallo

View File

@ -1,5 +1,6 @@
name: ticket name: ticket
columns: columns:
id: id
shipped: shipped shipped: shipped
landed: landed landed: landed
nickname: nickname nickname: nickname
@ -23,3 +24,14 @@ columns:
agencyModeFk: agency agencyModeFk: agency
ticketFk: ticket ticketFk: ticket
mergedTicket: merged ticket mergedTicket: merged ticket
withWarningAccept: negative warning
isWithoutNegatives: without negatives
isSigned: signed
isLabeled: labeled
isPrinted: printed
hour: hour
created: created
isBlocked: bloqued
hasPriority: priority
isBoxed: boxed
clonedFrom: cloned from

View File

@ -1,5 +1,6 @@
name: ticket name: ticket
columns: columns:
id: id
shipped: salida shipped: salida
landed: entrega landed: entrega
nickname: alias nickname: alias
@ -25,3 +26,12 @@ columns:
mergedTicket: ticket fusionado mergedTicket: ticket fusionado
withWarningAccept: aviso negativos withWarningAccept: aviso negativos
isWithoutNegatives: sin negativos isWithoutNegatives: sin negativos
isSigned: firmado
isLabeled: etiquetado
isPrinted: impreso
hour: hora
created: creado
isBlocked: bloqueado
hasPriority: prioritario
isBoxed: encajado
clonedFrom: Clonado de

View File

@ -194,7 +194,10 @@ class Controller extends Section {
} }
createClaim() { createClaim() {
const timeDifference = new Date().getTime() - new Date(this.ticket.shipped).getTime(); const today = new Date();
today.setHours(0, 0, 0, 0);
const timeDifference = today.getTime() - new Date(this.ticket.landed).getTime();
const pastDays = Math.floor(timeDifference / 86400000); const pastDays = Math.floor(timeDifference / 86400000);
if (pastDays >= this.ticketConfig[0].daysForWarningClaim) if (pastDays >= this.ticketConfig[0].daysForWarningClaim)

View File

@ -1,4 +1,4 @@
name: travel thermograph name: thermograph
columns: columns:
id: id id: id
created: created created: created
@ -6,5 +6,5 @@ columns:
result: result result: result
warehouseFk: warehouse warehouseFk: warehouse
travelFk: travel travelFk: travel
dmsFk: dms dmsFk: document
thermographFk: thermograph thermographFk: thermograph

View File

@ -1,4 +1,4 @@
name: travel thermograph name: termógrafo
columns: columns:
id: id id: id
created: creado created: creado
@ -6,5 +6,5 @@ columns:
result: resultado result: resultado
warehouseFk: almacén warehouseFk: almacén
travelFk: envío travelFk: envío
dmsFk: dms dmsFk: documento
thermographFk: termógrafo thermographFk: termógrafo

View File

@ -0,0 +1,12 @@
name: contrato
columns:
id: id
companyCodeFk: company
started: started
ended: ended
payedHolidays: payed holidays
workerFk: worker
calendarTypeFk: calendar type
isHourlyLabor: hourly labor
workcenterFk: workcenter
amount: amount

View File

@ -0,0 +1,12 @@
name: contrato
columns:
id: id
companyCodeFk: empresa
started: iniciado
ended: finalizado
payedHolidays: vacaciones pagadas
workerFk: trabajador
calendarTypeFk: tipo calendario
isHourlyLabor: horario laboral
workcenterFk: centro de trabajo
amount: salario

View File

@ -1,4 +1,4 @@
name: worker dms name: document
columns: columns:
id: id id: id
dmsFk: dms dmsFk: dms

View File

@ -1,4 +1,4 @@
name: documento trabajador name: documento
columns: columns:
id: id id: id
dmsFk: dms dmsFk: dms

View File

@ -1,4 +1,4 @@
name: worker time control mail name: time control mail
columns: columns:
id: id id: id
workerFk: worker workerFk: worker

View File

@ -1,4 +1,4 @@
name: correo de control de tiempo del trabajador name: correo de fichadas
columns: columns:
id: id id: id
workerFk: trabajador workerFk: trabajador

View File

@ -169,7 +169,7 @@ module.exports = Self => {
args.lastNames, args.lastNames,
args.fi, args.fi,
args.street, args.street,
args.postalCode, args.postcode,
args.city, args.city,
args.provinceFk, args.provinceFk,
args.companyFk, args.companyFk,
@ -186,7 +186,7 @@ module.exports = Self => {
street: args.street, street: args.street,
city: args.city, city: args.city,
provinceFk: args.provinceFk, provinceFk: args.provinceFk,
postalCode: args.postalCode, postalCode: args.postcode,
mobile: args.phone, mobile: args.phone,
nickname: nickname, nickname: nickname,
isDefaultAddress: true, isDefaultAddress: true,

View File

@ -19,7 +19,7 @@
</tr> </tr>
<tr> <tr>
<td class="font gray uppercase">{{$t('date')}}</td> <td class="font gray uppercase">{{$t('date')}}</td>
<th>{{formatDate(invoice.created, '%d-%m-%Y')}}</th> <th>{{formatDate(invoice.issued, '%d-%m-%Y')}}</th>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -1,7 +1,7 @@
SELECT SELECT
i.supplierRef, i.supplierRef,
s.id supplierId, s.id supplierId,
i.created, i.issued,
s.name, s.name,
s.street AS postalAddress, s.street AS postalAddress,
s.nif, s.nif,