Enhance HorizontalTimelineCalendar and Scheduling components with repetition metadata and improved interaction
- Added RepetitionMetadata interface to manage phase details for repetitions. - Implemented onScrollToRepetition and onScheduleRepetition callbacks for better user navigation and scheduling. - Updated HorizontalTimelineCalendar to display phase names, experiment numbers, and repetition numbers in the timeline. - Removed locked state management from Scheduling component, simplifying repetition handling. - Improved conductor assignment visibility and interaction within the scheduling interface.
This commit is contained in:
@@ -70,8 +70,6 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
|
||||
// Track repetitions that have been dropped/moved and should show time points
|
||||
const [repetitionsWithTimes, setRepetitionsWithTimes] = useState<Set<string>>(new Set())
|
||||
// Track which repetitions are locked (prevent dragging)
|
||||
const [lockedSchedules, setLockedSchedules] = useState<Set<string>>(new Set())
|
||||
// Track which repetitions are currently being scheduled
|
||||
const [schedulingRepetitions, setSchedulingRepetitions] = useState<Set<string>>(new Set())
|
||||
// Track conductor assignments for each phase marker (markerId -> conductorIds[])
|
||||
@@ -269,28 +267,18 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
next.delete(repId)
|
||||
return next
|
||||
})
|
||||
setLockedSchedules(prev => {
|
||||
const next = new Set(prev)
|
||||
next.delete(repId)
|
||||
return next
|
||||
})
|
||||
setSchedulingRepetitions(prev => {
|
||||
const next = new Set(prev)
|
||||
next.delete(repId)
|
||||
return next
|
||||
})
|
||||
// Re-stagger remaining repetitions
|
||||
const remainingIds = Array.from(next).filter(id => id !== repId)
|
||||
if (remainingIds.length > 0) {
|
||||
reStaggerRepetitions(remainingIds)
|
||||
}
|
||||
// Don't re-stagger remaining repetitions - they should keep their positions
|
||||
} else {
|
||||
next.add(repId)
|
||||
// Auto-spawn when checked - pass the updated set to ensure correct stagger calculation
|
||||
// spawnSingleRepetition will position the new repetition relative to existing ones
|
||||
// without resetting existing positions
|
||||
spawnSingleRepetition(repId, next)
|
||||
// Re-stagger all existing repetitions to prevent overlap
|
||||
// Note: reStaggerRepetitions will automatically skip locked repetitions
|
||||
reStaggerRepetitions([...next, repId])
|
||||
}
|
||||
return next
|
||||
})
|
||||
@@ -356,7 +344,7 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
|
||||
// Re-stagger all repetitions to prevent overlap
|
||||
// IMPORTANT: Skip locked repetitions to prevent them from moving
|
||||
const reStaggerRepetitions = useCallback((repIds: string[]) => {
|
||||
const reStaggerRepetitions = useCallback((repIds: string[], onlyResetWithoutCustomTimes: boolean = false) => {
|
||||
const tomorrow = new Date()
|
||||
tomorrow.setDate(tomorrow.getDate() + 1)
|
||||
tomorrow.setHours(9, 0, 0, 0)
|
||||
@@ -364,8 +352,11 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
setScheduledRepetitions(prev => {
|
||||
const newScheduled = { ...prev }
|
||||
|
||||
// Filter out locked repetitions - they should not be moved
|
||||
const unlockedRepIds = repIds.filter(repId => !lockedSchedules.has(repId))
|
||||
// If onlyResetWithoutCustomTimes is true, filter out repetitions that have custom times set
|
||||
let unlockedRepIds = repIds
|
||||
if (onlyResetWithoutCustomTimes) {
|
||||
unlockedRepIds = unlockedRepIds.filter(repId => !repetitionsWithTimes.has(repId))
|
||||
}
|
||||
|
||||
// Calculate stagger index only for unlocked repetitions
|
||||
let staggerIndex = 0
|
||||
@@ -407,7 +398,7 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
|
||||
return newScheduled
|
||||
})
|
||||
}, [lockedSchedules, repetitionsByExperiment, experimentsByPhase, soakingByExperiment, airdryingByExperiment])
|
||||
}, [repetitionsByExperiment, experimentsByPhase, soakingByExperiment, airdryingByExperiment, repetitionsWithTimes])
|
||||
|
||||
// Spawn a single repetition in calendar
|
||||
const spawnSingleRepetition = (repId: string, updatedSelectedIds?: Set<string>) => {
|
||||
@@ -537,13 +528,10 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
const repetition = repetitionsByExperiment[scheduled.experimentId]?.find(r => r.id === scheduled.repetitionId)
|
||||
|
||||
if (experiment && repetition && scheduled.soakingStart) {
|
||||
const isLocked = lockedSchedules.has(scheduled.repetitionId)
|
||||
const lockIcon = isLocked ? '🔒' : '🔓'
|
||||
|
||||
// Soaking marker
|
||||
events.push({
|
||||
id: `${scheduled.repetitionId}-soaking`,
|
||||
title: `${lockIcon} 💧 Soaking - Exp ${experiment.experiment_number} Rep ${repetition.repetition_number}`,
|
||||
title: `💧 Soaking - Exp ${experiment.experiment_number} Rep ${repetition.repetition_number}`,
|
||||
start: scheduled.soakingStart,
|
||||
end: new Date(scheduled.soakingStart.getTime() + 15 * 60000), // 15 minute duration for better visibility
|
||||
resource: 'soaking'
|
||||
@@ -553,7 +541,7 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
if (scheduled.airdryingStart) {
|
||||
events.push({
|
||||
id: `${scheduled.repetitionId}-airdrying`,
|
||||
title: `${lockIcon} 🌬️ Airdrying - Exp ${experiment.experiment_number} Rep ${repetition.repetition_number}`,
|
||||
title: `🌬️ Airdrying - Exp ${experiment.experiment_number} Rep ${repetition.repetition_number}`,
|
||||
start: scheduled.airdryingStart,
|
||||
end: new Date(scheduled.airdryingStart.getTime() + 15 * 60000), // 15 minute duration for better visibility
|
||||
resource: 'airdrying'
|
||||
@@ -564,7 +552,7 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
if (scheduled.crackingStart) {
|
||||
events.push({
|
||||
id: `${scheduled.repetitionId}-cracking`,
|
||||
title: `${lockIcon} ⚡ Cracking - Exp ${experiment.experiment_number} Rep ${repetition.repetition_number}`,
|
||||
title: `⚡ Cracking - Exp ${experiment.experiment_number} Rep ${repetition.repetition_number}`,
|
||||
start: scheduled.crackingStart,
|
||||
end: new Date(scheduled.crackingStart.getTime() + 15 * 60000), // 15 minute duration for better visibility
|
||||
resource: 'cracking'
|
||||
@@ -574,7 +562,7 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
})
|
||||
|
||||
return events
|
||||
}, [scheduledRepetitions, experimentsByPhase, repetitionsByExperiment, lockedSchedules])
|
||||
}, [scheduledRepetitions, experimentsByPhase, repetitionsByExperiment])
|
||||
|
||||
// Memoize the calendar events
|
||||
const calendarEvents = useMemo(() => {
|
||||
@@ -610,15 +598,16 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
return moment(date).format('MMM D, h:mm A')
|
||||
}
|
||||
|
||||
const toggleScheduleLock = (repId: string) => {
|
||||
setLockedSchedules(prev => {
|
||||
const next = new Set(prev)
|
||||
if (next.has(repId)) {
|
||||
next.delete(repId)
|
||||
} else {
|
||||
next.add(repId)
|
||||
}
|
||||
return next
|
||||
// Remove all conductor assignments from a repetition
|
||||
const removeRepetitionAssignments = (repId: string) => {
|
||||
const markerIdPrefix = repId
|
||||
setConductorAssignments(prev => {
|
||||
const newAssignments = { ...prev }
|
||||
// Remove assignments for all three phases
|
||||
delete newAssignments[`${markerIdPrefix}-soaking`]
|
||||
delete newAssignments[`${markerIdPrefix}-airdrying`]
|
||||
delete newAssignments[`${markerIdPrefix}-cracking`]
|
||||
return newAssignments
|
||||
})
|
||||
}
|
||||
|
||||
@@ -626,24 +615,16 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
// Only make repetition markers draggable, not availability events
|
||||
const resource = event.resource as string
|
||||
if (resource === 'soaking' || resource === 'airdrying' || resource === 'cracking') {
|
||||
// Check if the repetition is locked
|
||||
const eventId = event.id as string
|
||||
const repId = eventId.split('-')[0]
|
||||
const isLocked = lockedSchedules.has(repId)
|
||||
return !isLocked
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}, [lockedSchedules])
|
||||
}, [])
|
||||
|
||||
const eventPropGetter = useCallback((event: any) => {
|
||||
const resource = event.resource as string
|
||||
|
||||
// Styling for repetition markers (foreground events)
|
||||
if (resource === 'soaking' || resource === 'airdrying' || resource === 'cracking') {
|
||||
const eventId = event.id as string
|
||||
const repId = eventId.split('-')[0]
|
||||
const isLocked = lockedSchedules.has(repId)
|
||||
|
||||
const colors = {
|
||||
soaking: '#3b82f6', // blue
|
||||
airdrying: '#10b981', // green
|
||||
@@ -653,8 +634,8 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
|
||||
return {
|
||||
style: {
|
||||
backgroundColor: isLocked ? '#9ca3af' : color, // gray if locked
|
||||
borderColor: isLocked ? color : color, // border takes original color when locked
|
||||
backgroundColor: color,
|
||||
borderColor: color,
|
||||
color: 'white',
|
||||
borderRadius: '8px',
|
||||
border: '2px solid',
|
||||
@@ -675,17 +656,17 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
cursor: isLocked ? 'not-allowed' : 'grab',
|
||||
boxShadow: isLocked ? '0 1px 2px rgba(0,0,0,0.1)' : '0 2px 4px rgba(0,0,0,0.2)',
|
||||
cursor: 'grab',
|
||||
boxShadow: '0 2px 4px rgba(0,0,0,0.2)',
|
||||
transition: 'all 0.2s ease',
|
||||
opacity: isLocked ? 0.7 : 1
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Default styling for other events
|
||||
return {}
|
||||
}, [lockedSchedules])
|
||||
}, [])
|
||||
|
||||
const scheduleRepetition = async (repId: string, experimentId: string) => {
|
||||
setSchedulingRepetitions(prev => new Set(prev).add(repId))
|
||||
@@ -807,7 +788,6 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
phase: 'soaking' | 'airdrying' | 'cracking'
|
||||
startTime: Date
|
||||
assignedConductors: string[]
|
||||
locked: boolean
|
||||
}> = []
|
||||
|
||||
Object.values(scheduledRepetitions).forEach(scheduled => {
|
||||
@@ -821,8 +801,7 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
experimentId: scheduled.experimentId,
|
||||
phase: 'soaking',
|
||||
startTime: scheduled.soakingStart,
|
||||
assignedConductors: conductorAssignments[`${markerIdPrefix}-soaking`] || [],
|
||||
locked: lockedSchedules.has(repId)
|
||||
assignedConductors: conductorAssignments[`${markerIdPrefix}-soaking`] || []
|
||||
})
|
||||
}
|
||||
|
||||
@@ -833,8 +812,7 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
experimentId: scheduled.experimentId,
|
||||
phase: 'airdrying',
|
||||
startTime: scheduled.airdryingStart,
|
||||
assignedConductors: conductorAssignments[`${markerIdPrefix}-airdrying`] || [],
|
||||
locked: lockedSchedules.has(repId)
|
||||
assignedConductors: conductorAssignments[`${markerIdPrefix}-airdrying`] || []
|
||||
})
|
||||
}
|
||||
|
||||
@@ -845,8 +823,7 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
experimentId: scheduled.experimentId,
|
||||
phase: 'cracking',
|
||||
startTime: scheduled.crackingStart,
|
||||
assignedConductors: conductorAssignments[`${markerIdPrefix}-cracking`] || [],
|
||||
locked: lockedSchedules.has(repId)
|
||||
assignedConductors: conductorAssignments[`${markerIdPrefix}-cracking`] || []
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -857,7 +834,59 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
conductorAvailabilities,
|
||||
phaseMarkers
|
||||
}
|
||||
}, [selectedConductorIds, conductors, conductorColorMap, colorPalette, availabilityEvents, scheduledRepetitions, conductorAssignments, lockedSchedules, calendarStartDate, calendarZoom])
|
||||
}, [selectedConductorIds, conductors, conductorColorMap, colorPalette, availabilityEvents, scheduledRepetitions, conductorAssignments, calendarStartDate, calendarZoom])
|
||||
|
||||
// Build repetition metadata mapping for timeline display
|
||||
const repetitionMetadata = useMemo(() => {
|
||||
const metadata: Record<string, { phaseName: string; experimentNumber: number; repetitionNumber: number }> = {}
|
||||
|
||||
Object.values(scheduledRepetitions).forEach(scheduled => {
|
||||
const repId = scheduled.repetitionId
|
||||
const experiment = Object.values(experimentsByPhase).flat().find(e => e.id === scheduled.experimentId)
|
||||
const repetition = Object.values(repetitionsByExperiment).flat().find(r => r.id === repId)
|
||||
const phase = phases.find(p =>
|
||||
Object.values(experimentsByPhase[p.id] || []).some(e => e.id === scheduled.experimentId)
|
||||
)
|
||||
|
||||
if (experiment && repetition && phase) {
|
||||
metadata[repId] = {
|
||||
phaseName: phase.name,
|
||||
experimentNumber: experiment.experiment_number,
|
||||
repetitionNumber: repetition.repetition_number,
|
||||
experimentId: scheduled.experimentId
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
return metadata
|
||||
}, [scheduledRepetitions, experimentsByPhase, repetitionsByExperiment, phases])
|
||||
|
||||
// Scroll to repetition in accordion
|
||||
const handleScrollToRepetition = useCallback(async (repetitionId: string) => {
|
||||
// First, expand the phase if it's collapsed
|
||||
const repetition = Object.values(repetitionsByExperiment).flat().find(r => r.id === repetitionId)
|
||||
if (repetition) {
|
||||
const experiment = Object.values(experimentsByPhase).flat().find(e =>
|
||||
(repetitionsByExperiment[e.id] || []).some(r => r.id === repetitionId)
|
||||
)
|
||||
if (experiment) {
|
||||
const phase = phases.find(p =>
|
||||
(experimentsByPhase[p.id] || []).some(e => e.id === experiment.id)
|
||||
)
|
||||
if (phase && !expandedPhaseIds.has(phase.id)) {
|
||||
await togglePhaseExpand(phase.id)
|
||||
// Wait a bit for the accordion to expand
|
||||
await new Promise(resolve => setTimeout(resolve, 300))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Then scroll to the element
|
||||
const element = document.getElementById(`repetition-${repetitionId}`)
|
||||
if (element) {
|
||||
element.scrollIntoView({ behavior: 'smooth', block: 'center' })
|
||||
}
|
||||
}, [repetitionsByExperiment, experimentsByPhase, phases, expandedPhaseIds, togglePhaseExpand])
|
||||
|
||||
// Handlers for horizontal calendar
|
||||
const handleHorizontalMarkerDrag = useCallback((markerId: string, newTime: Date) => {
|
||||
@@ -879,21 +908,6 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
}))
|
||||
}, [])
|
||||
|
||||
const handleHorizontalMarkerLockToggle = useCallback((markerId: string) => {
|
||||
// Marker ID format: ${repId}-${phase} where repId is a UUID with hyphens
|
||||
// Split by '-' and take all but the last segment as repId
|
||||
const parts = markerId.split('-')
|
||||
const repId = parts.slice(0, -1).join('-')
|
||||
setLockedSchedules(prev => {
|
||||
const next = new Set(prev)
|
||||
if (next.has(repId)) {
|
||||
next.delete(repId)
|
||||
} else {
|
||||
next.add(repId)
|
||||
}
|
||||
return next
|
||||
})
|
||||
}, [])
|
||||
|
||||
|
||||
return (
|
||||
@@ -1028,7 +1042,9 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
phaseMarkers={horizontalCalendarData.phaseMarkers}
|
||||
onMarkerDrag={handleHorizontalMarkerDrag}
|
||||
onMarkerAssignConductors={handleHorizontalMarkerAssignConductors}
|
||||
onMarkerLockToggle={handleHorizontalMarkerLockToggle}
|
||||
repetitionMetadata={repetitionMetadata}
|
||||
onScrollToRepetition={handleScrollToRepetition}
|
||||
onScheduleRepetition={scheduleRepetition}
|
||||
timeStep={15}
|
||||
minHour={6}
|
||||
maxHour={22}
|
||||
@@ -1197,11 +1213,21 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
const checked = selectedRepetitionIds.has(rep.id)
|
||||
const hasTimes = repetitionsWithTimes.has(rep.id)
|
||||
const scheduled = scheduledRepetitions[rep.id]
|
||||
const isLocked = lockedSchedules.has(rep.id)
|
||||
const isScheduling = schedulingRepetitions.has(rep.id)
|
||||
|
||||
// Check if there are any conductor assignments
|
||||
const markerIdPrefix = rep.id
|
||||
const soakingConductors = conductorAssignments[`${markerIdPrefix}-soaking`] || []
|
||||
const airdryingConductors = conductorAssignments[`${markerIdPrefix}-airdrying`] || []
|
||||
const crackingConductors = conductorAssignments[`${markerIdPrefix}-cracking`] || []
|
||||
const hasAssignments = soakingConductors.length > 0 || airdryingConductors.length > 0 || crackingConductors.length > 0
|
||||
|
||||
return (
|
||||
<div key={rep.id} className="bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded p-3">
|
||||
<div
|
||||
key={rep.id}
|
||||
id={`repetition-${rep.id}`}
|
||||
className="bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded p-3"
|
||||
>
|
||||
{/* Checkbox row */}
|
||||
<label className="flex items-center gap-2">
|
||||
<input
|
||||
@@ -1216,37 +1242,70 @@ export function ScheduleExperiment({ user, onBack }: { user: User; onBack: () =>
|
||||
{/* Time points (shown only if has been dropped/moved) */}
|
||||
{hasTimes && scheduled && (
|
||||
<div className="mt-2 ml-6 text-xs space-y-1">
|
||||
<div className="flex items-center gap-2">
|
||||
<span>💧</span>
|
||||
<span>Soaking: {formatTime(scheduled.soakingStart)}</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<span>🌬️</span>
|
||||
<span>Airdrying: {formatTime(scheduled.airdryingStart)}</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<span>⚡</span>
|
||||
<span>Cracking: {formatTime(scheduled.crackingStart)}</span>
|
||||
</div>
|
||||
{(() => {
|
||||
const repId = rep.id
|
||||
const markerIdPrefix = repId
|
||||
|
||||
// Get assigned conductors for each phase
|
||||
const soakingConductors = conductorAssignments[`${markerIdPrefix}-soaking`] || []
|
||||
const airdryingConductors = conductorAssignments[`${markerIdPrefix}-airdrying`] || []
|
||||
const crackingConductors = conductorAssignments[`${markerIdPrefix}-cracking`] || []
|
||||
|
||||
// Helper to get conductor names
|
||||
const getConductorNames = (conductorIds: string[]) => {
|
||||
return conductorIds.map(id => {
|
||||
const conductor = conductors.find(c => c.id === id)
|
||||
if (!conductor) return null
|
||||
return [conductor.first_name, conductor.last_name].filter(Boolean).join(' ') || conductor.email
|
||||
}).filter(Boolean).join(', ')
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex items-center gap-2 flex-wrap">
|
||||
<span>💧</span>
|
||||
<span>Soaking: {formatTime(scheduled.soakingStart)}</span>
|
||||
{soakingConductors.length > 0 && (
|
||||
<span className="text-blue-600 dark:text-blue-400">
|
||||
({getConductorNames(soakingConductors)})
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-2 flex-wrap">
|
||||
<span>🌬️</span>
|
||||
<span>Airdrying: {formatTime(scheduled.airdryingStart)}</span>
|
||||
{airdryingConductors.length > 0 && (
|
||||
<span className="text-green-600 dark:text-green-400">
|
||||
({getConductorNames(airdryingConductors)})
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-2 flex-wrap">
|
||||
<span>⚡</span>
|
||||
<span>Cracking: {formatTime(scheduled.crackingStart)}</span>
|
||||
{crackingConductors.length > 0 && (
|
||||
<span className="text-orange-600 dark:text-orange-400">
|
||||
({getConductorNames(crackingConductors)})
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
})()}
|
||||
|
||||
{/* Lock checkbox and Schedule button */}
|
||||
{/* Remove Assignments button and Schedule button */}
|
||||
<div className="flex items-center gap-3 mt-3 pt-2 border-t border-gray-200 dark:border-gray-600">
|
||||
<label className="flex items-center gap-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
className="h-3 w-3 text-blue-600 border-gray-300 rounded"
|
||||
checked={isLocked}
|
||||
onChange={() => {
|
||||
toggleScheduleLock(rep.id)
|
||||
}}
|
||||
/>
|
||||
<span className="text-xs text-gray-600 dark:text-gray-400">
|
||||
{isLocked ? '🔒 Locked' : '🔓 Unlocked'}
|
||||
</span>
|
||||
</label>
|
||||
{hasAssignments && (
|
||||
<button
|
||||
onClick={() => removeRepetitionAssignments(rep.id)}
|
||||
className="px-3 py-1 bg-red-600 hover:bg-red-700 text-white rounded text-xs transition-colors"
|
||||
>
|
||||
Remove Assignments
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
onClick={() => scheduleRepetition(rep.id, exp.id)}
|
||||
disabled={isScheduling || !isLocked}
|
||||
disabled={isScheduling}
|
||||
className="px-3 py-1 bg-green-600 hover:bg-green-700 disabled:bg-gray-400 text-white rounded text-xs transition-colors"
|
||||
>
|
||||
{isScheduling ? 'Scheduling...' : 'Schedule'}
|
||||
|
||||
Reference in New Issue
Block a user