Skip to content

Commit

Permalink
feat(jobs): Allow job postings to have a start date and end date for …
Browse files Browse the repository at this point in the history
…visibility
  • Loading branch information
relyks committed Nov 19, 2023
1 parent 1b35068 commit 2cc9808
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion static/js/StaticPages.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2636,6 +2636,10 @@ const StaticHR = () =>
const ConditionalLink = ({ link, children }) =>
link ? <a href={link} target="_blank">{children}</a> : children;

/*
* Jobs Page
*/

const JobsPageHeader = ({ jobsAreAvailable }) => {
return (
<>
Expand Down Expand Up @@ -2750,10 +2754,17 @@ const JobsPage = memo(() => {
const [error, setError] = useState(null);

useEffect(() => {
const currentDateTime = new Date().toISOString();
const fetchJobsJSON = async () => {
const query = `
query {
jobPostings(pagination: { limit: -1 }) {
jobPostings(
pagination: { limit: -1 }
filters: {
jobPostingStartDate: { lte: \"${currentDateTime}\" }
jobPostingEndDate: { gte: \"${currentDateTime}\" }
}
) {
data {
id
attributes {
Expand Down

0 comments on commit 2cc9808

Please sign in to comment.