Compare commits

..

202 Commits

Author SHA1 Message Date
snipe
53330514ac Updated field name
Signed-off-by: snipe <snipe@snipe.net>
2024-11-02 15:09:03 +00:00
snipe
ba226d9ba3 Added undeployable?
Signed-off-by: snipe <snipe@snipe.net>
2024-10-31 11:04:43 +00:00
snipe
95d136284d Few more fixes
Signed-off-by: snipe <snipe@snipe.net>
2024-10-28 22:02:48 +00:00
snipe
f5aea7b0d5 Changed status label to use status_type instead of booleans
Signed-off-by: snipe <snipe@snipe.net>
2024-10-28 11:37:17 +00:00
snipe
dfc63641dc Merge pull request #15550 from uberbrady/fix_multi_create_partial_failure
Fix multi create partial failure (fixes: [RB-18591])
2024-10-24 11:40:50 +01:00
snipe
07a51ec8b1 Merge pull request #15712 from Godmartinz/fix_import-progress-bar
Upgraded `livewire v3.5.9 => v3.5.12`
2024-10-24 10:03:10 +01:00
snipe
e0ec6795b5 Use crucial for seeded data
Signed-off-by: snipe <snipe@snipe.net>
2024-10-24 01:27:50 +01:00
snipe
5509d756b7 Merge pull request #15722 from Godmartinz/fix_component_factory
Fixed Component Factory: use manufacturer factory for `manufactuer_id`
2024-10-24 01:12:11 +01:00
Godfrey M
b16a978f1b uses manufacturer factory for manufactuer_id 2024-10-23 16:25:51 -07:00
snipe
55ba6279a4 Use trans_choice on alert menu
Signed-off-by: snipe <snipe@snipe.net>
2024-10-23 19:14:17 +01:00
snipe
a9eea830e3 Added manufacturer and model number to component seeders
Signed-off-by: snipe <snipe@snipe.net>
2024-10-23 19:05:34 +01:00
snipe
af564935d5 Merge pull request #15720 from snipe/15695_adds_manufacturer_and_model_number_to_components
Fixed #15695 - Added manufacturer and model_number to components
2024-10-23 17:56:04 +01:00
snipe
3ee76be7e3 Added manufacturer and model_number to components
Signed-off-by: snipe <snipe@snipe.net>
2024-10-23 17:50:22 +01:00
snipe
d58f87862c Merge pull request #15719 from snipe/#15717_adds_qty_to_consumable
Fixed #15717 - Added ability to checkout consumables in variable qty via API
2024-10-23 15:09:50 +01:00
snipe
0b6859c491 Added ability to checkout consumables in variable qty
Signed-off-by: snipe <snipe@snipe.net>
2024-10-23 15:05:35 +01:00
Godfrey M
727c0e458c remove translation 2024-10-22 14:34:39 -07:00
Godfrey M
870dc747db oops 2024-10-22 14:27:32 -07:00
Godfrey M
0fb3d83fac revert controller change 2024-10-22 14:26:54 -07:00
Godfrey M
0d59ccd6a6 upgraded livewire v3.5.9 => v3.5.12 2024-10-22 14:23:26 -07:00
snipe
5da3ce3564 Merge pull request #15711 from marcusmoore/fixes/custom-fieldset-checkboxes
Fixed custom field checkboxes on asset edit page
2024-10-22 22:10:20 +01:00
snipe
c3bbca30ad Merge pull request #15710 from snipe/fixes_lightbox_for_avif
Fixes #15701 - load avif files properly in lightbox
2024-10-22 22:07:50 +01:00
snipe
37f14fff3b Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2024-10-22 22:07:28 +01:00
snipe
eb6c51fabd Fixes #15701 - load avif files properly in lightbox
Signed-off-by: snipe <snipe@snipe.net>
2024-10-22 22:04:57 +01:00
Marcus Moore
5ecd2b6293 Default checkbox elements to an empty array 2024-10-22 14:04:05 -07:00
snipe
dccb788a88 Merge pull request #15691 from marcusmoore/fixes/get-id-for-current-user
Updated `Company::getIdForCurrentUser()` to return null in certain scenarios
2024-10-22 17:44:30 +01:00
Marcus Moore
d10fe77ee7 Merge branch 'develop' into fixes/get-id-for-current-user 2024-10-22 09:38:31 -07:00
snipe
5e1d792bba Merge pull request #15687 from NebelKreis/fix/dashboard-title-casing
Fixed #15686: Corrected capitalization for dashboard section titles by removing strtolower()
2024-10-22 16:52:28 +01:00
snipe
9cf71976f6 Fixed #15706 - Removed purchase order number from asset import
Signed-off-by: snipe <snipe@snipe.net>
2024-10-22 16:51:42 +01:00
snipe
15745d9737 Merge pull request #15566 from Godmartinz/status-label-error-message
Fixed Status Labels Error Message
2024-10-22 16:39:44 +01:00
snipe
bd97955b9e Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2024-10-22 16:38:46 +01:00
snipe
252d99421c Merge pull request #15689 from snipe/better_handle_inline_files
Better handle inline files in file listing
2024-10-22 16:26:48 +01:00
snipe
5767a98ad8 Merge pull request #15649 from bryanlopezinc/ImproveImporting
Improve import performance
2024-10-22 16:26:23 +01:00
snipe
0c820cbc0d Merge pull request #15598 from spencerrlongg/bug/custom_field_validation_issue
Custom Field Existence Validation Issue
2024-10-22 15:56:12 +01:00
snipe
db81701621 Merge branch 'develop' into better_handle_inline_files 2024-10-22 15:44:24 +01:00
snipe
a05c33febf Squashed commit of the following:
commit 147fcfb8eb
Merge: 58a3d09b5 fdcc17ca2
Author: snipe <snipe@snipe.net>
Date:   Tue Oct 22 15:12:55 2024 +0100

    Merge pull request #15676 from Toreg87/fixes/api_create_user_fmcs

    Fix user creation with FullMultipleCompanySupport enabled over API

commit 58a3d09b5f
Merge: 30a06a594 867fa2f36
Author: snipe <snipe@snipe.net>
Date:   Tue Oct 22 14:55:42 2024 +0100

    Merge pull request #15703 from marcusmoore/bug/sc-27188

    Linked accessory files in activity report

commit 30a06a5942
Merge: 6c6af78e0 ce3086317
Author: snipe <snipe@snipe.net>
Date:   Tue Oct 22 11:47:06 2024 +0100

    Merge pull request #15693 from marcusmoore/chore/remove-parallel-testing

    Removed brianium/paratest

commit 6c6af78e08
Merge: 9b06bbb6c 3f79fd7ea
Author: snipe <snipe@snipe.net>
Date:   Tue Oct 22 11:46:04 2024 +0100

    Merge pull request #15705 from marcusmoore/tests/icon-component-test

    Added test to ensure icon component does not end in newline

commit 3f79fd7ea7
Author: Marcus Moore <contact@marcusmoore.io>
Date:   Mon Oct 21 17:07:40 2024 -0700

    Add test to ensure icon component does not end in newline

commit 9b06bbb6c3
Merge: 46ad1d072 d7f70146f
Author: snipe <snipe@snipe.net>
Date:   Mon Oct 21 22:38:26 2024 +0100

    Merge pull request #15704 from marcusmoore/bug/remove-extra-icon

    Removed second icon in accessory file list

commit ce30863177
Author: Marcus Moore <contact@marcusmoore.io>
Date:   Mon Oct 21 13:57:04 2024 -0700

    Remove brianium/paratest dependency

commit d7f70146f4
Author: Marcus Moore <contact@marcusmoore.io>
Date:   Mon Oct 21 13:48:25 2024 -0700

    Remove extra icon in accessory file upload list

commit 867fa2f36e
Author: Marcus Moore <contact@marcusmoore.io>
Date:   Mon Oct 21 12:40:24 2024 -0700

    Display file in activity report for accessories

commit 0933a2d4ea
Author: Marcus Moore <contact@marcusmoore.io>
Date:   Thu Oct 17 18:01:48 2024 -0700

    Remove --parallel flag

commit 46ad1d072f
Merge: bcb4bd9eb 3cf746d7d
Author: snipe <snipe@snipe.net>
Date:   Thu Oct 17 15:29:47 2024 +0100

    Merge pull request #15680 from uberbrady/bulk_checkout_to_bulk_actions

    Bulk checkout to bulk actions

commit bcb4bd9eb4
Merge: 250037540 f50ccbcc4
Author: snipe <snipe@snipe.net>
Date:   Thu Oct 17 10:20:13 2024 +0100

    Merge pull request #15683 from Toreg87/fixes/outdated_comment

    Fix outdated comment in CompanyableTrait

commit f50ccbcc49
Author: Tobias Regnery <tobias.regnery@gmail.com>
Date:   Thu Oct 17 11:07:28 2024 +0200

    Fix outdated comment in CompanyableTrait

    As of commit 5800e8d the user model uses CompanyableTrait so remove this clearly outdated comment

commit 3cf746d7df
Author: Brady Wetherington <bwetherington@grokability.com>
Date:   Wed Oct 16 23:13:32 2024 +0100

    Rework the bulk checkout to not change how all checkouts work

commit 6b7af802af
Author: Brady Wetherington <bwetherington@grokability.com>
Date:   Thu Oct 10 13:28:23 2024 +0100

    Add 'bulk checkout' as one of the bulk actions in the bulk actions toolbar

commit fdcc17ca2c
Author: Tobias Regnery <tobias.regnery@gmail.com>
Date:   Wed Oct 16 11:18:24 2024 +0200

    Fix user creation with FullMultipleCompanySupport enabled over API

    It is currently possible as a non-superuser to create a new user or patch an existing user with arbitrary company over the API if FullMultipleCompanySupport is enabled.
    Altough a highly unlikely scenario as the user needs permission to create API keys and new users, it is a bug that should get fixed.

    Add a call to getIdForCurrentUser() to normalize the company_id if FullMultipleCompanySupport is enabled.

Signed-off-by: snipe <snipe@snipe.net>
2024-10-22 15:43:19 +01:00
snipe
147fcfb8eb Merge pull request #15676 from Toreg87/fixes/api_create_user_fmcs
Fix user creation with FullMultipleCompanySupport enabled over API
2024-10-22 15:12:55 +01:00
snipe
58a3d09b5f Merge pull request #15703 from marcusmoore/bug/sc-27188
Linked accessory files in activity report
2024-10-22 14:55:42 +01:00
snipe
30a06a5942 Merge pull request #15693 from marcusmoore/chore/remove-parallel-testing
Removed brianium/paratest
2024-10-22 11:47:06 +01:00
snipe
6c6af78e08 Merge pull request #15705 from marcusmoore/tests/icon-component-test
Added test to ensure icon component does not end in newline
2024-10-22 11:46:04 +01:00
Marcus Moore
3f79fd7ea7 Add test to ensure icon component does not end in newline 2024-10-21 17:07:40 -07:00
snipe
9b06bbb6c3 Merge pull request #15704 from marcusmoore/bug/remove-extra-icon
Removed second icon in accessory file list
2024-10-21 22:38:26 +01:00
Marcus Moore
ce30863177 Remove brianium/paratest dependency 2024-10-21 13:57:04 -07:00
Marcus Moore
d7f70146f4 Remove extra icon in accessory file upload list 2024-10-21 13:48:25 -07:00
Marcus Moore
867fa2f36e Display file in activity report for accessories 2024-10-21 12:40:24 -07:00
Marcus Moore
e1882ee6d2 Add comment 2024-10-21 12:21:45 -07:00
Marcus Moore
7eee239378 use is_numeric instead of is_int 2024-10-21 12:20:28 -07:00
Marcus Moore
4188849ae1 Add failing test case 2024-10-21 12:19:48 -07:00
snipe
787e651778 Fixed todos with log message
Signed-off-by: snipe <snipe@snipe.net>
2024-10-21 16:52:21 +01:00
snipe
ef9b6e3b07 Code cleanup
Signed-off-by: snipe <snipe@snipe.net>
2024-10-21 16:34:54 +01:00
snipe
06c599cc17 Added method to show or download file
Signed-off-by: snipe <snipe@snipe.net>
2024-10-21 16:34:03 +01:00
snipe
6105323877 Use plural class name for src
Signed-off-by: snipe <snipe@snipe.net>
2024-10-21 14:11:20 +01:00
Marcus Moore
0933a2d4ea Remove --parallel flag 2024-10-17 18:01:48 -07:00
Marcus Moore
a8d853c44a Remove focus group tags 2024-10-17 15:26:27 -07:00
Marcus Moore
7e1b47708e Fix failing test ensuring company id is an integer 2024-10-17 15:18:41 -07:00
Marcus Moore
979e4502ff Have getIdForCurrentUser method return null if FMCS enabled, user is not super admin, and does not have company 2024-10-17 15:14:39 -07:00
Marcus Moore
99dd51a965 Improve name 2024-10-17 14:53:18 -07:00
Marcus Moore
15c2169477 Scaffold additional tests 2024-10-17 14:31:05 -07:00
Marcus Moore
50fa6ce335 Scaffold tests 2024-10-17 14:12:22 -07:00
Marcus Moore
159a1d3f43 Be more explicit 2024-10-17 11:48:55 -07:00
snipe
d1149730be Apply blade component to files views
Signed-off-by: snipe <snipe@snipe.net>
2024-10-17 16:31:17 +01:00
snipe
46ad1d072f Merge pull request #15680 from uberbrady/bulk_checkout_to_bulk_actions
Bulk checkout to bulk actions
2024-10-17 15:29:47 +01:00
NebelKreis
780ed91a10 Fix: Removed strtolower() from dashboard titles
This fix ensures the correct capitalization in different languages.
2024-10-17 16:09:25 +02:00
snipe
bcb4bd9eb4 Merge pull request #15683 from Toreg87/fixes/outdated_comment
Fix outdated comment in CompanyableTrait
2024-10-17 10:20:13 +01:00
Tobias Regnery
f50ccbcc49 Fix outdated comment in CompanyableTrait
As of commit 5800e8d the user model uses CompanyableTrait so remove this clearly outdated comment
2024-10-17 11:07:28 +02:00
snipe
0e9b3c9119 Check for existence before trying to get the icon
Signed-off-by: snipe <snipe@snipe.net>
2024-10-17 00:27:39 +01:00
snipe
4933aa5784 Add StorageHelper to app config
Signed-off-by: snipe <snipe@snipe.net>
2024-10-17 00:27:04 +01:00
snipe
d67addc69e Removed filetype column - it’s dumb
Signed-off-by: snipe <snipe@snipe.net>
2024-10-17 00:21:43 +01:00
snipe
02c80ff18a Added comment
Signed-off-by: snipe <snipe@snipe.net>
2024-10-17 00:18:40 +01:00
snipe
c01190fac2 Conditionally add content-type
Signed-off-by: snipe <snipe@snipe.net>
2024-10-17 00:18:34 +01:00
snipe
017884f843 Added checks and filetype display
Signed-off-by: snipe <snipe@snipe.net>
2024-10-17 00:09:09 +01:00
snipe
c49921f50f Removed unused (maybe?) API endpoint
Signed-off-by: snipe <snipe@snipe.net>
2024-10-17 00:08:54 +01:00
snipe
c49abb6aea Refactor the UserFilesController show method for simpler inlining
Signed-off-by: snipe <snipe@snipe.net>
2024-10-17 00:08:38 +01:00
snipe
ccd2019448 Removed unusded use statements
Signed-off-by: snipe <snipe@snipe.net>
2024-10-17 00:08:04 +01:00
snipe
96191a5e93 Added method to decide if the file should be inlinable
Signed-off-by: snipe <snipe@snipe.net>
2024-10-17 00:07:54 +01:00
snipe
c56affd663 Added SVG icon
Signed-off-by: snipe <snipe@snipe.net>
2024-10-17 00:07:37 +01:00
Brady Wetherington
3cf746d7df Rework the bulk checkout to not change how all checkouts work 2024-10-16 23:13:32 +01:00
Brady Wetherington
6b7af802af Add 'bulk checkout' as one of the bulk actions in the bulk actions toolbar 2024-10-16 22:02:45 +01:00
Marcus Moore
604a964462 Improve scenario descriptions 2024-10-16 11:52:24 -07:00
Marcus Moore
2f72c66614 Add additional case 2024-10-16 11:30:06 -07:00
Tobias Regnery
fdcc17ca2c Fix user creation with FullMultipleCompanySupport enabled over API
It is currently possible as a non-superuser to create a new user or patch an existing user with arbitrary company over the API if FullMultipleCompanySupport is enabled.
Altough a highly unlikely scenario as the user needs permission to create API keys and new users, it is a bug that should get fixed.

