From f8ea4f4e8d077c6f28a16b3bf48ef145940ac122 Mon Sep 17 00:00:00 2001
From: "Daniel J. Summers"
Date: Mon, 9 Aug 2021 22:22:58 -0400
Subject: [PATCH] Migration now at feature parity (plus)
---
src/JobsJobsJobs/App/src/App.vue | 2 +-
src/JobsJobsJobs/App/src/api/index.ts | 14 +++
src/JobsJobsJobs/App/src/api/types.ts | 28 ++++++
.../App/src/components/MaybeSave.vue | 92 +++++++++++++++++++
src/JobsJobsJobs/App/src/router/index.ts | 17 +++-
.../App/src/views/citizen/Dashboard.vue | 16 ++--
.../App/src/views/citizen/EditProfile.vue | 38 +++++---
.../App/src/views/listing/ListingEdit.vue | 3 +
.../App/src/views/listing/MyListings.vue | 70 ++++++++++++++
.../App/src/views/profile/ProfileSearch.vue | 2 +-
.../App/src/views/profile/ProfileView.vue | 10 +-
.../App/src/views/success-story/StoryEdit.vue | 36 +++++---
.../App/src/views/success-story/StoryList.vue | 4 +-
13 files changed, 286 insertions(+), 46 deletions(-)
create mode 100644 src/JobsJobsJobs/App/src/components/MaybeSave.vue
create mode 100644 src/JobsJobsJobs/App/src/views/listing/ListingEdit.vue
create mode 100644 src/JobsJobsJobs/App/src/views/listing/MyListings.vue
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 @@
+
+
+
+
+
+
Unsaved Changes
+
+
+ You have modified the data on this page since it was last saved. What would you like to do?
+