Global & client style fixes

This commit is contained in:
Juan Ferrer 2019-10-01 16:17:57 +02:00
parent a4892845e0
commit 76604744d1
29 changed files with 499 additions and 511 deletions

View File

@ -175,8 +175,8 @@ export default {
firstPaymentConfirmed: 'vn-client-web-payment vn-tr:nth-child(1) vn-icon[icon="check"]'
},
dms: {
deleteFileButton: 'vn-client-dms-index vn-table vn-tr:nth-child(1) vn-icon-button[icon="delete"]',
firstDocWorker: 'vn-client-dms-index vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(8) > span',
deleteFileButton: 'vn-client-dms-index vn-tr:nth-child(1) vn-icon-button[icon="delete"]',
firstDocWorker: 'vn-client-dms-index vn-td:nth-child(8) > span',
firstDocWorkerDescriptor: '.vn-popover.shown vn-worker-descriptor',
acceptDeleteButton: 'vn-client-dms-index > vn-confirm button[response="ACCEPT"]'
},
@ -494,9 +494,9 @@ export default {
},
ticketLog: {
logButton: 'vn-left-menu a[ui-sref="ticket.card.log"]',
changedBy: 'vn-ticket-log > vn-log > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(2) > span',
actionTaken: 'vn-ticket-log > vn-log > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > div > div:nth-child(3) > span.value.ng-scope.ng-binding',
id: 'vn-ticket-log > vn-log > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr > vn-td.before > vn-one:nth-child(1) > div > span.value.ng-scope.ng-binding'
changedBy: 'vn-ticket-log > vn-log vn-tr:nth-child(1) > vn-td:nth-child(2) > span',
actionTaken: 'vn-ticket-log > vn-log vn-td:nth-child(1) > div > div:nth-child(3) > span.value',
id: 'vn-ticket-log > vn-log vn-td.before > vn-one:nth-child(1) > div > span.value'
},
ticketService: {
addServiceButton: 'vn-ticket-service vn-icon-button[vn-tooltip="Add service"] > button',

View File

@ -7,7 +7,7 @@ vn-check {
cursor: pointer;
&.disabled {
cursor: initial;
cursor: inherit;
}
& > .check {
position: relative;

View File

@ -7,7 +7,7 @@ vn-radio {
outline: none;
&.disabled {
cursor: initial;
cursor: inherit;
}
& > .radio {
position: relative;

View File

@ -51,14 +51,15 @@ vn-table {
}
& > * > vn-tr,
& > * > a.vn-tr {
display: table-row
display: table-row;
height: 3em;
}
vn-thead, vn-tbody, vn-tfoot {
& > * {
display: table-row;
& > vn-th {
font-weight: bold;
color: $color-font-light;
padding-top: 1em;
padding-bottom: .8em;
}
@ -97,10 +98,10 @@ vn-table {
}
}
& > :last-child {
padding-right: 1em;
padding-right: 1.4em;
}
& > :first-child {
padding-left: 1em;
padding-left: 1.4em;
}
}
& > a.vn-tr {

View File

@ -1,4 +1,3 @@
import './md-override.scss';
import './mdl-override.scss';
import './mdi-override.css';
import './zoom-image.scss';

View File

@ -1,11 +0,0 @@
html {
background-color: initial;
}
// Disable ng-repeat effects
.ng-enter,
.ng-leave {
transition: none !important;
}

View File

@ -1,3 +1,4 @@
@import "variables";
/* Desktop - Laptop 1360x768 */
@media (max-resolution: 119dpi) and (min-device-width: 1340px) and (max-device-width: 1899px)
@ -46,3 +47,9 @@
{
body { font-size: 11pt; }
}
.vn-hide-narrow {
@media (max-width: $mobile-width) {
display: none;
}
}

View File

@ -7,7 +7,7 @@ $mobile-width: 800px;
$width-xs: 25em;
$width-sm: 32em;
$width-md: 60em;
$width-md: 50em;
$width-lg: 80em;
$width-xl: 100em;
@ -31,7 +31,8 @@ $margin-huge: 100px;
$color-header: #3d3d3d;
$color-bg: #e5e5e5;
$color-bg-dark: #3d3d3d;
$color-font: #222222;
$color-font: #222;
$color-font-light: #555;
$color-font-secondary: #9b9b9b;
$color-font-dark: white;
$color-font-bg: rgba(0, 0, 0, .7);
@ -49,7 +50,7 @@ $color-spacer: rgba(0, 0, 0, .3);
$color-spacer-light: rgba(0, 0, 0, .12);
$color-input-underline: rgba(0, 0, 0, .12);
$color-shadow: rgba(0, 0, 0, .2);
$color-hightlight: rgba(0, 0, 0, .15);
$color-hightlight: rgba(0, 0, 0, .05);
$color-hover-cd: rgba(0, 0, 0, .1);
$color-hover-dc: .7;
$color-disabled: .6;
@ -72,6 +73,7 @@ $color-header: #3d3d3d;
$color-bg: #222;
$color-bg-dark: #222;
$color-font: white;
$color-font-light: #aaa;
$color-font-secondary: #777;
$color-font-dark: white;
$color-font-bg: rgba(0, 0, 0, .8);
@ -106,5 +108,5 @@ $color-alert-light: darken($color-alert, 35%);
// Border
$border-thin: .1em solid $color-spacer;
$border-thin-light: .1em solid $color-spacer-light;
$border-thin: .05em solid $color-spacer;
$border-thin-light: .05em solid $color-spacer-light;

View File

@ -4,7 +4,7 @@
filter="::$ctrl.filter"
auto-load="false">
</vn-crud-model>
<div compact>
<div class="vn-w-md">
<vn-card pad-large-h>
<vn-searchbar
on-search="$ctrl.onSearch($params)"

View File

@ -7,36 +7,29 @@
auto-load="true">
</vn-crud-model>
<div compact>
<vn-card pad-large>
<vn-card pad-medium>
<div
ng-repeat="address in $ctrl.addresses"
class="address">
<a
ui-sref="client.card.address.edit({addressId: {{::address.id}}})"
class="pad-small border-solid"
ng-class="{
'item-hightlight': $ctrl.isDefaultAddress(address),
'item-disabled': !address.isActive && !$ctrl.isDefaultAddress(address)
}"
ng-class="{'item-disabled': !address.isActive}"
translate-attr="{title: 'Edit address'}"
border-radius>
<vn-none
pad-small-right
ng-click="$ctrl.onStarClick($event)">
<vn-icon-button
ng-if="$ctrl.isDefaultAddress(address)"
icon="star"
ng-if="$ctrl.isDefaultAddress(address)">
translate-attr="{title: 'Default address'}">
</vn-icon-button>
<vn-icon-button
ng-if="!address.isActive && !$ctrl.isDefaultAddress(address)"
ng-if="!$ctrl.isDefaultAddress(address)"
icon="star_border"
vn-tooltip="Active first to set as default">
</vn-icon-button>
<vn-icon-button
ng-if="address.isActive && !$ctrl.isDefaultAddress(address)"
icon="star_border"
vn-tooltip="Set as default"
ng-click="$ctrl.setDefault(address)">
ng-click="$ctrl.setDefault(address)"
translate-attr="{title: 'Set as default'}">
</vn-icon-button>
</vn-none>
<vn-one
@ -59,6 +52,7 @@
ng-if="address.observations.length"
border-solid-left
pad-medium-h
class="vn-hide-narrow"
style="height: 6em; overflow: auto;">
<vn-one ng-repeat="observation in address.observations track by $index" ng-class="{'pad-small-top': $index}">
<b>{{::observation.observationType.description}}:</b>

View File

@ -56,8 +56,7 @@ class Controller {
}
isDefaultAddress(address) {
if (this.client)
return this.client.defaultAddressFk === address.id;
return this.client && this.client.defaultAddressFk === address.id;
}
/**

View File

@ -11,8 +11,8 @@
filter="$ctrl.filter"
data="$ctrl.clientRisks">
</vn-crud-model>
<vn-vertical>
<vn-card pad-large>
<div>
<vn-card class="pad-medium margin-medium-bottom">
<vn-horizontal>
<vn-one></vn-one>
<vn-one>
@ -23,7 +23,7 @@
url="/client/api/Companies"
show-field="code"
value-field="id"
label="Select company">
label="Company">
</vn-autocomplete>
</vn-one>
<vn-one>
@ -38,7 +38,8 @@
</div>
</vn-one>
</vn-horizontal>
<vn-vertical>
</vn-card>
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
@ -95,11 +96,9 @@
</vn-tr>
</vn-tbody>
</vn-table>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</vn-card>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</div>
<vn-float-button
vn-acl="administrative"
vn-acl-action="remove"
@ -109,15 +108,13 @@
fixed-bottom-right
ng-click="$ctrl.openCreateDialog()">
</vn-float-button>
<vn-client-balance-create vn-id="balanceCreateDialog">
<vn-client-balance-create
vn-id="balanceCreateDialog">
</vn-client-balance-create>
<vn-worker-descriptor-popover
vn-id="workerDescriptor"
worker-fk="$ctrl.selectedWorker">
</vn-worker-descriptor-popover>
<vn-invoice-out-descriptor-popover
vn-id="invoiceOutDescriptor"
invoice-out-id="$ctrl.selectedInvoiceOut">

View File

@ -1,8 +1,8 @@
<div compact>
<vn-card pad-large>
<div class="vn-w-md">
<vn-card pad-medium>
<vn-horizontal
ng-repeat="classification in $ctrl.classifications track by classification.id"
class="pad-medium-top"
class="pad-medium-bottom insurance"
style="align-items: center;">
<vn-one
border-radius
@ -52,6 +52,7 @@
</vn-one>
</vn-horizontal>
</vn-card>
</div>
<vn-float-button
ng-if="$ctrl.canCreateNew()"
vn-tooltip="New contract"
@ -61,7 +62,6 @@
vn-bind="+"
label="Add">
</vn-float-button>
</div>
<vn-confirm
vn-id="close-contract"
on-response="$ctrl.returnDialog(response)"

View File

@ -1,7 +1,7 @@
import ngModule from '../../module';
import './style.scss';
class Controller {
constructor($http, $scope) {
this.$http = $http;
this.$scope = $scope;

View File

@ -0,0 +1,5 @@
vn-client-credit-insurance-index{
.insurance:last-child {
padding-bottom: 0;
}
}

View File

@ -6,34 +6,33 @@
limit="20"
data="credits" auto-load="false">
</vn-crud-model>
<vn-vertical compact>
<vn-card pad-large>
<vn-vertical>
<div class="vn-w-md">
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th field="amount">Credit</vn-th>
<vn-th field="created" default-order="DESC">Since</vn-th>
<vn-th>Employee</vn-th>
<vn-th field="amount" number>Credit</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="credit in credits track by credit.id">
<vn-td>{{::credit.amount | number:2}} €</vn-td>
<vn-td>{{::credit.created | dateTime:'dd/MM/yyyy HH:mm'}}</vn-td>
<vn-td>{{::credit.worker.user.nickname}}</vn-td>
<vn-td number>{{::credit.amount | currency:'EUR':2}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</vn-card>
</vn-vertical>
<vn-float-button icon="add" fixed-bottom-right
<vn-pagination model="model"></vn-pagination>
</div>
<vn-float-button
icon="add"
ui-sref="client.card.credit.create"
vn-acl="teamBoss"
vn-acl-action="remove"
vn-tooltip="New credit"
vn-bind="+">
vn-bind="+"
fixed-bottom-right>
</vn-float-button>

View File

@ -6,9 +6,8 @@
limit="20"
data="$ctrl.clientDms">
</vn-crud-model>
<vn-vertical>
<vn-card pad-large>
<vn-vertical>
<div class="vn-w-lg">
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
@ -95,10 +94,9 @@
</vn-tr>
</vn-tbody>
</vn-table>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</vn-card>
</vn-vertical>
</div>
<vn-pagination model="model"></vn-pagination>
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>

View File

@ -4,49 +4,53 @@
filter="::$ctrl.filter"
link="{clientFk: $ctrl.$stateParams.id}"
limit="20"
data="greuges" auto-load="true">
data="greuges"
auto-load="true">
</vn-crud-model>
<mg-ajax
path="/client/api/greuges/{{$ctrl.$stateParams.id}}/sumAmount"
options="mgEdit">
</mg-ajax>
<vn-vertical compact>
<vn-card pad-large>
<vn-horizontal>
<div class="totalBox" ng-if="model.data.length > 0">
<vn-label-value label="Total"
<div class="vn-w-md">
<vn-card
ng-if="model.data.length > 0"
style="text-align: right;"
class="margin-medium-bottom pad-large">
<vn-label-value
label="Total"
value="{{edit.model.sumAmount | currency: 'EUR': 2}}">
</vn-label-value>
</div>
</vn-horizontal>
</vn-card>
<vn-card>
<vn-vertical>
<vn-table model="model" auto-load="false">
<vn-thead>
<vn-tr>
<vn-th field="shipped" default-order="DESC">Date</vn-th>
<vn-th field="description">Comment</vn-th>
<vn-th field="amount" >Amount</vn-th>
<vn-th field="greugeTypeFk">Type</vn-th>
<vn-th field="amount" number>Amount</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="greuge in greuges">
<vn-td>{{::greuge.shipped | dateTime:'dd/MM/yyyy HH:mm' }}</vn-td>
<vn-td>{{::greuge.description}}</vn-td>
<vn-td>{{::greuge.amount | currency: 'EUR': 2}}</vn-td>
<vn-td>{{::greuge.greugeType.name}}</vn-td>
<vn-td number>{{::greuge.amount | currency: 'EUR': 2}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</vn-card>
</vn-vertical>
<vn-float-button icon="add" fixed-bottom-right
<vn-pagination model="model"></vn-pagination>
</div>
<vn-float-button
icon="add"
ui-sref="client.card.greuge.create"
vn-tooltip="New greuge"
vn-acl="salesAssistant"
vn-acl-action="remove"
vn-bind="+">
vn-bind="+"
fixed-bottom-right>
</vn-float-button>

View File

@ -4,15 +4,15 @@
filter="::$ctrl.filter"
link="{clientFk: $ctrl.$stateParams.id}"
limit="20"
data="mandates" auto-load="false">
data="mandates"
auto-load="false">
</vn-crud-model>
<vn-vertical compact>
<vn-card pad-large>
<vn-vertical>
<div class="vn-w-md">
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th field="id">Id</vn-th>
<vn-th field="id" number>Id</vn-th>
<vn-th field="companyFk">Company</vn-th>
<vn-th field="mandateTypeFk">Type</vn-th>
<vn-th field="created" default-order="DESC">Register date</vn-th>
@ -21,7 +21,7 @@
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="mandate in mandates">
<vn-td>{{::mandate.id}}</vn-td>
<vn-td number>{{::mandate.id}}</vn-td>
<vn-td>{{::mandate.company.code}}</vn-td>
<vn-td>{{::mandate.mandateType.name}}</vn-td>
<vn-td>{{::mandate.created | dateTime:'dd/MM/yyyy HH:mm' }}</vn-td>
@ -29,7 +29,6 @@
</vn-tr>
</vn-tbody>
</vn-table>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</vn-card>
<vn-pagination model="model"></vn-pagination>
</vn-vertical>

View File

@ -6,15 +6,14 @@ class Controller {
this.filter = {
include: [
{
relation: "mandateType",
relation: 'mandateType',
scope: {
fields: ["id", "name"]
fields: ['id', 'name']
}
},
{
relation: "company",
}, {
relation: 'company',
scope: {
fields: ["id", "code"]
fields: ['id', 'code']
}
}
]

View File

@ -6,9 +6,9 @@
data="notes"
auto-load="true">
</vn-crud-model>
<vn-vertical compact>
<vn-card pad-large>
<vn-vertical
<div class="vn-w-md">
<vn-card pad-medium>
<div class="note"
ng-repeat="note in notes"
pad-small
border-solid
@ -21,14 +21,12 @@
<vn-horizontal class="text">
{{::note.text}}
</vn-horizontal>
</vn-vertical>
<vn-horizontal ng-if="model.data.length == 0">
<vn-one ad-small translate>
</div>
<div ng-if="model.data.length == 0" ad-small translate>
No results
</vn-one>
</vn-horizontal>
</div>
</vn-card>
</vn-vertical>
</div>
<a vn-tooltip="New note"
ui-sref="client.card.note.create({id: $ctrl.$stateParams.id})"

View File

@ -1,4 +1,5 @@
import ngModule from '../../module';
import './style.scss';
export default class Controller {
constructor($stateParams) {

View File

@ -0,0 +1,5 @@
vn-client-note {
.note:last-child {
margin-bottom: 0;
}
}

View File

@ -1,28 +1,28 @@
<vn-crud-model
vn-id="model"
url="/client/api/Recoveries"
filter="{}"
link="{clientFk: $ctrl.$stateParams.id}"
limit="20"
data="recoveries" auto-load="false">
data="recoveries"
auto-load="false">
</vn-crud-model>
<vn-vertical compact>
<vn-card pad-large>
<vn-vertical>
<div class="vn-w-md">
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th></vn-th>
<vn-th field="started" default-order="DESC">Since</vn-th>
<vn-th field="finished">To</vn-th>
<vn-th field="amount">Amount</vn-th>
<vn-th field="period">Period</vn-th>
<vn-th field="amount" number>Amount</vn-th>
<vn-th field="period" number>Period</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="recovery in recoveries">
<vn-td>
<vn-icon-button icon="lock"
<vn-icon-button
icon="lock"
vn-acl="administrative"
vn-acl-action="remove"
vn-tooltip="Finish that recovery period"
@ -32,17 +32,17 @@
</vn-td>
<vn-td>{{::recovery.started | dateTime:'dd/MM/yyyy' }}</vn-td>
<vn-td>{{recovery.finished | dateTime:'dd/MM/yyyy' }}</vn-td>
<vn-td>{{::recovery.amount | currency: 'EUR': 0}}</vn-td>
<vn-td>{{::recovery.period}}</vn-td>
<vn-td number>{{::recovery.amount | currency: 'EUR': 0}}</vn-td>
<vn-td number>{{::recovery.period}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</vn-card>
</vn-vertical>
<vn-float-button icon="add" fixed-bottom-right
<vn-pagination model="model"></vn-pagination>
</div>
<vn-float-button
icon="add"
fixed-bottom-right
vn-tooltip="New recovery"
vn-bind="+"
vn-acl="administrative"

View File

@ -4,13 +4,11 @@
filter="::$ctrl.filter"
link="{clientFk: $ctrl.$stateParams.id}"
limit="20"
data="samples" auto-load="false">
data="samples"
auto-load="false">
</vn-crud-model>
<vn-vertical compact>
<vn-card pad-large>
<vn-horizontal>
</vn-horizontal>
<vn-vertical>
<div class="vn-w-md">
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
@ -37,10 +35,9 @@
</vn-tr>
</vn-tbody>
</vn-table>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</vn-card>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</div>
<vn-worker-descriptor-popover
vn-id="workerDescriptor"
worker-fk="$ctrl.selectedWorker">

View File

@ -1,4 +1,4 @@
Default address: Consignatario pred.
Default address: Consignatario predeterminado
Total greuge: Greuge total
Financial information: Datos financieros
Mana: Maná

View File

@ -5,14 +5,13 @@
limit="20"
data="transactions" auto-load="false">
</vn-crud-model>
<vn-vertical compact>
<vn-card pad-large>
<vn-vertical>
<div class="vn-w-md">
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th>State</vn-th>
<vn-th field="id">Id</vn-th>
<vn-th field="id"number>Id</vn-th>
<vn-th field="amount" number>Amount</vn-th>
<vn-th field="created" default-order="DESC">Payed</vn-th>
<vn-th>Confirm</vn-th>
@ -32,7 +31,7 @@
icon="check">
</vn-icon>
</vn-td>
<vn-td>{{::transaction.id}}</vn-td>
<vn-td number>{{::transaction.id}}</vn-td>
<vn-td number>{{::transaction.amount | currency: 'EUR':2}}</vn-td>
<vn-td>{{::transaction.created | dateTime:'dd/MM/yyyy HH:mm'}}</vn-td>
<vn-td style="width: 3em; text-align: center">
@ -48,7 +47,6 @@
</vn-tr>
</vn-tbody>
</vn-table>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</vn-card>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</div>

View File

@ -122,8 +122,8 @@
<vn-td>{{::ticket.warehouse}}</vn-td>
<vn-td>{{::ticket.refFk | dashIfEmpty}}</vn-td>
<vn-td shrink>{{::ticket.zoneLanding | dateTime: 'HH:mm'}}</vn-td>
<vn-td>
<span number class="chip {{$ctrl.totalPriceColor(ticket)}}">
<vn-td number>
<span class="chip {{$ctrl.totalPriceColor(ticket)}}">
{{::ticket.total | currency: 'EUR': 2}}
</span>
</vn-td>

View File

@ -7,10 +7,8 @@
limit="20"
auto-load="true">
</vn-crud-model>
<vn-vertical>
<vn-card pad-large>
<vn-vertical>
<vn-title>History</vn-title>
<div>
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
@ -95,10 +93,9 @@
</vn-tr>
</vn-tbody>
</vn-table>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</vn-card>
</vn-vertical>
</div>
<vn-worker-descriptor-popover
vn-id="workerDescriptor"
worker-fk="$ctrl.selectedWorker">