-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eeb7fa0
commit 57993c3
Showing
14 changed files
with
101 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/modules/CRMCore.Module.Post/Features/CreateClap/CreateClapRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using CRMCore.Module.Post.Models; | ||
|
||
namespace CRMCore.Module.Post.Features.CreateClap | ||
{ | ||
public class CreateClapRequest | ||
{ | ||
public Guid EntityId | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public EntityType Type | ||
{ | ||
get; | ||
set; | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/modules/CRMCore.Module.Post/Features/GetClap/GetClapResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
namespace CRMCore.Module.Post.Features.GetClap | ||
{ | ||
public class GetClapResponse | ||
{ | ||
public Guid Id | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public Guid EntityId | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public string OwnerName | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/modules/CRMCore.Module.Spa/src/app/posts-state/models/clap.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export class Clap { | ||
clapId: string; | ||
entityId: string; | ||
ownerName: string; | ||
} | ||
|
1 change: 1 addition & 0 deletions
1
src/modules/CRMCore.Module.Spa/src/app/posts-state/models/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './post.model'; | ||
export * from './comment.model'; | ||
export * from './clap.model'; | ||
export * from './schema'; |
7 changes: 5 additions & 2 deletions
7
src/modules/CRMCore.Module.Spa/src/app/posts-state/models/schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import { normalize, schema } from 'normalizr'; | ||
|
||
// Define a users schema | ||
export const comment = new schema.Entity('comments'); | ||
export const commentSchema = new schema.Entity('comments'); | ||
|
||
export const clapSchema = new schema.Entity('claps'); | ||
|
||
export const postSchema = new schema.Entity('posts', { | ||
comments: [ comment ] | ||
comments: [ commentSchema ], | ||
claps: [clapSchema] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ | |
</g></svg> | ||
</button> | ||
</div> | ||
<div>30<div> | ||
<div>{{NumberOfClaps}}<div> |
3 changes: 2 additions & 1 deletion
3
src/modules/CRMCore.Module.Spa/src/app/shared/components/post-clap/post-clap.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import {Component} from '@angular/core'; | ||
import {Component, Input} from '@angular/core'; | ||
@Component({ | ||
selector: 'post-clap', | ||
templateUrl: './post-clap.component.html' | ||
}) | ||
export class PostClapComponent { | ||
@Input() NumberOfClaps: number; | ||
} | ||
|