fix: [finance] 일일업무일지 Blade+React 이중중괄호 충돌 수정
- style={{ }} → JS 변수 분리 (Blade가 PHP echo로 해석하는 문제)
- 중첩 삼항연산자 괄호 추가 (PHP 8.4 호환)
This commit is contained in:
@@ -226,7 +226,8 @@ function DailyWorkLog() {
|
||||
const tdCenter = { ...tdStyle, textAlign: 'center' };
|
||||
const sectionHeader = { background: '#edf2f7', padding: '8px 12px', fontWeight: '600', fontSize: '14px', textAlign: 'center', borderTop: '2px solid #4a5568', borderBottom: '1px solid #cbd5e0' };
|
||||
const rateBar = { height: '8px', borderRadius: '4px', background: '#e2e8f0', overflow: 'hidden' };
|
||||
const rateFill = { height: '100%', borderRadius: '4px', background: rate >= 80 ? '#48bb78' : rate >= 50 ? '#ecc94b' : '#f56565', width: rate + '%', transition: 'width 0.3s' };
|
||||
const rateColor = rate >= 80 ? '#48bb78' : (rate >= 50 ? '#ecc94b' : '#f56565');
|
||||
const rateFill = { height: '100%', borderRadius: '4px', background: rateColor, width: rate + '%', transition: 'width 0.3s' };
|
||||
const inputBase = { width: '100%', padding: '4px 6px', fontSize: '13px', border: '1px solid #e2e8f0', borderRadius: '4px', outline: 'none' };
|
||||
const btnNav = { padding: '6px 12px', background: 'white', border: '1px solid #d1d5db', borderRadius: '6px', cursor: 'pointer', fontSize: '16px', lineHeight: '1' };
|
||||
const btnPrimary = { padding: '8px 20px', background: '#4f46e5', color: 'white', border: 'none', borderRadius: '6px', cursor: 'pointer', fontWeight: '600', fontSize: '14px' };
|
||||
@@ -244,6 +245,9 @@ function DailyWorkLog() {
|
||||
const doneCol = { width: '50px' };
|
||||
const noteCol = { width: '160px' };
|
||||
const actCol = { width: '80px' };
|
||||
const colorSelectStyle = { padding: '2px', fontSize: '11px', width: '32px' };
|
||||
const rateContainerStyle = { flex: '1', maxWidth: '400px', marginLeft: '20px' };
|
||||
const rateTextStyle = { color: rateColor, minWidth: '80px', textAlign: 'right' };
|
||||
const tableStyle = { width: '100%', borderCollapse: 'collapse' };
|
||||
|
||||
return (
|
||||
@@ -354,7 +358,7 @@ className="text-lg font-bold text-gray-800 border border-gray-300 rounded-lg px-
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M6 9l6 6 6-6"/></svg>
|
||||
</button>
|
||||
<select value={item.highlight || ''} onChange={e => updateItem(idx, 'highlight', e.target.value)}
|
||||
className="text-xs border border-gray-200 rounded" style={{ padding: '2px', fontSize: '11px', width: '32px' }} title="행 색상">
|
||||
className="text-xs border border-gray-200 rounded" style={colorSelectStyle} title="행 색상">
|
||||
{HIGHLIGHTS.map(h => <option key={h.value} value={h.value}>{h.value ? '\u25CF' : '-'}</option>)}
|
||||
</select>
|
||||
<button onClick={() => removeItem(idx)} className="text-red-400 hover:text-red-600" title="삭제">
|
||||
@@ -401,11 +405,11 @@ className="text-xs border border-gray-200 rounded" style={{ padding: '2px', font
|
||||
<div className="border-t-2 border-gray-700">
|
||||
<div className="flex items-center justify-between p-4">
|
||||
<span className="font-bold text-gray-700 text-lg">달성률</span>
|
||||
<div className="flex items-center gap-4" style={{ flex: '1', maxWidth: '400px', marginLeft: '20px' }}>
|
||||
<div className="flex items-center gap-4" style={rateContainerStyle}>
|
||||
<div style={rateBar} className="flex-1">
|
||||
<div style={rateFill}></div>
|
||||
</div>
|
||||
<span className="text-xl font-bold" style={{ color: rate >= 80 ? '#48bb78' : rate >= 50 ? '#ecc94b' : '#f56565', minWidth: '80px', textAlign: 'right' }}>
|
||||
<span className="text-xl font-bold" style={rateTextStyle}>
|
||||
{rate}%
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user