@extends('layouts.main') @section('title', 'My Workspaces - Prolytics Connect') @section('styles') @endsection @section('content')
@auth @if (Auth::user()->hasRole('company') || Auth::user()->hasRole('company-user'))
@if (auth()->user()->hasRole('company-user'))

My Workspaces

@elseif(auth()->user()->hasRole('company'))

Company Workspaces

@else

My Workspaces

@endif

@if (auth()->user()->hasRole('company')) Manage workspaces for {{ auth()->user()->company ?? 'your company' }} @else Manage your data workspaces and pipelines @endif

@endif @endauth @auth @if (Auth::user()->hasRole('company') || Auth::user()->hasRole('company-user')) @if (isset($isStorageFull) && $isStorageFull) @elseif(isset($storageUsagePercentage) && $storageUsagePercentage >= 90) @elseif(isset($storageUsagePercentage) && $storageUsagePercentage >= 80) @endif @endif @endauth
@if ($assignedWorkspaces->count() > 0) @php $avatarColors = ['emerald', 'cyan', 'violet', 'amber', 'rose']; @endphp @foreach ($assignedWorkspaces as $wsIndex => $workspace) @php $avatarColor = $avatarColors[$wsIndex % count($avatarColors)]; @endphp
{{ strtoupper(substr($workspace->name, 0, 1)) }}

Workspace: {{ $workspace->name }} @if($workspace->hasAssignedLakehouse()) ({{ $workspace->lakehouse_name }}) @endif

@if (auth()->user()->hasRole('company') && $workspace->user_id != auth()->user()->id) Owner: {{ $workspace->user->name }} ({{ $workspace->user->email }}) @endif
@if ($workspace->workspaceItems->count() > 0)
@foreach ($workspace->workspaceItems as $index => $item) @php $item_overall_status = isset($item->overall_status) ? \App\Helpers\ApiHelper::mapActivityRunStatus($item->overall_status) : 'No Data'; $statusClass = match ($item_overall_status) { 'Success' => 'success', 'Running' => 'running', 'Failed' => 'failed', 'Queued' => 'queued', default => 'no-data', }; $pipelineId = 'pipeline-' . $workspace->id . '-' . $item->id; $collapseId = 'collapse' . $workspace->id . '_' . $item->id; @endphp
{{ ucfirst($item->type) }}: {{ $item->name }} {{ $item_overall_status }}
@endforeach
@else

No items assigned to this workspace yet.

Create a pipeline to get started.

@endif
@endforeach @else

No Workspaces Assigned

You don't have any workspaces assigned to your account yet.

Contact your administrator to get workspace access.

@endif
@endsection @section('scripts') @endsection @section('modals')