imbric-theme 0.5.2 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,8 +7,9 @@ import DynamicSelect from '../../molecules/DynamicSelect'
|
|
7
7
|
import DatePicker from '../../molecules/DatePicker'
|
8
8
|
import Label from '../../atoms/Label'
|
9
9
|
import Icon from '../../atoms/Icon'
|
10
|
+
import Button from '../../atoms/Button'
|
10
11
|
import { Horizontal, Vertical } from '../../layout/Spacer/components'
|
11
|
-
import LoadingError from '../../molecules/LoadingError'
|
12
|
+
// import LoadingError from '../../molecules/LoadingError'
|
12
13
|
// import ColumnTable from '../../molecules/ColumnTable'
|
13
14
|
// import RowTable from '../../molecules/RowTable'
|
14
15
|
// import FooterTable from '../../molecules/FooterTable'
|
@@ -16,7 +17,7 @@ import LoadingError from '../../molecules/LoadingError'
|
|
16
17
|
// import useStateDate from '../../hook/useStateDate';
|
17
18
|
|
18
19
|
|
19
|
-
export const DynamicTable = ({ getStyles, optionsData, opColumns, opAddColumns, isLayoutDate, isViewRange, isViewAddColumn, isViewDownloadDoc, handleAddColumn, handleSelectRange, handleDownloadExcel, handleDefaultValue, labelDinamicSelect, placeholderDinamicSelect, isLoadingDinamicSelect, labelSinceDateRange, labelTillDateRange }) => {
|
20
|
+
export const DynamicTable = ({ getStyles, optionsData, opColumns, opAddColumns, isLayoutDate, isViewRange, isViewAddColumn, isViewBtn, isViewDownloadDoc, typeBtn, titleBtn, handleBtn, handleAddColumn, handleSelectRange, handleDownloadExcel, handleDefaultValue, labelDinamicSelect, placeholderDinamicSelect, isLoadingDinamicSelect, labelSinceDateRange, labelTillDateRange }) => {
|
20
21
|
|
21
22
|
const [tableData, setTableData] = useState(optionsData);
|
22
23
|
const [columnsData, setColumnsData] = useState(opColumns);
|
@@ -120,7 +121,26 @@ export const DynamicTable = ({ getStyles, optionsData, opColumns, opAddColumns,
|
|
120
121
|
|
121
122
|
</div>
|
122
123
|
) : null}
|
124
|
+
|
123
125
|
<Horizontal size="md" />
|
126
|
+
|
127
|
+
{isViewBtn ? (
|
128
|
+
<div className={getStyles('opFunctionBox3')}>
|
129
|
+
|
130
|
+
<Button
|
131
|
+
type={typeBtn}
|
132
|
+
isInline={true}
|
133
|
+
onClick={handleBtn}
|
134
|
+
>
|
135
|
+
{titleBtn}
|
136
|
+
</Button>
|
137
|
+
|
138
|
+
<Horizontal size="md" />
|
139
|
+
|
140
|
+
</div>
|
141
|
+
) : null}
|
142
|
+
|
143
|
+
|
124
144
|
{isViewDownloadDoc ? (
|
125
145
|
<div className={getStyles('opFunctionBox3')}>
|
126
146
|
<Icon
|
@@ -158,6 +178,7 @@ DynamicTable.propTypes = {
|
|
158
178
|
isViewRange: PropTypes.bool,
|
159
179
|
isViewAddColumn: PropTypes.bool,
|
160
180
|
isViewDownloadDoc: PropTypes.bool,
|
181
|
+
isViewBtn: PropTypes.bool,
|
161
182
|
onChangeInput: PropTypes.func,
|
162
183
|
handleAddColumn: PropTypes.func,
|
163
184
|
isError: PropTypes.string,
|
@@ -168,6 +189,9 @@ DynamicTable.propTypes = {
|
|
168
189
|
placeholderDinamicSelect: PropTypes.string,
|
169
190
|
labelSinceDateRange: PropTypes.string,
|
170
191
|
labelTillDateRange: PropTypes.string,
|
192
|
+
typeBtn: PropTypes.string,
|
193
|
+
titleBtn: PropTypes.string,
|
194
|
+
handleBtn: PropTypes.func,
|
171
195
|
}
|
172
196
|
|
173
197
|
DynamicTable.defaultProps = {
|
@@ -176,6 +200,7 @@ DynamicTable.defaultProps = {
|
|
176
200
|
isViewRange: true,
|
177
201
|
isViewAddColumn: true,
|
178
202
|
isViewDownloadDoc: true,
|
203
|
+
isViewBtn: false,
|
179
204
|
isLayoutDate: 'Calendar',
|
180
205
|
handleSelectRange: () => { },
|
181
206
|
handleDownloadExcel: () => { },
|
@@ -183,6 +208,9 @@ DynamicTable.defaultProps = {
|
|
183
208
|
placeholderDinamicSelect: 'Seleccionar columnas',
|
184
209
|
labelSinceDateRange: 'Desde',
|
185
210
|
labelTillDateRange: 'Hasta',
|
211
|
+
typeBtn: 'primary',
|
212
|
+
titleBtn: '',
|
213
|
+
handleBtn: () => { },
|
186
214
|
}
|
187
215
|
|
188
216
|
export default withStyles(styles)(DynamicTable)
|
package/layout/Navbar/Navbar.js
CHANGED
@@ -11,7 +11,7 @@ import Tabs from '../../molecules/Tabs/Tabs'
|
|
11
11
|
import Icon from '../../atoms/Icon'
|
12
12
|
import { options } from './constants'
|
13
13
|
|
14
|
-
export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkLogout, defaultValueLanguage, optionsSelectLanguage, handleChangeLanguage, languageSwitchLink }) => {
|
14
|
+
export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkLogout, linkLegal, linkInfo, linkProfile, defaultValueLanguage, optionsSelectLanguage, handleChangeLanguage, languageSwitchLink }) => {
|
15
15
|
|
16
16
|
|
17
17
|
const router = useRouter();
|
@@ -77,7 +77,7 @@ export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkL
|
|
77
77
|
{/* <div className={getStyles('navbar__item')}>Legal</div>
|
78
78
|
<div className={getStyles('navbar__item')}>User Guide</div> */}
|
79
79
|
|
80
|
-
{options.map((item, index) => (
|
80
|
+
{/* {options.map((item, index) => (
|
81
81
|
<Icon
|
82
82
|
key={index}
|
83
83
|
size='lg'
|
@@ -86,7 +86,36 @@ export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkL
|
|
86
86
|
background='transparent'
|
87
87
|
onClick={(e) => handleClick(e, item.href)}
|
88
88
|
/>
|
89
|
-
))}
|
89
|
+
))} */}
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
<Icon
|
95
|
+
size='lg'
|
96
|
+
name='legal'
|
97
|
+
color='highlight'
|
98
|
+
background='transparent'
|
99
|
+
onClick={linkLegal}
|
100
|
+
/>
|
101
|
+
|
102
|
+
<Icon
|
103
|
+
size='lg'
|
104
|
+
name='info'
|
105
|
+
color='highlight'
|
106
|
+
background='transparent'
|
107
|
+
onClick={linkInfo}
|
108
|
+
/>
|
109
|
+
|
110
|
+
<Icon
|
111
|
+
size='lg'
|
112
|
+
name='profile'
|
113
|
+
color='highlight'
|
114
|
+
background='transparent'
|
115
|
+
onClick={linkProfile}
|
116
|
+
/>
|
117
|
+
|
118
|
+
|
90
119
|
|
91
120
|
{/* <DynamicSelect
|
92
121
|
isClearable={false}
|
@@ -145,6 +174,9 @@ Navbar.propTypes = {
|
|
145
174
|
viewTabsNav: PropTypes.bool,
|
146
175
|
viewOptionsNav: PropTypes.bool,
|
147
176
|
linkLogout: PropTypes.func,
|
177
|
+
linkLegal: PropTypes.func,
|
178
|
+
linkInfo: PropTypes.func,
|
179
|
+
linkProfile: PropTypes.func,
|
148
180
|
handleChange: PropTypes.func,
|
149
181
|
languageSwitchLink: PropTypes.any.isRequired,
|
150
182
|
}
|
@@ -47,7 +47,7 @@ Dropdown.propTypes = {
|
|
47
47
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
48
48
|
})
|
49
49
|
).isRequired,
|
50
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.
|
50
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.any]),
|
51
51
|
id: PropTypes.string,
|
52
52
|
isInline: PropTypes.bool,
|
53
53
|
}
|