Introduced ProfileStore
Corrected All Links to DataStore
This commit is contained in:
@@ -5,6 +5,8 @@ definePageMeta({
|
||||
|
||||
const supabase = useSupabaseClient()
|
||||
const dataStore = useDataStore()
|
||||
const profileStore = useProfileStore()
|
||||
const profileStore = useProfileStore()
|
||||
|
||||
|
||||
|
||||
@@ -38,14 +40,14 @@ const resources = {
|
||||
}
|
||||
}
|
||||
|
||||
const numberRanges = ref(dataStore.ownTenant.numberRanges)
|
||||
const numberRanges = ref(profileStore.ownTenant.numberRanges)
|
||||
|
||||
const updateNumberRanges = async (range) => {
|
||||
|
||||
const {data,error} = await supabase
|
||||
.from("tenants")
|
||||
.update({numberRanges: numberRanges.value})
|
||||
.eq('id',dataStore.currentTenant)
|
||||
.eq('id',profileStore.currentTenant)
|
||||
|
||||
await dataStore.fetchOwnTenant()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user