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

Fixing export preview missing scroll for incidents, cases, and tasks #3919

Merged
merged 3 commits into from
Nov 1, 2023
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
135 changes: 74 additions & 61 deletions src/dispatch/static/dispatch/src/case/TableExportDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<v-card-title>
<span class="text-h5">Export Cases</span>
</v-card-title>
<v-stepper v-model="e1">

Check failure on line 10 in src/dispatch/static/dispatch/src/case/TableExportDialog.vue

View workflow job for this annotation

GitHub Actions / build

'v-stepper' has been removed
<v-stepper-header>
<v-stepper-item :complete="e1 > 1" :value="1" editable> Filter Data </v-stepper-item>
<v-divider />
Expand All @@ -17,71 +17,77 @@
</v-stepper-header>
<v-stepper-window>
<v-stepper-window-item :value="1">
<v-list density="compact">
<v-list-item>
<date-window-input v-model="reported_at" label="Reported At" />
</v-list-item>
<v-list-item>
<project-combobox v-model="project" label="Projects" />
</v-list-item>
<v-list-item>
<tag-filter-auto-complete v-model="tag" label="Tags" />
</v-list-item>
<v-list-item>
<tag-type-filter-combobox v-model="tag_type" label="Tag Types" />
</v-list-item>
<v-list-item>
<case-type-combobox v-model="case_type" />
</v-list-item>
<v-list-item>
<case-severity-combobox v-model="case_severity" />
</v-list-item>
<v-list-item>
<case-priority-combobox v-model="case_priority" />
</v-list-item>
<v-list-item>
<case-status-multi-select v-model="status" />
</v-list-item>
</v-list>
<v-spacer />
<v-btn @click="closeExport()" variant="text"> Cancel </v-btn>
<v-btn color="info" @click="e1 = 2"> Continue </v-btn>
<div class="scrollable-container">
<v-list density="compact">
<v-list-item>
<date-window-input v-model="reported_at" label="Reported At" />
</v-list-item>
<v-list-item>
<project-combobox v-model="project" label="Projects" />
</v-list-item>
<v-list-item>
<tag-filter-auto-complete v-model="tag" label="Tags" />
</v-list-item>
<v-list-item>
<tag-type-filter-combobox v-model="tag_type" label="Tag Types" />
</v-list-item>
<v-list-item>
<case-type-combobox v-model="case_type" />
</v-list-item>
<v-list-item>
<case-severity-combobox v-model="case_severity" />
</v-list-item>
<v-list-item>
<case-priority-combobox v-model="case_priority" />
</v-list-item>
<v-list-item>
<case-status-multi-select v-model="status" />
</v-list-item>
</v-list>
<v-spacer />
<v-btn @click="closeExport()" variant="text"> Cancel </v-btn>
<v-btn color="info" @click="e1 = 2"> Continue </v-btn>
</div>
</v-stepper-window-item>
<v-stepper-window-item :value="2">
<v-autocomplete
v-model="selectedFields"
:items="allFields"
label="Fields"
multiple
chips
return-object
/>
<v-spacer />
<v-btn @click="closeExport()" variant="text"> Cancel </v-btn>
<v-btn color="info" @click="e1 = 3"> Continue </v-btn>
<div class="scrollable-container">
<v-autocomplete
v-model="selectedFields"
:items="allFields"
label="Fields"
multiple
chips
return-object
/>
<v-spacer />
<v-btn @click="closeExport()" variant="text"> Cancel </v-btn>
<v-btn color="info" @click="e1 = 3"> Continue </v-btn>
</div>
</v-stepper-window-item>
<v-stepper-window-item :value="3">
<v-data-table
hide-default-footer
:headers="selectedFields"
:items="items"
:loading="previewRowsLoading"
>
<template #item.case_severity.name="{ item }">
<case-severity :severity="item.case_severity.name" />
</template>
<template #item.case_priority.name="{ item }">
<case-priority :priority="item.case_priority.name" />
</template>
<template #item.status="{ item }">
<case-status :status="item.status" :id="item.id" />
</template>
</v-data-table>
<v-spacer />
<v-btn @click="closeExport()" variant="text"> Cancel </v-btn>
<v-badge :model-value="!!total" color="info" bordered :content="total">
<v-btn color="info" @click="exportToCSV()" :loading="exportLoading"> Export </v-btn>
</v-badge>
<div class="scrollable-container">
<v-data-table
hide-default-footer
:headers="selectedFields"
:items="items"
:loading="previewRowsLoading"
>
<template #item.case_severity.name="{ item }">
<case-severity :severity="item.case_severity.name" />
</template>
<template #item.case_priority.name="{ item }">
<case-priority :priority="item.case_priority.name" />
</template>
<template #item.status="{ item }">
<case-status :status="item.status" :id="item.id" />
</template>
</v-data-table>
<v-spacer />
<v-btn @click="closeExport()" variant="text"> Cancel </v-btn>
<v-badge :model-value="!!total" color="info" bordered :content="total">
<v-btn color="info" @click="exportToCSV()" :loading="exportLoading"> Export </v-btn>
</v-badge>
</div>
</v-stepper-window-item>
</v-stepper-window>
</v-stepper>
Expand Down Expand Up @@ -229,3 +235,10 @@
},
}
</script>

