ui5_easy_use
Version:
CLI tool for SAP ui5 and SAPUI5 projects to initialize apps, generate pages, insert form and table components, manage routing, and automate i18n bindings
39 lines (31 loc) • 875 B
JavaScript
sap.ui.define([], function () {
"use strict";
return class Env {
constructor(component) {
this._componentJS = component;
}
init() {
const currentEnv = this._getCurrentEnv();
this.env = {
currentEnv: currentEnv,
getFromSF: false,
userInfo: this._buildDefaultUserInfo(),
appId: this._getAppId(currentEnv)
};
return this.env;
}
_getCurrentEnv() {
return "dev"; // dev, qty, prd
}
_buildDefaultUserInfo() {
return {
userId: "30462",
username: "Zaid Bp",
roles: ["normal", "admin"]
};
}
_getAppId(currentEnv) {
return currentEnv === "prd" ? "3" : "3";
}
};
});