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

Introduce user dashboard with 3 tabs #72

Merged
merged 17 commits into from
Feb 1, 2024
Merged

Conversation

skelz0r
Copy link
Member

@skelz0r skelz0r commented Jan 31, 2024

  • Mettre sur la vue dashboard#show mentions le type de mention
  • Gérer les shows sur les habilitations non demandeurs
  • fr-info pour mention
  • faire une vue single page pour les read only
  • Review

Closes https://linear.app/pole-api/issue/API-2120/dashboard-demandeur-ouet-contact#comment-0d2692b1

This is the model of the actual "habilitation", which is a snapshot of
the authorization request at the moment of validation.

Will be implemented in the following commit
@skelz0r skelz0r self-assigned this Jan 31, 2024
@skelz0r skelz0r force-pushed the features/user-dashboard branch from 615b0c4 to 9345e25 Compare January 31, 2024 17:18
Harden events factory and query object to keep it human readable
Do not overwrite contact attributes if specified
* Add more authorization requests to organization (not main user)
* Add main user as contact on one of authorization request
@skelz0r skelz0r force-pushed the features/user-dashboard branch 4 times, most recently from ce83893 to b0f46bb Compare January 31, 2024 18:38
Have to change request specs, we have 2 redirects now

Closes https://linear.app/pole-api/issue/API-2120
Because of foreign keys we have side effects issues on CI with unclean
data. No need to check this kind of complexity in tests, just wipe
everything
@skelz0r skelz0r force-pushed the features/user-dashboard branch from b0f46bb to 2fc4676 Compare February 1, 2024 07:50
* Within organization
* With mentions
No need to show multiple steps, they can't do anything anyway
Decorator does not play nice with `class` instance method (it does not
forward), we have to define an instance methods to access these
attributes.

Moreover, `model_name` renders the parent class instead of child, make
it global in main decorator to avoid this error.
@skelz0r skelz0r force-pushed the features/user-dashboard branch from 2fc4676 to 1b5e6b0 Compare February 1, 2024 12:05
@skelz0r
Copy link
Member Author

skelz0r commented Feb 1, 2024

ça se lit commit par commit.

ça a été un plus gros morceau que prévu 😅

Copy link
Contributor

@Samuelfaure Samuelfaure left a comment

Choose a reason for hiding this comment

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

Very nice

Quelques questions pour moi

def perform
AuthorizationRequest.where("EXISTS (
select 1
from each(authorization_requests.data) as kv
Copy link
Contributor

Choose a reason for hiding this comment

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

kv ?

Copy link
Member Author

Choose a reason for hiding this comment

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

key_value, c'est un objet ayant pour clé key et value. C'est peu important dans le contexte imo.

Comment on lines +39 to +43
class Scope < Scope
def resolve
scope.where(organization: current_organization)
end
end
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

C'est comme class << self ici ?

Copy link
Member Author

Choose a reason for hiding this comment

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

C'est la syntax Pundit, et ici le premier Scope est celui du namespace AuthorizationRequestPolicy, et le second celui de la classe mère.

@skelz0r
Copy link
Member Author

skelz0r commented Feb 1, 2024

@Isalafont je merge mais je t'invite à lire le code tout de même.

@skelz0r skelz0r merged commit 353b934 into develop Feb 1, 2024
7 checks passed
@skelz0r skelz0r deleted the features/user-dashboard branch February 1, 2024 13:21
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.

2 participants