Display correct profile filter when none is chosen yet
This commit is contained in:
parent
c50b19d0d7
commit
4d3ab9ce39
|
|
@ -1,5 +1,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
||||||
|
import { COURSE_PROFILE_ALL_FILTER } from "@/constants";
|
||||||
import type { DropdownSelectable } from "@/types";
|
import type { DropdownSelectable } from "@/types";
|
||||||
import { useTranslation } from "i18next-vue";
|
import { useTranslation } from "i18next-vue";
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
|
@ -21,7 +22,10 @@ const selectedItem = computed(() => {
|
||||||
if (props.selected) {
|
if (props.selected) {
|
||||||
return { id: props.selected || "", name: t(`profile.${props.selected}`) };
|
return { id: props.selected || "", name: t(`profile.${props.selected}`) };
|
||||||
}
|
}
|
||||||
return { id: "", name: "" };
|
return {
|
||||||
|
id: COURSE_PROFILE_ALL_FILTER,
|
||||||
|
name: t(`profile.${COURSE_PROFILE_ALL_FILTER}`),
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const updateFilter = (e: DropdownSelectable) => {
|
const updateFilter = (e: DropdownSelectable) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue