diff --git a/app/Http/Controllers/TaskController.php b/app/Http/Controllers/TaskController.php index cfa3d5fa8666..9d15eb5f9278 100644 --- a/app/Http/Controllers/TaskController.php +++ b/app/Http/Controllers/TaskController.php @@ -55,7 +55,7 @@ class TaskController extends BaseController ->addColumn('client_name', function ($model) { return $model->client_public_id ? link_to('clients/'.$model->client_public_id, Utils::getClientDisplayName($model)) : ''; }); } - return $table->addColumn('created_at', function($model) { return Task::calcStartTime($model); }) + return $table->addColumn('created_at', function($model) { return link_to("tasks/{$model->public_id}/edit", Task::calcStartTime($model)); }) ->addColumn('time_log', function($model) { return gmdate('H:i:s', Task::calcDuration($model)); }) ->addColumn('description', function($model) { return $model->description; }) ->addColumn('invoice_number', function($model) { return self::getStatusLabel($model); }) diff --git a/app/Http/routes.php b/app/Http/routes.php index 297c2ea62296..12377947f698 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -337,7 +337,7 @@ if (!defined('CONTACT_EMAIL')) { define('DEFAULT_LANGUAGE', 1); // English define('DEFAULT_DATE_FORMAT', 'M j, Y'); define('DEFAULT_DATE_PICKER_FORMAT', 'M d, yyyy'); - define('DEFAULT_DATETIME_FORMAT', 'F j, Y, g:i a'); + define('DEFAULT_DATETIME_FORMAT', 'F j, Y g:i a'); define('DEFAULT_DATETIME_MOMENT_FORMAT', 'MMM D, YYYY h:mm:ss a'); define('DEFAULT_QUERY_CACHE', 120); // minutes define('DEFAULT_LOCALE', 'en'); diff --git a/public/css/built.css b/public/css/built.css index 11b6949e6a52..d14654495b68 100644 --- a/public/css/built.css +++ b/public/css/built.css @@ -2405,10 +2405,14 @@ margin-bottom: 0; padding-top: 10px; } textarea.form-control { -/*height: auto !important;*/ -min-height: 40px; + /*height: auto !important;*/ + min-height: 40px; } /*tables*/ +table.data-table td { + height: 38px !important; +} + table.dataTable { border-radius: 3px; border-collapse: collapse; /*border-spacing: 0;*/} table.dataTable thead > tr > th, table.invoice-table thead > tr > th { diff --git a/public/css/style.css b/public/css/style.css index 3ce1b63ae67a..781530aef429 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -55,10 +55,14 @@ margin-bottom: 0; padding-top: 10px; } textarea.form-control { -/*height: auto !important;*/ -min-height: 40px; + /*height: auto !important;*/ + min-height: 40px; } /*tables*/ +table.data-table td { + height: 38px !important; +} + table.dataTable { border-radius: 3px; border-collapse: collapse; /*border-spacing: 0;*/} table.dataTable thead > tr > th, table.invoice-table thead > tr > th { diff --git a/public/js/built.js b/public/js/built.js index 6bffc2a18028..c3dfc49f9d53 100644 --- a/public/js/built.js +++ b/public/js/built.js @@ -31616,6 +31616,7 @@ NINJA.decodeJavascript = function(invoice, javascript) 'invoiceDetailsHeight': NINJA.invoiceDetails(invoice).length * 22, 'invoiceLineItems': NINJA.invoiceLines(invoice), 'invoiceLineItemColumns': NINJA.invoiceColumns(invoice), + 'quantityWidth': NINJA.quantityWidth(invoice), 'clientDetails': NINJA.clientDetails(invoice), 'notesAndTerms': NINJA.notesAndTerms(invoice), 'subtotals': NINJA.subtotals(invoice), @@ -31632,9 +31633,15 @@ NINJA.decodeJavascript = function(invoice, javascript) } for (var key in json) { - var regExp = new RegExp('"\\$'+key+'"', 'g'); - var val = JSON.stringify(json[key]); - val = doubleDollarSign(val); + // remove trailing commas for these fields + if (['quantityWidth'].indexOf(key) >= 0) { + var regExp = new RegExp('"\\$'+key+'",', 'g'); + val = json[key]; + } else { + var regExp = new RegExp('"\\$'+key+'"', 'g'); + var val = JSON.stringify(json[key]); + val = doubleDollarSign(val); + } javascript = javascript.replace(regExp, val); } @@ -31709,12 +31716,17 @@ NINJA.notesAndTerms = function(invoice) NINJA.invoiceColumns = function(invoice) { if (invoice.account.hide_quantity == '1') { - return ["15%", "*", "10%", "15%"]; + return ["15%", "*", "15%", "15%"]; } else { - return ["15%", "*", "10%", "auto", "15%"]; + return ["15%", "*", "14%", "14%", "14%"]; } } +NINJA.quantityWidth = function(invoice) +{ + return invoice.account.hide_quantity == '1' ? '' : '"12%", '; +} + NINJA.invoiceLines = function(invoice) { var total = 0; var shownItem = false; diff --git a/public/js/pdf.pdfmake.js b/public/js/pdf.pdfmake.js index 2938e044d275..a0ecf78e7c5d 100644 --- a/public/js/pdf.pdfmake.js +++ b/public/js/pdf.pdfmake.js @@ -91,6 +91,7 @@ NINJA.decodeJavascript = function(invoice, javascript) 'invoiceDetailsHeight': NINJA.invoiceDetails(invoice).length * 22, 'invoiceLineItems': NINJA.invoiceLines(invoice), 'invoiceLineItemColumns': NINJA.invoiceColumns(invoice), + 'quantityWidth': NINJA.quantityWidth(invoice), 'clientDetails': NINJA.clientDetails(invoice), 'notesAndTerms': NINJA.notesAndTerms(invoice), 'subtotals': NINJA.subtotals(invoice), @@ -107,9 +108,15 @@ NINJA.decodeJavascript = function(invoice, javascript) } for (var key in json) { - var regExp = new RegExp('"\\$'+key+'"', 'g'); - var val = JSON.stringify(json[key]); - val = doubleDollarSign(val); + // remove trailing commas for these fields + if (['quantityWidth'].indexOf(key) >= 0) { + var regExp = new RegExp('"\\$'+key+'",', 'g'); + val = json[key]; + } else { + var regExp = new RegExp('"\\$'+key+'"', 'g'); + var val = JSON.stringify(json[key]); + val = doubleDollarSign(val); + } javascript = javascript.replace(regExp, val); } @@ -184,12 +191,17 @@ NINJA.notesAndTerms = function(invoice) NINJA.invoiceColumns = function(invoice) { if (invoice.account.hide_quantity == '1') { - return ["15%", "*", "10%", "15%"]; + return ["15%", "*", "15%", "15%"]; } else { - return ["15%", "*", "10%", "auto", "15%"]; + return ["15%", "*", "14%", "14%", "14%"]; } } +NINJA.quantityWidth = function(invoice) +{ + return invoice.account.hide_quantity == '1' ? '' : '"12%", '; +} + NINJA.invoiceLines = function(invoice) { var total = 0; var shownItem = false; diff --git a/resources/lang/de/texts.php b/resources/lang/de/texts.php index 1f0a7bf36525..26dd8210cf52 100644 --- a/resources/lang/de/texts.php +++ b/resources/lang/de/texts.php @@ -715,7 +715,7 @@ return array( 'update_address' => 'Adresse Aktualisieren', 'update_address_help' => 'Kundenadresse mit den gemachten Angaben aktualisieren', 'times' => 'Zeiten', - 'set_now' => 'Auf Jetzt setzen', + 'set_now' => 'Auf Jetzt setzen', 'dark_mode' => 'Dunkler Modus', 'dark_mode_help' => 'Weißer Text auf schwarzem Hintergrund anzeigen', 'add_to_invoice' => 'Zur Rechnung :invoice hinzufügen', diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 0e56c326d755..85bfc7395ac5 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -40,8 +40,8 @@ return array( 'taxes' => 'Taxes', 'tax' => 'Tax', 'item' => 'Item', - 'description' => 'Description', - 'unit_cost' => 'Cost', + 'description' => 'Description', + 'unit_cost' => 'Unit Cost', 'quantity' => 'Quantity', 'line_total' => 'Line Total', 'subtotal' => 'Subtotal', @@ -715,7 +715,7 @@ return array( 'update_address' => 'Update Address', 'update_address_help' => 'Update client\'s address with provided details', 'times' => 'Times', - 'set_now' => 'Set to now', + 'set_now' => 'Set to now', 'dark_mode' => 'Dark Mode', 'dark_mode_help' => 'Show white text on black background', 'add_to_invoice' => 'Add to invoice :invoice', diff --git a/resources/views/tasks/edit.blade.php b/resources/views/tasks/edit.blade.php index 01a11e866857..9307af859c9e 100644 --- a/resources/views/tasks/edit.blade.php +++ b/resources/views/tasks/edit.blade.php @@ -41,7 +41,13 @@
{{ $task->getStartTime() }} {{ $timezone }}
+{{ $task->getStartTime() }} - + @if (Auth::user()->account->timezone_id) + {{ $timezone }} + @else + {!! link_to('/company/details?focus=timezone_id', $timezone, ['target' => '_blank']) !!} + @endif +
@if ($task->hasPreviousDuration()) {{ trans('texts.duration') . ': ' . gmdate('H:i:s', $task->getDuration()) }}