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-166]: Update Core Application Navigation #420

Merged
merged 10 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
134 changes: 134 additions & 0 deletions _ide_helper_models.php

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion app-modules/alert/src/Filament/Resources/AlertResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,17 @@ class AlertResource extends Resource
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static ?string $navigationGroup = 'Productivity Tools';
protected static ?string $navigationGroup = 'Engagement Features';

protected static ?int $navigationSort = 5;

protected static ?string $model = Alert::class;

protected static ?string $label = 'Proactive Alert';

// TODO: Look into whether or not we should just delete this resource
protected static bool $shouldRegisterNavigation = false;

public static function getPages(): array
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,17 @@ class ApplicationResource extends Resource

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

protected static ?string $navigationGroup = 'Forms and Surveys';
protected static ?string $navigationGroup = 'Premium Features';

protected static ?int $navigationSort = 1;
protected static ?int $navigationSort = 50;

protected static ?string $navigationLabel = 'Manage Admissions';
protected static ?string $navigationLabel = 'Online Admissions';

protected static ?string $breadcrumb = 'Online Admissions';

protected static ?string $modelLabel = 'Application';

protected static ?string $recordTitleAttribute = 'name';

public static function getEloquentQuery(): Builder
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@

class ListApplications extends ListRecords
{
protected ?string $heading = 'Online Admissions';

protected static string $resource = ApplicationResource::class;

public function table(Table $table): Table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ class ApplicationSubmissionStateResource extends Resource

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

protected static ?string $navigationGroup = 'Product Settings';
protected static ?string $navigationParentItem = 'Online Admissions';

protected static ?int $navigationSort = 18;
protected static ?string $navigationGroup = 'Product Administration';

protected static ?string $navigationLabel = 'Application States';

protected static ?int $navigationSort = 1;

public static function getPages(): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function table(Table $table): Table
->color(fn (ApplicationSubmissionState $applicationState) => $applicationState->color->value),
TextColumn::make('applications_count')
->label('# of Applications')
->counts('applications')
->counts('submissions')
->sortable(),
])
->filters([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ class AssistantConfiguration extends Page

protected static ?string $navigationIcon = 'heroicon-o-shield-exclamation';

protected static ?string $navigationLabel = 'Artificial Intelligence';
protected static ?string $navigationParentItem = 'Product Integrations';

protected static ?string $navigationGroup = 'Product Administration';
protected static ?string $navigationLabel = 'AI Settings';

protected static ?int $navigationSort = 20;
protected static ?int $navigationSort = 10;

protected static ?string $modelLabel = 'Artificial Intelligence';

Expand Down
2 changes: 2 additions & 0 deletions app-modules/assistant/src/Filament/Pages/ManageAiSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class ManageAiSettings extends SettingsPage

protected static ?string $title = 'Manage AI Settings';

protected static ?string $navigationGroup = 'Product Administration';

// We don't want to register the navigation as we will be using the navigation item in a different page.
public static function registerNavigationItems(): void {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ class PersonalAssistant extends Page

protected static string $view = 'assistant::filament.pages.personal-assistant';

protected static ?string $navigationGroup = 'Productivity Tools';
protected static ?string $navigationGroup = 'Artificial Intelligence';

protected static ?int $navigationSort = 1;
protected static ?int $navigationSort = 20;

public Chat $chat;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@
</COPYRIGHT>
*/

namespace App\Filament\Pages;
namespace AdvisingApp\Assistant\Filament\Pages;

use Filament\Pages\Page;

class ChangeManagement extends Page
class PromptLibrary extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';
protected static ?string $navigationIcon = 'heroicon-o-building-library';

protected static ?string $navigationGroup = 'Service Management';
protected static string $view = 'filament.pages.coming-soon';

protected static ?int $navigationSort = 20;
protected static ?string $navigationGroup = 'Artificial Intelligence';

protected static string $view = 'filament.pages.coming-soon';
protected static ?int $navigationSort = 10;
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,17 @@ class AssistantChatMessageLogResource extends Resource

protected static ?string $navigationIcon = 'heroicon-o-chat-bubble-left-ellipsis';

protected static ?string $navigationLabel = 'Personal Assistant Audit';
protected static ?string $navigationLabel = 'Personal Assistant';

protected static ?string $navigationGroup = 'Product Administration';
protected static ?string $navigationParentItem = 'Usage Auditing';

protected static ?int $navigationSort = 50;
protected static ?string $navigationGroup = 'Reporting';

protected static ?string $modelLabel = 'Personal Assistant Audit';
protected static ?int $navigationSort = 30;

protected static ?string $pluralLabel = 'Personal Assistant Audit';
protected static ?string $modelLabel = 'Personal Assistant';

protected static ?string $pluralLabel = 'Personal Assistant';

public static function infolist(Infolist $infolist): Infolist
{
Expand Down
8 changes: 5 additions & 3 deletions app-modules/audit/src/Filament/Pages/ManageAuditSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,17 @@ class ManageAuditSettings extends SettingsPage
{
protected static ?string $navigationIcon = 'heroicon-o-cog-6-tooth';

protected static ?string $navigationLabel = 'Audit Configuration';
protected static ?string $navigationLabel = 'Auditing';

protected static ?string $navigationGroup = 'Product Administration';

protected static ?int $navigationSort = 30;
protected static ?string $navigationParentItem = 'Global Settings';

protected static ?int $navigationSort = 20;

protected static string $settings = AuditSettings::class;

protected static ?string $title = 'Audit Configuration';
protected static ?string $title = 'Auditing';

public static function shouldRegisterNavigation(): bool
{
Expand Down
12 changes: 4 additions & 8 deletions app-modules/audit/src/Filament/Resources/AuditResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,15 @@ class AuditResource extends Resource
{
protected static ?string $model = Audit::class;

protected static ?string $navigationLabel = 'Record Auditing';
protected static ?string $navigationLabel = 'Other Records';

protected static ?string $navigationIcon = 'heroicon-o-shield-check';

protected static ?string $navigationGroup = 'Product Administration';
protected static ?string $navigationParentItem = 'Usage Auditing';

protected static ?int $navigationSort = 100;
protected static ?string $navigationGroup = 'Reporting';

public static function getRelations(): array
{
return [
];
}
protected static ?int $navigationSort = 40;

public static function getPages(): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class PermissionResource extends Resource

protected static ?string $navigationGroup = 'Users and Permissions';

protected static ?int $navigationSort = 6;
protected static ?int $navigationSort = 70;

public static function form(Form $form): Form
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class RoleGroupResource extends Resource

protected static ?string $navigationGroup = 'Users and Permissions';

protected static ?int $navigationSort = 4;
protected static ?int $navigationSort = 50;

public static function getRelations(): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class RoleResource extends Resource

protected static ?string $navigationGroup = 'Users and Permissions';

protected static ?int $navigationSort = 5;
protected static ?int $navigationSort = 60;

public static function form(Form $form): Form
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ class CampaignResource extends Resource

protected static ?string $navigationIcon = 'heroicon-o-megaphone';

protected static ?string $navigationGroup = 'Mass Engagement';
protected static ?string $navigationGroup = 'Engagement Features';

protected static ?int $navigationSort = 2;
protected static ?int $navigationSort = 30;

public static function getRelations(): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,17 @@ class CaseloadResource extends Resource

protected static ?string $navigationIcon = 'heroicon-o-inbox-stack';

protected static ?string $navigationGroup = 'Mass Engagement';
protected static ?string $navigationGroup = 'Engagement Features';

protected static ?int $navigationSort = 1;
protected static ?int $navigationSort = 20;

protected static ?string $navigationLabel = 'Caseload Management';

protected static ?string $breadcrumb = 'Caseload Management';

protected static ?string $modelLabel = 'Caseload';

protected static ?string $pluralModelLabel = 'Caseloads';

public static function filters(CaseloadModel $subject): array
{
Expand Down Expand Up @@ -96,12 +104,6 @@ public static function actions(CaseloadModel $subject): array
};
}

public static function getRelations(): array
{
return [
];
}

public static function getPages(): array
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@

class ListCaseloads extends ListRecords
{
protected ?string $heading = 'Caseload Management';

protected static string $resource = CaseloadResource::class;

public function table(Table $table): Table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class DivisionResource extends Resource

protected static ?string $navigationGroup = 'Users and Permissions';

protected static ?int $navigationSort = 2;
protected static ?int $navigationSort = 10;

public static function getRelations(): array
{
Expand Down
4 changes: 2 additions & 2 deletions app-modules/engagement/src/Filament/Pages/MessageCenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ class MessageCenter extends Page

protected static string $view = 'engagement::filament.pages.message-center';

protected static ?string $navigationGroup = 'Productivity Tools';
protected static ?string $navigationGroup = 'Engagement Features';

protected static ?int $navigationSort = 3;
protected static ?int $navigationSort = 10;

protected array $modelsToTimeline = [
Engagement::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class EngagementFileResource extends Resource

protected static ?string $navigationIcon = 'heroicon-o-document-duplicate';

protected static ?string $navigationGroup = 'Productivity Tools';
protected static ?string $navigationGroup = 'Engagement Features';

protected static ?int $navigationSort = 7;

Expand All @@ -62,11 +62,8 @@ class EngagementFileResource extends Resource

protected static ?string $pluralModelLabel = 'Files or Documents';

public static function getRelations(): array
{
return [
];
}
// TODO: Look into whether or not we should just delete this resource
protected static bool $shouldRegisterNavigation = false;

public static function form(Form $form): Form
{
Expand Down
12 changes: 9 additions & 3 deletions app-modules/form/src/Filament/Resources/FormResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,17 @@ class FormResource extends Resource

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

protected static ?string $navigationGroup = 'Forms and Surveys';
protected static ?string $navigationGroup = 'Premium Features';

protected static ?int $navigationSort = 2;
protected static ?int $navigationSort = 60;

protected static ?string $navigationLabel = 'Manage Forms';
protected static ?string $navigationLabel = 'Online Forms';

protected static ?string $breadcrumb = 'Online Forms';

protected static ?string $modelLabel = 'Form';

protected static ?string $recordTitleAttribute = 'name';

public static function getEloquentQuery(): Builder
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@

class ListForms extends ListRecords
{
protected ?string $heading = 'Online Forms';

protected static string $resource = FormResource::class;

public function table(Table $table): Table
Expand All @@ -59,8 +61,6 @@ public function table(Table $table): Table
IdColumn::make(),
TextColumn::make('name'),
])
->filters([
])
->actions([
Action::make('Respond')
->url(fn (Form $form) => route('forms.show', ['form' => $form]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ class UserChat extends Page implements HasForms, HasActions

public ?string $selectedConversation = null;

protected static ?string $navigationGroup = 'Productivity Tools';
protected static ?string $navigationGroup = 'Premium Features';

protected static ?int $navigationSort = 2;
protected static ?int $navigationSort = 10;

protected static ?string $navigationIcon = 'heroicon-o-chat-bubble-oval-left-ellipsis';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ class ManageAmazonSesSettings extends SettingsPage

protected static ?string $navigationLabel = 'Amazon SES';

protected static ?string $navigationGroup = 'Integrations';
protected static ?string $navigationGroup = 'Product Administration';

protected static ?string $navigationParentItem = 'Product Integrations';

protected static ?int $navigationSort = 50;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ class ManageGoogleAnalyticsSettings extends SettingsPage

protected static ?string $navigationLabel = 'Google Analytics';

protected static ?string $navigationGroup = 'Integrations';
protected static ?string $navigationGroup = 'Product Administration';

protected static ?string $navigationParentItem = 'Product Integrations';

protected static ?int $navigationSort = 10;

Expand Down
Loading