@ssplib/react-components 0.0.120 → 0.0.122
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.
|
@@ -114,9 +114,10 @@ function FileUpload({ name, tipoArquivo, title, required = false, multiple = fal
|
|
|
114
114
|
}),
|
|
115
115
|
]);
|
|
116
116
|
}, [files, context]);
|
|
117
|
-
const removeFile = (id, hideMsg) => {
|
|
117
|
+
const removeFile = (id, hideMsg, fileId) => {
|
|
118
118
|
setFiles(files.filter((x) => x.id !== id));
|
|
119
|
-
|
|
119
|
+
if (fileId)
|
|
120
|
+
context.setFilesUid((fId) => fId.filter((idd) => idd.CO_SEQ_ARQUIVO !== fileId));
|
|
120
121
|
if (!hideMsg) {
|
|
121
122
|
setErrorMsg('Erro ao enviar arquivo. Tente novamente mais tarde');
|
|
122
123
|
setTimeout(() => {
|
|
@@ -134,10 +135,9 @@ function FileUpload({ name, tipoArquivo, title, required = false, multiple = fal
|
|
|
134
135
|
})
|
|
135
136
|
.then((res) => {
|
|
136
137
|
if (!res.ok)
|
|
137
|
-
removeFile(id, true);
|
|
138
|
+
removeFile(id, true, fileIds[id]);
|
|
138
139
|
if (res.status === 200) {
|
|
139
|
-
|
|
140
|
-
context.setFilesUid((fId) => fId.filter((idd) => idd.CO_SEQ_ARQUIVO !== id));
|
|
140
|
+
removeFile(id, true, fileIds[id]);
|
|
141
141
|
}
|
|
142
142
|
})
|
|
143
143
|
.catch((err) => console.log(err));
|
|
@@ -312,7 +312,7 @@ function Table({ columns, fetchFunc, emptyMsg = {
|
|
|
312
312
|
react_1.default.createElement(material_1.Box, { sx: { width: 'max-content', paddingX: 1 } },
|
|
313
313
|
react_1.default.createElement(Typography_1.default, { fontSize: 16, fontWeight: 700, color: '#1E293B', fontFamily: 'Inter' }, c.title)),
|
|
314
314
|
react_1.default.createElement(material_1.Box, { paddingLeft: 1 },
|
|
315
|
-
react_1.default.createElement(Typography_1.default, { fontSize: 16, sx: { wordWrap: 'break-word', color: '#1E293B' }, fontFamily: 'Inter' }, c.keyName === statusKeyName ? getStatusMsg((0, lodash_get_1.default)(x, c.keyName)) : (0, lodash_get_1.default)(x, c.keyName)))))),
|
|
315
|
+
react_1.default.createElement(Typography_1.default, { fontSize: 16, sx: { wordWrap: 'break-word', color: '#1E293B' }, fontFamily: 'Inter' }, c.keyName === statusKeyName ? getStatusMsg((0, lodash_get_1.default)(x, c.keyName)) : react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: (0, lodash_get_1.default)(x, c.keyName) } })))))),
|
|
316
316
|
react_1.default.createElement(Grid_1.default, { item: true, xs: 12, md: 12 / columnSize },
|
|
317
317
|
react_1.default.createElement(material_1.Stack, { direction: 'row', alignItems: 'center', justifyContent: isSmall ? 'start' : 'flex-end', sx: { height: '100%', paddingBottom: isSmall ? 2 : 0 } }, action(x)))))))),
|
|
318
318
|
react_1.default.createElement(material_1.Stack, { bgcolor: '#F8FAFC', direction: 'row', justifyContent: 'center', paddingY: 1, borderTop: 3, borderColor: '#b4bfcf' },
|