diff --git a/src/pages/ActivityLog/index.js b/src/pages/ActivityLog/index.js
index cb3d71cc..58cd4033 100644
--- a/src/pages/ActivityLog/index.js
+++ b/src/pages/ActivityLog/index.js
@@ -16,7 +16,6 @@ import { PreviewDocumentModal } from '../../containers/PreviewDocumentModal'
import './styles.scss'
import repackDocumentType from '../../lib/repack-document-type'
-import repackDocumentStatus from '../../lib/repack-document-status'
export function ActivityLog () {
const [documentModalState, setDocumentModalState] = useState(false)
@@ -117,7 +116,6 @@ export function ActivityLog () {
@@ -95,10 +91,10 @@ export function Basisgruppe ({ group, documents, conversations, notes }) {
openPreviewModal(doc)} aria-label='Klikk for å åpne'>{repackDocumentType(doc.type, doc.variant)}
- {doc.created.timestamp}
+ openPreviewModal(doc)} aria-label='Klikk for å åpne' tabIndex='-1'>{doc.content.period ? doc.content.period.nb : ''}
|
- {repackDocumentStatus(doc.status)}
+ {doc.created.timestamp}
|
)
@@ -131,11 +127,12 @@ export function Basisgruppe ({ group, documents, conversations, notes }) {
- {doc.created.timestamp}
+ openPreviewModal(doc)} aria-label='Klikk for å åpne'>{doc.variant === 'samtale' ? 'Elevsamtale gjennomført' : 'Eleven ønsket ikke samtale'}
|
- {repackDocumentStatus(doc.status, true)}
+ {doc.created.timestamp}
|
+ |
)
})
@@ -167,10 +164,10 @@ export function Basisgruppe ({ group, documents, conversations, notes }) {
- {doc.created.timestamp}
+ {doc.teacher.name}
|
- {repackDocumentStatus(doc.status, true)}
+ {doc.created.timestamp}
|
)
diff --git a/src/pages/Class/undervisningsgruppe.js b/src/pages/Class/undervisningsgruppe.js
index 0e86f633..6bfdaf6d 100644
--- a/src/pages/Class/undervisningsgruppe.js
+++ b/src/pages/Class/undervisningsgruppe.js
@@ -9,7 +9,6 @@ import ClassPanel from '../../components/class-panel'
import { ROUTES } from '../../config/constants'
import repackDocumentType from '../../lib/repack-document-type'
-import repackDocumentStatus from '../../lib/repack-document-status'
import { PreviewDocumentModal } from '../../containers/PreviewDocumentModal'
@@ -43,7 +42,7 @@ export function Undervisningsgruppe ({ group, documents, loading }) {
>
- )
+ )
: } />
}
@@ -133,10 +132,10 @@ export function Undervisningsgruppe ({ group, documents, loading }) {
openPreviewModal(doc)} aria-label='Klikk for å åpne'>{repackDocumentType(doc.type, doc.variant)}
- {doc.created.timestamp}
+ openPreviewModal(doc)} aria-label='Klikk for å åpne' tabIndex='-1'>{doc.content.period ? doc.content.period.nb : ''}
|
- {repackDocumentStatus(doc.status)}
+ {doc.created.timestamp}
|
)
diff --git a/src/pages/Home/index.js b/src/pages/Home/index.js
index 97fd79c9..8a7e8338 100644
--- a/src/pages/Home/index.js
+++ b/src/pages/Home/index.js
@@ -16,7 +16,6 @@ import { PreviewDocumentModal } from '../../containers/PreviewDocumentModal'
import './styles.scss'
import repackDocumentType from '../../lib/repack-document-type'
-import repackDocumentStatus from '../../lib/repack-document-status'
export function Home () {
const { user } = useSession()
@@ -137,7 +136,6 @@ export function Home () {
|
|
|
- |
)
})
@@ -168,9 +166,6 @@ export function Home () {
openPreviewModal(doc)}>{doc.created.timestamp}
|
-
- {repackDocumentStatus(doc.status)}
- |
{ openPreviewModal(doc) }} title={`Åpne ${doc.type === 'yff' ? doc.variant.replace('ae', 'æ') : doc.type}`} />
diff --git a/src/pages/Student/index.js b/src/pages/Student/index.js
index 1388ec95..9fcffd41 100644
--- a/src/pages/Student/index.js
+++ b/src/pages/Student/index.js
@@ -20,7 +20,6 @@ import { PreviewDocumentModal } from '../../containers/PreviewDocumentModal'
import './styles.scss'
import repackDocumentType from '../../lib/repack-document-type'
-import repackDocumentStatus from '../../lib/repack-document-status'
import StudentCard from '../../components/student-card'
export function Student ({ match, ...props }) {
@@ -32,6 +31,7 @@ export function Student ({ match, ...props }) {
const [student, setStudent] = useState(null)
const [documents, setDocuments] = useState(null)
const [notes, setNotes] = useState(null)
+ const [conversations, setConversations] = useState(null)
const { id, docId } = match.params
if (docId) console.log('DocumentId', docId)
@@ -52,8 +52,10 @@ export function Student ({ match, ...props }) {
// TODO: Display error message
const docsOrderedByModified = docs.data.sort((a, b) => (a.modified[0].timestamp < b.modified[0].timestamp) ? 1 : -1)
- const docsExceptNotes = docsOrderedByModified.filter((item) => item.type !== 'notat')
+ const docsExceptNotes = docsOrderedByModified.filter((item) => !['notat', 'samtale'].includes(item.type))
const notes = docsOrderedByModified.filter((item) => item.type === 'notat')
+ const conversations = docsOrderedByModified.filter((item) => item.type === 'samtale')
+ setConversations(conversations)
setDocuments(docsExceptNotes)
setNotes(notes)
@@ -158,7 +160,7 @@ export function Student ({ match, ...props }) {
{ openDocumentModal() }}>
Nytt dokument
@@ -186,7 +188,7 @@ export function Student ({ match, ...props }) {
{repackDocumentType(doc.type, doc.variant)}
|
- {repackDocumentStatus(doc.status, true)}
+ {doc.content.period ? doc.content.period.nb : ''}
|
)
@@ -196,7 +198,54 @@ export function Student ({ match, ...props }) {
documents && documents.length === 0 &&
- Denne eleven har ingen registrerte varsler eller samtaler.
+ Denne eleven har ingen registrerte varsler.
+ |
+
+ }
+
+
+