Added section
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-11-11 12:34:07 +01:00
parent 086ac2538a
commit a0d50410aa
5 changed files with 78 additions and 1 deletions

View File

@ -0,0 +1,32 @@
<vn-crud-model auto-load="true"
vn-id="model"
url="Items/getWasteDetail"
data="details">
</vn-crud-model>
<vn-data-viewer model="model">
<vn-card>
<section ng-repeat="detail in details" class="vn-pa-md">
<vn-horizontal class="header">
<h5><span translate>{{detail.buyer}}</span></h5>
</vn-horizontal>
<vn-table>
<vn-thead>
<vn-tr>
<vn-th class="waste-family">Family</vn-th>
<vn-th number>Percentage</vn-th>
<vn-th number>Dwindle</vn-th>
<vn-th number>Total</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="waste in detail.lines">
<vn-td class="waste-family">{{::waste.family}}</vn-td>
<vn-td number>{{::(waste.percentage / 100) | percentage: 2}}</vn-td>
<vn-td number>{{::waste.dwindle | currency: 'EUR'}}</vn-td>
<vn-td number>{{::waste.total | currency: 'EUR'}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</section>
</vn-card>
</vn-data-viewer>

View File

@ -0,0 +1,8 @@
import ngModule from '../module';
import Section from 'salix/components/section';
import './style.scss';
ngModule.vnComponent('vnTravelExtraCommunity', {
template: require('./index.html'),
controller: Section
});

View File

@ -0,0 +1 @@
Family: Familia

View File

@ -0,0 +1,25 @@
@import "variables";
vn-item-waste {
.header {
margin-bottom: 16px;
text-transform: uppercase;
font-size: 1.25rem;
line-height: 1;
padding: 7px;
padding-bottom: 7px;
padding-bottom: 4px;
font-weight: lighter;
background-color: #fde6ca;
border-bottom: 1px solid #f7931e;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
vn-table vn-th.waste-family,
vn-table vn-td.waste-family {
max-width: 64px;
width: 64px
}
}

View File

@ -6,7 +6,8 @@
"dependencies": ["worker", "entry"], "dependencies": ["worker", "entry"],
"menus": { "menus": {
"main": [ "main": [
{"state": "travel.index", "icon": "local_airport"} {"state": "travel.index", "icon": "local_airport"},
{"state": "travel.extraCommunity", "icon": "directions_boat"}
], ],
"card": [ "card": [
{"state": "travel.card.basicData", "icon": "settings"}, {"state": "travel.card.basicData", "icon": "settings"},
@ -90,6 +91,16 @@
"travel": "$ctrl.travel" "travel": "$ctrl.travel"
}, },
"acl": ["buyer"] "acl": ["buyer"]
},
{
"url": "/extra-community",
"state": "travel.extraCommunity",
"component": "vn-travel-extra-community",
"description": "Extra community",
"acl": ["buyer"],
"params": {
"travel": "$ctrl.travel"
}
} }
] ]
} }