1 Commits

Author SHA1 Message Date
dependabot[bot]
b8c8110f91 Bump nodemailer from 7.0.6 to 7.0.7
Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 7.0.6 to 7.0.7.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/compare/v7.0.6...v7.0.7)

---
updated-dependencies:
- dependency-name: nodemailer
  dependency-version: 7.0.7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-07 19:28:27 +00:00
6 changed files with 23 additions and 52 deletions

View File

@@ -5,8 +5,8 @@
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "dotenv -e ../../.env -- next dev --turbopack -p 9001", "dev": "dotenv -e ../../.env -- next dev --turbopack -p 9001",
"build": "dotenv -e ../../.env -- next build && cp -r .next/static .next/standalone/apps/admin/.next/static && cp -r public .next/standalone/apps/admin/public", "build": "dotenv -e ../../.env -- next build",
"start": "PORT=9001 dotenv -e ../../.env -- node .next/standalone/apps/admin/server.js", "start": "dotenv -e ../../.env -- next start -p 9001",
"lint": "next lint", "lint": "next lint",
"lint:fix": "next lint --fix", "lint:fix": "next lint --fix",
"typecheck": "tsc --noEmit" "typecheck": "tsc --noEmit"

View File

@@ -40,9 +40,6 @@ export default function JobApplicationModal({ job, studentId, resumes, isApplied
const [isPending, startTransition] = useTransition(); const [isPending, startTransition] = useTransition();
const [message, setMessage] = useState<{ type: 'success' | 'error'; text: string } | null>(null); const [message, setMessage] = useState<{ type: 'success' | 'error'; text: string } | null>(null);
const deadline = new Date(job.applicationDeadline);
const isDeadlinePassed = new Date() > deadline;
const handleApply = async () => { const handleApply = async () => {
if (!selectedResume) { if (!selectedResume) {
setMessage({ type: 'error', text: 'Please select a resume' }); setMessage({ type: 'error', text: 'Please select a resume' });
@@ -66,14 +63,12 @@ export default function JobApplicationModal({ job, studentId, resumes, isApplied
setMessage({ type: 'error', text: result.error || 'Failed to submit application' }); setMessage({ type: 'error', text: result.error || 'Failed to submit application' });
} }
} catch (error) { } catch (error) {
setMessage({ setMessage({ type: 'error', text: 'An error occurred while submitting your application' });
type: 'error',
text: error instanceof Error ? error.message : 'An error occurred while submitting your application'
});
} }
}); });
}; };
const isDeadlinePassed = new Date() > new Date(job.applicationDeadline as any);
const cannotApplyReason = isApplied const cannotApplyReason = isApplied
? 'You have already applied to this job' ? 'You have already applied to this job'
: resumes.length === 0 : resumes.length === 0
@@ -83,33 +78,21 @@ export default function JobApplicationModal({ job, studentId, resumes, isApplied
: null; : null;
return ( return (
<Dialog open={isOpen} onOpenChange={(open) => !isPending && setIsOpen(open)}> <Dialog open={isOpen} onOpenChange={setIsOpen}>
{!cannotApplyReason && ( <DialogTrigger asChild>
<DialogTrigger asChild>
<div className="flex flex-col items-start">
<Button
size="sm"
className="bg-blue-600 hover:bg-blue-700"
>
Apply Now
</Button>
</div>
</DialogTrigger>
)}
{cannotApplyReason && (
<div className="flex flex-col items-start"> <div className="flex flex-col items-start">
<Button <Button
size="sm" size="sm"
className="bg-blue-600 hover:bg-blue-700" className="bg-blue-600 hover:bg-blue-700"
disabled disabled={Boolean(cannotApplyReason)}
> >
{isApplied ? 'Applied' : 'Apply Now'} {isApplied ? 'Applied' : 'Apply Now'}
</Button> </Button>
<span className="mt-1 text-xs text-red-600">{cannotApplyReason}</span> {cannotApplyReason && (
<span className="mt-1 text-xs text-red-600">{cannotApplyReason}</span>
)}
</div> </div>
)} </DialogTrigger>
<DialogContent className="max-w-2xl max-h-[90vh] overflow-y-auto"> <DialogContent className="max-w-2xl max-h-[90vh] overflow-y-auto">
<DialogHeader> <DialogHeader>
<DialogTitle className="flex items-center gap-2"> <DialogTitle className="flex items-center gap-2">
@@ -144,7 +127,7 @@ export default function JobApplicationModal({ job, studentId, resumes, isApplied
</div> </div>
<div className="flex items-center gap-1"> <div className="flex items-center gap-1">
<Calendar className="w-4 h-4" /> <Calendar className="w-4 h-4" />
<span>Deadline: {deadline.toLocaleDateString()}</span> <span>Deadline: {job.applicationDeadline.toLocaleDateString()}</span>
</div> </div>
<div className="flex items-center gap-1"> <div className="flex items-center gap-1">
<Star className="w-4 h-4" /> <Star className="w-4 h-4" />
@@ -179,18 +162,6 @@ export default function JobApplicationModal({ job, studentId, resumes, isApplied
))} ))}
</SelectContent> </SelectContent>
</Select> </Select>
{selectedResume && (
<a
href={resumes.find(r => r.id.toString() === selectedResume)?.fileUrl}
target="_blank"
rel="noopener noreferrer"
className="text-sm text-blue-600 underline mt-2 inline-block"
>
Preview selected resume
</a>
)}
{resumes.length === 0 && ( {resumes.length === 0 && (
<p className="text-sm text-red-600 mt-1"> <p className="text-sm text-red-600 mt-1">
No resumes found. Please upload a resume first. No resumes found. Please upload a resume first.
@@ -200,10 +171,11 @@ export default function JobApplicationModal({ job, studentId, resumes, isApplied
{/* Message Display */} {/* Message Display */}
{message && ( {message && (
<div className={`p-3 rounded-lg ${message.type === 'success' <div className={`p-3 rounded-lg ${
message.type === 'success'
? 'bg-green-100 text-green-700 border border-green-200' ? 'bg-green-100 text-green-700 border border-green-200'
: 'bg-red-100 text-red-700 border border-red-200' : 'bg-red-100 text-red-700 border border-red-200'
}`}> }`}>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
{message.type === 'success' ? ( {message.type === 'success' ? (
<CheckCircle className="w-4 h-4" /> <CheckCircle className="w-4 h-4" />

View File

@@ -5,8 +5,8 @@
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "dotenv -e ../../.env -- next dev --turbopack -p 9000", "dev": "dotenv -e ../../.env -- next dev --turbopack -p 9000",
"build": "dotenv -e ../../.env -- next build && cp -r .next/static .next/standalone/apps/student/.next/static && cp -r public .next/standalone/apps/student/public", "build": "dotenv -e ../../.env -- next build",
"start": "PORT=9000 dotenv -e ../../.env -- node .next/standalone/apps/student/server.js", "start": "dotenv -e ../../.env -- next start -p 9000",
"lint": "next lint", "lint": "next lint",
"lint:fix": "next lint --fix", "lint:fix": "next lint --fix",
"typecheck": "tsc --noEmit" "typecheck": "tsc --noEmit"

Submodule nextplacement deleted from 1648a56680

View File

@@ -34,6 +34,6 @@
] ]
}, },
"dependencies": { "dependencies": {
"nodemailer": "^7.0.6" "nodemailer": "^7.0.7"
} }
} }

10
pnpm-lock.yaml generated
View File

@@ -9,8 +9,8 @@ importers:
.: .:
dependencies: dependencies:
nodemailer: nodemailer:
specifier: ^7.0.6 specifier: ^7.0.7
version: 7.0.6 version: 7.0.7
devDependencies: devDependencies:
'@eslint/js': '@eslint/js':
specifier: ^9.32.0 specifier: ^9.32.0
@@ -3269,8 +3269,8 @@ packages:
resolution: {integrity: sha512-Z+iLaBGVaSjbIzQ4pX6XV41HrooLsQ10ZWPUehGmuantvzWoDVBnmsdUcOIDM1t+yPor5pDhVlDESgOMEGxhHA==} resolution: {integrity: sha512-Z+iLaBGVaSjbIzQ4pX6XV41HrooLsQ10ZWPUehGmuantvzWoDVBnmsdUcOIDM1t+yPor5pDhVlDESgOMEGxhHA==}
engines: {node: '>=6.0.0'} engines: {node: '>=6.0.0'}
nodemailer@7.0.6: nodemailer@7.0.7:
resolution: {integrity: sha512-F44uVzgwo49xboqbFgBGkRaiMgtoBrBEWCVincJPK9+S9Adkzt/wXCLKbf7dxucmxfTI5gHGB+bEmdyzN6QKjw==} resolution: {integrity: sha512-jGOaRznodf62TVzdyhKt/f1Q/c3kYynk8629sgJHpRzGZj01ezbgMMWJSAjHADcwTKxco3B68/R+KHJY2T5BaA==}
engines: {node: '>=6.0.0'} engines: {node: '>=6.0.0'}
npm-run-path@4.0.1: npm-run-path@4.0.1:
@@ -7271,7 +7271,7 @@ snapshots:
nodemailer@6.10.1: {} nodemailer@6.10.1: {}
nodemailer@7.0.6: {} nodemailer@7.0.7: {}
npm-run-path@4.0.1: npm-run-path@4.0.1:
dependencies: dependencies: