Phase 4 work order profile depth
This commit is contained in:
@@ -1,23 +1,58 @@
|
||||
@php
|
||||
$policiesText = collect($profile?->hiring_policies ?? [])->map(fn ($row) => trim(($row['name'] ?? '').' | '.($row['summary'] ?? ''), ' |'))->implode("\n");
|
||||
$locationsText = collect($profile?->locations ?? [])->map(fn ($row) => trim(($row['name'] ?? '').' | '.($row['region'] ?? ''), ' |'))->implode("\n");
|
||||
$visibility = $profile?->profile_visibility ?? [];
|
||||
$visible = fn (string $field): bool => (bool) ($visibility[$field] ?? true);
|
||||
@endphp
|
||||
|
||||
<x-app-layout>
|
||||
<x-slot name="header"><h2 class="text-xl font-semibold">Buyer Profile</h2></x-slot>
|
||||
<div class="mx-auto max-w-5xl p-6">
|
||||
<form method="POST" action="{{ route('buyers.update') }}" class="space-y-4 rounded border bg-white p-6">
|
||||
@csrf @method('PUT')
|
||||
<x-slot name="header">
|
||||
<x-page-header
|
||||
title="Buyer Profile"
|
||||
description="Build a public company profile with hiring regions, onboarding policies, locations, and sample identity files."
|
||||
/>
|
||||
</x-slot>
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 px-4 py-8 sm:px-6 lg:px-8">
|
||||
<form method="POST" action="{{ route('buyers.update') }}" class="tse-panel space-y-4 p-6">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<x-field name="company_name" label="Company name" :value="$profile?->company_name" />
|
||||
<x-field name="headline" label="Headline" :value="$profile?->headline" />
|
||||
<x-field name="description" label="Description" :value="$profile?->description" textarea />
|
||||
<x-field name="service_categories" label="Service categories" :value="$profile?->service_categories" textarea />
|
||||
<x-field name="hiring_regions" label="Hiring regions" :value="$profile?->hiring_regions" textarea />
|
||||
<x-field name="hiring_policies_text" label="Structured hiring policies" :value="$policiesText" textarea help="One per line. Use: policy name | summary, for example Net 15 ACH | Direct payment after approval." />
|
||||
<x-field name="locations_text" label="Locations" :value="$locationsText" textarea help="One per line. Use: location name | region, for example Tulsa dispatch | Oklahoma." />
|
||||
<x-field name="vendor_onboarding" label="Vendor onboarding" :value="$profile?->vendor_onboarding" textarea />
|
||||
<x-field name="payment_terms" label="Payment terms" :value="$profile?->payment_terms" textarea />
|
||||
<x-field name="website_url" label="Website URL" :value="$profile?->website_url" />
|
||||
<x-field name="contact_email" label="Contact email" :value="$profile?->contact_email" />
|
||||
<label class="flex gap-2 text-sm"><input type="checkbox" name="public_contact" value="1" @checked($profile?->public_contact)> Show contact details publicly</label>
|
||||
|
||||
<div class="rounded-md border border-slate-200 p-4 dark:border-slate-800">
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Public sections</h3>
|
||||
<p class="mt-1 text-sm text-slate-600 dark:text-slate-400">Unchecked sections remain private to the buyer profile owner.</p>
|
||||
<div class="mt-3 grid gap-3 md:grid-cols-3">
|
||||
@foreach (['description' => 'Description', 'categories' => 'Categories', 'locations' => 'Locations', 'policies' => 'Hiring policies', 'payment_terms' => 'Payment terms', 'onboarding' => 'Onboarding'] as $key => $label)
|
||||
<label class="inline-flex items-center gap-2 text-sm text-slate-700 dark:text-slate-300">
|
||||
<input type="checkbox" name="profile_visibility[{{ $key }}]" value="1" @checked($visible($key)) class="rounded border-slate-300 text-sky-600 shadow-sm focus:ring-sky-500 dark:border-slate-700 dark:bg-slate-950">
|
||||
{{ $label }}
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="flex gap-2 text-sm text-slate-700 dark:text-slate-300">
|
||||
<input type="checkbox" name="public_contact" value="1" @checked($profile?->public_contact) class="rounded border-slate-300 text-sky-600 shadow-sm focus:ring-sky-500 dark:border-slate-700 dark:bg-slate-950">
|
||||
Show contact details publicly
|
||||
</label>
|
||||
<x-field name="private_notes" label="Private notes" :value="$profile?->private_notes" textarea help="Internal notes for your company account. These are not shown publicly." />
|
||||
<x-primary-button>Save buyer profile</x-primary-button>
|
||||
</form>
|
||||
@if ($profile)
|
||||
<section class="mt-6 rounded border bg-white p-6">
|
||||
<h3 class="font-semibold">Company photos and files</h3>
|
||||
<section class="tse-panel p-6">
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Company identity, logos, location photos, and sample files</h3>
|
||||
<p class="mt-1 text-sm text-slate-600 dark:text-slate-400">Use captions to distinguish logo, header, office, site, or example work-order files.</p>
|
||||
<x-attachments :attachments="$profile->attachments" />
|
||||
<x-attachment-form type="buyer_profile" :id="$profile->id" kind="profile" />
|
||||
</section>
|
||||
|
||||
@@ -1,16 +1,70 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header"><h2 class="text-xl font-semibold">{{ $profile->company_name }}</h2></x-slot>
|
||||
<div class="mx-auto max-w-5xl rounded border bg-white p-6">
|
||||
<p class="text-lg font-semibold">{{ $profile->headline }}</p>
|
||||
<p class="mt-4 whitespace-pre-line">{{ $profile->description }}</p>
|
||||
<dl class="mt-6 grid gap-4 md:grid-cols-2">
|
||||
<div><dt class="text-sm text-gray-500">Service categories</dt><dd class="whitespace-pre-line">{{ $profile->service_categories }}</dd></div>
|
||||
<div><dt class="text-sm text-gray-500">Hiring regions</dt><dd class="whitespace-pre-line">{{ $profile->hiring_regions }}</dd></div>
|
||||
<div><dt class="text-sm text-gray-500">Vendor onboarding</dt><dd class="whitespace-pre-line">{{ $profile->vendor_onboarding }}</dd></div>
|
||||
<div><dt class="text-sm text-gray-500">Payment terms</dt><dd class="whitespace-pre-line">{{ $profile->payment_terms }}</dd></div>
|
||||
</dl>
|
||||
<x-attachments :attachments="$profile->attachments" />
|
||||
<x-rating-summary :ratings="$profile->ratings" />
|
||||
<x-rating-form type="buyer_profile" :id="$profile->id" category="buyer_overall" />
|
||||
<x-slot name="header">
|
||||
<x-page-header
|
||||
title="{{ $profile->company_name }}"
|
||||
:description="$profile->headline"
|
||||
/>
|
||||
</x-slot>
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 px-4 py-8 sm:px-6 lg:px-8">
|
||||
<section class="tse-panel p-6">
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@if ($profile->public_contact)
|
||||
<x-badge tone="emerald">Public contact</x-badge>
|
||||
@endif
|
||||
@if ($profile->hiring_regions)
|
||||
<x-badge tone="slate">{{ $profile->hiring_regions }}</x-badge>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($profile->visible('description'))
|
||||
<p class="mt-4 whitespace-pre-line text-slate-700 dark:text-slate-300">{{ $profile->description }}</p>
|
||||
@endif
|
||||
|
||||
<dl class="mt-6 grid gap-4 md:grid-cols-2">
|
||||
@if ($profile->visible('categories'))
|
||||
<div><dt class="text-sm text-slate-500 dark:text-slate-400">Service categories</dt><dd class="whitespace-pre-line text-slate-700 dark:text-slate-300">{{ $profile->service_categories }}</dd></div>
|
||||
@endif
|
||||
@if ($profile->visible('locations'))
|
||||
<div>
|
||||
<dt class="text-sm text-slate-500 dark:text-slate-400">Locations</dt>
|
||||
<dd class="mt-2 space-y-2">
|
||||
@forelse ($profile->locations ?? [] as $location)
|
||||
<x-badge tone="slate">{{ $location['name'] }}{{ ! empty($location['region']) ? ' | '.$location['region'] : '' }}</x-badge>
|
||||
@empty
|
||||
<span class="whitespace-pre-line text-sm text-slate-600 dark:text-slate-400">{{ $profile->hiring_regions }}</span>
|
||||
@endforelse
|
||||
</dd>
|
||||
</div>
|
||||
@endif
|
||||
@if ($profile->visible('policies'))
|
||||
<div>
|
||||
<dt class="text-sm text-slate-500 dark:text-slate-400">Hiring policies</dt>
|
||||
<dd class="mt-2 space-y-2">
|
||||
@forelse ($profile->hiring_policies ?? [] as $policy)
|
||||
<div class="rounded-md border border-slate-200 p-3 text-sm dark:border-slate-800">
|
||||
<p class="font-semibold text-slate-950 dark:text-white">{{ $policy['name'] }}</p>
|
||||
@if (! empty($policy['summary']))
|
||||
<p class="mt-1 text-slate-600 dark:text-slate-400">{{ $policy['summary'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
@empty
|
||||
<span class="text-sm text-slate-600 dark:text-slate-400">No structured policies listed.</span>
|
||||
@endforelse
|
||||
</dd>
|
||||
</div>
|
||||
@endif
|
||||
@if ($profile->visible('onboarding'))
|
||||
<div><dt class="text-sm text-slate-500 dark:text-slate-400">Vendor onboarding</dt><dd class="whitespace-pre-line text-slate-700 dark:text-slate-300">{{ $profile->vendor_onboarding }}</dd></div>
|
||||
@endif
|
||||
@if ($profile->visible('payment_terms'))
|
||||
<div><dt class="text-sm text-slate-500 dark:text-slate-400">Payment terms</dt><dd class="whitespace-pre-line text-slate-700 dark:text-slate-300">{{ $profile->payment_terms }}</dd></div>
|
||||
@endif
|
||||
</dl>
|
||||
|
||||
<x-attachments :attachments="$profile->attachments" />
|
||||
<x-rating-summary :ratings="$profile->ratings" />
|
||||
<x-rating-form type="buyer_profile" :id="$profile->id" category="buyer_overall" />
|
||||
</section>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
@@ -1,33 +1,70 @@
|
||||
@php
|
||||
$servicesText = collect($profile?->services ?? [])->map(fn ($row) => trim(($row['name'] ?? '').' | '.($row['level'] ?? ''), ' |'))->implode("\n");
|
||||
$toolsText = collect($profile?->tool_inventory ?? [])->map(fn ($row) => trim(($row['name'] ?? '').' | '.($row['category'] ?? ''), ' |'))->implode("\n");
|
||||
$certsText = collect($profile?->certification_records ?? [])->map(fn ($row) => trim(($row['name'] ?? '').' | '.($row['issuer'] ?? ''), ' |'))->implode("\n");
|
||||
$visibility = $profile?->profile_visibility ?? [];
|
||||
$visible = fn (string $field): bool => (bool) ($visibility[$field] ?? true);
|
||||
@endphp
|
||||
|
||||
<x-app-layout>
|
||||
<x-slot name="header"><h2 class="text-xl font-semibold">Provider Profile</h2></x-slot>
|
||||
<div class="mx-auto max-w-5xl space-y-6 p-6">
|
||||
<form method="POST" action="{{ route('providers.update') }}" class="space-y-4 rounded border bg-white p-6">
|
||||
@csrf @method('PUT')
|
||||
<x-slot name="header">
|
||||
<x-page-header
|
||||
title="Provider Profile"
|
||||
description="Build a public business profile with services, tools, proof records, galleries, and private owner notes."
|
||||
/>
|
||||
</x-slot>
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 px-4 py-8 sm:px-6 lg:px-8">
|
||||
<form method="POST" action="{{ route('providers.update') }}" class="tse-panel space-y-4 p-6">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<x-field name="business_name" label="Business name" :value="$profile?->business_name" />
|
||||
<x-field name="headline" label="Headline" :value="$profile?->headline" />
|
||||
<x-field name="bio" label="Bio" :value="$profile?->bio" textarea />
|
||||
<x-field name="service_area" label="Service area" :value="$profile?->service_area" />
|
||||
<x-field name="skills" label="Skills" :value="$profile?->skills" textarea />
|
||||
<x-field name="tools" label="Tools and equipment" :value="$profile?->tools" textarea />
|
||||
<x-field name="certifications" label="Certifications" :value="$profile?->certifications" textarea />
|
||||
<x-field name="skills" label="Skills summary" :value="$profile?->skills" textarea />
|
||||
<x-field name="services_text" label="Structured services" :value="$servicesText" textarea help="One per line. Use: service name | level, for example POS install | experienced." />
|
||||
<x-field name="tools" label="Tools and equipment summary" :value="$profile?->tools" textarea />
|
||||
<x-field name="tool_inventory_text" label="Tool inventory" :value="$toolsText" textarea help="One per line. Use: tool name | category, for example Cable tester | network." />
|
||||
<x-field name="certifications" label="Certifications summary" :value="$profile?->certifications" textarea />
|
||||
<x-field name="certification_records_text" label="Certification records" :value="$certsText" textarea help="One per line. Use: certification | issuer. Upload proof files below." />
|
||||
<x-field name="insurance_status" label="Insurance status" :value="$profile?->insurance_status" />
|
||||
<x-field name="rate_card" label="Rate card" :value="$profile?->rate_card" textarea />
|
||||
<x-field name="travel_policy" label="Travel policy" :value="$profile?->travel_policy" textarea />
|
||||
<x-field name="availability_notes" label="Availability notes" :value="$profile?->availability_notes" textarea />
|
||||
<x-field name="website_url" label="Website URL" :value="$profile?->website_url" />
|
||||
<x-field name="phone" label="Phone" :value="$profile?->phone" />
|
||||
<label class="flex gap-2 text-sm"><input type="checkbox" name="public_contact" value="1" @checked($profile?->public_contact)> Show contact details publicly</label>
|
||||
|
||||
<div class="rounded-md border border-slate-200 p-4 dark:border-slate-800">
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Public sections</h3>
|
||||
<p class="mt-1 text-sm text-slate-600 dark:text-slate-400">Unchecked sections remain available to you but do not display on the public provider profile.</p>
|
||||
<div class="mt-3 grid gap-3 md:grid-cols-3">
|
||||
@foreach (['bio' => 'Bio', 'services' => 'Services', 'tools' => 'Tools', 'certifications' => 'Certifications', 'rate_card' => 'Rate card', 'availability' => 'Availability', 'imports' => 'Imported history'] as $key => $label)
|
||||
<label class="inline-flex items-center gap-2 text-sm text-slate-700 dark:text-slate-300">
|
||||
<input type="checkbox" name="profile_visibility[{{ $key }}]" value="1" @checked($visible($key)) class="rounded border-slate-300 text-sky-600 shadow-sm focus:ring-sky-500 dark:border-slate-700 dark:bg-slate-950">
|
||||
{{ $label }}
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="flex gap-2 text-sm text-slate-700 dark:text-slate-300">
|
||||
<input type="checkbox" name="public_contact" value="1" @checked($profile?->public_contact) class="rounded border-slate-300 text-sky-600 shadow-sm focus:ring-sky-500 dark:border-slate-700 dark:bg-slate-950">
|
||||
Show contact details publicly
|
||||
</label>
|
||||
<x-field name="private_notes" label="Private notes" :value="$profile?->private_notes" textarea help="Internal notes for your account. These are not shown publicly." />
|
||||
<x-primary-button>Save provider profile</x-primary-button>
|
||||
</form>
|
||||
@if ($profile)
|
||||
<section class="rounded border bg-white p-6">
|
||||
<h3 class="font-semibold">Profile photos and files</h3>
|
||||
<section class="tse-panel p-6">
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Profile photos, certification proof, tools, and job files</h3>
|
||||
<p class="mt-1 text-sm text-slate-600 dark:text-slate-400">Use captions to distinguish van photos, tool photos, certification proof, job photos, and insurance documents.</p>
|
||||
<x-attachments :attachments="$profile->attachments" />
|
||||
<x-attachment-form type="provider_profile" :id="$profile->id" kind="profile" />
|
||||
</section>
|
||||
<form method="POST" action="{{ route('provider-imports.store') }}" class="space-y-4 rounded border bg-white p-6">
|
||||
<form method="POST" action="{{ route('provider-imports.store') }}" class="tse-panel space-y-4 p-6">
|
||||
@csrf
|
||||
<h3 class="font-semibold">External profile snapshot</h3>
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">External profile snapshot</h3>
|
||||
<x-field name="platform" label="Platform" value="Field Nation" />
|
||||
<x-field name="external_id" label="External ID" value="172-630" />
|
||||
<x-field name="profile_url" label="Profile URL" />
|
||||
|
||||
@@ -1,32 +1,94 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header"><h2 class="text-xl font-semibold">{{ $profile->business_name }}</h2></x-slot>
|
||||
<div class="mx-auto max-w-5xl space-y-6 p-6">
|
||||
<section class="rounded border bg-white p-6">
|
||||
<p class="text-lg font-semibold">{{ $profile->headline }}</p>
|
||||
<p class="mt-4 whitespace-pre-line">{{ $profile->bio }}</p>
|
||||
<x-slot name="header">
|
||||
<x-page-header
|
||||
title="{{ $profile->business_name }}"
|
||||
:description="$profile->headline"
|
||||
/>
|
||||
</x-slot>
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 px-4 py-8 sm:px-6 lg:px-8">
|
||||
<section class="tse-panel p-6">
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@if ($profile->service_area)
|
||||
<x-badge tone="slate">{{ $profile->service_area }}</x-badge>
|
||||
@endif
|
||||
@if ($profile->public_contact)
|
||||
<x-badge tone="emerald">Public contact</x-badge>
|
||||
@endif
|
||||
@if ($profile->insurance_status)
|
||||
<x-badge tone="sky">{{ $profile->insurance_status }}</x-badge>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($profile->visible('bio'))
|
||||
<p class="mt-4 whitespace-pre-line text-slate-700 dark:text-slate-300">{{ $profile->bio }}</p>
|
||||
@endif
|
||||
|
||||
<dl class="mt-6 grid gap-4 md:grid-cols-2">
|
||||
<div><dt class="text-sm text-gray-500">Service area</dt><dd>{{ $profile->service_area }}</dd></div>
|
||||
<div><dt class="text-sm text-gray-500">Insurance</dt><dd>{{ $profile->insurance_status }}</dd></div>
|
||||
<div><dt class="text-sm text-gray-500">Skills</dt><dd class="whitespace-pre-line">{{ $profile->skills }}</dd></div>
|
||||
<div><dt class="text-sm text-gray-500">Tools</dt><dd class="whitespace-pre-line">{{ $profile->tools }}</dd></div>
|
||||
<div><dt class="text-sm text-gray-500">Rate card</dt><dd class="whitespace-pre-line">{{ $profile->rate_card }}</dd></div>
|
||||
<div><dt class="text-sm text-gray-500">Travel policy</dt><dd class="whitespace-pre-line">{{ $profile->travel_policy }}</dd></div>
|
||||
@if ($profile->visible('services'))
|
||||
<div>
|
||||
<dt class="text-sm text-slate-500 dark:text-slate-400">Services</dt>
|
||||
<dd class="mt-2 space-y-2">
|
||||
@forelse ($profile->services ?? [] as $service)
|
||||
<x-badge tone="sky">{{ $service['name'] }}{{ ! empty($service['level']) ? ' | '.$service['level'] : '' }}</x-badge>
|
||||
@empty
|
||||
<span class="text-sm text-slate-600 dark:text-slate-400">{{ $profile->skills }}</span>
|
||||
@endforelse
|
||||
</dd>
|
||||
</div>
|
||||
@endif
|
||||
@if ($profile->visible('tools'))
|
||||
<div>
|
||||
<dt class="text-sm text-slate-500 dark:text-slate-400">Tools</dt>
|
||||
<dd class="mt-2 space-y-2">
|
||||
@forelse ($profile->tool_inventory ?? [] as $tool)
|
||||
<x-badge tone="slate">{{ $tool['name'] }}{{ ! empty($tool['category']) ? ' | '.$tool['category'] : '' }}</x-badge>
|
||||
@empty
|
||||
<span class="whitespace-pre-line text-sm text-slate-600 dark:text-slate-400">{{ $profile->tools }}</span>
|
||||
@endforelse
|
||||
</dd>
|
||||
</div>
|
||||
@endif
|
||||
@if ($profile->visible('certifications'))
|
||||
<div>
|
||||
<dt class="text-sm text-slate-500 dark:text-slate-400">Certifications</dt>
|
||||
<dd class="mt-2 space-y-2">
|
||||
@forelse ($profile->certification_records ?? [] as $certification)
|
||||
<x-badge tone="amber">{{ $certification['name'] }}{{ ! empty($certification['issuer']) ? ' | '.$certification['issuer'] : '' }}</x-badge>
|
||||
@empty
|
||||
<span class="whitespace-pre-line text-sm text-slate-600 dark:text-slate-400">{{ $profile->certifications }}</span>
|
||||
@endforelse
|
||||
</dd>
|
||||
</div>
|
||||
@endif
|
||||
@if ($profile->visible('rate_card'))
|
||||
<div><dt class="text-sm text-slate-500 dark:text-slate-400">Rate card</dt><dd class="whitespace-pre-line text-slate-700 dark:text-slate-300">{{ $profile->rate_card }}</dd></div>
|
||||
@endif
|
||||
@if ($profile->visible('availability'))
|
||||
<div><dt class="text-sm text-slate-500 dark:text-slate-400">Travel policy</dt><dd class="whitespace-pre-line text-slate-700 dark:text-slate-300">{{ $profile->travel_policy }}</dd></div>
|
||||
<div><dt class="text-sm text-slate-500 dark:text-slate-400">Availability</dt><dd class="whitespace-pre-line text-slate-700 dark:text-slate-300">{{ $profile->availability_notes }}</dd></div>
|
||||
@endif
|
||||
</dl>
|
||||
|
||||
<x-attachments :attachments="$profile->attachments" />
|
||||
<x-rating-summary :ratings="$profile->ratings" />
|
||||
<x-rating-form type="provider_profile" :id="$profile->id" category="provider_overall" />
|
||||
</section>
|
||||
<section class="rounded border bg-white p-6">
|
||||
<h3 class="font-semibold">External profile history</h3>
|
||||
@forelse ($profile->externalImports as $import)
|
||||
<div class="mt-4 rounded border p-4">
|
||||
<p class="font-semibold">{{ $import->platform }} {{ $import->external_id ? '#'.$import->external_id : '' }}</p>
|
||||
<p class="text-sm text-gray-600">Rating: {{ $import->rating ?? 'n/a' }} | Reviews: {{ $import->review_count ?? 'n/a' }} | Completed: {{ $import->completed_jobs ?? 'n/a' }}</p>
|
||||
<p class="mt-2 whitespace-pre-line text-sm">{{ $import->notes }}</p>
|
||||
</div>
|
||||
@empty
|
||||
<p class="mt-2 text-sm text-gray-600">No external profile snapshots yet.</p>
|
||||
@endforelse
|
||||
</section>
|
||||
|
||||
@if ($profile->visible('imports'))
|
||||
<section class="tse-panel p-6">
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Imported profile and review history</h3>
|
||||
@forelse ($profile->externalImports as $import)
|
||||
<div class="mt-4 rounded-md border border-slate-200 p-4 dark:border-slate-800">
|
||||
<p class="font-semibold text-slate-950 dark:text-white">{{ $import->platform }} {{ $import->external_id ? '#'.$import->external_id : '' }}</p>
|
||||
<p class="text-sm text-slate-600 dark:text-slate-400">Rating: {{ $import->rating ?? 'n/a' }} | Reviews: {{ $import->review_count ?? 'n/a' }} | Completed: {{ $import->completed_jobs ?? 'n/a' }}</p>
|
||||
<p class="mt-2 whitespace-pre-line text-sm text-slate-700 dark:text-slate-300">{{ $import->notes }}</p>
|
||||
<x-attachments :attachments="$import->attachments" />
|
||||
</div>
|
||||
@empty
|
||||
<p class="mt-2 text-sm text-slate-600 dark:text-slate-400">No external profile snapshots yet.</p>
|
||||
@endforelse
|
||||
</section>
|
||||
@endif
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
@@ -1,13 +1,42 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header"><h2 class="text-xl font-semibold">Work Orders</h2></x-slot>
|
||||
<div class="mx-auto max-w-7xl space-y-4 p-6">
|
||||
@foreach ($orders as $order)
|
||||
<a href="{{ route('work-orders.show', $order) }}" class="block rounded border bg-white p-4 shadow-sm">
|
||||
<h3 class="font-semibold">{{ $order->jobPost->title }}</h3>
|
||||
<p class="text-sm text-gray-600">{{ $order->status }} | Buyer: {{ $order->buyer->name }} | Provider: {{ $order->provider->name }}</p>
|
||||
<x-rating-summary :ratings="$order->ratings" />
|
||||
<x-slot name="header">
|
||||
<x-page-header
|
||||
title="Work Orders"
|
||||
description="Accepted quotes become work orders with status tracking, checklists, evidence, reviews, and peer review."
|
||||
/>
|
||||
</x-slot>
|
||||
|
||||
<div class="mx-auto max-w-7xl space-y-4 px-4 py-8 sm:px-6 lg:px-8">
|
||||
@forelse ($orders as $order)
|
||||
@php($progress = $order->checklistProgress())
|
||||
<a href="{{ route('work-orders.show', $order) }}" class="tse-panel block p-5 transition hover:border-sky-300 hover:shadow-md dark:hover:border-sky-700">
|
||||
<div class="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div>
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">{{ $order->jobPost->title }}</h3>
|
||||
<p class="mt-1 text-sm text-slate-600 dark:text-slate-400">
|
||||
Buyer: {{ $order->buyer->buyerProfile?->company_name ?? $order->buyer->name }}
|
||||
| Provider: {{ $order->provider->providerProfile?->business_name ?? $order->provider->name }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2 sm:justify-end">
|
||||
<x-badge tone="sky">{{ str_replace('_', ' ', $order->status) }}</x-badge>
|
||||
<x-badge tone="slate">Checklist {{ $progress['done'] }}/{{ $progress['total'] }}</x-badge>
|
||||
</div>
|
||||
</div>
|
||||
<p class="mt-3 text-sm text-slate-600 dark:text-slate-400">
|
||||
{{ $order->scheduled_at?->format('M j, Y g:i A') ?? 'No scheduled time' }}
|
||||
@if ($order->appointment_window)
|
||||
| {{ $order->appointment_window }}
|
||||
@endif
|
||||
</p>
|
||||
</a>
|
||||
@endforeach
|
||||
@empty
|
||||
<div class="tse-panel p-8 text-center">
|
||||
<h3 class="text-base font-semibold text-slate-950 dark:text-white">No work orders yet.</h3>
|
||||
<p class="mt-2 text-sm text-slate-600 dark:text-slate-400">Accepted quotes will appear here.</p>
|
||||
</div>
|
||||
@endforelse
|
||||
|
||||
{{ $orders->links() }}
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Work Order {{ $workOrder->id }} - {{ $workOrder->jobPost->title }}</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; color: #111827; margin: 32px; }
|
||||
h1, h2 { margin-bottom: 8px; }
|
||||
section { border-top: 1px solid #d1d5db; padding-top: 16px; margin-top: 20px; }
|
||||
.muted { color: #4b5563; }
|
||||
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
|
||||
.box { border: 1px solid #d1d5db; padding: 12px; border-radius: 6px; }
|
||||
ul { padding-left: 20px; }
|
||||
@media print {
|
||||
body { margin: 18mm; }
|
||||
button { display: none; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<button onclick="window.print()">Print</button>
|
||||
<h1>{{ $workOrder->jobPost->title }}</h1>
|
||||
<p class="muted">Work Order #{{ $workOrder->id }} | {{ str_replace('_', ' ', $workOrder->status) }}</p>
|
||||
|
||||
<section class="grid">
|
||||
<div class="box">
|
||||
<h2>Buyer</h2>
|
||||
<p>{{ $workOrder->buyer->buyerProfile?->company_name ?? $workOrder->buyer->name }}</p>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h2>Provider</h2>
|
||||
<p>{{ $workOrder->provider->providerProfile?->business_name ?? $workOrder->provider->name }}</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Schedule</h2>
|
||||
<p>{{ $workOrder->scheduled_at?->format('M j, Y g:i A') ?? 'Not set' }} | {{ $workOrder->appointment_window ?: 'No window set' }}</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Agreed Terms</h2>
|
||||
<p>{!! nl2br(e($workOrder->agreed_terms ?: 'No agreed terms recorded.')) !!}</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Checklist</h2>
|
||||
<ul>
|
||||
@forelse ($workOrder->checklistItems() as $item)
|
||||
<li>{{ (bool) ($workOrder->checklistCompleted()[$item] ?? false) ? '[x]' : '[ ]' }} {{ $item }}</li>
|
||||
@empty
|
||||
<li>No checklist items recorded.</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Required Evidence</h2>
|
||||
<p>{!! nl2br(e($workOrder->required_evidence ?: 'No required evidence recorded.')) !!}</p>
|
||||
@if (is_array($workOrder->evidence_rules) && $workOrder->evidence_rules)
|
||||
<ul>
|
||||
@foreach ($workOrder->evidence_rules as $rule)
|
||||
<li>{{ $rule }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Attachments</h2>
|
||||
<ul>
|
||||
@forelse ($workOrder->attachments as $attachment)
|
||||
<li>{{ $attachment->original_name }} | {{ $attachment->kind }} | {{ $attachment->formattedSize() }}</li>
|
||||
@empty
|
||||
<li>No attachments recorded.</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,64 +1,200 @@
|
||||
@php
|
||||
$progress = $workOrder->checklistProgress();
|
||||
$completed = $workOrder->checklistCompleted();
|
||||
$evidenceRules = is_array($workOrder->evidence_rules) ? $workOrder->evidence_rules : [];
|
||||
@endphp
|
||||
|
||||
<x-app-layout>
|
||||
<x-slot name="header"><h2 class="text-xl font-semibold">Work Order: {{ $workOrder->jobPost->title }}</h2></x-slot>
|
||||
<div class="mx-auto max-w-6xl space-y-6 p-6">
|
||||
<section class="rounded border bg-white p-6">
|
||||
<p class="text-sm text-gray-500">Status: {{ $workOrder->status }}</p>
|
||||
<p class="mt-4 whitespace-pre-line">{{ $workOrder->agreed_terms }}</p>
|
||||
<h3 class="mt-6 font-semibold">Deliverables</h3>
|
||||
<p class="mt-2 whitespace-pre-line">{{ $workOrder->deliverables_checklist }}</p>
|
||||
<x-attachments :attachments="$workOrder->attachments" />
|
||||
<x-rating-summary :ratings="$workOrder->ratings" />
|
||||
<x-rating-form type="work_order" :id="$workOrder->id" category="work_order_outcome" mode="thumbs" />
|
||||
<x-attachment-form type="work_order" :id="$workOrder->id" kind="work_order" />
|
||||
<form method="POST" action="{{ route('work-orders.transition', $workOrder) }}" class="mt-6 space-y-4">
|
||||
@csrf @method('PATCH')
|
||||
<label class="block text-sm font-medium">Update status</label>
|
||||
<select name="status" class="rounded-md border-gray-300">
|
||||
@foreach (\App\Models\WorkOrder::ALLOWED_TRANSITIONS[$workOrder->status] ?? [] as $status)
|
||||
<option value="{{ $status }}" @selected($workOrder->status === $status)>{{ str_replace('_', ' ', $status) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<x-field name="completion_notes" label="Completion notes" :value="$workOrder->completion_notes" textarea />
|
||||
<x-slot name="header">
|
||||
<x-page-header
|
||||
title="Work Order: {{ $workOrder->jobPost->title }}"
|
||||
description="Operational record for the accepted quote, status trail, checklist, evidence, messages, reviews, and peer review."
|
||||
>
|
||||
<a href="{{ route('work-orders.print', $workOrder) }}" target="_blank" class="rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-semibold text-slate-700 shadow-sm hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800">Print packet</a>
|
||||
</x-page-header>
|
||||
</x-slot>
|
||||
|
||||
<div class="mx-auto max-w-6xl space-y-6 px-4 py-8 sm:px-6 lg:px-8">
|
||||
<section class="tse-panel p-6">
|
||||
<div class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div>
|
||||
<x-badge tone="sky">{{ str_replace('_', ' ', $workOrder->status) }}</x-badge>
|
||||
<p class="mt-3 text-sm text-slate-600 dark:text-slate-400">
|
||||
Buyer: {{ $workOrder->buyer->buyerProfile?->company_name ?? $workOrder->buyer->name }}
|
||||
| Provider: {{ $workOrder->provider->providerProfile?->business_name ?? $workOrder->provider->name }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="text-sm text-slate-600 dark:text-slate-400 sm:text-right">
|
||||
<p>Scheduled: {{ $workOrder->scheduled_at?->format('M j, Y g:i A') ?? 'Not set' }}</p>
|
||||
<p>Window: {{ $workOrder->appointment_window ?: 'Not set' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 grid gap-4 md:grid-cols-3">
|
||||
<x-stat-card label="Checklist" :value="$progress['done'].'/'.$progress['total']" description="Completed deliverables" />
|
||||
<x-stat-card label="Attachments" :value="$workOrder->attachments->count()" description="Evidence and files" />
|
||||
<x-stat-card label="Changes" :value="count($workOrder->changeRequests())" description="Requested scope changes" />
|
||||
</div>
|
||||
|
||||
<div class="mt-6 grid gap-6 lg:grid-cols-[1.1fr_.9fr]">
|
||||
<div>
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Agreed terms</h3>
|
||||
<p class="mt-2 whitespace-pre-line text-sm leading-6 text-slate-700 dark:text-slate-300">{{ $workOrder->agreed_terms ?: 'No agreed terms recorded.' }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Required evidence</h3>
|
||||
<p class="mt-2 whitespace-pre-line text-sm leading-6 text-slate-700 dark:text-slate-300">{{ $workOrder->required_evidence ?: 'No specific evidence requirements recorded.' }}</p>
|
||||
@if ($evidenceRules)
|
||||
<div class="mt-3 flex flex-wrap gap-2">
|
||||
@foreach ($evidenceRules as $rule)
|
||||
<x-badge tone="amber">{{ $rule }}</x-badge>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@if (auth()->id() === $workOrder->buyer_id || auth()->user()->hasRole('admin'))
|
||||
<section class="tse-panel p-6">
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Work-order setup</h3>
|
||||
<form method="POST" action="{{ route('work-orders.details', $workOrder) }}" class="mt-4 grid gap-4">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<div class="grid gap-4 md:grid-cols-2">
|
||||
<x-field name="scheduled_at" label="Scheduled date/time" type="datetime-local" :value="$workOrder->scheduled_at?->format('Y-m-d\\TH:i')" />
|
||||
<x-field name="appointment_window" label="Appointment window" :value="$workOrder->appointment_window" />
|
||||
</div>
|
||||
<x-field name="agreed_terms" label="Agreed terms" :value="$workOrder->agreed_terms" textarea />
|
||||
<x-field name="deliverables_checklist" label="Checklist items, one per line" :value="$workOrder->deliverables_checklist" textarea />
|
||||
<x-field name="required_evidence" label="Required evidence" :value="$workOrder->required_evidence" textarea />
|
||||
<div class="grid gap-3 md:grid-cols-3">
|
||||
@foreach (['Arrival photo', 'Completion photo', 'Signed closeout'] as $rule)
|
||||
<label class="inline-flex items-center gap-2 rounded-md border border-slate-200 px-3 py-2 text-sm text-slate-700 dark:border-slate-800 dark:text-slate-300">
|
||||
<input type="checkbox" name="evidence_rules[]" value="{{ $rule }}" @checked(in_array($rule, $evidenceRules, true)) class="rounded border-slate-300 text-sky-600 shadow-sm focus:ring-sky-500 dark:border-slate-700 dark:bg-slate-950">
|
||||
{{ $rule }}
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
<x-primary-button>Save setup</x-primary-button>
|
||||
</form>
|
||||
</section>
|
||||
@endif
|
||||
|
||||
<section class="tse-panel p-6">
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Checklist and status</h3>
|
||||
<form method="POST" action="{{ route('work-orders.transition', $workOrder) }}" class="mt-4 space-y-4">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<div class="grid gap-4 md:grid-cols-[.6fr_1.4fr]">
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-slate-800 dark:text-slate-200">Update status</label>
|
||||
<select name="status" class="mt-1 block w-full rounded-md border-slate-300 bg-white text-slate-950 shadow-sm focus:border-sky-500 focus:ring-sky-500 dark:border-slate-700 dark:bg-slate-950 dark:text-slate-100">
|
||||
@foreach (\App\Models\WorkOrder::ALLOWED_TRANSITIONS[$workOrder->status] ?? [] as $status)
|
||||
<option value="{{ $status }}">{{ str_replace('_', ' ', $status) }}</option>
|
||||
@endforeach
|
||||
@if (empty(\App\Models\WorkOrder::ALLOWED_TRANSITIONS[$workOrder->status] ?? []))
|
||||
<option value="{{ $workOrder->status }}">{{ str_replace('_', ' ', $workOrder->status) }}</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
<x-field name="completion_notes" label="Completion notes" :value="$workOrder->completion_notes" textarea />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-3 md:grid-cols-2">
|
||||
@forelse ($workOrder->checklistItems() as $item)
|
||||
<label class="flex items-start gap-3 rounded-md border border-slate-200 p-3 text-sm dark:border-slate-800">
|
||||
<input type="checkbox" name="checklist_completed[{{ $item }}]" value="1" @checked((bool) ($completed[$item] ?? false)) class="mt-1 rounded border-slate-300 text-sky-600 shadow-sm focus:ring-sky-500 dark:border-slate-700 dark:bg-slate-950">
|
||||
<span class="text-slate-700 dark:text-slate-300">{{ $item }}</span>
|
||||
</label>
|
||||
@empty
|
||||
<p class="text-sm text-slate-600 dark:text-slate-400">No checklist items have been defined yet.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
<x-primary-button>Save status</x-primary-button>
|
||||
</form>
|
||||
</section>
|
||||
<section class="rounded border bg-white p-6">
|
||||
<h3 class="font-semibold">Messages</h3>
|
||||
|
||||
<section class="tse-panel p-6">
|
||||
<div class="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between">
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Evidence and files</h3>
|
||||
<p class="text-sm text-slate-500 dark:text-slate-400">Attach photos, closeout forms, notes, screenshots, or other work evidence.</p>
|
||||
</div>
|
||||
<x-attachments :attachments="$workOrder->attachments" />
|
||||
<x-attachment-form type="work_order" :id="$workOrder->id" kind="work_order" />
|
||||
</section>
|
||||
|
||||
<section class="tse-panel p-6">
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Change requests</h3>
|
||||
<form method="POST" action="{{ route('work-orders.change-requests', $workOrder) }}" class="mt-4 space-y-4">
|
||||
@csrf
|
||||
<x-field name="summary" label="Summary" />
|
||||
<x-field name="details" label="Details" textarea />
|
||||
<x-secondary-button type="submit">Record change request</x-secondary-button>
|
||||
</form>
|
||||
<div class="mt-4 space-y-3">
|
||||
@forelse ($workOrder->changeRequests() as $requestRecord)
|
||||
<div class="rounded-md border border-slate-200 p-4 text-sm dark:border-slate-800">
|
||||
<p class="font-semibold text-slate-950 dark:text-white">{{ $requestRecord['summary'] }}</p>
|
||||
<p class="mt-1 text-slate-500 dark:text-slate-400">{{ $requestRecord['requested_by_name'] ?? 'User' }} | {{ $requestRecord['status'] ?? 'open' }} | {{ $requestRecord['requested_at'] ?? '' }}</p>
|
||||
@if (! empty($requestRecord['details']))
|
||||
<p class="mt-2 whitespace-pre-line text-slate-700 dark:text-slate-300">{{ $requestRecord['details'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
@empty
|
||||
<p class="text-sm text-slate-600 dark:text-slate-400">No change requests yet.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="tse-panel p-6">
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Messages</h3>
|
||||
<form method="POST" action="{{ route('work-order-messages.store', $workOrder) }}" class="mt-4 space-y-4">
|
||||
@csrf
|
||||
<x-field name="body" label="Message" textarea />
|
||||
<x-primary-button>Send message</x-primary-button>
|
||||
</form>
|
||||
@foreach ($workOrder->messages as $message)
|
||||
<div class="mt-3 rounded bg-gray-50 p-3 text-sm">
|
||||
<p class="font-semibold">{{ $message->user->name }} | {{ $message->created_at->diffForHumans() }}</p>
|
||||
<p class="whitespace-pre-line">{{ $message->body }}</p>
|
||||
<div class="mt-3 rounded-md bg-slate-50 p-3 text-sm dark:bg-slate-950">
|
||||
<p class="font-semibold text-slate-950 dark:text-white">{{ $message->user->name }} | {{ $message->created_at->diffForHumans() }}</p>
|
||||
<p class="whitespace-pre-line text-slate-700 dark:text-slate-300">{{ $message->body }}</p>
|
||||
</div>
|
||||
@endforeach
|
||||
</section>
|
||||
<section class="rounded border bg-white p-6">
|
||||
<h3 class="font-semibold">Reviews</h3>
|
||||
|
||||
<section class="tse-panel p-6">
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Reviews</h3>
|
||||
<form method="POST" action="{{ route('reviews.store', $workOrder) }}" class="mt-4 space-y-4">
|
||||
@csrf
|
||||
<x-field name="rating" label="Rating 1-5" type="number" />
|
||||
<x-field name="communication_rating" label="Communication 1-5" type="number" />
|
||||
<x-field name="scope_accuracy_rating" label="Scope accuracy 1-5" type="number" />
|
||||
<x-field name="payment_reliability_rating" label="Payment reliability 1-5" type="number" />
|
||||
<x-field name="workmanship_rating" label="Workmanship 1-5" type="number" />
|
||||
<x-field name="timeliness_rating" label="Timeliness 1-5" type="number" />
|
||||
<div class="grid gap-4 md:grid-cols-3">
|
||||
<x-field name="rating" label="Rating 1-5" type="number" />
|
||||
<x-field name="communication_rating" label="Communication 1-5" type="number" />
|
||||
<x-field name="scope_accuracy_rating" label="Scope accuracy 1-5" type="number" />
|
||||
<x-field name="payment_reliability_rating" label="Payment reliability 1-5" type="number" />
|
||||
<x-field name="workmanship_rating" label="Workmanship 1-5" type="number" />
|
||||
<x-field name="timeliness_rating" label="Timeliness 1-5" type="number" />
|
||||
</div>
|
||||
<x-field name="body" label="Review" textarea />
|
||||
<x-primary-button>Save review</x-primary-button>
|
||||
</form>
|
||||
@foreach ($workOrder->reviews as $review)
|
||||
<div class="mt-4 rounded border p-4 text-sm">
|
||||
<p class="font-semibold">{{ $review->reviewer->name }} rated {{ $review->reviewee->name }} {{ $review->rating }}/5</p>
|
||||
<p class="mt-1 text-gray-600">Communication {{ $review->communication_rating ?? 'n/a' }} | Scope {{ $review->scope_accuracy_rating ?? 'n/a' }} | Payment {{ $review->payment_reliability_rating ?? 'n/a' }} | Workmanship {{ $review->workmanship_rating ?? 'n/a' }} | Timeliness {{ $review->timeliness_rating ?? 'n/a' }}</p>
|
||||
<p class="mt-2 whitespace-pre-line">{{ $review->body }}</p>
|
||||
<div class="mt-4 rounded-md border border-slate-200 p-4 text-sm dark:border-slate-800">
|
||||
<p class="font-semibold text-slate-950 dark:text-white">{{ $review->reviewer->name }} rated {{ $review->reviewee->name }} {{ $review->rating }}/5</p>
|
||||
<p class="mt-1 text-slate-600 dark:text-slate-400">Communication {{ $review->communication_rating ?? 'n/a' }} | Scope {{ $review->scope_accuracy_rating ?? 'n/a' }} | Payment {{ $review->payment_reliability_rating ?? 'n/a' }} | Workmanship {{ $review->workmanship_rating ?? 'n/a' }} | Timeliness {{ $review->timeliness_rating ?? 'n/a' }}</p>
|
||||
<p class="mt-2 whitespace-pre-line text-slate-700 dark:text-slate-300">{{ $review->body }}</p>
|
||||
</div>
|
||||
@endforeach
|
||||
</section>
|
||||
<section class="rounded border bg-white p-6">
|
||||
<h3 class="font-semibold">Disputes / Peer Review</h3>
|
||||
|
||||
<section class="tse-panel p-6">
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Community rating</h3>
|
||||
<x-rating-summary :ratings="$workOrder->ratings" />
|
||||
<x-rating-form type="work_order" :id="$workOrder->id" category="work_order_outcome" mode="thumbs" />
|
||||
</section>
|
||||
|
||||
<section class="tse-panel p-6">
|
||||
<h3 class="font-semibold text-slate-950 dark:text-white">Disputes / Peer Review</h3>
|
||||
<form method="POST" action="{{ route('disputes.store', $workOrder) }}" class="mt-4 space-y-4">
|
||||
@csrf
|
||||
<x-field name="summary" label="Summary" />
|
||||
@@ -67,8 +203,8 @@
|
||||
<x-primary-button>Open dispute</x-primary-button>
|
||||
</form>
|
||||
@foreach ($workOrder->disputes as $dispute)
|
||||
<a href="{{ route('disputes.show', $dispute) }}" class="mt-4 block rounded border p-4 text-sm">
|
||||
<span class="font-semibold">{{ $dispute->summary }}</span> | {{ $dispute->status }}
|
||||
<a href="{{ route('disputes.show', $dispute) }}" class="mt-4 block rounded-md border border-slate-200 p-4 text-sm dark:border-slate-800">
|
||||
<span class="font-semibold text-slate-950 dark:text-white">{{ $dispute->summary }}</span> | {{ $dispute->status }}
|
||||
</a>
|
||||
@endforeach
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user