Добавлен фильтр по удаленным
This commit is contained in:
@@ -126,12 +126,6 @@
|
||||
<q-icon class="la la-meh q-mr-xs" size="28px" />
|
||||
Поиск не дал результатов
|
||||
</div>
|
||||
|
||||
<div v-show="hiddenCount" class="row">
|
||||
<div class="q-ml-lg q-py-sm clickable2 text-red" style="font-size: 120%" @click="showHiddenHelp">
|
||||
{{ hiddenResultsMessage }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -150,7 +144,6 @@ import _ from 'lodash';
|
||||
|
||||
class AuthorList extends BaseList {
|
||||
cachedAuthors = {};
|
||||
hiddenCount = 0;
|
||||
|
||||
showHiddenHelp() {
|
||||
this.$root.stdDialog.alert(`
|
||||
@@ -158,10 +151,6 @@ class AuthorList extends BaseList {
|
||||
`, 'Пояснение', {iconName: 'la la-info-circle'});
|
||||
}
|
||||
|
||||
get hiddenResultsMessage() {
|
||||
return `+${this.hiddenCount} результат${utils.wordEnding(this.hiddenCount)} скрыт${utils.wordEnding(this.hiddenCount, 2)}`;
|
||||
}
|
||||
|
||||
get foundCountMessage() {
|
||||
return `Найден${utils.wordEnding(this.list.totalFound, 2)} ${this.list.totalFound} автор${utils.wordEnding(this.list.totalFound)}`;
|
||||
}
|
||||
@@ -333,15 +322,10 @@ class AuthorList extends BaseList {
|
||||
return;
|
||||
|
||||
let num = 0;
|
||||
this.hiddenCount = 0;
|
||||
for (const rec of authors) {
|
||||
this.cachedAuthors[rec.author] = rec;
|
||||
|
||||
const count = (this.showDeleted ? rec.bookCount + rec.bookDelCount : rec.bookCount);
|
||||
if (!count) {
|
||||
this.hiddenCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
const item = reactive({
|
||||
key: rec.id,
|
||||
@@ -379,6 +363,8 @@ class AuthorList extends BaseList {
|
||||
newQuery = newQuery.setDefaults(newQuery);
|
||||
delete newQuery.setDefaults;
|
||||
newQuery.offset = (newQuery.page - 1)*newQuery.limit;
|
||||
if (!this.showDeleted)
|
||||
newQuery.del = 0;
|
||||
|
||||
if (_.isEqual(newQuery, this.prevQuery))
|
||||
return;
|
||||
|
||||
@@ -30,7 +30,7 @@ const componentOptions = {
|
||||
deep: true,
|
||||
},
|
||||
showDeleted() {
|
||||
this.updateTableData();
|
||||
this.refresh();
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -54,10 +54,10 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-if="!item.showAllBooks && isExpandedSeries(item) && item.books && !item.books.length" class="book-row row items-center">
|
||||
<!--div v-if="!item.showAllBooks && isExpandedSeries(item) && item.books && !item.books.length" class="book-row row items-center">
|
||||
<q-icon class="la la-meh q-mr-xs" size="24px" />
|
||||
Возможно у этой серии были найдены книги, помеченные как удаленные, но подходящие по критериям
|
||||
</div>
|
||||
</div-->
|
||||
|
||||
<div
|
||||
v-if="item.allBooksLoaded && item.allBooksLoaded.length != item.booksLoaded.length"
|
||||
@@ -230,6 +230,8 @@ class SeriesList extends BaseList {
|
||||
newQuery = newQuery.setDefaults(newQuery);
|
||||
delete newQuery.setDefaults;
|
||||
newQuery.offset = (newQuery.page - 1)*newQuery.limit;
|
||||
if (!this.showDeleted)
|
||||
newQuery.del = 0;
|
||||
|
||||
if (_.isEqual(newQuery, this.prevQuery))
|
||||
return;
|
||||
|
||||
@@ -90,6 +90,8 @@ class TitleList extends BaseList {
|
||||
newQuery = newQuery.setDefaults(newQuery);
|
||||
delete newQuery.setDefaults;
|
||||
newQuery.offset = (newQuery.page - 1)*newQuery.limit;
|
||||
if (!this.showDeleted)
|
||||
newQuery.del = 0;
|
||||
|
||||
if (_.isEqual(newQuery, this.prevQuery))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user