parent
2636e2d221
commit
52e26eb99d
|
@ -113,34 +113,31 @@ vn-table {
|
||||||
&.clickable {
|
&.clickable {
|
||||||
@extend %clickable;
|
@extend %clickable;
|
||||||
}
|
}
|
||||||
& > vn-td > .chip {
|
& > vn-td .chip {
|
||||||
padding: .3em;
|
padding: .3em;
|
||||||
border-radius: .3em;
|
border-radius: .3em;
|
||||||
}
|
}
|
||||||
&.notice,
|
|
||||||
& > .notice,
|
& > vn-td .chip.notice {
|
||||||
& > vn-td > .notice {
|
|
||||||
color: $color-font-bg;
|
color: $color-font-bg;
|
||||||
background-color: $color-notice-medium;
|
background-color: $color-notice-medium
|
||||||
}
|
}
|
||||||
&.success,
|
|
||||||
& > .success,
|
& > vn-td .chip.success {
|
||||||
& > vn-td > .success {
|
|
||||||
color: $color-font-bg;
|
color: $color-font-bg;
|
||||||
background-color: $color-success-medium;
|
background-color: $color-success-medium
|
||||||
}
|
}
|
||||||
&.warning,
|
|
||||||
& > .warning,
|
& > vn-td .chip.warning {
|
||||||
& > vn-td > .warning {
|
|
||||||
color: $color-font-bg;
|
color: $color-font-bg;
|
||||||
background-color: $color-main-medium;
|
background-color: $color-main-medium;
|
||||||
}
|
}
|
||||||
&.alert,
|
|
||||||
& > .alert,
|
& > vn-td .chip.alert {
|
||||||
& > vn-td > .alert {
|
|
||||||
color: $color-font-bg;
|
color: $color-font-bg;
|
||||||
background-color: $color-alert-medium;
|
background-color: $color-alert-medium;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > [actions] {
|
& > [actions] {
|
||||||
width: 1px;
|
width: 1px;
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,13 @@ September: Septiembre
|
||||||
October: Octubre
|
October: Octubre
|
||||||
November: Noviembre
|
November: Noviembre
|
||||||
December: Diciembre
|
December: Diciembre
|
||||||
|
Monday: Lunes
|
||||||
|
Tuesday: Martes
|
||||||
|
Wednesday: Miércoles
|
||||||
|
Thursday: Jueves
|
||||||
|
Friday: Viernes
|
||||||
|
Saturday: Sábado
|
||||||
|
Sunday: Domingo
|
||||||
Has delivery: Hay reparto
|
Has delivery: Hay reparto
|
||||||
Loading: Cargando
|
Loading: Cargando
|
||||||
Fields to show: Campos a mostrar
|
Fields to show: Campos a mostrar
|
||||||
|
|
|
@ -80,9 +80,9 @@
|
||||||
"This client can't be invoiced": "Este cliente no puede ser facturado",
|
"This client can't be invoiced": "Este cliente no puede ser facturado",
|
||||||
"This ticket can't be invoiced": "Este ticket 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 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",
|
"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",
|
"This ticket can not be modified": "Este ticket no puede ser modificado",
|
||||||
"The introduced hour already exists": "The introduced hour already exists",
|
"The introduced hour already exists": "Esta hora ya ha sido introducida",
|
||||||
"INFINITE_LOOP": "INFINITE_LOOP"
|
"INFINITE_LOOP": "Existe una dependencia entre dos Jefes"
|
||||||
}
|
}
|
|
@ -52,7 +52,7 @@ module.exports = Self => {
|
||||||
request.ticket().warehouseFk,
|
request.ticket().warehouseFk,
|
||||||
false
|
false
|
||||||
];
|
];
|
||||||
console.log(params);
|
|
||||||
let [res] = await Self.rawSql(query, params);
|
let [res] = await Self.rawSql(query, params);
|
||||||
let available = res[0].available;
|
let available = res[0].available;
|
||||||
if (!available)
|
if (!available)
|
||||||
|
|
|
@ -16,13 +16,6 @@ You have to allow pop-ups in your web browser to use this functionality:
|
||||||
Disc: Dto
|
Disc: Dto
|
||||||
Available: Disponible
|
Available: Disponible
|
||||||
In which day you want to add the ticket?: ¿A que dia quieres añadir el ticket?
|
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
|
Add claim: Crear reclamación
|
||||||
Claim: Reclamación
|
Claim: Reclamación
|
||||||
Transfer lines: Transferir líneas
|
Transfer lines: Transferir líneas
|
||||||
|
|
|
@ -12,27 +12,30 @@
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
<vn-td ng-repeat="weekday in $ctrl.weekDays" center>
|
<vn-td ng-repeat="weekday in $ctrl.weekDays" center>
|
||||||
<div translate>{{::$ctrl.weekdayNames[$index].name}}</div>
|
<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-td>
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
</vn-thead>
|
</vn-thead>
|
||||||
<vn-tbody>
|
<vn-tbody>
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
<vn-td ng-repeat="weekday in $ctrl.weekDays" class="hours" pad-none center>
|
<vn-td ng-repeat="weekday in $ctrl.weekDays" class="hours" pad-none center>
|
||||||
<vn-label-value ng-repeat="hour in weekday.hours"
|
<section ng-repeat="hour in weekday.hours" center>
|
||||||
label="{{($index % 2) == 0 ? 'In' : 'Out'}}"
|
<vn-icon
|
||||||
value="{{hour.timed | dateTime: 'HH:mm'}}">
|
icon="arrow_{{($index % 2) == 0 ? 'forward' : 'back'}}"
|
||||||
</vn-label-value>
|
title="{{(($index % 2) == 0 ? 'In' : 'Out') | translate}}">
|
||||||
|
</vn-icon>
|
||||||
|
<span class="chip notice">{{hour.timed | dateTime: 'HH:mm'}}</span>
|
||||||
|
</section>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
</vn-tbody>
|
</vn-tbody>
|
||||||
<vn-tfoot>
|
<vn-tfoot>
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
<vn-td center ng-repeat="weekday in $ctrl.weekDays">
|
<vn-td center ng-repeat="weekday in $ctrl.weekDays">
|
||||||
<vn-label-value
|
{{$ctrl.getWeekdayTotalHours(weekday)}} h.
|
||||||
label="Total"
|
|
||||||
value="{{$ctrl.getWeekdayTotalHours(weekday)}} h.">
|
|
||||||
</vn-label-value>
|
|
||||||
</vn-td>
|
</vn-td>
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
|
@ -74,7 +77,7 @@
|
||||||
<h5 style="text-align: center">
|
<h5 style="text-align: center">
|
||||||
<span translate>Add time</span>
|
<span translate>Add time</span>
|
||||||
</h5>
|
</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>
|
</div>
|
||||||
</tpl-body>
|
</tpl-body>
|
||||||
<tpl-buttons>
|
<tpl-buttons>
|
||||||
|
|
|
@ -2,10 +2,11 @@ import ngModule from '../module';
|
||||||
import './style.scss';
|
import './style.scss';
|
||||||
|
|
||||||
class Controller {
|
class Controller {
|
||||||
constructor($scope, $http, $stateParams) {
|
constructor($scope, $http, $stateParams, $element) {
|
||||||
this.$stateParams = $stateParams;
|
this.$stateParams = $stateParams;
|
||||||
this.$ = $scope;
|
this.$ = $scope;
|
||||||
this.$http = $http;
|
this.$http = $http;
|
||||||
|
this.$element = $element;
|
||||||
this.defaultDate = new Date();
|
this.defaultDate = new Date();
|
||||||
this.currentWeek = [];
|
this.currentWeek = [];
|
||||||
this.weekDays = [];
|
this.weekDays = [];
|
||||||
|
@ -209,14 +210,18 @@ class Controller {
|
||||||
showAddTimeDialog(weekday) {
|
showAddTimeDialog(weekday) {
|
||||||
const timed = new Date(weekday.dated);
|
const timed = new Date(weekday.dated);
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
|
|
||||||
now.setHours(now.getHours(), now.getMinutes(), 0, 0);
|
now.setHours(now.getHours(), now.getMinutes(), 0, 0);
|
||||||
now.setMonth(timed.getMonth());
|
now.setMonth(timed.getMonth());
|
||||||
now.setDate(timed.getDate());
|
now.setDate(timed.getDate());
|
||||||
|
|
||||||
|
|
||||||
this.newTime = now;
|
this.newTime = now;
|
||||||
this.selectedWeekday = weekday;
|
this.selectedWeekday = weekday;
|
||||||
this.$.addTimeDialog.show();
|
this.$.addTimeDialog.show();
|
||||||
|
|
||||||
|
const selector = 'vn-dialog[vn-id="addTimeDialog"] input[type="time"]';
|
||||||
|
const input = this.$element[0].querySelector(selector);
|
||||||
|
input.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
addTime(response) {
|
addTime(response) {
|
||||||
|
@ -230,7 +235,7 @@ class Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.$inject = ['$scope', '$http', '$stateParams'];
|
Controller.$inject = ['$scope', '$http', '$stateParams', '$element'];
|
||||||
|
|
||||||
ngModule.component('vnWorkerTimeControl', {
|
ngModule.component('vnWorkerTimeControl', {
|
||||||
template: require('./index.html'),
|
template: require('./index.html'),
|
||||||
|
|
|
@ -4,12 +4,14 @@ describe('Worker', () => {
|
||||||
describe('Component vnWorkerTimeControl', () => {
|
describe('Component vnWorkerTimeControl', () => {
|
||||||
let $scope;
|
let $scope;
|
||||||
let controller;
|
let controller;
|
||||||
|
let $element;
|
||||||
|
|
||||||
beforeEach(ngModule('worker'));
|
beforeEach(ngModule('worker'));
|
||||||
|
|
||||||
beforeEach(angular.mock.inject(($componentController, $rootScope) => {
|
beforeEach(angular.mock.inject(($componentController, $rootScope) => {
|
||||||
$scope = $rootScope.$new();
|
$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', () => {
|
describe('worker() setter', () => {
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
In: Entrada
|
In: Entrada
|
||||||
Out: Salida
|
Out: Salida
|
||||||
Monday: Lunes
|
|
||||||
Tuesday: Martes
|
|
||||||
Wednesday: Miércoles
|
|
||||||
Thursday: Jueves
|
|
||||||
Friday: Viernes
|
|
||||||
Saturday: Sábado
|
|
||||||
Sunday: Domingo
|
|
||||||
Hour: Hora
|
Hour: Hora
|
||||||
Hours: Horas
|
Hours: Horas
|
||||||
Add time: Añadir hora
|
Add time: Añadir hora
|
||||||
|
|
|
@ -9,8 +9,16 @@ vn-worker-time-control {
|
||||||
vn-td.hours {
|
vn-td.hours {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
|
||||||
vn-label-value {
|
& > section {
|
||||||
padding: .6em .5em
|
position: relative;
|
||||||
|
padding: .6em 0;
|
||||||
|
|
||||||
|
& > vn-icon {
|
||||||
|
position: absolute;
|
||||||
|
margin-left: -1.3em;
|
||||||
|
margin-top: -3px;
|
||||||
|
color: $color-font-secondary;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue