From ab10641b45bf0c4afca1e0a2013cc8fd623d840d Mon Sep 17 00:00:00 2001 From: TatianaLopaeva Date: Fri, 16 Apr 2021 17:10:37 +0300 Subject: [PATCH] Web: Rename teamTemplate. --- packages/asc-web-common/store/SettingsStore.js | 4 ++-- .../categories/common/team-template.js | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/asc-web-common/store/SettingsStore.js b/packages/asc-web-common/store/SettingsStore.js index 47c7804d2d..97453843b6 100644 --- a/packages/asc-web-common/store/SettingsStore.js +++ b/packages/asc-web-common/store/SettingsStore.js @@ -70,7 +70,7 @@ class SettingsStore { passwordSettings = null; hasShortenService = false; - teamTemplate = []; + customSchemaList = []; constructor() { makeAutoObservable(this); @@ -127,7 +127,7 @@ class SettingsStore { }; getCustomSchemaList = async () => { - this.teamTemplate = await api.settings.getCustomSchemaList(); + this.customSchemaList = await api.settings.getCustomSchemaList(); }; getPortalSettings = async () => { diff --git a/web/ASC.Web.Client/src/components/pages/Settings/categories/common/team-template.js b/web/ASC.Web.Client/src/components/pages/Settings/categories/common/team-template.js index aa315d6c7e..e509e69176 100644 --- a/web/ASC.Web.Client/src/components/pages/Settings/categories/common/team-template.js +++ b/web/ASC.Web.Client/src/components/pages/Settings/categories/common/team-template.js @@ -156,9 +156,9 @@ class TeamTemplate extends React.Component { } onCustomSchemaSelect = (option) => { - const { teamTemplate } = this.props; + const { customSchemaList } = this.props; - const currentTemplate = teamTemplate[option.key]; + const currentTemplate = customSchemaList[option.key]; if (isError) { this.setState({ @@ -220,20 +220,20 @@ class TeamTemplate extends React.Component { }; getOptions = () => { - const { teamTemplate } = this.props; + const { customSchemaList } = this.props; const { customId } = this.state; - for (let item = 0; item < teamTemplate.length; item++) { + for (let item = 0; item < customSchemaList.length; item++) { let obj = { key: item, - label: teamTemplate[item].name, + label: customSchemaList[item].name, disabled: false, }; options.push(obj); - if (teamTemplate[item].id === customId) { + if (customSchemaList[item].id === customId) { this.setState({ - customName: teamTemplate[item].name, + customName: customSchemaList[item].name, }); } } @@ -701,7 +701,7 @@ export default inject(({ auth, setup }) => { getCustomSchemaList, customNames, - teamTemplate, + customSchemaList, isLoading, getCurrentCustomSchema, setIsLoading, @@ -714,7 +714,7 @@ export default inject(({ auth, setup }) => { getCustomSchemaList, getCurrentCustomSchema, customNames, - teamTemplate, + customSchemaList, isLoading, setCurrentSchema, setCustomSchema,