<!--
La boite de dialogue 'RefreshNeeded' est supposé s'afficher dès lors
que l'accessProfile est modifié.
-->

<template>
  <div>
    <h1>POC Refresh Needed</h1>

    <LayoutDialogRefreshNeeded />

    <v-btn @click="onUpdateClick">Update profile</v-btn>
  </div>
</template>

<script setup lang="ts">
import { useAccessProfileStore } from '~/stores/accessProfile'

definePageMeta({
  layout: false,
})

const accessProfile = useAccessProfileStore()

const onUpdateClick = () => {
  accessProfile.setActivityYear(accessProfile.activityYear + 1)
  console.log('activity year updated to ' + accessProfile.activityYear)
}
</script>
