Browse Source

Merge branch 'master' of https://git.oslog.id/ordo/adw-frontend

pull/2/head
Wahyu Ramadhan 2 years ago
parent
commit
e828426805
  1. 4
      src/views/Dashboard/DashboardBOD.js
  2. 25
      src/views/Report/k3/DialogForm.js

4
src/views/Dashboard/DashboardBOD.js

@ -62,7 +62,7 @@ const DashboardBOD = () => {
// project expenditure
const getCompanyCashFlow = async () => {
const URL = `${BASE_OSPRO}/api/dashboard/get-company-cashflow`
const URL = `${BASE_OSPRO}/api/dashboard/get-company-cashflow/${moment().format('YYYY')}`
const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response)
const content = "Get Project Expenditure.";
@ -251,7 +251,7 @@ const DashboardBOD = () => {
}
const getTotalProjectValuePerDivision = async () => {
const URL = `${BASE_OSPRO}/api/dashboard/get-total-project-value-per-division`
const URL = `${BASE_OSPRO}/api/dashboard/get-total-project-value-per-division/${moment().format('YYYY')}`
const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response)
const content = "Get Project Value by Division";

25
src/views/Report/k3/DialogForm.js

@ -1,7 +1,7 @@
import React, { Component } from 'react'
import { Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
import { Col, Row, Button, Form, FormGroup, Label, Input } from 'reactstrap';
import { Image } from 'antd';
import { Button, Form, FormGroup, Label, Input } from 'reactstrap';
import { Image, Col, Row } from 'antd';
import 'antd/dist/antd.css';
import { BASE_SIMPRO_LUMEN_IMAGE } from '../../../const/ApiConst.js';
export default class DialogForm extends Component {
@ -43,12 +43,25 @@ export default class DialogForm extends Component {
}
renderForm = () => {
const { dataImage } = this.props;
return(
<div style={{width:"100%",display:'flex',justifyContent:'center',textAlign:'center'}}>
<div style={{justifyContent:'center'}}>
<Row gutter={[16, 16]}>
<Image.PreviewGroup>
{
dataImage && dataImage.length > 0 && dataImage.map((item, idx) =>
<Col span={8}>
<Image
width={200}
src={`${BASE_SIMPRO_LUMEN_IMAGE}/${this.state.url}`}
style={{width: 150, height: 200}}
src={`${BASE_SIMPRO_LUMEN_IMAGE}/${item.image}`}
/>
</Col>
)
}
</Image.PreviewGroup>
{ !dataImage || (dataImage && dataImage.length < 1) && <div style={{textAlign: 'center', color: 'red', flex: 1, padding: 20}}>No image available</div> }
</Row>
</div>
)
}
@ -63,7 +76,7 @@ export default class DialogForm extends Component {
: null}
</ModalBody>
<ModalFooter>
<Button color="secondary" onClick={() => this.handleCancel()}>Close</Button>
</ModalFooter>
</Modal>
)

Loading…
Cancel
Save