AshameTheDestroyer commited on
Commit
2b594ee
·
2 Parent(s): f711fb5 aadba07

Merge remote-tracking branch 'refs/remotes/origin/frontend-branch' into frontend-branch

Browse files
backend/api/application_routes.py CHANGED
@@ -89,7 +89,7 @@ def get_applications_list(jid: str, aid: str, page: int = 1, limit: int = 10, db
89
  def get_application_detail(jid: str, aid: str, id: str, db: Session = Depends(get_db), current_user: User = Depends(get_current_user)):
90
  """Get detailed application information including answers"""
91
  logger.info(f"Retrieving application detail for job ID: {jid}, assessment ID: {aid}, application ID: {id} by user: {current_user.id}")
92
-
93
  # Get the application
94
  application = get_application(db, id)
95
  if not application or application.job_id != jid or application.assessment_id != aid:
@@ -201,7 +201,7 @@ def get_application_detail(jid: str, aid: str, id: str, db: Session = Depends(ge
201
  except Exception as e:
202
  logger.error(f"Error creating assessment details: {str(e)}")
203
  assessment_details_obj = None
204
-
205
  application_detail = ApplicationDetailedResponse(
206
  id=application.id,
207
  job_id=application.job_id,
@@ -434,4 +434,4 @@ def get_my_application(id: str, db: Session = Depends(get_db), current_user: Use
434
  )
435
 
436
  logger.info(f"Successfully retrieved application with ID: {id} for user ID: {current_user.id}")
437
- return application_detail
 
89
  def get_application_detail(jid: str, aid: str, id: str, db: Session = Depends(get_db), current_user: User = Depends(get_current_user)):
90
  """Get detailed application information including answers"""
91
  logger.info(f"Retrieving application detail for job ID: {jid}, assessment ID: {aid}, application ID: {id} by user: {current_user.id}")
92
+
93
  # Get the application
94
  application = get_application(db, id)
95
  if not application or application.job_id != jid or application.assessment_id != aid:
 
201
  except Exception as e:
202
  logger.error(f"Error creating assessment details: {str(e)}")
203
  assessment_details_obj = None
204
+
205
  application_detail = ApplicationDetailedResponse(
206
  id=application.id,
207
  job_id=application.job_id,
 
434
  )
435
 
436
  logger.info(f"Successfully retrieved application with ID: {id} for user ID: {current_user.id}")
437
+ return application_detail
backend/models/application.py CHANGED
@@ -12,4 +12,4 @@ class Application(Base):
12
  user_id = Column(String, ForeignKey("users.id"), nullable=False)
13
  answers = Column(Text) # Stored as JSON string
14
  created_at = Column(DateTime(timezone=True), server_default=func.now())
15
- updated_at = Column(DateTime(timezone=True), onupdate=func.now())
 
12
  user_id = Column(String, ForeignKey("users.id"), nullable=False)
13
  answers = Column(Text) # Stored as JSON string
14
  created_at = Column(DateTime(timezone=True), server_default=func.now())
15
+ updated_at = Column(DateTime(timezone=True), onupdate=func.now())
backend/schemas/application.py CHANGED
@@ -94,4 +94,4 @@ class MyApplicationResponse(BaseModel):
94
  class MyApplicationsListResponse(BaseModel):
95
  count: int
96
  total: int
97
- data: List[MyApplicationResponse]
 
94
  class MyApplicationsListResponse(BaseModel):
95
  count: int
96
  total: int
97
+ data: List[MyApplicationResponse]
frontend/app/routes/jobs.$id.tsx CHANGED
@@ -19,16 +19,6 @@ export function meta({}: Route.MetaArgs) {
19
  ];
20
  }
21
 
22
- export function meta({}: Route.MetaArgs) {
23
- return [
24
- { title: "Job Details" },
25
- {
26
- name: "description",
27
- content: "Detailed view of the selected job and its assessments.",
28
- },
29
- ];
30
- }
31
-
32
  export default function JobDetailRoute() {
33
  const { id } = useParams();
34
  const { data: job, isLoading: isJobLoading, isError: isJobError, refetch: refetchJob } = useGetJobByID({ id: id || "" });
 
19
  ];
20
  }
21
 
 
 
 
 
 
 
 
 
 
 
22
  export default function JobDetailRoute() {
23
  const { id } = useParams();
24
  const { data: job, isLoading: isJobLoading, isError: isJobError, refetch: refetchJob } = useGetJobByID({ id: id || "" });