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
f2961fc0
Commit
f2961fc0
authored
Mar 24, 2025
by
Michael Ngei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'iprsv2_mike' into 'master'
Added passport endpoint See merge request
!11
parents
eaf665c4
a3b86054
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
222 additions
and
4 deletions
+222
-4
PassportModal.php
app/Livewire/Search/PassportModal.php
+60
-0
Resultsmodal.php
app/Livewire/Search/Resultsmodal.php
+1
-0
Tableresult.php
app/Livewire/Search/Tableresult.php
+6
-1
passport-modal.blade.php
resources/views/livewire/search/passport-modal.blade.php
+153
-0
tableresult.blade.php
resources/views/livewire/search/tableresult.blade.php
+1
-1
search.blade.php
resources/views/search/search.blade.php
+1
-2
No files found.
app/Livewire/Search/PassportModal.php
0 → 100644
View file @
f2961fc0
<?php
namespace
App\Livewire\Search
;
use
App\Models\Doi_date
;
use
App\Models\User
;
use
Illuminate\Support\Facades\Auth
;
use
Livewire\Attributes\On
;
use
Livewire\Component
;
use
Spatie\Permission\Models\Role
;
class
PassportModal
extends
Component
{
protected
$listeners
=
[
'openPassportModal'
];
public
$passport
=
[];
public
$hasRole
=
false
;
public
$role
;
public
$isOpen
=
false
;
public
function
mount
()
{
/** @var Auth $user current logged-in user */
$user
=
Auth
::
user
();
/** @var User $contract_id user contract ID */
$contractId
=
$user
[
'contract_rid'
];
try
{
$this
->
role
=
Role
::
findByName
(
'CID-'
.
$user
->
contract_rid
);
}
catch
(
Exception
$e
)
{
//abort(403, "You don't have permission to perform basic search.");
}
}
public
function
render
()
{
return
view
(
'livewire.search.passport-modal'
);
}
#[On('openPassportModal')]
public
function
openPassportModal
(
$data
)
:
void
{
$this
->
passport
=
Doi_date
::
where
(
'passport_no'
,
$data
[
'pass_no'
])
->
where
(
'identity_card_no'
,
$data
[
'id'
])
->
get
();
}
public
function
placeholder
()
{
return
view
(
'livewire.search.skeleton.resultsmodal'
);
}
public
function
closeModal
()
{
// $this->isOpen = false;
}
}
app/Livewire/Search/Resultsmodal.php
View file @
f2961fc0
...
@@ -27,6 +27,7 @@ class Resultsmodal extends Component
...
@@ -27,6 +27,7 @@ class Resultsmodal extends Component
public
$docums
=
[];
public
$docums
=
[];
public
$placeissued
=
[];
public
$placeissued
=
[];
public
$familyrelation
;
public
$familyrelation
;
protected
$listeners
=
[
'openModal'
];
protected
$listeners
=
[
'openModal'
];
public
$serialNum
=
''
;
public
$serialNum
=
''
;
public
$humanAllDocs
=
[];
public
$humanAllDocs
=
[];
...
...
app/Livewire/Search/Tableresult.php
View file @
f2961fc0
...
@@ -41,10 +41,15 @@ class Tableresult extends Component
...
@@ -41,10 +41,15 @@ class Tableresult extends Component
}
}
public
function
triggerResultsModal
(
$doc_num
,
$serial
,
$doctype
)
public
function
triggerResultsModal
(
$doc_num
,
$serial
,
$doctype
)
{
{
$this
->
dispatch
(
'openModal'
,
$doc_num
,
$serial
,
$doctype
);
$this
->
dispatch
(
'openModal'
,
$doc_num
,
$serial
,
$doctype
);
}
}
//passport logic
public
function
passportresultsModal
(
$id
,
$pass_no
,
$doctype
)
{
$this
->
dispatch
(
'openPassportModal'
,
[
'id'
=>
$id
,
'pass_no'
=>
$pass_no
,
'doctype'
=>
$doctype
]);
}
public
function
render
()
public
function
render
()
{
{
return
view
(
'livewire.search.tableresult'
);
return
view
(
'livewire.search.tableresult'
);
...
...
resources/views/livewire/search/passport-modal.blade.php
0 → 100644
View file @
f2961fc0
<div>
@php
$modalStyle="";
$modalStatus='';
if($isOpen) {
$modalStatus= 'show';
$modalStyle="display: block;";
}
@endphp
<x-adminlte-modal
id=
"searchModalBasic"
class=
"{{ $modalStatus }}"
style=
"{{ $modalStyle }}"
size=
"lg"
title=
""
v-centered
static-backdrop
scrollable
>
<div
class=
"modal-body"
>
<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"]))
<li
class=
"nav-item"
>
@if($modalStatus)
<a
class=
"nav-link active"
id=
"custom-tabs-four-home-tab"
data-toggle=
"pill"
href=
"#custom-tabs-four-home"
role=
"tab"
aria-controls=
"custom-tabs-four-home"
aria-selected=
"true"
>
Document data
</a>
@else
<a
class=
"nav-link active"
id=
"custom-tabs-four-home-tab"
data-toggle=
"pill"
href=
"#custom-tabs-four-home"
role=
"tab"
aria-controls=
"custom-tabs-four-home"
aria-selected=
"true"
>
<div
class=
"skeleton skeleton-text short"
style=
"width: 10rem;"
></div>
</a>
@endif
</li>
@endif
@if($role->hasAnyPermission(["Basic View ID Family relations","Basic View Passport Family relations", "Basic View Birth Family relations"]))
<li
class=
"nav-item"
>
@if($modalStatus)
<a
class=
"nav-link"
id=
"custom-tabs-four-family-tab"
data-toggle=
"pill"
href=
"#custom-tabs-four-family"
role=
"tab"
aria-controls=
"custom-tabs-four-family"
aria-selected=
"false"
>
Family relations
</a>
@else
<a
class=
"nav-link"
id=
"custom-tabs-four-family-tab"
data-toggle=
"pill"
href=
"#custom-tabs-four-family"
role=
"tab"
aria-controls=
"custom-tabs-four-family"
aria-selected=
"false"
>
<div
class=
"skeleton skeleton-text short"
style=
"width: 10rem;"
></div>
</a>
@endif
</li>
@endif
@if($role->hasPermissionTo("Basic View ID Photo and Signature"))
<li
class=
"nav-item"
>
@if($modalStatus)
<a
class=
"nav-link"
id=
"custom-tabs-four-photo-tab"
data-toggle=
"pill"
href=
"#custom-tabs-four-photo"
role=
"tab"
aria-controls=
"custom-tabs-four-photo"
aria-selected=
"false"
>
Photo
&
signature
</a>
@else
<a
class=
"nav-link"
id=
"custom-tabs-four-family-tab"
data-toggle=
"pill"
href=
"#custom-tabs-four-family"
role=
"tab"
aria-controls=
"custom-tabs-four-family"
aria-selected=
"false"
>
<div
class=
"skeleton skeleton-text short"
style=
"width: 10rem;"
></div>
</a>
@endif
</li>
@endif
@if($role->hasAnyPermission(["Basic View ID Documents", "Basic View Passport Documents", "Basic View Birth Documents"]))
<li
class=
"nav-item"
>
@if($modalStatus)
<a
class=
"nav-link"
id=
"custom-tabs-four-history-tab"
data-toggle=
"pill"
href=
"#custom-tabs-four-documents"
role=
"tab"
aria-controls=
"custom-tabs-four-documents"
aria-selected=
"false"
>
Documents
</a>
@else
<a
class=
"nav-link"
id=
"custom-tabs-four-family-tab"
data-toggle=
"pill"
href=
"#custom-tabs-four-family"
role=
"tab"
aria-controls=
"custom-tabs-four-family"
aria-selected=
"false"
>
<div
class=
"skeleton skeleton-text short"
style=
"width: 10rem;"
></div>
</a>
@endif
</li>
@endif
@if($role->hasAnyPermission(["Basic View ID History", "Basic View Passport History", "Basic View Birth History"]))
<li
class=
"nav-item"
>
@if($modalStatus)
<a
class=
"nav-link"
id=
"custom-tabs-four-history-tab"
data-toggle=
"pill"
href=
"#custom-tabs-four-history"
role=
"tab"
aria-controls=
"custom-tabs-four-history"
aria-selected=
"false"
>
Document History
</a>
@else
<a
class=
"nav-link"
id=
"custom-tabs-four-family-tab"
data-toggle=
"pill"
href=
"#custom-tabs-four-family"
role=
"tab"
aria-controls=
"custom-tabs-four-family"
aria-selected=
"false"
>
<div
class=
"skeleton skeleton-text short"
style=
"width: 10rem;"
></div>
</a>
@endif
</li>
@endif
<li
class=
"nav-item"
>
@if($modalStatus)
<a
class=
"nav-link"
id=
"custom-tabs-four-history-tab"
data-toggle=
"pill"
href=
"#custom-tabs-four-death"
role=
"tab"
aria-controls=
"custom-tabs-four-death"
aria-selected=
"false"
>
Date of Death
</a>
@else
<a
class=
"nav-link"
id=
"custom-tabs-four-family-tab"
data-toggle=
"pill"
href=
"#custom-tabs-four-family"
role=
"tab"
aria-controls=
"custom-tabs-four-family"
aria-selected=
"false"
>
<div
class=
"skeleton skeleton-text short"
style=
"width: 10rem;"
></div>
</a>
@endif
</li>
</ul>
<div
class=
"card card-primary card-outline card-outline-tabs"
style=
"box-shadow: none;"
>
<div
class=
"card-header p-0 border-bottom-0"
>
</div>
<div
class=
"card-body"
>
<div
class=
"tab-content"
id=
"custom-tabs-four-tabContent"
>
@if($role->hasAnyPermission(["Basic View ID Details", "Basic View Passport Details", "Basic View Birth Details"]))
<div
class=
"tab-pane fade show active"
id=
"custom-tabs-four-home"
role=
"tabpanel"
aria-labelledby=
"custom-tabs-four-home-tab"
>
</div>
@endif
@if($role->hasAnyPermission(["Basic View ID Family relations","Basic View Passport Family relations", "Basic View Birth Family relations"]))
<div
class=
"tab-pane fade"
id=
"custom-tabs-four-family"
role=
"tabpanel"
aria-labelledby=
"custom-tabs-four-family-tab"
>
</div>
@endif
@if($role->hasPermissionTo("Basic View ID Photo and Signature"))
<div
class=
"tab-pane fade"
id=
"custom-tabs-four-photo"
role=
"tabpanel"
aria-labelledby=
"custom-tabs-four-photo-tab"
>
</div>
@endif
@if($role->hasAnyPermission(["Basic View ID Documents", "Basic View Passport Documents", "Basic View Birth Documents"]))
<div
class=
"tab-pane fade"
id=
"custom-tabs-four-documents"
role=
"tabpanel"
aria-labelledby=
"custom-tabs-four-documents-tab"
>
</div>
@endif
@if($role->hasAnyPermission(["Basic View ID History", "Basic View Passport History", "Basic View Birth History"]))
<div
class=
"tab-pane fade"
id=
"custom-tabs-four-history"
role=
"tabpanel"
aria-labelledby=
"custom-tabs-four-history-tab"
>
</div>
@endif
<div
class=
"tab-pane fade"
id=
"custom-tabs-four-death"
role=
"tabpanel"
aria-labelledby=
"custom-tabs-four-death-tab"
>
<h2>
No results!
</h2>
</div>
</div>
</div>
</div>
</div>
<x-slot
name=
"footerSlot"
>
<x-adminlte-button
theme=
"info"
label=
"Print"
data-dismiss=
"modal"
/>
<x-adminlte-button
theme=
"danger"
label=
"Close"
data-dismiss=
"modal"
wire:click=
"$refresh"
/>
</x-slot>
</x-adminlte-modal>
</div>
resources/views/livewire/search/tableresult.blade.php
View file @
f2961fc0
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
theme=
"info"
theme=
"info"
id=
"humanbtn"
id=
"humanbtn"
icon=
"fas fa-info-circle"
icon=
"fas fa-info-circle"
wire:click=
"
triggerResultsModal({{ $human['identity_card_no'] ?? 0 }},'{{ $human['identity_card
_no'] ?? 0 }}','{{ $doctype ?? 0 }}')"
wire:click=
"
passportresultsModal({{ $human['identity_card_no'] ?? 0 }},'{{ $human['passport
_no'] ?? 0 }}','{{ $doctype ?? 0 }}')"
data-toggle=
"modal"
data-toggle=
"modal"
/>
/>
</td>
</td>
...
...
resources/views/search/search.blade.php
View file @
f2961fc0
...
@@ -8,9 +8,8 @@
...
@@ -8,9 +8,8 @@
@
section
(
'content'
)
@
section
(
'content'
)
<
livewire
:
search
.
searchform
/>
<
livewire
:
search
.
searchform
/>
<
livewire
:
search
.
tableresult
lazy
/>
<
livewire
:
search
.
tableresult
lazy
/>
<
livewire
:
search
.
passport
-
modal
lazy
/>
<
livewire
:
search
.
resultsmodal
lazy
/>
<
livewire
:
search
.
resultsmodal
lazy
/>
@
stop
@
stop
...
...
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