Skip to content

Commit 7f6cacc

Browse files
author
momijizukamori
committed
Updates from feedback
- Restrict main item image to the same types as additional images - Show edit button on items to all users who can edit, not just seniors
1 parent f2dd63d commit 7f6cacc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/Nova/Item.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public function fields(Request $request)
8080
Avatar::make('Image')
8181
->disk('s3public')
8282
->path('images')
83+
->acceptedTypes('.png, .jpeg, .jpg, .webp, .gif, .jfif')
8384
->nullable()
8485
->maxWidth(200),
8586

resources/views/items/show.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class="rounded mw-100 d-block mx-auto">
2323
@include('components.items.closet')
2424
</div>
2525
</div>
26-
@if (auth()->user() && auth()->user()->senior())
26+
@if (auth()->user() && auth()->user()->can('update', $item))
2727
<div class="row p-0 mx-0 my-3">
2828
<div class="col p-1 list-group text-center small">
2929
<a class="btn btn-outline-primary" href="{{ $item->edit_url }}">

0 commit comments

Comments
 (0)