fix: rename urgent → Экстренно! in calendar tech task form + room closure warning
- RoomContextMenu: separate TECH_PRIORITY_ITEMS with 'Экстренно!' label for urgent - Tech task form uses 3-column grid (all priorities visible at once) - Red highlight when Экстренно! is selected - Show "🔒 Номер будет закрыт для бронирования" warning under priority selector Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,12 @@ const PRIORITY_ITEMS: { value: HkPriority; label: string; color: string }[] = [
|
|||||||
{ value: 'low', label: 'Низкий', color: 'text-slate-500 dark:text-slate-400' },
|
{ value: 'low', label: 'Низкий', color: 'text-slate-500 dark:text-slate-400' },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const TECH_PRIORITY_ITEMS: { value: HkPriority; label: string; color: string }[] = [
|
||||||
|
{ value: 'urgent', label: 'Экстренно!', color: 'text-red-600 dark:text-red-400' },
|
||||||
|
{ value: 'medium', label: 'Средний', color: 'text-yellow-600 dark:text-yellow-400' },
|
||||||
|
{ value: 'low', label: 'Низкий', color: 'text-slate-500 dark:text-slate-400' },
|
||||||
|
]
|
||||||
|
|
||||||
type SubForm = 'maintenance' | 'blocked' | 'hk_priority' | 'tech_task' | null
|
type SubForm = 'maintenance' | 'blocked' | 'hk_priority' | 'tech_task' | null
|
||||||
|
|
||||||
export function RoomContextMenu({ room, x, y, onClose, onStatusChange, onHkStatusChange, onMaintenanceTask, onEdit }: RoomContextMenuProps) {
|
export function RoomContextMenu({ room, x, y, onClose, onStatusChange, onHkStatusChange, onMaintenanceTask, onEdit }: RoomContextMenuProps) {
|
||||||
@@ -271,15 +277,17 @@ export function RoomContextMenu({ room, x, y, onClose, onStatusChange, onHkStatu
|
|||||||
/>
|
/>
|
||||||
<div>
|
<div>
|
||||||
<p className="text-[10px] text-slate-500 dark:text-slate-400 mb-1">Приоритет</p>
|
<p className="text-[10px] text-slate-500 dark:text-slate-400 mb-1">Приоритет</p>
|
||||||
<div className="grid grid-cols-2 gap-1">
|
<div className="grid grid-cols-3 gap-1">
|
||||||
{PRIORITY_ITEMS.map(p => (
|
{TECH_PRIORITY_ITEMS.map(p => (
|
||||||
<button
|
<button
|
||||||
key={p.value}
|
key={p.value}
|
||||||
onClick={() => setTechPriority(p.value)}
|
onClick={() => setTechPriority(p.value)}
|
||||||
className={cn(
|
className={cn(
|
||||||
'px-2 py-1 rounded-lg text-[11px] font-medium transition-colors border',
|
'px-2 py-1.5 rounded-lg text-[11px] font-medium transition-colors border',
|
||||||
techPriority === p.value
|
techPriority === p.value
|
||||||
? 'border-brand-500 bg-brand-50 dark:bg-brand-900/20 text-brand-700 dark:text-brand-300'
|
? p.value === 'urgent'
|
||||||
|
? 'border-red-500 bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-300'
|
||||||
|
: 'border-brand-500 bg-brand-50 dark:bg-brand-900/20 text-brand-700 dark:text-brand-300'
|
||||||
: 'border-slate-200 dark:border-slate-600 text-slate-500 hover:bg-slate-100 dark:hover:bg-slate-700',
|
: 'border-slate-200 dark:border-slate-600 text-slate-500 hover:bg-slate-100 dark:hover:bg-slate-700',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
@@ -287,6 +295,11 @@ export function RoomContextMenu({ room, x, y, onClose, onStatusChange, onHkStatu
|
|||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
{techPriority === 'urgent' && (
|
||||||
|
<p className="text-[10px] text-red-600 dark:text-red-400 mt-1.5 flex items-center gap-1">
|
||||||
|
🔒 Номер будет закрыт для бронирования
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
{/* Photo upload */}
|
{/* Photo upload */}
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user