Przeglądaj źródła

Merge branch 'develop'

Alan Lam 7 lat temu
rodzic
commit
2b9d4f379d
4 zmienionych plików z 17 dodań i 18 usunięć
  1. 6 1
      controllers/account.php
  2. 0 0
      public/css/bootstrap.min.css
  3. 1 1
      scss/_main.scss
  4. 10 16
      views/account.php

+ 6 - 1
controllers/account.php

@@ -14,6 +14,8 @@ $logo_path = null;
 
 
 $user = Core::$user;
 $user = Core::$user;
 
 
+$user->level = User::LEVEL_CUSTOMER;
+
 if($user->isCustomer()) {
 if($user->isCustomer()) {
 	$customers = $user->getCustomers();
 	$customers = $user->getCustomers();
 
 
@@ -28,7 +30,7 @@ if($user->isCustomer()) {
 		list($start, $end) = $year_cycle;
 		list($start, $end) = $year_cycle;
 
 
 		$dt = new DateTime($start);
 		$dt = new DateTime($start);
-		$year_cycle_start_text = $dt->format("d/m/Y");
+		$year_cycle_start_text = $dt->format("jS M");
 
 
 		$projects = $customer->getProjects();
 		$projects = $customer->getProjects();
 		$project_ids = array_column($projects, "id");
 		$project_ids = array_column($projects, "id");
@@ -162,6 +164,9 @@ if($tests_pending_verification) {
 
 
 $referrals = $user->getReferrals();
 $referrals = $user->getReferrals();
 
 
+$pass_count = 9999;
+$pass_fail_test_count = 9999;
+
 View::includeOnce("header", compact("page_title"));
 View::includeOnce("header", compact("page_title"));
 View::include("account", compact("page_title", "icons", "actions", "to_do", "referrals", "customer", "logo_path", "year_cycle_start_text", "pass_rate", "pass_count", "pass_fail_test_count", "test_count"));
 View::include("account", compact("page_title", "icons", "actions", "to_do", "referrals", "customer", "logo_path", "year_cycle_start_text", "pass_rate", "pass_count", "pass_fail_test_count", "test_count"));
 View::includeOnce("footer");
 View::includeOnce("footer");

Plik diff jest za duży
+ 0 - 0
public/css/bootstrap.min.css


+ 1 - 1
scss/_main.scss

@@ -20,7 +20,7 @@ body {
 }
 }
 
 
 .stat {
 .stat {
-	font-size: 2.5rem;
+	font-size: 2rem;
 	line-height: 1;
 	line-height: 1;
 }
 }
 
 

+ 10 - 16
views/account.php

@@ -1,21 +1,15 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 
 
-    <div class="row">
-        <div class="col">
-            <h2><?=htmlspecialchars($page_title)?></h2>
-        </div>
-        <div class="col-auto">
-            <?php
-            if($logo_path) {
-                $path = str_replace("public/", "", $logo_path);
+	<?php
+	if($logo_path) {
+		$path = str_replace("public/", "", $logo_path);
+		?>
+		<img class="float-right" src="<?=htmlspecialchars($path)?>" alt="<?=htmlspecialchars($customer->name)?>" style="height: 88px;">
+		<?php
+	}
+	?>
 
 
-                ?>
-                <img src="<?=htmlspecialchars($path)?>" alt="<?=htmlspecialchars($customer->name)?>" style="height: 38px;">
-                <?php
-            }
-            ?>
-        </div>
-    </div>
+	<h2><?=htmlspecialchars($page_title)?></h2>
 
 
 	<?php
 	<?php
 
 
@@ -94,7 +88,7 @@
 			?>
 			?>
             <div class="col-xl-3 col-md-6">
             <div class="col-xl-3 col-md-6">
 				<div class="card card-body mb-3">
 				<div class="card card-body mb-3">
-					<?=htmlspecialchars(__("Year Cycle"))?>
+					<?=htmlspecialchars(__("Year Cycle Start"))?>
 					<div class="stat">
 					<div class="stat">
 						<?=htmlspecialchars($year_cycle_start_text)?>
 						<?=htmlspecialchars($year_cycle_start_text)?>
 					</div>
 					</div>

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików