Browse Source

remove code not used

pull/1/head
farhantock 1 year ago
parent
commit
b103cc1b65
  1. 26
      src/components/MapHeader/MapHeader.js
  2. 80
      src/components/PopupContainer/PopupContainer.js
  3. 12
      src/containers/DefaultLayout/DefaultHeader.js
  4. 289
      src/views/Map/Map.js
  5. 17
      src/views/Pages/Login/Login.js

26
src/components/MapHeader/MapHeader.js

@ -1,17 +1,13 @@
import React, { Component } from 'react';
import { Link, NavLink } from 'react-router-dom';
import { Badge, UncontrolledDropdown, DropdownItem, DropdownMenu, DropdownToggle, Nav, NavItem,
InputGroup, Input, InputGroupAddon, InputGroupText, Button, UncontrolledTooltip
import { NavLink } from 'react-router-dom';
import {
UncontrolledDropdown, DropdownItem, DropdownMenu, DropdownToggle, Nav, NavItem,
UncontrolledTooltip
} from 'reactstrap';
import PropTypes from 'prop-types';
import { AppAsideToggler, AppNavbarBrand, AppSidebarToggler } from '@coreui/react';
import logo from '../../assets/img/brand/logo_siopas.png'
import logo_bmd_denpasar from '../../assets/img/brand/logo_bmd_denpasar.png'
import user_logo from '../../assets/img/avatars/user.png'
import sygnet from '../../assets/img/brand/sygnet.svg'
import { Icon, InlineIcon } from '@iconify/react';
import saveOutline from '@iconify/icons-ion/save-outline';
import { Icon } from '@iconify/react';
import printOutline from '@iconify/icons-ion/print-outline';
import {
AppHeader
@ -51,8 +47,8 @@ class MapHeader extends Component {
getLogo = () => {
return (
<div style={{fontWeight: 'bold', fontSize: 30, fontFamily: 'Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif', textAlign: 'center', marginLeft: 25, marginRight: 20}}>
<span style={{color: '#4472C4'}}>OS</span><span style={{color: '#ED7D31'}}>PRO</span>
<div style={{ fontWeight: 'bold', fontSize: 30, fontFamily: 'Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif', textAlign: 'center', marginLeft: 25, marginRight: 20 }}>
<span style={{ color: '#4472C4' }}>OS</span><span style={{ color: '#ED7D31' }}>PRO</span>
</div>
)
}
@ -67,10 +63,10 @@ class MapHeader extends Component {
minimized={{ src: logo, width: 30, height: 35, alt: 'SIOPAS Logo' }}
/>*/}
{ this.getLogo() }
{this.getLogo()}
<Nav className="d-md-down-none" navbar>
{ this.getHeaderMenu() }
{this.getHeaderMenu()}
</Nav>
<Nav className="ml-auto" navbar>
{/*<InputGroup>
@ -106,7 +102,7 @@ class MapHeader extends Component {
<div>
<NavItem className="d-md-down-none" id="printMap">
<NavLink to="#" className="nav-link" onClick={() => this.props.printMap() }><Icon icon={printOutline} width={15} height={15} /></NavLink>
<NavLink to="#" className="nav-link" onClick={() => this.props.printMap()}><Icon icon={printOutline} width={15} height={15} /></NavLink>
</NavItem>
<UncontrolledTooltip placement="bottom" target="printMap">
Print Map
@ -129,7 +125,7 @@ class MapHeader extends Component {
<DropdownItem><i className="fa fa-file"></i> Projects<Badge color="primary">42</Badge></DropdownItem>
<DropdownItem divider />
<DropdownItem><i className="fa fa-shield"></i> Lock Account</DropdownItem>*/}
<DropdownItem header tag="div" className="text-center">{ localStorage.getItem('user_name') }</DropdownItem>
<DropdownItem header tag="div" className="text-center">{localStorage.getItem('user_name')}</DropdownItem>
<DropdownItem onClick={e => this.props.onLogout(e)}><i className="fa fa-lock"></i> Logout</DropdownItem>
</DropdownMenu>
</UncontrolledDropdown>

80
src/components/PopupContainer/PopupContainer.js

@ -1,6 +1,6 @@
import React, { Component, Fragment } from 'react';
import {Vector as VectorLayer} from 'ol/layer';
import {Vector as VectorSource} from 'ol/source';
import { Vector as VectorLayer } from 'ol/layer';
import { Vector as VectorSource } from 'ol/source';
import Feature from 'ol/Feature';
import { Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon } from 'ol/geom';
import { Circle as CircleStyle, Fill, Icon as IconOl, Stroke, Style, Text } from 'ol/style';
@ -32,8 +32,8 @@ import axios from "axios"
import moment from "moment"
import { deleteFeature, getImagePopup, formatLength, formatArea, lightOrDark } from '../../const/GeoserverFunc.js';
import { formatLabel, hideAttr, dateColumns, DATE_TIME_FORMAT } from '../../const/CustomFunc.js'
import {API_UPLOAD_IMAGE, BASE_IMAGE, BASE_SIMPRO } from '../../const/ApiConst.js'
import routeDummy from '../../dummy_data/route2.json';
import { API_UPLOAD_IMAGE, BASE_IMAGE, BASE_SIMPRO } from '../../const/ApiConst.js'
class PopupContainer extends Component {
@ -69,7 +69,7 @@ class PopupContainer extends Component {
}
componentDidMount() {
this.setState({isReady: true});
this.setState({ isReady: true });
}
/*componentDidMount() {
@ -91,9 +91,9 @@ class PopupContainer extends Component {
matchLayerAttribute = (propKey) => {
const { layer_attribute } = this.props;
for (let i=0; i < layer_attribute.length; i++) {
for (let i = 0; i < layer_attribute.length; i++) {
if (layer_attribute[i].attribute !== 'the_geom') {
if (layer_attribute[i].attribute_label !== null && layer_attribute[i].attribute_label !== '' ) {
if (layer_attribute[i].attribute_label !== null && layer_attribute[i].attribute_label !== '') {
if (propKey == layer_attribute[i].attribute) {
return layer_attribute[i].attribute_label;
}
@ -234,18 +234,18 @@ class PopupContainer extends Component {
</div>
{/*<div className="image-slider" onClick={() => this.showImageFeature(selectedPopupData)}>*/}
<div className="image-popup-container">
{ this.renderImageSlider(selectedPopupData) }
{this.renderImageSlider(selectedPopupData)}
</div>
<div className="popup-body custom-scroll">
<table className="table popup-table">
<tbody>
{ this.renderOneRowFeature(popupProperties) }
{this.renderOneRowFeature(popupProperties)}
</tbody>
</table>
</div>
<div className="popup-footer">
<div className="btn-group">
{ this.renderButtonFooter(selectedPopupData) }
{this.renderButtonFooter(selectedPopupData)}
</div>
</div>
</div>
@ -261,7 +261,7 @@ class PopupContainer extends Component {
for (let key in popupProperties) {
if (typeof(popupProperties[key]) === 'object') {
if (typeof (popupProperties[key]) === 'object') {
for (let prop in popupProperties[key]) {
modPopupProperties[prop] = popupProperties[key][prop];
}
@ -271,7 +271,7 @@ class PopupContainer extends Component {
}
for (let key in modPopupProperties) {
if (typeof(modPopupProperties[key]) === 'object') {
if (typeof (modPopupProperties[key]) === 'object') {
delete modPopupProperties[key];
}
}
@ -310,7 +310,7 @@ class PopupContainer extends Component {
renderButtonFooter = (selectedPopupData) => {
let layer_name = selectedPopupData.id && selectedPopupData.id.substr(0, selectedPopupData.id.indexOf("."));
return(
return (
<Fragment>
<Button color="success" size="sm" outline onClick={() => this.showImageFeature(selectedPopupData)} id="showImageFeature">
<Icon icon={imageOutline} width={15} height={15} />
@ -336,7 +336,7 @@ class PopupContainer extends Component {
<UncontrolledTooltip placement="bottom" target="editFeature">
Edit Attribute
</UncontrolledTooltip>
{ this.props.activeStateAddGeometry ?
{this.props.activeStateAddGeometry ?
(<Button disabled color="success" size="sm" outline id="editGeometry">
<Icon icon={pencilIcon} width={15} height={15} />
</Button>) :
@ -354,7 +354,7 @@ class PopupContainer extends Component {
Delete Feature
</UncontrolledTooltip>
{ layer_name && (layer_name === "m_sales" || layer_name === "m_employee" || layer_name === "m_waspang" || layer_name === "m_presensi") &&
{layer_name && (layer_name === "m_sales" || layer_name === "m_employee" || layer_name === "m_waspang" || layer_name === "m_presensi") &&
<>
<Button color="success" size="sm" outline
onClick={() => {
@ -368,7 +368,7 @@ class PopupContainer extends Component {
<UncontrolledTooltip placement="bottom" target="showRoute">
Show Route
</UncontrolledTooltip>
</> }
</>}
</Fragment>
)
}
@ -466,13 +466,13 @@ class PopupContainer extends Component {
<div className="popup-body custom-scroll">
<table className="table table-hover popup-table">
<tbody>
{ popupDataTemp.map((item, index) => {
{popupDataTemp.map((item, index) => {
return (<tr key={index} className="popup-row-list-feature"
onClick={() => this.chooseOneFeature(item)}>
<td>{this.getFeaturesLabel(item)}</td>
<td> <Badge style={{backgroundColor: this.getLayerColor(item)}} className={this.getLayerTitleTextColor(this.getLayerColor(item))}>{this.getLayerTitle(item)}</Badge> </td>
<td> <Badge style={{ backgroundColor: this.getLayerColor(item) }} className={this.getLayerTitleTextColor(this.getLayerColor(item))}>{this.getLayerTitle(item)}</Badge> </td>
</tr>)
}) }
})}
</tbody>
</table>
</div>
@ -492,7 +492,7 @@ class PopupContainer extends Component {
showImageFeature = (selectedPopupData) => {
console.log('show images', selectedPopupData);
this.setState({imagePopupTitle: selectedPopupData.id});
this.setState({ imagePopupTitle: selectedPopupData.id });
this.toggleImagePopup();
}
@ -506,25 +506,25 @@ class PopupContainer extends Component {
}
toggleImagePopup = () => {
this.setState({imagePopupVisible: !this.state.imagePopupVisible});
this.setState({ imagePopupVisible: !this.state.imagePopupVisible });
}
handleUploadImage = async () => {
const {photo_feature, image_feature, imagePopupTitle} = this.state
const { photo_feature, image_feature, imagePopupTitle } = this.state
const category = imagePopupTitle.split(".");
let type = category[0]
let id = category[1]
let imageType = ''
if(type==="m_office"){
imageType="office"
}else if(type==="m_sales"){
imageType="m_sales"
}else if(type==="m_employee"){
imageType="employee"
}else{
imageType="customer"
if (type === "m_office") {
imageType = "office"
} else if (type === "m_sales") {
imageType = "m_sales"
} else if (type === "m_employee") {
imageType = "employee"
} else {
imageType = "customer"
}
const formData = new FormData()
formData.append('ref_id', id)
@ -538,9 +538,9 @@ class PopupContainer extends Component {
}
toggleImagePreview = async param => {
if(param == "upload"){
if (param == "upload") {
const result = await this.handleUploadImage()
console.log("response upload image",result);
console.log("response upload image", result);
if (result == undefined) {
alert('Upload Failed');
return;
@ -551,14 +551,14 @@ class PopupContainer extends Component {
this.toggleImagePopup();
}
else {
console.log('err',result);
console.log('err', result);
alert(result.data);
return;
}
}
}
this.setState({imagePreviewVisible: !this.state.imagePreviewVisible});
this.setState({ imagePreviewVisible: !this.state.imagePreviewVisible });
}
showTable = (selectedPopupData) => {
@ -566,16 +566,16 @@ class PopupContainer extends Component {
}
toggleShowTable = () => {
this.setState({mapTableVisible: !this.state.mapTableVisible})
this.setState({ mapTableVisible: !this.state.mapTableVisible })
}
editFeature = (selectedPopupData) => {
console.log('edit feature', selectedPopupData);
this.setState({selectedPopupData: selectedPopupData}, () => this.toggleEditFeature());
this.setState({ selectedPopupData: selectedPopupData }, () => this.toggleEditFeature());
}
toggleEditFeature = () => {
this.setState({editFeatureVisible: !this.state.editFeatureVisible})
this.setState({ editFeatureVisible: !this.state.editFeatureVisible })
}
/*goToFeature = (selectedPopupData) => {
@ -662,7 +662,7 @@ class PopupContainer extends Component {
}
toggleEditGeometry = () => {
this.setState({editGeometryVisible: !this.state.editGeometryVisible})
this.setState({ editGeometryVisible: !this.state.editGeometryVisible })
}
deleteFeature = async (selectedPopupData) => {
@ -714,9 +714,9 @@ class PopupContainer extends Component {
if (!isReady) {
return <div>Loading...</div>
}
return(
return (
<div>
<SweetAlert show={alert} success={successAlert} danger={dangerAlert} title={alertMessage} onConfirm={() => this.setState({alert: false, successAler: false, dangerAlert: false})}>
<SweetAlert show={alert} success={successAlert} danger={dangerAlert} title={alertMessage} onConfirm={() => this.setState({ alert: false, successAler: false, dangerAlert: false })}>
{alertMessage}
</SweetAlert>

12
src/containers/DefaultLayout/DefaultHeader.js

@ -1,14 +1,10 @@
import React, { Component } from 'react';
import { Link, NavLink } from 'react-router-dom';
import { Badge, UncontrolledDropdown, DropdownItem, DropdownMenu, DropdownToggle, Nav, NavItem } from 'reactstrap';
import { NavLink } from 'react-router-dom';
import { Badge, Nav, NavItem } from 'reactstrap';
import PropTypes from 'prop-types';
import { Menu, Dropdown, Row, Col } from 'antd'
import { AppAsideToggler, AppNavbarBrand, AppSidebarToggler } from '@coreui/react';
import { Menu, Dropdown } from 'antd'
import { ALERTUSER_SEARCH, ALERT_SEARCH, ALERTUSER_STATUSVIEW, ALERT_STATUSVIEW, APP_MODE } from '../../const/ApiConst';
import user_logo from '../../assets/img/avatars/user.png'
import logo_header_adw from '../../assets/img/logo_adyawinsa.jpg'
import logo_header_kit from '../../assets/img/logo_kit.png'
import logo_header_nawakara from '../../assets/img/logo_nawakara.png'
import axios from 'axios';
import './Default.css'
const token = window.localStorage.getItem('token');

289
src/views/Map/Map.js

@ -1,9 +1,11 @@
import React, { Component, Suspense, Fragment } from 'react';
import ReactDOM from 'react-dom';
import { Container, Col, Row, Button, UncontrolledTooltip,
import {
Container, Col, Row, Button, UncontrolledTooltip,
Card,
CardBody,
CardHeader } from 'reactstrap';
CardHeader
} from 'reactstrap';
import './Map.css';
import './Popup.css';
import './CustomScroll.css';
@ -20,16 +22,16 @@ import OlSourceTileJson from 'ol/source/TileJSON';
import OlLayerGroup from 'ol/layer/Group';
import OlSourceTileWMS from 'ol/source/TileWMS';
import OlSourceImageWMS from 'ol/source/ImageWMS';
import {fromLonLat, transformExtent, transform} from 'ol/proj';
import {Vector as VectorSource, XYZ as XYZSource, Cluster} from 'ol/source';
import { fromLonLat, transformExtent, transform } from 'ol/proj';
import { Vector as VectorSource, XYZ as XYZSource, Cluster } from 'ol/source';
import Overlay from 'ol/Overlay';
import { Draw, Select, Modify } from 'ol/interaction';
import Feature from 'ol/Feature';
import { Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon } from 'ol/geom';
import {Vector as VectorLayer} from 'ol/layer';
import {Circle as CircleStyle, Fill, Stroke, Style, Text, Icon as IconOl} from 'ol/style';
import {defaults as defaultControls, MousePosition, ScaleLine} from 'ol/control';
import {createStringXY, toStringXY} from 'ol/coordinate';
import { Vector as VectorLayer } from 'ol/layer';
import { Circle as CircleStyle, Fill, Stroke, Style, Text, Icon as IconOl } from 'ol/style';
import { defaults as defaultControls, MousePosition, ScaleLine } from 'ol/control';
import { createStringXY, toStringXY } from 'ol/coordinate';
import GeoJSON from 'ol/format/GeoJSON';
import WMSCapabilities from 'ol/format/WMSCapabilities';
@ -57,8 +59,10 @@ import DrawingTool from '../../components/DrawingTool';
import ImagePopup from '../../components/ImagePopup';
import ImageSlider from '../../components/ImageSlider';
import RoutingBar from '../../components/RoutingBar';
import { appConfig, setRequestMapHeader, layerStyleUrl, BMD_DENPASAR_MAPSERVICE_URL, IU_MAPSERVICE_URL, MAP_ID, emptyConstants,
WMS_CAPABILITIES_URL_2 } from '../../const/MapConst.js';
import {
appConfig, setRequestMapHeader, layerStyleUrl, BMD_DENPASAR_MAPSERVICE_URL, IU_MAPSERVICE_URL, MAP_ID, emptyConstants,
WMS_CAPABILITIES_URL_2
} from '../../const/MapConst.js';
import { Icon } from '@iconify/react';
import imageOutline from '@iconify/icons-ion/image-outline';
import trashOutline from '@iconify/icons-ion/trash-outline';
@ -69,14 +73,14 @@ import createOutline from '@iconify/icons-ion/create-outline';
import contractIcon from '@iconify/icons-ion/contract';
import country_indonesia from '../../assets/json/indonesia.json';
import { test, getGeomType, updateMap, getLayerAttribute, getLayerColor, getRandomColor } from '../../const/GeoserverFunc.js';
import { API_UPDATE_MAP, API_LOAD_MAP, API_LAYER_SEARCH_LABEL, API_GET_CHART_KATEGORI,
USERPROYEK_SEARCH, DASHBOARD_STATUS_SEARCH, DASHBOARD_PROYEK_SEARCH } from '../../const/ApiConst.js';
import {
API_UPDATE_MAP, API_LOAD_MAP, API_LAYER_SEARCH_LABEL, API_GET_CHART_KATEGORI,
USERPROYEK_SEARCH, DASHBOARD_STATUS_SEARCH, DASHBOARD_PROYEK_SEARCH
} from '../../const/ApiConst.js';
import { getSalesRoutingApi, getSalesFeatures, getOfficeFeatures, getCustomerFeatures, getEmployeeFeatures, getEmployeeRoutingApi, getWaspangRoutingApi } from '../../const/GeohrApiFunc.js';
import { SALES_FEATURES_STYLE, CUSTOMER_FEATURES_STYLE, OFFICE_FEATURES_STYLE, ROUTE_MAP_STYLES, EMPLOYEE_FEATURES_STYLE, PROJECT_FEATURES_STYLE, WASPANG_FEATURES_STYLE } from '../../const/GeohrMapStyles.js';
import SweetAlert from 'react-bootstrap-sweetalert';
import moment from "moment";
import salesGeojson from '../../dummy_data/sales.geojson';
import routeDummy from '../../dummy_data/route2.json';
import { demografiTree, analisaTree } from '../../const/LayerTreeConst.js'
import { ToastContainer, toast } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
@ -358,10 +362,10 @@ class SiopasMap extends Component {
routingBarVisible: false,
isSearchingRoute: false,
isProcessing: false,
queryBuilderOutput:'',
queryBuilderType:'',
currentQbTree:'',
currentQbType:'',
queryBuilderOutput: '',
queryBuilderType: '',
currentQbTree: '',
currentQbType: '',
routeType: '',
chosenProyekIds: [],
dataStatusProyek: null,
@ -381,8 +385,8 @@ class SiopasMap extends Component {
absensi: 0
},
panic_button: 0,
statusRight:true,
proggressBottom:true
statusRight: true,
proggressBottom: true
};
this.layers = [
@ -434,7 +438,7 @@ class SiopasMap extends Component {
this.olmap.on("singleclick", (evt) => {
this.mapOnClick(evt);
});
this.setState({mapProjection: this.olmap.getView().getProjection()}, () => console.log('mapProjection', this.state.mapProjection));
this.setState({ mapProjection: this.olmap.getView().getProjection() }, () => console.log('mapProjection', this.state.mapProjection));
}
componentDidUpdate = (prevProps, prevState) => {
@ -534,14 +538,14 @@ class SiopasMap extends Component {
method: 'POST', // *GET, POST, PUT, DELETE, etc.
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer '+window.localStorage.getItem('token')
'Authorization': 'Bearer ' + window.localStorage.getItem('token')
},
body: JSON.stringify(payload) // body data type must match "Content-Type" header
}
const result = await fetch(USERPROYEK_SEARCH, config).then(response => response.json()).then(res => res);
if (result && result.code == 200) {
this.setState({waspangData: result.data}, () => this.getWaspangFeatures());
this.setState({ waspangData: result.data }, () => this.getWaspangFeatures());
} else {
toast.error('Gagal Mengambil Data!!');
}
@ -573,7 +577,7 @@ class SiopasMap extends Component {
method: 'POST', // *GET, POST, PUT, DELETE, etc.
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer '+window.localStorage.getItem('token')
'Authorization': 'Bearer ' + window.localStorage.getItem('token')
},
body: JSON.stringify(payload) // body data type must match "Content-Type" header
}
@ -606,7 +610,7 @@ class SiopasMap extends Component {
},
],
};
this.setState({dataPersentaseProyek: persentaseProyek});
this.setState({ dataPersentaseProyek: persentaseProyek });
const labelCostPlaning = progress_cost_planning ? progress_cost_planning.map(res => res.label) : []
const valueCostPlaning = progress_cost_planning ? progress_cost_planning.map(res => res.total) : []
@ -633,7 +637,7 @@ class SiopasMap extends Component {
},
],
};
this.setState({dataCostProyek: costProyek});
this.setState({ dataCostProyek: costProyek });
const valueStatusProyek = status_proyek ? status_proyek.map(res => res.total) : []
@ -657,7 +661,7 @@ class SiopasMap extends Component {
},
],
};
this.setState({dataStatusProyek: statusProyek});
this.setState({ dataStatusProyek: statusProyek });
} else {
toast.error('Gagal Mengambil Data!!');
}
@ -666,16 +670,16 @@ class SiopasMap extends Component {
getDailyInfo = async () => {
const payload = {
"columns": [
{"name": "created_at","logic_operator": "range","value": `${moment().format('YYYY-MM-DD')} 00:00:00`,"value1": `${moment().format('YYYY-MM-DD')} 23:59:59`,"operator": "AND"}
{ "name": "created_at", "logic_operator": "range", "value": `${moment().format('YYYY-MM-DD')} 00:00:00`, "value1": `${moment().format('YYYY-MM-DD')} 23:59:59`, "operator": "AND" }
],
"paging": {"start": 0,"length": -1}
"paging": { "start": 0, "length": -1 }
}
const config = {
method: 'POST', // *GET, POST, PUT, DELETE, etc.
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer '+window.localStorage.getItem('token')
'Authorization': 'Bearer ' + window.localStorage.getItem('token')
},
body: JSON.stringify(payload) // body data type must match "Content-Type" header
}
@ -705,7 +709,7 @@ class SiopasMap extends Component {
},
],
};
this.setState({dataStatusWaspang: statusWaspang});
this.setState({ dataStatusWaspang: statusWaspang });
}
@ -717,15 +721,15 @@ class SiopasMap extends Component {
}
}
getLayerSearchLabel = async() => {
getLayerSearchLabel = async () => {
const param = {
method: 'GET',
header: JSON.stringify({'Content-Type': 'application/json'}),
header: JSON.stringify({ 'Content-Type': 'application/json' }),
}
try {
const result = await fetch(API_LAYER_SEARCH_LABEL, param).then(response => response.json()).then(res => res)
if (result.data){
if (result.data) {
if (result.data.length > 0) {
this.setState({
searchLabelData: result.data
@ -734,7 +738,7 @@ class SiopasMap extends Component {
} else {
}
} catch(err) {
} catch (err) {
console.log(err);
}
}
@ -744,21 +748,21 @@ class SiopasMap extends Component {
let layerInfo = [];
const param = {
method: 'GET',
header: JSON.stringify({'Content-Type': 'application/json'}),
header: JSON.stringify({ 'Content-Type': 'application/json' }),
}
try {
const result = await fetch(API_GET_CHART_KATEGORI, param).then(response => response.json()).then(res => res)
if(result.data){
if (result.data) {
if (result.data.length > 0) {
for(let i=0; i < result.data.length; i++) {
for (let i = 0; i < result.data.length; i++) {
let layer_name = result.data[i].layer_name;
let layer_title = result.data[i].layer_title;
let layer_geom_type = result.data[i].layer_geom_type;
let total_features = result.data[i].total_features;
let SLD_URL = `${layerStyleUrl+layer_name}`;;
let SLD_URL = `${layerStyleUrl + layer_name}`;;
let reqColor = await getLayerColor(SLD_URL);
let color = '';
if (reqColor.success) {
@ -772,11 +776,11 @@ class SiopasMap extends Component {
total_features: total_features
});
}
this.setState({layerInfo: layerInfo}, () => console.log('layerInfo',this.state.layerInfo));
this.setState({ layerInfo: layerInfo }, () => console.log('layerInfo', this.state.layerInfo));
}
} else {
}
} catch(err) {
} catch (err) {
console.log(err);
}
}
@ -858,7 +862,7 @@ class SiopasMap extends Component {
if (layer.get('type') == 'layerGroup') {
layer.getLayers().forEach((sublayer, i) => {
if (sublayer.getVisible()) {
url = sublayer.getSource().getGetFeatureInfoUrl(evt.coordinate, viewResolution, viewProjection, {'INFO_FORMAT': 'application/json'});
url = sublayer.getSource().getGetFeatureInfoUrl(evt.coordinate, viewResolution, viewProjection, { 'INFO_FORMAT': 'application/json' });
if (url) {
promises.push(axios.get(url));
}
@ -874,7 +878,7 @@ class SiopasMap extends Component {
console.log('hitGeojson', hitGeojson);
}
else if (layer.get('source_type') === "wms") {
url = layer.getSource().getGetFeatureInfoUrl(evt.coordinate, viewResolution, viewProjection, {'INFO_FORMAT': 'application/json'});
url = layer.getSource().getGetFeatureInfoUrl(evt.coordinate, viewResolution, viewProjection, { 'INFO_FORMAT': 'application/json' });
if (url) {
promises.push(axios.get(url));
}
@ -887,7 +891,7 @@ class SiopasMap extends Component {
if (hitGeojson && hitGeojson.length > 0) {
for (let i=0; i < hitGeojson.length; i++) {
for (let i = 0; i < hitGeojson.length; i++) {
let feature = hitGeojson[i];
let feat = {
@ -921,7 +925,7 @@ class SiopasMap extends Component {
console.log('mapOnClick response promises', response);
if (response.data !== undefined) {
if (response.data.features.length > 0) {
for(let i=0; i < response.data.features.length; i++) {
for (let i = 0; i < response.data.features.length; i++) {
featureGet.push(response.data.features[i]);
}
}
@ -949,7 +953,7 @@ class SiopasMap extends Component {
removeChosenLayer = () => {
this.olmap.getLayers().forEach((layer, i) => {
if (layer) {
if (layer.get('name') !== undefined && layer.get('name') === 'ChosenLayer' ) {
if (layer.get('name') !== undefined && layer.get('name') === 'ChosenLayer') {
layer.getSource().clear();
this.olmap.removeLayer(layer);
}
@ -958,13 +962,13 @@ class SiopasMap extends Component {
}
openPopupRight() {
this.setState({popupRightVisible: true}, () => this.setActiveListFeature());
this.setState({ popupRightVisible: true }, () => this.setActiveListFeature());
}
closePopupRight() {
this.setState({popupRightVisible: false, popupDataTemp: []}, () => this.setActiveListFeature());
this.setState({ popupRightVisible: false, popupDataTemp: [] }, () => this.setActiveListFeature());
this.removeChosenLayer(); // selected features
this.setState({editGeometryVisible: false, routingBarVisible: false}); // disable editing when no ChosenLayer on Map
this.setState({ editGeometryVisible: false, routingBarVisible: false }); // disable editing when no ChosenLayer on Map
}
/*toggleImagePopup() {
@ -972,7 +976,7 @@ class SiopasMap extends Component {
}*/
setPopupDataTemp = (feature) => {
this.setState({popupDataTemp: [feature]}, () => this.setActiveListFeature());
this.setState({ popupDataTemp: [feature] }, () => this.setActiveListFeature());
}
reloadPopupData = () => {
@ -982,18 +986,18 @@ class SiopasMap extends Component {
setActiveListFeature = () => {
if (this.state.popupRightVisible) {
if (this.state.popupDataTemp.length === 1) {
this.setState({activeListFeatureId: this.state.popupDataTemp[0].id}, () => {
this.setState({ activeListFeatureId: this.state.popupDataTemp[0].id }, () => {
let layerName = this.state.activeListFeatureId ? this.state.activeListFeatureId.substr(0, this.state.activeListFeatureId.indexOf('.')) : '';
this.getLayerAttribute(layerName);
})
}
else {
this.setState({activeListFeatureId: ''}, () => {
this.setState({ activeListFeatureId: '' }, () => {
})
}
}
else {
this.setState({activeListFeatureId: ''}, () => {
this.setState({ activeListFeatureId: '' }, () => {
})
}
}
@ -1011,11 +1015,11 @@ class SiopasMap extends Component {
if (dataMap.zoom == null) {
this.setDefaultMap();
}
else if (dataMap.center_x == null && dataMap.center_y == null ) {
else if (dataMap.center_x == null && dataMap.center_y == null) {
this.setDefaultMap();
}
else {
this.setState({mapZoom: dataMap.zoom, mapCenter: [dataMap.center_x, dataMap.center_y]});
this.setState({ mapZoom: dataMap.zoom, mapCenter: [dataMap.center_x, dataMap.center_y] });
this.olmap.getView().animate({
zoom: dataMap.zoom,
center: [dataMap.center_x, dataMap.center_y]
@ -1026,7 +1030,7 @@ class SiopasMap extends Component {
layersToRemove.push(layer);
});
if (layersToRemove.length > 0) {
for(let i=0; i < layersToRemove.length; i++) {
for (let i = 0; i < layersToRemove.length; i++) {
this.olmap.removeLayer(layersToRemove[i]);
}
}
@ -1035,7 +1039,7 @@ class SiopasMap extends Component {
let map_layers = dataMap.map_layers;
if (map_layers !== undefined) {
if (map_layers.length > 0) {
for (let i=0; i < map_layers.length; i++) {
for (let i = 0; i < map_layers.length; i++) {
let newLayer = null;
if (map_layers[i].layer_type !== 'base') {
@ -1114,7 +1118,7 @@ class SiopasMap extends Component {
*/
let confirmation = window.confirm('Are you sure you want to save this map?');
let mapId = MAP_ID; // get from m_group
let mapTitle = localStorage.getItem('u_group')+"_map"; // get from m_group
let mapTitle = localStorage.getItem('u_group') + "_map"; // get from m_group
let mapZoom = this.olmap.getView().getZoom();
let mapProjection = this.olmap.getView().getProjection().code_;
let mapCenter = this.olmap.getView().getCenter();
@ -1127,7 +1131,7 @@ class SiopasMap extends Component {
let count = 0;
if (confirmation) {
this.olmap.getLayers().forEach( async (layer, i) => {
this.olmap.getLayers().forEach(async (layer, i) => {
layerType = layer.get('type') !== undefined ? layer.get('type') : 'layer';
@ -1171,11 +1175,11 @@ class SiopasMap extends Component {
layer_type: layerType,
layer_geom_type: layerGeomType,
layer_source: {
url: appConfig.geoserver_host+'wms',
url: appConfig.geoserver_host + 'wms',
params: {
'LAYERS': appConfig.workspace_name+':'+layer.get('name'),
'LAYERS': appConfig.workspace_name + ':' + layer.get('name'),
'TILED': true,
'SLD': layerStyleUrl+layer.get('name')
'SLD': layerStyleUrl + layer.get('name')
},
serverType: 'geoserver',
transition: 0,
@ -1200,7 +1204,7 @@ class SiopasMap extends Component {
'center_y': center_y,
'map_layers': mapLayers
};
console.log('requestPayload',requestPayload);
console.log('requestPayload', requestPayload);
this.saveMapToApi(requestPayload);
}
});
@ -1211,20 +1215,20 @@ class SiopasMap extends Component {
const param = {
method: 'POST',
header: JSON.stringify({'Content-Type': 'application/json'}),
header: JSON.stringify({ 'Content-Type': 'application/json' }),
body: JSON.stringify(requestPayload)
}
try {
const result = await fetch(API_UPDATE_MAP, param).then(response => response.json()).then(res => res)
if(result.data){
console.log('after save',result);
this.setState({alert: true, messageAlert: result.code_message, successAlert: true, dangerAlert: false})
if (result.data) {
console.log('after save', result);
this.setState({ alert: true, messageAlert: result.code_message, successAlert: true, dangerAlert: false })
} else {
this.setState({alert: true, messageAlert: result.code_message, successAlert: false, dangerAlert: true})
this.setState({ alert: true, messageAlert: result.code_message, successAlert: false, dangerAlert: true })
}
} catch(err) {
this.setState({alert: true, messageAlert: err.message.toString(), successAlert: false, dangerAlert: true})
} catch (err) {
this.setState({ alert: true, messageAlert: err.message.toString(), successAlert: false, dangerAlert: true })
}
}
@ -1252,7 +1256,7 @@ class SiopasMap extends Component {
}
toggleActiveStateAddGeometry = () => {
this.setState({activeStateAddGeometry: !this.state.activeStateAddGeometry});
this.setState({ activeStateAddGeometry: !this.state.activeStateAddGeometry });
}
printMap = () => {
@ -1279,11 +1283,11 @@ class SiopasMap extends Component {
getLayerAttribute = async (layerName) => {
const res = await getLayerAttribute(layerName);
console.log('getLayerAttribute',res);
console.log('getLayerAttribute', res);
if (res.success) {
if (res.result.data) {
if (res.result.data.length > 0) {
this.setState({layer_attribute: res.result.data}, () => {
this.setState({ layer_attribute: res.result.data }, () => {
console.log(this.state.layer_attribute);
});
}
@ -1295,13 +1299,13 @@ class SiopasMap extends Component {
}
onCheckOpt = (state, checkedKeys) => {
this.setState({[state]: checkedKeys});
this.setState({ [state]: checkedKeys });
}
setLayer = async (state) => {
console.log('setLayer', state);
await this.setState({isProcessing: true});
await this.setState({ isProcessing: true });
this.closePopupRight();
@ -1396,7 +1400,7 @@ class SiopasMap extends Component {
}
if (layersToAdd.length > 0) {
for (let i=0; i < layersToAdd.length; i++) {
for (let i = 0; i < layersToAdd.length; i++) {
this.olmap.addLayer(layersToAdd[i]); // adding layer to exist map
@ -1411,7 +1415,7 @@ class SiopasMap extends Component {
}
await this.setState({isProcessing: false});
await this.setState({ isProcessing: false });
}
getChildrenTree = (data) => {
@ -1421,12 +1425,12 @@ class SiopasMap extends Component {
}
else if (item.laporan_plannings && item.laporan_plannings.length > 0) {
if (this.state.checkedKeysProjectTree.includes(item.key)) {
for (let i=0; i < item.laporan_plannings.length; i++) {
for (let i = 0; i < item.laporan_plannings.length; i++) {
console.log('got features!!!!!');
this.projectFeatures.push({
"type": "Feature",
"id": `realisasi.${item.laporan_plannings[i].id}`,
"properties": {...item.laporan_plannings[i]},
"properties": { ...item.laporan_plannings[i] },
"geometry": {
"type": "Point",
"coordinates": [
@ -1447,7 +1451,7 @@ class SiopasMap extends Component {
const { waspangData, checkedKeysProjectTree } = this.state;
if (checkedKeysProjectTree && checkedKeysProjectTree.length > 0) {
if (waspangData.length > 0) {
for (let i=0; i < waspangData.length; i++) {
for (let i = 0; i < waspangData.length; i++) {
let item = waspangData[i];
if (item.last_waypoint) {
this.waspangFeatures.push({
@ -1506,7 +1510,7 @@ class SiopasMap extends Component {
}
if (layersToAdd.length > 0) {
for (let i=0; i < layersToAdd.length; i++) {
for (let i = 0; i < layersToAdd.length; i++) {
this.olmap.addLayer(layersToAdd[i]); // adding layer to exist map
@ -1540,7 +1544,7 @@ class SiopasMap extends Component {
if (parentObj.hasOwnProperty('children')) {
for (let i=0; i < parentObj.children.length; i++) {
for (let i = 0; i < parentObj.children.length; i++) {
layersToRemove.push(parentObj.children[i].layers.name)
}
@ -1565,7 +1569,7 @@ class SiopasMap extends Component {
if (checkedKeys.includes(parentObj["key"])) {
if (parentObj.hasOwnProperty('children')) {
for (let i=0; i < parentObj.children.length; i++) {
for (let i = 0; i < parentObj.children.length; i++) {
newLayer = this.generateLayerWMSByName(parentObj.children[i].layers.name);
if (newLayer) {
layersToAdd.push(newLayer);
@ -1608,8 +1612,8 @@ class SiopasMap extends Component {
}).then((text) => text);
let result = new WMSCapabilities().read(getExt);
if (result && result.Capability.Layer.Layer.find(l => l.Name === appConfig.workspace_name+':'+layerName)) {
extent = result.Capability.Layer.Layer.find(l => l.Name === appConfig.workspace_name+':'+layerName).EX_GeographicBoundingBox;
if (result && result.Capability.Layer.Layer.find(l => l.Name === appConfig.workspace_name + ':' + layerName)) {
extent = result.Capability.Layer.Layer.find(l => l.Name === appConfig.workspace_name + ':' + layerName).EX_GeographicBoundingBox;
}
}
else if (source_type === 'geojson') {
@ -1628,11 +1632,11 @@ class SiopasMap extends Component {
name: layerName,
source_type: 'wms',
source: new OlSourceTileWMS({
url: appConfig.geoserver_host+'wms',
url: appConfig.geoserver_host + 'wms',
params: {
'LAYERS': appConfig.workspace_name+':'+layerName,
'LAYERS': appConfig.workspace_name + ':' + layerName,
'TILED': true,
'SLD': layerStyleUrl+layerName,
'SLD': layerStyleUrl + layerName,
},
serverType: 'geoserver',
transition: 0,
@ -1653,7 +1657,7 @@ class SiopasMap extends Component {
}
});
if (removeLayers.length > 0) {
for (let i=0; i < removeLayers.length; i++) {
for (let i = 0; i < removeLayers.length; i++) {
this.olmap.removeLayer(removeLayers[i]);
}
}
@ -1668,19 +1672,13 @@ class SiopasMap extends Component {
}
});
if (removeLayers.length > 0) {
for (let i=0; i < removeLayers.length; i++) {
for (let i = 0; i < removeLayers.length; i++) {
this.olmap.removeLayer(removeLayers[i]);
}
}
}
getRoute = () => {
fetch(routeDummy).then((response) => {
response.json().then((result) => {
console.log('getRoute', result);
})
});
}
showRoute = (salesRoute) => {
const { mapProjection } = this.state;
@ -1763,9 +1761,9 @@ class SiopasMap extends Component {
}
searchRouting = async (userId, dateString) => {
await this.setState({isSearchingRoute: true, isProcessing: true});
await this.setState({ isSearchingRoute: true, isProcessing: true });
const {routeType} = this.state;
const { routeType } = this.state;
let routes = null;
if (routeType === 'waspang') {
@ -1773,21 +1771,21 @@ class SiopasMap extends Component {
}
if (routes) {
this.setState({isSearchingRoute: false, isProcessing: false}, () => this.showRoute(routes))
this.setState({ isSearchingRoute: false, isProcessing: false }, () => this.showRoute(routes))
}
else {
this.setState({isSearchingRoute: false, isProcessing: false}, () => toast.warn("Sorry. Couldn't get user waypoint"));
this.setState({ isSearchingRoute: false, isProcessing: false }, () => toast.warn("Sorry. Couldn't get user waypoint"));
}
}
handleQueryBuilder = (query, type, tree) => {
console.log("query builder "+type, query);
this.setState({ queryBuilderOutput:query, queryBuilderType:type, currentQbTree:tree,currentQbType:type }, () => {
if(type === "Sales"){
console.log("query builder " + type, query);
this.setState({ queryBuilderOutput: query, queryBuilderType: type, currentQbTree: tree, currentQbType: type }, () => {
if (type === "Sales") {
this.setLayer('checkedKeysSales');
}else if(type === "Customer"){
} else if (type === "Customer") {
this.setLayer('checkedKeysCustomer');
}else if(type === "Office"){
} else if (type === "Office") {
this.setLayer('checkedKeysOffice');
}
})
@ -1795,15 +1793,16 @@ class SiopasMap extends Component {
handleQbReset = (type) => {
this.setState({
queryBuilderOutput:'',
queryBuilderType:'',
currentQbTree:'',
currentQbType:'' }, () => {
if(type === "Sales"){
queryBuilderOutput: '',
queryBuilderType: '',
currentQbTree: '',
currentQbType: ''
}, () => {
if (type === "Sales") {
this.setLayer('checkedKeysSales');
}else if(type === "Customer"){
} else if (type === "Customer") {
this.setLayer('checkedKeysCustomer');
}else if(type === "Office"){
} else if (type === "Office") {
this.setLayer('checkedKeysOffice');
}
})
@ -1824,7 +1823,7 @@ class SiopasMap extends Component {
}
console.log('chosenProyekId', chosenProyekId);
this.setState({chosenProyekIds: chosenProyekId});
this.setState({ chosenProyekIds: chosenProyekId });
}
getChosenProyekId = () => {
@ -1832,7 +1831,7 @@ class SiopasMap extends Component {
if (checkedKeysProjectTree.length > 0) {
if (checkedKeysProjectTree.includes('project-0')) {
for (let i=0; i < projectTree[0].children.length; i++) {
for (let i = 0; i < projectTree[0].children.length; i++) {
this.chosenProyekTemp.push(projectTree[0].children[i].id);
}
}
@ -1848,7 +1847,7 @@ class SiopasMap extends Component {
getChosenProyekIdByKey = (dataTree) => {
const { checkedKeysProjectTree } = this.state;
for (let i=0; i < dataTree.length; i++) {
for (let i = 0; i < dataTree.length; i++) {
if (checkedKeysProjectTree.includes(dataTree[i].key)) {
if (dataTree[i].parent_id === undefined) {
this.chosenProyekTemp.push(dataTree[i].id) // ambil idnya, karena dia adalah level paling atas (proyek)
@ -1869,19 +1868,19 @@ class SiopasMap extends Component {
}
toggleStatusRight = () => {
this.setState({statusRight:!this.state.statusRight});
this.setState({ statusRight: !this.state.statusRight });
}
toggleProggresBottom = () => {
this.setState({proggressBottom:!this.state.proggressBottom})
this.setState({ proggressBottom: !this.state.proggressBottom })
}
closeStatusRight = () => {
this.setState({statusRight:false});
this.setState({ statusRight: false });
}
closeProggressBottom = () => {
this.setState({proggressBottom:false})
this.setState({ proggressBottom: false })
}
render() {
@ -1895,7 +1894,7 @@ class SiopasMap extends Component {
printMap={() => this.printMap()}
onLogout={(e) => this.signOut(e)}
/>
<Container fluid style={{top: 50, position: 'absolute', overflow: 'hidden'}}>
<Container fluid style={{ top: 50, position: 'absolute', overflow: 'hidden' }}>
<Row>
<Col md={this.state.statusRight ? 9 : 12} className="not-left-col">
<Row>
@ -1912,11 +1911,11 @@ class SiopasMap extends Component {
draggable
pauseOnHover
/>
<SweetAlert show={alert} success={successAlert} danger={dangerAlert} title={messageAlert} onConfirm={() => this.setState({alert: false, successAlert: false, dangerAlert: false})}>
<SweetAlert show={alert} success={successAlert} danger={dangerAlert} title={messageAlert} onConfirm={() => this.setState({ alert: false, successAlert: false, dangerAlert: false })}>
{messageAlert}
</SweetAlert>
{ this.state.isProcessing &&
{this.state.isProcessing &&
<div className="loader-container">
<Loader
type="TailSpin"
@ -1933,7 +1932,7 @@ class SiopasMap extends Component {
visible={this.state.popupRightVisible}
mask={false}
width={360}
style={{ marginRight: 15, height:this.state.proggressBottom ? `50vh` : `100vh`, position: 'absolute'}}
style={{ marginRight: 15, height: this.state.proggressBottom ? `50vh` : `100vh`, position: 'absolute' }}
getContainer={false}
>
<div>{this.state.popupRightVisible ?
@ -1951,14 +1950,14 @@ class SiopasMap extends Component {
layer_attribute={this.state.layer_attribute}
searchLabelData={this.state.searchLabelData}
layerInfo={this.state.layerInfo}
toggleRoutingBarVisible={() => this.setState({routingBarVisible: !this.state.routingBarVisible})}
setRouteType={(routeType) => this.setState({routeType: routeType})}
toggleRoutingBarVisible={() => this.setState({ routingBarVisible: !this.state.routingBarVisible })}
setRouteType={(routeType) => this.setState({ routeType: routeType })}
/> : null
}</div>
</Drawer>
<MapProvider map={this.olmap}>
<Map className="map" id="map"/>
<Map className="map" id="map" />
<MapToolbar
className="no-print"
olmap={this.olmap}
@ -1990,17 +1989,17 @@ class SiopasMap extends Component {
checkedKeysProjectTree={this.state.checkedKeysProjectTree}
salesGroupTree={this.state.salesGroupTree}
employeeDivisionTree={this.state.employeeDivisionTree}
setSalesGroupTree={(data) => this.setState({salesGroupTree: data})}
setEmployeeDivisionTree={(data) => this.setState({employeeDivisionTree: data})}
setSalesGroupTree={(data) => this.setState({ salesGroupTree: data })}
setEmployeeDivisionTree={(data) => this.setState({ employeeDivisionTree: data })}
showRoute={(route) => this.showRoute(route)}
removeLayerByName={(layerName) => this.removeLayerByName(layerName)}
setIsProcessing={(data) => this.setState({isProcessing: data})}
setIsProcessing={(data) => this.setState({ isProcessing: data })}
handleQueryBuilder={this.handleQueryBuilder}
currentQbTree={this.state.currentQbTree}
currentQbType={this.state.currentQbType}
handleQbReset={this.handleQbReset}
projectTree={this.state.projectTree}
setProjectTree={(data) => this.setState({projectTree: data})}
setProjectTree={(data) => this.setState({ projectTree: data })}
proggressBottom={this.state.proggressBottom}
toggleStatusRight={this.toggleStatusRight}
toggleProggresBottom={this.toggleProggresBottom}
@ -2020,15 +2019,15 @@ class SiopasMap extends Component {
/>
}
{ this.state.routingBarVisible &&
{this.state.routingBarVisible &&
<RoutingBar
salesName="test"
toggleRoutingBarVisible={() => this.setState({routingBarVisible: !this.state.routingBarVisible})}
toggleRoutingBarVisible={() => this.setState({ routingBarVisible: !this.state.routingBarVisible })}
popupDataTemp={this.state.popupDataTemp}
setPopupDataTemp={(feature) => this.props.setPopupDataTemp(feature)}
searchRouting={(userId, dateString) => this.searchRouting(userId, dateString)}
isSearchingRoute={this.state.isSearchingRoute}
setRouteType={(routeType) => this.setState({routeType: routeType})}
setRouteType={(routeType) => this.setState({ routeType: routeType })}
/>
}
@ -2045,10 +2044,10 @@ class SiopasMap extends Component {
</Row>
{this.state.proggressBottom ?
<Row>
<Col md={6} style={{paddingRight: 0}}>
<Card className="remove-gap-bs-card" style={{height: 'calc(100vh - 50px - (100vh / 2))'}}>
<Col md={6} style={{ paddingRight: 0 }}>
<Card className="remove-gap-bs-card" style={{ height: 'calc(100vh - 50px - (100vh / 2))' }}>
<CardHeader className="panel-title">
<span style={{left:'50', right:'50',marginLeft:'auto',marginRight:'auto'}}>Persentase Progress Proyek</span> <span onClick={this.closeProggressBottom} style={{float:'right',marginLeft:'auto',right:0,cursor:'pointer'}}>x</span>
<span style={{ left: '50', right: '50', marginLeft: 'auto', marginRight: 'auto' }}>Persentase Progress Proyek</span> <span onClick={this.closeProggressBottom} style={{ float: 'right', marginLeft: 'auto', right: 0, cursor: 'pointer' }}>x</span>
</CardHeader>
<CardBody>
{/* <Line
@ -2086,10 +2085,10 @@ class SiopasMap extends Component {
</CardBody>
</Card>
</Col>
<Col md={6} style={{paddingLeft: 0}}>
<Card className="remove-gap-bs-card" style={{height: 'calc(100vh - 50px - (100vh / 2))'}}>
<Col md={6} style={{ paddingLeft: 0 }}>
<Card className="remove-gap-bs-card" style={{ height: 'calc(100vh - 50px - (100vh / 2))' }}>
<CardHeader className="panel-title">
<span style={{left:'50', right:'50',marginLeft:'auto',marginRight:'auto'}}>Progress Cost Perencanaan dan Realisasi</span> <span onClick={this.closeProggressBottom} style={{marginRight:'7px',float:'right',marginLeft:'auto',right:0,cursor:'pointer'}}>x</span>
<span style={{ left: '50', right: '50', marginLeft: 'auto', marginRight: 'auto' }}>Progress Cost Perencanaan dan Realisasi</span> <span onClick={this.closeProggressBottom} style={{ marginRight: '7px', float: 'right', marginLeft: 'auto', right: 0, cursor: 'pointer' }}>x</span>
</CardHeader>
<CardBody>
{/* <Line
@ -2130,9 +2129,9 @@ class SiopasMap extends Component {
<Col md={3} className="not-left-col">
<Row>
<Col md={12}>
<Card className="remove-gap-bs-card" style={{height: 'calc(100vh - 40px - (100vh / 2))'}}>
<Card className="remove-gap-bs-card" style={{ height: 'calc(100vh - 40px - (100vh / 2))' }}>
<CardHeader className="panel-title">
<span style={{left:'50', right:'50',marginLeft:'auto',marginRight:'auto'}}>Status Proyek</span> <span onClick={this.closeStatusRight} style={{float:'right',marginLeft:'auto',right:0,cursor:'pointer'}}>x</span>
<span style={{ left: '50', right: '50', marginLeft: 'auto', marginRight: 'auto' }}>Status Proyek</span> <span onClick={this.closeStatusRight} style={{ float: 'right', marginLeft: 'auto', right: 0, cursor: 'pointer' }}>x</span>
</CardHeader>
<CardBody>
{/* <PieChart data={dataStatusProyek || defaultStatusProyek} /> */}
@ -2152,9 +2151,9 @@ class SiopasMap extends Component {
</Card>
</Col>
<Col md={12}>
<Card className="remove-gap-bs-card" style={{height: 'calc(100vh - 40px - (100vh / 2))'}}>
<Card className="remove-gap-bs-card" style={{ height: 'calc(100vh - 40px - (100vh / 2))' }}>
<CardHeader className="panel-title">
<span style={{left:'50', right:'50',marginLeft:'auto',marginRight:'auto'}}>Status Pengawas Lapangan</span> <span onClick={this.closeStatusRight} style={{float:'right',marginLeft:'auto',right:0,cursor:'pointer'}}>x</span>
<span style={{ left: '50', right: '50', marginLeft: 'auto', marginRight: 'auto' }}>Status Pengawas Lapangan</span> <span onClick={this.closeStatusRight} style={{ float: 'right', marginLeft: 'auto', right: 0, cursor: 'pointer' }}>x</span>
</CardHeader>
<CardBody>
{/* <Pie
@ -2209,7 +2208,7 @@ class SiopasMap extends Component {
handleClickChart={() => console.log('click chart')}
/> */}
</Col>
: null }
: null}
</Row>
</Container>
</div>

17
src/views/Pages/Login/Login.js

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
import Slider from "react-slick";
@ -19,24 +18,12 @@ import {
InputGroupAddon,
InputGroupText,
Row,
UncontrolledAlert,
Alert,
Carousel,
CarouselIndicators,
CarouselCaption,
CarouselItem,
CarouselControl
} from 'reactstrap';
import { USER_LOGIN, USER_LOGIN_V2, CALERTUSER_SEARCH, MENU_MANAGEMENT, APP_MODE, ROLE_SEARCH } from '../../../const/ApiConst.js';
import { appConfig, reloadConstants } from '../../../const/MapConst.js';
import { APP_NAME } from '../../../const/AppConst.js'
import moment from "moment"
import { USER_LOGIN_V2, CALERTUSER_SEARCH, MENU_MANAGEMENT, ROLE_SEARCH } from '../../../const/ApiConst.js';
import axios from 'axios';
import { NotificationContainer, NotificationManager } from 'react-notifications';
import logo_login_adw from '../../../assets/img/logo_adyawinsa.jpg'
import logo_login_kit from '../../../assets/img/logo_kit.png'
import logo_login_nawakara from '../../../assets/img/logo_nawakara.png'
import logo_login_si from '../../../assets/img/logo-surveyor-indonesia.png'
import logo_ospro from '../../../assets/img/OSPRO.png'
const antIcon = <LoadingOutlined style={{ fontSize: 24 }} spin />;

Loading…
Cancel
Save