Browse Source

Merge branch 'develop'

Alan Lam 7 years ago
parent
commit
5562361978

+ 1 - 0
controllers/reports.php

@@ -11,6 +11,7 @@ $customer = Customer::getForAdmin();
 if(!$customer) throw new Exception("You do not have permission to access this page.");
 
 $customer_slug = Util::slug($customer->name);
+$customer_slug = str_replace("-", "_", $customer_slug);
 $logo_file_path = ROOT_DIR . "/public/img/customer_logos/{$customer_slug}_logo.png";
 $has_logo = file_exists($logo_file_path);
 

+ 1 - 1
controllers/test.php

@@ -187,7 +187,7 @@ if(Core::$user->level == User::LEVEL_TESTER) {
 					}
 				}
 
-				$test->pass = ($test->challenge_stage <= 2) ? 1 : 0; // Pass = Challenged during browsing or before
+				$test->pass = ($test->challenge_stage <= $template->pass_stage) ? 1 : 0; // Pass = Challenged during browsing or before
 				$test->dts_updated = Util::getDateTime();
 
 				$success = $test->commit();

+ 1 - 1
engine/template.php

@@ -4,7 +4,7 @@ class Template extends Model {
 
 	protected static $table = "template";
 	protected static $id_field = "id";
-	protected static $fillable_fields = ["customer_id", "name", "json", "practice"];
+	protected static $fillable_fields = ["customer_id", "name", "json", "practice", "pass_stage"];
 
 	private $overrides = [];
 

BIN
public/img/customer_logos/mitchells_butlers_logo.png


BIN
public/img/markers/g_t_promotions_none.png


BIN
public/img/markers/jnc_none.png


BIN
public/img/markers/mitchells_butlers.png


BIN
public/img/markers/mitchells_butlers_fail.png


BIN
public/img/markers/mitchells_butlers_none.png


BIN
public/img/markers/mitchells_butlers_pass.png


BIN
public/img/markers/mitchells_butlers_past_due.png


BIN
public/img/markers/mitchells_butlers_pending.png


BIN
public/img/markers/playland_none.png


+ 9 - 0
tasks/import_venues.php

@@ -27,10 +27,16 @@ for($i = 0; $line = fgetcsv($handle); $i++) {
 	$email = null;
 	$latitude = null;
 	$longitude = null;
+	$address_2 = null;
+	$county = null;
+	$phone = null;
 
 	if(!empty($line[10])) $email = $line[10];
 	if(!empty($line[11])) $latitude = $line[11];
 	if(!empty($line[12])) $longitude = $line[12];
+	if(!empty($line[13])) $address_2 = $line[13];
+	if(!empty($line[14])) $county = $line[14];
+	if(!empty($line[15])) $phone = $line[15];
 
 	if(empty($city)) continue;
 
@@ -50,6 +56,9 @@ for($i = 0; $line = fgetcsv($handle); $i++) {
 	if(!empty($email)) $location->email = $email;
 	if(!empty($latitude)) $location->latitude = $latitude;
 	if(!empty($longitude)) $location->longitude = $longitude;
+	if(!empty($address_2)) $location->address_2 = $address_2;
+	if(!empty($county)) $location->county = $county;
+	if(!empty($phone)) $location->phone = $phone;
 
 	$location->city = $city;
 	$location->legal_entity_name = $legal_entity_name;