Browse Source

Merge pull request 'dev-wahyun' (#83) from dev-wahyun into staging

Reviewed-on: ibnu/generic-ospro-frontend#83
pull/1/head
farhantock 6 months ago
parent
commit
33b94e0e86
  1. 2
      src/containers/DefaultLayout/DefaultHeader.js
  2. 19
      src/views/SimproV2/CreatedProyek/DialogFormProyek.js
  3. 7
      src/views/SimproV2/Gantt/GanttFrame.js
  4. 4
      src/views/SimproV2/Gantt/index.js

2
src/containers/DefaultLayout/DefaultHeader.js

@ -56,7 +56,7 @@ class DefaultHeader extends Component {
getLogoHeaderContent = () => {
const { configApp } = this.state;
const logoHeaderContent = configApp && configApp.logo_header ? configApp.logo_header.content : null;
const logoHeaderContent = configApp && configApp.logo_header ? configApp.logo_header : null;
return logoHeaderContent
? `${BASE_SIMPRO_LUMEN_IMAGE}/${logoHeaderContent}`
: logo_ospro;

19
src/views/SimproV2/CreatedProyek/DialogFormProyek.js

@ -1,15 +1,12 @@
import React, { useEffect, useState, useMemo } from "react";
import React, { useEffect, useState } from "react";
import { Modal, ModalHeader, ModalBody, ModalFooter } from "reactstrap";
import { Button, Form, FormGroup, Label, Input, Col, Row } from "reactstrap";
import { DatePicker, Tooltip, Select, Divider, Spin } from "antd";
import { DatePicker, Tooltip, Select, Divider, Spin, message } from "antd";
import axios from "../../../const/interceptorApi";
import moment from "moment";
import { CKEditor } from '@ckeditor/ckeditor5-react';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import {
NotificationContainer,
NotificationManager,
} from "react-notifications";
import {NotificationManager} from "react-notifications";
import "antd/dist/antd.css";
import { formatNumber } from "../../../const/CustomFunc";
import {
@ -72,7 +69,7 @@ const DialogFormProyek = ({
const [currencyList, setCurrencyList] = useState(null);
const [currency, setCurrency] = useState(""); // merge of code | symbol | name
const [currencyCode, setCurrencyCode] = useState("");
const [currencySymbol, setCurrencySymbol] = useState(null);
const [currencySymbol, setCurrencySymbol] = useState("IDR|Rp|Indonesian rupiah");
const [currencyName, setCurrencyName] = useState("");
const [objectives, setObjectives] = useState("");
const [projectIsConsideredSuccessful, setProjectIsConsideredSuccessful] = useState("");
@ -213,7 +210,7 @@ const DialogFormProyek = ({
setCompanyId(null)
setCurrency("");
setCurrencyCode("");
setCurrencySymbol(null);
setCurrencySymbol("IDR|Rp|Indonesian rupiah");
setCurrencyName("");
setObjectives("");
setImage("");
@ -425,6 +422,10 @@ const DialogFormProyek = ({
alert("Currency Symbol cannot be empty!");
return false;
}
if (!divisiProject || divisiProject === "") {
alert("Division cannot be empty!");
return false;
}
setStep(2);
};
@ -810,7 +811,7 @@ const DialogFormProyek = ({
<Row>
<Col md={4}>
<Select
value={currencySymbol || "IDR|Rp|Indonesian rupiah"}
value={currencySymbol}
onChange={onChangeCurrency}
defaultValue="IDR|Rp|Indonesian rupiah"
style={{ width: "100%" }}

7
src/views/SimproV2/Gantt/GanttFrame.js

@ -4,9 +4,9 @@ import { BASE_SIMPRO_LUMEN } from '../../../const/ApiConst';
const GanttFrame = React.memo((props) => {
const history = useHistory();
const { versionGanttId, idProject, ro, timestamp, dataViewStartDate, token, companyId, role_name } = props;
const iframeSrc = `https://project-gantt.ospro.id/edit-mode/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${token}&ro=${ro}&timestamp=${timestamp}&start=${dataViewStartDate}&role_name=${role_name}&company_id=${companyId}`;
// const iframeSrc = `http://localhost:8444/generic-ospro-gantt/edit-mode/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${token}&ro=${ro}&timestamp=${timestamp}&start=${dataViewStartDate}&role_name=${role_name}&company_id=${companyId}`;
const { versionGanttId, idProject, ro, timestamp, dataViewStartDate, token, companyId, role_name, company_name } = props;
const iframeSrc = `https://project-gantt.ospro.id/edit-mode/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${token}&ro=${ro}&timestamp=${timestamp}&start=${dataViewStartDate}&role_name=${role_name}&company_id=${companyId}&company_name=${company_name}`;
// const iframeSrc = `http://localhost:8444/generic-ospro-gantt/edit-mode/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${token}&ro=${ro}&timestamp=${timestamp}&start=${dataViewStartDate}&role_name=${role_name}&company_id=${companyId}&company_name=${company_name}`;
const [batchEntityData, setBatchEntityData] = useState(null);
useEffect(() => {
@ -18,7 +18,6 @@ const GanttFrame = React.memo((props) => {
window.addEventListener('message', handleMessage);
}, []);
useEffect(() => {
const handleNavigation = (event) => {
if (batchEntityData && batchEntityData !== '') {

4
src/views/SimproV2/Gantt/index.js

@ -15,7 +15,7 @@ import GanttFrame from "./GanttFrame";
let roCount = 0;
const Gantt = (props) => {
let role_id = 0, user_id = 0, isLogin = false, token = '', companyId = 0, all_project = null, role_name='', hierarchy=[], user_name='';
let role_id = 0, user_id = 0, isLogin = false, token = '', companyId = 0, all_project = null, role_name='', hierarchy=[], user_name='', configApp='';
if (props && props.role_id && props.user_id) {
role_id = props.role_id;
user_id = props.user_id;
@ -27,6 +27,7 @@ const Gantt = (props) => {
isLogin = props.isLogin;
hierarchy = props.hierarchy;
user_name = props.user_name;
configApp = props.configApp;
}
const HEADER = {
headers: {
@ -116,6 +117,7 @@ const Gantt = (props) => {
role_name={role_name}
companyId={companyId}
timestamp={timestamp}
company_name={JSON.parse(configApp).company_name}
/>
)}
</div>

Loading…
Cancel
Save