From 706d08e7bb593a6f775ec32a0b43900e7471fcd9 Mon Sep 17 00:00:00 2001 From: Yen-chi Chen Date: Fri, 28 Jun 2024 13:05:21 +0800 Subject: [PATCH 1/2] chore: remove unused codes (#1371) --- .../TimeAndSalary}/InfoModal.js | 0 .../TimeAndSalary}/InfoModal.module.css | 0 .../TimeAndSalary/WorkingHourTable.js | 7 +- .../WorkingHourTable.module.css | 0 .../TimeAndSalary/CallToShareData.js | 34 ---- .../TimeAndSalary/MobileInfoButtons.js | 23 --- .../MobileInfoButtons.module.css | 40 ----- .../TimeAndSalary/common/AboutThisJobModal.js | 26 ---- .../TimeAndSalary/common/Columns.module.css | 0 .../TimeAndSalary/common/DashBoardTable.js | 107 ------------- .../common/DashBoardTable.module.css | 78 ---------- .../TimeAndSalary/common/formatter.js | 33 ---- .../TimeAndSalary/views/view.module.css | 146 ------------------ 13 files changed, 2 insertions(+), 492 deletions(-) rename src/components/{TimeAndSalary/common => CompanyAndJobTitle/TimeAndSalary}/InfoModal.js (100%) rename src/components/{TimeAndSalary/common => CompanyAndJobTitle/TimeAndSalary}/InfoModal.module.css (100%) rename src/components/{TimeAndSalary/common => CompanyAndJobTitle/TimeAndSalary}/WorkingHourTable.module.css (100%) delete mode 100644 src/components/TimeAndSalary/CallToShareData.js delete mode 100644 src/components/TimeAndSalary/MobileInfoButtons.js delete mode 100644 src/components/TimeAndSalary/MobileInfoButtons.module.css delete mode 100644 src/components/TimeAndSalary/common/AboutThisJobModal.js delete mode 100644 src/components/TimeAndSalary/common/Columns.module.css delete mode 100644 src/components/TimeAndSalary/common/DashBoardTable.js delete mode 100644 src/components/TimeAndSalary/common/DashBoardTable.module.css delete mode 100644 src/components/TimeAndSalary/views/view.module.css diff --git a/src/components/TimeAndSalary/common/InfoModal.js b/src/components/CompanyAndJobTitle/TimeAndSalary/InfoModal.js similarity index 100% rename from src/components/TimeAndSalary/common/InfoModal.js rename to src/components/CompanyAndJobTitle/TimeAndSalary/InfoModal.js diff --git a/src/components/TimeAndSalary/common/InfoModal.module.css b/src/components/CompanyAndJobTitle/TimeAndSalary/InfoModal.module.css similarity index 100% rename from src/components/TimeAndSalary/common/InfoModal.module.css rename to src/components/CompanyAndJobTitle/TimeAndSalary/InfoModal.module.css diff --git a/src/components/CompanyAndJobTitle/TimeAndSalary/WorkingHourTable.js b/src/components/CompanyAndJobTitle/TimeAndSalary/WorkingHourTable.js index 352dc2b25..3e8eb6a4b 100644 --- a/src/components/CompanyAndJobTitle/TimeAndSalary/WorkingHourTable.js +++ b/src/components/CompanyAndJobTitle/TimeAndSalary/WorkingHourTable.js @@ -4,11 +4,8 @@ import R from 'ramda'; import { InfoButton } from 'common/Modal'; import Table from 'common/table/Table'; import { pageType as pageTypeMapping } from 'constants/companyJobTitle'; -import { - InfoSalaryModal, - InfoTimeModal, -} from '../../TimeAndSalary/common/InfoModal'; -import styles from '../../TimeAndSalary/common/WorkingHourTable.module.css'; +import { InfoSalaryModal, InfoTimeModal } from './InfoModal'; +import styles from './WorkingHourTable.module.css'; import { getNameAsJobTitle, getNameAsCompanyName, diff --git a/src/components/TimeAndSalary/common/WorkingHourTable.module.css b/src/components/CompanyAndJobTitle/TimeAndSalary/WorkingHourTable.module.css similarity index 100% rename from src/components/TimeAndSalary/common/WorkingHourTable.module.css rename to src/components/CompanyAndJobTitle/TimeAndSalary/WorkingHourTable.module.css diff --git a/src/components/TimeAndSalary/CallToShareData.js b/src/components/TimeAndSalary/CallToShareData.js deleted file mode 100644 index 164b0ac8e..000000000 --- a/src/components/TimeAndSalary/CallToShareData.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react'; - -export default () => ( -
-
-
- 哈囉!請先 - - 才能查看完整工時、薪資資訊喔 -
-
- 請留下至少一筆資料,才能查看完整工時、薪資資訊。 -
- 沒有工作經驗嗎?沒有關係,分享以下連結給朋友,朋友留了資料,系統將開放您完整權限。 -
-
- -
- -
-
-
- - 馬上留資料 - -
- fb 貼文分享 -
-
-
-
-); diff --git a/src/components/TimeAndSalary/MobileInfoButtons.js b/src/components/TimeAndSalary/MobileInfoButtons.js deleted file mode 100644 index bf2044f0a..000000000 --- a/src/components/TimeAndSalary/MobileInfoButtons.js +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -import { InfoButton } from 'common/Modal'; -import styles from './MobileInfoButtons.module.css'; - -const MobileInfoButtons = ({ toggleInfoSalaryModal, toggleInfoTimeModal }) => ( -
-
- 估計時薪 -
-
- 參考時間 -
-
-); - -MobileInfoButtons.propTypes = { - toggleInfoSalaryModal: PropTypes.func.isRequired, - toggleInfoTimeModal: PropTypes.func.isRequired, -}; - -export default MobileInfoButtons; diff --git a/src/components/TimeAndSalary/MobileInfoButtons.module.css b/src/components/TimeAndSalary/MobileInfoButtons.module.css deleted file mode 100644 index 379c0d1ac..000000000 --- a/src/components/TimeAndSalary/MobileInfoButtons.module.css +++ /dev/null @@ -1,40 +0,0 @@ -$below-small: 850px; -$primary-color: #fcd406; - -.mobileInfoButtons { - display: none; - - @media (max-width: $below-small) { - display: flex; - margin-top: 8px; - margin-bottom: 8px; - justify-content: flex-end; - } - - .infoButton { - display: flex; - align-items: center; - margin-left: 20px; - font-size: 0.95em; - &::after { - content: '?'; - color: $primary-color; - font-weight: 800; - font-size: 12px; - width: 21px; - height: 21px; - padding-left: 1px; - border-radius: 50%; - font-size: 12px; - display: flex; - align-items: center; - justify-content: center; - color: $primary-color; - border: 2px solid $primary-color; - transition: opacity 0.25s; - margin-right: 4px; - transform: scale(0.9); - margin-left: 5px; - } - } -} diff --git a/src/components/TimeAndSalary/common/AboutThisJobModal.js b/src/components/TimeAndSalary/common/AboutThisJobModal.js deleted file mode 100644 index 9dbfae0b9..000000000 --- a/src/components/TimeAndSalary/common/AboutThisJobModal.js +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import Modal from 'common/Modal'; - -const AboutThisJobModal = ({ isOpen, close, title, aboutThisJob }) => ( - -

