diff --git a/src/api/reports.js b/src/api/reports.js
index e9687a01..51a8fa7a 100644
--- a/src/api/reports.js
+++ b/src/api/reports.js
@@ -11,12 +11,7 @@ export async function fetchReports(authHost, token) {
})
}
-// export function deleteNote(reportId, noteId) {
-// const updatedNotes = reports
-// .find(report => report.id === reportId)
-// .notes
-// .filter(note => note.id !== noteId)
-// return updatedNotes
-// }
+export async function toggleReportsFilter(authHost, token, filters) {
+}
const authHeaders = (token) => token ? { 'Authorization': `Bearer ${getToken()}` } : {}
diff --git a/src/lang/en.js b/src/lang/en.js
index 8e0e71b0..f3b90d6f 100644
--- a/src/lang/en.js
+++ b/src/lang/en.js
@@ -213,5 +213,11 @@ export default {
deleteCompleted: 'Delete comleted',
deleteCanceled: 'Delete canceled',
noNotes: 'No notes to display'
+ },
+ reportsFilter: {
+ inputPlaceholder: 'Select filter',
+ open: 'Open',
+ closed: 'Closed',
+ resolved: 'Resolved'
}
}
diff --git a/src/store/modules/reports.js b/src/store/modules/reports.js
index 01d48027..08fd1055 100644
--- a/src/store/modules/reports.js
+++ b/src/store/modules/reports.js
@@ -1,4 +1,4 @@
-import { fetchReports } from '@/api/reports'
+import { fetchReports, toggleReportsFilter } from '@/api/reports'
const reports = {
state: {
@@ -29,6 +29,10 @@ const reports = {
commit('SET_REPORTS', response.data.reports)
commit('SET_INDEX')
commit('SET_LOADING', false)
+ },
+ async ToggleReportsFilter({ getters }, filters) {
+ const response = await toggleReportsFilter(getters.authHost, getters.token, filters)
+ return response.data
}
// async AddNote({ commit, state, getters }, { reportId, note }) {
// const report = state.fetchedReports.find(report => report.id === reportId)
diff --git a/src/views/reports/components/ReportsFilter.vue b/src/views/reports/components/ReportsFilter.vue
new file mode 100644
index 00000000..194c8b02
--- /dev/null
+++ b/src/views/reports/components/ReportsFilter.vue
@@ -0,0 +1,48 @@
+
+
+ {{ $t('reportsFilter.open') }}
+ {{ $t('reportsFilter.closed') }}
+ {{ $t('reportsFilter.resolved') }}
+
+
+
+
+
+
diff --git a/src/views/reports/index.vue b/src/views/reports/index.vue
index f02d7fc7..10dcade8 100644
--- a/src/views/reports/index.vue
+++ b/src/views/reports/index.vue
@@ -1,6 +1,9 @@
{{ $t('reports.reports') }}
+
+
+
@@ -11,9 +14,10 @@