From e961bc5083e5e9b7ad203c6a7b04b55f3bbc3738 Mon Sep 17 00:00:00 2001 From: nsemets Date: Wed, 30 Jul 2025 16:49:22 +0300 Subject: [PATCH 1/4] fix(registry-files): removed # --- src/app/shared/services/files.service.ts | 50 ++++++++++++------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/app/shared/services/files.service.ts b/src/app/shared/services/files.service.ts index e1e7b2a46..acededdea 100644 --- a/src/app/shared/services/files.service.ts +++ b/src/app/shared/services/files.service.ts @@ -49,9 +49,9 @@ import { environment } from 'src/environments/environment'; providedIn: 'root', }) export class FilesService { - #jsonApiService = inject(JsonApiService); - filesFields = 'name,guid,kind,extra,size,path,materialized_path,date_modified,parent_folder,files'; + readonly jsonApiService = inject(JsonApiService); readonly toastService = inject(ToastService); + filesFields = 'name,guid,kind,extra,size,path,materialized_path,date_modified,parent_folder,files'; getFiles(filesLink: string, search: string, sort: string): Observable { const params: Record = { @@ -60,17 +60,17 @@ export class FilesService { 'filter[name]': search, }; - return this.#jsonApiService + return this.jsonApiService .get(`${filesLink}`, params) .pipe(map((response) => MapFiles(response.data))); } getFolders(folderLink: string): Observable { - return this.#jsonApiService.get(`${folderLink}`).pipe(map((response) => MapFiles(response.data))); + return this.jsonApiService.get(`${folderLink}`).pipe(map((response) => MapFiles(response.data))); } getFilesWithoutFiltering(filesLink: string): Observable { - return this.#jsonApiService.get(filesLink).pipe(map((response) => MapFiles(response.data))); + return this.jsonApiService.get(filesLink).pipe(map((response) => MapFiles(response.data))); } uploadFile(file: File, uploadLink: string): Observable>> { @@ -79,7 +79,7 @@ export class FilesService { name: file.name, }; - return this.#jsonApiService.putFile(uploadLink, file, params).pipe( + return this.jsonApiService.putFile(uploadLink, file, params).pipe( catchError((error) => { this.toastService.showError(error.error.message); return throwError(() => error); @@ -92,17 +92,17 @@ export class FilesService { kind: 'file', }; - return this.#jsonApiService.put(link, file, params); + return this.jsonApiService.put(link, file, params); } createFolder(link: string, folderName: string): Observable { - return this.#jsonApiService + return this.jsonApiService .put(link, null, { name: folderName }) .pipe(map((response) => MapFile(response))); } getFolder(link: string): Observable { - return this.#jsonApiService.get(link).pipe( + return this.jsonApiService.get(link).pipe( map((response) => MapFile(response.data)), catchError((error) => { this.toastService.showError(error.error.message); @@ -112,7 +112,7 @@ export class FilesService { } deleteEntry(link: string) { - return this.#jsonApiService.delete(link); + return this.jsonApiService.delete(link); } renameEntry(link: string, name: string, conflict = ''): Observable { @@ -121,7 +121,7 @@ export class FilesService { rename: name, conflict, }; - return this.#jsonApiService.post(link, body); + return this.jsonApiService.post(link, body); } moveFile(link: string, path: string, resourceId: string, provider: string, action: string): Observable { @@ -132,7 +132,7 @@ export class FilesService { resource: resourceId, }; - return this.#jsonApiService.post(link, body).pipe( + return this.jsonApiService.post(link, body).pipe( map((response) => MapFile(response.data)), catchError((error) => { this.toastService.showError(error.error.message); @@ -149,13 +149,13 @@ export class FilesService { } getFileTarget(fileGuid: string): Observable { - return this.#jsonApiService + return this.jsonApiService .get(`${environment.apiUrl}/files/${fileGuid}/?embed=target`) .pipe(map((response) => MapFile(response.data))); } getFileById(fileGuid: string): Observable { - return this.#jsonApiService + return this.jsonApiService .get(`${environment.apiUrl}/files/${fileGuid}/`) .pipe(map((response) => MapFile(response.data))); } @@ -166,13 +166,13 @@ export class FilesService { 'page[size]': 50, }; - return this.#jsonApiService + return this.jsonApiService .get(`${environment.apiUrl}/files/${fileGuid}/versions/`, params) .pipe(map((response) => MapFileVersions(response))); } getFileMetadata(fileGuid: string): Observable { - return this.#jsonApiService + return this.jsonApiService .get(`${environment.apiUrl}/custom_file_metadata_records/${fileGuid}/`) .pipe(map((response) => MapFileCustomMetadata(response.data))); } @@ -182,11 +182,11 @@ export class FilesService { 'fields[nodes]': 'title,description,date_created,date_modified', embed: 'bibliographic_contributors', }; - return this.#jsonApiService.get(`${environment.apiUrl}/nodes/${resourceId}/`, params); + return this.jsonApiService.get(`${environment.apiUrl}/nodes/${resourceId}/`, params); } getProjectCustomMetadata(resourceId: string): Observable { - return this.#jsonApiService.get( + return this.jsonApiService.get( `${environment.apiUrl}/guids/${resourceId}/?embed=custom_metadata&resolve=false` ); } @@ -197,7 +197,7 @@ export class FilesService { 'fields[users]': 'full_name,active', }; - return this.#jsonApiService + return this.jsonApiService .get( `${environment.apiUrl}/nodes/${resourceId}/contributors_and_group_members/`, params @@ -222,7 +222,7 @@ export class FilesService { }, }; - return this.#jsonApiService + return this.jsonApiService .patch< ApiData >(`${environment.apiUrl}/custom_file_metadata_records/${fileGuid}/`, payload) @@ -230,7 +230,7 @@ export class FilesService { } getFileRevisions(resourceId: string, provider: string, fileId: string): Observable { - return this.#jsonApiService + return this.jsonApiService .get( `${environment.fileApiUrl}/resources/${resourceId}/providers/${provider}/${fileId}?revisions=` ) @@ -249,7 +249,7 @@ export class FilesService { }, }; - return this.#jsonApiService + return this.jsonApiService .patch< ApiData >(`${environment.apiUrl}/files/${fileGuid}/`, payload) @@ -264,7 +264,7 @@ export class FilesService { provider, resource: resourceId, }; - return this.#jsonApiService + return this.jsonApiService .post< JsonApiResponse, null> >(moveLink, body) @@ -276,7 +276,7 @@ export class FilesService { 'filter[resource_uri]': resourceUri, }; - return this.#jsonApiService + return this.jsonApiService .get< JsonApiResponse[], null> >(`${environment.addonsV1Url}/resource-references`, params) @@ -288,7 +288,7 @@ export class FilesService { switchMap((referenceUrl: string) => { if (!referenceUrl) return EMPTY; - return this.#jsonApiService + return this.jsonApiService .get(`${referenceUrl}/configured_storage_addons`) .pipe( map((response) => From 33f4ab805e4a2cb73604672a38b318ebf3b2f2d5 Mon Sep 17 00:00:00 2001 From: nsemets Date: Fri, 8 Aug 2025 17:42:25 +0300 Subject: [PATCH 2/4] fix(bugs): fixed bugs --- src/app/app.routes.ts | 1 + .../breadcrumb/breadcrumb.component.html | 2 +- .../components/header/header.component.ts | 2 +- src/app/core/helpers/index.ts | 1 + src/app/core/helpers/url-param.helper.ts | 5 ++ src/app/core/services/navigation.service.ts | 20 +++++- .../auth/pages/sign-up/sign-up.component.html | 9 ++- .../auth/pages/sign-up/sign-up.component.scss | 13 ++-- .../auth/pages/sign-up/sign-up.component.ts | 18 +++-- src/app/features/auth/store/auth.state.ts | 6 +- .../project-contributors-step.component.ts | 3 +- .../project-metadata-step.component.html | 1 + .../my-profile/my-profile.component.html | 71 +++++++++++-------- .../my-profile/my-profile.component.ts | 6 +- .../utils/my-projects-tab-options.const.ts | 18 ----- .../registration-card.component.html | 6 +- src/app/shared/services/files.service.ts | 6 +- src/assets/i18n/en.json | 3 +- 18 files changed, 117 insertions(+), 74 deletions(-) create mode 100644 src/app/core/helpers/url-param.helper.ts delete mode 100644 src/app/features/my-projects/utils/my-projects-tab-options.const.ts diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index bc0af8e7b..37c7a5cb9 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -38,6 +38,7 @@ export const routes: Routes = [ }, { path: 'register', + canActivate: [redirectIfLoggedInGuard], loadComponent: () => import('./features/auth/pages/sign-up/sign-up.component').then((mod) => mod.SignUpComponent), data: { skipBreadcrumbs: true }, diff --git a/src/app/core/components/breadcrumb/breadcrumb.component.html b/src/app/core/components/breadcrumb/breadcrumb.component.html index 42b839649..dd294e46b 100644 --- a/src/app/core/components/breadcrumb/breadcrumb.component.html +++ b/src/app/core/components/breadcrumb/breadcrumb.component.html @@ -2,7 +2,7 @@