VisualisasiAM.js 8.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
import React, { Component } from 'react';
import { Container, Row, Col } from "react-bootstrap";
import { makeStyles, createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';
import { TextField } from '@material-ui/core';
import MenuItem from '@material-ui/core/MenuItem';
import ApprovalMatrix from "./ApprovalMatrix";


const type = [
  {
    value: 'KPI',
    label: 'KPI',
  },
  {
    value: 'Gatau',
    label: 'Gatau',
  },
];

export default class PreviewAM extends Component {
    constructor(props) {
        super(props)
        this.state = {
            visibleAM: false,
            visibleVisual: true
        }
    }

    componentDidMount() {
    }

    render() {
        return (
            <div>    
            {this.state.visibleVisual === true ?
            <div style={{ height: this.props.height }}>
                <div style={{ height: 199, width: '100%', backgroundColor: '#354960' }} />
                    <div>
                        <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -150 }}>
                            <label style={{ color: 'white', width: '20%', fontSize: 16, paddingTop: 8 }}>Visualisasi Data</label>
                        </div>
                        <div style={{ padding: 25, width: '100%' }}>
                            <div style={{ width: '100%', padding: 25, backgroundColor: 'white', borderRadius: 6, border: 'solid 1px #c4c4c4'}}>
                                <label style={{ color: '#4b4b4b', fontSize: '16px', fontWeight: 'bold' }}>Hirarki Persetujuan</label>
                                <div className="" style={{ width: 250, marginTop: 8, marginBottom: 28 }}>
                                    <TextField
                                        style={{ width: '100%' }}
                                        id="type"
                                        select
                                        label="Tipe Persetujuan"
                                        // value={this.state.periode}
                                        onChange={(e) => null}
                                    >
                                        {type.map((option) => (
                                            <MenuItem key={option.value} value={option.value}>
                                                {option.label}
                                            </MenuItem>
                                        ))}
                                    </TextField>
                                </div>
                                <div className="grid grid-4x grid-mobile-none gap-15px">
                                    <div className="column-1">
                                        <div className="margin-bottom-20px">
                                            <label style={{ color: '#4b4b4b', fontSize: '14px' }}>1. John Doe</label>
                                        </div>
                                    </div>
                                    <div className="column-2">
                                    </div>
                                    <div className="column-3">
                                    </div>
                                    <div className="column-4">
                                    </div>
                                </div>
                                <div className="grid grid-4x grid-mobile-none gap-15px">
                                    <div className="column-1">
                                        <div className="margin-bottom-20px">
                                            <label style={{ color: '#4b4b4b', fontSize: '14px' }}>2. Barbara Rosa</label>
                                        </div>
                                    </div>
                                    <div className="column-2">
                                        <div className="margin-bottom-20px">
                                            <label style={{ color: '#4b4b4b', fontSize: '14px' }}>Aneesa Hassan</label>
                                        </div>
                                    </div>
                                    <div className="column-3">
                                        <div className="margin-bottom-20px">
                                            <label style={{ color: '#4b4b4b', fontSize: '14px' }}>AND</label>
                                        </div>
                                    </div>
                                </div>
                                <div className="grid grid-4x grid-mobile-none gap-15px">
                                    <div className="column-1">
                                        <div className="margin-bottom-20px">
                                            <label style={{ color: '#4b4b4b', fontSize: '14px' }}>3. Cole Park</label>
                                        </div>
                                    </div>
                                    <div className="column-2">
                                        <div className="margin-bottom-20px">
                                            <label style={{ color: '#4b4b4b', fontSize: '14px' }}>Levison Robin</label>
                                        </div>
                                    </div>
                                    <div className="column-3">
                                        <div className="margin-bottom-20px">
                                            <label style={{ color: '#4b4b4b', fontSize: '14px' }}>OR</label>
                                        </div>
                                    </div>
                                </div>
                                <div className="grid grid-4x grid-mobile-none gap-15px">
                                    <div className="column-1">
                                        <div className="margin-bottom-20px">
                                            <label style={{ color: '#4b4b4b', fontSize: '14px' }}>4. Madison Price</label>
                                        </div>
                                    </div>
                                    <div className="column-2">
                                    </div>
                                    <div className="column-3">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div className="row" style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 15, paddingLeft: 15, paddingBottom: 25 }}>
                            <div onClick={() => this.setState({ visibleVisual: false, visibleAM: true })} style={{ width: 102, height: 30, marginLeft: 25, backgroundColor: 'dodgerblue', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}>
                                <span style={{ color: '#fff', fontSize: 11 }}>Kembali</span>
                            </div>
                            <div className="row" style={{ float: 'right', marginRight: 25 }}>
                                <div onClick={() => this.props.onClickClose()} style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}>
                                    <span style={{ color: '#354960', fontSize: 11 }} >Batal</span>
                                </div>
                                <div style={{ width: 102, height: 30, marginLeft: 25, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}>
                                    <span style={{ color: '#fff', fontSize: 11 }}>Simpan</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                : false
            }
            {this.state.visibleAM && (
                <ApprovalMatrix
                    onClickClose={() => this.setState({ visibleAM: false })}
                />
            )}
            </div>
            
        );
    }
}