diff --git a/package.json b/package.json
index f6e19ba..c698e3b 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,8 @@
},
"dependencies": {
"@ant-design/plots": "^1.1.1",
+ "@ckeditor/ckeditor5-build-classic": "^39.0.2",
+ "@ckeditor/ckeditor5-react": "^6.1.0",
"@coreui/coreui": "^2.1.12",
"@coreui/icons": "0.3.0",
"@coreui/react": "^2.5.1",
diff --git a/src/const/ApiConst.js b/src/const/ApiConst.js
index cbed48f..7e9365c 100644
--- a/src/const/ApiConst.js
+++ b/src/const/ApiConst.js
@@ -117,7 +117,7 @@ export const TOKEN_ADW =
// export let BASE_OSPRO = "https://ospro-api.ospro.id";
export let BASE_OSPRO = "https://adw-api.ospro.id";
-// export let BASE_OSPRO = "http://localhost:8444";
+// export let BASE_OSPRO = "http://localhost:8444/adw-backend";
// export let BASE_OSPRO = "http://103.73.125.81:8444"; // ip public adw
export let BASE_SIMPRO_LUMEN = `${BASE_OSPRO}/api`;
export let BASE_SIMPRO_LUMEN_IMAGE = `${BASE_OSPRO}/assets/image`;
@@ -363,6 +363,55 @@ export const PROYEK_ADD = `${BASE_SIMPRO_LUMEN}/project/add`;
export const PROYEK_LIST = `${BASE_SIMPRO_LUMEN}/project/list`;
export const PROYEK_SEARCH = `${BASE_SIMPRO_LUMEN}/project/search`;
export const PROYEK_SEARCH_DETAIL = `${BASE_SIMPRO_LUMEN}/project/search`;
+// Checklist
+export const PROJECT_CHECKLIST_ADD = `${BASE_SIMPRO_LUMEN}/project-checklists/add`;
+export const PROJECT_CHECKLIST_SEARCH = `${BASE_SIMPRO_LUMEN}/project-checklists/search`;
+export const PROJECT_CHECKLIST_EDIT = (id) => {
+ return `${BASE_SIMPRO_LUMEN}/project-checklists/update/${id}`;
+};
+export const PROJECT_CHECKLIST_DELETE = (id) => {
+ return `${BASE_SIMPRO_LUMEN}/project-checklists/delete/${id}`;
+};
+export const PROJECT_CHECKLIST_DELETE_BY_PROYEK = (id) => {
+ return `${BASE_SIMPRO_LUMEN}/project-checklists/delete-by-proyek/${id}`;
+};
+export const PROJECT_CHECKLIST_LIST = `${BASE_SIMPRO_LUMEN}/project-checklists/list`;
+export const PROJECT_CHECKLIST_WHERE_CUSTOM = (where, id) => {
+ return `${BASE_SIMPRO_LUMEN}/project-checklists/${where}/${id}`;
+};
+// Issue
+export const PROJECT_ISSUE_ADD = `${BASE_SIMPRO_LUMEN}/project-issues/add`;
+export const PROJECT_ISSUE_SEARCH = `${BASE_SIMPRO_LUMEN}/project-issues/search`;
+export const PROJECT_ISSUE_EDIT = (id) => {
+ return `${BASE_SIMPRO_LUMEN}/project-issues/update/${id}`;
+};
+export const PROJECT_ISSUE_DELETE = (id) => {
+ return `${BASE_SIMPRO_LUMEN}/project-issues/delete/${id}`;
+};
+export const PROJECT_ISSUE_DELETE_BY_PROYEK = (id) => {
+ return `${BASE_SIMPRO_LUMEN}/project-issues/delete-by-proyek/${id}`;
+};
+export const PROJECT_ISSUE_LIST = `${BASE_SIMPRO_LUMEN}/project-issues/list`;
+export const PROJECT_ISSUE_WHERE_CUSTOM = (where, id) => {
+ return `${BASE_SIMPRO_LUMEN}/project-issues/${where}/${id}`;
+};
+// Potential Risk
+export const PROJECT_RISK_ADD = `${BASE_SIMPRO_LUMEN}/project-risks/add`;
+export const PROJECT_RISK_SEARCH = `${BASE_SIMPRO_LUMEN}/project-risks/search`;
+export const PROJECT_RISK_EDIT = (id) => {
+ return `${BASE_SIMPRO_LUMEN}/project-risks/update/${id}`;
+};
+export const PROJECT_RISK_DELETE = (id) => {
+ return `${BASE_SIMPRO_LUMEN}/project-risks/delete/${id}`;
+};
+export const PROJECT_RISK_DELETE_BY_PROYEK = (id) => {
+ return `${BASE_SIMPRO_LUMEN}/project-risks/delete-by-proyek/${id}`;
+};
+export const PROJECT_RISK_LIST = `${BASE_SIMPRO_LUMEN}/project-risks/list`;
+export const PROJECT_RISK_WHERE_CUSTOM = (where, id) => {
+ return `${BASE_SIMPRO_LUMEN}/project-risks/${where}/${id}`;
+};
+
// export const PROYEK_SEARCH_BY_USER = (id) => {
// return `${BASE_SIMPRO_LUMEN}/project-by-customer/${id}`;
// };
@@ -608,6 +657,7 @@ export const CHECKLIST_K3_DELETE = (id) => {
export const CHECKLIST_K3_LIST = `${BASE_SIMPRO_LUMEN}/checklist-k3/list`;
export const ASSIGN_HR_PROJECT_ADD = `${BASE_SIMPRO_LUMEN}/user-to-proyek/add`;
+export const ASSIGN_HR_PROJECT_ADD_MULTIPLE = `${BASE_SIMPRO_LUMEN}/user-to-proyek/add-multiple`;
export const ASSIGN_HR_PROJECT_SEARCH = `${BASE_SIMPRO_LUMEN}/user-to-proyek/search`;
export const ASSIGN_HR_PROJECT_EDIT = (id) => {
return `${BASE_SIMPRO_LUMEN}/user-to-proyek/update/${id}`;
@@ -676,3 +726,9 @@ export const HIERARCHY_FTTH_TREE = (id) => {
return `${BASE_SIMPRO_LUMEN}/hierarchy-ftths/tree/${id}`;
};
export const WAYPOINT_SEARCH = `${BASE_SIMPRO_LUMEN}/waypoint/search`;
+
+export const IMAGE_UPLOAD = `${BASE_SIMPRO_LUMEN}/image/upload`;
+
+export const IMAGE_DELETE = (id, category) => {
+ return `${BASE_SIMPRO_LUMEN}/image/delete/${id}/${category}`;
+}
diff --git a/src/views/Master/MasterBroadcast/DialogDetail.js b/src/views/Master/MasterBroadcast/DialogDetail.js
index 0d5165f..b4b96cc 100644
--- a/src/views/Master/MasterBroadcast/DialogDetail.js
+++ b/src/views/Master/MasterBroadcast/DialogDetail.js
@@ -1,123 +1,141 @@
-import 'antd/dist/antd.css';
-import React, { Component } from 'react';
-import moment from 'moment';
-import { Button, Table, FormFeedback, FormGroup, Input, Label, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';
-import Select from 'react-select';
-import axios from 'axios';
-import { BASE_SIMPRO_LUMEN, BASE_URL_GEOHR_API } from '../../../const/ApiConst';
-import { Transfer } from 'antd';
-import { withTranslation } from 'react-i18next';
-const token = window.localStorage.getItem('token');
-const config = {
- headers:
- {
- Authorization: `Bearer ${token}`,
- "Content-type": `application/json`
- }
-};
-const ERROR_TITLE = "judul is required!"
-const ERROR_MESSAGE = "message is required!"
-const BASE_URL = "https://oslog.id/geohr-api/";
-let countError = 0;
-class DialogDetail extends Component {
- constructor(props) {
- super(props)
- this.state = {
- openDialog: false,
- isParentClick: false,
- dataListDetail: [],
- id: 0,
- }
- }
-
- async componentDidMount() {
- this.props.showDialog(this.showDialog);
- }
-
- async componentDidUpdate() {
- if (this.state.isParentClick === true) {
- const { dataDetail } = this.props
- console.log("cek data detail", dataDetail)
- this.setState({
- id: dataDetail.id
- }, () => {
- this.getDataDetail();
- this.setState({ isParentClick: false });
- });
- }
- }
-
- getDataDetail = async () => {
- countError++;
- let url = BASE_SIMPRO_LUMEN + `/broadcast/search`;
- const payload = {
- "paging": { "start": 0, "length": 25 },
- "orders": { "columns": ["id"], "ascending": true },
- "columns": [
- { "name": "id", "logic_operator": "=", "value": this.state.id, "operator": "AND" }
- ]
- }
- const result = await axios
- .post(url, payload, config)
- .then(res => res)
- .catch((error) => error.response);
- console.log('cek data detail', result.data)
-
- if (result && result.data && result.data.code === 200) {
- if (result.data.data && result.data.data) {
- this.setState({ dataListDetail: result.data.data })
- }
- } else {
- if (countError < 6) {
- this.getDataDetail();
- }
- }
- }
-
- showDialog = () => {
- this.setState({ isParentClick: true });
- }
-
- handleCloseDialog = () => {
- this.props.closeDialog()
- }
-
- render() {
- return (
-
-
-
-
-
-
-
-
- {this.state.dataListDetail.map((val, index) => {
- return (
- {this.props.t('statusSend')}
- {this.props.t('dateSend')}
- {this.props.t('description')}
- {this.props.t('titleNotification')}
- {this.props.t('messageNotification')}
-
-
- )
- })}
-
- {val.status_send === "" ? "-" : val.status_send}
- {val.created_at === "" ? "-" : moment(val.created_date).format("DD-MM-YYYY HH:mm:ss")}
- {val.description === "" ? "-" : val.description}
- {val.title_notif === "" ? "-" : val.title_notif}
- {val.message_notif === "" ? "-" : val.message_notif}
-
+
+
+
+
+
+
+
+ {this.state.dataListDetail.map((val, index) => {
+ const matchedUser = dataUser.find(item => item.id == val.send_to_id);
+ return (
+ {this.props.t('statusSend')}
+ {this.props.t('dateSend')}
+ {this.props.t('description')}
+ {this.props.t('receiver')}
+ {this.props.t('titleNotification')}
+ {this.props.t('messageNotification')}
+
+
+ )
+ })}
+
+ {val.status_send === "" ? "-" : val.status_send}
+ {val.created_at === "" ? "-" : moment(val.created_date).format("DD-MM-YYYY HH:mm:ss")}
+ {val.description === "" ? "-" : val.description}
+ { matchedUser ? matchedUser.name : "-" }
+ {val.title_notif === "" ? "-" : val.title_notif}
+ {val.message_notif === "" ? "-" : val.message_notif}
+
{i.name} | - ) - })} -
---|
{i.name} | + ) + })} +
---|
{t('action')} | - {column.map((i, index) => { - return ( -{i.name} | - ) - })} -|
---|---|---|
- |
- {n.name} | -{n.description} | -
{t('action')} | + {column.map((i, index) => { + return ( +{i.name} | + ) + })} +|
---|---|---|
+ |
+ {n.name} | +{n.description} | +
- Project name: - | -
- {proyekName}
- |
- |||
- Project description: - | -
- {description}
- |
- |||
- Project objectives: - | -
- {objectives}
- |
- |||
- Project is considered successful when: - | -
- {projectSuccess}
- |
- |||
- Project participants: - | -
-
|
- |||
- Budget: - | -
- {currency} {formatThousand(budget)}
- |
- |||
- Testing Environment: - | -- - | -|||
- Milestones: - | -
-
|
- |||
- Potential risks: - | -- - | -|||
- Approval: - | -
-
|
-
{ K3Number }
{val.checklist_k3_name ? val.checklist_k3_name : "-"}
{ ChecklistNumber }
{val.item ? val.item : "-"}
+ {val.status_exist === true ? "Tersedia" : "Tidak tersedia"} +
++ {val.level_issue ? val.level_issue : "-"} +
+{val.description ? val.description : "-"}
+ {val.level_risk ? val.level_risk : "-"} +
+{val.description ? val.description : "-"}
{val.preventive_risk ? val.preventive_risk : "-"}
{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_description ? val.join_second_description : val.join_second_description}
+{milestoneLetter}
+{val.status}
+{moment(val.deadline).format(formatDate)}
+
+ 1.0 Identifikasi PROYEK + |
+ ||
+ Nama Proyek + |
+
+ {proyekName ?? '-'} + |
+ |
+ Project description + |
+
+ {description ?? '-'} + |
+ |
+ Nomor Proyek + |
+
+ {shortname ?? '-'} + |
+ |
+ Lokasi Proyek + |
+
+ {lokasi ?? '-' } + |
+ |
+ Durasi Proyek + |
+
+ {durasi ?? '-'} + |
+ |
+ Tanggal Mulai Proyek + |
+
+ {moment(mulaiProyek).format(formatDate) ?? "-"} + |
+ |
+ Nilai Kontrak Proyek + |
+
+ {valueProyek ?? '-'} + |
+ |
+ Anggaran Proyek + |
+
+ {currency}. {formatThousand(budget)} + |
+ |
+ Sponsor Proyek + |
+
+ + {sponsorProyek ?? '-'} + + |
+
+ + |
+
+ Project Manager + |
+
+ {PM} + |
+ |
+ Sumber Daya Manusia Untuk Proyek + |
+
+ |
+
+
+ 2.0 OBJEKTIF PROYEK (TUJUAN) + |
+
+ {objectives ?? '-'} + |
+
+
+ 3.0 RUANG LINGKUP PROYEK + |
+
---|
+
|
+
+
+ 4.0 ANGGOTA PROYEK + |
+ ||
+ Nama + |
+
+ Posisi + |
+
+ Tugas dan Tanggung Jawab + |
+
+
+ 5.0 STRUKTUR ORGANISASI + |
+
---|
+ + {image ? ( + + ) : ( + '-' + )} + + |
+
+
+ 6.0 TARGET UTAMA & MILESTONE PENCAPAIAN + |
+ ||
---|---|---|
+ Item + |
+
+ Event Besar / Milestone + |
+
+ Tanggal + |
+
+
+ 7.0 ISU & HAMBATAN UTAMA + |
+ |
+ Tingkat Kepelikan Isu + |
+
+ Penjelasan + |
+
*Skala 1 ke 7 (1 = kecil, 7 = besar)
++
+ 8.0 RESIKO + |
+ ||
+ Tingkat Dampak Resiko + |
+
+ Penjelasan + |
+
+ Pencegahan + |
+
*Skala 1 ke 7 (1 = kecil, 7 = besar)
++
+ 9.0 KONSEKUENSI DARI KETERLAMBATAN + |
+
---|
+
+ 10.0 KRITERIA SUSKSES DARI PROYEK (HARUS TERUKUR) + |
+
---|
+ {projectSuccess ?? '-'} + |
+
+
+ 11.0 ASUMSI (SUMBERDAYA UTAMA) + |
+
---|
+ + | +
+
+ 12.0 CHECK LIST KESIAPAN PROYEK** item utama yang paling kritikal + |
+ ||
+ NO + |
+
+ ITEM + |
+
+ KETERSEDIAAN + |
+
+
+ 13.0 KESEHATAN & KESELAMATAN KERJA (K3) + |
+ ||
+ NO + |
+
+ ITEM + |
+
+
+ 13.0 KOMITMEN DISEPAKATI OLEH + |
+
---|
{i.name} | - ) - })} -
---|
{i.name} | + ) + })} +
---|