Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 5 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,31 @@
"dependencies": {
"@ant-design/colors": "7.2.0",
"@ant-design/icons": "5.6.0",
"@emotion/cache": "11.14.0",
"@emotion/react": "11.14.0",
"@emotion/styled": "11.14.0",
"@fontsource/inter": "5.1.1",
"@fontsource/poppins": "5.1.1",
"@fontsource/public-sans": "5.1.2",
"@fontsource/roboto": "5.1.1",
"@mui/base": "5.0.0-beta.69",
"@mui/lab": "6.0.0-beta.24",
"@mui/material": "6.4.1",
"@mui/system": "6.4.1",
"@mui/x-charts": "7.24.1",
"@mui/x-date-pickers": "^8.1.0",
"@vitejs/plugin-react": "4.3.4",
"@vitejs/plugin-react": "^5.1.1",
"antd": "^5.27.6",
"axios": "^1.8.4",
"axios": "^1.13.2",
"country-coords": "^1.0.0",
"dayjs": "^1.11.13",
"formik": "2.4.6",
"framer-motion": "^12.9.2",
"i18n-iso-countries": "^7.14.0",
"libphonenumber-js": "^1.12.25",
"lodash-es": "4.17.21",
"motion-dom": "^12.9.1",
"react": "18.3.1",
"react-device-detect": "2.2.3",
"react-dom": "18.3.1",
"react-number-format": "5.4.3",
"react-router": "7.1.3",
"react-router-dom": "7.1.3",
"simplebar-react": "3.3.0",
"swr": "2.3.0",
"vite": "6.0.11",
"vite-jsconfig-paths": "2.0.1",
"web-vitals": "4.2.4",
"yup": "1.6.1"
"vite": "^7.2.4",
"vite-jsconfig-paths": "2.0.1"
},
"eslintConfig": {
"extends": [
Expand Down Expand Up @@ -86,10 +75,8 @@
"eslint-plugin-prettier": "5.2.3",
"eslint-plugin-react": "7.37.4",
"eslint-plugin-react-hooks": "5.1.0",
"immutable": "4.3.7",
"knip": "5.45.0",
"prettier": "3.4.2",
"prettier-eslint-cli": "8.0.1"
"prettier": "3.4.2"
},
"packageManager": "yarn@4.9.4+sha512.7b1cb0b62abba6a537b3a2ce00811a843bea02bcf53138581a6ae5b1bf563f734872bd47de49ce32a9ca9dcaff995aa789577ffb16811da7c603dcf69e73750b"
}
77 changes: 0 additions & 77 deletions src/components/@extended/AnimateButton.jsx

This file was deleted.

6 changes: 0 additions & 6 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,10 @@ import '@fontsource/public-sans/700.css';

// project imports
import App from './App';
import reportWebVitals from './reportWebVitals';

const container = document.getElementById('root');
const root = createRoot(container);

// ==============================|| MAIN - REACT DOM RENDER ||============================== //

root.render(<App />);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
27 changes: 10 additions & 17 deletions src/layout/Dashboard/Drawer/DrawerContent/NavCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import MainCard from 'components/MainCard';

// assets
import avatar from 'assets/images/users/avatar-group.png';
import AnimateButton from 'components/@extended/AnimateButton';
import { dark } from '@mui/material/styles/createPalette';

// ==============================|| DRAWER CONTENT - NAVIGATION CARD ||============================== //

Expand All @@ -22,22 +20,17 @@ export default function NavCard() {
<CardMedia component="img" image={avatar} sx={{ width: 112 }} />
<Stack alignItems="center">
<Typography variant="h5">RelaySMS</Typography>
{/* <Typography variant="h6" color="secondary">
Checkout RelaySMS
</Typography> */}
</Stack>
<AnimateButton>
<Button
component={Link}
target="_blank"
href="https://relay.smswithoutborders.com"
variant="contained"
color="success"
size="small"
>
Website
</Button>
</AnimateButton>
<Button
component={Link}
target="_blank"
href="https://relay.smswithoutborders.com"
variant="contained"
color="success"
size="small"
>
Website
</Button>
</Stack>
</MainCard>
);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/dashboard/default.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export default function DashboardDefault() {
if (startDate && endDate) {
return `${startDate.format('YYYY-MM-DD')} - ${endDate.format('YYYY-MM-DD')}`;
}
return 'Custom Range';
return '2021-01-10 - Today';
default:
return 'Date Range Filter';
}
Expand Down Expand Up @@ -525,7 +525,7 @@ export default function DashboardDefault() {
<Grid size={{ xs: 12, sm: 12, md: 4, lg: 4, xl: 4 }}>
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5, mb: 1.5 }}>
<Typography variant="h6" sx={{ fontWeight: 500 }}>
Users
Current Users
</Typography>
<Tooltip title="Users with accounts that have not been deleted" arrow>
<InfoCircleOutlined sx={{ fontSize: 18, color: 'text.secondary', cursor: 'help' }} />
Expand Down
50 changes: 39 additions & 11 deletions src/pages/publication/publications.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ import PropTypes from 'prop-types';
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import timezone from 'dayjs/plugin/timezone';
import weekday from 'dayjs/plugin/weekday';
import localeData from 'dayjs/plugin/localeData';

