feat(pop-work-detail): 모든 그룹 작업완료 버튼 항상 표시 + 타이머 완료 버튼 추가
- GroupCompleteButton: !isGroupCompleted 조건 제거 → 모든 그룹에서 항상 표시
- 이미 완료된 그룹에서는 "작업완료됨" 완료 표시 렌더링
- isGroupCompleted prop 추가
- GroupTimerHeader: isGroupStarted 상태(진행 중/일시정지)에 완료 버튼 추가
- GlossyButton green variant, onTimerAction("complete") 호출
This commit is contained in:
parent
f471ce245a
commit
5cad4ed7fd
|
|
@ -1253,12 +1253,13 @@ export function PopWorkDetailComponent({
|
|||
))}
|
||||
|
||||
{/* 각 그룹 하단: 작업완료 버튼 */}
|
||||
{!isProcessCompleted && selectedGroup && !isGroupCompleted && (
|
||||
{!isProcessCompleted && selectedGroup && (
|
||||
<div className="mt-3 mb-2">
|
||||
<GroupCompleteButton
|
||||
group={selectedGroup}
|
||||
currentItems={currentItems}
|
||||
isGroupStarted={isGroupStarted}
|
||||
isGroupCompleted={isGroupCompleted}
|
||||
onComplete={async () => {
|
||||
await handleGroupTimerAction("complete");
|
||||
// 완료 후 다음 그룹으로 자동 이동
|
||||
|
|
@ -2274,6 +2275,11 @@ function GroupTimerHeader({
|
|||
<Play className="h-5 w-5" />재개
|
||||
</GlossyButton>
|
||||
)}
|
||||
{isGroupStarted && (
|
||||
<GlossyButton variant="green" onClick={() => onTimerAction("complete")} style={{ minHeight: 48, minWidth: 120, fontSize: 16 }}>
|
||||
<Check className="h-5 w-5" />완료
|
||||
</GlossyButton>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
@ -2427,12 +2433,14 @@ function GroupCompleteButton({
|
|||
group,
|
||||
currentItems,
|
||||
isGroupStarted,
|
||||
isGroupCompleted,
|
||||
onComplete,
|
||||
onNavigateNext,
|
||||
}: {
|
||||
group: WorkGroup;
|
||||
currentItems: WorkResultRow[];
|
||||
isGroupStarted: boolean;
|
||||
isGroupCompleted: boolean;
|
||||
onComplete: () => void;
|
||||
onNavigateNext: () => void;
|
||||
}) {
|
||||
|
|
@ -2442,6 +2450,19 @@ function GroupCompleteButton({
|
|||
const allDone = currentItems.every((r) => r.status === "completed");
|
||||
const isDisabled = !isGroupStarted || (!allRequiredDone);
|
||||
|
||||
// 이미 완료된 그룹: 완료 표시만
|
||||
if (isGroupCompleted) {
|
||||
return (
|
||||
<div
|
||||
className="flex items-center justify-center gap-2 rounded-2xl border-2 border-green-400 bg-green-50"
|
||||
style={{ width: '100%', minHeight: 64, fontSize: 20, color: '#16a34a', borderRadius: 16 }}
|
||||
>
|
||||
<Check className="h-6 w-6" />
|
||||
작업완료됨
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (confirmOpen) {
|
||||
return (
|
||||
<div className="flex items-center gap-3">
|
||||
|
|
|
|||
Loading…
Reference in New Issue