mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 02:10:24 +00:00
Org user page (#2941)
* init org user * optimized code style * freezed item * update select-ediotr style * optimized code style * add state
This commit is contained in:
21
frontend/src/models/org-user.js
Normal file
21
frontend/src/models/org-user.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Utils } from '../utils/utils';
|
||||
import { lang } from '../utils/constants';
|
||||
import moment from 'moment';
|
||||
|
||||
moment.locale(lang);
|
||||
|
||||
class OrgUserInfo {
|
||||
constructor(object) {
|
||||
this.id = object.id;
|
||||
this.name = object.name;
|
||||
this.email = object.email;
|
||||
this.contact_email = object.owner_contact_email;
|
||||
this.is_active = object.is_active;
|
||||
this.quota = object.quota > 0 ? Utils.bytesToSize(object.quota) : '';
|
||||
this.self_usage = Utils.bytesToSize(object.self_usage);
|
||||
this.last_login = object.last_login ? moment(object.last_login).fromNow() : '--';
|
||||
this.ctime = moment(object.ctime).format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
}
|
||||
|
||||
export default OrgUserInfo;
|
Reference in New Issue
Block a user