en code
This commit is contained in:
@@ -8,6 +8,10 @@ const convertNumbersInDOM = (node: Node): void => {
|
||||
if (node.nodeType === Node.TEXT_NODE) {
|
||||
node.nodeValue = toPersianDigits(node.nodeValue || "");
|
||||
} else if (node.nodeType === Node.ELEMENT_NODE) {
|
||||
// Skip conversion if element has 'en' class
|
||||
if ((node as Element).classList?.contains("en")) {
|
||||
return;
|
||||
}
|
||||
node.childNodes.forEach(convertNumbersInDOM);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -39,7 +39,9 @@ const MyDiscountList: FC = () => {
|
||||
<tr key={item.id} className='tr'>
|
||||
<Td text={String(index + 1)} />
|
||||
<Td text={t(`discount.${item.type}`)} />
|
||||
<Td text={item.code} />
|
||||
<Td text={''}>
|
||||
<div className='en'>{item.code}</div>
|
||||
</Td>
|
||||
<Td text={moment(item.startDate).format('jYYYY-jMM-jDD')} />
|
||||
<Td text={moment(item.endDate).format('jYYYY-jMM-jDD')} />
|
||||
<Td text={''}>
|
||||
|
||||
Reference in New Issue
Block a user