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:
parent
345caec57f
commit
4ff3dcb3fe
6 changed files with 0 additions and 7 deletions
|
@ -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(
|
||||||
|
|
|
@ -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");
|
||||||
|
|
|
@ -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");
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue