Skip to content

Commit c87bdf0

Browse files
committed
Convert from typescript to javascript
1 parent 73d5b50 commit c87bdf0

1 file changed

Lines changed: 10 additions & 16 deletions

File tree

web/pages/settings/index.vue

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@
401401
</v-container>
402402
</template>
403403

404-
<script lang="ts">
404+
<script>
405405
import Vue from 'vue'
406406
import {
407407
mdiArrowLeft,
@@ -414,10 +414,8 @@ import {
414414
mdiEyeOff,
415415
mdiSquareEditOutline,
416416
} from '@mdi/js'
417-
import { Phone } from '~/models/phone'
418417
import { ErrorMessages } from '~/plugins/errors'
419418
import LoadingButton from '~/components/LoadingButton.vue'
420-
import { EntitiesWebhook } from '~/models/api'
421419
422420
export default Vue.extend({
423421
name: 'SettingsIndex',
@@ -477,10 +475,8 @@ export default Vue.extend({
477475
},
478476
479477
methods: {
480-
showEditPhone(phoneId: string) {
481-
const phone = this.$store.getters.getPhones.find(
482-
(x: Phone) => x.id === phoneId
483-
)
478+
showEditPhone(phoneId) {
479+
const phone = this.$store.getters.getPhones.find((x) => x.id === phoneId)
484480
if (!phone) {
485481
return
486482
}
@@ -489,10 +485,8 @@ export default Vue.extend({
489485
this.resetErrors()
490486
},
491487
492-
onWebhookEdit(webhookId: string) {
493-
const webhook = this.webhooks.find(
494-
(x: EntitiesWebhook) => x.id === webhookId
495-
)
488+
onWebhookEdit(webhookId) {
489+
const webhook = this.webhooks.find((x) => x.id === webhookId)
496490
if (!webhook) {
497491
return
498492
}
@@ -546,7 +540,7 @@ export default Vue.extend({
546540
this.showWebhookEdit = false
547541
this.loadWebhooks()
548542
})
549-
.catch((errors: ErrorMessages) => {
543+
.catch((errors) => {
550544
this.errorMessages = errors
551545
})
552546
.finally(() => {
@@ -567,15 +561,15 @@ export default Vue.extend({
567561
this.showWebhookEdit = false
568562
this.loadWebhooks()
569563
})
570-
.catch((errors: ErrorMessages) => {
564+
.catch((errors) => {
571565
this.errorMessages = errors
572566
})
573567
.finally(() => {
574568
this.updatingWebhook = false
575569
})
576570
},
577571
578-
deleteWebhook(webhookId: string) {
572+
deleteWebhook(webhookId) {
579573
this.updatingWebhook = true
580574
this.$store
581575
.dispatch('deleteWebhook', webhookId)
@@ -596,15 +590,15 @@ export default Vue.extend({
596590
this.loadingWebhooks = true
597591
this.$store
598592
.dispatch('getWebhooks')
599-
.then((webhooks: Array<EntitiesWebhook>) => {
593+
.then((webhooks) => {
600594
this.webhooks = webhooks
601595
})
602596
.finally(() => {
603597
this.loadingWebhooks = false
604598
})
605599
},
606600
607-
deletePhone(phoneId: string) {
601+
deletePhone(phoneId) {
608602
this.updatingPhone = true
609603
this.$store.dispatch('deletePhone', phoneId).finally(() => {
610604
this.updatingPhone = false

0 commit comments

Comments
 (0)