-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(account-feature-about): adiciona página pública para usuário
closed #77
- Loading branch information
Showing
61 changed files
with
620 additions
and
92 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './lib/account.providers'; | ||
export * from './lib/application'; | ||
export * from './lib/resolvers'; | ||
export * from './lib/dtos'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './to-user-schema'; |
13 changes: 13 additions & 0 deletions
13
packages/account/data-access/src/lib/mappers/to-user-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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { AboutUserSchema, User } from '@devmx/shared-api-interfaces'; | ||
|
||
export function toAboutUserSchema(user: User): AboutUserSchema { | ||
return { | ||
'@context': 'https://schema.org', | ||
'@type': 'Person', | ||
name: user.displayName, | ||
// image: 'janedoe.jpg', | ||
// jobTitle: 'Professor', | ||
email: `mailto:${user.contact.email}`, | ||
url: `https://devparana.mx/sobre/${user.name}`, | ||
}; | ||
} |
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
15 changes: 15 additions & 0 deletions
15
packages/account/data-access/src/lib/resolvers/about-user-resolver-wrapped.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,15 @@ | ||
import { Params } from '@devmx/shared-api-interfaces'; | ||
import { distinctUntilChanged, filter } from 'rxjs'; | ||
import { UserFacade } from '../application'; | ||
|
||
export const aboutUserResolverWrapped = ( | ||
facade: UserFacade, | ||
params: Params | ||
) => { | ||
facade.loadOneByName(params['name']); | ||
|
||
return facade.selected$.pipe( | ||
distinctUntilChanged(), | ||
filter((event) => !!event) | ||
); | ||
}; |
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,2 @@ | ||
export * from './about-user-resolver-wrapped'; | ||
export * from './user-schema-resolver-wrapped'; |
15 changes: 15 additions & 0 deletions
15
packages/account/data-access/src/lib/resolvers/user-schema-resolver-wrapped.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,15 @@ | ||
import { Params } from '@devmx/shared-api-interfaces'; | ||
import { distinctUntilChanged, filter } from 'rxjs'; | ||
import { UserFacade } from '../application'; | ||
|
||
export const userSchemaResolverWrapped = ( | ||
facade: UserFacade, | ||
params: Params | ||
) => { | ||
facade.loadOneByName(params['name']); | ||
|
||
return facade.schema$.pipe( | ||
distinctUntilChanged(), | ||
filter((user) => !!user) | ||
); | ||
}; |
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
10 changes: 10 additions & 0 deletions
10
packages/account/domain/src/client/use-cases/find-user-by-name.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,10 @@ | ||
import { UseCase, User } from '@devmx/shared-api-interfaces'; | ||
import { UserService } from '../services'; | ||
|
||
export class FindUserByNameUseCase implements UseCase<string, User | null> { | ||
constructor(private userService: UserService) {} | ||
|
||
execute(name: string) { | ||
return this.userService.findOneByName(name); | ||
} | ||
} |
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,11 +1,12 @@ | ||
export * from './create-user'; | ||
export * from './delete-user'; | ||
export * from './find-user-by-id'; | ||
export * from './find-users'; | ||
export * from './load-authentication'; | ||
export * from './send-user-code'; | ||
export * from './update-password'; | ||
export * from './update-profile'; | ||
export * from './update-roles'; | ||
export * from './update-social'; | ||
export * from './validate-user-code'; | ||
export * from './create-user'; | ||
export * from './delete-user'; | ||
export * from './find-user-by-id'; | ||
export * from './find-user-by-name'; | ||
export * from './find-users'; | ||
export * from './load-authentication'; | ||
export * from './send-user-code'; | ||
export * from './update-password'; | ||
export * from './update-profile'; | ||
export * from './update-roles'; | ||
export * from './update-social'; | ||
export * from './validate-user-code'; |
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
10 changes: 10 additions & 0 deletions
10
packages/account/domain/src/server/use-cases/find-user-by-name.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,10 @@ | ||
import { UseCase, User } from '@devmx/shared-api-interfaces'; | ||
import { UsersService } from '../services'; | ||
|
||
export class FindUserByNameUseCase implements UseCase<string, User | null> { | ||
constructor(private usersService: UsersService) {} | ||
|
||
async execute(name: string) { | ||
return this.usersService.findByName(name); | ||
} | ||
} |
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,10 +1,11 @@ | ||
export * from './authentication'; | ||
export * from './create-user'; | ||
export * from './delete-user'; | ||
export * from './find-user-by-id'; | ||
export * from './find-users'; | ||
export * from './send-user-code'; | ||
export * from './update-password'; | ||
export * from './update-profile'; | ||
export * from './update-roles'; | ||
export * from './update-social'; | ||
export * from './authentication'; | ||
export * from './create-user'; | ||
export * from './delete-user'; | ||
export * from './find-user-by-id'; | ||
export * from './find-user-by-name'; | ||
export * from './find-users'; | ||
export * from './send-user-code'; | ||
export * from './update-password'; | ||
export * from './update-profile'; | ||
export * from './update-roles'; | ||
export * from './update-social'; |
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,42 @@ | ||
{ | ||
"extends": ["../../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
"extends": [ | ||
"plugin:@nx/angular", | ||
"plugin:@angular-eslint/template/process-inline-templates" | ||
], | ||
"rules": { | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"type": "attribute", | ||
"prefix": "devmx", | ||
"style": "camelCase" | ||
} | ||
], | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"type": "element", | ||
"prefix": "devmx", | ||
"style": "kebab-case" | ||
} | ||
], | ||
"@angular-eslint/component-class-suffix": [ | ||
"error", | ||
{ | ||
"suffixes": ["Component", "Container", "Dialog"] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.html"], | ||
"extends": ["plugin:@nx/angular-template"], | ||
"rules": {} | ||
} | ||
] | ||
} |
Oops, something went wrong.