Notizfeld und CSS
This commit is contained in:
@@ -96,6 +96,7 @@ class PreApplicationController extends Controller
|
|||||||
$pa->first_name = $request->input('first_name');
|
$pa->first_name = $request->input('first_name');
|
||||||
$pa->last_name = $request->input('last_name');
|
$pa->last_name = $request->input('last_name');
|
||||||
$pa->location = $request->input('location');
|
$pa->location = $request->input('location');
|
||||||
|
$pa->notes = $request->input('notes');
|
||||||
$pa->passport_type = $request->input('passport_type');
|
$pa->passport_type = $request->input('passport_type');
|
||||||
$pa->event_id = $request->input('district_region');
|
$pa->event_id = $request->input('district_region');
|
||||||
$pa->email = $request->input('mail');
|
$pa->email = $request->input('mail');
|
||||||
@@ -143,6 +144,7 @@ class PreApplicationController extends Controller
|
|||||||
$pa->first_name = $request->input('first_name');
|
$pa->first_name = $request->input('first_name');
|
||||||
$pa->last_name = $request->input('last_name');
|
$pa->last_name = $request->input('last_name');
|
||||||
$pa->location = $request->input('location');
|
$pa->location = $request->input('location');
|
||||||
|
$pa->notes = $request->input('notes');
|
||||||
$pa->email = $request->input('mail');
|
$pa->email = $request->input('mail');
|
||||||
$pa->passport_type = $request->input('passport_type');
|
$pa->passport_type = $request->input('passport_type');
|
||||||
$pa->save();
|
$pa->save();
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('pre_applications', function (Blueprint $table) {
|
||||||
|
$table->text('notes')->nullable()->before('created_at');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('pre_applications', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('notes');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -95,6 +95,7 @@ return [
|
|||||||
'firstname' => 'Vorname (Nick)',
|
'firstname' => 'Vorname (Nick)',
|
||||||
'lastname' => 'Nachname (optional)',
|
'lastname' => 'Nachname (optional)',
|
||||||
'location' => 'Hackspace / Ort (optional)',
|
'location' => 'Hackspace / Ort (optional)',
|
||||||
|
'notes' => 'Notizen',
|
||||||
'reference_number' => 'Bearbeitungsnummer',
|
'reference_number' => 'Bearbeitungsnummer',
|
||||||
'created_at' => 'Eingereicht am',
|
'created_at' => 'Eingereicht am',
|
||||||
'actions' => 'Aktionen',
|
'actions' => 'Aktionen',
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ return [
|
|||||||
'firstname' => 'First name (Nickname)',
|
'firstname' => 'First name (Nickname)',
|
||||||
'lastname' => 'Last name (optional)',
|
'lastname' => 'Last name (optional)',
|
||||||
'location' => 'Hackspace / Location (optional)',
|
'location' => 'Hackspace / Location (optional)',
|
||||||
|
'notes' => 'Notes',
|
||||||
'reference_number' => 'Reference number',
|
'reference_number' => 'Reference number',
|
||||||
'created_at' => 'Submitted at',
|
'created_at' => 'Submitted at',
|
||||||
'actions' => 'Actions',
|
'actions' => 'Actions',
|
||||||
|
|||||||
9
public/css/application/edit.css
Normal file
9
public/css/application/edit.css
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
.notes-input {
|
||||||
|
width: 100%;
|
||||||
|
min-width: 150px;
|
||||||
|
height: 4em;
|
||||||
|
}
|
||||||
|
.first-name-input, .last-name-input, .location-input {
|
||||||
|
width: 100%;
|
||||||
|
min-width: 80px;
|
||||||
|
}
|
||||||
@@ -184,19 +184,45 @@ select {
|
|||||||
|
|
||||||
.eingabemaske {
|
.eingabemaske {
|
||||||
border: 5px inset;
|
border: 5px inset;
|
||||||
font-size: 1.2em;
|
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1025px) {
|
||||||
|
.eingabemaske {
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.eingabemaske {
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.eingabemaske input, .eingabemaske select, .eingabemaske textarea, .eingabemaske button {
|
||||||
|
font-size: 0.9em;
|
||||||
|
padding: 0.2em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.eingabemaske table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
.eingabemaske table, th, td {
|
.eingabemaske table, th, td {
|
||||||
border: 4px outset;
|
border: 4px outset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.eingabemaske th, .eingabemaske td {
|
||||||
|
padding: 0.3em;
|
||||||
|
}
|
||||||
|
|
||||||
.eingabemaske input {
|
.eingabemaske input {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
max-width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.eingabemaske button {
|
.eingabemaske button {
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ function addApplication(){
|
|||||||
data.first_name = $('#first_name_new').val();
|
data.first_name = $('#first_name_new').val();
|
||||||
data.last_name = $('#last_name_new').val();
|
data.last_name = $('#last_name_new').val();
|
||||||
data.location = $('#location_new').val();
|
data.location = $('#location_new').val();
|
||||||
|
data.notes = $('#notes_new').val();
|
||||||
|
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
||||||
@@ -57,6 +58,7 @@ function addApplication(){
|
|||||||
$('#first_name_new').val("");
|
$('#first_name_new').val("");
|
||||||
$('#last_name_new').val("");
|
$('#last_name_new').val("");
|
||||||
$('#location_new').val("");
|
$('#location_new').val("");
|
||||||
|
$('#notes_new').val("");
|
||||||
location.reload();
|
location.reload();
|
||||||
} else {
|
} else {
|
||||||
alert(r.errorMessage);
|
alert(r.errorMessage);
|
||||||
@@ -102,6 +104,7 @@ function editApplication(applicationId){
|
|||||||
data.first_name = $('#first_name_'+applicationId).val();
|
data.first_name = $('#first_name_'+applicationId).val();
|
||||||
data.last_name = $('#last_name_'+applicationId).val();
|
data.last_name = $('#last_name_'+applicationId).val();
|
||||||
data.location = $('#location_'+applicationId).val();
|
data.location = $('#location_'+applicationId).val();
|
||||||
|
data.notes = $('#notes_'+applicationId).val();
|
||||||
data.mail = $('#mail_'+applicationId).val();
|
data.mail = $('#mail_'+applicationId).val();
|
||||||
data.passport_type = $('#passport_type_'+applicationId).val();
|
data.passport_type = $('#passport_type_'+applicationId).val();
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
@extends('layout.app')
|
@extends('layout.app')
|
||||||
|
|
||||||
@section('scripts')
|
@section('scripts')
|
||||||
|
<link rel="stylesheet" href="{{ asset('/css/application/edit.css') }}">
|
||||||
<script>
|
<script>
|
||||||
const i18n = {
|
const i18n = {
|
||||||
common: {
|
common: {
|
||||||
@@ -28,57 +29,62 @@
|
|||||||
k = {{ __('app.preapplication.passport.kid') }}
|
k = {{ __('app.preapplication.passport.kid') }}
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<table class="eingabetabelle">
|
<div class="eingabemaske">
|
||||||
<tr>
|
<table class="eingabetabelle">
|
||||||
<th>{{ __('app.preapplication.region') }}</th>
|
<tr>
|
||||||
<th>{{ __('app.preapplication.reference_number') }}</th>
|
<th>{{ __('app.preapplication.region') }}</th>
|
||||||
<th>{{ __('app.preapplication.firstname') }}</th>
|
<th>{{ __('app.preapplication.reference_number') }}</th>
|
||||||
<th>{{ __('app.preapplication.lastname') }}</th>
|
<th>{{ __('app.preapplication.firstname') }}</th>
|
||||||
<th>{{ __('app.preapplication.location') }}</th>
|
<th>{{ __('app.preapplication.lastname') }}</th>
|
||||||
<th>{{ __('app.preapplication.mail') }}</th>
|
<th>{{ __('app.preapplication.location') }}</th>
|
||||||
<th>{{ __('app.preapplication.passport_type') }}</th>
|
<th>{{ __('app.preapplication.notes') }}</th>
|
||||||
<th>{{ __('app.preapplication.created_at') }}</th>
|
<th>{{ __('app.preapplication.mail') }}</th>
|
||||||
<th>{{ __('app.preapplication.actions') }}</th>
|
<th>{{ __('app.preapplication.passport_type') }}</th>
|
||||||
</tr>
|
<th>{{ __('app.preapplication.created_at') }}</th>
|
||||||
@foreach($applications as $appl)
|
<th>{{ __('app.preapplication.actions') }}</th>
|
||||||
<tr id="application_{{ $appl->id }}">
|
</tr>
|
||||||
<td>{{ $appl->event()->first()->name }}</td>
|
@foreach($applications as $appl)
|
||||||
<td>{{ $appl->reference_number }}</td>
|
<tr id="application_{{ $appl->id }}">
|
||||||
<td><input id="first_name_{{ $appl->id }}" class="first-name-input" type="text" value="{{ $appl->first_name }}"></td>
|
<td>{{ $appl->event()->first()->name }}</td>
|
||||||
<td><input id="last_name_{{ $appl->id }}" class="last-name-input" type="text" value="{{ $appl->last_name }}"></td>
|
<td>{{ $appl->reference_number }}</td>
|
||||||
<td><input id="location_{{ $appl->id }}" class="location-input" type="text" value="{{ $appl->location }}"></td>
|
<td><input id="first_name_{{ $appl->id }}" class="first-name-input" type="text" value="{{ $appl->first_name }}"></td>
|
||||||
<td><input id="mail_{{ $appl->id }}" type="text" value="{{ $appl->email }}"></td>
|
<td><input id="last_name_{{ $appl->id }}" class="last-name-input" type="text" value="{{ $appl->last_name }}"></td>
|
||||||
|
<td><input id="location_{{ $appl->id }}" class="location-input" type="text" value="{{ $appl->location }}"></td>
|
||||||
|
<td><textarea id="notes_{{ $appl->id }}" class="notes-input">{{ $appl->notes }}</textarea></td>
|
||||||
|
<td><input id="mail_{{ $appl->id }}" type="text" value="{{ $appl->email }}"></td>
|
||||||
|
<td>
|
||||||
|
<select id="passport_type_{{ $appl->id }}" class="passport-type-select">
|
||||||
|
<option value="d"{{ ( $appl->passport_type == "d" ? " selected" : "" ) }}>d</option>
|
||||||
|
<option value="k"{{ ( $appl->passport_type == "k" ? " selected" : "" ) }}>k</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td>{{ $appl->created_at }}</td>
|
||||||
|
<td><button onclick="editApplication({{ $appl->id }})">{{ __('app.preapplication.edit.save') }}</button><button id="applicationDelete_{{ $appl->id }}" onclick="deleteApplication({{ $appl->id }})">{{ __('app.preapplication.edit.delete') }}</button></td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<select id="passport_type_{{ $appl->id }}" class="passport-type-select">
|
<select id="region_new">
|
||||||
<option value="d"{{ ( $appl->passport_type == "d" ? " selected" : "" ) }}>d</option>
|
@foreach(ChaosEvents::getActiveEvents() as $region)
|
||||||
<option value="k"{{ ( $appl->passport_type == "k" ? " selected" : "" ) }}>k</option>
|
<option value="{{ $region->id }}">{{ $region->name }}</option>
|
||||||
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ $appl->created_at }}</td>
|
<td>{{ __('app.preapplication.edit.generated') }}</td>
|
||||||
<td><button onclick="editApplication({{ $appl->id }})">{{ __('app.preapplication.edit.save') }}</button><button id="applicationDelete_{{ $appl->id }}" onclick="deleteApplication({{ $appl->id }})">{{ __('app.preapplication.edit.delete') }}</button></td>
|
<td><input id="first_name_new" class="first-name-input" type="text"></td>
|
||||||
|
<td><input id="last_name_new" class="last-name-input" type="text"></td>
|
||||||
|
<td><input id="location_new" class="location-input" type="text"></td>
|
||||||
|
<td><textarea id="notes_new" class="notes-input"></textarea></td>
|
||||||
|
<td><input id="mail_new" type="text"></td>
|
||||||
|
<td><select id="passport_type_new" class="passport-type-select">
|
||||||
|
<option value="d">d</option>
|
||||||
|
<option value="k">k</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
<td><button onclick="addApplication()">{{ __('app.preapplication.edit.add') }}</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
</table>
|
||||||
<tr>
|
</div>
|
||||||
<td>
|
|
||||||
<select id="region_new">
|
|
||||||
@foreach(ChaosEvents::getActiveEvents() as $region)
|
|
||||||
<option value="{{ $region->id }}">{{ $region->name }}</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
<td>{{ __('app.preapplication.edit.generated') }}</td>
|
|
||||||
<td><input id="first_name_new" class="first-name-input" type="text"></td>
|
|
||||||
<td><input id="last_name_new" class="last-name-input" type="text"></td>
|
|
||||||
<td><input id="location_new" class="location-input" type="text"></td>
|
|
||||||
<td><input id="mail_new" type="text"></td>
|
|
||||||
<td><select id="passport_type_new" class="passport-type-select">
|
|
||||||
<option value="d">d</option>
|
|
||||||
<option value="k">k</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
<td><button onclick="addApplication()">{{ __('app.preapplication.edit.add') }}</button></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
Reference in New Issue
Block a user