Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: added an alert in case of downloading csv file for group without any permissions (#134) #141

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"Description": "Description",
"Delete security group": "Delete security group",
"Disable user": "Disable user",
"Dismiss": "Dismiss",
"Edit": "Edit",
"Edit email": "Edit email",
"Edit name": "Edit name",
Expand Down Expand Up @@ -120,6 +121,8 @@
"Name is required.": "Name is required.",
"New password": "New password",
"No": "No",
"No permissions associated": "No permissions associated",
"No permissions have been linked to this group yet. Permissions for a group cannot be downloaded.": "No permissions have been linked to this group yet. Permissions for a group cannot be downloaded.",
"No product stores found": "No product stores found",
"No record found": "No record found",
"No users found": "No users found",
Expand Down
15 changes: 15 additions & 0 deletions src/views/Permissions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ import {
IonPage,
IonTitle,
IonToolbar,
alertController,
modalController
} from '@ionic/vue';
import { defineComponent } from 'vue';
Expand Down Expand Up @@ -174,6 +175,20 @@ export default defineComponent({
this.router.replace('find-users')
},
async downloadCSVForPermissions() {
if(!Object.keys(this.currentGroupPermissions).length) {
const alert = await alertController.create({
header: translate("No permissions associated"),
message: translate("No permissions have been linked to this group yet. Permissions for a group cannot be downloaded."),
buttons: [
{
text: translate("Dismiss"),
role: "cancel"
}
],
});
return alert.present();
}

let permissionsJson = [] as any

if(this.currentGroup.groupId) {
Expand Down
Loading