Skip to content

Commit

Permalink
chore: correctly applying prettier style (#1096)
Browse files Browse the repository at this point in the history
A path was missing in the package.json.
  • Loading branch information
holtgrewe authored Aug 1, 2023
1 parent bfec8a8 commit b12c3ac
Show file tree
Hide file tree
Showing 96 changed files with 500 additions and 496 deletions.
44 changes: 22 additions & 22 deletions cases/vueapp/src/api/cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
async listCase(
csrfToken,
projectUuid,
{ pageNo, pageSize, orderBy, orderDir, queryString }
{ pageNo, pageSize, orderBy, orderDir, queryString },
) {
let queryArr = []
if (pageNo !== undefined) {
Expand All @@ -29,7 +29,7 @@ export default {
const queryStr = queryArr.length ? '?' + queryArr.join('&') : ''
const response = await apiFetch(
csrfToken,
`/cases/ajax/case/list/${projectUuid}/${queryStr}`
`/cases/ajax/case/list/${projectUuid}/${queryStr}`,
)
return await response.json()
},
Expand All @@ -39,7 +39,7 @@ export default {
csrfToken,
`/cases/ajax/case/retrieve-update/${caseUuid}/`,
'GET',
payload
payload,
)
return await response.json()
},
Expand All @@ -49,15 +49,15 @@ export default {
csrfToken,
`/cases/ajax/case/retrieve-update/${caseUuid}/`,
'PATCH',
payload
payload,
)
return await response.json()
},

async loadProjectQcValues(csrfToken, projectUuid) {
const response = await apiFetch(
csrfToken,
`/variants/ajax/project/qc/${projectUuid}/`
`/variants/ajax/project/qc/${projectUuid}/`,
)
return await response.json()
},
Expand Down Expand Up @@ -86,7 +86,7 @@ export default {
const response = await apiFetch(
csrfToken,
`/cases/ajax/case-comment/list-create/${caseUuid}/`,
'GET'
'GET',
)
return await response.json()
},
Expand All @@ -96,7 +96,7 @@ export default {
csrfToken,
`/cases/ajax/case-comment/list-create/${caseUuid}/`,
'POST',
payload
payload,
)
return await response.json()
},
Expand All @@ -105,7 +105,7 @@ export default {
const response = await apiFetch(
csrfToken,
`/cases/ajax/case-comment/retrieve-update-destroy/${caseCommentUuid}/`,
'GET'
'GET',
)
return await response.json()
},
Expand All @@ -115,7 +115,7 @@ export default {
csrfToken,
`/cases/ajax/case-comment/retrieve-update-destroy/${caseCommentUuid}/`,
'PATCH',
payload
payload,
)
return await response.json()
},
Expand All @@ -124,15 +124,15 @@ export default {
await apiFetch(
csrfToken,
`/cases/ajax/case-comment/retrieve-update-destroy/${caseCommentUuid}/`,
'DELETE'
'DELETE',
)
},

async listCasePhenotypeTerms(csrfToken, caseUuid) {
const response = await apiFetch(
csrfToken,
`/cases/ajax/case-phenotype-terms/list-create/${caseUuid}/`,
'GET'
'GET',
)
return await response.json()
},
Expand All @@ -142,7 +142,7 @@ export default {
csrfToken,
`/cases/ajax/case-phenotype-terms/list-create/${caseUuid}/`,
'POST',
payload
payload,
)
return await response.json()
},
Expand All @@ -151,7 +151,7 @@ export default {
const response = await apiFetch(
csrfToken,
`/cases/ajax/case-phenotype-terms/retrieve-update-destroy/${casePhenotypeTermsUuid}/`,
'GET'
'GET',
)
return await response.json()
},
Expand All @@ -161,7 +161,7 @@ export default {
csrfToken,
`/cases/ajax/case-phenotype-terms/retrieve-update-destroy/${casePhenotypeTermsUuid}/`,
'PATCH',
payload
payload,
)
return await response.json()
},
Expand All @@ -170,62 +170,62 @@ export default {
await apiFetch(
csrfToken,
`/cases/ajax/case-phenotype-terms/retrieve-update-destroy/${casePhenotypeTermsUuid}/`,
'DELETE'
'DELETE',
)
},

