feat:added new tab called all obligation#1316
feat:added new tab called all obligation#1316Anushreebasics wants to merge 1 commit intoeclipse-sw360:mainfrom
Conversation
d8f7acf to
3834f92
Compare
|
@Anushreebasics will you fix this build or should we close the PR ? |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
|
@heliocastro I have fixed the build, please review |
b87204e to
f9ba940
Compare
|
@heliocastro @amritkv please review |
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
| cell: ({ row }) => ( | ||
| <span> | ||
| {row.original.projectName}{' '} | ||
| {row.original.projectVersion ? `(${row.original.projectVersion})` : ''} |
There was a problem hiding this comment.
This field should have the entire project path. Like, if it is a sub-project the entry should be: Project -> SubProject1 -> SubProject2
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
|
Feel free to reach out in case you need any clarifications! |
|
@deo002 please review the changes |
dbef463 to
51eda7b
Compare
51eda7b to
14ed64b
Compare
|
Hey @Anushreebasics ! |
ed2498a to
8a52f93
Compare
|
@amritkv please review the changes |
|
@heliocastro please review |
|
Hey @Anushreebasics ! |
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
| Object.entries(obs).forEach(([title, detail]) => { | ||
| if (detail.status && fulfilledStatuses.includes(detail.status)) { | ||
| let parentFulfillmentOk = true | ||
| if (detail.status === 'FULFILLED_AND_PARENT_MUST_ALSO_FULFILL') { |
There was a problem hiding this comment.
I do not think this is required, we checked the status of obligation in the parent if clause (line #283) right? Am I missing something?
There was a problem hiding this comment.
The outer if clause checks if the current obligation's status is in the fulfilled statuses, but the inner check for the parent is only needed for the special case 'FULFILLED_AND_PARENT_MUST_ALSO_FULFILL'.
So, the parent check is not redundant—it is required for correct business logic.
If I remove it, it will incorrectly include obligations that should only be considered fulfilled if the parent is also fulfilled.
|
|
||
| if (parentFulfillmentOk) { | ||
| allAggregated.push({ | ||
| ...detail, |
There was a problem hiding this comment.
Do we need anything else besides projectPath? Rest all fields will be present in detail right? The project name and version of all projects can be included in the projectPath itself.
There was a problem hiding this comment.
yes we need it since projectPath only includes the project names in the hierarchy, separated by " -> ". It does not include the project version for each project and other details
src/app/[locale]/projects/components/Obligations/AllObligationsView.tsx
Outdated
Show resolved
Hide resolved
|
@deo002 please review the changes |
9d31e4c to
7d198d3
Compare
|
@heliocastro please review |
fixes #1242
Proposed Changes:
[Component Name] Obligations Management
[MODIFY]
Obligations.tsx
Add a new Nav.Item for "All Obligations".
Add a new Tab.Pane to render the AllObligationsView component.
[NEW]
AllObligationsView.tsx
Create a new component that fetches and displays obligations from sub-projects.
Fetch sub-projects using projects/${projectId}/linkedProjects?transitive=true.
Fetch obligations for each sub-project.
Filter obligations where status is ACKNOWLEDGED_OR_FULFILLED or FULFILLED_AND_PARENT_MUST_ALSO_FULFILL.
If status is FULFILLED_AND_PARENT_MUST_ALSO_FULFILL, verify the parent project also has a fulfilled obligation of the same type (this logic might need refinement based on exact requirements).
Display the aggregated list in a SW360Table.
@GMishx @heliocastro @kairoaraujo @amritkv please review this PR