mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-26 21:41:50 +00:00
fix: ordering when refetching applications
This commit is contained in:
parent
c905effd92
commit
c122c65a61
1 changed files with 10 additions and 2 deletions
|
|
@ -20,7 +20,11 @@
|
||||||
|
|
||||||
const getCandidates = async () => {
|
const getCandidates = async () => {
|
||||||
try {
|
try {
|
||||||
candidates = await apiListCandidates(undefined, {field: activeFilter.filter});
|
// TODO: more generic implementation
|
||||||
|
candidates = await apiListCandidates(
|
||||||
|
undefined,
|
||||||
|
activeFilter.filter !== undefined ? { field: activeFilter.filter } : undefined
|
||||||
|
);
|
||||||
} catch {
|
} catch {
|
||||||
pushErrorText('Nepodařilo se načíst uchazeče');
|
pushErrorText('Nepodařilo se načíst uchazeče');
|
||||||
}
|
}
|
||||||
|
|
@ -155,7 +159,11 @@
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<Table showCreatedAt={activeFilter.class === 'Chronologicky'} candidates={candidatesTable} on:delete={(event) => deleteCandidate(event.detail.id)} />
|
<Table
|
||||||
|
showCreatedAt={activeFilter.class === 'Chronologicky'}
|
||||||
|
candidates={candidatesTable}
|
||||||
|
on:delete={(event) => deleteCandidate(event.detail.id)}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue