Skip to content

Commit a520533

Browse files
committed
pipeline fix
1 parent 4f2bb77 commit a520533

3 files changed

Lines changed: 55 additions & 49 deletions

File tree

.github/workflows/main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ jobs:
9595

9696
- name: Check for merge conflicts
9797
run: |
98-
if grep -r "<<<<<<< HEAD" .; then
98+
if grep -r "<<<<<<< HEAD" . \
99+
--exclude-dir=.git \
100+
--exclude-dir=node_modules \
101+
--exclude-dir=.github; then
99102
echo "Merge conflict markers found!"
100103
exit 1
101104
fi

Client/src/page/apply.jsx

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ function CompanyApplication() {
7272
await applicationAPI.updateApplicationStatus(applicationId, newStatus);
7373
setApplications(
7474
applications.map((app) =>
75-
app.id === applicationId ? { ...app, status: newStatus } : app
76-
)
75+
app.id === applicationId ? { ...app, status: newStatus } : app,
76+
),
7777
);
7878
alert(`Application ${newStatus.toLowerCase()} successfully!`);
7979
} catch (err) {
8080
console.error("Failed to update status:", err);
8181
alert(
82-
err.response?.data?.message || "Failed to update application status"
82+
err.response?.data?.message || "Failed to update application status",
8383
);
8484
}
8585
};
@@ -152,7 +152,7 @@ function CompanyApplication() {
152152
<div className="flex items-center gap-3 mb-2">
153153
<span
154154
className={`px-3 py-1 text-xs font-semibold rounded-full border ${getStatusColor(
155-
application.status
155+
application.status,
156156
)}`}
157157
>
158158
{application.status || "Pending"}
@@ -161,7 +161,7 @@ function CompanyApplication() {
161161
<Clock className="w-4 h-4" />
162162
Applied{" "}
163163
{formatDate(
164-
application.appliedAt || application.createdAt
164+
application.appliedAt || application.createdAt,
165165
)}
166166
</span>
167167
</div>
@@ -206,7 +206,7 @@ function CompanyApplication() {
206206
setExpandedId(
207207
expandedId === application.id
208208
? null
209-
: application.id
209+
: application.id,
210210
)
211211
}
212212
className="text-blue-600 text-sm font-medium hover:text-blue-700 flex items-center gap-1"
@@ -228,32 +228,37 @@ function CompanyApplication() {
228228
)}
229229

230230
{/* Resume Section */}
231-
{application.user?.document && application.user.document.length > 0 && (
232-
<div className="mt-3 p-3 bg-blue-50 rounded-lg border border-blue-200">
233-
<div className="flex items-center justify-between">
234-
<div className="flex items-center gap-2">
235-
<FileText className="w-5 h-5 text-blue-600" />
236-
<div>
237-
<p className="text-sm font-semibold text-gray-900">
238-
{application.user.document[0].fileName || 'Resume'}
239-
</p>
240-
<p className="text-xs text-gray-500">
241-
Uploaded {new Date(application.user.document[0].uploadedAt).toLocaleDateString()}
242-
</p>
231+
{application.user?.document &&
232+
application.user.document.length > 0 && (
233+
<div className="mt-3 p-3 bg-blue-50 rounded-lg border border-blue-200">
234+
<div className="flex items-center justify-between">
235+
<div className="flex items-center gap-2">
236+
<FileText className="w-5 h-5 text-blue-600" />
237+
<div>
238+
<p className="text-sm font-semibold text-gray-900">
239+
{application.user.document[0].fileName ||
240+
"Resume"}
241+
</p>
242+
<p className="text-xs text-gray-500">
243+
Uploaded{" "}
244+
{new Date(
245+
application.user.document[0].uploadedAt,
246+
).toLocaleDateString()}
247+
</p>
248+
</div>
243249
</div>
250+
<a
251+
href={application.user.document[0].fileUrl}
252+
target="_blank"
253+
rel="noopener noreferrer"
254+
className="px-3 py-1.5 bg-blue-600 text-white rounded-md text-xs font-semibold hover:bg-blue-700 transition-colors flex items-center gap-1"
255+
>
256+
View Resume
257+
<ExternalLink className="w-3 h-3" />
258+
</a>
244259
</div>
245-
<a
246-
href={application.user.document[0].fileUrl}
247-
target="_blank"
248-
rel="noopener noreferrer"
249-
className="px-3 py-1.5 bg-blue-600 text-white rounded-md text-xs font-semibold hover:bg-blue-700 transition-colors flex items-center gap-1"
250-
>
251-
View Resume
252-
<ExternalLink className="w-3 h-3" />
253-
</a>
254260
</div>
255-
</div>
256-
)}
261+
)}
257262
</div>
258263

259264
<div className="flex flex-col gap-2 ml-4">

Server/controllers/Company_Dashboard/application.controllers.js

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,28 @@ const Application = async (req, res) => {
2525
},
2626
take: 1,
2727
},
28-
}
28+
},
2929
},
3030
job: {
3131
select: {
3232
id: true,
33-
jobTitle: true
34-
}
35-
}
33+
jobTitle: true,
34+
},
35+
},
3636
},
3737
orderBy: {
38-
appliedAt: "desc"
39-
}
38+
appliedAt: "desc",
39+
},
4040
});
4141

4242
return res.status(200).json({
4343
total: applications.length,
44-
applications
44+
applications,
4545
});
46-
}
47-
catch (err) {
48-
46+
} catch (err) {
4947
return res.status(500).json({
5048
message: "Internal server error",
51-
error: err.message
49+
error: err.message,
5250
});
5351
}
5452
};
@@ -110,7 +108,6 @@ const ViewResume = async (req, res) => {
110108
}
111109
};
112110

113-
114111
const updateApplicationStatus = async (req, res) => {
115112
try {
116113
const { id } = req.params;
@@ -120,28 +117,29 @@ const updateApplicationStatus = async (req, res) => {
120117
const application = await prisma.applications.findFirst({
121118
where: {
122119
id: parseInt(id),
123-
companyId: parseInt(companyId)
124-
}
120+
companyId: parseInt(companyId),
121+
},
125122
});
126123

127124
if (!application) {
128-
return res.status(404).json({ message: "Application not found or unauthorized" });
125+
return res
126+
.status(404)
127+
.json({ message: "Application not found or unauthorized" });
129128
}
130129

131130
const updatedApplication = await prisma.applications.update({
132131
where: { id: parseInt(id) },
133-
data: { status }
132+
data: { status },
134133
});
135134

136135
return res.status(200).json({
137136
message: "Status updated successfully",
138-
application: updatedApplication
137+
application: updatedApplication,
139138
});
140-
141139
} catch (err) {
142140
return res.status(500).json({
143141
message: "Internal server error",
144-
error: err.message
142+
error: err.message,
145143
});
146144
}
147145
};

0 commit comments

Comments
 (0)