From 52cd3c8148562838d07967b80ac79e180cd0d80e Mon Sep 17 00:00:00 2001 From: amit-canyon Date: Thu, 7 Nov 2024 00:03:31 +0530 Subject: [PATCH] [ADVAPP-972]: The text displayed on the student profile page related to data sync is displaying in an unexpected screen location. (#1099) * The text displayed on the student profile page related to data sync is displaying in an unexpected screen location. * chore: fix enforcement of copyright on all files * Increase space between button and text Signed-off-by: Kevin Ullyott * chore: fix code style --------- Signed-off-by: Kevin Ullyott Co-authored-by: amit-canyon Co-authored-by: Kevin Ullyott Co-authored-by: Orrison --- .../views/components/header/index.blade.php | 16 ++++--- .../sis-last-updated.blade.php | 48 +++++++++++++++++++ .../student-resource/sis-sync.blade.php | 43 +++++------------ .../StudentResource/Pages/ViewStudent.php | 7 +++ 4 files changed, 76 insertions(+), 38 deletions(-) create mode 100644 app-modules/student-data-model/resources/views/filament/resources/student-resource/sis-last-updated.blade.php diff --git a/app-modules/student-data-model/resources/views/components/header/index.blade.php b/app-modules/student-data-model/resources/views/components/header/index.blade.php index 880ebbf399..ee4a540f6f 100644 --- a/app-modules/student-data-model/resources/views/components/header/index.blade.php +++ b/app-modules/student-data-model/resources/views/components/header/index.blade.php @@ -49,15 +49,19 @@ class="mb-2 hidden sm:block"
$breadcrumbs, ])> - {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_HEADER_ACTIONS_BEFORE, scopes: $this->getRenderHookScopes()) }} +
+
+ {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_HEADER_ACTIONS_BEFORE, scopes: $this->getRenderHookScopes()) }} - @if ($actions) - - @endif + @if ($actions) + + @endif +
+ {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_HEADER_ACTIONS_AFTER, scopes: $this->getRenderHookScopes()) }} +
- {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_HEADER_ACTIONS_AFTER, scopes: $this->getRenderHookScopes()) }}
diff --git a/app-modules/student-data-model/resources/views/filament/resources/student-resource/sis-last-updated.blade.php b/app-modules/student-data-model/resources/views/filament/resources/student-resource/sis-last-updated.blade.php new file mode 100644 index 0000000000..dd2f090298 --- /dev/null +++ b/app-modules/student-data-model/resources/views/filament/resources/student-resource/sis-last-updated.blade.php @@ -0,0 +1,48 @@ +{{-- + + + Copyright © 2016-2024, Canyon GBS LLC. All rights reserved. + + Advising App™ is licensed under the Elastic License 2.0. For more details, + see https://github.com/canyongbs/advisingapp/blob/main/LICENSE. + + Notice: + + - You may not provide the software to third parties as a hosted or managed + service, where the service provides users with access to any substantial set of + the features or functionality of the software. + - You may not move, change, disable, or circumvent the license key functionality + in the software, and you may not remove or obscure any functionality in the + software that is protected by the license key. + - You may not alter, remove, or obscure any licensing, copyright, or other notices + of the licensor in the software. Any use of the licensor’s trademarks is subject + to applicable law. + - Canyon GBS LLC respects the intellectual property rights of others and expects the + same in return. Canyon GBS™ and Advising App™ are registered trademarks of + Canyon GBS LLC, and we are committed to enforcing and protecting our trademarks + vigorously. + - The software solution, including services, infrastructure, and code, is offered as a + Software as a Service (SaaS) by Canyon GBS LLC. + - Use of this software implies agreement to the license terms and conditions as stated + in the Elastic License 2.0. + + For more information or inquiries please visit our website at + https://www.canyongbs.com or contact us via email at legal@canyongbs.com. + + +--}} +@php + use AdvisingApp\StudentDataModel\Models\Student; + use Illuminate\Support\Carbon; + use App\Settings\DisplaySettings; + + /** @var Student $student */ + + $timezone = app(DisplaySettings::class)->getTimezone(); +@endphp +
+

+ Last Updated + {{ $student->updated_at->setTimezone($timezone)->format('m/d/Y \a\t g:i A') }} +

+
diff --git a/app-modules/student-data-model/resources/views/filament/resources/student-resource/sis-sync.blade.php b/app-modules/student-data-model/resources/views/filament/resources/student-resource/sis-sync.blade.php index f3d6f3c4a2..e61f393da3 100644 --- a/app-modules/student-data-model/resources/views/filament/resources/student-resource/sis-sync.blade.php +++ b/app-modules/student-data-model/resources/views/filament/resources/student-resource/sis-sync.blade.php @@ -31,37 +31,16 @@ --}} -getTimezone(); -?> -
- @if ($student->updated_at) -
-

- This record was last updated in the SIS on - {{ $student->updated_at->setTimezone($timezone)->format('F j, Y g:i A') }}. -

-
- @endif - -
- - - {{ 'Sync' }} - - -
+
+ + {{ 'Sync' }} +
diff --git a/app-modules/student-data-model/src/Filament/Resources/StudentResource/Pages/ViewStudent.php b/app-modules/student-data-model/src/Filament/Resources/StudentResource/Pages/ViewStudent.php index 66a7105ae0..684755b891 100644 --- a/app-modules/student-data-model/src/Filament/Resources/StudentResource/Pages/ViewStudent.php +++ b/app-modules/student-data-model/src/Filament/Resources/StudentResource/Pages/ViewStudent.php @@ -82,6 +82,13 @@ public function boot() ]), scopes: ViewStudent::class, ); + FilamentView::registerRenderHook( + PanelsRenderHook::PAGE_HEADER_ACTIONS_AFTER, + fn (): View => view('student-data-model::filament.resources.student-resource.sis-last-updated', [ + 'student' => $this->getRecord(), + ]), + scopes: ViewStudent::class, + ); } }