2021-05-05 08:06:45 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div class="notelist-wrap">
|
|
|
|
<h3 class="block-title">
|
|
|
|
{{ $t('NOTES.HEADER.TITLE') }}
|
|
|
|
</h3>
|
|
|
|
<add-note @add="onAddNote" />
|
|
|
|
<contact-note
|
|
|
|
v-for="note in notes"
|
|
|
|
:id="note.id"
|
|
|
|
:key="note.id"
|
|
|
|
:note="note.content"
|
|
|
|
:user-name="note.user.name"
|
|
|
|
:time-stamp="note.created_at"
|
|
|
|
:thumbnail="note.user.thumbnail"
|
|
|
|
@edit="onEditNote"
|
|
|
|
@delete="onDeleteNote"
|
|
|
|
/>
|
|
|
|
<div class="button-wrap">
|
2021-06-14 04:19:17 +00:00
|
|
|
<woot-button variant="link" @click="onclick">
|
2021-05-05 08:06:45 +00:00
|
|
|
{{ $t('NOTES.FOOTER.BUTTON') }}
|
|
|
|
<i class="ion-arrow-right-c" />
|
|
|
|
</woot-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import ContactNote from './ContactNote';
|
|
|
|
import AddNote from './AddNote';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
ContactNote,
|
|
|
|
AddNote,
|
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
|
|
notes: {
|
|
|
|
type: Array,
|
|
|
|
default: () => [],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
onclick() {
|
|
|
|
this.$emit('show');
|
|
|
|
},
|
|
|
|
onAddNote(value) {
|
2021-06-14 04:19:17 +00:00
|
|
|
this.$emit('add', value);
|
2021-05-05 08:06:45 +00:00
|
|
|
},
|
|
|
|
onEditNote(value) {
|
2021-06-14 04:19:17 +00:00
|
|
|
this.$emit('edit', value);
|
2021-05-05 08:06:45 +00:00
|
|
|
},
|
|
|
|
onDeleteNote(value) {
|
2021-06-14 04:19:17 +00:00
|
|
|
this.$emit('delete', value);
|
2021-05-05 08:06:45 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.button-wrap {
|
|
|
|
margin-top: var(--space-one);
|
|
|
|
}
|
|
|
|
</style>
|