Skip to content

Commit

Permalink
DONE #83
Browse files Browse the repository at this point in the history
  • Loading branch information
eboileau committed May 23, 2024
1 parent 2a5dcc8 commit ae91d16
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
4 changes: 2 additions & 2 deletions client/src/services/dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async function loadAllDatasets(datasetsRef = null, refresh = false) {
allDatasetsCache = response.data
allDatasetsByIdCache = null
} catch (err) {
console.log(`Failed to fetch all dataset: ${error}`)
console.log(`Failed to fetch all dataset: ${err}`)
}
}
if (datasetsRef !== null) {
Expand Down Expand Up @@ -44,7 +44,7 @@ async function loadMyDatasets(datasetsRef = null, refresh = false) {
myDatasetsCache = response.data
myDatasetsByIdCache = null
} catch (err) {
console.log(`Failed to fetch MY dataset: ${error}`)
console.log(`Failed to fetch MY dataset: ${err}`)
}
}
if (datasetsRef !== null) {
Expand Down
4 changes: 2 additions & 2 deletions client/src/services/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async function loadAllProjects(projectsRef = null, refresh = false) {
allProjectsCache = response.data
allProjectsByIdCache = null
} catch (err) {
console.log(`Failed to fetch all projects: ${error}`)
console.log(`Failed to fetch all projects: ${err}`)
}
}
if (projectsRef !== null) {
Expand Down Expand Up @@ -44,7 +44,7 @@ async function loadMyProjects(projectsRef = null, refresh = false) {
myProjectsCache = response.data
myProjectsByIdCache = null
} catch (err) {
console.log(`Failed to fetch my projects: ${error}`)
console.log(`Failed to fetch my projects: ${err}`)
}
}
if (projectsRef !== null) {
Expand Down
23 changes: 21 additions & 2 deletions client/src/views/AccessView.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<script setup>
import { ref, onMounted } from 'vue'
import { useAccessToken } from '@/stores/AccessToken.js'
import { DIALOG, useDialogState } from '@/stores/DialogState.js'
import { loadProjects } from '@/services/project'
import StyledHeadline from '@/components/ui/StyledHeadline.vue'
import SubTitle from '@/components/ui/SubTitle.vue'
import LabeledItem from '@/components/ui/LabeledItem.vue'
import ItemBox from '@/components/ui/ItemBox.vue'
import { useAccessToken } from '@/stores/AccessToken.js'
import { DIALOG, useDialogState } from '@/stores/DialogState.js'
const accessToken = useAccessToken()
const dialogState = useDialogState()
const records = ref()
function changePassword() {
dialogState.$patch({
state: DIALOG.CHANGE_PASSWORD,
Expand All @@ -17,6 +22,11 @@ function changePassword() {
token: null
})
}
onMounted(() => {
// only list my projects
loadProjects(records, null, true)
})
</script>

<template>
Expand All @@ -36,5 +46,14 @@ function changePassword() {
</LabeledItem>
</ItemBox>
</SectionLayout>
<SectionLayout>
<SubTitle>Projects created upon request</SubTitle>
<Divider />
<DataTable :value="records" tableStyle="min-width: 50rem">
<Column field="project_id" header="SMID" />
<Column field="project_title" header="Title" />
<Column field="date_added" header="Added" />
</DataTable>
</SectionLayout>
</DefaultLayout>
</template>

0 comments on commit ae91d16

Please sign in to comment.