Merge branch 'dev' of https://git.verdnatura.es/salix into dev
This commit is contained in:
commit
df8d3078d9
|
@ -1,4 +1,4 @@
|
|||
<section ng-class="{'ellipsize': $ctrl.__ellipsize}">
|
||||
<vn-label translate>{{$ctrl.label}}:</vn-label>
|
||||
<span title="{{$ctrl.value}}">{{$ctrl.value ? $ctrl.value : '-'}}</span>
|
||||
<section class="ellipsize">
|
||||
<vn-label></vn-label>
|
||||
<span></span>
|
||||
</section>
|
|
@ -2,23 +2,35 @@ import ngModule from '../../module';
|
|||
import './style.scss';
|
||||
|
||||
export default class Controller {
|
||||
constructor() {
|
||||
this.__ellipsize = true;
|
||||
constructor($element, $translate) {
|
||||
this.element = $element[0];
|
||||
this._ = $translate;
|
||||
}
|
||||
|
||||
set ellipsize(value) {
|
||||
this.__ellipsize = value;
|
||||
set label(value) {
|
||||
let label = this.element.querySelector('vn-label');
|
||||
label.textContent = this._.instant(value) + ':';
|
||||
this._label = value;
|
||||
}
|
||||
get label() {
|
||||
return this._label;
|
||||
}
|
||||
set value(value) {
|
||||
let span = this.element.querySelector('span');
|
||||
span.title = value;
|
||||
span.textContent = value ? value : '-';
|
||||
this._value = value;
|
||||
}
|
||||
get value() {
|
||||
return this._value;
|
||||
}
|
||||
}
|
||||
Controller.$inject = ['$element', '$translate'];
|
||||
|
||||
ngModule.component('vnLabelValue', {
|
||||
template: require('./label-value.html'),
|
||||
controller: Controller,
|
||||
replace: true,
|
||||
transclude: true,
|
||||
template: require('./label-value.html'),
|
||||
bindings: {
|
||||
label: '@',
|
||||
value: '@',
|
||||
ellipsize: '<?'
|
||||
value: '@'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
@import "colors";
|
||||
|
||||
vn-label-value {
|
||||
& vn-label {
|
||||
vn-label-value > section {
|
||||
& > vn-label {
|
||||
color: $secondary-font-color;
|
||||
}
|
||||
|
||||
& span {
|
||||
& > span {
|
||||
color: $main-font-color;
|
||||
}
|
||||
}
|
|
@ -136,6 +136,7 @@ ngModule.component('vnCrudModel', {
|
|||
bindings: {
|
||||
orgData: '<?',
|
||||
data: '=?',
|
||||
onDataChange: '&?',
|
||||
fields: '<?',
|
||||
link: '<?',
|
||||
url: '@?',
|
||||
|
|
|
@ -200,21 +200,26 @@ vn-main-block {
|
|||
text-decoration: none;
|
||||
color: inherit;
|
||||
|
||||
& > vn-horizontal > .buttons {
|
||||
align-items: center;
|
||||
& > vn-horizontal {
|
||||
& > vn-one {
|
||||
overflow: hidden;
|
||||
}
|
||||
& > .buttons {
|
||||
align-items: center;
|
||||
|
||||
vn-icon {
|
||||
opacity: .4;
|
||||
color: $main-01;
|
||||
margin-left: .5em;
|
||||
transition: opacity 250ms ease-out;
|
||||
font-size: 2em;
|
||||
vn-icon {
|
||||
opacity: .4;
|
||||
color: $main-01;
|
||||
margin-left: .5em;
|
||||
transition: opacity 250ms ease-out;
|
||||
font-size: 2em;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** START - FORM ELEMENTS DISABLED **/
|
||||
|
@ -237,5 +242,4 @@ fieldset[disabled] .mdl-textfield .mdl-textfield__label,
|
|||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
max-width: 20em
|
||||
}
|
|
@ -476,9 +476,9 @@ INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`,
|
|||
INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`)
|
||||
VALUES
|
||||
( 1, 1, 1, 'Gem of Time', 5 , 23.5, 0, 0, 0, CURDATE()),
|
||||
( 2, 2, 1, 'Gem of Mind', 10 , 1, 0, 0, 0, CURDATE()),
|
||||
( 2, 2, 1, 'Gem of Mind', 10 , 4.5, 0, 0, 0, CURDATE()),
|
||||
( 3, 1, 1, 'Gem of Time', 2 , 23.5, 0, 0, 0, CURDATE()),
|
||||
( 4, 4, 1, 'Mark I', 20 , 5.5, 0, 0, 0, CURDATE());
|
||||
( 4, 4, 1, 'Mark I', 20 , 9, 0, 0, 0, CURDATE());
|
||||
|
||||
INSERT INTO `vn`.`saleChecked`(`saleFk`, `isChecked`)
|
||||
VALUES
|
||||
|
|
|
@ -4,7 +4,7 @@ describe('ticket getVAT()', () => {
|
|||
it('should call the getVAT method and return the response', done => {
|
||||
app.models.Ticket.getVAT(1)
|
||||
.then(response => {
|
||||
expect(response).toEqual(40.55);
|
||||
expect(response).toEqual(58.75);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@ describe('ticket getTaxes()', () => {
|
|||
it('should call the getTaxes method', done => {
|
||||
app.models.Ticket.getTaxes(1)
|
||||
.then(response => {
|
||||
expect(response[0].tax).toEqual(17.45);
|
||||
expect(response[0].tax).toEqual(20.95);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@ describe('ticket getTotal()', () => {
|
|||
it('should call the getTotal method and return the response', done => {
|
||||
app.models.Ticket.getTotal(1)
|
||||
.then(response => {
|
||||
expect(response).toEqual(325.05);
|
||||
expect(response).toEqual(448.25);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue