-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #412 from canyongbs/feature/advapp-136-survey-blocks
[ADVAPP-136]: Remove Unnecessary Blocks in Surveys
- Loading branch information
Showing
7 changed files
with
309 additions
and
2 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
app-modules/survey/src/Filament/Blocks/CheckboxSurveyFieldBlock.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
/* | ||
<COPYRIGHT> | ||
Copyright © 2022-2023, 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\Survey\Filament\Blocks; | ||
|
||
use AdvisingApp\Form\Filament\Blocks\CheckboxFormFieldBlock; | ||
|
||
class CheckboxSurveyFieldBlock extends CheckboxFormFieldBlock | ||
{ | ||
public function getLabel(): string | ||
{ | ||
return 'Multiple Choice'; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
app-modules/survey/src/Filament/Blocks/RadioSurveyFieldBlock.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
/* | ||
<COPYRIGHT> | ||
Copyright © 2022-2023, 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\Survey\Filament\Blocks; | ||
|
||
use AdvisingApp\Form\Filament\Blocks\RadioFormFieldBlock; | ||
|
||
class RadioSurveyFieldBlock extends RadioFormFieldBlock | ||
{ | ||
public function getLabel(): string | ||
{ | ||
return 'Choice (Radio)'; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
app-modules/survey/src/Filament/Blocks/SelectSurveyFieldBlock.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
/* | ||
<COPYRIGHT> | ||
Copyright © 2022-2023, 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\Survey\Filament\Blocks; | ||
|
||
use AdvisingApp\Form\Filament\Blocks\SelectFormFieldBlock; | ||
|
||
class SelectSurveyFieldBlock extends SelectFormFieldBlock | ||
{ | ||
public function getLabel(): string | ||
{ | ||
return 'Choice (Dropdown)'; | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
app-modules/survey/src/Filament/Blocks/SurveyFieldBlockRegistry.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
|
||
/* | ||
<COPYRIGHT> | ||
Copyright © 2022-2023, 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\Survey\Filament\Blocks; | ||
|
||
use AdvisingApp\Form\Filament\Blocks\EmailFormFieldBlock; | ||
use AdvisingApp\Form\Filament\Blocks\NumberFormFieldBlock; | ||
use AdvisingApp\Form\Filament\Blocks\EducatableEmailFormFieldBlock; | ||
|
||
class SurveyFieldBlockRegistry | ||
{ | ||
/** | ||
* @return array<class-string<FormFieldBlock>> | ||
*/ | ||
public static function get(): array | ||
{ | ||
return [ | ||
EducatableEmailFormFieldBlock::class, | ||
TextInputSurveyFieldBlock::class, | ||
TextAreaSurveyFieldBlock::class, | ||
SelectSurveyFieldBlock::class, | ||
RadioSurveyFieldBlock::class, | ||
CheckboxSurveyFieldBlock::class, | ||
EmailFormFieldBlock::class, | ||
NumberFormFieldBlock::class, | ||
]; | ||
} | ||
|
||
/** | ||
* @return array<string, class-string<FormFieldBlock>> | ||
*/ | ||
public static function keyByType(): array | ||
{ | ||
/** @var FormFieldBlock $block */ | ||
return collect(static::get()) | ||
->mapWithKeys(fn (string $block): array => [$block::type() => $block]) | ||
->all(); | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
app-modules/survey/src/Filament/Blocks/TextAreaSurveyFieldBlock.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
/* | ||
<COPYRIGHT> | ||
Copyright © 2022-2023, 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\Survey\Filament\Blocks; | ||
|
||
use AdvisingApp\Form\Filament\Blocks\TextAreaFormFieldBlock; | ||
|
||
class TextAreaSurveyFieldBlock extends TextAreaFormFieldBlock | ||
{ | ||
public function getLabel(): string | ||
{ | ||
return 'Question (Multi-Line)'; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
app-modules/survey/src/Filament/Blocks/TextInputSurveyFieldBlock.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
/* | ||
<COPYRIGHT> | ||
Copyright © 2022-2023, 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\Survey\Filament\Blocks; | ||
|
||
use AdvisingApp\Form\Filament\Blocks\TextInputFormFieldBlock; | ||
|
||
class TextInputSurveyFieldBlock extends TextInputFormFieldBlock | ||
{ | ||
public function getLabel(): string | ||
{ | ||
return 'Question (Single Line)'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters