From c1f76af68e7708a0cfee25c01ee6d63c4a92de22 Mon Sep 17 00:00:00 2001 From: wahyuun Date: Tue, 3 Oct 2023 09:16:22 +0700 Subject: [PATCH] update styling --- .../SimproV2/CreatedProyek/ViewProject.js | 116 ++++++++++++++---- 1 file changed, 90 insertions(+), 26 deletions(-) diff --git a/src/views/SimproV2/CreatedProyek/ViewProject.js b/src/views/SimproV2/CreatedProyek/ViewProject.js index 2d38445..fd566f7 100644 --- a/src/views/SimproV2/CreatedProyek/ViewProject.js +++ b/src/views/SimproV2/CreatedProyek/ViewProject.js @@ -7,7 +7,7 @@ import _ from 'underscore' import './style.css' import { formatThousand, sortBy } from '../../../const/CustomFunc'; import { BASE_OSPRO, PROYEK_SEARCH} from "../../../const/ApiConst"; -import { Tooltip } from 'antd'; +import { Tooltip, Spin } from 'antd'; import { useTranslation } from 'react-i18next'; import axios from "../../../const/interceptorApi" import autoTable from "jspdf-autotable"; @@ -47,6 +47,7 @@ const createMarkup = (element) => { const [HR, setAssignHR] = useState("") const formatDate = "DD-MM-YYYY"; const reportTemplateRef = useRef(null); + const [loading, setLoading] = useState(true); const { t } = useTranslation(); const token = localStorage.getItem("token"); @@ -85,6 +86,7 @@ const createMarkup = (element) => { setMilestone([]) setPotentialRisks("") setApproval([]) + setLoading(false) } }, [openDialog]); @@ -218,7 +220,11 @@ const createMarkup = (element) => { }) ) }else{ - return (

) + return ( + + - + - + ); } } @@ -231,7 +237,7 @@ const createMarkup = (element) => { return(

{ ChecklistNumber }

-

{val.item ? val.item : "-"}

+

{val.item ?? "-"}

{val.status_exist === true ? "Tersedia" : "Tidak tersedia"} @@ -242,7 +248,12 @@ const createMarkup = (element) => { }) ) }else{ - return (

) + return ( + + - + - + - + ); } } @@ -263,7 +274,11 @@ const createMarkup = (element) => { }) ) }else{ - return (

) + return ( + + - + - + ) } } @@ -275,17 +290,22 @@ const createMarkup = (element) => {

- {val.level_risk ? val.level_risk : "-"} + {val.level_risk ?? "-"}

-

{val.description ? val.description : "-"}

-

{val.preventive_risk ? val.preventive_risk : "-"}

+

{val.description ?? "-"}

+

{val.preventive_risk ?? "-"}

) }) ) }else{ - return (

) + return ( + + - + - + - + ) } } @@ -296,20 +316,25 @@ const createMarkup = (element) => { return( -

{val.join_first_name ? val.join_first_name : val.join_first_name}

+

{val.join_first_name ? val.join_first_name : "-"}

-

{val.join_second_name ? val.join_second_name : val.join_second_name}

+

{val.join_second_name ? val.join_second_name : "-"}

-

{val.join_second_description ? val.join_second_description : val.join_second_description}

+

{val.join_second_description ? val.join_second_description : "-"}

) }) ) }else{ - return (

) + return ( + + - + - + - + ) } } @@ -330,17 +355,25 @@ const createMarkup = (element) => {

{milestoneLetter}

-

{val.status}

+

{val.status ?? "-"}

-

 {moment(val.deadline).format(formatDate)}

+

+ +  {moment(val.deadline).format(formatDate)} +

); }) ); } else { - return (

); + return ( + + - + - + - + ); } } @@ -358,7 +391,10 @@ const createMarkup = (element) => { }) ) }else{ - return (

) + return ( + +  - + ) } } @@ -420,7 +456,7 @@ const createMarkup = (element) => {

Project description

-

{description ?? '-'}

+

{description != "" ? description : '-'}

@@ -436,7 +472,7 @@ const createMarkup = (element) => {

Lokasi Proyek

-

 {lokasi ?? '-' }

+

 {lokasi != "" ? lokasi :'-' }

@@ -489,7 +525,7 @@ const createMarkup = (element) => {

Project Manager

-

 {PM}

+

 {PM ?? "-"}

@@ -512,7 +548,13 @@ const createMarkup = (element) => { -

+

+ {objectives ? ( + + ) : ( + '-' + )} +

@@ -528,7 +570,11 @@ const createMarkup = (element) => { @@ -568,7 +614,7 @@ const createMarkup = (element) => {

  {image ? ( - + ) : ( '-' )} @@ -651,7 +697,13 @@ const createMarkup = (element) => { -

+

+ {lateProyek ? ( + + ) : ( + "-" + )} +

@@ -665,7 +717,13 @@ const createMarkup = (element) => { -

+

+ {projectSuccess ? ( + + ) : ( + '-' + )} +

@@ -680,7 +738,13 @@ const createMarkup = (element) => { -

+

+ {assumtionProyek ? ( + + ) : ( + '-' + )} +