Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
I
IPRSv2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Ngei
IPRSv2
Commits
297e3303
Commit
297e3303
authored
Mar 24, 2025
by
Michael Ngei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'iprsv2_mike' into 'master'
Iprsv2 mike See merge request
!15
parents
d0cf9aae
83b27d91
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
7 deletions
+69
-7
BirthRecord.php
app/Http/Controllers/API/BirthRecord.php
+40
-0
Searchform.php
app/Livewire/Search/Searchform.php
+21
-1
passport-modal.blade.php
resources/views/livewire/search/passport-modal.blade.php
+2
-2
iprsRegisterUser.blade.php
resources/views/mail/user/iprsRegisterUser.blade.php
+4
-1
api.php
routes/api.php
+2
-3
No files found.
app/Http/Controllers/API/BirthRecord.php
0 → 100644
View file @
297e3303
<?php
namespace
App\Http\Controllers\API
;
use
App\Http\Controllers\Controller
;
use
App\Models\Docum
;
use
App\Models\Human
;
use
Illuminate\Database\Eloquent\ModelNotFoundException
;
use
Illuminate\Http\Request
;
class
BirthRecord
extends
Controller
{
public
function
birth_check
(
Request
$request
)
:
\Illuminate\Http\JsonResponse
{
// Validate incoming JSON data
$validatedData
=
$request
->
validate
([
'entry_num'
=>
'required|string'
,
]);
$rid
=
Docum
::
where
(
'ser_num'
,
'='
,
$validatedData
[
'entry_num'
])
->
value
(
'rid_h'
);
if
(
$rid
){
$human
=
Human
::
where
(
'rid'
,
'='
,
$rid
)
->
whereColumn
(
'rid'
,
'pid'
)
->
get
([
'name'
,
'surn'
,
'last_name'
,
'sex'
,
'date_birth'
,
'date_death'
,
'maisha_num'
]);
if
(
$human
->
isEmpty
()){
return
response
()
->
json
([
'message'
=>
'No record found'
,
],
401
);
}
else
{
return
response
()
->
json
([
'message'
=>
'Birth Record Found!'
,
'data'
=>
$human
],
201
);
}
}
}
}
app/Livewire/Search/Searchform.php
View file @
297e3303
...
@@ -69,6 +69,7 @@ class Searchform extends Component
...
@@ -69,6 +69,7 @@ class Searchform extends Component
break
;
break
;
case
'Birth'
:
case
'Birth'
:
if
(
!
empty
(
$this
->
searchBirthEntryNum
)){
if
(
!
empty
(
$this
->
searchBirthEntryNum
)){
$this
->
getBirthHuman
();
$this
->
getBirthHuman
();
}
else
{
}
else
{
session
()
->
flash
(
'error'
,
'Birth entry number not provided'
);
session
()
->
flash
(
'error'
,
'Birth entry number not provided'
);
...
@@ -216,7 +217,7 @@ class Searchform extends Component
...
@@ -216,7 +217,7 @@ class Searchform extends Component
*/
*/
private
function
getBirthHuman
()
:
void
private
function
getBirthHuman
()
:
void
{
{
if
(
!
empty
(
$this
->
searchBirthEntryNum
)){
/*
if(!empty($this->searchBirthEntryNum)){
$human = $this->searchIDocums($this->searchBirthEntryNum);
$human = $this->searchIDocums($this->searchBirthEntryNum);
$this->search_count=1;
$this->search_count=1;
...
@@ -228,6 +229,24 @@ class Searchform extends Component
...
@@ -228,6 +229,24 @@ class Searchform extends Component
$this->showTableResults();
$this->showTableResults();
}else{
}else{
session()->flash('error', 'Search parameter is missing..');
session()->flash('error', 'Search parameter is missing..');
}*/
$rid
=
Docum
::
where
(
'ser_num'
,
'='
,
$this
->
searchBirthEntryNum
)
->
value
(
'rid_h'
);
if
(
$rid
){
$human
=
Human
::
where
(
'rid'
,
'='
,
$rid
)
->
whereColumn
(
'rid'
,
'pid'
)
->
get
([
'rid'
,
'pid'
,
'name'
,
'surn'
,
'last_name'
,
'sex'
,
'date_birth'
,
'date_death'
,
'o_pid'
]);
if
(
$human
->
isEmpty
()){
throw
new
ModelNotFoundException
(
'No record found'
);
}
else
{
$this
->
search_count
=
1
;
$this
->
doctype
=
'Birth'
;
$this
->
records_found
[]
=
$this
->
searchBirthEntryNum
;
$this
->
serial_number
[]
=
$this
->
searchBirthEntryNum
;
$this
->
humans
[]
=
$human
;
$this
->
dispatch
(
'viewResults'
,
$this
->
humans
,
$this
->
serial_number
,
$this
->
doctype
,
$this
->
records_not_found
,
$this
->
search_count
,
$this
->
records_found
);
}
}
}
}
}
...
@@ -242,4 +261,5 @@ class Searchform extends Component
...
@@ -242,4 +261,5 @@ class Searchform extends Component
$this
->
search_count
,
$this
->
records_found
);
$this
->
search_count
,
$this
->
records_found
);
}
}
}
}
resources/views/livewire/search/passport-modal.blade.php
View file @
297e3303
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
title=
""
v-centered
static-backdrop
scrollable
>
title=
""
v-centered
static-backdrop
scrollable
>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<ul
class=
"nav nav-tabs"
id=
"custom-tabs-four-tab"
role=
"tablist"
>
<ul
class=
"nav nav-tabs"
id=
"custom-tabs-four-tab"
role=
"tablist"
>
@if($role->hasAnyPermission(["Basic View ID Details", "Basic View Passport Details", "Basic View Birth Details"]))
@if($role->hasAnyPermission(["Basic View ID Details", "Basic View Passport Details", "Basic View Birth Details"]))
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
@if($modalStatus)
@if($modalStatus)
...
@@ -26,8 +27,7 @@
...
@@ -26,8 +27,7 @@
@endif
@endif
</li>
</li>
@endif
@endif
@if($role->hasPermissionTo("Basic View ID Photo and Signature"))
@if($role->hasPermissionTo("Basic View ID Photo and Signature"))
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
@if($modalStatus)
@if($modalStatus)
<a
class=
"nav-link"
id=
"custom-tabs-four-photo-tab"
data-toggle=
"pill"
<a
class=
"nav-link"
id=
"custom-tabs-four-photo-tab"
data-toggle=
"pill"
...
...
resources/views/mail/user/iprsRegisterUser.blade.php
View file @
297e3303
...
@@ -128,7 +128,10 @@
...
@@ -128,7 +128,10 @@
<table
role=
"presentation"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
style=
"border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;"
>
<table
role=
"presentation"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
style=
"border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;"
>
<tbody>
<tbody>
<tr>
<tr>
<td
style=
"font-family: Helvetica, sans-serif; font-size: 16px; vertical-align: top; border-radius: 4px; text-align: center; background-color: #0867ec;"
valign=
"top"
align=
"center"
bgcolor=
"#0867ec"
>
<a
href=
""
target=
"_blank"
style=
"border: solid 2px #0867ec; border-radius: 4px; box-sizing: border-box; cursor: pointer; display: inline-block; font-size: 16px; font-weight: bold; margin: 0; padding: 12px 24px; text-decoration: none; text-transform: capitalize; background-color: #0867ec; border-color: #0867ec; color: #ffffff;"
>
Customer Portal
</a>
</td>
<td
style=
"font-family: Helvetica, sans-serif; font-size: 16px; vertical-align: top; border-radius: 4px; text-align: center; background-color: #0867ec;"
valign=
"top"
align=
"center"
bgcolor=
"#0867ec"
>
<a
href=
"http://102.164.61.109/dashboard"
target=
"_blank"
style=
"border: solid 2px #0867ec; border-radius: 4px; box-sizing: border-box; cursor: pointer; display: inline-block; font-size: 16px; font-weight: bold; margin: 0; padding: 12px 24px; text-decoration: none; text-transform: capitalize; background-color: #0867ec; border-color: #0867ec; color: #ffffff;"
>
Go to : Customer Portal
</a>
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
...
routes/api.php
View file @
297e3303
<?php
<?php
use
App\Http\Controllers\API\AuthController
;
use
App\Http\Controllers\API\AuthController
;
use
App\Http\Controllers\API\BirthRecord
;
use
App\Http\Controllers\API\Contracts
;
use
App\Http\Controllers\API\Contracts
;
use
App\Http\Controllers\API\Passport
;
use
App\Http\Controllers\API\Passport
;
use
App\Http\Controllers\API\PaymentsAPI
;
use
App\Http\Controllers\API\PaymentsAPI
;
...
@@ -40,10 +41,8 @@ Route::prefix('v1')->group(function () {
...
@@ -40,10 +41,8 @@ Route::prefix('v1')->group(function () {
//ID search
//ID search
Route
::
prefix
(
'verify'
)
->
group
(
function
()
{
Route
::
prefix
(
'verify'
)
->
group
(
function
()
{
Route
::
get
(
'id/{id}/serial/{serial}'
,
[
SearchIDdocument
::
class
,
'id_check'
]);
Route
::
get
(
'id/{id}/serial/{serial}'
,
[
SearchIDdocument
::
class
,
'id_check'
]);
});
//passport
Route
::
prefix
(
'verify'
)
->
group
(
function
()
{
Route
::
get
(
'passport/{passport_num}/id/{id_num}'
,
[
Passport
::
class
,
'passport_check'
]);
Route
::
get
(
'passport/{passport_num}/id/{id_num}'
,
[
Passport
::
class
,
'passport_check'
]);
Route
::
get
(
'birth'
,
[
BirthRecord
::
class
,
'birth_check'
]);
});
});
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment