Jelajahi Sumber

Merge branch 'develop'

Alan Lam 7 tahun lalu
induk
melakukan
f9020cd707

+ 1 - 1
controllers/test_results_project_list.php

@@ -9,7 +9,7 @@ if(!in_array($customer_id, $customer_ids)) throw new Exception(__("You do not ha
 $customer = Customer::get($customer_id);
 $projects = $customer->getProjects();
 
-$projects = array_filter($projects, function($project) {
+$projects = array_filter($projects, function(Project $project) {
     return $project->isFinished();
 });
 

+ 1 - 1
engine/project.php

@@ -330,7 +330,7 @@ class Project extends Model {
 	 * @return bool
 	 */
 	public function isFinished(): bool {
-		return $this->dts_finished === null;
+		return $this->dts_finished !== null;
 	}
 
 	/**

TEMPAT SAMPAH
public/files/testing_procedure_arcades.pdf


TEMPAT SAMPAH
public/files/testing_procedure_pubs.pdf


+ 22 - 13
views/account.php

@@ -166,41 +166,50 @@
 						<i class="fal fa-fw fa-file-pdf"></i>
 						<?=htmlspecialchars(__("Machine Categories"))?>
 					</a>
-					<a class="list-group-item list-group-item-action" href="/files/testing_procedure.pdf">
+					<a class="list-group-item list-group-item-action" href="/files/testing_procedure_arcades.pdf">
 						<i class="fal fa-fw fa-file-pdf"></i>
-						<?=htmlspecialchars(__("Testing Procedure"))?>
+						<?=htmlspecialchars(__("Testing Procedure for Arcades"))?>
+					</a>
+					<a class="list-group-item list-group-item-action" href="/files/testing_procedure_pubs.pdf">
+						<i class="fal fa-fw fa-file-pdf"></i>
+						<?=htmlspecialchars(__("Testing Procedure for Pubs"))?>
 					</a>
 				</div>
 				<?php
 			}
-			?>
 
-			<h3><?=htmlspecialchars(__("Referrals"))?></h3>
+			if(Core::$user->isTester()) {
+			    ?>
+                <h3><?=htmlspecialchars(__("Referrals"))?></h3>
 
-			<div class="list-group mb-3">
-				<div class="list-group-item d-flex justify-content-between">
+                <div class="list-group mb-3">
+                    <div class="list-group-item d-flex justify-content-between">
 					<span>
 						<i class="fal fa-fw fa-users"></i>
 						<?=htmlspecialchars(__("Users Referred"))?>:
 					</span>
-					<span><?=number_format(count($referrals))?></span>
-				</div>
-				<div class="list-group-item d-flex justify-content-between">
+                        <span><?=number_format(count($referrals))?></span>
+                    </div>
+                    <div class="list-group-item d-flex justify-content-between">
 					<span>
 						<i class="fal fa-fw fa-external-link"></i>
 						<?=htmlspecialchars(__("Referral Link"))?>:
 					</span>
 
-					<span>
+                        <span>
 						<a href="#" data-clipboard-text="<?=PROTOCOL?>://<?=DOMAIN?>/register?r=<?=Core::$user->id?>" data-toggle="tooltip" data-title="<?=htmlspecialchars(__("Copy to clipboard"))?>">
 							<i class="fal fa-fw fa-clipboard"></i>
 							<?=htmlspecialchars(__("Copy to clipboard"))?>
 						</a>
 					</span>
 
-				</div>
-			</div>
+                    </div>
+                </div>
+                <?php
+            }
+
+			?>
 		</div>
 	</div>
 
-</div>
+</div>