sales-frontend-components 0.0.113 → 0.0.115
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.js +29 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +31 -17
- package/dist/index.esm.js.map +1 -1
- package/package.json +15 -15
package/dist/index.cjs.js
CHANGED
|
@@ -1849,15 +1849,21 @@ function DeaCustomerSearch({
|
|
|
1849
1849
|
onCustomerSelect,
|
|
1850
1850
|
selectedCustomer
|
|
1851
1851
|
}) {
|
|
1852
|
-
const [
|
|
1853
|
-
const [
|
|
1852
|
+
const [residentNumberFront, setResidentNumberFront] = React.useState("");
|
|
1853
|
+
const [residentNumberBack, setResidentNumberBack] = React.useState("");
|
|
1854
1854
|
const handleSearch = () => {
|
|
1855
|
-
|
|
1855
|
+
salesFrontendUtils.getE2EDataIDs(["residentNumberFront", "residentNumberBack"], (e2edata) => {
|
|
1856
|
+
setSearchParams({
|
|
1857
|
+
residentNumberFront,
|
|
1858
|
+
residentNumberBack,
|
|
1859
|
+
e2edata
|
|
1860
|
+
});
|
|
1861
|
+
});
|
|
1856
1862
|
};
|
|
1857
1863
|
const handleReset = () => {
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
setSearchParams(
|
|
1864
|
+
setResidentNumberFront("");
|
|
1865
|
+
setResidentNumberBack("");
|
|
1866
|
+
setSearchParams();
|
|
1861
1867
|
};
|
|
1862
1868
|
const onKeyUp = (e) => {
|
|
1863
1869
|
e.key === "Enter" && handleSearch();
|
|
@@ -1876,17 +1882,18 @@ function DeaCustomerSearch({
|
|
|
1876
1882
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1877
1883
|
TextField$3,
|
|
1878
1884
|
{
|
|
1879
|
-
|
|
1885
|
+
name: "residentNumberFront",
|
|
1886
|
+
value: residentNumberFront,
|
|
1880
1887
|
maxLength: 6,
|
|
1881
1888
|
placeholder: "\uC55E 6\uC790\uB9AC \uC785\uB825",
|
|
1882
|
-
onChange: (e) =>
|
|
1889
|
+
onChange: (e) => setResidentNumberFront(e.target.value),
|
|
1883
1890
|
size: "medium",
|
|
1884
1891
|
onKeyUp,
|
|
1885
1892
|
onKeyDown,
|
|
1886
1893
|
rootProps: {
|
|
1887
1894
|
className: cx$e("search-input"),
|
|
1888
1895
|
onClear: () => {
|
|
1889
|
-
|
|
1896
|
+
setResidentNumberFront("");
|
|
1890
1897
|
}
|
|
1891
1898
|
}
|
|
1892
1899
|
}
|
|
@@ -1895,17 +1902,21 @@ function DeaCustomerSearch({
|
|
|
1895
1902
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1896
1903
|
TextField$3,
|
|
1897
1904
|
{
|
|
1898
|
-
|
|
1905
|
+
type: "password",
|
|
1906
|
+
name: "residentNumberBack",
|
|
1907
|
+
value: residentNumberBack,
|
|
1899
1908
|
maxLength: 7,
|
|
1900
1909
|
placeholder: "\uB4A4 7\uC790\uB9AC \uC785\uB825",
|
|
1901
|
-
|
|
1910
|
+
e2e_type: "1",
|
|
1911
|
+
e2e_inputtype: "1",
|
|
1912
|
+
onChange: (e) => setResidentNumberBack(e.target.value),
|
|
1902
1913
|
size: "medium",
|
|
1903
1914
|
onKeyDown,
|
|
1904
1915
|
onKeyUp,
|
|
1905
1916
|
rootProps: {
|
|
1906
1917
|
className: cx$e("search-input"),
|
|
1907
1918
|
onClear: () => {
|
|
1908
|
-
|
|
1919
|
+
setResidentNumberBack("");
|
|
1909
1920
|
}
|
|
1910
1921
|
}
|
|
1911
1922
|
}
|
|
@@ -1930,15 +1941,15 @@ function DeaCustomerSearch({
|
|
|
1930
1941
|
|
|
1931
1942
|
const DeaCustomerSearchModal = ({ isOpen, onClose, onSave }) => {
|
|
1932
1943
|
const [selectedCustomer, setSelectedCustomer] = React.useState(null);
|
|
1933
|
-
const [searchParams, setSearchParams] = React.useState(
|
|
1934
|
-
const canSearch = React.useMemo(() => !!(searchParams.customerName || searchParams.residentNumber), [searchParams]);
|
|
1944
|
+
const [searchParams, setSearchParams] = React.useState();
|
|
1935
1945
|
const { data, isFetching } = reactQuery.useQuery({
|
|
1936
1946
|
queryKey: ["deaCustomerSearch", searchParams],
|
|
1937
1947
|
queryFn: () => method.getDspCustomerListMethod(searchParams),
|
|
1938
|
-
enabled:
|
|
1948
|
+
enabled: !!searchParams,
|
|
1939
1949
|
retry: false
|
|
1940
1950
|
});
|
|
1941
1951
|
const [customerList, setCustomerList] = React.useState([]);
|
|
1952
|
+
salesFrontendUtils.loadScript();
|
|
1942
1953
|
React.useEffect(() => {
|
|
1943
1954
|
if (data?.data) {
|
|
1944
1955
|
setCustomerList(data.data);
|
|
@@ -1949,6 +1960,9 @@ const DeaCustomerSearchModal = ({ isOpen, onClose, onSave }) => {
|
|
|
1949
1960
|
React.useEffect(() => {
|
|
1950
1961
|
setSelectedCustomer(null);
|
|
1951
1962
|
}, [customerList]);
|
|
1963
|
+
React.useEffect(() => {
|
|
1964
|
+
salesFrontendUtils.initASTX2();
|
|
1965
|
+
}, []);
|
|
1952
1966
|
const handleCustomerSelect = (customer) => {
|
|
1953
1967
|
setSelectedCustomer(customer);
|
|
1954
1968
|
};
|