UI changes;
availability form prettify
This commit is contained in:
@ -437,9 +437,10 @@ export default function AvailabilityForm({ publisherId, existingItem, inline, on
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ width: isMobile ? '90%' : 'max-w-xs', margin: '0 auto' }} >
|
// <div style={{ width: isMobile ? '90%' : 'max-w-xs', margin: '0 auto' }} >
|
||||||
|
<div className="w-full">
|
||||||
<ToastContainer></ToastContainer>
|
<ToastContainer></ToastContainer>
|
||||||
<form id="formAv" className="form p-5 bg-white shadow-md rounded-lg p-8 pr-12" onSubmit={handleSubmit}>
|
<form id="formAv" className="form p-5 bg-white shadow-md rounded-lg" onSubmit={handleSubmit}>
|
||||||
<h3 className="text-xl font-semibold mb-5 text-gray-800 border-b pb-2">
|
<h3 className="text-xl font-semibold mb-5 text-gray-800 border-b pb-2">
|
||||||
{availability.id ? "Редактирай" : "Нова"} възможност
|
{availability.id ? "Редактирай" : "Нова"} възможност
|
||||||
</h3>
|
</h3>
|
||||||
@ -508,10 +509,11 @@ export default function AvailabilityForm({ publisherId, existingItem, inline, on
|
|||||||
</div>
|
</div>
|
||||||
{/* <input type="hidden" name="isactive" value={availability.isactive} /> */}
|
{/* <input type="hidden" name="isactive" value={availability.isactive} /> */}
|
||||||
|
|
||||||
<div className="panel-actions">
|
<div className="flex justify-between items-center flex-nowrap w-full p-1">
|
||||||
<button className="action-button" onClick={() => handleCompletion()}> Отмени </button>
|
<button className="button border border-blue-500 text-blue-500 bg-transparent hover:text-white focus:outline-none focus:shadow-outline" 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 btn-outline bg-red-500 hover:bg-red-700 focus:outline-none focus:shadow-outline" type="button" onClick={handleDelete}>
|
||||||
Изтрий
|
Изтрий
|
||||||
</button></>
|
</button></>
|
||||||
)}
|
)}
|
||||||
|
@ -256,7 +256,7 @@ export default function LocationForm() {
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<button className='button' onClick={() => setIsPreviewMode(!isPreviewMode)}>
|
<button className='button' onClick={() => setIsPreviewMode(!isPreviewMode)}>
|
||||||
{isPreviewMode ? 'Скрий потребителския изглед' : 'Виж какво ще се покаже на потребителите'}
|
{isPreviewMode ? 'Скрий прегледа' : 'Преглед'}
|
||||||
</button>
|
</button>
|
||||||
</ProtectedRoute>
|
</ProtectedRoute>
|
||||||
<ProtectedRoute allowedRoles={[UserRole.USER]} deniedMessage=" " bypass={isPreviewMode}>
|
<ProtectedRoute allowedRoles={[UserRole.USER]} deniedMessage=" " bypass={isPreviewMode}>
|
||||||
|
@ -180,7 +180,7 @@ function UserDetails({ session }) {
|
|||||||
<div className="ml-3 overflow-hidden">
|
<div className="ml-3 overflow-hidden">
|
||||||
<p className="mx-1 mt-1 text-sm font-medium text-gray-800 dark:text-gray-200">{session.user.name}</p>
|
<p className="mx-1 mt-1 text-sm font-medium text-gray-800 dark:text-gray-200">{session.user.name}</p>
|
||||||
<p className="mx-1 mt-1 text-sm font-medium text-gray-600 dark:text-gray-400">{session.user.role}</p>
|
<p className="mx-1 mt-1 text-sm font-medium text-gray-600 dark:text-gray-400">{session.user.role}</p>
|
||||||
<a href="/api/auth/signout" className={styles.button} onClick={(e) => { e.preventDefault(); signOut(); }}>Излезте</a>
|
<a href="/api/auth/signout" className={styles.button} onClick={(e) => { e.preventDefault(); signOut(); }}>Изход</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
@ -2,5 +2,9 @@
|
|||||||
{
|
{
|
||||||
"chatId": 777826553,
|
"chatId": 777826553,
|
||||||
"phoneNumber": "+359883351579"
|
"phoneNumber": "+359883351579"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chatId": 882873119,
|
||||||
|
"phoneNumber": "359896260509"
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -27,7 +27,7 @@ body {
|
|||||||
@apply m-2 text-white font-bold py-2 px-4 rounded bg-blue-500 hover:bg-blue-700;
|
@apply m-2 text-white font-bold py-2 px-4 rounded bg-blue-500 hover:bg-blue-700;
|
||||||
}
|
}
|
||||||
.panel-actions {
|
.panel-actions {
|
||||||
@apply flex justify-end items-center justify-between;
|
@apply flex justify-end items-center justify-between;
|
||||||
}
|
}
|
||||||
.action-button {
|
.action-button {
|
||||||
@apply inline-block align-baseline font-bold text-blue-500 hover:text-blue-800;
|
@apply inline-block align-baseline font-bold text-blue-500 hover:text-blue-800;
|
||||||
|
Reference in New Issue
Block a user