From a3b1e525dc8956436d0a6ce543232ba1ccbd59fb Mon Sep 17 00:00:00 2001 From: Leonid Chelakhov Date: Mon, 2 Dec 2024 19:17:58 +0300 Subject: [PATCH 01/17] Added UserActions.jsx and changed usertable --- .../UserProfilesTable/UserActions.jsx | 92 +++++++++++++++++++ .../AdminPage/UserProfilesTable/UserTable.jsx | 11 ++- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 FrontEnd/src/pages/AdminPage/UserProfilesTable/UserActions.jsx diff --git a/FrontEnd/src/pages/AdminPage/UserProfilesTable/UserActions.jsx b/FrontEnd/src/pages/AdminPage/UserProfilesTable/UserActions.jsx new file mode 100644 index 00000000..41d9c9ad --- /dev/null +++ b/FrontEnd/src/pages/AdminPage/UserProfilesTable/UserActions.jsx @@ -0,0 +1,92 @@ +import React from 'react'; +import { Dropdown, Modal, Button, message } from 'antd'; +import { ExclamationCircleOutlined } from '@ant-design/icons'; + +function UserActions({ user, onActionComplete }) { + const handleActionClick = (action) => { + switch (action) { + case 'sendMessage': + showSendMessageModal(); + break; + case 'viewProfile': + viewProfile(); + break; + case 'blockUser': + confirmBlockUser(); + break; + default: + console.error('Unknown action:', action); + } + }; + + const showSendMessageModal = () => { + let messageContent = ''; + Modal.confirm({ + title: `Надіслати листа користувачу ${user.name} ${user.surname}`, + content: ( +