From e0dac92615a41ba3af08b1bffff6a817faa4ff08 Mon Sep 17 00:00:00 2001 From: Ketan Barevadiya Date: Mon, 30 Dec 2024 10:06:48 +0000 Subject: [PATCH 1/6] Extend the front-end display of notification options on service request types --- ..._fields_in_service_request_types_table.php | 57 +++++++++++++++ .../EditServiceRequestTypeNotifications.php | 70 ++++++++++++++++++- .../src/Models/ServiceRequestType.php | 36 ++++++++++ 3 files changed, 161 insertions(+), 2 deletions(-) create mode 100644 app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php diff --git a/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php b/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php new file mode 100644 index 000000000..27cbf681f --- /dev/null +++ b/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php @@ -0,0 +1,57 @@ +boolean('is_managers_service_request_update_email_enabled')->after('is_managers_service_request_resolved_notification_enabled')->default(false); + $table->boolean('is_managers_service_request_update_notification_enabled')->after('is_managers_service_request_update_email_enabled')->default(false); + $table->boolean('is_managers_service_request_status_change_email_enabled')->after('is_managers_service_request_update_notification_enabled')->default(false); + $table->boolean('is_managers_service_request_status_change_notification_enabled')->after('is_managers_service_request_status_change_email_enabled')->default(false); + $table->boolean('is_auditors_service_request_update_email_enabled')->after('is_auditors_service_request_resolved_notification_enabled')->default(false); + $table->boolean('is_auditors_service_request_update_notification_enabled')->after('is_auditors_service_request_update_email_enabled')->default(false); + $table->boolean('is_auditors_service_request_status_change_email_enabled')->after('is_auditors_service_request_update_notification_enabled')->default(false); + $table->boolean('is_auditors_service_request_status_change_notification_enabled')->after('is_auditors_service_request_status_change_email_enabled')->default(false); + $table->boolean('is_customers_service_request_created_email_enabled')->default(false); + $table->boolean('is_customers_service_request_created_notification_enabled')->default(false); + $table->boolean('is_customers_service_request_assigned_email_enabled')->default(false); + $table->boolean('is_customers_service_request_assigned_notification_enabled')->default(false); + $table->boolean('is_customers_service_request_update_email_enabled')->default(false); + $table->boolean('is_customers_service_request_update_notification_enabled')->default(false); + $table->boolean('is_customers_service_request_status_change_email_enabled')->default(false); + $table->boolean('is_customers_service_request_status_change_notification_enabled')->default(false); + $table->boolean('is_customers_service_request_closed_email_enabled')->default(false); + $table->boolean('is_customers_service_request_closed_notification_enabled')->default(false); + }); + } + + public function down(): void + { + Schema::table('service_request_types', function (Blueprint $table) { + $table->dropColumn([ + 'is_managers_service_request_update_email_enabled', + 'is_managers_service_request_update_notification_enabled', + 'is_managers_service_request_status_change_email_enabled', + 'is_managers_service_request_status_change_notification_enabled', + 'is_auditors_service_request_update_email_enabled', + 'is_auditors_service_request_update_notification_enabled', + 'is_auditors_service_request_status_change_email_enabled', + 'is_auditors_service_request_status_change_notification_enabled', + 'is_customers_service_request_created_email_enabled', + 'is_customers_service_request_created_notification_enabled', + 'is_customers_service_request_assigned_email_enabled', + 'is_customers_service_request_assigned_notification_enabled', + 'is_customers_service_request_update_email_enabled', + 'is_customers_service_request_update_notification_enabled', + 'is_customers_service_request_status_change_email_enabled', + 'is_customers_service_request_status_change_notification_enabled', + 'is_customers_service_request_closed_email_enabled', + 'is_customers_service_request_closed_notification_enabled', + ]); + }); + } +}; diff --git a/app-modules/service-management/src/Filament/Resources/ServiceRequestTypeResource/Pages/EditServiceRequestTypeNotifications.php b/app-modules/service-management/src/Filament/Resources/ServiceRequestTypeResource/Pages/EditServiceRequestTypeNotifications.php index 62139ea16..c4364587e 100644 --- a/app-modules/service-management/src/Filament/Resources/ServiceRequestTypeResource/Pages/EditServiceRequestTypeNotifications.php +++ b/app-modules/service-management/src/Filament/Resources/ServiceRequestTypeResource/Pages/EditServiceRequestTypeNotifications.php @@ -88,7 +88,21 @@ public function form(Form $form): Form ->label('Notification'), Heading::make() ->three() - ->content('Service Request Resolved'), + ->content('Service Request Update'), + Toggle::make('is_managers_service_request_update_email_enabled') + ->label('Email'), + Toggle::make('is_managers_service_request_update_notification_enabled') + ->label('Notification'), + Heading::make() + ->three() + ->content('Service Request Status Change (Non-Closed)'), + Toggle::make('is_managers_service_request_status_change_email_enabled') + ->label('Email'), + Toggle::make('is_managers_service_request_status_change_notification_enabled') + ->label('Notification'), + Heading::make() + ->three() + ->content('Service Request Closed'), Toggle::make('is_managers_service_request_resolved_email_enabled') ->label('Email'), Toggle::make('is_managers_service_request_resolved_notification_enabled') @@ -110,13 +124,65 @@ public function form(Form $form): Form ->label('Email'), Toggle::make('is_auditors_service_request_assigned_notification_enabled') ->label('Notification'), + Heading::make() + ->three() + ->content('Service Request Update'), + Toggle::make('is_auditors_service_request_update_email_enabled') + ->label('Email'), + Toggle::make('is_auditors_service_request_update_notification_enabled') + ->label('Notification'), + Heading::make() + ->three() + ->content('Service Request Status Change (Non-Closed)'), + Toggle::make('is_auditors_service_request_status_change_email_enabled') + ->label('Email'), + Toggle::make('is_auditors_service_request_status_change_notification_enabled') + ->label('Notification'), Heading::make() ->three() - ->content('Service Request Resolved'), + ->content('Service Request Closed'), Toggle::make('is_auditors_service_request_resolved_email_enabled') ->label('Email'), Toggle::make('is_auditors_service_request_resolved_notification_enabled') ->label('Notification'), + Heading::make() + ->two() + ->content('Customers'), + Heading::make() + ->three() + ->content('Service Request Created'), + Toggle::make('is_customers_service_request_created_email_enabled') + ->label('Email'), + Toggle::make('is_customers_service_request_created_notification_enabled') + ->label('Notification'), + Heading::make() + ->three() + ->content('Service Request Assigned'), + Toggle::make('is_customers_service_request_assigned_email_enabled') + ->label('Email'), + Toggle::make('is_customers_service_request_assigned_notification_enabled') + ->label('Notification'), + Heading::make() + ->three() + ->content('Service Request Update'), + Toggle::make('is_customers_service_request_update_email_enabled') + ->label('Email'), + Toggle::make('is_customers_service_request_update_notification_enabled') + ->label('Notification'), + Heading::make() + ->three() + ->content('Service Request Status Change (Non-Closed)'), + Toggle::make('is_customers_service_request_status_change_email_enabled') + ->label('Email'), + Toggle::make('is_customers_service_request_status_change_notification_enabled') + ->label('Notification'), + Heading::make() + ->three() + ->content('Service Request Closed'), + Toggle::make('is_customers_service_request_closed_email_enabled') + ->label('Email'), + Toggle::make('is_customers_service_request_closed_notification_enabled') + ->label('Notification'), ]), ]); } diff --git a/app-modules/service-management/src/Models/ServiceRequestType.php b/app-modules/service-management/src/Models/ServiceRequestType.php index 88c2d5196..5ba3885a3 100644 --- a/app-modules/service-management/src/Models/ServiceRequestType.php +++ b/app-modules/service-management/src/Models/ServiceRequestType.php @@ -84,6 +84,24 @@ class ServiceRequestType extends BaseModel implements Auditable 'is_auditors_service_request_resolved_email_enabled', 'is_auditors_service_request_resolved_notification_enabled', 'last_assigned_id', + 'is_managers_service_request_update_email_enabled', + 'is_managers_service_request_update_notification_enabled', + 'is_managers_service_request_status_change_email_enabled', + 'is_managers_service_request_status_change_notification_enabled', + 'is_auditors_service_request_update_email_enabled', + 'is_auditors_service_request_update_notification_enabled', + 'is_auditors_service_request_status_change_email_enabled', + 'is_auditors_service_request_status_change_notification_enabled', + 'is_customers_service_request_created_email_enabled', + 'is_customers_service_request_created_notification_enabled', + 'is_customers_service_request_assigned_email_enabled', + 'is_customers_service_request_assigned_notification_enabled', + 'is_customers_service_request_update_email_enabled', + 'is_customers_service_request_update_notification_enabled', + 'is_customers_service_request_status_change_email_enabled', + 'is_customers_service_request_status_change_notification_enabled', + 'is_customers_service_request_closed_email_enabled', + 'is_customers_service_request_closed_notification_enabled', ]; protected $casts = [ @@ -103,6 +121,24 @@ class ServiceRequestType extends BaseModel implements Auditable 'is_auditors_service_request_assigned_notification_enabled' => 'boolean', 'is_auditors_service_request_resolved_email_enabled' => 'boolean', 'is_auditors_service_request_resolved_notification_enabled' => 'boolean', + 'is_managers_service_request_update_email_enabled' => 'boolean', + 'is_managers_service_request_update_notification_enabled' => 'boolean', + 'is_managers_service_request_status_change_email_enabled' => 'boolean', + 'is_managers_service_request_status_change_notification_enabled' => 'boolean', + 'is_auditors_service_request_update_email_enabled' => 'boolean', + 'is_auditors_service_request_update_notification_enabled' => 'boolean', + 'is_auditors_service_request_status_change_email_enabled' => 'boolean', + 'is_auditors_service_request_status_change_notification_enabled' => 'boolean', + 'is_customers_service_request_created_email_enabled' => 'boolean', + 'is_customers_service_request_created_notification_enabled' => 'boolean', + 'is_customers_service_request_assigned_email_enabled' => 'boolean', + 'is_customers_service_request_assigned_notification_enabled' => 'boolean', + 'is_customers_service_request_update_email_enabled' => 'boolean', + 'is_customers_service_request_update_notification_enabled' => 'boolean', + 'is_customers_service_request_status_change_email_enabled' => 'boolean', + 'is_customers_service_request_status_change_notification_enabled' => 'boolean', + 'is_customers_service_request_closed_email_enabled' => 'boolean', + 'is_customers_service_request_closed_notification_enabled' => 'boolean', ]; public function serviceRequests(): HasManyThrough From b8e463bea1ccfa67a08324768908ab878ebc2066 Mon Sep 17 00:00:00 2001 From: ketan-canyon Date: Mon, 30 Dec 2024 10:10:26 +0000 Subject: [PATCH 2/6] chore: fix enforcement of copyright on all files --- ..._fields_in_service_request_types_table.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php b/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php index 27cbf681f..d331f59c1 100644 --- a/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php +++ b/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php @@ -1,5 +1,39 @@ + + Copyright © 2016-2024, Canyon GBS LLC. All rights reserved. + + Aiding App™ is licensed under the Elastic License 2.0. For more details, + see + + 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 Aiding 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 + or contact us via email at legal@canyongbs.com. + + +*/ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; From 32f099d848fafd822a29b4e0aaf1076955096716 Mon Sep 17 00:00:00 2001 From: ketan-canyon Date: Mon, 30 Dec 2024 10:12:17 +0000 Subject: [PATCH 3/6] chore: fix code style --- .../Pages/EditServiceRequestTypeNotifications.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app-modules/service-management/src/Filament/Resources/ServiceRequestTypeResource/Pages/EditServiceRequestTypeNotifications.php b/app-modules/service-management/src/Filament/Resources/ServiceRequestTypeResource/Pages/EditServiceRequestTypeNotifications.php index c4364587e..ff882ad08 100644 --- a/app-modules/service-management/src/Filament/Resources/ServiceRequestTypeResource/Pages/EditServiceRequestTypeNotifications.php +++ b/app-modules/service-management/src/Filament/Resources/ServiceRequestTypeResource/Pages/EditServiceRequestTypeNotifications.php @@ -124,7 +124,7 @@ public function form(Form $form): Form ->label('Email'), Toggle::make('is_auditors_service_request_assigned_notification_enabled') ->label('Notification'), - Heading::make() + Heading::make() ->three() ->content('Service Request Update'), Toggle::make('is_auditors_service_request_update_email_enabled') @@ -145,7 +145,7 @@ public function form(Form $form): Form ->label('Email'), Toggle::make('is_auditors_service_request_resolved_notification_enabled') ->label('Notification'), - Heading::make() + Heading::make() ->two() ->content('Customers'), Heading::make() @@ -162,7 +162,7 @@ public function form(Form $form): Form ->label('Email'), Toggle::make('is_customers_service_request_assigned_notification_enabled') ->label('Notification'), - Heading::make() + Heading::make() ->three() ->content('Service Request Update'), Toggle::make('is_customers_service_request_update_email_enabled') From dcfdc7b871715b62e1ccea0270196e2088beae83 Mon Sep 17 00:00:00 2001 From: Ketan Barevadiya Date: Tue, 31 Dec 2024 16:45:19 +0000 Subject: [PATCH 4/6] Worked on PR review changes --- ...ers_fields_in_service_request_types_table.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php b/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php index d331f59c1..b9e527bc1 100644 --- a/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php +++ b/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php @@ -42,14 +42,14 @@ public function up(): void { Schema::table('service_request_types', function (Blueprint $table) { - $table->boolean('is_managers_service_request_update_email_enabled')->after('is_managers_service_request_resolved_notification_enabled')->default(false); - $table->boolean('is_managers_service_request_update_notification_enabled')->after('is_managers_service_request_update_email_enabled')->default(false); - $table->boolean('is_managers_service_request_status_change_email_enabled')->after('is_managers_service_request_update_notification_enabled')->default(false); - $table->boolean('is_managers_service_request_status_change_notification_enabled')->after('is_managers_service_request_status_change_email_enabled')->default(false); - $table->boolean('is_auditors_service_request_update_email_enabled')->after('is_auditors_service_request_resolved_notification_enabled')->default(false); - $table->boolean('is_auditors_service_request_update_notification_enabled')->after('is_auditors_service_request_update_email_enabled')->default(false); - $table->boolean('is_auditors_service_request_status_change_email_enabled')->after('is_auditors_service_request_update_notification_enabled')->default(false); - $table->boolean('is_auditors_service_request_status_change_notification_enabled')->after('is_auditors_service_request_status_change_email_enabled')->default(false); + $table->boolean('is_managers_service_request_update_email_enabled'); + $table->boolean('is_managers_service_request_update_notification_enabled')->default(false); + $table->boolean('is_managers_service_request_status_change_email_enabled')->default(false); + $table->boolean('is_managers_service_request_status_change_notification_enabled')->default(false); + $table->boolean('is_auditors_service_request_update_email_enabled')->default(false); + $table->boolean('is_auditors_service_request_update_notification_enabled')->default(false); + $table->boolean('is_auditors_service_request_status_change_email_enabled')->default(false); + $table->boolean('is_auditors_service_request_status_change_notification_enabled')->default(false); $table->boolean('is_customers_service_request_created_email_enabled')->default(false); $table->boolean('is_customers_service_request_created_notification_enabled')->default(false); $table->boolean('is_customers_service_request_assigned_email_enabled')->default(false); From f1515673eaa860096e9f3c4e780c5fd0c830e49d Mon Sep 17 00:00:00 2001 From: Ketan Barevadiya Date: Tue, 31 Dec 2024 16:51:35 +0000 Subject: [PATCH 5/6] resolved test case errors --- ..._auditors_managers_fields_in_service_request_types_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php b/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php index b9e527bc1..6335ef1a2 100644 --- a/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php +++ b/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php @@ -42,7 +42,7 @@ public function up(): void { Schema::table('service_request_types', function (Blueprint $table) { - $table->boolean('is_managers_service_request_update_email_enabled'); + $table->boolean('is_managers_service_request_update_email_enabled')->default(false); $table->boolean('is_managers_service_request_update_notification_enabled')->default(false); $table->boolean('is_managers_service_request_status_change_email_enabled')->default(false); $table->boolean('is_managers_service_request_status_change_notification_enabled')->default(false); From 576f8dc069fe83f11cbc466bd6ee13f14c0b7dca Mon Sep 17 00:00:00 2001 From: Orrison Date: Thu, 2 Jan 2025 22:25:54 +0000 Subject: [PATCH 6/6] chore: fix enforcement of copyright on all files --- ..._auditors_managers_fields_in_service_request_types_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php b/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php index 6335ef1a2..47ef1a653 100644 --- a/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php +++ b/app-modules/service-management/database/migrations/2024_12_30_091625_add_customers_auditors_managers_fields_in_service_request_types_table.php @@ -3,7 +3,7 @@ /* - Copyright © 2016-2024, Canyon GBS LLC. All rights reserved. + Copyright © 2016-2025, Canyon GBS LLC. All rights reserved. Aiding App™ is licensed under the Elastic License 2.0. For more details, see