-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat.remove-user-from-team
- Loading branch information
Showing
35 changed files
with
11,932 additions
and
31,683 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v18 | ||
v20 |
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 +1 @@ | ||
v18 | ||
v20 |
Large diffs are not rendered by default.
Oops, something went wrong.
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 +1 @@ | ||
v18 | ||
v20 |
Large diffs are not rendered by default.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
interfaces/Portalicious/src/app/domains/payment/payment.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
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
55 changes: 55 additions & 0 deletions
55
interfaces/Portalicious/src/app/domains/registration/registration.api.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,55 @@ | ||
import { HttpParams } from '@angular/common/http'; | ||
import { Injectable, Signal } from '@angular/core'; | ||
import { DomainApiService } from '~/domains/domain-api.service'; | ||
import { Registration } from '~/domains/registration/registration.model'; | ||
|
||
const BASE_ENDPOINT = (projectId: Signal<number>) => [ | ||
'programs', | ||
projectId, | ||
'registrations', | ||
]; | ||
|
||
@Injectable({ | ||
providedIn: 'root', | ||
}) | ||
export class RegistrationApiService extends DomainApiService { | ||
getManyByQuery(projectId: Signal<number>) { | ||
// XXX: the query shouldn't be defined here. This should be removed / refactored when the registrations page is built. | ||
let params = new HttpParams(); | ||
params = params.append('limit', 10); | ||
params = params.append('page', 1); | ||
|
||
return this.generateQueryOptions<{ | ||
data: Registration[]; | ||
}>({ | ||
path: [...BASE_ENDPOINT(projectId)], | ||
requestOptions: { | ||
params, | ||
}, | ||
}); | ||
} | ||
|
||
getRegistrationById( | ||
projectId: Signal<number>, | ||
registrationId: Signal<number>, | ||
) { | ||
return this.generateQueryOptions<Registration>({ | ||
path: [...BASE_ENDPOINT(projectId), registrationId], | ||
}); | ||
} | ||
|
||
public invalidateCache( | ||
projectId: Signal<number>, | ||
registrationId?: Signal<number>, | ||
): Promise<void> { | ||
const path = [...BASE_ENDPOINT(projectId)]; | ||
|
||
if (registrationId) { | ||
path.push(registrationId); | ||
} | ||
|
||
return this.queryClient.invalidateQueries({ | ||
queryKey: this.pathToQueryKey(path), | ||
}); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
interfaces/Portalicious/src/app/domains/registration/registration.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,5 @@ | ||
import { MappedPaginatedRegistrationDto } from '@121-service/src/registration/dto/mapped-paginated-registration.dto'; | ||
import { Dto } from '~/utils/dto-type'; | ||
|
||
// TODO: AB#30152 This type should be refactored to use Dto121Service | ||
export type Registration = Dto<MappedPaginatedRegistrationDto>; |
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
27 changes: 25 additions & 2 deletions
27
...rtalicious/src/app/pages/project/project-registrations/project-registrations.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,15 +1,38 @@ | ||
import { ChangeDetectionStrategy, Component, input } from '@angular/core'; | ||
import { | ||
ChangeDetectionStrategy, | ||
Component, | ||
inject, | ||
input, | ||
} from '@angular/core'; | ||
import { RouterLink } from '@angular/router'; | ||
import { injectQuery } from '@tanstack/angular-query-experimental'; | ||
import { AppRoutes } from '~/app.routes'; | ||
import { PageLayoutComponent } from '~/components/page-layout/page-layout.component'; | ||
import { RegistrationApiService } from '~/domains/registration/registration.api.service'; | ||
|
||
@Component({ | ||
selector: 'app-project-registrations', | ||
standalone: true, | ||
imports: [PageLayoutComponent], | ||
imports: [PageLayoutComponent, RouterLink], | ||
templateUrl: './project-registrations.component.html', | ||
styles: ``, | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class ProjectRegistrationsComponent { | ||
// this is injected by the router | ||
projectId = input.required<number>(); | ||
|
||
private registrationApiService = inject(RegistrationApiService); | ||
|
||
registrations = injectQuery( | ||
this.registrationApiService.getManyByQuery(this.projectId), | ||
); | ||
|
||
registrationLink = (registrationId: number) => [ | ||
'/', | ||
AppRoutes.project, | ||
this.projectId(), | ||
AppRoutes.projectRegistration, | ||
registrationId, | ||
]; | ||
} |
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 +1 @@ | ||
v18 | ||
v20 |
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 +1 @@ | ||
v18 | ||
v20 |
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
Oops, something went wrong.