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

Allow to create a contract on an organization during its creation #881

Open
marien-probesys opened this issue Dec 13, 2024 · 0 comments
Open
Labels
easy task Good for first time contributors ready ✅ You can work on this! topic: contracts All the stuff related to the contracts type: improvements Things could be nicer
Milestone

Comments

@marien-probesys
Copy link
Member

marien-probesys commented Dec 13, 2024

Problem

When creating an organization, the user is redirected to the list of organizations. If they want to finish to configure it with a contract, it's annoying to:

  • search for the organization
  • click on the organization
  • click on "contracts"
  • click on "new contract"

This workflow could result in an organization not being correctly configured.

Solution

When creating an organization, if the user can create contracts in it, redirect them to the "new contract" form.

Specifications

In App\Controller\OrganizationsController::new, once the organization is saved:

// with $authorizer being a \App\Security\Authorizer
if ($authorizer->isGranted(`orga:manage:contracts`, $organization)) {
    // redirect to 'new organization contract'
} else {
    // redirect to 'organizations'
}
@marien-probesys marien-probesys added easy task Good for first time contributors type: improvements Things could be nicer topic: contracts All the stuff related to the contracts labels Dec 13, 2024
@marien-probesys marien-probesys added this to the Version 1.0 milestone Dec 13, 2024
@marien-probesys marien-probesys added the ready ✅ You can work on this! label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy task Good for first time contributors ready ✅ You can work on this! topic: contracts All the stuff related to the contracts type: improvements Things could be nicer
Projects
None yet
Development

No branches or pull requests

1 participant