- {title} -

- {aboutThisJob && - aboutThisJob.split('\n').map((line, i) => ( -

- {line} -

- ))} -
-); - -AboutThisJobModal.propTypes = { - aboutThisJob: PropTypes.string.isRequired, - close: PropTypes.func, - isOpen: PropTypes.bool, - title: PropTypes.string.isRequired, -}; - -export default AboutThisJobModal; diff --git a/src/components/TimeAndSalary/common/Columns.module.css b/src/components/TimeAndSalary/common/Columns.module.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/components/TimeAndSalary/common/DashBoardTable.js b/src/components/TimeAndSalary/common/DashBoardTable.js deleted file mode 100644 index d9f05db86..000000000 --- a/src/components/TimeAndSalary/common/DashBoardTable.js +++ /dev/null @@ -1,107 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import R from 'ramda'; - -import Table from 'common/table/Table'; -import { InfoButton } from 'common/Modal'; -import styles from './DashboardTable.module.css'; - -import { - getCompany, - getJobTitle, - getFrequency, - getWeekWorkTime, - getSalary, - formatWage, - formatDate, - getAboutThisJobButton, -} from './formatter'; - -const DashBoardTable = ({ - data, - postProcessRows, - toggleInfoSalaryModal, - toggleInfoTimeModal, - toggleAboutThisJobModal, -}) => ( - - - 公司名稱 - - - 職稱 - 廠區/門市/分公司 - - - 一週總工時 - - - 加班頻率 - - - 薪資 - - - 估計時薪 - - - 參考時間 - - -
-); - -DashBoardTable.propTypes = { - data: PropTypes.array.isRequired, - postProcessRows: PropTypes.func.isRequired, - toggleAboutThisJobModal: PropTypes.func.isRequired, - toggleInfoSalaryModal: PropTypes.func.isRequired, - toggleInfoTimeModal: PropTypes.func.isRequired, -}; - -export default DashBoardTable; diff --git a/src/components/TimeAndSalary/common/DashBoardTable.module.css b/src/components/TimeAndSalary/common/DashBoardTable.module.css deleted file mode 100644 index 9ddc8c52d..000000000 --- a/src/components/TimeAndSalary/common/DashBoardTable.module.css +++ /dev/null @@ -1,78 +0,0 @@ -.latestTable { - background-color: #fff; - .colCompany { - width: 25%; - } - .colPosition { - width: 21%; - } - .colWeekTime { - width: 10%; - } - .colFrequency { - width: 10%; - } - .colSalary { - width: 14%; - } - .colHourly { - width: 12%; - } - .colDataTime { - width: 10%; - } - .colAboutThisJob { - width: 5%; - } -} - -.sortRow { - display: flex; - margin-top: 16px; - - .extremeDescription { - justify-content: flex-start; - font-size: 14px; - line-height: 18px; - margin-bottom: 20px; - color: #626262; - } -} - -.extremeDescription { - flex: 1; - display: flex; - align-items: center; - justify-content: center; - - .toggle { - color: #325bbd; - } -} - -.extremeRow { - background-color: #f1f1f1; -} - -.noBefore::before { - content: none !important; -} - -.noPadding { - padding: 0 !important; -} - -.permissionBlockBoard { - margin: -12px -20px; - padding: 50px 25px; - - width: calc(100% + 40px); -} - -.feedbackBlock { - margin-top: 60px; -} - -.fanPageBlock { - margin-top: 60px; -} diff --git a/src/components/TimeAndSalary/common/formatter.js b/src/components/TimeAndSalary/common/formatter.js index 145c5507d..dcf96a900 100644 --- a/src/components/TimeAndSalary/common/formatter.js +++ b/src/components/TimeAndSalary/common/formatter.js @@ -1,30 +1,9 @@ import React from 'react'; import { Link } from 'react-router-dom'; import { formatSalaryAmount, formatSalaryType } from 'common/formatter'; -import MagnifierPlus from 'common/icons/MagnifierPlus'; import employmentType from 'constants/employmentType'; import styles from './formatter.module.css'; -export const getCompany = item => ( -
- - {item.company.name} - -
-); - -export const getJobTitle = item => { - const { job_title: jobTitle, sector } = item; - return ( -
- - {jobTitle.name} - {' '} - {sector} -
- ); -}; - export const getNameAsCompanyName = (o, row) => ( {row.originalCompanyName}{' '} @@ -131,15 +110,3 @@ export const formatWage = wage => { export const formatDate = ({ year, month }) => `${year}.${month >= 10 ? '' : 0}${month}`; - -export const getAboutThisJobButton = toggleAboutThisJobModal => d => { - const aboutThisJob = d.about_this_job; - if (!aboutThisJob) return null; - - const title = `${d.company.name} ${d.job_title.name}`; - return ( -
toggleAboutThisJobModal(aboutThisJob, title)}> - -
- ); -}; diff --git a/src/components/TimeAndSalary/views/view.module.css b/src/components/TimeAndSalary/views/view.module.css deleted file mode 100644 index 499a37dff..000000000 --- a/src/components/TimeAndSalary/views/view.module.css +++ /dev/null @@ -1,146 +0,0 @@ -@value yellow-bar, gray-dark, main-gray, main-yellow, warning-red from "../../common/variables.module.css"; -$below-mobile: 550px; -$below-small: 850px; -$above-desktop: 1025px; -$below-desktop: 1024px; -$block-gutter-l: 70px; -$block-gutter-m: 40px; -$block-gutter-s: 20px; -$page-gutter: 40px; -$page-gutter-s: 15px; -$inner-wrap-m: 964px; -$gray: #b4b4b4; -$gray-dark: #777; -$blue: #325bbd; -$bold: 700; - -@define-mixin heading-style { - font-size: 2.1em; - line-height: 1.25em; - letter-spacing: 0.03em; - @media (max-width: $below-small) { - font-size: 1.8em; - } -} - -@define-mixin font-p { - font-size: 1.13em; - line-height: 1.5em; - color: #333; - @media (max-width: $below-small) { - font-size: 1em; - } -} - -@define-mixin font-p-m { - font-size: 1em; - line-height: 1.6em; - color: #333; -} - -@define-mixin hover-color $color { - transition: color 0.2s; - @media (min-width: $above-desktop) { - &:hover { - color: $color; - } - } -} - -.searchResult { - margin-bottom: $block-gutter-l; - .heading { - @media (max-width: $below-mobile) { - font-size: 1.5em; - } - } -} - -.searchNoResult { - background-color: #f2f2f2; - border: 1px solid border-gray; - display: flex; - align-items: center; - justify-content: center; - padding-top: 40px; - padding-bottom: 40px; - margin-top: 40px; -} - -.sort { - display: flex; - justify-content: flex-end; - align-items: center; - margin-bottom: 20px; - - @media (max-width: $below-mobile) { - text-align: left; - display: flex; - align-items: center; - } - .label { - display: inline-block; - position: relative; - top: 3px; - - @media (max-width: $below-mobile) { - flex: 0 0 65px; - } - } - .select { - display: inline-block; - max-width: 225px; - border-color: $gray; - - @media (max-width: $below-mobile) { - max-width: initial; - flex: 1 1 auto; - } - } -} - -.heading { - @mixin heading-style; - text-align: center; - margin-bottom: $block-gutter-m; - @media (max-width: $below-mobile) { - margin-bottom: $block-gutter-s; - } -} - -.bar { - background-color: yellow-bar; - padding: 5px; -} - -.dot { - display: inline-block; - border-radius: 50%; - width: 10px; - height: 10px; - margin-right: 10px; - &.hardly { - background-color: main-gray; - } - &.sometimes { - background-color: gray-dark; - } - &.usually { - background-color: main-yellow; - } - &.always { - background-color: warning-red; - } -} - -.sector { - color: main-gray; -} - -.feedbackBlock { - margin-top: 60px; -} - -.fanPageBlock { - margin-top: 60px; -} From 87a597dcd2614de999fe830eadb9f8298daca046 Mon Sep 17 00:00:00 2001 From: Yen-chi Chen Date: Sat, 6 Jul 2024 15:00:18 +0800 Subject: [PATCH 2/2] chore: format graphql (#1373) --- src/graphql/auth.js | 32 +-- src/graphql/company.js | 218 ++++++++++----------- src/graphql/emailVerification.js | 4 +- src/graphql/experience.js | 30 +-- src/graphql/jobTitle.js | 236 +++++++++++------------ src/graphql/payment.js | 6 +- src/graphql/popularCompanyAndJobTitle.js | 32 +-- src/graphql/popularExperience.js | 34 ++-- src/graphql/reply.js | 22 +-- src/graphql/timeAndSalary.js | 24 +-- src/graphql/userFeedback.js | 13 +- 11 files changed, 327 insertions(+), 324 deletions(-) diff --git a/src/graphql/auth.js b/src/graphql/auth.js index 573fd9c18..0030f757f 100644 --- a/src/graphql/auth.js +++ b/src/graphql/auth.js @@ -1,23 +1,23 @@ -export const facebookLogin = ` -mutation($input: FacebookLoginInput!) { - facebookLogin(input: $input) { - user { - _id - facebook_id +export const facebookLogin = /* GraphQL */ ` + mutation($input: FacebookLoginInput!) { + facebookLogin(input: $input) { + user { + _id + facebook_id + } + token } - token } -} `; -export const googleLogin = ` -mutation($input: GoogleLoginInput!) { - googleLogin(input: $input) { - user { - _id - google_id +export const googleLogin = /* GraphQL */ ` + mutation($input: GoogleLoginInput!) { + googleLogin(input: $input) { + user { + _id + google_id + } + token } - token } -} `; diff --git a/src/graphql/company.js b/src/graphql/company.js index ba9653987..dddaecd08 100644 --- a/src/graphql/company.js +++ b/src/graphql/company.js @@ -1,124 +1,124 @@ -export const getCompanyQuery = ` -query($companyName: String!) { - company(name: $companyName) { - name - interview_experiences { - id - type - originalCompanyName - company { - name - } - job_title { - name - } - region - experience_in_year - education - salary { - amount - type - } - title - sections { - subtitle - content - } - created_at - reply_count - like_count - overall_rating - } - work_experiences { - id - type - originalCompanyName - company { - name - } - job_title { - name - } - region - experience_in_year - education - salary { - amount +export const getCompanyQuery = /* GraphQL */ ` + query($companyName: String!) { + company(name: $companyName) { + name + interview_experiences { + id type + originalCompanyName + company { + name + } + job_title { + name + } + region + experience_in_year + education + salary { + amount + type + } + title + sections { + subtitle + content + } + created_at + reply_count + like_count + overall_rating } - title - sections { - subtitle - content - } - created_at - reply_count - like_count - recommend_to_others - } - salary_work_times { - id - week_work_time - salary { + work_experiences { + id type - amount - } - sector - day_real_work_time - day_promised_work_time - experience_in_year - estimated_hourly_wage - overtime_frequency - employment_type - job_title { - name - } - company { - name - } - data_time { - month - year - } - } - salary_work_time_statistics { - count - average_estimated_hourly_wage - average_week_work_time - overtime_frequency_count { - seldom - sometimes - usually - almost_everyday - } - is_overtime_salary_legal_count { - yes - no - unknown - } - has_compensatory_dayoff_count { - yes - no - unknown - } - has_overtime_salary_count { - yes - no - unknown - } - job_average_salaries { + originalCompanyName + company { + name + } job_title { name } - average_salary { + region + experience_in_year + education + salary { + amount + type + } + title + sections { + subtitle + content + } + created_at + reply_count + like_count + recommend_to_others + } + salary_work_times { + id + week_work_time + salary { type amount } - data_count + sector + day_real_work_time + day_promised_work_time + experience_in_year + estimated_hourly_wage + overtime_frequency + employment_type + job_title { + name + } + company { + name + } + data_time { + month + year + } + } + salary_work_time_statistics { + count + average_estimated_hourly_wage + average_week_work_time + overtime_frequency_count { + seldom + sometimes + usually + almost_everyday + } + is_overtime_salary_legal_count { + yes + no + unknown + } + has_compensatory_dayoff_count { + yes + no + unknown + } + has_overtime_salary_count { + yes + no + unknown + } + job_average_salaries { + job_title { + name + } + average_salary { + type + amount + } + data_count + } } } } -} `; export const queryCompaniesHavingDataGql = /* GraphQL */ ` diff --git a/src/graphql/emailVerification.js b/src/graphql/emailVerification.js index 0f68f1028..b1fbfd750 100644 --- a/src/graphql/emailVerification.js +++ b/src/graphql/emailVerification.js @@ -1,4 +1,4 @@ -export const sendVerifyEmail = ` +export const sendVerifyEmail = /* GraphQL */ ` mutation SendVerifyEmail($input: SendVerifyEmailInput!) { sendVerifyEmail(input: $input) { status @@ -6,7 +6,7 @@ export const sendVerifyEmail = ` } `; -export const verifyEmail = ` +export const verifyEmail = /* GraphQL */ ` mutation VerifyEmail($input: VerifyEmailInput!) { verifyEmail(input: $input) { token diff --git a/src/graphql/experience.js b/src/graphql/experience.js index d8d605245..e2803ebca 100644 --- a/src/graphql/experience.js +++ b/src/graphql/experience.js @@ -82,25 +82,27 @@ export const queryExperienceLikeGql = /* GraphQL */ ` } `; -export const createInterviewExperience = ` -mutation CreateInterviewExperience($input: CreateInterviewExperienceInput!) { - createInterviewExperience(input: $input) { - success - experience { - id +export const createInterviewExperience = /* GraphQL */ ` + mutation CreateInterviewExperience($input: CreateInterviewExperienceInput!) { + createInterviewExperience(input: $input) { + success + experience { + id + } } } -}`; +`; -export const createWorkExperience = ` -mutation CreateWorkExperience($input: CreateWorkExperienceInput!) { - createWorkExperience(input: $input) { - success - experience { - id +export const createWorkExperience = /* GraphQL */ ` + mutation CreateWorkExperience($input: CreateWorkExperienceInput!) { + createWorkExperience(input: $input) { + success + experience { + id + } } } -}`; +`; export const queryRelatedExperiencesGql = /* GraphQL */ ` query($id: ID!, $start: Int!, $limit: Int!) { diff --git a/src/graphql/jobTitle.js b/src/graphql/jobTitle.js index 24ae8e2ab..90495fa88 100644 --- a/src/graphql/jobTitle.js +++ b/src/graphql/jobTitle.js @@ -1,133 +1,133 @@ -export const queryJobTitles = ` -query($key:String!){ - job_titles(query:$key, page:0) { - name +export const queryJobTitles = /* GraphQL */ ` + query($key: String!) { + job_titles(query: $key, page: 0) { + name + } } -} `; -export const getJobTitleQuery = ` -query($jobTitle: String!) { - job_title(name: $jobTitle) { - name - interview_experiences { - id - type - originalCompanyName - company { - name - } - job_title { - name - } - region - experience_in_year - education - salary { - amount - type - } - title - sections { - subtitle - content - } - created_at - reply_count - like_count - overall_rating - } - work_experiences { - id - type - originalCompanyName - company { - name - } - job_title { - name - } - region - experience_in_year - education - salary { - amount +export const getJobTitleQuery = /* GraphQL */ ` + query($jobTitle: String!) { + job_title(name: $jobTitle) { + name + interview_experiences { + id type + originalCompanyName + company { + name + } + job_title { + name + } + region + experience_in_year + education + salary { + amount + type + } + title + sections { + subtitle + content + } + created_at + reply_count + like_count + overall_rating } - title - sections { - subtitle - content - } - created_at - reply_count - like_count - recommend_to_others - } - salary_work_times { - id - week_work_time - salary { + work_experiences { + id type - amount - } - sector - day_real_work_time - day_promised_work_time - experience_in_year - estimated_hourly_wage - overtime_frequency - employment_type - job_title { - name - } - company { - name - } - originalCompanyName - data_time { - month - year - } - } - salary_work_time_statistics { - count - average_estimated_hourly_wage - average_week_work_time - overtime_frequency_count { - seldom - sometimes - usually - almost_everyday - } - is_overtime_salary_legal_count { - yes - no - unknown - } - has_compensatory_dayoff_count { - yes - no - unknown + originalCompanyName + company { + name + } + job_title { + name + } + region + experience_in_year + education + salary { + amount + type + } + title + sections { + subtitle + content + } + created_at + reply_count + like_count + recommend_to_others + } + salary_work_times { + id + week_work_time + salary { + type + amount + } + sector + day_real_work_time + day_promised_work_time + experience_in_year + estimated_hourly_wage + overtime_frequency + employment_type + job_title { + name + } + company { + name + } + originalCompanyName + data_time { + month + year + } } - has_overtime_salary_count { - yes - no - unknown + salary_work_time_statistics { + count + average_estimated_hourly_wage + average_week_work_time + overtime_frequency_count { + seldom + sometimes + usually + almost_everyday + } + is_overtime_salary_legal_count { + yes + no + unknown + } + has_compensatory_dayoff_count { + yes + no + unknown + } + has_overtime_salary_count { + yes + no + unknown + } } - } - salary_distribution { - bins { - data_count - range { - type - from - to + salary_distribution { + bins { + data_count + range { + type + from + to + } } } } } -} `; export const queryJobTitlesHavingDataGql = /* GraphQL */ ` diff --git a/src/graphql/payment.js b/src/graphql/payment.js index f77dd4e11..3652caef4 100644 --- a/src/graphql/payment.js +++ b/src/graphql/payment.js @@ -1,4 +1,4 @@ -export const checkoutSubscriptionWithPrimeMutation = ` +export const checkoutSubscriptionWithPrimeMutation = /* GraphQL */ ` mutation($input: CheckoutSubscriptionWithPrimeInput!) { checkoutSubscriptionWithPrime(input: $input) { paymentRecord { @@ -12,7 +12,7 @@ export const checkoutSubscriptionWithPrimeMutation = ` } `; -export const subscriptionPlans = ` +export const subscriptionPlans = /* GraphQL */ ` query { subscriptionPlans { skuId @@ -28,7 +28,7 @@ export const subscriptionPlans = ` } `; -export const paymentRecord = ` +export const paymentRecord = /* GraphQL */ ` query($id: ID!) { paymentRecord(id: $id) { id diff --git a/src/graphql/popularCompanyAndJobTitle.js b/src/graphql/popularCompanyAndJobTitle.js index 5d27f4e06..a805fa448 100644 --- a/src/graphql/popularCompanyAndJobTitle.js +++ b/src/graphql/popularCompanyAndJobTitle.js @@ -1,24 +1,24 @@ -export const getPopularCompanyAverageSalaryQuery = ` -{ - popular_companies { - name - salary_work_time_statistics { - job_average_salaries { - job_title { - name - } - average_salary { - amount - type +export const getPopularCompanyAverageSalaryQuery = /* GraphQL */ ` + { + popular_companies { + name + salary_work_time_statistics { + job_average_salaries { + job_title { + name + } + average_salary { + amount + type + } } } } } -} `; -export const getPopularJobTitleSalaryDistributionQuery = ` -{ +export const getPopularJobTitleSalaryDistributionQuery = /* GraphQL */ ` + { popular_job_titles { name salary_distribution { @@ -33,4 +33,4 @@ export const getPopularJobTitleSalaryDistributionQuery = ` } } } - `; +`; diff --git a/src/graphql/popularExperience.js b/src/graphql/popularExperience.js index 65f3adde4..78d0ab7eb 100644 --- a/src/graphql/popularExperience.js +++ b/src/graphql/popularExperience.js @@ -1,20 +1,20 @@ -export const getPopularExperiencesQuery = ` -{ - popular_experiences(returnNumber: 3) { - id - type - created_at - title - preview - job_title { - name +export const getPopularExperiencesQuery = /* GraphQL */ ` + { + popular_experiences(returnNumber: 3) { + id + type + created_at + title + preview + job_title { + name + } + originalCompanyName + company { + name + } + like_count + reply_count } - originalCompanyName - company { - name - } - like_count - reply_count } -} `; diff --git a/src/graphql/reply.js b/src/graphql/reply.js index b540aa6b6..6326a69fd 100644 --- a/src/graphql/reply.js +++ b/src/graphql/reply.js @@ -1,17 +1,17 @@ -export const createReplyLike = ` -mutation($input:CreateReplyLikeInput!) { - createReplyLike(input: $input) { - replyLike { - id +export const createReplyLike = /* GraphQL */ ` + mutation($input: CreateReplyLikeInput!) { + createReplyLike(input: $input) { + replyLike { + id + } } } -} `; -export const deleteReplyLike = ` -mutation($input:DeleteReplyLikeInput!) { - deleteReplyLike(input: $input) { - deletedReplyId +export const deleteReplyLike = /* GraphQL */ ` + mutation($input: DeleteReplyLikeInput!) { + deleteReplyLike(input: $input) { + deletedReplyId + } } -} `; diff --git a/src/graphql/timeAndSalary.js b/src/graphql/timeAndSalary.js index bb7eb1043..bc4baf499 100644 --- a/src/graphql/timeAndSalary.js +++ b/src/graphql/timeAndSalary.js @@ -1,6 +1,6 @@ -export const getSearchCompanyQuery = ` - query($companyName:String!, $hasData:Boolean!) { - search_companies(query:$companyName, hasData:$hasData) { +export const getSearchCompanyQuery = /* GraphQL */ ` + query($companyName: String!, $hasData: Boolean!) { + search_companies(query: $companyName, hasData: $hasData) { name businessNumber dataCount @@ -8,21 +8,21 @@ export const getSearchCompanyQuery = ` } `; -export const getSearchJobTitleQuery = ` - query($jobTitle:String!) { - search_job_titles(query:$jobTitle) { +export const getSearchJobTitleQuery = /* GraphQL */ ` + query($jobTitle: String!) { + search_job_titles(query: $jobTitle) { name dataCount } } `; -export const changeSalaryWorkTimeStatus = ` -mutation($input:ChangeSalaryWorkTimeStatusInput!) { - changeSalaryWorkTimeStatus(input: $input) { - salary_work_time { - id +export const changeSalaryWorkTimeStatus = /* GraphQL */ ` + mutation($input: ChangeSalaryWorkTimeStatusInput!) { + changeSalaryWorkTimeStatus(input: $input) { + salary_work_time { + id + } } } -} `; diff --git a/src/graphql/userFeedback.js b/src/graphql/userFeedback.js index 2a667bfe7..845d105e0 100644 --- a/src/graphql/userFeedback.js +++ b/src/graphql/userFeedback.js @@ -1,7 +1,8 @@ -export const createUserFeedback = ` -mutation CreateUserFeedback($input: CreateUserFeedbackInput!) { - createUserFeedback(input: $input) { - npsScore - content +export const createUserFeedback = /* GraphQL */ ` + mutation CreateUserFeedback($input: CreateUserFeedbackInput!) { + createUserFeedback(input: $input) { + npsScore + content + } } -}`; +`;