Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update frontend/src/pages/SuperAdminPanel.jsx
Browse files
frontend/src/pages/SuperAdminPanel.jsx
CHANGED
|
@@ -291,6 +291,15 @@ const SuperAdminPanel = () => {
|
|
| 291 |
const [confirmModal, setConfirmModal] = useState({ isOpen: false, title: '', desc: '', onConfirm: null, type: 'primary' });
|
| 292 |
const [promptModal, setPromptModal] = useState({ isOpen: false, title: '', desc: '', inputs: [], onConfirm: null });
|
| 293 |
const [promptValues, setPromptValues] = useState({});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 294 |
|
| 295 |
const closeConfirm = () => setConfirmModal({ isOpen: false, title: '', desc: '', onConfirm: null, type: 'primary' });
|
| 296 |
const closePrompt = () => { setPromptModal({ isOpen: false, title: '', desc: '', inputs: [], onConfirm: null }); setPromptValues({}); };
|
|
@@ -600,8 +609,6 @@ const SuperAdminPanel = () => {
|
|
| 600 |
window.open(url, '_blank');
|
| 601 |
};
|
| 602 |
|
| 603 |
-
const [viewInvoice, setViewInvoice] = useState(null);
|
| 604 |
-
|
| 605 |
const isSupportEngineer = user?.role === 'support_engineer';
|
| 606 |
const isSuperAdmin = user?.role === 'super_admin' || user?.role === 'admin' || sessionStorage.getItem('superAdminAuth') === 'true';
|
| 607 |
|
|
@@ -638,15 +645,6 @@ const SuperAdminPanel = () => {
|
|
| 638 |
);
|
| 639 |
}
|
| 640 |
|
| 641 |
-
const [rescheduleModal, setRescheduleModal] = useState({
|
| 642 |
-
isOpen: false,
|
| 643 |
-
bookingId: null,
|
| 644 |
-
email: '',
|
| 645 |
-
meetingDate: '',
|
| 646 |
-
meetingTime: '',
|
| 647 |
-
status: 'rescheduled'
|
| 648 |
-
});
|
| 649 |
-
|
| 650 |
const handleUpdateBookingStatus = async (bookingId, status) => {
|
| 651 |
try {
|
| 652 |
const res = await fetch(`/api/demo/bookings/${bookingId}`, {
|
|
|
|
| 291 |
const [confirmModal, setConfirmModal] = useState({ isOpen: false, title: '', desc: '', onConfirm: null, type: 'primary' });
|
| 292 |
const [promptModal, setPromptModal] = useState({ isOpen: false, title: '', desc: '', inputs: [], onConfirm: null });
|
| 293 |
const [promptValues, setPromptValues] = useState({});
|
| 294 |
+
const [viewInvoice, setViewInvoice] = useState(null);
|
| 295 |
+
const [rescheduleModal, setRescheduleModal] = useState({
|
| 296 |
+
isOpen: false,
|
| 297 |
+
bookingId: null,
|
| 298 |
+
email: '',
|
| 299 |
+
meetingDate: '',
|
| 300 |
+
meetingTime: '',
|
| 301 |
+
status: 'rescheduled'
|
| 302 |
+
});
|
| 303 |
|
| 304 |
const closeConfirm = () => setConfirmModal({ isOpen: false, title: '', desc: '', onConfirm: null, type: 'primary' });
|
| 305 |
const closePrompt = () => { setPromptModal({ isOpen: false, title: '', desc: '', inputs: [], onConfirm: null }); setPromptValues({}); };
|
|
|
|
| 609 |
window.open(url, '_blank');
|
| 610 |
};
|
| 611 |
|
|
|
|
|
|
|
| 612 |
const isSupportEngineer = user?.role === 'support_engineer';
|
| 613 |
const isSuperAdmin = user?.role === 'super_admin' || user?.role === 'admin' || sessionStorage.getItem('superAdminAuth') === 'true';
|
| 614 |
|
|
|
|
| 645 |
);
|
| 646 |
}
|
| 647 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 648 |
const handleUpdateBookingStatus = async (bookingId, status) => {
|
| 649 |
try {
|
| 650 |
const res = await fetch(`/api/demo/bookings/${bookingId}`, {
|