Skip to content

Commit

Permalink
Enhance Paperless NGX (#698)
Browse files Browse the repository at this point in the history
Fixes #658 

* Update PaperlessNgx.php

#658

* Update livestats.blade.php

#658

* Update livestats.blade.php

spaces instead of tab

* Update PaperlessNgx.php
  • Loading branch information
listiges-kaenguru committed Feb 27, 2024
1 parent b338f6b commit b9eb06f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions PaperlessNgx/PaperlessNgx.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ public function livestats()
$attrs = $this->getRequestAttrs();

$documents = json_decode(
parent::execute($this->url("documents"), $attrs)->getBody()
parent::execute($this->url("statistics"), $attrs)->getBody()
);

$data = [
"documentCount" => $documents->count ?? 0,
"documentCount" => $documents->documents_total ?? 0,
"documentsInbox" => $documents->documents_inbox ?? 0
];

return parent::getLiveStats($status, $data);
Expand Down
4 changes: 4 additions & 0 deletions PaperlessNgx/livestats.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
<span class="title">Documents</span>
<strong>{!! $documentCount !!}</strong>
</li>
<li>
<span class="title">Inbox</span>
<strong>{!! $documentsInbox !!}</strong>
</li>
</ul>

0 comments on commit b9eb06f

Please sign in to comment.