Browse Source

update filter by hierarchy

pull/2/head
farhantock 1 year ago
parent
commit
e2a3b3cd93
  1. 5
      src/views/SimproV2/CreatedProyek/index.js

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

@ -306,7 +306,7 @@ const CreatedProyek = ({ params, ...props }) => {
const getDataProyek = async () => { const getDataProyek = async () => {
let start = 0; let start = 0;
let hierarchy = []; let hierarchy = [];
//hierarchy.push(JSON.parse(localStorage.getItem("hierarchy"))); hierarchy.push(JSON.parse(localStorage.getItem("hierarchy")));
if (currentPage !== 1 && currentPage > 1) { if (currentPage !== 1 && currentPage > 1) {
start = currentPage * rowsPerPage - rowsPerPage; start = currentPage * rowsPerPage - rowsPerPage;
} }
@ -346,9 +346,8 @@ const CreatedProyek = ({ params, ...props }) => {
paging: { start: start, length: rowsPerPage }, paging: { start: start, length: rowsPerPage },
}; };
if (parseInt(role_id) !== 1) { if (parseInt(role_id) !== 70) {
payload["columns"] = [ payload["columns"] = [
{ name: "id", logic_operator: "=", value: proyek_id, operator: "AND" },
{ name: "created_by_id", logic_operator: "IN", value: hierarchy, operator: "AND" } { name: "created_by_id", logic_operator: "IN", value: hierarchy, operator: "AND" }
]; ];
} }

Loading…
Cancel
Save