-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Achievements #1357 #1370
Merged
Merged
Achievements #1357 #1370
Changes from all commits
Commits
Show all changes
94 commits
Select commit
Hold shift + click to select a range
b78dd20
add tab zdobuvachi
Olya-web7 14e2d9d
fix
Olya-web7 edb40dd
fix
Olya-web7 ab7dbf2
fix routing for create achievment
Olya-web7 73e0bfe
fix styles
Olya-web7 158bacb
fix
Olya-web7 26d9e46
fix tests
Olya-web7 33e1062
fix tests
Olya-web7 14476cb
fix tests
Olya-web7 9166483
fix tests
Olya-web7 546a530
add teachers list
Olya-web7 8c0e40f
fix
Olya-web7 9eccca5
add date
Olya-web7 7c16878
add opis
Olya-web7 321f3f6
fix tests
Olya-web7 0bf8061
fix
Olya-web7 70b930a
fix
Olya-web7 2f7bd38
fix
Olya-web7 d64f13c
add achievements component
Olya-web7 a33fbf0
add achievements service
Olya-web7 224fa93
fix
Olya-web7 81fe44c
achievement service
Olya-web7 de10443
fix
Olya-web7 b8c9300
fix
Olya-web7 1bee767
fix
Olya-web7 abadc72
fix
Olya-web7 60ffbbd
fix
Olya-web7 c8da8cb
Merge branch 'develop' into achievements
Olya-web7 16a4b34
fix
Olya-web7 d8931c0
Merge branch 'achievements' of https://github.com/ita-social-projects…
Olya-web7 f9b8385
fix
Olya-web7 faf9bd3
fix
Olya-web7 1c23eca
fix
Olya-web7 b9c1cc5
fix on comments
Olya-web7 937be48
fix on comments
Olya-web7 ab35bde
fix on comments
Olya-web7 2ebb646
fix on comments
Olya-web7 a0e128a
fix on comments
Olya-web7 bec364f
fix on comments
Olya-web7 29256e9
fix on comments
Olya-web7 f3154f4
fix on comments
Olya-web7 9f24178
fix on comments
Olya-web7 d589692
Merge branch 'develop' into achievements
Olya-web7 d06707d
add gormgroup
Olya-web7 d9b60e1
Merge branch 'achievements' of https://github.com/ita-social-projects…
Olya-web7 10a7fb2
achievement-card tests fix
Olya-web7 48261f4
fix
Olya-web7 2929dca
fix
Olya-web7 9407f70
fix
Olya-web7 5fb519a
fix
Olya-web7 161300a
Merge branch 'develop' into achievements
Olya-web7 a45ed49
fix
Olya-web7 1d57b16
Merge branch 'achievements' of https://github.com/ita-social-projects…
Olya-web7 1ad145a
fix
Olya-web7 d235d11
fix
Olya-web7 b8b2d04
fix
Olya-web7 2d67852
fix
Olya-web7 8d1ce3f
fix
Olya-web7 c7c85fa
fix
Olya-web7 4eb392b
fix
Olya-web7 ea5a98b
fix
Olya-web7 182d76f
fix
Olya-web7 5e8ff13
fix
Olya-web7 d543698
fix
Olya-web7 277fccd
fix
Olya-web7 dbd4657
fix
Olya-web7 c3e758c
fix
Olya-web7 f37af15
fix
Olya-web7 eb34166
Merge branch 'develop' into achievements
Olya-web7 edb40c4
fix
Olya-web7 e97e0a2
fix
Olya-web7 78dfbb7
fix
Olya-web7 cbf0f64
fix
Olya-web7 98d6995
fix
Olya-web7 b5ea655
fix
Olya-web7 d705ea5
fix
Olya-web7 ebe8e27
fix
Olya-web7 b0b20da
fix tests
Olya-web7 722e4a8
fix create achievement
Olya-web7 7316aaa
fix
Olya-web7 2a126ad
fix
Olya-web7 895a6d1
fix
Olya-web7 fba2e6b
Merge branch 'develop' into achievements
Olya-web7 75bec95
chng the matselect ui
Olya-web7 758adb8
fix tests
Olya-web7 4d2f654
add remove function
Olya-web7 095dad0
Merge branch 'develop' into achievements
Olya-web7 df7d638
add remove function
Olya-web7 467c755
Merge branch 'achievements' of https://github.com/ita-social-projects…
Olya-web7 98c9e71
fix
Olya-web7 eed0f28
fix
Olya-web7 9071659
fix
Olya-web7 27c2b0f
Merge branch 'develop' into achievements
Olya-web7 ddc8532
fix
Olya-web7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/app/shared/components/achievement-card/achievement-card/achievement-card.component.html
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 @@ | ||
<mat-card class="position"> | ||
<div class="card" fxLayout="column" fxLayoutAlign="start space-between"> | ||
<div class="wrap-for-details"> | ||
<mat-card-header> | ||
<mat-card-title showTooltipIfTruncated matTooltipClass="tooltip" | ||
class="card-title">title</mat-card-title> | ||
</mat-card-header> | ||
<mat-card-content fxLayout="column" fxLayoutAlign="space-between start"> | ||
<p class="card_text">description</p> | ||
</mat-card-content> | ||
</div> | ||
</div> | ||
</mat-card> |
Empty file.
37 changes: 37 additions & 0 deletions
37
...pp/shared/components/achievement-card/achievement-card/achievement-card.component.spec.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,37 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { MatButtonModule } from '@angular/material/button'; | ||
import { MatCardModule } from '@angular/material/card'; | ||
import { MatIconModule } from '@angular/material/icon'; | ||
import { RouterTestingModule } from '@angular/router/testing'; | ||
import { NgxsModule } from '@ngxs/store'; | ||
|
||
import { AchievementCardComponent } from './achievement-card.component'; | ||
|
||
describe('AchievementCardComponent', () => { | ||
let component: AchievementCardComponent; | ||
let fixture: ComponentFixture<AchievementCardComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [ | ||
MatCardModule, | ||
MatButtonModule, | ||
NgxsModule.forRoot([]), | ||
RouterTestingModule, | ||
MatIconModule | ||
], | ||
declarations: [ AchievementCardComponent ] | ||
}) | ||
.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(AchievementCardComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
15 changes: 15 additions & 0 deletions
15
src/app/shared/components/achievement-card/achievement-card/achievement-card.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { Achievement } from 'src/app/shared/models/achievement.model'; | ||
|
||
@Component({ | ||
selector: 'app-achievement-card', | ||
templateUrl: './achievement-card.component.html', | ||
styleUrls: ['./achievement-card.component.scss'], | ||
}) | ||
export class AchievementCardComponent implements OnInit { | ||
@Input() achievement: Achievement; | ||
|
||
constructor() {} | ||
|
||
ngOnInit(): void {} | ||
} |
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
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 @@ | ||
|
||
export class Achievement { | ||
id?: string; | ||
title: string; | ||
achievementDate: string; | ||
workshopId: string; | ||
achievementTypeId: number; | ||
childrenIDs?: string[]; | ||
teachers?: string[]; | ||
|
||
constructor(info, workshopId, childrenIDs, teachers) { | ||
this.title = info.title, | ||
this.achievementDate = info.achievementDate, | ||
this.workshopId = workshopId; | ||
this.achievementTypeId = info.achievementTypeId, | ||
this.childrenIDs = childrenIDs, | ||
this.teachers = teachers; | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
src/app/shared/services/achievements/achievements.service.spec.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,19 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
|
||
import { AchievementsService } from './achievements.service'; | ||
import { HttpClientTestingModule } from '@angular/common/http/testing'; | ||
|
||
describe('AchievementsService', () => { | ||
let service: AchievementsService; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [HttpClientTestingModule], | ||
}); | ||
service = TestBed.inject(AchievementsService); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(service).toBeTruthy(); | ||
}); | ||
}); |
21 changes: 21 additions & 0 deletions
21
src/app/shared/services/achievements/achievements.service.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,21 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { HttpClient } from '@angular/common/http'; | ||
import { Observable } from 'rxjs'; | ||
import { Achievement } from '../../models/achievement.model'; | ||
|
||
@Injectable({ | ||
providedIn: 'root', | ||
}) | ||
export class AchievementsService { | ||
constructor(private http: HttpClient) {} | ||
|
||
getAchievementsByWorkshopId(id: string): Observable<Achievement[]> { | ||
return this.http.get<Achievement[]>( | ||
`/api/v1//api/v1/Achievement/GetByWorkshopId/${id}` | ||
); | ||
} | ||
|
||
createAchievement(achievement: Achievement): Observable<object> { | ||
return this.http.post('/api/v1/Achievement/Create', achievement, { observe: 'response' }); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -6,11 +6,16 @@ import { Provider } from '../models/provider.model'; | |
import { User } from '../models/user.model'; | ||
import { Workshop, WorkshopCard } from '../models/workshop.model'; | ||
import { ProviderAdmin } from '../models/providerAdmin.model'; | ||
import { Achievement } from '../models/achievement.model'; | ||
|
||
export class GetWorkshopsByProviderId { | ||
static readonly type = '[user] get Workshops By Provider Id'; | ||
constructor(public payload: string) { } | ||
} | ||
export class GetAchievementsByWorkshopId { | ||
static readonly type = '[user] get Achievements By Wokrshop Id'; | ||
constructor(public payload) { } | ||
} | ||
export class GetWorkshopById { | ||
static readonly type = '[user] get Workshop By Wokrshop Id'; | ||
constructor(public payload: string) { } | ||
|
@@ -150,6 +155,18 @@ export class OnDeleteProviderAdminFail { | |
static readonly type = '[user] delete Provider Admin fail'; | ||
constructor(public payload) { } | ||
} | ||
export class CreateAchievement { | ||
static readonly type = '[user] create Achievement'; | ||
constructor(public payload: Achievement) {} | ||
} | ||
export class OnCreateAchievementFail { | ||
static readonly type = '[user] create Achievement fail'; | ||
constructor(public payload: HttpErrorResponse) {} | ||
} | ||
export class OnCreateAchievementSuccess { | ||
static readonly type = '[user] create Achievement success'; | ||
constructor(public payload) {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add typo Achievement |
||
} | ||
export class CreateApplication { | ||
static readonly type = '[user] create Application'; | ||
constructor(public payload: Application) { } | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo Achievement