Add a call to getIdForCurrentUser() to normalize the company_id if FullMultipleCompanySupport is enabled.
2024-10-16 11:47:18 +02:00
Marcus Moore
cba1a56040 Improve readability? 2024-10-15 17:38:11 -07:00
Marcus Moore
d9afde4610 Write failing test 2024-10-15 17:00:22 -07:00
Marcus Moore
42095c0167 Add reference link 2024-10-15 13:02:22 -07:00
snipe
2500375400 Merge pull request #15672 from uberbrady/ldap_location_fixes
Clean up how we use the '$location' in LDAP sync command
2024-10-15 17:34:35 +01:00
Brady Wetherington
e4e1d0d50a Clean up how we use the '$location' in LDAP sync command 2024-10-15 17:26:31 +01:00
snipe
16c8264e76 Merge pull request #15671 from snipe/bug/sc-27147
Bug/sc 27147
2024-10-15 16:42:34 +01:00
snipe
0ae9ce0aa9 Cannot sort by updated at on Users [sc-27147]
Signed-off-by: snipe <snipe@snipe.net>
2024-10-15 16:41:45 +01:00
snipe
50b8f180b3 More logical grouping in allow_columns
Signed-off-by: snipe <snipe@snipe.net>
2024-10-15 16:41:39 +01:00
snipe
914a647204 Merge pull request #15669 from snipe/remlove_ou_requirenedess
Fixed #15663 - remove requiredness for OU
2024-10-15 12:47:15 +01:00
snipe
e9225ff3ea Switch to regular HTML for input form field
Signed-off-by: snipe <snipe@snipe.net>
2024-10-15 12:43:10 +01:00
snipe
d0d4159088 Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2024-10-15 12:42:09 +01:00
snipe
69b6080bd8 Merge pull request #15666 from snipe/updated_readme_llm
Added LLM note
2024-10-15 10:31:29 +01:00
snipe
b997d728fb Added LLM note
Signed-off-by: snipe <snipe@snipe.net>
2024-10-15 10:30:34 +01:00
snipe
ddead359d0 Merge pull request #15660 from Toreg87/fixes/api_asset_create_fmcs2
Refactor asset creation with API
2024-10-14 14:29:34 +01:00
Tobias Regnery
f3c4e55667 Refactor asset creation with API
Commit fb4fe3004 restored the previous behaviour to check the company_id in case of FullMultipleCompanySupport.
But after rereading the code and the laravel documentation, the check is already there where it belongs in AssetStoreRequest::prepareForValidation()
The bug is the is_int-check of the request input in prepareForValidation(). Is is of type string even if it is a numeric value, so the call to getIdForCurrentUser() never happend.
Fix this by removing the check and the now redundant call to getIdForCurrentUser().
Wrong values will get caught by the model-level validation rules.
2024-10-14 15:14:41 +02:00
snipe
0d35335da7 Removed debugging
Signed-off-by: snipe <snipe@snipe.net>
2024-10-11 16:06:17 +01:00
snipe
feaa714304 Nicer disabled button
Signed-off-by: snipe <snipe@snipe.net>
2024-10-11 14:23:57 +01:00
snipe
e1a70023b1 Merge pull request #15655 from Toreg87/fixes/api_asset_create_fmcs
Fixes #15654 Fix asset creation with API and FullMultipleCompanySupport
2024-10-11 11:45:48 +01:00
snipe
de62359c67 Merge pull request #15533 from marcusmoore/testing/fmcs-accessories
Added tests for accessory api controller
2024-10-11 11:29:34 +01:00
snipe
12bda8fc7b Merge pull request #15653 from snipe/15651_admin_user_on_maintenances
Fixed #15651 - admin user now displaying on maintenances page
2024-10-11 11:27:18 +01:00
Tobias Regnery
fb4fe30049 Fix asset creation with API and FullMultipleCompanySupport
It is currently possible to create an asset with arbitrary company without being superuser and FullMultipleCompanySupport enabled.
This bug goes back to 75ac7f80b9 which is part of version 6.3.0.
Fix this by restoring the previous behaviour to check the company_id with getIdForCurrentUser().
2024-10-11 12:19:20 +02:00
snipe
b054017c9f Fixed #15651 - admin user now displaying on maintenances page
Signed-off-by: snipe <snipe@snipe.net>
2024-10-11 11:16:24 +01:00
bryanlopezinc
524a442724 Improved import performance 2024-10-10 23:32:07 +01:00
snipe
8aa298f6b0 Merge pull request #15644 from snipe/form_requests_for_settings
Form requests for settings
2024-10-10 12:30:53 +01:00
snipe
1f34657734 Fixed test
Signed-off-by: snipe <snipe@snipe.net>
2024-10-10 12:30:35 +01:00
snipe
0856ee648e Merge pull request #15648 from snipe/update_packages
Updated livewire to 3.5.2
2024-10-10 12:23:14 +01:00
snipe
1dafc970df Updated livewire to 3.5.2
Signed-off-by: snipe <snipe@snipe.net>
2024-10-10 12:19:57 +01:00
snipe
94a074a193 Merge pull request #15601 from snipe/check_db_on_healthcheck
Fixed #15439 - check database on healthcheck
2024-10-10 01:11:10 +01:00
snipe
2d49e1eff2 Merge pull request #15637 from akemidx/bug/sc-26614
FIXED: Badge counter showing deleted assets on User page
2024-10-10 01:09:11 +01:00
snipe
705bc6f0c0 Merge pull request #15642 from uberbrady/fix_bulk_checkout
Fix bulk checkout to users, assets, and locations
2024-10-10 01:08:25 +01:00
snipe
b5b93fdd3a Make ldap username required
Signed-off-by: snipe <snipe@snipe.net>
2024-10-10 00:27:00 +01:00
snipe
d9432baf7a Mlore ldap style improvements
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 23:51:20 +01:00
snipe
90be2a4498 Use newer naming convention for errors
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 22:26:30 +01:00
snipe
3886da8941 Remove form request from get LDAP method
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 22:15:49 +01:00
snipe
130e0c6242 More validation
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 22:15:37 +01:00
snipe
4361a10818 Added string
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 22:15:30 +01:00
snipe
aa8048ac15 Blade changes for ldap
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 22:15:25 +01:00
snipe
710e738e8e Fixed tests
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 22:15:16 +01:00
snipe
3705b91439 Added more validation
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 20:51:34 +01:00
snipe
707bdad192 Updated test
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 20:33:56 +01:00
snipe
242fe33f97 Switch to regular HTML input
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 20:33:42 +01:00
snipe
ded79469c1 Remove unused controller method
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 20:33:29 +01:00
snipe
d9fbf330e5 Fixed translations
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 20:33:15 +01:00
snipe
2cb9ac26cd Renamed test
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 19:57:04 +01:00
snipe
185bc966e6 Cleaned up use statements in tests
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 19:46:47 +01:00
snipe
a7f7e4938f Added form action
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 19:31:56 +01:00
snipe
2883e79193 Removed unecessary assets creation
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 19:30:55 +01:00
snipe
9c4191ae0a Basic tests
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 19:30:42 +01:00
snipe
3a77b83e9c Added space
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 19:30:34 +01:00
snipe
d9be2b5a5e Trying to use the email_array translation
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 19:30:25 +01:00
snipe
69c43c610c Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 19:30:00 +01:00
snipe
4f957bcf71 Required flag
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 18:34:53 +01:00
snipe
5cda7cce48 Only accept a positive number for thresholds
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 18:21:40 +01:00
snipe
41b94e7128 Fixed form input group
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 18:19:26 +01:00
snipe
aa55fa6ff4 Switch to form requests for settings
Signed-off-by: snipe <snipe@snipe.net>
2024-10-09 18:16:34 +01:00
Brady Wetherington
67a605c9a5 Fix bulk checkout to users, assets, and locations 2024-10-09 17:01:26 +01:00
akemidx
c2663ea1e0 withouttrashed 2024-10-08 16:38:33 -04:00
snipe
3ee5713740 Merge pull request #15631 from snipe/test/importer-tests
Add importer tests
2024-10-07 23:13:15 +01:00
snipe
ab8a22f77e Merge pull request #15630 from marcusmoore/bug/sc-27028
Only show EULA when available on print users page
2024-10-07 22:56:23 +01:00
snipe
56e7ea6677 Merge pull request #15616 from marcusmoore/test/importer-test-updates
Improve importer tests
2024-10-07 22:29:35 +01:00
snipe
26d7572bcc Merge pull request #15603 from marcusmoore/fixes/add-reguard
Added `Model::reguard()` to importer
2024-10-07 22:28:53 +01:00
Marcus Moore
8c9132aff9 Hide EULA text and button when nothing will be displayed 2024-10-07 14:22:49 -07:00
snipe
382ebef8ca Merge pull request #15621 from sniff122/develop
Docker Env: Change trusted proxies to RFC1918
2024-10-07 21:26:21 +01:00
snipe
2be88cb955 Merge pull request #15624 from snipe/fixed_line_break_on_print_all_for_users
Removed duplicate JS and removed line break before user section
2024-10-07 11:14:24 +01:00
snipe
3f36d5f9b3 Removed duplicate CSS and removed line break before user section
Signed-off-by: snipe <snipe@snipe.net>
2024-10-07 11:08:02 +01:00
Lewis Foster
f76da48448 Docker Env: Change trusted proxies to RFC1918 2024-10-05 18:27:42 +01:00
Marcus Moore
8035326675 Add test 2024-10-03 16:53:19 -07:00
Marcus Moore
dfdd85abb1 Remove unused imports 2024-10-03 15:14:07 -07:00
Marcus Moore
063ea1892b Add trait to clean up files after test runs 2024-10-03 15:02:03 -07:00
Marcus Moore
e213053775 Swap factory syntax 2024-10-03 13:59:58 -07:00
Marcus Moore
88d549e7c5 Remove unused data provider method 2024-10-03 13:40:37 -07:00
Marcus Moore
983a25aa5f Simplify permission tests 2024-10-03 13:39:54 -07:00
Marcus Moore
bde05d6ed9 Use new() instead of times() 2024-10-03 13:15:49 -07:00
Marcus Moore
b5ffe54bd0 Swap assertEquals parameter order 2024-10-03 13:15:02 -07:00
Marcus Moore
863c0a8b60 Fix import_type for accessory state 2024-10-03 11:43:02 -07:00
Marcus Moore
32551d55d7 Merge pull request #15579 from bryanlopezinc/ImportTests
Add Import data tests
2024-10-03 11:39:21 -07:00
snipe
7fc498a597 Merge pull request #15613 from snipe/css_fixes_for_long_values
Smarter word-wrapping on long text
2024-10-03 17:39:18 +01:00
snipe
cb281c6408 Tweaked line height
Signed-off-by: snipe <snipe@snipe.net>
2024-10-03 17:33:46 +01:00
snipe
f483cd448f Smarter work-wrapping on long text
Signed-off-by: snipe <snipe@snipe.net>
2024-10-03 17:27:37 +01:00
snipe
78ca1026fd Merge pull request #15612 from snipe/fixes_print_assigned_in_profile
Fixes print assigned in profile
2024-10-03 16:24:32 +01:00
snipe
722d5a58e7 Added isset on users
Signed-off-by: snipe <snipe@snipe.net>
2024-10-03 16:19:38 +01:00
snipe
7461c3e0ca Change controller to assume a collection. (This is dumb, but whatever)
Signed-off-by: snipe <snipe@snipe.net>
2024-10-03 16:19:27 +01:00
snipe
3c0f4181ae Use the newer button style
Signed-off-by: snipe <snipe@snipe.net>
2024-10-03 16:19:06 +01:00
snipe
3699d79363 Merge pull request #15610 from uberbrady/fix_numeric_sort_bug
Fix numeric sort 'ambiguous order clause' error
2024-10-03 14:34:00 +01:00
Brady Wetherington
350b627ce1 Fix numeric sort 'ambiguous order clause' error 2024-10-03 14:23:40 +01:00
Marcus Moore
ee046a8688 Add matching Model::reguard() 2024-10-02 10:50:40 -07:00
snipe
b34a7c8aad Removed die()
Signed-off-by: snipe <snipe@snipe.net>
2024-10-02 15:48:35 +01:00
snipe
f92bf5dc20 Updated language for failure
Signed-off-by: snipe <snipe@snipe.net>
2024-10-02 15:39:27 +01:00
snipe
4d9e85026a Fixed #15439 - check database on healthcheck
Signed-off-by: snipe <snipe@snipe.net>
2024-10-02 15:36:01 +01:00
spencerrlongg
3153bbb13f dumb fix 2024-10-01 17:04:18 -05:00
Marcus Moore
3dc64cc5e0 Reference accessory checkout and not the accessory 2024-10-01 13:35:39 -07:00
Marcus Moore
5b90d79494 Use created_by 2024-10-01 11:50:48 -07:00
Marcus Moore
fdfea390fb Merge branch 'develop' into testing/fmcs-accessories 2024-09-30 12:59:27 -07:00
bryanlopezinc
e807cfab86 Merge branch 'develop' into importTests 2024-09-30 12:47:52 +01:00
bryanlopezinc
0b3f458561 Added tests for Import feature 2024-09-30 12:42:41 +01:00
Godfrey M
3f74ff25d2 fixed error message 2024-09-25 16:19:09 -07:00
Brady Wetherington
b6340532d7 Improve the error and success messages and linking 2024-09-24 17:15:39 +01:00
Brady Wetherington
c71411465a First pass at better-handling those annoying Rollbars we keep getting 2024-09-24 15:17:35 +01:00
Marcus Moore
d609ed50a4 Merge branch 'develop' into testing/fmcs-accessories 2024-09-19 13:20:55 -07:00
Marcus Moore
d639d6fbc1 Add tests for accessory select list endpoint 2024-09-19 12:21:54 -07:00
Marcus Moore
fff069824b Add tests for update accessory endpoint 2024-09-19 12:11:03 -07:00
Marcus Moore
a5be18bb14 Add test for limit and offset 2024-09-19 11:55:15 -07:00
Marcus Moore
2137890496 Remove dead code 2024-09-19 11:33:20 -07:00
Marcus Moore
9b22d6d493 Add tests for accessory checkouts endpoint 2024-09-19 11:24:01 -07:00
Marcus Moore
86f13a9735 Add index test 2024-09-18 16:13:34 -07:00
Marcus Moore
a071fff954 Implement tests 2024-09-18 12:32:14 -07:00
Marcus Moore
8b50ef077d Implement test 2024-09-18 11:58:33 -07:00
Marcus Moore
607f29030f Stub out test 2024-09-18 11:53:27 -07:00
Marcus Moore
a6bcd3c0c2 Add validation test 2024-09-18 11:47:59 -07:00
Marcus Moore
9b293afaac Remove more dead code 2024-09-18 11:28:29 -07:00
Marcus Moore
636c776620 Remove dead code 2024-09-18 11:27:37 -07:00
Marcus Moore
d5f659024c Add test for logging 2024-09-18 11:27:09 -07:00
Marcus Moore
832e50a71e Implement test 2024-09-18 11:19:41 -07:00
Marcus Moore
fa19686248 Implement test 2024-09-18 11:18:21 -07:00
Marcus Moore
c021609c13 Merge branch 'develop' into testing/fmcs-accessories 2024-09-18 10:42:58 -07:00
Marcus Moore
7b31df7c14 Begin additional test case 2024-09-17 09:11:58 -07:00
Marcus Moore
12fd9cd97a Update interface name 2024-09-16 17:00:08 -07:00
Marcus Moore
9e03c4ba6f Merge branch 'testing/fmcs' into testing/fmcs-accessories 2024-09-16 16:58:46 -07:00
Marcus Moore
8eb1c487bc implement FMCS test for accessory index 2024-09-16 16:52:10 -07:00
Marcus Moore
e835637ef0 Add accessory checkin test 2024-09-16 16:40:10 -07:00
Marcus Moore
eb35608bb5 Remove call handled by form request 2024-09-16 16:35:33 -07:00
Marcus Moore
3f07f682de Migrate existing tests to TestsPermissionsRequirement 2024-09-16 16:35:21 -07:00
205 changed files with 272287 additions and 2883 deletions

View File

@@ -97,7 +97,7 @@ API_TOKEN_EXPIRATION_YEARS=40
# --------------------------------------------
# OPTIONAL: SECURITY HEADER SETTINGS
# --------------------------------------------
APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1,172.0.0.0/8
APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1,172.16.0.0/12
ALLOW_IFRAMING=false
REFERRER_POLICY=same-origin
ENABLE_CSP=false

View File

@@ -76,4 +76,4 @@ jobs:
DB_DATABASE: snipeit
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_USERNAME: root
run: php artisan test --parallel
run: php artisan test

View File

@@ -74,4 +74,4 @@ jobs:
DB_PORT: ${{ job.services.postgresql.ports[5432] }}
DB_USERNAME: snipeit
DB_PASSWORD: password
run: php artisan test --parallel
run: php artisan test

View File

@@ -58,4 +58,4 @@ jobs:
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite_testing
run: php artisan test --parallel
run: php artisan test

View File

