Added my shop page and ability to add, edit and delete employees.

This commit is contained in:
Patrick Fic
2020-02-10 12:45:20 -08:00
parent 9d9de14cf0
commit cac3716e03
42 changed files with 1444 additions and 52 deletions

View File

@@ -1,11 +1,10 @@
import React, { useEffect, useState } from "react";
import { useQuery } from "@apollo/react-hooks";
import AlertComponent from "../../components/alert/alert.component";
import { Col } from "antd";
import { QUERY_ALL_OPEN_JOBS } from "../../graphql/jobs.queries";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import JobsList from "../../components/jobs-list/jobs-list.component";
import AlertComponent from "../../components/alert/alert.component";
import JobDetailCards from "../../components/job-detail-cards/job-detail-cards.component";
import JobsList from "../../components/jobs-list/jobs-list.component";
import { QUERY_ALL_OPEN_JOBS } from "../../graphql/jobs.queries";
//TODO: Implement pagination for this.
export default function JobsPage({ match, location }) {
@@ -21,9 +20,9 @@ export default function JobsPage({ match, location }) {
const { hash } = location;
const [selectedJob, setSelectedJob] = useState(hash ? hash.substr(1) : null);
if (error) return <AlertComponent message={error.message} type='error' />;
if (error) return <AlertComponent message={error.message} type="error" />;
return (
<Col span={22} offset={1}>
<div>
<JobsList
loading={loading}
selectedJob={selectedJob}
@@ -31,6 +30,6 @@ export default function JobsPage({ match, location }) {
jobs={data ? data.jobs : null}
/>
<JobDetailCards selectedJob={selectedJob} />
</Col>
</div>
);
}