-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
feat: delete past bookings #19120
base: main
Are you sure you want to change the base?
feat: delete past bookings #19120
Conversation
@hp77-creator is attempting to deploy a commit to the cal-staging Team on Vercel. A member of the Team first needs to authorize it. |
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details:
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (02/05/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (02/05/25)1 label was added to this PR based on Keith Williams's automation. "Add ready-for-e2e label" took an action on this PR • (02/07/25)1 label was added to this PR based on Keith Williams's automation. "Add foundation team as reviewer" took an action on this PR • (02/07/25)1 reviewer was added to this PR based on Keith Williams's automation. |
Hi @hp77-creator, thanks for your PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Screen.Recording.2025-02-06.at.9.34.55.PM.mov@retrogtx added the change and the vid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works, lgtm
E2E results are ready! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only marking as requested changes to ensure this gets a review from Foundation before merge due to the high-risk nature of this. @emrysal @zomars @ThyMinimalDev @eunjae-lee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code cannot be merged without automated tests verifying:
- Deleting 1 booking only deletes the 1 record
- Deleting multiple bookings deletes only the exact bookings it should
- I cannot delete other bookings I don't have permission to delete
Thanks @keithwillcode |
hey @hp77-creator |
I am working on it @retrogtx |
Add router tests as we do not wish to delete something that is unnecessary as that will be dangerous An example for the same: #19071 Thank you |
I was checking the |
hey, the tests in that directory is just run. you can trigger it yourself by writing |
indeed we can, I was confused because I thought this needs to go into suite as well, i will follow what you have mentioned. Thanks. |
@keithwillcode Thanks for the change request of adding test, It made me add check for unauthorized user, I have added tests, @retrogtx you may review, Thanks for your patience. |
8628f43
to
65b25a3
Compare
thank you for the PR @hp77-creator since this deals with risky parts (like permanently deleting) this will take some time! |
What does this PR do?
I have added two options for the user to delete past bookings.
They can delete individual bookings like this:
![image](https://private-user-images.githubusercontent.com/24816726/410183856-9d152a3b-1aec-4438-94f0-43244c0fa81a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NzQ5ODgsIm5iZiI6MTczOTQ3NDY4OCwicGF0aCI6Ii8yNDgxNjcyNi80MTAxODM4NTYtOWQxNTJhM2ItMWFlYy00NDM4LTk0ZjAtNDMyNDRjMGZhODFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDE5MjQ0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRiYTI3N2YyZmYyZDg5OWUyNWIwMjFiMTc2ZmJhNTdhZWI3Zjg4Y2I3NmVkMmM4OWE4YjlhNzdmY2ZhODY1OTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.pROS7oIyL17kiTC_bLiaC1b7e59LbTxK_-AE55Lb-Uw)
![image](https://private-user-images.githubusercontent.com/24816726/410184014-c7d83c91-a713-4c7e-b537-94fc76965aa3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NzQ5ODgsIm5iZiI6MTczOTQ3NDY4OCwicGF0aCI6Ii8yNDgxNjcyNi80MTAxODQwMTQtYzdkODNjOTEtYTcxMy00YzdlLWI1MzctOTRmYzc2OTY1YWEzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDE5MjQ0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZmZDljM2QxMDgzMTgyOTk3NzAwNWU4Y2YzZTIzZGFjZDljMjQ3ODI4NzA3ODI0OTUwZGVmYzk3ODExMzA1MTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.oTa05bZKri3HOw2W6iOzXtyxS31s0nt4Abz0rfczlM8)
Or they can delete all the bookings in one go using the main button:
![image](https://private-user-images.githubusercontent.com/24816726/410185039-16b35366-5604-417c-beae-234b6b4c9992.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NzQ5ODgsIm5iZiI6MTczOTQ3NDY4OCwicGF0aCI6Ii8yNDgxNjcyNi80MTAxODUwMzktMTZiMzUzNjYtNTYwNC00MTdjLWJlYWUtMjM0YjZiNGM5OTkyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDE5MjQ0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwMjkyNWY4NDQ3ODI3MmIzZDZmMWUwMjIwODQ1NTUzYjc4YzI2MTFhZTg5YzA1MDg3YTIzNmQ5MmQ3ZGQxZDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.rGYU5CiMWx5Qjg_iwwi_oj7p7V5Ip8SBdqHPQSXss00)
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
/claim #18787