From 8b05a7eeb94b359bd7dcefae474b2bff0bae4c55 Mon Sep 17 00:00:00 2001 From: Arthur Deierlein Date: Mon, 18 Mar 2024 15:41:59 +0100 Subject: [PATCH] feat(ember)!: dependency sources - adjust to backend - adjust form to include the ability to set maintainers per source --- ember/app/components/project-compact.gjs | 2 +- ember/app/components/project-detailed.gjs | 67 ++++++----- .../app/components/project-form/component.js | 52 ++------- .../app/components/project-form/template.hbs | 24 +--- ember/app/components/source-form.gjs | 106 ++++++++++++++++++ ember/app/models/dependency-source.js | 20 ++++ ember/app/models/maintainer.js | 8 +- ember/app/models/project.js | 13 ++- ember/app/routes/projects/add.js | 3 +- ember/app/routes/projects/detailed.js | 2 +- ember/app/routes/projects/index.js | 2 +- ember/app/routes/versions/index.js | 2 +- ember/app/validations/project.js | 1 - ember/app/validations/source.js | 6 + ember/mirage/config.js | 3 +- ember/mirage/factories/dependency-source.js | 55 +++++++++ ember/mirage/factories/project.js | 29 ++--- ember/mirage/scenarios/default.js | 3 +- ember/tests/acceptance/projects-test.js | 10 +- .../components/project-compact-test.js | 4 +- .../components/project-detailed-test.js | 8 +- 21 files changed, 278 insertions(+), 142 deletions(-) create mode 100644 ember/app/components/source-form.gjs create mode 100644 ember/app/models/dependency-source.js create mode 100644 ember/app/validations/source.js create mode 100644 ember/mirage/factories/dependency-source.js diff --git a/ember/app/components/project-compact.gjs b/ember/app/components/project-compact.gjs index e364b7f8..b7301697 100644 --- a/ember/app/components/project-compact.gjs +++ b/ember/app/components/project-compact.gjs @@ -19,7 +19,7 @@ function icon(status) { } function version(project) { - return project.versionedDependencies[0]; + return project.sources.at(0)?.versions.at(0); } const Dependency =