fix ui
All checks were successful
Deploy on Master Change / deploy (push) Successful in 46s

This commit is contained in:
2026-07-03 18:09:22 +07:00
parent 96391b0706
commit 661f8e6267
3 changed files with 133 additions and 22 deletions

View File

@@ -148,26 +148,48 @@ export const ExamsTab: React.FC = () => {
</div>
{showCreate && (
<div className="system-form-card exams-create-card">
<h2 className="system-form-title">Phòng thi mới</h2>
<div className="system-form-grid">
<label className="login-field system-form-full">
<span>Tên phòng thi</span>
<input value={name} onChange={(e) => setName(e.target.value)} placeholder="VD: Thi cuối kỳ Java" />
</label>
<label className="login-field">
<span>Bắt đu</span>
<input type="datetime-local" value={start} onChange={(e) => setStart(e.target.value)} />
</label>
<label className="login-field">
<span>Kết thúc</span>
<input type="datetime-local" value={end} onChange={(e) => setEnd(e.target.value)} />
</label>
</div>
<div className="system-form-actions">
<div />
<div className="system-form-actions-right">
<button type="button" className="btn btn-ghost" onClick={() => setShowCreate(false)}>
<div className="modal-overlay" onClick={() => setShowCreate(false)}>
<div className="modal-container" style={{ maxWidth: '500px' }} onClick={e => e.stopPropagation()}>
<div className="modal-header">
<h2 className="modal-title">Tạo phòng thi mới</h2>
<button className="modal-close-btn" onClick={() => setShowCreate(false)} aria-label="Đóng">&times;</button>
</div>
<div className="modal-body" style={{ padding: '1.5rem', display: 'flex', flexDirection: 'column', gap: '1.25rem' }}>
<label className="login-field" style={{ display: 'flex', flexDirection: 'column', gap: '0.35rem' }}>
<span style={{ fontWeight: 600, fontSize: '0.85rem', color: 'var(--text-secondary)' }}>Tên phòng thi</span>
<input
className="search-input"
style={{ width: '100%', boxSizing: 'border-box' }}
value={name}
onChange={(e) => setName(e.target.value)}
placeholder="VD: Thi cuối kỳ Java"
/>
</label>
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '1rem' }}>
<label className="login-field" style={{ display: 'flex', flexDirection: 'column', gap: '0.35rem' }}>
<span style={{ fontWeight: 600, fontSize: '0.85rem', color: 'var(--text-secondary)' }}>Bắt đu</span>
<input
type="datetime-local"
className="search-input"
style={{ width: '100%', boxSizing: 'border-box', padding: '0.5rem 0.75rem' }}
value={start}
onChange={(e) => setStart(e.target.value)}
/>
</label>
<label className="login-field" style={{ display: 'flex', flexDirection: 'column', gap: '0.35rem' }}>
<span style={{ fontWeight: 600, fontSize: '0.85rem', color: 'var(--text-secondary)' }}>Kết thúc</span>
<input
type="datetime-local"
className="search-input"
style={{ width: '100%', boxSizing: 'border-box', padding: '0.5rem 0.75rem' }}
value={end}
onChange={(e) => setEnd(e.target.value)}
/>
</label>
</div>
</div>
<div className="modal-footer" style={{ gap: '0.65rem' }}>
<button type="button" className="btn btn-secondary" onClick={() => setShowCreate(false)}>
Hủy
</button>
<button type="button" className="btn btn-primary" disabled={busy} onClick={create}>