feat: TKB shift scheduler — personnel shift planning web app
Full rewrite of METRO HMG for TKB tunnel department: - People-based grid (18 TKB + 5 IT), year-long calendar - Color-coded shift values (4/6/8/12/A/B/D/N/U/O) - Drag-and-drop cells, multi-cell selection (click/ctrl/shift/drag) - Right-click context menu with color palette - Tunnel closure + Metro + D8 info rows (toggleable) - Czech holidays highlighted with names - PDF export (2-page A4 landscape, DejaVu font for Czech chars) - Improvement proposals system - Sticky headers (vertical + horizontal scroll) - Cell value filter toggles in legend Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
33
web/watch-deploy.js
Normal file
33
web/watch-deploy.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import { watch } from 'fs'
|
||||
import { execSync } from 'child_process'
|
||||
import { join } from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
import { dirname } from 'path'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const SRC_DIR = join(__dirname, 'src')
|
||||
const DEPLOY_SCRIPT = join(__dirname, 'deploy.sh')
|
||||
const COOLDOWN_MS = 5000
|
||||
|
||||
let timer = null
|
||||
|
||||
console.log(`Watching ${SRC_DIR} for changes...`)
|
||||
console.log('Auto-deploying to copelk on save')
|
||||
console.log('Press Ctrl+C to stop\n')
|
||||
|
||||
watch(SRC_DIR, { recursive: true }, (event, filename) => {
|
||||
if (!filename) return
|
||||
|
||||
console.log(`[${new Date().toLocaleTimeString()}] ${event}: ${filename}`)
|
||||
|
||||
if (timer) clearTimeout(timer)
|
||||
timer = setTimeout(() => {
|
||||
console.log('\nDeploying...\n')
|
||||
try {
|
||||
execSync(`bash ${DEPLOY_SCRIPT}`, { stdio: 'inherit' })
|
||||
console.log('\nWatching for next change...\n')
|
||||
} catch (e) {
|
||||
console.error('Deploy failed:', e.message)
|
||||
}
|
||||
}, COOLDOWN_MS)
|
||||
})
|
||||
Reference in New Issue
Block a user