Phase 4 work order profile depth
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
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('work_orders', function (Blueprint $table) {
|
||||
$table->timestamp('scheduled_at')->nullable()->after('deliverables_checklist');
|
||||
$table->string('appointment_window')->nullable()->after('scheduled_at');
|
||||
$table->json('checklist_items')->nullable()->after('appointment_window');
|
||||
$table->json('checklist_completed')->nullable()->after('checklist_items');
|
||||
$table->text('required_evidence')->nullable()->after('checklist_completed');
|
||||
$table->json('evidence_rules')->nullable()->after('required_evidence');
|
||||
$table->json('change_requests')->nullable()->after('evidence_rules');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('work_orders', function (Blueprint $table) {
|
||||
$table->dropColumn([
|
||||
'scheduled_at',
|
||||
'appointment_window',
|
||||
'checklist_items',
|
||||
'checklist_completed',
|
||||
'required_evidence',
|
||||
'evidence_rules',
|
||||
'change_requests',
|
||||
]);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
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('provider_profiles', function (Blueprint $table) {
|
||||
$table->json('services')->nullable()->after('skills');
|
||||
$table->json('tool_inventory')->nullable()->after('tools');
|
||||
$table->json('certification_records')->nullable()->after('certifications');
|
||||
$table->json('profile_visibility')->nullable()->after('public_contact');
|
||||
$table->text('private_notes')->nullable()->after('profile_visibility');
|
||||
});
|
||||
|
||||
Schema::table('buyer_profiles', function (Blueprint $table) {
|
||||
$table->json('hiring_policies')->nullable()->after('hiring_regions');
|
||||
$table->json('locations')->nullable()->after('hiring_policies');
|
||||
$table->json('profile_visibility')->nullable()->after('public_contact');
|
||||
$table->text('private_notes')->nullable()->after('profile_visibility');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('provider_profiles', function (Blueprint $table) {
|
||||
$table->dropColumn([
|
||||
'services',
|
||||
'tool_inventory',
|
||||
'certification_records',
|
||||
'profile_visibility',
|
||||
'private_notes',
|
||||
]);
|
||||
});
|
||||
|
||||
Schema::table('buyer_profiles', function (Blueprint $table) {
|
||||
$table->dropColumn([
|
||||
'hiring_policies',
|
||||
'locations',
|
||||
'profile_visibility',
|
||||
'private_notes',
|
||||
]);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -61,12 +61,34 @@ class DatabaseSeeder extends Seeder
|
||||
'bio' => 'Demo provider profile for the technician-owned exchange.',
|
||||
'service_area' => 'Central US with regional travel',
|
||||
'skills' => "POS\nNetworking\nStructured cabling\nPrinter support",
|
||||
'services' => [
|
||||
['name' => 'Smart hands dispatch', 'level' => 'experienced'],
|
||||
['name' => 'Network troubleshooting', 'level' => 'advanced'],
|
||||
['name' => 'POS installation', 'level' => 'experienced'],
|
||||
],
|
||||
'tools' => "Laptop\nToner/probe\nCable tester\nBasic hand tools",
|
||||
'tool_inventory' => [
|
||||
['name' => 'Laptop', 'category' => 'diagnostics'],
|
||||
['name' => 'Toner/probe', 'category' => 'cabling'],
|
||||
['name' => 'Cable tester', 'category' => 'network'],
|
||||
],
|
||||
'certifications' => 'Low-voltage and platform-specific certifications can be listed here.',
|
||||
'certification_records' => [
|
||||
['name' => 'Low-voltage certification placeholder', 'issuer' => 'State or authority'],
|
||||
],
|
||||
'insurance_status' => 'Provider supplied',
|
||||
'rate_card' => "Two-hour minimum\nStandard onsite hourly rate set by provider\nTravel negotiated per job",
|
||||
'travel_policy' => 'Travel terms are negotiated directly with buyers.',
|
||||
'availability_notes' => 'Weekdays and scheduled after-hours work.',
|
||||
'profile_visibility' => [
|
||||
'bio' => true,
|
||||
'services' => true,
|
||||
'tools' => true,
|
||||
'certifications' => true,
|
||||
'rate_card' => true,
|
||||
'availability' => true,
|
||||
'imports' => true,
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -87,8 +109,23 @@ class DatabaseSeeder extends Seeder
|
||||
'description' => 'Demo buyer profile showing onboarding and payment terms.',
|
||||
'service_categories' => "Networking\nPOS\nPrinter support",
|
||||
'hiring_regions' => 'Nationwide',
|
||||
'hiring_policies' => [
|
||||
['name' => 'Direct vendor onboarding', 'summary' => 'Buyer handles vendor setup outside the platform.'],
|
||||
['name' => 'Clear scope required', 'summary' => 'Work orders should include deliverables and evidence requirements.'],
|
||||
],
|
||||
'locations' => [
|
||||
['name' => 'National dispatch', 'region' => 'United States'],
|
||||
],
|
||||
'vendor_onboarding' => 'Direct vendor onboarding outside the platform.',
|
||||
'payment_terms' => 'Direct payment between buyer and provider.',
|
||||
'profile_visibility' => [
|
||||
'description' => true,
|
||||
'categories' => true,
|
||||
'locations' => true,
|
||||
'policies' => true,
|
||||
'payment_terms' => true,
|
||||
'onboarding' => true,
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -135,6 +172,11 @@ class DatabaseSeeder extends Seeder
|
||||
'status' => 'assigned',
|
||||
'agreed_terms' => $quote->terms,
|
||||
'deliverables_checklist' => $job->deliverables,
|
||||
'scheduled_at' => $job->starts_at,
|
||||
'appointment_window' => $job->time_window,
|
||||
'checklist_items' => ['Check in', 'Photos', 'Resolution notes'],
|
||||
'required_evidence' => $job->deliverables,
|
||||
'evidence_rules' => ['Arrival photo', 'Completion photo'],
|
||||
'status_history' => [['status' => 'assigned', 'user_id' => $buyer->id, 'at' => now()->toIso8601String()]],
|
||||
]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user