Browse Source

remove code not used

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

150
src/components/MapHeader/MapHeader.js

@ -1,20 +1,16 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Link, NavLink } from 'react-router-dom'; import { NavLink } from 'react-router-dom';
import { Badge, UncontrolledDropdown, DropdownItem, DropdownMenu, DropdownToggle, Nav, NavItem, import {
InputGroup, Input, InputGroupAddon, InputGroupText, Button, UncontrolledTooltip UncontrolledDropdown, DropdownItem, DropdownMenu, DropdownToggle, Nav, NavItem,
UncontrolledTooltip
} from 'reactstrap'; } from 'reactstrap';
import PropTypes from 'prop-types'; 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 user_logo from '../../assets/img/avatars/user.png'
import sygnet from '../../assets/img/brand/sygnet.svg' import { Icon } from '@iconify/react';
import { Icon, InlineIcon } from '@iconify/react';
import saveOutline from '@iconify/icons-ion/save-outline';
import printOutline from '@iconify/icons-ion/print-outline'; import printOutline from '@iconify/icons-ion/print-outline';
import { import {
AppHeader AppHeader
} from '@coreui/react'; } from '@coreui/react';
import { import {
mappify, mappify,
@ -23,7 +19,7 @@ import {
import { nominatimBaseUrl } from '../../const/MapConst'; import { nominatimBaseUrl } from '../../const/MapConst';
const propTypes = { const propTypes = {
children: PropTypes.node, children: PropTypes.node,
}; };
const defaultProps = {}; const defaultProps = {};
@ -31,71 +27,71 @@ const defaultProps = {};
class MapHeader extends Component { class MapHeader extends Component {
getHeaderMenu = () => { getHeaderMenu = () => {
let u_group = localStorage.getItem('u_group'); let u_group = localStorage.getItem('u_group');
if (u_group == 'kominfo') { if (u_group == 'kominfo') {
return ( return (
<NavItem className="px-3"> <NavItem className="px-3">
<NavLink to="/dashboard-kominfo" className="nav-link" >Dashboard</NavLink> <NavLink to="/dashboard-kominfo" className="nav-link" >Dashboard</NavLink>
</NavItem> </NavItem>
) )
} }
else { else {
return ( return (
<NavItem className="px-3"> <NavItem className="px-3">
<NavLink to="/dashboard" className="nav-link" >Dashboard</NavLink> <NavLink to="/dashboard" className="nav-link" >Dashboard</NavLink>
</NavItem> </NavItem>
) )
} }
} }
getLogo = () => { getLogo = () => {
return ( return (
<div style={{fontWeight: 'bold', fontSize: 30, fontFamily: 'Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif', textAlign: 'center', marginLeft: 25, marginRight: 20}}> <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> <span style={{ color: '#4472C4' }}>OS</span><span style={{ color: '#ED7D31' }}>PRO</span>
</div> </div>
) )
} }
render() { render() {
const { children, ...attributes } = this.props; const { children, ...attributes } = this.props;
return ( return (
<AppHeader fixed> <AppHeader fixed>
{/*<AppNavbarBrand {/*<AppNavbarBrand
full={{ src: logo, width: 89, height: 35, alt: 'SIOPAS Logo' }} full={{ src: logo, width: 89, height: 35, alt: 'SIOPAS Logo' }}
minimized={{ src: logo, width: 30, height: 35, alt: 'SIOPAS Logo' }} minimized={{ src: logo, width: 30, height: 35, alt: 'SIOPAS Logo' }}
/>*/} />*/}
{ this.getLogo() } {this.getLogo()}
<Nav className="d-md-down-none" navbar> <Nav className="d-md-down-none" navbar>
{ this.getHeaderMenu() } {this.getHeaderMenu()}
</Nav> </Nav>
<Nav className="ml-auto" navbar> <Nav className="ml-auto" navbar>
{/*<InputGroup> {/*<InputGroup>
<Input placeholder="Search Address" /> <Input placeholder="Search Address" />
<InputGroupAddon addonType="append"> <InputGroupAddon addonType="append">
<Button color="secondary"><i className="fa fa-search" style={{color: '#ffffff'}}></i></Button> <Button color="secondary"><i className="fa fa-search" style={{color: '#ffffff'}}></i></Button>
</InputGroupAddon> </InputGroupAddon>
</InputGroup>*/} </InputGroup>*/}
<NominatimSearch <NominatimSearch
map={this.props.olmap} map={this.props.olmap}
placeholder="Search Address" placeholder="Search Address"
nominatimBaseUrl={nominatimBaseUrl} nominatimBaseUrl={nominatimBaseUrl}
countrycodes="id" countrycodes="id"
/> />
{/*<NavItem className="d-md-down-none"> {/*<NavItem className="d-md-down-none">
<NavLink to="#" className="nav-link"><i className="icon-bell"></i><Badge pill color="danger">5</Badge></NavLink> <NavLink to="#" className="nav-link"><i className="icon-bell"></i><Badge pill color="danger">5</Badge></NavLink>
</NavItem>*/} </NavItem>*/}
{/*<NavItem className="d-md-down-none"> {/*<NavItem className="d-md-down-none">
<NavLink to="#" className="nav-link"><i className="icon-list"></i></NavLink> <NavLink to="#" className="nav-link"><i className="icon-list"></i></NavLink>
</NavItem>*/} </NavItem>*/}
{/*<NavItem className="d-md-down-none"> {/*<NavItem className="d-md-down-none">
<NavLink to="#" className="nav-link"><i className="icon-location-pin"></i></NavLink> <NavLink to="#" className="nav-link"><i className="icon-location-pin"></i></NavLink>
</NavItem>*/} </NavItem>*/}
{/*<div> {/*<div>
<NavItem className="d-md-down-none" id="saveMap"> <NavItem className="d-md-down-none" id="saveMap">
<NavLink to="#" className="nav-link" onClick={() => this.props.saveMap()}><Icon icon={saveOutline} width={15} height={15} /></NavLink> <NavLink to="#" className="nav-link" onClick={() => this.props.saveMap()}><Icon icon={saveOutline} width={15} height={15} /></NavLink>
</NavItem> </NavItem>
@ -104,20 +100,20 @@ class MapHeader extends Component {
</UncontrolledTooltip> </UncontrolledTooltip>
</div>*/} </div>*/}
<div> <div>
<NavItem className="d-md-down-none" id="printMap"> <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> </NavItem>
<UncontrolledTooltip placement="bottom" target="printMap"> <UncontrolledTooltip placement="bottom" target="printMap">
Print Map Print Map
</UncontrolledTooltip> </UncontrolledTooltip>
</div> </div>
<UncontrolledDropdown nav direction="down"> <UncontrolledDropdown nav direction="down">
<DropdownToggle nav> <DropdownToggle nav>
<img src={user_logo} className="img-avatar" alt="admin@bootstrapmaster.com" /> <img src={user_logo} className="img-avatar" alt="admin@bootstrapmaster.com" />
</DropdownToggle> </DropdownToggle>
<DropdownMenu right> <DropdownMenu right>
{/*<DropdownItem header tag="div" className="text-center"><strong>Account</strong></DropdownItem> {/*<DropdownItem header tag="div" className="text-center"><strong>Account</strong></DropdownItem>
<DropdownItem><i className="fa fa-bell-o"></i> Updates<Badge color="info">42</Badge></DropdownItem> <DropdownItem><i className="fa fa-bell-o"></i> Updates<Badge color="info">42</Badge></DropdownItem>
<DropdownItem><i className="fa fa-envelope-o"></i> Messages<Badge color="success">42</Badge></DropdownItem> <DropdownItem><i className="fa fa-envelope-o"></i> Messages<Badge color="success">42</Badge></DropdownItem>
<DropdownItem><i className="fa fa-tasks"></i> Tasks<Badge color="danger">42</Badge></DropdownItem> <DropdownItem><i className="fa fa-tasks"></i> Tasks<Badge color="danger">42</Badge></DropdownItem>
@ -129,13 +125,13 @@ class MapHeader extends Component {
<DropdownItem><i className="fa fa-file"></i> Projects<Badge color="primary">42</Badge></DropdownItem> <DropdownItem><i className="fa fa-file"></i> Projects<Badge color="primary">42</Badge></DropdownItem>
<DropdownItem divider /> <DropdownItem divider />
<DropdownItem><i className="fa fa-shield"></i> Lock Account</DropdownItem>*/} <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> <DropdownItem onClick={e => this.props.onLogout(e)}><i className="fa fa-lock"></i> Logout</DropdownItem>
</DropdownMenu> </DropdownMenu>
</UncontrolledDropdown> </UncontrolledDropdown>
</Nav> </Nav>
</AppHeader> </AppHeader>
) )
} }

