fixed money display in dashboard widgets (#291)

This commit is contained in:
Kevin Papst
2018-09-01 19:47:03 +02:00
committed by GitHub
parent ebe007eb78
commit 3af8070a57
11 changed files with 173 additions and 133 deletions

View File

@@ -11,98 +11,13 @@
margin-bottom: 50px;
}
/* ================================ CONTENT ================================ */
.content {
padding: 15px 0;
}
.content-header {
h1 {
small {
display: none;
}
}
@media print{
.sf-toolbar, .control-sidebar {display: none !important;}
}
@media (min-width: $screen-sm-min) {
.content-header {
h1 {
small {
display: inline-block;
}
}
}
.content {
padding: 15px;
}
}
@import 'content';
@import 'toolbar';
/* ================================ NAVBAR ================================ */
.navbar-nav > li > a.ddt-large {
padding-top: 12px;
padding-bottom: 9px;
}
li.messages-menu ul.menu li .pull-left i {
color: #dd4b39;
}
.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a>p {
overflow: hidden;
text-overflow: ellipsis;
}
.navbar-nav .start_record {
text-align: center;
}
/*
.ticktac:hover i.running{
color: #4ff131;
}
li.open .ticktac i.running{
color: #4ff131;
}
.ticktac i.stopped{
color: #fff;
}
.ticktac:hover i.stopped{
color: #4ff131;
}
.user-panel>.info {
left: 40px;
padding-top: 0px;
}
*/
/* ================================ TOOLBAR ================================ */
/* Page based action buttons in the upper right corner of the content area */
.content-header > .breadcrumb {
position: absolute;
float: right;
background: transparent;
}
/* Right sidebar with additional tabs for personal settings and "About Kimai" section */
.control-sidebar {
select {
color: $input-color;
background-color: $input-bg;
}
div.image {
img.img-circle {
max-width: 34px;
}
}
}
/* The filter form available on most pages above the datatable */
.toolbar form {
font-size: $font-size-base;
}
/* ================================ SIDEBAR ================================ */
/* Used for the Sidebar UserPanel (which is deactivated right now) */
@@ -117,40 +32,8 @@ footer.main-footer {
font-size: 80%;
}
/* ================================ PRINT ================================ */
@media print{
.sf-toolbar, .control-sidebar {display: none !important;}
}
/* ================================ INVOICES ================================ */
.invoice {
margin: 0;
}
@media (min-width: $screen-sm-min) {
.invoice {
margin: 10px 25px;
}
}
.page-header-small{
font-size: 14px;
}
div.invoice-address {
margin-top: 30px;
margin-bottom: 30px;
}
table.invoice-records {}
table.invoice-meta th {
padding-right: 40px;
}
table.invoice-sum th {
width: 70%;
}
table.invoice-sum th, table.invoice-sum td {
text-align: right;
}
@import 'invoice';
@import 'datatable';
@import 'calendar';
@import 'dashboard';
@import 'navbar';

30
assets/css/content.scss Normal file
View File

@@ -0,0 +1,30 @@
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
.content {
padding: 15px 0;
}
.content-header {
h1 {
small {
display: none;
}
}
}
@media (min-width: $screen-sm-min) {
.content-header {
h1 {
small {
display: inline-block;
}
}
}
.content {
padding: 15px;
}
}

16
assets/css/dashboard.scss Normal file
View File

@@ -0,0 +1,16 @@
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
section {
&.dashboard {
.info-box {
.info-box-text {
white-space: normal;
}
}
}
}

36
assets/css/invoice.scss Normal file
View File

@@ -0,0 +1,36 @@
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
.invoice {
margin: 0;
}
@media (min-width: $screen-sm-min) {
.invoice {
margin: 10px 25px;
}
}
.page-header-small{
font-size: 14px;
}
div.invoice-address {
margin-top: 30px;
margin-bottom: 30px;
}
table.invoice-records {}
table.invoice-meta th {
padding-right: 40px;
}
table.invoice-sum th {
width: 70%;
}
table.invoice-sum th, table.invoice-sum td {
text-align: right;
}

46
assets/css/navbar.scss Normal file
View File

@@ -0,0 +1,46 @@
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
.navbar-nav > li > a.ddt-large {
padding-top: 12px;
padding-bottom: 9px;
}
li.messages-menu ul.menu li .pull-left i {
color: #dd4b39;
}
.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a>p {
overflow: hidden;
text-overflow: ellipsis;
}
.navbar-nav .start_record {
text-align: center;
}
/*
.ticktac:hover i.running{
color: #4ff131;
}
li.open .ticktac i.running{
color: #4ff131;
}
.ticktac i.stopped{
color: #fff;
}
.ticktac:hover i.stopped{
color: #4ff131;
}
.user-panel>.info {
left: 40px;
padding-top: 0px;
}
*/

29
assets/css/toolbar.scss Normal file
View File

@@ -0,0 +1,29 @@
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/* Page based action buttons in the upper right corner of the content area */
.content-header > .breadcrumb {
position: absolute;
float: right;
background: transparent;
}
/* Right sidebar with additional tabs for personal settings and "About Kimai" section */
.control-sidebar {
select {
color: $input-color;
background-color: $input-bg;
}
div.image {
img.img-circle {
max-width: 34px;
}
}
}
/* The filter form available on most pages above the datatable */
.toolbar form {
font-size: $font-size-base;
}

View File

@@ -57,7 +57,7 @@ kimai:
duration_short: '%%h:%%m h'
fr:
date_short: 'd/m/Y'
duration: '%%h:%%m h'
duration: '%%h h %%m min'
duration_short: '%%h:%%m h'
es:
date_short: 'd.m.Y'
@@ -65,7 +65,7 @@ kimai:
duration_short: '%%h:%%m h'
ru:
date_short: 'd.m.Y'
duration: '%%h:%%m h'
duration: '%%h:%%m Часов'
duration_short: '%%h:%%m h'
# timesheet calendar configuration

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"build/app.js": "/build/app.js?a67489c4fc07f30e6f86",
"build/app.css": "/build/app.css?4a410e64531e74d755b949cc6e2b2697",
"build/app.css": "/build/app.css?e2bd74ce6119917ab0c8fd4de8d4b9c6",
"build/fonts/fa-solid-900.woff": "/build/fonts/fa-solid-900.woff?dfc040d5",
"build/images/blue@2x.png": "/build/images/blue@2x.png?2694acfd",
"build/fonts/fa-solid-900.woff2": "/build/fonts/fa-solid-900.woff2?e8a92a29",

View File

@@ -73,7 +73,7 @@ class WidgetRepository
if ($widget['query'] == TimesheetRepository::STATS_QUERY_DURATION) {
$model->setDataType(Widget::DATA_TYPE_DURATION);
} elseif ($widget['query'] == TimesheetRepository::STATS_QUERY_AMOUNT) {
} elseif ($widget['query'] == TimesheetRepository::STATS_QUERY_RATE) {
$model->setDataType(Widget::DATA_TYPE_MONEY);
}

View File

@@ -73,9 +73,9 @@ class WidgetRepositoryTest extends TestCase
{
return [
[12, TimesheetRepository::STATS_QUERY_DURATION, Widget::DATA_TYPE_DURATION],
[112233, TimesheetRepository::STATS_QUERY_AMOUNT, Widget::DATA_TYPE_MONEY],
[112233, TimesheetRepository::STATS_QUERY_AMOUNT, Widget::DATA_TYPE_INT],
[37, TimesheetRepository::STATS_QUERY_ACTIVE, Widget::DATA_TYPE_INT],
[375, TimesheetRepository::STATS_QUERY_RATE, Widget::DATA_TYPE_INT],
[375, TimesheetRepository::STATS_QUERY_RATE, Widget::DATA_TYPE_MONEY],
[['test' => 'foo'], TimesheetRepository::STATS_QUERY_USER, Widget::DATA_TYPE_INT],
];
}