Compare commits

...

7 Commits

17 changed files with 2143 additions and 37 deletions

View File

@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
namespace App\Jobs;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
use Illuminate\Support\Facades\Log;
final class LogAppVersionJob implements ShouldQueue
{
use Queueable;
/**
* Log the application version.
*/
public function handle(): void
{
$version = config('app.version', 'unknown');
Log::info("Application version: {$version}");
}
}

View File

@@ -15,6 +15,8 @@
'name' => env('APP_NAME', 'Laravel'), 'name' => env('APP_NAME', 'Laravel'),
'version' => '1.0.0',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Application Environment | Application Environment

View File

@@ -0,0 +1,413 @@
<?php
declare(strict_types=1);
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
/**
* Seeds question groups and questions for the Audit category.
* Assumes the Audit category already exists (created by CategorySeeder).
*/
final class AuditQuestionSeeder extends Seeder
{
/**
* Seed all Audit question groups and their questions.
*/
public function run(): void
{
$categoryId = DB::table('categories')->where('name', 'Audit')->value('id');
if ($categoryId === null) {
$categoryId = DB::table('categories')->insertGetId([
'name' => 'Audit',
'sort_order' => 1,
'created_at' => now(),
'updated_at' => now(),
]);
}
$this->seedOpportunityDetails($categoryId);
$this->seedClientBackgroundAndHistory($categoryId);
$this->seedFinancialInformation($categoryId);
$this->seedRegulatoryCompliance($categoryId);
$this->seedRiskAssessment($categoryId);
$this->seedResourceAllocation($categoryId);
$this->seedReportngRequirements($categoryId);
}
/**
* Seed Group 1: Opportunity Details (not scored, no answer options).
*/
private function seedOpportunityDetails(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Opportunity Details',
'sort_order' => 1,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'What sort of audit opportunity is it?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 1,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'How many locations involved in this opportunity?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 2,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'List any locations included in this opportunity where we do not have a Baker Tilly firm.',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'optional',
'sort_order' => 3,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Where is the client HQ?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 4,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Who is the competition?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 5,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 2: Client Background and History (scored, Yes/No options).
*/
private function seedClientBackgroundAndHistory(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Client Background and History',
'sort_order' => 2,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'What is the client\'s business and industry?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 1,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'There have been no significant changes in the client\'s business operations or structure recently?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_no',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Does the sector and/or client come with a reputation which we are comfortable that Baker Tilly is associated with?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => null,
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are there any previous audit reports or findings that need to be considered?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 4,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 3: Financial Information (scored, Yes/No options).
*/
private function seedFinancialInformation(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Financial Information',
'sort_order' => 3,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Has the client provided financial statements or balance sheet?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are the client\'s financial statements complete and accurate?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 4: Regulatory Compliance (scored, Yes/No options).
*/
private function seedRegulatoryCompliance(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Regulatory Compliance',
'sort_order' => 4,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Does the client comply with all relevant regulatory requirements and standards?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_no',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'The client has no pending legal or regulatory issues that you know of that could impact the audit?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_no',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'The client has been subject to no regulatory investigations or penalties?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_no',
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 5: Risk Assessment (scored, Yes/No options).
*/
private function seedRiskAssessment(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Risk Assessment',
'sort_order' => 5,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'There are no key risks associated with the audit?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_no',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Have you completed a conflict check?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'required',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are you and other BTI member firms independent withi the meaning of local and IESBA rules?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_no',
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 6: Resource Allocation (scored, mixed Q1 has no answer options and is not scored).
*/
private function seedResourceAllocation(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Resource Allocation',
'sort_order' => 6,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'What resources are required for the audit (personnel, time, budget)?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Does your firm have the scale, seniority and degree of expertise available at the riht time to report in accordance with the client\'s schedule?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'optional',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 7: Reportng Requirements (scored, Yes/No options group name preserves Excel typo).
*/
private function seedReportngRequirements(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Reportng Requirements',
'sort_order' => 7,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Do we understand reporting rules, regulatory environment and stakeholder expectations?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
}

View File

@@ -18,8 +18,11 @@ public function run(): void
{ {
$this->call([ $this->call([
JonathanSeeder::class, JonathanSeeder::class,
CategorySeeder::class, AuditQuestionSeeder::class,
QuestionSeeder::class, DigitalSolutionsQuestionSeeder::class,
LegalQuestionSeeder::class,
OutsourceQuestionSeeder::class,
TaxQuestionSeeder::class,
]); ]);
} }
} }

View File

@@ -0,0 +1,345 @@
<?php
declare(strict_types=1);
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
/**
* Seeds question groups and questions for the Digital Solutions category.
* Creates the category if it does not already exist.
*/
final class DigitalSolutionsQuestionSeeder extends Seeder
{
/**
* Seed all Digital Solutions question groups and their questions.
*/
public function run(): void
{
$categoryId = DB::table('categories')->where('name', 'Digital Solutions')->value('id');
if ($categoryId === null) {
$categoryId = DB::table('categories')->insertGetId([
'name' => 'Digital Solutions',
'sort_order' => 4,
'created_at' => now(),
'updated_at' => now(),
]);
}
$this->seedOpportunityDetails($categoryId);
$this->seedClientBackgroundAndHistory($categoryId);
$this->seedRegulatoryCompliance($categoryId);
$this->seedRiskAssessment($categoryId);
$this->seedResourceAllocation($categoryId);
$this->seedTechnologyAndInnovationFit($categoryId);
}
/**
* Seed Group 1: Opportunity Details (not scored, no answer options, all details required).
*/
private function seedOpportunityDetails(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Opportunity Details',
'sort_order' => 1,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'What sort of digital consulting opportunity is it?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 1,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'How many locations involved in this opportunity and are there any locations where we do not have digital capabilites in the local Baker Tilly firm.',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 2,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Where is the client HQ? please share more about the clients industry and digital maturity level.',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 3,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Who are the competitors in this space?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 4,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 2: Client Background and History (scored, Yes/No/NA options).
*/
private function seedClientBackgroundAndHistory(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Client Background and History',
'sort_order' => 2,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Have we previously worked with this client, and was the experience positive?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Have we conducted a reputational risk check on the client (negative press, ethical concerns, etc.)?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 3: Regulatory Compliance (scored, Yes/No/NA options).
*/
private function seedRegulatoryCompliance(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Regulatory Compliance',
'sort_order' => 3,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Does the project involve cross-border data transfers, and if so, are necessary safeguards in place?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Does the client have no pending legal, tax or regulatory issues that [you know of] which could impact this opportunity?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 4: Risk Assessment (scored, Yes/No/NA options).
*/
private function seedRiskAssessment(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Risk Assessment',
'sort_order' => 4,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Is there a clear understanding of the project scope, responsibilities, and deliverables?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Do we have the necessary delivery tools (platforms, technology, security measures etc.) to support this opportunity?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Have we completed a conflict check?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Can we meet the service-level agreements (SLAs) without overcommitting our resources?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 4,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are there no special expectations or requirements from the client that may pose a challenge?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 5,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 5: Resource Allocation (scored, Yes/No/NA options).
*/
private function seedResourceAllocation(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Resource Allocation',
'sort_order' => 5,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Do you have the resources required for the opportunity (personnel, time, budget)?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Do you have the right expertise and capacity across our network to deliver high-quality service?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 6: Technology & Innovation Fit (scored, Yes/No/NA options, semicolons in scoring instructions).
*/
private function seedTechnologyAndInnovationFit(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Technology & Innovation Fit',
'sort_order' => 6,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point; if you answer no, you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Are the technologies involved within our area of expertise, or do we have partnerships to support the implementation?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
}

View File

@@ -5,8 +5,8 @@
namespace Database\Seeders; namespace Database\Seeders;
use App\Models\Role; use App\Models\Role;
use App\Models\User;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
final class JonathanSeeder extends Seeder final class JonathanSeeder extends Seeder
{ {
@@ -17,7 +17,7 @@ public function run(): void
{ {
$adminRole = Role::where('name', 'admin')->first(); $adminRole = Role::where('name', 'admin')->first();
User::factory()->create([ DB::table('users')->insert([
'name' => 'Jonathan', 'name' => 'Jonathan',
'email' => 'jonathan.van.rij@agerion.nl', 'email' => 'jonathan.van.rij@agerion.nl',
'password' => bcrypt('secret'), 'password' => bcrypt('secret'),
@@ -25,6 +25,8 @@ public function run(): void
'role_id' => $adminRole->id, 'role_id' => $adminRole->id,
'job_title' => 'Senior Developer', 'job_title' => 'Senior Developer',
'company_name' => 'Baker Tilly', 'company_name' => 'Baker Tilly',
'created_at' => now(),
'updated_at' => now(),
]); ]);
} }
} }

View File

@@ -0,0 +1,506 @@
<?php
declare(strict_types=1);
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
/**
* Seeds question groups and questions for the Legal category.
* Assumes the Legal category already exists or creates it (sort_order=5).
*/
final class LegalQuestionSeeder extends Seeder
{
/**
* Seed all Legal question groups and their questions.
*/
public function run(): void
{
$categoryId = DB::table('categories')->where('name', 'Legal')->value('id');
if ($categoryId === null) {
$categoryId = DB::table('categories')->insertGetId([
'name' => 'Legal',
'sort_order' => 5,
'created_at' => now(),
'updated_at' => now(),
]);
}
$this->seedOpportunityDetails($categoryId);
$this->seedClientBackgroundAndHistory($categoryId);
$this->seedFinancialInformation($categoryId);
$this->seedRegulatoryCompliance($categoryId);
$this->seedRiskAssessmentForLegalOpportunities($categoryId);
$this->seedResourceAllocation($categoryId);
$this->seedStakeholderEngagement($categoryId);
$this->seedFeeQuote($categoryId);
}
/**
* Seed Group 1: Opportunity Details (mixed some text-only, some Yes/No).
*/
private function seedOpportunityDetails(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Opportunity Details',
'sort_order' => 1,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'What type of legal opportunity is it (e.g., litigation, corporate, M&A, regulatory)?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 1,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'How many locations involved in this opportunity?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 2,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Do we have a presence or a reliable partner in all locations listed in this opportunity?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_no',
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Is the client budget realistic?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'required',
'sort_order' => 4,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Has the client requested any additional information from our firms?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'required',
'sort_order' => 5,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'What is the deadline to respond to the client on this opportunity?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 6,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Where is the client HQ?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 7,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Who is the competition?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 8,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 2: Client Background and History (scored, mixed Yes/No and text-only).
*/
private function seedClientBackgroundAndHistory(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Client Background and History',
'sort_order' => 2,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'What is the client\'s business and industry?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 1,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Have there been any significant changes in the client\'s business operations or structure recently?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'What is our competitive edge in this opportunity (e.g., prior experience with the client, unique expertise, pricing advantage)?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'required',
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 3: Financial Information (scored, Yes/No options).
*/
private function seedFinancialInformation(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Financial Information',
'sort_order' => 3,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Has the client provided enough financial information about their company?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are there any significant financial risks or uncertainties that you are aware of?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 4: Regulatory Compliance (scored, Yes/No options).
*/
private function seedRegulatoryCompliance(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Regulatory Compliance',
'sort_order' => 4,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Are there any pending legal or regulatory issues that you know of that could impact the opportunity?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Has the client been subject to any regulatory investigations or penalties?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 5: Risk Assessment for Legal opportunities (scored, Yes/No options).
* Group name preserves Excel casing exactly lowercase 'o' in "opportunities".
*/
private function seedRiskAssessmentForLegalOpportunities(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Risk Assessment for Legal opportunities',
'sort_order' => 5,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Are there any potential risks or challenges associated with the opportunity?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Has a conflict check been completed?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are there any potential conflicts of interest?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 6: Resource Allocation (mixed Q2 and Q5 are text-only, others Yes/No).
*/
private function seedResourceAllocation(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Resource Allocation',
'sort_order' => 6,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Do we have the required skills and capacity within our firm to deliver this work, or would we need support from another firm?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'What resources are required for the opportunity (personnel, time, budget)?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'optional',
'sort_order' => 2,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are there any constraints on the availability of your resources?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'optional',
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Do you know of the any constraints on the availability of other firms included in this opportunity?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'optional',
'sort_order' => 4,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Is the deadline to respond to the client is more than two weeks away. Our experience shows that anything shorter is often unrealistic to pursue.',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'optional',
'sort_order' => 5,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 7: Stakeholder Engagement (mixed Q1 is text-only, Q2 is Yes/No).
*/
private function seedStakeholderEngagement(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Stakeholder Engagement',
'sort_order' => 7,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Who are the key stakeholders involved in this opportunity?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 1,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are there any special expectations and requirements?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'optional',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 8: Fee Quote (scored, Yes/No options).
*/
private function seedFeeQuote(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Fee Quote',
'sort_order' => 8,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Has the client provided sufficient information to enable a fee quote?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
}

View File

@@ -0,0 +1,349 @@
<?php
declare(strict_types=1);
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
/**
* Seeds question groups and questions for the Outsource category.
* Creates the Outsource category if it does not already exist.
*/
final class OutsourceQuestionSeeder extends Seeder
{
/**
* Seed all Outsource question groups and their questions.
*/
public function run(): void
{
$categoryId = DB::table('categories')->where('name', 'Outsource')->value('id');
if ($categoryId === null) {
$categoryId = DB::table('categories')->insertGetId([
'name' => 'Outsource',
'sort_order' => 2,
'created_at' => now(),
'updated_at' => now(),
]);
}
$this->seedOpportunityDetails($categoryId);
$this->seedClientBackgroundAndHistory($categoryId);
$this->seedRegulatoryCompliance($categoryId);
$this->seedRiskAssessment($categoryId);
$this->seedResourceAllocation($categoryId);
}
/**
* Seed Group 1: Opportunity Details (not scored, no answer options, details required).
*/
private function seedOpportunityDetails(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Opportunity Details',
'sort_order' => 1,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'What sort of outsourcing opportunity is it?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 1,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'How many locations involved in this opportunity?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 2,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'List any locations included in this opportunity where we do not have a Baker Tilly firm.',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 3,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Where is the client HQ?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 4,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'What is the client\'s business and industry?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 5,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Who are the competitors in this space?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 6,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 2: Client Background and History (scored, Yes/No/NA options).
*/
private function seedClientBackgroundAndHistory(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Client Background and History',
'sort_order' => 2,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Have we previously worked with this client, and was the experience positive?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Have we conducted a reputational risk check on the client (negative press, ethical concerns, etc.)?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 3: Regulatory Compliance (scored, Yes/No/NA options).
*/
private function seedRegulatoryCompliance(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Regulatory Compliance',
'sort_order' => 3,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Does the client comply with all relevant regulatory requirements?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Has the client provided complete and accurate financial records for review?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Does the client have no pending legal, tax or regulatory issues that [you know of] which could impact this opportunity?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 4: Risk Assessment (scored, Yes/No/NA options).
*/
private function seedRiskAssessment(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Risk Assessment',
'sort_order' => 4,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Is there a clear understanding on the scope, responsibilities and deliverables?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Do we have the necessary delivery tools (platforms, technology, security measures etc.) to support this opportunity?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Have you completed a conflict check?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Can we meet the service-level agreements (SLAs) without overcommitting our resources?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 4,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are there no special expectations or requirements from the client that may pose a challenge?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 5,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 5: Resource Allocation (scored, Yes/No/NA options).
*/
private function seedResourceAllocation(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Resource Allocation',
'sort_order' => 5,
'description' => null,
'scoring_instructions' => 'If you answer yes, you will score 1 point, if you answer no you will score 0 points',
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Do you have the resources required for the opportunity (personnel, time, budget)?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Do you have the right expertise and capacity across our network to deliver high-quality service?',
'has_yes' => true,
'has_no' => true,
'has_na' => true,
'details' => 'optional',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
}

View File

@@ -0,0 +1,449 @@
<?php
declare(strict_types=1);
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
/**
* Seeds question groups and questions for the Tax category.
* Assumes the Tax category is created if not already present.
*/
final class TaxQuestionSeeder extends Seeder
{
/**
* Seed all Tax question groups and their questions.
*/
public function run(): void
{
$categoryId = DB::table('categories')->where('name', 'Tax')->value('id');
if ($categoryId === null) {
$categoryId = DB::table('categories')->insertGetId([
'name' => 'Tax',
'sort_order' => 6,
'created_at' => now(),
'updated_at' => now(),
]);
}
$this->seedOpportunityDetails($categoryId);
$this->seedClientBackgroundAndHistory($categoryId);
$this->seedFinancialInformation($categoryId);
$this->seedRegulatoryCompliance($categoryId);
$this->seedRiskAssessment($categoryId);
$this->seedResourceAllocation($categoryId);
$this->seedStakeholderEngagement($categoryId);
}
/**
* Seed Group 1: Opportunity Details (mixed some scored with Yes/No, some text-only).
*/
private function seedOpportunityDetails(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Opportunity Details',
'sort_order' => 1,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'What sort of opportunity is it?/Describe the Scope of Work',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 1,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'How many locations involved in this opportunity?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 2,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Do we have a Baker Tilly firm in all locations within this opportunity?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_no',
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Has the client requested any additional information from our firms?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'required',
'sort_order' => 4,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'What is the deadline to respond to the client on this opportunity?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 5,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Where is the client HQ?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 6,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Who is the competition?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 7,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 2: Client Background and History (mixed Q1 text-only, Q2/Q3 scored Yes/No).
*/
private function seedClientBackgroundAndHistory(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Client Background and History',
'sort_order' => 2,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'What is the client\'s business and industry?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 1,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Have there been any significant changes in the client\'s business operations or structure recently?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Is the client an existing client?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'required',
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 3: Financial Information (scored, Yes/No options).
*/
private function seedFinancialInformation(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Financial Information',
'sort_order' => 3,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Has the client provided enough financial information about their company?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are there any significant financial risks or uncertainties that you are aware of?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 4: Regulatory Compliance (scored, Yes/No options).
*/
private function seedRegulatoryCompliance(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Regulatory Compliance',
'sort_order' => 4,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Does the client comply with all relevant regulatory requirements and standards?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_no',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are there any pending legal or regulatory issues that you know of that could impact the opportunity?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Has the client been subject to any regulatory investigations or penalties?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 5: Risk Assessment (scored, Yes/No options).
*/
private function seedRiskAssessment(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Risk Assessment',
'sort_order' => 5,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Are there any potential risks or challenges associated with the opportunity?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 1,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are there any potential conflicts of interest?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'req_on_yes',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 6: Resource Allocation (mixed Q1/Q4 text-only, Q2/Q3 scored Yes/No).
*/
private function seedResourceAllocation(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Resource Allocation',
'sort_order' => 6,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'What resources are required for the opportunity (personnel, time, budget)?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'optional',
'sort_order' => 1,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are there any constraints on the availability of your resources?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'optional',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Do you know of the any constraints on the availability of other firms included in this opportunity?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'optional',
'sort_order' => 3,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'What is the expected timeline for the opportunity, including any critical deadlines that must be met?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'optional',
'sort_order' => 4,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Seed Group 7: Stakeholder Engagement (mixed Q1 text-only, Q2 scored Yes/No).
*/
private function seedStakeholderEngagement(int $categoryId): void
{
$groupId = DB::table('question_groups')->insertGetId([
'category_id' => $categoryId,
'name' => 'Stakeholder Engagement',
'sort_order' => 7,
'description' => null,
'scoring_instructions' => null,
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('questions')->insert([
[
'question_group_id' => $groupId,
'text' => 'Who are the key stakeholders involved in this opportunity?',
'has_yes' => false,
'has_no' => false,
'has_na' => false,
'details' => 'required',
'sort_order' => 1,
'is_scored' => false,
'created_at' => now(),
'updated_at' => now(),
],
[
'question_group_id' => $groupId,
'text' => 'Are there any special expectations and requirements?',
'has_yes' => true,
'has_no' => true,
'has_na' => false,
'details' => 'optional',
'sort_order' => 2,
'is_scored' => true,
'created_at' => now(),
'updated_at' => now(),
],
]);
}
}

View File

@@ -6,9 +6,9 @@ ### Score Legend
| Color | Points | Decision | | Color | Points | Decision |
|-------|--------|----------| |-------|--------|----------|
| 🟢 Green | 10+ Points | GO | | Green | 10+ Points | GO |
| 🟡 Yellow | 5-9 Points | Speak to SL or SSL leadership | | Yellow | 5-9 Points | Speak to SL or SSL leadership |
| 🔴 Red | 1-5 Points | NO GO | | Red | 1-5 Points | NO GO |
--- ---
@@ -25,11 +25,13 @@ ### Basic Information
## 1. Opportunity Details ## 1. Opportunity Details
> *Not scored*
| # | Question | Details | | # | Question | Details |
|---|----------|---------| |---|----------|---------|
| 8 | What sort of audit opportunity is it? | [insert details] | | 8 | What sort of audit opportunity is it? | [insert details] |
| 9 | How many locations involved in this opportunity? | [insert details] | | 9 | How many locations involved in this opportunity? | [insert details] |
| 10 | List any locations included in this opportunity where we do not have a Baker Tilly firm. | [if no insert details] | | 10 | List any locations included in this opportunity where we do not have a Baker Tilly firm. | [optional] |
| 11 | Where is the client HQ? | [insert details] | | 11 | Where is the client HQ? | [insert details] |
| 12 | Who is the competition? | [insert details] | | 12 | Who is the competition? | [insert details] |
@@ -39,12 +41,12 @@ ## 1. Client Background and History
> *If you answer yes, you will score 1 point, if you answer no you will score 0 points* > *If you answer yes, you will score 1 point, if you answer no you will score 0 points*
| # | Question | Yes / No / Not applicable | Insert details | | # | Question | Answer Options | Details |
|---|----------|---------------------------|----------------| |---|----------|----------------|---------|
| 14 | What is the client's business and industry? | | [insert details] | | 14 | What is the client's business and industry? | | [insert details] |
| 15 | There have been no significant changes in the client's business operations or structure recently? | - | [if no insert details] | | 15 | There have been no significant changes in the client's business operations or structure recently? | Yes / No | [if no insert details] |
| 16 | Does the sector and/or client come with a reputation which we are comfortable that Baker Tilly is associated with? | - | | | 16 | Does the sector and/or client come with a reputation which we are comfortable that Baker Tilly is associated with? | Yes / No | — |
| 17 | Are there any previous audit reports or findings that need to be considered? | | [if yes insert details] | | 17 | Are there any previous audit reports or findings that need to be considered? | Yes / No | [if yes insert details] |
--- ---
@@ -52,10 +54,10 @@ ## 2. Financial Information
> *If you answer yes, you will score 1 point, if you answer no you will score 0 points* > *If you answer yes, you will score 1 point, if you answer no you will score 0 points*
| # | Question | Yes / No / Not applicable | Insert details | | # | Question | Answer Options | Details |
|---|----------|---------------------------|----------------| |---|----------|----------------|---------|
| 19 | Has the client provided financial statements or balance sheet? | - | [insert details if needed] | | 19 | Has the client provided financial statements or balance sheet? | Yes / No | [insert details if needed] |
| 20 | Are the client's financial statements complete and accurate? | - | [insert details if needed] | | 20 | Are the client's financial statements complete and accurate? | Yes / No | [if yes insert details] |
--- ---
@@ -63,11 +65,11 @@ ## 3. Regulatory Compliance
> *If you answer yes, you will score 1 point, if you answer no you will score 0 points* > *If you answer yes, you will score 1 point, if you answer no you will score 0 points*
| # | Question | Yes / No / Not applicable | Insert details | | # | Question | Answer Options | Details |
|---|----------|---------------------------|----------------| |---|----------|----------------|---------|
| 22 | Does the client comply with all relevant regulatory requirements and standards? | - | [if no insert details] | | 22 | Does the client comply with all relevant regulatory requirements and standards? | Yes / No | [if no insert details] |
| 23 | The client has no pending legal or regulatory issues that you know of that could impact the audit? | | [if no insert details] | | 23 | The client has no pending legal or regulatory issues that you know of that could impact the audit? | Yes / No | [if no insert details] |
| 24 | The client has been subject to no regulatory investigations or penalties? | - | [if no insert details] | | 24 | The client has been subject to no regulatory investigations or penalties? | Yes / No | [if no insert details] |
--- ---
@@ -75,11 +77,11 @@ ## 4. Risk Assessment
> *If you answer yes, you will score 1 point, if you answer no you will score 0 points* > *If you answer yes, you will score 1 point, if you answer no you will score 0 points*
| # | Question | Yes / No / Not applicable | Insert details | | # | Question | Answer Options | Details |
|---|----------|---------------------------|----------------| |---|----------|----------------|---------|
| 26 | There are no key risks associated with the audit? | - | [if no insert details] | | 26 | There are no key risks associated with the audit? | Yes / No | [if no insert details] |
| 27 | Have you completed a conflict check? | - | [insert details] | | 27 | Have you completed a conflict check? | Yes / No | [insert details] |
| 28 | Are you and other BTI member firms independent with the meaning of local and IESBA rules? | - | [if no insert details] | | 28 | Are you and other BTI member firms independent withi the meaning of local and IESBA rules? | Yes / No | [if no insert details] |
--- ---
@@ -87,20 +89,20 @@ ## 5. Resource Allocation
> *If you answer yes, you will score 1 point, if you answer no you will score 0 points* > *If you answer yes, you will score 1 point, if you answer no you will score 0 points*
| # | Question | Yes / No / Not applicable | Insert details | | # | Question | Answer Options | Details |
|---|----------|---------------------------|----------------| |---|----------|----------------|---------|
| 30 | What resources are required for the audit (personnel, time, budget)? | - | [insert details if available] | | 30 | What resources are required for the audit (personnel, time, budget)? | | [insert details if available] |
| 31 | Does your firm have the scale, seniority and degree of expertise available at the right time to report in accordance with the client's schedule? | | [insert details if needed] | | 31 | Does your firm have the scale, seniority and degree of expertise available at the riht time to report in accordance with the client's schedule? | Yes / No | [insert details if needed] |
--- ---
## 6. Reporting Requirements ## 6. Reportng Requirements
> *If you answer yes, you will score 1 point, if you answer no you will score 0 points* > *If you answer yes, you will score 1 point, if you answer no you will score 0 points*
| # | Question | Yes / No / Not applicable | Insert details | | # | Question | Answer Options | Details |
|---|----------|---------------------------|----------------| |---|----------|----------------|---------|
| 33 | Do we understand reporting rules, regulatory environment and stakeholder expectations? | - | [insert details if needed] | | 33 | Do we understand reporting rules, regulatory environment and stakeholder expectations? | Yes / No | [insert details if needed] |
--- ---

Binary file not shown.

Binary file not shown.

View File

@@ -259,7 +259,11 @@ const completeSession = async () => {
</div> </div>
</Transition> </Transition>
<div class="flex justify-end"> <div class="flex justify-between items-center">
<AppButton variant="ghost" size="lg" :href="`/screening/${session.screening_id}/result`" data-cy="back-to-screening">
Back
</AppButton>
<AppButton size="lg" :loading="processing" @click="completeSession" data-cy="complete-session"> <AppButton size="lg" :loading="processing" @click="completeSession" data-cy="complete-session">
Complete Complete
</AppButton> </AppButton>

View File

@@ -1,8 +1,15 @@
<?php <?php
use App\Jobs\CloseSessionsJob;
use App\Jobs\LogAppVersionJob;
use Illuminate\Foundation\Inspiring; use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Schedule;
Artisan::command('inspire', function () { Artisan::command('inspire', function () {
$this->comment(Inspiring::quote()); $this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote'); })->purpose('Display an inspiring quote');
Schedule::job(new LogAppVersionJob)->hourly();
Schedule::job(new CloseSessionsJob)->hourly();