Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Guardians of the Kretschmar Elock System
Doorcode
Commits
1380ec26
Commit
1380ec26
authored
Dec 28, 2020
by
Jacob Priddy
👌
Browse files
Fix notes requiring something on admin page, order users by id
parent
a058d82f
Pipeline
#13238
passed with stages
in 9 minutes and 8 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/backend/app/Http/Controllers/Web/Admin/DoorsController.php
View file @
1380ec26
...
...
@@ -98,8 +98,8 @@ class DoorsController extends Controller
$this
->
validate
(
$this
->
request
,
[
'location'
=>
'required|string|max:255'
,
'name'
=>
'required|string|max:255'
,
'public'
=>
'boolean'
,
'notes'
=>
'string|max:255'
,
'public'
=>
'
required|
boolean'
,
'notes'
=>
'
nullable|
string|max:255'
,
]);
$presenter
=
new
UpdateDoorPresenter
();
...
...
src/backend/resources/views/admin/entities/door.blade.php
View file @
1380ec26
...
...
@@ -38,7 +38,6 @@
<
label
for
=
"notes"
>
Administrative
Notes
</
label
>
<
span
class
=
"text-muted float-right"
>
required
</
span
>
<
textarea
name
=
"notes"
class
=
"form-control"
id
=
"notes"
placeholder
=
"Anything useful can go here."
>
{{
old
(
'notes'
)
}}
</
textarea
>
<
small
id
=
"notesHelp"
class
=
"form-text text-muted"
>
This
is
a
place
only
for
administrative
notes
that
only
administrators
can
see
.
...
...
src/backend/src/Gateways/Users/DatabaseUsersRepository.php
View file @
1380ec26
...
...
@@ -57,10 +57,11 @@ class DatabaseUsersRepository implements UsersRepository
*/
public
function
search
(
?string
$query
=
null
):
array
{
$builder
=
\
App\User
::
query
()
->
orderBy
(
'id'
);
if
(
!
$query
)
{
$users
=
\
App\User
::
all
()
->
values
()
->
all
();
$users
=
$builder
->
get
()
->
values
()
->
all
();
}
else
{
$users
=
\
App\User
::
query
()
$users
=
$builder
->
where
(
'first_name'
,
'ILIKE'
,
"%
$query
%"
)
->
orWhere
(
'id'
,
'='
,
self
::
castToInt
(
$query
))
->
orWhere
(
'last_name'
,
'ILIKE'
,
"%
$query
%"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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