promor sign up

This commit is contained in:
CHIEFSOFT\ameye
2024-09-18 10:50:34 -04:00
parent 492ec37652
commit 9eecd4f73e
3 changed files with 28 additions and 16 deletions
+1 -1
View File
@@ -5,4 +5,4 @@ use CodeIgniter\Router\RouteCollection;
/**
* @var RouteCollection $routes
*/
$routes->get('/(:any)/(:any)', 'Home::promoIndex/$2/$1');
$routes->get('/(:any)/(:any)', 'Home::promoIndex/$1/$2');
+1 -8
View File
@@ -10,17 +10,10 @@ class Home extends BaseController
}
public function promoIndex($promo,$promoOwner=''):string{
// echo $promo;
// echo $promoOwner;
//http://10.204.5.100:9083/en/promo/api/v1/start
// echo $backend_server = getenv("API_ENDPOINT");
$in["promo"] = $promo;
$in["promo_owner"] = $promoOwner;
$out = $this->APIcall('POST', $this->wrenchApiServer(). 'start',$in);
$out["task"] = $this->APIcall('POST', $this->wrenchApiServer(). 'tasks',$in);
//var_dump($out);
$out["task"] = $this->APIcall('POST', $this->wrenchApiServer(). 'tasks',$in)["result_list"];
return view('welcome_message', $out);
}
}
+26 -7
View File
@@ -81,6 +81,25 @@
<hr size="1" style="color:lightgrey; size=1" />
</td>
</tr>
<?php
foreach ($task as $item){
?>
<tr>
<td class="bodycopy" style="padding:5px; font-weight:bold; font-size 20px; color:black;">
<div style="background-color:#ebebec; margin-top: 10px; padding: 5px; border-radius: 10px; text-align: left;">
<div><?=$item["title"]?></div>
<div style="display: flex; width: 100%;">
<div style="color: #8de15c; font-size: 12px;"><?=$item["description"]?></div>
<div style="width: 150px; padding-left: 25px; color: darkgreen;"><?=$item["price"]*0.01?> Naira</div>
</div>
</div>
</td>
</tr>
<?php
}
?>
<tr>
<td class="bodycopy" style="padding:20px; font-weight:bold; text-align:center; font-size 20px; color:darkgreen;">
<div style="background-color:aliceblue; margin-top: 10px; padding: 5px; border-radius: 10px;">
@@ -91,13 +110,13 @@
</td>
</tr>
<tr>
<td class="bodycopy" style="padding:20px; font-weight:bold; text-align:center; font-size 20px; color:darkgreen;">
<div style="background-color:#fce6f2; margin-top: 10px; padding: 5px; border-radius: 10px;">
</div>
</td>
</tr>
<!-- <tr>-->
<!-- <td class="bodycopy" style="padding:20px; font-weight:bold; text-align:center; font-size 20px; color:darkgreen;">-->
<!-- <div style="background-color:#fce6f2; margin-top: 10px; padding: 5px; border-radius: 10px;">-->
<!---->
<!-- </div>-->
<!-- </td>-->
<!-- </tr>-->
<tr>
<td class="bodycopy" style="padding: 10px 50px 10px 50px;">
<hr size="1" style="color:lightgrey; size=1" />