Merge branch 'master' into Hotfix-crear-report-Factura-Electronica
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Pau 2022-12-22 06:13:01 +00:00
commit 314bd69d6e
3 changed files with 1 additions and 22 deletions

View File

@ -27,7 +27,7 @@
<section> <section>
<vn-tool-bar class="vn-mb-md"> <vn-tool-bar class="vn-mb-md">
<vn-button <vn-button
disabled="!$ctrl.hasDateRange" disabled="!travels.length"
icon="picture_as_pdf" icon="picture_as_pdf"
ng-click="$ctrl.showReport()" ng-click="$ctrl.showReport()"
vn-tooltip="Open as PDF"> vn-tooltip="Open as PDF">

View File

@ -43,16 +43,6 @@ class Controller extends Section {
this.smartTableOptions = {}; 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() { onDragInterval() {
if (this.dragClientY > 0 && this.dragClientY < 75) if (this.dragClientY > 0 && this.dragClientY < 75)
this.$window.scrollTo(0, this.$window.scrollY - 10); this.$window.scrollTo(0, this.$window.scrollY - 10);

View File

@ -14,17 +14,6 @@ describe('Travel Component vnTravelExtraCommunity', () => {
controller.$.model.refresh = jest.fn(); 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()', () => { describe('findDraggable()', () => {
it('should find the draggable element', () => { it('should find the draggable element', () => {
const draggable = document.createElement('tr'); const draggable = document.createElement('tr');