<style scoped>
.scrollable-container {
max-height: 60vh; /* Adjust as needed */
overflow-y: auto;
}
</style>
137 changes: 75 additions & 62 deletions src/dispatch/static/dispatch/src/incident/TableExportDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<v-card-title>
<span class="text-h5">Export Incidents</span>
</v-card-title>
<v-stepper v-model="e1">

Check failure on line 10 in src/dispatch/static/dispatch/src/incident/TableExportDialog.vue

View workflow job for this annotation

GitHub Actions / build

'v-stepper' has been removed
<v-stepper-header>
<v-stepper-item :complete="e1 > 1" :value="1" editable> Filter Data </v-stepper-item>
<v-divider />
Expand All @@ -17,72 +17,78 @@
</v-stepper-header>
<v-stepper-window>
<v-stepper-window-item :value="1">
<v-list density="compact">
<v-list-item>
<date-window-input v-model="reported_at" label="Reported At" />
</v-list-item>
<v-list-item>
<project-combobox v-model="project" label="Projects" />
</v-list-item>
<v-list-item>
<tag-filter-auto-complete v-model="tag" label="Tags" />
</v-list-item>
<v-list-item>
<tag-type-filter-combobox v-model="tag_type" label="Tag Types" />
</v-list-item>
<v-list-item>
<incident-type-combobox v-model="incident_type" />
</v-list-item>
<v-list-item>
<incident-severity-combobox v-model="incident_severity" />
</v-list-item>
<v-list-item>
<incident-priority-combobox v-model="incident_priority" />
</v-list-item>
<v-list-item>
<incident-status-multi-select v-model="status" />
</v-list-item>
</v-list>
<v-spacer />
<v-btn @click="closeExport()" variant="text"> Cancel </v-btn>
<v-btn color="info" @click="e1 = 2"> Continue </v-btn>
<div class="scrollable-container">
<v-list density="compact">
<v-list-item>
<date-window-input v-model="reported_at" label="Reported At" />
</v-list-item>
<v-list-item>
<project-combobox v-model="project" label="Projects" />
</v-list-item>
<v-list-item>
<tag-filter-auto-complete v-model="tag" label="Tags" />
</v-list-item>
<v-list-item>
<tag-type-filter-combobox v-model="tag_type" label="Tag Types" />
</v-list-item>
<v-list-item>
<incident-type-combobox v-model="incident_type" />
</v-list-item>
<v-list-item>
<incident-severity-combobox v-model="incident_severity" />
</v-list-item>
<v-list-item>
<incident-priority-combobox v-model="incident_priority" />
</v-list-item>
<v-list-item>
<incident-status-multi-select v-model="status" />
</v-list-item>
</v-list>
<v-spacer />
<v-btn @click="closeExport()" variant="text"> Cancel </v-btn>
<v-btn color="info" @click="e1 = 2"> Continue </v-btn>
</div>
</v-stepper-window-item>
<v-stepper-window-item :value="2">
<v-autocomplete
v-model="selectedFields"
:items="allFields"
item-title="text"
label="Fields"
multiple
chips
return-object
/>
<v-spacer />
<v-btn @click="closeExport()" variant="text"> Cancel </v-btn>
<v-btn color="info" @click="e1 = 3"> Continue </v-btn>
<div class="scrollable-container">
<v-autocomplete
v-model="selectedFields"
:items="allFields"
item-title="text"
label="Fields"
multiple
chips
return-object
/>
<v-spacer />
<v-btn @click="closeExport()" variant="text"> Cancel </v-btn>
<v-btn color="info" @click="e1 = 3"> Continue </v-btn>
</div>
</v-stepper-window-item>
<v-stepper-window-item :value="3">
<v-data-table
hide-default-footer
:headers="selectedFields"
:items="items"
:loading="previewRowsLoading"
>
<template #item.incident_severity.name="{ item }">
<incident-severity :severity="item.incident_severity.name" />
</template>
<template #item.incident_priority.name="{ item }">
<incident-priority :priority="item.incident_priority.name" />
</template>
<template #item.status="{ item }">
<incident-status :status="item.status" :id="item.id" />
</template>
</v-data-table>
<v-spacer />
<v-btn @click="closeExport()" variant="text"> Cancel </v-btn>
<v-badge :model-value="!!total" color="info" bordered :content="total">
<v-btn color="info" @click="exportToCSV()" :loading="exportLoading"> Export </v-btn>
</v-badge>
<div class="scrollable-container">
<v-data-table
hide-default-footer
:headers="selectedFields"
:items="items"
:loading="previewRowsLoading"
>
<template #item.incident_severity.name="{ item }">
<incident-severity :severity="item.incident_severity.name" />
</template>
<template #item.incident_priority.name="{ item }">
<incident-priority :priority="item.incident_priority.name" />
</template>
<template #item.status="{ item }">
<incident-status :status="item.status" :id="item.id" />
</template>
</v-data-table>
<v-spacer />
<v-btn @click="closeExport()" variant="text"> Cancel </v-btn>
<v-badge :model-value="!!total" color="info" bordered :content="total">
<v-btn color="info" @click="exportToCSV()" :loading="exportLoading"> Export </v-btn>
</v-badge>
</div>
</v-stepper-window-item>
</v-stepper-window>
</v-stepper>
Expand Down Expand Up @@ -240,3 +246,10 @@
},
}
</script>

<style scoped>
.scrollable-container {
max-height: 60vh; /* Adjust as needed */
overflow-y: auto;
}
</style>
Loading
Loading