{"version":3,"sources":["components/pages/feed/duck-rocket.gif","components/pages/feed/mountains.png","components/pages/work/duck-rocket.gif","components/app/app.styles.js","components/page-head/page-head.jsx","components/page-head/page-head.styles.js","common/api/pupil-activity.js","stores/feed-items/feed-items.actions.js","stores/feed-items/feed-items.selectors.js","common/api/profile.js","common/api/school.js","components/pupil-selector/pupil-selector.jsx","components/pupil-selector/pupil-selector.styles.js","components/work-form/work-form.jsx","common/api/work.js","hooks/work.js","components/pages/feed/feed.jsx","stores/work-upload/work-upload.actions.js","stores/work-upload/work-upload.selectors.js","components/pages/work/work.jsx","components/app/app.js","stores/feed-items/feed-items.reducer.js","stores/work-upload/work-upload.reducer.js","reducer.js","index.js"],"names":["module","exports","styles","container","maxWidth","margin","injectSheet","height","boxShadow","alignItems","backgroundColor","position","zIndex","padding","display","justifyContent","_ref","classes","className","props","React","createElement","Object","assign","classNames","apiGetFeedItems","params","apiClient","get","apiGetStudentsPerSession","sessionId","fetchFeedItems","data","arguments","length","undefined","requestPrefix","request","include","rejectWork","feedId","workVersionId","comment","apiRejectWork","put","approveWork","_ref2","apiApproveWork","addStudentsToSession","studentIds","apiAddStudentsToSession","post","account_ids","getFeedItemsState","state","FeedItemsStore","getFeedItemsList","createSelector","result","map","id","entities","items","apiGetMe","apiGetSchool","GroupsSelector","content","pending","width","onFilter","requestClose","selectedGroups","me","useMe","school","account","teacher_type","setData","useState","useEffect","catch","errorHandler","then","res","GroupsSelectionProvider","selected","groups","categories","group_categories","store","Fragment","ModalContent","legacy","GroupsSelection","Spinner","ModalFooter","alignRight","childrenGap","Button","tall","simple","action","GroupsFilter","COLORS","marginBottom","fontWeight","groupsInfo","listStyle","color","TEXT","DARK_GREY","NORMAL","lineHeight","paddingLeft","borderRadius","background","left","top","modalOpen","setModalOpen","selectedGroupsLength","keys","bleed","Modal","isOpen","closeButton","ModalHeader","filters","search","borderRight","pupils","overflow","table","paddingRight","yearHCell","permissionHCell","pupilName","avatar","fontSize","marginRight","flexShrink","uploadButton","_ref3","onUpload","setPupils","searchString","setSearchString","sort","setSort","key","direction","setSelectedGroups","student_types","pupilsFilteredByGroups","useMemo","filter","pupil","group","pupilsFilteredBySearch","full_name","toLowerCase","indexOf","resultingPupils","orderBy","year_group","order","FormInput","value","onChange","e","target","placeholder","htmlFor","FontAwesomeIcon","icon","faSearch","NoItemsPlaceholder","noItems","href","URLS","DASHBOARD","Table","TableRow","HeadCell","ordered","Cell","PobbleAvatar","name","center","yearGroupCell","AgeGroup","CircleStatus","status","policy","can_publish","right","FormFile","multiple","files","pupilId","accept","span","secondary","faUpload","Tooltip","disabled","FormControl","appearance","cursor","border","flexDirection","borderColor","checkIcon","children","THEME","hideIcon","type","component","faCheckCircle","faCircle","WorkForm","borderTop","RED","commentHint","infoSection","marginTop","staButton","LIGHT_GREY","marginLeft","staChoices","staDescription","publishChoices","gridTemplateColumns","gap","publishChoice","font","publishPoint","commentSection","publishCrown","defaultValues","canPublish","onCancel","submitButton","onSubmit","publish","setPublish","setComment","title","setTitle","tags","setTags","showSta","setShowSta","sta","setSta","staExtraInfo","setStaExtraInfo","description","setDescription","workState","incrementPublishWorkCounter","publishWorkSP","useFeatureCounter","sp","publish_work","preventDefault","extraInfo","split","tag","trim","publishSection","checked","faTimesCircle","restricted","showDialog","SubsCrown","accent","FormLabel","small","FormTextArea","autoFocus","currentTarget","required","staSection","ButtonElement","onClick","faCaretUp","faCaretDown","rel","faInfoCircle","FormRadio","footer","apiCreateMedium","formData","FormData","forEach","append","apiDeleteWork","delete","useWorkUpload","uploadingWork","setUploadingWork","history","useHistory","uploadWork","apiCreateWork","studentId","image","Promise","all","slice","file","work","push","response","DirectUploadModal","minWidth","PupilSelectorUpload","StudentItem","student","borderBottom","textAlign","BLUE","active","stats","disabledStat","evidenceBank","PURPLE","published","GREEN","worksCount","studentAvatar","as","Component","work_versions_count","faFileAlt","work_state","faClipboardCheck","faClipboard","Filter","_ref4","sessionsSelectSection","sessionSelectSkeleton","studentsList","flex","skeletonAvatar","skeletonName","backButton","addStudent","textDecoration","_ref5","useSelector","dispatch","useDispatch","sessionsList","setSessionsList","lastUpdate","usePrevious","updateAfter","pupilSelectorOpened","setPupilSelectorOpened","sessionsListFormatted","session","dateFormat","format","Date","accessible_at","sessionListMapped","selectedSession","session_id","studentsPerSession","setStudentsPerSession","studentsPerSessionMap","Array","isArray","selectedStudentState","setSelectedStudentState","useContext","FeedContext","selectedStudent","pa_sessions","reverse","students_data","Bone","FormSelect","back","studentsSkeleton","i","student_solo_session","PupilSelector","onSelect","pupilIds","exclude","SuccessModal","_ref6","src","duckRocket","alt","ApproveModal","_ref7","ApproveForm","_ref8","showSuccessModal","approveWorkRequest","mapProps","pa_action","pa_session","first_name","student_type","fields","payload","work_title","work_description","comment_on_work","work_tags","independent","independent_description","last_pa_work_version","faCheck","SendBackForm","_ref9","rejectWorkRequest","toast","success","faPaperPlane","SendBackModal","_ref10","MediaPageNav","_ref11","_ref12","currentPage","pagesLength","setCurrentPage","faCaretCircleLeft","faCaretCircleRight","FeedContentHolder","_ref13","SuccessCriteria","_ref14","FONT_SIZES","successCriteria","successCriteriaHead","BODY_DEFAULT","STYLE","criteria","criterion","_ref15","item","prompts","checkbox","FormCheckbox","Box","_ref16","box","_ref17","FeedItem","_ref18","head","layout","layoutDetails","layoutWork","media","controls","paddingTop","paddingBottom","author","creator","versionSelect","_ref19","onSendBack","onApprove","currentMediaPage","setCurrentMediaPage","currentVersionIndex","setCurrentVersionIndex","pa_work_versions","md","currentWorkVersion","pupilAvatar","success_criteria","versions","workReviewsProps","useWorkReviews","activeMedia","pa_highlight_canva","WorkHighlighter","preloadData","MediaLoader","version","index","reviews","WorkReviews","SelectedStudentScreen","_ref20","teacherReviewContainer","studentInteractionContainer","studentInteractionHolder","statusIcon","_ref21","paAction","setPaAction","pa_session_id","student_account_id","pa_presentation_action","faFile","PobbleLink","createContext","feedStyles","fullVHExceptHeader","filterButton","showFilters","Feed","_ref22","match","useRouteMatch","feedItems","modalState","setModalState","setShowFilters","fetchItemsRequest","path","contextValue","Provider","PageHead","faFilter","faPlus","mountains","feedItem","openConfirmationDialog","bodyText","confirmText","cancelText","_ref23","fetchWorkUploadData","apiGetWork","deleteMedia","apiDeleteMedia","rotateMedium","apiRotateMedium","degrees","saveWork","apiUpdateWork","reorderMedia","workId","ids","apiReorderMedia","media_ids","getWorkUploadState","WorkUploadStore","getWork","getStudent","getMediaList","getMediaListInOrder","sortBy","WorkContext","Reorder","flexWrap","opacity","cell","backgroundPosition","backgroundSize","setScreenState","onReorder","useRef","mediaCopy","Sortable","current","animation","ghostClass","onEnd","from","to","dataset","Holder","DarkButton","faCaretLeft","ref","data-id","style","backgroundImage","image_url","buttons","uploadingPending","Cookies","remove","faFilePlus","DetailsModal","DetailsForm","saveWorkRequest","cookie","JSON","parse","Head","doneButton","onDone","button","transition","PageControls","longLabel","currentMedia","onDelete","addMediaRequest","deleteWorkRequest","screenState","faBringForward","faTrashAlt","addMedia","faPlusCircle","EditControls","rotateMediumRequest","faUndo","minHeight","imageHolder","pageNavDesktop","pageNavMobile","mediaNav","useMediaNav","previousPagesLength","mediaLength","setActiveMediaIndex","activeMediaIndex","useCallback","set","stringify","expires","meError","UserProvider","fetchMe","resolve","reject","SubscriptionProvider","EnvironmentLine","Router","basename","process","Header","activePage","Switch","ErrorBoundary","UserInspector","schoolRequired","appHolder","Route","exact","Work","PageNotFound","ToastContainer","ConfirmationDialog","updateFilters","now","FeedItemsReducer","combineReducers","createRequestReducer","createReducer","student_id","FEED_ITEMS:FETCH_REQUEST","FEED_ITEMS:FETCH_REQUEST_SUCCESS","schema","Entity","normalize","normalizeFeedItems","pa_action_feed_items","FEED_ITEMS:REJECT_WORK_REQUEST","FEED_ITEMS:APPROVE_WORK_REQUEST_SUCCESS","WorkUpload","WORK_UPLOAD:FETCH_REQUEST","WORK_UPLOAD:FETCH_REQUEST_SUCCESS","normalizeMedia","WORK_UPLOAD:ADD_MEDIA_REQUEST_SUCCESS","newState","WORK_UPLOAD:DELETE_MEDIA_REQUEST","WORK_UPLOAD:ROTATE_MEDIUM_REQUEST_SUCCESS","medium","WORK_UPLOAD:REORDER_MEDIA_REQUEST","Reducer","createStore","rootReducer","applyMiddleware","requestMiddleware","thunk","render","ReactDOM","PobbleStyles","App","document","getElementById","setTimeout"],"mappings":"2GAAAA,EAAOC,QAAU,IAA0B,yC,oBCA3CD,EAAOC,QAAU,IAA0B,uC,oBCA3CD,EAAOC,QAAU,IAA0B,yC,0HCO5BC,MAPA,CACbC,UAAW,CACTC,SAAU,QACVC,OAAQ,e,4FCMGC,UCTA,CACbH,UAAW,CACTI,OAAQ,OACRC,UAAW,iCACXC,WAAY,SACZC,gBAAiB,OACjBC,SAAU,WACVC,OAAQ,KACRC,QAAS,OACTC,QAAS,OACTC,eAAgB,kBDDLT,CAJEU,IAAA,IAAC,QAAEC,EAAO,UAAEC,KAAcC,GAAOH,EAAA,OAChDI,IAAAC,cAAA,MAAAC,OAAAC,OAAA,CAAKL,UAAWM,IAAWP,EAAQd,UAAWe,IAAgBC,M,8HEJzD,MAAMM,EAAkBC,GAC7BC,YAAUC,IAAI,8BAA+B,CAAEF,WAWpCG,EAA2BA,CAACC,EAAWJ,IAClDC,YAAUC,IAAI,mBAAmBE,kBAA2B,CAAEJ,WCRnDK,EAAiB,eAACC,EAAIC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GAAE,MAAM,CAC5CP,OAAQM,EACRI,cAAe,mBACfC,QAASA,IACPZ,EAAgB,IACXO,EACHM,QACE,wjCAIKC,EAAavB,IAAA,IAAC,OAAEwB,EAAM,cAAEC,EAAa,QAAEC,GAAS1B,EAAA,MAAM,CACjEU,OAAQ,CAAEc,SAAQC,iBAClBL,cAAe,yBACfC,QAASA,IDbkBM,EAACF,EAAeT,IAC3CL,YAAUiB,IAAI,wBAAwBH,WAAwBT,GCY/CW,CAAcF,EAAe,CAAEC,cAGnCG,EAAcC,IAAA,IAAC,OAAEN,EAAM,cAAEC,EAAa,KAAET,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AAKnY,MAGrBimB,GAET,mCAAoCC,CAACxmB,EAAK8R,KAAkB,IAAhB,OAAE1T,GAAQ0T,EACpD,MAAO,IACF9R,EACHI,OAAQJ,EAAMI,OAAOiG,OAAO/F,GAAMA,IAAOlC,EAAOkC,MAGpD,4CAA6CmmB,CAACzmB,EAAKwS,KAAoB,IAAlB,SAAEpC,GAAUoC,EAC/D,MAAO,IACFxS,EACHO,SAAU,CACRgZ,MAAO,IACFvZ,EAAMO,SAASgZ,MAClB,CAACnJ,EAAS1R,KAAKgoB,OAAOpmB,IAAK8P,EAAS1R,KAAKgoB,WAKjD,oCAAqCC,CAAC3mB,EAAKoV,KAAkB,IAAhB,OAAEhX,GAAQgX,EACrD,MAAM0K,EAAY,IAAK9f,EAAMO,SAASgZ,OAItC,OAHAnb,EAAOsgB,IAAIzP,QAAQ,CAAC3O,EAAI6a,KACtB2E,EAAUxf,GAAIyG,MAAQoU,IAEjB,IACFnb,EACHO,SAAU,CACRgZ,MAAOuG,SCzDF8G,OALCvB,aAAgB,CAC9BplB,kBACA6e,qB,mBCUF,MAAM3c,GAAQ0kB,aACZC,GACAC,aAAgBC,qBAAmBC,OAG/BC,GAASxpB,IAAsB,IAArB,GAAEwD,EAAE,QAAEyiB,GAASjmB,EAC7BypB,IAASD,OACPppB,IAAAC,cAACqf,IAAQ,CAACjb,MAAOA,IACfrE,IAAAC,cAACqpB,gBAAY,KACXtpB,IAAAC,cAACspB,GAAG,CAACnmB,GAAIA,EAAIyiB,QAASA,MAG1B2D,SAASC,eAAe,UAI5B9mB,GAAS,CACPzB,QACE,mMACD4C,KAAKC,GAAOqlB,GAAO,CAAEhmB,GAAIW,IAAQsF,GAAK+f,GAAO,CAAEvD,QAASxc,KAG3DqgB,WAAW,IAAM,kCAAuD,O","file":"static/js/main.24e1bfe2.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/duck-rocket.78bba211.gif\";","module.exports = __webpack_public_path__ + \"static/media/mountains.1ee7d773.png\";","module.exports = __webpack_public_path__ + \"static/media/duck-rocket.78bba211.gif\";","const styles = {\n container: {\n maxWidth: '500px',\n margin: '100px auto'\n }\n}\n\nexport default styles\n","import React from 'react'\nimport injectSheet from 'react-jss'\nimport styles from './page-head.styles'\nimport classNames from 'classnames'\n\nconst PageHead = ({ classes, className, ...props }) => (\n
\n)\n\nexport default injectSheet(styles)(PageHead)\n","export default {\n container: {\n height: '70px',\n boxShadow: '0 2px 4px 0 rgba(0, 0, 0, 0.1)',\n alignItems: 'center',\n backgroundColor: '#fff',\n position: 'relative',\n zIndex: '20',\n padding: '20px',\n display: 'flex',\n justifyContent: 'space-between'\n }\n}\n","import { apiClient } from 'pobble-components/dist/api'\n\nexport const apiGetFeedItems = params =>\n apiClient.get('/v3/me/pa_action_feed_items', { params })\n\nexport const apiGetFeedItem = (id, params) =>\n apiClient.get(`/v3/pa_action_feed_items/${id}`, { params })\n\nexport const apiRejectWork = (workVersionId, data) =>\n apiClient.put(`/v3/pa_work_versions/${workVersionId}/reject`, data)\n\nexport const apiApproveWork = (workVersionId, data) =>\n apiClient.put(`/v3/pa_work_versions/${workVersionId}/approve`, data)\n\nexport const apiGetStudentsPerSession = (sessionId, params) =>\n apiClient.get(`/v3/pa_sessions/${sessionId}/students_data`, { params })\n\nexport const apiCreateWork = (studentId, data, params) => {\n const formData = new FormData()\n Object.keys(data).forEach(key => formData.append(key, data[key]))\n return apiClient.post(`/v3/students/${studentId}/works`, formData, { params })\n}\n\nexport const apiGetPresentationAction = params =>\n apiClient.get(`/v3/pa_presentation_actions/current`, { params })\n\nexport const apiAddStudentsToSession = (sessionId, data, params) =>\n apiClient.post(`/v3/pa_sessions/${sessionId}/add_students`, data, { params })\n","import {\n apiGetFeedItems,\n apiRejectWork,\n apiApproveWork,\n apiAddStudentsToSession\n} from '../../common/api/pupil-activity'\n\nexport const fetchFeedItems = (data = {}) => ({\n params: data,\n requestPrefix: 'FEED_ITEMS:FETCH',\n request: () =>\n apiGetFeedItems({\n ...data,\n include:\n 'pa_action_feed_item.pa_action.presentation.names,pa_action_feed_item.pa_action.presentation.image,pa_session.timestamps,pa_action_feed_item.pa_action.pa_work_versions,pa_action_feed_item.pa_action.last_pa_work_version.work.media,pa_action_feed_item.pa_action.last_pa_work_version.work.medium.image,pa_action_feed_item.pa_action.last_pa_work_version.work.medium.details,pa_action_feed_item.pa_action.student.names,pa_action_feed_item.pa_action.student.avatar,pa_action_feed_item.pa_action.student.student_type.policy,pa_action_feed_item.pa_action.pa_session.details,pa_action_feed_item.pa_action.last_pa_work_version.success_criteria,pa_action_feed_item.pa_action.last_pa_work_version.work.medium.pa_highlight_canva.data,pa_action_feed_item.pa_action.pa_reviews,pa_action_feed_item.pa_action.pa_review.type,pa_action_feed_item.pa_action.pa_review.pa_review_comments,pa_action_feed_item.pa_action.pa_review.pa_review_comment.content,pa_action_feed_item.pa_action.pa_review.pa_review_comment.author.names,pa_action_feed_item.pa_action.pa_review.pa_review_comment.author.avatar'\n })\n})\n\nexport const rejectWork = ({ feedId, workVersionId, comment }) => ({\n params: { feedId, workVersionId },\n requestPrefix: 'FEED_ITEMS:REJECT_WORK',\n request: () => apiRejectWork(workVersionId, { comment })\n})\n\nexport const approveWork = ({ feedId, workVersionId, data }) => ({\n params: { feedId, workVersionId, data },\n requestPrefix: 'FEED_ITEMS:APPROVE_WORK',\n request: () => apiApproveWork(workVersionId, data)\n})\n\nexport const addStudentsToSession = (sessionId, studentIds) => ({\n requestPrefix: 'FEED_ITEMS:ADD_STUDENTS_TO_SESSION',\n request: () => apiAddStudentsToSession(sessionId, { account_ids: studentIds })\n})\n","import { createSelector } from 'reselect'\n\nexport const getFeedItemsState = state => state.FeedItemsStore\nconst getData = state => getFeedItemsState(state).data\n\nconst getFeedItems = state => {\n const stateNow = getFeedItemsState(state)\n return !stateNow.data ? {} : stateNow.data.entities.items\n}\n\nexport const getFeedItemsList = createSelector(\n [getData],\n data => (!data ? null : data.result.map(id => data.entities.items[id]))\n)\n\nexport const getLastWorkVersion = (state, itemId) => {\n const feedItems = getFeedItems(state)\n const item = feedItems[itemId]\n if (!item) return null\n return item.pa_action.pa_work_versions[\n item.pa_action.pa_work_versions.length - 1\n ]\n}\n","import { apiClient } from 'pobble-components/dist/api'\n\nconst apiGetMe = params => apiClient.get('v3/me', { params })\n\nexport { apiGetMe }\n","import { apiClient } from 'pobble-components/dist/api'\n\nconst apiGetSchool = (id, params) =>\n apiClient.get(`/v3/schools/${id}`, { params })\n\nexport { apiGetSchool }\n","import React, { useEffect, useState, useMemo, Fragment } from 'react'\nimport injectSheet from 'react-jss'\nimport styles, {\n groupSelectorStyles,\n groupsFilterStyles\n} from './pupil-selector.styles'\nimport Spinner from 'pobble-components/dist/spinner'\nimport { useMe } from 'pobble-components/dist/pobble-user'\nimport { apiGetSchool } from '../../common/api/school'\nimport { errorHandler } from 'pobble-components/dist/error-handler'\nimport { Table, TableRow, HeadCell, Cell } from 'pobble-components/dist/table'\nimport AgeGroup from 'pobble-components/dist/age-group'\nimport FormFile from 'pobble-components/dist/form-elements/form-file'\nimport Button from 'pobble-components/dist/button'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faUpload } from '@fortawesome/pro-solid-svg-icons/faUpload'\nimport { faSearch } from '@fortawesome/pro-solid-svg-icons/faSearch'\nimport { PobbleAvatar } from 'pobble-components/dist/pobble-avatar'\nimport FormInput from 'pobble-components/dist/form-elements/form-input'\nimport orderBy from 'lodash/orderBy'\nimport {\n GroupsSelectionProvider,\n GroupsSelection\n} from 'pobble-components/dist/groups-selection'\nimport {\n Modal,\n ModalHeader,\n ModalContent,\n ModalFooter\n} from 'pobble-components/dist/modal'\nimport CircleStatus from 'pobble-components/dist/circle-status'\nimport NoItemsPlaceholder from 'pobble-components/dist/no-items-placeholder'\nimport { URLS } from 'pobble-components/dist/setup'\nimport Tooltip from 'pobble-components/dist/tooltip'\n\nconst GroupsSelector = injectSheet(groupSelectorStyles)(\n ({ classes, onFilter, requestClose, selectedGroups }) => {\n const { me } = useMe()\n\n const school = me.account.teacher_type.school\n\n const [data, setData] = useState(null)\n\n useEffect(\n () => {\n apiGetSchool(school.id, {\n include:\n 'school.groups,school.group.names,school.group.visibility,school.group.counters,school.group.category,school.group_categories'\n })\n .catch(errorHandler)\n .then(res => setData(res.data.school))\n },\n [school.id]\n )\n\n return (\n \n {store => (\n <>\n \n {data && }\n {!data && (\n
\n \n
\n )}\n
\n \n \n {\n requestClose()\n onFilter(store.selectedGroups)\n }}>\n Select groups\n \n \n \n )}\n \n )\n }\n)\n\nconst GroupsFilter = injectSheet(groupsFilterStyles)(\n ({ selectedGroups, onFilter, classes }) => {\n const [modalOpen, setModalOpen] = useState(false)\n\n const selectedGroupsLength = Object.keys(selectedGroups).length\n\n return (\n <>\n
\n {!selectedGroupsLength && (\n \n )}\n {!!selectedGroupsLength && (\n
    \n
  • \n \n {selectedGroupsLength} group\n {selectedGroupsLength > 1 && 's'} selected\n \n
  • \n
  • \n \n
  • \n
  • \n \n
  • \n
\n )}\n
\n setModalOpen(false)}>\n Select groups\n setModalOpen(false)}\n onFilter={onFilter}\n />\n \n \n )\n }\n)\n\nconst PupilSelector = ({ classes, onUpload }) => {\n const { me } = useMe()\n const school = me.account.teacher_type.school\n const [pupils, setPupils] = useState(null)\n const [searchString, setSearchString] = useState('')\n const [sort, setSort] = useState({ key: 'name', direction: 'asc' })\n const [selectedGroups, setSelectedGroups] = useState({})\n\n useEffect(\n () => {\n apiGetSchool(school.id, {\n include:\n 'school.student_types,school.student_type.account.names,school.student_type.year_group.order,school.student_type.year_group.names,school.student_type.groups,school.student_type.group.names,school.student_type.account.avatar,school.student_type.policy'\n })\n .catch(errorHandler)\n .then(res => setPupils(res.data.school.student_types))\n },\n [school.id]\n )\n\n const pupilsFilteredByGroups = useMemo(\n () => {\n if (!pupils) return null\n const groupIds = Object.keys(selectedGroups)\n if (!groupIds.length) return pupils\n return pupils.filter(pupil => {\n return !!pupil.groups.filter(group => selectedGroups[group.id]).length\n })\n },\n [pupils, selectedGroups]\n )\n\n const pupilsFilteredBySearch = useMemo(\n () => {\n if (!pupilsFilteredByGroups) return null\n return pupilsFilteredByGroups.filter(\n pupil =>\n pupil.account.full_name\n .toLowerCase()\n .indexOf(searchString.toLowerCase()) !== -1\n )\n },\n [pupilsFilteredByGroups, searchString]\n )\n\n const sortedPupils = useMemo(\n () => {\n if (!pupilsFilteredBySearch) return null\n return sort.key === 'name'\n ? orderBy(pupilsFilteredBySearch, pupil => pupil.account.full_name, [\n sort.direction\n ])\n : sort.key === 'age'\n ? orderBy(pupilsFilteredBySearch, pupil => pupil.year_group.order, [\n sort.direction\n ])\n : pupilsFilteredBySearch\n },\n [pupilsFilteredBySearch, sort]\n )\n\n const resultingPupils = sortedPupils\n\n return (\n
\n
\n \n
\n setSearchString(e.target.value)}\n id=\"search\"\n placeholder=\"Type a pupil's name\"\n />\n \n
\n
\n
\n {!pupils && (\n
\n \n
\n )}\n {!!pupils &&\n !resultingPupils.length && (\n \n {!!pupils.length ? (\n \n

\n We searched everywhere\n
\n There are no pupils matching this criteria\n

\n {\n setSelectedGroups({})\n setSearchString('')\n }}\n simple>\n Clear filters\n \n
\n ) : (\n \n

You don’t have any pupils in your school yet

\n \n
\n )}\n
\n )}\n {!!pupils &&\n !!resultingPupils.length && (\n \n \n \n setSort({ key: 'name', direction })}>\n Name\n \n setSort({ key: 'age', direction })}>\n Year\n \n \n Permission\n \n \n \n \n \n {resultingPupils.map(pupil => {\n return (\n \n \n
\n \n {pupil.account.full_name}\n
\n
\n \n \n \n \n \n \n \n {!pupil.year_group ? (\n \n }>\n Upload\n \n \n ) : (\n {\n onUpload({\n files,\n pupilId: pupil.account.id\n })\n }}\n accept=\"image/jpeg, image/png, .pdf\">\n }>\n Upload\n \n \n )}\n \n
\n )\n })}\n \n
\n )}\n
\n
\n )\n}\n\nexport default injectSheet(styles)(PupilSelector)\n","export const groupsFilterStyles = ({ COLORS }) => ({\n container: {\n marginBottom: '5px',\n '& button': {\n fontWeight: 'normal'\n }\n },\n groupsInfo: {\n listStyle: 'none',\n padding: '0',\n margin: '0',\n color: COLORS.TEXT.DARK_GREY.NORMAL,\n display: 'flex',\n alignItems: 'center',\n '& strong': {\n lineHeight: '2'\n },\n '& li': {\n paddingLeft: '24px',\n position: 'relative',\n '&:after': {\n content: '\"\"',\n width: '4px',\n height: '4px',\n borderRadius: '4px',\n background: '#ddd',\n position: 'absolute',\n left: '10px',\n top: '12px'\n },\n '&:first-child': {\n padding: '0',\n '&:after': {\n display: 'none'\n }\n }\n }\n }\n})\n\nexport const groupSelectorStyles = {\n content: {\n padding: '0',\n height: '366px'\n },\n pending: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: '100%'\n }\n}\n\nexport default {\n filters: {\n background: '#f8f8f8',\n padding: '25px 20px'\n },\n search: {\n display: 'flex',\n '& input': {\n borderRadius: '4px 0 0 4px',\n borderRight: 'none'\n },\n '& button': {\n height: '100%',\n borderRadius: '0 4px 4px 0',\n padding: '7px 14px'\n }\n },\n pupils: {\n height: '400px',\n overflow: 'auto',\n padding: '0 0 20px'\n },\n pending: {\n height: '100%',\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n table: {\n '& tr th': {\n display: 'none',\n '&:first-child': {\n paddingLeft: '20px',\n width: '44px',\n display: 'table-cell'\n },\n '&:last-child': {\n display: 'table-cell',\n width: '20px'\n },\n '@media (min-width: 451px)': {\n display: 'table-cell'\n }\n },\n '& tr td': {\n display: 'none',\n '&:first-child': {\n display: 'table-cell',\n paddingLeft: '20px'\n },\n '&:last-child': {\n display: 'table-cell',\n paddingRight: '20px'\n },\n '@media (min-width: 451px)': {\n display: 'table-cell'\n }\n }\n },\n yearHCell: {\n width: '90px'\n },\n permissionHCell: {\n width: '110px'\n },\n pupilName: {\n display: 'flex',\n alignItems: 'center'\n },\n avatar: {\n fontSize: '32px',\n marginRight: '10px',\n flexShrink: '0'\n },\n uploadButton: {\n '& span': {\n display: 'none',\n '@media (min-width: 451px)': {\n display: 'inline'\n }\n },\n '& > div': {\n margin: '0 !important',\n '@media (min-width: 451px)': {\n margin: '0 6px 0 -2px !important'\n }\n }\n }\n}\n","import { ModalContent, ModalFooter } from 'pobble-components/dist/modal'\nimport React, { useState } from 'react'\nimport injectSheet from 'react-jss'\nimport FormLabel from 'pobble-components/dist/form-elements/form-label'\nimport FormTextArea from 'pobble-components/dist/form-elements/form-text-area'\nimport FormInput from 'pobble-components/dist/form-elements/form-input'\nimport FormRadio from 'pobble-components/dist/form-elements/form-radio'\nimport Button from 'pobble-components/dist/button'\nimport ButtonElement from 'pobble-components/dist/button-element'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faCaretDown } from '@fortawesome/pro-solid-svg-icons/faCaretDown'\nimport { faCaretUp } from '@fortawesome/pro-solid-svg-icons/faCaretUp'\nimport { faInfoCircle } from '@fortawesome/pro-solid-svg-icons/faInfoCircle'\nimport { faCircle } from '@fortawesome/pro-regular-svg-icons/faCircle'\nimport { faCheckCircle } from '@fortawesome/pro-solid-svg-icons/faCheckCircle'\nimport { faTimesCircle } from '@fortawesome/pro-solid-svg-icons/faTimesCircle'\nimport Tooltip from 'pobble-components/dist/tooltip'\nimport {\n useFeatureCounter,\n SubsCrown\n} from 'pobble-components/dist/subscriptions'\n\nconst FormControl = injectSheet({\n container: {\n position: 'relative',\n '& input': {\n appearance: 'none',\n position: 'absolute',\n backgroundColor: '#fff',\n margin: 0,\n '& + *': {\n height: '100%',\n cursor: 'pointer',\n border: '1px solid #ddd',\n padding: '16px',\n borderRadius: '4px',\n display: 'flex',\n alignItems: 'center',\n flexDirection: 'column',\n position: 'relative',\n '& $checkIcon:first-child': {\n display: 'none'\n }\n },\n '&:checked + *': {\n borderColor: 'var(--blue)',\n background: '#f5fcff',\n '& $checkIcon': {\n color: 'var(--blue)',\n '&:first-child': {\n display: 'block'\n },\n '&:last-child': {\n display: 'none'\n }\n }\n },\n '&:disabled + *': {\n backgroundColor: 'var(--light-gray--)'\n }\n }\n },\n checkIcon: {\n position: 'absolute',\n right: '8px',\n top: '8px',\n color: '#ddd',\n fontSize: '16px'\n }\n})(function FormControl({ classes, children, THEME, hideIcon, ...props }) {\n return (\n \n )\n}, [])\n\nconst styles = ({ COLORS }) => ({\n content: {\n padding: '0',\n fontSize: '14px',\n '& section': {\n padding: '2em 1.43em',\n borderTop: '1px solid #ececec',\n alignItems: 'center',\n '&:first-child': {\n border: 'none'\n }\n },\n '& sup': {\n color: COLORS.RED.NORMAL\n }\n },\n commentHint: {\n display: 'none',\n '@media (min-width: 575px)': {\n display: 'inline'\n }\n },\n infoSection: {\n '& > *': {\n marginTop: '2em',\n '&:first-child': {\n marginTop: '0'\n }\n }\n },\n staButton: {\n color: COLORS.TEXT.LIGHT_GREY.NORMAL,\n display: 'flex',\n alignItems: 'center',\n marginTop: '30px',\n '& svg': {\n marginLeft: '6px'\n }\n },\n staChoices: {\n listStyle: 'none',\n padding: '0',\n margin: '0 0 20px',\n display: 'flex',\n '& li': {\n marginRight: '20px'\n },\n '& label': {\n display: 'flex',\n alignItems: 'center',\n '& span': {\n marginRight: '5px'\n }\n }\n },\n staDescription: {\n margin: '20px 0',\n '& a': {\n color: COLORS.TEXT.LIGHT_GREY.NORMAL\n }\n },\n publishChoices: {\n display: 'grid',\n gridTemplateColumns: '1fr',\n gap: '16px',\n '@media (min-width: 768px)': {\n gridTemplateColumns: '1fr 1fr',\n '& > *': {\n height: '100%'\n }\n }\n },\n publishChoice: {\n color: 'var(--gray--)',\n '& svg': {\n color: 'var(--gray---)',\n margin: '1px 12px 0 0'\n },\n '& > span': {\n display: 'block',\n margin: '4px 0',\n '&:first-child': {\n fontWeight: 'bold',\n margin: '0 0 12px',\n font: 'var(--heading--)',\n color: 'var(--gray-)'\n }\n }\n },\n publishPoint: {\n display: 'flex !important'\n },\n commentSection: {\n marginTop: '24px'\n },\n publishCrown: {\n position: 'absolute',\n right: '8px',\n top: '8px',\n fontSize: '14px'\n }\n})\n\nconst WorkForm = injectSheet(styles)(\n ({\n classes,\n defaultValues,\n canPublish,\n pupilName,\n pupilId,\n onCancel,\n submitButton,\n onSubmit\n }) => {\n const [publish, setPublish] = useState(false)\n const [comment, setComment] = useState('')\n const [title, setTitle] = useState(defaultValues.title)\n const [tags, setTags] = useState('')\n const [showSta, setShowSta] = useState(false)\n const [sta, setSta] = useState(null)\n const [staExtraInfo, setStaExtraInfo] = useState('')\n const [description, setDescription] = useState(defaultValues.description)\n const workState = publish ? 'published' : 'evidence_bank'\n\n const [incrementPublishWorkCounter, publishWorkSP] = useFeatureCounter(\n 'WorkPublishing',\n sp => sp.publish_work\n )\n\n return (\n {\n e.preventDefault()\n onSubmit({\n workState,\n title,\n description: description || null,\n comment: comment || null,\n sta:\n !showSta || !sta\n ? null\n : {\n value: sta,\n extraInfo: sta !== 'in_part' ? null : staExtraInfo\n },\n tags: tags\n .split(',')\n .map(tag => tag.trim())\n .filter(tag => !!tag)\n }).then(() => {\n if (workState === 'published') {\n incrementPublishWorkCounter()\n }\n })\n }}>\n \n
\n
\n setPublish(false)}>\n \n Save to evidence bank\n \n \n Saved to pupil's evidence bank and accesible for moderation.\n \n \n \n \n Not published on school celebration page.\n \n \n \n \n \n publishWorkSP.restricted\n ? publishWorkSP.showDialog()\n : setPublish(true)\n }>\n {publishWorkSP.restricted && (\n \n )}\n \n Save and publish\n \n \n Saved to pupil's evidence bank and accesible for moderation.\n \n \n \n Published on school celebration page.\n \n \n \n
\n {publish && (\n
\n \n \n \n Leave a public comment on {pupilName}\n 's work\n \n \n \n setComment(e.currentTarget.value)}\n />\n
\n )}\n
\n
\n
\n \n \n Title\n *\n \n \n setTitle(e.currentTarget.value)}\n />\n
\n
\n \n Description\n \n setDescription(e.currentTarget.value)}\n />\n
\n
\n \n Tags\n \n setTags(e.currentTarget.value)}\n />\n
\n
\n setShowSta(!showSta)}\n className={classes.staButton}>\n Set STAs independent writing criteria (optional){' '}\n \n \n {showSta && (\n <>\n

\n Does this piece meet the STAs independent writing criteria?{' '}\n \n \n \n \n \n

\n
    \n
  • \n \n
  • \n
  • \n \n
  • \n
  • \n \n
  • \n
\n {sta === 'in_part' && (\n setStaExtraInfo(e.target.value)}\n placeholder=\"e.g. First paragraph shared writing\"\n />\n )}\n \n )}\n
\n
\n
\n \n \n {submitButton}\n \n \n )\n }\n)\n\nexport default WorkForm\n","import { apiClient } from 'pobble-components/dist/api'\n\nexport const apiCreateMedium = (id, data, params) => {\n const formData = new FormData()\n Object.keys(data).forEach(key => formData.append(key, data[key]))\n return apiClient.post(`/v3/works/${id}/media`, formData, {\n params\n })\n}\n\nexport const apiDeleteMedia = id => apiClient.delete(`/v3/media/${id}`)\n\nexport const apiGetWork = (id, params) =>\n apiClient.get(`/v3/works/${id}`, { params })\n\nexport const apiDeleteWork = id => apiClient.delete(`/v3/works/${id}`)\n\nexport const apiRotateMedium = (id, data, params) =>\n apiClient.put(`/v3/media/${id}/rotate`, data, { params })\n\nexport const apiUpdateWork = (id, data, params) =>\n apiClient.put(`/v3/works/${id}`, data, { params })\n\nexport const apiReorderMedia = (id, data) =>\n apiClient.put(`/v3/works/${id}/reorder_media`, data)\n","import { errorHandler } from 'pobble-components/dist/error-handler'\nimport { useState } from 'react'\nimport { useHistory } from 'react-router-dom'\nimport { apiCreateWork } from '../common/api/pupil-activity'\nimport { apiCreateMedium, apiDeleteWork } from '../common/api/work'\n\nexport const useWorkUpload = () => {\n const [uploadingWork, setUploadingWork] = useState(false)\n const history = useHistory()\n\n const uploadWork = (pupilId, files) => {\n setUploadingWork(true)\n return apiCreateWork(pupilId, { image: files[0] })\n .then(res => {\n if (files.length > 1) {\n return Promise.all(\n files.slice(1, files.length).map(file => {\n return apiCreateMedium(res.data.work.id, {\n image: file\n })\n })\n )\n .then(() => {\n setUploadingWork(false)\n history.push(`/work/${res.data.work.id}`)\n })\n .catch(e => {\n setUploadingWork(false)\n if (e.response.status === 400) {\n apiDeleteWork(res.data.work.id)\n }\n errorHandler(e)\n })\n } else {\n setUploadingWork(false)\n history.push(`/work/${res.data.work.id}`)\n }\n })\n .catch(e => {\n setUploadingWork(false)\n errorHandler(e)\n })\n }\n\n return {\n uploadingWork,\n uploadWork\n }\n}\n","import React, {\n createContext,\n useContext,\n useEffect,\n useMemo,\n useState\n} from 'react'\nimport injectSheet from 'react-jss'\nimport PageHead from '../../page-head/page-head'\nimport Button from 'pobble-components/dist/button'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faPlus } from '@fortawesome/pro-solid-svg-icons/faPlus'\nimport { faCaretCircleLeft } from '@fortawesome/pro-solid-svg-icons/faCaretCircleLeft'\nimport { faCaretCircleRight } from '@fortawesome/pro-solid-svg-icons/faCaretCircleRight'\nimport { faPaperPlane } from '@fortawesome/pro-solid-svg-icons/faPaperPlane'\nimport { faCheck } from '@fortawesome/pro-solid-svg-icons/faCheck'\nimport { faFilter } from '@fortawesome/pro-solid-svg-icons/faFilter'\nimport { faFileAlt } from '@fortawesome/pro-regular-svg-icons/faFileAlt'\nimport { faFile } from '@fortawesome/pro-regular-svg-icons/faFile'\nimport { faClipboardCheck } from '@fortawesome/pro-regular-svg-icons/faClipboardCheck'\nimport { faClipboard } from '@fortawesome/pro-regular-svg-icons/faClipboard'\nimport { useDispatch, useSelector } from 'react-redux'\nimport {\n fetchFeedItems,\n rejectWork,\n approveWork,\n addStudentsToSession\n} from '../../../stores/feed-items/feed-items.actions'\nimport {\n getFeedItemsList,\n getFeedItemsState\n} from '../../../stores/feed-items/feed-items.selectors'\nimport classNames from 'classnames'\nimport {\n Modal,\n ModalHeader,\n ModalContent,\n ModalFooter\n} from 'pobble-components/dist/modal'\nimport { errorHandler } from 'pobble-components/dist/error-handler'\nimport FormLabel from 'pobble-components/dist/form-elements/form-label'\nimport FormSelect from 'pobble-components/dist/form-elements/form-select'\nimport FormCheckbox from 'pobble-components/dist/form-elements/form-checkbox'\nimport FormTextArea from 'pobble-components/dist/form-elements/form-text-area'\nimport { toast } from 'pobble-components/dist/toast'\nimport { PobbleAvatar } from 'pobble-components/dist/pobble-avatar'\nimport duckRocket from './duck-rocket.gif'\nimport Spinner from 'pobble-components/dist/spinner'\nimport { apiGetMe } from '../../../common/api/profile'\nimport { format } from 'date-fns'\nimport Bone from 'pobble-components/dist/bone'\nimport {\n apiGetStudentsPerSession,\n apiGetPresentationAction\n} from '../../../common/api/pupil-activity'\nimport mountains from './mountains.png'\nimport PupilSelectorUpload from '../../pupil-selector/pupil-selector'\nimport { useHistory, useRouteMatch } from 'react-router-dom'\nimport PobbleLink from 'pobble-components/dist/pobble-link'\nimport { usePrevious } from 'pobble-components/dist/utils'\nimport { URLS } from 'pobble-components/dist/setup'\nimport ButtonElement from 'pobble-components/dist/button-element'\nimport PupilSelector from 'pobble-components/dist/pupil-selector'\nimport WorkForm from '../../work-form/work-form'\nimport { MediaLoader } from 'pobble-components/dist/work'\nimport { WorkHighlighter } from 'pobble-components/dist/work/highlighter'\nimport {\n useWorkReviews,\n WorkReviews\n} from 'pobble-components/dist/work/reviews'\nimport { fullVHExceptHeader } from 'pobble-components/dist/jss-mixins'\nimport { openConfirmationDialog } from 'pobble-components/dist/modal/confirmation-dialog'\nimport { useWorkUpload } from '../../../hooks/work'\n\nexport const directUploadStyles = {\n content: {\n padding: '0',\n '@media (min-width: 575px)': {\n minWidth: '700px'\n }\n }\n}\n\nconst DirectUploadModal = injectSheet(directUploadStyles)(\n ({ classes, onUpload, ...props }) => {\n return (\n \n Upload work\n \n \n \n \n )\n }\n)\n\nconst studentItemStyles = ({ COLORS }) => ({\n student: {\n width: '100%',\n background: 'none',\n border: 'none',\n borderRadius: '0',\n padding: '12px 20px',\n boxShadow: 'none',\n borderBottom: '1px solid #ececec',\n textAlign: 'left',\n display: 'flex',\n alignItems: 'center',\n color: COLORS.TEXT.LIGHT_GREY.NORMAL,\n '@media (min-width: 813px)': {\n cursor: 'pointer',\n '&:hover': {\n color: COLORS.BLUE.NORMAL\n }\n }\n },\n active: {\n position: 'relative',\n '&:before': {\n position: 'absolute',\n left: '0',\n top: '0',\n background: COLORS.BLUE.NORMAL,\n content: '\"\"',\n height: '100%',\n width: '10px',\n marginRight: '10px'\n },\n '@media (min-width: 813px)': {\n cursor: 'default',\n '&:hover': {\n color: COLORS.TEXT.LIGHT_GREY.NORMAL\n }\n }\n },\n stats: {\n marginLeft: 'auto',\n color: '#999',\n display: 'flex',\n fontSize: '18px',\n '& > *': {\n marginLeft: '.6em'\n }\n },\n disabledStat: {\n color: '#ddd'\n },\n evidenceBank: {\n color: COLORS.PURPLE.NORMAL\n },\n published: {\n color: COLORS.GREEN.NORMAL\n },\n worksCount: {\n position: 'relative',\n '& > span': {\n position: 'absolute',\n top: '100%',\n width: '100%',\n left: '0',\n fontSize: '.5em',\n textAlign: 'center',\n marginTop: '.1em'\n }\n },\n studentAvatar: {\n fontSize: '32px',\n marginRight: '10px',\n flexShrink: '0'\n }\n})\n\nconst StudentItem = injectSheet(studentItemStyles)(\n ({ as = 'button', active, classes, student, ...props }) => {\n const Component = as\n return (\n \n \n {student.full_name}\n
\n
\n \n {!!student.work_versions_count && (\n {student.work_versions_count}\n )}\n
\n \n \n
\n
\n \n )\n }\n)\n\nconst filterStyles = ({ COLORS }) => ({\n container: {\n background: '#fff',\n '@media (min-width: 813px)': {\n height: '100%',\n display: 'flex',\n flexDirection: 'column'\n }\n },\n sessionsSelectSection: {\n padding: '20px',\n borderBottom: '1px solid #ececec',\n fontSize: '14px',\n '& h2': {\n fontSize: '1.51em',\n lineHeight: '1.2',\n display: 'none',\n margin: '.5em 0 .6em',\n '@media (min-width: 813px)': {\n display: 'block'\n }\n }\n },\n sessionSelectSkeleton: {\n height: '40px',\n borderRadius: '4px'\n },\n studentsList: {\n '@media (min-width: 813px)': {\n flex: '1',\n overflow: 'auto'\n }\n },\n student: {\n width: '100%',\n padding: '12px 20px',\n borderBottom: '1px solid #ececec',\n display: 'flex',\n alignItems: 'center'\n },\n skeletonAvatar: {\n flexShrink: '0',\n width: '32px',\n height: '32px',\n borderRadius: '100%',\n marginRight: '10px'\n },\n skeletonName: {\n width: '120px'\n },\n backButton: {\n margin: '20px 0 20px 20px'\n },\n addStudent: {\n padding: '20px',\n borderBottom: '1px solid #ececec',\n '@media (min-width: 575px)': {\n border: 'none'\n },\n '& button': {\n textDecoration: 'underline',\n color: COLORS.TEXT.LIGHT_GREY.NORMAL\n }\n }\n})\n\nconst Filter = injectSheet(filterStyles)(({ classes }) => {\n const { filters } = useSelector(state => getFeedItemsState(state))\n const dispatch = useDispatch()\n const [sessionsList, setSessionsList] = useState(null)\n const lastUpdate = usePrevious(filters.updateAfter)\n const [pupilSelectorOpened, setPupilSelectorOpened] = useState(false)\n const sessionsListFormatted = useMemo(\n () =>\n sessionsList &&\n sessionsList.map(session => ({\n ...session,\n dateFormat: format(new Date(session.accessible_at), 'MMM dd')\n })),\n [sessionsList]\n )\n\n const sessionListMapped = useMemo(\n () => {\n if (!sessionsListFormatted) return {}\n const result = {}\n sessionsListFormatted.forEach(session => (result[session.id] = session))\n return result\n },\n [sessionsListFormatted]\n )\n\n const selectedSession = useMemo(\n () => {\n return sessionListMapped[filters.session_id]\n },\n [sessionListMapped, filters.session_id]\n )\n\n const [studentsPerSession, setStudentsPerSession] = useState(null)\n\n const studentsPerSessionMap = useMemo(\n () => {\n if (!Array.isArray(studentsPerSession)) return {}\n const result = {}\n studentsPerSession.forEach(student => (result[student.id] = true))\n return result\n },\n [studentsPerSession]\n )\n\n const { selectedStudentState, setSelectedStudentState } = useContext(\n FeedContext\n )\n\n const selectedStudent = useMemo(\n () => {\n if (!selectedStudentState.studentId) return null\n return studentsPerSession.filter(\n student => student.id === selectedStudentState.studentId\n )[0]\n },\n [selectedStudentState, studentsPerSession]\n )\n\n // Fetch sessions\n useEffect(() => {\n apiGetMe({ include: 'account.pa_sessions,account.pa_session.details' })\n .catch(errorHandler)\n .then(res =>\n setSessionsList(res.data.account.pa_sessions.reverse().slice(0, 50))\n )\n }, [])\n\n // Fetch students per session and filter feed\n useEffect(\n () => {\n if (!filters.session_id) {\n setStudentsPerSession(null)\n } else {\n setStudentsPerSession('pending')\n apiGetStudentsPerSession(filters.session_id, {\n include: 'account.names,account.avatar'\n }).then(res => setStudentsPerSession(res.data.students_data))\n }\n },\n [filters.session_id]\n )\n\n // Update student stats when the work rejected or approved\n useEffect(\n () => {\n if (lastUpdate) {\n apiGetStudentsPerSession(filters.session_id, {\n include: 'account.names,account.avatar'\n }).then(res => setStudentsPerSession(res.data.students_data))\n }\n },\n [filters.updateAfter] // eslint-disable-line\n )\n\n return (\n
\n
\n

Filter by...

\n {!sessionsListFormatted && (\n \n )}\n {sessionsListFormatted && (\n {\n dispatch(\n fetchFeedItems(\n e.target.value !== 'all' && {\n session_id: e.target.value\n }\n )\n ).catch(errorHandler)\n }}>\n \n {sessionsListFormatted.map(session => (\n \n ))}\n \n )}\n
\n
\n {selectedStudent && (\n
\n \n setSelectedStudentState({ studentId: null, sessionId: null })\n }\n className={classes.backButton}\n bleed\n back\n simple>\n Back\n \n \n
\n )}\n {!selectedStudent && (\n <>\n {studentsPerSession &&\n studentsPerSession === 'pending' && (\n
\n {[...Array(4).keys()].map(i => (\n
\n \n \n
\n ))}\n
\n )}\n {studentsPerSession &&\n studentsPerSession !== 'pending' && (\n <>\n {studentsPerSession.map(student => {\n return (\n \n setSelectedStudentState({\n studentId: student.id,\n sessionId: filters.session_id\n })\n }\n />\n )\n })}\n {selectedSession &&\n !selectedSession.student_solo_session && (\n
\n setPupilSelectorOpened(true)}>\n Add students\n \n
\n )}\n {\n dispatch(\n addStudentsToSession(filters.session_id, pupilIds)\n ).catch(errorHandler)\n }}\n exclude={studentsPerSessionMap}\n isOpen={pupilSelectorOpened}\n requestClose={() => setPupilSelectorOpened(false)}\n />\n \n )}\n \n )}\n
\n
\n )\n})\n\nconst successModalStyles = {\n content: {\n display: 'flex',\n alignItems: 'center',\n flexDirection: 'column',\n fontSize: '14px',\n lineHeight: '1.2',\n textAlign: 'center',\n minWidth: 'auto',\n maxWidth: 'calc(100vw - 40px)',\n width: '30em',\n padding: '2em',\n '& img': {\n margin: '0 0 2em',\n width: '12.5em',\n height: '12.5em'\n },\n '& h3': {\n fontSize: '1.57em',\n margin: '0 0 1em'\n },\n '& p': {\n margin: '0'\n },\n '& button': {\n margin: '2em 0 1em'\n }\n }\n}\n\nconst SuccessModal = injectSheet(successModalStyles)(\n ({ classes, data, ...props }) => {\n return (\n \n {data && (\n \n \"Duck\n

And away they go

\n {data.workState === 'published' && (\n

\n The work is now published on Pobble.\n
\n Your pupil will be so excited!\n

\n )}\n {data.workState === 'evidence_bank' && (\n

\n The work is now saved on the\n
\n evidence bank.\n

\n )}\n \n
\n )}\n
\n )\n }\n)\n\nconst ApproveModal = ({ classes, data, ...props }) => {\n return !data ? null : (\n \n \n \n )\n}\n\nconst ApproveForm = ({ data, showSuccessModal, requestClose }) => {\n const dispatch = useDispatch()\n const { approveWorkRequest } = useSelector(state => getFeedItemsState(state))\n const mapProps = useMemo(\n () => {\n if (!data) return {}\n const session = data.pa_action.pa_session\n const student = data.pa_action.student\n return {\n pupilId: student.id,\n pupilName: student.first_name,\n canPublish: student.student_type.policy.can_publish,\n defaultValues: {\n title: session.title || '',\n description: session.description || ''\n },\n onSubmit: fields => {\n const payload = {\n state: fields.workState,\n work_title: fields.title,\n work_description: fields.description,\n comment_on_work: fields.comment,\n work_tags: fields.tags\n }\n if (fields.sta) payload.independent = fields.sta.value\n if (fields.sta && fields.sta.extraInfo)\n payload.independent_description = fields.sta.extraInfo\n return dispatch(\n approveWork({\n workVersionId: data.pa_action.last_pa_work_version.id,\n feedId: data.id,\n data: payload\n })\n )\n .then(() => showSuccessModal({ workState: fields.workState }))\n .catch(errorHandler)\n }\n }\n },\n [data, dispatch, showSuccessModal]\n )\n return (\n }>\n Approve writing\n \n }\n />\n )\n}\n\nconst SendBackForm = ({ data, requestClose }) => {\n const feedId = data.id\n const workVersionId = data.pa_action.last_pa_work_version.id\n const pupilName = data.pa_action.student.first_name\n const dispatch = useDispatch()\n const [comment, setComment] = useState('')\n const { rejectWorkRequest } = useSelector(state => getFeedItemsState(state))\n return (\n {\n e.preventDefault()\n dispatch(rejectWork({ feedId, workVersionId, comment }))\n .catch(errorHandler)\n .then(() => {\n toast.success(`Work has been sent back to ${pupilName}`)\n requestClose()\n })\n }}>\n \n
\n \n Add a comment\n  (only {pupilName} will see this)\n \n setComment(e.currentTarget.value)}\n placeholder=\"e.g. This photo is blurry\"\n />\n
\n
\n \n \n }\n tall\n type=\"submit\">\n Send back\n \n \n \n )\n}\n\nconst SendBackModal = ({ classes, data, ...props }) => {\n return (\n \n Send back\n \n \n )\n}\n\nconst mediaPageNavStyles = ({ COLORS }) => ({\n container: {\n display: 'flex',\n alignItems: 'center',\n fontSize: '20px',\n color: '#fff',\n '& button': {\n cursor: 'pointer',\n color: '#fff',\n padding: '0',\n border: 'none',\n background: 'none',\n fontSize: '1.6em',\n '&:active': {\n color: COLORS.GREEN.NORMAL\n }\n },\n '& span': {\n fontSize: '0.8em',\n width: '3em',\n textAlign: 'center'\n }\n }\n})\n\nconst MediaPageNav = injectSheet(mediaPageNavStyles)(\n ({ classes, currentPage, className, pagesLength, setCurrentPage }) => {\n return (\n
\n \n setCurrentPage(\n currentPage === 0 ? pagesLength - 1 : currentPage - 1\n )\n }>\n \n \n \n {currentPage + 1} / {pagesLength}\n \n \n setCurrentPage(\n currentPage === pagesLength - 1 ? 0 : currentPage + 1\n )\n }>\n \n \n
\n )\n }\n)\n\nconst feedContentHolderStyles = {\n container: {\n padding: '0 16px'\n }\n}\n\nconst FeedContentHolder = injectSheet(feedContentHolderStyles)(\n ({ classes, className, ...props }) => {\n return (\n
\n )\n }\n)\n\nconst successCriteriaStyles = ({ FONT_SIZES }) => ({\n successCriteria: {\n border: '1px solid #4a4a4a',\n borderRadius: '8px',\n overflow: 'hidden',\n background: '#fff',\n '& ul': {\n listStyle: 'none',\n padding: '0',\n margin: '0'\n },\n '& li': {\n display: 'flex',\n alignItems: 'center',\n padding: '16px 20px',\n borderTop: '1px solid #4a4a4a',\n '&:first-child': {\n borderTop: '0'\n }\n },\n '& p': {\n margin: '0'\n }\n },\n successCriteriaHead: {\n background: '#4a4a4a',\n padding: '16px 20px',\n color: '#fff',\n display: 'block',\n fontWeight: 'bold',\n ...FONT_SIZES.BODY_DEFAULT.STYLE\n },\n criteria: {\n flex: '1'\n },\n criterion: {\n fontWeight: 'bold'\n }\n})\n\nconst SuccessCriteria = injectSheet(successCriteriaStyles)(\n ({ classes, data, onChange }) => {\n return (\n
\n Have I...\n
    \n {data.map(item => {\n return (\n
  • \n
    \n

    {item.criterion}

    \n

    {item.prompts}

    \n
    \n
    \n \n
    \n
  • \n )\n })}\n
\n
\n )\n }\n)\n\nconst boxStyles = ({ FONT_SIZES }) => ({\n box: {\n background: '#f8f8f8',\n padding: '20px',\n overflow: 'hidden',\n borderBottom: '1px solid #ececec',\n '&:last-child': {\n border: 'none'\n },\n '& > h2': {\n margin: '-20px -20px 20px',\n padding: '20px',\n background: '#fff',\n ...FONT_SIZES.BODY_DEFAULT.STYLE,\n fontWeight: 'bold'\n }\n }\n})\n\nconst Box = injectSheet(boxStyles)(({ title, classes, children }) => {\n return (\n
\n

{title}

\n {children}\n
\n )\n})\n\nconst feedItemStyles = ({ COLORS }) => ({\n container: {\n borderRadius: '8px',\n background: '#fff',\n boxShadow: '0 2px 12px rgba(0, 0, 0, 0.2)',\n overflow: 'hidden',\n fontSize: '14px',\n marginBottom: '2em',\n maxWidth: '1024px',\n margin: '0 auto',\n '@media (min-width: 575px)': {\n marginBottom: '3em'\n },\n '@media (min-width: 813px)': {\n width: '100%'\n }\n },\n head: {\n display: 'flex',\n padding: '1.4em 0',\n '& h3': {\n fontSize: '1.57em',\n lineHeight: '1.2',\n margin: '0'\n }\n },\n layout: {\n '@media (min-width: 575px)': {\n display: 'flex'\n }\n },\n layoutDetails: {\n background: '#f8f8f8',\n '@media (min-width: 575px)': {\n borderTop: '1px solid #eee',\n flex: '1',\n maxWidth: '360px',\n position: 'relative',\n '& > div': {\n position: 'absolute',\n left: '0',\n top: '0',\n height: '100%',\n width: '100%',\n overflow: 'auto'\n }\n }\n },\n layoutWork: {\n flex: '1'\n },\n media: {\n position: 'relative'\n },\n work: {\n background: '#333',\n padding: '1em',\n flexDirection: 'column-reverse',\n display: 'flex',\n '@media (min-width: 575px)': {\n padding: '20px',\n display: 'flex'\n }\n },\n controls: {\n display: 'flex',\n margin: '0 0 14px',\n justifyContent: 'space-between',\n '@media (min-width: 575px)': {\n margin: '0 0 20px'\n }\n },\n footer: {\n paddingTop: '1.2em',\n paddingBottom: '1.2em',\n display: 'flex',\n justifyContent: 'flex-end',\n '& > *': {\n marginLeft: '1em'\n },\n '@media (min-width: 575px)': {\n position: 'relative',\n zIndex: '50',\n boxShadow: '0 -3px 3px rgba(0, 0, 0, 0.1)'\n }\n },\n author: {\n background: '#fff',\n padding: '1em 0',\n borderBottom: '1px solid #ececec',\n '& > *': {\n display: 'flex',\n alignItems: 'center'\n }\n },\n avatar: {\n fontSize: '2.7em',\n marginRight: '.2em'\n },\n pupilName: {\n fontWeight: 'bold',\n margin: '0',\n lineHeight: '1.2'\n },\n creator: {\n margin: '0',\n fontSize: '.86em',\n lineHeight: '1.2',\n color: COLORS.TEXT.LIGHT_GREY.NORMAL\n },\n versionSelect: {\n '& select': {\n border: 'none',\n background: '#000',\n color: '#fff'\n },\n '& svg': {\n color: '#fff !important'\n }\n }\n})\n\nconst FeedItem = injectSheet(feedItemStyles)(\n ({ classes, data, onSendBack, onApprove }) => {\n const [currentMediaPage, setCurrentMediaPage] = useState(0)\n const [currentVersionIndex, setCurrentVersionIndex] = useState(\n data.pa_work_versions.length - 1\n )\n\n const md = useMemo(\n () => {\n const { pa_work_versions } = data\n const currentWorkVersion = pa_work_versions[currentVersionIndex]\n const { student } = data\n return {\n title: data.pa_session.title,\n media: !currentWorkVersion.work ? [] : currentWorkVersion.work.media,\n pupilName: student.full_name,\n pupilAvatar: student.avatar,\n successCriteria: currentWorkVersion.success_criteria,\n action: data,\n versions: pa_work_versions\n }\n },\n [data, currentVersionIndex]\n )\n\n const workReviewsProps = useWorkReviews(md.action)\n\n const activeMedia = md.media[currentMediaPage]\n\n return (\n
\n
\n \n

{md.title}

\n
\n
\n
\n
\n
\n {activeMedia && (\n
\n {activeMedia.pa_highlight_canva && (\n \n )}\n \n
\n )}\n
\n setCurrentVersionIndex(e.target.value)}>\n {md.versions.map((version, index) => {\n return \n })}\n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n

{md.pupilName}

\n

Creator

\n
\n
\n
\n {!!md.successCriteria.length && (\n \n \n \n )}\n {!!workReviewsProps.reviews && (\n \n \n \n )}\n
\n
\n
\n \n }>\n Send back\n \n }>\n Approve writing\n \n \n
\n )\n }\n)\n\nconst selectedStudentScreenStyles = ({ COLORS }) => ({\n pending: {\n flex: '1',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n teacherReviewContainer: {\n padding: '20px',\n '@media (min-width: 575px)': {\n padding: '30px 20px'\n },\n '@media (min-width: 813px) and (orientation: landscape)': {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n flex: '1',\n overflow: 'auto',\n '& *': {\n flexShrink: '0'\n }\n }\n },\n studentInteractionContainer: {\n flex: '1',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n studentInteractionHolder: {\n textAlign: 'center',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n padding: '0 40px',\n '& > p': {\n margin: '15px 0'\n }\n },\n statusIcon: {\n background: COLORS.BLUE.NORMAL,\n width: '80px',\n height: '80px',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n fontSize: '30px',\n color: '#fff',\n borderRadius: '100%'\n }\n})\n\nconst SelectedStudentScreen = injectSheet(selectedStudentScreenStyles)(\n ({ classes }) => {\n const [paAction, setPaAction] = useState(null)\n\n const { selectedStudentState } = useContext(FeedContext)\n\n useEffect(\n () => {\n if (!selectedStudentState.studentId) return false\n apiGetPresentationAction({\n pa_session_id: selectedStudentState.sessionId,\n student_account_id: selectedStudentState.studentId,\n include:\n 'pa_action.status,pa_action.presentation.names,pa_action.presentation.image,pa_session.timestamps,pa_action.last_pa_work_version.work.media,pa_action.last_pa_work_version.work.status,pa_action.last_pa_work_version.work.medium.image,pa_action.last_pa_work_version.work.medium.details,pa_action.student.names,pa_action.student.avatar,pa_action.student.student_type.policy,pa_action.pa_session.details'\n })\n .then(res => setPaAction(res.data.pa_presentation_action))\n .catch(errorHandler)\n },\n [selectedStudentState]\n )\n return !paAction ? (\n
\n \n
\n ) : paAction.status === 'teacher_review' ? (\n
\n \n
\n ) : (\n
\n
\n
\n \n
\n {paAction.status === 'done' && (\n

\n {paAction.student.first_name} already got an approved work.\n
\n You can access{' '}\n \n his evidence bank\n \n .\n

\n )}\n {paAction.status !== 'done' && (\n

\n {paAction.student.first_name} hasn’t submitted a piece of work yet\n

\n )}\n
\n
\n )\n }\n)\n\nconst FeedContext = createContext(null)\n\nconst feedStyles = {\n container: {\n ...fullVHExceptHeader,\n display: 'flex',\n flexDirection: 'column',\n '& > *': {\n flexShrink: '0'\n }\n },\n filterButton: {\n marginRight: 'auto',\n '@media (min-width: 813px) and (orientation: landscape)': {\n display: 'none'\n }\n },\n filter: {\n display: 'none',\n '@media (min-width: 813px) and (orientation: landscape)': {\n width: '250px',\n display: 'block',\n background: '#fff'\n },\n '@media (min-width: 1025px)': {\n width: '386px'\n }\n },\n showFilters: {\n '& $filter': {\n display: 'block'\n }\n },\n pending: {\n flex: '1',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n head: {\n justifyContent: 'flex-end'\n },\n layout: {\n display: 'flex',\n flexDirection: 'column',\n flex: '1',\n '@media (min-width: 813px) and (orientation: landscape)': {\n flexDirection: 'row',\n overflow: 'hidden'\n }\n },\n items: {\n padding: '20px',\n '@media (min-width: 575px)': {\n padding: '30px 20px'\n },\n '@media (min-width: 813px) and (orientation: landscape)': {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n flex: '1',\n overflow: 'auto',\n '& > *': {\n flexShrink: '0'\n }\n }\n },\n noItems: {\n flex: '1',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: '14px',\n padding: '2em',\n '& h3': {\n fontSize: '1.57em',\n lineHeight: '1.2',\n margin: '0 0 1em'\n }\n }\n}\n\nconst Feed = injectSheet(feedStyles)(({ classes }) => {\n const history = useHistory()\n const match = useRouteMatch()\n const dispatch = useDispatch()\n const feedItems = useSelector(state => getFeedItemsList(state))\n\n const [modalState, setModalState] = useState({ type: null, data: null })\n const [showFilters, setShowFilters] = useState(false)\n const { fetchItemsRequest } = useSelector(state => getFeedItemsState(state))\n const [selectedStudentState, setSelectedStudentState] = useState({\n studentId: null,\n sessionId: null\n })\n\n const { uploadWork, uploadingWork } = useWorkUpload()\n\n useEffect(\n () => {\n setModalState(\n match.path === '/upload'\n ? { type: 'DirectUpload', data: null }\n : { type: null, data: null }\n )\n },\n [match.path]\n )\n\n useEffect(\n () => {\n dispatch(fetchFeedItems())\n },\n [dispatch]\n )\n\n const contextValue = useMemo(\n () => {\n return {\n selectedStudentState,\n setSelectedStudentState\n }\n },\n [selectedStudentState, setSelectedStudentState]\n )\n\n return (\n \n \n \n setShowFilters(!showFilters)}\n className={classes.filterButton}\n simple\n icon={}>\n Filter\n \n {\n return history.push('/upload')\n }}\n tall\n icon={}>\n {uploadingWork && 'Uploading work...'}\n {!uploadingWork && 'Add Work'}\n \n \n
\n
\n \n
\n {selectedStudentState.studentId ? (\n \n ) : (\n <>\n {(!feedItems || fetchItemsRequest.pending) && (\n
\n \n
\n )}\n {feedItems &&\n !fetchItemsRequest.pending && (\n <>\n {!feedItems.length && (\n
\n

Nothing to review

\n \"Mountains\"\n
\n )}\n {!!feedItems.length && (\n
\n {feedItems.map(feedItem => (\n {\n openConfirmationDialog({\n bodyText: `Are you sure you want to send this work back to the student?`,\n confirmText: 'Send back',\n cancelText: 'Cancel',\n action: () => {\n toast.success(\n `Work has been sent back to ${\n feedItem.pa_action.student.first_name\n }`\n )\n dispatch(\n rejectWork({\n feedId: feedItem.id,\n workVersionId:\n feedItem.pa_action.last_pa_work_version\n .id\n })\n ).catch(errorHandler)\n }\n })\n }}\n onApprove={() =>\n setModalState({\n type: 'Approve',\n data: feedItem\n })\n }\n key={feedItem.id}\n data={feedItem.pa_action}\n />\n ))}\n
\n )}\n \n )}\n \n )}\n
\n \n setModalState({\n type: 'Success',\n data: { ...modalState.data, ...data }\n })\n }\n requestClose={() =>\n setModalState({ type: null, data: modalState.data })\n }\n isOpen={modalState.type === 'Approve'}\n data={modalState.data}\n />\n \n setModalState({ type: null, data: modalState.data })\n }\n isOpen={modalState.type === 'SendBack'}\n data={modalState.data}\n />\n \n setModalState({ type: null, data: modalState.data })\n }\n data={modalState.data}\n isOpen={modalState.type === 'Success'}\n />\n {\n history.push('/')\n uploadWork(pupilId, files)\n }}\n requestClose={() => history.push('/')}\n isOpen={modalState.type === 'DirectUpload'}\n />\n
\n \n )\n})\n\nexport default Feed\n","import { errorHandler } from 'pobble-components/dist/error-handler'\nimport {\n apiDeleteMedia,\n apiCreateMedium,\n apiDeleteWork,\n apiRotateMedium,\n apiGetWork,\n apiUpdateWork,\n apiReorderMedia\n} from '../../common/api/work'\n\nexport const fetchWorkUploadData = id => ({\n requestPrefix: 'WORK_UPLOAD:FETCH',\n request: () =>\n apiGetWork(id, {\n include:\n 'work.media,work.medium,work.medium.image,work.medium.details,work.student_type.account.names,work.student_type.policy'\n })\n})\n\nexport const deleteMedia = id => ({\n requestPrefix: 'WORK_UPLOAD:DELETE_MEDIA',\n params: { id },\n request: () => apiDeleteMedia(id)\n})\n\nexport const addMedia = (workId, data) => ({\n requestPrefix: 'WORK_UPLOAD:ADD_MEDIA',\n request: () =>\n apiCreateMedium(workId, data, {\n include: 'medium.image,medium.details'\n })\n})\n\nexport const deleteWork = id => ({\n requestPrefix: 'WORK_UPLOAD:DELETE_WORK',\n request: () => apiDeleteWork(id)\n})\n\nexport const rotateMedium = id => ({\n requestPrefix: 'WORK_UPLOAD:ROTATE_MEDIUM',\n params: { id },\n request: () =>\n apiRotateMedium(\n id,\n {\n degrees: -90\n },\n {\n include: 'medium.image,medium.details'\n }\n )\n})\n\nexport const saveWork = (id, data) => ({\n requestPrefix: 'WORK_UPLOAD:SAVE',\n request: () => apiUpdateWork(id, data)\n})\n\nexport const reorderMedia = (workId, ids) => ({\n requestPrefix: 'WORK_UPLOAD:REORDER_MEDIA',\n params: { ids },\n request: () =>\n apiReorderMedia(workId, {\n media_ids: ids\n }).catch(errorHandler)\n})\n","import { createSelector } from 'reselect'\nimport sortBy from 'lodash/sortBy'\n\nexport const getWorkUploadState = state => state.WorkUploadStore\n\nexport const getWork = state => getWorkUploadState(state).work\n\nconst getMedia = state => getWorkUploadState(state).media\n\nconst getWorkVersion = state => getWorkUploadState(state).workVersion\n\nexport const getStudent = state => getWork(state) && getWork(state).student_type\n\nexport const getWorkVersionId = state => {\n const workVersion = getWorkVersion(state)\n return !workVersion ? null : workVersion.id\n}\n\nexport const getWorkId = state => {\n const workVersion = getWorkVersion(state)\n return !workVersion || !workVersion.work ? null : workVersion.work.id\n}\n\nexport const getMediaItems = state => {\n const stateNow = getWorkUploadState(state)\n return !stateNow.media ? {} : stateNow.media.entities.media\n}\n\nexport const getMediaList = createSelector(\n [getMedia],\n media => (!media ? null : media.result.map(id => media.entities.media[id]))\n)\n\nexport const getMediaListInOrder = createSelector([getMediaList], media =>\n sortBy(media, 'order')\n)\n","import React, {\n useEffect,\n useState,\n useMemo,\n createContext,\n useContext,\n useRef,\n useCallback\n} from 'react'\nimport injectSheet from 'react-jss'\nimport PageHead from '../../page-head/page-head'\nimport Button from 'pobble-components/dist/button'\nimport { useDispatch, useSelector } from 'react-redux'\nimport {\n fetchWorkUploadData,\n rotateMedium,\n addMedia,\n deleteMedia,\n deleteWork,\n saveWork,\n reorderMedia\n} from '../../../stores/work-upload/work-upload.actions'\nimport { errorHandler } from 'pobble-components/dist/error-handler'\nimport { useRouteMatch, useHistory } from 'react-router-dom'\nimport classNames from 'classnames'\nimport {\n getMediaListInOrder,\n getWorkUploadState,\n getWork,\n getStudent\n} from '../../../stores/work-upload/work-upload.selectors'\nimport {\n useMediaNav,\n MediaPageNav,\n MediaLoader\n} from 'pobble-components/dist/work'\nimport { usePrevious } from 'pobble-components/dist/utils'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faUndo } from '@fortawesome/pro-solid-svg-icons/faUndo'\nimport { faTrashAlt } from '@fortawesome/pro-solid-svg-icons/faTrashAlt'\nimport { faPlusCircle } from '@fortawesome/pro-solid-svg-icons/faPlusCircle'\nimport { faCheck } from '@fortawesome/pro-solid-svg-icons/faCheck'\nimport { faCaretLeft } from '@fortawesome/pro-solid-svg-icons/faCaretLeft'\nimport { faBringForward } from '@fortawesome/pro-solid-svg-icons/faBringForward'\nimport { faFilePlus } from '@fortawesome/pro-regular-svg-icons/faFilePlus'\nimport { faFile } from '@fortawesome/pro-regular-svg-icons/faFile'\nimport { openConfirmationDialog } from 'pobble-components/dist/modal/confirmation-dialog'\nimport FormFile from 'pobble-components/dist/form-elements/form-file'\nimport { ModalContent, Modal, ModalHeader } from 'pobble-components/dist/modal'\nimport duckRocket from './duck-rocket.gif'\nimport Cookies from 'js-cookie'\nimport Sortable from 'sortablejs'\nimport WorkForm from '../../work-form/work-form'\nimport { useWorkUpload } from '../../../hooks/work'\nimport Spinner from 'pobble-components/dist/spinner'\n\nconst WorkContext = createContext(null)\n\nconst reorderStyles = {\n head: {\n padding: '20px 0',\n display: 'flex',\n '@media (min-width: 575px)': {\n paddingTop: '30px'\n }\n },\n container: {\n display: 'flex',\n flexWrap: 'wrap',\n margin: '0 -10px',\n '& .work-reorder-ghost': {\n opacity: '0'\n }\n },\n cell: {\n width: '33.3333%',\n padding: '10px',\n '@media (min-width: 575px)': {\n width: '25%'\n }\n },\n media: {\n background: '#454545',\n paddingBottom: '133%',\n backgroundPosition: 'center',\n backgroundSize: 'cover',\n borderRadius: '8px',\n '&:hover': {\n cursor: 'grab'\n }\n }\n}\n\nconst Reorder = injectSheet(reorderStyles)(({ classes }) => {\n const { media, setScreenState, onReorder } = useContext(WorkContext)\n const container = useRef(null)\n\n const [mediaCopy] = useState(media)\n\n useEffect(\n () => {\n new Sortable(container.current, {\n animation: 150,\n ghostClass: 'work-reorder-ghost',\n onEnd: e => {\n const ids = Array.from(e.to.children).map(item => item.dataset.id)\n onReorder(ids)\n }\n })\n },\n [onReorder]\n )\n\n return (\n <>\n \n
\n setScreenState('page')}\n tall\n icon={}>\n Back\n \n
\n
\n \n
\n {mediaCopy.map(media => (\n
\n \n
\n ))}\n
\n
\n \n )\n})\n\nconst successModalStyles = {\n content: {\n display: 'flex',\n alignItems: 'center',\n flexDirection: 'column',\n fontSize: '14px',\n lineHeight: '1.2',\n textAlign: 'center',\n minWidth: 'auto',\n maxWidth: 'calc(100vw - 40px)',\n width: '30em',\n padding: '2em',\n '& img': {\n margin: '0 0 2em',\n width: '12.5em',\n height: '12.5em'\n },\n '& h3': {\n fontSize: '1.57em',\n margin: '0 0 1em'\n },\n '& p': {\n margin: '0'\n },\n '& button': {\n marginBottom: '8px'\n }\n },\n buttons: {\n display: 'flex',\n flexDirection: 'column',\n marginTop: '24px',\n alignItems: 'center'\n },\n uploadingPending: {\n display: 'flex',\n alignItems: 'center',\n font: 'var(--body)',\n color: 'var(--gray)',\n '& > *': {\n font: 'var(--body-)',\n marginRight: '8px',\n color: 'var(--gray)'\n }\n }\n}\n\nconst SuccessModal = injectSheet(successModalStyles)(\n ({ classes, data, ...props }) => {\n const history = useHistory()\n\n const { uploadWork, uploadingWork } = useWorkUpload()\n\n return (\n \n {data && (\n \n {uploadingWork ? (\n

\n \n Uploading work...\n

\n ) : (\n <>\n \"Duck\n

And away they go

\n {data.workState === 'published' && (\n

\n The work is now published on Pobble.\n
\n Your pupil will be so excited!\n

\n )}\n {data.workState === 'evidence_bank' && (\n

\n The work is now saved in the\n
\n evidence bank.\n

\n )}\n
\n \n {\n Cookies.remove('prefillWorkDetails')\n uploadWork(data.pupilId, files).then(() =>\n props.requestClose()\n )\n }}>\n }\n tall\n simple>\n Add another piece of work for {data.pupilName}\n \n \n }>\n Back to {data.pupilName}\n 's evidence bank\n \n
\n \n )}\n
\n )}\n
\n )\n }\n)\n\nconst DetailsModal = ({ classes, ...props }) => {\n return (\n \n Save writing\n \n \n )\n}\n\nconst DetailsForm = ({ requestClose, onSubmit }) => {\n const work = useSelector(state => getWork(state))\n const { saveWorkRequest } = useSelector(state => getWorkUploadState(state))\n const mapProps = useMemo(\n () => {\n const cookie = Cookies.get('prefillWorkDetails')\n const defaultValues = !cookie\n ? { title: '', description: '' }\n : JSON.parse(cookie)\n const student = work.student_type\n return {\n pupilId: student.account.id,\n pupilName: student.account.first_name,\n canPublish: student.policy.can_publish,\n defaultValues,\n onSubmit: onSubmit\n }\n },\n [work, onSubmit]\n )\n return (\n }>\n Save writing\n \n }\n />\n )\n}\n\nconst headStyles = {\n container: {\n justifyContent: 'flex-end'\n },\n doneButton: {\n minWidth: '100px',\n display: 'flex',\n justifyContent: 'center'\n }\n}\n\nconst Head = injectSheet(headStyles)(({ classes, workVersionId, onDone }) => {\n return (\n \n \n \n )\n})\n\nconst darkButtonStyles = ({ COLORS }) => ({\n button: {\n background: '#282828',\n borderColor: '#282828',\n transition: 'none',\n '& span': {\n display: 'none',\n '@media (min-width: 575px)': {\n display: 'inline'\n }\n },\n '& > div': {\n display: 'flex',\n justifyContent: 'center',\n marginRight: '0 !important',\n '@media (min-width: 575px)': {\n marginRight: '6px !important'\n }\n },\n '&:hover': {\n background: '#1f1f1f',\n borderColor: '#1f1f1f'\n },\n '&:active': {\n boxShadow: 'none',\n background: '#000',\n borderColor: '#000'\n }\n },\n active: {\n background: '#fff !important',\n color: '#282828 !important'\n }\n})\n\nconst DarkButton = injectSheet(darkButtonStyles)(\n ({ classes, children, active, ...props }) => (\n \n {children}\n \n )\n)\n\nconst holderStyles = {\n container: {\n maxWidth: '768px',\n margin: '0 auto',\n padding: '0 20px'\n }\n}\n\nconst Holder = injectSheet(holderStyles)(({ classes, className, ...props }) => (\n
\n))\n\nconst pageControlsStyles = {\n container: {\n '& button': {\n marginRight: '1em'\n },\n '& > *:last-child': {\n marginRight: '0'\n }\n },\n longLabel: {\n display: 'none',\n '@media (min-width: 575px)': {\n display: 'inline'\n }\n }\n}\n\nconst PageControls = injectSheet(pageControlsStyles)(\n ({ classes, currentMedia, workId, onDelete }) => {\n const dispatch = useDispatch()\n const { addMediaRequest, deleteWorkRequest } = useSelector(state =>\n getWorkUploadState(state)\n )\n const { setScreenState, screenState, media } = useContext(WorkContext)\n return (\n
\n {media.length > 1 && (\n setScreenState('reorder')}\n tall\n icon={}>\n Reorder\n \n )}\n {screenState === 'page' && (\n <>\n \n openConfirmationDialog({\n bodyText: 'Are you sure you want to delete this page?',\n action: onDelete\n })\n }\n tall\n icon={}>\n Delete\n  page\n \n {\n dispatch(\n addMedia(workId, {\n image: files[0]\n })\n ).catch(errorHandler)\n }}\n accept=\"image/jpeg, image/png, .pdf\">\n }>\n Add  page\n \n \n \n )}\n
\n )\n }\n)\n\nconst editControlsStyles = {\n container: {\n marginRight: 'auto',\n '@media (min-width: 575px)': {\n marginRight: '1em'\n }\n }\n}\n\nconst EditControls = injectSheet(editControlsStyles)(({ classes, media }) => {\n const dispatch = useDispatch()\n const { rotateMediumRequest } = useSelector(state =>\n getWorkUploadState(state)\n )\n return (\n
\n dispatch(rotateMedium(media.id)).catch(errorHandler)}\n tall\n icon={}>\n Rotate\n \n
\n )\n})\n\nconst workStyles = {\n container: {\n minHeight: '100vh',\n backgroundColor: '#333',\n overflow: 'hidden'\n },\n imageHolder: {\n padding: '20px 20px 40px',\n '& > div': {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n '& img': {\n position: 'relative',\n zIndex: '10',\n width: '100%',\n background: '#000'\n }\n },\n controls: {\n display: 'flex',\n justifyContent: 'flex-end',\n padding: '20px 20px 0',\n '@media (min-width: 575px)': {\n paddingTop: '30px'\n }\n },\n pageNavDesktop: {\n display: 'none',\n marginRight: 'auto',\n '@media (min-width: 575px)': {\n display: 'flex'\n }\n },\n pageNavMobile: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n margin: '-10px 0 30px',\n '@media (min-width: 575px)': {\n display: 'none'\n }\n }\n}\n\nconst Work = ({ classes }) => {\n const match = useRouteMatch()\n const history = useHistory()\n const dispatch = useDispatch()\n const workId = match.params.id\n const media = useSelector(state => getMediaListInOrder(state))\n const student = useSelector(getStudent)\n const mediaNav = useMediaNav(media)\n const previousPagesLength = usePrevious(mediaNav.mediaLength)\n const [modalState, setModalState] = useState({\n type: null\n })\n const [screenState, setScreenState] = useState('page')\n\n const { params } = useRouteMatch()\n\n useEffect(\n () => {\n dispatch(fetchWorkUploadData(params.id)).catch(errorHandler)\n },\n [dispatch, params.id]\n )\n\n // Update page navigation when new media added\n useEffect(\n () => {\n if (mediaNav.mediaLength && previousPagesLength) {\n if (previousPagesLength < mediaNav.mediaLength) {\n mediaNav.setActiveMediaIndex(mediaNav.mediaLength - 1)\n }\n if (mediaNav.activeMediaIndex > mediaNav.mediaLength - 1) {\n mediaNav.setActiveMediaIndex(mediaNav.mediaLength - 1)\n }\n }\n },\n [mediaNav.mediaLength] //eslint-disable-line\n )\n\n const onReorder = useCallback(\n ids => {\n dispatch(reorderMedia(workId, ids))\n },\n [dispatch, workId]\n )\n\n const value = useMemo(\n () => ({\n media,\n screenState,\n setScreenState,\n workId,\n onReorder\n }),\n [media, screenState, setScreenState, workId, onReorder]\n )\n\n return (\n
\n \n setModalState({ type: 'Details' })} />\n {!!media.length && (\n
\n {screenState === 'page' && (\n <>\n \n \n \n {\n if (media.length > 1) {\n dispatch(deleteMedia(mediaNav.activeMedia.id)).catch(\n errorHandler\n )\n } else {\n dispatch(deleteWork(workId))\n .then(() => history.push('/'))\n .catch(errorHandler)\n }\n }}\n currentMedia={mediaNav.activeMedia}\n />\n \n \n \n \n \n \n \n \n )}\n {screenState === 'reorder' && }\n
\n )}\n
\n setModalState({ type: null })}\n onSubmit={({ title, description, workState, tags, comment, sta }) => {\n Cookies.set(\n 'prefillWorkDetails',\n JSON.stringify({\n title,\n description\n }),\n { expires: 1 }\n )\n const payload = {\n title,\n description,\n state: workState,\n comment_on_work: comment,\n tags\n }\n if (sta) payload.independent = sta.value\n if (sta && sta.extraInfo)\n payload.independent_description = sta.extraInfo\n\n return dispatch(saveWork(workId, payload))\n .catch(errorHandler)\n .then(() =>\n setModalState({\n type: 'Success',\n data: {\n ...modalState.data,\n workState,\n pupilName: student.account.first_name,\n pupilId: student.account.id\n }\n })\n )\n }}\n isOpen={modalState.type === 'Details'}\n />\n setModalState({ type: null })}\n isOpen={modalState.type === 'Success'}\n data={modalState.data}\n />\n
\n )\n}\n\nexport default injectSheet(workStyles)(Work)\n","import React from 'react'\nimport styles from './app.styles'\nimport injectSheet from 'react-jss'\nimport { UserProvider, UserInspector } from 'pobble-components/dist/pobble-user'\nimport EnvironmentLine from 'pobble-components/dist/environment-line'\nimport Header from 'pobble-components/dist/pobble-header'\nimport { Switch, Route, BrowserRouter as Router } from 'react-router-dom'\nimport Feed from '../pages/feed/feed'\nimport { ToastContainer } from 'pobble-components/dist/toast'\nimport Work from '../pages/work/work'\nimport { ConfirmationDialog } from 'pobble-components/dist/modal/confirmation-dialog'\nimport PageNotFound from 'pobble-components/dist/page-not-found'\nimport { SubscriptionProvider } from 'pobble-components/dist/subscriptions'\nimport { ErrorBoundary } from 'pobble-components/dist/error-boundary'\n\nconst APP_PATH = process.env.REACT_APP_PATH || '/'\n\nconst App = ({ classes, me, meError }) => {\n return (\n (me ? Promise.resolve(me) : Promise.reject(meError))}>\n \n \n \n
\n \n \n \n
\n \n \n \n \n \n
\n
\n
\n
\n \n \n \n \n \n )\n}\n\nexport default injectSheet(styles)(App)\n","import {\n createReducer,\n createRequestReducer\n} from 'pobble-components/dist/redux-helpers'\nimport { combineReducers } from 'redux'\nimport { schema, normalize } from 'normalizr'\n\nconst normalizeFeedItems = data => {\n const items = new schema.Entity('items')\n return normalize(data, [items])\n}\n\nconst updateFilters = state => ({\n ...state,\n updateAfter: Date.now()\n})\n\nconst FeedItemsReducer = combineReducers({\n fetchItemsRequest: createRequestReducer('FEED_ITEMS:FETCH'),\n rejectWorkRequest: createRequestReducer('FEED_ITEMS:REJECT_WORK'),\n approveWorkRequest: createRequestReducer('FEED_ITEMS:APPROVE_WORK'),\n filters: createReducer(\n { session_id: null, student_id: null, updateAfter: Date.now() },\n {\n 'FEED_ITEMS:FETCH_REQUEST': (state, { params }) => ({\n ...state,\n session_id: params.session_id || null,\n student_id: params.student_id || null\n }),\n 'FEED_ITEMS:REJECT_WORK_REQUEST_SUCCESS': updateFilters,\n 'FEED_ITEMS:APPROVE_WORK_REQUEST_SUCCESS': updateFilters,\n 'FEED_ITEMS:ADD_STUDENTS_TO_SESSION_REQUEST_SUCCESS': updateFilters\n }\n ),\n data: createReducer(null, {\n 'FEED_ITEMS:FETCH_REQUEST_SUCCESS': (state, { response }) =>\n normalizeFeedItems(response.data.pa_action_feed_items),\n 'FEED_ITEMS:REJECT_WORK_REQUEST': (state, { params }) => ({\n ...state,\n result: state.result.filter(id => id !== params.feedId)\n }),\n 'FEED_ITEMS:APPROVE_WORK_REQUEST_SUCCESS': (state, { params }) => ({\n ...state,\n result: state.result.filter(id => id !== params.feedId)\n })\n })\n})\n\nexport default FeedItemsReducer\n","import {\n createReducer,\n createRequestReducer\n} from 'pobble-components/dist/redux-helpers'\nimport { combineReducers } from 'redux'\nimport { schema, normalize } from 'normalizr'\n\nconst normalizeMedia = data => {\n const media = new schema.Entity('media')\n return normalize(data, [media])\n}\n\nconst WorkUpload = combineReducers({\n addMediaRequest: createRequestReducer('WORK_UPLOAD:ADD_MEDIA'),\n deleteWorkRequest: createRequestReducer('WORK_UPLOAD:DELETE_WORK'),\n rotateMediumRequest: createRequestReducer('WORK_UPLOAD:ROTATE_MEDIUM'),\n saveWorkRequest: createRequestReducer('WORK_UPLOAD:SAVE'),\n work: createReducer(null, {\n 'WORK_UPLOAD:FETCH_REQUEST': () => null,\n 'WORK_UPLOAD:FETCH_REQUEST_SUCCESS': (state, { response }) =>\n response.data.work\n }),\n media: createReducer(null, {\n 'WORK_UPLOAD:FETCH_REQUEST': () => null,\n 'WORK_UPLOAD:FETCH_REQUEST_SUCCESS': (state, { response }) => {\n return normalizeMedia(response.data.work.media)\n },\n 'WORK_UPLOAD:ADD_MEDIA_REQUEST_SUCCESS': (state, { response }) => {\n const media = response.data.media\n const newState = {\n entities: { media: { ...state.entities.media } },\n result: [...state.result]\n }\n\n media.forEach(item => {\n newState.entities.media[item.id] = item\n newState.result.push(item.id)\n })\n\n return newState\n },\n 'WORK_UPLOAD:DELETE_MEDIA_REQUEST': (state, { params }) => {\n return {\n ...state,\n result: state.result.filter(id => id !== params.id)\n }\n },\n 'WORK_UPLOAD:ROTATE_MEDIUM_REQUEST_SUCCESS': (state, { response }) => {\n return {\n ...state,\n entities: {\n media: {\n ...state.entities.media,\n [response.data.medium.id]: response.data.medium\n }\n }\n }\n },\n 'WORK_UPLOAD:REORDER_MEDIA_REQUEST': (state, { params }) => {\n const mediaCopy = { ...state.entities.media }\n params.ids.forEach((id, index) => {\n mediaCopy[id].order = index\n })\n return {\n ...state,\n entities: {\n media: mediaCopy\n }\n }\n }\n })\n})\n\nexport default WorkUpload\n","import { combineReducers } from 'redux'\nimport FeedItemsStore from './stores/feed-items/feed-items.reducer.js'\nimport WorkUploadStore from './stores/work-upload/work-upload.reducer'\n\nconst Reducer = combineReducers({\n FeedItemsStore,\n WorkUploadStore\n})\n\nexport default Reducer\n","import 'pobble-components/dist/setup/sentry'\n\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport App from './components/app/app'\n\nimport { Provider } from 'react-redux'\nimport { createStore, applyMiddleware } from 'redux'\nimport thunk from 'redux-thunk'\nimport rootReducer from './reducer'\nimport { requestMiddleware } from 'pobble-components/dist/redux-helpers'\n\nimport 'normalize.css'\nimport { apiGetMe } from './common/api/profile'\nimport { PobbleStyles } from 'pobble-components/dist/styles'\n\nconst store = createStore(\n rootReducer,\n applyMiddleware(requestMiddleware, thunk)\n)\n\nconst render = ({ me, meError }) => {\n ReactDOM.render(\n \n \n \n \n ,\n document.getElementById('root')\n )\n}\n\napiGetMe({\n include:\n 'account.timestamps,account.names,account.finish_signup_status,account.policy,account.pobbler_type,account.avatar,account.teacher_type.school,account.subscription_policy,account.subscriptions'\n}).then(res => render({ me: res }), e => render({ meError: e }))\n\n// Lazy load external tools\nsetTimeout(() => import('pobble-components/dist/setup/external-tools'), 1000)\n"],"sourceRoot":""}