Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
835d4a9
EMS-163: feat(admin-reports): Add comprehensive reports pages with ch…
ashwin-athappan Nov 18, 2025
59b7fb5
EMS-163: fix(scripts): Update default admin email in seed script
ashwin-athappan Nov 18, 2025
a36598d
EMS-163: fix(client): Resolve build error from incorrect logger.error…
ashwin-athappan Nov 18, 2025
d399923
EMS-163: fix(client): Ensure speakers load correctly for events with …
ashwin-athappan Nov 18, 2025
f8bda99
EMS-163: (fix): auth-service Prisma 7 Upgrade
ashwin-athappan Nov 22, 2025
1882317
EMS-163: (fix): booking-service Prisma 7 Upgrade
ashwin-athappan Nov 22, 2025
3db6b8a
EMS-163: (fix): event-service Prisma 7 Upgrade
ashwin-athappan Nov 22, 2025
7f444c7
EMS-163: (fix): feedback-service Prisma 7 Upgrade
ashwin-athappan Nov 22, 2025
6d20212
EMS-163: (fix): speaker-service Prisma 7 Upgrade
ashwin-athappan Nov 22, 2025
df8090d
EMS-163: (fix): speaker-service Tests
ashwin-athappan Nov 22, 2025
8a2a534
EMS-163: (fix): feedback-service Tests
ashwin-athappan Nov 23, 2025
e91ba03
EMS-163: (fix): event-service Tests
ashwin-athappan Nov 23, 2025
68bcbc7
EMS-163: (fix): booking-service Tests
ashwin-athappan Nov 23, 2025
d2f7a1a
EMS-163: (fix): auth-service Tests
ashwin-athappan Nov 23, 2025
91f3142
EMS-163: (fix) auth-service
ashwin-athappan Nov 23, 2025
fdcd23f
EMS-163: feat(auth): Implement OAuth role selection and unified role-…
ashwin-athappan Nov 23, 2025
2a2568b
EMS-163: fix(auth-service): Create speaker profile for new OAuth signups
ashwin-athappan Nov 23, 2025
193de25
EMS-163: feat(admin): Add unsuspend user functionality
ashwin-athappan Nov 30, 2025
f68cd88
EMS-163: feat(notifications): Add email notifications for account sus…
ashwin-athappan Nov 30, 2025
90b7125
EMS-163: (fix) auth-service build issue type fix
ashwin-athappan Dec 1, 2025
b8659b3
EMS-163: (fix) test suites for backedn and frontend
ashwin-athappan Dec 1, 2025
da5b787
EMS-163: (fix) ems-client tests fix
ashwin-athappan Dec 1, 2025
3807f98
EMS-163: (update) Node version
ashwin-athappan Dec 1, 2025
74d1f98
EMS-163: (update) Add npx prisma generate step to git test suite
ashwin-athappan Dec 1, 2025
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
20 changes: 12 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
pull-requests: write

env:
NODE_VERSION: '18'
NODE_VERSION: '20'

jobs:
# Test all microservices and frontend
Expand All @@ -35,6 +35,10 @@ jobs:
working-directory: ${{ matrix.service == 'ems-client' && 'ems-client' || format('ems-services/{0}', matrix.service) }}
run: npm ci

- name: Generate Prisma
working-directory: ${{ matrix.service == 'ems-client' && 'ems-client' || format('ems-services/{0}', matrix.service) }}
run: npx prisma generate

- name: Run tests
working-directory: ${{ matrix.service == 'ems-client' && 'ems-client' || format('ems-services/{0}', matrix.service) }}
run: npm test -- --coverageThreshold='{}'
Expand Down Expand Up @@ -89,7 +93,7 @@ jobs:
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Service | Status | Coverage |" >> $GITHUB_STEP_SUMMARY
echo "|---------|--------|----------|" >> $GITHUB_STEP_SUMMARY

# Check if coverage files exist and display summary
for service in auth-service event-service booking-service notification-service ems-client; do
if [ -d "coverage-reports/coverage-$service" ]; then
Expand All @@ -98,7 +102,7 @@ jobs:
echo "| $service | ❌ Failed | N/A |" >> $GITHUB_STEP_SUMMARY
fi
done

echo "" >> $GITHUB_STEP_SUMMARY
echo "📁 Coverage reports are available as artifacts for download." >> $GITHUB_STEP_SUMMARY

Expand All @@ -116,24 +120,24 @@ jobs:
script: |
const testStatus = '${{ needs.test-all.result }}';
const coverageStatus = '${{ needs.coverage-summary.result }}';

let statusEmoji = '✅';
if (testStatus === 'failure' || coverageStatus === 'failure') {
statusEmoji = '❌';
} else if (testStatus === 'cancelled' || coverageStatus === 'cancelled') {
statusEmoji = '⏸️';
}

const commentBody = `## 🧪 Test Results ${statusEmoji}

| Check | Status |
|-------|--------|
| Tests | ${testStatus === 'success' ? '✅ Passed' : testStatus === 'failure' ? '❌ Failed' : '⏸️ Skipped'} |
| Coverage | ${coverageStatus === 'success' ? '✅ Passed' : coverageStatus === 'failure' ? '❌ Failed' : '⏸️ Skipped'} |

**Summary:** All automated checks have been completed for this PR.
`;

await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down
55 changes: 46 additions & 9 deletions ems-client/app/auth/callback/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,49 @@ function VerifyEmailContent() {
const searchParams = useSearchParams();
const router = useRouter();
const accessToken = searchParams.get('accessToken');
const { verifyEmail } = useAuth();
const token = searchParams.get('token'); // OAuth token
const isOAuth = searchParams.get('oauth') === 'true';
const { verifyEmail, checkAuth } = useAuth();

useEffect(() => {
const verifyEmailHelper = async () => {
logger.info(LOGGER_COMPONENT_NAME, 'Email verification callback - accessToken:', accessToken);
if (!accessToken) {
setStatus('invalid');
setError('Invalid verification link');
return;
const handleCallback = async () => {
// Handle OAuth callback
if (isOAuth && token) {
logger.info(LOGGER_COMPONENT_NAME, 'OAuth callback - token received');
try {
setStatus('verifying');

// Store token and verify authentication
authApiClient.setToken(token);

// Check auth to get user profile
await checkAuth();

setStatus('success');
setUserEmail('OAuth authentication successful');

// Redirect to dashboard
setTimeout(() => {
router.push('/dashboard');
}, 2000);
return;
} catch (error) {
logger.error(LOGGER_COMPONENT_NAME, 'OAuth callback failed', error as Error);
setStatus('error');
setError(error instanceof Error ? error.message : 'OAuth authentication failed');
return;
}
}

// Handle email verification callback
const verifyEmailHelper = async () => {
logger.info(LOGGER_COMPONENT_NAME, 'Email verification callback - accessToken:', accessToken);
if (!accessToken) {
setStatus('invalid');
setError('Invalid verification link');
return;
}

// Check if already verified by checking localStorage
const existingToken = authApiClient.getToken();
if (existingToken) {
Expand Down Expand Up @@ -85,10 +117,15 @@ function VerifyEmailContent() {
setStatus('error');
setError(error instanceof Error ? error.message : 'Verification failed');
}
};

if (!isOAuth) {
verifyEmailHelper();
}
};

verifyEmailHelper();
}, [accessToken, router]);
handleCallback();
}, [accessToken, token, isOAuth, router, checkAuth, verifyEmail]);

const getStatusIcon = () => {
switch (status) {
Expand Down
Loading
Loading