This commit is contained in:
Baghi 2025-04-30 13:44:14 +03:30
parent ce54af871a
commit 5b38341d08
2 changed files with 44 additions and 11 deletions

View File

@ -1766,6 +1766,33 @@ export default {
alert("ontouchstart");
},
},
components: {
ContextMenu: defineAsyncComponent(() =>
import("@components/global/ContextMenu.vue")
),
EntityQustionsContent: defineAsyncComponent(() =>
import("@search/components/entity/components/entity-contents/EntityQustionsContent.vue")
),
Multiselect: () => import("vue-multiselect"),
// EntityQustionsContent: () =>
// import("@chat/components/entity-contents/EntityQustionsContent.vue"),
// EntityListContent: () =>
// import("@chat/components/entity-contents/EntityListContent.vue"),
// EntitySliderContent: () =>
// import("@chat/components/entity-contents/EntitySliderContent.vue"),
// EntityTextContent: () =>
// import("@chat/components/entity-contents/EntityTextContent.vue"),
// EntitySliderContentTwo: () =>
// import("@chat/components/entity-contents/EntitySliderContentTwo.vue"),
// EntityHorizontalListContent: () =>
// import(
// "@chat/components/entity-contents/EntityHorizontalListContent.vue"
// ),
// EntityFishContent: () =>
// import("@chat/components/entity-contents/EntityFishContent.vue"),
},
};
</script>
<style lang="scss">

View File

@ -533,7 +533,7 @@
<svg class="icon icon-Component-112--1">
<use xlink:href="#icon-Component-112--1"></use>
</svg>
{{ groupItem.seen_messages?.count }}
{{ groupItem?.seen_messages?.count }}
</button>
<!-- replay info -->
@ -683,7 +683,7 @@
<svg class="icon icon-Component-112--1">
<use xlink:href="#icon-Component-112--1"></use>
</svg>
{{ lobby.seen_messages.count }}
{{ lobby?.seen_messages?.count }}
</button>
<!-- replay info -->
@ -1621,7 +1621,7 @@ export default {
},
getGroupTypes() {
let url = chatApi.forms.groupTypes;
console.log("🚀 ~ getGroupTypes ~ url:", url);
// console.log("🚀 ~ getGroupTypes ~ url:", url);
this.httpService.postRequest("keyvalue/" + url).then((response) => {
this.groupfilters = response.data;
});
@ -1735,7 +1735,7 @@ export default {
this.groups = response.data;
this.users = response.users;
// this.pagination = { ...this.pagination, ...response.pagination };
if (this.redirectViaInviteLink) {
this.groups.forEach((group, index) => {
if (
@ -1746,30 +1746,34 @@ export default {
// group.active = true;
group["redirectViaInviteLink"] = true;
this.SET_LIST(group);
// console.log("🟢 ~ this.groups.forEach ~ group:", group)
}
});
}
// when redirecting from other pages(jahat).
else if (this.isRedirectedFromOtherSystems) {
this.groups.forEach((group) => {
if (group.id == this.groupId) {
group.active = true;
this.SET_LIST(group);
// console.log("🟢 ~ this.groups.forEach ~ group:", group)
} else if (group.reference_id == this.groupId) {
this.groupId = group.id;
group.active = true;
this.SET_LIST(group);
// console.log("🟢 ~ this.groups.forEach ~ group:", group)
}
});
} else if (typeof this.getForwardItem == "object") {
let isExist = false;
if (this.$route.name == "privates") {
this.groups.forEach((group, index) => {
if (group.user == this.groupId) {
isExist = true;
group.active = true;
// console.log("🟢 ~ this.groups.forEach ~ group:", group)
this.SET_LIST(group);
this.prevSelectedItemIndex = index;
}
@ -1780,11 +1784,12 @@ export default {
isExist = true;
group.active = true;
this.SET_LIST(group);
// console.log("🟢 ~ this.groups.forEach ~ group:", group)
this.prevSelectedItemIndex = index;
}
});
}
// if current user does not already has open chat.
if (!isExist) {
this.groupModel = {
@ -1792,9 +1797,10 @@ export default {
...this.getForwardItem.from,
};
this.groupModel.active = true;
this.groups.push(this.groupModel);
this.SET_LIST(this.groupModel);
// console.log("🟢 ~ this.groups.forEach ~ group:", this.groupModel)
this.prevSelectedItemIndex = this.groups.length - 1;
}
@ -1955,7 +1961,7 @@ export default {
getListOnScroll() {
debugger;
const listType = this.$route.name;
console.log("🚀 ~ getListOnScroll ~ listType:", listType);
// console.log("🚀 ~ getListOnScroll ~ listType:", listType);
let url = "message/" + chatApi[listType].list;
// let urlPrefix = chatApi.groups.list;
@ -1968,11 +1974,11 @@ export default {
// const methodType = listType == "unReads" ? 'postRequest' : 'getRequest'
const tempGroupFilter = this.selectedGroupFilter;
console.log("🚀 ~ getListOnScroll ~ tempGroupFilter:", tempGroupFilter);
// console.log("🚀 ~ getListOnScroll ~ tempGroupFilter:", tempGroupFilter);
const payload = {
type: tempGroupFilter.map((item) => item.id),
};
console.log("🚀 ~ getListOnScroll ~ url:", url);
// console.log("🚀 ~ getListOnScroll ~ url:", url);
this.httpService
.postRequest(url, payload)