async fetchAnnotationReleaseInfos(csrfToken, caseUuid) {
const response = await apiFetch(
csrfToken,
`/cases/api/annotation-release-info/list/${caseUuid}/`
`/cases/api/annotation-release-info/list/${caseUuid}/`,
)
return await response.json()
},

async fetchSvAnnotationReleaseInfos(csrfToken, caseUuid) {
const response = await apiFetch(
csrfToken,
`/cases/api/sv-annotation-release-info/list/${caseUuid}/`
`/cases/api/sv-annotation-release-info/list/${caseUuid}/`,
)
return await response.json()
},

async fetchCaseGeneAnnotation(csrfToken, caseUuid) {
const response = await apiFetch(
csrfToken,
`/cases/api/case-gene-annotation/list/${caseUuid}/`
`/cases/api/case-gene-annotation/list/${caseUuid}/`,
)
return await response.json()
},

async fetchCaseAlignmentStats(csrfToken, caseUuid) {
const response = await apiFetch(
csrfToken,
`/cases/api/case-alignment-stats/list/${caseUuid}/`
`/cases/api/case-alignment-stats/list/${caseUuid}/`,
)
return await response.json()
},

async fetchCaseVariantStats(csrfToken, caseUuid) {
const response = await apiFetch(
csrfToken,
`/cases/api/case-variant-stats/list/${caseUuid}/`
`/cases/api/case-variant-stats/list/${caseUuid}/`,
)
return await response.json()
},

async fetchCaseRelatedness(csrfToken, caseUuid) {
const response = await apiFetch(
csrfToken,
`/cases/api/case-relatedness/list/${caseUuid}/`
`/cases/api/case-relatedness/list/${caseUuid}/`,
)
return await response.json()
},

async fetchPermissions(csrfToken, projectUuid) {
const response = await apiFetch(
csrfToken,
`/cases/ajax/user-permissions/${projectUuid}/`
`/cases/ajax/user-permissions/${projectUuid}/`,
)
return await response.json()
},
Expand Down
12 changes: 6 additions & 6 deletions cases/vueapp/src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ export const connectTopRowControls = () => {
updateUserSetting(
casesStore.appContext.csrf_token,
'vueapp.filtration_inline_help',
newValue
newValue,
)
}
const elem = $('#vueapp-filtration-inline-help')
if (elem) {
elem.prop('checked', newValue)
}
}
},
)
watch(
() => casesStore.complexityMode,
Expand All @@ -51,22 +51,22 @@ export const connectTopRowControls = () => {
updateUserSetting(
casesStore.appContext.csrf_token,
'vueapp.filtration_complexity_mode',
newValue
newValue,
)
}
const elem = $('#vueapp-filtration-complexity-mode')
if (elem && elem.val(newValue)) {
elem.val(newValue).change()
}
}
},
)

