@extends('layouts.demo10.base') @php $projectStatus = strtolower($currentProject->status ?? 'active'); $projectDescription = filled($currentProject->description) ? $currentProject->description : 'N/A'; $createdDate = optional($currentProject->created_at)->format('F, d, Y') ?? 'N/A'; $updatedDate = optional($currentProject->updated_at)->format('F, d, Y') ?? 'N/A'; $schemaDesignUrl = route('tenants.projects.schema_design', ['projectName' => $currentProject->slug]) . '?tenant_id=' . $currentProject->id; $projectImportUrl = route('tenants.projects.import', ['projectName' => $currentProject->slug]); $dataSourceType = strtolower($dataSourceConnection->source_type ?? 'odk'); $dataSourceUpdatedDate = optional($dataSourceConnection?->updated_at)->format('F, d, Y') ?? 'N/A'; $dataSourceStatus = strtolower($dataSourceConnection->status ?? 'inactive'); $dataSourceUsesToken = (bool) data_get($dataSourceConnection?->settings, 'use_auth_token', false); $dataSourceColspan = $dataSourceType === 'csv' ? 6 : 7; $groupedPiiAttributes = collect($attributes ?? [])->groupBy('table'); $dataSourceConfig = [ 'id' => $dataSourceConnection?->id, 'type' => $dataSourceType, 'base_url' => $dataSourceConnection?->base_url, 'project_id' => $dataSourceConnection?->project_id, 'form_id' => $dataSourceConnection?->form_id, 'username' => $dataSourceConnection?->username, 'file_name' => $dataSourceConnection?->file_name, 'file_path' => $dataSourceConnection?->file_path, 'use_auth_token' => $dataSourceUsesToken, ]; @endphp @section('content')

Projects Settings

Project/{{ $currentProject->name }}/Settings
{{--
--}}
{{--
@can('edit.projects') @else @endcan
--}}

General Information

Project Name Project Description Status Start Date Last Modified
{{ $currentProject->name }} {{ $projectDescription }} {{ $projectStatus === 'active' ? 'Active' : 'Inactive' }} {{ $createdDate }} {{ $updatedDate }}
@can('edit.projects') @else @endcan

{{ $dataSourceType === 'api' ? 'API Connection Information' : ($dataSourceType === 'csv' ? 'CSV File Information' : 'ODK Connection Information') }}

@if($dataSourceType === 'api') @elseif($dataSourceType === 'csv') @else @endif @if($dataSourceConnection) @if($dataSourceType === 'api') @elseif($dataSourceType === 'csv') @else @endif @else @endif
API Name URL Auth Username Last Date Status
File Name File Path Source Last Date Status
Server Project ID Form ID Auth Last Date Status
{{ $dataSourceConnection->name ?: 'API Data Source' }} {{ $dataSourceConnection->base_url ?: '--' }} {{ $dataSourceUsesToken ? 'Token' : 'Basic' }} {{ $dataSourceUsesToken ? 'Token Enabled' : ($dataSourceConnection->username ?: '--') }} {{ $dataSourceUpdatedDate }} {{ ucfirst($dataSourceConnection->status ?? 'Configured') }}
{{ $dataSourceConnection->file_name ?: 'CSV File' }} {{ $dataSourceConnection->file_path ?: '--' }} {{ strtoupper($dataSourceType) }} {{ $dataSourceUpdatedDate }} {{ ucfirst($dataSourceConnection->status ?? 'Configured') }}
{{ $dataSourceConnection->base_url ?: '--' }} {{ $dataSourceConnection->project_id ?: '--' }} {{ $dataSourceConnection->form_id ?: '--' }} {{ $dataSourceUsesToken ? 'Token' : 'Basic' }} {{ $dataSourceUpdatedDate }} {{ ucfirst($dataSourceConnection->status ?? 'Configured') }}
No data source configured yet.

Schema Design Information

