1
0
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:
陈钦亮
2019-02-27 19:44:22 +08:00
committed by Daniel Pan
parent e28f6361d0
commit e2ad2fd023
21 changed files with 1033 additions and 16 deletions

View 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;