feat: normalize email handling in signup, login, and verification processes; refactor event handling in task and reward components
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 50s

This commit is contained in:
2026-01-28 16:42:06 -05:00
parent 3066d7d356
commit 6f5b61de7f
18 changed files with 188 additions and 172 deletions

View File

@@ -4,6 +4,7 @@ import ModalDialog from '../shared/ModalDialog.vue'
import { useRoute, useRouter } from 'vue-router'
import ChildDetailCard from './ChildDetailCard.vue'
import ScrollingList from '../shared/ScrollingList.vue'
import StatusMessage from '../shared/StatusMessage.vue'
import { eventBus } from '@/common/eventBus'
import '@/assets/styles.css'
import '@/assets/view-shared.css'
@@ -232,7 +233,6 @@ function getPendingRewardIds(): string[] {
const triggerTask = (task: Task) => {
selectedTask.value = task
const pendingRewardIds = getPendingRewardIds()
console.log('Pending reward IDs:', pendingRewardIds)
if (pendingRewardIds.length > 0) {
showPendingRewardDialog.value = true
return
@@ -263,7 +263,7 @@ async function cancelPendingReward() {
try {
const pendingRewardIds = getPendingRewardIds()
await Promise.all(pendingRewardIds.map((id: string) => cancelRewardById(id)))
childRewardListRef.value?.refresh()
//childRewardListRef.value?.refresh()
} catch (err) {
console.error('Failed to cancel pending reward:', err)
} finally {
@@ -296,6 +296,12 @@ const confirmTriggerTask = async () => {
const triggerReward = (reward: RewardStatus) => {
if (reward.points_needed > 0) return
// If there is a pending reward and it's not this one, show the pending dialog
const pendingRewardIds = getPendingRewardIds()
if (pendingRewardIds.length > 0 && !reward.redeeming) {
showPendingRewardDialog.value = true
return
}
selectedReward.value = reward
showRewardConfirm.value = true
}
@@ -403,6 +409,7 @@ function goToAssignRewards() {
:fetchBaseUrl="`/api/child/${child?.id}/reward-status`"
itemKey="reward_status"
imageField="image_id"
:ids="rewards"
@trigger-item="triggerReward"
:getItemClass="(item) => ({ reward: true })"
>