Start for Dev Branch
This commit is contained in:
@@ -313,7 +313,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
const resources =ref([])
|
||||
|
||||
|
||||
const rights = ref({
|
||||
/*const rights = ref({
|
||||
createUser: {label: "Benutzer erstellen"},
|
||||
modifyUser: {label: "Benutzer bearbeiten"},
|
||||
deactivateUser: {label: "Benutzer sperren"},
|
||||
@@ -328,9 +328,9 @@ export const useDataStore = defineStore('data', () => {
|
||||
createTime: {label:"Zeiten erstellen"},
|
||||
viewOwnTimes: {label:"Eigene Zeiten anzeigen"},
|
||||
viewTimes: {label:"Zeiten anzeigen"},
|
||||
})
|
||||
})*/
|
||||
|
||||
const roles = ref([
|
||||
/*const roles = ref([
|
||||
{
|
||||
key: "tenantAdmin",
|
||||
label: "Firmenadministrator",
|
||||
@@ -369,12 +369,12 @@ export const useDataStore = defineStore('data', () => {
|
||||
"viewAllTimes"
|
||||
]
|
||||
}
|
||||
])
|
||||
])*/
|
||||
|
||||
async function initializeData (userId) {
|
||||
|
||||
let profileconnections = (await supabase.from("profileconnections").select()).data
|
||||
let profiles = (await supabase.from("profiles").select()).data
|
||||
let profiles = (await supabase.from("profiles").select("*, role(*)")).data
|
||||
let activeProfileConnection = profileconnections.find(i => i.active)
|
||||
if(activeProfileConnection) {
|
||||
activeProfile.value = profiles.find(i => i.id === activeProfileConnection.profile_id)
|
||||
@@ -521,7 +521,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
resources.value = []
|
||||
}
|
||||
|
||||
function hasRight (right) {
|
||||
/*function hasRight (right) {
|
||||
const role = profiles.value.find(i => i.id === activeProfile.value.id).role
|
||||
const grantedRights = roles.value.find(i => i.key === role).rights
|
||||
|
||||
@@ -529,7 +529,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
return true
|
||||
} else return false
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
var deepDiffMapper = function () {
|
||||
return {
|
||||
@@ -1749,7 +1749,6 @@ export const useDataStore = defineStore('data', () => {
|
||||
initializeData,
|
||||
changeProfile,
|
||||
uploadFiles,
|
||||
hasRight,
|
||||
generateHistoryItems,
|
||||
dataTypes,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user