Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADVAPP-917]: Improve the UI/UX design of the student profile page #1060

Merged
merged 55 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
6520802
init header and student profile section
amit-canyon Oct 10, 2024
d3addfd
chore: fix enforcement of copyright on all files
amit-canyon Oct 10, 2024
f999121
chore: fix code style
joelicatajr Oct 10, 2024
d93980a
add tables livewire component
amit-canyon Oct 14, 2024
fb853a8
chore: fix enforcement of copyright on all files
amit-canyon Oct 14, 2024
d38cb6b
added relation manager tabs and other component (wip)
amit-canyon Oct 15, 2024
0fd7555
chore: fix code style
amit-canyon Oct 15, 2024
e6f8588
Remove unuse blade and convert managerecord to relation manage compon…
amit-canyon Oct 16, 2024
64f17e0
Remove unuse code and comment
amit-canyon Oct 16, 2024
c0a65f6
chore: fix code style
amit-canyon Oct 16, 2024
f81d3a9
add access right in tab view and timeline (wip)
amit-canyon Oct 17, 2024
7d8dc0e
student timeline section
amit-canyon Oct 18, 2024
e022965
chore: fix enforcement of copyright on all files
amit-canyon Oct 18, 2024
4ce355e
chore: fix code style
joelicatajr Oct 18, 2024
e6b73ef
remove unuse
amit-canyon Oct 21, 2024
196bce9
chore: fix code style
amit-canyon Oct 23, 2024
3019afe
Refactor classes and handle nullable things and dark mode
amit-canyon Oct 24, 2024
8841ec5
refactor classes and other changes
amit-canyon Oct 25, 2024
75d2f38
Fix test issue
amit-canyon Oct 25, 2024
f202f3a
change refence route
amit-canyon Oct 25, 2024
2440e53
remove copy
amit-canyon Oct 25, 2024
f5a3640
Fix the filament timeline modal
Orrison Oct 28, 2024
be6dd1c
add parrent access and modal open issue
amit-canyon Oct 29, 2024
7a9283e
change empty timeline message and remove border
amit-canyon Oct 29, 2024
d32d694
Fix the address call
Orrison Oct 29, 2024
03acdfe
fix the table height
amit-canyon Oct 29, 2024
ebad007
Update the font-weight of the student profile section
Orrison Oct 29, 2024
11d443a
Fix access and write tests
Orrison Oct 29, 2024
f6744c5
chore: fix enforcement of copyright on all files
Orrison Oct 29, 2024
6b4d6b0
More access tests
Orrison Oct 29, 2024
57842ba
Test for last premium feature
Orrison Oct 29, 2024
48f3537
make sure permissions are put in place to render the components properly
Orrison Oct 30, 2024
7cf8276
Delete the old ManageStudentInformation
Orrison Oct 30, 2024
f091439
Test for ProgramsRelationManager
Orrison Oct 30, 2024
50e58d6
Fix the test name
Orrison Oct 30, 2024
4604892
Add a test for EnrollmentsRelationManager
Orrison Oct 30, 2024
1d6243d
chore: fix code style
Orrison Oct 30, 2024
b1f6046
Add test for StudentInteractionsRelationManager
Orrison Oct 30, 2024
e0b8781
Add test for StudentFilesRelationManager
Orrison Oct 30, 2024
b617e02
chore: fix code style
Orrison Oct 30, 2024
b3dfa16
Add a test for and adjust permissions of StudentEngagementRelationMan…
Orrison Oct 30, 2024
15249a3
Remove unneeded permissions from tests
Orrison Oct 30, 2024
e78216f
Fix unneeded items in tests
Orrison Oct 30, 2024
f8bca7b
add test for StudentAlertsRelationManager
Orrison Oct 30, 2024
b58979f
Test for StudentTasksRelationManager
Orrison Oct 30, 2024
e03d65a
Update tests
Orrison Oct 30, 2024
6d0cf3d
Remove files that are no longer needed
Orrison Oct 30, 2024
9f0cc08
Just load to the first 10
Orrison Oct 30, 2024
d0bdec6
Prevent loading of more than 10 records
Orrison Oct 30, 2024
7eff752
Setup lazy loading
Orrison Oct 30, 2024
7f22477
chore: fix code style
Orrison Oct 30, 2024
209cdcd
Change the default record previews to only show 5
Orrison Oct 30, 2024
10073c6
Make sure the timeline preview only ever shows 5
Orrison Oct 30, 2024
87823e4
Hide columns by default in StudentAlertsRelationManager
Orrison Oct 30, 2024
5baa560
Remove commented code
Orrison Oct 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
use AdvisingApp\Alert\Filament\Resources\AlertResource;
use AdvisingApp\Segment\Actions\TranslateSegmentFilters;
use AdvisingApp\StudentDataModel\Models\Scopes\EducatableSearch;
use AdvisingApp\StudentDataModel\Filament\Resources\StudentResource;
use AdvisingApp\Prospect\Filament\Resources\ProspectResource\Pages\ManageProspectAlerts;
use AdvisingApp\StudentDataModel\Filament\Resources\StudentResource\Pages\ManageStudentAlerts;

