Web: Rename teamTemplate.
This commit is contained in:
parent
42d29cbae5
commit
ab10641b45
@ -70,7 +70,7 @@ class SettingsStore {
|
|||||||
passwordSettings = null;
|
passwordSettings = null;
|
||||||
hasShortenService = false;
|
hasShortenService = false;
|
||||||
|
|
||||||
teamTemplate = [];
|
customSchemaList = [];
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
makeAutoObservable(this);
|
makeAutoObservable(this);
|
||||||
@ -127,7 +127,7 @@ class SettingsStore {
|
|||||||
};
|
};
|
||||||
|
|
||||||
getCustomSchemaList = async () => {
|
getCustomSchemaList = async () => {
|
||||||
this.teamTemplate = await api.settings.getCustomSchemaList();
|
this.customSchemaList = await api.settings.getCustomSchemaList();
|
||||||
};
|
};
|
||||||
|
|
||||||
getPortalSettings = async () => {
|
getPortalSettings = async () => {
|
||||||
|
@ -156,9 +156,9 @@ class TeamTemplate extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onCustomSchemaSelect = (option) => {
|
onCustomSchemaSelect = (option) => {
|
||||||
const { teamTemplate } = this.props;
|
const { customSchemaList } = this.props;
|
||||||
|
|
||||||
const currentTemplate = teamTemplate[option.key];
|
const currentTemplate = customSchemaList[option.key];
|
||||||
|
|
||||||
if (isError) {
|
if (isError) {
|
||||||
this.setState({
|
this.setState({
|
||||||
@ -220,20 +220,20 @@ class TeamTemplate extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
getOptions = () => {
|
getOptions = () => {
|
||||||
const { teamTemplate } = this.props;
|
const { customSchemaList } = this.props;
|
||||||
const { customId } = this.state;
|
const { customId } = this.state;
|
||||||
|
|
||||||
for (let item = 0; item < teamTemplate.length; item++) {
|
for (let item = 0; item < customSchemaList.length; item++) {
|
||||||
let obj = {
|
let obj = {
|
||||||
key: item,
|
key: item,
|
||||||
label: teamTemplate[item].name,
|
label: customSchemaList[item].name,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
};
|
};
|
||||||
options.push(obj);
|
options.push(obj);
|
||||||
|
|
||||||
if (teamTemplate[item].id === customId) {
|
if (customSchemaList[item].id === customId) {
|
||||||
this.setState({
|
this.setState({
|
||||||
customName: teamTemplate[item].name,
|
customName: customSchemaList[item].name,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -701,7 +701,7 @@ export default inject(({ auth, setup }) => {
|
|||||||
getCustomSchemaList,
|
getCustomSchemaList,
|
||||||
|
|
||||||
customNames,
|
customNames,
|
||||||
teamTemplate,
|
customSchemaList,
|
||||||
isLoading,
|
isLoading,
|
||||||
getCurrentCustomSchema,
|
getCurrentCustomSchema,
|
||||||
setIsLoading,
|
setIsLoading,
|
||||||
@ -714,7 +714,7 @@ export default inject(({ auth, setup }) => {
|
|||||||
getCustomSchemaList,
|
getCustomSchemaList,
|
||||||
getCurrentCustomSchema,
|
getCurrentCustomSchema,
|
||||||
customNames,
|
customNames,
|
||||||
teamTemplate,
|
customSchemaList,
|
||||||
isLoading,
|
isLoading,
|
||||||
setCurrentSchema,
|
setCurrentSchema,
|
||||||
setCustomSchema,
|
setCustomSchema,
|
||||||
|
Loading…
Reference in New Issue
Block a user