edit cooperative page and functionality

This commit is contained in:
María
2025-08-20 12:37:20 +02:00
parent 8fedf54470
commit d609660dde
10 changed files with 671 additions and 13 deletions

View File

@@ -38,13 +38,17 @@ export default {
async logout() {
await this.auth.logout()
},
//TODO: check if cooperative is validated is working
async checkIfCoopValidated() {
const config = useRuntimeConfig()
const accessToken = this.auth.access
const result = await $fetch('my_company/', {
baseURL: config.public.baseURL,
method: 'GET',
headers: {
Authorization: `Bearer ${accessToken}`
}
})
this.coopIsValidated = result.data.company.is_validated
this.coopIsValidated = result.company.is_validated
},
},
}