Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): fixes edit pane on case type #5507

Merged
merged 6 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/dispatch/static/dispatch/src/case/type/NewEditSheet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ import PluginMetadataInput from "@/plugin/PluginMetadataInput.vue"
import ServiceSelect from "@/service/ServiceSelect.vue"
import ProjectSelect from "@/project/ProjectSelect.vue"
import TemplateSelect from "@/document/template/TemplateSelect.vue"
import ProjectApi from "@/project/api"

export default {
setup() {
Expand Down Expand Up @@ -220,8 +221,12 @@ export default {
},
created() {
if (this.$route.query.project) {
// required for plugin metadata
this.project = { name: this.$route.query.project }
whitdog47 marked this conversation as resolved.
Show resolved Hide resolved
whitdog47 marked this conversation as resolved.
Show resolved Hide resolved
this.incidentProject = this.project
ProjectApi.getAll({ q: this.$route.query.project }).then((response) => {
this.incidentProject = response.data.items[0]
this.project = response.data.items[0]
})
}
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default {

if (this.project) {
filterOptions.filters = {
project: [this.project],
project_id: this.project_id,
enabled: ["true"],
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/dispatch/static/dispatch/src/service/ServiceSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ export default {
}

if (this.project) {
filterOptions.filters.project_id = this.project.map((p) => p.id)
filterOptions.filters.project_id = this.project.id
}

if (this.healthMetrics) {
filterOptions.filters.health_metrics = ["true"]
}

filterOptions = SearchUtils.createParametersFromTableOptions({ ...filterOptions })
filterOptions = SearchUtils.createParametersFromTableOptions({ ...filterOptions }, "Service")

ServiceApi.getAll(filterOptions).then((response) => {
this.items = response.data.items
Expand Down
Loading