@forelse($schemaHistories as $schemaHistory) @php $latestSchemaImport = $importHistories ->where('schema_history_id', $schemaHistory->id) ->sortByDesc('created_at') ->first(); $schemaFileName = filled($schemaHistory->schema_file) ? basename((string) $schemaHistory->schema_file) : 'N/A'; $generatedBy = $schemaHistory->user?->name ?? $latestSchemaImport?->user?->name ?? 'N/A'; $generatedAt = optional($schemaHistory->created_at)->format('F, d, Y') ?? 'N/A'; @endphp @empty @endforelse
Schema File Generated By Generated At
{{ $schemaFileName }} {{ $generatedBy }} {{ $generatedAt }}
No schema generated yet.
@can('process.import') @endcan

Import Information

@forelse($importHistories as $history) @php $importStatus = strtolower($history->status ?? 'failed'); $isImportSuccess = $importStatus === 'success'; @endphp @empty @endforelse
Imported By Imported Date Total Records Form ID Status
{{ $history->user?->name ?? 'N/A' }} {{ optional($history->created_at)->format('F, d, Y') ?? 'N/A' }} {{ $history->total_imported ?? 'N/A' }} {{ $history->odkConnection?->form_id ?? 'N/A' }} {{ ucfirst($importStatus) }}
No import history available yet.

PII Management

@can('view.pii_management')
@if($groupedPiiAttributes->isNotEmpty())
@foreach($groupedPiiAttributes as $tableName => $tableAttributes) @php $tableSlug = \Illuminate\Support\Str::slug($tableName); @endphp
{{ $tableName }}
@foreach($tableAttributes as $index => $attribute) @endforeach
@endforeach
@can('edit.pii_management')
@endcan @else
No dataset attributes found in the connected database.
@endif
@else
You do not have permission to view PII Management.
@endcan
@can('create.cron_scheduler') @endcan

Cron Scheduler

@canany(['edit.cron_scheduler', 'delete.cron_scheduler', 'run.cron_scheduler', 'toggle.cron_scheduler']) @endcanany @forelse($cronSchedules as $schedule) @canany(['edit.cron_scheduler', 'delete.cron_scheduler', 'run.cron_scheduler', 'toggle.cron_scheduler']) @endcanany @empty @endforelse
Schedule Name ODK Connection Frequency Time Last Run Next Run StatusActions
{{ $schedule->name ?: '--' }}
{{ $schedule->odkConnection?->form_id ?: 'N/A' }} {{ $schedule->odkConnection?->base_url ?: '' }}
{{ ucfirst($schedule->frequency ?: '--') }} @if($schedule->frequency === 'weekly' && $schedule->day_of_week) {{ ucfirst($schedule->day_of_week) }} @endif @if($schedule->frequency === 'monthly' && $schedule->day_of_month) Day {{ $schedule->day_of_month }} @endif {{ $schedule->time ?: '--' }} {{ $schedule->last_run_at ? $schedule->last_run_at->format('M d, Y H:i') : 'Never' }} {{ $schedule->next_run_at ? $schedule->next_run_at->format('M d, Y H:i') : 'N/A' }} {{ $schedule->is_active ? 'Active' : 'Inactive' }}
@can('toggle.cron_scheduler') @endcan @can('run.cron_scheduler') @endcan @can('edit.cron_scheduler') @endcan @can('delete.cron_scheduler') @endcan
No cron schedules configured yet.
@can('delete.view_data') @endcan @can('edit.view_data') @endcan

View Data

@can('edit.projects')

Edit Project

@csrf

Add Projects

Edit Data Source

@csrf

ODK Central Connection

Projects/{{ $currentProject->name }}/Data Source/ODK Connection

@can('create.cron_scheduler')

Add Cron Schedule

@csrf
@endcan @can('edit.cron_scheduler')

Edit Cron Schedule

@csrf
@endcan @canany(['run.cron_scheduler', 'process.import'])

Running Import

Please wait, we are importing data from ODK Central.

@endcanany @endcan @endsection @section('scripts') @vite('resources/js/pages/project-settings.js') @endsection