Browse Source

Merge pull request 'Dev-Farhan' (#18) from Dev-Farhan into staging

Reviewed-on: ibnu/generic-ospro-frontend#18
pull/1/head
farhantock 10 months ago
parent
commit
6a5df19c56
  1. 4
      src/views/Dashboard/DashboardBOD.js
  2. 7
      src/views/SimproV2/CreatedProyek/DialogFormProyek.js
  3. 2
      src/views/SimproV2/CreatedProyek/index.js

4
src/views/Dashboard/DashboardBOD.js

@ -127,7 +127,7 @@ const DashboardBOD = (props) => {
} }
const getProjectPerScheduleHealth = async () => { const getProjectPerScheduleHealth = async () => {
const URL = `${BASE_OSPRO}/api/dashboard/get-total-project-per-schedule-health` const URL = `${BASE_OSPRO}/api/dashboard/get-total-project-per-schedule-health/${moment().format('YYYY')}/${company_id}/${all_project}/${hierarchy}`
const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response) const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response)
const content = "Get Project by Schedule Health."; const content = "Get Project by Schedule Health.";
@ -221,7 +221,7 @@ const DashboardBOD = (props) => {
} }
const getProjectPerPhase = async () => { const getProjectPerPhase = async () => {
const URL = `${BASE_OSPRO}/api/dashboard/get-total-project-per-phase` const URL = `${BASE_OSPRO}/api/dashboard/get-total-project-per-phase/${moment().format('YYYY')}/${company_id}/${all_project}/${hierarchy}`
const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response) const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response)
const content = "Get Project by Phase."; const content = "Get Project by Phase.";

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

@ -89,7 +89,7 @@ const DialogFormProyek = ({
const [lastIdxRisks, setLastIdxRisks] = useState(0); const [lastIdxRisks, setLastIdxRisks] = useState(0);
const [lastIdxMilestones, setLastIdxMilestones] = useState(0); const [lastIdxMilestones, setLastIdxMilestones] = useState(0);
const [lastIdxApproval, setLastIdxApproval] = useState(0); const [lastIdxApproval, setLastIdxApproval] = useState(0);
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(false);
const handleGetdataIdproyek = async (id) => { const handleGetdataIdproyek = async (id) => {
setLoading(true) setLoading(true)
const result = await axios const result = await axios
@ -226,6 +226,7 @@ const DialogFormProyek = ({
setLastIdxMilestones(0); setLastIdxMilestones(0);
setLastIdxApproval(0); setLastIdxApproval(0);
setStep(1); setStep(1);
setLoading(false)
}; };
useEffect(() => { useEffect(() => {
@ -822,7 +823,7 @@ const DialogFormProyek = ({
> >
{dataDivisions.map((res) => ( {dataDivisions.map((res) => (
<Option key={res.id} value={res.id}> <Option key={res.id} value={res.id}>
{res.displayName} {res.name}
</Option> </Option>
))} ))}
</Select> </Select>
@ -830,7 +831,7 @@ const DialogFormProyek = ({
</Col> </Col>
<Col md={6}> <Col md={6}>
<FormGroup> <FormGroup>
<Label className="capitalize" style={{ fontWeight: "bold" }}>Project Duration</Label> <Label className="capitalize" style={{ fontWeight: "bold" }}>Project Duration (Days)</Label>
<Input <Input
type="number" type="number"
min="1" min="1"

2
src/views/SimproV2/CreatedProyek/index.js

@ -500,7 +500,9 @@ const CreatedProyek = ({ params, ...props }) => {
const handleOpenDialogProyek = async (id) => { const handleOpenDialogProyek = async (id) => {
setOpenDialogProyek(true); setOpenDialogProyek(true);
setidTask(id); setidTask(id);
if (id !== 0) {
await getProjectImage(id); await getProjectImage(id);
}
}; };
const handleOpenDialogGantt = (data) => { const handleOpenDialogGantt = (data) => {

Loading…
Cancel
Save