debian-mirror-gitlab/spec/frontend/admin/users/mock_data.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

73 lines
1.9 KiB
JavaScript
Raw Normal View History

2023-01-13 00:05:48 +05:30
import { OBSTACLE_TYPES } from '~/vue_shared/components/user_deletion_obstacles/constants';
2021-02-22 17:27:13 +05:30
export const users = [
{
id: 2177,
name: 'Nikki',
createdAt: '2020-11-13T12:26:54.177Z',
email: 'nikki@example.com',
username: 'nikki',
lastActivityOn: '2020-12-09',
avatarUrl:
'https://secure.gravatar.com/avatar/054f062d8b1a42b123f17e13a173cda8?s=80\\u0026d=identicon',
2021-03-08 18:12:59 +05:30
badges: [
{ text: 'Admin', variant: 'success' },
2021-06-08 01:23:25 +05:30
{ text: "It's you!", variant: 'muted' },
2021-03-08 18:12:59 +05:30
],
2021-02-22 17:27:13 +05:30
projectsCount: 0,
actions: [],
2021-03-11 19:13:27 +05:30
note: 'Create per issue #999',
2021-02-22 17:27:13 +05:30
},
];
2021-09-30 23:02:18 +05:30
export const user = users[0];
2021-02-22 17:27:13 +05:30
export const paths = {
edit: '/admin/users/id/edit',
approve: '/admin/users/id/approve',
reject: '/admin/users/id/reject',
unblock: '/admin/users/id/unblock',
block: '/admin/users/id/block',
deactivate: '/admin/users/id/deactivate',
activate: '/admin/users/id/activate',
unlock: '/admin/users/id/unlock',
delete: '/admin/users/id',
2021-10-27 15:23:28 +05:30
deleteWithContributions: '/admin/users/id?hard_delete=true',
2021-02-22 17:27:13 +05:30
adminUser: '/admin/users/id',
2021-09-30 23:02:18 +05:30
ban: '/admin/users/id/ban',
unban: '/admin/users/id/unban',
2021-02-22 17:27:13 +05:30
};
2021-06-08 01:23:25 +05:30
export const createGroupCountResponse = (groupCounts) => ({
data: {
users: {
nodes: groupCounts.map(({ id, groupCount }) => ({
id: `gid://gitlab/User/${id}`,
groupCount,
__typename: 'UserCore',
})),
__typename: 'UserCoreConnection',
},
},
});
2023-01-13 00:05:48 +05:30
export const associationsCount = {
groups_count: 5,
projects_count: 5,
issues_count: 5,
merge_requests_count: 5,
};
export const userDeletionObstacles = [
{ name: 'schedule1', type: OBSTACLE_TYPES.oncallSchedules },
{ name: 'policy1', type: OBSTACLE_TYPES.escalationPolicies },
];
2023-03-17 16:20:25 +05:30
export const userStatus = {
emoji: 'basketball',
message: 'test',
availability: 'busy',
message_html: 'test',
clear_status_at: '2023-01-04T10:00:00.000Z',
};