refs #5275 feat: colorear fechas
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:
parent
fb1b39da17
commit
b4e04fcdad
|
@ -152,18 +152,22 @@
|
||||||
</vn-input-number>
|
</vn-input-number>
|
||||||
</td>
|
</td>
|
||||||
<td shrink-date>
|
<td shrink-date>
|
||||||
<vn-date-picker
|
<vn-chip class="chip {{$ctrl.isBigger(price.started)}} transparent">
|
||||||
vn-one
|
<vn-date-picker
|
||||||
ng-model="price.started"
|
vn-one
|
||||||
on-change="$ctrl.upsertPrice(price)">
|
ng-model="price.started"
|
||||||
</vn-date-picker>
|
on-change="$ctrl.upsertPrice(price)">
|
||||||
|
</vn-date-picker>
|
||||||
|
</vn-chip>
|
||||||
</td>
|
</td>
|
||||||
<td shrink-date>
|
<td shrink-date>
|
||||||
<vn-date-picker
|
<vn-chip class="chip {{$ctrl.isLower(price.ended)}} transparent">
|
||||||
vn-one
|
<vn-date-picker
|
||||||
ng-model="price.ended"
|
vn-one
|
||||||
on-change="$ctrl.upsertPrice(price)">
|
ng-model="price.ended"
|
||||||
</vn-date-picker>
|
on-change="$ctrl.upsertPrice(price)">
|
||||||
|
</vn-date-picker>
|
||||||
|
</vn-chip>
|
||||||
</td>
|
</td>
|
||||||
<td shrink>
|
<td shrink>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
|
|
@ -32,6 +32,28 @@ export default class Controller extends Section {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isBigger(date) {
|
||||||
|
let today = Date.vnNew();
|
||||||
|
today.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
date = new Date(date);
|
||||||
|
date.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
const timeDifference = today - date;
|
||||||
|
if (timeDifference < 0) return 'warning';
|
||||||
|
}
|
||||||
|
|
||||||
|
isLower(date) {
|
||||||
|
let today = Date.vnNew();
|
||||||
|
today.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
date = new Date(date);
|
||||||
|
date.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
const timeDifference = today - date;
|
||||||
|
if (timeDifference > 0) return 'warning';
|
||||||
|
}
|
||||||
|
|
||||||
add() {
|
add() {
|
||||||
if (!this.$.model.data || this.$.model.data.length == 0) {
|
if (!this.$.model.data || this.$.model.data.length == 0) {
|
||||||
this.$.model.data = [];
|
this.$.model.data = [];
|
||||||
|
|
|
@ -1,20 +1,34 @@
|
||||||
@import "variables";
|
@import "variables";
|
||||||
smart-table table{
|
vn-fixed-price{
|
||||||
[shrink-field]{
|
smart-table table{
|
||||||
width: 80px;
|
[shrink-field]{
|
||||||
max-width: 80px;
|
width: 80px;
|
||||||
|
max-width: 80px;
|
||||||
|
}
|
||||||
|
[shrink-field-expand]{
|
||||||
|
width: 150px;
|
||||||
|
max-width: 150px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
[shrink-field-expand]{
|
|
||||||
width: 150px;
|
|
||||||
max-width: 150px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.minPrice {
|
.minPrice {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vn-input-number {
|
vn-input-number {
|
||||||
width: 90px;
|
width: 90px;
|
||||||
max-width: 90px;
|
max-width: 90px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
smart-table table tbody > * > td .chip {
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
smart-table table tbody > * > td .chip.warning {
|
||||||
|
color: $color-font-bg
|
||||||
|
}
|
||||||
|
|
||||||
|
.vn-field > .container > .infix > .control > input {
|
||||||
|
color: inherit;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue