Revize 41a82611
Přidáno uživatelem Jaroslav Hrubý před asi 2 roky(ů)
webapp/pages/documents/admin/index.tsx | ||
---|---|---|
78 | 78 |
setVisibleAssign(false); |
79 | 79 |
}; |
80 | 80 |
|
81 |
const removeUserDocument = (userId: string, documentId: string) => { |
|
82 |
Swal.fire({ |
|
83 |
title: 'Opravdu si přejete uživateli odebrat dokument?', |
|
84 |
showCancelButton: true, |
|
85 |
confirmButtonText: 'Odebrat', |
|
86 |
}).then((result) => { |
|
87 |
// TODO call API |
|
88 |
}); |
|
89 |
}; |
|
90 |
|
|
91 | 81 |
const columns = [ |
92 | 82 |
{ |
93 | 83 |
title: 'Název dokumentu', |
... | ... | |
125 | 115 |
> |
126 | 116 |
<FontAwesomeIcon |
127 | 117 |
icon={faUser} |
128 |
size={'2x'} |
|
129 |
onClick={() => |
|
130 |
// @ts-ignore |
|
131 |
removeUserDocument(e.id, record.id) |
|
132 |
} |
|
133 | 118 |
title={e.username ?? ''} |
134 | 119 |
className={'me-2'} |
135 | 120 |
/> |
Také k dispozici: Unified diff
Refactoring