106 lines
5.5 KiB
PHP
106 lines
5.5 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
|
|
{{ __('project.Project') }} {{ $project->name }} ({{ $project->project_number }})
|
|
</h2>
|
|
</x-slot>
|
|
|
|
<div class="py-12">
|
|
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">
|
|
|
|
<!-- Customer -->
|
|
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
|
<div class="max-w">
|
|
<section>
|
|
<header>
|
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
|
{{ __('customer.Customer') }}
|
|
</h2>
|
|
<div class="mt-4">
|
|
<div>{{ $project->customer->name }}</div>
|
|
<div>{{ $project->customer->email }}</div>
|
|
</div>
|
|
</header>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Project data -->
|
|
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
|
<div class="max-w">
|
|
<section>
|
|
<header>
|
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
|
{{ __('project.Project data') }}
|
|
</h2>
|
|
<div class="mt-4">
|
|
<div class="grid grid-cols-[20%_80%] gap-2">
|
|
<x-input-label for="name" :value="__('common.Name')"/>
|
|
<div>{{ $project->name }}</div>
|
|
|
|
<x-input-label for="project_number" :value="__('project.Project Number')"/>
|
|
<div>{{ $project->project_number }}</div>
|
|
|
|
<x-input-label for="description" :value="__('invoice.Description')"/>
|
|
<div>{{ $project->description }}</div>
|
|
|
|
<x-input-label for="start_date" :value="__('project.Start date')"/>
|
|
<div>{{ $project->start }}</div>
|
|
|
|
<x-input-label for="end_date" :value="__('project.End date')"/>
|
|
<div>{{ $project->end }}</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Invoices -->
|
|
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
|
<div class="max-w">
|
|
<section>
|
|
<header>
|
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
|
{{ __('invoice.Invoices') }}
|
|
</h2>
|
|
<summary class="cursor-pointer flex flex-row w-full mt-4">
|
|
<div class="w-1/6 font-bold border-b-2">{{ __('invoice.Invoice Number') }}</div>
|
|
<div class="w-1/3 font-bold border-b-2">{{ __('customer.Customer') }}</div>
|
|
<div class="w-1/4 font-bold border-b-2">{{ __('common.Name') }}</div>
|
|
<div class="w-1/12 font-bold border-b-2">{{ __('invoice.State') }}</div>
|
|
<div class="w-1/12 font-bold border-b-2 text-right">{{ __('invoice.Sum') }}</div>
|
|
<div class="w-1/12 font-bold border-b-2 text-right">{{ __('common.Created at') }}</div>
|
|
</summary>
|
|
|
|
@foreach($project->invoices as $invoice)
|
|
<details class="even:bg-gray-100 odd:bg-white hover:bg-gray-400">
|
|
<summary class="cursor-pointer flex flex-row w-full"
|
|
@click="window.location.href='/invoice/' + invoice.id;">
|
|
<div class="w-1/6">{{ $invoice->number }}</div>
|
|
<div class="w-1/3">{{ $invoice->customer->name }}</div>
|
|
<div class="w-1/4">{{ $invoice->address->name }}</div>
|
|
<div class="w-1/12">{{ $invoice->localized_state }}</div>
|
|
<div class="w-1/12 text-right">{{ \Illuminate\Support\Number::currency($invoice->sum) }}</div>
|
|
<div class="w-1/12 text-right">{{ $invoice->created }}</div>
|
|
</summary>
|
|
</details>
|
|
@endforeach
|
|
</header>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
|
<div class="max-w">
|
|
<div class="flex flex-row items-end gap-2 w-full">
|
|
<x-primary-button onclick="window.location.href = '{{ route('project.edit', $project->id) }}'">
|
|
<x-edit-icon class="mr-4"/>{{ __('form.Edit') }}</x-primary-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|