Skip to content

Commit

Permalink
Merge pull request #17 from amansinghbais/15-value-validation
Browse files Browse the repository at this point in the history
Improved: validation for updation of product store settings(#15)
  • Loading branch information
ymaheshwari1 authored Jun 3, 2024
2 parents 0cca957 + 64a5b96 commit b7f2f1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/ProductStoreDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ async function updateProductStoreDetail(event: any, fieldName: string, isToggle:
event.stopImmediatePropagation();
payload = {[fieldName]: productStore.value[fieldName] === 'Y' ? 'N' : 'Y' };
} else {
if(event.target.value.trim() === productStore.value[fieldName]) return;
if((!productStore.value[fieldName] && !event.target.value.trim()) || (productStore.value[fieldName] && productStore.value[fieldName] === event.target.value.trim())) return;
payload = { [fieldName]: event.target.value };
}
Expand Down

0 comments on commit b7f2f1c

Please sign in to comment.