|
|
@@ -13,11 +13,12 @@ exports.cekSatuDataLaporan = async (
|
|
|
switch (user.role.id) {
|
|
|
case 2020:
|
|
|
if (where.all) {
|
|
|
- w.role_asal = 'dikti'
|
|
|
+ // w.role_asal = 'dikti'
|
|
|
// w['$or'] = [
|
|
|
// { role_asal : 'dikti' },
|
|
|
// { role_asal: 'lldikti', role_data: 'dikti' },
|
|
|
// ]
|
|
|
+ break
|
|
|
} else if (!where.delegasi) {
|
|
|
w.role_data = 'dikti'
|
|
|
} else {
|
|
|
@@ -64,11 +65,12 @@ exports.cekBanyakDataLaporan = async (user, where = { delegasi: false }) => {
|
|
|
switch (user.role.id) {
|
|
|
case 2020:
|
|
|
if (where.all) {
|
|
|
- w.role_asal = 'dikti'
|
|
|
+ // w.role_asal = 'dikti'
|
|
|
// w['$or'] = [
|
|
|
// { role_asal : 'dikti' },
|
|
|
// { role_asal: 'lldikti', role_data: 'dikti' },
|
|
|
// ]
|
|
|
+ break
|
|
|
} else if (!where.delegasi) {
|
|
|
w.role_data = 'dikti'
|
|
|
} else {
|
|
|
@@ -113,7 +115,8 @@ exports.cekSatuDataSanksi = async (
|
|
|
const w = { aktif: where.aktif || true }
|
|
|
switch (user.role.id) {
|
|
|
case 2020:
|
|
|
- if (where.all) w.role_asal = 'dikti'
|
|
|
+ // if (where.all) w.role_asal = 'dikti'
|
|
|
+ if (where.all) break
|
|
|
else if (!where.banding) w.role_data = 'dikti'
|
|
|
break
|
|
|
case 2021:
|
|
|
@@ -155,7 +158,8 @@ exports.cekBanyakDataSanksi = async (user, where = {}, q = {}) => {
|
|
|
const w = { ...q }
|
|
|
switch (user.role.id) {
|
|
|
case 2020:
|
|
|
- if (where.all) w.role_asal = 'dikti'
|
|
|
+ // if (where.all) w.role_asal = 'dikti'
|
|
|
+ if (where.all) break
|
|
|
else if (!where.banding) w.role_data = 'dikti'
|
|
|
break
|
|
|
case 2021:
|