Files
2026-07-13 12:08:39 +08:00

20 lines
505 B
JavaScript

// create UserAccessViewModel from UserViewModel
export function UserAccessViewModel(data) {
this.Id = data.Id;
this.Name = data.Username;
this.Type = 'user';
this.Inherited = false;
this.Override = false;
this.Role = { Id: 0, Name: '-' };
}
// create TeamAccessViewModel from TeamViewModel
export function TeamAccessViewModel(data) {
this.Id = data.Id;
this.Name = data.Name;
this.Type = 'team';
this.Inherited = false;
this.Override = false;
this.Role = { Id: 0, Name: '-' };
}