diff --git a/frontend/src/views/ViewObservations.vue b/frontend/src/views/ViewObservations.vue index 3c6a6a4..6046b30 100644 --- a/frontend/src/views/ViewObservations.vue +++ b/frontend/src/views/ViewObservations.vue @@ -56,7 +56,7 @@ -

{{ observation.date }}
{{ observation.whom }} {{ observation.type }}
{{ observation.observed }}

+

{{ observation.date }}
{{ observation.whom }} {{ observation.type }}
{{ shortenedString(observation.observed) }}

{{ observation.date }}, {{ observation.whom }}
{{ observation.type }}, {{ observation.observed }}

Observed by: {{ tutor.name }}

@@ -274,6 +274,14 @@ export default { this.errorMessage = error.response.data; this.$refs.errorModal.show(); }); + }, + shortenedString: function(data) { + if(data.len < 20){ + return data; + } + else{ + return data.substr(0, 20) + "..."; + } } }, watch: {