Revize d7167305
Přidáno uživatelem Jaroslav Hrubý před asi 2 roky(ů)
webapp/components/modals/AddDocumentModal.tsx | ||
---|---|---|
4 | 4 |
import React from 'react'; |
5 | 5 |
import { DocumentAddInfo, EAddDocumentFormat } from '../../api'; |
6 | 6 |
import { documentController } from '../../controllers'; |
7 |
import { ShowToast } from '../../utils/alerts'; |
|
7 | 8 |
|
8 | 9 |
const { Dragger } = Upload; |
9 | 10 |
|
... | ... | |
36 | 37 |
const handleUpload = () => { |
37 | 38 |
if (tempDocs.length !== 0) { |
38 | 39 |
setUpload(true); |
39 |
documentController.documentsPost({ documents: tempDocs }); |
|
40 |
setUpload(false); |
|
40 |
documentController.documentsPost({ documents: tempDocs }).then((r) => { |
|
41 |
ShowToast( |
|
42 |
'Nahrávání souborů proběhlo úspěšně', |
|
43 |
'success', |
|
44 |
3000, |
|
45 |
'top-end' |
|
46 |
); |
|
47 |
setUpload(false); |
|
48 |
onCancel(); |
|
49 |
}); |
|
41 | 50 |
} |
42 |
onCancel(); |
|
43 | 51 |
}; |
44 | 52 |
/** |
45 | 53 |
* Settings of a file loader. |
Také k dispozici: Unified diff
Document preview implemented