forked from Arnab-Afk/nextplacement
Fix deadline handling and prevent invalid job application modal access
This commit is contained in:
@@ -21,6 +21,7 @@ import { applyForJob } from "../app/(main)/actions"
|
|||||||
import { type InferSelectModel } from '@workspace/db/drizzle';
|
import { type InferSelectModel } from '@workspace/db/drizzle';
|
||||||
import { jobs, companies, resumes } from '@workspace/db/schema';
|
import { jobs, companies, resumes } from '@workspace/db/schema';
|
||||||
|
|
||||||
|
|
||||||
export type Job = InferSelectModel<typeof jobs> & {
|
export type Job = InferSelectModel<typeof jobs> & {
|
||||||
company: typeof companies.$inferSelect;
|
company: typeof companies.$inferSelect;
|
||||||
};
|
};
|
||||||
@@ -201,8 +202,8 @@ 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' ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user