@ssplib/react-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.
|
@@ -70,8 +70,6 @@ function FileUpload({ name, tipoArquivo, title, required = false, multiple = fal
|
|
|
70
70
|
if (!res.ok)
|
|
71
71
|
setFilesError((fl) => [...fl, id]);
|
|
72
72
|
res.json().then((j) => {
|
|
73
|
-
if (!j.status)
|
|
74
|
-
setFilesError((fl) => [...fl, id]);
|
|
75
73
|
if (j.status && j.status.status === 200) {
|
|
76
74
|
const fileIdFromApi = j.data[0];
|
|
77
75
|
const fileId = fileIdFromApi['coSeqArquivo'];
|
|
@@ -138,15 +136,13 @@ function FileUpload({ name, tipoArquivo, title, required = false, multiple = fal
|
|
|
138
136
|
react_1.default.createElement(material_1.Box, { sx: { backgroundColor: '#e2eafc', padding: 1, borderRadius: 1, marginTop: 1 } },
|
|
139
137
|
react_1.default.createElement("input", Object.assign({ id: name, type: 'file', multiple: multiple }, context === null || context === void 0 ? void 0 : context.formRegister(name, {
|
|
140
138
|
validate: (v, f) => {
|
|
141
|
-
|
|
142
|
-
if (filesLoaded.length <= 0 && required)
|
|
139
|
+
if ((v.length && filesLoaded.length) <= 0 && required)
|
|
143
140
|
return 'O campo de arquivo é obrigatório';
|
|
144
141
|
},
|
|
145
142
|
}), { onChange: onFile, accept: '.pdf', style: { display: 'none' } })),
|
|
146
143
|
react_1.default.createElement("input", Object.assign({ id: name + 'foto', type: 'file', capture: 'environment', multiple: multiple }, context === null || context === void 0 ? void 0 : context.formRegister(name, {
|
|
147
144
|
validate: (v, f) => {
|
|
148
|
-
|
|
149
|
-
if (filesLoaded.length <= 0 && required)
|
|
145
|
+
if ((v.length && filesLoaded.length) <= 0 && required)
|
|
150
146
|
return 'O campo de arquivo é obrigatório';
|
|
151
147
|
},
|
|
152
148
|
}), { onChange: onFile, accept: '.jpg, .png, .jpeg', style: { display: 'none' } })),
|
|
@@ -325,7 +325,9 @@ function Table({ columns, fetchFunc, emptyMsg = {
|
|
|
325
325
|
react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'center', paddingY: 4 },
|
|
326
326
|
react_1.default.createElement(material_1.Stack, { direction: 'column', justifyContent: 'center', alignItems: 'center' },
|
|
327
327
|
react_1.default.createElement(Typography_1.default, { marginBottom: 2 },
|
|
328
|
-
|
|
328
|
+
currentPage * itemsCount + 1,
|
|
329
|
+
"-",
|
|
330
|
+
currentPage * itemsCount + 1 + getMaxItems().length - 1,
|
|
329
331
|
" de ",
|
|
330
332
|
list.length),
|
|
331
333
|
react_1.default.createElement(Pagination_1.default, { count: paginationCount, siblingCount: isSmall ? 0 : 1, size: 'large', onChange: onPaginationChange, page: listPage }))))))));
|