ЛР4 -лишнее

This commit is contained in:
ityurner02@mail.ru 2023-05-15 23:51:24 +04:00
parent 04fea2fcc8
commit 01d5b136ef

View File

@ -17,13 +17,9 @@
headers: [ headers: [
{ name: 'name', label: 'Название' } { name: 'name', label: 'Название' }
], ],
headersGenres: [
{ name: 'name', label: 'Жанр' }
],
selectedGenres: [], selectedGenres: [],
genreUrl: 'genre/', genreUrl: 'genre/',
genres: [], genres: []
open: []
} }
}, },
created() { created() {
@ -48,20 +44,6 @@
for(var j=0; j<genreIds.length; j++){ for(var j=0; j<genreIds.length; j++){
await this.addGenre(filmId, genreIds[j]); await this.addGenre(filmId, genreIds[j]);
} }
},
itemsGenres(genreIds) {
let result = [];
if (typeof genreIds === 'undefined') {
return;
}
this.genres.forEach(genre => {
for (let i = 0; i < genreIds.length; i++) {
if (genre.id === genreIds[i]) {
result.push(genre);
}
}
});
return result;
} }
} }
} }