mitre-form-component 2.2.3 → 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 +17 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1788,12 +1788,26 @@ var MitreFormComponent = React2.forwardRef(({
|
|
|
1788
1788
|
}, REDIRECT_DELAY_MS);
|
|
1789
1789
|
}
|
|
1790
1790
|
} else if (channel === "chat") {
|
|
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);
|
|
1796
|
+
const effectiveIdEmpreendimento = idEmpreendimento ?? selectedProduct.id.toString();
|
|
1797
|
+
const effectiveIdProdutoTerceiro = idProdutoTerceiro ?? "0";
|
|
1791
1798
|
const virtualObj = {
|
|
1792
|
-
...
|
|
1799
|
+
...requestBodyMinimal,
|
|
1800
|
+
canal: channel,
|
|
1801
|
+
nome: name,
|
|
1802
|
+
ddi: dialCode,
|
|
1803
|
+
ddd: foneDdd,
|
|
1804
|
+
fone: foneNumber,
|
|
1793
1805
|
externalOriginId: leadId,
|
|
1806
|
+
idEmpreendimento: effectiveIdEmpreendimento,
|
|
1807
|
+
id_produto: effectiveIdEmpreendimento,
|
|
1808
|
+
idProdutoTerceiro: effectiveIdProdutoTerceiro,
|
|
1809
|
+
id_produto_terceiro: effectiveIdProdutoTerceiro,
|
|
1794
1810
|
...paginaAtual ? { pagina: paginaAtual } : {},
|
|
1795
|
-
...idProdutoTerceiro !== void 0 ? { idProdutoTerceiro } : {},
|
|
1796
|
-
...idEmpreendimento !== void 0 ? { idEmpreendimento } : {},
|
|
1797
1811
|
...naoCriarEventoEfetivo ? { naoCriarEvento: true } : {}
|
|
1798
1812
|
};
|
|
1799
1813
|
setActionModal({
|