|
|
|
@ -292,7 +292,8 @@ const CreatedProyek = ({ params, ...props }) => {
|
|
|
|
|
|
|
|
|
|
const getDataProyek = async () => { |
|
|
|
|
let start = 0; |
|
|
|
|
|
|
|
|
|
let hierarchy = []; |
|
|
|
|
hierarchy.push(JSON.parse(localStorage.getItem("hierarchy"))); |
|
|
|
|
if (currentPage !== 1 && currentPage > 1) { |
|
|
|
|
start = currentPage * rowsPerPage - rowsPerPage; |
|
|
|
|
} |
|
|
|
@ -335,6 +336,7 @@ const CreatedProyek = ({ params, ...props }) => {
|
|
|
|
|
if (parseInt(role_id) !== 1) { |
|
|
|
|
payload["columns"] = [ |
|
|
|
|
{ name: "id", logic_operator: "=", value: proyek_id, operator: "AND" }, |
|
|
|
|
{ name: "created_by_id", logic_operator: "IN", value: hierarchy, operator: "AND" } |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -583,8 +585,8 @@ const CreatedProyek = ({ params, ...props }) => {
|
|
|
|
|
.then(res => res) |
|
|
|
|
.catch((error) => error.response); |
|
|
|
|
|
|
|
|
|
if(result && result.status==200){ |
|
|
|
|
console.log("cek get project to checklist k3",result.data.data) |
|
|
|
|
if (result && result.status == 200) { |
|
|
|
|
console.log("cek get project to checklist k3", result.data.data) |
|
|
|
|
let dataRes = result.data.data; |
|
|
|
|
if (dataRes.length > 0) { |
|
|
|
|
setK3Search(dataRes); |
|
|
|
@ -611,8 +613,8 @@ const CreatedProyek = ({ params, ...props }) => {
|
|
|
|
|
.catch((error) => error.response); |
|
|
|
|
|
|
|
|
|
if (result && result.data && result.data.code == 200) { |
|
|
|
|
const {value_proyek,area_kerja,scoupe_of_work, kode_sortname,nama,mulai_proyek,rencana_biaya,keterangan,durasi_proyek,project_objectives,potential_risk,currency_symbol, nama_divisi, late_consequence, assumtion, considered_success_when} = result.data.data; |
|
|
|
|
const dataToSend = {value_proyek,area_kerja,scoupe_of_work, kode_sortname, nama, mulai_proyek, rencana_biaya, keterangan, durasi_proyek, project_objectives, potential_risk, currency_symbol, nama_divisi, late_consequence, assumtion, considered_success_when}; |
|
|
|
|
const { value_proyek, area_kerja, scoupe_of_work, kode_sortname, nama, mulai_proyek, rencana_biaya, keterangan, durasi_proyek, project_objectives, potential_risk, currency_symbol, nama_divisi, late_consequence, assumtion, considered_success_when } = result.data.data; |
|
|
|
|
const dataToSend = { value_proyek, area_kerja, scoupe_of_work, kode_sortname, nama, mulai_proyek, rencana_biaya, keterangan, durasi_proyek, project_objectives, potential_risk, currency_symbol, nama_divisi, late_consequence, assumtion, considered_success_when }; |
|
|
|
|
setProjectCharter(dataToSend); |
|
|
|
|
} else { |
|
|
|
|
NotificationManager.error("Gagal Mengambil Data!!", "Failed"); |
|
|
|
|