mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 19:10:40 +00:00
resolved timezones
This commit is contained in:
@@ -66,13 +66,13 @@ class GetDashboardDataController extends Controller
|
||||
->get();
|
||||
|
||||
$upload = $trafficRecords->map(fn ($record) => [
|
||||
'created_at' => format_date($record->created_at, '%d. %B'),
|
||||
'created_at' => format_date($record->created_at, 'd. M. '),
|
||||
'percentage' => intval($trafficRecords->max('upload')) !== 0 ? round(($record->upload / $trafficRecords->max('upload')) * 100, 2) : 0,
|
||||
'amount' => Metric::bytes($record->upload)->format(),
|
||||
]);
|
||||
|
||||
$download = $trafficRecords->map(fn ($record) => [
|
||||
'created_at' => format_date($record->created_at, '%d. %B'),
|
||||
'created_at' => format_date($record->created_at, 'd. M. '),
|
||||
'percentage' => intval($trafficRecords->max('download')) !== 0 ? round(($record->download / $trafficRecords->max('download')) * 100, 2) : 0,
|
||||
'amount' => Metric::bytes($record->download)->format(),
|
||||
]);
|
||||
|
||||
@@ -33,15 +33,11 @@ class FileResource extends JsonResource
|
||||
'thumbnail' => $this->thumbnail,
|
||||
'metadata' => $this->metadata,
|
||||
'parent_id' => $this->parent_id,
|
||||
'updated_at' => $this->updated_at,
|
||||
'created_at' => Carbon::parse($this->created_at)->diffForHumans(),
|
||||
'deleted_at' => $this->deleted_at ? Carbon::parse($this->deleted_at)->diffForHumans() : null,
|
||||
/*'updated_at' => format_date(
|
||||
set_time_by_user_timezone($this->updated_at), __t('time')
|
||||
),
|
||||
'created_at' => format_date(
|
||||
set_time_by_user_timezone($this->created_at), __t('time')
|
||||
),*/
|
||||
'created_at' => set_time_by_user_timezone($this->owner, $this->created_at),
|
||||
'updated_at' => set_time_by_user_timezone($this->owner, $this->updated_at),
|
||||
'deleted_at' => $this->deleted_at
|
||||
? set_time_by_user_timezone($this->owner, $this->deleted_at)
|
||||
: null,
|
||||
],
|
||||
'relationships' => [
|
||||
$this->mergeWhen($this->shared, fn () => [
|
||||
|
||||
@@ -24,15 +24,11 @@ class FolderResource extends JsonResource
|
||||
'isTeamFolder' => $this->team_folder,
|
||||
'items' => $this->items,
|
||||
'trashed_items' => $this->trashed_items,
|
||||
'updated_at' => $this->updated_at,
|
||||
'created_at' => Carbon::parse($this->created_at)->diffForHumans(),
|
||||
'deleted_at' => $this->deleted_at ? Carbon::parse($this->deleted_at)->diffForHumans() : null,
|
||||
/*'updated_at' => format_date(
|
||||
set_time_by_user_timezone($this->updated_at), __t('time')
|
||||
),
|
||||
'created_at' => format_date(
|
||||
set_time_by_user_timezone($this->created_at), __t('time')
|
||||
),*/
|
||||
'created_at' => set_time_by_user_timezone($this->owner, $this->created_at),
|
||||
'updated_at' => set_time_by_user_timezone($this->owner, $this->updated_at),
|
||||
'deleted_at' => $this->deleted_at
|
||||
? set_time_by_user_timezone($this->owner, $this->deleted_at)
|
||||
: null,
|
||||
],
|
||||
'relationships' => [
|
||||
$this->mergeWhen($this->teamMembers, fn () => [
|
||||
|
||||
@@ -30,7 +30,7 @@ class TransactionResource extends JsonResource
|
||||
'metadata' => $this->metadata
|
||||
? resolve(FormatUsageEstimatesAction::class)($this->currency, $this->metadata)
|
||||
: null,
|
||||
'created_at' => $this->created_at->formatLocalized('%d. %b. %Y'),
|
||||
'created_at' => $this->created_at->formatLocalized('d. M. Y'),
|
||||
'updated_at' => $this->updated_at,
|
||||
],
|
||||
'relationships' => [
|
||||
|
||||
Reference in New Issue
Block a user