-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#156: [WIP] Started the transition from vue-cli to vite. Still need t…
…o update build tooling to replace SSR
- Loading branch information
Showing
21 changed files
with
1,532 additions
and
8,269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,46 @@ | ||
<template> | ||
<div class="user d-flex flex-column flex-fill-100"> | ||
<b-nav id="tour-user-profilenav" class="user-tabs" tabs> | ||
<b-nav id="tour-user-profilenav" | ||
class="user-tabs" | ||
tabs> | ||
<b-nav-item :to="{ name: 'userProfile' }">Profile</b-nav-item> | ||
<b-nav-item v-if="isAdmin" :to="{ name: 'userAdministration' }">Administration</b-nav-item> | ||
<b-nav-item v-if="isAdmin" | ||
:to="{ name: 'userAdministration' }">Administration</b-nav-item> | ||
</b-nav> | ||
<router-view/> | ||
<router-view /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import _ from 'lodash'; | ||
import Constants from '@app/shared/constants'; | ||
import _ from 'lodash'; | ||
import Constants from '@app/shared/constants'; | ||
export default { | ||
name: 'User', | ||
data() { | ||
return { | ||
}; | ||
}, | ||
computed: { | ||
isAdmin: function(){ | ||
const userRoles = Constants.USER_DETAILS.roles; | ||
const userPermissions = Constants.USER_DETAILS.permissions; | ||
let isAdmin = true;// _.intersection(userRoles, ['ROLE_SUPER_ADMIN', 'ROLE_ADMIN']).length >= 1; | ||
let hasPermissions = _.intersection(userPermissions, ['PERMISSION_ALL', 'PERMISSION_ADD_USER', 'PERMISSION_EDIT_USER']).length >= 1; | ||
return isAdmin || hasPermissions; | ||
} | ||
export default { | ||
name: 'User', | ||
data() { | ||
return { | ||
}; | ||
}, | ||
computed: { | ||
isAdmin: function () { | ||
const userRoles = Constants.USER_DETAILS.roles; | ||
const userPermissions = Constants.USER_DETAILS.permissions; | ||
let isAdmin = true;// _.intersection(userRoles, ['ROLE_SUPER_ADMIN', 'ROLE_ADMIN']).length >= 1; | ||
let hasPermissions = _.intersection(userPermissions, ['PERMISSION_ALL', 'PERMISSION_ADD_USER', 'PERMISSION_EDIT_USER']).length >= 1; | ||
return isAdmin || hasPermissions; | ||
} | ||
}; | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import '@/assets/styles/_variables.scss'; | ||
@import '~@assets/styles/variables'; | ||
.user-tabs { | ||
// No gutters from the main container since we're don't want a row/column grid gutters | ||
// For Grids with gutters, re-initialize a new container on the sub-element | ||
margin-right: -$grid-gutter-width / 2; | ||
margin-left: -$grid-gutter-width / 2; | ||
} | ||
.user-tabs { | ||
// No gutters from the main container since we're don't want a row/column grid gutters | ||
// For Grids with gutters, re-initialize a new container on the sub-element | ||
margin-right: -$grid-gutter-width / 2; | ||
margin-left: -$grid-gutter-width / 2; | ||
} | ||
</style> |
Oops, something went wrong.