refactor: handle price 0 baht

This commit is contained in:
Thanaphon Frappet 2025-01-23 14:19:56 +07:00
parent c1c814ade2
commit c7438edd79
3 changed files with 3 additions and 3 deletions

View file

@ -71,7 +71,7 @@ watch(
(newValue) => {
if (newValue !== undefined && typeof newValue === 'string') {
const numericValue = newValue.replace(/,/g, '');
wageRateText.value = ThaiBahtText(numericValue);
wageRateText.value = ThaiBahtText(numericValue) || 'ศูนย์บาทถ้วน';
wageRate.value = parseFloat(numericValue);
}
},