Updated backend files

This commit is contained in:
Kwesi Banson Jnr 2026-10-13 10:14:55 +00:00
parent 066b9fd2d8
commit 50b0179f2c
7 changed files with 38 additions and 8 deletions

View File

@ -34,6 +34,7 @@ class AdminController extends Controller
}
$result = ApiCalls::CurlPost(json_encode($data), $users_url);
// dd($result);
/*
$users_arr = json_decode($result, true);
dump($users_arr);
@ -44,7 +45,7 @@ class AdminController extends Controller
*/
try {
$usersArr = json_decode($result, true, 512, JSON_THROW_ON_ERROR);
$users_arr = json_decode($result, true, 512, JSON_THROW_ON_ERROR);
}
catch (\JsonException $e) {
Log::warning('Admin/home API returned invalid JSON', [
@ -56,11 +57,11 @@ class AdminController extends Controller
->withErrors(['api' => 'Your request cannot be handled at this time. Try again later.']);
}
if (!is_array($usersArr) || ($usersArr['success'] ?? null) === false || strtolower((string) ($usersArr['status'] ?? '')) === 'error') {
if (!is_array($users_arr) || ($users_arr['success'] ?? null) === false || strtolower((string) ($users_arr['status'] ?? '')) === 'error') {
Log::warning('Admin/home API returned an unsuccessful response', [
'user' => session('current_user.username'),
'success' => $usersArr['success'] ?? 'missing',
'status' => $usersArr['status'] ?? 'missing',
'success' => $users_arr['success'] ?? 'missing',
'status' => $users_arr['status'] ?? 'missing',
]);
return redirect()->back()
->withErrors(['api' => 'Your request cannot be handled at this time. Try again later.']);

View File

@ -371,7 +371,7 @@ class UsersController extends Controller
'api_token' => config('services.lupmis.api_key'), //env('LUPMISAPIKEY'),
];
// dd($userData);
if ($request->has('expire_password')) {
#$user_data['is_password_changed'] = 'YES';
#$reset_link = env('APP_URL') . "/reset-auth/" . $request->user_id;

View File

@ -5,7 +5,9 @@ namespace App\Utilities;
class ApiCalls{
public static function CurlGet($url){
$baseUrl = "https://api.lupmis4luspa.org/api/";
$baseUrl = (env('APP_ENV') == 'local') ? env('API_BASE_URL_LOCAL') : "API_BASE_URL";
// $baseUrl = "https://api.lupmis4luspa.org/api/";
$curl = curl_init();
curl_setopt_array($curl, array(
@ -26,7 +28,8 @@ class ApiCalls{
}
public static function CurlPost($data, $url){
$baseUrl = "https://api.lupmis4luspa.org/api/";
// $baseUrl = "https://api.lupmis4luspa.org/api/";
$baseUrl = (env('APP_ENV') == 'local') ? env('API_BASE_URL_LOCAL') : "API_BASE_URL";
$post_url = $baseUrl . $url;
$curl = curl_init();
curl_setopt_array($curl, array(

View File

@ -29,6 +29,7 @@ return [
],
'lupmis' => [
'api_key' => env('LUPMISAPIKEY'),
'api_base_url' => env('API_BASE_URL')
],
'slack' => [

View File

@ -74,3 +74,17 @@ add_header Content-Security-Policy "frame-ancestors 'self' https://lupmis.houseb
php artisan make:model UserGroupMatrix -m
php artisan sql:populate database/user_group.sql
## Board Meeting 08-10-2026
- land use to building purpose
- agent module to register agents
- automatically pick coordinates
- change the alert
- change the document requirements to match the use
- mechanical electrical and plumbing
- land title certificate -- evidence
- setbacks yes/no with comments
- foundation status - checklist
- structural integrity - checklist
- applicant should be able to respond on the portal
-

View File

@ -164,8 +164,13 @@
<div class="card shadow-sm">
<div class="card-body text-center p-4">
<div class="card-icon">
<svg width="48" height="48" fill="currentColor" class="bi bi-database" viewBox="0 0 16 16">
<!-- <svg width="48" height="48" fill="currentColor" class="bi bi-database" viewBox="0 0 16 16">
<path d="M4.318 2.687C5.234 2.271 6.536 2 8 2s2.766.27 3.682.687C12.644 3.125 13 3.627 13 4c0 .374-.356.875-1.318 1.313C10.766 5.729 9.464 6 8 6s-2.766-.27-3.682-.687C3.356 4.875 3 4.373 3 4c0-.374.356-.875 1.318-1.313ZM13 5.698V7c0 .374-.356.875-1.318 1.313C10.766 8.729 9.464 9 8 9s-2.766-.27-3.682-.687C3.356 7.875 3 7.373 3 7V5.698c.271.202.58.378.904.525C4.978 6.711 6.427 7 8 7s3.022-.289 4.096-.777A4.92 4.92 0 0 0 13 5.698ZM14 4c0-1.007-.875-1.755-1.904-2.223C11.022 1.289 9.573 1 8 1s-3.022.289-4.096.777C2.875 2.245 2 2.993 2 4v9c0 1.007.875 1.755 1.904 2.223C4.978 15.71 6.427 16 8 16s3.022-.289 4.096-.777C13.125 14.755 14 14.007 14 13V4Zm-1 4.698V10c0 .374-.356.875-1.318 1.313C10.766 11.729 9.464 12 8 12s-2.766-.27-3.682-.687C3.356 10.875 3 10.373 3 10V8.698c.271.202.58.378.904.525C4.978 9.71 6.427 10 8 10s3.022-.289 4.096-.777A4.92 4.92 0 0 0 13 8.698Zm0 3V13c0 .374-.356.875-1.318 1.313C10.766 14.729 9.464 15 8 15s-2.766-.27-3.682-.687C3.356 13.875 3 13.373 3 13v-1.302c.271.202.58.378.904.525C4.978 12.71 6.427 13 8 13s3.022-.289 4.096-.777c.324-.147.633-.323.904-.525Z"/>
</svg> -->
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" class="bi bi-journal-check" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M10.854 6.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7.5 8.793l2.646-2.647a.5.5 0 0 1 .708 0"/>
<path d="M3 0h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-1h1v1a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v1H1V2a2 2 0 0 1 2-2"/>
<path d="M1 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1zm0 3v-.5a.5.5 0 0 1 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1z"/>
</svg>
</div>
<h4>Permit Tools Backend</h4>

6
statistical_summary.md Normal file
View File

@ -0,0 +1,6 @@
# Valentine Anaba
- In GIS, summary statistics are used to analyze and summarize the attributes of a dataset.
- These statistics help in understanding the distribution of values, identifying spatial trends, and confirming spatial patterns.
- They are calculated using various tools such as Aggregate Points, Summarize Within, Summarize Nearby, Join Features, and Dissolve Boundaries.
- The calculations can include measures like sum, mean, minimum, maximum, range, standard deviation, count, first, last, median, variance, unique, concatenate, and mode.
- These statistics are particularly useful for creating reports and visualizing data, providing insights into the characteristics of a set of features as a whole.