From 17e768db37d4625e80fe83fa939ccda27febc678 Mon Sep 17 00:00:00 2001 From: wahyuun Date: Wed, 27 Sep 2023 14:49:43 +0700 Subject: [PATCH] update styling & export PDF --- .../SimproV2/CreatedProyek/ViewProject.js | 69 ++++++++++--------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/src/views/SimproV2/CreatedProyek/ViewProject.js b/src/views/SimproV2/CreatedProyek/ViewProject.js index 9ad4b67..2d38445 100644 --- a/src/views/SimproV2/CreatedProyek/ViewProject.js +++ b/src/views/SimproV2/CreatedProyek/ViewProject.js @@ -93,7 +93,7 @@ const createMarkup = (element) => { setProyekName(projectCharter.nama); setDescription(projectCharter.keterangan); setKodeShortname(projectCharter.kode_sortname); - setLokasiKantor(projectCharter.lokasi_kantor); + setLokasiKantor(projectCharter.area_kerja); setDurasiProyek(projectCharter.durasi_proyek); setMulaiProyek(projectCharter.mulai_proyek); setValueProyek(projectCharter.value_proyek); @@ -171,12 +171,11 @@ const createMarkup = (element) => { setAssignHR(assignHR) } }, [assignHR]); - const handleExportPdf = async () => { const doc = new jsPDF({ orientation: 'landscape', unit: 'px', - format: [1130, 1000] + format: [1106, 1000] }); doc.html(reportTemplateRef.current, { @@ -212,8 +211,8 @@ const createMarkup = (element) => { const K3Number = number[index]; return( -

{ K3Number }

-

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

+

{ K3Number }

+

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

) }) @@ -231,10 +230,10 @@ const createMarkup = (element) => { const ChecklistNumber = number[index]; return( -

{ ChecklistNumber }

-

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

- -

+

{ ChecklistNumber }

+

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

+ +

{val.status_exist === true ? "Tersedia" : "Tidak tersedia"}

@@ -254,11 +253,11 @@ const createMarkup = (element) => { return( -

+

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

-

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

+

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

) }) @@ -275,12 +274,12 @@ const createMarkup = (element) => { return( -

+

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

-

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

-

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

+

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

+

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

) }) @@ -328,13 +327,13 @@ const createMarkup = (element) => { return ( -

{milestoneLetter}

+

{milestoneLetter}

-

{val.status}

+

{val.status}

-

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

+

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

); @@ -391,9 +390,16 @@ const createMarkup = (element) => { padding: '0', }; + const paddingTable = { + paddingTop:"20px", + paddingLeft: "30px", + paddingRight: "30px" + } + const renderForm = () => { return ( -
+
+

Project Charter

@@ -406,7 +412,7 @@ const createMarkup = (element) => {

Nama Proyek

@@ -414,7 +420,7 @@ const createMarkup = (element) => {

Project description

@@ -462,7 +468,7 @@ const createMarkup = (element) => {

Anggaran Proyek

@@ -506,7 +512,7 @@ const createMarkup = (element) => { @@ -645,7 +651,7 @@ const createMarkup = (element) => { -

+

-

{proyekName ?? '-'}

+

{proyekName ?? '-'}

-

{description ?? '-'}

+

{description ?? '-'}

-

{currency}. {formatThousand(budget)}

+

{currency}. {formatThousand(budget)}

-

{objectives ?? '-'}

+

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

{projectSuccess ?? '-'}

+

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

+

@@ -741,15 +747,10 @@ const createMarkup = (element) => { <> -
-
- Project -
-
- - - -
+
+ + +