dayjs.extend(utc);
dayjs.extend(timezone);
dayjs.extend(weekday);
dayjs.extend(localeData);

countries.registerLocale(enLocale);

Expand Down Expand Up @@ -70,11 +74,31 @@ function PublicationTableHead({ order, orderBy, onRequestSort }) {
const createSortHandler = (property) => (event) => {
onRequestSort(event, property);
};

const columnWidths = {
id: '8%',
date: '28%',
country: '20%',
platform: '18%',
source: '13%',
status: '13%'
};

return (
<TableHead sx={{ backgroundColor: 'background.default', position: 'sticky', top: 0, zIndex: 1 }}>
<TableRow>
{headCells.map((headCell) => (
<TableCell key={headCell.id} align={headCell.align} sortDirection={orderBy === headCell.id ? order : false}>
<TableCell
key={headCell.id}
align={headCell.align}
sortDirection={orderBy === headCell.id ? order : false}
sx={{
width: columnWidths[headCell.id],
fontSize: '0.75rem',
padding: '8px',
whiteSpace: headCell.id === 'date' ? 'nowrap' : 'normal'
}}
>
{headCell.orderBy ? (
<TableSortLabel
active={orderBy === headCell.id}
Expand Down Expand Up @@ -293,7 +317,7 @@ export default function Publications() {
if (startDate && endDate) {
return `${startDate.format('YYYY-MM-DD')} - ${endDate.format('YYYY-MM-DD')}`;
}
return 'Custom Range';
return '2021-01-10 - Today';
default:
return 'Date Range Filter';
}
Expand Down Expand Up @@ -395,7 +419,7 @@ export default function Publications() {
};

const formatDateToGMTPlus1 = (dateString) => {
return dayjs(dateString).local().format('MMM DD, YYYY hh:mm:ss A');
return dayjs.utc(dateString).local().format('MMM DD, YYYY hh:mm:ss A');
};

const getPlatformLogo = (platformName) => {
Expand Down Expand Up @@ -427,7 +451,6 @@ export default function Publications() {
if (platformName.toLowerCase() === 'email_bridge') {
return 'EMAIL BRIDGE';
}
// Capitalize first letter of each word
return platformName
.split('_')
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
Expand Down Expand Up @@ -644,8 +667,8 @@ export default function Publications() {
<AnalyticEcommerce
title="Failed"
count={metrics.totalFailed.toLocaleString()}
percentage={metrics.totalFailed === 0 ? null : metrics.percentages.totalFailed}
isLoss={!metrics.isHigher.totalFailed}
// percentage={metrics.totalFailed === 0 ? null : metrics.percentages.totalFailed}
isLoss={metrics.isHigher.totalFailed}
extra="Failed Publications"
/>
</Grid>
Expand Down Expand Up @@ -828,15 +851,20 @@ export default function Publications() {
<TableBody>
{tableData.map((row) => (
<TableRow key={row.id}>
<TableCell>{row.id}</TableCell>
<TableCell>{formatDateToGMTPlus1(row.date_created)}</TableCell>
<TableCell sx={{ width: '8%', fontSize: '0.80rem', padding: '8px' }}>{row.id}</TableCell>
<TableCell sx={{ width: '28%', fontSize: '0.80rem', padding: '8px', whiteSpace: 'nowrap' }}>
{formatDateToGMTPlus1(row.date_created)}
</TableCell>
<TableCell
onClick={() => {
if (row.country_code && row.country_code !== 'UNKNOWN') {
setSelectedCountry(selectedCountry === row.country_code ? null : row.country_code);
}
}}
sx={{
width: '20%',
fontSize: '0.85rem',
padding: '8px',
cursor: row.country_code && row.country_code !== 'UNKNOWN' ? 'pointer' : 'default',
'&:hover': {
backgroundColor: row.country_code && row.country_code !== 'UNKNOWN' ? 'action.hover' : 'transparent'
Expand All @@ -848,7 +876,7 @@ export default function Publications() {
<span style={{ marginRight: 8 }}>{row.flag}</span>
{row.country ? row.country : 'No Country'}
</TableCell>
<TableCell>
<TableCell sx={{ width: '18%', fontSize: '0.75rem', padding: '8px' }}>
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
<img
src={getPlatformLogo(row.platform_name)}
Expand All @@ -867,8 +895,8 @@ export default function Publications() {
<span>{formatPlatformName(row.platform_name).toUpperCase()}</span>
</Box>
</TableCell>
<TableCell>{row.source.toUpperCase()}</TableCell>
<TableCell>{row.status.toUpperCase()}</TableCell>
<TableCell sx={{ width: '13%', fontSize: '0.75rem', padding: '8px' }}>{row.source.toUpperCase()}</TableCell>
<TableCell sx={{ width: '13%', fontSize: '0.75rem', padding: '8px' }}>{row.status.toUpperCase()}</TableCell>
</TableRow>
))}
</TableBody>
Expand Down
12 changes: 0 additions & 12 deletions src/reportWebVitals.js

This file was deleted.

Loading
Loading