2691 - Added "or" between date ranges and scope days
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
f8ba2534cc
commit
ffdc753ad4
|
@ -187,7 +187,10 @@ export default class Field extends FormInput {
|
||||||
}
|
}
|
||||||
|
|
||||||
onChange() {
|
onChange() {
|
||||||
|
// Changes doesn't reflect until appling async
|
||||||
|
this.$.$applyAsync(() => {
|
||||||
this.emit('change', {value: this.field});
|
this.emit('change', {value: this.field});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Field.$inject = ['$element', '$scope'];
|
Field.$inject = ['$element', '$scope'];
|
||||||
|
|
|
@ -27,13 +27,13 @@
|
||||||
vn-one
|
vn-one
|
||||||
label="From"
|
label="From"
|
||||||
ng-model="filter.from"
|
ng-model="filter.from"
|
||||||
on-change="$ctrl.from = value">
|
on-change="filter.scopeDays = null">
|
||||||
</vn-date-picker>
|
</vn-date-picker>
|
||||||
<vn-date-picker
|
<vn-date-picker
|
||||||
vn-one
|
vn-one
|
||||||
label="To"
|
label="To"
|
||||||
ng-model="filter.to"
|
ng-model="filter.to"
|
||||||
on-change="$ctrl.to = value">
|
on-change="filter.scopeDays = null">
|
||||||
</vn-date-picker>
|
</vn-date-picker>
|
||||||
<vn-none class="or vn-px-md">O</vn-none>
|
<vn-none class="or vn-px-md">O</vn-none>
|
||||||
<vn-input-number
|
<vn-input-number
|
||||||
|
@ -45,6 +45,10 @@
|
||||||
on-change="$ctrl.scopeDays = value"
|
on-change="$ctrl.scopeDays = value"
|
||||||
display-controls="true">
|
display-controls="true">
|
||||||
</vn-input-number>
|
</vn-input-number>
|
||||||
|
<vn-icon color-marginal
|
||||||
|
icon="info"
|
||||||
|
vn-tooltip="Cannot choose a range of dates and days onward at the same time">
|
||||||
|
</vn-icon>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
</section>
|
</section>
|
||||||
<vn-horizontal class="vn-px-lg">
|
<vn-horizontal class="vn-px-lg">
|
||||||
|
|
|
@ -24,26 +24,6 @@ class Controller extends SearchPanel {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
get from() {
|
|
||||||
return this._from;
|
|
||||||
}
|
|
||||||
|
|
||||||
set from(value) {
|
|
||||||
this._from = value;
|
|
||||||
|
|
||||||
this.filter.scopeDays = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
get to() {
|
|
||||||
return this._to;
|
|
||||||
}
|
|
||||||
|
|
||||||
set to(value) {
|
|
||||||
this._to = value;
|
|
||||||
|
|
||||||
this.filter.scopeDays = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
get scopeDays() {
|
get scopeDays() {
|
||||||
return this._scopeDays;
|
return this._scopeDays;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ describe('Ticket Component vnTicketSearchPanel', () => {
|
||||||
$httpBackend = _$httpBackend_;
|
$httpBackend = _$httpBackend_;
|
||||||
controller = $componentController('vnTicketSearchPanel', {$element: null});
|
controller = $componentController('vnTicketSearchPanel', {$element: null});
|
||||||
controller.$t = () => {};
|
controller.$t = () => {};
|
||||||
|
controller.filter = {};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('getGroupedStates()', () => {
|
describe('getGroupedStates()', () => {
|
||||||
|
@ -32,4 +33,16 @@ describe('Ticket Component vnTicketSearchPanel', () => {
|
||||||
}]);
|
}]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('scopeDays() setter', () => {
|
||||||
|
it('should clear the date range', () => {
|
||||||
|
controller.filter.from = new Date();
|
||||||
|
controller.filter.to = new Date();
|
||||||
|
|
||||||
|
controller.scopeDays = 1;
|
||||||
|
|
||||||
|
expect(controller.filter.from).toBeNull();
|
||||||
|
expect(controller.filter.to).toBeNull();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,3 +17,4 @@ FREE: Libre
|
||||||
DELIVERED: Servido
|
DELIVERED: Servido
|
||||||
ON_PREPARATION: En preparacion
|
ON_PREPARATION: En preparacion
|
||||||
PACKED: Encajado
|
PACKED: Encajado
|
||||||
|
Cannot choose a range of dates and days onward at the same time: No se puede selecionar un rango de fechas y días en adelante a la vez
|
|
@ -8,6 +8,7 @@ form#ticket-form {
|
||||||
|
|
||||||
.scope-days {
|
.scope-days {
|
||||||
border: $border-thin-light;
|
border: $border-thin-light;
|
||||||
|
position: relative;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
||||||
& > p {
|
& > p {
|
||||||
|
@ -17,6 +18,13 @@ form#ticket-form {
|
||||||
|
|
||||||
.or {
|
.or {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 26px
|
font-size: 26px;
|
||||||
|
color: $color-font-secondary
|
||||||
|
}
|
||||||
|
|
||||||
|
vn-icon[icon="info"] {
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 2px
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,4 +4,4 @@ You are going to delete this weekly ticket: Vas a eliminar este ticket programad
|
||||||
This ticket will be removed from weekly tickets! Continue anyway?: Este ticket se eliminará de tickets programados! ¿Continuar de todas formas?
|
This ticket will be removed from weekly tickets! Continue anyway?: Este ticket se eliminará de tickets programados! ¿Continuar de todas formas?
|
||||||
Search weekly ticket by id or client id: Busca tickets programados por el identificador o el identificador del cliente
|
Search weekly ticket by id or client id: Busca tickets programados por el identificador o el identificador del cliente
|
||||||
Search by weekly ticket: Buscar por tickets programados
|
Search by weekly ticket: Buscar por tickets programados
|
||||||
weekDay: Dia
|
Weekday: Llegada
|
Loading…
Reference in New Issue