Skip to content

Commit

Permalink
Merge branch 'master' into QUiZ-165
Browse files Browse the repository at this point in the history
  • Loading branch information
trungdong11 authored Nov 28, 2024
2 parents be17b10 + f52aa06 commit 6231e6e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/group/Activity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ const handleReactPost = (postId: string) => {
<AvatarFallback v-if="item.member.name">{{
item?.member?.name.charAt(0).toUpperCase()
}}</AvatarFallback>
<AvatarFallback>{{ item.member.name.charAt(0).toUpperCase() }}</AvatarFallback>
</Avatar>
<div class="flex flex-col gap-0">
<div class="flex items-center gap-2">
Expand Down Expand Up @@ -204,6 +205,8 @@ const handleReactPost = (postId: string) => {
<AvatarImage :src="item.member?.avatar" />
<AvatarFallback v-if="item.member.name">{{
item?.member?.name.charAt(0).toUpperCase()
<AvatarFallback>{{

Check failure on line 208 in src/components/group/Activity.vue

View workflow job for this annotation

GitHub Actions / type-check

Property assignment expected.
item.member.name.charAt(0).toUpperCase()
}}</AvatarFallback>
</Avatar>
<p class="text-sm text-gray-500">{{ item.member.name }}</p>
Expand Down Expand Up @@ -252,6 +255,8 @@ const handleReactPost = (postId: string) => {
v-else
class="text-slate-500 i-solar-like-broken h-5 w-5"
></span>
<div class="flex items-center gap-1 cursor-pointer">
<span class="text-slate-500 i-solar-like-broken h-5 w-5"></span>
<p class="font-x text-slate-600">{{ item.react_count }} Likes</p>
</div>
<div class="flex items-center gap-1 cursor-pointer">
Expand All @@ -268,6 +273,7 @@ const handleReactPost = (postId: string) => {
:id-post="item.id"
/>
<ListComment :id-post="item.id" />
<FormSend :member="item.member" />
</div>
</Card>
</div>
Expand Down
16 changes: 16 additions & 0 deletions src/components/group/comment/FormSend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ const onSubmit = async () => {
</Avatar>
<Input
v-model="content"

const props = defineProps<{
member: any
}>()
</script>
<template>
<div class="flex items-center justify-between p-6 gap-12 w-full">
<div class="flex items-center gap-2 w-full">
<Avatar>
<AvatarImage :src="props.member.avatar" />
<AvatarFallback>{{ props.member.name.charAt(0).toUpperCase() }}</AvatarFallback>
</Avatar>
<Input

placeholder="Write your comment..."
class="outline-none items-center h-11 border rounded-full px-6 py-3 text-sm font-normal text-gray-600"
/>
Expand All @@ -96,6 +110,8 @@ const onSubmit = async () => {
</div>
</div>
</form>
</div>

</template>

<style lang="scss" scoped></style>
3 changes: 3 additions & 0 deletions src/components/group/modal/MCreatePost.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ const onSubmit = async () => {
}
await postStore.createPost(idGroup, data)
emits('created')
isLoading.value = false
closeModal()
emits('created')
isLoading.value = false
Expand Down Expand Up @@ -213,6 +215,7 @@ const handleRemoveQuizzfly = () => {
<Avatar class="h-7 w-7">
<AvatarImage :src="quizzflyShared.avatar" />
<AvatarFallback v-if="quizzflyShared.username">{{
<AvatarFallback>{{

Check failure on line 218 in src/components/group/modal/MCreatePost.vue

View workflow job for this annotation

GitHub Actions / type-check

Property assignment expected.
quizzflyShared.username.charAt(0).toUpperCase()
}}</AvatarFallback>
</Avatar>
Expand Down
1 change: 1 addition & 0 deletions src/services/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const commentPostApi = async (
idPost: string,
data: any,
): Promise<BaseResponse<IComment>> => {
export const commentPostApi = async (idPost: string, data: any): Promise<BaseResponse<IPost>> => {
return $api(`/posts/${idPost}/comments`, {
method: 'POST',
body: data,
Expand Down

0 comments on commit 6231e6e

Please sign in to comment.