pubs orange if overbooked
This commit is contained in:
@ -785,7 +785,7 @@ export default function CalendarPage({ initialEvents, initialShifts }) {
|
|||||||
<input type="checkbox" className="toggle-checkbox" id="filterIncludeOldAvailabilities" onChange={handleCheckboxChange} />
|
<input type="checkbox" className="toggle-checkbox" id="filterIncludeOldAvailabilities" onChange={handleCheckboxChange} />
|
||||||
<span className="toggle-slider m-1">със стари предпочитания</span>
|
<span className="toggle-slider m-1">със стари предпочитания</span>
|
||||||
</label>
|
</label>
|
||||||
<ul className="w-full max-w-md">
|
<ul className="w-full max-w-md" id="availablePubsList" name="availablePubsList">
|
||||||
{Array.isArray(availablePubs) && availablePubs?.map((pub, index) => {
|
{Array.isArray(availablePubs) && availablePubs?.map((pub, index) => {
|
||||||
// Determine background and border classes based on conditions
|
// Determine background and border classes based on conditions
|
||||||
let bgAndBorderColorClass;
|
let bgAndBorderColorClass;
|
||||||
@ -820,7 +820,7 @@ export default function CalendarPage({ initialEvents, initialShifts }) {
|
|||||||
<li key={index}
|
<li key={index}
|
||||||
className={`flex justify-between items-center p-4 sm:py-2 rounded-lg shadow-sm mb-2
|
className={`flex justify-between items-center p-4 sm:py-2 rounded-lg shadow-sm mb-2
|
||||||
${bgAndBorderColorClass} ${selectedBorderClass} ${activeOpacityClass}
|
${bgAndBorderColorClass} ${selectedBorderClass} ${activeOpacityClass}
|
||||||
${pub.currentMonthAssignments >= pub.desiredShiftsPerMonth ? 'text-gray-400' : 'text-gray-800'}`}
|
${pub.currentMonthAssignments === pub.desiredShiftsPerMonth ? 'text-gray-400' : pub.currentMonthAssignments > pub.desiredShiftsPerMonth ? 'text-orange-300' : 'text-gray-800'}`}
|
||||||
onDoubleClick={(handlePublisherModalOpen.bind(this, pub))}
|
onDoubleClick={(handlePublisherModalOpen.bind(this, pub))}
|
||||||
onClick={handleSelectedPublisher.bind(this, pub)}
|
onClick={handleSelectedPublisher.bind(this, pub)}
|
||||||
>
|
>
|
||||||
|
Reference in New Issue
Block a user