Skip to content

Commit

Permalink
fix: fetching of mailbox on reopen
Browse files Browse the repository at this point in the history
  • Loading branch information
krantheman committed Dec 10, 2024
1 parent 25d3fde commit 51d30bc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions frontend/src/components/Settings/MailboxSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,26 @@
</div>
</template>
<script setup>
import { ref, watch } from 'vue'
import { ref, watch, onMounted } from 'vue'
import { Switch, TextInput, createDocumentResource } from 'frappe-ui'
import Link from '@/components/Controls/Link.vue'
import { userStore } from '@/stores/user'
const { userResource, defaultOutgoing } = userStore()
const email = ref(defaultOutgoing.data)
watch(email, () => {
const fetchMailbox = () => {
mailbox.name = email.value
mailbox.reload()
})
}
onMounted(fetchMailbox)
watch(email, fetchMailbox)
const mailbox = createDocumentResource({
doctype: 'Mailbox',
name: email.value,
auto: false,
transform(data) {
for (const d of [
'enabled',
Expand Down

0 comments on commit 51d30bc

Please sign in to comment.