Add a tracker

This commit is contained in:
2022-02-18 01:28:23 +02:00
parent b72fd3029f
commit 77997d7ca6
4 changed files with 137 additions and 0 deletions

View File

@@ -48,4 +48,10 @@ html {
.bitcoin-address {
word-wrap: break-word;
}
.tracker-title-cell {
width: 1rem;
text-overflow: ellipsis;
overflow: hidden;
}

View File

@@ -0,0 +1,41 @@
extend templates/layout.pug
block content
-
const isOwnedByUser = project.owner.ownerEntities.some(ownerEntity => {
return ownerEntity.entity.entityUsers.some(entityUser => {
return entityUser.userId == user?.id
})
})
.container
.center
h1= project.name
p.flow-text= project.description
if isOwnedByUser
.row
.col.s12
a.btn.black(href=`/projects/${project.id}/tracker/trail`) audit trail
.divider
table
thead
tr
th Title Text
th Artifact
th Chapter
th translator
th proof reader
tbody
each translationChapter in translationChapters.sort((a, b) => a.index - b.index)
tr
-
const title = translationChapter.translationChunks.length > 0 ? translationChapter.translationChunks.sort((a, b) => a.index - b.index)[0].text : "N/A"
td
a.tracker-title-cell(href=`/projects/${project.id}/tracker/${translationChapter.id}`, title=title)= title
td #{translationChapter.translationArtifactVersion.artifactVersion.artifact.name} - #{translationChapter.translationArtifactVersion.name} - #{translationChapter.translationArtifactVersion.artifactVersion.tag}
td= translationChapter.index
td
td

View File

@@ -17,6 +17,9 @@ block content
.row
.col.s12
a.btn.black(href=`/projects/${project.id}/campaign`) funding campaign
.row
.col.s12
a.btn.black(href=`/projects/${project.id}/tracker`) tracker
.row
.col.s12
form(action=`/projects/${project.id}/sheets`, method="post")