@djb25/digit-ui-module-ekyc 1.0.2 → 1.0.3

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.
@@ -4,119 +4,120 @@ import { useTranslation } from "react-i18next";
4
4
  import StatusCards from "./StatusCards";
5
5
 
6
6
  const SearchConsumer = ({ onSearch, searchParams, FilterComponent, children, ...props }) => {
7
- const { t } = useTranslation();
8
- const [_searchParams, setSearchParams] = useState(() => ({ ...searchParams }));
7
+ const { t } = useTranslation();
8
+ const [_searchParams, setSearchParams] = useState(() => ({ ...searchParams }));
9
9
 
10
- const onChange = (key, value) => {
11
- setSearchParams((prev) => ({ ...prev, [key]: value }));
12
- };
10
+ const onChange = (key, value) => {
11
+ setSearchParams((prev) => ({ ...prev, [key]: value }));
12
+ };
13
13
 
14
- const onSubmit = (e) => {
15
- if (e && e.preventDefault) e.preventDefault();
16
- onSearch(_searchParams);
17
- };
14
+ const onSubmit = (e) => {
15
+ if (e && e.preventDefault) e.preventDefault();
16
+ onSearch(_searchParams);
17
+ };
18
18
 
19
- const onClear = () => {
20
- const cleared = { kNumber: "", kName: "" };
21
- setSearchParams(cleared);
22
- onSearch(cleared);
23
- };
19
+ const onClear = () => {
20
+ const cleared = { kNumber: "", kName: "" };
21
+ setSearchParams(cleared);
22
+ onSearch(cleared);
23
+ };
24
24
 
25
- return (
26
- <div className="inbox-container">
27
- <div className="filters-container">
28
- {/* Sidebar Title Card */}
29
- <Card className="sidebar-title-card" style={{ display: "flex", alignItems: "center", padding: "16px", marginBottom: "16px", borderRadius: "4px" }}>
30
- <div className="icon-container" style={{ color: "#F47738", marginRight: "12px" }}>
31
- <HomeIcon style={{ width: "24px", height: "24px" }} />
32
- </div>
33
- <div style={{ fontWeight: "700", fontSize: "18px", color: "#0B0C0C" }}>
34
- {t("ACTION_CREATE_EKYC")}
35
- </div>
36
- </Card>
25
+ return (
26
+ <div className="inbox-container">
27
+ <div className="filters-container">
28
+ {/* Sidebar Title Card */}
29
+ <Card
30
+ className="sidebar-title-card"
31
+ style={{ display: "flex", alignItems: "center", padding: "16px", marginBottom: "16px", borderRadius: "4px" }}
32
+ >
33
+ <div className="icon-container" style={{ color: "#3A8DCC", marginRight: "12px" }}>
34
+ <HomeIcon style={{ width: "24px", height: "24px" }} />
35
+ </div>
36
+ <div style={{ fontWeight: "700", fontSize: "18px", color: "#0B0C0C" }}>{t("ACTION_CREATE_EKYC")}</div>
37
+ </Card>
37
38
 
38
- <div>
39
- {FilterComponent && (
40
- <FilterComponent
41
- defaultSearchParams={props.defaultSearchParams}
42
- onFilterChange={props.onSearch}
43
- searchParams={searchParams}
44
- type="desktop"
45
- moduleCode="EKYC"
46
- />
47
- )}
48
- </div>
49
- </div>
39
+ <div>
40
+ {FilterComponent && (
41
+ <FilterComponent
42
+ defaultSearchParams={props.defaultSearchParams}
43
+ onFilterChange={props.onSearch}
44
+ searchParams={searchParams}
45
+ type="desktop"
46
+ moduleCode="EKYC"
47
+ />
48
+ )}
49
+ </div>
50
+ </div>
50
51
 
51
- <div style={{ flex: 1, marginLeft: "16px" }}>
52
- {/* <Card className="ekyc-metrics-card" style={{ marginBottom: "16px", padding: "16px" }}>
52
+ <div style={{ flex: 1, marginLeft: "16px" }}>
53
+ {/* <Card className="ekyc-metrics-card" style={{ marginBottom: "16px", padding: "16px" }}>
53
54
  <StatusCards countData={props.countData} />
54
55
  </Card> */}
55
56
 
56
- <Card className="ekyc-search-card" style={{ padding: "24px", marginBottom: "24px", borderRadius: "12px", boxShadow: "0 4px 12px rgba(0,0,0,0.05)" }}>
57
- <Header style={{ fontSize: "24px", marginBottom: "20px", fontWeight: "700", color: "#0B0C0C" }}>
58
- {t("EKYC_SEARCH_CONSUMER_HEADER")}
59
- </Header>
60
- <form onSubmit={onSubmit}>
61
- <div style={{ display: "flex", gap: "24px", alignItems: "flex-end", flexWrap: "wrap" }}>
62
- <div style={{ flex: "1", minWidth: "250px" }}>
63
- <div className="filter-label" style={{ fontWeight: "600", marginBottom: "8px", fontSize: "14px", color: "#505A5F" }}>
64
- {t("EKYC_K_NUMBER")}
65
- </div>
66
- <div style={{ position: "relative" }}>
67
- <TextInput
68
- value={_searchParams?.kNumber}
69
- onChange={(e) => onChange("kNumber", e.target.value)}
70
- placeholder={t("EKYC_K_NUMBER_PLACEHOLDER")}
71
- style={{ borderRadius: "8px", paddingLeft: "12px", height: "44px" }}
72
- />
73
- </div>
74
- </div>
57
+ <Card
58
+ className="ekyc-search-card"
59
+ style={{ padding: "24px", marginBottom: "24px", borderRadius: "12px", boxShadow: "0 4px 12px rgba(0,0,0,0.05)" }}
60
+ >
61
+ <Header style={{ fontSize: "24px", marginBottom: "20px", fontWeight: "700", color: "#0B0C0C" }}>{t("EKYC_SEARCH_CONSUMER_HEADER")}</Header>
62
+ <form onSubmit={onSubmit}>
63
+ <div style={{ display: "flex", gap: "24px", alignItems: "flex-end", flexWrap: "wrap" }}>
64
+ <div style={{ flex: "1", minWidth: "250px" }}>
65
+ <div className="filter-label" style={{ fontWeight: "600", marginBottom: "8px", fontSize: "14px", color: "#505A5F" }}>
66
+ {t("EKYC_K_NUMBER")}
67
+ </div>
68
+ <div style={{ position: "relative" }}>
69
+ <TextInput
70
+ value={_searchParams?.kNumber}
71
+ onChange={(e) => onChange("kNumber", e.target.value)}
72
+ placeholder={t("EKYC_K_NUMBER_PLACEHOLDER")}
73
+ style={{ borderRadius: "8px", paddingLeft: "12px", height: "44px" }}
74
+ />
75
+ </div>
76
+ </div>
75
77
 
76
- <div style={{ flex: "1", minWidth: "250px" }}>
77
- <div className="filter-label" style={{ fontWeight: "600", marginBottom: "8px", fontSize: "14px", color: "#505A5F" }}>
78
- {t("EKYC_K_NAME")}
79
- </div>
80
- <div style={{ position: "relative" }}>
81
- <TextInput
82
- value={_searchParams?.kName}
83
- onChange={(e) => onChange("kName", e.target.value)}
84
- placeholder={t("EKYC_K_NAME_PLACEHOLDER")}
85
- style={{ borderRadius: "8px", paddingLeft: "12px", height: "44px" }}
86
- />
87
- </div>
88
- </div>
78
+ <div style={{ flex: "1", minWidth: "250px" }}>
79
+ <div className="filter-label" style={{ fontWeight: "600", marginBottom: "8px", fontSize: "14px", color: "#505A5F" }}>
80
+ {t("EKYC_K_NAME")}
81
+ </div>
82
+ <div style={{ position: "relative" }}>
83
+ <TextInput
84
+ value={_searchParams?.kName}
85
+ onChange={(e) => onChange("kName", e.target.value)}
86
+ placeholder={t("EKYC_K_NAME_PLACEHOLDER")}
87
+ style={{ borderRadius: "8px", paddingLeft: "12px", height: "44px" }}
88
+ />
89
+ </div>
90
+ </div>
89
91
 
90
- <div style={{ display: "flex", gap: "12px", alignItems: "center" }}>
91
- <button
92
- type="button"
93
- onClick={onClear}
94
- style={{
95
- background: "none",
96
- border: "none",
97
- color: "#0076f3ff",
98
- fontWeight: "600",
99
- cursor: "pointer",
100
- fontSize: "14px",
101
- padding: "10px",
102
-
103
- }}
104
- >
105
- {t("ES_COMMON_CLEAR")}
106
- </button>
107
- <SubmitBar
108
- label={t("ES_COMMON_SEARCH")}
109
- onSubmit={onSubmit}
110
- style={{ margin: 0, borderRadius: "8px", height: "44px", padding: "0 32px", marginTop: "-55px" }}
111
- />
112
- </div>
113
- </div>
114
- </form>
115
- </Card>
116
- {children}
92
+ <div style={{ display: "flex", gap: "12px", alignItems: "center" }}>
93
+ <button
94
+ type="button"
95
+ onClick={onClear}
96
+ style={{
97
+ background: "none",
98
+ border: "none",
99
+ color: "#0076f3ff",
100
+ fontWeight: "600",
101
+ cursor: "pointer",
102
+ fontSize: "14px",
103
+ padding: "10px",
104
+ }}
105
+ >
106
+ {t("ES_COMMON_CLEAR")}
107
+ </button>
108
+ <SubmitBar
109
+ label={t("ES_COMMON_SEARCH")}
110
+ onSubmit={onSubmit}
111
+ style={{ margin: 0, borderRadius: "8px", height: "44px", padding: "0 32px", marginTop: "-55px" }}
112
+ />
113
+ </div>
117
114
  </div>
118
- </div>
119
- );
115
+ </form>
116
+ </Card>
117
+ {children}
118
+ </div>
119
+ </div>
120
+ );
120
121
  };
121
122
 
122
- export default SearchConsumer;
123
+ export default SearchConsumer;