Invoicing Feature Complete #8

Merged
okorpheus merged 7 commits from invoicing into master 2024-06-29 15:27:15 +00:00
5 changed files with 36 additions and 63 deletions
Showing only changes of commit b57187663c - Show all commits

View File

@ -24,7 +24,6 @@
<x-layout.page-section>
<x-slot:section_name>Scoring Settings</x-slot:section_name>
<x-slot:section_description>If students cannot advance to further honor groups, leave next event name blank</x-slot:section_description>
<x-form.body-grid columns="12" class="m-3">
<div class="col-span-6 flex space-x-3">
<x-form.toggle-checkbox name="judging_enabled"/><span>Enable score entry by judges</span>
@ -37,14 +36,17 @@
<x-layout.page-section>
<x-slot:section_name>Financial Settings</x-slot:section_name>
<x-slot:section_description>If students cannot advance to further honor groups, leave next event name blank</x-slot:section_description>
<x-form.body-grid columns="12" class="m-3">
<x-form.select name="fee_structure" colspan="6">
<x-slot:label>Fee Structure</x-slot:label>
{{-- Values should be one of the options in the boot method InvoiceDataServiceProvider --}}
<option value="oneFeePerEntry">One fee per entry</option>
<option value="oneFeePerStudent">One fee per student - one late fee per student if any of their entries are late</option>
<option value="oneFeePerEntry" {{ auditionSetting('fee_structure') === 'oneFeePerEntry' ? 'selected':'' }}>
One fee per entry
</option>
<option value="oneFeePerStudent" {{ auditionSetting('fee_structure') === 'oneFeePerStudent' ? 'selected':'' }}>
One fee per student - one late fee per student if any of their entries are late
</option>
</x-form.select>
<x-form.field label_text="Late Fee"

View File

@ -1,5 +1,5 @@
@props(['right_link_button_type' => 'a']) {{-- Use if the link to the right needs to be a button --}}
<li {{ $attributes->merge(['class'=>'flex items-center justify-between gap-x-6 px-4 py-5 sm:px-6']) }}>
<li {{ $attributes->merge(['class'=>'flex items-center justify-between gap-x-6 px-4 py-4 sm:px-6']) }}>
<div class="flex min-w-0 gap-x-4">
{{ $slot }}
</div>

View File

@ -4,4 +4,31 @@
@if(! Auth::user()->school_id)
You aren't currently associated with a school. <a href="/my_school" class="text-blue-600">Click here to choose or create one.</a>
@endif
<div class="grid sm:grid-cols-2 md:grid-cols-4">
<div>{{-- Column 1 --}}
<x-card.card>
<x-card.heading>User Options</x-card.heading>
<x-card.list.body>
<a href="{{ route('my_profile') }}">
<x-card.list.row class="hover:bg-gray-200">
My Profile
</x-card.list.row>
</a>
<a href="{{ route('my_school') }}">
<x-card.list.row class="hover:bg-gray-200">
My School
</x-card.list.row>
</a>
@if(Auth::user()->school_id)
<a href="{{ route('my_invoice') }}">
<x-card.list.row class="hover:bg-gray-200">
My Invoice
</x-card.list.row>
</a>
@endif
</x-card.list.body>
</x-card.card>
</div>
</div>
</x-layout.app>

View File

@ -18,59 +18,3 @@
</x-layout.page-section>
</x-layout.page-section-container>
</x-layout.app>
{{--@php use Illuminate\Support\Facades\Auth; @endphp
<x-layout.app>
<x-slot:page_title>User Profile</x-slot:page_title>
<div class="space-y-10 divide-y divide-gray-900/10">
<x-layout.page-section
section_name="Personal Information"
section_description="Use a permanent address where you receive mail"
>
@if (session('status') === 'profile-information-updated')
<div class="mt-4 px-8 font-medium text-sm text-green-600">
Profile Info has been updated.
</div>
@endif
<form action="/user/profile-information" method="POST">
@csrf
@method('PUT')
<div class="px-4 py-6 sm:p-8">
<div class="grid max-w-2xl grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6">
<x-form.field name="first_name" label="First Name" value="{{ Auth::user()->first_name }}" div_classes="sm:col-span-3" />
<x-form.field name="last_name" label="Last Name" value="{{ Auth::user()->last_name }}" div_classes="sm:col-span-3" />
<x-form.field name="email" label="Email Address" value="{{ Auth::user()->email }}" div_classes="sm:col-span-3" />
<x-form.field name="cell_phone" label="Cell Phone" value="{{ Auth::user()->cell_phone }}" div_classes="sm:col-span-3" />
<x-form.field name="judging_preference" label="Judging Preference" value="{{ Auth::user()->judging_preference }}" div_classes="sm:col-span-5" />
</div>
</div>
<div class="flex items-center justify-end gap-x-6 border-t border-gray-900/10 px-4 py-4 sm:px-8">
<x-form.button-nocolor type="button">Cancel</x-form.button-nocolor>
<x-form.button>Update Profile</x-form.button>
</div>
</form>
</x-layout.page-section>
<x-layout.page-section
section_name="Change Password"
section_description="Update your user password"
>
@if (session('status') === 'password-updated')
<div class="mt-4 px-8 font-medium text-sm text-green-600">
Password has been updated.
</div>
@endif
<x-form.card method="PUT" action="/user/password" cols="1" submit-button-text="Change Password">
<x-form.field name="current_password" label="Current Password" type="password" autocomplete="current-password" required />
<x-form.field name="password" label="New Password" type="password" autocomplete="new-password" required />
<x-form.field name="password_confirmation" label="Confirm New Password" autocomplete="new-password" type="password" required />
</x-form.card>
</x-layout.page-section>
</div>
</x-layout.app>--}}

View File

@ -10,8 +10,8 @@ use Illuminate\Support\Facades\Route;
Route::middleware(['auth', 'verified'])->group(function () {
Route::get('/dashboard', [DashboardController::class, 'dashboard'])->name('dashboard');
Route::get('/profile', [DashboardController::class, 'profile']);
Route::get('/my_school', [DashboardController::class, 'my_school']);
Route::get('/profile', [DashboardController::class, 'profile'])->name('my_profile');
Route::get('/my_school', [DashboardController::class, 'my_school'])->name('my_school');
Route::get('/my_invoice', [DashboardController::class, 'my_invoice'])->name('my_invoice');
});