├── src
├── pages
│ ├── Main
│ │ ├── Error-Page.jsx
│ │ ├── Binance
│ │ │ ├── Modals
│ │ │ │ ├── DeleteBinanceModal.jsx
│ │ │ │ ├── AddTokenModal.jsx
│ │ │ │ ├── AddBinanceModal.jsx
│ │ │ │ └── UpdateBinanceModal.jsx
│ │ │ └── Binance.jsx
│ │ ├── CombinedGiftList
│ │ │ ├── Modals
│ │ │ │ ├── DeleteConformationModel.jsx
│ │ │ │ ├── AddProductModal.jsx
│ │ │ │ └── UpdateProductModal.jsx
│ │ │ └── CombinedGiftList.jsx
│ │ ├── Customer
│ │ │ ├── Customer.jsx
│ │ │ └── CustomerTable
│ │ │ │ └── CustomerTable.jsx
│ │ ├── CMS
│ │ │ ├── Cms.jsx
│ │ │ └── CMSBLocks
│ │ │ │ ├── FaqManage.jsx
│ │ │ │ ├── PartnerLogoManage.jsx
│ │ │ │ └── CardSliderManage.jsx
│ │ ├── Unauthorized.jsx
│ │ ├── Order
│ │ │ ├── Modals
│ │ │ │ ├── OrderDetails.css
│ │ │ │ └── OrderDetails.jsx
│ │ │ └── Order.jsx
│ │ ├── GridView.jsx
│ │ ├── BinanceOrders
│ │ │ └── BinanceOrders.jsx
│ │ ├── BitaqatyGiftCards.jsx
│ │ ├── SidePanel.jsx
│ │ ├── Collections.jsx
│ │ └── Dashboard.jsx
│ └── Auth
│ │ ├── ForgetPassword.jsx
│ │ ├── ResetPassword.jsx
│ │ └── Login.jsx
├── css
│ ├── side-bar.css
│ ├── loader.css
│ ├── dashboard.css
│ ├── login.css
│ └── table.css
├── main.jsx
├── util
│ ├── generateId.js
│ ├── Loader.jsx
│ └── helper.js
├── components
│ └── ProjectedRoutes.jsx
├── assets
│ ├── orders-icon.svg
│ ├── sales-icon.svg
│ ├── cloud-logo.svg
│ ├── products-icon.svg
│ ├── doc-icon.svg
│ ├── group-icon.svg
│ ├── list-icon.svg
│ ├── grid-icon.svg
│ ├── delete-icon.svg
│ └── react.svg
├── services
│ ├── Auth.js
│ ├── Order.js
│ ├── Cms.js
│ ├── Users.js
│ ├── categories.js
│ ├── Collections.js
│ └── Product.js
├── index.css
├── App.css
└── App.jsx
├── public
├── assets
│ ├── logo1.png
│ ├── logo2.png
│ ├── category.png
│ ├── login-bg.png
│ ├── login-bg-2.png
│ ├── Unauthorized.jpg
│ └── default-gift-card.jpg
└── vite.svg
├── vite.config.js
├── README.md
├── .eslintrc.cjs
├── index.html
├── package.json
└── .gitignore
/src/pages/Main/Error-Page.jsx:
--------------------------------------------------------------------------------
1 | export const ErrorPage = () => {
2 |
3 | return ''
4 |
5 | }
--------------------------------------------------------------------------------
/public/assets/logo1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/star900817/agc_binance_admin/HEAD/public/assets/logo1.png
--------------------------------------------------------------------------------
/public/assets/logo2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/star900817/agc_binance_admin/HEAD/public/assets/logo2.png
--------------------------------------------------------------------------------
/public/assets/category.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/star900817/agc_binance_admin/HEAD/public/assets/category.png
--------------------------------------------------------------------------------
/public/assets/login-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/star900817/agc_binance_admin/HEAD/public/assets/login-bg.png
--------------------------------------------------------------------------------
/public/assets/login-bg-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/star900817/agc_binance_admin/HEAD/public/assets/login-bg-2.png
--------------------------------------------------------------------------------
/public/assets/Unauthorized.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/star900817/agc_binance_admin/HEAD/public/assets/Unauthorized.jpg
--------------------------------------------------------------------------------
/public/assets/default-gift-card.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/star900817/agc_binance_admin/HEAD/public/assets/default-gift-card.jpg
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vitejs.dev/config/
5 | export default defineConfig({
6 | plugins: [react()],
7 | })
8 |
--------------------------------------------------------------------------------
/src/css/side-bar.css:
--------------------------------------------------------------------------------
1 | .ant-menu-item-selected {
2 | background-color: #00B6DE !important;
3 | color: white !important;
4 | }
5 | .img-container{
6 | margin: 25px 0;
7 | }
8 | .img-container img {
9 | width: 28%;
10 | margin: 0 5px;
11 | object-fit: contain;
12 | }
--------------------------------------------------------------------------------
/src/main.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactDOM from 'react-dom/client'
3 | import App from './App.jsx'
4 | import './index.css'
5 |
6 | ReactDOM.createRoot(document.getElementById('root')).render(
7 |
15 |
25 | Unauthorized !
26 | Contact Super Admin for visiting permission to this page.
27 |
28 |
29 | Re-Authenticate just in case.
30 |
31 |
{category}
40 |
38 |
39 | {record.firstName || record.lastName}
, 106 | }, 107 | { 108 | title: "Email ID", 109 | dataIndex: "email", 110 | ...getColumnSearchProps('email'), 111 | key: "email", 112 | }, 113 | { 114 | title: "User type", 115 | dataIndex: "role", 116 | kay: "role", 117 | }, 118 | { 119 | title: "Registered on", 120 | dataIndex: "createdAt", 121 | key: "createdAt", 122 | render: (dateStr) =>{new Date(dateStr).toUTCString()}
, 123 | }, 124 | ]; 125 | 126 | useEffect(() => { 127 | const filtered = searchData(sortParameters, copyCustomers); 128 | setCustomers(filtered); 129 | }, [sortParameters]); 130 | 131 | useEffect(() => { 132 | async function fetch() { 133 | const { data: customerData } = await getCustomerUser(); 134 | setCustomers(customerData); 135 | setCopyCustomers(customerData); 136 | setIsLoading(false) 137 | } 138 | 139 | fetch(); 140 | 141 | }, []); 142 | 143 | return ( 144 | isLoading?{new Date(dateStr).toUTCString()}
, 64 | }, 65 | { 66 | title: 'Order ID', 67 | dataIndex: 'orderId', 68 | key: 'orderId', 69 | }, 70 | { 71 | title: 'Customer Name', 72 | dataIndex: 'Customer Name', 73 | key: 'userId', 74 | render: (text, record) => ( 75 |{record.userId.fullName || record.userId.firstName}
76 | ), 77 | }, 78 | { 79 | title: 'TAG', 80 | dataIndex: 'tag', 81 | key: 'tag', 82 | render: (text, record) => { 83 | let type = ''; 84 | for (const product of record.products) { 85 | type = product.productType; 86 | break; 87 | } 88 | return{type}
; 89 | }, 90 | }, 91 | { 92 | title: 'Payment Status', 93 | dataIndex: 'Payment Status', 94 | key: 'isPaymentSuccess', 95 | render: (text, record) => ( 96 |{record?.isRedeemCodeShared ? 'Shared' : '-'}
112 | ), 113 | }, 114 | { 115 | title: 'Action', 116 | key: 'action', 117 | render: (_, record) => ( 118 |handleDeleteLogo(image?._id)} 134 | > 135 | 147 |
148 |handleDeleteLogo(image?._id)} 140 | > 141 | 153 |
154 |
63 |
64 | 83 | {OrderData?.userId?.fullName || OrderData?.userId?.firstName} 84 |
85 |{OrderData?.userId?.email}
86 |87 | {OrderData?.userId?.phoneNumber} 88 |
89 |90 | {new Date(OrderData?.createdAt).toLocaleDateString()} 91 |
92 |Grand Total
95 |{OrderData?.grandTotal} SAR
96 |103 | {`Purchased Products (Order Id: ${OrderData.orderId})`} 104 |
105 | {/* {OrderData?.isPaymentSuccess && !OrderData?.isRedeemCodeShared ? ( 106 | 109 | ) : !OrderData?.isPaymentSuccess ? ( 110 | 113 | ) : OrderData?.isPaymentSuccess ? ( 114 |115 | {'Redeem code/s already shared.'} 116 |
117 | ) : null} */} 118 | 119 |146 | {product?.productId?.productDetails?.nameEn || 147 | product?.productId?.title} 148 |
149 |SKU: {sku}
150 |151 | Price: {product?.productId?.priceInSAR} SAR 152 |
153 |156 | {product?.quantity} Qty 157 |
158 |161 | Total:{' '} 162 | {product?.productId?.priceInSAR * product?.quantity} 163 |
164 |{new Date(dateStr).toUTCString()}
, 219 | }, 220 | { 221 | title: "Order ID", 222 | dataIndex: "orderId", 223 | key: "orderId", 224 | }, 225 | { 226 | title: "Customer Name", 227 | dataIndex: "Customer Name", 228 | key: "userId", 229 | render: (text, record) => ( 230 |{record.userId.fullName || record.userId.firstName}
231 | ), 232 | }, 233 | { 234 | title: "TAG", 235 | dataIndex: "tag", 236 | key: "tag", 237 | render: (text, record) => { 238 | let type = ""; 239 | for (const product of record.products) { 240 | type = product.productType; 241 | break; 242 | } 243 | return{type}
; 244 | }, 245 | }, 246 | { 247 | title: "Payment Status", 248 | dataIndex: "Payment Status", 249 | key: "isPaymentSuccess", 250 | render: (text, record) => ( 251 |{record?.isRedeemCodeShared ? "Shared" : "-"}
270 | ), 271 | }, 272 | { 273 | title: "Action", 274 | key: "action", 275 | render: (_, record) => ( 276 |{productNumbers}
296 |{customerNumbers}
323 |{salesNumbers}
350 |{orderNumbers}
373 |