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

Forces the user to specify the incident project #2673

Merged
merged 1 commit into from
Nov 8, 2022
Merged
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
15 changes: 13 additions & 2 deletions src/dispatch/static/dispatch/src/case/type/NewEditSheet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,16 @@
/>
</ValidationObserver>
</v-flex>
<v-flex xs12>
<v-flex xs6>
<project-select label="Incident Project" v-model="incidentProject" />
</v-flex>
<v-flex xs6>
<ValidationObserver disabled>
<incident-type-select label="Incident Type" v-model="incident_type" />
<incident-type-select
label="Incident Type"
:project="incidentProject"
v-model="incident_type"
/>
</ValidationObserver>
</v-flex>
<v-flex xs 12>
Expand Down Expand Up @@ -131,6 +138,7 @@ import { required } from "vee-validate/dist/rules"
import IncidentTypeSelect from "@/incident/type/IncidentTypeSelect.vue"
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"

extend("required", {
Expand All @@ -145,6 +153,7 @@ export default {
IncidentTypeSelect,
PluginMetadataInput,
ServiceSelect,
ProjectSelect,
TemplateSelect,
ValidationObserver,
ValidationProvider,
Expand All @@ -153,6 +162,7 @@ export default {
data() {
return {
visibilities: ["Open", "Restricted"],
incidentProject: {},
}
},

Expand Down Expand Up @@ -186,6 +196,7 @@ export default {
created() {
if (this.query.project) {
this.project = { name: this.query.project }
this.incidentProject = this.project
}
},
}
Expand Down