Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
adrolli committed Aug 28, 2024
1 parent f40a712 commit a078d03
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 163 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"mockery/mockery": "^1.6.6",
"nunomaduro/collision": "^8.0",
"larastan/larastan": "^2.6",
"orchestra/testbench": "^9.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"pestphp/pest-plugin-livewire": "^2.0",
Expand Down Expand Up @@ -128,4 +129,4 @@
},
"minimum-stability": "dev",
"prefer-stable": false
}
}
22 changes: 22 additions & 0 deletions packages/core/resources/lang/en/device.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,30 @@
return [
'device' => 'Device',
'devices' => 'Devices',

// Deprecated
'title' => 'Device',
// Deprecated
'totalone' => 'Devices',
// Deprecated
'totaltwo' => 'Users',
// Deprecated
'totalthree' => 'Active',

// Message
'new_device_registered' => 'New Device Registered',
'new_device_registered_message' => 'A new device has been registered on your account.',
'device_details' => 'Device Details',
'if_not_you_secure_account' => 'If this was not you, please secure your account immediately.',

// Not used yet
'device_id' => 'Device ID',
'device_type' => 'Device Type',
'device_name' => 'Device Name',
'os' => 'OS',
'browser' => 'Browser',
'city' => 'City',
'country' => 'Country',
'location' => 'Location',
'whitelisted' => 'Whitelisted',
];
2 changes: 2 additions & 0 deletions packages/core/resources/lang/en/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
'notifiable_type' => 'Notifiable_type',
'notifiable_id' => 'Notifiable_id',

'hello' => 'Hello',

];
4 changes: 1 addition & 3 deletions packages/expiry/config/expiry.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,13 @@
| Jobs
|--------------------------------------------------------------------------
|
| These jobs are used to collect expiries and send summaries.
| These jobs are used to collect expiries. You can add more jobs here.
|
*/

'collect_expiries_jobs' => [
\Moox\Expiry\Jobs\CollectExpiries::class,
// Add more jobs here if needed.
],
'send_summary_job' => \Moox\Expiry\Jobs\SendSummary::class,

/*
|--------------------------------------------------------------------------
Expand Down
70 changes: 0 additions & 70 deletions packages/expiry/src/Jobs/SendSummary.php

This file was deleted.

1 change: 0 additions & 1 deletion packages/flags/tests/CompilesIconsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Orchestra\Testbench\TestCase;

// TODO: Care for Testbench
/* @php-stan ignore-next-line */
class CompilesIconsTest extends TestCase
{
/** @test */
Expand Down
4 changes: 2 additions & 2 deletions packages/locate/src/Resources/AreaResource/Pages/ListPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Filament\Actions\CreateAction;
use Filament\Resources\Pages\ListRecords;
use Moox\Locate\Models\Locate;
use Moox\Locate\Models\Area;
use Moox\Locate\Resources\AreaResource;
use Moox\Locate\Resources\LocateResource\Widgets\LocateWidgets;

Expand Down Expand Up @@ -33,7 +33,7 @@ protected function getHeaderActions(): array
{
return [
CreateAction::make()
->using(function (array $data, string $model): Locate {
->using(function (array $data, string $model): Area {
return $model::create($data);
}),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Stat;
use Illuminate\Support\Facades\DB;
use Moox\Locate\Models\Locate;
use Moox\Locate\Models\Area;

class LocateWidgets extends BaseWidget
{
Expand All @@ -17,7 +17,7 @@ protected function getCards(): array
DB::raw('COUNT(*) as count'),
];

$aggregatedInfo = Locate::query()
$aggregatedInfo = Area::query()
->select($aggregationColumns)
->first();

Expand Down
2 changes: 1 addition & 1 deletion packages/press/src/Models/WpBasePost.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @property string $post_title
* @property string $post_name
* @property string $post_author
* @property Moox\Press\Models\WpPostMeta $postMeta
* @property WpPostMeta $postMeta
*/
class WpBasePost extends Model
{
Expand Down
35 changes: 0 additions & 35 deletions packages/press/src/WpRubrikPlugin.php

This file was deleted.

35 changes: 0 additions & 35 deletions packages/press/src/WpSchulungPlugin.php

This file was deleted.

3 changes: 3 additions & 0 deletions packages/sync/src/Http/Controllers/Api/PlatformController.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ public function destroy($id)
return response()->json(null, 204);
}

// TODO: not implemented yet
/*
public function syncs(Platform $platform)
{
$syncs = $platform->syncs()->get();
return SyncResource::collection($syncs);
}
*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@

class PlatformSyncController extends Controller
{
// TODO: not implemented yet
/*
public function index($platformId)
{
$syncs = Sync::whereHas('sourcePlatform', function ($query) use ($platformId) {
$query->where('id', $platformId);
})->with(['sourcePlatform', 'targetPlatform'])->get();
return response()->json(SyncResource::collection($syncs), 200);
$syncs = Sync::whereHas('sourcePlatform', function ($query) use ($platformId) {
$query->where('id', $platformId);
})->with(['sourcePlatform', 'targetPlatform'])->get();
return response()->json(SyncResource::collection($syncs), 200);
}
*/

}
3 changes: 3 additions & 0 deletions packages/sync/src/Models/Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ public function targetPlatform()
return $this->hasMany(Sync::class, 'target_platform_id');
}

// TODO: not implemented yet
/*
public function syncs()
{
return $this->sources()->union($this->targets());
}
*/

public function platformable()
{
Expand Down
5 changes: 4 additions & 1 deletion packages/trainings/src/Jobs/SendInvitationRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,17 @@ public function handle()
$this->setProgress(100);
}

// TODO: Dynamic user model, not hardcoded, Stan ...
/*
protected function getUserEmailById($userId)
{
// TODO: Dynamic user model, not hardcoded
$user = WpUser::find($userId);
if ($user) {
return $user->user_email;
}
return null;
}
*/
}
15 changes: 7 additions & 8 deletions packages/user-device/src/Notifications/NewDeviceNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,13 @@ public function via($notifiable)
public function toMail($notifiable)
{
return (new MailMessage)
->subject('New Device Registered')
->greeting('Hello '.$notifiable->name.',')
->line('A new device has been registered on your account.')
->line('Device Details: '.$this->deviceDetails['title'])
->line('If this was not you, please secure your account immediately.')
// TODO: Add a button to review devices or Magic Link or to secure account
//->action('Review Devices', url('/user/devices'))
->line('Thank you for using our application!');
->subject(__('core::device.new_device_registered'))
->greeting(__('core::notifications.hello').$notifiable->name.',')
->line(__('core::device.new_device_registered_message'))
->line(__('core::device.device_details').': '.$this->deviceDetails['title'])
->line(__('core::device.if_not_you_secure_account'));
// TODO: Add a button to review devices (need user profile) or Magic Link or to secure account
//->action('Review Devices', url('/user/devices'))
}

/**
Expand Down

0 comments on commit a078d03

Please sign in to comment.