Skip to content

Commit

Permalink
Save fullName and photoUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
Sébastien LeBlanc committed Nov 20, 2023
1 parent 6d3a17e commit 485e0f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/components/TimeEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
</div>
<div>
<label>{{ $t('Projet') }}<span class="text-red-500">*</span></label>
<!-- TODO: Fix type error in @create -->
<Multiselect
v-model="model.project"
:options="projects"
Expand Down
9 changes: 9 additions & 0 deletions src/stores/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,17 @@ export const useIndexStore = defineStore('store', () => {
const docSnap = await getDoc(docRef);
if (!docSnap.exists()) {
await setDoc(docRef, {
displayName: result.user.displayName,
email: result.user.email,
photoURL: result.user.photoURL,
weekTarget: '40:00',
});
} else {
await updateDoc(docRef, {
displayName: result.user.displayName,
email: result.user.email,
photoURL: result.user.photoURL,
})
}
}
async function updateWeekTarget(weekTarget: string) {
Expand Down

0 comments on commit 485e0f8

Please sign in to comment.