From a430621b4c873ca39d623f3631d75b4db9ce8edf Mon Sep 17 00:00:00 2001 From: Chirag Chhatrala <60499540+chiragchhatrala@users.noreply.github.com> Date: Wed, 14 May 2025 20:49:18 +0530 Subject: [PATCH] ESC-539 - Refactor SignatureInput Component for Consistency and Enhanced Logic (#749) * Refactor SignatureInput Component for Consistency and Enhanced Logic - Updated the `SignatureInput.vue` component to use `InputWrapper` instead of `input-wrapper` for consistency with naming conventions. - Added logic to reset the signature field value when the model value is an array, improving handling of Notion database data. - Enhanced the `mounted` lifecycle hook to ensure the signature pad canvas is resized correctly after rendering. - Improved error handling in the file upload process by capturing the error in the catch block. These changes aim to enhance the maintainability and functionality of the `SignatureInput` component, ensuring better user experience and consistency across the codebase. * Refactor SignatureInput Component to Remove Unused ModelValue Logic - Removed the modelValue handler logic from the `SignatureInput.vue` component, simplifying the component's state management. - Cleaned up the created lifecycle hook by eliminating unnecessary checks related to Notion array data handling. These changes aim to enhance the maintainability of the `SignatureInput` component by streamlining its logic and improving overall code clarity. * fix lint --------- Co-authored-by: Julien Nahum --- client/components/forms/SignatureInput.vue | 26 +++++++++++++++------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/client/components/forms/SignatureInput.vue b/client/components/forms/SignatureInput.vue index 17a1acce..686af68c 100644 --- a/client/components/forms/SignatureInput.vue +++ b/client/components/forms/SignatureInput.vue @@ -1,5 +1,5 @@ - +