2611 - Summary go to entity
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-11-23 13:41:51 +01:00
parent d6c921819f
commit c654e14cfe
47 changed files with 208 additions and 105 deletions

View File

@ -14,7 +14,7 @@
font-family: 'Material Icons'; font-family: 'Material Icons';
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: url('./icons/MaterialIcons-Regular.woff2') format('woff2'); src: url(./fonts/MaterialIcons-Regular.woff2) format('woff2');
} }
.material-icons { .material-icons {

Binary file not shown.

View File

@ -1 +1,9 @@
import ngModule from '../../module';
import Section from '../section';
import './style.scss'; import './style.scss';
export default class Summary extends Section {}
ngModule.vnComponent('vnSummary', {
controller: Summary
});

View File

@ -1,10 +1,22 @@
@import "./effects";
@import "./variables"; @import "./variables";
ui-view > .vn-summary {
h5 > a[name="goToSummary"],
h5 * > vn-icon-button[icon="more_vert"] {
display: none
}
}
.summary { .summary {
margin: 0 auto; margin: 0 auto;
max-width: 950px; max-width: 950px;
& > h5 { & > h5 {
display: flex;
justify-content: space-between;
align-items: center;
align-content: center;
padding: $spacing-sm; padding: $spacing-sm;
border: none; border: none;
background: $color-main; background: $color-main;
@ -15,6 +27,32 @@
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
& > a > vn-icon-button[icon="launch"] {
@extend %clickable;
color: $color-font-dark;
display: flex;
min-width: 45px;
height: 45px;
box-sizing: border-box;
align-items: center;
justify-content: center;
& > vn-icon {
padding: 10px;
}
vn-icon {
font-size: 1.75rem;
}
}
span {
flex: 1;
}
vn-button {
flex: none
}
} }
& > vn-horizontal { & > vn-horizontal {
flex-wrap: wrap; flex-wrap: wrap;

View File

@ -8,3 +8,4 @@ Role: Rol
Mail aliases: Alias de correo Mail aliases: Alias de correo
Account not enabled: Cuenta no habilitada Account not enabled: Cuenta no habilitada
Inherited roles: Roles heredados Inherited roles: Roles heredados
Go to the user: Ir al usuario

View File

@ -1,5 +1,13 @@
<vn-card class="summary"> <vn-card class="summary">
<h5>{{summary.nickname}}</h5> <h5>
<a ng-if="::summary.id"
vn-tooltip="Go to the user"
ui-sref="account.card.summary({id: {{::summary.id}}})"
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
</a>
<span>{{summary.id}} - {{summary.nickname}}</span>
</h5>
<vn-horizontal class="vn-pa-md"> <vn-horizontal class="vn-pa-md">
<vn-one> <vn-one>
<h4 translate>Basic data</h4> <h4 translate>Basic data</h4>

View File

@ -1,7 +1,7 @@
import ngModule from '../module'; import ngModule from '../module';
import Component from 'core/lib/component'; import Summary from 'salix/components/summary';
class Controller extends Component { class Controller extends Summary {
set user(value) { set user(value) {
this._user = value; this._user = value;
this.$.summary = null; this.$.summary = null;

View File

@ -16,3 +16,4 @@ Search claim by id or client name: Buscar reclamaciones por identificador o nomb
Claim deleted!: Reclamación eliminada! Claim deleted!: Reclamación eliminada!
claim: reclamación claim: reclamación
Photos: Fotos Photos: Fotos
Go to the claim: Ir a la reclamación

View File

@ -3,7 +3,15 @@
data="photos"> data="photos">
</vn-crud-model> </vn-crud-model>
<vn-card class="summary"> <vn-card class="summary">
<h5>{{::$ctrl.summary.claim.id}} - {{::$ctrl.summary.claim.client.name}}</h5> <h5>
<a ng-if="::$ctrl.summary.claim.id"
vn-tooltip="Go to the claim"
ui-sref="claim.card.summary({id: {{::$ctrl.summary.claim.id}}})"
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
</a>
<span>{{::$ctrl.summary.claim.id}} - {{::$ctrl.summary.claim.client.name}}</span>
</h5>
<vn-horizontal> <vn-horizontal>
<vn-one> <vn-one>
<vn-label-value <vn-label-value

View File

@ -1,8 +1,8 @@
import ngModule from '../module'; import ngModule from '../module';
import Section from 'salix/components/section'; import Summary from 'salix/components/summary';
import './style.scss'; import './style.scss';
class Controller extends Section { class Controller extends Summary {
constructor($element, $, vnFile) { constructor($element, $, vnFile) {
super($element, $); super($element, $);
this.vnFile = vnFile; this.vnFile = vnFile;

View File

@ -1,5 +1,15 @@
<vn-card class="summary"> <vn-card class="summary">
<h5>{{$ctrl.summary.name}} - {{$ctrl.summary.id}} - {{$ctrl.summary.salesPersonUser.name}}</h5> <h5>
<a ng-if="::$ctrl.summary.id"
vn-tooltip="Go to the client"
ui-sref="client.card.summary({id: {{::$ctrl.summary.id}}})"
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
</a>
<span>
{{$ctrl.summary.name}} - {{$ctrl.summary.id}} - {{$ctrl.summary.salesPersonUser.name}}
</span>
</h5>
<vn-horizontal> <vn-horizontal>
<vn-one> <vn-one>
<h4 translate>Basic data</h4> <h4 translate>Basic data</h4>

View File

@ -1,8 +1,8 @@
import ngModule from '../module'; import ngModule from '../module';
import Section from 'salix/components/section'; import Summary from 'salix/components/summary';
import './style.scss'; import './style.scss';
class Controller extends Section { class Controller extends Summary {
$onChanges() { $onChanges() {
if (!this.client) if (!this.client)
return; return;

View File

@ -17,3 +17,4 @@ Verdnatura's maximum risk: Riesgo máximo asumido por Verdnatura
Solunion's maximum risk: Riesgo máximo asumido por Solunion Solunion's maximum risk: Riesgo máximo asumido por Solunion
Invoices minus payments: Facturas menos recibos Invoices minus payments: Facturas menos recibos
Deviated invoices minus payments: Facturas fuera de plazo menos recibos Deviated invoices minus payments: Facturas fuera de plazo menos recibos
Go to the client: Ir al cliente

View File

@ -1,5 +1,13 @@
<vn-card class="summary"> <vn-card class="summary">
<h5><span translate>Entry</span> #{{$ctrl.entryData.id}} - {{$ctrl.entryData.supplier.nickname}}</h5> <h5>
<a ng-if="::$ctrl.entryData.id"
vn-tooltip="Go to the entry"
ui-sref="entry.card.summary({id: {{::$ctrl.entryData.id}}})"
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
</a>
<span> #{{$ctrl.entryData.id}} - {{$ctrl.entryData.supplier.nickname}}</span>
</h5>
<vn-horizontal> <vn-horizontal>
<vn-one> <vn-one>
<vn-label-value label="Commission" <vn-label-value label="Commission"

View File

@ -1,8 +1,8 @@
import ngModule from '../module'; import ngModule from '../module';
import './style.scss'; import './style.scss';
import Section from 'salix/components/section'; import Summary from 'salix/components/summary';
class Controller extends Section { class Controller extends Summary {
get entry() { get entry() {
return this._entry; return this._entry;
} }

View File

@ -7,3 +7,5 @@ Item type: Tipo
Minimum price: Precio mínimo Minimum price: Precio mínimo
Buys: Compras Buys: Compras
Travel: Envio Travel: Envio
Go to the entry: Ir a la entrada

View File

@ -1,5 +1,13 @@
<vn-card class="summary"> <vn-card class="summary">
<h5>{{$ctrl.summary.invoiceOut.ref}} - {{$ctrl.summary.invoiceOut.client.socialName}}</h5> <h5>
<a ng-if="::$ctrl.summary.invoiceOut.id"
vn-tooltip="Go to the Invoice Out"
ui-sref="invoiceOut.card.summary({id: {{::$ctrl.summary.invoiceOut.id}}})"
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
</a>
<span>{{$ctrl.summary.invoiceOut.ref}} - {{$ctrl.summary.invoiceOut.client.socialName}}</span>
</h5>
<vn-horizontal> <vn-horizontal>
<vn-one> <vn-one>
<vn-label-value label="Date" <vn-label-value label="Date"

View File

@ -1,8 +1,8 @@
import ngModule from '../module'; import ngModule from '../module';
import Section from 'salix/components/section'; import Summary from 'salix/components/summary';
import './style.scss'; import './style.scss';
class Controller extends Section { class Controller extends Summary {
set invoiceOut(value) { set invoiceOut(value) {
this._invoiceOut = value; this._invoiceOut = value;
if (value && value.id) if (value && value.id)

View File

@ -9,4 +9,5 @@ Type: Tipo
Rate: Tasa Rate: Tasa
Fee: Cuota Fee: Cuota
Taxable base: Base imp. Taxable base: Base imp.
Tax breakdown: Desglose impositivo Tax breakdown: Desglose impositivo
Go to the Invoice Out: Ir a la factura emitida

View File

@ -1,5 +1,13 @@
<vn-card class="summary"> <vn-card class="summary">
<h5>{{$ctrl.item.id}} - {{$ctrl.summary.item.name}}</h5> <h5>
<a ng-if="::$ctrl.item.id"
vn-tooltip="Go to the item"
ui-sref="item.card.summary({id: {{::$ctrl.item.id}}})"
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
</a>
<span>{{$ctrl.item.id}} - {{$ctrl.summary.item.name}}</span>
</h5>
<vn-horizontal> <vn-horizontal>
<vn-one> <vn-one>
<img style="width: 100%; display: block;" <img style="width: 100%; display: block;"

View File

@ -1,8 +1,8 @@
import ngModule from '../module'; import ngModule from '../module';
import Section from 'salix/components/section'; import Summary from 'salix/components/summary';
import './style.scss'; import './style.scss';
class Controller extends Section { class Controller extends Summary {
getSummary() { getSummary() {
this.$http.get(`Items/${this.item.id}/getSummary`).then(response => { this.$http.get(`Items/${this.item.id}/getSummary`).then(response => {
this.summary = response.data; this.summary = response.data;

View File

@ -1,3 +1,4 @@
Niche: Nichos Niche: Nichos
Barcode: Códigos de barras Barcode: Códigos de barras
Other data: Otros datos Other data: Otros datos
Go to the item: Ir al artículo

View File

@ -26,4 +26,5 @@ Confirm lines: Confirmar las lineas
Confirm: Confirmar Confirm: Confirmar
Real hour: Hora real Real hour: Hora real
T. Hour: Hora T. T. Hour: Hora T.
Theoretical hour: Hora Teórica Theoretical hour: Hora Teórica
Go to the order: Ir al pedido

View File

@ -1,5 +1,11 @@
<vn-card class="summary"> <vn-card class="summary">
<h5> <h5>
<a ng-if="::$ctrl.summary.id"
vn-tooltip="Go to the order"
ui-sref="order.card.summary({id: {{::$ctrl.summary.id}}})"
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
</a>
<span> <span>
Ticket #{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}} Ticket #{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}}
({{$ctrl.summary.client.salesPersonFk}}) ({{$ctrl.summary.client.salesPersonFk}})

View File

@ -1,8 +1,8 @@
import ngModule from '../module'; import ngModule from '../module';
import Section from 'salix/components/section'; import Summary from 'salix/components/summary';
import './style.scss'; import './style.scss';
class Controller extends Section { class Controller extends Summary {
setSummary() { setSummary() {
this.$http.get(`Orders/${this.order.id}/summary`) this.$http.get(`Orders/${this.order.id}/summary`)
.then(res => this.summary = res.data); .then(res => this.summary = res.data);

View File

@ -3,21 +3,6 @@
vn-order-summary .summary{ vn-order-summary .summary{
max-width: $width-lg; max-width: $width-lg;
h5 {
display: flex;
justify-content: space-between;
align-items: center;
align-content: center;
span {
flex: 1;
}
vn-button {
flex: none
}
}
& > vn-horizontal > vn-one { & > vn-horizontal > vn-one {
min-width: 160px; min-width: 160px;

View File

@ -1,5 +1,13 @@
<vn-card class="summary"> <vn-card class="summary">
<h5>{{$ctrl.summary.route.id}} - {{$ctrl.summary.route.description}}</h5> <h5>
<a ng-if="::$ctrl.summary.route.id"
vn-tooltip="Go to the route"
ui-sref="route.card.summary({id: {{::$ctrl.summary.route.id}}})"
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
</a>
<span>{{$ctrl.summary.route.id}} - {{$ctrl.summary.route.description}}</span>
</h5>
<vn-horizontal> <vn-horizontal>
<vn-one> <vn-one>
<vn-label-value label="Id" <vn-label-value label="Id"

View File

@ -1,8 +1,8 @@
import ngModule from '../module'; import ngModule from '../module';
import Section from 'salix/components/section'; import Summary from 'salix/components/summary';
import './style.scss'; import './style.scss';
class Controller extends Section { class Controller extends Summary {
set route(value) { set route(value) {
this._route = value; this._route = value;
if (value && value.id) if (value && value.id)

View File

@ -5,4 +5,5 @@ Starting time: H. Inicio
Finishing time: H. Fin Finishing time: H. Fin
Km Start: Km de inicio Km Start: Km de inicio
Km End: Km de fin Km End: Km de fin
PC: CP PC: CP
Go to the route: Ir a la ruta

View File

@ -1,5 +1,13 @@
<vn-card class="summary"> <vn-card class="summary">
<h5>{{::$ctrl.summary.name}} - {{::$ctrl.summary.id}}</h5> <h5>
<a ng-if="::$ctrl.summary.id"
vn-tooltip="Go to the supplier"
ui-sref="supplier.card.summary({id: {{::$ctrl.summary.id}}})"
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
</a>
<span>{{::$ctrl.summary.name}} - {{::$ctrl.summary.id}}</span>
</h5>
<vn-horizontal> <vn-horizontal>
<vn-one> <vn-one>
<h4 translate>Basic data</h4> <h4 translate>Basic data</h4>

View File

@ -1,8 +1,8 @@
import ngModule from '../module'; import ngModule from '../module';
import Section from 'salix/components/section'; import Summary from 'salix/components/summary';
import './style.scss'; import './style.scss';
class Controller extends Section { class Controller extends Summary {
$onChanges() { $onChanges() {
if (!this.supplier) if (!this.supplier)
return; return;

View File

@ -5,4 +5,5 @@ Search suppliers by id, name or alias: Busca proveedores por id, nombre o alias
Is Farmer: Es agrícola Is Farmer: Es agrícola
Sage tax type: Tipo de impuesto Sage Sage tax type: Tipo de impuesto Sage
Sage transaction type: Tipo de transacción Sage Sage transaction type: Tipo de transacción Sage
Sage withholding: Retencion Sage Sage withholding: Retencion Sage
Go to the supplier: Ir al proveedor

View File

@ -1,10 +1,10 @@
<vn-card class="summary"> <vn-card class="summary">
<h5> <h5>
<a ng-if="::$ctrl.summary.id" <a ng-if="::$ctrl.summary.id"
translate-attr="{title: 'Go to ticket summary'}" vn-tooltip="Go to the ticket"
ui-sref="ticket.card.summary({id: {{::$ctrl.summary.id}}})" ui-sref="ticket.card.summary({id: {{::$ctrl.summary.id}}})"
name="goToTicketSummary"> name="goToSummary">
<vn-icon-button icon="open_in_full"></vn-icon-button> <vn-icon-button icon="launch"></vn-icon-button>
</a> </a>
<span> <span>
Ticket #{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}} Ticket #{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}}

View File

@ -1,8 +1,8 @@
import ngModule from '../module'; import ngModule from '../module';
import Section from 'salix/components/section'; import Summary from 'salix/components/summary';
import './style.scss'; import './style.scss';
class Controller extends Section { class Controller extends Summary {
get ticket() { get ticket() {
return this._ticket; return this._ticket;
} }

View File

@ -2,4 +2,4 @@ Address phone: Tel. consignatario
Address mobile: Móv. consignatario Address mobile: Móv. consignatario
Client phone: Tel. cliente Client phone: Tel. cliente
Client mobile: Móv. cliente Client mobile: Móv. cliente
Go to ticket summary: Ir a la vista previa del ticket Go to the ticket: Ir al ticket

View File

@ -2,50 +2,13 @@
@import "./variables"; @import "./variables";
vn-ticket-card vn-ticket-summary { vn-ticket-card vn-ticket-summary {
a[name="goToTicketSummary"], /* vn-ticket-descriptor-menu {
vn-ticket-descriptor-menu {
display: none display: none
} } */
} }
vn-ticket-summary .summary { vn-ticket-summary .summary {
max-width: $width-lg; max-width: $width-lg;
h5 {
display: flex;
justify-content: space-between;
align-items: center;
align-content: center;
& > a > vn-icon-button[icon="open_in_full"] {
display: flex;
min-width: 45px;
height: 45px;
box-sizing: border-box;
align-items: center;
justify-content: center;
}
& > a > vn-icon-button[icon="open_in_full"] {
@extend %clickable;
color: $color-font-dark;
& > vn-icon {
padding: 10px;
}
vn-icon {
font-size: 1.75rem;
}
}
span {
flex: 1;
}
vn-button {
flex: none
}
}
vn-button { vn-button {
max-height: 27px; max-height: 27px;
button { button {

View File

@ -1,5 +1,13 @@
<vn-card class="summary"> <vn-card class="summary">
<h5>{{$ctrl.travelData.id}} - {{$ctrl.travelData.ref}}</h5> <h5>
<a ng-if="::$ctrl.travelData.id"
vn-tooltip="Go to the travel"
ui-sref="travel.card.summary({id: {{::$ctrl.travelData.id}}})"
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
</a>
<span>{{$ctrl.travelData.id}} - {{$ctrl.travelData.ref}}</span>
</h5>
<vn-horizontal> <vn-horizontal>
<vn-one> <vn-one>
<vn-label-value <vn-label-value

View File

@ -1,8 +1,8 @@
import ngModule from '../module'; import ngModule from '../module';
import Section from 'salix/components/section'; import Summary from 'salix/components/summary';
import './style.scss'; import './style.scss';
class Controller extends Section { class Controller extends Summary {
$onInit() { $onInit() {
this.entries = []; this.entries = [];
} }

View File

@ -15,3 +15,4 @@ Pallet: Pallet
Freight: Porte Freight: Porte
Package: Embalaje Package: Embalaje
Half box: Media caja Half box: Media caja
Go to the travel: Ir al envío

View File

@ -18,4 +18,5 @@ User id: Id de usuario
View worker: Ver trabajador View worker: Ver trabajador
Worker id: Id trabajador Worker id: Id trabajador
Workers: Trabajadores Workers: Trabajadores
worker: trabajador worker: trabajador
Go to the worker: Ir al trabajador

View File

@ -1,5 +1,13 @@
<vn-card class="summary"> <vn-card class="summary">
<h5>{{worker.firstName}} {{worker.lastName}}</h5> <h5>
<a ng-if="::$ctrl.worker.id"
vn-tooltip="Go to the worker"
ui-sref="worker.card.summary({id: {{::$ctrl.worker.id}}})"
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
</a>
<span>{{worker.firstName}} {{worker.lastName}}</span>
</h5>
<vn-horizontal class="vn-pa-md"> <vn-horizontal class="vn-pa-md">
<vn-one> <vn-one>
<h4 translate>Basic data</h4> <h4 translate>Basic data</h4>

View File

@ -1,7 +1,7 @@
import ngModule from '../module'; import ngModule from '../module';
import Section from 'salix/components/section'; import Summary from 'salix/components/summary';
class Controller extends Section { class Controller extends Summary {
get worker() { get worker() {
return this._worker; return this._worker;
} }

View File

@ -20,7 +20,7 @@
<a <a
ng-repeat="zone in model.data" ng-repeat="zone in model.data"
ui-sref="zone.card.summary({id: zone.id})" ui-sref="zone.card.summary({id: zone.id})"
class="clickable n-tr search-result"> class="clickable vn-tr search-result">
<vn-td number>{{::zone.id}}</vn-td> <vn-td number>{{::zone.id}}</vn-td>
<vn-td expand>{{::zone.name}}</vn-td> <vn-td expand>{{::zone.name}}</vn-td>
<vn-td expand>{{::zone.agencyMode.name}}</vn-td> <vn-td expand>{{::zone.agencyMode.name}}</vn-td>

View File

@ -30,4 +30,5 @@ Warehouse: Almacén
Warehouses: Almacenes Warehouses: Almacenes
Week days: Días de la semana Week days: Días de la semana
Zones: Zonas Zones: Zonas
zone: zona zone: zona
Go to the zone: Ir a la zona

View File

@ -1,5 +1,13 @@
<vn-card class="summary"> <vn-card class="summary">
<h5>#{{$ctrl.summary.id}} - {{$ctrl.summary.name}}</h5> <h5>
<a ng-if="::$ctrl.summary.id"
vn-tooltip="Go to the zone"
ui-sref="zone.card.summary({id: {{::$ctrl.summary.id}}})"
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
</a>
<span>#{{$ctrl.summary.id}} - {{$ctrl.summary.name}}</span>
</h5>
<vn-horizontal class="vn-pa-md"> <vn-horizontal class="vn-pa-md">
<vn-one> <vn-one>
<vn-label-value label="Agency" <vn-label-value label="Agency"

View File

@ -1,7 +1,7 @@
import ngModule from '../module'; import ngModule from '../module';
import Section from 'salix/components/section'; import Summary from 'salix/components/summary';
class Controller extends Section { class Controller extends Summary {
get zone() { get zone() {
return this._zone; return this._zone;
} }