feat: update version to 1.0.4RC5, enhance notification handling and smooth scroll behavior
All checks were successful
Chore App Build and Push Docker Images / build-and-push (push) Successful in 1m11s

This commit is contained in:
2026-02-19 11:00:14 -05:00
parent 725bf518ea
commit c18d202ecc
4 changed files with 31 additions and 4 deletions

View File

@@ -2,7 +2,7 @@
# file: config/version.py # file: config/version.py
import os import os
BASE_VERSION = "1.0.4RC4" # update manually when releasing features BASE_VERSION = "1.0.4RC5" # update manually when releasing features
def get_full_version() -> str: def get_full_version() -> str:
""" """

View File

@@ -5,6 +5,7 @@
<ItemList <ItemList
v-else v-else
:key="refreshKey"
:fetchUrl="`/api/pending-rewards`" :fetchUrl="`/api/pending-rewards`"
itemKey="rewards" itemKey="rewards"
:itemFields="PENDING_REWARD_FIELDS" :itemFields="PENDING_REWARD_FIELDS"
@@ -30,20 +31,43 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' import { ref, onMounted, onUnmounted } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import ItemList from '../shared/ItemList.vue' import ItemList from '../shared/ItemList.vue'
import MessageBlock from '../shared/MessageBlock.vue' import MessageBlock from '../shared/MessageBlock.vue'
import type { PendingReward } from '@/common/models' import type { PendingReward, Event, ChildRewardRequestEventPayload } from '@/common/models'
import { PENDING_REWARD_FIELDS } from '@/common/models' import { PENDING_REWARD_FIELDS } from '@/common/models'
import { eventBus } from '@/common/eventBus'
const router = useRouter() const router = useRouter()
const notificationListCountRef = ref(-1) const notificationListCountRef = ref(-1)
const refreshKey = ref(0)
function handleNotificationClick(item: PendingReward) { function handleNotificationClick(item: PendingReward) {
router.push({ name: 'ParentView', params: { id: item.child_id } }) router.push({ name: 'ParentView', params: { id: item.child_id } })
} }
function handleRewardRequest(event: Event) {
const payload = event.payload as ChildRewardRequestEventPayload
if (
payload.operation === 'CREATED' ||
payload.operation === 'CANCELLED' ||
payload.operation === 'GRANTED'
) {
// Reset count and bump key to force ItemList to re-mount and refetch
notificationListCountRef.value = -1
refreshKey.value++
}
}
onMounted(() => {
eventBus.on('child_reward_request', handleRewardRequest)
})
onUnmounted(() => {
eventBus.off('child_reward_request', handleRewardRequest)
})
</script> </script>
<style scoped> <style scoped>

View File

@@ -16,7 +16,7 @@
<div class="email-actions"> <div class="email-actions">
<input id="email" type="email" :value="modelValue" disabled class="readonly-input" /> <input id="email" type="email" :value="modelValue" disabled class="readonly-input" />
<button type="button" class="btn-link btn-link-space" @click="goToChangeParentPin"> <button type="button" class="btn-link btn-link-space" @click="goToChangeParentPin">
Change Parent Pin Change Parent PIN
</button> </button>
<button <button
type="button" type="button"

View File

@@ -175,6 +175,9 @@ const routes = [
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(),
routes, routes,
scrollBehavior() {
return { top: 0, left: 0, behavior: 'smooth' }
},
}) })
// Auth guard // Auth guard