completed location deletion
This commit is contained in:
@@ -32,13 +32,11 @@ export const LocationEditForm:FC<LocationEditFormProps> = ({ location, yearMonth
|
||||
<div className="card-body">
|
||||
<form action={dispatch}>
|
||||
{
|
||||
// show delete button only if location is set (otherwise it's a add operation)
|
||||
location ?
|
||||
<a href={`/location/${location._id}/delete`} className="card-subtitle tooltip" data-tip="Delete Location">
|
||||
<TrashIcon className="h-[1em] w-[1em] absolute cursor-pointer text-error bottom-5 right-4 text-2xl" />
|
||||
</a> : null
|
||||
location &&
|
||||
<a href={`/location/${location._id}/delete`} className="absolute bottom-5 right-4 tooltip" data-tip="Delete Location">
|
||||
<TrashIcon className="h-[1em] w-[1em] text-error text-2xl" />
|
||||
</a>
|
||||
}
|
||||
|
||||
<input id="locationName" name="locationName" type="text" placeholder="Naziv lokacije" className="input input-bordered w-full" defaultValue={location?.name ?? ""} />
|
||||
<div id="status-error" aria-live="polite" aria-atomic="true">
|
||||
{state.errors?.locationName &&
|
||||
|
||||
Reference in New Issue
Block a user