Browse Source

fix project information

pull/1/head
gempar27 8 months ago
parent
commit
ee1417f75c
  1. 4
      src/views/SimproV2/CreatedProyek/DialogFormProyek.js
  2. 11
      src/views/SimproV2/CreatedProyek/index.js

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

@ -281,7 +281,7 @@ const DialogFormProyek = ({
currency_symbol: currencySymbol, currency_symbol: currencySymbol,
currency_code: currencyCode, currency_code: currencyCode,
currency_name: currencyName, currency_name: currencyName,
company_id: role_name != "Super Admin" ? parseInt(company_id) : parseInt(scompany_id) company_id: role_name !== "Super Admin" ? parseInt(company_id) : parseInt(scompany_id)
}; };
data.projectCharter = { checklist, issue, potentialRisks, participants, milestones, approval }; data.projectCharter = { checklist, issue, potentialRisks, participants, milestones, approval };
data.imageStructureOrg = organization ? organization : null; data.imageStructureOrg = organization ? organization : null;
@ -312,7 +312,7 @@ const DialogFormProyek = ({
currency_symbol: currencySymbol, currency_symbol: currencySymbol,
currency_code: currencyCode, currency_code: currencyCode,
currency_name: currencyName, currency_name: currencyName,
company_id: role_name != "Super Admin" ? parseInt(company_id) : parseInt(scompany_id) company_id: role_name !== "Super Admin" ? parseInt(company_id) : parseInt(scompany_id)
}; };
data.projectCharter = { checklist, issue, potentialRisks, participants, milestones, approval }; data.projectCharter = { checklist, issue, potentialRisks, participants, milestones, approval };
data.imageStructureOrg = organization ? organization : null; data.imageStructureOrg = organization ? organization : null;

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

@ -203,11 +203,14 @@ const CreatedProyek = ({ params, ...props }) => {
handleGetPhaseProject(); handleGetPhaseProject();
handleGetDivisions(); handleGetDivisions();
handleGetDataPm(); handleGetDataPm();
}
}, [openDialogProyek]);
useEffect(() => {
if(role_name === 'Super Admin') { if(role_name === 'Super Admin') {
getDataProyekCompany(); getDataProyekCompany();
} }
} },[])
}, [openDialogProyek]);
useEffect(() => { useEffect(() => {
if (parseInt(role_id) === 44) { if (parseInt(role_id) === 44) {
@ -435,7 +438,7 @@ const CreatedProyek = ({ params, ...props }) => {
{ name: "company_id", logic_operator: "like", value: parseInt(company_id), operator: "AND" } { name: "company_id", logic_operator: "like", value: parseInt(company_id), operator: "AND" }
); );
} }
if (role_name !== 'Super Admin' && all_project === 'false') { if (role_name !== 'Super Admin' && all_project === 'false' || role_name !== 'Super Admin' && all_project === 'null') {
payload.columns.push( payload.columns.push(
{ name: "created_by_id", logic_operator: "IN", value: [JSON.parse(hierarchy)], operator: "AND" } { name: "created_by_id", logic_operator: "IN", value: [JSON.parse(hierarchy)], operator: "AND" }
); );
@ -1932,7 +1935,7 @@ const CreatedProyek = ({ params, ...props }) => {
dataDivisions={dataDivisions} dataDivisions={dataDivisions}
dataPM={dataPm} dataPM={dataPm}
projectImage={image} projectImage={image}
company_id={companyId} company_id={company_id}
role_name={role_name} role_name={role_name}
companyList={companyList} companyList={companyList}
token={token} token={token}

Loading…
Cancel
Save