Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
fix(dashboard): type Number Checker numbers left to right
Yudhi Armyndharis12b1ebd3da1b
diff --git a/dashboard/src/pages/NumberChecker.test.ts b/dashboard/src/pages/NumberChecker.test.tsindex 8a282d639..d5362923a 100644--- a/dashboard/src/pages/NumberChecker.test.ts+++ b/dashboard/src/pages/NumberChecker.test.ts@@ -208,6 +208,15 @@ test('NumberChecker: numbers and ids are isolated as left-to-right, so a right-tassert.equal(jid?.textContent, '[email protected]');});+test('NumberChecker: the number field and the bulk list are typed left to right, so a right-to-left page keeps the plus sign in front', async () => {+ const { container } = renderComponent();+ await rtl.screen.findByRole('option', { name: /Primary Session/ });+ assert.equal(rtl.screen.getByPlaceholderText(/9876543210/).getAttribute('dir'), 'ltr');++ rtl.fireEvent.click(rtl.screen.getByRole('button', { name: /Bulk/i }));+ assert.equal(container.querySelector('.nc-textarea')?.getAttribute('dir'), 'ltr');+});+test('NumberChecker: viewers cannot start single or bulk lookups, including with Enter', async () => {const lookups: string[] = [];globalThis.fetch = ((input: RequestInfo | URL) => {diff --git a/dashboard/src/pages/NumberChecker.tsx b/dashboard/src/pages/NumberChecker.tsxindex ba5f8bf65..6bbb3c82a 100644--- a/dashboard/src/pages/NumberChecker.tsx+++ b/dashboard/src/pages/NumberChecker.tsx@@ -460,6 +460,7 @@ export function NumberChecker() {<div className="nc-input-row"><inputtype="text"+ dir="ltr"className="nc-input"placeholder={t('numberChecker.single.phonePlaceholder')}value={phoneNumber}@@ -764,6 +765,7 @@ export function NumberChecker() {<div className="nc-form-group"><label className="nc-label">{t('numberChecker.bulk.numbersLabel')}</label><textarea+ dir="ltr"className="nc-textarea"placeholder="919612345678 6281234567890 14155552671"value={batchInput}