eclipse-tractusx / portal-frontend

Portal Frontend
Apache License 2.0
4 stars 32 forks source link

sig#796: Admin UI for Managing SD Document Retriggering #949

Open jjeroch opened 2 months ago

jjeroch commented 2 months ago

DRAFT ticket, details to be added as soon as backend is available

Ticket Description

The purpose of this ticket is to design and implement a Frontend (FE) User Interface that corresponds with the new backend features for managing SelfDescription (SD) documents. This interface will allow administrators to interact with the GET API endpoint and trigger the SD document creation job. Linked backend ticket: https://github.com/eclipse-tractusx/portal-backend/issues/813

Objectives

  1. Admin UI for GET API Endpoint:

    • Develop a new section in the admin panel to display missing SD documents. (Location: user navigation - Clearinghouse Self-Description)
    • Implement UI components to show detailed information about missing SD documents, including total counts and lists of companies and connectors.
    • Integrate the UI with the new GET API endpoint ensuring data is retrieved and displayed correctly.
    • Add authentication and authorization mechanisms in the UI to ensure that only users with the 'approve_new_partner' permission can access this feature.
  2. Admin UI for Administrator-Triggered Job:

    • Create a UI element (e.g., button) that allows administrators to trigger the SD creation job.
    • Implement feedback mechanisms in the UI to inform the administrator of the job's progress, completion, and any errors encountered.
    • Ensure the job trigger UI requires the 'approve_new_partner' permission.

Acceptance Criteria

  1. The Admin UI for the GET API endpoint must:

    • Display a list of all companies and connectors missing SD documents, including the total counts. UI solution needed; object separated
    • Be accessible only to users with the 'approve_new_partner' permission. AI: permission to be rechecked
    • Present clear, concise, and correct information about customer and company records. UI solution needed
  2. The Admin UI for the administrator-triggered job must:

    • Allow only users with the 'approve_new_partner' permission to execute the job. AI: permission to be rechecked
    • Provide real-time feedback on the status of the SD creation process.
    • Record and display any initiation, completion, or failure of the SD creation process. UI solution needed

Implementation Steps

  1. Design the UI layout for the new admin section managing SD documents.
  2. Develop UI components to list missing SD documents and display total counts.
  3. Integrate the GET API endpoint with the UI to fetch and display the required data.
  4. Implement authentication and authorization checks on the UI for the new features.
  5. Design the UI component to trigger the SD creation job and display job status.
  6. Handle state management and error handling in the UI for the new features.
  7. Write and execute tests for the new UI components.
  8. Update the admin panel documentation with the new features.
  9. Conduct a review of the implemented UI with the team to gather feedback and make necessary adjustments.

Wireframe

image

Endpoints

GET Connector Overview

Endpoints: /api/administration/connectors/missing-sd-document?page=0&size=15 Methods: GET

response json

{
  "meta": {
    "totalElements": 0,
    "totalPages": 0,
    "page": 0,
    "contentSize": 0
  },
  "content": [
    {
      "connectorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "string",
      "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "companyName": "string"
    }
  ]
}

GET Company Overview

Endpoints: /api/administration/companyData/missing-sd-document?page=0&size=15 Methods: GET

response json

{
  "meta": {
    "totalElements": 0,
    "totalPages": 0,
    "page": 0,
    "contentSize": 0
  },
  "content": [
    {
      "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "string"
    }
  ]
}

Retrigger SD Creation

Company

Endpoints: /api/administration/companyData/trigger-self-description Methods: POST

Connector

Endpoints: /api/administration/connectors/trigger-self-description Methods: POST

MaximilianHauer commented 1 month ago

endpoint details will be added as soon as backend ticket is finished. design can be started already

MaximilianHauer commented 1 month ago

as aligned topic wont be part of the inbetween release. focus is still on 24.12

kunalgaurav-bmw commented 3 weeks ago

Hi Team, I need some confirmation over the following points, which require clarification:

MaximilianHauer commented 3 weeks ago
  1. Should be a new page called "Clearinghouse Self-Description"
  2. Should be placed bellow "Application Requests"
  3. Buttonname "Reprocess"
  4. Compliance Status should be a toggle that is showing the state of the configuration in "backend -> processesworker -> clearinghouseConnectDisabled" if you cant find it ask @Phil91
  5. overall we should show the user that the progress is running i am uncertain what our best-practice is her @oyo please provide guidance for this. (process cyrcle that is updated? loading bar ? )
oyo commented 3 weeks ago
  1. overall we should show the user that the progress is running i am uncertain what our best-practice is her @oyo please provide guidance for this. (process cyrcle that is updated? loading bar ? )

@kunalgaurav-bmw going to provide a branch with a rough sketch

MaximilianHauer commented 2 weeks ago

@oyo / @kunalgaurav-bmw is this clarified ? open questions ?

MaximilianHauer commented 2 days ago

@oyo / @kunalgaurav-bmw i prepared a very bad mockup that gives an idea how we should restructure the design of this page lets discuss it on monday
image