Admin Portal - Profile

This commit is contained in:
hillelcoren 2023-03-22 13:58:47 +00:00
parent fac66818bc
commit 2144490a54

View File

@ -343702,6 +343702,11 @@
t1 = true;
return t1;
}
},
get$canViewReports() {
if (this.isAdmin)
return true;
return B.JSString_methods.contains$1(this.permissions, "view_reports");
}
};
A.UserCompanyEntity_UserCompanyEntity_closure.prototype = {
@ -457957,11 +457962,7 @@
t10.push(A.DrawerTile$(company, B.EntityType_expense, t7, t4.get$newExpense(), _null, _null, t1));
t10.push(A.DrawerTile$(company, B.EntityType_recurringExpense, A.getEntityIcon(B.EntityType_recurringExpense), _null, _null, _null, t4.get$recurringExpenses()));
t10.push(A.DrawerTile$(company, B.EntityType_transaction, A.getEntityIcon(B.EntityType_transaction), _null, _null, _null, t4.get$transactions()));
if (A.isApple())
t1 = !t2.get$isHosted() || t11[t12].userCompany.account.plan === "enterprise" || t11[t12].userCompany.account.plan === "pro";
else
t1 = true;
if (t1)
if ((!t2.get$isHosted() || t11[t12].userCompany.account.plan === "enterprise" || t11[t12].userCompany.account.plan === "pro") && t11[t12].userCompany.get$canViewReports())
t10.push(A.DrawerTile$(company, _null, A.getEntityIcon(B.EntityType_reports), _null, _null, new A._MenuDrawerState_build_closure14(), t4.get$reports()));
t10.push(A.DrawerTile$(company, _null, A.getEntityIcon(B.EntityType_settings), _null, _null, new A._MenuDrawerState_build_closure15(), t4.get$settings()));
t1 = new A.Theme(t3, A.Expanded$(A.Container$(_null, new A.ScrollableListView(t10, _null, _null, _null, false, _null), B.Clip_0, t9, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), 1), _null);
@ -498438,10 +498439,10 @@
t16 = A.AppBar$(t4, _null, false, _null, _null, _null, 1, _null, false, _null, false, _null, _null, _null, leading, t15, true, _null, _null, _null, _null, _null, _null, t16, _null, _null, _null, 1, _null);
if (hideReports) {
t2 = J.$index$asx(t5.$index(0, t9), _s23_);
t2 = A._setArrayType([new A.HelpText(t2 == null ? J.$index$asx(t5.$index(0, "en"), _s23_) : t2, _null)], t3);
if (!A.isApple() || A.supportsInAppPurchase())
t2.push(new A.AppButton(_null, _null, t1.get$upgrade().toUpperCase(), new A.ReportsScreen_build_closure23(context, state), _null, _null));
t1 = A.Center$(A.Column$(t2, B.CrossAxisAlignment_2, _null, B.MainAxisAlignment_2, B.MainAxisSize_1, B.VerticalDirection_1), _null, _null);
if (t2 == null)
t2 = J.$index$asx(t5.$index(0, "en"), _s23_);
t3 = A.Center$(A.Column$(A._setArrayType([new A.HelpText(t2, _null), new A.AppButton(_null, _null, t1.get$upgrade().toUpperCase(), new A.ReportsScreen_build_closure23(context, state), _null, _null)], t3), B.CrossAxisAlignment_2, _null, B.MainAxisAlignment_2, B.MainAxisSize_1, B.VerticalDirection_1), _null, _null);
t1 = t3;
} else {
t4 = t8[t7].userCompany.company.id;
t17 = "" + t17;