Remove use of async components

When async components are added dynamically to the tree via v-for list
that change their order and position gets messed up.  I am not sure what
causes this, so I will just work around the issue for now and not use
async components.

Components that need async data loaded will instead depend on the parent
page fetching this data during its setup.
This commit is contained in:
Hornwitser 2025-07-16 18:59:11 +02:00
parent 345caec57f
commit 4ff3dcb3fe
6 changed files with 0 additions and 7 deletions

View file

@ -29,7 +29,6 @@ defineProps<{
edit?: boolean edit?: boolean
}>(); }>();
const usersStore = useUsersStore(); const usersStore = useUsersStore();
await usersStore.fetch();
const assignedIds = defineModel<Set<number>>({ required: true }); const assignedIds = defineModel<Set<number>>({ required: true });
const assigned = computed( const assigned = computed(
() => [...assignedIds.value].map( () => [...assignedIds.value].map(

View file

@ -53,7 +53,6 @@ defineProps<{
const accountStore = useAccountStore(); const accountStore = useAccountStore();
const usersStore = useUsersStore(); const usersStore = useUsersStore();
await usersStore.fetch();
function formatTime(time: DateTime) { function formatTime(time: DateTime) {
return time.toFormat("yyyy-LL-dd HH:mm"); return time.toFormat("yyyy-LL-dd HH:mm");

View file

@ -27,9 +27,7 @@ defineProps<{
shift: ClientScheduleShift shift: ClientScheduleShift
}>() }>()
const accountStore = useAccountStore();
const usersStore = useUsersStore(); const usersStore = useUsersStore();
await usersStore.fetch();
function formatTime(time: DateTime) { function formatTime(time: DateTime) {
return time.toFormat("yyyy-LL-dd HH:mm"); return time.toFormat("yyyy-LL-dd HH:mm");

View file

@ -215,7 +215,6 @@ interface Gap {
const accountStore = useAccountStore(); const accountStore = useAccountStore();
const usersStore = useUsersStore(); const usersStore = useUsersStore();
await usersStore.fetch();
const schedule = await useSchedule(); const schedule = await useSchedule();
const oneDayMs = 24 * 60 * 60 * 1000; const oneDayMs = 24 * 60 * 60 * 1000;

View file

@ -209,7 +209,6 @@ interface Gap {
const accountStore = useAccountStore(); const accountStore = useAccountStore();
const usersStore = useUsersStore(); const usersStore = useUsersStore();
await usersStore.fetch();
const schedule = await useSchedule(); const schedule = await useSchedule();
const oneDayMs = 24 * 60 * 60 * 1000; const oneDayMs = 24 * 60 * 60 * 1000;

View file

@ -55,7 +55,6 @@
<script lang="ts" setup> <script lang="ts" setup>
useEventSource(); useEventSource();
const usersStore = useUsersStore(); const usersStore = useUsersStore();
await usersStore.fetch();
async function saveUser(user: ClientUser) { async function saveUser(user: ClientUser) {
try { try {