feat: add PendingRewardDialog, RewardConfirmDialog, and TaskConfirmDialog components
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 25s
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 25s
- Implemented PendingRewardDialog for handling pending reward requests. - Created RewardConfirmDialog for confirming reward redemption. - Developed TaskConfirmDialog for task confirmation with child name display. test: add unit tests for ChildView and ParentView components - Added comprehensive tests for ChildView including task triggering and SSE event handling. - Implemented tests for ParentView focusing on override modal and SSE event management. test: add ScrollingList component tests - Created tests for ScrollingList to verify item fetching, loading states, and custom item classes. - Included tests for two-step click interactions and edit button display logic. - Moved toward hashed passwords.
This commit is contained in:
47
frontend/vue-app/src/components/child/TaskConfirmDialog.vue
Normal file
47
frontend/vue-app/src/components/child/TaskConfirmDialog.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<ModalDialog
|
||||
v-if="task"
|
||||
title="Confirm Task"
|
||||
:subtitle="task.name"
|
||||
:imageUrl="task.image_url"
|
||||
@backdrop-click="$emit('cancel')"
|
||||
>
|
||||
<div class="modal-message">
|
||||
{{ task.is_good ? 'Add' : 'Subtract' }} these points
|
||||
{{ task.is_good ? 'to' : 'from' }}
|
||||
<span class="child-name">{{ childName }}</span>
|
||||
</div>
|
||||
<div class="modal-actions">
|
||||
<button @click="$emit('confirm')" class="btn btn-primary">Yes</button>
|
||||
<button @click="$emit('cancel')" class="btn btn-secondary">Cancel</button>
|
||||
</div>
|
||||
</ModalDialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import ModalDialog from '../shared/ModalDialog.vue'
|
||||
import type { Task } from '@/common/models'
|
||||
|
||||
defineProps<{
|
||||
task: Task | null
|
||||
childName?: string
|
||||
}>()
|
||||
|
||||
defineEmits<{
|
||||
confirm: []
|
||||
cancel: []
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.modal-message {
|
||||
margin-bottom: 1.2rem;
|
||||
font-size: 1rem;
|
||||
color: var(--modal-message-color, #333);
|
||||
}
|
||||
|
||||
.child-name {
|
||||
font-weight: 600;
|
||||
color: var(--text-primary, #333);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user