Fixed phone # formatting issues. BOD-308
This commit is contained in:
@@ -45,7 +45,6 @@
|
|||||||
"react-icons": "^3.11.0",
|
"react-icons": "^3.11.0",
|
||||||
"react-image-file-resizer": "^0.3.6",
|
"react-image-file-resizer": "^0.3.6",
|
||||||
"react-moment": "^0.9.7",
|
"react-moment": "^0.9.7",
|
||||||
"react-number-format": "^4.4.1",
|
|
||||||
"react-redux": "^7.2.1",
|
"react-redux": "^7.2.1",
|
||||||
"react-resizable": "^1.10.1",
|
"react-resizable": "^1.10.1",
|
||||||
"react-router-dom": "^5.2.0",
|
"react-router-dom": "^5.2.0",
|
||||||
|
|||||||
@@ -9,7 +9,10 @@ export function ChatOpenButton({ phone, jobid, openChatByPhone }) {
|
|||||||
return (
|
return (
|
||||||
<MessageFilled
|
<MessageFilled
|
||||||
style={{ margin: 4 }}
|
style={{ margin: 4 }}
|
||||||
onClick={() => openChatByPhone({ phone_num: phone, jobid: jobid })}
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
openChatByPhone({ phone_num: phone, jobid: jobid });
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import NumberFormat from "react-number-format";
|
//import NumberFormat from "react-number-format";
|
||||||
|
import phone from "phone";
|
||||||
export default function PhoneNumberFormatter(props) {
|
export default function PhoneNumberFormatter(props) {
|
||||||
return (
|
const p = phone(props.children);
|
||||||
<NumberFormat
|
|
||||||
value={props.children}
|
return <span>{p[0]}</span>;
|
||||||
type="tel"
|
|
||||||
format="+# (###)-###-####"
|
|
||||||
displayType={"text"}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11358,13 +11358,6 @@ react-moment@^0.9.7:
|
|||||||
resolved "https://registry.yarnpkg.com/react-moment/-/react-moment-0.9.7.tgz#ca570466595b1aa4f7619e62da18b3bb2de8b6f3"
|
resolved "https://registry.yarnpkg.com/react-moment/-/react-moment-0.9.7.tgz#ca570466595b1aa4f7619e62da18b3bb2de8b6f3"
|
||||||
integrity sha512-ifzUrUGF6KRsUN2pRG5k56kO0mJBr8kRkWb0wNvtFIsBIxOuPxhUpL1YlXwpbQCbHq23hUu6A0VEk64HsFxk9g==
|
integrity sha512-ifzUrUGF6KRsUN2pRG5k56kO0mJBr8kRkWb0wNvtFIsBIxOuPxhUpL1YlXwpbQCbHq23hUu6A0VEk64HsFxk9g==
|
||||||
|
|
||||||
react-number-format@^4.4.1:
|
|
||||||
version "4.4.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/react-number-format/-/react-number-format-4.4.1.tgz#d5614dd25edfc21ed48b97356213440081437a94"
|
|
||||||
integrity sha512-ZGFMXZ0U7DcmQ3bSZY3FULOA1mfqreT9NIMYZNoa/ouiSgiTQiYA95Uj2KN8ge6BRr+ghA5vraozqWqsHZQw3Q==
|
|
||||||
dependencies:
|
|
||||||
prop-types "^15.7.2"
|
|
||||||
|
|
||||||
react-overlays@^2.0.0-0:
|
react-overlays@^2.0.0-0:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/react-overlays/-/react-overlays-2.1.1.tgz#ffe2090c4a10da6b8947a1c7b1a67d0457648a0d"
|
resolved "https://registry.yarnpkg.com/react-overlays/-/react-overlays-2.1.1.tgz#ffe2090c4a10da6b8947a1c7b1a67d0457648a0d"
|
||||||
|
|||||||
Reference in New Issue
Block a user