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

Make the search bar auto complete #1449

Merged
merged 6 commits into from
Dec 14, 2023

Conversation

jadmsaadaot
Copy link
Collaborator

https://app.zenhub.com/workspaces/epictrack-63891ea941d309001fa292cf/issues/gh/bcgov/epic.track/1282

Details:

  • Use an auto complete component
  • Load options with list type projects with works
  • Add a find all for projects with works
  • Add the works field for project, lazy loaded
  • Add with_works parameter for poject get all endpoint

@jadmsaadaot jadmsaadaot self-assigned this Dec 13, 2023
@jadmsaadaot jadmsaadaot marked this pull request as ready for review December 13, 2023 22:24
// Fetch project names from the backend when searchText changes
useEffect(() => {
const fetchProjectNames = async () => {
// Replace this with your actual backend API call
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this comment still relevant?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not, I should remove this

@@ -5,8 +5,11 @@ import { MasterBase } from "../../models/type";
import { ListType } from "../../models/code";

class ProjectService implements ServiceBase {
async getAll(return_type?: string) {
return await http.GetRequest(Endpoints.Projects.PROJECTS, { return_type });
async getAll(return_type?: string, with_works?: boolean) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

with_works? is includeWorks better?

Copy link
Collaborator

Choose a reason for hiding this comment

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

i am not sure you want project which has a work or you wanna include a work ..so plz feel to disregard this

Copy link
Collaborator

Choose a reason for hiding this comment

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

return_type ? is it the project type?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I need only the project with works, I don't need to include the works info.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

return_type is not my addition, it's already there. It decides what schema to use

@jadmsaadaot jadmsaadaot merged commit 6613d6c into bcgov:develop Dec 14, 2023
7 checks passed
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.

3 participants