Allowed Filters to stay Persistent, Introduced Extra Column for ActivePhase
This commit is contained in:
@@ -35,9 +35,6 @@ export const useAuthStore = defineStore("auth", {
|
||||
console.log("Auth initStore")
|
||||
await this.fetchMe()
|
||||
|
||||
const tempStore = useTempStore()
|
||||
|
||||
if(this.profile.temp_config) tempStore.setStoredTempConfig(this.profile.temp_config)
|
||||
if(this.activeTenant > 0) {
|
||||
this.loading = false
|
||||
if(useCapacitor().getIsNative()) {
|
||||
@@ -99,6 +96,8 @@ export const useAuthStore = defineStore("auth", {
|
||||
|
||||
async fetchMe(jwt= null) {
|
||||
console.log("Auth fetchMe")
|
||||
const tempStore = useTempStore()
|
||||
|
||||
try {
|
||||
const me = await useNuxtApp().$api("/api/me", {
|
||||
headers: { Authorization: `Bearer ${jwt}`,
|
||||
@@ -117,6 +116,8 @@ export const useAuthStore = defineStore("auth", {
|
||||
|
||||
this.profile = me.profile
|
||||
|
||||
if(this.profile.temp_config) tempStore.setStoredTempConfig(this.profile.temp_config)
|
||||
|
||||
if(me.activeTenant > 0) {
|
||||
this.activeTenant = me.activeTenant
|
||||
this.activeTenantData = me.tenants.find(i => i.id === me.activeTenant)
|
||||
|
||||
@@ -1088,9 +1088,9 @@ export const useDataStore = defineStore('data', () => {
|
||||
},
|
||||
sortable: true
|
||||
},{
|
||||
key: "phase",
|
||||
key: "active_phase",
|
||||
label: "Phase",
|
||||
component: phase
|
||||
distinct:true
|
||||
},{
|
||||
key: "name",
|
||||
label: "Name",
|
||||
|
||||
@@ -17,6 +17,7 @@ export const useTempStore = defineStore('temp', () => {
|
||||
columns: columns.value,
|
||||
pages: pages.value,
|
||||
settings: settings.value,
|
||||
filters: filters.value
|
||||
}
|
||||
|
||||
await useNuxtApp().$api(`/api/profiles/${auth.profile.id}`,{
|
||||
@@ -30,6 +31,7 @@ export const useTempStore = defineStore('temp', () => {
|
||||
columns.value = config.columns
|
||||
pages.value = config.pages
|
||||
settings.value = config.settings
|
||||
filters.value = config.filters
|
||||
}
|
||||
|
||||
function modifySearchString(type,input) {
|
||||
@@ -42,8 +44,10 @@ export const useTempStore = defineStore('temp', () => {
|
||||
storeTempConfig()
|
||||
}
|
||||
|
||||
function modifyFilter(type,input) {
|
||||
filters.value[type] = input
|
||||
function modifyFilter(domain,type,input) {
|
||||
if(!filters.value[domain]) filters.value[domain] = {}
|
||||
|
||||
filters.value[domain][type] = input
|
||||
storeTempConfig()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user