desired shifts max to 8;UI styling

This commit is contained in:
Dobromir Popov
2024-05-23 02:52:03 +03:00
parent cfc78abff9
commit cf4546e754
2 changed files with 2 additions and 1 deletions

View File

@ -196,7 +196,7 @@ function ShiftComponent({ shift, onShiftSelect, isSelected, onPublisherSelect, a
return (
<div key={index}
className={`flow rounded-md px-2 py-1 sm:py-0.5 my-1 ${ass.isConfirmed ? 'bg-green-100' : 'bg-gray-100'} ${borderStyles}`}
className={`flow rounded-md px-2 py-1 sm:py-0.5 my-1 ${(ass.isConfirmed && !ass.isBySystem) ? 'bg-green-100' : 'bg-gray-100'} ${borderStyles}`}
>
<div className="flex justify-between items-center" onClick={() => handlePublisherClick(ass.publisher)}>
<span className="text-gray-700">{publisherInfo.firstName} {publisherInfo.lastName}</span>

View File

@ -59,6 +59,7 @@ const PublisherInlineForm = ({ publisherId, initialShiftsPerMonth }) => {
type="number"
id="desiredShiftsPerMonth"
name="desiredShiftsPerMonth"
min="0" max="8"
value={desiredShiftsPerMonth}
onChange={(e) => setDesiredShiftsPerMonth(parseInt(e.target.value))}
className="textbox mt-1 sm:mt-0 w-full sm:w-auto flex-grow"