feat: enhance child edit and view components with improved form handling and validation
All checks were successful
Chore App Build and Push Docker Images / build-and-push (push) Successful in 1m4s
All checks were successful
Chore App Build and Push Docker Images / build-and-push (push) Successful in 1m4s
- Added `requireDirty` prop to `EntityEditForm` for dirty state management. - Updated `ChildEditView` to handle initial data loading and image selection more robustly. - Refactored `ChildView` to remove unused reward dialog logic and prevent API calls in child mode. - Improved type definitions for form fields and initial data in `ChildEditView`. - Enhanced error handling in form submissions across components. - Implemented cross-tab logout synchronization on password reset in the auth store. - Added tests for login and entity edit form functionalities to ensure proper behavior. - Introduced global fetch interceptor for handling unauthorized responses. - Documented password reset flow and its implications on session management.
This commit is contained in:
@@ -52,7 +52,7 @@ const $router = useRouter()
|
||||
|
||||
const showConfirm = ref(false)
|
||||
const rewardToDelete = ref<string | null>(null)
|
||||
const rewardListRef = ref()
|
||||
const rewardListRef = ref<InstanceType<typeof ItemList> | null>(null)
|
||||
const rewardCountRef = ref<number>(-1)
|
||||
|
||||
function handleRewardModified(event: any) {
|
||||
@@ -75,10 +75,7 @@ function confirmDeleteReward(rewardId: string) {
|
||||
}
|
||||
|
||||
const deleteReward = async () => {
|
||||
const id =
|
||||
typeof rewardToDelete.value === 'object' && rewardToDelete.value !== null
|
||||
? rewardToDelete.value.id
|
||||
: rewardToDelete.value
|
||||
const id = rewardToDelete.value
|
||||
if (!id) return
|
||||
try {
|
||||
const resp = await fetch(`/api/reward/${id}`, {
|
||||
|
||||
Reference in New Issue
Block a user