Formatting, added blade components to server edit

Formatting, added blade components to server edit
This commit is contained in:
cp6 2022-03-09 13:46:23 +11:00
parent e9123763f8
commit 2d8d3b5949
2 changed files with 8 additions and 23 deletions

View File

@ -39,15 +39,9 @@
</div> </div>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-os-select>
<div class="input-group-prepend"><span class="input-group-text">OS</span></div> <x-slot name="current">{{$server[0]->os_id}}</x-slot>
<select class="form-control" name="os_id"> </x-os-select>
@foreach ($os as $item)
<option
value="{{ $item->id }}" {{ ( $item->id == $server[0]->os_id) ? 'selected' : '' }}> {{ $item->name }} </option>
@endforeach
</select>
</div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -186,20 +180,11 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 col-md-4 mb-3"> <div class="col-12 col-md-4 mb-3">
<div class="input-group"> <x-locations-select>
<div class="input-group-prepend"> <x-slot name="current">{{$server[0]->location_id}}</x-slot>
<span class="input-group-text">Location</span> </x-locations-select>
</div> </div>
<select class="form-control" name="location_id"> <div class="col-12 col-md-3 mb-3">
<option value="999">Null</option>
@foreach ($locations as $item)
<option
value="{{ $item->id }}" {{ ( $item->id === $server[0]->location_id) ? 'selected' : '' }}> {{ $item->name }} </option>
@endforeach
</select>
</div>
</div>
<div class="col-12 col-md-3">
<x-date-input> <x-date-input>
<x-slot name="title">Owned since</x-slot> <x-slot name="title">Owned since</x-slot>
<x-slot name="name">owned_since</x-slot> <x-slot name="name">owned_since</x-slot>

View File

@ -81,7 +81,7 @@
<td class="text-nowrap"> <td class="text-nowrap">
{{now()->diffInDays(Carbon\Carbon::parse($server->next_due_date))}} {{now()->diffInDays(Carbon\Carbon::parse($server->next_due_date))}}
<small>days</small></td> <small>days</small></td>
<td class="text-center"> {{ $server->owned_since }}</td> <td class="text-nowrap"> {{ $server->owned_since }}</td>
<td class="text-nowrap"> <td class="text-nowrap">
<form action="{{ route('servers.destroy', $server->id) }}" method="POST"> <form action="{{ route('servers.destroy', $server->id) }}" method="POST">
<a href="{{ route('servers.show', $server->id) }}" <a href="{{ route('servers.show', $server->id) }}"