|
|
@@ -4,11 +4,11 @@ import {ADD_DEPLOY, UPDATE_DEPLOY} from "../../../../gql";
|
|
|
import {request} from 'graphql-request'
|
|
|
import {idGen} from "../../../../func";
|
|
|
import {graphqlUrl} from "../../../../config";
|
|
|
+import {manageUsers} from "../../../../config";
|
|
|
|
|
|
const Panel = Collapse.Panel;
|
|
|
|
|
|
|
|
|
-
|
|
|
class DeployCard extends Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
@@ -108,7 +108,7 @@ class DeployCard extends Component {
|
|
|
showOK: true
|
|
|
})
|
|
|
}
|
|
|
- setTimeout(()=>{
|
|
|
+ setTimeout(() => {
|
|
|
this.setState({
|
|
|
showOK: false
|
|
|
})
|
|
|
@@ -136,7 +136,7 @@ class DeployCard extends Component {
|
|
|
showOK: true
|
|
|
})
|
|
|
}
|
|
|
- setTimeout(()=>{
|
|
|
+ setTimeout(() => {
|
|
|
this.setState({
|
|
|
showOK: false
|
|
|
})
|
|
|
@@ -204,16 +204,38 @@ class DeployCard extends Component {
|
|
|
}
|
|
|
</Panel>
|
|
|
</Collapse>
|
|
|
- <Button onClick={()=>{
|
|
|
- const id = idGen('deploy');
|
|
|
- this.ok(id);
|
|
|
- this.props.pass(id, 'deploy');
|
|
|
- }} type='primary'>ok</Button>
|
|
|
{
|
|
|
- this.state.showOK === true?
|
|
|
- <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
|
|
|
+ manageUsers.includes(this.props.userID) ?
|
|
|
+ <div>
|
|
|
+ <Button onClick={() => {
|
|
|
+ const id = idGen('deploy');
|
|
|
+ this.ok(id);
|
|
|
+ this.props.pass(id, 'deploy');
|
|
|
+ }} type='primary'>save</Button>
|
|
|
+ {
|
|
|
+ this.state.showOK === true ?
|
|
|
+ <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
|
|
|
+ :
|
|
|
+ ''
|
|
|
+ }
|
|
|
+ </div>
|
|
|
:
|
|
|
- ''
|
|
|
+ this.props.trialcase ?
|
|
|
+ ''
|
|
|
+ :
|
|
|
+ <div>
|
|
|
+ <Button onClick={() => {
|
|
|
+ const id = idGen('deploy');
|
|
|
+ this.ok(id);
|
|
|
+ this.props.pass(id, 'deploy');
|
|
|
+ }} type='primary'>save</Button>
|
|
|
+ {
|
|
|
+ this.state.showOK === true ?
|
|
|
+ <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
|
|
|
+ :
|
|
|
+ ''
|
|
|
+ }
|
|
|
+ </div>
|
|
|
}
|
|
|
</div>
|
|
|
)
|