1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Merge remote-tracking branch 'upstream/develop' into 2016-11-bluevine-integration

This commit is contained in:
Joshua Dwire 2016-11-14 13:34:27 -05:00
commit 179713711f
9 changed files with 70 additions and 13385 deletions

View File

@ -57,14 +57,16 @@ Watch our [video on YouTube](https://www.youtube.com/watch?v=xHGKvadapbA) to get
* [D3.js](http://d3js.org/) visualizations * [D3.js](http://d3js.org/) visualizations
## Documentation ## Documentation
* [Ubuntu and Apache](http://blog.technerdservices.com/index.php/2015/04/techpop-how-to-install-invoice-ninja-on-ubuntu-14-04/) * [Self Host Guide](https://www.invoiceninja.com/self-host)
* [Debian and Nginx](https://www.rosehosting.com/blog/install-invoice-ninja-on-a-debian-7-vps/)
* [User Guide](http://docs.invoiceninja.com/en/latest/) * [User Guide](http://docs.invoiceninja.com/en/latest/)
* [Developer Guide](https://www.invoiceninja.com/knowledgebase/developer-guide/) * [Developer Guide](https://www.invoiceninja.com/knowledgebase/developer-guide/)
* [API Documentation](https://www.invoiceninja.com/api-documentation/)
* [Support Forum](https://www.invoiceninja.com/forums/forum/support/) * [Support Forum](https://www.invoiceninja.com/forums/forum/support/)
* [Feature Roadmap](https://trello.com/b/63BbiVVe/) * [Feature Roadmap](https://trello.com/b/63BbiVVe/)
## API
* [API Documentation](https://www.invoiceninja.com/api-documentation/)
* [PHP SDK](https://github.com/invoiceninja/sdk-php)
## Contributing ## Contributing
All contributors are welcome! All contributors are welcome!
For information on how contribute to Invoice Ninja, please see our [contributing guide](CONTRIBUTING.md). For information on how contribute to Invoice Ninja, please see our [contributing guide](CONTRIBUTING.md).

View File

@ -1,5 +1,6 @@
<?php namespace App\Http\Controllers; <?php namespace App\Http\Controllers;
use App\Http\Requests\UpdateTaskRequest;
use Auth; use Auth;
use Response; use Response;
use Input; use Input;
@ -84,4 +85,38 @@ class TaskApiController extends BaseAPIController
return $this->response($data); return $this->response($data);
} }
/**
* @SWG\Put(
* path="/task/{task_id}",
* tags={"task"},
* summary="Update a task",
* @SWG\Parameter(
* in="body",
* name="body",
* @SWG\Schema(ref="#/definitions/Task")
* ),
* @SWG\Response(
* response=200,
* description="Update task",
* @SWG\Schema(type="object", @SWG\Items(ref="#/definitions/Task"))
* ),
* @SWG\Response(
* response="default",
* description="an ""unexpected"" error"
* )
* )
*/
public function update(UpdateTaskRequest $request)
{
$task = $request->entity();
$task = $this->taskRepo->save($task->public_id, \Illuminate\Support\Facades\Input::all());
return $this->itemResponse($task);
}
} }

View File

@ -748,15 +748,13 @@ class Account extends Eloquent
if($adapter instanceof \League\Flysystem\Adapter\Local) { if($adapter instanceof \League\Flysystem\Adapter\Local) {
// Stored locally // Stored locally
$logo_url = str_replace(public_path(), url('/'), $adapter->applyPathPrefix($this->logo), $count); $logoUrl = url('/logo/' . $this->logo);
if ($cachebuster) { if ($cachebuster) {
$logo_url .= '?no_cache='.time(); $logoUrl .= '?no_cache='.time();
} }
if($count == 1){ return $logoUrl;
return str_replace(DIRECTORY_SEPARATOR, '/', $logo_url);
}
} }
return Document::getDirectFileUrl($this->logo, $this->getLogoDisk()); return Document::getDirectFileUrl($this->logo, $this->getLogoDisk());
@ -1859,11 +1857,13 @@ class Account extends Eloquent
public function isModuleEnabled($entityType) public function isModuleEnabled($entityType)
{ {
if (in_array($entityType, [ if ( ! in_array($entityType, [
ENTITY_CLIENT, ENTITY_RECURRING_INVOICE,
ENTITY_INVOICE, ENTITY_CREDIT,
ENTITY_PRODUCT, ENTITY_QUOTE,
ENTITY_PAYMENT, ENTITY_TASK,
ENTITY_EXPENSE,
ENTITY_VENDOR,
])) { ])) {
return true; return true;
} }

View File

@ -11,7 +11,6 @@ class InvoiceItemTransformer extends EntityTransformer
'product_key' => $item->product_key, 'product_key' => $item->product_key,
'updated_at' => $this->getTimestamp($item->updated_at), 'updated_at' => $this->getTimestamp($item->updated_at),
'archived_at' => $this->getTimestamp($item->deleted_at), 'archived_at' => $this->getTimestamp($item->deleted_at),
'product_key' => $item->product_key,
'notes' => $item->notes, 'notes' => $item->notes,
'cost' => (float) $item->cost, 'cost' => (float) $item->cost,
'qty' => (float) $item->qty, 'qty' => (float) $item->qty,

View File

@ -38,10 +38,22 @@ class TaskTransformer extends EntityTransformer
public function transform(Task $task) public function transform(Task $task)
{ {
if($task->invoice)
$invoiceId = $task->invoice->public_id;
else
$invoiceId = null;
return array_merge($this->getDefaults($task), [ return array_merge($this->getDefaults($task), [
'id' => (int) $task->public_id, 'id' => (int) $task->public_id,
'description' => $task->description, 'description' => $task->description,
'duration' => $task->getDuration() 'duration' => $task->getDuration(),
'updated_at' => (int) $this->getTimestamp($task->updated_at),
'archived_at' => (int) $this->getTimestamp($task->deleted_at),
'invoice_id' => $invoiceId,
'client_id' => (int) $task->client->public_id,
'is_deleted' => (bool) $task->is_deleted,
'time_log' => $task->time_log,
'is_running' => (bool) $task->is_running,
]); ]);
} }
} }

13371
public/css/built.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -119,7 +119,7 @@
} }
#left-sidebar-wrapper ul { #left-sidebar-wrapper ul {
min-height: 660px; min-height: 720px;
} }
.sidebar-nav li > a { .sidebar-nav li > a {

View File

@ -19,7 +19,7 @@
@endif @endif
@endcan @endcan
@if ($entityType == ENTITY_EXPENSE_CATEGORY) @if (in_array($entityType, [ENTITY_EXPENSE_CATEGORY, ENTITY_PRODUCT]))
{!! Button::normal(trans('texts.archive'))->asLinkTo('javascript:submitForm("archive")')->appendIcon(Icon::create('trash')) !!} {!! Button::normal(trans('texts.archive'))->asLinkTo('javascript:submitForm("archive")')->appendIcon(Icon::create('trash')) !!}
@else @else
{!! DropdownButton::normal(trans('texts.archive'))->withContents([ {!! DropdownButton::normal(trans('texts.archive'))->withContents([