-
Hello

diff --git a/frontend/src/views/SubjectList.vue b/frontend/src/views/SubjectList.vue index 1aeadc9e..dead9d7f 100644 --- a/frontend/src/views/SubjectList.vue +++ b/frontend/src/views/SubjectList.vue @@ -1,8 +1,8 @@ @@ -21,17 +22,29 @@ import { mapGetters } from 'vuex' import Tile from '@/components/Tile' import TilesContainer from '@/components/Tile/Container' +import FilterSearch from '@/components/Search/Filter' export default { name: 'subjectList', + data() { + return { + search: '' + } + }, computed: { ...mapGetters('subject', { subjects: 'subjectList' - }) + }), + filtered() { + const lower = this.search.toLowerCase() + return this.subjects + .filter(item => item.code.toLowerCase().match(lower) || item.name.toLowerCase().match(lower)) + } }, components: { Tile, - TilesContainer + TilesContainer, + FilterSearch } } diff --git a/frontend/src/views/course/index.vue b/frontend/src/views/course/index.vue index 60d53cc7..7f3e477b 100644 --- a/frontend/src/views/course/index.vue +++ b/frontend/src/views/course/index.vue @@ -13,12 +13,12 @@