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

Extended tp registrations #465

Merged
merged 40 commits into from
May 30, 2024
Merged

Conversation

rsiminel
Copy link
Contributor

@rsiminel rsiminel commented May 16, 2024

I still have a couple questions that I included as comments in the code. While I'm at it, here are a couple more concerns :
While looking arround, I noticed that when a user wants to extend a Project, it is automatically extended by one year. Was I just supposed to do something like that ? Or should I make the Project extention more like this one ?
Also, should I add checks that TPs/Projects are not created retroactively (start/end date < current date) ?

closes #453

@mboudet
Copy link
Member

mboudet commented May 16, 2024

I noticed that when a user wants to extend a Project, it is automatically extended by one year. Was I just supposed to do something like that

Wow, I did not know this option existed (it's disabled on our instance). No it's fine to leave it that way, extension by an user and by an admin are two separate thing.

Should I add checks that TPs/Projects are not created retroactively (start/end date < current date) ?

If it's not already implemented, sure.


Now that I'm looking at the code, I think you'll need to extend the 'expiration' value of created TP account (if any) to match the new expiration date + the grace period

manager2/src/app/tps/tps.component.ts Outdated Show resolved Hide resolved
manager2/src/app/tps/tps.component.html Outdated Show resolved Hide resolved
routes/tp.js Outdated Show resolved Hide resolved
routes/tp.js Outdated Show resolved Hide resolved
routes/tp.js Outdated Show resolved Hide resolved
@rsiminel
Copy link
Contributor Author

rsiminel commented May 21, 2024

Ok weird, I somehow edited your comment instead of adding one... sorry about that

@mboudet
Copy link
Member

mboudet commented May 22, 2024

PS: Some of the files I'm working on are getting pretty long (500 lines +), would it be useful to try using JavaScript Regions ?

This is a vscode specific comment I believe? No really a fan of editor-specific comments in the code.

Ps: 96e96d8 broke the tests I think?

@rsiminel
Copy link
Contributor Author

rsiminel commented May 23, 2024

Sorry about the broken tests, pesky semicolons ;)

PS: When a user does not fill in the "About" section when reserving a TP, the error message 'Tell us why you need some tp accounts' does not appear on the webpage until something is actually written in the "About" section. Shall I make a new issue for this or is it an easy fix? Also, that error and the 'Quantity must be >= 1' error are only tested for in the backend.

EDIT: The error I mention in my PS is actually Issue #447

@rsiminel rsiminel requested a review from mboudet May 23, 2024 15:30
manager2/src/app/tps/tps.component.ts Outdated Show resolved Hide resolved
routes/tp.js Outdated Show resolved Hide resolved
routes/tp.js Outdated Show resolved Hide resolved
routes/tp.js Show resolved Hide resolved
core/tps.service.js Outdated Show resolved Hide resolved
core/tps.service.js Outdated Show resolved Hide resolved
@rsiminel
Copy link
Contributor Author

Yeah, the test that we had for TP booking and creation did everything in a single test case that was written in a peculiar way. I made it look like all the others and added test cases for TP extending and removing.
Some of the other tests should perhaps be a little more restrictive than just making sure you get an HTTP status of 200 but that's an issue for an other day.

@rsiminel rsiminel requested a review from mboudet May 29, 2024 12:25
core/tps.service.js Outdated Show resolved Hide resolved
core/tps.service.js Outdated Show resolved Hide resolved
manager2/src/app/tps/tps.component.html Show resolved Hide resolved
@rsiminel rsiminel requested a review from mboudet May 30, 2024 12:42
@mboudet mboudet merged commit 6b6a2ac into genouest:master May 30, 2024
1 check passed
@rsiminel rsiminel deleted the extended-TP-registrations branch May 31, 2024 09:44
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.

Allow admin to extend Tp registrations
2 participants