UI changes

This commit is contained in:
Dobromir Popov
2024-03-02 21:31:50 +02:00
parent 32a713420e
commit 5998371222
11 changed files with 17 additions and 17 deletions

View File

@ -97,7 +97,7 @@ class ExampleForm extends React.Component {
return ( return (
<div className="w-full max-w-xs"> <div className="w-full max-w-xs">
<h3>{router.query?.id ? "Edit" : "Create"} Item </h3> <h3>{router.query?.id ? "Редактирай" : "Създай"} Item </h3>
<div className="mb-4"> <div className="mb-4">
<div className="form-check"> <div className="form-check">
<input className="checkbox" type="checkbox" id="isactive" name="isactive" onChange={handleChange} checked={item.isactive} autoComplete="off" /> <input className="checkbox" type="checkbox" id="isactive" name="isactive" onChange={handleChange} checked={item.isactive} autoComplete="off" />
@ -106,9 +106,9 @@ class ExampleForm extends React.Component {
</div> </div>
</div> </div>
<div className="panel-actions"> <div className="panel-actions">
<Link href={urls.indexUrl} className="action-button"> обратно </Link> <Link href={urls.indexUrl} className="action-button"> Отмени </Link>
<button className="button bg-blue-500 hover:bg-blue-700 focus:outline-none focus:shadow-outline" type="submit"> <button className="button bg-blue-500 hover:bg-blue-700 focus:outline-none focus:shadow-outline" type="submit">
{router.query?.id ? "Update" : "Create"} {router.query?.id ? "Обнови" : "Създаи"}
</button> </button>
</div> </div>
</div> </div>

View File

@ -509,7 +509,7 @@ export default function AvailabilityForm({ publisherId, existingItem, inline, on
{/* <input type="hidden" name="isactive" value={availability.isactive} /> */} {/* <input type="hidden" name="isactive" value={availability.isactive} /> */}
<div className="panel-actions"> <div className="panel-actions">
<button className="action-button" onClick={() => handleCompletion()}> обратно </button> <button className="action-button" onClick={() => handleCompletion()}> Отмени </button>
{availability.id && ( {availability.id && (
<><button className="button bg-red-500 hover:bg-red-700 focus:outline-none focus:shadow-outline" type="button" onClick={handleDelete}> <><button className="button bg-red-500 hover:bg-red-700 focus:outline-none focus:shadow-outline" type="button" onClick={handleDelete}>
Изтрий Изтрий

View File

@ -561,7 +561,7 @@ export default function AvailabilityForm({ publisherId, existingItem, inline, on
{/* <input type="hidden" name="isactive" value={availability.isactive} /> */} {/* <input type="hidden" name="isactive" value={availability.isactive} /> */}
<div className="panel-actions"> <div className="panel-actions">
<button className="action-button" onClick={() => handleCompletion()}> обратно </button> <button className="action-button" onClick={() => handleCompletion()}> Отмени </button>
{availability.id && ( {availability.id && (
<><button className="button bg-red-500 hover:bg-red-700 focus:outline-none focus:shadow-outline" type="button" onClick={handleDelete}> <><button className="button bg-red-500 hover:bg-red-700 focus:outline-none focus:shadow-outline" type="button" onClick={handleDelete}>
Изтрий Изтрий

View File

@ -87,7 +87,7 @@ export default function AvailabilityList({ publisher, showNew }) {
{<div className="flex justify-center mt-2"> {<div className="flex justify-center mt-2">
<button className="btn bg-blue-500 hover:bg-blue-600 text-white font-semibold py-2 px-4 rounded transition duration-300" <button className="btn bg-blue-500 hover:bg-blue-600 text-white font-semibold py-2 px-4 rounded transition duration-300"
onClick={() => { setSelectedItem(null); setShowAv(true) }}>Ново разположение</button> onClick={() => { setSelectedItem(null); setShowAv(true) }}>Нова възможност</button>
</div> </div>
} }
<div className="h-4 p-10"> <div className="h-4 p-10">

View File

@ -179,15 +179,15 @@ export default function CartEventForm(props: IProps) {
</div> </div>
</div> </div>
<div className="panel-actions"> <div className="panel-actions">
{!props?.inline && <Link href={urls.indexUrl} className="action-button"> Cancel </Link>} {!props?.inline && <Link href={urls.indexUrl} className="action-button"> Отмени </Link>}
{evt.id && {evt.id &&
<button className="button bg-red-500 hover:bg-red-700 focus:outline-none focus:shadow-outline" type="button" onClick={async () => { <button className="button bg-red-500 hover:bg-red-700 focus:outline-none focus:shadow-outline" type="button" onClick={async () => {
await axiosInstance.delete(urls.apiUrl + router.query.id); await axiosInstance.delete(urls.apiUrl + router.query.id);
router.push(urls.indexUrl); router.push(urls.indexUrl);
}}> }}>
Delete Изтрий
</button>} </button>}
<button className="button bg-blue-500 hover:bg-blue-700 focus:outline-none focus:shadow-outline" type="submit"> {evt.id ? "Update" : "Create"}</button> <button className="button bg-blue-500 hover:bg-blue-700 focus:outline-none focus:shadow-outline" type="submit"> {evt.id ? "Обнови" : "Създай"}</button>
</div> </div>
</form > </form >

View File

@ -45,7 +45,7 @@ export default function LocationCard({ location }) {
className="absolute bottom-2 right-2 z-20" className="absolute bottom-2 right-2 z-20"
> >
<button <button
aria-label="Delete location" aria-label="Изтрий местоположението"
className="text-red-600 bg-transparent hover:bg-red-100 p-1 hover:border-red-700 rounded" className="text-red-600 bg-transparent hover:bg-red-100 p-1 hover:border-red-700 rounded"
> >
<TrashIcon className="h-6 w-6" /> <TrashIcon className="h-6 w-6" />

View File

@ -247,9 +247,9 @@ export default function LocationForm() {
</>)} </>)}
</div> </div>
<div className="panel-actions pt-12"> <div className="panel-actions pt-12">
<Link href="/cart/locations" className="action-button"> обратно </Link> <Link href="/cart/locations" className="action-button"> Отмени </Link>
<button className="button bg-blue-500 hover:bg-blue-700 focus:outline-none focus:shadow-outline" type="submit"> <button className="button bg-blue-500 hover:bg-blue-700 focus:outline-none focus:shadow-outline" type="submit">
{router.query?.id ? "Update" : "Save"} {router.query?.id ? "Обнови" : "Запази"}
</button> </button>
</div> </div>

View File

@ -77,7 +77,7 @@ export default function PublisherCard({ publisher }) {
</div> </div>
</a> </a>
<div className="absolute bottom-2 right-2"> <div className="absolute bottom-2 right-2">
<button onClick={() => handleDelete(publisher.id)} aria-label="Delete Publisher"> <button onClick={() => handleDelete(publisher.id)} aria-label="Изтрий Publisher">
<svg className="w-5 h-6 text-red-500 hover:text-red-700" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> <svg className="w-5 h-6 text-red-500 hover:text-red-700" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path d="M10 11V17" stroke="#000000" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" /> <path d="M10 11V17" stroke="#000000" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
<path d="M14 11V17" stroke="#000000" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" /> <path d="M14 11V17" stroke="#000000" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />

View File

@ -289,10 +289,10 @@ export default function PublisherForm({ item, me }) {
</ProtectedRoute> </ProtectedRoute>
{/* ---------------------------- Actions --------------------------------- */} {/* ---------------------------- Actions --------------------------------- */}
<div className="panel-actions"> <div className="panel-actions">
<Link href={urls.indexUrl} className="action-button"> обратно </Link> <Link href={urls.indexUrl} className="action-button"> Отмени </Link>
{/* delete */} {/* delete */}
<button className="button bg-red-500 hover:bg-red-700 focus:outline-none focus:shadow-outline" type="button" onClick={handleDelete}> <button className="button bg-red-500 hover:bg-red-700 focus:outline-none focus:shadow-outline" type="button" onClick={handleDelete}>
Delete Изтрий
</button> </button>
<button className="button bg-blue-500 hover:bg-blue-700 focus:outline-none focus:shadow-outline" type="submit"> <button className="button bg-blue-500 hover:bg-blue-700 focus:outline-none focus:shadow-outline" type="submit">
{router.query?.id ? "Update" : "Create"} {router.query?.id ? "Update" : "Create"}

View File

@ -36,7 +36,7 @@ const sidemenu = [
}, },
{ {
id: "cart-experience", id: "cart-experience",
text: "Случка", text: "Случки",
url: "/cart/reports/experience", url: "/cart/reports/experience",
}, },
{ {

View File

@ -84,7 +84,7 @@ export default function CartEventPage({ items, locations }: ICartEventPageProps)
</table> </table>
<button className="button bg-blue-500 hover:bg-blue-700" <button className="button bg-blue-500 hover:bg-blue-700"
onClick={() => setAddNew(!addnew)} onClick={() => setAddNew(!addnew)}
> {addnew ? "обратно" : "Добави нов"}</button> > {addnew ? "Отмени" : "Добави нов"}</button>
{addnew && <CartEventForm locations={locations} />} {addnew && <CartEventForm locations={locations} />}
</div> </div>
</ProtectedRoute> </ProtectedRoute>