From 57e94c33b528d0f67da56bae2ca34f3c786a8cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ordo=C3=B1ez?= Date: Wed, 22 Jul 2020 22:24:32 -0400 Subject: [PATCH] Unify Checks, Notes and Signatures, Support inner actions in Home Cards (#66) * Checklist, Notes and signature in the same tab * adjust options for editing reports on index cards --- src/ClientApp/pages/Reports/_id/index.vue | 150 +++++++++++++--------- src/ClientApp/pages/Reports/index.vue | 2 +- src/ClientApp/pages/index.vue | 41 +++++- 3 files changed, 123 insertions(+), 70 deletions(-) diff --git a/src/ClientApp/pages/Reports/_id/index.vue b/src/ClientApp/pages/Reports/_id/index.vue index 07962cab..43303786 100644 --- a/src/ClientApp/pages/Reports/_id/index.vue +++ b/src/ClientApp/pages/Reports/_id/index.vue @@ -103,29 +103,38 @@ - + - mdi-check + Report Details + mdi-message-bulleted - + mdi-message-bulleted + Photo Record mdi-folder-multiple-image - + mdi-signature-freehand - - - - Items & Params + + + + Check List + + + - - - - - - - - - mdi-plus - - + + + + + Notes + + + + + + mdi-plus + + +
@@ -239,11 +251,56 @@ + + +
- -
-
+ + + + + + + + Signatures + + +
+ + +

{{ signature.title }}

+
{{ signature.annotation }}
+ Principal Sign +
+
+ + + + + + + + + + + + + + + + + + + +
+
+
+
@@ -346,47 +403,14 @@
- - - -
- - -

{{ signature.title }}

-
{{ signature.annotation }}
- Principal Sign -
-
- - - - - - - - - - - - - - - - - - - -
-
-
-
+ + + + + diff --git a/src/ClientApp/pages/Reports/index.vue b/src/ClientApp/pages/Reports/index.vue index fd0289c2..6155efcf 100644 --- a/src/ClientApp/pages/Reports/index.vue +++ b/src/ClientApp/pages/Reports/index.vue @@ -49,7 +49,7 @@ class="mr-2" @click="$router.push({ name: 'Reports-id', params: { id: item.id} })" > - mdi-file-chart + mdi-pencil - - + + {{ option.icon }} @@ -23,6 +23,18 @@ + + + + + + {{ action.icon }} + + {{ action.text }} + + + + @@ -52,17 +64,34 @@ export default class IndexPage extends Vue{ }, { text: 'Edit Report', - helpText: 'Edit or remove a previously created report from a list and optionally allows to go directly to the last created or edited report by current user', + helpText: 'Click one of the Options bellow', icon: 'mdi-pencil', color: 'accent', path: () => { if (this.$auth.user.lastEditedReport) - if(confirm('Do you wanna edit the last edited report?')) + if(confirm('Click one of the Options bellow')) return `/reports/${this.$auth.user.lastEditedReport}` else return `/reports` else return `/reports` - } + }, + innerActions: [ + { + text: 'Edit Last', + color: 'primary', + action: () => { + if (this.$auth.user.lastEditedReport) + window.$nuxt.$router.push(`/reports/${this.$auth.user.lastEditedReport}`) + } + }, + { + text: 'List All', + color: 'primary', + action: () => { + window.$nuxt.$router.push(`/reports`) + } + } + ] }, { text: 'View or Export Report', @@ -76,7 +105,7 @@ export default class IndexPage extends Vue{ helpText: 'Allows to Configure reports check lists, signatures, titles and names', icon: 'mdi-cog-outline', color: 'accent', - path: '/configurations' + path: '/configurations?configurationonly=true' } ]