diff --git a/webapp/components/PostTeaser/PostTeaser.spec.js b/webapp/components/PostTeaser/PostTeaser.spec.js index 1e90cd1cf..5b71347d0 100644 --- a/webapp/components/PostTeaser/PostTeaser.spec.js +++ b/webapp/components/PostTeaser/PostTeaser.spec.js @@ -25,6 +25,7 @@ describe('PostTeaser', () => { disabled: false, shoutedCount: 0, commentsCount: 0, + clickedCount: 0, name: 'It is a post', author: { id: 'u1', diff --git a/webapp/components/PostTeaser/PostTeaser.story.js b/webapp/components/PostTeaser/PostTeaser.story.js index 5fecae4db..41c34cad4 100644 --- a/webapp/components/PostTeaser/PostTeaser.story.js +++ b/webapp/components/PostTeaser/PostTeaser.story.js @@ -28,6 +28,7 @@ export const post = { shoutedCount: 5, commentedCount: 39, followedByCount: 2, + clickedCount: 42, followedByCurrentUser: true, location: null, badges: [ diff --git a/webapp/components/PostTeaser/PostTeaser.vue b/webapp/components/PostTeaser/PostTeaser.vue index bd9628452..11cb37c62 100644 --- a/webapp/components/PostTeaser/PostTeaser.vue +++ b/webapp/components/PostTeaser/PostTeaser.vue @@ -6,9 +6,9 @@ diff --git a/webapp/components/generic/SearchPost/SearchPost.spec.js b/webapp/components/generic/SearchPost/SearchPost.spec.js index 6128c006e..0fb02e395 100644 --- a/webapp/components/generic/SearchPost/SearchPost.spec.js +++ b/webapp/components/generic/SearchPost/SearchPost.spec.js @@ -15,6 +15,7 @@ describe('SearchPost.vue', () => { title: 'Post Title', commentsCount: 3, shoutedCount: 6, + clickedCount: 5, createdAt: '23.08.2019', author: { name: 'Post Author', diff --git a/webapp/components/generic/SearchPost/SearchPost.vue b/webapp/components/generic/SearchPost/SearchPost.vue index 079322097..852864370 100644 --- a/webapp/components/generic/SearchPost/SearchPost.vue +++ b/webapp/components/generic/SearchPost/SearchPost.vue @@ -5,6 +5,7 @@ + {{ option.author.name | truncate(32) }} - {{ option.createdAt | dateTime('dd.MM.yyyy') }} diff --git a/webapp/components/generic/SearchableInput/SearchableInput.story.js b/webapp/components/generic/SearchableInput/SearchableInput.story.js index 0b4a2234c..5042d0089 100644 --- a/webapp/components/generic/SearchableInput/SearchableInput.story.js +++ b/webapp/components/generic/SearchableInput/SearchableInput.story.js @@ -14,6 +14,7 @@ export const searchResults = [ value: 'User Post by Jenny', shoutedCount: 0, commentsCount: 4, + clickedCount: 8, createdAt: '2019-11-13T03:03:16.155Z', author: { id: 'u3', @@ -29,6 +30,7 @@ export const searchResults = [ value: 'Eum quos est molestiae enim magni consequuntur sed commodi eos.', shoutedCount: 0, commentsCount: 0, + clickedCount: 9, createdAt: '2019-11-13T03:00:45.478Z', author: { id: 'u6', @@ -44,6 +46,7 @@ export const searchResults = [ value: 'This is post #7', shoutedCount: 1, commentsCount: 1, + clickedCount: 1, createdAt: '2019-11-13T03:00:23.098Z', author: { id: 'u6', @@ -59,6 +62,7 @@ export const searchResults = [ value: 'This is post #12', shoutedCount: 0, commentsCount: 12, + clickedCount: 14, createdAt: '2019-11-13T03:00:23.098Z', author: { id: 'u6', diff --git a/webapp/graphql/Search.js b/webapp/graphql/Search.js index 51c23b1c6..b5c20a945 100644 --- a/webapp/graphql/Search.js +++ b/webapp/graphql/Search.js @@ -12,6 +12,7 @@ export const searchQuery = gql` ...post commentsCount shoutedCount + clickedCount author { ...user } @@ -40,6 +41,7 @@ export const searchPosts = gql` ...tagsCategoriesAndPinned commentsCount shoutedCount + clickedCount author { ...user } diff --git a/webapp/storybook/helpers.js b/webapp/storybook/helpers.js index 391c93946..aa10f34fe 100644 --- a/webapp/storybook/helpers.js +++ b/webapp/storybook/helpers.js @@ -81,6 +81,7 @@ const helpers = { slug: faker.lorem.slug(title), shoutedCount: faker.random.number(), commentsCount: faker.random.number(), + clickedCount: faker.random.number(), } }) },