diff --git a/src/JobsJobsJobs/App/src/App.vue b/src/JobsJobsJobs/App/src/App.vue index 469d82d..e763399 100644 --- a/src/JobsJobsJobs/App/src/App.vue +++ b/src/JobsJobsJobs/App/src/App.vue @@ -54,7 +54,7 @@ html a:link, a:visited text-decoration: none -a:hover +a:not(.btn):hover text-decoration: underline label.jjj-required::after color: red diff --git a/src/JobsJobsJobs/App/src/api/index.ts b/src/JobsJobsJobs/App/src/api/index.ts index fd4b103..3326562 100644 --- a/src/JobsJobsJobs/App/src/api/index.ts +++ b/src/JobsJobsJobs/App/src/api/index.ts @@ -3,6 +3,7 @@ import { Citizen, Continent, Count, + Listing, LogOnSuccess, Profile, ProfileForm, @@ -135,6 +136,19 @@ export default { apiResult(await fetch(apiUrl('continent/all'), { method: 'GET' }), 'retrieving continents') }, + /** API functions for job listings */ + listings: { + + /** + * Retrieve the job listings posted by the current citizen + * + * @param user The currently logged-on user + * @returns The job listings the user has posted, or an error string + */ + mine: async (user : LogOnSuccess) : Promise => + apiResult(await fetch(apiUrl('listings/mine'), reqInit('GET', user)), 'retrieving your job listings') + }, + /** API functions for profiles */ profile: { diff --git a/src/JobsJobsJobs/App/src/api/types.ts b/src/JobsJobsJobs/App/src/api/types.ts index 05e5fb1..5c4b7ef 100644 --- a/src/JobsJobsJobs/App/src/api/types.ts +++ b/src/JobsJobsJobs/App/src/api/types.ts @@ -31,6 +31,34 @@ export interface Count { count : number } +/** A job listing */ +export interface Listing { + /** The ID of the job listing */ + id : string + /** The ID of the citizen who posted the job listing */ + citizenId : string + /** When this job listing was created (date) */ + createdOn : string + /** The short title of the job listing */ + title : string + /** The ID of the continent on which the job is located */ + continentId : string + /** The region in which the job is located */ + region : string + /** Whether this listing is for remote work */ + remoteWork : boolean + /** Whether this listing has expired */ + isExpired : boolean + /** When this listing was last updated (date) */ + updatedOn : string + /** The details of this job */ + text : string + /** When this job needs to be filled (date) */ + neededBy : string | undefined + /** Was this job filled as part of its appearance on Jobs, Jobs, Jobs? */ + wasFilledHere : boolean | undefined +} + /** A successful logon */ export interface LogOnSuccess { /** The JSON Web Token (JWT) to use for API access */ diff --git a/src/JobsJobsJobs/App/src/components/MaybeSave.vue b/src/JobsJobsJobs/App/src/components/MaybeSave.vue new file mode 100644 index 0000000..91991d6 --- /dev/null +++ b/src/JobsJobsJobs/App/src/components/MaybeSave.vue @@ -0,0 +1,92 @@ + + + diff --git a/src/JobsJobsJobs/App/src/router/index.ts b/src/JobsJobsJobs/App/src/router/index.ts index 2f36105..5d8d43a 100644 --- a/src/JobsJobsJobs/App/src/router/index.ts +++ b/src/JobsJobsJobs/App/src/router/index.ts @@ -72,9 +72,20 @@ const routes: Array = [ name: 'LogOff', component: () => import(/* webpackChunkName: "logoff" */ '../views/citizen/LogOff.vue') }, + // Job Listing URLs + { + path: '/listing/:id/edit', + name: 'EditListing', + component: () => import(/* webpackChunkName: "jobedit" */ '../views/listing/ListingEdit.vue') + }, + { + path: '/listings/mine', + name: 'MyListings', + component: () => import(/* webpackChunkName: "joblist" */ '../views/listing/MyListings.vue') + }, // Profile URLs { - path: '/profile/view/:id', + path: '/profile/:id/view', name: 'ViewProfile', component: () => import(/* webpackChunkName: "profview" */ '../views/profile/ProfileView.vue') }, @@ -106,12 +117,12 @@ const routes: Array = [ component: () => import(/* webpackChunkName: "success" */ '../views/success-story/StoryList.vue') }, { - path: '/success-story/edit/:id', + path: '/success-story/:id/edit', name: 'EditStory', component: () => import(/* webpackChunkName: "succedit" */ '../views/success-story/StoryEdit.vue') }, { - path: '/success-story/view/:id', + path: '/success-story/:id/view', name: 'ViewStory', component: () => import(/* webpackChunkName: "success" */ '../views/success-story/StoryView.vue') } diff --git a/src/JobsJobsJobs/App/src/views/citizen/Dashboard.vue b/src/JobsJobsJobs/App/src/views/citizen/Dashboard.vue index d918f43..19086e8 100644 --- a/src/JobsJobsJobs/App/src/views/citizen/Dashboard.vue +++ b/src/JobsJobsJobs/App/src/views/citizen/Dashboard.vue @@ -27,10 +27,11 @@ @@ -53,7 +54,7 @@

@@ -69,7 +70,6 @@ diff --git a/src/JobsJobsJobs/App/src/views/profile/ProfileSearch.vue b/src/JobsJobsJobs/App/src/views/profile/ProfileSearch.vue index d7aa4c6..173a314 100644 --- a/src/JobsJobsJobs/App/src/views/profile/ProfileSearch.vue +++ b/src/JobsJobsJobs/App/src/views/profile/ProfileSearch.vue @@ -25,7 +25,7 @@ - View + View {{profile.displayName}} {{yesOrNo(profile.seekingEmployment)}} {{yesOrNo(profile.remoteWork)}} diff --git a/src/JobsJobsJobs/App/src/views/profile/ProfileView.vue b/src/JobsJobsJobs/App/src/views/profile/ProfileView.vue index dcf736c..df05d63 100644 --- a/src/JobsJobsJobs/App/src/views/profile/ProfileView.vue +++ b/src/JobsJobsJobs/App/src/views/profile/ProfileView.vue @@ -26,7 +26,9 @@ @@ -34,7 +36,7 @@