Skip to content

Commit

Permalink
Issue krayin#534 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jitendra-webkul committed Oct 21, 2021
1 parent b202e1b commit e8c0ec5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
9 changes: 7 additions & 2 deletions packages/Webkul/Admin/src/Config/acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,17 @@
], [
'key' => 'settings.other_settings.tags.create',
'name' => 'admin::app.acl.create',
'route' => ['admin.settings.tags.create', 'admin.settings.tags.store'],
'route' => ['admin.settings.tags.create', 'admin.settings.tags.store', 'admin.leads.tags.store'],
'sort' => 1,
], [
'key' => 'settings.other_settings.tags.edit',
'name' => 'admin::app.acl.edit',
'route' => ['admin.settings.tags.edit', 'admin.settings.tags.update'],
'sort' => 1,
], [
'key' => 'settings.other_settings.tags.delete',
'name' => 'admin::app.acl.delete',
'route' => ['admin.settings.tags.delete', 'admin.settings.tags.mass_delete'],
'route' => ['admin.settings.tags.delete', 'admin.settings.tags.mass_delete', 'admin.leads.tags.delete'],
'sort' => 2,
], [
'key' => 'configuration',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@
@push('scripts')
<script type="text/x-template" id="tags-component-template">
<div class="tags-container">
<i class="icon tags-icon" @click="is_dropdown_open = ! is_dropdown_open"></i>
@if (bouncer()->hasPermission('settings.other_settings.tags.create'))
<i class="icon tags-icon" @click="is_dropdown_open = ! is_dropdown_open"></i>
@endif

<ul class="tag-list">
<li v-for='(tag, index) in tags' :style="'background-color: ' + (tag.color ? tag.color : '#546E7A')">
@{{ tag.name }} <i class="icon close-white-icon" @click="removeTag(tag)"></i>
@{{ tag.name }}

@if (bouncer()->hasPermission('settings.other_settings.tags.delete'))
<i class="icon close-white-icon" @click="removeTag(tag)"></i>
@endif
</li>
</ul>

Expand Down Expand Up @@ -208,7 +214,11 @@ class="control"
self.$root.addFlashMessages();
})
.catch(error => {});
.catch(error => {
window.flashMessages = [{'type': 'error', 'message': error.response.data.message}];
self.$root.addFlashMessages()
});
},
removeTag: function(tag) {
Expand All @@ -225,6 +235,9 @@ class="control"
self.$root.addFlashMessages();
})
.catch (function (error) {
window.flashMessages = [{'type': 'error', 'message': error.response.data.message}];
self.$root.addFlashMessages()
})
}
}
Expand Down

0 comments on commit e8c0ec5

Please sign in to comment.