diff --git a/front/core/components/label-value/style.scss b/front/core/components/label-value/style.scss
index e4a2cca03..10f3c016c 100644
--- a/front/core/components/label-value/style.scss
+++ b/front/core/components/label-value/style.scss
@@ -4,6 +4,6 @@ vn-label-value > section {
& > vn-icon {
vertical-align: middle;
color: $color-font-secondary;
- font-size: 1.2em
+ font-size: 1.2rem
}
}
\ No newline at end of file
diff --git a/front/core/components/list/style.scss b/front/core/components/list/style.scss
index 6f12ce7c6..fdadf460b 100644
--- a/front/core/components/list/style.scss
+++ b/front/core/components/list/style.scss
@@ -11,7 +11,7 @@ ul.menu {
@extend %clickable;
display: block;
color: inherit;
- padding: .6em 2em;
+ padding: 9px 32px;
}
}
*/
@@ -76,7 +76,7 @@ vn-item,
margin-right: $spacing-md;
& > .vn-icon {
- font-size: 1.2em;
+ font-size: 1.2rem;
}
}
&[side] {
@@ -86,10 +86,10 @@ vn-item,
& > .vn-button {
opacity: .4;
- margin-left: .5em;
+ margin-left: 8px;
transition: opacity 250ms ease-out;
padding: 0;
- font-size: 1.05em;
+ font-size: 1rem;
&:hover {
opacity: 1;
diff --git a/front/core/components/multi-check/style.scss b/front/core/components/multi-check/style.scss
index bc6a0e8c5..79c2397bc 100644
--- a/front/core/components/multi-check/style.scss
+++ b/front/core/components/multi-check/style.scss
@@ -1,5 +1,5 @@
vn-multi-check {
.vn-check {
- margin-bottom: 0.8em
+ margin-bottom: 12px
}
}
\ No newline at end of file
diff --git a/front/core/components/pagination/style.scss b/front/core/components/pagination/style.scss
index 2610bc502..413a6fb5f 100644
--- a/front/core/components/pagination/style.scss
+++ b/front/core/components/pagination/style.scss
@@ -4,7 +4,7 @@ vn-pagination {
text-align: center;
& > div > vn-icon-button {
- font-size: 2em;
+ font-size: 2rem;
padding: 0;
}
}
\ No newline at end of file
diff --git a/front/core/components/popover/style.scss b/front/core/components/popover/style.scss
index decfc4733..e27ef6012 100644
--- a/front/core/components/popover/style.scss
+++ b/front/core/components/popover/style.scss
@@ -10,7 +10,7 @@
color: $color-font;
opacity: 0;
- transform: translateY(-.6em);
+ transform: translateY(-9px);
transition-property: opacity, transform;
transition-duration: 200ms;
transition-timing-function: ease-in-out;
@@ -21,21 +21,21 @@
}
& > .window {
position: absolute;
- box-shadow: 0 .1em .4em $color-shadow;
+ box-shadow: 0 1px 6px $color-shadow;
z-index: 0;
& > .arrow {
- width: 1em;
- height: 1em;
- margin: -.5em;
+ width: 16px;
+ height: 16px;
+ margin: -8px;
background-color: $color-bg-panel;
- box-shadow: 0 .1em .4em $color-shadow;
+ box-shadow: 0 1px 6px $color-shadow;
position: absolute;
transform: rotate(45deg);
z-index: -1;
}
& > .content {
- border-radius: .1em;
+ border-radius: 1px;
background-color: $color-bg-panel;
height: inherit;
overflow: auto;
diff --git a/front/core/components/popup/index.html b/front/core/components/popup/index.html
index 3e542d51f..ad8fb2598 100644
--- a/front/core/components/popup/index.html
+++ b/front/core/components/popup/index.html
@@ -2,6 +2,7 @@
\ No newline at end of file
diff --git a/front/core/components/popup/index.js b/front/core/components/popup/index.js
index 994f4a0e7..0dea66254 100644
--- a/front/core/components/popup/index.js
+++ b/front/core/components/popup/index.js
@@ -51,6 +51,7 @@ export default class Popup extends Component {
{parentBoundTranscludeFn: this.$transclude}
)[0];
this.windowEl = this.popup.querySelector('.window');
+ this.windowEl.focus();
let classList = this.popup.classList;
classList.add(this.displayMode);
diff --git a/front/core/components/popup/style.scss b/front/core/components/popup/style.scss
index 42d69141d..c3e45ccf0 100644
--- a/front/core/components/popup/style.scss
+++ b/front/core/components/popup/style.scss
@@ -19,19 +19,20 @@
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, .6);
- padding: 1em;
+ padding: 16px;
box-sizing: border-box;
& > .window {
position: relative;
- box-shadow: 0 0 .4em $color-shadow;
+ box-shadow: 0 0 6px $color-shadow;
background-color: $color-bg-panel;
- border-radius: .2em;
+ border-radius: 3px;
overflow: auto;
box-sizing: border-box;
max-height: 100%;
transform: scale3d(.9, .9, .9);
transition: transform 200ms ease-in-out;
+ outline: none;
}
&.shown > .window {
transform: scale3d(1, 1, 1);
diff --git a/front/core/components/range/style.scss b/front/core/components/range/style.scss
index 6898f8cda..2a894492e 100644
--- a/front/core/components/range/style.scss
+++ b/front/core/components/range/style.scss
@@ -37,7 +37,7 @@
.vn-range {
& > label {
- font-size: 12px;
+ font-size: .75rem;
&.main {
color: $color-button;
@@ -57,7 +57,7 @@
background: transparent;
border-color: transparent;
-webkit-appearance: none;
- margin: .2em 0;
+ margin: 3px 0;
&:focus {
outline: none;
diff --git a/front/core/components/scroll-up/style.scss b/front/core/components/scroll-up/style.scss
index 1bf7ea982..44d12f14f 100644
--- a/front/core/components/scroll-up/style.scss
+++ b/front/core/components/scroll-up/style.scss
@@ -1,6 +1,6 @@
vn-scroll-up {
- top: 5.5em;
- right: 2em;
+ top: 88px;
+ right: 32px;
display: none;
position: fixed;
}
\ No newline at end of file
diff --git a/front/core/components/searchbar/style.scss b/front/core/components/searchbar/style.scss
index 31907792c..c1d4be21c 100644
--- a/front/core/components/searchbar/style.scss
+++ b/front/core/components/searchbar/style.scss
@@ -2,24 +2,24 @@
vn-searchbar {
display: block;
- max-width: 35em;
+ max-width: 560px;
margin: 0 auto;
.search-params {
flex: 1;
- margin: .05em 0;
+ margin: 1px 0;
overflow: visible;
display: flex;
- max-width: 24em;
+ max-width: 384px;
& > .search-param {
color: rgba(0, 0, 0, .6);
background-color: rgba(0, 0, 0, .1);
- padding: .1em .4em;
- margin-left: .2em;
+ padding: 1px 6px;
+ margin-left: 3px;
display: inline-block;
- border-radius: .8em;
- max-width: 12em;
+ border-radius: 12px;
+ max-width: 192px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@@ -39,7 +39,7 @@ vn-searchbar {
}
.search-panel {
- max-height: 48em;
+ max-height: 768px;
& > form {
padding: $spacing-lg;
diff --git a/front/core/components/snackbar/style.scss b/front/core/components/snackbar/style.scss
index deaf010fc..465c53851 100644
--- a/front/core/components/snackbar/style.scss
+++ b/front/core/components/snackbar/style.scss
@@ -1,33 +1,33 @@
@import "variables";
vn-snackbar #shapes {
- max-height: 20.625em;
- margin-left: -12.5em;
+ max-height: 330px;
+ margin-left: -160px;
position: fixed;
z-index: 100;
- width: 25em;
+ width: 320px;
left: 50%;
bottom: 0
}
vn-snackbar .shape {
- background-color: rgba(0, 0, 0, 0.8);
- box-shadow: 0 0 .4em $color-shadow;
+ background-color: rgba(0, 0, 0, .8);
+ box-shadow: 0 0 6px $color-shadow;
transition: transform 300ms ease-in-out;
- transform: translateY(20em);
+ transform: translateY(320px);
box-sizing: border-box;
- border-radius: .2em;
+ border-radius: 3px;
margin-bottom: 15px;
color: white;
- padding: 0.8em;
+ padding: 12px;
& > .text {
text-align: center;
vn-chip {
position: absolute;
- left: -1em;
- top: -1em;
+ left: -16px;
+ top: -16px;
}
}
@@ -36,32 +36,32 @@ vn-snackbar .shape {
}
&.success {
- background-color: rgba(163, 209, 49, 0.8);
+ background-color: rgba(163, 209, 49, .8);
color: #445911;
& > button {
- color: rgba(1, 1, 1, 0.6);
+ color: rgba(1, 1, 1, .6);
}
}
&.error {
- background-color: rgba(198, 40, 40, 0.8);
+ background-color: rgba(198, 40, 40, .8);
& > button {
- color: rgba(1, 1, 1, 0.6);
+ color: rgba(1, 1, 1, .6);
}
}
& > button {
background-color: transparent;
text-transform: uppercase;
- margin-left: .5em;
+ margin-left: 8px;
font-weight: bold;
cursor: pointer;
color: $color-main;
float: right;
border: none;
- padding: .5em;
- margin: -.5em
+ padding: 8px;
+ margin: -8px;
}
}
\ No newline at end of file
diff --git a/front/core/components/step-control/style.scss b/front/core/components/step-control/style.scss
index 9acc1f314..b4d0d5afe 100644
--- a/front/core/components/step-control/style.scss
+++ b/front/core/components/step-control/style.scss
@@ -22,11 +22,11 @@ vn-step-control {
border: 2px solid $color-main;
background-color: white;
align-content: center;
- margin-top: -9.5px;
+ margin-top: -10px;
border-radius: 50%;
cursor: pointer;
height: 15px;
- width: 15px
+ width: 15px;
}
& > .steps > .step .circle.active {
background-color: $color-main;
@@ -36,7 +36,7 @@ vn-step-control {
flex: auto;
flex-direction: row;
justify-content: space-between;
- margin-top: 10px
+ margin-top: 10px;
}
& > .buttons > .step {
display: flex
diff --git a/front/core/components/table/style.scss b/front/core/components/table/style.scss
index 41d1f6db8..7dd69d89f 100644
--- a/front/core/components/table/style.scss
+++ b/front/core/components/table/style.scss
@@ -14,7 +14,7 @@ vn-table {
& > vn-thead,
& > thead {
display: table-header-group;
- border-bottom: .15em solid $color-spacer;
+ border-bottom: 2px solid $color-spacer;
& > * > th {
font-weight: normal;
@@ -52,14 +52,14 @@ vn-table {
}
& > vn-tfoot,
& > tfoot {
- border-top: .15em solid $color-spacer;
+ border-top: 2px solid $color-spacer;
display: table-footer-group
}
& > * > vn-tr,
& > * > a.vn-tr,
& > * > tr {
display: table-row;
- height: 3em;
+ height: 48px;
}
vn-thead, vn-tbody, vn-tfoot,
thead, tbody, tfoot {
@@ -69,8 +69,8 @@ vn-table {
& > vn-th,
& > th {
color: $color-font-light;
- padding-top: 1em;
- padding-bottom: .8em;
+ padding-top: 16px;
+ padding-bottom: 12px;
}
& > vn-th,
& > vn-td,
@@ -86,14 +86,14 @@ vn-table {
vertical-align: middle;
display: table-cell;
text-align: left;
- padding: .6em .5em;
+ padding: 9px 8px;
white-space: nowrap;
text-overflow: ellipsis;
- max-width: 5em;
+ max-width: 80px;
&[number] {
text-align: right;
- width: 6em;
+ width: 96px;
}
&[center] {
text-align: center;
@@ -103,7 +103,7 @@ vn-table {
text-align: center;
}
&[expand] {
- max-width: 25em;
+ max-width: 400px;
min-width: 0;
}
vn-icon.bright, i.bright {
@@ -111,10 +111,10 @@ vn-table {
}
}
& > :last-child {
- padding-right: 1.4em;
+ padding-right: 22px;
}
& > :first-child {
- padding-left: 1.4em;
+ padding-left: 22px;
}
}
& > a.vn-tr {
@@ -123,7 +123,7 @@ vn-table {
}
vn-tbody > *,
tbody > * {
- border-bottom: .1em solid $color-spacer-light;
+ border-bottom: 1px solid $color-spacer-light;
&:last-child {
border-bottom: none;
@@ -134,8 +134,8 @@ vn-table {
& > vn-td,
& > td {
.chip {
- padding: .3em;
- border-radius: .3em;
+ padding: 4px;
+ border-radius: 4px;
color: $color-font-bg;
&.notice {
@@ -158,7 +158,7 @@ vn-table {
vn-icon-menu {
display: inline-block;
color: $color-main;
- padding: .25em
+ padding: 4px
}
}
& > [actions] {
diff --git a/front/core/components/td-editable/style.scss b/front/core/components/td-editable/style.scss
index e37e1086c..a1fe4664e 100644
--- a/front/core/components/td-editable/style.scss
+++ b/front/core/components/td-editable/style.scss
@@ -8,7 +8,7 @@ vn-td-editable {
text {
border: 1px dashed rgba(0, 0, 0, .15);
- border-radius: 1em;
+ border-radius: 16px;
padding: 5px 10px;
min-height: 15px;
display: block;
@@ -36,16 +36,16 @@ vn-td-editable {
left: 0;
box-sizing: border-box;
align-items: center;
- padding: .6em;
+ padding: 9px;
overflow: visible;
& > field {
flex: 1;
background-color: $color-bg-panel;
- padding: .5em;
- box-shadow: 0 0 .4em rgba(0, 0, 0, .2);
- border-radius: .1em;
- min-width: 6em;
+ padding: 8px;
+ box-shadow: 0 0 6px rgba(0, 0, 0, .2);
+ border-radius: 1px;
+ min-width: 96px;
& > * {
width: 100%;
diff --git a/front/core/components/toggle/style.scss b/front/core/components/toggle/style.scss
index 31769d2a5..5213215d6 100644
--- a/front/core/components/toggle/style.scss
+++ b/front/core/components/toggle/style.scss
@@ -22,7 +22,7 @@
height: 20px;
min-width: 20px;
margin: 6px 0;
- margin-right: .6em;
+ margin-right: 9px;
border: 2px solid #666;
}
& > .btn > .focus-mark {
diff --git a/front/core/components/tooltip/style.scss b/front/core/components/tooltip/style.scss
index 926142582..926419c24 100644
--- a/front/core/components/tooltip/style.scss
+++ b/front/core/components/tooltip/style.scss
@@ -6,7 +6,7 @@
z-index: 150;
background-color: $color-bg-dark;
color: $color-active-font;
- border-radius: .2em;
+ border-radius: 3px;
&.show {
display: inherit;
diff --git a/front/core/components/treeview/style.scss b/front/core/components/treeview/style.scss
index 7cd8c8bea..b8af114c1 100644
--- a/front/core/components/treeview/style.scss
+++ b/front/core/components/treeview/style.scss
@@ -11,7 +11,7 @@ vn-treeview-childs {
list-style: none;
ul {
- padding-left: 2.2em;
+ padding-left: 35px;
}
}
}
@@ -37,7 +37,7 @@ vn-treeview-childs {
vn-treeview-child {
line-height: 38px;
- font-size: 16px;
+ font-size: 1rem;
display: block;
.node {
diff --git a/front/core/components/wday-picker/style.scss b/front/core/components/wday-picker/style.scss
index be610c733..a8e3a65ab 100644
--- a/front/core/components/wday-picker/style.scss
+++ b/front/core/components/wday-picker/style.scss
@@ -9,11 +9,11 @@
& > span {
@extend %clickable;
border-radius: 50%;
- padding: .4em;
- margin: .2em;
+ padding: 6px;
+ margin: 3px;
display: inline-flex;
- width: 1.5em;
- height: 1.5em;
+ width: 24px;
+ height: 24px;
justify-content: center;
align-items: center;
outline: none;
diff --git a/front/core/directives/droppable.scss b/front/core/directives/droppable.scss
index f2e18a3ad..02261b5bc 100644
--- a/front/core/directives/droppable.scss
+++ b/front/core/directives/droppable.scss
@@ -5,8 +5,8 @@
.vn-draggable,
[vn-droppable] {
border: 2px dashed transparent;
- border-radius: 0.5em;
- transition: all 0.5s;
+ border-radius: 8px;
+ transition: all .5s;
}
.vn-droppable,
diff --git a/front/core/directives/focus.js b/front/core/directives/focus.js
index 869e9a7f0..8b75adcbc 100644
--- a/front/core/directives/focus.js
+++ b/front/core/directives/focus.js
@@ -1,11 +1,11 @@
import ngModule from '../module';
import isMobile from '../lib/is-mobile';
-export function focus($scope, input) {
+export function focus($timeout, input) {
if (isMobile) return;
const element = input;
- let selector = 'input, textarea, button, submit';
+ const selector = 'input, textarea, button, submit';
if (!input.matches(selector))
input = input.querySelector(selector);
@@ -20,26 +20,24 @@ export function focus($scope, input) {
return;
}
- input.focus();
-
- if (input.select) {
- $scope.$applyAsync(() => {
+ $timeout(() => {
+ input.focus();
+ if (input.select)
input.select();
- });
- }
+ });
}
-/**
+/*
* Sets the focus and selects the text on the input.
- *
- * @return {Object} The directive
*/
-export function directive() {
+export function directive($timeout) {
return {
restrict: 'A',
link: function($scope, $element) {
- $scope.$watch('', () => focus($scope, $element[0]));
+ $scope.$watch('', () => focus($timeout, $element[0]));
}
};
}
+directive.$inject = ['$timeout'];
+
ngModule.directive('vnFocus', directive);
diff --git a/front/core/directives/specs/focus.spec.js b/front/core/directives/specs/focus.spec.js
index 11c60688a..dd917dc29 100644
--- a/front/core/directives/specs/focus.spec.js
+++ b/front/core/directives/specs/focus.spec.js
@@ -6,7 +6,7 @@ describe('Directive focus', () => {
beforeEach(ngModule('vnCore'));
compile = (_element, _childElement) => {
- inject(($compile, $rootScope) => {
+ inject(($compile, $rootScope, $flushPendingTasks) => {
$scope = $rootScope.$new();
$element = angular.element(_element);
if (_childElement)
@@ -15,7 +15,7 @@ describe('Directive focus', () => {
$element[0].focus = jasmine.createSpy('focus');
$element[0].select = jasmine.createSpy('select');
$compile($element)($scope);
- $scope.$digest();
+ $flushPendingTasks();
});
};
diff --git a/front/core/directives/uvc.scss b/front/core/directives/uvc.scss
index 5221b8bdd..0cdf0ba1a 100644
--- a/front/core/directives/uvc.scss
+++ b/front/core/directives/uvc.scss
@@ -1,6 +1,6 @@
vn-table vn-dialog[vn-id="uvc"]{
& > div {
- min-width: 18em;
+ min-width: 288px;
align-items: center;
}
diff --git a/front/core/directives/zoom-image.scss b/front/core/directives/zoom-image.scss
index e075ff3a1..7debed995 100644
--- a/front/core/directives/zoom-image.scss
+++ b/front/core/directives/zoom-image.scss
@@ -5,7 +5,7 @@
position: fixed;
top: 0;
z-index: 25;
- background-color: rgba(1, 1, 1, 0.6);
+ background-color: rgba(1, 1, 1, .6);
& > div {
display: flex;
@@ -14,13 +14,13 @@
width: inherit;
height: inherit;
box-sizing: border-box;
- padding: 1em;
+ padding: 16px;
& > img {
cursor: zoom-out;
max-height: 100%;
max-width: 100%;
- border-radius: .2em;
+ border-radius: 3px;
}
}
}
diff --git a/front/core/styles/animations.scss b/front/core/styles/animations.scss
index 039f79c77..8ae119fb4 100644
--- a/front/core/styles/animations.scss
+++ b/front/core/styles/animations.scss
@@ -2,7 +2,7 @@
@keyframes nothing {}
@keyframes slideIn {
from {
- transform: translate3d(-2em, 0, 0);
+ transform: translate3d(-32px, 0, 0);
opacity: 0;
}
to {
diff --git a/front/core/styles/border.scss b/front/core/styles/border.scss
index 7450b5857..757ab453f 100644
--- a/front/core/styles/border.scss
+++ b/front/core/styles/border.scss
@@ -19,5 +19,5 @@
/* Border Radius */
.border-radius {
- border-radius: .3em;
+ border-radius: 4px;
}
\ No newline at end of file
diff --git a/front/core/styles/font-family.scss b/front/core/styles/font-family.scss
index b461917ce..db41ad750 100644
--- a/front/core/styles/font-family.scss
+++ b/front/core/styles/font-family.scss
@@ -21,7 +21,7 @@
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
- font-size: 24px; /* Preferred icon size */
+ font-size: 1.5rem; /* Preferred icon size */
display: inline-block;
line-height: 1;
text-transform: none;
diff --git a/front/core/styles/global.scss b/front/core/styles/global.scss
index 8b3d465f1..555b54f9e 100644
--- a/front/core/styles/global.scss
+++ b/front/core/styles/global.scss
@@ -1,6 +1,7 @@
@import "variables";
html {
+ font-size: $font-size;
background-color: $color-bg;
overflow: auto;
height: 100%;
@@ -9,7 +10,6 @@ body {
height: 100%;
font-family: vn-font;
color: $color-font;
- font-size: $font-size;
margin: 0;
padding: 0;
}
@@ -44,4 +44,4 @@ a {
.ng-leave,
.ng-enter {
transition: none;
-}
\ No newline at end of file
+}
diff --git a/front/core/styles/layout.scss b/front/core/styles/layout.scss
index 925526dca..85088db6a 100644
--- a/front/core/styles/layout.scss
+++ b/front/core/styles/layout.scss
@@ -40,7 +40,7 @@ html [vn-nine],
html [vn-ten],
html [vn-eleven],
html [vn-twelve]{
- flex-basis: 0.000000001px;
+ flex-basis: .1px;
}
html [vn-auto], vn-auto, .vn-auto {
flex-basis: auto;
diff --git a/front/core/styles/responsive.scss b/front/core/styles/responsive.scss
index 9cc58dd12..3e16cf128 100644
--- a/front/core/styles/responsive.scss
+++ b/front/core/styles/responsive.scss
@@ -1,52 +1,53 @@
@import "variables";
-
-/* Desktop - Laptop 1360x768 */
+/*
+// Desktop - Laptop 1360x768
@media (max-resolution: 119dpi) and (min-device-width: 1340px) and (max-device-width: 1899px)
{
- body { font-size: 10pt; }
+ html { font-size: 10pt; }
}
-/* Mobile - Low DPI */
+// Mobile - Low DPI
@media
(min-resolution: 120dpi),
(-webkit-min-device-pixel-ratio: 1.5)
{
- body { font-size: 9pt; }
+ html { font-size: 9pt; }
}
@media
(min-resolution: 144dpi),
(-webkit-min-device-pixel-ratio: 1.5)
{
- body { font-size: 11pt; }
+ html { font-size: 11pt; }
}
-/* Mobile - Normal DPI */
+// Mobile - Normal DPI
@media
(max-device-width: 383px) and (min-resolution: 192dpi),
(max-device-width: 383px) and (-webkit-min-device-pixel-ratio: 2)
{
- body { font-size: 10pt; }
+ html { font-size: 10pt; }
}
@media
(min-device-width: 384px) and (min-resolution: 192dpi),
(min-device-width: 384px) and (-webkit-min-device-pixel-ratio: 2)
{
- body { font-size: 11pt; }
+ html { font-size: 11pt; }
}
-/* Mobile - High DPI */
+// Mobile - High DPI
@media
(max-device-width: 411px) and (min-resolution: 249dpi),
(max-device-width: 411px) and (-webkit-min-device-pixel-ratio: 3)
{
- body { font-size: 10pt; }
+ html { font-size: 10pt; }
}
@media
(min-device-width: 412px) and (min-resolution: 249dpi),
(min-device-width: 412px) and (-webkit-min-device-pixel-ratio: 3)
{
- body { font-size: 11pt; }
+ html { font-size: 11pt; }
}
+*/
.vn-hide-narrow {
@media (max-width: $mobile-width) {
diff --git a/front/core/styles/text.scss b/front/core/styles/text.scss
index b1624cd26..751a5594b 100644
--- a/front/core/styles/text.scss
+++ b/front/core/styles/text.scss
@@ -3,46 +3,46 @@
/* Headings */
.text-h1, h1 {
- font-size: 32pt;
+ font-size: 2.3rem;
}
.text-h2, h2 {
- font-size: 28pt;
+ font-size: 2.25rem;
}
.text-h3, h3 {
- font-size: 24pt;
+ font-size: 2rem;
}
.text-h4, h4 {
- font-size: 20pt;
+ font-size: 1.6rem;
}
.text-h5, h5 {
- font-size: 16pt;
+ font-size: 1.3rem;
}
.text-h6, h6 {
- font-size: 14pt;
+ font-size: 1.125rem;
}
.text-subtitle1 {
- font-size: 13pt;
+ font-size: 1.06rem;
}
.text-subtitle2 {
- font-size: 12pt;
+ font-size: 1rem;
}
.text-body1 {
- font-size: 11pt;
+ font-size: .875rem;
}
.text-body2 {
- font-size: 11pt;
+ font-size: .875rem;
}
.text-caption {
- font-size: 11pt;
+ font-size: .875rem;
}
.text-overline {
- font-size: 10pt;
+ font-size: .8rem;
}
h1, h2, h3, h4, h5, h6 {
padding: 0;
margin-top: 0;
- margin-bottom: .3em;
+ margin-bottom: 4px;
}
/* Colors */
diff --git a/front/core/styles/variables.scss b/front/core/styles/variables.scss
index 89e487ad7..0958c88b8 100644
--- a/front/core/styles/variables.scss
+++ b/front/core/styles/variables.scss
@@ -1,17 +1,17 @@
@import "./util";
-$menu-width: 16em;
-$topbar-height: 4em;
+$font-size: 12pt;
+$menu-width: 256px;
+$topbar-height: 56px;
$mobile-width: 800px;
-$font-size: 16px;
// Width
-$width-xs: 25em;
-$width-sm: 34em;
-$width-md: 50em;
-$width-lg: 80em;
-$width-xl: 100em;
+$width-xs: 400px;
+$width-sm: 544px;
+$width-md: 800px;
+$width-lg: 1280px;
+$width-xl: 1600px;
// Spacing
@@ -115,6 +115,6 @@ $color-alert-light: darken($color-alert, 35%);
// Border
-$border-thin: .05em solid $color-spacer;
-$border-thin-light: .05em solid $color-spacer-light;
-$shadow: 0 .15em .15em 0 rgba(0, 0, 0, .3);
+$border-thin: 1px solid $color-spacer;
+$border-thin-light: 1px solid $color-spacer-light;
+$shadow: 0 2px 2px 0 rgba(0, 0, 0, .3);
diff --git a/front/salix/components/descriptor/style.scss b/front/salix/components/descriptor/style.scss
index af719cc0d..a048c12b3 100644
--- a/front/salix/components/descriptor/style.scss
+++ b/front/salix/components/descriptor/style.scss
@@ -3,7 +3,7 @@
@import "./variables";
.vn-descriptor {
- box-shadow: 0 .1em .2em $color-shadow;
+ box-shadow: 0 1px 3px $color-shadow;
& > .header {
display: flex;
@@ -26,7 +26,7 @@
padding: 10px;
}
vn-icon {
- font-size: 1.8em;
+ font-size: 1.75rem;
}
}
}
@@ -51,7 +51,7 @@
& > vn-icon {
padding: $spacing-sm;
color: $color-marginal;
- font-size: 1.5em;
+ font-size: 1.5rem;
&.bright {
color: $color-main;
@@ -70,7 +70,7 @@
margin: 0 $spacing-sm;
& > vn-icon {
- font-size: 1.8em;
+ font-size: 1.75rem;
padding: 0;
}
}
diff --git a/front/salix/components/home/style.scss b/front/salix/components/home/style.scss
index 268260bbd..7524d2be3 100644
--- a/front/salix/components/home/style.scss
+++ b/front/salix/components/home/style.scss
@@ -2,7 +2,7 @@
vn-home {
display: block;
- padding: .5em;
+ padding: 8px;
& > div {
& > h6 {
@@ -16,7 +16,7 @@ vn-home {
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
- max-width: 44em;
+ max-width: 704px;
margin: 0 auto;
& > a {
@@ -27,10 +27,10 @@ vn-home {
color: $color-font-dark;
display: flex;
flex-direction: column;
- height: 8em;
- width: 8em;
- margin: .5em;
- padding: 1em;
+ height: 128px;
+ width: 128px;
+ margin: 8px;
+ padding: 16px;
justify-content: center;
& > div {
@@ -41,21 +41,21 @@ vn-home {
& > vn-icon {
display: block;
- font-size: 3.5em;
+ font-size: 3.5rem;
}
}
& > span {
- font-size: 0.9em;
+ font-size: .875rem;
text-align: center;
}
& > h4 {
max-width: 100%;
text-align: center;
- font-size: 12pt;
+ font-size: 1rem;
overflow: hidden;
color: inherit;
margin: 0;
- line-height: 1.5em;
+ line-height: 24px;
/* & > .bind-letter {
color: #FD0;
diff --git a/front/salix/components/layout/style.scss b/front/salix/components/layout/style.scss
index 1a483ab96..14af8ac23 100644
--- a/front/salix/components/layout/style.scss
+++ b/front/salix/components/layout/style.scss
@@ -7,42 +7,42 @@ vn-layout {
right: 0;
left: 0;
z-index: 10;
- box-shadow: 0 .1em .2em $color-shadow;
+ box-shadow: 0 1px 3px $color-shadow;
height: $topbar-height;
- padding: 0 1em;
+ padding: 0 16px;
justify-content: space-between;
& > .side {
flex: auto;
display: flex;
align-items: center;
- width: 5em;
+ width: 80px;
transition: width 200ms;
}
& > .start {
- padding-right: 1em;
+ padding-right: 16px;
overflow: hidden;
& > .logo > img {
- height: 2em;
+ height: 32px;
display: block;
}
& > .main-title {
- font-size: 1.6em;
+ font-size: 1.56rem;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
- padding-left: .4em;
+ padding-left: 6px;
}
& > vn-spinner {
- padding: 0 .4em;
+ padding: 0 6px;
}
}
& > vn-slot {
flex: auto;
}
& > .end {
- padding-left: 1em;
+ padding-left: 16px;
justify-content: flex-end;
}
.show-menu {
@@ -50,7 +50,7 @@ vn-layout {
}
.vn-button {
color: inherit;
- font-size: 1.05em;
+ font-size: 1.05rem;
padding: 0;
}
}
@@ -66,7 +66,7 @@ vn-layout {
}
&.left-menu {
& > vn-topbar > .start {
- width: 5em + $menu-width;
+ width: 80px + $menu-width;
}
& > .main-view {
padding-left: $menu-width;
@@ -74,11 +74,14 @@ vn-layout {
}
&.right-menu {
& > vn-topbar > .end {
- width: 5em + $menu-width;
+ width: 80px + $menu-width;
}
& > .main-view {
padding-right: $menu-width;
}
+ [fixed-bottom-right] {
+ right: 64px + $menu-width;
+ }
}
& > .main-view {
padding-top: $topbar-height;
@@ -89,6 +92,11 @@ vn-layout {
padding: $spacing-md;
box-sizing: border-box
}
+ [fixed-bottom-right] {
+ position: fixed;
+ bottom: 32px;
+ right: 32px;
+ }
&.ng-enter {
vn-side-menu {
opacity: 0;
@@ -124,6 +132,9 @@ vn-layout {
& > .main-view {
padding-right: 0;
}
+ [fixed-bottom-right] {
+ right: 32px;
+ }
}
ui-view > * {
padding-left: 0;
@@ -139,22 +150,22 @@ vn-layout {
& > li {
@extend %clickable-light;
background-color: $color-main;
- margin-bottom: .6em;
- padding: .8em;
- border-radius: .1em;
- min-width: 8em;
+ margin-bottom: 9px;
+ padding: 12px;
+ border-radius: 1px;
+ min-width: 128px;
white-space: nowrap;
&:last-child {
margin-bottom: 0;
}
& > vn-icon {
- padding-right: .3em;
+ padding-right: 4px;
vertical-align: middle;
}
}
}
#user {
- font-size: 1.5em;
+ font-size: 1.5rem;
height: auto;
}
diff --git a/front/salix/components/login/style.scss b/front/salix/components/login/style.scss
index e098fbdb4..8ebf2a68c 100644
--- a/front/salix/components/login/style.scss
+++ b/front/salix/components/login/style.scss
@@ -7,7 +7,7 @@ vn-login {
margin: 0;
padding: 0;
color: $color-font;
- font-size: 1.1em;
+ font-size: 1.1rem;
font-weight: normal;
background-color: $color-bg-dark;
display: flex;
@@ -18,16 +18,16 @@ vn-login {
& > .box {
box-sizing: border-box;
position: absolute;
- max-width: 19em;
- min-width: 15em;
- padding: 3em;
+ max-width: 304px;
+ min-width: 240px;
+ padding: 48px;
background-color: $color-bg-panel;
- box-shadow: 0 0 1em 0 rgba(0, 0, 0, .6);
- border-radius: .5em;
+ box-shadow: 0 0 16px 0 rgba(0, 0, 0, .6);
+ border-radius: 8px;
& > img {
width: 100%;
- padding-bottom: 1em;
+ padding-bottom: 16px;
}
& > form {
& > .vn-textfield {
@@ -40,7 +40,7 @@ vn-login {
}
}
& > .footer {
- margin-top: 2em;
+ margin-top: 32px;
text-align: center;
position: relative;
@@ -55,8 +55,8 @@ vn-login {
& > .spinner-wrapper {
position: absolute;
width: 0;
- top: .2em;
- right: -.5em;
+ top: 3px;
+ right: -8px;
overflow: visible;
}
}
@@ -67,7 +67,7 @@ vn-login {
background-color: $color-bg-panel;
& > .box {
- padding: 1em;
+ padding: 16px;
box-shadow: none;
}
}
diff --git a/front/salix/components/side-menu/style.scss b/front/salix/components/side-menu/style.scss
index 239d15cf6..b9722d519 100644
--- a/front/salix/components/side-menu/style.scss
+++ b/front/salix/components/side-menu/style.scss
@@ -11,7 +11,7 @@ vn-side-menu > .menu {
width: $menu-width;
min-width: $menu-width;
background-color: $color-bg-panel;
- box-shadow: 0 .1em .2em $color-shadow;
+ box-shadow: 0 1px 3px $color-shadow;
overflow: auto;
top: $topbar-height;
diff --git a/front/salix/components/summary/style.scss b/front/salix/components/summary/style.scss
index f0d6ae038..5c53eea95 100644
--- a/front/salix/components/summary/style.scss
+++ b/front/salix/components/summary/style.scss
@@ -11,7 +11,7 @@
color: $color-font-dark;
margin: 0;
text-align: center;
- line-height: 1.3em;
+ line-height: 20px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@@ -25,27 +25,27 @@
h4 {
margin-bottom: $spacing-md;
text-transform: uppercase;
- font-size: 15pt;
+ font-size: 1.25rem;
line-height: 1;
padding: 7px;
padding-bottom: 4px; /* Bottom line-height fix */
font-weight: lighter;
background-color: $color-main-light;
- border-bottom: .1em solid $color-main;
+ border-bottom: 1px solid $color-main;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
& > * {
margin: $spacing-sm;
- min-width: 14em;
+ min-width: 224px;
padding: 0;
}
& > vn-auto {
width: 100%;
}
vn-label-value > section {
- margin-bottom: .3em;
+ margin-bottom: 4px;
}
}
p:after {
diff --git a/front/salix/components/user-popover/style.scss b/front/salix/components/user-popover/style.scss
index c8325c9f6..5f17ed293 100644
--- a/front/salix/components/user-popover/style.scss
+++ b/front/salix/components/user-popover/style.scss
@@ -1,14 +1,14 @@
@import "variables";
.vn-popover .user-popover {
- width: 16em;
+ width: 256px;
& > .profile-card {
display: flex;
align-items: center;
& > vn-icon {
- font-size: 80px;
+ font-size: 5rem;
color: $color-font-bg-marginal;
}
& > div {
@@ -19,11 +19,11 @@
& > div {
display: flex;
- padding-bottom: .5em;
+ padding-bottom: 8px;
& > .user {
flex: 1;
- max-width: 8em;
+ max-width: 128px;
}
}
}
@@ -33,5 +33,5 @@
float: right;
height: initial;
vertical-align: middle;
- font-size: 1em;
+ font-size: 1rem;
}
\ No newline at end of file
diff --git a/front/salix/styles/misc.scss b/front/salix/styles/misc.scss
index 1f2d79981..55de5eb0c 100644
--- a/front/salix/styles/misc.scss
+++ b/front/salix/styles/misc.scss
@@ -3,7 +3,7 @@
form vn-horizontal {
align-items: center;
- min-height: 2.8em;
+ min-height: 44px;
& > * {
box-sizing: border-box;
@@ -55,9 +55,9 @@ form vn-horizontal {
vn-bg-title {
display: block;
text-align: center;
- padding: 1em;
+ padding: 16px;
color: gray;
- font-size: 1.3em;
+ font-size: 1.25rem;
}
.totalBox {
border: 1px solid #CCC;
@@ -65,7 +65,7 @@ vn-bg-title {
justify-content: center;
align-items: center;
padding: $spacing-md;
- max-width: 14em;
+ max-width: 224px;
}
.form {
height: 100%;
@@ -73,11 +73,6 @@ vn-bg-title {
padding: $spacing-lg;
max-width: 1000px;
}
-html [fixed-bottom-right] {
- position: fixed;
- bottom: 2em;
- right: 2em;
-}
.list > vn-none {
min-width: 60px;
}
@@ -103,13 +98,13 @@ vn-tool-bar {
display: flex;
& > * {
- margin-right: .6em;
+ margin-right: 9px;
}
}
html [scrollable] {
min-height: 1px;
flex: 1;
- flex-basis: 0.000000001px;
+ flex-basis: .1px;
}
.ellipsize {
text-overflow: ellipsis;
@@ -120,7 +115,7 @@ html [scrollable] {
@extend %active;
&.small {
- font-size: 0.7em
+ font-size: .7rem
}
}
diff --git a/front/salix/styles/order-product.scss b/front/salix/styles/order-product.scss
index df14f5558..bd77144f2 100644
--- a/front/salix/styles/order-product.scss
+++ b/front/salix/styles/order-product.scss
@@ -8,16 +8,16 @@
& > .product {
box-sizing: border-box;
padding: $spacing-sm;
- width: 28em;
+ width: 448px;
overflow: hidden;
& > vn-card {
display: flex;
- height: 12em;
+ height: 192px;
.image {
- width: 12em;
- height: 12em;
+ width: 192px;
+ height: 192px;
img {
width: 100%;
@@ -32,37 +32,37 @@
height: 100%;
width: 100%;
overflow: hidden;
- padding: .8em;
+ padding: 12px;
& > h3 {
font-family: vn-font;
margin: 0;
- margin-bottom: .3em;
+ margin-bottom: 4px;
font-weight: normal;
line-height: initial;
- font-size: 1.05em;
- max-height:2.4em;
+ font-size: 1rem;
+ max-height: 38px;
overflow: hidden;
}
& > h4 {
color: $color-font-secondary;
text-transform: uppercase;
- margin-bottom: .3em;
+ margin-bottom: 4px;
line-height: initial;
- font-size: 1em;
+ font-size: 1rem;
flex: 1;
}
& > .tags {
- padding-bottom: .2em;
- height: 3em;
+ padding-bottom: 3px;
+ height: 48px;
& > vn-label-value {
- font-size: .8em;
+ font-size: .75rem;
}
}
}
.footer {
- font-size: .8em;
+ font-size: .8rem;
& > .price {
overflow: hidden;
@@ -77,7 +77,7 @@
&:first-child,
&:last-child {
- font-size: 1.4em;
+ font-size: 1.375rem;
}
}
@@ -87,7 +87,7 @@
}
& > .priceKg {
color: $color-font-secondary;
- font-size: .8em;
+ font-size: .75rem;
}
}
}
diff --git a/front/salix/styles/photo-list.scss b/front/salix/styles/photo-list.scss
index b0c926def..67d848fa7 100644
--- a/front/salix/styles/photo-list.scss
+++ b/front/salix/styles/photo-list.scss
@@ -8,10 +8,10 @@
.photo {
box-sizing: border-box;
- transition: all 0.5s;
+ transition: all .5s;
padding: $spacing-sm;
position: relative;
- width: 28em;
+ width: 448px;
.image {
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),
@@ -30,8 +30,8 @@
}
.actions {
position: absolute;
- right: 1em;
- top: 1em
+ right: 16px;
+ top: 16px
}
}
.photo:hover .image {
diff --git a/modules/claim/front/action/style.scss b/modules/claim/front/action/style.scss
index aef8d2cfd..bac316287 100644
--- a/modules/claim/front/action/style.scss
+++ b/modules/claim/front/action/style.scss
@@ -36,7 +36,7 @@ vn-claim-action {
div.ticketList {
overflow: auto;
- max-height: 350px
+ max-height: 350px;
}
}
}
\ No newline at end of file
diff --git a/modules/claim/front/basic-data/style.scss b/modules/claim/front/basic-data/style.scss
index 5f1432879..e80361ca8 100644
--- a/modules/claim/front/basic-data/style.scss
+++ b/modules/claim/front/basic-data/style.scss
@@ -1,3 +1,3 @@
vn-claim-basic-data vn-date-picker {
- padding-left: 5em;
+ padding-left: 80px;
}
diff --git a/modules/claim/front/detail/style.scss b/modules/claim/front/detail/style.scss
index 6229e56fb..63d6e2e04 100644
--- a/modules/claim/front/detail/style.scss
+++ b/modules/claim/front/detail/style.scss
@@ -1,7 +1,7 @@
@import "variables";
.vn-popover .discount-popover {
- width: 16em;
+ width: 256px;
.header {
background-color: $color-main;
@@ -13,8 +13,8 @@
}
}
.simulatorTitle {
- margin-bottom: 0px;
- font-size: 12px;
+ margin-bottom: 0;
+ font-size: .75rem;
color: $color-main;
}
vn-label-value {
diff --git a/modules/claim/front/photos/style.scss b/modules/claim/front/photos/style.scss
index 35f548560..d747dd9b8 100644
--- a/modules/claim/front/photos/style.scss
+++ b/modules/claim/front/photos/style.scss
@@ -6,17 +6,17 @@ vn-claim-photos {
.drop-zone {
color: $color-font-secondary;
box-sizing: border-box;
- border-radius: 0.5em;
+ border-radius: 8px;
text-align: center;
min-height: 100%;
.empty-rows {
- padding: 5em $spacing-md;
- font-size: 1.4em
+ padding: 80px $spacing-md;
+ font-size: 1.375rem
}
vn-icon {
- font-size: 3em
+ font-size: 3rem
}
}
@@ -25,8 +25,8 @@ vn-claim-photos {
min-height: 100%;
.photo {
- width: 32em;
- height: 18em;
+ width: 512px;
+ height: 288px;
}
}
}
\ No newline at end of file
diff --git a/modules/claim/front/summary/style.scss b/modules/claim/front/summary/style.scss
index afd3838be..e0542dea0 100644
--- a/modules/claim/front/summary/style.scss
+++ b/modules/claim/front/summary/style.scss
@@ -2,9 +2,9 @@
vn-claim-summary {
section.photo {
- height: 15.5em
+ height: 248px;
}
.photo .image {
- border-radius: 0.2em
+ border-radius: 3px;
}
}
\ No newline at end of file
diff --git a/modules/client/front/balance/create/index.html b/modules/client/front/balance/create/index.html
index 36f45653f..07c4de531 100644
--- a/modules/client/front/balance/create/index.html
+++ b/modules/client/front/balance/create/index.html
@@ -1,11 +1,6 @@
-
+
-
-
+ New payment
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/client/front/balance/create/index.js b/modules/client/front/balance/create/index.js
index 1a7d8b97b..5844e2204 100644
--- a/modules/client/front/balance/create/index.js
+++ b/modules/client/front/balance/create/index.js
@@ -1,10 +1,12 @@
import ngModule from '../../module';
-import Section from 'salix/components/section';
-import './style.scss';
+import Dialog from 'core/components/dialog';
+import template from './index.html';
+
+class Controller extends Dialog {
+ constructor($element, $, $transclude) {
+ super($element, $, $transclude);
+ this.fillSlots(template);
-class Controller extends Section {
- constructor($element, $) {
- super($element, $);
this.receipt = {
payed: new Date(),
clientFk: this.$params.id,
@@ -51,46 +53,35 @@ class Controller extends Section {
}
getAmountPaid() {
- let filter = {
+ const filter = {
where: {
clientFk: this.$params.id,
companyFk: this.receipt.companyFk
}
};
- let query = `ClientRisks?filter=${JSON.stringify(filter)}`;
- this.$http.get(query).then(res => {
+ this.$http.get(`ClientRisks`, {filter}).then(res => {
this.receipt.amountPaid = (res.data.length && res.data[0].amount) || null;
});
}
- show() {
- this.$.dialog.show();
- }
+ responseHandler(response) {
+ if (response !== 'accept')
+ return super.responseHandler(response);
- hide() {
- this.$.dialog.hide();
- }
-
- save() {
- let query = `receipts`;
- this.$http.post(query, this.receipt).then(() => {
- this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
- this.hide();
- if (this.onResponse)
- this.onResponse();
- });
+ return this.$http.post(`Receipts`, this.receipt)
+ .then(() => super.responseHandler(response))
+ .then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
}
}
-ngModule.component('vnClientBalanceCreate', {
- template: require('./index.html'),
+ngModule.vnComponent('vnClientBalanceCreate', {
controller: Controller,
+ transclude: true,
bindings: {
payed: '',
bankFk: '',
amountPaid: '',
- onResponse: '&?',
companyFk: '',
description: '',
clientFk: ''
diff --git a/modules/client/front/balance/create/style.scss b/modules/client/front/balance/create/style.scss
deleted file mode 100644
index 710de47b9..000000000
--- a/modules/client/front/balance/create/style.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-vn-horizontal.buttons-bar{
- text-align: center;
-}
\ No newline at end of file
diff --git a/modules/client/front/balance/index/index.html b/modules/client/front/balance/index/index.html
index 1e26607d1..dbd5889a2 100644
--- a/modules/client/front/balance/index/index.html
+++ b/modules/client/front/balance/index/index.html
@@ -10,35 +10,31 @@
filter="$ctrl.filter"
data="$ctrl.clientRisks">
+
+
+
+
+
+
Total by company
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
Total by company
-
-
-
-
-
-
-
-
@@ -117,10 +113,12 @@
vn-tooltip="New payment"
vn-bind="+"
fixed-bottom-right
- ng-click="$ctrl.openCreateDialog()">
+ ng-click="balanceCreate.show()">
+ vn-id="balance-create"
+ on-accept="$ctrl.getData()"
+ company-fk="$ctrl.companyId">
this.getData();
- this.$.balanceCreateDialog.show();
- }
-
showWorkerDescriptor(event, workerFk) {
if (event.defaultPrevented) return;
diff --git a/modules/client/front/balance/index/style.scss b/modules/client/front/balance/index/style.scss
deleted file mode 100644
index 74d3bc09b..000000000
--- a/modules/client/front/balance/index/style.scss
+++ /dev/null
@@ -1,10 +0,0 @@
-
-@import "./variables";
-
-vn-client-balance-index {
- .totalBox {
- border: $border-thin-light;
- text-align: left;
- float: right
- }
-}
\ No newline at end of file
diff --git a/modules/client/front/billing-data/index.html b/modules/client/front/billing-data/index.html
index 891c9364f..3be5de972 100644
--- a/modules/client/front/billing-data/index.html
+++ b/modules/client/front/billing-data/index.html
@@ -106,7 +106,8 @@
vn-one
label="Name"
ng-model="$ctrl.newBankEntity.name"
- required="true">
+ required="true"
+ vn-focus>
diff --git a/modules/client/front/descriptor-popover/style.scss b/modules/client/front/descriptor-popover/style.scss
index 0262c4ac0..8de03b90b 100644
--- a/modules/client/front/descriptor-popover/style.scss
+++ b/modules/client/front/descriptor-popover/style.scss
@@ -1,7 +1,7 @@
vn-client-descriptor-popover {
vn-client-descriptor {
display: block;
- width: 16em;
+ width: 256px;
& > vn-card{
margin: 0!important;
}
diff --git a/modules/client/front/sample/create/style.scss b/modules/client/front/sample/create/style.scss
index fdd01f729..b6cb688b5 100644
--- a/modules/client/front/sample/create/style.scss
+++ b/modules/client/front/sample/create/style.scss
@@ -4,7 +4,7 @@ div.vn-dialog {
.container, .container h1 {
font-family: "Roboto","Helvetica","Arial",sans-serif;
- font-size: 1em !important;
+ font-size: 1rem !important;
h1 {
font-weight: bold;
@@ -12,18 +12,18 @@ div.vn-dialog {
}
p {
- margin: 1em 0
+ margin: 16px 0
}
footer p {
- font-size: 10px !important;
- line-height: 10px
+ font-size: .625rem !important;
+ line-height: 10px;
}
}
.title h1 {
- font-size: 2em !important;
+ font-size: 2rem !important;
margin: 0
}
diff --git a/modules/client/front/sms/style.scss b/modules/client/front/sms/style.scss
index 89723b196..84571a5f4 100644
--- a/modules/client/front/sms/style.scss
+++ b/modules/client/front/sms/style.scss
@@ -1,5 +1,5 @@
@import "variables";
.SMSDialog {
- min-width: 25em
+ min-width: 400px
}
\ No newline at end of file
diff --git a/modules/invoiceOut/front/descriptor-popover/style.scss b/modules/invoiceOut/front/descriptor-popover/style.scss
index 58e65d320..f50481083 100644
--- a/modules/invoiceOut/front/descriptor-popover/style.scss
+++ b/modules/invoiceOut/front/descriptor-popover/style.scss
@@ -1,8 +1,8 @@
vn-ticket-descriptor-popover {
vn-ticket-descriptor {
display: block;
- width: 16em;
- max-height: 28em;
+ width: 256px;
+ max-height: 448px;
& > vn-card {
margin: 0!important;
diff --git a/modules/invoiceOut/front/descriptor/index.html b/modules/invoiceOut/front/descriptor/index.html
index 981c23e34..1c18d92ed 100644
--- a/modules/invoiceOut/front/descriptor/index.html
+++ b/modules/invoiceOut/front/descriptor/index.html
@@ -40,11 +40,11 @@
\ No newline at end of file
diff --git a/modules/invoiceOut/front/descriptor/index.js b/modules/invoiceOut/front/descriptor/index.js
index fea3c8bad..b813214bc 100644
--- a/modules/invoiceOut/front/descriptor/index.js
+++ b/modules/invoiceOut/front/descriptor/index.js
@@ -5,9 +5,18 @@ class Controller extends Component {
constructor($element, $) {
super($element, $);
this.moreOptions = [
- {callback: this.showInvoiceOutPdf, name: 'Show invoice PDF'},
- {callback: this.showDeleteInvoiceOutDialog, name: 'Delete Invoice', acl: 'invoicing'},
- {callback: this.showBookInvoiceOutDialog, name: 'Book invoice', acl: 'invoicing'}
+ {
+ name: 'Show invoice PDF',
+ callback: this.showInvoiceOutPdf
+ }, {
+ name: 'Delete Invoice',
+ callback: this.showDeleteInvoiceOutDialog,
+ acl: 'invoicing'
+ }, {
+ name: 'Book invoice',
+ callback: this.showBookInvoiceOutDialog,
+ acl: 'invoicing'
+ }
];
}
@@ -60,24 +69,18 @@ class Controller extends Component {
this.$.bookConfirmation.show();
}
- deleteInvoiceOut(response) {
- if (response === 'accept') {
- const query = `InvoiceOuts/${this.invoiceOut.id}/delete`;
- this.$http.post(query).then(() => {
- this.vnApp.showSuccess(this.$translate.instant('InvoiceOut deleted'));
- this.$state.go('invoiceOut.index');
- });
- }
+ deleteInvoiceOut() {
+ const query = `InvoiceOuts/${this.invoiceOut.id}/delete`;
+ return this.$http.post(query)
+ .then(() => this.$state.go('invoiceOut.index'))
+ .then(() => this.vnApp.showSuccess(this.$t('InvoiceOut deleted')));
}
- bookInvoiceOut(response) {
- if (response === 'accept') {
- const query = `InvoiceOuts/${this.invoiceOut.ref}/book`;
- this.$http.post(query).then(() => {
- this.vnApp.showSuccess(this.$translate.instant('InvoiceOut booked'));
- this.$state.reload();
- });
- }
+ bookInvoiceOut() {
+ const query = `InvoiceOuts/${this.invoiceOut.ref}/book`;
+ return this.$http.post(query)
+ .then(() => this.$state.reload())
+ .then(() => this.vnApp.showSuccess(this.$t('InvoiceOut booked')));
}
set quicklinks(value = {}) {
diff --git a/modules/item/front/descriptor-popover/style.scss b/modules/item/front/descriptor-popover/style.scss
index 6c03a004e..219e68bae 100644
--- a/modules/item/front/descriptor-popover/style.scss
+++ b/modules/item/front/descriptor-popover/style.scss
@@ -1,5 +1,5 @@
body > .vn-popover vn-item-descriptor {
display: block;
- width: 16em;
- min-height: 28em;
+ width: 256px;
+ min-height: 448px;
}
\ No newline at end of file
diff --git a/modules/item/front/fetched-tags/style.scss b/modules/item/front/fetched-tags/style.scss
index a15907232..393c17651 100644
--- a/modules/item/front/fetched-tags/style.scss
+++ b/modules/item/front/fetched-tags/style.scss
@@ -10,7 +10,7 @@ vn-fetched-tags {
& > vn-one {
overflow: hidden;
text-overflow: ellipsis;
- min-width: 5em;
+ min-width: 80px;
}
& > vn-one:nth-child(2) h3 {
@@ -18,25 +18,25 @@ vn-fetched-tags {
text-transform: uppercase;
line-height: initial;
text-align: center;
- font-size: 1em
+ font-size: 1rem
}
& > vn-auto {
display: flex;
- padding-left: .4em;
- min-width: 12em;
+ padding-left: 6px;
+ min-width: 192px;
& > .inline-tag {
display: inline-block;
color: $color-font-secondary;
- margin-left: .4em;
+ margin-left: 6px;
text-align: center;
- font-size: .8em;
- height: 1.25em;
- padding: .1em;
- border-radius: .1em;
- width: 4em;
- min-width: 4em;
+ font-size: .75rem;
+ height: 20px;
+ padding: 1px;
+ border-radius: 1px;
+ width: 64px;
+ min-width: 64px;
border: 1px solid $color-spacer;
&.empty {
@@ -48,7 +48,7 @@ vn-fetched-tags {
flex-direction: column;
& > vn-one {
- padding-bottom: .2em
+ padding-bottom: 3px
}
& > vn-auto {
white-space: initial;
@@ -57,7 +57,7 @@ vn-fetched-tags {
justify-content: center;
& > .inline-tag {
- margin: .1em;
+ margin: 1px;
}
}
}
diff --git a/modules/item/front/index/style.scss b/modules/item/front/index/style.scss
index 1cbc88124..c3d65349e 100644
--- a/modules/item/front/index/style.scss
+++ b/modules/item/front/index/style.scss
@@ -6,23 +6,23 @@ vn-item-product {
.id {
background-color: $color-main;
color: $color-font-dark;
- margin-bottom: 0em;
+ margin-bottom: 0;
}
.image {
- height: 7em;
- width: 7em;
+ height: 112px;
+ width: 112px;
& > img {
max-height: 100%;
max-width: 100%;
- border-radius: .2em;
+ border-radius: 3px;
}
}
vn-label-value:first-of-type section{
- margin-top: 0.6em;
+ margin-top: 9px;
}
vn-fetched-tags vn-horizontal{
- margin-top: 0.9em;
+ margin-top: 14px;
}
}
diff --git a/modules/item/front/summary/style.scss b/modules/item/front/summary/style.scss
index bb7e5d227..7d5e3b609 100644
--- a/modules/item/front/summary/style.scss
+++ b/modules/item/front/summary/style.scss
@@ -7,12 +7,12 @@ vn-item-summary {
}
.item-state {
- padding: .4em;
+ padding: 6px;
background-color: $color-main;
color: $color-font-dark;
p {
- font-size: .8em;
+ font-size: .75rem;
text-align: center;
margin: 0;
@@ -21,7 +21,7 @@ vn-item-summary {
line-height: 1;
}
&:last-child {
- font-size: 1.5em;
+ font-size: 1.5rem;
font-weight: bold;
}
}
@@ -29,7 +29,7 @@ vn-item-summary {
padding: 0;
&:nth-child(1) {
- border-right: .1em solid white;
+ border-right: 1px solid white;
}
}
}
\ No newline at end of file
diff --git a/modules/item/front/waste/style.scss b/modules/item/front/waste/style.scss
index 59e9a3b68..55a6eb2ef 100644
--- a/modules/item/front/waste/style.scss
+++ b/modules/item/front/waste/style.scss
@@ -4,14 +4,14 @@ vn-item-waste {
.header {
margin-bottom: 16px;
text-transform: uppercase;
- font-size: 15pt;
+ font-size: 1.25rem;
line-height: 1;
padding: 7px;
padding-bottom: 7px;
padding-bottom: 4px;
font-weight: lighter;
background-color: #fde6ca;
- border-bottom: 0.1em solid #f7931e;
+ border-bottom: 1px solid #f7931e;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@@ -19,7 +19,7 @@ vn-item-waste {
vn-table vn-th.waste-family,
vn-table vn-td.waste-family {
- max-width: 4em;
- width: 4em
+ max-width: 64px;
+ width: 64px
}
}
\ No newline at end of file
diff --git a/modules/order/front/catalog-view/style.scss b/modules/order/front/catalog-view/style.scss
index 18dc51bb0..aa4e301a9 100644
--- a/modules/order/front/catalog-view/style.scss
+++ b/modules/order/front/catalog-view/style.scss
@@ -15,7 +15,7 @@ vn-order-catalog {
}
}
& > vn-auto {
- width: 28em;
+ width: 448px;
display: flex;
overflow: hidden;
diff --git a/modules/order/front/catalog/style.scss b/modules/order/front/catalog/style.scss
index 308acb6b2..9ffe81dfb 100644
--- a/modules/order/front/catalog/style.scss
+++ b/modules/order/front/catalog/style.scss
@@ -34,9 +34,9 @@ vn-order-catalog vn-side-menu div {
color: #FFF
}
& > i:before {
- font-size: 32pt;
- width: 1em;
- height: 1em;
+ font-size: 2.6rem;
+ width: 16px;
+ height: 16px;
}
}
}
@@ -49,6 +49,6 @@ vn-order-catalog vn-side-menu div {
max-width: 100%;
}
vn-autocomplete[vn-id="type"] .list {
- max-height: 20em
+ max-height: 320px
}
}
\ No newline at end of file
diff --git a/modules/order/front/prices-popover/style.scss b/modules/order/front/prices-popover/style.scss
index 150c2296a..edd2d1513 100644
--- a/modules/order/front/prices-popover/style.scss
+++ b/modules/order/front/prices-popover/style.scss
@@ -14,15 +14,15 @@
.prices {
vn-table {
.warehouse {
- width: 3em;
- max-width: 3em;
+ width: 48px;
+ max-width: 48px;
}
.price-kg {
color: $color-font-secondary;
- font-size: .8em
+ font-size: .75rem
}
.vn-input-number {
- width: 3.5em;
+ width: 56px;
}
}
.footer {
diff --git a/modules/order/front/summary/style.scss b/modules/order/front/summary/style.scss
index c225b4b49..a0ed56d42 100644
--- a/modules/order/front/summary/style.scss
+++ b/modules/order/front/summary/style.scss
@@ -4,16 +4,16 @@ vn-order-summary .summary{
max-width: $width-lg;
& > div > vn-horizontal > vn-one {
- min-width: 10em !important;
+ min-width: 160px !important;
&.taxes {
border: $border-thin-light;
text-align: right;
- padding: .5em !important;
+ padding: 8px !important;
& > p {
- font-size: 1.2em;
- margin: .2em;
+ font-size: 1.2rem;
+ margin: 3px;
}
}
}
diff --git a/modules/route/front/descriptor-popover/style.scss b/modules/route/front/descriptor-popover/style.scss
index 0c84ff2fe..163a032e3 100644
--- a/modules/route/front/descriptor-popover/style.scss
+++ b/modules/route/front/descriptor-popover/style.scss
@@ -1,7 +1,7 @@
vn-route-descriptor-popover {
vn-route-descriptor {
display: block;
- width: 16em;
+ width: 256px;
& > vn-card{
margin: 0!important;
}
diff --git a/modules/ticket/front/card/index.js b/modules/ticket/front/card/index.js
index 3872259a9..8dce23aa7 100644
--- a/modules/ticket/front/card/index.js
+++ b/modules/ticket/front/card/index.js
@@ -57,13 +57,13 @@ class Controller extends ModuleCard {
],
};
- this.$http.get(`Tickets/${this.$params.id}`, {filter})
+ return this.$http.get(`Tickets/${this.$params.id}`, {filter})
.then(res => this.onData(res.data));
}
onData(data) {
this.ticket = data;
- this.$http.get(`Clients/${data.client.id}/getDebt`)
+ return this.$http.get(`Clients/${data.client.id}/getDebt`)
.then(res => this.ticket.client.debt = res.data.debt);
}
}
diff --git a/modules/ticket/front/component/style.scss b/modules/ticket/front/component/style.scss
index c20b8f720..d1a8ac9c4 100644
--- a/modules/ticket/front/component/style.scss
+++ b/modules/ticket/front/component/style.scss
@@ -3,23 +3,23 @@
vn-ticket-components {
.vn-table > tbody {
&:not(:last-child) {
- border-bottom: .1em solid $color-spacer-light;
+ border-bottom: 1px solid $color-spacer-light;
}
& > tr {
border-bottom: none;
&.components {
- height: 1em;
+ height: 16px;
& > td {
- padding-top: .1em;
- padding-bottom: .1em;
+ padding-top: 1px;
+ padding-bottom: 1px;
}
&:nth-child(2) > td {
- padding-top: 1em;
+ padding-top: 16px;
}
&:last-child > td {
- padding-bottom: 1em;
+ padding-bottom: 16px;
}
}
}
diff --git a/modules/ticket/front/descriptor-popover/style.scss b/modules/ticket/front/descriptor-popover/style.scss
index 58e65d320..f50481083 100644
--- a/modules/ticket/front/descriptor-popover/style.scss
+++ b/modules/ticket/front/descriptor-popover/style.scss
@@ -1,8 +1,8 @@
vn-ticket-descriptor-popover {
vn-ticket-descriptor {
display: block;
- width: 16em;
- max-height: 28em;
+ width: 256px;
+ max-height: 448px;
& > vn-card {
margin: 0!important;
diff --git a/modules/ticket/front/descriptor/index.html b/modules/ticket/front/descriptor/index.html
index f47f3d6ef..2ea87839b 100644
--- a/modules/ticket/front/descriptor/index.html
+++ b/modules/ticket/front/descriptor/index.html
@@ -153,20 +153,14 @@
+ on-accept="$ctrl.changeShipped()">
-
-
- Change shipped hour
-
-
-
-
+ Change shipped hour
+
+
diff --git a/modules/ticket/front/descriptor/index.js b/modules/ticket/front/descriptor/index.js
index d60e2ce67..28fdfe3a2 100644
--- a/modules/ticket/front/descriptor/index.js
+++ b/modules/ticket/front/descriptor/index.js
@@ -9,38 +9,45 @@ class Controller extends Component {
this.moreOptions = [
{
name: 'Add turn',
- acl: 'buyer',
- callback: this.showAddTurnDialog
- },
- {name: 'Show Delivery Note', callback: this.showDeliveryNote},
- {name: 'Send Delivery Note', callback: this.confirmDeliveryNote},
- {name: 'Delete ticket', callback: this.showDeleteTicketDialog},
- {name: 'Change shipped hour', callback: this.showChangeShipped},
- {name: 'SMS Pending payment', callback: this.sendPaymentSms},
- {name: 'SMS Minimum import', callback: this.sendImportSms},
- {
+ callback: this.showAddTurnDialog,
+ acl: 'buyer'
+ }, {
+ name: 'Show Delivery Note',
+ callback: this.showDeliveryNote
+ }, {
+ name: 'Send Delivery Note',
+ callback: this.confirmDeliveryNote
+ }, {
+ name: 'Delete ticket',
+ callback: this.showDeleteTicketDialog
+ }, {
+ name: 'Change shipped hour',
+ callback: this.showChangeShipped
+ }, {
+ name: 'SMS Pending payment',
+ callback: this.sendPaymentSms
+ }, {
+ name: 'SMS Minimum import',
+ callback: this.sendImportSms
+ }, {
name: 'Add stowaway',
callback: this.showAddStowaway,
show: () => this.canShowStowaway
- },
- {
+ }, {
name: 'Delete stowaway',
callback: this.showDeleteStowaway,
show: () => this.shouldShowDeleteStowaway()
- },
- {
+ }, {
name: 'Make invoice',
- acl: 'invoicing',
callback: this.showMakeInvoiceDialog,
- show: () => !this.hasInvoice()
- },
- {
+ show: () => !this.hasInvoice(),
+ acl: 'invoicing'
+ }, {
name: 'Regenerate invoice',
- acl: 'invoicing',
callback: this.showRegenerateInvoiceDialog,
- show: () => this.hasInvoice()
- },
- {
+ show: () => this.hasInvoice(),
+ acl: 'invoicing'
+ }, {
name: 'Recalculate components',
callback: this.comfirmRecalculateComponents,
show: () => this.isEditable
@@ -98,22 +105,20 @@ class Controller extends Component {
showChangeShipped() {
if (!this.isEditable) {
- this.vnApp.showError(this.$translate.instant(`This ticket can't be modified`));
+ this.vnApp.showError(this.$t(`This ticket can't be modified`));
return;
}
+
this.newShipped = this.ticket.shipped;
this.$.changeShippedDialog.show();
}
- changeShipped(response) {
- if (response === 'accept') {
- let data = {shipped: this.newShipped};
- let query = `Tickets/${this.ticket.id}/updateEditableTicket`;
- this.$http.post(query, data).then(() => {
- this.vnApp.showSuccess(this.$translate.instant('Shipped hour updated'));
- this.cardReload();
- });
- }
+ changeShipped() {
+ let data = {shipped: this.newShipped};
+ let query = `Tickets/${this.ticket.id}/updateEditableTicket`;
+ this.$http.post(query, data)
+ .then(() => this.cardReload())
+ .then(() => this.vnApp.showSuccess(this.$t('Shipped hour updated')));
}
isTicketModule() {
@@ -161,13 +166,13 @@ class Controller extends Component {
let params = {ticketFk: this.ticket.id, weekDay: day};
this.$http.patch(`TicketWeeklies`, params).then(() => {
this.$.addTurn.hide();
- this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
+ this.vnApp.showSuccess(this.$t('Data saved!'));
});
}
showDeleteTicketDialog() {
if (!this.isEditable) {
- this.vnApp.showError(this.$translate.instant('This ticket cant be deleted'));
+ this.vnApp.showError(this.$t('This ticket cant be deleted'));
return;
}
@@ -179,7 +184,7 @@ class Controller extends Component {
const query = `Tickets/${this.ticket.id}/setDeleted`;
this.$http.post(query).then(() => {
this.$state.go('ticket.index');
- this.vnApp.showSuccess(this.$translate.instant('Ticket deleted'));
+ this.vnApp.showSuccess(this.$t('Ticket deleted'));
});
}
}
@@ -213,7 +218,7 @@ class Controller extends Component {
deleteStowaway() {
const query = `Tickets/${this.ticket.id}/deleteStowaway`;
this.$http.post(query).then(res => {
- this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
+ this.vnApp.showSuccess(this.$t('Data saved!'));
this.cardReload();
});
}
@@ -236,7 +241,7 @@ class Controller extends Component {
ticketId: this.ticket.id
};
this.$http.get(`email/delivery-note`, {params}).then(
- () => this.vnApp.showMessage(this.$translate.instant('Notification sent!'))
+ () => this.vnApp.showMessage(this.$t('Notification sent!'))
);
}
@@ -245,13 +250,13 @@ class Controller extends Component {
ticketId: this.ticket.id,
created: this.ticket.created
};
- const message = this.$params.message || this.$translate.instant('Minimum is needed', params);
+ const message = this.$params.message || this.$t('Minimum is needed', params);
this.newSMS = {message};
this.showSMSDialog();
}
sendPaymentSms() {
- const message = this.$params.message || this.$translate.instant('Make a payment');
+ const message = this.$params.message || this.$t('Make a payment');
this.newSMS = {message};
this.showSMSDialog();
}
@@ -284,7 +289,7 @@ class Controller extends Component {
if (response === 'accept') {
const query = `Tickets/${this.ticket.id}/makeInvoice`;
this.$http.post(query).then(() => {
- this.vnApp.showSuccess(this.$translate.instant('Ticket invoiced'));
+ this.vnApp.showSuccess(this.$t('Ticket invoiced'));
this.$state.reload();
});
}
@@ -308,7 +313,7 @@ class Controller extends Component {
const invoiceId = this.ticket.invoiceOut.id;
const query = `InvoiceOuts/${invoiceId}/regenerate`;
this.$http.post(query).then(() => {
- const snackbarMessage = this.$translate.instant(
+ const snackbarMessage = this.$t(
`Invoice sent for a regeneration, will be available in a few minutes`);
this.vnApp.showSuccess(snackbarMessage);
});
@@ -341,7 +346,7 @@ class Controller extends Component {
recalculateComponents() {
const query = `Tickets/${this.ticket.id}/recalculateComponents`;
this.$http.post(query).then(res => {
- this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
+ this.vnApp.showSuccess(this.$t('Data saved!'));
});
}
}
diff --git a/modules/ticket/front/descriptor/index.spec.js b/modules/ticket/front/descriptor/index.spec.js
index 3f4b87682..4f43ac010 100644
--- a/modules/ticket/front/descriptor/index.spec.js
+++ b/modules/ticket/front/descriptor/index.spec.js
@@ -157,8 +157,7 @@ describe('Ticket Component vnTicketDescriptor', () => {
jest.spyOn(controller.vnApp, 'showSuccess');
jest.spyOn(controller, 'cardReload');
- $httpBackend.when('POST', 'Tickets/12/updateEditableTicket').respond();
- $httpBackend.expect('POST', 'Tickets/12/updateEditableTicket').respond();
+ $httpBackend.expectRoute('POST', 'Tickets/:id/updateEditableTicket').respond();
controller.changeShipped('accept');
$httpBackend.flush();
diff --git a/modules/ticket/front/descriptor/style.scss b/modules/ticket/front/descriptor/style.scss
index 4becf9789..1a69feeff 100644
--- a/modules/ticket/front/descriptor/style.scss
+++ b/modules/ticket/front/descriptor/style.scss
@@ -2,7 +2,7 @@
.add-stowaway {
vn-data-viewer {
- width: 40em
+ width: 640px
}
}
diff --git a/modules/ticket/front/sale/style.scss b/modules/ticket/front/sale/style.scss
index 1eb7556e9..142c72295 100644
--- a/modules/ticket/front/sale/style.scss
+++ b/modules/ticket/front/sale/style.scss
@@ -13,14 +13,14 @@ vn-ticket-sale {
}
}
.taxes {
- max-width: 10em;
+ max-width: 160px;
border: $border-thin-light;
text-align: right;
- padding: .5em !important;
+ padding: 8px !important;
& > p {
- font-size: 1.2em;
- margin: .2em;
+ font-size: 1.2rem;
+ margin: 3px;
}
}
vn-dialog.edit {
@@ -61,24 +61,24 @@ vn-ticket-sale {
vn-horizontal {
& > vn-one:nth-child(1) {
border-right: 1px solid $color-bg;
- padding-right: 1em;
+ padding-right: 16px;
}
& > vn-one:nth-child(2) {
- margin-left: 1em
+ margin-left: 16px
}
}
vn-table, table {
- margin-bottom: 10px
+ margin-bottom: 10px;
}
vn-table {
overflow-x: hidden;
overflow-y: auto;
- max-height: 25em;
- width: 30em;
+ max-height: 400px;
+ width: 480px;
}
table {
- width: 25em
+ width: 400px
}
}
.edit-price {
@@ -96,8 +96,8 @@ vn-ticket-sale {
}
p.simulatorTitle {
- margin-bottom: 0px;
- font-size: 12px;
+ margin-bottom: 0;
+ font-size: .75rem;
color: $color-main;
}
vn-label-value {
diff --git a/modules/ticket/front/services/index.html b/modules/ticket/front/services/index.html
index 419110eac..57146661c 100644
--- a/modules/ticket/front/services/index.html
+++ b/modules/ticket/front/services/index.html
@@ -22,7 +22,7 @@
@@ -72,26 +72,28 @@
+ vn-id="newServiceTypeDialog"
+ on-accept="$ctrl.onNewServiceTypeAccept($data)"
+ on-close="newServiceType = null">
New service type
-
+ ng-model="newServiceType.expenseFk">
diff --git a/modules/ticket/front/services/index.js b/modules/ticket/front/services/index.js
index 8627360c6..efb62fe2e 100644
--- a/modules/ticket/front/services/index.js
+++ b/modules/ticket/front/services/index.js
@@ -17,43 +17,33 @@ class Controller extends Section {
}
add() {
- if (this.defaultTaxClass) {
- this.$.model.insert({
- taxClassFk: this.defaultTaxClass.id,
- quantity: 1,
- ticketFk: this.$params.id
- });
- }
+ this.$.model.insert({
+ taxClassFk: this.defaultTaxClass.id,
+ quantity: 1,
+ ticketFk: this.$params.id
+ });
}
- onNewServiceTypeOpen() {
- this.newServiceType = {};
- }
-
- newServiceTypeDialog(elementIndex, event) {
+ onNewServiceTypeClick(service, event) {
event.preventDefault();
- this.$.createServiceTypeDialog.show();
- this.currentServiceIndex = elementIndex;
+ this.$.newServiceType = {};
+ this.$.newServiceTypeDialog.show(service);
}
- onNewServiceTypeResponse(response) {
- if (response == 'accept') {
- if (!this.newServiceType.name)
- throw new UserError(`Name can't be empty`);
+ onNewServiceTypeAccept(service) {
+ if (!this.$.newServiceType.name)
+ throw new UserError(`Name can't be empty`);
- this.$http.post(`TicketServiceTypes`, this.newServiceType).then(response => {
- this.services[this.currentServiceIndex].ticketServiceTypeFk = response.data.id;
- });
- }
+ return this.$http.post(`TicketServiceTypes`, this.$.newServiceType)
+ .then(res => service.ticketServiceTypeFk = res.data.id);
}
onSubmit() {
this.$.watcher.check();
- this.$.model.save().then(() => {
- this.$.watcher.notifySaved();
- this.$.model.refresh();
- });
+ this.$.model.save()
+ .then(() => this.$.model.refresh())
+ .then(() => this.$.watcher.notifySaved());
}
}
diff --git a/modules/ticket/front/services/index.spec.js b/modules/ticket/front/services/index.spec.js
index 30bcd821a..10e3ad47e 100644
--- a/modules/ticket/front/services/index.spec.js
+++ b/modules/ticket/front/services/index.spec.js
@@ -3,17 +3,16 @@ import './index.js';
describe('Ticket component vnTicketService', () => {
let controller;
let $httpBackend;
- let $httpParamSerializer;
let $scope;
let $element;
beforeEach(ngModule('ticket'));
- beforeEach(angular.mock.inject(($componentController, _$httpBackend_, _$httpParamSerializer_, $rootScope) => {
- $element = angular.element(``);
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_;
- $httpParamSerializer = _$httpParamSerializer_;
$scope = $rootScope.$new();
+
+ $element = angular.element(``);
controller = $componentController('vnTicketService', {$scope, $element});
}));
@@ -32,13 +31,13 @@ describe('Ticket component vnTicketService', () => {
});
});
- describe('onNewServiceTypeResponse', () => {
- it(`should throw an error if the new service description is empty`, () => {
- controller.newServiceType = {name: undefined};
+ describe('onNewServiceTypeAccept', () => {
+ it(`should throw an error if the new service type name is empty`, () => {
+ $scope.newServiceType = {};
let error;
try {
- controller.onNewServiceTypeResponse('accept');
+ controller.onNewServiceTypeAccept({});
} catch (e) {
error = e.message;
}
@@ -47,18 +46,22 @@ describe('Ticket component vnTicketService', () => {
});
it('should set the description of the selected service upon service type creation', () => {
- controller.services = [
- {id: 1, description: 'not too great service'}
- ];
+ const service = {
+ id: 1,
+ quantity: 10
+ };
+ $scope.newServiceType = {
+ name: 'Totally new stuff'
+ };
- controller.newServiceType = {name: 'totally new stuff'};
- controller.currentServiceIndex = 0;
-
- $httpBackend.when('POST', 'TicketServiceTypes').respond({id: 4001, name: 'totally new stuff'});
- controller.onNewServiceTypeResponse('accept');
+ $httpBackend.when('POST', 'TicketServiceTypes').respond({
+ id: 4001,
+ name: 'Totally new stuff'
+ });
+ controller.onNewServiceTypeAccept(service);
$httpBackend.flush();
- expect(controller.services[0].ticketServiceTypeFk).toEqual(4001);
+ expect(service.ticketServiceTypeFk).toEqual(4001);
});
});
});
diff --git a/modules/ticket/front/sms/style.scss b/modules/ticket/front/sms/style.scss
index 89723b196..84571a5f4 100644
--- a/modules/ticket/front/sms/style.scss
+++ b/modules/ticket/front/sms/style.scss
@@ -1,5 +1,5 @@
@import "variables";
.SMSDialog {
- min-width: 25em
+ min-width: 400px
}
\ No newline at end of file
diff --git a/modules/ticket/front/summary/style.scss b/modules/ticket/front/summary/style.scss
index 4502c5dca..d92121194 100644
--- a/modules/ticket/front/summary/style.scss
+++ b/modules/ticket/front/summary/style.scss
@@ -32,29 +32,29 @@ vn-ticket-summary .summary {
}
& > vn-horizontal > vn-one {
- min-width: 10em;
+ min-width: 160px;
&.taxes {
border: $border-thin-light;
text-align: right;
- padding: .5em;
+ padding: 8px;
& > p {
- font-size: 1.2em;
- margin: .2em;
+ font-size: 1.2rem;
+ margin: 3px;
}
}
&.services {
.vn-table > vn-thead .identifier,
.vn-table > vn-tbody .identifier {
- min-width: 3.5em
+ min-width: 56px
}
.vn-table > vn-thead .tax-class,
.vn-table > vn-tbody .tax-class {
- min-width: 11em;
- width: 1px
+ min-width: 176px;
+ width: 1px;
}
.vn-table > vn-tbody vn-td:first-child {
diff --git a/modules/worker/front/calendar/style.scss b/modules/worker/front/calendar/style.scss
index e622dda64..9b3fc749b 100644
--- a/modules/worker/front/calendar/style.scss
+++ b/modules/worker/front/calendar/style.scss
@@ -13,7 +13,7 @@ vn-worker-calendar {
border: 1px solid #ddd;
margin: $spacing-md;
padding: $spacing-xs;
- max-width: 18em;
+ max-width: 288px;
}
}
}
diff --git a/modules/worker/front/time-control/style.scss b/modules/worker/front/time-control/style.scss
index 8555e827b..99a21883f 100644
--- a/modules/worker/front/time-control/style.scss
+++ b/modules/worker/front/time-control/style.scss
@@ -13,11 +13,11 @@ vn-worker-time-control {
display: flex;
align-items: center;
justify-content: center;
- padding: .3em 0;
+ padding: 4px 0;
& > vn-icon {
color: $color-font-secondary;
- padding-right: .1em;
+ padding-right: 1px;
}
}
}
diff --git a/modules/zone/front/calendar/style.scss b/modules/zone/front/calendar/style.scss
index 3fe23278e..14d234c1b 100644
--- a/modules/zone/front/calendar/style.scss
+++ b/modules/zone/front/calendar/style.scss
@@ -24,7 +24,7 @@ vn-zone-calendar {
justify-content: space-evenly;
& > .vn-calendar {
- max-width: 18em;
+ max-width: 288px;
.day {
&.event .day-number {
diff --git a/modules/zone/front/delivery-days/style.scss b/modules/zone/front/delivery-days/style.scss
index a279ca0b9..3dd4abb7c 100644
--- a/modules/zone/front/delivery-days/style.scss
+++ b/modules/zone/front/delivery-days/style.scss
@@ -7,7 +7,7 @@ vn-zone-delivery-days {
flex-wrap: wrap;
& > vn-calendar {
- min-width: 16.5em;
+ min-width: 264px;
}
}
form {