diff --git a/api/src/main/kotlin/com/andr3h3nriqu3s/applications/ApplicationsController.kt b/api/src/main/kotlin/com/andr3h3nriqu3s/applications/ApplicationsController.kt index eec119f..cd77ee9 100644 --- a/api/src/main/kotlin/com/andr3h3nriqu3s/applications/ApplicationsController.kt +++ b/api/src/main/kotlin/com/andr3h3nriqu3s/applications/ApplicationsController.kt @@ -2,6 +2,8 @@ package com.andr3h3nriqu3s.applications import java.sql.ResultSet import java.util.UUID +import java.util.Date +import java.text.SimpleDateFormat import kotlin.collections.emptyList import kotlin.collections.setOf import org.springframework.http.MediaType @@ -34,6 +36,7 @@ data class Application( var message: String, var linked_application: String, var status_history: String, + var application_time: String, var flairs: List, var views: List, ) { @@ -54,6 +57,7 @@ data class Application( rs.getString("message"), rs.getString("linked_application"), rs.getString("status_history"), + rs.getString("application_time"), emptyList(), emptyList(), ) @@ -185,6 +189,7 @@ class ApplicationsController( "", "", "", + "", emptyList(), emptyList(), ) @@ -270,6 +275,11 @@ class ApplicationsController( application.status_history = status_history.joinToString(",") { it } + if (info.status == 4) { + val sdf = SimpleDateFormat("dd/MM/yyyy hh:mm:ss") + application.application_time = sdf.format(Date()) + } + applicationService.update(application) return application @@ -476,7 +486,7 @@ class ApplicationService( } db.update( - "insert into applications (id, url, original_url, unique_url, title, user_id, extra_data, payrange, status, company, recruiter, message, linked_application, status_history) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", + "insert into applications (id, url, original_url, unique_url, title, user_id, extra_data, payrange, status, company, recruiter, message, linked_application, status_history, application_time) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", application.id, application.url, application.original_url, @@ -491,6 +501,7 @@ class ApplicationService( application.message, application.linked_application, application.status_history, + application.application_time, ) return true @@ -527,7 +538,7 @@ class ApplicationService( public fun update(application: Application): Application { db.update( - "update applications set url=?, original_url=?, unique_url=?, title=?, user_id=?, extra_data=?, payrange=?, status=?, company=?, recruiter=?, message=?, linked_application=?, status_history=? where id=?", + "update applications set url=?, original_url=?, unique_url=?, title=?, user_id=?, extra_data=?, payrange=?, status=?, company=?, recruiter=?, message=?, linked_application=?, status_history=?, application_time=? where id=?", application.url, application.original_url, application.unique_url, @@ -541,6 +552,7 @@ class ApplicationService( application.message, application.linked_application, application.status_history, + application.application_time, application.id, ) return application diff --git a/site/README.md b/site/README.md index 5ce6766..66158d8 100644 --- a/site/README.md +++ b/site/README.md @@ -36,3 +36,7 @@ ## Building You can preview the production build with `npm run preview`. > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. + +## TODO + +https://www.glassdoor.co.uk/job-listing/junior-software-developer-full-stack-onnec-group-JV_IC2671300_KO0,36_KE37,48.htm?jl=1009478590946&utm_source=jobsForYou&utm_medium=email&utm_content=jobs-for-you-jobsForYou-jobpos5-1009478590946&utm_campaign=jobsForYou&src=GD_JOB_AD&uido=5EF1E454F911F36A51BB1DD9CB97C8DB&ao=1136043&jrtk=6-y100011i9mkhgisgqqb801ab7157ddf833b2e1c&cs=1_57b69a24&s=362&t=REC_JOBS&pos=105&guid=00000192656d7c18b164f224f0a88e83&jobListingId=1009478590946&ea=1&vt=e&cb=1728410338190&ctt=1728466768707 diff --git a/site/src/lib/ApplicationsStore.svelte.ts b/site/src/lib/ApplicationsStore.svelte.ts index 916e34a..bcf71bd 100644 --- a/site/src/lib/ApplicationsStore.svelte.ts +++ b/site/src/lib/ApplicationsStore.svelte.ts @@ -48,6 +48,7 @@ export type Application = { company: string; message: string; linked_application: string; + application_time: string; flairs: Flair[]; views: View[]; }; diff --git a/site/src/routes/work-area/WorkArea.svelte b/site/src/routes/work-area/WorkArea.svelte index e8cd514..b939bb0 100644 --- a/site/src/routes/work-area/WorkArea.svelte +++ b/site/src/routes/work-area/WorkArea.svelte @@ -14,8 +14,6 @@ import DropZone from './DropZone.svelte'; import { userStore } from '$lib/UserStore.svelte'; import LinkApplication from './LinkApplication.svelte'; - import ApplicationsList from '../ApplicationsList.svelte'; - import TasksToDoList from '../TasksToDoList.svelte'; let activeItem: Application | undefined = $state(); @@ -302,6 +300,14 @@ {/if} + {#if activeItem.application_time} +
+
Application Time
+
+ {activeItem.application_time} +
+
+ {/if}
Tags