|
|
@@ -4,6 +4,7 @@ $page_title = __("Account");
|
|
|
|
|
|
$customer = null;
|
|
|
|
|
|
+$unpaid_count = 0;
|
|
|
$test_count = 0;
|
|
|
$pass_count = 0;
|
|
|
$pass_fail_test_count = 0;
|
|
|
@@ -14,6 +15,8 @@ $stage_chart = null;
|
|
|
$pass_rate = null;
|
|
|
$logo_path = null;
|
|
|
|
|
|
+$to_do = [];
|
|
|
+
|
|
|
$user = Core::$user;
|
|
|
|
|
|
if($user->isCustomer()) {
|
|
|
@@ -167,14 +170,28 @@ if($user->canAccessTests()) {
|
|
|
$tests = $user->getPendingTests();
|
|
|
$tests_remaining = count($tests);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
$tests_url = $user->isTesterManager() ? "/account/tests?custom=overdue_test" : "/account/tests";
|
|
|
|
|
|
$tests_icon = new AccountIcon(__("Tests"), $tests_url, "clipboard-check");
|
|
|
$tests_icon->setCounter($tests_remaining);
|
|
|
$icons[] = $tests_icon;
|
|
|
|
|
|
- $retests_icon = new AccountIcon(__("Retests"), "/account/tests?retest=1", "clipboard-check");
|
|
|
- $icons[] = $retests_icon;
|
|
|
+ $icons[] = new AccountIcon(__("Retests"), "/account/tests?retest=1", "clipboard-check");
|
|
|
+
|
|
|
+ if($user->isAdmin()) {
|
|
|
+ $unpaid_count = Test::count([
|
|
|
+ "status" => Constraint::moreThan(Test::STATUS_CANCELLED),
|
|
|
+ "payment_required" => "1",
|
|
|
+ "dts_paid" => null
|
|
|
+ ]);
|
|
|
+
|
|
|
+ $billing_icon = new AccountIcon(__("Billing"), "/account/tests?custom=payment_required_unpaid", "file-invoice");
|
|
|
+ $billing_icon->setCounter($unpaid_count);
|
|
|
+ $to_do[] = $billing_icon;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if($user->canAccessPractice()) {
|
|
|
@@ -220,7 +237,6 @@ if($user->canDeactivate()) {
|
|
|
$actions[] = new AccountIcon(__("Delete Account..."), "/account/delete", "user-slash");
|
|
|
|
|
|
// To-do
|
|
|
-$to_do = [];
|
|
|
if($users_pending_verification) {
|
|
|
$icon = new AccountIcon(__("Verify Users"), "/account/users?level=" . User::LEVEL_UNVERIFIED, "user-check");
|
|
|
$icon->setCounter($users_pending_verification);
|