mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Minor fixes for documents
This commit is contained in:
parent
0b2e1ebdf0
commit
7af826fa7f
@ -64,22 +64,22 @@ class Handler extends ExceptionHandler
|
||||
|
||||
if (app()->bound('sentry') && $this->shouldReport($exception)) {
|
||||
|
||||
// app('sentry')->configureScope(function (Scope $scope): void {
|
||||
app('sentry')->configureScope(function (Scope $scope): void {
|
||||
|
||||
// if (auth()->guard('contact') && auth()->guard('contact')->user() && auth()->guard('contact')->user()->company->account->report_errors) {
|
||||
// $scope->setUser([
|
||||
// 'id' => auth()->guard('contact')->user()->company->account->key,
|
||||
// 'email' => "anonymous@example.com",
|
||||
// 'name' => "Anonymous User",
|
||||
// ]);
|
||||
// } elseif (auth()->guard('user') && auth()->guard('user')->user() && auth()->user()->company() && auth()->user()->company()->account->report_errors) {
|
||||
// $scope->setUser([
|
||||
// 'id' => auth()->user()->account->key,
|
||||
// 'email' => "anonymous@example.com",
|
||||
// 'name' => "Anonymous User",
|
||||
// ]);
|
||||
// }
|
||||
// });
|
||||
if (auth()->guard('contact') && auth()->guard('contact')->user() && auth()->guard('contact')->user()->company->account->report_errors) {
|
||||
$scope->setUser([
|
||||
'id' => auth()->guard('contact')->user()->company->account->key,
|
||||
'email' => "anonymous@example.com",
|
||||
'name' => "Anonymous User",
|
||||
]);
|
||||
} elseif (auth()->guard('user') && auth()->guard('user')->user() && auth()->user()->company() && auth()->user()->company()->account->report_errors) {
|
||||
$scope->setUser([
|
||||
'id' => auth()->user()->account->key,
|
||||
'email' => "anonymous@example.com",
|
||||
'name' => "Anonymous User",
|
||||
]);
|
||||
}
|
||||
});
|
||||
|
||||
app('sentry')->captureException($exception);
|
||||
}
|
||||
|
@ -94,8 +94,8 @@ class UploadFile implements ShouldQueue
|
||||
$document->disk = $this->disk;
|
||||
$document->hash = $this->file->hashName();
|
||||
$document->size = $this->file->getSize();
|
||||
$document->width = isset($width) ?? null;
|
||||
$document->height = isset($height) ?? null;
|
||||
$document->width = isset($width) ? $width : null;
|
||||
$document->height = isset($height) ? $height : null;
|
||||
|
||||
// $preview_path = $this->encodePrimaryKey($this->company->id);
|
||||
// $document->preview = $this->generatePreview($preview_path);
|
||||
|
@ -37,7 +37,7 @@ class DocumentTransformer extends EntityTransformer
|
||||
'assigned_user_id' => $this->encodePrimaryKey($document->assigned_user_id),
|
||||
'project_id' => $this->encodePrimaryKey($document->project_id),
|
||||
'vendor_id' => $this->encodePrimaryKey($document->vendor_id),
|
||||
'url' => (string) $document->url ?: '',
|
||||
'url' => (string) $document->generateUrl() ?: '',
|
||||
'preview' => (string) $document->preview ?: '',
|
||||
'name' => (string) $document->name,
|
||||
'type' => (string) $document->type,
|
||||
|
Loading…
Reference in New Issue
Block a user