Merge branch 'master' into Hotfix-crear-report-Factura-Electronica
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
commit
314bd69d6e
|
@ -27,7 +27,7 @@
|
|||
<section>
|
||||
<vn-tool-bar class="vn-mb-md">
|
||||
<vn-button
|
||||
disabled="!$ctrl.hasDateRange"
|
||||
disabled="!travels.length"
|
||||
icon="picture_as_pdf"
|
||||
ng-click="$ctrl.showReport()"
|
||||
vn-tooltip="Open as PDF">
|
||||
|
|
|
@ -43,16 +43,6 @@ class Controller extends Section {
|
|||
this.smartTableOptions = {};
|
||||
}
|
||||
|
||||
get hasDateRange() {
|
||||
const userParams = this.$.model.userParams;
|
||||
const hasLanded = userParams.landedTo;
|
||||
const hasShipped = userParams.shippedFrom;
|
||||
const hasContinent = userParams.continent;
|
||||
const hasWarehouseOut = userParams.warehouseOutFk;
|
||||
|
||||
return hasLanded || hasShipped || hasContinent || hasWarehouseOut;
|
||||
}
|
||||
|
||||
onDragInterval() {
|
||||
if (this.dragClientY > 0 && this.dragClientY < 75)
|
||||
this.$window.scrollTo(0, this.$window.scrollY - 10);
|
||||
|
|
|
@ -14,17 +14,6 @@ describe('Travel Component vnTravelExtraCommunity', () => {
|
|||
controller.$.model.refresh = jest.fn();
|
||||
}));
|
||||
|
||||
describe('hasDateRange()', () => {
|
||||
it('should return truthy when shippedFrom or landedTo are set as userParams', () => {
|
||||
const now = new Date();
|
||||
controller.$.model.userParams = {shippedFrom: now, landedTo: now};
|
||||
|
||||
const result = controller.hasDateRange;
|
||||
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('findDraggable()', () => {
|
||||
it('should find the draggable element', () => {
|
||||
const draggable = document.createElement('tr');
|
||||
|
|
Loading…
Reference in New Issue