Merge branch 'dev' of https://git.verdnatura.es/salix into dev

This commit is contained in:
Javi Gallego 2018-05-03 19:31:40 +02:00
commit eaf4bbbdbb
6 changed files with 59 additions and 8 deletions

View File

@ -13,22 +13,22 @@
<vn-horizontal
vn-one class="list list-element text-center"
pad-small-bottom
ng-repeat="recovery in index.model.instances track by $index">
ng-repeat="recovery in $ctrl.instances track by $index">
<vn-none pad-medium-h style="color:#FFA410;">
<i class="material-icons"
<i class="material-icons pointer"
vn-tooltip="Finish that recovery period"
ng-if="!recovery.finished"
ng-click="$ctrl.setFinished(recovery)">lock</i>
</vn-none>
<vn-one pad-medium-h>{{recovery.started | date:'dd/MM/yyyy' }}</vn-one>
<vn-one pad-medium-h>{{::recovery.started | date:'dd/MM/yyyy' }}</vn-one>
<vn-one pad-medium-h>{{recovery.finished | date:'dd/MM/yyyy' }}</vn-one>
<vn-one pad-medium-h>{{recovery.amount | currency:'€':0}}</vn-one>
<vn-one pad-medium-h>{{recovery.period}}</vn-one>
<vn-one pad-medium-h>{{::recovery.amount | currency:'€':0}}</vn-one>
<vn-one pad-medium-h>{{::recovery.period}}</vn-one>
</vn-horizontal>
</vn-one>
<vn-one class="text-center pad-small-v" ng-if="index.model.count === 0" translate>No results</vn-one>
<vn-horizontal vn-one class="list list-footer"></vn-horizontal>
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
<vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging>
</vn-vertical>
</vn-card>
</vn-vertical>

View File

@ -0,0 +1,10 @@
USE `vn`;
CREATE
OR REPLACE ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `ticketWeekly` AS
SELECT
`t`.`Id_Ticket` AS `ticketFk`, `t`.`weekDay` AS `weekDay`
FROM
`vn2008`.`Tickets_turno` `t`;

View File

@ -586,4 +586,17 @@ INSERT INTO `cache`.`cache_calc`(`id`, `cache_id`, `cacheName`, `params`, `last_
INSERT INTO `bs`.`workerMana`(`workerFk`, `amount`)
VALUES
( 1, -500),
( 3, 0),
( 5, 250),
( 6, 1000),
( 9, 1500);
INSERT INTO `vn`.`ticketWeekly`(`ticketFk`, `weekDay`)
VALUES
( 1, 0),
( 2, 1),
( 3, 2),
( 4, 4),
( 5, 6);

View File

@ -8,11 +8,11 @@
},
"properties": {
"amount": {
"type": "String"
"type": "Number"
},
"workerFk": {
"id": true,
"type": "String"
"type": "Number"
}
},
"relations": {

View File

@ -0,0 +1,25 @@
{
"name": "TicketWeekly",
"base": "VnModel",
"options": {
"mysql": {
"table": "ticketWeekly"
}
},
"properties": {
"weekDay": {
"type": "Number"
},
"ticketFk": {
"id": true,
"type": "Number"
}
},
"relations": {
"ticket": {
"type": "belongsTo",
"model": "Ticket",
"foreignKey": "ticketFk"
}
}
}

View File

@ -34,6 +34,9 @@
},
"TicketUpdateAction": {
"dataSource": "vn"
},
"TicketWeekly": {
"dataSource": "vn"
}
}