222
src/components/PopupContainer/PopupContainer.js

@ -1,6 +1,6 @@
import React, { Component, Fragment } from 'react'; import React, { Component, Fragment } from 'react';
import {Vector as VectorLayer} from 'ol/layer'; import { Vector as VectorLayer } from 'ol/layer';
import {Vector as VectorSource} from 'ol/source'; import { Vector as VectorSource } from 'ol/source';
import Feature from 'ol/Feature'; import Feature from 'ol/Feature';
import { Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon } from 'ol/geom'; import { Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon } from 'ol/geom';
import { Circle as CircleStyle, Fill, Icon as IconOl, Stroke, Style, Text } from 'ol/style'; 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 moment from "moment"
import { deleteFeature, getImagePopup, formatLength, formatArea, lightOrDark } from '../../const/GeoserverFunc.js'; import { deleteFeature, getImagePopup, formatLength, formatArea, lightOrDark } from '../../const/GeoserverFunc.js';
import { formatLabel, hideAttr, dateColumns, DATE_TIME_FORMAT } from '../../const/CustomFunc.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 { API_UPLOAD_IMAGE, BASE_IMAGE, BASE_SIMPRO } from '../../const/ApiConst.js'
import routeDummy from '../../dummy_data/route2.json';
class PopupContainer extends Component { class PopupContainer extends Component {
@ -69,7 +69,7 @@ class PopupContainer extends Component {
} }
componentDidMount() { componentDidMount() {
this.setState({isReady: true}); this.setState({ isReady: true });
} }
/*componentDidMount() { /*componentDidMount() {
@ -91,18 +91,18 @@ class PopupContainer extends Component {
matchLayerAttribute = (propKey) => { matchLayerAttribute = (propKey) => {
const { layer_attribute } = this.props; 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 !== '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) { if (propKey == layer_attribute[i].attribute) {
return layer_attribute[i].attribute_label; return layer_attribute[i].attribute_label;
}
} }
else { }
if (propKey == layer_attribute[i].attribute) { else {
return layer_attribute[i].attribute; if (propKey == layer_attribute[i].attribute) {
} return layer_attribute[i].attribute;
} }
}
} }
} }
} }
@ -234,18 +234,18 @@ class PopupContainer extends Component {
</div> </div>
{/*<div className="image-slider" onClick={() => this.showImageFeature(selectedPopupData)}>*/} {/*<div className="image-slider" onClick={() => this.showImageFeature(selectedPopupData)}>*/}
<div className="image-popup-container"> <div className="image-popup-container">
{ this.renderImageSlider(selectedPopupData) } {this.renderImageSlider(selectedPopupData)}
</div> </div>
<div className="popup-body custom-scroll"> <div className="popup-body custom-scroll">
<table className="table popup-table"> <table className="table popup-table">
<tbody> <tbody>
{ this.renderOneRowFeature(popupProperties) } {this.renderOneRowFeature(popupProperties)}
</tbody> </tbody>
</table> </table>
</div> </div>
<div className="popup-footer"> <div className="popup-footer">
<div className="btn-group"> <div className="btn-group">
{ this.renderButtonFooter(selectedPopupData) } {this.renderButtonFooter(selectedPopupData)}
</div> </div>
</div> </div>
</div> </div>
@ -261,7 +261,7 @@ class PopupContainer extends Component {
for (let key in popupProperties) { for (let key in popupProperties) {
if (typeof(popupProperties[key]) === 'object') { if (typeof (popupProperties[key]) === 'object') {
for (let prop in popupProperties[key]) { for (let prop in popupProperties[key]) {
modPopupProperties[prop] = popupProperties[key][prop]; modPopupProperties[prop] = popupProperties[key][prop];
} }
@ -271,7 +271,7 @@ class PopupContainer extends Component {
} }
for (let key in modPopupProperties) { for (let key in modPopupProperties) {
if (typeof(modPopupProperties[key]) === 'object') { if (typeof (modPopupProperties[key]) === 'object') {
delete modPopupProperties[key]; delete modPopupProperties[key];
} }
} }
@ -310,7 +310,7 @@ class PopupContainer extends Component {
renderButtonFooter = (selectedPopupData) => { renderButtonFooter = (selectedPopupData) => {
let layer_name = selectedPopupData.id && selectedPopupData.id.substr(0, selectedPopupData.id.indexOf(".")); let layer_name = selectedPopupData.id && selectedPopupData.id.substr(0, selectedPopupData.id.indexOf("."));
return( return (
<Fragment> <Fragment>
<Button color="success" size="sm" outline onClick={() => this.showImageFeature(selectedPopupData)} id="showImageFeature"> <Button color="success" size="sm" outline onClick={() => this.showImageFeature(selectedPopupData)} id="showImageFeature">
<Icon icon={imageOutline} width={15} height={15} /> <Icon icon={imageOutline} width={15} height={15} />
@ -336,13 +336,13 @@ class PopupContainer extends Component {
<UncontrolledTooltip placement="bottom" target="editFeature"> <UncontrolledTooltip placement="bottom" target="editFeature">
Edit Attribute Edit Attribute
</UncontrolledTooltip> </UncontrolledTooltip>
{ this.props.activeStateAddGeometry ? {this.props.activeStateAddGeometry ?
(<Button disabled color="success" size="sm" outline id="editGeometry"> (<Button disabled color="success" size="sm" outline id="editGeometry">
<Icon icon={pencilIcon} width={15} height={15} /> <Icon icon={pencilIcon} width={15} height={15} />
</Button>) : </Button>) :
(<Button color="success" size="sm" outline onClick={() => this.editGeometry(selectedPopupData)} id="editGeometry"> (<Button color="success" size="sm" outline onClick={() => this.editGeometry(selectedPopupData)} id="editGeometry">
<Icon icon={pencilIcon} width={15} height={15} /> <Icon icon={pencilIcon} width={15} height={15} />
</Button>) </Button>)
} }
<UncontrolledTooltip placement="bottom" target="editGeometry"> <UncontrolledTooltip placement="bottom" target="editGeometry">
Edit Geometry Edit Geometry
@ -354,21 +354,21 @@ class PopupContainer extends Component {
Delete Feature Delete Feature
</UncontrolledTooltip> </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 <Button color="success" size="sm" outline
onClick={() => { onClick={() => {
let routeType = layer_name.split("_")[1]; let routeType = layer_name.split("_")[1];
this.props.toggleRoutingBarVisible() this.props.toggleRoutingBarVisible()
this.props.setRouteType(routeType) this.props.setRouteType(routeType)
}} }}
id="showRoute"> id="showRoute">
<Icon icon={routeIcon} width={15} height={15} /> <Icon icon={routeIcon} width={15} height={15} />
</Button> </Button>
<UncontrolledTooltip placement="bottom" target="showRoute"> <UncontrolledTooltip placement="bottom" target="showRoute">
Show Route Show Route
</UncontrolledTooltip> </UncontrolledTooltip>
</> } </>}
</Fragment> </Fragment>
) )
} }
@ -466,13 +466,13 @@ class PopupContainer extends Component {
<div className="popup-body custom-scroll"> <div className="popup-body custom-scroll">
<table className="table table-hover popup-table"> <table className="table table-hover popup-table">
<tbody> <tbody>
{ popupDataTemp.map((item, index) => { {popupDataTemp.map((item, index) => {
return (<tr key={index} className="popup-row-list-feature" return (<tr key={index} className="popup-row-list-feature"
onClick={() => this.chooseOneFeature(item)}> onClick={() => this.chooseOneFeature(item)}>
<td>{this.getFeaturesLabel(item)}</td> <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>) </tr>)
}) } })}
</tbody> </tbody>
</table> </table>
</div> </div>
@ -492,73 +492,73 @@ class PopupContainer extends Component {
showImageFeature = (selectedPopupData) => { showImageFeature = (selectedPopupData) => {
console.log('show images', selectedPopupData); console.log('show images', selectedPopupData);
this.setState({imagePopupTitle: selectedPopupData.id}); this.setState({ imagePopupTitle: selectedPopupData.id });
this.toggleImagePopup(); this.toggleImagePopup();
} }
getFrontPhotoLicense = event => { getFrontPhotoLicense = event => {
this.setState({ this.setState({
photo_feature: event.target.files[0], photo_feature: event.target.files[0],
image_feature: URL.createObjectURL(event.target.files[0]), image_feature: URL.createObjectURL(event.target.files[0]),
imagePreviewVisible: true imagePreviewVisible: true
}) })
} }
toggleImagePopup = () => { toggleImagePopup = () => {
this.setState({imagePopupVisible: !this.state.imagePopupVisible}); this.setState({ imagePopupVisible: !this.state.imagePopupVisible });
} }
handleUploadImage = async () => { handleUploadImage = async () => {
const {photo_feature, image_feature, imagePopupTitle} = this.state const { photo_feature, image_feature, imagePopupTitle } = this.state
const category = imagePopupTitle.split("."); const category = imagePopupTitle.split(".");
let type = category[0] let type = category[0]
let id = category[1] let id = category[1]
let imageType = '' let imageType = ''
if(type==="m_office"){ if (type === "m_office") {
imageType="office" imageType = "office"
}else if(type==="m_sales"){ } else if (type === "m_sales") {
imageType="m_sales" imageType = "m_sales"
}else if(type==="m_employee"){ } else if (type === "m_employee") {
imageType="employee" imageType = "employee"
}else{ } else {
imageType="customer" imageType = "customer"
} }
const formData = new FormData() const formData = new FormData()
formData.append('ref_id', id) formData.append('ref_id', id)
formData.append('files', photo_feature) formData.append('files', photo_feature)
let url = `${BASE_SIMPRO}/image/${imageType}/upload`; let url = `${BASE_SIMPRO}/image/${imageType}/upload`;
const result = await axios.post(url, formData) const result = await axios.post(url, formData)
.then(res => res) .then(res => res)
.catch((error) => error.response); .catch((error) => error.response);
return result return result
} }
toggleImagePreview = async param => { toggleImagePreview = async param => {
if(param == "upload"){ if (param == "upload") {
const result = await this.handleUploadImage() const result = await this.handleUploadImage()
console.log("response upload image",result); console.log("response upload image", result);
if (result == undefined) { if (result == undefined) {
alert('Upload Failed'); alert('Upload Failed');
return; return;
}
else {
if (result.data.code == 200) {
alert('Successfully uploaded image');
this.toggleImagePopup();
} }
else { else {
if (result.data.code == 200) { console.log('err', result);
alert('Successfully uploaded image'); alert(result.data);
this.toggleImagePopup(); return;
}
else {
console.log('err',result);
alert(result.data);
return;
}
} }
}
} }
this.setState({imagePreviewVisible: !this.state.imagePreviewVisible}); this.setState({ imagePreviewVisible: !this.state.imagePreviewVisible });
} }
showTable = (selectedPopupData) => { showTable = (selectedPopupData) => {
@ -566,16 +566,16 @@ class PopupContainer extends Component {
} }
toggleShowTable = () => { toggleShowTable = () => {
this.setState({mapTableVisible: !this.state.mapTableVisible}) this.setState({ mapTableVisible: !this.state.mapTableVisible })
} }
editFeature = (selectedPopupData) => { editFeature = (selectedPopupData) => {
console.log('edit feature', selectedPopupData); console.log('edit feature', selectedPopupData);
this.setState({selectedPopupData: selectedPopupData}, () => this.toggleEditFeature()); this.setState({ selectedPopupData: selectedPopupData }, () => this.toggleEditFeature());
} }
toggleEditFeature = () => { toggleEditFeature = () => {
this.setState({editFeatureVisible: !this.state.editFeatureVisible}) this.setState({ editFeatureVisible: !this.state.editFeatureVisible })
} }
/*goToFeature = (selectedPopupData) => { /*goToFeature = (selectedPopupData) => {
@ -662,7 +662,7 @@ class PopupContainer extends Component {
} }
toggleEditGeometry = () => { toggleEditGeometry = () => {
this.setState({editGeometryVisible: !this.state.editGeometryVisible}) this.setState({ editGeometryVisible: !this.state.editGeometryVisible })
} }
deleteFeature = async (selectedPopupData) => { deleteFeature = async (selectedPopupData) => {
@ -714,31 +714,31 @@ class PopupContainer extends Component {
if (!isReady) { if (!isReady) {
return <div>Loading...</div> return <div>Loading...</div>
} }
return( return (
<div> <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} {alertMessage}
</SweetAlert> </SweetAlert>
{this.fillPopupContent()} {this.fillPopupContent()}
{ {
this.state.imagePopupVisible && this.state.imagePopupVisible &&
<ImagePopup <ImagePopup
uploadImagePopup={this.getFrontPhotoLicense} uploadImagePopup={this.getFrontPhotoLicense}
imagePopupVisible={this.state.imagePopupVisible} imagePopupVisible={this.state.imagePopupVisible}
toggleImagePopup={() => this.toggleImagePopup()} toggleImagePopup={() => this.toggleImagePopup()}
imagePopupTitle={this.state.imagePopupTitle ? this.state.imagePopupTitle : 'Feature Image'} imagePopupTitle={this.state.imagePopupTitle ? this.state.imagePopupTitle : 'Feature Image'}
id={this.props.popupDataTemp[0].id} id={this.props.popupDataTemp[0].id}
/> />
} }
{ {
this.state.imagePreviewVisible && this.state.imagePreviewVisible &&
<ImagePopupPreview <ImagePopupPreview
imageUrl={this.state.image_feature} imageUrl={this.state.image_feature}
imagePopupVisible={this.state.imagePreviewVisible} imagePopupVisible={this.state.imagePreviewVisible}
toggleImagePopup={this.toggleImagePreview} toggleImagePopup={this.toggleImagePreview}
imagePopupTitle={"Upload Photo"} imagePopupTitle={"Upload Photo"}
/> />
} }
{ {
this.state.editFeatureVisible && this.state.editFeatureVisible &&

12
src/containers/DefaultLayout/DefaultHeader.js

@ -1,14 +1,10 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Link, NavLink } from 'react-router-dom'; import { NavLink } from 'react-router-dom';
import { Badge, UncontrolledDropdown, DropdownItem, DropdownMenu, DropdownToggle, Nav, NavItem } from 'reactstrap'; import { Badge, Nav, NavItem } from 'reactstrap';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Menu, Dropdown, Row, Col } from 'antd' import { Menu, Dropdown } from 'antd'
import { AppAsideToggler, AppNavbarBrand, AppSidebarToggler } from '@coreui/react';
import { ALERTUSER_SEARCH, ALERT_SEARCH, ALERTUSER_STATUSVIEW, ALERT_STATUSVIEW, APP_MODE } from '../../const/ApiConst'; 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 axios from 'axios';
import './Default.css' import './Default.css'
const token = window.localStorage.getItem('token'); const token = window.localStorage.getItem('token');

627
src/views/Map/Map.js

File diff suppressed because it is too large Load Diff

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

@ -1,5 +1,4 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import "slick-carousel/slick/slick.css"; import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css"; import "slick-carousel/slick/slick-theme.css";
import Slider from "react-slick"; import Slider from "react-slick";
@ -19,24 +18,12 @@ import {
InputGroupAddon, InputGroupAddon,
InputGroupText, InputGroupText,
Row, Row,
UncontrolledAlert,
Alert, Alert,
Carousel,
CarouselIndicators,
CarouselCaption,
CarouselItem,
CarouselControl
} from 'reactstrap'; } from 'reactstrap';
import { USER_LOGIN, USER_LOGIN_V2, CALERTUSER_SEARCH, MENU_MANAGEMENT, APP_MODE, ROLE_SEARCH } from '../../../const/ApiConst.js'; import { USER_LOGIN_V2, CALERTUSER_SEARCH, MENU_MANAGEMENT, 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 axios from 'axios'; import axios from 'axios';
import { NotificationContainer, NotificationManager } from 'react-notifications'; 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' import logo_ospro from '../../../assets/img/OSPRO.png'
const antIcon = <LoadingOutlined style={{ fontSize: 24 }} spin />; const antIcon = <LoadingOutlined style={{ fontSize: 24 }} spin />;

Loading…
Cancel
Save