mitre-form-component 2.2.4 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1788,12 +1788,20 @@ var MitreFormComponent = React2.forwardRef(({
|
|
|
1788
1788
|
}, REDIRECT_DELAY_MS);
|
|
1789
1789
|
}
|
|
1790
1790
|
} else if (channel === "chat") {
|
|
1791
|
-
const { channel: _channelInBody, ...
|
|
1791
|
+
const { channel: _channelInBody, name: _nameInBody, phone: _phoneInBody, ...requestBodyMinimal } = requestBody;
|
|
1792
|
+
const dialCode = phone.dialCode;
|
|
1793
|
+
const nationalDigits = dialCode && phoneDigitsOnly.startsWith(dialCode) ? phoneDigitsOnly.slice(dialCode.length) : phoneDigitsOnly;
|
|
1794
|
+
const foneDdd = nationalDigits.slice(0, 2);
|
|
1795
|
+
const foneNumber = nationalDigits.slice(2);
|
|
1792
1796
|
const effectiveIdEmpreendimento = idEmpreendimento ?? selectedProduct.id.toString();
|
|
1793
1797
|
const effectiveIdProdutoTerceiro = idProdutoTerceiro ?? "0";
|
|
1794
1798
|
const virtualObj = {
|
|
1795
|
-
...
|
|
1799
|
+
...requestBodyMinimal,
|
|
1796
1800
|
canal: channel,
|
|
1801
|
+
nome: name,
|
|
1802
|
+
ddi: dialCode,
|
|
1803
|
+
ddd: foneDdd,
|
|
1804
|
+
fone: foneNumber,
|
|
1797
1805
|
externalOriginId: leadId,
|
|
1798
1806
|
idEmpreendimento: effectiveIdEmpreendimento,
|
|
1799
1807
|
id_produto: effectiveIdEmpreendimento,
|