From 045ac6bff71c80041c6739adcbc108241d8bc42c Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 12 Mar 2019 20:30:46 +0800 Subject: [PATCH] is_manager --- .../ec/graduatesRequirement/GraduatesRequirement.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js b/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js index 827144b5..d6765e72 100644 --- a/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js +++ b/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js @@ -538,6 +538,7 @@ class GraduatesRequirement extends Component { daChengYuZhi: response.data.calculation_value, daChengYuZhiSaved: response.data.calculation_value, course_ids: response.data.course_ids, + is_manager: response.data.is_manager, calculating: false, }) } @@ -583,13 +584,14 @@ class GraduatesRequirement extends Component { } render() { const { match, history, current_user } = this.props - const { daChengYuZhiEditableMode, daChengYuZhi, daChengYuZhiSaved } = this.state + const { daChengYuZhiEditableMode, daChengYuZhi, daChengYuZhiSaved, is_manager } = this.state let { schooldata } =this.state; let { example_major, template_major } = schooldata; - let showCalculateButton = false; - if (example_major && current_user.admin || !example_major && template_major) { - showCalculateButton = true; - } + let showCalculateButton = is_manager; + // let showCalculateButton = false; + // if (example_major && current_user.admin || !example_major && template_major) { + // showCalculateButton = true; + // } return (