@burh/nuxt-core 1.0.486 → 1.0.487
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -258,8 +258,13 @@
|
|
|
258
258
|
<p class="mt-3">{{ note.text }}</p>
|
|
259
259
|
</div>
|
|
260
260
|
<div
|
|
261
|
-
class="d-flex justify-content-
|
|
261
|
+
class="d-flex justify-content-between align-items-center mx-3"
|
|
262
262
|
>
|
|
263
|
+
<p @click.prevent="handleRemoveNote(note)" v-if="String(currentUser.id) === String(note.user_id)" class="notes-date remove-baloon">
|
|
264
|
+
Excluir
|
|
265
|
+
</p>
|
|
266
|
+
<div v-else></div>
|
|
267
|
+
|
|
263
268
|
<p class="notes-date">
|
|
264
269
|
{{ note.created_at | convertDate }}
|
|
265
270
|
</p>
|
|
@@ -625,6 +630,17 @@ export default {
|
|
|
625
630
|
this.getUserFolderData();
|
|
626
631
|
},
|
|
627
632
|
methods: {
|
|
633
|
+
async handleRemoveNote(note) {
|
|
634
|
+
const apiUrl = `${process.env.baseApiUrl}/company/${note.company_id}/user/${note.user_id}/note/${note.id}`;
|
|
635
|
+
|
|
636
|
+
const response = await this.$axios.delete(apiUrl)
|
|
637
|
+
.then(res => res.data)
|
|
638
|
+
.catch(() => {});
|
|
639
|
+
|
|
640
|
+
if (!response || response && response.error) return this.showToast('error', 'Falha ao remover!');
|
|
641
|
+
|
|
642
|
+
this.notes = this.notes.filter(n => n.id !== note.id);
|
|
643
|
+
},
|
|
628
644
|
removeComment(item){
|
|
629
645
|
this.userReportData.comment = undefined;
|
|
630
646
|
this.$emit('remove-comment', item);
|
|
@@ -795,6 +811,9 @@ export default {
|
|
|
795
811
|
}
|
|
796
812
|
},
|
|
797
813
|
computed: {
|
|
814
|
+
currentUser() {
|
|
815
|
+
return this.$store.state.user.currentUser;
|
|
816
|
+
},
|
|
798
817
|
isLocked() {
|
|
799
818
|
return !this.companyHasProduct(
|
|
800
819
|
this.$store.state.loja && this.$store.state.loja.showableProducts && this.$store.state.loja.showableProducts['HISTORICO_USUARIO'] || false
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<div class="header__content row">
|
|
14
|
-
<div class="d-flex align-items-center flex-row
|
|
14
|
+
<div class="d-flex align-items-center flex-row header__title">
|
|
15
15
|
<skeleton-animate :width="300" :height="40" />
|
|
16
16
|
</div>
|
|
17
17
|
<div class="images">
|
|
@@ -101,6 +101,9 @@ export default {
|
|
|
101
101
|
text-align: left!important;
|
|
102
102
|
align-items: flex-start!important;
|
|
103
103
|
justify-content: flex-start!important;
|
|
104
|
+
> .header__title {
|
|
105
|
+
width: 100%;
|
|
106
|
+
}
|
|
104
107
|
> .images {
|
|
105
108
|
margin: 0!important;
|
|
106
109
|
margin-top: 10px!important;
|