@extends('layouts.app') @section('title', isset($service) ? 'Edit Site' : 'Create Site') @section('content')
@if(isset($service)) Edit Site @else Add New Site @endif
Back to List
@csrf @if(isset($service)) @method('PUT') @endif
Site Information

Basic site details and configuration. This site can support multiple service types.

@if(isset($service)) @endif @error('client_id')

{{ $message }}

@enderror
@error('service_name')

{{ $message }}

@enderror
@error('location_id')

{{ $message }}

@enderror
@error('is_active')

{{ $message }}

@enderror
@error('zone_area')

{{ $message }}

@enderror
@error('description')

{{ $message }}

@enderror
Service Types & Employee Assignments

Add multiple service types for this site and assign employees to each service type.

Service Type Management
  • Add multiple service types (Security, Cleaning, Maintenance) to a single site
  • Assign different employees to each service type with specific roles
  • Set date ranges and availability for each assignment
  • Manage assignments independently for each service type
@if(isset($service) && $service->serviceTypes->count() > 0) @foreach($service->serviceTypes as $index => $serviceType)
{{ ucfirst($serviceType->type) }} Services

Manage employees and assignments for this service type

{{ $service->employeeAssignments->where('service_type_id', $serviceType->id)->count() }} Employees
Service Capabilities
@php $capabilities = [ 'security' => ['Geofencing', 'Incident Logging', 'Scheduling', 'Guard Assignment', 'Reporting'], 'cleaning' => ['Task Scheduling', 'Task Tracking', 'Reporting', 'Inventory', 'Time Tracking'], 'maintenance' => ['Work Orders', 'Maintenance Logging', 'Task Scheduling', 'Reporting', 'Time Tracking'] ]; $typeCapabilities = $capabilities[$serviceType->type] ?? []; @endphp @foreach($typeCapabilities as $capability)
{{ $capability }}
@endforeach
Employee Assignments
@php $assignmentsForServiceType = $service->employeeAssignments->where('service_type_id', $serviceType->id); @endphp @foreach($assignmentsForServiceType as $empIndex => $assignment)
{{ $assignment->employee->full_name ?? 'Unknown Employee' }} ({{ ucfirst($assignment->assignment_type) }})
@endforeach
@if($service->employeeAssignments->where('service_type_id', $serviceType->id)->count() === 0)

No employees assigned. Click "Add Employee" to get started.

@endif
@endforeach @endif
@if(!isset($service) || $service->serviceTypes->count() === 0)

No service types added yet. Click "Add Service Type" to get started.

@endif
Cancel
@endsection