Merge pull request 'supplant user migration' (!156) from wbuezas/hedera-web-mindshore:feature/supplant-user-migration into beta
gitea/hedera-web/pipeline/head There was a failure building this commit Details

Reviewed-on: #156
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
This commit is contained in:
Javier Segarra 2025-05-01 08:55:47 +00:00
commit 40c250dd9f
2 changed files with 9 additions and 3 deletions

View File

@ -196,6 +196,9 @@ const { t } = useI18n();
overflow: hidden; overflow: hidden;
cursor: pointer; cursor: pointer;
} }
.q-badge {
min-height: 26px;
}
</style> </style>
<i18n lang="yaml"> <i18n lang="yaml">

View File

@ -1,6 +1,6 @@
import { defineStore } from 'pinia'; import { defineStore } from 'pinia';
import { ref, computed, watch } from 'vue'; import { ref, computed, watch } from 'vue';
import { api, jApi } from '@/boot/axios'; import { api } from '@/boot/axios';
import useNotify from '@/composables/useNotify.js'; import useNotify from '@/composables/useNotify.js';
import { useAppStore } from '@/stores/app.js'; import { useAppStore } from '@/stores/app.js';
@ -263,8 +263,11 @@ export const useUserStore = defineStore('user', () => {
}; };
const supplantUser = async supplantUser => { const supplantUser = async supplantUser => {
const json = await jApi.send('client/supplant', { supplantUser }); const { data } = await api.post('VnUsers/supplantUser', {
token.value = json; supplantUser
});
if (!data || !data.id) return;
token.value = data.id;
sessionStorage.setItem('supplantUser', supplantUser); sessionStorage.setItem('supplantUser', supplantUser);
await fetchUser('supplantedUser'); await fetchUser('supplantedUser');
}; };