Webhook Editor

This commit is contained in:
Kuchenpirat 2025-07-29 23:44:06 +00:00
commit 5afa928f58

View file

@ -50,19 +50,20 @@
</div> </div>
</template> </template>
<script lang="ts"> <script setup lang="ts">
import type { ReadWebhook } from "~/lib/api/types/household"; import type { ReadWebhook } from "~/lib/api/types/household";
import { timeLocalToUTC, timeUTCToLocal } from "~/composables/use-group-webhooks"; import { timeLocalToUTC, timeUTCToLocal } from "~/composables/use-group-webhooks";
export default defineNuxtComponent({ const props = defineProps<{
props: { webhook: ReadWebhook;
webhook: { }>();
type: Object as () => ReadWebhook,
required: true, const emit = defineEmits<{
}, delete: [id: string];
}, save: [webhook: ReadWebhook];
emits: ["delete", "save", "test"], test: [id: string];
setup(props, { emit }) { }>();
const i18n = useI18n(); const i18n = useI18n();
const itemUTC = ref<string>(props.webhook.scheduledTime); const itemUTC = ref<string>(props.webhook.scheduledTime);
const itemLocal = ref<string>(timeUTCToLocal(props.webhook.scheduledTime)); const itemLocal = ref<string>(timeUTCToLocal(props.webhook.scheduledTime));
@ -88,14 +89,4 @@ export default defineNuxtComponent({
useSeoMeta({ useSeoMeta({
title: i18n.t("settings.webhooks.webhooks"), title: i18n.t("settings.webhooks.webhooks"),
}); });
return {
webhookCopy,
scheduledTime,
handleSave,
itemUTC,
itemLocal,
};
},
});
</script> </script>