-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to create, update, and delete job posts
This PR implements the ability for members to create, update and delete job posts. It introduces the following important changes: * Creates a `job_posts` database table. * Creates a `job_posts_hisory` database table for tracking updates on the `job_posts` table. * Creates a `Jobs` context to house the functionality related to job posts. * Creates a `Jobs.Post` Ecto schema. * Creates a `Jobs.PostHistoryEntry` Ecto schema. * Creates a `JobController` which allows a user to create, update and delete their own job posts. * Adds a basic authorization logic in the context and controller. * Adds a section in the basic member profile for managing job posts. * Adds notification logic after a post is created. This PR also introduces some minor changes which can be viewed as placeholders for later iterations: * Adds a top navigation entry for "Jobs". * Adds a job posts index page where approved job posts are listed. * Adds a mechanism for approving job posts by administrators. * Adds notification logic after a post is approved. * Associates members with sponsors.
- Loading branch information
Showing
46 changed files
with
1,889 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ defmodule Erlef.Admins.Notifications do | |
|
||
import Swoosh.Email | ||
|
||
@type notification_type() :: :new_email_request | :new_event_submitted | :new_slack_invite | ||
@type notification_type() :: | ||
:new_email_request | :new_event_submitted | :new_slack_invite | :new_job_post_submitted | ||
|
||
@type params() :: map() | ||
|
||
|
@@ -31,4 +32,16 @@ defmodule Erlef.Admins.Notifications do | |
|> subject("A new event was submitted") | ||
|> text_body(msg) | ||
end | ||
|
||
def new_job_post_submission() do | ||
msg = """ | ||
A new job post was submitted. Visit https://erlef.org/admin/ to view unapproved events. | ||
""" | ||
|
||
new() | ||
|> to({"Website Admins", "[email protected]"}) | ||
|> from({"Erlef Notifications", "[email protected]"}) | ||
|> subject("A new job poar was submitted") | ||
|> text_body(msg) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.