@@ -84,7 +84,11 @@ Since the release of the JSON REST API, several third-party developers have been
### Contributing
Please see the documentation on [contributing and developing for Snipe-IT](https://snipe-it.readme.io/docs/contributing-overview).
Please refrain from submitting issues or pull requests generated by fully-automated tools. Maintainers reserve the right, at their sole discretion, to close such submissions and to block any account responsible for them.
Ideally, contributions should follow from a human-to-human discussion in the form of an issue.
Please see the complete documentation on [contributing and developing for Snipe-IT](https://snipe-it.readme.io/docs/contributing-overview).
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.

View File

@@ -137,23 +137,24 @@ class LdapSync extends Command
}
/* Determine which location to assign users to by default. */
$location = null; // TODO - this would be better called "$default_location", which is more explicit about its purpose
$default_location = null;
if ($this->option('location') != '') {
if ($location = Location::where('name', '=', $this->option('location'))->first()) {
if ($default_location = Location::where('name', '=', $this->option('location'))->first()) {
Log::debug('Location name ' . $this->option('location') . ' passed');
Log::debug('Importing to ' . $location->name . ' (' . $location->id . ')');
Log::debug('Importing to '.$default_location->name.' ('.$default_location->id.')');
}
} elseif ($this->option('location_id')) {
//TODO - figure out how or why this is an array?
foreach($this->option('location_id') as $location_id) {
if ($location = Location::where('id', '=', $location_id)->first()) {
if ($default_location = Location::where('id', '=', $location_id)->first()) {
Log::debug('Location ID ' . $location_id . ' passed');
Log::debug('Importing to ' . $location->name . ' (' . $location->id . ')');
Log::debug('Importing to '.$default_location->name.' ('.$default_location->id.')');
}
}
}
if (! isset($location)) {
if (!isset($default_location)) {
Log::debug('That location is invalid or a location was not provided, so no location will be assigned by default.');
}
@@ -229,43 +230,44 @@ class LdapSync extends Command
for ($i = 0; $i < $results['count']; $i++) {
$item = [];
$item['username'] = $results[$i][$ldap_map["username"]][0] ?? '';
$item['employee_number'] = $results[$i][$ldap_map["emp_num"]][0] ?? '';
$item['lastname'] = $results[$i][$ldap_map["last_name"]][0] ?? '';
$item['firstname'] = $results[$i][$ldap_map["first_name"]][0] ?? '';
$item['email'] = $results[$i][$ldap_map["email"]][0] ?? '';
$item['ldap_location_override'] = $results[$i]['ldap_location_override'] ?? '';
$item['location_id'] = $results[$i]['location_id'] ?? '';
$item['telephone'] = $results[$i][$ldap_map["phone"]][0] ?? '';
$item['jobtitle'] = $results[$i][$ldap_map["jobtitle"]][0] ?? '';
$item['country'] = $results[$i][$ldap_map["country"]][0] ?? '';
$item['department'] = $results[$i][$ldap_map["dept"]][0] ?? '';
$item['manager'] = $results[$i][$ldap_map["manager"]][0] ?? '';
$item['location'] = $results[$i][$ldap_map["location"]][0] ?? '';
$item = [];
$item['username'] = $results[$i][$ldap_map["username"]][0] ?? '';
$item['employee_number'] = $results[$i][$ldap_map["emp_num"]][0] ?? '';
$item['lastname'] = $results[$i][$ldap_map["last_name"]][0] ?? '';
$item['firstname'] = $results[$i][$ldap_map["first_name"]][0] ?? '';
$item['email'] = $results[$i][$ldap_map["email"]][0] ?? '';
$item['ldap_location_override'] = $results[$i]['ldap_location_override'] ?? '';
$item['location_id'] = $results[$i]['location_id'] ?? '';
$item['telephone'] = $results[$i][$ldap_map["phone"]][0] ?? '';
$item['jobtitle'] = $results[$i][$ldap_map["jobtitle"]][0] ?? '';
$item['country'] = $results[$i][$ldap_map["country"]][0] ?? '';
$item['department'] = $results[$i][$ldap_map["dept"]][0] ?? '';
$item['manager'] = $results[$i][$ldap_map["manager"]][0] ?? '';
$item['location'] = $results[$i][$ldap_map["location"]][0] ?? '';
$location = $default_location; //initially, set '$location' to the default_location (which may just be `null`)
// ONLY if you are using the "ldap_location" option *AND* you have an actual result
if ($ldap_map["location"] && $item['location']) {
$location = Location::firstOrCreate([
'name' => $item['location'],
]);
}
$department = Department::firstOrCreate([
'name' => $item['department'],
// ONLY if you are using the "ldap_location" option *AND* you have an actual result
if ($ldap_map["location"] && $item['location']) {
$location = Location::firstOrCreate([
'name' => $item['location'],
]);
}
$department = Department::firstOrCreate([
'name' => $item['department'],
]);
$user = User::where('username', $item['username'])->first();
if ($user) {
// Updating an existing user.
$item['createorupdate'] = 'updated';
} else {
// Creating a new user.
$user = new User;
$user->password = $user->noPassword();
$user->locale = app()->getLocale();
$user->activated = 1; // newly created users can log in by default, unless AD's UAC is in use, or an active flag is set (below)
$item['createorupdate'] = 'created';
}
$user = User::where('username', $item['username'])->first();
if ($user) {
// Updating an existing user.
$item['createorupdate'] = 'updated';
} else {
// Creating a new user.
$user = new User;
$user->password = $user->noPassword();
$user->locale = app()->getLocale();
$user->activated = 1; // newly created users can log in by default, unless AD's UAC is in use, or an active flag is set (below)
$item['createorupdate'] = 'created';
}
//If a sync option is not filled in on the LDAP settings don't populate the user field
if($ldap_map["username"] != null){
@@ -296,7 +298,7 @@ class LdapSync extends Command
$user->department_id = $department->id;
}
if($ldap_map["location"] != null){
$user->location_id = $location ? $location->id : null;
$user->location_id = $location?->id;
}
if($ldap_map["manager"] != null){
@@ -341,38 +343,38 @@ class LdapSync extends Command
}
}
// Sync activated state for Active Directory.
if ( !empty($ldap_map["active_flag"])) { // IF we have an 'active' flag set....
// ....then *most* things that are truthy will activate the user. Anything falsey will deactivate them.
// (Specifically, we don't handle a value of '0.0' correctly)
$raw_value = @$results[$i][$ldap_map["active_flag"]][0];
$filter_var = filter_var($raw_value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
$boolean_cast = (bool)$raw_value;
// Sync activated state for Active Directory.
if (!empty($ldap_map["active_flag"])) { // IF we have an 'active' flag set....
// ....then *most* things that are truthy will activate the user. Anything falsey will deactivate them.
// (Specifically, we don't handle a value of '0.0' correctly)
$raw_value = @$results[$i][$ldap_map["active_flag"]][0];
$filter_var = filter_var($raw_value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
$boolean_cast = (bool) $raw_value;
$user->activated = $filter_var ?? $boolean_cast; // if filter_var() was true or false, use that. If it's null, use the $boolean_cast
$user->activated = $filter_var ?? $boolean_cast; // if filter_var() was true or false, use that. If it's null, use the $boolean_cast
} elseif (array_key_exists('useraccountcontrol', $results[$i]) ) {
// ....otherwise, (ie if no 'active' LDAP flag is defined), IF the UAC setting exists,
// ....then use the UAC setting on the account to determine can-log-in vs. cannot-log-in
} elseif (array_key_exists('useraccountcontrol', $results[$i])) {
// ....otherwise, (ie if no 'active' LDAP flag is defined), IF the UAC setting exists,
// ....then use the UAC setting on the account to determine can-log-in vs. cannot-log-in
/* The following is _probably_ the correct logic, but we can't use it because
some users may have been dependent upon the previous behavior, and this
could cause additional access to be available to users they don't want
to allow to log in.
/* The following is _probably_ the correct logic, but we can't use it because
some users may have been dependent upon the previous behavior, and this
could cause additional access to be available to users they don't want
to allow to log in.
$useraccountcontrol = $results[$i]['useraccountcontrol'][0];
if(
// based on MS docs at: https://support.microsoft.com/en-us/help/305144/how-to-use-useraccountcontrol-to-manipulate-user-account-properties
($useraccountcontrol & 0x200) && // is a NORMAL_ACCOUNT
!($useraccountcontrol & 0x02) && // *and* _not_ ACCOUNTDISABLE
!($useraccountcontrol & 0x10) // *and* _not_ LOCKOUT
) {
$user->activated = 1;
} else {
$user->activated = 0;
} */
$enabled_accounts = [
$useraccountcontrol = $results[$i]['useraccountcontrol'][0];
if(
// based on MS docs at: https://support.microsoft.com/en-us/help/305144/how-to-use-useraccountcontrol-to-manipulate-user-account-properties
($useraccountcontrol & 0x200) && // is a NORMAL_ACCOUNT
!($useraccountcontrol & 0x02) && // *and* _not_ ACCOUNTDISABLE
!($useraccountcontrol & 0x10) // *and* _not_ LOCKOUT
) {
$user->activated = 1;
} else {
$user->activated = 0;
} */
$enabled_accounts = [
'512', // 0x200 NORMAL_ACCOUNT
'544', // 0x220 NORMAL_ACCOUNT, PASSWD_NOTREQD
'66048', // 0x10200 NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD
@@ -385,44 +387,47 @@ class LdapSync extends Command
'4260352', // 0x410200 NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD, DONT_REQ_PREAUTH
'1049088', // 0x100200 NORMAL_ACCOUNT, NOT_DELEGATED
'1114624', // 0x110200 NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD, NOT_DELEGATED,
];
$user->activated = (in_array($results[$i]['useraccountcontrol'][0], $enabled_accounts)) ? 1 : 0;
];
$user->activated = (in_array($results[$i]['useraccountcontrol'][0], $enabled_accounts)) ? 1 : 0;
// If we're not using AD, and there isn't an activated flag set, activate all users
} /* implied 'else' here - leave the $user->activated flag alone. Newly-created accounts will be active.
already-existing accounts will be however the administrator has set them */
} /* implied 'else' here - leave the $user->activated flag alone. Newly-created accounts will be active.
already-existing accounts will be however the administrator has set them */
if ($item['ldap_location_override'] == true) {
$user->location_id = $item['location_id'];
} elseif ((isset($location)) && (! empty($location))) {
if ((is_array($location)) && (array_key_exists('id', $location))) {
$user->location_id = $location['id'];
} elseif (is_object($location)) {
$user->location_id = $location->id;
}
if ($item['ldap_location_override'] == true) {
$user->location_id = $item['location_id'];
} elseif ((isset($location)) && (!empty($location))) {
if ((is_array($location)) && (array_key_exists('id', $location))) {
$user->location_id = $location['id'];
} elseif (is_object($location)) {
$user->location_id = $location->id; //THIS is the magic line, this should do it.
}
$location = null;
$user->ldap_import = 1;
}
// TODO - should we be NULLING locations if $location is really `null`, and that's what we came up with?
// will that conflict with any overriding setting that the user set? Like, if they moved someone from
// the 'null' location to somewhere, we wouldn't want to try to override that, right?
$location = null;
$user->ldap_import = 1;
$errors = '';
$errors = '';
if ($user->save()) {
$item['note'] = $item['createorupdate'];
$item['status'] = 'success';
if ( $item['createorupdate'] === 'created' && $ldap_default_group) {
$user->groups()->attach($ldap_default_group);
}
} else {
foreach ($user->getErrors()->getMessages() as $key => $err) {
$errors .= $err[0];
}
$item['note'] = $errors;
$item['status'] = 'error';
if ($user->save()) {
$item['note'] = $item['createorupdate'];
$item['status'] = 'success';
if ($item['createorupdate'] === 'created' && $ldap_default_group) {
$user->groups()->attach($ldap_default_group);
}
array_push($summary, $item);
} else {
foreach ($user->getErrors()->getMessages() as $key => $err) {
$errors .= $err[0];
}
$item['note'] = $errors;
$item['status'] = 'error';
}
array_push($summary, $item);
}
if ($this->option('summary')) {

View File

@@ -6,6 +6,7 @@ use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Illuminate\Support\Facades\Log;
use Symfony\Component\Console\Helper\ProgressIndicator;
ini_set('max_execution_time', env('IMPORT_TIME_LIMIT', 600)); //600 seconds = 10 minutes
ini_set('memory_limit', env('IMPORT_MEMORY_LIMIT', '500M'));
@@ -29,6 +30,11 @@ class ObjectImportCommand extends Command
*/
protected $description = 'Import Items from CSV';
/**
* The progress indicator instance.
*/
protected ProgressIndicator $progressIndicator;
/**
* Create a new command instance.
*
@@ -39,8 +45,6 @@ class ObjectImportCommand extends Command
parent::__construct();
}
private $bar;
/**
* Execute the console command.
*
@@ -48,6 +52,8 @@ class ObjectImportCommand extends Command
*/
public function handle()
{
$this->progressIndicator = new ProgressIndicator($this->output);
$filename = $this->argument('filename');
$class = title_case($this->option('item-type'));
$classString = "App\\Importer\\{$class}Importer";
@@ -61,46 +67,25 @@ class ObjectImportCommand extends Command
// This $logFile/useFiles() bit is currently broken, so commenting it out for now
// $logFile = $this->option('logfile');
// Log::useFiles($logFile);
$this->comment('======= Importing Items from '.$filename.' =========');
$this->progressIndicator->start('======= Importing Items from '.$filename.' =========');
$importer->import();
$this->bar = null;
if (! empty($this->errors)) {
$this->comment('The following Errors were encountered.');
foreach ($this->errors as $asset => $error) {
$this->comment('Error: Item: '.$asset.' failed validation: '.json_encode($error));
}
} else {
$this->comment('All Items imported successfully!');
}
$this->comment('');
$this->progressIndicator->finish('Import finished.');
}
public function errorCallback($item, $field, $errorString)
public function errorCallback($item, $field, $error)
{
$this->errors[$item->name][$field] = $errorString;
$this->output->write("\x0D\x1B[2K");
$this->warn('Error: Item: '.$item->name.' failed validation: '.json_encode($error));
}
public function progress($count)
public function progress($importedItemsCount)
{
if (! $this->bar) {
$this->bar = $this->output->createProgressBar($count);
}
static $index = 0;
$index++;
if ($index < $count) {
$this->bar->advance();
} else {
$this->bar->finish();
}
$this->progressIndicator->advance();
}
// Tracks the current item for error messages
private $updating;
// An array of errors encountered while parsing
private $errors;
/**
* Log a message to file, configurable by the --log-file parameter.
* If a warning message is passed, we'll spit it to the console as well.

View File

@@ -553,7 +553,7 @@ class Helper
*/
public static function statusLabelList()
{
$statuslabel_list = ['' => trans('general.select_statuslabel')] + Statuslabel::orderBy('default_label', 'desc')->orderBy('name', 'asc')->orderBy('deployable', 'desc')
$statuslabel_list = ['' => trans('general.select_statuslabel')] + Statuslabel::orderBy('default_label', 'desc')->orderBy('name', 'asc')->orderBy('status_type', 'desc')
->pluck('name', 'id')->toArray();
return $statuslabel_list;
@@ -572,9 +572,9 @@ class Helper
*/
public static function deployableStatusLabelList()
{
$statuslabel_list = Statuslabel::where('deployable', '=', '1')->orderBy('default_label', 'desc')
$statuslabel_list = Statuslabel::where('status_type', 'deployable')->orderBy('default_label', 'desc')
->orderBy('name', 'asc')
->orderBy('deployable', 'desc')
->orderBy('status_type', 'desc')
->pluck('name', 'id')->toArray();
return $statuslabel_list;
@@ -1123,6 +1123,7 @@ class Helper
'png' => 'far fa-image',
'webp' => 'far fa-image',
'avif' => 'far fa-image',
'svg' => 'fas fa-vector-square',
// word
'doc' => 'far fa-file-word',
'docx' => 'far fa-file-word',
@@ -1135,7 +1136,7 @@ class Helper
//Text
'txt' => 'far fa-file-alt',
'rtf' => 'far fa-file-alt',
'xml' => 'far fa-file-alt',
'xml' => 'fas fa-code',
// Misc
'pdf' => 'far fa-file-pdf',
'lic' => 'far fa-save',
@@ -1148,41 +1149,7 @@ class Helper
return 'far fa-file';
}
public static function show_file_inline($filename)
{
$extension = substr(strrchr($filename, '.'), 1);
if ($extension) {
switch ($extension) {
case 'jpg':
case 'jpeg':
case 'gif':
case 'png':
case 'webp':
case 'avif':
return true;
break;
default:
return false;
}
}
return false;
}
/**
* Generate a random encrypted password.
*
* @author Wes Hulette <jwhulette@gmail.com>
*
* @since 5.0.0
*
* @return string
*/
public static function generateEncyrptedPassword(): string
{
return bcrypt(self::generateUnencryptedPassword());
}
/**
* Get a random unencrypted password.

View File

@@ -7,6 +7,7 @@ use Illuminate\Http\Response;
use Illuminate\Http\RedirectResponse;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
class StorageHelper
{
public static function downloader($filename, $disk = 'default') : BinaryFileResponse | RedirectResponse | StreamedResponse
@@ -25,4 +26,64 @@ class StorageHelper
return Storage::disk($disk)->download($filename);
}
}
/**
* This determines the file types that should be allowed inline and checks their fileinfo extension
* to determine that they are safe to display inline.
*
* @author <A. Gianotto> [<snipe@snipe.net]>
* @since v7.0.14
* @param $file_with_path
* @return bool
*/
public static function allowSafeInline($file_with_path) {
$allowed_inline = [
'pdf',
'svg',
'jpg',
'gif',
'svg',
'avif',
'webp',
'png',
];
// The file exists and is allowed to be displayed inline
if (Storage::exists($file_with_path) && (in_array(pathinfo($file_with_path, PATHINFO_EXTENSION), $allowed_inline))) {
return true;
}
return false;
}
/**
* Decide whether to show the file inline or download it.
*/
public static function showOrDownloadFile($file, $filename) {
$headers = [];
if (request('inline') == 'true') {
$headers = [
'Content-Disposition' => 'inline',
];
// This is NOT allowed as inline - force it to be displayed as text in the browser
if (self::allowSafeInline($file) != true) {
$headers = array_merge($headers, ['Content-Type' => 'text/plain']);
}
}
// Everything else seems okay, but the file doesn't exist on the server.
if (Storage::missing($file)) {
throw new FileNotFoundException();
}
return Storage::download($file, $filename, $headers);
}
}

View File

@@ -106,50 +106,29 @@ class AccessoriesFilesController extends Controller
* @param int $accessoryId
* @param int $fileId
*/
public function show($accessoryId = null, $fileId = null, $download = true) : View | RedirectResponse | Response | BinaryFileResponse | StreamedResponse
public function show($accessoryId = null, $fileId = null) : View | RedirectResponse | Response | BinaryFileResponse | StreamedResponse
{
Log::debug('Private filesystem is: '.config('filesystems.default'));
$accessory = Accessory::find($accessoryId);
// the accessory is valid
if (isset($accessory->id)) {
if ($accessory = Accessory::find($accessoryId)) {
$this->authorize('view', $accessory);
$this->authorize('accessories.files', $accessory);
if (! $log = Actionlog::whereNotNull('filename')->where('item_id', $accessory->id)->find($fileId)) {
return redirect()->route('accessories.index')->with('error', trans('admin/users/message.log_record_not_found'));
}
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $accessory->id)->find($fileId)) {
$file = 'private_uploads/accessories/'.$log->filename;
$file = 'private_uploads/accessories/'.$log->filename;
if (Storage::missing($file)) {
Log::debug('FILE DOES NOT EXISTS for '.$file);
Log::debug('URL should be '.Storage::url($file));
return response('File '.$file.' ('.Storage::url($file).') not found on server', 404)
->header('Content-Type', 'text/plain');
} else {
// Display the file inline
if (request('inline') == 'true') {
$headers = [
'Content-Disposition' => 'inline',
];
return Storage::download($file, $log->filename, $headers);
}
// We have to override the URL stuff here, since local defaults in Laravel's Flysystem
// won't work, as they're not accessible via the web
if (config('filesystems.default') == 'local') { // TODO - is there any way to fix this at the StorageHelper layer?
return StorageHelper::downloader($file);
try {
return StorageHelper::showOrDownloadFile($file, $log->filename);
} catch (\Exception $e) {
return redirect()->route('accessories.show', ['accessory' => $accessory])->with('error', trans('general.file_not_found'));
}
}
return redirect()->route('accessories.show', ['accessory' => $accessory])->with('error', trans('general.log_record_not_found'));
}
return redirect()->route('accessories.index')->with('error', trans('general.file_does_not_exist', ['id' => $fileId]));
return redirect()->route('accessories.index')->with('error', trans('general.file_not_found'));
}
}

View File

@@ -137,7 +137,6 @@ class AccessoriesController extends Controller
*/
public function store(StoreAccessoryRequest $request)
{
$this->authorize('create', Accessory::class);
$accessory = new Accessory;
$accessory->fill($request->all());
$accessory = $request->handleImages($accessory);
@@ -197,9 +196,6 @@ class AccessoriesController extends Controller
$this->authorize('view', Accessory::class);
$accessory = Accessory::with('lastCheckout')->findOrFail($id);
if (! Company::isCurrentUserHasAccess($accessory)) {
return ['total' => 0, 'rows' => []];
}
$offset = request('offset', 0);
$limit = request('limit', 50);
@@ -325,7 +321,7 @@ class AccessoriesController extends Controller
$accessory = Accessory::find($accessory_checkout->accessory_id);
$this->authorize('checkin', $accessory);
$logaction = $accessory->logCheckin(User::find($accessory_checkout->assigned_to), $request->input('note'));
$accessory->logCheckin(User::find($accessory_checkout->assigned_to), $request->input('note'));
// Was the accessory updated?
if ($accessory_checkout->delete()) {
@@ -333,14 +329,6 @@ class AccessoriesController extends Controller
$user = User::find($accessory_checkout->assigned_to);
}
$data['log_id'] = $logaction->id;
$data['first_name'] = $user->first_name;
$data['last_name'] = $user->last_name;
$data['item_name'] = $accessory->name;
$data['checkin_date'] = $logaction->created_at;
$data['item_tag'] = '';
$data['note'] = $logaction->note;
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/accessories/message.checkin.success')));
}

View File

@@ -61,7 +61,7 @@ class AssetsController extends Controller
if ($action == 'audit') {
$action = 'audits';
}
$filter_non_deprecable_assets = false;
$filter_non_depreciable_assets = false;
/**
* This looks MAD janky (and it is), but the AssetsController@index does a LOT of heavy lifting throughout the
@@ -75,7 +75,7 @@ class AssetsController extends Controller
* which would have been far worse of a mess. *sad face* - snipe (Sept 1, 2021)
*/
if (Route::currentRouteName()=='api.depreciation-report.index') {
$filter_non_deprecable_assets = true;
$filter_non_depreciable_assets = true;
$transformer = 'App\Http\Transformers\DepreciationReportTransformer';
$this->authorize('reports.view');
} else {
@@ -130,9 +130,9 @@ class AssetsController extends Controller
'model.category', 'model.manufacturer', 'model.fieldset','supplier'); //it might be tempting to add 'assetlog' here, but don't. It blows up update-heavy users.
if ($filter_non_deprecable_assets) {
$non_deprecable_models = AssetModel::select('id')->whereNotNull('depreciation_id')->get();
$assets->InModelList($non_deprecable_models->toArray());
if ($filter_non_depreciable_assets) {
$non_depreciable_models = AssetModel::select('id')->whereNotNull('depreciation_id')->get();
$assets->InModelList($non_depreciable_models->toArray());
}
@@ -206,18 +206,14 @@ class AssetsController extends Controller
case 'Pending':
$assets->join('status_labels AS status_alias', function ($join) {
$join->on('status_alias.id', '=', 'assets.status_id')
->where('status_alias.deployable', '=', 0)
->where('status_alias.pending', '=', 1)
->where('status_alias.archived', '=', 0);
->where('status_alias.status_type', '=', 'pending');
});
break;
case 'RTD':
$assets->whereNull('assets.assigned_to')
->join('status_labels AS status_alias', function ($join) {
$join->on('status_alias.id', '=', 'assets.status_id')
->where('status_alias.deployable', '=', 1)
->where('status_alias.pending', '=', 0)
->where('status_alias.archived', '=', 0);
->where('status_alias.status_type', '=', 'deployable');
});
break;
case 'Undeployable':
@@ -226,20 +222,15 @@ class AssetsController extends Controller
case 'Archived':
$assets->join('status_labels AS status_alias', function ($join) {
$join->on('status_alias.id', '=', 'assets.status_id')
->where('status_alias.deployable', '=', 0)
->where('status_alias.pending', '=', 0)
->where('status_alias.archived', '=', 1);
->where('status_alias.status_type', '=', 'archived');
});
break;
case 'Requestable':
$assets->where('assets.requestable', '=', 1)
->join('status_labels AS status_alias', function ($join) {
$join->on('status_alias.id', '=', 'assets.status_id')
->where('status_alias.deployable', '=', 1)
->where('status_alias.pending', '=', 0)
->where('status_alias.archived', '=', 0);
->where('status_alias.status_type', '=', 'deployable');
});
break;
case 'Deployed':
// more sad, horrible workarounds for laravel bugs when doing full text searches
@@ -256,7 +247,7 @@ class AssetsController extends Controller
// terrible workaround for complex-query Laravel bug in fulltext
$assets->join('status_labels AS status_alias', function ($join) {
$join->on('status_alias.id', '=', 'assets.status_id')
->where('status_alias.archived', '=', 0);
->where('status_alias.status_type', '!=', 'archived');
});
// If there is a status ID, don't take show_archived_in_list into consideration
@@ -265,6 +256,7 @@ class AssetsController extends Controller
$join->on('status_alias.id', '=', 'assets.status_id');
});
}
break;
}
@@ -395,7 +387,7 @@ class AssetsController extends Controller
// This may not work for all databases, but it works for MySQL
if ($numeric_sort) {
$assets->orderByRaw($sort_override . ' * 1 ' . $order);
$assets->orderByRaw(DB::getTablePrefix() . 'assets.' . $sort_override . ' * 1 ' . $order);
} else {
$assets->orderBy($sort_override, $order);
}
@@ -574,8 +566,8 @@ class AssetsController extends Controller
}
if ($asset->assetstatus->getStatuslabelType() == 'pending') {
$asset->use_text .= '('.$asset->assetstatus->getStatuslabelType().')';
if ($asset->assetstatus->status_label == 'pending') {
$asset->use_text .= '('.$asset->assetstatus->status_label.')';
}
$asset->use_image = ($asset->getImageUrl()) ? $asset->getImageUrl() : null;

View File

@@ -38,6 +38,7 @@ class ComponentsController extends Controller
'name',
'min_amt',
'order_number',
'model_number',
'serial',
'purchase_date',
'purchase_cost',
@@ -47,7 +48,7 @@ class ComponentsController extends Controller
];
$components = Component::select('components.*')
->with('company', 'location', 'category', 'assets', 'supplier', 'adminuser');
->with('company', 'location', 'category', 'assets', 'supplier', 'adminuser', 'manufacturer');
if ($request->filled('search')) {
$components = $components->TextSearch($request->input('search'));
@@ -69,6 +70,14 @@ class ComponentsController extends Controller
$components->where('supplier_id', '=', $request->input('supplier_id'));
}
if ($request->filled('manufacturer_id')) {
$components->where('manufacturer_id', '=', $request->input('manufacturer_id'));
}
if ($request->filled('model_number')) {
$components->where('model_number', '=', $request->input('model_number'));
}
if ($request->filled('location_id')) {
$components->where('location_id', '=', $request->input('location_id'));
}
@@ -98,6 +107,9 @@ class ComponentsController extends Controller
case 'supplier':
$components = $components->OrderSupplier($order);
break;
case 'manufacturer':
$components = $components->OrderManufacturer($order);
break;
case 'created_by':
$components = $components->OrderByCreatedBy($order);
break;

View File

@@ -258,6 +258,8 @@ class ConsumablesController extends Controller
$this->authorize('checkout', $consumable);
$consumable->checkout_qty = $request->input('checkout_qty', 1);
// Make sure there is at least one available to checkout
if ($consumable->numRemaining() <= 0) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/consumables/message.checkout.unavailable')));
@@ -268,6 +270,12 @@ class ConsumablesController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.invalid_item_category_single', ['type' => trans('general.consumable')])));
}
// Make sure there is at least one available to checkout
if ($consumable->numRemaining() <= 0 || $consumable->checkout_qty > $consumable->numRemaining()) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/consumables/message.checkout.unavailable', ['requested' => $consumable->checkout_qty, 'remaining' => $consumable->numRemaining() ])));
}
// Check if the user exists - @TODO: this should probably be handled via validation, not here??
if (!$user = User::find($request->input('assigned_to'))) {
@@ -278,7 +286,8 @@ class ConsumablesController extends Controller
// Update the consumable data
$consumable->assigned_to = $request->input('assigned_to');
$consumable->users()->attach($consumable->id,
for ($i = 0; $i < $consumable->checkout_qty; $i++) {
$consumable->users()->attach($consumable->id,
[
'consumable_id' => $consumable->id,
'created_by' => $user->id,
@@ -286,6 +295,8 @@ class ConsumablesController extends Controller
'note' => $request->input('note'),
]
);
}
event(new CheckoutableCheckedOut($consumable, $user, auth()->user(), $request->input('note')));

View File

@@ -60,7 +60,8 @@ class ManufacturersController extends Controller
->withCount('assets as assets_count')
->withCount('licenses as licenses_count')
->withCount('consumables as consumables_count')
->withCount('accessories as accessories_count');
->withCount('accessories as accessories_count')
->withCount('components as components_count');
if ($request->input('deleted') == 'true') {
$manufacturers->onlyTrashed();

View File

@@ -32,7 +32,8 @@ class StatuslabelsController extends Controller
'assets_count',
'color',
'notes',
'default_label'
'default_label',
'status_type',
];
$statuslabels = Statuslabel::with('adminuser')->withCount('assets as assets_count');
@@ -49,13 +50,12 @@ class StatuslabelsController extends Controller
// if a status_type is passed, filter by that
if ($request->filled('status_type')) {
if (strtolower($request->input('status_type')) == 'pending') {
$statuslabels = $statuslabels->Pending();
} elseif (strtolower($request->input('status_type')) == 'archived') {
$statuslabels = $statuslabels->Archived();
} elseif (strtolower($request->input('status_type')) == 'deployable') {
$statuslabels = $statuslabels->Deployable();
$statuslabels->where('status_type', '=', 'pending');
} elseif (strtolower($request->input('status_type')) == 'archived') $statuslabels->where('status_type', '=', 'archived');
elseif (strtolower($request->input('status_type')) == 'deployable') {
$statuslabels->where('status_type', '=', 'deployable');
} elseif (strtolower($request->input('status_type')) == 'undeployable') {
$statuslabels = $statuslabels->Undeployable();
$statuslabels->whereNot('status_type', 'deployable');
}
}
@@ -92,19 +92,11 @@ class StatuslabelsController extends Controller
public function store(Request $request) : JsonResponse
{
$this->authorize('create', Statuslabel::class);
$request->except('deployable', 'pending', 'archived');
if (! $request->filled('type')) {
return response()->json(Helper::formatStandardApiResponse('error', null, ['type' => ['Status label type is required.']]), 500);
}
$statuslabel = new Statuslabel;
$statuslabel->fill($request->all());
$statusType = Statuslabel::getStatuslabelTypesForDB($request->input('type'));
$statuslabel->deployable = $statusType['deployable'];
$statuslabel->pending = $statusType['pending'];
$statuslabel->archived = $statusType['archived'];
$statuslabel->status_type = $request->input('status_type');
$statuslabel->color = $request->input('color');
$statuslabel->show_in_nav = $request->input('show_in_nav', 0);
$statuslabel->default_label = $request->input('default_label', 0);
@@ -145,20 +137,12 @@ class StatuslabelsController extends Controller
{
$this->authorize('update', Statuslabel::class);
$statuslabel = Statuslabel::findOrFail($id);
$request->except('deployable', 'pending', 'archived');
if (! $request->filled('type')) {
return response()->json(Helper::formatStandardApiResponse('error', null, 'Status label type is required.'));
}
$statuslabel->fill($request->all());
$statusType = Statuslabel::getStatuslabelTypesForDB($request->input('type'));
$statuslabel->deployable = $statusType['deployable'];
$statuslabel->pending = $statusType['pending'];
$statuslabel->archived = $statusType['archived'];
$statuslabel->status_type = $request->input('status_type');
$statuslabel->color = $request->input('color');
$statuslabel->show_in_nav = $request->input('show_in_nav', 0);
$statuslabel->default_label = $request->input('default_label', 0);
@@ -206,7 +190,7 @@ class StatuslabelsController extends Controller
$this->authorize('view', Statuslabel::class);
if (Setting::getSettings()->show_archived_in_list == 0 ) {
$statuslabels = Statuslabel::withCount('assets')->where('archived','0')->get();
$statuslabels = Statuslabel::withCount('assets')->whereNot('status_type','archived')->get();
} else {
$statuslabels = Statuslabel::withCount('assets')->get();
}
@@ -300,7 +284,7 @@ class StatuslabelsController extends Controller
public function checkIfDeployable($id) : string
{
$statuslabel = Statuslabel::findOrFail($id);
if ($statuslabel->getStatuslabelType() == 'deployable') {
if ($statuslabel->status_type == 'deployable') {
return '1';
}
@@ -318,22 +302,22 @@ class StatuslabelsController extends Controller
{
$this->authorize('view.selectlists');
$statuslabels = Statuslabel::orderBy('default_label', 'desc')->orderBy('name', 'asc')->orderBy('deployable', 'desc');
$statuslabels = Statuslabel::orderBy('default_label', 'desc')->orderBy('name', 'asc')->orderBy('status_type', 'desc');
if ($request->filled('search')) {
$statuslabels = $statuslabels->where('name', 'LIKE', '%'.$request->get('search').'%');
}
if ($request->filled('deployable')) {
$statuslabels = $statuslabels->where('deployable', '=', '1');
$statuslabels = $statuslabels->where('status_type', '=', 'deployable');
}
if ($request->filled('pending')) {
$statuslabels = $statuslabels->where('pending', '=', '1');
$statuslabels = $statuslabels->where('status_type', '=', 'pending');
}
if ($request->filled('archived')) {
$statuslabels = $statuslabels->where('archived', '=', '1');
$statuslabels = $statuslabels->where('status_type', '=', 'archived');
}
$statuslabels = $statuslabels->orderBy('name', 'ASC')->paginate(50);

View File

@@ -14,6 +14,7 @@ use App\Http\Transformers\UsersTransformer;
use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\Accessory;
use App\Models\Company;
use App\Models\Consumable;
use App\Models\License;
use App\Models\User;
@@ -42,13 +43,14 @@ class UsersController extends Controller
$users = User::select([
'users.activated',
'users.created_by',
'users.address',
'users.avatar',
'users.city',
'users.company_id',
'users.country',
'users.created_by',
'users.created_at',
'users.updated_at',
'users.deleted_at',
'users.department_id',
'users.email',
@@ -67,7 +69,6 @@ class UsersController extends Controller
'users.state',
'users.two_factor_enrolled',
'users.two_factor_optin',
'users.updated_at',
'users.username',
'users.zip',
'users.remote',
@@ -255,6 +256,7 @@ class UsersController extends Controller
'groups',
'activated',
'created_at',
'updated_at',
'two_factor_enrolled',
'two_factor_optin',
'last_login',
@@ -370,6 +372,7 @@ class UsersController extends Controller
$user = new User;
$user->fill($request->all());
$user->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$user->created_by = auth()->id();
if ($request->has('permissions')) {
@@ -451,6 +454,10 @@ class UsersController extends Controller
$user->fill($request->all());
if ($request->filled('company_id')) {
$user->company_id = Company::getIdForCurrentUser($request->input('company_id'));
}
if ($user->id == $request->input('manager_id')) {
return response()->json(Helper::formatStandardApiResponse('error', null, 'You cannot be your own manager'));
}

View File

@@ -61,43 +61,30 @@ class AssetFilesController extends Controller
*/
public function show($assetId = null, $fileId = null) : View | RedirectResponse | Response | StreamedResponse | BinaryFileResponse
{
$asset = Asset::find($assetId);
// the asset is valid
if (isset($asset->id)) {
if ($asset = Asset::find($assetId)) {
$this->authorize('view', $asset);
if (! $log = Actionlog::whereNotNull('filename')->where('item_id', $asset->id)->find($fileId)) {
return response('No matching record for that asset/file', 500)
->header('Content-Type', 'text/plain');
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $asset->id)->find($fileId)) {
$file = 'private_uploads/assets/'.$log->filename;
if ($log->action_type == 'audit') {
$file = 'private_uploads/audits/'.$log->filename;
}
try {
return StorageHelper::showOrDownloadFile($file, $log->filename);
} catch (\Exception $e) {
return redirect()->route('hardware.show', ['hardware' => $asset])->with('error', trans('general.file_not_found'));
}
}
$file = 'private_uploads/assets/'.$log->filename;
if ($log->action_type == 'audit') {
$file = 'private_uploads/audits/'.$log->filename;
}
if (! Storage::exists($file)) {
return response('File '.$file.' not found on server', 404)
->header('Content-Type', 'text/plain');
}
if (request('inline') == 'true') {
$headers = [
'Content-Disposition' => 'inline',
];
return Storage::download($file, $log->filename, $headers);
}
return StorageHelper::downloader($file);
return redirect()->route('hardware.show', ['hardware' => $asset])->with('error', trans('general.log_record_not_found'));
}
// Prepare the error message
$error = trans('admin/hardware/message.does_not_exist', ['id' => $fileId]);
// Redirect to the hardware management page
return redirect()->route('hardware.index')->with('error', $error);
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
}
/**

View File

@@ -17,7 +17,6 @@ use App\Models\Location;
use App\Models\Setting;
use App\Models\Statuslabel;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
use App\View\Label;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
@@ -112,8 +111,10 @@ class AssetsController extends Controller
$settings = Setting::getSettings();
$success = false;
$successes = [];
$failures = [];
$serials = $request->input('serials');
$asset = null;
for ($a = 1; $a <= count($asset_tags); $a++) {
$asset = new Asset();
@@ -200,20 +201,35 @@ class AssetsController extends Controller
$asset->checkOut($target, auth()->user(), date('Y-m-d H:i:s'), $request->input('expected_checkin', null), 'Checked out on asset creation', $request->get('name'), $location);
}
$success = true;
$successes[] = "<a href='" . route('hardware.show', ['hardware' => $asset->id]) . "' style='color: white;'>" . e($asset->asset_tag) . "</a>";
} else {
$failures[] = join(",", $asset->getErrors()->all());
}
}
session()->put(['redirect_option' => $request->get('redirect_option'), 'checkout_to_type' => $request->get('checkout_to_type')]);
if ($success) {
if ($successes) {
if ($failures) {
//some succeeded, some failed
return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets')) //FIXME - not tested
->with('success-unescaped', trans_choice('admin/hardware/message.create.multi_success_linked', $successes, ['links' => join(", ", $successes)]))
->with('warning', trans_choice('admin/hardware/message.create.partial_failure', $failures, ['failures' => join("; ", $failures)]));
} else {
if (count($successes) == 1) {
//the most common case, keeping it so we don't have to make every use of that translation string be trans_choice'ed
//and re-translated
return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets'))
->with('success-unescaped', trans('admin/hardware/message.create.success_linked', ['link' => route('hardware.show', ['hardware' => $asset->id]), 'id', 'tag' => e($asset->asset_tag)]));
} else {
//multi-success
return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets'))
->with('success-unescaped', trans_choice('admin/hardware/message.create.multi_success_linked', $successes, ['links' => join(", ", $successes)]));
}
}
return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets'))
->with('success-unescaped', trans('admin/hardware/message.create.success_linked', ['link' => route('hardware.show', ['hardware' => $asset->id]), 'id', 'tag' => e($asset->asset_tag)]));
}
return redirect()->back()->withInput()->withErrors($asset->getErrors());
@@ -336,7 +352,7 @@ class AssetsController extends Controller
$status = Statuslabel::find($request->input('status_id'));
// This is a non-deployable status label - we should check the asset back in.
if (($status && $status->getStatuslabelType() != 'deployable') && ($target = $asset->assignedTo)) {
if (($status && $status->status_type != 'deployable') && ($target = $asset->assignedTo)) {
$originalValues = $asset->getRawOriginal();
$asset->assigned_to = null;

View File

@@ -52,6 +52,10 @@ class BulkAssetsController extends Controller
}
$asset_ids = $request->input('ids');
if ($request->input('bulk_actions') === 'checkout') {
$request->session()->flashInput(['selected_assets' => $asset_ids]);
return redirect()->route('hardware.bulkcheckout.show');
}
// Figure out where we need to send the user after the update is complete, and store that in the session
$bulk_back_url = request()->headers->get('referer');
@@ -571,31 +575,34 @@ class BulkAssetsController extends Controller
}
$errors = [];
DB::transaction(function () use ($target, $admin, $checkout_at, $expected_checkin, $errors, $asset_ids, $request) {
DB::transaction(function () use ($target, $admin, $checkout_at, $expected_checkin, &$errors, $asset_ids, $request) { //NOTE: $errors is passsed by reference!
foreach ($asset_ids as $asset_id) {
$asset = Asset::findOrFail($asset_id);
$this->authorize('checkout', $asset);
$error = $asset->checkOut($target, $admin, $checkout_at, $expected_checkin, e($request->get('note')), $asset->name, null);
$checkout_success = $asset->checkOut($target, $admin, $checkout_at, $expected_checkin, e($request->get('note')), $asset->name, null);
//TODO - I think this logic is duplicated in the checkOut method?
if ($target->location_id != '') {
$asset->location_id = $target->location_id;
$asset->unsetEventDispatcher();
$asset->save();
// TODO - I don't know why this is being saved without events
$asset::withoutEvents(function () use ($asset) {
$asset->save();
});
}
if ($error) {
array_merge_recursive($errors, $asset->getErrors()->toArray());
if (!$checkout_success) {
$errors = array_merge_recursive($errors, $asset->getErrors()->toArray());
}
}
});
if (! $errors) {
// Redirect to the new asset page
return redirect()->to('hardware')->with('success', trans('admin/hardware/message.checkout.success'));
return redirect()->to('hardware')->with('success', trans_choice('admin/hardware/message.multi-checkout.success', $asset_ids));
}
// Redirect to the asset management page with error
return redirect()->route('hardware.bulkcheckout.show')->with('error', trans('admin/hardware/message.checkout.error'))->withErrors($errors);
return redirect()->route('hardware.bulkcheckout.show')->withInput()->with('error', trans_choice('admin/hardware/message.multi-checkout.error', $asset_ids))->withErrors($errors);
} catch (ModelNotFoundException $e) {
return redirect()->route('hardware.bulkcheckout.show')->with('error', $e->getErrors());
}

View File

@@ -73,6 +73,8 @@ class ComponentsController extends Controller
$component->name = $request->input('name');
$component->category_id = $request->input('category_id');
$component->supplier_id = $request->input('supplier_id');
$component->manufacturer_id = $request->input('manufacturer_id');
$component->model_number = $request->input('model_number');
$component->location_id = $request->input('location_id');
$component->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$component->order_number = $request->input('order_number', null);
@@ -150,6 +152,8 @@ class ComponentsController extends Controller
$component->name = $request->input('name');
$component->category_id = $request->input('category_id');
$component->supplier_id = $request->input('supplier_id');
$component->manufacturer_id = $request->input('manufacturer_id');
$component->model_number = $request->input('model_number');
$component->location_id = $request->input('location_id');
$component->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$component->order_number = $request->input('order_number');

View File

@@ -112,40 +112,25 @@ class ComponentsFilesController extends Controller
public function show($componentId = null, $fileId = null)
{
Log::debug('Private filesystem is: '.config('filesystems.default'));
$component = Component::find($componentId);
// the component is valid
if (isset($component->id)) {
if ($component = Component::find($componentId)) {
$this->authorize('view', $component);
$this->authorize('components.files', $component);
if (! $log = Actionlog::whereNotNull('filename')->where('item_id', $component->id)->find($fileId)) {
return response('No matching record for that asset/file', 500)
->header('Content-Type', 'text/plain');
}
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $component->id)->find($fileId)) {
$file = 'private_uploads/components/'.$log->filename;
$file = 'private_uploads/components/'.$log->filename;
if (Storage::missing($file)) {
Log::debug('FILE DOES NOT EXISTS for '.$file);
Log::debug('URL should be '.Storage::url($file));
return response('File '.$file.' ('.Storage::url($file).') not found on server', 404)
->header('Content-Type', 'text/plain');
} else {
// Display the file inline
if (request('inline') == 'true') {
$headers = [
'Content-Disposition' => 'inline',
];
return Storage::download($file, $log->filename, $headers);
try {
return StorageHelper::showOrDownloadFile($file, $log->filename);
} catch (\Exception $e) {
return redirect()->route('components.show', ['component' => $component])->with('error', trans('general.file_not_found'));
}
if (config('filesystems.default') == 'local') { // TODO - is there any way to fix this at the StorageHelper layer?
return StorageHelper::downloader($file);
}
}
return redirect()->route('components.show', ['component' => $component])->with('error', trans('general.log_record_not_found'));
}
return redirect()->route('components.index')->with('error', trans('general.file_does_not_exist', ['id' => $fileId]));

View File

@@ -70,7 +70,7 @@ class ConsumableCheckoutController extends Controller
$this->authorize('checkout', $consumable);
// If the quantity is not present in the request or is not a positive integer, set it to 1
$quantity = $request->input('qty');
$quantity = $request->input('checkout_qty');
if (!isset($quantity) || !ctype_digit((string)$quantity) || $quantity <= 0) {
$quantity = 1;
}
@@ -92,7 +92,7 @@ class ConsumableCheckoutController extends Controller
// Update the consumable data
$consumable->assigned_to = e($request->input('assigned_to'));
for($i = 0; $i < $quantity; $i++){
for ($i = 0; $i < $quantity; $i++){
$consumable->users()->attach($consumable->id, [
'consumable_id' => $consumable->id,
'created_by' => $admin_user->id,
@@ -100,6 +100,8 @@ class ConsumableCheckoutController extends Controller
'note' => $request->input('note'),
]);
}
$consumable->checkout_qty = $quantity;
event(new CheckoutableCheckedOut($consumable, $user, auth()->user(), $request->input('note')));
$request->request->add(['checkout_to_type' => 'user']);

View File

@@ -104,7 +104,6 @@ class ConsumablesFilesController extends Controller
* @since [v1.4]
* @param int $consumableId
* @param int $fileId
* @return \Symfony\Consumable\HttpFoundation\Response
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($consumableId = null, $fileId = null)
@@ -116,36 +115,18 @@ class ConsumablesFilesController extends Controller
$this->authorize('view', $consumable);
$this->authorize('consumables.files', $consumable);
if (! $log = Actionlog::whereNotNull('filename')->where('item_id', $consumable->id)->find($fileId)) {
return response('No matching record for that asset/file', 500)
->header('Content-Type', 'text/plain');
}
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $consumable->id)->find($fileId)) {
$file = 'private_uploads/consumables/'.$log->filename;
$file = 'private_uploads/consumables/'.$log->filename;
if (Storage::missing($file)) {
Log::debug('FILE DOES NOT EXISTS for '.$file);
Log::debug('URL should be '.Storage::url($file));
return response('File '.$file.' ('.Storage::url($file).') not found on server', 404)
->header('Content-Type', 'text/plain');
} else {
// Display the file inline
if (request('inline') == 'true') {
$headers = [
'Content-Disposition' => 'inline',
];
return Storage::download($file, $log->filename, $headers);
}
// We have to override the URL stuff here, since local defaults in Laravel's Flysystem
// won't work, as they're not accessible via the web
if (config('filesystems.default') == 'local') { // TODO - is there any way to fix this at the StorageHelper layer?
return StorageHelper::downloader($file);
try {
return StorageHelper::showOrDownloadFile($file, $log->filename);
} catch (\Exception $e) {
return redirect()->route('consumables.show', ['consumable' => $consumable])->with('error', trans('general.file_not_found'));
}
}
// The log record doesn't exist somehow
return redirect()->route('consumables.show', ['consumable' => $consumable])->with('error', trans('general.log_record_not_found'));
}
return redirect()->route('consumables.index')->with('error', trans('general.file_does_not_exist', ['id' => $fileId]));

View File

@@ -3,6 +3,7 @@
namespace App\Http\Controllers;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Support\Facades\DB;
/**
* This controller provide the health route for
@@ -15,13 +16,35 @@ use Illuminate\Routing\Controller as BaseController;
*/
class HealthController extends BaseController
{
public function __construct()
{
$this->middleware('health');
}
/**
* Returns a fixed JSON content ({ "status": "ok"}) which indicate the app is up and running
*/
public function get()
{
return response()->json([
'status' => 'ok',
]);
try {
if (DB::select('select 2 + 2')) {
return response()->json([
'status' => 'ok',
]);
}
} catch (\Exception $e) {
\Log::error('Could not connect to database');
return response()->json([
'status' => 'database connection failed',
], 500);
}
}
}

View File

@@ -112,37 +112,19 @@ class LicenseFilesController extends Controller
$this->authorize('view', $license);
$this->authorize('licenses.files', $license);
if (! $log = Actionlog::whereNotNull('filename')->where('item_id', $license->id)->find($fileId)) {
return response('No matching record for that asset/file', 500)
->header('Content-Type', 'text/plain');
}
$file = 'private_uploads/licenses/'.$log->filename;
if (Storage::missing($file)) {
Log::debug('NOT EXISTS for '.$file);
Log::debug('NOT EXISTS URL should be '.Storage::url($file));
return response('File '.$file.' ('.Storage::url($file).') not found on server', 404)
->header('Content-Type', 'text/plain');
} else {
if (request('inline') == 'true') {
$headers = [
'Content-Disposition' => 'inline',
];
return Storage::download($file, $log->filename, $headers);
}
// We have to override the URL stuff here, since local defaults in Laravel's Flysystem
// won't work, as they're not accessible via the web
if (config('filesystems.default') == 'local') { // TODO - is there any way to fix this at the StorageHelper layer?
return StorageHelper::downloader($file);
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $license->id)->find($fileId)) {
$file = 'private_uploads/licenses/'.$log->filename;
try {
return StorageHelper::showOrDownloadFile($file, $log->filename);
} catch (\Exception $e) {
return redirect()->route('licenses.show', ['licenses' => $license])->with('error', trans('general.file_not_found'));
}
}
// The log record doesn't exist somehow
return redirect()->route('licenses.show', ['licenses' => $license])->with('error', trans('general.log_record_not_found'));
}
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.does_not_exist', ['id' => $fileId]));

View File

@@ -40,7 +40,7 @@ class ModalController extends Controller
$view = view("modals.${type}");
if ($type == "statuslabel") {
$view->with('statuslabel_types', Helper::statusTypeList());
$view->with('status_types', Helper::statusTypeList());
}
if (in_array($type, ['kit-model', 'kit-license', 'kit-consumable', 'kit-accessory'])) {
$view->with('kitId', $itemId);

View File

@@ -194,14 +194,14 @@ class ProfileController extends Controller
*/
public function printInventory() : View
{
$show_user = auth()->user();
$show_users = User::where('id',auth()->user()->id)->get();
return view('users/print')
->with('assets', auth()->user()->assets)
->with('licenses', $show_user->licenses()->get())
->with('accessories', $show_user->accessories()->get())
->with('consumables', $show_user->consumables()->get())
->with('show_user', $show_user)
->with('assets', auth()->user()->assets())
->with('licenses', auth()->user()->licenses()->get())
->with('accessories', auth()->user()->accessories()->get())
->with('consumables', auth()->user()->consumables()->get())
->with('users', $show_users)
->with('settings', Setting::getSettings());
}
@@ -222,7 +222,12 @@ class ProfileController extends Controller
return redirect()->back()->with('error', trans('admin/users/message.user_has_no_email'));
}
$user->notify((new CurrentInventory($user)));
try {
$user->notify((new CurrentInventory($user)));
} catch (\Exception $e) {
\Log::error($e);
}
return redirect()->back()->with('success', trans('admin/users/general.user_notified'));
}
}

View File

@@ -7,6 +7,11 @@ use App\Helpers\StorageHelper;
use App\Http\Requests\ImageUploadRequest;
use App\Http\Requests\SettingsSamlRequest;
use App\Http\Requests\SetupUserRequest;
use App\Http\Requests\StoreLdapSettings;
use App\Http\Requests\StoreLocalizationSettings;
use App\Http\Requests\StoreNotificationSettings;
use App\Http\Requests\StoreLabelSettings;
use App\Http\Requests\StoreSecuritySettings;
use App\Models\CustomField;
use App\Models\Group;
use App\Models\Setting;
@@ -273,20 +278,6 @@ class SettingsController extends Controller
return view('settings/index', compact('settings'));
}
/**
* Return the admin settings page.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v1.0]
*/
public function getEdit() : View
{
$setting = Setting::getSettings();
return view('settings/general', compact('setting'));
}
/**
* Return a form to allow a super admin to update settings.
@@ -486,7 +477,7 @@ class SettingsController extends Controller
*
* @since [v1.0]
*/
public function postSecurity(Request $request) : RedirectResponse
public function postSecurity(StoreSecuritySettings $request) : RedirectResponse
{
$this->validate($request, [
'pwd_secure_complexity' => 'array',
@@ -556,7 +547,7 @@ class SettingsController extends Controller
*
* @since [v1.0]
*/
public function postLocalization(Request $request) : RedirectResponse
public function postLocalization(StoreLocalizationSettings $request) : RedirectResponse
{
if (is_null($setting = Setting::getSettings())) {
return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error'));
@@ -599,7 +590,7 @@ class SettingsController extends Controller
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.0]
*/
public function postAlerts(Request $request) : RedirectResponse
public function postAlerts(StoreNotificationSettings $request) : RedirectResponse
{
if (is_null($setting = Setting::getSettings())) {
return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error'));
@@ -780,7 +771,7 @@ class SettingsController extends Controller
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
public function postLabels(Request $request) : RedirectResponse
public function postLabels(StoreLabelSettings $request) : RedirectResponse
{
if (is_null($setting = Setting::getSettings())) {
return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error'));
@@ -859,26 +850,7 @@ class SettingsController extends Controller
{
$setting = Setting::getSettings();
$groups = Group::pluck('name', 'id');
/**
* This validator is only temporary (famous last words.) - @snipe
*/
$messages = [
'ldap_username_field.not_in' => '<code>sAMAccountName</code> (mixed case) will likely not work. You should use <code>samaccountname</code> (lowercase) instead. ',
'ldap_auth_filter_query.not_in' => '<code>uid=samaccountname</code> is probably not a valid auth filter. You probably want <code>uid=</code> ',
'ldap_filter.regex' => 'This value should probably not be wrapped in parentheses.',
];
$validator = Validator::make($setting->toArray(), [
'ldap_username_field' => 'not_in:sAMAccountName',
'ldap_auth_filter_query' => 'not_in:uid=samaccountname|required_if:ldap_enabled,1',
'ldap_filter' => 'nullable|regex:"^[^(]"|required_if:ldap_enabled,1',
], $messages);
return view('settings.ldap', compact('setting', 'groups'))->withErrors($validator);
return view('settings.ldap', compact('setting', 'groups'));
}
/**
@@ -887,7 +859,7 @@ class SettingsController extends Controller
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
public function postLdapSettings(Request $request) : RedirectResponse
public function postLdapSettings(StoreLdapSettings $request) : RedirectResponse
{
if (is_null($setting = Setting::getSettings())) {
return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error'));

View File

@@ -47,7 +47,7 @@ class StatuslabelsController extends Controller
return view('statuslabels/edit')
->with('item', new Statuslabel)
->with('statuslabel_types', Helper::statusTypeList());
->with('status_types', Helper::statusTypeList());
}
/**
@@ -61,19 +61,11 @@ class StatuslabelsController extends Controller
// create a new model instance
$statusLabel = new Statuslabel();
if ($request->missing('statuslabel_types')) {
return redirect()->back()->withInput()->withErrors(['statuslabel_types' => trans('validation.statuslabel_type')]);
}
$statusType = Statuslabel::getStatuslabelTypesForDB($request->input('statuslabel_types'));
// Save the Statuslabel data
$statusLabel->name = $request->input('name');
$statusLabel->created_by = auth()->id();
$statusLabel->notes = $request->input('notes');
$statusLabel->deployable = $statusType['deployable'];
$statusLabel->pending = $statusType['pending'];
$statusLabel->archived = $statusType['archived'];
$statusLabel->status_type = $request->input('status_type');
$statusLabel->color = $request->input('color');
$statusLabel->show_in_nav = $request->input('show_in_nav', 0);
$statusLabel->default_label = $request->input('default_label', 0);
@@ -100,11 +92,7 @@ class StatuslabelsController extends Controller
return redirect()->route('statuslabels.index')->with('error', trans('admin/statuslabels/message.does_not_exist'));
}
$use_statuslabel_type = $item->getStatuslabelType();
$statuslabel_types = ['' => trans('admin/hardware/form.select_statustype')] + ['undeployable' => trans('admin/hardware/general.undeployable')] + ['pending' => trans('admin/hardware/general.pending')] + ['archived' => trans('admin/hardware/general.archived')] + ['deployable' => trans('admin/hardware/general.deployable')];
return view('statuslabels/edit', compact('item', 'statuslabel_types'))->with('use_statuslabel_type', $use_statuslabel_type);
return view('statuslabels/edit', compact('item'))->with('status_types', Helper::statusTypeList());;
}
/**
@@ -121,17 +109,10 @@ class StatuslabelsController extends Controller
return redirect()->route('statuslabels.index')->with('error', trans('admin/statuslabels/message.does_not_exist'));
}
if (! $request->filled('statuslabel_types')) {
return redirect()->back()->withInput()->withErrors(['statuslabel_types' => trans('validation.statuslabel_type')]);
}
// Update the Statuslabel data
$statustype = Statuslabel::getStatuslabelTypesForDB($request->input('statuslabel_types'));
$statuslabel->name = $request->input('name');
$statuslabel->notes = $request->input('notes');
$statuslabel->deployable = $statustype['deployable'];
$statuslabel->pending = $statustype['pending'];
$statuslabel->archived = $statustype['archived'];
$statuslabel->status_type = $request->input('status_type');
$statuslabel->color = $request->input('color');
$statuslabel->show_in_nav = $request->input('show_in_nav', 0);
$statuslabel->default_label = $request->input('default_label', 0);

View File

@@ -7,9 +7,6 @@ use App\Http\Controllers\Controller;
use App\Http\Requests\UploadFileRequest;
use App\Models\Actionlog;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Illuminate\Support\Facades\Storage;
@@ -116,31 +113,30 @@ class UserFilesController extends Controller
public function show($userId = null, $fileId = null)
{
if (empty($fileId)) {
return redirect()->route('users.show')->with('error', 'Invalid file request');
}
$user = User::find($userId);
// the license is valid
if (isset($user->id)) {
if ($user = User::find($userId)) {
$this->authorize('view', $user);
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $user->id)->find($fileId)) {
$file = 'private_uploads/users/'.$log->filename;
// Display the file inline
if (request('inline') == 'true') {
$headers = [
'Content-Disposition' => 'inline',
];
return Storage::download('private_uploads/users/'.$log->filename, $log->filename, $headers);
try {
return StorageHelper::showOrDownloadFile($file, $log->filename);
} catch (\Exception $e) {
return redirect()->route('users.show', ['user' => $user])->with('error', trans('general.file_not_found'));
}
return Storage::download('private_uploads/users/'.$log->filename);
}
return redirect()->route('users.index')->with('error', trans('admin/users/message.log_record_not_found'));
// The log record doesn't exist somehow
return redirect()->route('users.show', ['user' => $user])->with('error', trans('general.log_record_not_found'));
return redirect()->back()->with('error', trans('general.file_not_found'));
}
// Redirect to the user management page if the user doesn't exist

View File

@@ -53,6 +53,10 @@ class Kernel extends HttpKernel
\App\Http\Middleware\CheckLocale::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'health' => [
],
];
/**
@@ -69,5 +73,6 @@ class Kernel extends HttpKernel
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'health' => null,
];
}

View File

@@ -7,14 +7,19 @@ use Closure;
class CheckForSetup
{
protected $except = [
'_debugbar*',
'health'
];
public function handle($request, Closure $next, $guard = null)
{
/**
* This is dumb
* @todo Check on removing this, not sure if it's still needed
* Skip this middleware for the debugbar and health check
*/
if ($request->is('_debugbar*')) {
if ($request->is($this->except)) {
return $next($request);
}
@@ -25,7 +30,7 @@ class CheckForSetup
return $next($request);
}
} else {
if (! ($request->is('setup*')) && ! ($request->is('.env')) && ! ($request->is('health'))) {
if (! ($request->is('setup*')) && ! ($request->is('.env'))) {
return redirect(config('app.url').'/setup');
}

View File

@@ -29,7 +29,8 @@ class StoreAssetRequest extends ImageUploadRequest
// Guard against users passing in an array for company_id instead of an integer.
// If the company_id is not an integer then we simply use what was
// provided to be caught by model level validation later.
$idForCurrentUser = is_int($this->company_id)
// The use of is_numeric accounts for 1 and '1'.
$idForCurrentUser = is_numeric($this->company_id)
? Company::getIdForCurrentUser($this->company_id)
: $this->company_id;

View File

@@ -0,0 +1,41 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
class StoreLabelSettings extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return Gate::allows('superuser');
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'labels_per_page' => 'numeric',
'labels_width' => 'numeric',
'labels_height' => 'numeric',
'labels_pmargin_left' => 'numeric|nullable',
'labels_pmargin_right' => 'numeric|nullable',
'labels_pmargin_top' => 'numeric|nullable',
'labels_pmargin_bottom' => 'numeric|nullable',
'labels_display_bgutter' => 'numeric|nullable',
'labels_display_sgutter' => 'numeric|nullable',
'labels_fontsize' => 'numeric|min:5',
'labels_pagewidth' => 'numeric|nullable',
'labels_pageheight' => 'numeric|nullable',
'qr_text' => 'max:31|nullable',
];
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
class StoreLdapSettings extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return Gate::allows('superuser');
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'ldap_username_field' => 'not_in:sAMAccountName|required_if:ldap_enabled,1',
'ldap_auth_filter_query' => 'not_in:uid=samaccountname|required_if:ldap_enabled,1',
'ldap_filter' => 'nullable|regex:"^[^(]"|required_if:ldap_enabled,1',
'ldap_server' => 'nullable|required_if:ldap_enabled,1|starts_with:ldap://,ldaps://',
'ldap_uname' => 'nullable|required_if:ldap_enabled,1',
'ldap_pword' => 'nullable|required_if:ldap_enabled,1',
'ldap_basedn' => 'nullable|required_if:ldap_enabled,1',
'ldap_fname_field' => 'nullable|required_if:ldap_enabled,1',
'custom_forgot_pass_url' => 'nullable|url',
];
}
}

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
class StoreLocalizationSettings extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return Gate::allows('superuser');
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'default_currency' => 'required',
'locale' => 'required',
];
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Http\Requests;
use App\Models\Accessory;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
class StoreNotificationSettings extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return Gate::allows('superuser');
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'alert_email' => 'email_array|nullable',
'admin_cc_email' => 'email|nullable',
'alert_threshold' => 'numeric|nullable|gt:0',
'alert_interval' => 'numeric|nullable|gt:0',
'audit_warning_days' => 'numeric|nullable|gt:0',
'due_checkin_days' => 'numeric|nullable|gt:0',
'audit_interval' => 'numeric|nullable|gt:0',
];
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
class StoreSecuritySettings extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return Gate::allows('superuser');
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'pwd_secure_min' => 'numeric|required|min:8',
'custom_forgot_pass_url' => 'url|nullable',
'privacy_policy_link' => 'nullable|url',
'login_remote_user_enabled' => 'numeric|nullable',
'login_common_disabled' => 'numeric|nullable',
'login_remote_user_custom_logout_url' => 'string|nullable',
'login_remote_user_header_name' => 'string|nullable',
];
}
}

View File

@@ -23,7 +23,7 @@ trait MayContainCustomFields
return str_starts_with($attributes, '_snipeit_');
});
// if there are custom fields, find the one's that don't exist on the model's fieldset and add an error to the validator's error bag
if (count($request_fields) > 0) {
if (count($request_fields) > 0 && $validator->errors()->isEmpty()) {
$request_fields->diff($asset_model?->fieldset?->fields?->pluck('db_column'))
->each(function ($request_field_name) use ($request_fields, $validator) {
if (CustomField::where('db_column', $request_field_name)->exists()) {

View File

@@ -141,6 +141,8 @@ class ActionlogsTransformer
if ($actionlog->item) {
if ($actionlog->itemType() == 'asset') {
$file_url = route('show/assetfile', ['assetId' => $actionlog->item->id, 'fileId' => $actionlog->id]);
} elseif ($actionlog->itemType() == 'accessory') {
$file_url = route('show.accessoryfile', ['accessoryId' => $actionlog->item->id, 'fileId' => $actionlog->id]);
} elseif ($actionlog->itemType() == 'license') {
$file_url = route('show.licensefile', ['licenseId' => $actionlog->item->id, 'fileId' => $actionlog->id]);
} elseif ($actionlog->itemType() == 'user') {
@@ -158,7 +160,6 @@ class ActionlogsTransformer
[
'url' => $file_url,
'filename' => $actionlog->filename,
'inlineable' => (bool) Helper::show_file_inline($actionlog->filename),
] : null,
'item' => ($actionlog->item) ? [
@@ -346,4 +347,4 @@ class ActionlogsTransformer
}
}

View File

@@ -39,7 +39,7 @@ class AssetMaintenancesTransformer
'status_label' => ($assetmaintenance->asset->assetstatus) ? [
'id' => (int) $assetmaintenance->asset->assetstatus->id,
'name'=> e($assetmaintenance->asset->assetstatus->name),
'status_type'=> e($assetmaintenance->asset->assetstatus->getStatuslabelType()),
'status_type'=> e($assetmaintenance->asset->assetstatus->status_type),
'status_meta' => e($assetmaintenance->asset->present()->statusMeta),
] : null,
'company' => (($assetmaintenance->asset) && ($assetmaintenance->asset->company)) ? [
@@ -66,7 +66,7 @@ class AssetMaintenancesTransformer
'completion_date' => Helper::getFormattedDateObject($assetmaintenance->completion_date, 'date'),
'user_id' => ($assetmaintenance->adminuser) ? [
'id' => $assetmaintenance->adminuser->id,
'name'=> e($assetmaintenance->admin->getFullNameAttribute())
'name'=> e($assetmaintenance->adminuser->present()->fullName())
] : null, // legacy to not change the shape of the API
'created_by' => ($assetmaintenance->adminuser) ? [
'id' => (int) $assetmaintenance->adminuser->id,

View File

@@ -8,7 +8,6 @@ use App\Models\Setting;
use Illuminate\Support\Facades\Gate;
use Illuminate\Database\Eloquent\Collection;
use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;
class AssetsTransformer
{
@@ -45,8 +44,8 @@ class AssetsTransformer
'status_label' => ($asset->assetstatus) ? [
'id' => (int) $asset->assetstatus->id,
'name'=> e($asset->assetstatus->name),
'status_type'=> e($asset->assetstatus->getStatuslabelType()),
'status_meta' => e($asset->present()->statusMeta),
'status_type'=> e($asset->assetstatus->status_type),
'status_meta' => e($asset->assetstatus->status_type),
] : null,
'category' => (($asset->model) && ($asset->model->category)) ? [
'id' => (int) $asset->model->category->id,

View File

@@ -38,6 +38,8 @@ class ComponentsTransformer
'name' => e($component->category->name),
] : null,
'supplier' => ($component->supplier) ? ['id' => $component->supplier->id, 'name'=> e($component->supplier->name)] : null,
'manufacturer' => ($component->manufacturer) ? ['id' => $component->manufacturer->id, 'name'=> e($component->manufacturer->name)] : null,
'model_number' => ($component->model_number) ? e($component->model_number) : null,
'order_number' => e($component->order_number),
'purchase_date' => Helper::getFormattedDateObject($component->purchase_date, 'date'),
'purchase_cost' => Helper::formatCurrencyOutput($component->purchase_cost),

View File

@@ -36,6 +36,7 @@ class ManufacturersTransformer
'licenses_count' => (int) $manufacturer->licenses_count,
'consumables_count' => (int) $manufacturer->consumables_count,
'accessories_count' => (int) $manufacturer->accessories_count,
'components_count' => (int) $manufacturer->components_count,
'created_by' => ($manufacturer->adminuser) ? [
'id' => (int) $manufacturer->adminuser->id,
'name'=> e($manufacturer->adminuser->present()->fullName()),

View File

@@ -24,7 +24,8 @@ class StatuslabelsTransformer
$array = [
'id' => (int) $statuslabel->id,
'name' => e($statuslabel->name),
'type' => $statuslabel->getStatuslabelType(),
'type' => $statuslabel->status_type, // legacy - to be removed in later versions
'status_type' => $statuslabel->status_type,
'color' => ($statuslabel->color) ? e($statuslabel->color) : null,
'show_in_nav' => ($statuslabel->show_in_nav == '1') ? true : false,
'default_label' => ($statuslabel->default_label == '1') ? true : false,

View File

@@ -18,8 +18,8 @@ class AssetImporter extends ItemImporter
$this->defaultStatusLabelId = Statuslabel::first()->id;
if (!is_null(Statuslabel::deployable()->first())) {
$this->defaultStatusLabelId = Statuslabel::deployable()->first()->id;
if (!is_null(Statuslabel::where('status_type', 'deployable')->first())) {
$this->defaultStatusLabelId = Statuslabel::where('status_type', 'deployable')->first()->id;
}
}

View File

@@ -21,7 +21,6 @@ abstract class Importer
* Id of User performing import
* @var
*/
protected $created_by;
/**
* Are we updating items in the import
@@ -149,21 +148,28 @@ abstract class Importer
{
$headerRow = $this->csv->fetchOne();
$this->csv->setHeaderOffset(0); //explicitly sets the CSV document header record
$results = $this->normalizeInputArray($this->csv->getRecords($headerRow));
$this->populateCustomFields($headerRow);
DB::transaction(function () use (&$results) {
DB::transaction(function () use ($headerRow) {
$importedItemsCount = 0;
Model::unguard();
$resultsCount = count($results);
foreach ($results as $row) {
foreach ($this->csv->getRecords($headerRow) as $row) {
//Lowercase header values to ensure we're comparing values properly.
$row = array_change_key_case($row, CASE_LOWER);
$this->handle($row);
$importedItemsCount++;
if ($this->progressCallback) {
call_user_func($this->progressCallback, $resultsCount);
call_user_func($this->progressCallback, $importedItemsCount);
}
$this->log('------------- Action Summary ----------------');
}
Model::reguard();
});
}
@@ -236,22 +242,6 @@ abstract class Importer
return $key;
}
/**
* Used to lowercase header values to ensure we're comparing values properly.
*
* @param $results
* @return array
*/
public function normalizeInputArray($results)
{
$newArray = [];
foreach ($results as $index => $arrayToNormalize) {
$newArray[$index] = array_change_key_case($arrayToNormalize);
}
return $newArray;
}
/**
* Figure out the fieldname of the custom field
*

View File

@@ -81,6 +81,12 @@ class CustomFieldSetDefaultValuesForModel extends Component
{
$this->fields->each(function ($field) {
$this->selectedValues[$field->db_column] = $this->getSelectedValueForField($field);
// if the element is a checkbox and the value was just sent to null, make it
// an array since Livewire can't bind to non-array values for checkboxes.
if ($field->element === 'checkbox' && is_null($this->selectedValues[$field->db_column])) {
$this->selectedValues[$field->db_column] = [];
}
});
}

View File

@@ -196,7 +196,6 @@ class Importer extends Component
'supplier' => trans('general.supplier'),
'purchase_cost' => trans('general.purchase_cost'),
'purchase_date' => trans('general.purchase_date'),
'purchase_order' => trans('admin/licenses/form.purchase_order'),
'asset_notes' => trans('general.item_notes', ['item' => trans('admin/hardware/general.asset')]),
'model_notes' => trans('general.item_notes', ['item' => trans('admin/hardware/form.model')]),
'manufacturer' => trans('general.manufacturer'),

View File

@@ -43,16 +43,16 @@ class Asset extends Depreciable
/**
* Run after the checkout acceptance was declined by the user
*
*
* @param User $acceptedBy
* @param string $signature
*/
*/
public function declinedCheckout(User $declinedBy, $signature)
{
$this->assigned_to = null;
$this->assigned_type = null;
$this->accepted = null;
$this->save();
$this->accepted = null;
$this->save();
}
/**
@@ -301,9 +301,9 @@ class Asset extends Depreciable
// This asset is not currently assigned to anyone and is not deleted...
if ((! $this->assigned_to) && (! $this->deleted_at)) {
// The asset status is not archived and is deployable
if (($this->assetstatus) && ($this->assetstatus->archived == '0')
&& ($this->assetstatus->deployable == '1'))
// The asset is not archived and the status is deployable
if (($this->assetstatus) && ($this->archived == '0')
&& ($this->assetstatus->status_type == 'deployable'))
{
return true;
@@ -368,7 +368,7 @@ class Asset extends Depreciable
if ($this->save()) {
if (is_int($admin)) {
$checkedOutBy = User::findOrFail($admin);
} elseif (get_class($admin) === \App\Models\User::class) {
} elseif ($admin && get_class($admin) === \App\Models\User::class) {
$checkedOutBy = $admin;
} else {
$checkedOutBy = auth()->user();
@@ -1146,9 +1146,7 @@ class Asset extends Depreciable
public function scopePending($query)
{
return $query->whereHas('assetstatus', function ($query) {
$query->where('deployable', '=', 0)
->where('pending', '=', 1)
->where('archived', '=', 0);
$query->where('status_type', '=', 'deployable');
});
}
@@ -1195,9 +1193,7 @@ class Asset extends Depreciable
{
return $query->whereNull('assets.assigned_to')
->whereHas('assetstatus', function ($query) {
$query->where('deployable', '=', 1)
->where('pending', '=', 0)
->where('archived', '=', 0);
$query->where('status_type', '=', 'deployable');
});
}
@@ -1212,9 +1208,7 @@ class Asset extends Depreciable
public function scopeUndeployable($query)
{
return $query->whereHas('assetstatus', function ($query) {
$query->where('deployable', '=', 0)
->where('pending', '=', 0)
->where('archived', '=', 0);
$query->where('status_type', '!=', 'deployable');
});
}
@@ -1229,7 +1223,7 @@ class Asset extends Depreciable
public function scopeNotArchived($query)
{
return $query->whereHas('assetstatus', function ($query) {
$query->where('archived', '=', 0);
$query->where('status_type', '!=', 'archived');
});
}
@@ -1406,9 +1400,7 @@ class Asset extends Depreciable
public function scopeArchived($query)
{
return $query->whereHas('assetstatus', function ($query) {
$query->where('deployable', '=', 0)
->where('pending', '=', 0)
->where('archived', '=', 1);
$query->where('status_type', '=', 'archived');
});
}
@@ -1440,9 +1432,8 @@ class Asset extends Depreciable
return Company::scopeCompanyables($query->where($table.'.requestable', '=', 1))
->whereHas('assetstatus', function ($query) {
$query->where(function ($query) {
$query->where('deployable', '=', 1)
->where('archived', '=', 0); // you definitely can't request something that's archived
})->orWhere('pending', '=', 1); // we've decided that even though an asset may be 'pending', you can still request it
$query->where('status_type', '!=', 'archived'); // you definitely can't request something that's archived
}); // we've decided that even though an asset may be 'pending', you can still request it
});
}
@@ -1705,7 +1696,7 @@ class Asset extends Depreciable
});
});
}
/**
* THIS CLUNKY BIT IS VERY IMPORTANT
@@ -1726,7 +1717,7 @@ class Asset extends Depreciable
* assets.location would fail, as that field doesn't exist -- plus we're already searching
* against those relationships earlier in this method.
*
* - snipe
* - snipe
*
*/

View File

@@ -176,7 +176,7 @@ class AssetMaintenance extends Model implements ICompanyableChild
*/
public function adminuser()
{
return $this->belongsTo(\App\Models\User::class, 'user_id')
return $this->belongsTo(\App\Models\User::class, 'created_by')
->withTrashed();
}

View File

@@ -116,7 +116,7 @@ final class Company extends SnipeModel
if ($current_user->company_id != null) {
return $current_user->company_id;
} else {
return static::getIdFromInput($unescaped_input);
return null;
}
}
}

View File

@@ -8,9 +8,6 @@ trait CompanyableTrait
* This trait is used to scope models to the current company. To use this scope on companyable models,
* we use the "use Companyable;" statement at the top of the mode.
*
* We CANNOT USE THIS ON USERS, as it causes an infinite loop and prevents users from logging in, since this scope will be
* applied to the currently logged in (or logging in) user in addition to the user model for viewing lists of users.
*
* @see \App\Models\Company\Company::scopeCompanyables()
* @return void
*/

View File

@@ -38,6 +38,7 @@ class Component extends SnipeModel
'min_amt' => 'integer|min:0|nullable',
'purchase_date' => 'date_format:Y-m-d|nullable',
'purchase_cost' => 'numeric|nullable|gte:0|max:9999999999999',
'manufacturer_id' => 'integer|exists:manufacturers,id|nullable',
];
/**
@@ -60,6 +61,8 @@ class Component extends SnipeModel
'company_id',
'supplier_id',
'location_id',
'manufacturer_id',
'model_number',
'name',
'purchase_cost',
'purchase_date',
@@ -77,7 +80,15 @@ class Component extends SnipeModel
*
* @var array
*/
protected $searchableAttributes = ['name', 'order_number', 'serial', 'purchase_cost', 'purchase_date', 'notes'];
protected $searchableAttributes = [
'name',
'order_number',
'serial',
'purchase_cost',
'purchase_date',
'notes',
'model_number',
];
/**
* The relations and their attributes that should be included when searching the model.
@@ -89,6 +100,7 @@ class Component extends SnipeModel
'company' => ['name'],
'location' => ['name'],
'supplier' => ['name'],
'manufacturer' => ['name'],
];
@@ -183,6 +195,19 @@ class Component extends SnipeModel
return $this->belongsTo(\App\Models\Supplier::class, 'supplier_id');
}
/**
* Establishes the item -> manufacturer relationship
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v3.0]
* @return \Illuminate\Database\Eloquent\Relations\Relation
*/
public function manufacturer()
{
return $this->belongsTo(\App\Models\Manufacturer::class, 'manufacturer_id');
}
/**
* Establishes the component -> action logs relationship
*
@@ -311,6 +336,19 @@ class Component extends SnipeModel
return $query->leftJoin('suppliers', 'components.supplier_id', '=', 'suppliers.id')->orderBy('suppliers.name', $order);
}
/**
* Query builder scope to order on manufacturer
*
* @param \Illuminate\Database\Query\Builder $query Query builder instance
* @param text $order Order
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeOrderManufacturer($query, $order)
{
return $query->leftJoin('manufacturers', 'components.manufacturer_id', '=', 'manufacturers.id')->orderBy('manufacturers.name', $order);
}
public function scopeOrderByCreatedBy($query, $order)
{
return $query->leftJoin('users as admin_sort', 'components.created_by', '=', 'admin_sort.id')->select('components.*')->orderBy('admin_sort.first_name', $order)->orderBy('admin_sort.last_name', $order);

View File

@@ -2,10 +2,13 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Import extends Model
{
use HasFactory;
protected $casts = [
'header_row' => 'array',
'first_row' => 'array',

View File

@@ -42,7 +42,7 @@ class Location extends SnipeModel
];
/**
* Whether the model should inject it's identifier to the unique
* Whether the model should inject its identifier to the unique
* validation rules before attempting validation. If this property
* is not set in the model it will default to true.
*
@@ -138,9 +138,7 @@ class Location extends SnipeModel
{
return $this->hasMany(\App\Models\Asset::class, 'location_id')
->whereHas('assetstatus', function ($query) {
$query->where('status_labels.deployable', '=', 1)
->orWhere('status_labels.pending', '=', 1)
->orWhere('status_labels.archived', '=', 0);
$query->whereNot('status_labels.status_type', '=', 'archived');
});
}

View File

@@ -117,7 +117,6 @@ trait Loggable
*/
public function logCheckin($target, $note, $action_date = null, $originalValues = [])
{
$settings = Setting::getSettings();
$log = new Actionlog;
if($target != null){
@@ -171,39 +170,6 @@ trait Loggable
$log->logaction('checkin from');
// $params = [
// 'target' => $target,
// 'item' => $log->item,
// 'admin' => $log->user,
// 'note' => $note,
// 'target_type' => $log->target_type,
// 'settings' => $settings,
// ];
//
//
// $checkinClass = null;
//
// if (method_exists($target, 'notify')) {
// try {
// $target->notify(new static::$checkinClass($params));
// } catch (\Exception $e) {
// Log::debug($e);
// }
//
// }
//
// // Send to the admin, if settings dictate
// $recipient = new \App\Models\Recipients\AdminRecipient();
//
// if (($settings->admin_cc_email!='') && (static::$checkinClass!='')) {
// try {
// $recipient->notify(new static::$checkinClass($params));
// } catch (\Exception $e) {
// Log::debug($e);
// }
//
// }
return $log;
}

View File

@@ -78,6 +78,7 @@ class Manufacturer extends SnipeModel
&& (($this->licenses_count ?? $this->licenses()->count()) === 0)
&& (($this->consumables_count ?? $this->consumables()->count()) === 0)
&& (($this->accessories_count ?? $this->accessories()->count()) === 0)
&& (($this->components_count ?? $this->components()->count()) === 0)
&& ($this->deleted_at == '');
}
@@ -106,6 +107,10 @@ class Manufacturer extends SnipeModel
return $this->hasMany(\App\Models\Consumable::class, 'manufacturer_id');
}
public function components()
{
return $this->hasMany(\App\Models\Component::class, 'manufacturer_id');
}
public function adminuser()
{

View File

@@ -51,36 +51,7 @@ class Setting extends Model
*/
protected $rules = [
'brand' => 'required|min:1|numeric',
'qr_text' => 'max:31|nullable',
'alert_email' => 'email_array|nullable',
'admin_cc_email' => 'email|nullable',
'default_currency' => 'required',
'locale' => 'required',
'labels_per_page' => 'numeric',
'labels_width' => 'numeric',
'labels_height' => 'numeric',
'labels_pmargin_left' => 'numeric|nullable',
'labels_pmargin_right' => 'numeric|nullable',
'labels_pmargin_top' => 'numeric|nullable',
'labels_pmargin_bottom' => 'numeric|nullable',
'labels_display_bgutter' => 'numeric|nullable',
'labels_display_sgutter' => 'numeric|nullable',
'labels_fontsize' => 'numeric|min:5',
'labels_pagewidth' => 'numeric|nullable',
'labels_pageheight' => 'numeric|nullable',
'login_remote_user_enabled' => 'numeric|nullable',
'login_common_disabled' => 'numeric|nullable',
'login_remote_user_custom_logout_url' => 'string|nullable',
'login_remote_user_header_name' => 'string|nullable',
'thumbnail_max_h' => 'numeric|max:500|min:25',
'pwd_secure_min' => 'numeric|required|min:8',
'alert_threshold' => 'numeric|nullable',
'alert_interval' => 'numeric|nullable',
'audit_warning_days' => 'numeric|nullable',
'due_checkin_days' => 'numeric|nullable',
'audit_interval' => 'numeric|nullable',
'custom_forgot_pass_url' => 'url|nullable',
'privacy_policy_link' => 'nullable|url',
'google_client_id' => 'nullable|ends_with:apps.googleusercontent.com'
];

View File

@@ -23,17 +23,16 @@ class Statuslabel extends SnipeModel
protected $rules = [
'name' => 'required|string|unique_undeleted',
'notes' => 'string|nullable',
'deployable' => 'required',
'pending' => 'required',
'archived' => 'required',
'status_type' => 'required|in:deployable,pending,archived,undeployable1',
];
protected $fillable = [
'archived',
'deployable',
'status_type',
'name',
'notes',
'pending',
'color',
'show_in_nav',
'default_label',
];
use Searchable;
@@ -76,54 +75,6 @@ class Statuslabel extends SnipeModel
* @since [v1.0]
* @return string
*/
public function getStatuslabelType()
{
if (($this->pending == '1') && ($this->archived == '0') && ($this->deployable == '0')) {
return 'pending';
} elseif (($this->pending == '0') && ($this->archived == '1') && ($this->deployable == '0')) {
return 'archived';
} elseif (($this->pending == '0') && ($this->archived == '0') && ($this->deployable == '0')) {
return 'undeployable';
}
return 'deployable';
}
/**
* Query builder scope to for pending status types
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopePending()
{
return $this->where('pending', '=', 1)
->where('archived', '=', 0)
->where('deployable', '=', 0);
}
/**
* Query builder scope for archived status types
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeArchived()
{
return $this->where('pending', '=', 0)
->where('archived', '=', 1)
->where('deployable', '=', 0);
}
/**
* Query builder scope for deployable status types
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeDeployable()
{
return $this->where('pending', '=', 0)
->where('archived', '=', 0)
->where('deployable', '=', 1);
}
/**
* Query builder scope for undeployable status types
@@ -132,40 +83,10 @@ class Statuslabel extends SnipeModel
*/
public function scopeUndeployable()
{
return $this->where('pending', '=', 0)
->where('archived', '=', 0)
->where('deployable', '=', 0);
return $this->whereNot('status_type', '=', 'deployable');
}
/**
* Helper function to determine type attributes
*
* @author A. Gianotto <snipe@snipe.net>
* @since [v1.0]
* @return string
*/
public static function getStatuslabelTypesForDB($type)
{
$statustype['pending'] = 0;
$statustype['deployable'] = 0;
$statustype['archived'] = 0;
if ($type == 'pending') {
$statustype['pending'] = 1;
$statustype['deployable'] = 0;
$statustype['archived'] = 0;
} elseif ($type == 'deployable') {
$statustype['pending'] = 0;
$statustype['deployable'] = 1;
$statustype['archived'] = 0;
} elseif ($type == 'archived') {
$statustype['pending'] = 0;
$statustype['deployable'] = 0;
$statustype['archived'] = 1;
}
return $statustype;
}
public function scopeOrderByCreatedBy($query, $order)
{

View File

@@ -38,6 +38,7 @@ class CheckoutConsumableNotification extends Notification
$this->note = $note;
$this->target = $checkedOutTo;
$this->acceptance = $acceptance;
$this->qty = $consumable->checkout_qty;
$this->settings = Setting::getSettings();
}
@@ -173,7 +174,6 @@ class CheckoutConsumableNotification extends Notification
*/
public function toMail()
{
Log::debug($this->item->getImageUrl());
$eula = $this->item->getEula();
$req_accept = $this->item->requireAcceptance();
@@ -188,6 +188,7 @@ class CheckoutConsumableNotification extends Notification
'eula' => $eula,
'req_accept' => $req_accept,
'accept_url' => $accept_url,
'qty' => $this->qty,
])
->subject(trans('mail.Confirm_consumable_delivery'));
}

View File

@@ -116,12 +116,6 @@ class AssetMaintenancesPresenter extends Presenter
'sortable' => true,
'title' => trans('admin/asset_maintenances/form.cost'),
'class' => 'text-right',
], [
'field' => 'user_id',
'searchable' => true,
'sortable' => true,
'title' => trans('general.admin'),
'formatter' => 'usersLinkObjFormatter',
], [
'field' => 'created_by',
'searchable' => false,

View File

@@ -479,19 +479,6 @@ class AssetPresenter extends Presenter
return $interval;
}
/**
* @return string
* This handles the status label "meta" status of "deployed" if
* it's assigned. Should maybe deprecate.
*/
public function statusMeta()
{
if ($this->model->assigned) {
return 'deployed';
}
return $this->model->assetstatus->getStatuslabelType();
}
/**
* @return string

View File

@@ -66,8 +66,20 @@ class ComponentPresenter extends Presenter
'title' => trans('general.supplier'),
'visible' => false,
'formatter' => 'suppliersLinkObjFormatter',
],
[
], [
'field' => 'model_number',
'searchable' => true,
'sortable' => true,
'title' => trans('admin/models/table.modelnumber'),
], [
'field' => 'manufacturer',
'searchable' => true,
'sortable' => true,
'switchable' => true,
'title' => trans('general.manufacturer'),
'visible' => false,
'formatter' => 'manufacturersLinkObjFormatter',
], [
'field' => 'qty',
'searchable' => false,
'sortable' => true,

View File

@@ -311,7 +311,7 @@ class DepreciationReportPresenter extends Presenter
if ($this->model->assigned) {
return 'deployed';
}
return $this->model->assetstatus->getStatuslabelType();
return $this->model->assetstatus->status_type;
}
/**

View File

@@ -124,8 +124,15 @@ class ManufacturerPresenter extends Presenter
'title' => trans('general.accessories'),
'visible' => true,
'class' => 'css-accessory',
],
[
], [
'field' => 'components_count',
'searchable' => false,
'sortable' => true,
'switchable' => true,
'title' => trans('general.components'),
'visible' => true,
'class' => 'css-component',
], [
'field' => 'created_by',
'searchable' => false,
'sortable' => true,

View File

@@ -30,9 +30,9 @@ class StatusLabelPresenter extends Presenter
'visible' => true,
'formatter' => 'statuslabelsAssetLinkFormatter',
],[
'field' => 'type',
'searchable' => false,
'sortable' => false,
'field' => 'status_type',
'searchable' => true,
'sortable' => true,
'switchable' => false,
'title' => trans('admin/statuslabels/table.status_type'),
'visible' => true,

View File

@@ -31,6 +31,7 @@ class ValidationServiceProvider extends ServiceProvider
Validator::extend('email_array', function ($attribute, $value, $parameters, $validator) {
$value = str_replace(' ', '', $value);
$array = explode(',', $value);
$email_to_validate = [];
foreach ($array as $email) { //loop over values
$email_to_validate['alert_email'][] = $email;
@@ -38,7 +39,7 @@ class ValidationServiceProvider extends ServiceProvider
$rules = ['alert_email.*'=>'email'];
$messages = [
'alert_email.*'=>trans('validation.email_array'),
'alert_email.*' => trans('validation.custom.email_array'),
];
$validator = Validator::make($email_to_validate, $rules, $messages);

View File

@@ -40,7 +40,7 @@ class AssetCannotBeCheckedOutToNondeployableStatus implements DataAwareRule, Val
// Check to see if any of the assign-ish fields are set
if ((isset($this->data['assigned_to'])) || (isset($this->data['assigned_user'])) || (isset($this->data['assigned_location'])) || (isset($this->data['assigned_asset'])) || (isset($this->data['assigned_type']))) {
if (($value) && ($label = Statuslabel::find($value)) && ($label->getStatuslabelType()!='deployable')) {
if (($value) && ($label = Statuslabel::find($value)) && ($label->status_type!='deployable')) {
$fail(trans('admin/hardware/form.asset_not_deployable'));
}

View File

@@ -74,7 +74,6 @@
"ext-exif": "*"
},
"require-dev": {
"brianium/paratest": "^7.0",
"fakerphp/faker": "^1.16",
"larastan/larastan": "^2.9",
"mockery/mockery": "^1.4",

1455
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -280,7 +280,6 @@ return [
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
// Illuminate\Translation\TranslationServiceProvider::class, //replaced on next line
App\Providers\SnipeTranslationServiceProvider::class, //we REPLACE the default Laravel translator with our own
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
@@ -373,7 +372,7 @@ return [
'Image' => Intervention\Image\ImageServiceProvider::class,
'Carbon' => Carbon\Carbon::class,
'Helper' => App\Helpers\Helper::class,
// makes it much easier to use 'Helper::blah' in blades (which is where we usually use this)
'StorageHelper' => App\Helpers\StorageHelper::class,
'Icon' => App\Helpers\IconHelper::class,
'Socialite' => Laravel\Socialite\Facades\Socialite::class,

View File

@@ -1,10 +1,10 @@
<?php
return array (
'app_version' => 'v7.0.13',
'full_app_version' => 'v7.0.13 - build 15514-gdc0949da7',
'build_version' => '15514',
'full_app_version' => 'v7.0.13 - build 15666-g03b01689b',
'build_version' => '15666',
'prerelease_version' => '',
'hash_version' => 'gdc0949da7',
'full_hash' => 'v7.0.13-265-gdc0949da7',
'branch' => 'master',
'hash_version' => 'g03b01689b',
'full_hash' => 'v7.0.13-144-g03b01689b',
'branch' => 'develop',
);

View File

@@ -3,7 +3,6 @@
namespace Database\Factories;
use App\Models\Accessory;
use App\Models\AccessoryCheckout;
use App\Models\Category;
use App\Models\Location;
use App\Models\Manufacturer;
@@ -156,4 +155,19 @@ class AccessoryFactory extends Factory
]);
});
}
public function checkedOutToUsers(array $users)
{
return $this->afterCreating(function (Accessory $accessory) use ($users) {
foreach ($users as $user) {
$accessory->checkouts()->create([
'accessory_id' => $accessory->id,
'created_at' => Carbon::now(),
'user_id' => 1,
'assigned_to' => $user->id,
'assigned_type' => User::class,
]);
}
});
}
}

View File

@@ -34,7 +34,8 @@ class AssetFactory extends Factory
'rtd_location_id' => Location::factory(),
'serial' => $this->faker->uuid(),
'status_id' => function () {
return Statuslabel::where('name', 'Ready to Deploy')->first() ?? Statuslabel::factory()->rtd()->create(['name' => 'Ready to Deploy']);
// $status = Statuslabel::factory()->create(); dd($status) ;
return Statuslabel::where('status_type', 'deployable')->first() ?? Statuslabel::factory()->create(['name' => 'Ready to Deploy', 'status_type' => 'deployable'])->id;
},
'created_by' => User::factory()->superuser(),
'asset_tag' => $this->faker->unixTime('now'),

View File

@@ -7,6 +7,7 @@ use App\Models\Asset;
use App\Models\Category;
use App\Models\Company;
use App\Models\Component;
use App\Models\Manufacturer;
use App\Models\Consumable;
use App\Models\Location;
use App\Models\User;
@@ -30,6 +31,7 @@ class ComponentFactory extends Factory
*/
public function definition()
{
return [
'name' => $this->faker->text(20),
'category_id' => Category::factory(),
@@ -42,12 +44,14 @@ class ComponentFactory extends Factory
'min_amt' => $this->faker->numberBetween($min = 1, $max = 2),
'company_id' => Company::factory(),
'supplier_id' => Supplier::factory(),
'model_number' => $this->faker->numberBetween(1000000, 50000000),
];
}
public function ramCrucial4()
{
return $this->state(function () {
$manufacturer = Manufacturer::where('name', 'Crucial')->first() ?? Manufacturer::factory()->create(['name' => 'Crucial']);
return $this->state(function () use ($manufacturer) {
return [
'name' => 'Crucial 4GB DDR3L-1600 SODIMM',
'category_id' => function () {
@@ -55,6 +59,7 @@ class ComponentFactory extends Factory
},
'qty' => 10,
'min_amt' => 2,
'manufacturer_id' => $manufacturer->id,
'location_id' => Location::factory(),
];
});
@@ -62,7 +67,8 @@ class ComponentFactory extends Factory
public function ramCrucial8()
{
return $this->state(function () {
$manufacturer = Manufacturer::where('name', 'Crucial')->first() ?? Manufacturer::factory()->create(['name' => 'Crucial']);
return $this->state(function () use ($manufacturer) {
return [
'name' => 'Crucial 8GB DDR3L-1600 SODIMM Memory for Mac',
'category_id' => function () {
@@ -70,13 +76,15 @@ class ComponentFactory extends Factory
},
'qty' => 10,
'min_amt' => 2,
'manufacturer_id' => $manufacturer->id,
];
});
}
public function ssdCrucial120()
{
return $this->state(function () {
$manufacturer = Manufacturer::where('name', 'Crucial')->first() ?? Manufacturer::factory()->create(['name' => 'Crucial']);
return $this->state(function () use ($manufacturer) {
return [
'name' => 'Crucial BX300 120GB SATA Internal SSD',
'category_id' => function () {
@@ -84,13 +92,15 @@ class ComponentFactory extends Factory
},
'qty' => 10,
'min_amt' => 2,
'manufacturer_id' => $manufacturer->id,
];
});
}
public function ssdCrucial240()
{
return $this->state(function () {
$manufacturer = Manufacturer::where('name', 'Crucial')->first() ?? Manufacturer::factory()->create(['name' => 'Crucial']);
return $this->state(function () use ($manufacturer) {
return [
'name' => 'Crucial BX300 240GB SATA Internal SSD',
'category_id' => function () {
@@ -98,6 +108,7 @@ class ComponentFactory extends Factory
},
'qty' => 10,
'min_amt' => 2,
'manufacturer_id' => $manufacturer->id,
];
});
}

View File

@@ -0,0 +1,146 @@
<?php
namespace Database\Factories;
use App\Models\Import;
use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\Factories\Factory;
use Tests\Support\Importing;
/**
* @extends Factory<Import>
*/
class ImportFactory extends Factory
{
/**
* @inheritdoc
*/
protected $model = Import::class;
/**
* @inheritdoc
*/
public function definition()
{
return [
'name' => $this->faker->company,
'file_path' => Str::random().'.csv',
'filesize' => $this->faker->randomDigitNotNull(),
'field_map' => null,
];
}
/**
* Create an accessory import type.
*
* @return static
*/
public function accessory()
{
return $this->state(function (array $attributes) {
$fileBuilder = Importing\AccessoriesImportFileBuilder::new();
$attributes['name'] = "{$attributes['name']} Accessories";
$attributes['import_type'] = 'accessory';
$attributes['header_row'] = $fileBuilder->toCsv()[0];
$attributes['first_row'] = $fileBuilder->firstRow();
return $attributes;
});
}
/**
* Create an asset import type.
*
* @return static
*/
public function asset()
{
return $this->state(function (array $attributes) {
$fileBuilder = Importing\AssetsImportFileBuilder::new();
$attributes['name'] = "{$attributes['name']} Assets";
$attributes['import_type'] = 'asset';
$attributes['header_row'] = $fileBuilder->toCsv()[0];
$attributes['first_row'] = $fileBuilder->firstRow();
return $attributes;
});
}
/**
* Create a component import type.
*
* @return static
*/
public function component()
{
return $this->state(function (array $attributes) {
$fileBuilder = Importing\ComponentsImportFileBuilder::new();
$attributes['name'] = "{$attributes['name']} Components";
$attributes['import_type'] = 'component';
$attributes['header_row'] = $fileBuilder->toCsv()[0];
$attributes['first_row'] = $fileBuilder->firstRow();
return $attributes;
});
}
/**
* Create a consumable import type.
*
* @return static
*/
public function consumable()
{
return $this->state(function (array $attributes) {
$fileBuilder = Importing\ConsumablesImportFileBuilder::new();
$attributes['name'] = "{$attributes['name']} Consumables";
$attributes['import_type'] = 'consumable';
$attributes['header_row'] = $fileBuilder->toCsv()[0];
$attributes['first_row'] = $fileBuilder->firstRow();
return $attributes;
});
}
/**
* Create a license import type.
*
* @return static
*/
public function license()
{
return $this->state(function (array $attributes) {
$fileBuilder = Importing\LicensesImportFileBuilder::new();
$attributes['name'] = "{$attributes['name']} Licenses";
$attributes['import_type'] = 'license';
$attributes['header_row'] = $fileBuilder->toCsv()[0];
$attributes['first_row'] = $fileBuilder->firstRow();
return $attributes;
});
}
/**
* Create a users import type.
*
* @return static
*/
public function users()
{
return $this->state(function (array $attributes) {
$fileBuilder = Importing\UsersImportFileBuilder::new();
$attributes['name'] = "{$attributes['name']} Employees";
$attributes['import_type'] = 'user';
$attributes['header_row'] = $fileBuilder->toCsv()[0];
$attributes['first_row'] = $fileBuilder->firstRow();
return $attributes;
});
}
}

View File

@@ -28,9 +28,7 @@ class StatuslabelFactory extends Factory
'updated_at' => $this->faker->dateTime(),
'created_by' => User::factory()->superuser(),
'deleted_at' => null,
'deployable' => 0,
'pending' => 0,
'archived' => 0,
'status_type' => 'deployable',
'notes' => '',
];
}
@@ -40,7 +38,7 @@ class StatuslabelFactory extends Factory
return $this->state(function () {
return [
'notes' => $this->faker->sentence(),
'deployable' => 1,
'status_type' => 'deployable',
'default_label' => 1,
];
});
@@ -56,7 +54,7 @@ class StatuslabelFactory extends Factory
return $this->state(function () {
return [
'notes' => $this->faker->sentence(),
'pending' => 1,
'status_type' => 'pending',
'default_label' => 1,
];
});
@@ -67,8 +65,8 @@ class StatuslabelFactory extends Factory
return $this->state(function () {
return [
'notes' => 'These assets are permanently undeployable',
'archived' => 1,
'default_label' => 0,
'status_type' => 'archived',
];
});
}
@@ -79,6 +77,7 @@ class StatuslabelFactory extends Factory
return [
'name' => 'Out for Diagnostics',
'default_label' => 0,
'status_type' => 'pending',
];
});
}
@@ -89,6 +88,7 @@ class StatuslabelFactory extends Factory
return [
'name' => 'Out for Repair',
'default_label' => 0,
'status_type' => 'pending',
];
});
}
@@ -99,6 +99,7 @@ class StatuslabelFactory extends Factory
return [
'name' => 'Broken - Not Fixable',
'default_label' => 0,
'status_type' => 'archived',
];
});
}
@@ -109,6 +110,7 @@ class StatuslabelFactory extends Factory
return [
'name' => 'Lost/Stolen',
'default_label' => 0,
'status_type' => 'archived',
];
});
}

View File

@@ -7,6 +7,9 @@ use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use \Auth;
/**
* @extends Factory<User>
*/
class UserFactory extends Factory
{
/**

View File

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('components', function (Blueprint $table) {
$table->integer('manufacturer_id')->after('purchase_cost')->nullable()->default(null);
$table->string('model_number')->after('purchase_cost')->nullable()->default(null);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('components', function (Blueprint $table) {
$table->dropColumn('manufacturer_id');
$table->dropColumn('model_number');
});
}
};

View File

@@ -0,0 +1,71 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use App\Models\StatusLabel;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
if (!Schema::hasColumn('status_labels', 'status_type')) {
Schema::table('status_labels', function (Blueprint $table) {
$table->string('status_type')->after('name')->default('deployable');
});
DB::table('status_labels')->where('pending', 1)->update(['status_type' => 'pending']);
DB::table('status_labels')->where('archived', 1)->update(['status_type' => 'archived']);
DB::table('status_labels')->where('deployable', 1)->update(['status_type' => 'deployable']);
Schema::table('status_labels', function (Blueprint $table) {
$table->renameColumn('deployable', 'legacy_deployable');
});
Schema::table('status_labels', function (Blueprint $table) {
$table->renameColumn('pending', 'legacy_pending');
});
Schema::table('status_labels', function (Blueprint $table) {
$table->renameColumn('archived', 'legacy_archived');
});
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
if (Schema::hasColumn('status_labels', 'status_type')) {
Schema::table('status_labels', function (Blueprint $table) {
$table->dropColumn('status_type');
});
Schema::table('status_labels', function (Blueprint $table) {
$table->renameColumn('legacy_deployable', 'deployable');
});
Schema::table('status_labels', function (Blueprint $table) {
$table->renameColumn('legacy_pending', 'pending');
});
Schema::table('status_labels', function (Blueprint $table) {
$table->renameColumn('legacy_archived', 'archived');
});
}
}
};

View File

@@ -37,6 +37,7 @@ class SettingsSeeder extends Seeder
$settings->support_footer = 'on';
$settings->pwd_secure_min = '8';
$settings->default_avatar = 'default.png';
$settings->show_archived_in_list = 0;
$settings->save();
if ($user = User::where('username', '=', 'admin')->first()) {

View File

@@ -17,21 +17,27 @@ class StatuslabelSeeder extends Seeder
Statuslabel::factory()->rtd()->create([
'name' => 'Ready to Deploy',
'created_by' => $admin->id,
'status_type' => 'deployable',
'legacy_deployable' => 1,
]);
Statuslabel::factory()->pending()->create([
'name' => 'Pending',
'created_by' => $admin->id,
'status_type' => 'pending',
'legacy_pending' => 1,
]);
Statuslabel::factory()->archived()->create([
'name' => 'Archived',
'created_by' => $admin->id,
'status_type' => 'archived',
'legacy_archived' => 1,
]);
Statuslabel::factory()->outForDiagnostics()->create(['created_by' => $admin->id]);
Statuslabel::factory()->outForRepair()->create(['created_by' => $admin->id]);
Statuslabel::factory()->broken()->create(['created_by' => $admin->id]);
Statuslabel::factory()->lost()->create(['created_by' => $admin->id]);
Statuslabel::factory()->outForDiagnostics()->pending()->create(['created_by' => $admin->id]);
Statuslabel::factory()->outForRepair()->pending()->create(['created_by' => $admin->id]);
Statuslabel::factory()->broken()->archived()->create(['created_by' => $admin->id]);
Statuslabel::factory()->lost()->archived()->create(['created_by' => $admin->id]);
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

23803
public/css/dist/all.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1,135 @@
#signature-pad{padding-top:250px;margin:auto}.m-signature-pad{position:relative;font-size:10px;width:100%;height:300px;border:1px solid #e8e8e8;background-color:#fff;box-shadow:0 1px 4px rgba(0,0,0,.27),0 0 40px rgba(0,0,0,.08) inset;border-radius:4px}.m-signature-pad:after,.m-signature-pad:before{position:absolute;z-index:-1;content:"";width:40%;height:10px;left:20px;bottom:10px;background:0 0;-webkit-transform:skew(-3deg) rotate(-3deg);-moz-transform:skew(-3deg) rotate(-3deg);-ms-transform:skew(-3deg) rotate(-3deg);-o-transform:skew(-3deg) rotate(-3deg);transform:skew(-3deg) rotate(-3deg);box-shadow:0 8px 12px rgba(0,0,0,.4)}.m-signature-pad:after{left:auto;right:20px;-webkit-transform:skew(3deg) rotate(3deg);-moz-transform:skew(3deg) rotate(3deg);-ms-transform:skew(3deg) rotate(3deg);-o-transform:skew(3deg) rotate(3deg);transform:skew(3deg) rotate(3deg)}.m-signature-pad--body{position:absolute;top:20px;bottom:60px;border:1px solid #f4f4f4;background-color:#fff}.m-signature-pad--body canvas{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:4px;box-shadow:0 0 5px rgba(0,0,0,.02) inset}.m-signature-pad--footer{position:absolute;left:20px;right:20px;bottom:20px;height:40px}.m-signature-pad--footer .description{color:#c3c3c3;text-align:center;font-size:1.2em;margin-top:1.8em}.m-signature-pad--footer .button{position:absolute;bottom:0}.m-signature-pad--footer .button.clear{left:0}.m-signature-pad--footer .button.save{right:0}@media screen and (max-width:1024px){.m-signature-pad{top:0;left:0;right:0;bottom:0;width:auto;height:auto;min-width:250px;min-height:140px;margin:5%}}@media screen and (min-device-width:768px) and (max-device-width:1024px){.m-signature-pad{margin:10%}}@media screen and (max-height:320px){.m-signature-pad--body{left:0;right:0;top:0;bottom:32px}.m-signature-pad--footer{left:20px;right:20px;bottom:4px;height:28px}.m-signature-pad--footer .description{font-size:1em;margin-top:1em}}
#signature-pad {
padding-top: 250px;
margin: auto;
}
.m-signature-pad {
position: relative;
font-size: 10px;
width: 100%;
height: 300px;
border: 1px solid #e8e8e8;
background-color: #fff;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.08) inset;
border-radius: 4px;
}
.m-signature-pad:before, .m-signature-pad:after {
position: absolute;
z-index: -1;
content: "";
width: 40%;
height: 10px;
left: 20px;
bottom: 10px;
background: transparent;
-webkit-transform: skew(-3deg) rotate(-3deg);
-moz-transform: skew(-3deg) rotate(-3deg);
-ms-transform: skew(-3deg) rotate(-3deg);
-o-transform: skew(-3deg) rotate(-3deg);
transform: skew(-3deg) rotate(-3deg);
box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4);
}
.m-signature-pad:after {
left: auto;
right: 20px;
-webkit-transform: skew(3deg) rotate(3deg);
-moz-transform: skew(3deg) rotate(3deg);
-ms-transform: skew(3deg) rotate(3deg);
-o-transform: skew(3deg) rotate(3deg);
transform: skew(3deg) rotate(3deg);
}
.m-signature-pad--body {
position: absolute;
top: 20px;
bottom: 60px;
border: 1px solid #f4f4f4;
background-color: white;
}
.m-signature-pad--body
canvas {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 4px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.02) inset;
}
.m-signature-pad--footer {
position: absolute;
left: 20px;
right: 20px;
bottom: 20px;
height: 40px;
}
.m-signature-pad--footer
.description {
color: #C3C3C3;
text-align: center;
font-size: 1.2em;
margin-top: 1.8em;
}
.m-signature-pad--footer
.button {
position: absolute;
bottom: 0;
}
.m-signature-pad--footer
.button.clear {
left: 0;
}
.m-signature-pad--footer
.button.save {
right: 0;
}
@media screen and (max-width: 1024px) {
.m-signature-pad {
top: 0;
left: 0;
right: 0;
bottom: 0;
width: auto;
height: auto;
min-width: 250px;
min-height: 140px;
margin: 5%;
}
}
@media screen and (min-device-width: 768px) and (max-device-width: 1024px) {
.m-signature-pad {
margin: 10%;
}
}
@media screen and (max-height: 320px) {
.m-signature-pad--body {
left: 0;
right: 0;
top: 0;
bottom: 32px;
}
.m-signature-pad--footer {
left: 20px;
right: 20px;
bottom: 4px;
height: 28px;
}
.m-signature-pad--footer
.description {
font-size: 1em;
margin-top: 1em;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1,219 @@
.skin-black .main-header .navbar{background-color:#111}.skin-black .main-header .navbar .nav>li>a{color:#fff}.skin-black .main-header .navbar .nav .open>a,.skin-black .main-header .navbar .nav .open>a:focus,.skin-black .main-header .navbar .nav .open>a:hover,.skin-black .main-header .navbar .nav>.active>a,.skin-black .main-header .navbar .nav>li>a:active,.skin-black .main-header .navbar .nav>li>a:focus,.skin-black .main-header .navbar .nav>li>a:hover,.skin-black .main-header .navbar .sidebar-toggle:hover{background:rgba(0,0,0,.1);color:#f6f6f6}.skin-black .main-header .navbar .sidebar-toggle{color:#fff}.skin-black .main-header .navbar .sidebar-toggle:hover{background-color:#040404}@media (max-width:767px){.skin-black .main-header .navbar .dropdown-menu li.divider{background-color:hsla(0,0%,100%,.1)}.skin-black .main-header .navbar .dropdown-menu li a{color:#333}.skin-black .main-header .navbar .dropdown-menu li a:hover{background:#040404}}.skin-black .main-header li.user-header{background-color:#111}.skin-black .content-header{background:transparent}.skin-black .left-side,.skin-black .main-sidebar,.skin-black .wrapper{background-color:#222d32}.skin-black .user-panel>.info,.skin-black .user-panel>.info>a{color:#fff}.skin-black .sidebar-menu>li.header{background:#1a2226;color:#4b646f}.skin-black .sidebar-menu>li>a{border-left:3px solid transparent}.skin-black .sidebar-menu>li.active>a,.skin-black .sidebar-menu>li:hover>a{background:#1e282c;border-left-color:#111;color:#fff}.skin-black .sidebar-menu>li>.treeview-menu{background:#2c3b41;margin:0 1px}.skin-black .sidebar a{color:#b8c7ce}.skin-black .sidebar a:hover{text-decoration:none}.skin-black .treeview-menu>li>a{color:#8aa4af}.skin-black .treeview-menu>li.active>a,.skin-black .treeview-menu>li>a:hover{color:#fff}.skin-black .sidebar-form{border:1px solid #374850;border-radius:3px;margin:10px}.skin-black .sidebar-form .btn,.skin-black .sidebar-form input[type=text]{background-color:#374850;border:1px solid transparent;box-shadow:none;height:35px;transition:all .3s ease-in-out}.skin-black .sidebar-form input[type=text]{border-bottom-left-radius:2px;border-bottom-right-radius:0;border-top-left-radius:2px;border-top-right-radius:0;color:#666}.skin-black .sidebar-form input[type=text]:focus,.skin-black .sidebar-form input[type=text]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-black .sidebar-form input[type=text]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-black .sidebar-form .btn{border-bottom-left-radius:0;border-bottom-right-radius:2px;border-top-left-radius:0;border-top-right-radius:2px;color:#999}.skin-black.layout-top-nav .main-header>.logo .logo-variant{background-color:none}.btn,.btn:hover{color:#000}.btn .btn-primary:link,.btn.btn-primary,.btn:hover .btn-primary:link,.btn:hover.btn-primary{background-color:#505156;border-color:#fff;color:#fff}.btn:hovera.btn-primary:hover,.btna.btn-primary:hover{background-color:#111;border-color:#1f1f21;color:#fff}.btn.btn-white:hover,.btn.btn-white:link,.btn.btn-white:visited,.btn:hover.btn-white:hover,.btn:hover.btn-white:link,.btn:hover.btn-white:visited{color:#fff}a{color:var(--link)}a:hover{color:var(--hover-link)}a:visited{color:var(--visited-link)}.text-primary{color:#000}:root{--button-default:#000;--button-primary:#000;--button-hover:#000;--header:#111;--text-main:#bbb;--text-sub:#9b9b9b;--link:#black;--visited-link:#111;--hover-link:#999;--nav-link:#fff;--light-link:#fff}.btn-danger.btn-sm.disabled,a.btn-danger:link,a.btn-danger:visited,a.btn-info:link,a.btn-info:visited,a.btn-warning:link,a.btn-warning:visited{color:#fff}.far fa-life-ring{color:var(--link)}.sidebar-toggle-mobile{color:#fff!important}.skin-black .main-header .navbar .nav>li>a{text-decoration:none}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#111}.search-highlight,.search-highlight:hover{background-color:#e9d15b}
/*
* Skin: Black
* ----------
*/
.skin-black .main-header .navbar {
background-color: #111;
}
.skin-black .main-header .navbar .nav > li > a {
color: #fff;
}
.skin-black .main-header .navbar .nav > li > a:hover,
.skin-black .main-header .navbar .nav > li > a:active,
.skin-black .main-header .navbar .nav > li > a:focus,
.skin-black .main-header .navbar .nav .open > a,
.skin-black .main-header .navbar .nav .open > a:hover,
.skin-black .main-header .navbar .nav .open > a:focus,
.skin-black .main-header .navbar .nav > .active > a {
background: rgba(0, 0, 0, 0.1);
color: #f6f6f6;
}
.skin-black .main-header .navbar .sidebar-toggle {
color: #fff;
}
.skin-black .main-header .navbar .sidebar-toggle:hover {
color: #f6f6f6;
background: rgba(0, 0, 0, 0.1);
}
.skin-black .main-header .navbar .sidebar-toggle {
color: #fff;
}
.skin-black .main-header .navbar .sidebar-toggle:hover {
background-color: #040404;
}
@media (max-width: 767px) {
.skin-black .main-header .navbar .dropdown-menu li.divider {
background-color: rgba(255, 255, 255, 0.1);
}
.skin-black .main-header .navbar .dropdown-menu li a {
color: #333;
}
.skin-black .main-header .navbar .dropdown-menu li a:hover {
background: #040404;
}
}
.skin-black .main-header li.user-header {
background-color: #111;
}
.skin-black .content-header {
background: transparent;
}
.skin-black .wrapper,
.skin-black .main-sidebar,
.skin-black .left-side {
background-color: #222d32;
}
.skin-black .user-panel > .info,
.skin-black .user-panel > .info > a {
color: #fff;
}
.skin-black .sidebar-menu > li.header {
color: #4b646f;
background: #1a2226;
}
.skin-black .sidebar-menu > li > a {
border-left: 3px solid transparent;
}
.skin-black .sidebar-menu > li:hover > a,
.skin-black .sidebar-menu > li.active > a {
color: #fff;
background: #1e282c;
border-left-color: #111;
}
.skin-black .sidebar-menu > li > .treeview-menu {
margin: 0 1px;
background: #2c3b41;
}
.skin-black .sidebar a {
color: #b8c7ce;
}
.skin-black .sidebar a:hover {
text-decoration: none;
}
.skin-black .treeview-menu > li > a {
color: #8aa4af;
}
.skin-black .treeview-menu > li.active > a,
.skin-black .treeview-menu > li > a:hover {
color: #fff;
}
.skin-black .sidebar-form {
border-radius: 3px;
border: 1px solid #374850;
margin: 10px 10px;
}
.skin-black .sidebar-form input[type="text"],
.skin-black .sidebar-form .btn {
box-shadow: none;
background-color: #374850;
border: 1px solid transparent;
height: 35px;
transition: all 0.3s ease-in-out;
}
.skin-black .sidebar-form input[type="text"] {
color: #666;
border-top-left-radius: 2px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 2px;
}
.skin-black .sidebar-form input[type="text"]:focus,
.skin-black .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
background-color: #fff;
color: #666;
}
.skin-black .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
border-left-color: #fff;
}
.skin-black .sidebar-form .btn {
color: #999;
border-top-left-radius: 0;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 0;
}
.skin-black.layout-top-nav .main-header > .logo .logo-variant {
background-color: none;
}
.btn,
.btn:hover {
color: #000;
}
.btn.btn-primary,
.btn:hover.btn-primary,
.btn .btn-primary:link,
.btn:hover .btn-primary:link {
background-color: #505156;
border-color: #FFF;
color: #FFF;
}
.btna.btn-primary:hover,
.btn:hovera.btn-primary:hover {
background-color: #111;
border-color: #1f1f21;
color: #fff;
}
.btn.btn-white:link,
.btn:hover.btn-white:link {
color: #fff;
}
.btn.btn-white:hover,
.btn:hover.btn-white:hover {
color: #fff;
}
.btn.btn-white:visited,
.btn:hover.btn-white:visited {
color: #fff;
}
a {
color: var(--link);
}
a:hover {
color: var(--hover-link);
}
a:visited {
color: var(--visited-link);
}
.text-primary {
color: #000000;
}
:root {
--button-default: #000000;
--button-primary: #000000;
--button-hover: #000000;
--header: #111;
/* Use same as Header picker */
--text-main: #BBB;
--text-sub: #9b9b9b;
--link: #black;
/* Use same as Header picker, lighten by 70% */
--visited-link: #111;
/* Use same as Header picker, lighten by 70% */
--hover-link: #999999;
/* Use same as Header picker, lighten by 70% */
--nav-link: #FFF;
/* Use same as Header picker */
--light-link: #fff;
/* Use same as Header picker */
}
a.btn-info:link,
a.btn-warning:link,
a.btn-danger:link {
color: #FFF;
}
a.btn-info:visited,
a.btn-warning:visited,
a.btn-danger:visited {
color: #FFF;
}
.btn-danger.btn-sm.disabled {
color: #FFF;
}
.far fa-life-ring {
color: var(--link);
}
.sidebar-toggle-mobile {
color: #FFF !important;
}
.skin-black .main-header .navbar .nav > li > a,
.skin-black .main-header .navbar .nav > li > a {
text-decoration: none;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
background-color: #111;
}
.search-highlight,
.search-highlight:hover {
background-color: #e9d15b;
}

View File

@@ -1 +1,219 @@
.skin-black .main-header .navbar{background-color:#111}.skin-black .main-header .navbar .nav>li>a{color:#fff}.skin-black .main-header .navbar .nav .open>a,.skin-black .main-header .navbar .nav .open>a:focus,.skin-black .main-header .navbar .nav .open>a:hover,.skin-black .main-header .navbar .nav>.active>a,.skin-black .main-header .navbar .nav>li>a:active,.skin-black .main-header .navbar .nav>li>a:focus,.skin-black .main-header .navbar .nav>li>a:hover,.skin-black .main-header .navbar .sidebar-toggle:hover{background:rgba(0,0,0,.1);color:#f6f6f6}.skin-black .main-header .navbar .sidebar-toggle{color:#fff}.skin-black .main-header .navbar .sidebar-toggle:hover{background-color:#040404}@media (max-width:767px){.skin-black .main-header .navbar .dropdown-menu li.divider{background-color:hsla(0,0%,100%,.1)}.skin-black .main-header .navbar .dropdown-menu li a{color:#333}.skin-black .main-header .navbar .dropdown-menu li a:hover{background:#040404}}.skin-black .main-header li.user-header{background-color:#111}.skin-black .content-header{background:0 0}.skin-black .left-side,.skin-black .main-sidebar,.skin-black .wrapper{background-color:#222d32}.skin-black .user-panel>.info,.skin-black .user-panel>.info>a{color:#fff}.skin-black .sidebar-menu>li.header{background:#1a2226;color:#4b646f}.skin-black .sidebar-menu>li>a{border-left:3px solid transparent}.skin-black .sidebar-menu>li.active>a,.skin-black .sidebar-menu>li:hover>a{background:#1e282c;border-left-color:#111;color:#fff}.skin-black .sidebar-menu>li>.treeview-menu{background:#2c3b41;margin:0 1px}.skin-black .sidebar a{color:#b8c7ce}.skin-black .sidebar a:hover{text-decoration:none}.skin-black .treeview-menu>li>a{color:#8aa4af}.skin-black .treeview-menu>li.active>a,.skin-black .treeview-menu>li>a:hover{color:#fff}.skin-black .sidebar-form{border:1px solid #374850;border-radius:3px;margin:10px}.skin-black .sidebar-form .btn,.skin-black .sidebar-form input[type=text]{background-color:#374850;border:1px solid transparent;box-shadow:none;height:35px;transition:all .3s ease-in-out}.skin-black .sidebar-form input[type=text]{border-bottom-left-radius:2px;border-bottom-right-radius:0;border-top-left-radius:2px;border-top-right-radius:0;color:#666}.skin-black .sidebar-form input[type=text]:focus,.skin-black .sidebar-form input[type=text]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-black .sidebar-form input[type=text]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-black .sidebar-form .btn{border-bottom-left-radius:0;border-bottom-right-radius:2px;border-top-left-radius:0;border-top-right-radius:2px;color:#999}.skin-black.layout-top-nav .main-header>.logo .logo-variant{background-color:none}.btn,.btn:hover{color:#000}.btn .btn-primary:link,.btn.btn-primary,.btn:hover .btn-primary:link,.btn:hover.btn-primary{background-color:#505156;border-color:#fff;color:#fff}.btn:hovera.btn-primary:hover,.btna.btn-primary:hover{background-color:#111;border-color:#1f1f21;color:#fff}.btn.btn-white:hover,.btn.btn-white:link,.btn.btn-white:visited,.btn:hover.btn-white:hover,.btn:hover.btn-white:link,.btn:hover.btn-white:visited{color:#fff}a{color:var(--link)}a:hover{color:var(--hover-link)}a:visited{color:var(--visited-link)}.text-primary{color:#000}:root{--button-default:#000;--button-primary:#000;--button-hover:#000;--header:#111;--text-main:#bbb;--text-sub:#9b9b9b;--link:#black;--visited-link:#111;--hover-link:#999;--nav-link:#fff;--light-link:#fff}.btn-danger.btn-sm.disabled,a.btn-danger:link,a.btn-danger:visited,a.btn-info:link,a.btn-info:visited,a.btn-warning:link,a.btn-warning:visited{color:#fff}.far fa-life-ring{color:var(--link)}.sidebar-toggle-mobile{color:#fff!important}.skin-black .main-header .navbar .nav>li>a{text-decoration:none}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#111}.search-highlight,.search-highlight:hover{background-color:#e9d15b}
/*
* Skin: Black
* ----------
*/
.skin-black .main-header .navbar {
background-color: #111;
}
.skin-black .main-header .navbar .nav > li > a {
color: #fff;
}
.skin-black .main-header .navbar .nav > li > a:hover,
.skin-black .main-header .navbar .nav > li > a:active,
.skin-black .main-header .navbar .nav > li > a:focus,
.skin-black .main-header .navbar .nav .open > a,
.skin-black .main-header .navbar .nav .open > a:hover,
.skin-black .main-header .navbar .nav .open > a:focus,
.skin-black .main-header .navbar .nav > .active > a {
background: rgba(0, 0, 0, 0.1);
color: #f6f6f6;
}
.skin-black .main-header .navbar .sidebar-toggle {
color: #fff;
}
.skin-black .main-header .navbar .sidebar-toggle:hover {
color: #f6f6f6;
background: rgba(0, 0, 0, 0.1);
}
.skin-black .main-header .navbar .sidebar-toggle {
color: #fff;
}
.skin-black .main-header .navbar .sidebar-toggle:hover {
background-color: #040404;
}
@media (max-width: 767px) {
.skin-black .main-header .navbar .dropdown-menu li.divider {
background-color: rgba(255, 255, 255, 0.1);
}
.skin-black .main-header .navbar .dropdown-menu li a {
color: #333;
}
.skin-black .main-header .navbar .dropdown-menu li a:hover {
background: #040404;
}
}
.skin-black .main-header li.user-header {
background-color: #111;
}
.skin-black .content-header {
background: transparent;
}
.skin-black .wrapper,
.skin-black .main-sidebar,
.skin-black .left-side {
background-color: #222d32;
}
.skin-black .user-panel > .info,
.skin-black .user-panel > .info > a {
color: #fff;
}
.skin-black .sidebar-menu > li.header {
color: #4b646f;
background: #1a2226;
}
.skin-black .sidebar-menu > li > a {
border-left: 3px solid transparent;
}
.skin-black .sidebar-menu > li:hover > a,
.skin-black .sidebar-menu > li.active > a {
color: #fff;
background: #1e282c;
border-left-color: #111;
}
.skin-black .sidebar-menu > li > .treeview-menu {
margin: 0 1px;
background: #2c3b41;
}
.skin-black .sidebar a {
color: #b8c7ce;
}
.skin-black .sidebar a:hover {
text-decoration: none;
}
.skin-black .treeview-menu > li > a {
color: #8aa4af;
}
.skin-black .treeview-menu > li.active > a,
.skin-black .treeview-menu > li > a:hover {
color: #fff;
}
.skin-black .sidebar-form {
border-radius: 3px;
border: 1px solid #374850;
margin: 10px 10px;
}
.skin-black .sidebar-form input[type="text"],
.skin-black .sidebar-form .btn {
box-shadow: none;
background-color: #374850;
border: 1px solid transparent;
height: 35px;
transition: all 0.3s ease-in-out;
}
.skin-black .sidebar-form input[type="text"] {
color: #666;
border-top-left-radius: 2px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 2px;
}
.skin-black .sidebar-form input[type="text"]:focus,
.skin-black .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
background-color: #fff;
color: #666;
}
.skin-black .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
border-left-color: #fff;
}
.skin-black .sidebar-form .btn {
color: #999;
border-top-left-radius: 0;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 0;
}
.skin-black.layout-top-nav .main-header > .logo .logo-variant {
background-color: none;
}
.btn,
.btn:hover {
color: #000;
}
.btn.btn-primary,
.btn:hover.btn-primary,
.btn .btn-primary:link,
.btn:hover .btn-primary:link {
background-color: #505156;
border-color: #FFF;
color: #FFF;
}
.btna.btn-primary:hover,
.btn:hovera.btn-primary:hover {
background-color: #111;
border-color: #1f1f21;
color: #fff;
}
.btn.btn-white:link,
.btn:hover.btn-white:link {
color: #fff;
}
.btn.btn-white:hover,
.btn:hover.btn-white:hover {
color: #fff;
}
.btn.btn-white:visited,
.btn:hover.btn-white:visited {
color: #fff;
}
a {
color: var(--link);
}
a:hover {
color: var(--hover-link);
}
a:visited {
color: var(--visited-link);
}
.text-primary {
color: #000000;
}
:root {
--button-default: #000000;
--button-primary: #000000;
--button-hover: #000000;
--header: #111;
/* Use same as Header picker */
--text-main: #BBB;
--text-sub: #9b9b9b;
--link: #black;
/* Use same as Header picker, lighten by 70% */
--visited-link: #111;
/* Use same as Header picker, lighten by 70% */
--hover-link: #999999;
/* Use same as Header picker, lighten by 70% */
--nav-link: #FFF;
/* Use same as Header picker */
--light-link: #fff;
/* Use same as Header picker */
}
a.btn-info:link,
a.btn-warning:link,
a.btn-danger:link {
color: #FFF;
}
a.btn-info:visited,
a.btn-warning:visited,
a.btn-danger:visited {
color: #FFF;
}
.btn-danger.btn-sm.disabled {
color: #FFF;
}
.far fa-life-ring {
color: var(--link);
}
.sidebar-toggle-mobile {
color: #FFF !important;
}
.skin-black .main-header .navbar .nav > li > a,
.skin-black .main-header .navbar .nav > li > a {
text-decoration: none;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
background-color: #111;
}
.search-highlight,
.search-highlight:hover {
background-color: #e9d15b;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1,239 @@
.skin-blue .main-header .navbar{background-color:#3c8dbc}.skin-blue .main-header .navbar .nav>li>a{color:#fff}.skin-blue .main-header .navbar .nav .open>a,.skin-blue .main-header .navbar .nav .open>a:focus,.skin-blue .main-header .navbar .nav .open>a:hover,.skin-blue .main-header .navbar .nav>.active>a,.skin-blue .main-header .navbar .nav>li>a:active,.skin-blue .main-header .navbar .nav>li>a:focus,.skin-blue .main-header .navbar .nav>li>a:hover,.skin-blue .main-header .navbar .sidebar-toggle:hover{background:rgba(0,0,0,.1);color:#f6f6f6}.skin-blue .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue .main-header .navbar .sidebar-toggle:hover{background-color:#367fa9}@media (max-width:767px){.skin-blue .main-header .navbar .dropdown-menu li.divider{background-color:hsla(0,0%,100%,.1)}.skin-blue .main-header .navbar .dropdown-menu li a{color:#333}.skin-blue .main-header .navbar .dropdown-menu li a:hover{background:#367fa9}}.skin-blue .main-header li.user-header{background-color:#3c8dbc}.skin-blue .content-header{background:transparent}.skin-blue .left-side,.skin-blue .main-sidebar,.skin-blue .wrapper{background-color:#222d32}.skin-blue .user-panel>.info,.skin-blue .user-panel>.info>a{color:#fff}.skin-blue .sidebar-menu>li.header{background:#1a2226;color:#4b646f}.skin-blue .sidebar-menu>li>a{border-left:3px solid transparent}.skin-blue .sidebar-menu>li.active>a,.skin-blue .sidebar-menu>li:hover>a{background:#1e282c;border-left-color:#3c8dbc;color:#fff}.skin-blue .sidebar-menu>li>.treeview-menu{background:#2c3b41;margin:0 1px}.skin-blue .sidebar a{color:#b8c7ce}.skin-blue .sidebar a:hover{text-decoration:none}.skin-blue .treeview-menu>li>a{color:#8aa4af}.skin-blue .treeview-menu>li.active>a,.skin-blue .treeview-menu>li>a:hover{color:#fff}.skin-blue .sidebar-form{border:1px solid #374850;border-radius:3px;margin:10px}.skin-blue .sidebar-form .btn,.skin-blue .sidebar-form input[type=text]{background-color:#374850;border:1px solid transparent;box-shadow:none;height:35px;transition:all .3s ease-in-out}.skin-blue .sidebar-form input[type=text]{border-bottom-left-radius:2px;border-bottom-right-radius:0;border-top-left-radius:2px;border-top-right-radius:0;color:#666}.skin-blue .sidebar-form input[type=text]:focus,.skin-blue .sidebar-form input[type=text]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-blue .sidebar-form input[type=text]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-blue .sidebar-form .btn{border-bottom-left-radius:0;border-bottom-right-radius:2px;border-top-left-radius:0;border-top-right-radius:2px;color:#999}.skin-blue.layout-top-nav .main-header>.logo .logo-variant{background-color:unset}.btn .btn-primary:link,.btn.btn-primary,.btn:hover .btn-primary:link,.btn:hover.btn-primary,btn-sm .btn-primary:link,btn-sm.btn-primary{background-color:#307095;border-color:#23536f;color:#fff!important}.btn:hovera.btn-primary:hover,.btna.btn-primary:hover,btn-sma.btn-primary:hover{background-color:#23536f;border-color:#23536f;color:#fff}.btn.btn-white:link,.btn:hover.btn-white:link,btn-sm.btn-white:link{background-color:#307095;color:#fff}.btn.btn-white:hover,.btn.btn-white:visited,.btn:hover.btn-white:hover,.btn:hover.btn-white:visited,btn-sm.btn-white:hover,btn-sm.btn-white:visited{background-color:#173648;color:#fff}.btn-danger,.btn-danger:link,.btn-danger:visited,.btn-warning,.btn-warning:link,.btn-warning:visited,a.btn-danger:hover,a.btn-warning:hover{color:#fff}.btn-default:link,.btn-default:visited,a.btn-default:hover{color:#505156}:root{--button-default:#505156;--button-primary:#1d455b;--button-hover:#173648;--header:#3c8dbc;--text-main:#bbb;--text-sub:#9b9b9b;--link:#296282;--visited-link:#5fa4cc;--hover-link:#86bad8;--nav-link:#fff;--light-link:#fff}a.btn-danger:link,a.btn-danger:visited,a.btn-info:link,a.btn-info:visited,a.btn-warning:link,a.btn-warning:visited{color:#fff}a:link{color:var(--link)}a:visited{color:var(--visited-link)}a:hover{color:var(--hover-link)}.text-primary{color:#23536f}.far fa-life-ring{color:var(--link)}.fixed-table-container tbody .selected td{background-color:#fff8af}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#3c8dbc}.search-highlight,.search-highlight:hover{background-color:#e9d15b}a.settings_button:hover,a.settings_button:link,a.settings_button:visited{color:#3c8dbc}
/*
* Skin: Blue
* ----------
*/
.skin-blue .main-header .navbar {
background-color: #3c8dbc;
}
.skin-blue .main-header .navbar .nav > li > a {
color: #fff;
}
.skin-blue .main-header .navbar .nav > li > a:hover,
.skin-blue .main-header .navbar .nav > li > a:active,
.skin-blue .main-header .navbar .nav > li > a:focus,
.skin-blue .main-header .navbar .nav .open > a,
.skin-blue .main-header .navbar .nav .open > a:hover,
.skin-blue .main-header .navbar .nav .open > a:focus,
.skin-blue .main-header .navbar .nav > .active > a {
background: rgba(0, 0, 0, 0.1);
color: #f6f6f6;
}
.skin-blue .main-header .navbar .sidebar-toggle {
color: #fff;
}
.skin-blue .main-header .navbar .sidebar-toggle:hover {
color: #f6f6f6;
background: rgba(0, 0, 0, 0.1);
}
.skin-blue .main-header .navbar .sidebar-toggle {
color: #fff;
}
.skin-blue .main-header .navbar .sidebar-toggle:hover {
background-color: #367fa9;
}
@media (max-width: 767px) {
.skin-blue .main-header .navbar .dropdown-menu li.divider {
background-color: rgba(255, 255, 255, 0.1);
}
.skin-blue .main-header .navbar .dropdown-menu li a {
color: #333;
}
.skin-blue .main-header .navbar .dropdown-menu li a:hover {
background: #367fa9;
}
}
.skin-blue .main-header li.user-header {
background-color: #3c8dbc;
}
.skin-blue .content-header {
background: transparent;
}
.skin-blue .wrapper,
.skin-blue .main-sidebar,
.skin-blue .left-side {
background-color: #222d32;
}
.skin-blue .user-panel > .info,
.skin-blue .user-panel > .info > a {
color: #fff;
}
.skin-blue .sidebar-menu > li.header {
color: #4b646f;
background: #1a2226;
}
.skin-blue .sidebar-menu > li > a {
border-left: 3px solid transparent;
}
.skin-blue .sidebar-menu > li:hover > a,
.skin-blue .sidebar-menu > li.active > a {
color: #fff;
background: #1e282c;
border-left-color: #3c8dbc;
}
.skin-blue .sidebar-menu > li > .treeview-menu {
margin: 0 1px;
background: #2c3b41;
}
.skin-blue .sidebar a {
color: #b8c7ce;
}
.skin-blue .sidebar a:hover {
text-decoration: none;
}
.skin-blue .treeview-menu > li > a {
color: #8aa4af;
}
.skin-blue .treeview-menu > li.active > a,
.skin-blue .treeview-menu > li > a:hover {
color: #fff;
}
.skin-blue .sidebar-form {
border-radius: 3px;
border: 1px solid #374850;
margin: 10px 10px;
}
.skin-blue .sidebar-form input[type="text"],
.skin-blue .sidebar-form .btn {
box-shadow: none;
background-color: #374850;
border: 1px solid transparent;
height: 35px;
transition: all 0.3s ease-in-out;
}
.skin-blue .sidebar-form input[type="text"] {
color: #666;
border-top-left-radius: 2px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 2px;
}
.skin-blue .sidebar-form input[type="text"]:focus,
.skin-blue .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
background-color: #fff;
color: #666;
}
.skin-blue .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
border-left-color: #fff;
}
.skin-blue .sidebar-form .btn {
color: #999;
border-top-left-radius: 0;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 0;
}
.skin-blue.layout-top-nav .main-header > .logo .logo-variant {
background-color: unset;
}
.btn.btn-primary,
btn-sm.btn-primary,
.btn:hover.btn-primary,
.btn .btn-primary:link,
btn-sm .btn-primary:link,
.btn:hover .btn-primary:link {
background-color: #307095;
border-color: #23536f;
color: #fff !important;
}
.btna.btn-primary:hover,
btn-sma.btn-primary:hover,
.btn:hovera.btn-primary:hover {
background-color: #23536f;
border-color: #23536f;
color: #fff;
}
.btn.btn-white:link,
btn-sm.btn-white:link,
.btn:hover.btn-white:link {
background-color: #307095;
color: #fff;
}
.btn.btn-white:hover,
btn-sm.btn-white:hover,
.btn:hover.btn-white:hover {
background-color: #173648;
color: #fff;
}
.btn.btn-white:visited,
btn-sm.btn-white:visited,
.btn:hover.btn-white:visited {
background-color: #173648;
color: #fff;
}
.btn-warning,
.btn-warning:link,
a.btn-warning:hover,
.btn-warning:link,
.btn-warning:visited,
.btn-danger,
.btn-danger:link,
a.btn-danger:hover,
.btn-danger:link,
.btn-danger:visited {
color: #fff;
}
.btn-default:link,
a.btn-default:hover,
.btn-default:visited {
color: #505156;
}
:root {
--button-default: #505156;
--button-primary: #1d455b;
--button-hover: #173648;
--header: #3c8dbc;
/* Use same as Header picker */
--text-main: #BBB;
--text-sub: #9b9b9b;
--link: #296282;
/* Use same as Header picker, lighten by 70% */
--visited-link: #5fa4cc;
/* Use same as Header picker, lighten by 70% */
--hover-link: #86bad8;
/* Use same as Header picker, lighten by 70% */
--nav-link: #FFF;
/* Use same as Header picker */
--light-link: #fff;
/* Use same as Header picker */
}
a.btn-info:link,
a.btn-warning:link,
a.btn-danger:link {
color: #FFF;
}
a.btn-info:visited,
a.btn-warning:visited,
a.btn-danger:visited {
color: #FFF;
}
a:link {
color: var(--link);
}
a:visited {
color: var(--visited-link);
}
a:hover {
color: var(--hover-link);
}
.text-primary {
color: #23536f;
}
.far fa-life-ring {
color: var(--link);
}
.fixed-table-container tbody .selected td {
background-color: #fff8af;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
background-color: #3c8dbc;
}
.search-highlight,
.search-highlight:hover {
background-color: #e9d15b;
}
a.settings_button:link,
a.settings_button:visited,
a.settings_button:hover {
color: #3c8dbc;
}

View File

@@ -1 +1,239 @@
.skin-blue .main-header .navbar{background-color:#3c8dbc}.skin-blue .main-header .navbar .nav>li>a{color:#fff}.skin-blue .main-header .navbar .nav .open>a,.skin-blue .main-header .navbar .nav .open>a:focus,.skin-blue .main-header .navbar .nav .open>a:hover,.skin-blue .main-header .navbar .nav>.active>a,.skin-blue .main-header .navbar .nav>li>a:active,.skin-blue .main-header .navbar .nav>li>a:focus,.skin-blue .main-header .navbar .nav>li>a:hover,.skin-blue .main-header .navbar .sidebar-toggle:hover{background:rgba(0,0,0,.1);color:#f6f6f6}.skin-blue .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue .main-header .navbar .sidebar-toggle:hover{background-color:#367fa9}@media (max-width:767px){.skin-blue .main-header .navbar .dropdown-menu li.divider{background-color:hsla(0,0%,100%,.1)}.skin-blue .main-header .navbar .dropdown-menu li a{color:#333}.skin-blue .main-header .navbar .dropdown-menu li a:hover{background:#367fa9}}.skin-blue .main-header li.user-header{background-color:#3c8dbc}.skin-blue .content-header{background:0 0}.skin-blue .left-side,.skin-blue .main-sidebar,.skin-blue .wrapper{background-color:#222d32}.skin-blue .user-panel>.info,.skin-blue .user-panel>.info>a{color:#fff}.skin-blue .sidebar-menu>li.header{background:#1a2226;color:#4b646f}.skin-blue .sidebar-menu>li>a{border-left:3px solid transparent}.skin-blue .sidebar-menu>li.active>a,.skin-blue .sidebar-menu>li:hover>a{background:#1e282c;border-left-color:#3c8dbc;color:#fff}.skin-blue .sidebar-menu>li>.treeview-menu{background:#2c3b41;margin:0 1px}.skin-blue .sidebar a{color:#b8c7ce}.skin-blue .sidebar a:hover{text-decoration:none}.skin-blue .treeview-menu>li>a{color:#8aa4af}.skin-blue .treeview-menu>li.active>a,.skin-blue .treeview-menu>li>a:hover{color:#fff}.skin-blue .sidebar-form{border:1px solid #374850;border-radius:3px;margin:10px}.skin-blue .sidebar-form .btn,.skin-blue .sidebar-form input[type=text]{background-color:#374850;border:1px solid transparent;box-shadow:none;height:35px;transition:all .3s ease-in-out}.skin-blue .sidebar-form input[type=text]{border-bottom-left-radius:2px;border-bottom-right-radius:0;border-top-left-radius:2px;border-top-right-radius:0;color:#666}.skin-blue .sidebar-form input[type=text]:focus,.skin-blue .sidebar-form input[type=text]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-blue .sidebar-form input[type=text]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-blue .sidebar-form .btn{border-bottom-left-radius:0;border-bottom-right-radius:2px;border-top-left-radius:0;border-top-right-radius:2px;color:#999}.skin-blue.layout-top-nav .main-header>.logo .logo-variant{background-color:unset}.btn .btn-primary:link,.btn.btn-primary,.btn:hover .btn-primary:link,.btn:hover.btn-primary,btn-sm .btn-primary:link,btn-sm.btn-primary{background-color:#307095;border-color:#23536f;color:#fff!important}.btn:hovera.btn-primary:hover,.btna.btn-primary:hover,btn-sma.btn-primary:hover{background-color:#23536f;border-color:#23536f;color:#fff}.btn.btn-white:link,.btn:hover.btn-white:link,btn-sm.btn-white:link{background-color:#307095;color:#fff}.btn.btn-white:hover,.btn.btn-white:visited,.btn:hover.btn-white:hover,.btn:hover.btn-white:visited,btn-sm.btn-white:hover,btn-sm.btn-white:visited{background-color:#173648;color:#fff}.btn-danger,.btn-danger:link,.btn-danger:visited,.btn-warning,.btn-warning:link,.btn-warning:visited,a.btn-danger:hover,a.btn-warning:hover{color:#fff}.btn-default:link,.btn-default:visited,a.btn-default:hover{color:#505156}:root{--button-default:#505156;--button-primary:#1d455b;--button-hover:#173648;--header:#3c8dbc;--text-main:#bbb;--text-sub:#9b9b9b;--link:#296282;--visited-link:#5fa4cc;--hover-link:#86bad8;--nav-link:#fff;--light-link:#fff}a.btn-danger:link,a.btn-danger:visited,a.btn-info:link,a.btn-info:visited,a.btn-warning:link,a.btn-warning:visited{color:#fff}a:link{color:var(--link)}a:visited{color:var(--visited-link)}a:hover{color:var(--hover-link)}.text-primary{color:#23536f}.far fa-life-ring{color:var(--link)}.fixed-table-container tbody .selected td{background-color:#fff8af}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#3c8dbc}.search-highlight,.search-highlight:hover{background-color:#e9d15b}a.settings_button:hover,a.settings_button:link,a.settings_button:visited{color:#3c8dbc}
/*
* Skin: Blue
* ----------
*/
.skin-blue .main-header .navbar {
background-color: #3c8dbc;
}
.skin-blue .main-header .navbar .nav > li > a {
color: #fff;
}
.skin-blue .main-header .navbar .nav > li > a:hover,
.skin-blue .main-header .navbar .nav > li > a:active,
.skin-blue .main-header .navbar .nav > li > a:focus,
.skin-blue .main-header .navbar .nav .open > a,
.skin-blue .main-header .navbar .nav .open > a:hover,
.skin-blue .main-header .navbar .nav .open > a:focus,
.skin-blue .main-header .navbar .nav > .active > a {
background: rgba(0, 0, 0, 0.1);
color: #f6f6f6;
}
.skin-blue .main-header .navbar .sidebar-toggle {
color: #fff;
}
.skin-blue .main-header .navbar .sidebar-toggle:hover {
color: #f6f6f6;
background: rgba(0, 0, 0, 0.1);
}
.skin-blue .main-header .navbar .sidebar-toggle {
color: #fff;
}
.skin-blue .main-header .navbar .sidebar-toggle:hover {
background-color: #367fa9;
}
@media (max-width: 767px) {
.skin-blue .main-header .navbar .dropdown-menu li.divider {
background-color: rgba(255, 255, 255, 0.1);
}
.skin-blue .main-header .navbar .dropdown-menu li a {
color: #333;
}
.skin-blue .main-header .navbar .dropdown-menu li a:hover {
background: #367fa9;
}
}
.skin-blue .main-header li.user-header {
background-color: #3c8dbc;
}
.skin-blue .content-header {
background: transparent;
}
.skin-blue .wrapper,
.skin-blue .main-sidebar,
.skin-blue .left-side {
background-color: #222d32;
}
.skin-blue .user-panel > .info,
.skin-blue .user-panel > .info > a {
color: #fff;
}
.skin-blue .sidebar-menu > li.header {
color: #4b646f;
background: #1a2226;
}
.skin-blue .sidebar-menu > li > a {
border-left: 3px solid transparent;
}
.skin-blue .sidebar-menu > li:hover > a,
.skin-blue .sidebar-menu > li.active > a {
color: #fff;
background: #1e282c;
border-left-color: #3c8dbc;
}
.skin-blue .sidebar-menu > li > .treeview-menu {
margin: 0 1px;
background: #2c3b41;
}
.skin-blue .sidebar a {
color: #b8c7ce;
}
.skin-blue .sidebar a:hover {
text-decoration: none;
}
.skin-blue .treeview-menu > li > a {
color: #8aa4af;
}
.skin-blue .treeview-menu > li.active > a,
.skin-blue .treeview-menu > li > a:hover {
color: #fff;
}
.skin-blue .sidebar-form {
border-radius: 3px;
border: 1px solid #374850;
margin: 10px 10px;
}
.skin-blue .sidebar-form input[type="text"],
.skin-blue .sidebar-form .btn {
box-shadow: none;
background-color: #374850;
border: 1px solid transparent;
height: 35px;
transition: all 0.3s ease-in-out;
}
.skin-blue .sidebar-form input[type="text"] {
color: #666;
border-top-left-radius: 2px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 2px;
}
.skin-blue .sidebar-form input[type="text"]:focus,
.skin-blue .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
background-color: #fff;
color: #666;
}
.skin-blue .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
border-left-color: #fff;
}
.skin-blue .sidebar-form .btn {
color: #999;
border-top-left-radius: 0;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 0;
}
.skin-blue.layout-top-nav .main-header > .logo .logo-variant {
background-color: unset;
}
.btn.btn-primary,
btn-sm.btn-primary,
.btn:hover.btn-primary,
.btn .btn-primary:link,
btn-sm .btn-primary:link,
.btn:hover .btn-primary:link {
background-color: #307095;
border-color: #23536f;
color: #fff !important;
}
.btna.btn-primary:hover,
btn-sma.btn-primary:hover,
.btn:hovera.btn-primary:hover {
background-color: #23536f;
border-color: #23536f;
color: #fff;
}
.btn.btn-white:link,
btn-sm.btn-white:link,
.btn:hover.btn-white:link {
background-color: #307095;
color: #fff;
}
.btn.btn-white:hover,
btn-sm.btn-white:hover,
.btn:hover.btn-white:hover {
background-color: #173648;
color: #fff;
}
.btn.btn-white:visited,
btn-sm.btn-white:visited,
.btn:hover.btn-white:visited {
background-color: #173648;
color: #fff;
}
.btn-warning,
.btn-warning:link,
a.btn-warning:hover,
.btn-warning:link,
.btn-warning:visited,
.btn-danger,
.btn-danger:link,
a.btn-danger:hover,
.btn-danger:link,
.btn-danger:visited {
color: #fff;
}
.btn-default:link,
a.btn-default:hover,
.btn-default:visited {
color: #505156;
}
:root {
--button-default: #505156;
--button-primary: #1d455b;
--button-hover: #173648;
--header: #3c8dbc;
/* Use same as Header picker */
--text-main: #BBB;
--text-sub: #9b9b9b;
--link: #296282;
/* Use same as Header picker, lighten by 70% */
--visited-link: #5fa4cc;
/* Use same as Header picker, lighten by 70% */
--hover-link: #86bad8;
/* Use same as Header picker, lighten by 70% */
--nav-link: #FFF;
/* Use same as Header picker */
--light-link: #fff;
/* Use same as Header picker */
}
a.btn-info:link,
a.btn-warning:link,
a.btn-danger:link {
color: #FFF;
}
a.btn-info:visited,
a.btn-warning:visited,
a.btn-danger:visited {
color: #FFF;
}
a:link {
color: var(--link);
}
a:visited {
color: var(--visited-link);
}
a:hover {
color: var(--hover-link);
}
.text-primary {
color: #23536f;
}
.far fa-life-ring {
color: var(--link);
}
.fixed-table-container tbody .selected td {
background-color: #fff8af;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
background-color: #3c8dbc;
}
.search-highlight,
.search-highlight:hover {
background-color: #e9d15b;
}
a.settings_button:link,
a.settings_button:visited,
a.settings_button:hover {
color: #3c8dbc;
}

Some files were not shown because too many files have changed in this diff Show More