Last change
on this file since f08e256 was d7b7f00, checked in by Gorazd Biskoski <gorazdbiskoskii@…>, 4 weeks ago |
Add project
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[d7b7f00] | 1 | import styles from "../../css/AdminPanelCss/modal-style.module.css";
|
---|
| 2 |
|
---|
| 3 | const AdminOrderModal = ({ isOpen, onClose, orderData }) => {
|
---|
| 4 | if (!isOpen) return null;
|
---|
| 5 |
|
---|
| 6 | const { user, order, deliveryPerson} = orderData;
|
---|
| 7 | const splittedAddress = order.address !== undefined ? order.address.split(";") : ["", "", ""];
|
---|
| 8 |
|
---|
| 9 | return (
|
---|
| 10 | <div className={styles.modalOverlay}>
|
---|
| 11 | <div className={styles.modalContent}>
|
---|
| 12 | <button className={styles.closeButton} onClick={onClose}>×</button>
|
---|
| 13 | <h2>Order Details</h2>
|
---|
| 14 |
|
---|
| 15 | <h3>User Details</h3>
|
---|
| 16 | <p><strong>Name:</strong> {user.name} {user.surname} </p>
|
---|
| 17 | <p><strong>Email:</strong> {user.email} </p>
|
---|
| 18 | <p><strong>Phone Number:</strong> {user.phoneNumber}</p>
|
---|
| 19 | <p><strong>Deliver To:</strong> {splittedAddress[0]} {splittedAddress[1]} {splittedAddress[2]}</p>
|
---|
| 20 |
|
---|
| 21 | {
|
---|
| 22 | deliveryPerson !== null &&
|
---|
| 23 | <>
|
---|
| 24 | <h3>Delivery Person Details</h3>
|
---|
| 25 | <p><strong>Name:</strong> {deliveryPerson.name} </p>
|
---|
| 26 | <p><strong>Email:</strong> {deliveryPerson.email} </p>
|
---|
| 27 | <p><strong>Phone Number:</strong> {deliveryPerson.name} </p>
|
---|
| 28 | </>
|
---|
| 29 | }
|
---|
| 30 | </div>
|
---|
| 31 | </div>
|
---|
| 32 | );
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | export default AdminOrderModal; |
---|
Note:
See
TracBrowser
for help on using the repository browser.