-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(dashboard/user): profile view (#320)
* feat(dashboard/profile-view): started work on concept of user settings component * feat(dashboard/user): Finalized outer look of user settings card feat(dashboard/user): added change pin dialog to user settings card * refactor(dashboard/user): removed change pin component * feat(dashboard/user): added change pin form * feat(dashboard/components): added FormSection component feat(dashboard/user-profile): removed dialog for changing pin, added form section for changing pin * feat(dashboard/profile-view): created ChangePasswordForm * feat(dashboard/profile-view): added password change dialog * feat(dashboard/profile-view): added delete api key and change api key links and confirmation dialogs * feat(dashboard/profile-view): added extensive data processing logic to user settings component * feat(dashboard/profile-view): added translations * feat(dashboard/profile-view): added user info to profile view * fix(dashboard/user-profile-view): max length for pincode showing dollar sign fix(dashboard/user-profile-view): cursor not showing pointer on change api key and change password buttons * feat(common/userstore): Added fetchGewisUser method * fix(dashboard/user-profile-view): type-check errors
- Loading branch information
1 parent
d416d03
commit 282695f
Showing
12 changed files
with
479 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<template> | ||
<div class="flex flex-column gap-2"> | ||
<div class="flex flex-row align-items-center"> | ||
<h4 class="flex-grow-1">{{ header }}</h4> | ||
<div class="flex flex-row "> | ||
<Button v-if="simpleSave" icon="pi pi-save" class="my-0" @click="toggleEdit(true)" label="Save" ></Button> | ||
<Button v-else-if="!edit" icon="pi pi-pencil" class="my-0" @click="toggleEdit(true)" label="Edit" ></Button> | ||
<div v-else class="flex flex-row gap-2"> | ||
<Button icon ="pi pi-check" class="my-0" @click="handleSave" /> | ||
<Button icon="pi pi-times" class="my-0" @click="cancel" /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<slot :edit="edit" /> | ||
<Divider class="w-full" v-if="divider" /> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import {onMounted, ref} from "vue"; | ||
import Divider from "primevue/divider"; | ||
import Button from "primevue/button"; | ||
const props = defineProps({ | ||
header: { | ||
type: String, | ||
required: true | ||
}, | ||
enableEdit: { | ||
type: Boolean, | ||
required: false, | ||
default: false, | ||
}, | ||
modelValue: { | ||
type: Boolean, | ||
required: false, | ||
}, | ||
divider: { | ||
type: Boolean, | ||
required: false, | ||
default: false, | ||
}, | ||
simpleSave: { | ||
type: Boolean, | ||
required: false, | ||
default: false, | ||
} | ||
}); | ||
const emit = defineEmits(['update:modelValue', 'save', 'cancel']); | ||
const edit = ref(props.modelValue); | ||
const toggleEdit = (value: boolean) => { | ||
edit.value = value; | ||
emit('update:modelValue', value); | ||
}; | ||
const cancel = () => { | ||
emit('cancel'); | ||
toggleEdit(false); | ||
}; | ||
const handleSave = () => { | ||
emit('save'); | ||
toggleEdit(false); | ||
}; | ||
onMounted(() => { | ||
if (props.simpleSave) { | ||
toggleEdit(true); | ||
} | ||
}); | ||
</script> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.