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

Feature : Add project action button #1552

Closed
diegoaces opened this issue Sep 6, 2024 · 2 comments
Closed

Feature : Add project action button #1552

diegoaces opened this issue Sep 6, 2024 · 2 comments

Comments

@diegoaces
Copy link
Contributor

I need to add a new functionality at the project level, but there is no way to add an action button in the projects. After researching, I found that a React component can be created and associated with the project list item, so I wrote the necessary code to implement it.

The PluginsAPI.Dashboard.addProjectActionButton method allows adding a view at the project level and is based on PluginsAPI.Dashboard.addTaskActionButton, which works at the task level.

How to use with a custom plugin:

PluginsAPI.Dashboard.addProjectActionButton(['plugin-name/build/Example.js'], function (args, Component) { return React.createElement(Component, {projectId: project.id}); } );

Captura de pantalla 2024-09-06 a la(s) 9 54 06 a  m

@github-actions github-actions bot closed this as completed Sep 6, 2024
@diegoaces diegoaces changed the title Add project action button Feature : Add project action button Sep 6, 2024
@pierotofy pierotofy reopened this Sep 6, 2024
@OpenDroneMap OpenDroneMap deleted a comment from github-actions bot Sep 6, 2024
@pierotofy
Copy link
Member

This sounds like the addNewTaskButton endpoint which already exists:

PluginsAPI.Dashboard.triggerAddNewTaskButton({projectId: this.state.data.id, onNewTaskAdded: this.newTaskAdded}, (button) => {

{this.state.buttons.map((button, i) => <React.Fragment key={i}>{button}</React.Fragment>)}

PluginsAPI.Dashboard.addNewTaskButton(

Have you tried using that one?

@diegoaces
Copy link
Contributor Author

You are right, I made the changes pointing to addNewTaskButton, although I think addNewTaskButton is a bit confusing because it operates at the project level.

Captura de pantalla 2024-09-06 a la(s) 11 13 11 a  m

Thanks!

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

No branches or pull requests

2 participants