// Vice versa.
onMounted(() => {
const handleUpdate = () => {
const casesStore = useCasesStore()
casesStore.showInlineHelp = $('#vueapp-filtration-inline-help').prop(
'checked'
'checked',
)
casesStore.complexityMode = $('#vueapp-filtration-complexity-mode').val()
}
Expand All @@ -89,7 +89,7 @@ export const tsTvRatio = (entry) => {
export const downloadFile = (
filename,
contents,
mimeType = 'application/octet-stream'
mimeType = 'application/octet-stream',
) => {
const element = document.createElement('a')
element.setAttribute('href', 'data:' + mimeType + ';base64,' + btoa(contents))
Expand Down
10 changes: 5 additions & 5 deletions cases/vueapp/src/components/CaseDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ casesStore.initializeRes.then(() => {
if (newParams.case && newParams.case !== oldParams.case) {
caseDetailsStore.initialize(caseUuidRef.value)
}
}
},
)
})
.catch((err) => {
Expand Down Expand Up @@ -75,7 +75,7 @@ const handleEditQueryPresetsClicked = async () => {
allPresets.map((p) => ({
value: p.sodar_uuid,
label: p.label,
}))
})),
)
try {
Expand Down Expand Up @@ -301,11 +301,11 @@ const handleUpdateCasePhenotypeTermsClicked = async ({
let origTerms = []
if (casePhenotypeTermsUuid) {
const casePhenotypeTerms = caseDetailsStore.getCasePhenotypeTerms(
casePhenotypeTermsUuid
casePhenotypeTermsUuid,
)
if (!casePhenotypeTerms) {
throw new Error(
`Could not fetch case phenotype terms ${casePhenotypeTermsUuid}`
`Could not fetch case phenotype terms ${casePhenotypeTermsUuid}`,
)
}
origTerms = casePhenotypeTerms.terms
Expand All @@ -326,7 +326,7 @@ const handleUpdateCasePhenotypeTermsClicked = async ({
{
individual,
terms,
}
},
)
}
Expand Down
4 changes: 2 additions & 2 deletions cases/vueapp/src/components/CaseDetailCardAnnotations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ const buildComputedAnnoCountByFlag = (theList) => {
}
const varAnnoCountByFlag = buildComputedAnnoCountByFlag(
caseDetailsStore.varAnnoList
caseDetailsStore.varAnnoList,
)
const svAnnoCountByFlag = buildComputedAnnoCountByFlag(
caseDetailsStore.svrAnnoList
caseDetailsStore.svrAnnoList,
)
</script>
Expand Down
4 changes: 2 additions & 2 deletions cases/vueapp/src/components/CaseDetailCardQueries.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ watch(
try {
const presetSet = await queryPresetsApi.retrievePresetSet(
csrfToken,
newValue
newValue,
)
presetSetLabel.value = presetSet.label
} catch (err) {
console.error('Problem retrieving preset set', err)
} finally {
presetSetLoading.value = false
}
}
},
)
</script>
Expand Down
2 changes: 1 addition & 1 deletion cases/vueapp/src/components/CaseDetailCardTerms.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ watch(
() => termLabels.value,
(_newValue, _oldValue) => {
fetchTermLabels()
}
},
)
onMounted(() => {
Expand Down
8 changes: 4 additions & 4 deletions cases/vueapp/src/components/CaseDetailCardVariantQc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const tsTv = (member) => {
) {
const stats = caseDetailsStore.caseVariantStats[member.name]
return (stats.ontarget_transitions / stats.ontarget_transversions).toFixed(
2
2,
)
} else {
return 0
Expand Down Expand Up @@ -49,15 +49,15 @@ const tsTv = (member) => {
{{
formatLargeInt(
caseDetailsStore.caseVariantStats[member.name]
.ontarget_transitions
.ontarget_transitions,
)
}}
</td>
<td class="text-right">
{{
formatLargeInt(
caseDetailsStore.caseVariantStats[member.name]
.ontarget_transversions
.ontarget_transversions,
)
}}
</td>
Expand All @@ -71,7 +71,7 @@ const tsTv = (member) => {
v-else
class="text-right text-danger font-weight-bold"
:title="`Ts/Tv ratio should be within 2.0-2.9 but is ${tsTv(
member
member,
)}`"
>
<i-bi-exclamation-circle />
Expand Down
2 changes: 1 addition & 1 deletion cases/vueapp/src/components/CaseDetailContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const currentTab = ref('overview')
const caseDetailsStore = useCaseDetailsStore()
const annosLoading = computed(
() => caseDetailsStore.varAnnos === null || caseDetailsStore.svAnnos === null
() => caseDetailsStore.varAnnos === null || caseDetailsStore.svAnnos === null,
)
const annoCount = computed(() => {
if (annosLoading) {
Expand Down
4 changes: 2 additions & 2 deletions cases/vueapp/src/components/CaseDetailPaneAnnotations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const showModal = ({ gridRow, gridApi, smallVariant }) => {
gridRow,
gridApi,
smallVariant,
'refseq'
'refseq',
)
}
Expand All @@ -55,7 +55,7 @@ onMounted(async () => {
const csrfToken = casesStore.appContext.csrfToken
const apiQueryResults = await variantsApi.listCaseVariantsUserAnnotated(
csrfToken,
caseDetailsStore.caseObj.sodar_uuid
caseDetailsStore.caseObj.sodar_uuid,
)
filterQueryStore.queryResults = apiQueryResults.rows
})
Expand Down
Loading

0 comments on commit b12c3ac

Please sign in to comment.