@extends('layouts.app') @section('content') @php $isEdit = isset($album) && $album->exists; $formAction = $isEdit ? route('albums.update', $album->id) : route('albums.store'); $pageTitle = $isEdit ? 'Edit Album' : 'Add Album'; @endphp
Secret Chord Analogue

{{ $pageTitle }}

Catalogue your records with edition details, digitised-copy notes, played-age estimation, and treatment history.
@if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
Please correct the following:
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf @if($isEdit) @method('PUT') @endif
Album Details
Played Age
{{ old('acquired_on') ? 'Derived from ' . \Carbon\Carbon::parse(old('acquired_on'))->diffInYears(now()) . ' ' . \Illuminate\Support\Str::plural('year', \Carbon\Carbon::parse(old('acquired_on'))->diffInYears(now())) . ' ownership' : ($album->ownership_years_label ?? 'Derived from 0 years ownership') }}
Estimate rules: Frequently = 4 plays per month, Now and again = 1 play per month, Infrequently = 1 play per year. The estimate may be edited, and Total Play Count may also be edited directly.
Format & Storage
Digitised Copy
Actions
Cancel
@if($isEdit)
Record Treatments
@if(!is_null($album->plays_since_last_treatment))
Plays since last treatment: {{ $album->plays_since_last_treatment }}
@endif
@forelse($album->treatments as $treatment) @empty @endforelse
Date Treatment Type Notes Plays Since Action
{{ $treatment->treated_on?->format('Y-m-d') }} {{ $treatment->treatment_type }} {{ $treatment->notes }} {{ $album->playLogs->filter(fn ($playLog) => $playLog->played_at && $playLog->played_at->greaterThanOrEqualTo($treatment->treated_on))->count() }}
@csrf @method('DELETE')
No treatment history recorded yet.
Add Treatment
@csrf
Consumption is calculated from record size: 12" = 7.0 ml, 10" = 5.5 ml, 7" = 2.3 ml.
@endif
@endsection