class ListAlerts extends ListRecords
{
Expand All @@ -79,7 +79,7 @@ public function infolist(Infolist $infolist): Infolist
->label('Related To')
->getStateUsing(fn (Alert $record): ?string => $record->concern?->{$record->concern::displayNameKey()})
->url(fn (Alert $record) => match ($record->concern ? $record->concern::class : null) {
Student::class => ManageStudentAlerts::getUrl(['record' => $record->concern]),
Student::class => StudentResource::getUrl('view', ['record' => $record->concern]),
Prospect::class => ManageProspectAlerts::getUrl(['record' => $record->concern]),
default => null,
}),
Expand All @@ -99,7 +99,7 @@ public function table(Table $table): Table
->label('Related To')
->getStateUsing(fn (Alert $record): ?string => $record->concern?->{$record->concern::displayNameKey()})
->url(fn (Alert $record) => match ($record->concern ? $record->concern::class : null) {
Student::class => ManageStudentAlerts::getUrl(['record' => $record->concern]),
Student::class => StudentResource::getUrl('view', ['record' => $record->concern]),
Prospect::class => ManageProspectAlerts::getUrl(['record' => $record->concern]),
default => null,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public function toDatabase(object $notifiable): array

$name = $concern->{$concern->displayNameKey()};

$target = match ($concern::class) {
Prospect::class => ProspectResource::class,
Student::class => StudentResource::class,
[$target, $targetRoute] = match ($concern::class) {
Prospect::class => [ProspectResource::class, 'manage-alerts'],
Student::class => [StudentResource::class, 'view'],
};

$alertUrl = $target::getUrl('manage-alerts', ['record' => $concern]);
$alertUrl = $target::getUrl($targetRoute, ['record' => $concern]);

$alertLink = new HtmlString("<a href='{$alertUrl}' target='_blank' class='underline'>alert</a>");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public function toDatabase(object $notifiable): array

$name = $author->{$author->displayNameKey()};

$target = match ($author::class) {
Prospect::class => ProspectResource::class,
Student::class => StudentResource::class,
[$target, $targetRoute] = match ($author::class) {
Prospect::class => [ProspectResource::class, 'manage-application-submissions'],
Student::class => [StudentResource::class, 'view'],
};

$applicationSubmissionUrl = $target::getUrl('manage-application-submissions', ['record' => $author]);
$applicationSubmissionUrl = $target::getUrl($targetRoute, ['record' => $author]);

$applicationSubmissionLink = new HtmlString("<a href='{$applicationSubmissionUrl}' target='_blank' class='underline'>application submission</a>");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ protected function setUp(): void

public static function getDefaultName(): ?string
{
return 'requestFormSubmission';
return 'Request';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public function toDatabase(object $notifiable): array

$name = $author->{$author->displayNameKey()};

$target = match ($author::class) {
Prospect::class => ProspectResource::class,
Student::class => StudentResource::class,
[$target, $targetRoute] = match ($author::class) {
Prospect::class => [ProspectResource::class, 'manage-form-submissions'],
Student::class => [StudentResource::class, 'view'],
};

$formSubmissionUrl = $target::getUrl('manage-form-submissions', ['record' => $author]);
$formSubmissionUrl = $target::getUrl($targetRoute, ['record' => $author]);

$formSubmissionLink = new HtmlString("<a href='{$formSubmissionUrl}' target='_blank' class='underline'>form submission</a>");

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{{--
<COPYRIGHT>

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 [email protected].

</COPYRIGHT>
--}}
@props([
'actions' => [],
'breadcrumbs' => [],
'heading',
'subheading' => null,
])

<header {{ $attributes->class(['fi-header flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between']) }}>
<div>
@if ($breadcrumbs)
<x-filament::breadcrumbs
class="mb-2 hidden sm:block"
:breadcrumbs="$breadcrumbs"
/>
@endif
</div>

<div @class([
'flex shrink-0 items-center gap-3',
'sm:mt-7' => $breadcrumbs,
])>
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_HEADER_ACTIONS_BEFORE, scopes: $this->getRenderHookScopes()) }}

@if ($actions)
<x-filament::actions :actions="$actions" />
@endif

{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_HEADER_ACTIONS_AFTER, scopes: $this->getRenderHookScopes()) }}
</div>
</header>
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
{{--
<COPYRIGHT>

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 [email protected].

</COPYRIGHT>
--}}
@props([
'fullHeight' => false,
])

@php
use Filament\Pages\SubNavigationPosition;

$subNavigation = $this->getCachedSubNavigation();
$subNavigationPosition = $this->getSubNavigationPosition();
$widgetData = $this->getWidgetData();
@endphp

<div {{ $attributes->class(['fi-page', 'h-full' => $fullHeight]) }}>
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_START, scopes: $this->getRenderHookScopes()) }}

<section @class(['flex flex-col gap-y-8 py-8', 'h-full' => $fullHeight])>
@if ($header = $this->getHeader())
{{ $header }}
@elseif ($heading = $this->getHeading())
@php
$subheading = $this->getSubheading();
@endphp

