Skip to content

Commit 00f9cf0

Browse files
thedarkcolourIMB11
andauthored
Fix inconsistent PAT display order (#4662)
* Fix inconsistent PAT display order Closes #4661 * Fix side effect in computed property * Fix lint --------- Co-authored-by: Calum H. <contact@cal.engineer>
1 parent 1dd7e3b commit 00f9cf0

File tree

1 file changed

+4
-1
lines changed
  • apps/frontend/src/pages/settings

1 file changed

+4
-1
lines changed

apps/frontend/src/pages/settings/pats.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
</template>
101101
</IntlFormatted>
102102
</p>
103-
<div v-for="(pat, index) in pats" :key="pat.id" class="universal-card recessed token">
103+
<div v-for="(pat, index) in displayPats" :key="pat.id" class="universal-card recessed token">
104104
<div>
105105
<div>
106106
<strong>{{ pat.name }}</strong>
@@ -332,6 +332,9 @@ const deletePatIndex = ref(null)
332332
const loading = ref(false)
333333
334334
const { data: pats, refresh } = await useAsyncData('pat', () => useBaseFetch('pat'))
335+
const displayPats = computed(() => {
336+
return pats.value.toSorted((a, b) => new Date(b.created) - new Date(a.created))
337+
})
335338
336339
async function createPat() {
337340
startLoading()

0 commit comments

Comments
 (0)