email subscription UI in publisher settings

This commit is contained in:
Dobromir Popov
2024-04-05 20:49:31 +03:00
parent 5e1415046d
commit 61645091bd
3 changed files with 73 additions and 56 deletions

View File

@ -5,7 +5,7 @@ PORT=3003
HOST=localhost
NEXT_PUBLIC_PUBLIC_URL=https://localhost:3003
DATABASE=mysql://cart:cartpw@192.168.0.10:3306/cart_dev
#DATABASE=mysql://cart:cartpw@localhost:3306/cart
DATABASE=mysql://cart:cartpw@localhost:3306/cart
SSL_KEY=./certificates/localhost-key.pem
SSL_CERT=./certificates/localhost.pem

View File

@ -196,3 +196,9 @@ fix Time ZONE (currently Z, but it leads to shift when the DST changes ( winter
fix repeating availabilities - Tanq kolcjanova only blue first thursday
add assignment in calendar planner
fix database
--
emails
mobile apps
apple login
разрешителни - upload

View File

@ -185,11 +185,14 @@ export default function PublisherForm({ item, me }) {
<label className="label" htmlFor="lastName">Фамилия</label>
<input type="text" name="lastName" value={publisher.lastName} onChange={handleChange} className="textbox" placeholder="Last Name" autoFocus />
<ProtectedRoute allowedRoles={[UserRole.ADMIN]} deniedMessage=" ">
<div className="border border-blue-500 border-solid p-2">
<div className="form-check">
<input className="checkbox" type="checkbox" value={publisher.isNameForeign} id="isNameForeign" name="isNameForeign" onChange={handleChange} checked={publisher.isNameForeign} autoComplete="off" />
<label className="label" htmlFor="isNameForeign">
Чуждестранна фамилия</label>
</div>
</div>
</ProtectedRoute>
</div>
{/* //desiredShiftsPerMonth */}
@ -232,6 +235,23 @@ export default function PublisherForm({ item, me }) {
</label>
</div>
</div>
</div>
<div className="mb-4">
<label className="label" htmlFor="town">Град</label>
<input type="text" name="town" value={publisher.town} onChange={handleChange} className="textbox" placeholder="Град" autoFocus />
</div>
<div className="mb-4">
<div className="form-check">
<input className="checkbox" type="checkbox" id="isSubscribedToCoverMe" name="isSubscribedToCoverMe" onChange={handleChange} checked={publisher.isSubscribedToCoverMe} autoComplete="off" />
<label className="label" htmlFor="isSubscribedToCoverMe">Абониран за имейли за заместване</label>
<input className="checkbox" type="checkbox" id="isSubscribedToReminders" name="isSubscribedToReminders" onChange={handleChange} checked={publisher.isSubscribedToReminders} autoComplete="off" />
<label className="label" htmlFor="isSubscribedToReminders">Абониран за напомняния (имейл)</label>
</div>
</div>
{/* ADMINISTRATORS ONLY */}
<ProtectedRoute allowedRoles={[UserRole.ADMIN]} deniedMessage=" " className="">
<div className="border border-blue-500 border-solid p-2">
<div className="mb-4">
<label className="label" htmlFor="type">Тип</label>
<select name="type" value={publisher.type} onChange={handleChange} className="textbox" placeholder="Type" autoFocus >
@ -243,16 +263,10 @@ export default function PublisherForm({ item, me }) {
<option value="CircuitOverseer">Пътуваща служба</option> */}
</select>
</div>
<div className="mb-4">
<label className="label" htmlFor="town">Град</label>
<input type="text" name="town" value={publisher.town} onChange={handleChange} className="textbox" placeholder="Град" autoFocus />
</div>
<div className="mb-4">
<label className="label" htmlFor="comments">Коментари</label>
<input type="text" name="comments" value={publisher.comments} onChange={handleChange} className="textbox" placeholder="Коментари" autoFocus />
</div>
</div>
<ProtectedRoute allowedRoles={[UserRole.ADMIN]} deniedMessage=" ">
<div className="mb-4">
<label className="label" htmlFor="age">Възраст</label>
<input type="number" name="age" value={publisher.age} onChange={handleChange} className="textbox" placeholder="Age" autoFocus />
@ -276,16 +290,13 @@ export default function PublisherForm({ item, me }) {
<option value={`${UserRole.POWERUSER}`}>Организатор</option>
<option value={`${UserRole.ADMIN}`}>Администратор</option>
{/* Add other roles as needed */}
</select>
</div>
<a href="https://t.me/mwHitnessing_bot" className="inline-flex items-center ml-4" target="_blank">
<img src="/content/icons/telegram-svgrepo-com.svg" alt="Телеграм" width="32" height="32" className="align-middle" />
<span className="align-middle">Телеграм</span>
</a>
</div>
</ProtectedRoute>
{/* ---------------------------- Actions --------------------------------- */}
<div className="panel-actions">