Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dashboard for submitted papers #10

Closed
wants to merge 2 commits into from
Closed

Add dashboard for submitted papers #10

wants to merge 2 commits into from

Conversation

wmeints
Copy link
Owner

@wmeints wmeints commented Jul 31, 2024

Related to #9

Implement a dashboard to display a list of submitted papers with their respective statuses and pagination.

  • Dashboard Page (apps/dashboard/app/page.tsx)

    • Fetch the list of papers from the /papers endpoint using getServerSideProps.
    • Display the papers in a daisyui table with pagination.
    • Show the status of each paper with a daisyui badge component.
    • Add buttons to approve or decline papers with the status scored.
    • Add a button at the top of the dashboard to submit a new paper.
  • Paper Info Repository (apps/contentstore/PaperBoy.ContentStore/Application/Projections/IPaperInfoRepository.cs)

    • Add a method to get papers by status.
  • Content Store Program (apps/contentstore/PaperBoy.ContentStore/Program.cs)

    • Update the /papers endpoint to support fetching papers with statuses imported, summarized, scored, or approved.
  • Paper Info Projection (apps/contentstore/PaperBoy.ContentStore/Application/Projections/PaperInfoProjection.cs)

    • Update the paper status based on various events, including paper declined and description generated.

For more details, open the Copilot Workspace session.

wmeints added 2 commits July 31, 2024 15:46
Related to #9

Implement a dashboard to display a list of submitted papers with their respective statuses and pagination.

* **Dashboard Page (`apps/dashboard/app/page.tsx`)**
  - Fetch the list of papers from the `/papers` endpoint using `getServerSideProps`.
  - Display the papers in a `daisyui` table with pagination.
  - Show the status of each paper with a `daisyui` badge component.
  - Add buttons to approve or decline papers with the status `scored`.
  - Add a button at the top of the dashboard to submit a new paper.

* **Paper Info Repository (`apps/contentstore/PaperBoy.ContentStore/Application/Projections/IPaperInfoRepository.cs`)**
  - Add a method to get papers by status.

* **Content Store Program (`apps/contentstore/PaperBoy.ContentStore/Program.cs`)**
  - Update the `/papers` endpoint to support fetching papers with statuses imported, summarized, scored, or approved.

* **Paper Info Projection (`apps/contentstore/PaperBoy.ContentStore/Application/Projections/PaperInfoProjection.cs`)**
  - Update the paper status based on various events, including paper declined and description generated.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/wmeints/paperboy/issues/9?shareId=XXXX-XXXX-XXXX-XXXX).
* Add a new method `GetByStatusAsync` to retrieve `PaperInfo` records based on their statuses.
* Use Marten's `LightweightSession` to query the `PaperInfo` collection.
* Filter the query by the provided statuses if any are given.
* Count the total number of matching records.
* Order the results by `DateCreated`, apply pagination, and return the paged result.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/wmeints/paperboy/pull/10?shareId=XXXX-XXXX-XXXX-XXXX).
@wmeints
Copy link
Owner Author

wmeints commented Jul 31, 2024

Implement GetByStatusAsync method in PaperInfoRepository

  • Add a new method GetByStatusAsync to retrieve PaperInfo records based on their statuses.
  • Use Marten's LightweightSession to query the PaperInfo collection.
  • Filter the query by the provided statuses if any are given.
  • Count the total number of matching records.
  • Order the results by DateCreated, apply pagination, and return the paged result.

For more details, open the Copilot Workspace session.

@wmeints wmeints linked an issue Jul 31, 2024 that may be closed by this pull request
10 tasks
@wmeints wmeints closed this Aug 1, 2024
@wmeints wmeints deleted the add-dashboard branch August 1, 2024 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dashboard for submitted paper
1 participant