Skip to content

Create the UI for performing CRUD operations on the ISSUERS relation#856

Open
olamidepeterojo wants to merge 2 commits intofedora-infra:swatantryafrom
olamidepeterojo:UI_issuers
Open

Create the UI for performing CRUD operations on the ISSUERS relation#856
olamidepeterojo wants to merge 2 commits intofedora-infra:swatantryafrom
olamidepeterojo:UI_issuers

Conversation

@olamidepeterojo
Copy link
Copy Markdown

This PR implements the frontend UI for performing CRUD operations on the ISSUERS relation.

Key changes:

  • Added issuer creation form component
  • Added issuer update form component
  • Integrated API calls using RTK Query
  • Updated Governor page to include issuer management section

Changes:

New Components:

  • frontend/src/crud/issuers/create.jsx
  • frontend/src/crud/issuers/update.jsx

API Integration:

  • Added creationIssuer mutation
  • Added updationIssuer mutation

UI Integration:

  • Added Issuer section in frontend/src/routes
  • Includes form validation, loading states, and error handling
image

Fixes #681

CRUD operations on the ISSUERS relation

Signed-off-by: Olamide Ojo
<peterojoolamide@gmail.com>
issuers relation

Signed-off-by: Olamide Ojo <peterojoolamide@gmail.com>
@olamidepeterojo
Copy link
Copy Markdown
Author

Hello @gridhead, I have done the blog task as instructed and would like you take a look at this so i could get to working on implementing pagination for Issuers from endpoints if suitable by you

@gridhead gridhead self-requested a review March 31, 2026 03:40
@gridhead gridhead self-assigned this Mar 31, 2026
@gridhead gridhead added enhancement cle Community Linux Engineering labels Mar 31, 2026
@gridhead gridhead added the स्वातंत्र्य Fedora Badges Revamp Project label Mar 31, 2026
Copy link
Copy Markdown
Member

@gridhead gridhead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rework this pull request based on the suggested changes and review the AI-Assisted Contributions Policy and make necessary changes to disclose the use of AI tools. While we allow the use of AI tooling, please exercise discretion to ensure that you have moderation on its usage. This lets us see more of what you have to offer and less of what a certain AI tooling can. At the end of the day, we really want to hire human interns under our Outreachy mentorship and not AI toolings for the same.

Comment on lines +274 to +297
creationIssuer: builder.mutation({
query: (issuerData) => ({
url: "../api/admin/issuers",
method: "POST",
body: issuerData,
credentials: "include",
headers: {
"Content-Type": "application/json",
},
}),
invalidatesTags: [], // optional for now
}),
updationIssuer: builder.mutation({
query: ({ issuer_id, filldata }) => ({
url: `../api/admin/issuers/${issuer_id}`,
method: "PUT",
body: filldata,
credentials: "include",
headers: {
"Content-Type": "application/json",
},
}),
invalidatesTags: [], // optional for now
}),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relying on the endpoints for your changes that would be introduced as a part of the solution for #695, that has not yet made their way into the codebase, is rather pretentious. 👎🏼

Comment on lines +95 to +102
<FloatingLabel controlId="issuerId" label="Issuer ID">
<Form.Control
type="number"
value={form.id}
onChange={(e) => handleFormChange("id", e.target.value)}
placeholder="Issuer ID"
/>
</FloatingLabel>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want you to take a step back and evaluate your suggested change. The issuer identity is something that is internal to the database, and hence, there is no way in which a user or an administrator can be expected to know about it. Have you tested these changes locally or simply gone ahead with opening a pull request with whatever an AI tool provided you with, without understanding what the codebase does?

"Content-Type": "application/json",
},
}),
invalidatesTags: [], // optional for now
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the point of introducing an empty list under the invalidateTags attribute if it is not going to be used?

"Content-Type": "application/json",
},
}),
invalidatesTags: [], // optional for now
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the point of introducing an empty list under the invalidateTags attribute if it is not going to be used?

"Content-Type": "application/json",
},
}),
invalidatesTags: [], // optional for now
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, your pull request looks incomplete from your end only, since you have left the work-in-progress comment there, and yet you seem to have sent it over for reviews, without being respectful to both your and your mentors' time and efforts.

}),
invalidatesTags: (result, error, { user_id }) => [{ type: "Identity", id: user_id }, "IdentitySearch"],
}),
creationIssuer: builder.mutation({
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not see a call for viewing/reading Issuers here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have backend-related changes when the issue ticket #681 clearly requests changes in the UI codebase? Even worse than that, why are these duplicates from your previous work from #855? If you are led to believe that duplication of work would somehow increase the likelihood of your selection in this programme, then you are unfortunately mistaken. It just makes us not want to work with you anymore, as these exhibited signs tell us that you are not respectful of the time and efforts put in at either end.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have backend-related changes when the issue ticket #681 clearly requests changes in the UI codebase? Even worse than that, why are these duplicates from your previous work from #855? If you are led to believe that duplication of work would somehow increase the likelihood of your selection in this programme, then you are unfortunately mistaken. It just makes us not want to work with you anymore, as these exhibited signs tell us that you are not respectful of the time and efforts put in at either end.

badge_id = name.lower().replace(" ", "-")
bad = ['"', "'", "(", ")", "*", "&", "?"]
replacements = dict(zip(bad, [""] * len(bad)))
replacements = dict(zip(bad, [""] * len(bad), strict=False))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does the reformatting of a backend code help a feature request for the frontend functionality?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We expect our pull requests to be atomic in nature. This essentially means that one may have more pull requests against one issue ticket, but one pull request must address a maximum of one issue ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cle Community Linux Engineering enhancement स्वातंत्र्य Fedora Badges Revamp Project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create the UI for performing CURD operations on the ISSUERS relation

2 participants