Front end users refactoring
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { api } from 'boot/axios';
|
||||
import { IAppDisplay, IAppVersion, IAppVersionDisplay, IManagedApp, IVersionSubmit } from 'src/types/AppTypes';
|
||||
import { IUser } from 'src/types/UserTypes';
|
||||
import { date, Notify } from 'quasar'
|
||||
import { userToUserDisplay } from './useUserStore';
|
||||
|
||||
|
||||
export const useAppStore = defineStore('app', {
|
||||
@@ -104,16 +104,3 @@ function appToAppDisplay(app: IManagedApp) {
|
||||
function formatDate(data: string) {
|
||||
return date.formatDate(data, 'YYYY/MM/DD HH:mm');
|
||||
}
|
||||
|
||||
function userToUserDisplay(user: IUser) {
|
||||
return {
|
||||
id: user.id,
|
||||
firstName: user.first_name,
|
||||
lastName: user.last_name,
|
||||
fullNameSearch: (user.last_name + user.first_name).toLowerCase(),
|
||||
fullName: user.last_name + ' ' + user.first_name,
|
||||
email: user.email,
|
||||
isActive: user.is_active,
|
||||
isSuperuser: user.is_superuser,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user