alerts: per-support-team webhook + printedparts routing

This commit is contained in:
2026-07-22 13:32:01 -04:00
parent e1c7af049c
commit 73b05e5b1c
9 changed files with 142 additions and 21 deletions

View File

@@ -63,6 +63,10 @@
<label for="teamurl">Team URL</label>
<input id="teamurl" v-model="teamForm.teamurl" type="text" class="form-control" placeholder="ServiceNow group link" />
</div>
<div class="form-group">
<label for="webhookurl">Alert Webhook URL</label>
<input id="webhookurl" v-model="teamForm.webhookurl" type="text" class="form-control" placeholder="Microsoft Teams webhook for this team's alerts" />
</div>
<div v-if="teamError" class="error-message">{{ teamError }}</div>
</div>
<div class="modal-footer">
@@ -202,7 +206,7 @@ function contactEmail(contact) {
const showTeamModal = ref(false)
const editingTeam = ref(null)
const teamError = ref('')
const teamForm = ref({ teamname: '', teamurl: '' })
const teamForm = ref({ teamname: '', teamurl: '', webhookurl: '' })
const showContactModal = ref(false)
const editingContact = ref(null)
@@ -238,8 +242,8 @@ function openContactsModal(team) {
function openTeamModal(team = null) {
editingTeam.value = team
teamForm.value = team
? { teamname: team.teamname || '', teamurl: team.teamurl || '' }
: { teamname: '', teamurl: '' }
? { teamname: team.teamname || '', teamurl: team.teamurl || '', webhookurl: team.webhookurl || '' }
: { teamname: '', teamurl: '', webhookurl: '' }
teamError.value = ''
showTeamModal.value = true
}
@@ -250,7 +254,8 @@ async function saveTeam() {
try {
const payload = {
teamname: teamForm.value.teamname,
teamurl: teamForm.value.teamurl || null
teamurl: teamForm.value.teamurl || null,
webhookurl: teamForm.value.webhookurl || null
}
if (editingTeam.value) {
await supportteamsApi.update(editingTeam.value.supportteamid, payload)