<x-student-data-model::header
:actions="$this->getCachedHeaderActions()"
:breadcrumbs="filament()->hasBreadcrumbs() ? $this->getBreadcrumbs() : []"
>
</x-student-data-model::header>
@endif

<div @class([
'flex flex-col gap-8' => $subNavigation,
match ($subNavigationPosition) {
SubNavigationPosition::Start,
SubNavigationPosition::End
=> 'md:flex-row md:items-start',
default => null,
} => $subNavigation,
'h-full' => $fullHeight,
])>
@if ($subNavigation)
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_SUB_NAVIGATION_SELECT_BEFORE, scopes: $this->getRenderHookScopes()) }}

<x-filament-panels::page.sub-navigation.select :navigation="$subNavigation" />

{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_SUB_NAVIGATION_SELECT_AFTER, scopes: $this->getRenderHookScopes()) }}

@if ($subNavigationPosition === SubNavigationPosition::Start)
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_SUB_NAVIGATION_START_BEFORE, scopes: $this->getRenderHookScopes()) }}

<x-filament-panels::page.sub-navigation.sidebar :navigation="$subNavigation" />

{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_SUB_NAVIGATION_START_AFTER, scopes: $this->getRenderHookScopes()) }}
@endif

@if ($subNavigationPosition === SubNavigationPosition::Top)
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_SUB_NAVIGATION_TOP_BEFORE, scopes: $this->getRenderHookScopes()) }}

<x-filament-panels::page.sub-navigation.tabs :navigation="$subNavigation" />

{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_SUB_NAVIGATION_TOP_AFTER, scopes: $this->getRenderHookScopes()) }}
@endif
@endif

<div @class(['grid flex-1 auto-cols-fr gap-y-8', 'h-full' => $fullHeight])>
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_HEADER_WIDGETS_BEFORE, scopes: $this->getRenderHookScopes()) }}

@if ($headerWidgets = $this->getVisibleHeaderWidgets())
<x-filament-widgets::widgets
class="fi-page-header-widgets"
:columns="$this->getHeaderWidgetsColumns()"
:data="$widgetData"
:widgets="$headerWidgets"
/>
@endif

{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_HEADER_WIDGETS_AFTER, scopes: $this->getRenderHookScopes()) }}

{{ $slot }}

{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_FOOTER_WIDGETS_BEFORE, scopes: $this->getRenderHookScopes()) }}

@if ($footerWidgets = $this->getVisibleFooterWidgets())
<x-filament-widgets::widgets
class="fi-page-footer-widgets"
:columns="$this->getFooterWidgetsColumns()"
:data="$widgetData"
:widgets="$footerWidgets"
/>
@endif

{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_FOOTER_WIDGETS_AFTER, scopes: $this->getRenderHookScopes()) }}
</div>

@if ($subNavigation && $subNavigationPosition === SubNavigationPosition::End)
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_SUB_NAVIGATION_END_BEFORE, scopes: $this->getRenderHookScopes()) }}

<x-filament-panels::page.sub-navigation.sidebar :navigation="$subNavigation" />

{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_SUB_NAVIGATION_END_AFTER, scopes: $this->getRenderHookScopes()) }}
@endif
</div>

@if ($footer = $this->getFooter())
{{ $footer }}
@endif
</section>

@if (!($this instanceof \Filament\Tables\Contracts\HasTable))
<x-filament-actions::modals />
@elseif ($this->isTableLoaded() && filled($this->defaultTableAction))
<div
wire:init="mountTableAction(@js($this->defaultTableAction), @if (filled($this->defaultTableActionRecord))
@js($this->defaultTableActionRecord)
@else
{{ 'null' }}
@endif @if (filled($this->defaultTableActionArguments))
, @js($this->defaultTableActionArguments)
@endif)">
</div>
@endif

@if (filled($this->defaultAction))
<div wire:init="mountAction(@js($this->defaultAction) @if (filled($this->defaultActionArguments))
, @js($this->defaultActionArguments)
@endif)">
</div>
@endif

{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_END, scopes: $this->getRenderHookScopes()) }}

<x-filament-panels::unsaved-action-changes-alert />
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{{--
<COPYRIGHT>

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 [email protected].

</COPYRIGHT>
--}}
<div>
@if ($this->table->getColumns())
<div class="flex flex-col gap-y-6">
<x-filament-panels::resources.tabs />

{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::RESOURCE_PAGES_MANAGE_RELATED_RECORDS_TABLE_BEFORE, scopes: $this->getRenderHookScopes()) }}

{{ $this->table }}

{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::RESOURCE_PAGES_MANAGE_RELATED_RECORDS_TABLE_AFTER, scopes: $this->getRenderHookScopes()) }}
</div>
@endif

@if (count($relationManagers = $this->getRelationManagers()))
<x-filament-panels::resources.relation-managers
:active-locale="isset($activeLocale) ? $activeLocale : null"
:active-manager="$this->activeRelationManager ?? array_key_first($relationManagers)"
:managers="$relationManagers"
:owner-record="$record"
:page-class="static::class"
/>
@endif
</div>
Loading