Revert "Start for Dev Branch"

This reverts commit acf5d1c2ea
This commit is contained in:
2024-12-20 17:49:24 +00:00
parent acf5d1c2ea
commit 8abfce0fa1
16 changed files with 170 additions and 598 deletions

View File

@@ -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("*, role(*)")).data
let profiles = (await supabase.from("profiles").select()).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,6 +1749,7 @@ export const useDataStore = defineStore('data', () => {
initializeData,
changeProfile,
uploadFiles,
hasRight,
generateHistoryItems,
dataTypes,