From dc2d5cc460d983ddcb1b302f238070a79d818135 Mon Sep 17 00:00:00 2001 From: mustafa-rezae Date: Sat, 3 May 2025 17:12:25 +0330 Subject: [PATCH] Debug and refactor --- components/haditha/CardList.vue | 1 + components/haditha/search-page/SearchList.vue | 7 +- pages/haditha/favorites/index.vue | 206 ++++++------------ pages/haditha/library/[id]/[slug]/index.vue | 128 +++++------ pages/haditha/library/index.vue | 59 ++--- pages/haditha/search/[id]/[slug]/index.vue | 3 + pages/haditha/search/index.vue | 73 +++---- 7 files changed, 187 insertions(+), 290 deletions(-) diff --git a/components/haditha/CardList.vue b/components/haditha/CardList.vue index 8b36b42..93767ae 100644 --- a/components/haditha/CardList.vue +++ b/components/haditha/CardList.vue @@ -69,6 +69,7 @@ const goToLibraryShow = (item) => {

{{ item?._source?.title }}

+ جلد {{ item?._source?.vol_title + item?._source?.vol_num }}

diff --git a/components/haditha/search-page/SearchList.vue b/components/haditha/search-page/SearchList.vue index bcd42df..c15de52 100644 --- a/components/haditha/search-page/SearchList.vue +++ b/components/haditha/search-page/SearchList.vue @@ -20,6 +20,7 @@ const props = defineProps({ default: "", }, }); +const emit = defineEmits(["on-bookmard-removed"]); const router = useRouter(); const route = useRoute(); @@ -76,6 +77,7 @@ const removeFromFavorites = async (item = {}, index = 0) => { title: item?._source?.title, }; httpService.postRequest(url, formData).then((res) => { + emit("on-bookmard-removed", index); // this.updateListAnswer(index, "tbookmark", 0); }); }; @@ -104,7 +106,7 @@ const removeFromFavorites = async (item = {}, index = 0) => { { id: item?._source?.address.vol_id, slug: hadithAddress(item), }, + query: { + page_num: item?._source?.address?.page_num, + }, }" color="neutral" variant="outline" diff --git a/pages/haditha/favorites/index.vue b/pages/haditha/favorites/index.vue index 2a29e2b..26c1889 100644 --- a/pages/haditha/favorites/index.vue +++ b/pages/haditha/favorites/index.vue @@ -1,5 +1,8 @@