[user ssp] revert user ssp
This commit is contained in:
parent
dff1e39347
commit
b4a607b620
|
@ -109,6 +109,8 @@ export default defineComponent({
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
|
||||||
onBeforeMount( () => {
|
onBeforeMount( () => {
|
||||||
|
void userStore.getUsers();
|
||||||
|
void store.getLimits();
|
||||||
void onRequest({pagination: pagination.value, filter: undefined})
|
void onRequest({pagination: pagination.value, filter: undefined})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -185,8 +187,6 @@ export default defineComponent({
|
||||||
pagination.value.sortBy = sortBy;
|
pagination.value.sortBy = sortBy;
|
||||||
pagination.value.descending = descending;
|
pagination.value.descending = descending;
|
||||||
if (result.count) pagination.value.rowsNumber = result.count;
|
if (result.count) pagination.value.rowsNumber = result.count;
|
||||||
void userStore.getUsers(true, {userids: result.userids});
|
|
||||||
void store.getLimits({userids: result.userids});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn(error)
|
console.warn(error)
|
||||||
}
|
}
|
||||||
|
|
10
src/store.ts
10
src/store.ts
|
@ -82,15 +82,7 @@ export const useBalanceStore = defineStore({
|
||||||
params: filter
|
params: filter
|
||||||
});
|
});
|
||||||
this.balances = data.balances;
|
this.balances = data.balances;
|
||||||
let userids = ""
|
return {balances: this.balances, count: data.count};
|
||||||
data.balances.forEach(response => {
|
|
||||||
userids += `,${response.userid}`
|
|
||||||
})
|
|
||||||
await api.get<FG.User>('/users', {
|
|
||||||
params: {userids: userids},
|
|
||||||
}
|
|
||||||
)
|
|
||||||
return {balances: this.balances, count: data.count, userids};
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async changeBalance(amount: number, user: FG.User, sender: FG.User | undefined = undefined) {
|
async changeBalance(amount: number, user: FG.User, sender: FG.User | undefined = undefined) {
|
||||||
|
|
Loading…
Reference in New Issue