fix: add confirmation dialog before cancelling document in PWA#4438
fix: add confirmation dialog before cancelling document in PWA#4438Frankli9986 wants to merge 1 commit intofrappe:developfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe Cancel button in 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
In the PWA, when viewing a submitted document (e.g., Expense Claim), the Cancel button at the bottom of the screen directly cancels the document without any confirmation. Users can easily mistake it for a general "Cancel" button and accidentally change the document status to Cancelled.
Issue: #2199
Solution
Added a confirmation dialog using Ionic's
alertControllerbefore executing the cancel action inRequestActionSheet.vue. This matches the existing pattern used inFormView.vuewhich already has ashowCancelDialogconfirmation.Changes
alertControllerfrom@ionic/vueconfirmCancelasync function that shows an alert with:@clickhandler to callconfirmCancelinstead of directly callingupdateDocumentStatusTesting
Summary by CodeRabbit