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AAQL,IAAI,EAClB,IAAK,WACHK,EAAQmI,OAAO,CAACC,GAAG,CAAC,IAClBnI,EAAOoI,OAAO,EACZJ,EAAmBtM,IAAI,CAAC,CACtBqE,QAAAA,EACAC,OAAAA,EACAyC,MAAO1C,EAAQsI,WAAW,CAAGrI,EAAOsI,KAAK,CAAGtI,EAAOyC,KAAK,EAE9D,GACA,KACF,KAAK,WACH1C,EAAQmI,OAAO,CAACC,GAAG,CAAC,IAClBnI,EAAOuI,QAAQ,EACb,CAACvI,EAAOwI,YAAY,EACpBR,EAAmBtM,IAAI,CAAC,CAAEqE,QAAAA,EAASC,OAAAA,EAAQyC,MAAOzC,EAAOyC,KAAK,EAClE,GACA,KACF,KAAK,SACH1C,QAAAA,EAAQ0C,KAAK,EACXuF,EAAmBtM,IAAI,CAAC,CACtBqE,QAAAA,EACAC,OAAQD,EAAQmI,OAAO,CAACjD,IAAI,CAAC,GAAYjF,EAAOyC,KAAK,GAAK1C,EAAQ0C,KAAK,EACvEA,MAAO1C,EAAQ0C,KAAK,GAExB,KACF,SAGE1C,EAAQ0C,KAAK,EACXuF,EAAmBtM,IAAI,CAAC,CACtBqE,QAAAA,EACAC,OAAQD,EAAQ0C,KAAK,CACrBA,MAAO1C,EAAQ0C,KAAK,EAE5B,CACF,GAEOuF,CACT","sources":["webpack://_N_E/./components/auth/Authenticated.js","webpack://_N_E/./util/api/job_applications.js","webpack://_N_E/./redux/applications/actions.js","webpack://_N_E/./redux/conversations/actions.js","webpack://_N_E/./util/api/messages.js","webpack://_N_E/./util/job/filters.ts"],"sourcesContent":["import isEmpty from 'lodash/isEmpty';\nimport { withRouter } from 'next/router';\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { fetchCurrentAccount, refreshToken } from 'redux/account/actions';\nimport { fetchUnreviewedApplicants } from 'redux/applications/actions';\nimport { fetchUnreadEmployer, fetchUnreadUser } from 'redux/conversations/actions';\nimport { fetchCurrentProfile, fetchHasApplications } from 'redux/current_user_profile/actions';\nimport { fetchEmployerProfiles } from 'redux/employer/actions';\nimport { tokensExist } from 'util/api/auth';\nimport isBrowser from 'util/isBrowser';\nimport { AppRoutes } from 'util/urlFactory';\nimport FullPageLoading from '../loading/full_page';\n\nclass Authenticated extends React.Component {\n async componentDidMount() {\n const {\n authenticated,\n loggedOut,\n dispatch,\n refreshing,\n redirectLoggedOut,\n currentUserProfile,\n currentEmployerProfile,\n unreadMessages,\n unreviewedApplicants,\n employer,\n employerState,\n } = this.props;\n\n if (!refreshing && !authenticated) {\n await dispatch(refreshToken());\n }\n\n if (!authenticated) {\n if (!loggedOut) {\n await dispatch(fetchCurrentAccount());\n }\n } else {\n if (!currentUserProfile?.loaded && !currentUserProfile?.loading && !employer) {\n await dispatch(fetchCurrentProfile(true));\n await dispatch(fetchHasApplications());\n window.dataLayer?.push({ userType: 'teacher' });\n\n if (!unreadMessages.count && !unreadMessages.loading && !unreadMessages.loaded) {\n await dispatch(fetchUnreadUser());\n }\n }\n\n if (!currentEmployerProfile?.id && employer && !employerState.loading) {\n await dispatch(fetchEmployerProfiles());\n window.dataLayer?.push({ userType: 'employer' });\n\n if (!unreadMessages.count && !unreadMessages.loading && !unreadMessages.loaded) {\n await dispatch(fetchUnreadEmployer());\n }\n\n if (\n !unreviewedApplicants.count &&\n !unreviewedApplicants.loading &&\n !unreviewedApplicants.loaded\n ) {\n await dispatch(fetchUnreviewedApplicants());\n }\n }\n }\n\n if (loggedOut && !redirectLoggedOut) {\n window.stop();\n window.location.href = '/login';\n }\n }\n\n async componentDidUpdate(prevProps) {\n const {\n authenticated,\n currentUserProfile,\n employer,\n currentEmployerProfile,\n unreadMessages,\n unreviewedApplicants,\n dispatch,\n employerState,\n } = this.props;\n\n if (authenticated) {\n if (\n employer &&\n employerState.employer?.geography &&\n employerState.employer?.geography()?.employerPendingLaunch\n ) {\n window.location.href = AppRoutes.EMPLOYER_PENDING_LAUNCH;\n return;\n }\n\n if (!currentUserProfile?.loaded && !currentUserProfile?.loading && !employer) {\n await dispatch(fetchCurrentProfile(true));\n await dispatch(fetchHasApplications());\n window.dataLayer?.push({ userType: 'teacher' });\n\n if (!unreadMessages.count && !unreadMessages.loading && !unreadMessages.loaded) {\n await dispatch(fetchUnreadUser());\n }\n }\n\n if (\n (!currentEmployerProfile?.id && employer && !employerState.loading) ||\n (currentEmployerProfile?.id &&\n employer &&\n !employerState.loading &&\n isEmpty(employerState.employer))\n ) {\n await dispatch(fetchEmployerProfiles());\n window.dataLayer?.push({ userType: 'employer' });\n\n if (!unreadMessages.count && !unreadMessages.loading && !unreadMessages.loaded) {\n await dispatch(fetchUnreadEmployer());\n }\n\n if (\n !unreviewedApplicants.count &&\n !unreviewedApplicants.loading &&\n !unreviewedApplicants.loaded\n ) {\n await dispatch(fetchUnreviewedApplicants());\n }\n }\n }\n }\n\n render() {\n const {\n authenticated,\n loaded,\n children,\n redirectLoggedOut,\n employer,\n employerLoaded,\n teacherLoaded,\n router,\n } = this.props;\n\n if (authenticated && loaded) {\n if (employer) {\n window.dataLayer?.push({ userType: 'employer' });\n } else {\n window.dataLayer?.push({ userType: 'teacher' });\n }\n }\n\n if ((!tokensExist() || (loaded && !authenticated)) && redirectLoggedOut) {\n if (isBrowser()) {\n router.push({\n pathname: '/login',\n query: { return_to: window.location.pathname + window.location.search },\n });\n return ;\n }\n }\n if (!loaded || (authenticated && !employerLoaded && !teacherLoaded)) {\n return ;\n }\n return children;\n }\n}\n\nfunction mapStateToProps(state) {\n return {\n authenticated: state.account.authenticated,\n loggedOut: state.account.loggedOut,\n refreshing: state.account.refreshing,\n loaded: state.account.loaded,\n currentUserProfile: state.currentUserProfile,\n currentEmployerProfile: state.employer.currentEmployerProfile,\n employerLoaded: state.employer.fetchCompleted,\n teacherLoaded: state.currentUserProfile.loaded,\n employerState: state.employer,\n unreadMessages: state.conversations.unreadMessages,\n unreviewedApplicants: state.applications.unreviewedApplicants,\n };\n}\n\nAuthenticated.defaultProps = {\n redirectLoggedOut: true,\n};\n\nexport default connect(mapStateToProps)(withRouter(Authenticated));\n","import { JobApplication } from 'util/resources';\nimport apiCall from './client';\n\nexport async function fetchAll() {\n return await JobApplication.includes(\n 'job_listing',\n 'locations',\n { job_application_locations: ['location'] },\n { job_listing: ['employer'] },\n { employer: ['geography'] },\n ).all();\n}\n\nexport async function fetchOne(id) {\n return await JobApplication.includes(\n 'job_listing',\n 'locations',\n { job_application_locations: ['location'] },\n { job_listing: ['employer'] },\n { employer: ['geography'] },\n ).find(id);\n}\n\nexport async function update(id, data) {\n return await apiCall(`employer/job_applications/${id}`, 'PATCH', {\n body: JSON.stringify({ ...data }),\n });\n}\n\nexport async function updateMany(ids, data) {\n return await apiCall(`employer/job_applications/update_many`, 'PATCH', {\n body: JSON.stringify({ ids, ...data }),\n });\n}\n","import { update, updateMany } from 'util/api/job_applications';\nimport { EmployerJobApplication, JobApplication } from 'util/resources';\nimport * as types from './types';\nimport { getAppliedFilters } from 'util/job/filters';\nimport isFunction from 'lodash/isFunction';\nimport isObject from 'lodash/isObject';\nimport { current } from '@reduxjs/toolkit';\n\nconst PAGE_SIZE = 25;\n\nconst SORT_BY_KEYS = {\n name: 'user_profiles.first_name',\n status: 'aasm_state',\n title: 'job_listings.title',\n createdAt: 'job_applications.created_at',\n qualification: 'user_profile_job_listing_suitabilities.met_requirements_percentage',\n education: 'education',\n last_messaged: 'latest_message.created_at',\n};\n\nconst getSortKey = (key) => SORT_BY_KEYS[key] || SORT_BY_KEYS.createdAt;\n\nfunction startLoadApplications(payload) {\n return { type: types.APPLICATIONS_LOAD_START, payload };\n}\n\nfunction paginationLoadSuccess(payload) {\n return { type: types.PAGINATION_LOAD_SUCCESS, payload };\n}\n\nfunction startLoadApplication() {\n return { type: types.APPLICATION_LOAD_START };\n}\n\nfunction applicationsLoadSuccess(data) {\n return { type: types.APPLICATIONS_LOAD_SUCCESS, payload: data };\n}\n\nfunction applicationLoadSuccess(data) {\n return { type: types.APPLICATION_LOAD_SUCCESS, payload: data };\n}\n\nfunction applicationLoadFailure(data) {\n return { type: types.APPLICATIONS_LOAD_FAILURE };\n}\n\nfunction changeFilterAction(section, option) {\n return { type: types.APPLICATIONS_SEARCH_CHANGE_FILTER, payload: { section, option } };\n}\n\nfunction resetFilterAction() {\n return { type: types.APPLICATIONS_SEARCH_RESET_FILTER };\n}\n\nexport function resetFilters() {\n return (dispatch) => {\n dispatch(resetFilterAction());\n };\n}\n\nexport function changeFilter(\n section,\n option,\n currentPage = 1,\n order = '',\n geographyId,\n callback = null,\n) {\n return (dispatch) => {\n dispatch(changeFilterAction(section, option));\n\n if (isFunction(callback)) {\n return callback();\n }\n };\n}\n\nexport function fetchUserApplications() {\n return async (dispatch) => {\n const startedAt = new Date();\n dispatch(startLoadApplications({ startedAt }));\n\n try {\n const jobApplications = await JobApplication.includes('job_listing', {\n job_listing: ['locations', 'employer', 'employer.state'],\n }).all();\n\n window.dataLayer?.push({ userType: 'teacher', applicationsCount: jobApplications?.size() });\n\n dispatch(applicationsLoadSuccess({ data: jobApplications.toArray(), startedAt }));\n } catch (e) {\n console.error(e);\n dispatch(applicationLoadFailure());\n }\n };\n}\n\nfunction changeFilterStart(section, option) {\n return { type: types.APPLICATIONS_SEARCH_CHANGE_FILTER, payload: { section, option } };\n}\n\nexport const fetchApplicationParamsToFilters = (rawParams) => {\n return {\n applicant_name: rawParams.name || undefined,\n status: rawParams.status || undefined,\n statusCategory: rawParams.statusCategory || undefined,\n jobListingId: rawParams.jobListingId || undefined,\n locationId: rawParams.locationId || undefined,\n byWithdrawn: rawParams.byWithdrawn,\n };\n};\n\nconst PARENT_SECTION_TYPES = {\n query: 'user_profile',\n location_id: undefined,\n education_level: 'user_profile',\n by_major_in: 'user_profile',\n work_experience: 'user_profile',\n desired_location: 'user_profile',\n certifications: 'user_profile',\n education_philosophy: 'user_profile',\n languages: 'user_profile',\n job_search_status: 'user_profile',\n employment_type: 'user_profile',\n role_type: 'user_profile',\n video_ask_answers: 'user_profile',\n show_status: {\n liked_by_employer: 'user_profile',\n viewed_by_employer: 'user_profile',\n not_viewed_by_employer: 'user_profile',\n job_application_viewed_by_employer: 'user_profile',\n job_application_not_viewed_by_employer: 'user_profile',\n },\n};\n\nconst appliedFiltersToParams = (appliedFilters) => {\n return appliedFilters.reduce((acc, curr) => {\n const sectionId = curr.section.id;\n\n const parentSection = isObject(PARENT_SECTION_TYPES[sectionId])\n ? PARENT_SECTION_TYPES[sectionId][curr.value]\n : PARENT_SECTION_TYPES[sectionId];\n const sectionType = curr.section.type;\n const paramParent = parentSection ? (acc[parentSection] = acc[parentSection] || {}) : acc;\n\n if (paramParent[sectionId]) {\n if (sectionType === 'text') {\n paramParent[sectionId] = curr.value;\n }\n if (sectionType === 'checkbox') {\n paramParent[sectionId].push(curr.value);\n }\n } else {\n if (sectionType === 'text') {\n paramParent[sectionId] = curr.value;\n }\n if (sectionType === 'dropdown') {\n if (parentSection) {\n paramParent[curr.value] = 'current_employer';\n } else {\n paramParent[curr.value] = true;\n }\n } else {\n paramParent[sectionId] = [curr.value];\n }\n }\n\n return acc;\n }, {});\n};\n\nexport function fetchApplications(\n {\n currentPage = 1,\n name = '',\n status = '',\n jobListingId,\n locationId = '',\n sortBy = 'createdAt',\n sortDir = 'desc',\n statusCategory = '',\n pageSize = PAGE_SIZE,\n byWithdrawn = false,\n },\n userUserProfileFilters = false,\n) {\n return async (dispatch, getState) => {\n const startedAt = new Date();\n dispatch(startLoadApplications({ startedAt }));\n\n try {\n const params = fetchApplicationParamsToFilters({\n name,\n status,\n statusCategory,\n jobListingId,\n locationId,\n byWithdrawn,\n });\n const state = getState();\n\n const appliedFilters = getAppliedFilters(state.applications.filters);\n const drawerFilters = appliedFiltersToParams(appliedFilters);\n\n const newParams = { ...params, ...drawerFilters };\n const sortKey = getSortKey(sortBy);\n\n const jobApplications = await EmployerJobApplication.includes(\n 'job_listing',\n 'user_profile',\n 'locations',\n {\n job_listing: [{ employer: 'state' }],\n user_profile: [\n 'education_histories',\n 'education_histories.education_level',\n 'geography',\n 'video_ask_answers',\n ],\n },\n )\n .where(newParams)\n .limit(pageSize)\n .offset(pageSize * Math.max(0, currentPage - 1))\n .order(\n sortKey.includes('created_at')\n ? { [sortKey]: sortDir }\n : { [sortKey]: sortDir, 'job_applications.created_at': 'desc' },\n )\n .all();\n\n const pagination = jobApplications.links();\n\n window.dataLayer?.push({ userType: 'employer', applicationsCount: jobApplications?.size() });\n\n dispatch(\n applicationsLoadSuccess({\n data: jobApplications.all(),\n meta: jobApplications.meta(),\n startedAt,\n }),\n );\n dispatch(paginationLoadSuccess({ pagination, startedAt }));\n } catch (e) {\n console.error(e);\n dispatch(applicationLoadFailure());\n }\n };\n}\nexport function fetchApplication(id, reload = true) {\n return async (dispatch) => {\n if (reload) dispatch(startLoadApplication());\n\n try {\n const jobApplication = await EmployerJobApplication.includes(\n 'job_listing',\n 'job_listing.locations',\n 'locations',\n {\n user_profile: [\n 'video_ask_answers',\n 'work_histories',\n 'education_histories',\n 'education_histories.education_level',\n 'profile_question_answers',\n 'profile_question_answers.profile_question',\n 'certifications',\n 'geography',\n 'certifications.certification_option',\n 'certifications.certification_option.certification_category',\n ],\n job_listing: [{ employer: 'state' }],\n },\n ).find(id);\n\n dispatch(applicationLoadSuccess(jobApplication));\n } catch (e) {\n console.error(e);\n dispatch(applicationLoadFailure());\n }\n };\n}\n\nexport function updateApplicationState(application, aasm_state) {\n return async (dispatch) => {\n try {\n await update(application.id, { aasm_state });\n await dispatch(fetchApplication(application.id, false));\n } catch (e) {\n console.error(e);\n dispatch(applicationLoadFailure());\n }\n };\n}\n\nexport function updateManyApplicationState(\n applicationIds,\n aasm_state,\n currentPage = 1,\n statusCategory = 'awaiting_review',\n) {\n return async (dispatch) => {\n try {\n const startedAt = new Date();\n dispatch(startLoadApplications({ startedAt }));\n await updateMany(applicationIds, { aasm_state });\n await dispatch(fetchApplications({ currentPage, statusCategory }));\n } catch (e) {\n // TODO: Change this to be with multiple applications\n dispatch(applicationLoadFailure());\n }\n };\n}\n\nexport function fetchUnreviewedApplicants() {\n return async (dispatch) => {\n dispatch(startLoadingUnreviewedApplicants());\n\n try {\n const unreviewedApplicants = await EmployerJobApplication.where({\n status_category: 'awaiting_review',\n })\n .limit(1)\n .all();\n\n const awaitingReviewCount = unreviewedApplicants.meta().awaitingReviewCount;\n\n dispatch(setUnreviewedApplicantsCount(awaitingReviewCount));\n } catch (e) {\n dispatch(unreviewedApplicantsLoadFailure());\n console.error(e);\n }\n };\n}\n\nexport function startLoadingUnreviewedApplicants() {\n return { type: types.APPLICATIONS_UNREVIEWED_APPLICANTS_LOAD_START };\n}\n\nexport function setUnreviewedApplicantsCount(count) {\n return { type: types.APPLICATIONS_SET_UNREVIEWED_APPLICANTS_COUNT, payload: count };\n}\nexport function unreviewedApplicantsLoadFailure() {\n return { type: types.APPLICATIONS_SET_UNREVIEWED_APPLICANTS_LOAD_FAILURE };\n}\n","import { markRead } from 'util/api/messages';\nimport { Conversation, EmployerConversation } from 'util/resources';\nimport * as types from './types';\n\nconst PAGE_SIZE = 15;\n\nfunction startLoadConversations() {\n return { type: types.CONVERSATIONS_LOAD_START };\n}\n\nfunction conversationsLoadSuccess(data) {\n return { type: types.CONVERSATIONS_LOAD_SUCCESS, payload: data };\n}\n\nexport function singleConversationLoaded(data) {\n return { type: types.CONVERSATIONS_LOAD_ONE, payload: data };\n}\n\nfunction setUnreadCount(count) {\n return { type: types.CONVERSATIONS_SET_UNREAD_COUNT, payload: count };\n}\n\nfunction startLoadingUnreadMessages() {\n return { type: types.CONVERSTATIONS_UNREAD_MESSAGES_LOAD_START };\n}\n\nfunction unreadMessagesLoadFailure() {\n return { type: types.CONVERSATIONS_UNREAD_MESSAGES_LOAD_FAILURE };\n}\n\nfunction paginationLoadSuccess(payload) {\n return { type: types.CONVERSATIONS_PAGINATION_LOAD_SUCCESS, payload };\n}\n\nexport function fetchConversations(\n currentPage = 1,\n filter = {\n tab: 'all',\n },\n) {\n return async (dispatch) => {\n await dispatch(startLoadConversations());\n dispatch(startLoadingUnreadMessages());\n\n try {\n // const conversations = await Conversation.includes([\"conversation_members\", \"messages\"]);\n const conversations = await Conversation.includes(\n { conversation_members: ['messageable'] },\n 'messages',\n 'messages.employer_profile',\n 'conversation_members',\n )\n .where({\n starredBy: filter.tab === 'starred' ? 'current_user_profile' : undefined,\n })\n .limit(PAGE_SIZE)\n .offset(PAGE_SIZE * Math.max(0, currentPage - 1))\n .all();\n\n const sumUnreadCount = conversations.toArray().reduce((acc, conversation) => {\n return (acc += conversation.unreadCount);\n }, 0);\n\n dispatch(setUnreadCount(sumUnreadCount));\n const pagination = conversations.links();\n dispatch(paginationLoadSuccess(pagination));\n dispatch(conversationsLoadSuccess(conversations.all()));\n } catch (e) {\n dispatch(unreadMessagesLoadFailure());\n console.error(e);\n }\n };\n}\n\nexport function fetchConversation(id) {\n return async (dispatch) => {\n try {\n const conversation = await Conversation.includes(\n { conversation_members: ['messageable'] },\n 'messages',\n 'messages.employer_profile',\n 'conversation_members',\n ).find(id);\n dispatch(singleConversationLoaded(conversation));\n } catch (e) {\n console.error(e);\n }\n };\n}\n\nexport function fetchUnreadUser() {\n return async (dispatch) => {\n dispatch(startLoadingUnreadMessages());\n\n try {\n const conversations = await Conversation.all();\n\n const sumUnreadCount = conversations.toArray().reduce((acc, conversation) => {\n return (acc += conversation.unreadCount);\n }, 0);\n\n dispatch(setUnreadCount(sumUnreadCount));\n } catch (e) {\n dispatch(unreadMessagesLoadFailure());\n console.error(e);\n }\n };\n}\n\nexport function fetchUnreadEmployer() {\n return async (dispatch) => {\n dispatch(startLoadingUnreadMessages());\n\n try {\n const conversations = await EmployerConversation.all();\n\n const sumUnreadCount = conversations.toArray().reduce((acc, conversation) => {\n return (acc += conversation.unreadCount);\n }, 0);\n\n dispatch(setUnreadCount(sumUnreadCount));\n } catch (e) {\n dispatch(unreadMessagesLoadFailure());\n console.error(e);\n }\n };\n}\n\nexport function fetchEmployerConversations(\n currentPage = 1,\n filter = {\n userProfileName: '',\n tab: undefined,\n initiatedBy: '',\n unreadBy: '',\n unrespondedTo: '',\n },\n) {\n return async (dispatch) => {\n await dispatch(startLoadConversations());\n dispatch(startLoadingUnreadMessages());\n\n try {\n const filters = {\n status: filter.tab === 'archived' ? 'archived' : 'active',\n userProfileName: filter.userProfileName || undefined,\n starredBy: filter.tab === 'starred' ? 'current_employer_profile' : undefined,\n unread_by: filter.unreadBy,\n unresponded_to: filter.unrespondedTo,\n initiated_by: filter.initiatedBy,\n };\n\n const conversations = await EmployerConversation.includes(\n { conversation_members: ['messageable'] },\n 'messages',\n 'messages.employer_profile',\n 'conversation_members',\n {\n conversation_members: [\n 'messageable.profileQuestionAnswers',\n 'messageable.profileQuestionAnswers.profileQuestion',\n ],\n },\n )\n .where(filters)\n .limit(PAGE_SIZE)\n .offset(PAGE_SIZE * Math.max(0, currentPage - 1))\n .all();\n\n const sumUnreadCount = conversations\n .toArray()\n .reduce((acc, conversation) => acc + conversation.unreadCount, 0);\n\n const pagination = conversations.links();\n dispatch(paginationLoadSuccess(pagination));\n dispatch(setUnreadCount(sumUnreadCount));\n dispatch(conversationsLoadSuccess(conversations.all()));\n } catch (e) {\n dispatch(unreadMessagesLoadFailure());\n console.error(e);\n }\n };\n}\n\nexport function fetchEmployerConversation(id) {\n return async (dispatch) => {\n try {\n const conversation = await EmployerConversation.includes(\n { conversation_members: ['messageable'] },\n 'messages',\n 'messages.employer_profile',\n 'conversation_members',\n {\n conversation_members: [\n 'messageable.profileQuestionAnswers',\n 'messageable.profileQuestionAnswers.profileQuestion',\n ],\n },\n ).find(id);\n\n dispatch(singleConversationLoaded(conversation));\n } catch (e) {\n console.error(e);\n }\n };\n}\n\nexport function markConversationRead(id, type) {\n return async (dispatch) => {\n await markRead(id, type);\n if (type === 'UserProfile') {\n dispatch(fetchConversation(id));\n } else if (type === 'Employer') {\n dispatch(fetchEmployerConversation(id));\n }\n };\n}\n","import apiCall from './client';\n\nexport async function createMessage(conversationId, data) {\n return await apiCall(\n `user_profile/conversations/${conversationId}/messages?include=conversation`,\n 'POST',\n {\n body: JSON.stringify(data),\n },\n );\n}\n\nexport async function createEmployerMessage(conversationId, data) {\n return await apiCall(\n `employer/conversations/${conversationId}/messages?include=conversation`,\n 'POST',\n {\n body: JSON.stringify(data),\n },\n );\n}\n\nexport async function createConversation({ id, type }) {\n const body = {\n messageable: {\n id: id,\n type: type,\n },\n };\n if (type === 'Employer') {\n return await apiCall(`user_profile/conversations`, 'POST', { body: JSON.stringify(body) });\n } else {\n return await apiCall(`employer/conversations`, 'POST', { body: JSON.stringify(body) });\n }\n}\n\nexport async function markRead(id, type) {\n const body = {\n read_at: new Date(),\n };\n\n if (type !== 'Employer') {\n return await apiCall(`user_profile/conversations/${id}`, 'PATCH', {\n body: JSON.stringify(body),\n });\n } else {\n return await apiCall(`employer/conversations/${id}`, 'PATCH', { body: JSON.stringify(body) });\n }\n}\n\nexport async function softDeleteEmployerMessage(conversationId, messageId) {\n return await apiCall(`employer/conversations/${conversationId}/messages/${messageId}`, 'DELETE');\n}\n","interface Options {\n value: string;\n label: string;\n checked?: boolean;\n selected?: boolean;\n defaultValue?: boolean;\n}\n\nexport type Filter =\n | {\n id: string;\n type: string;\n name: string;\n isGeography?: boolean;\n options?: Options[];\n value: string | number;\n }\n | {\n id: string;\n type: string;\n name: string;\n isGeography?: boolean;\n value?: string | number;\n options: Options[];\n };\n\nexport const getAppliedFilters = (filters: Filter[] = []) => {\n const appliedFiltersList = [];\n filters.forEach((section) => {\n switch (section.type) {\n case 'checkbox':\n section.options.map((option) => {\n option.checked &&\n appliedFiltersList.push({\n section,\n option,\n value: section.isGeography ? option.label : option.value,\n });\n });\n break;\n case 'dropdown':\n section.options.map((option) => {\n option.selected &&\n !option.defaultValue &&\n appliedFiltersList.push({ section, option, value: option.value });\n });\n break;\n case 'hidden':\n section.value !== 'all' &&\n appliedFiltersList.push({\n section,\n option: section.options.find((option) => option.value === section.value),\n value: section.value,\n });\n break;\n case 'text':\n case 'range':\n default:\n section.value &&\n appliedFiltersList.push({\n section,\n option: section.value,\n value: section.value,\n });\n }\n });\n\n return appliedFiltersList;\n};\n"],"names":["Authenticated","React","componentDidMount","authenticated","loggedOut","dispatch","refreshing","redirectLoggedOut","currentUserProfile","currentEmployerProfile","unreadMessages","unreviewedApplicants","employer","employerState","props","refreshToken","window","loaded","loading","fetchCurrentProfile","fetchHasApplications","dataLayer","push","userType","count","fetchUnreadUser","id","fetchEmployerProfiles","fetchUnreadEmployer","fetchUnreviewedApplicants","fetchCurrentAccount","stop","location","href","componentDidUpdate","prevProps","geography","employerPendingLaunch","AppRoutes","EMPLOYER_PENDING_LAUNCH","isEmpty","render","children","employerLoaded","teacherLoaded","router","tokensExist","isBrowser","pathname","query","return_to","search","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","FullPageLoading","employerView","defaultProps","__webpack_exports__","connect","state","account","fetchCompleted","conversations","applications","withRouter","update","data","apiCall","concat","body","JSON","stringify","updateMany","ids","SORT_BY_KEYS","name","status","title","createdAt","qualification","education","last_messaged","getSortKey","key","startLoadApplications","payload","type","types","applicationLoadFailure","resetFilters","changeFilter","section","option","currentPage","order","geographyId","callback","isFunction","fetchApplicationParamsToFilters","applicant_name","rawParams","undefined","statusCategory","jobListingId","locationId","byWithdrawn","PARENT_SECTION_TYPES","location_id","education_level","by_major_in","work_experience","desired_location","certifications","education_philosophy","languages","job_search_status","employment_type","role_type","video_ask_answers","show_status","liked_by_employer","viewed_by_employer","not_viewed_by_employer","job_application_viewed_by_employer","job_application_not_viewed_by_employer","appliedFiltersToParams","appliedFilters","reduce","acc","curr","sectionId","parentSection","isObject","value","sectionType","paramParent","fetchApplications","param","sortBy","sortDir","pageSize","userUserProfileFilters","getState","startedAt","Date","params","getAppliedFilters","filters","drawerFilters","newParams","sortKey","jobApplications","EmployerJobApplication","includes","job_listing","user_profile","where","limit","offset","Math","max","all","pagination","links","applicationsCount","size","meta","e","console","error","fetchApplication","reload","jobApplication","find","updateApplicationState","application","aasm_state","updateManyApplicationState","applicationIds","awaitingReviewCount","status_category","startLoadConversations","conversationsLoadSuccess","singleConversationLoaded","setUnreadCount","startLoadingUnreadMessages","unreadMessagesLoadFailure","paginationLoadSuccess","fetchConversations","filter","tab","Conversation","conversation_members","starredBy","PAGE_SIZE","sumUnreadCount","toArray","conversation","unreadCount","fetchConversation","EmployerConversation","fetchEmployerConversations","userProfileName","initiatedBy","unreadBy","unrespondedTo","unread_by","unresponded_to","initiated_by","fetchEmployerConversation","markConversationRead","markRead","createMessage","conversationId","createEmployerMessage","createConversation","messageable","read_at","softDeleteEmployerMessage","messageId","appliedFiltersList","forEach","options","map","checked","isGeography","label","selected","defaultValue"],"sourceRoot":""}