@@ -15,13 +15,17 @@ import { toSignal } from '@angular/core/rxjs-interop';
1515import { FormsModule } from '@angular/forms' ;
1616import { ActivatedRoute , Router , RouterLink } from '@angular/router' ;
1717
18- import { UserSelectors } from '@osf/core/store/user' ;
19- import { CustomPaginatorComponent , SelectComponent , SubHeaderComponent } from '@osf/shared/components' ;
20- import { RegistrationCardComponent } from '@osf/shared/components/registration-card/registration-card.component' ;
18+ import { UserSelectors } from '@core/store/user' ;
19+ import {
20+ CustomPaginatorComponent ,
21+ RegistrationCardComponent ,
22+ SelectComponent ,
23+ SubHeaderComponent ,
24+ } from '@osf/shared/components' ;
2125import { IS_XSMALL } from '@osf/shared/helpers' ;
2226import { CustomConfirmationService , ToastService } from '@osf/shared/services' ;
2327
24- import { REGISTRATIONS_TABS } from '../../constants/registrations-tabs ' ;
28+ import { REGISTRATIONS_TABS } from '../../constants' ;
2529import { RegistrationTab } from '../../enums' ;
2630import {
2731 CreateSchemaResponse ,
@@ -60,27 +64,27 @@ export class MyRegistrationsComponent {
6064 private readonly customConfirmationService = inject ( CustomConfirmationService ) ;
6165 private readonly toastService = inject ( ToastService ) ;
6266
63- protected readonly isMobile = toSignal ( inject ( IS_XSMALL ) ) ;
64- protected readonly tabOptions = REGISTRATIONS_TABS ;
67+ readonly isMobile = toSignal ( inject ( IS_XSMALL ) ) ;
68+ readonly tabOptions = REGISTRATIONS_TABS ;
6569
6670 private currentUser = select ( UserSelectors . getCurrentUser ) ;
67- protected draftRegistrations = select ( RegistriesSelectors . getDraftRegistrations ) ;
68- protected draftRegistrationsTotalCount = select ( RegistriesSelectors . getDraftRegistrationsTotalCount ) ;
69- protected isDraftRegistrationsLoading = select ( RegistriesSelectors . isDraftRegistrationsLoading ) ;
70- protected submittedRegistrations = select ( RegistriesSelectors . getSubmittedRegistrations ) ;
71- protected submittedRegistrationsTotalCount = select ( RegistriesSelectors . getSubmittedRegistrationsTotalCount ) ;
72- protected isSubmittedRegistrationsLoading = select ( RegistriesSelectors . isSubmittedRegistrationsLoading ) ;
73- protected schemaResponse = select ( RegistriesSelectors . getSchemaResponse ) ;
74-
75- protected actions = createDispatchMap ( {
71+ draftRegistrations = select ( RegistriesSelectors . getDraftRegistrations ) ;
72+ draftRegistrationsTotalCount = select ( RegistriesSelectors . getDraftRegistrationsTotalCount ) ;
73+ isDraftRegistrationsLoading = select ( RegistriesSelectors . isDraftRegistrationsLoading ) ;
74+ submittedRegistrations = select ( RegistriesSelectors . getSubmittedRegistrations ) ;
75+ submittedRegistrationsTotalCount = select ( RegistriesSelectors . getSubmittedRegistrationsTotalCount ) ;
76+ isSubmittedRegistrationsLoading = select ( RegistriesSelectors . isSubmittedRegistrationsLoading ) ;
77+ schemaResponse = select ( RegistriesSelectors . getSchemaResponse ) ;
78+
79+ actions = createDispatchMap ( {
7680 getDraftRegistrations : FetchDraftRegistrations ,
7781 getSubmittedRegistrations : FetchSubmittedRegistrations ,
7882 deleteDraft : DeleteDraft ,
7983 getSchemaResponse : FetchAllSchemaResponses ,
8084 createSchemaResponse : CreateSchemaResponse ,
8185 } ) ;
8286
83- protected readonly RegistrationTab = RegistrationTab ;
87+ readonly RegistrationTab = RegistrationTab ;
8488
8589 readonly provider = environment . defaultProvider ;
8690
@@ -108,6 +112,7 @@ export class MyRegistrationsComponent {
108112 this . submittedFirst = 0 ;
109113 this . actions . getSubmittedRegistrations ( this . currentUser ( ) ?. id ) ;
110114 }
115+
111116 this . router . navigate ( [ ] , {
112117 relativeTo : this . route ,
113118 queryParams : { tab : tab === RegistrationTab . Drafts ? 'drafts' : 'submitted' } ,
@@ -148,11 +153,7 @@ export class MyRegistrationsComponent {
148153 onUpdateRegistration ( id : string ) : void {
149154 this . actions
150155 . createSchemaResponse ( id )
151- . pipe (
152- tap ( ( ) => {
153- this . navigateToJustificationPage ( ) ;
154- } )
155- )
156+ . pipe ( tap ( ( ) => this . navigateToJustificationPage ( ) ) )
156157 . subscribe ( ) ;
157158 }
158159
0 commit comments