Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/info-dsm/INFO_v1_FrontEnd i…
Browse files Browse the repository at this point in the history
…nto #29-CreateNotice
  • Loading branch information
drainxc committed Nov 14, 2022
2 parents b265860 + a543415 commit 72276aa
Show file tree
Hide file tree
Showing 17 changed files with 423 additions and 299 deletions.
1 change: 0 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
href="https://fonts.googleapis.com/css2?family=Nanum+Gothic:wght@400;700;800&family=Roboto:wght@400;700;900&display=swap"
rel="stylesheet"
/>

<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
3 changes: 2 additions & 1 deletion src/components/api/company/requesrResistration/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useQuery } from "@tanstack/react-query";
import axios from "axios";
import { BaseUrl } from "../../../../export/base";
const token =
"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxNiIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE2NjgyMTYzODMsImV4cCI6MTY2ODMwMjc4M30.VaaCr7wVhxcbG0Mkq9m671P2JuCqpR1GcrFYT9kXrek";
"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxNiIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE2NjgzMTI4MTksImV4cCI6MTY2ODM5OTIxOX0.Xa8JlV2OyvwTvjV35kKCZrmfWI7mxN89UifM4UX_GYM";
export const getListProps = () => {
// eslint-disable-next-line react-hooks/rules-of-hooks
return useQuery(["datas"], async () => {
Expand Down Expand Up @@ -126,6 +126,7 @@ export const getMyList = () => {
day: data[i].data.notice.company.lastNoticeDate,
id: data[i].data.notice.recruitmentBusinessResponse[0]
.recruitmentBusinessId,
noticeId: data[i].data.notice.noticeId,
});
}
const ad = arr.map((item) =>
Expand Down
90 changes: 88 additions & 2 deletions src/components/api/teacher/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { useQuery } from "@tanstack/react-query";
import axios from "axios";
import { BaseUrl } from "../../../export/base";
const token =
"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIyNSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE2NjgyMTc4OTAsImV4cCI6MTY2ODMwNDI5MH0.MKJc3OQID5--XKcbxn045jrArILC5Sop_e5UQXV7Fcc";
"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIyNSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE2NjgzODEzNzUsImV4cCI6MTY2ODQ2Nzc3NX0.5BpCYYQQ_slpXRWtm3wdSjW-_VrKOnKK1KJ4R-MdY58";
export const getBoardList = () => {
// eslint-disable-next-line react-hooks/rules-of-hooks
return useQuery(["getBoardList"], async () => {
const { data } = await axios({
method: "get",
url: BaseUrl + "/notice",
params: { id: 656574354 },
params: { id: 134953727 },
headers: {
Authorization: `Bearer ${token}`,
},
Expand All @@ -29,3 +29,89 @@ export const noticeRequest = async (method, path, query) => {
});
console.log(data);
};
export const postNoticeRequest = async (idx, path) => {
let res;
await axios({
method: "get",
url: BaseUrl + path,
params: {
idx: idx,
size: 7,
},
headers: {
Authorization: `Bearer ${token}`,
},
}).then((response) => {
const data = response.data;
console.log(data);
let arr = new Array(data.content.length)
.fill(0)
.map((e, i) =>
new Array(data.content[i].recruitmentBusinessResponse.length).fill("")
);
let arr2 = new Array(data.content.length)
.fill(0)
.map((e, i) =>
new Array(data.content[i].recruitmentBusinessResponse.length).fill("")
);
let count = [];
for (let i = 0; i < data.content.length; i++) {
let temp = 0;
for (
let j = 0;
j < data.content[i].recruitmentBusinessResponse.length;
j++
) {
arr[i][j] =
data.content[i].recruitmentBusinessResponse[
j
].classificationResponse.bigClassification.bigClassificationName;
arr2[i][j] =
data.content[i].recruitmentBusinessResponse[
j
].classificationResponse.name;
temp =
temp +
data.content[i].recruitmentBusinessResponse[j].numberOfEmployee;
}
count.push({
total: temp,
name: data.content[i].company.companyName,
id: data.content[i].noticeId,
});
}
const ad = arr.map((item) =>
item.filter((e, i, ar) => {
return ar.findIndex((el) => e === el) === i;
})
);
const as = arr2.map((item) =>
item.filter((e, i, ar) => {
return ar.findIndex((el) => e === el) === i;
})
);
for (let i = 0; i < data.content.length; i++) {
as[i] = as[i].join();
ad[i] = ad[i].join();
}
res = {
count,
as,
ad,
last: data.last,
first: data.first,
totalPage: data.totalPages,
};
});
return res;
};
export const postNotice = (idx, path) => {
// eslint-disable-next-line react-hooks/rules-of-hooks
return useQuery(
["pagin", idx, path],
async () => postNoticeRequest(idx, path),
{
keepPreviousData: true,
}
);
};
94 changes: 0 additions & 94 deletions src/components/common/Address/daumpost/index.js

This file was deleted.

55 changes: 0 additions & 55 deletions src/components/common/Address/index.jsx

This file was deleted.

64 changes: 0 additions & 64 deletions src/components/common/Address/load/index.js

This file was deleted.

27 changes: 0 additions & 27 deletions src/components/common/Addresshook/index.jsx

This file was deleted.

Loading

0 comments on commit 72276aa

Please sign in to comment.