Skip to content

Commit

Permalink
Improved: validation for updation of product store settings(#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Jun 3, 2024
1 parent 0cca957 commit 64a5b96
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 64a5b96

Please sign in to comment.