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-1154]: Introduce the ability to create confidential interactions and to share those with other users or teams of users #1261

Merged
merged 17 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
cfdd470
feat(interaction): add confidentiality features to interactions
amit-canyon Jan 24, 2025
60e6be3
chore: fix enforcement of copyright on all files
amit-canyon Jan 24, 2025
077dce6
chore: fix code style
Orrison Jan 24, 2025
effd473
feat(interaction): enhance confidentiality features with new models a…
amit-canyon Jan 27, 2025
8e3d712
chore: fix enforcement of copyright on all files
amit-canyon Jan 27, 2025
f26e3c3
feat(interaction): add icon representation for confidential interacti…
amit-canyon Jan 27, 2025
ba9fb5e
feat(interaction): update confidential interaction icons and enhance …
amit-canyon Jan 27, 2025
9b54368
feat(interaction): add relationships to InteractionConfidentialTeam m…
amit-canyon Jan 28, 2025
f9eed48
chore: fix code style
amit-canyon Jan 28, 2025
24f83d1
feat(interaction): implement ConfidentialInteractionFeatureFlag and u…
amit-canyon Jan 29, 2025
16fe859
chore: fix enforcement of copyright on all files
amit-canyon Jan 29, 2025
df7abb2
feat(activity-feed): refactor button structure and improve loading in…
amit-canyon Jan 29, 2025
5f78f65
Merge branch 'feature/ADVAPP-1154' of github.com:canyongbs/advisingap…
amit-canyon Jan 29, 2025
86faac7
feat(interaction): improve access control logic in InteractionConfide…
amit-canyon Jan 29, 2025
f935bd2
feat(interaction): update factory implementations and improve interac…
amit-canyon Jan 29, 2025
1920479
Fix factory issues
Orrison Jan 29, 2025
fbdb3c8
changes to confidential display
Orrison Jan 29, 2025
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
@@ -0,0 +1,60 @@
<?php

/*
<COPYRIGHT>

Copyright © 2016-2025, 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.

</COPYRIGHT>
*/

namespace AdvisingApp\Interaction\Database\Factories;

use AdvisingApp\Interaction\Models\InteractionConfidentialTeam;
use AdvisingApp\Team\Database\Factories\TeamFactory;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
* @extends Factory<InteractionConfidentialTeam>
*/
class InteractionConfidentialTeamFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'interaction_id' => InteractionFactory::new()->create(),
'team_id' => TeamFactory::new()->create(),
Orrison marked this conversation as resolved.
Show resolved Hide resolved
];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php

/*
<COPYRIGHT>

Copyright © 2016-2025, 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.

</COPYRIGHT>
*/

namespace AdvisingApp\Interaction\Database\Factories;

use AdvisingApp\Interaction\Models\InteractionConfidentialUser;
use Database\Factories\UserFactory;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
* @extends Factory<InteractionConfidentialUser>
*/
class InteractionConfidentialUserFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'interaction_id' => InteractionFactory::new()->create(),
'user_id' => UserFactory::new()->create(),
Orrison marked this conversation as resolved.
Show resolved Hide resolved
];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php

/*
<COPYRIGHT>

Copyright © 2016-2025, 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.

</COPYRIGHT>
*/

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class () extends Migration {
public function up(): void
{
Schema::table('interactions', function (Blueprint $table) {
$table->boolean('is_confidential')->default(false);
});
}

public function down(): void
{
Schema::table('interactions', function (Blueprint $table) {
$table->dropColumn('is_confidential');
});
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

/*
<COPYRIGHT>

Copyright © 2016-2025, 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.

</COPYRIGHT>
*/

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class () extends Migration {
public function up(): void
{
Schema::create('interaction_confidential_users', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('interaction_id')->constrained()->cascadeOnDelete();
$table->foreignUuid('user_id')->constrained()->cascadeOnDelete();
$table->timestamps();
});
}

public function down(): void
{
Schema::dropIfExists('interaction_confidential_users');
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

/*
<COPYRIGHT>

Copyright © 2016-2025, 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.

</COPYRIGHT>
*/

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class () extends Migration {
public function up(): void
{
Schema::create('interaction_confidential_teams', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('interaction_id')->constrained()->cascadeOnDelete();
$table->foreignUuid('team_id')->constrained()->cascadeOnDelete();
$table->timestamps();
});
}

public function down(): void
{
Schema::dropIfExists('interaction_confidential_teams');
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

/*
<COPYRIGHT>

Copyright © 2016-2025, 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.

</COPYRIGHT>
*/

use App\Features\ConfidentialInteractionFeatureFlag;
use Illuminate\Database\Migrations\Migration;

return new class () extends Migration {
public function up(): void
{
ConfidentialInteractionFeatureFlag::activate();
}

public function down(): void
{
ConfidentialInteractionFeatureFlag::deactivate();
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,18 @@

use AdvisingApp\Interaction\Models\Interaction;
use AdvisingApp\Prospect\Models\Prospect;
use App\Features\ConfidentialInteractionFeatureFlag;
use App\Filament\Tables\Columns\IdColumn;
use Carbon\CarbonInterface;
use Filament\Infolists\Components\Fieldset;
use Filament\Infolists\Components\IconEntry;
use Filament\Infolists\Components\TextEntry;
use Filament\Infolists\Infolist;
use Filament\Tables\Actions\CreateAction;
use Filament\Tables\Actions\DeleteAction;
use Filament\Tables\Actions\EditAction;
use Filament\Tables\Actions\ViewAction;
use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;

Expand All @@ -56,6 +59,11 @@ public function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
IconEntry::make('is_confidential')
->label('')
->icon(fn (string $state): ?string => $state ? 'heroicon-o-lock-closed' : null)
->tooltip(fn (string $state): ?string => $state ? 'Confidential Interaction' : null)
->visible(fn ($record): bool => ConfidentialInteractionFeatureFlag::active() && $record->is_confidential),
Orrison marked this conversation as resolved.
Show resolved Hide resolved
TextEntry::make('user.name')
->label('Created By'),
Fieldset::make('Details')
Expand Down Expand Up @@ -94,6 +102,12 @@ public function table(Table $table): Table
->recordTitleAttribute('id')
->columns([
IdColumn::make(),
IconColumn::make('is_confidential')
->label('Confidential')
->trueIcon('heroicon-o-lock-closed')
->falseIcon('')
->tooltip(fn (string $state): ?string => $state ? 'Confidential Interaction' : null)
->visible(fn (): bool => ConfidentialInteractionFeatureFlag::active()),
TextColumn::make('initiative.name'),
TextColumn::make('driver.name'),
TextColumn::make('division.name'),
Expand Down
Loading