@extends('layouts.app') @section('title', '조직도') @section('page-title', '조직도') @section('top-actions') @endsection @section('content')
{{ now()->format('Y년 m월 d일') }}(총{{ $totalEmployees }}명)
@foreach($tree as $root)
{{ $root->name }}
@foreach($root->employees as $emp)
{{ $emp->job_title }} {{ $emp->name }} {{ $emp->phone }} @if($emp->phone) @endif
@endforeach
@if($root->childrenRecursive->isNotEmpty())
@php $children = $root->childrenRecursive; @endphp
@foreach($children as $child)
{{ $child->name }}
@foreach($child->employees as $emp)
{{ $emp->job_title }} {{ $emp->name }} {{ $emp->phone }} @if($emp->phone) @endif
@endforeach @if($child->employees->isEmpty())
직원 없음
@endif
@endforeach
@endif
@endforeach
@endsection