Skip to content

Commit

Permalink
Merge pull request #360 from AOEpeople/update/#260438-tv-loading
Browse files Browse the repository at this point in the history
Update/#260438 tv loading
  • Loading branch information
MalibusParty authored Oct 19, 2023
2 parents 3359c1e + 7310f10 commit 61d9463
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ node_modules

/src/Resources/style/output.css
/**/*.d.ts
src/Resources/style/output.css.map
/src/Resources/style/output.css.map
4 changes: 2 additions & 2 deletions src/Resources/src/api/getShowParticipations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const participationsState = reactive<IParticipationsState>({
});

/**
* State that contains wether the participationsState was successfully loaded, if not an error is set
* State that contains wether the participationsState was successfully loaded, if no error is set
*/
const loadedState = reactive<ILoadedState>({
loaded: false,
Expand All @@ -75,7 +75,7 @@ async function fetchParticipations() {

await request();
if (listData.value !== null && listData.value !== undefined && error.value === false) {
loadedState.error = "";
loadedState.error = '';
participationsState.data = listData.value.data;
participationsState.day = listData.value.day;
participationsState.meals = listData.value.meals;
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/src/views/ParticipantsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class="mx-auto"
/>
<NoParticipations
v-if="Object.entries(participationsState.meals).length === 0"
v-if="Object.entries(participationsState.meals).length === 0 && loadedState.loaded === true"
:day="participationsState.day"
/>
<MealOverview
Expand All @@ -34,7 +34,7 @@ import { useComponentHeights } from '@/services/useComponentHeights';
const progress = useProgress().start();
const { participationsState, loadShowParticipations, activatePeriodicFetch, disablePeriodicFetch } = getShowParticipations();
const { participationsState, loadShowParticipations, activatePeriodicFetch, disablePeriodicFetch, loadedState } = getShowParticipations();
const { addWindowHeightListener, removeWindowHeightListener } = useComponentHeights();
onMounted(async () => {
Expand Down
Loading

0 comments on commit 61d9463

Please sign in to comment.