@burh/nuxt-core 1.0.486 → 1.0.488

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.
@@ -20,7 +20,7 @@
20
20
  <el-dropdown trigger="click" class="dropdown__content">
21
21
  <span class="title__content icon">
22
22
  {{tool.name}}
23
- <i class="fas fa-angle-down"></i>
23
+ <i class="fas fa-angle-down dropdown__icon"></i>
24
24
  </span>
25
25
  <el-dropdown-menu slot="dropdown">
26
26
  <el-dropdown-item
@@ -535,7 +535,10 @@ export default {
535
535
  font-weight: 600;
536
536
  outline: 0;
537
537
 
538
- padding: 0px 5px;
538
+ padding: 0px 10px;
539
+ .dropdown__icon {
540
+ margin-right: 20px;
541
+ }
539
542
  }
540
543
  }
541
544
 
@@ -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-end align-items-center mr-3"
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 w-100">
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.486",
3
+ "version": "1.0.488",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {