mark manual lines #1449
gitea/salix/dev This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-05-21 12:56:29 +02:00
parent 2636e2d221
commit 52e26eb99d
10 changed files with 57 additions and 49 deletions

View File

@ -113,34 +113,31 @@ vn-table {
&.clickable {
@extend %clickable;
}
& > vn-td > .chip {
& > vn-td .chip {
padding: .3em;
border-radius: .3em;
}
&.notice,
& > .notice,
& > vn-td > .notice {
& > vn-td .chip.notice {
color: $color-font-bg;
background-color: $color-notice-medium;
background-color: $color-notice-medium
}
&.success,
& > .success,
& > vn-td > .success {
& > vn-td .chip.success {
color: $color-font-bg;
background-color: $color-success-medium;
background-color: $color-success-medium
}
&.warning,
& > .warning,
& > vn-td > .warning {
& > vn-td .chip.warning {
color: $color-font-bg;
background-color: $color-main-medium;
}
&.alert,
& > .alert,
& > vn-td > .alert {
& > vn-td .chip.alert {
color: $color-font-bg;
background-color: $color-alert-medium;
}
& > [actions] {
width: 1px;

View File

@ -37,6 +37,13 @@ September: Septiembre
October: Octubre
November: Noviembre
December: Diciembre
Monday: Lunes
Tuesday: Martes
Wednesday: Miércoles
Thursday: Jueves
Friday: Viernes
Saturday: Sábado
Sunday: Domingo
Has delivery: Hay reparto
Loading: Cargando
Fields to show: Campos a mostrar

View File

@ -80,9 +80,9 @@
"This client can't be invoiced": "Este cliente no puede ser facturado",
"This ticket can't be invoiced": "Este ticket no puede ser facturado",
"That item is not available on that day": "El item no esta disponible para esa fecha",
"That item doesn't exists": "That item doesn't exists",
"That item doesn't exists": "No existe el artículo",
"You cannot add or modify services to an invoiced ticket": "No puedes añadir o modificar servicios a un ticket facturado",
"This ticket can not be modified": "Este ticket no puede ser modificado",
"The introduced hour already exists": "The introduced hour already exists",
"INFINITE_LOOP": "INFINITE_LOOP"
"The introduced hour already exists": "Esta hora ya ha sido introducida",
"INFINITE_LOOP": "Existe una dependencia entre dos Jefes"
}

View File

@ -52,7 +52,7 @@ module.exports = Self => {
request.ticket().warehouseFk,
false
];
console.log(params);
let [res] = await Self.rawSql(query, params);
let available = res[0].available;
if (!available)

View File

@ -16,13 +16,6 @@ You have to allow pop-ups in your web browser to use this functionality:
Disc: Dto
Available: Disponible
In which day you want to add the ticket?: ¿A que dia quieres añadir el ticket?
Monday: Lunes
Tuesday: Martes
Wednesday: Miércoles
Thursday: Jueves
Friday: Viernes
Saturday: Sábado
Sunday: Domingo
Add claim: Crear reclamación
Claim: Reclamación
Transfer lines: Transferir líneas

View File

@ -12,27 +12,30 @@
<vn-tr>
<vn-td ng-repeat="weekday in $ctrl.weekDays" center>
<div translate>{{::$ctrl.weekdayNames[$index].name}}</div>
{{::weekday.dated | date: 'dd/MM/yyyy'}}
<span>{{::weekday.dated | date: 'dd'}}</span>
<span title="{{::weekday.dated | date: 'MMMM' | translate}}" translate>
{{::weekday.dated | date: 'MMMM'}}
</span>
</vn-td>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr>
<vn-td ng-repeat="weekday in $ctrl.weekDays" class="hours" pad-none center>
<vn-label-value ng-repeat="hour in weekday.hours"
label="{{($index % 2) == 0 ? 'In' : 'Out'}}"
value="{{hour.timed | dateTime: 'HH:mm'}}">
</vn-label-value>
<section ng-repeat="hour in weekday.hours" center>
<vn-icon
icon="arrow_{{($index % 2) == 0 ? 'forward' : 'back'}}"
title="{{(($index % 2) == 0 ? 'In' : 'Out') | translate}}">
</vn-icon>
<span class="chip notice">{{hour.timed | dateTime: 'HH:mm'}}</span>
</section>
</vn-td>
</vn-tr>
</vn-tbody>
<vn-tfoot>
<vn-tr>
<vn-td center ng-repeat="weekday in $ctrl.weekDays">
<vn-label-value
label="Total"
value="{{$ctrl.getWeekdayTotalHours(weekday)}} h.">
</vn-label-value>
{{$ctrl.getWeekdayTotalHours(weekday)}} h.
</vn-td>
</vn-tr>
<vn-tr>
@ -74,7 +77,7 @@
<h5 style="text-align: center">
<span translate>Add time</span>
</h5>
<vn-input-time vn-one model="$ctrl.newTime" label="Hour"></vn-input-time>
<vn-input-time vn-one model="$ctrl.newTime" label="Hour" vn-focus></vn-input-time>
</div>
</tpl-body>
<tpl-buttons>

View File

@ -2,10 +2,11 @@ import ngModule from '../module';
import './style.scss';
class Controller {
constructor($scope, $http, $stateParams) {
constructor($scope, $http, $stateParams, $element) {
this.$stateParams = $stateParams;
this.$ = $scope;
this.$http = $http;
this.$element = $element;
this.defaultDate = new Date();
this.currentWeek = [];
this.weekDays = [];
@ -209,14 +210,18 @@ class Controller {
showAddTimeDialog(weekday) {
const timed = new Date(weekday.dated);
const now = new Date();
now.setHours(now.getHours(), now.getMinutes(), 0, 0);
now.setMonth(timed.getMonth());
now.setDate(timed.getDate());
this.newTime = now;
this.selectedWeekday = weekday;
this.$.addTimeDialog.show();
const selector = 'vn-dialog[vn-id="addTimeDialog"] input[type="time"]';
const input = this.$element[0].querySelector(selector);
input.focus();
}
addTime(response) {
@ -230,7 +235,7 @@ class Controller {
}
}
Controller.$inject = ['$scope', '$http', '$stateParams'];
Controller.$inject = ['$scope', '$http', '$stateParams', '$element'];
ngModule.component('vnWorkerTimeControl', {
template: require('./index.html'),

View File

@ -4,12 +4,14 @@ describe('Worker', () => {
describe('Component vnWorkerTimeControl', () => {
let $scope;
let controller;
let $element;
beforeEach(ngModule('worker'));
beforeEach(angular.mock.inject(($componentController, $rootScope) => {
$scope = $rootScope.$new();
controller = $componentController('vnWorkerTimeControl', {$scope});
$element = angular.element('<vn-worker-time-control></vn-worker-time-control>');
controller = $componentController('vnWorkerTimeControl', {$scope, $element});
}));
describe('worker() setter', () => {

View File

@ -1,12 +1,5 @@
In: Entrada
Out: Salida
Monday: Lunes
Tuesday: Martes
Wednesday: Miércoles
Thursday: Jueves
Friday: Viernes
Saturday: Sábado
Sunday: Domingo
Hour: Hora
Hours: Horas
Add time: Añadir hora

View File

@ -9,8 +9,16 @@ vn-worker-time-control {
vn-td.hours {
vertical-align: top;
vn-label-value {
padding: .6em .5em
& > section {
position: relative;
padding: .6em 0;
& > vn-icon {
position: absolute;
margin-left: -1.3em;
margin-top: -3px;
color: $color-font-secondary;
}
}
}