Compare commits

...

2383 Commits

Author SHA1 Message Date
snipe
55d0c4021d Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-10-16 20:19:03 +01:00
snipe
2218cff7bc Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2023-10-16 20:18:33 +01:00
snipe
8c4bf74f93 Commented out noisy debugging
Signed-off-by: snipe <snipe@snipe.net>
2023-10-14 20:43:18 +01:00
snipe
4e3d5707ce Use singleton for offset
Signed-off-by: snipe <snipe@snipe.net>
2023-10-14 20:39:52 +01:00
snipe
37858d870a Merge remote-tracking branch 'origin/develop' 2023-10-13 19:58:37 +01:00
snipe
b1f158ba5a Merge pull request #13749 from snipe/bug/sc-23473
Handle case where value is deleted in history
2023-10-13 19:58:19 +01:00
snipe
a92a9d7616 Removed duplicated deleted
Signed-off-by: snipe <snipe@snipe.net>
2023-10-13 19:53:11 +01:00
snipe
8f23a45cb3 Removed dummy text
Signed-off-by: snipe <snipe@snipe.net>
2023-10-13 19:49:03 +01:00
snipe
93cccf4f5f Handle case where value is deleted in history
Signed-off-by: snipe <snipe@snipe.net>
2023-10-13 19:32:09 +01:00
snipe
dcdc294135 Merge remote-tracking branch 'origin/develop' 2023-10-13 12:40:30 +01:00
snipe
04f6f39588 Merge pull request #13748 from snipe/bug/sc-23830
Fixed #13723 - race condition on asset observer for older migration
2023-10-13 12:40:14 +01:00
snipe
ca1420c9bd Added the temp column back in
Signed-off-by: snipe <snipe@snipe.net>
2023-10-13 12:39:28 +01:00
snipe
2537d0fdaf Added comments
Signed-off-by: snipe <snipe@snipe.net>
2023-10-13 12:34:46 +01:00
snipe
b2aed7feea Removed temp column
Signed-off-by: snipe <snipe@snipe.net>
2023-10-13 12:30:26 +01:00
snipe
ea960c39bb Check if the eol_explicit column exists yet, add it if not
Signed-off-by: snipe <snipe@snipe.net>
2023-10-13 12:19:32 +01:00
snipe
0b39591d88 Add the eol_explicit column earlier to accomodate the observer
Signed-off-by: snipe <snipe@snipe.net>
2023-10-13 12:18:58 +01:00
snipe
c14a01eb8b Added comments to explain the potential race condition
Signed-off-by: snipe <snipe@snipe.net>
2023-10-13 12:18:19 +01:00
snipe
2a9ed09f77 Merge remote-tracking branch 'origin/develop' 2023-10-13 10:03:18 +01:00
snipe
b96e77268a Merge pull request #13745 from spencerrlongg/bug/table_prefix_migration_fix
Resolves issue with migrations with table prefixes
2023-10-13 08:49:28 +01:00
spencerrlongg
f3bd23da3d rm whitespace 2023-10-12 14:53:17 -05:00
spencerrlongg
9b53b0fedc resolve issue with migrations with table prefixes 2023-10-12 14:50:12 -05:00
snipe
0d2f43c04f Merge remote-tracking branch 'origin/develop' 2023-10-11 12:00:54 +01:00
snipe
138ec33555 Merge pull request #13733 from marcusmoore/bug/sc-23453
Fixed notification logic to ensure check in and out emails are delivered
2023-10-11 12:00:37 +01:00
snipe
e99d307350 Merge pull request #13734 from marcusmoore/bug/sc-23661
Fixed the storing of group permissions when creating via API
2023-10-11 03:46:49 +01:00
Marcus Moore
417f9c21e4 Fix the storing of group permissions when creating via API 2023-10-10 17:51:29 -07:00
Marcus Moore
43b9e6401c Formatting 2023-10-10 15:18:55 -07:00
Marcus Moore
dae9e6d096 Improve try catch blocks 2023-10-10 15:18:37 -07:00
Marcus Moore
9ef598d07b Apply changes to exception handling for check outs to check ins 2023-10-10 15:16:12 -07:00
Marcus Moore
2a29566458 Catch all ClientExceptions on check out 2023-10-10 15:15:02 -07:00
Marcus Moore
ab3a3de59b Fire webhook notification after sending emails 2023-10-10 15:13:46 -07:00
Marcus Moore
47a77eabf2 Avoid logging error messages for webhook request failures 2023-10-10 15:06:08 -07:00
snipe
1f0dadb58d Merge remote-tracking branch 'origin/develop' 2023-10-09 16:43:24 +01:00
snipe
f685ba01b6 Reversed order of find
Signed-off-by: snipe <snipe@snipe.net>
2023-10-09 16:43:14 +01:00
snipe
e3591dc756 Merge pull request #13728 from snipe/fixes/13725_for_dev
Fixes qty remaining requirements for component checkout via API
2023-10-09 16:34:40 +01:00
snipe
0fbe63d0cf Add @Singrity as a contributor 2023-10-09 16:33:00 +01:00
snipe
b9dc7f88d0 Fix qty requirements for Components API checkout
Signed-off-by: snipe <snipe@snipe.net>
2023-10-09 16:32:30 +01:00
snipe
f6527e0b42 Merge pull request #13727 from snipe/security/huntr_43206801-9862-48da-b379-e55e341d78bf
Set resend acceptance to POST
2023-10-09 16:15:27 +01:00
snipe
866bbe5e11 Removed extra debugging
Signed-off-by: snipe <snipe@snipe.net>
2023-10-09 16:15:14 +01:00
snipe
6d55d78280 Set resend acceptance to POST
Signed-off-by: snipe <snipe@snipe.net>
2023-10-09 16:13:41 +01:00
snipe
2789f67bb4 Merge remote-tracking branch 'origin/develop' 2023-10-09 15:19:29 +01:00
snipe
7a0d3f788f Merge pull request #13726 from snipe/fixes/tighter_checkin_on_log_match
Added tighter controls for matching log ID and item_id
2023-10-09 15:19:10 +01:00
snipe
e5f5802235 Added tighter controls for matching log ID and item_id
Signed-off-by: snipe <snipe@snipe.net>
2023-10-09 15:17:03 +01:00
snipe
a1f3a5c624 Merge remote-tracking branch 'origin/develop' 2023-10-07 11:34:49 +01:00
snipe
d2dc3253ab Cast the request limit to intval before we try to abs()
Signed-off-by: snipe <snipe@snipe.net>
2023-10-07 11:34:37 +01:00
snipe
d9a1dab827 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/mix-manifest.json
2023-10-06 20:17:59 +01:00
snipe
5277f7cc5c Dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-10-06 20:14:44 +01:00
snipe
25a5507d9d Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2023-10-06 20:07:35 +01:00
snipe
a95fae0e94 Merge remote-tracking branch 'origin/develop' 2023-10-06 20:00:12 +01:00
snipe
890efb18d8 Merge pull request #13720 from snipe/security/huntr_dev_d6ed5ac1-2ad6-45fd-9492-979820bf60c8
Fixed missing escaping asset history old/new values
2023-10-06 19:59:42 +01:00
snipe
eea2eabaee Escaping asset history old/new values
Signed-off-by: snipe <snipe@snipe.net>
2023-10-06 19:45:23 +01:00
snipe
9596826259 Merge branch 'master' of https://github.com/snipe/snipe-it 2023-10-06 19:04:44 +01:00
snipe
cd3b4754e8 Merge pull request #13704 from Godmartinz/feature/sc-23571_v2
Added a check-in button on components tab of Asset view
2023-10-05 14:28:37 +01:00
snipe
1dab4b59e9 Merge pull request #13693 from Godmartinz/bug/sc-9955
added proper margin-top to sidebar menu on bigger resolutions
2023-10-05 14:27:25 +01:00
snipe
05dd2b4008 Merge pull request #13709 from spencerrlongg/eol-migration
Speed up EOL Migration
2023-10-05 14:26:47 +01:00
snipe
b809625856 Merge pull request #13713 from snipe/security/13685
[Snyk] Security upgrade css-loader from 4.3.0 to 5.0.0 #13685
2023-10-05 14:13:35 +01:00
snipe
8d921359ca [Snyk] Security upgrade css-loader from 4.3.0 to 5.0.0 #13685
Signed-off-by: snipe <snipe@snipe.net>
2023-10-05 14:12:36 +01:00
spencerrlongg
c07c0c0f74 cleanup 2023-10-04 16:55:35 -05:00
spencerrlongg
cc82e86eeb one more check 2023-10-04 16:54:56 -05:00
spencerrlongg
8c9961aba8 refactor 2023-10-04 15:40:42 -05:00
spencerrlongg
46af40bd02 ????? 2023-10-04 15:20:16 -05:00
spencerrlongg
6cda9056b8 oops 2023-10-04 14:56:18 -05:00
spencerrlongg
101bd9c404 kill transaction, try update array 2023-10-04 14:47:14 -05:00
spencerrlongg
ad6b502005 comments 2023-10-04 14:37:18 -05:00
spencerrlongg
cb10c7af27 oops 2023-10-04 14:33:35 -05:00
spencerrlongg
99d409c0a5 transaction 2023-10-04 14:32:28 -05:00
Godfrey M
37c1d6fc04 removed unnecessary changes 2023-10-03 12:45:13 -07:00
Godfrey M
c69958d95d removed dead space 2023-10-03 12:32:24 -07:00
Godfrey M
92776adb93 remove unnecessary changes 2023-10-03 12:31:58 -07:00
Godfrey M
dee36fc294 adds component checkin to asset tab 2023-10-03 12:30:08 -07:00
snipe
a2773aa895 Merge pull request #13696 from marcusmoore/bug/sc-23796
Fixed potential call to a member function toArray() on null
2023-10-03 11:01:40 +01:00
Marcus Moore
e82fec2a5f Grammar fix 2023-10-02 16:19:20 -07:00
Marcus Moore
db4c86a4f4 Filter null field options before attempting to process them 2023-10-02 16:14:20 -07:00
snipe
8384786e8b Merge pull request #13695 from marcusmoore/bug/sc-23795-to-master
Log non-compliant barcode error as debug message
2023-10-02 22:22:26 +01:00
Marcus Moore
a5fd218c23 Log non-compliant barcode error as debug message 2023-10-02 14:19:52 -07:00
snipe
d2435c6f86 Merge remote-tracking branch 'origin/develop' 2023-10-02 22:14:08 +01:00
snipe
1abcc8b802 Merge pull request #13694 from marcusmoore/bug/sc-23795
Logs non-compliant barcode error as debug message
2023-10-02 22:13:19 +01:00
Marcus Moore
724c054838 Log non-compliant barcode error as debug message 2023-10-02 12:06:24 -07:00
Godfrey M
1e8f90bcf0 gives proper margin-top to sidebar menu on bigger resolutions 2023-10-02 11:46:08 -07:00
snipe
129e9b90dc Merge pull request #13585 from spencerrlongg/eol_2
Standardize Asset EOL Date
2023-10-02 16:09:22 +01:00
snipe
4e6764428e Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-10-02 14:29:59 +01:00
snipe
c7b8880d69 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2023-10-02 14:28:59 +01:00
snipe
228f21ed91 Merge pull request #13690 from snipe/localization/all
Updated language strings
2023-10-02 14:24:52 +01:00
snipe
b7c390a257 Updated language strings
Signed-off-by: snipe <snipe@snipe.net>
2023-10-02 14:23:22 +01:00
snipe
c45ede2d17 Merge remote-tracking branch 'origin/develop' 2023-09-29 19:00:27 +01:00
snipe
758d808772 Merge pull request #13683 from snipe/bug/sc-17602
Fixed consumable user view route name
2023-09-29 15:17:23 +01:00
snipe
754ec7563a Fixed consumable user view route name
Signed-off-by: snipe <snipe@snipe.net>
2023-09-29 15:15:03 +01:00
snipe
352e53a036 Merge remote-tracking branch 'origin/develop' 2023-09-29 01:51:40 +01:00
snipe
0184d25a95 Merge pull request #13681 from marcusmoore/bug/sc-23778
Fixed uncaught type error when attempting to render barcodes with invalid characters
2023-09-29 01:50:07 +01:00
Marcus Moore
bed1055c4e Catch TypeError when rendering 1d barcode 2023-09-28 17:32:16 -07:00
Marcus Moore
41eccaeae0 Set dummy asset tag to value that is valid for EAN13 2023-09-28 17:31:45 -07:00
snipe
c1f545a523 Merge pull request #13679 from Godmartinz/bug/sc-23688
Fixed General Webhooks error messaging and validation
2023-09-28 20:24:09 +01:00
Godfrey M
8792d654b6 added translations for messages 2023-09-28 12:15:17 -07:00
Godfrey M
f8730adb11 removed unnecessary changes 2023-09-28 11:41:43 -07:00
Godfrey M
c21586dee5 adds better error messaging 2023-09-28 11:29:46 -07:00
snipe
581e56198c Merge remote-tracking branch 'origin/develop' 2023-09-28 19:24:48 +01:00
snipe
f16e81e0e8 Merge pull request #13678 from spencerrlongg/bug/sc-23596
Fieldset Properly Sortable in Asset Models Table
2023-09-28 19:24:04 +01:00
snipe
3de656f5c6 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/js/build/app.js
#	public/js/dist/all.js
#	public/mix-manifest.json
2023-09-28 19:20:27 +01:00
snipe
3b4004ac18 Merge pull request #13677 from snipe/feature/sc-14880
Set modal focus to modal-name field
2023-09-28 19:18:16 +01:00
snipe
0bf423cda9 Set modal focus to modal-name field
Signed-off-by: snipe <snipe@snipe.net>
2023-09-28 19:16:40 +01:00
spencerrlongg
a54fab5c33 add fieldset to allowed_columns 2023-09-28 13:02:12 -05:00
snipe
96c6c93197 Merge pull request #13674 from snipe/bug/sc-23774
Fixed bug where license checkout/checkin notes were not being saved
2023-09-28 18:37:47 +01:00
spencerrlongg
4d67c72eea scope and switch case in api 2023-09-28 12:26:23 -05:00
snipe
6fa0d42bc2 Fixed bug where license checkout/checkin notes were not being saved
Signed-off-by: snipe <snipe@snipe.net>
2023-09-28 15:40:18 +01:00
snipe
cfe6b07b3a Updated prod assets
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/all.css
#	public/css/dist/bootstrap-table.css
#	public/js/build/vendor.js
#	public/js/dist/all.js
#	public/mix-manifest.json
2023-09-28 15:15:50 +01:00
snipe
7512400b56 Merge pull request #13672 from snipe/feature/sc-23772
Fixed #13662 - added clipboard.js
2023-09-28 15:13:42 +01:00
snipe
1acb14a39f Moved dragtable css
Signed-off-by: snipe <snipe@snipe.net>
2023-09-28 15:12:44 +01:00
snipe
bb7a41628a Fixed #13662 - added clipboard.js
Signed-off-by: snipe <snipe@snipe.net>
2023-09-28 15:06:55 +01:00
snipe
68c9fac971 Merge remote-tracking branch 'origin/develop' 2023-09-28 14:25:31 +01:00
snipe
402ff58628 Merge pull request #13671 from snipe/bug/sc-23773
Fixed #13670 - order number missing from license import
2023-09-28 14:24:49 +01:00
snipe
492fb15036 Fixed #13670 - order number missing from license import
Signed-off-by: snipe <snipe@snipe.net>
2023-09-28 14:24:07 +01:00
snipe
ac7f85fea9 Merge remote-tracking branch 'origin/develop' 2023-09-28 03:32:57 +01:00
snipe
cc4cb14e9d Merge pull request #13667 from snipe/bug/sc-23771
Fixed #13658 for asset history with encrypted fields
2023-09-28 03:29:06 +01:00
snipe
ee72c92d4f Fix for asset history with enfrypted fields
Signed-off-by: snipe <snipe@snipe.net>
2023-09-28 03:00:49 +01:00
snipe
3aeea007b2 Merge remote-tracking branch 'origin/develop' 2023-09-26 15:26:21 +01:00
snipe
048ad57418 Merge pull request #13657 from snipe/fixes/revert_column_sorting_temp
Commented out sortable columns
2023-09-26 15:25:58 +01:00
snipe
7bcb28d8fd Commented out sortable columns
Signed-off-by: snipe <snipe@snipe.net>
2023-09-26 15:24:20 +01:00
snipe
660abeca9e Merge pull request #13638 from marcusmoore/bug/sc-20704
Fixed exception being thrown when selected import was deleted
2023-09-26 15:00:35 +01:00
snipe
0c31d5749c Merge remote-tracking branch 'origin/develop' 2023-09-26 14:47:25 +01:00
snipe
1509339b68 Merge pull request #13655 from snipe/bug/sc-23759
Fixed bug where checkout to location would throw an error if FMCS was enabled
2023-09-26 14:37:36 +01:00
snipe
81ae32d3f9 Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2023-09-26 14:33:51 +01:00
snipe
279e6c7e4f Check for null company ID
Signed-off-by: snipe <snipe@snipe.net>
2023-09-26 14:33:42 +01:00
snipe
16498fdcf8 Merge remote-tracking branch 'origin/develop' 2023-09-25 13:46:33 +01:00
snipe
81a982fd77 Merge pull request #13650 from snipe/features/more_info_in_settings
Features/more info in settings
2023-09-25 13:46:00 +01:00
snipe
619712b927 Fixed table
Signed-off-by: snipe <snipe@snipe.net>
2023-09-25 13:45:46 +01:00
snipe
359cd2a267 A few more config options
Signed-off-by: snipe <snipe@snipe.net>
2023-09-25 13:28:13 +01:00
snipe
13bee63fe9 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-09-25 10:59:09 +01:00
snipe
f6317695f9 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2023-09-25 10:58:14 +01:00
snipe
e4696138ba Merge pull request #13647 from snipe/localization/new_translations
Localization/new translations
2023-09-25 10:57:02 +01:00
snipe
bd0863d9c7 Added new translations
Signed-off-by: snipe <snipe@snipe.net>
2023-09-25 10:54:46 +01:00
snipe
28cd0085b7 Added Khmer as an available language
Signed-off-by: snipe <snipe@snipe.net>
2023-09-25 10:54:32 +01:00
snipe
456d55c3bd Added some mail settings to /settings for easier reference
Signed-off-by: snipe <snipe@snipe.net>
2023-09-21 16:14:47 +01:00
Marcus Moore
5a88a64ebd Remove unnecessary redirect 2023-09-20 17:35:34 -07:00
Marcus Moore
b1199100a0 Display error message if import file deleted before it can be selected 2023-09-20 17:22:12 -07:00
Godfrey M
b7901ae2d8 dont allow redirects, messaging applied, general webhook validation applied 2023-09-20 12:54:34 -07:00
spencerrlongg
4660a2e5b7 rm more duplicate 2023-09-20 14:37:32 -05:00
spencerrlongg
a9123754f5 remove unnecessary code 2023-09-20 14:34:42 -05:00
spencerrlongg
cbef531811 parse purchase date even though it's cast 2023-09-20 14:26:49 -05:00
spencerrlongg
7dab59c98d fix for no eol, fix for optional in view 2023-09-20 14:17:30 -05:00
spencerrlongg
c48a47936c add validation back in 2023-09-20 14:00:59 -05:00
snipe
7c908fecd9 Merge pull request #12992 from spencerrlongg/features/12853
Adds tag for docker builds
2023-09-20 19:36:22 +01:00
snipe
cdd0de15b5 Merge pull request #13634 from marcusmoore/chore/add-factories-to-autolabeler
Added factories to autolabeler action
2023-09-20 17:51:34 +01:00
snipe
46981da400 Merge pull request #13635 from marcusmoore/bug/sc-23715
Added unique() to some factory properties
2023-09-20 17:51:22 +01:00
Godfrey M
66abf8d5c0 redoing logic 2023-09-19 17:46:29 -07:00
spencerrlongg
2ace24b176 csv header 2023-09-19 19:38:59 -05:00
spencerrlongg
d65d1930e4 asset models 2023-09-19 19:24:53 -05:00
Marcus Moore
90e75a3e2c Add unique() to some factory properties 2023-09-19 17:02:18 -07:00
spencerrlongg
2d59517c35 rm !empty 2023-09-19 18:40:23 -05:00
spencerrlongg
3cb906a05f pushing to switch branches and test 2023-09-19 18:23:06 -05:00
Marcus Moore
cd538a4ad8 Add factories to autolabeler action 2023-09-19 16:07:26 -07:00
spencerrlongg
6b4f8f1813 rm duplicate fillable 2023-09-19 18:07:15 -05:00
spencerrlongg
929e107a20 rm byod from casts 2023-09-19 18:04:16 -05:00
snipe
5a5b07f5a5 Merge remote-tracking branch 'origin/develop' 2023-09-19 10:22:59 +01:00
snipe
439c2e095d Merge pull request #13629 from snipe/bug/sc-23745
Fixed #13628 - removed duplicate favicon tag
2023-09-19 10:22:36 +01:00
snipe
14c0517927 Fixed #13628 - removed duplicate favicon tag
Signed-off-by: snipe <snipe@snipe.net>
2023-09-19 10:21:38 +01:00
snipe
d84d26febf Merge remote-tracking branch 'origin/develop' 2023-09-18 22:31:41 +01:00
snipe
753a5f789e Merge pull request #13623 from snipe/fixes/dependabot_target
Made develop the target branch for dependabot
2023-09-18 22:31:11 +01:00
snipe
d7790cd16b Updated assets
Signed-off-by: snipe <snipe@snipe.net>
2023-09-18 22:24:15 +01:00
snipe
8ecc0651ed Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/all.css
#	public/css/dist/bootstrap-table.css
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
2023-09-18 22:23:58 +01:00
snipe
a8b2089275 Merge pull request #13627 from snipe/fixes/dependabot_13616
Replaces #13616 - Bump docker/metadata-action from 4 to 5
2023-09-18 22:20:06 +01:00
snipe
a46a11d554 Replaces #13616 - Bump docker/metadata-action from 4 to 5
Signed-off-by: snipe <snipe@snipe.net>
2023-09-18 22:19:31 +01:00
snipe
d444b620c5 Merge pull request #13626 from snipe/fixes/dependabot_13617
Replaces #13617 - Bump docker/setup-buildx-action from 2 to 3
2023-09-18 22:18:04 +01:00
snipe
10dcd8166b Replaces #13617 - Bump docker/setup-buildx-action from 2 to 3
Signed-off-by: snipe <snipe@snipe.net>
2023-09-18 22:17:24 +01:00
snipe
00df449e0b Merge pull request #13625 from snipe/fixes/dependabot_13618
Replaces #13618 - Bump docker/build-push-action from 4 to 5
2023-09-18 22:16:08 +01:00
snipe
0cb4427a19 Bump docker/build-push-action from 4 to 5
Signed-off-by: snipe <snipe@snipe.net>
2023-09-18 22:15:18 +01:00
snipe
17fe915d2f Merge pull request #13624 from snipe/fixes/dependabot_13619
Bump docker/login-action from 2 to 3 (#13619)
2023-09-18 22:14:01 +01:00
snipe
9ad73ed09a Bump docker/login-action from 2 to 3 (#13619)
Signed-off-by: snipe <snipe@snipe.net>
2023-09-18 22:13:09 +01:00
snipe
68fa6d57ca Merge pull request #13613 from snipe/features/reorder_columns
Added column re-ordering
2023-09-18 22:10:09 +01:00
snipe
f14e3422b4 Made develop the target branch
Signed-off-by: snipe <snipe@snipe.net>
2023-09-18 22:09:43 +01:00
snipe
2a638e66f0 Added column re-ordering
Signed-off-by: snipe <snipe@snipe.net>
2023-09-15 21:53:34 +01:00
snipe
8bdecb1da9 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/js/build/app.js
#	public/js/dist/all.js
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
2023-09-15 20:32:05 +01:00
snipe
52f9c786be Merge pull request #13612 from snipe/fixes/re_add_sticky_header
Fixed regression that disabled sticky headers
2023-09-15 20:29:24 +01:00
snipe
3ba8b60f54 Fixed regression that disabled sticky headers
Signed-off-by: snipe <snipe@snipe.net>
2023-09-15 20:28:28 +01:00
snipe
341f711385 Merge remote-tracking branch 'origin/develop' 2023-09-15 15:43:48 +01:00
snipe
eb406547c4 Merge pull request #13610 from snipe/fixes/disallow_sorting_on_age
Fixes #13609 - disallow sorting on age
2023-09-15 15:26:55 +01:00
snipe
0b562d2f55 Fixes #13609 - disallow sorting on age
Signed-off-by: snipe <snipe@snipe.net>
2023-09-15 15:25:52 +01:00
snipe
131ccaa5b9 Merge pull request #12869 from Godmartinz/bug/sc-23134
Fixed footer sizing issue
2023-09-15 14:31:07 +01:00
snipe
9bd357e2d4 Merge remote-tracking branch 'origin/develop' 2023-09-15 12:52:59 +01:00
snipe
054d8763fb Merge pull request #13608 from snipe/bug/sc-15287
Use relative path in backups for cleaner directory structure
2023-09-15 12:51:49 +01:00
snipe
52a77f4c31 Use relative path in backups for cleaner directory structure
Signed-off-by: snipe <snipe@snipe.net>
2023-09-15 12:50:00 +01:00
snipe
cce90c6ce0 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-09-15 09:43:25 +01:00
snipe
4e0e1a2c85 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-09-15 09:42:27 +01:00
snipe
8a8afef81b Merge pull request #13606 from snipe/feature/sc-23705
Fixed #13592 - unable to delete model from view page
2023-09-15 01:11:49 +01:00
snipe
860e7791ff Fixed #13592 - unable to delete model from view page
Signed-off-by: snipe <snipe@snipe.net>
2023-09-14 23:35:44 +01:00
snipe
20da6cccbc Merge remote-tracking branch 'origin/develop' 2023-09-14 22:57:04 +01:00
snipe
a013ddf541 Merge pull request #13605 from snipe/bug/sc-23183
Simplify upload messaging, handle -1% error
2023-09-14 22:52:31 +01:00
spencerrlongg
1cfd7673e0 change Importer.php back 2023-09-14 16:11:24 -05:00
snipe
bbe7d9dde2 Removed stray space
Signed-off-by: snipe <snipe@snipe.net>
2023-09-14 22:08:53 +01:00
snipe
932c02cc54 Typo
Signed-off-by: snipe <snipe@snipe.net>
2023-09-14 22:08:30 +01:00
snipe
84b0ff76ed Revert large warning size
Signed-off-by: snipe <snipe@snipe.net>
2023-09-14 22:06:19 +01:00
snipe
273740b8f5 Fixed import error warning
Signed-off-by: snipe <snipe@snipe.net>
2023-09-14 22:04:23 +01:00
spencerrlongg
afe9d43139 chunk by id? 2023-09-14 16:00:35 -05:00
snipe
34c3174531 Merge pull request #13604 from marcusmoore/feature/sc-23714
Removed ChipperCI integration
2023-09-14 21:48:49 +01:00
spencerrlongg
aac627592b move logic inside of try 2023-09-14 15:43:00 -05:00
spencerrlongg
f35f9f922e safety & catch & log 2023-09-14 15:32:17 -05:00
snipe
8f4ca9da57 Simplify upload messaging
Signed-off-by: snipe <snipe@snipe.net>
2023-09-14 21:20:21 +01:00
Marcus Moore
b113411891 Remove ChipperCI 2023-09-14 13:00:38 -07:00
spencerrlongg
44441ec703 up chunk size 2023-09-14 14:25:02 -05:00
snipe
15c71439b6 Merge pull request #13602 from snipe/bug/sc-23685
Fixed checkbox formatting on quickstart
2023-09-14 18:48:50 +01:00
snipe
8e41fb7b36 Removed stray text
Signed-off-by: snipe <snipe@snipe.net>
2023-09-14 18:48:20 +01:00
snipe
d0c4910a51 Fixed checkbox formatting on quickstart
Signed-off-by: snipe <snipe@snipe.net>
2023-09-14 18:44:02 +01:00
snipe
467609e561 Merge remote-tracking branch 'origin/develop' 2023-09-14 14:32:06 +01:00
snipe
2166d6649d Merge pull request #13343 from snipe/fixes/re-scramble_password_if_ldap_pw_sync_not_enabled
Fixed #13336 - Save unhashed password if no password provided
2023-09-14 14:15:53 +01:00
snipe
dcae5503c8 Use $attributes array
Signed-off-by: snipe <snipe@snipe.net>
2023-09-14 13:52:57 +01:00
snipe
d916e20c10 Merge pull request #13415 from marcusmoore/feature/department-scoping
Added `CompanyableTrait` to `Department` model
2023-09-14 12:52:53 +01:00
snipe
b92327eb40 Merge pull request #13520 from inietov/fixes/licenses_reassignable_feature
Fixed Not reassignable Licenses shouldn't show 'Checkin All Seats' button [sc-23506]
2023-09-14 12:52:13 +01:00
snipe
c7b24821b3 Merge pull request #13549 from inietov/fixes/attempt_to_read_property_id_on_null
Fixed ErrorException: Attempt to read property "id" on null (rollbar #3541)
2023-09-14 12:50:54 +01:00
snipe
a37df8ce9d Merge pull request #13581 from snipe/updates/upgrade_checkout_actions
Upgraded actions/checkout to v4 (via #13580)
2023-09-14 12:40:34 +01:00
snipe
104219ed76 Merge pull request #13597 from marcusmoore/bug/sc-23681
Reset checkout to value when navigating away from type
2023-09-14 12:39:04 +01:00
snipe
56c7da7b06 Merge pull request #13595 from Godmartinz/correct-nullable_on_asset_model_min_qty
Fixed nullability on asset model `min qty` column
2023-09-14 08:52:33 +01:00
spencerrlongg
7c9a4ac161 immutable 2023-09-13 18:15:13 -05:00
spencerrlongg
64a9859efd cleanup 2023-09-13 17:58:33 -05:00
spencerrlongg
ef64843d2f chunk migration, needs to be tested 2023-09-13 17:41:45 -05:00
Ivan Nieto Vivanco
439e031911 Evaluate if the event properties exists before run the CheckoutAcceptance query 2023-09-13 16:35:10 -06:00
spencerrlongg
0368b9df43 viola 2023-09-13 17:16:17 -05:00
Marcus Moore
74c7f106ce Reset assigned_x values when changing check out to type 2023-09-13 13:43:35 -07:00
Godfrey M
f283a5f755 changed the down method change 2023-09-13 13:24:26 -07:00
spencerrlongg
951521dc81 push 2023-09-13 15:20:55 -05:00
Godfrey M
0c504fed49 fixed nullability of on Asset Models 2023-09-13 13:13:41 -07:00
Marcus Moore
11208ee064 Guard against attempting to send notification to model that isn't notifiable 2023-09-13 12:56:27 -07:00
spencerrlongg
70a251de55 fix up gui edit 2023-09-13 13:51:14 -05:00
spencerrlongg
e21a8b6717 fix up this file 2023-09-12 18:11:36 -05:00
spencerrlongg
7047869367 cleanup 2023-09-12 18:03:13 -05:00
spencerrlongg
53d4fd1d0b purchase_date 2023-09-12 18:01:33 -05:00
snipe
f6a11ac0ed Merge pull request #13586 from inietov/fixes/call_to_member_function_checkedOutToUser
Fixed Call to a member function checkedOutToUser() on null [rollbar-3598]
2023-09-12 08:35:30 +01:00
Ivan Nieto Vivanco
9cbd2d032c Add a boolean variable and condition to handle the call to checkedOutToUser() method 2023-09-11 17:40:59 -06:00
spencerrlongg
ccf3fe40ec rm additional row 2023-09-11 17:35:13 -05:00
spencerrlongg
3a63bcab73 temporarily show on its own line 2023-09-11 17:35:13 -05:00
spencerrlongg
30dade1fba cleanup 2023-09-11 17:35:12 -05:00
spencerrlongg
97d6a34b8c some changes to sample csv 2023-09-11 17:34:05 -05:00
spencerrlongg
431af5f530 this works!!!! 2023-09-11 17:34:05 -05:00
spencerrlongg
3e3bb594ea some import stuff 2023-09-11 17:34:04 -05:00
spencerrlongg
fb001caee4 fix conflicts 2023-09-11 17:33:31 -05:00
spencerrlongg
b73f20cadf immutable when things are looping, just in case 2023-09-11 17:22:46 -05:00
spencerrlongg
3fb62874f0 quick push to check something else 2023-09-11 17:22:46 -05:00
spencerrlongg
c66804bcee a little cleanup 2023-09-11 17:22:46 -05:00
spencerrlongg
e1af69f6ae typo 2023-09-11 17:22:46 -05:00
slong753
27bea2abb9 just some more wip on the importer 2023-09-11 17:21:51 -05:00
slong753
1b18cd7fe6 added asset_eol_date and explicit to factory 2023-09-11 17:21:51 -05:00
slong753
78c400e948 fix conflicts 2023-09-11 17:21:50 -05:00
slong753
75d7e3e1a0 fix conflicts 2023-09-11 17:20:21 -05:00
slong753
5948679a4a fix purchase date update 2023-09-11 17:17:59 -05:00
slong753
774f21bb7f some more cleanup 2023-09-11 17:17:59 -05:00
slong753
20367eecc9 fix conflicts 2023-09-11 17:17:59 -05:00
slong753
cda9dd57dd asset update logic 2023-09-11 17:15:25 -05:00
slong753
41b65bd9a2 small changes 2023-09-11 17:15:25 -05:00
slong753
17a83129b9 this all needs to be tested tediously 2023-09-11 17:15:25 -05:00
slong753
0e60184e95 i think this migration makes sense 2023-09-11 17:15:25 -05:00
slong753
1ea0de8bca prevent injection, fix asset update 2023-09-11 17:15:25 -05:00
slong753
17ccfa9ada resolve some conflicts 2023-09-11 17:15:24 -05:00
slong753
c1daabef08 progress 2023-09-11 17:10:41 -05:00
slong753
dc39d2c567 notes 2023-09-11 17:10:41 -05:00
slong753
321e7c93ec carbon thing 2023-09-11 16:51:40 -05:00
slong753
8456b3ec0c wip stuff 2023-09-11 16:51:40 -05:00
snipe
a49d3fe131 Merge pull request #13526 from Godmartinz/asset-model-notifs
Added threshold notifications and min qty for Asset models
2023-09-11 17:55:34 +01:00
Godfrey Martinez
a26b96185b Merge branch 'develop' into asset-model-notifs 2023-09-11 09:37:22 -07:00
Godfrey M
0eb50ceb3d removes commented code 2023-09-11 09:36:38 -07:00
snipe
c2fe9d490b Upgraded actions/checkout to v4 (via #13580)
Signed-off-by: snipe <snipe@snipe.net>
2023-09-11 13:25:44 +01:00
snipe
dc74fb133f Merge pull request #13577 from marcusmoore/fixes/improve-testcase
Fixed failing test
2023-09-08 07:08:21 +01:00
Marcus Moore
093bf57448 Update assertion and add failure messages 2023-09-07 16:42:49 -07:00
snipe
9c608dd6ff Merge remote-tracking branch 'origin/develop' 2023-09-07 21:36:39 +01:00
snipe
06836663c8 Merge pull request #13575 from marcusmoore/fixes/improve-api-messaging
Added validation around department_id in API patch request
2023-09-07 21:36:20 +01:00
Marcus Moore
c6c1c64c1e Remove todo 2023-09-07 13:30:05 -07:00
Marcus Moore
4caa501996 Relax property type check 2023-09-07 13:28:32 -07:00
Marcus Moore
a7a70f6981 Test permissions update 2023-09-07 13:21:27 -07:00
Marcus Moore
39ff575ac1 Remove unused test cases 2023-09-07 13:16:08 -07:00
snipe
5b88089ffc Merge remote-tracking branch 'origin/develop' 2023-09-07 20:50:35 +01:00
snipe
02c187b0a0 Merge pull request #13566 from snipe/features/13562_add_inline_file_link
Fixed #13562 - Added inline file link
2023-09-07 20:50:13 +01:00
snipe
7f892bf5ef Merge pull request #13574 from inietov/fixes/unaccepted_assets_report_incorrect
Fixed Unaccepted Assets report has incorrect people [freshdesk-37808]
2023-09-07 20:49:40 +01:00
Marcus Moore
56e6205667 Formatting 2023-09-07 12:45:03 -07:00
Ivan Nieto Vivanco
abd2ed3b81 Filter unaccepted assets that are not assigned to users 2023-09-07 13:39:16 -06:00
Marcus Moore
899c2eb19b Implement test case 2023-09-07 12:34:50 -07:00
snipe
cf36c31eac Merge remote-tracking branch 'origin/develop' 2023-09-07 20:22:33 +01:00
snipe
894c34ff4f Update to only use relative paths
Signed-off-by: snipe <snipe@snipe.net>
2023-09-07 20:22:14 +01:00
snipe
b7c2b9374c Merge pull request #13573 from snipe/upgrade_scim_server
Upgrade to new branch for our fork of laravel-scim-server
2023-09-07 20:07:59 +01:00
Brady Wetherington
3184f795c2 Upgrade to new branch for our fork of laravel-scim-server 2023-09-07 18:29:23 +01:00
snipe
67cad9c751 Merge pull request #13571 from inietov/fixes/require_acceptance_on_null
Fixed Attempt to read property require_acceptance on null [rollbar-3557]
2023-09-07 18:11:42 +01:00
snipe
ec5238ff06 Merge pull request #13548 from marcusmoore/update-testing-documentation
Updated testing documentation
2023-09-07 11:25:53 +01:00
Marcus Moore
1c3c36f2a0 Begin to implement patch test 2023-09-06 16:14:14 -07:00
Ivan Nieto Vivanco
1509c512a5 Add guard clauses around some License and LicenseSeat models functions 2023-09-06 11:54:11 -06:00
snipe
2a94fd17ee Merge remote-tracking branch 'origin/develop' 2023-09-06 09:37:35 +01:00
snipe
e920199626 Merge pull request #13567 from johnson-yi/fixes/add_default_location_to_checkin_actionlog
Add default location to tracked changes on checkin actionlog
2023-09-06 09:37:04 +01:00
johnson-yi
5897f4d6d9 Add rtd_location_id to tracked changes on checkin actionlog 2023-09-06 00:36:48 +00:00
snipe
a67888f3d3 Merge pull request #13547 from inietov/fixes/Attempt_to_read_property_asset_tag
Fixed ErrorException: Attempt to read property "asset_tag" on null (rollbar #3541)
2023-09-05 20:26:21 +01:00
Ivan Nieto Vivanco
91b1cc7121 Move the early return to the controller instead of the Label model 2023-09-05 13:23:51 -06:00
snipe
d6dd332b09 Merge pull request #13557 from johnson-yi/fixes/add_changes_to_checkinout_actionlog
Added/Fixed: track changes on asset checkin/out
2023-09-05 19:08:49 +01:00
snipe
65a76c599c Added inline=true to image preview modal
Signed-off-by: snipe <snipe@snipe.net>
2023-09-05 18:35:07 +01:00
snipe
f53db8ba75 Fixed #13562 - allow inline view for uploaded files
Signed-off-by: snipe <snipe@snipe.net>
2023-09-05 18:28:01 +01:00
snipe
32407b531b Merge remote-tracking branch 'origin/develop' 2023-09-05 16:10:30 +01:00
snipe
e486fe2794 Removed soft-delete query
Signed-off-by: snipe <snipe@snipe.net>
2023-09-05 16:10:20 +01:00
snipe
521fcd45b0 Merge remote-tracking branch 'origin/develop' 2023-09-05 16:08:17 +01:00
snipe
26452a8a29 Merge pull request #13565 from snipe/fixes/asset_history_500_on_hard_deleted_models
Account for hard-deleted models, suppliers
2023-09-05 16:06:40 +01:00
snipe
f85df6bb8c Use same method of accessing companies as others
Signed-off-by: snipe <snipe@snipe.net>
2023-09-05 16:02:28 +01:00
snipe
2acf2b880e Account for hard-deleted models, suppliers
Signed-off-by: snipe <snipe@snipe.net>
2023-09-05 15:58:21 +01:00
snipe
b17af38d8e Merge pull request #12901 from Godmartinz/user_total_cost
Added users total cost of assets to user profile
2023-09-05 13:52:34 +01:00
snipe
a62e2f092b Merge pull request #13498 from marcusmoore/feature/add-checkin-date-range-filter-to-custom-asset-report
Added last check in column and filter to custom asset report
2023-09-05 13:22:15 +01:00
Johnson Yi
09f7b3debe Track changes on asset checkin/out 2023-09-01 13:12:07 +10:00
Marcus Moore
da7d6f6f77 Merge branch 'develop' into update-testing-documentation 2023-08-31 10:36:06 -07:00
snipe
faa865fd48 Merge remote-tracking branch 'origin/develop' 2023-08-31 18:24:29 +01:00
snipe
f08cef8664 Merge pull request #13556 from snipe/feature/sc-23684
Added model name and number to dynamic url
2023-08-31 18:23:33 +01:00
snipe
e192cbbbe1 Merge pull request #13550 from marcusmoore/remove-dusk
Removed Dusk
2023-08-31 18:06:04 +01:00
snipe
83b178f5b2 Added model name and number to dynamic url
Signed-off-by: snipe <snipe@snipe.net>
2023-08-31 18:03:32 +01:00
snipe
2a1aa53ba6 Merge remote-tracking branch 'origin/develop' 2023-08-31 13:04:56 +01:00
snipe
c51574099f Merge pull request #13507 from Godmartinz/ignore_encrypt_and_other_changes
Added eager loading for `changedinfo` and removed encrypted values from Asset history
2023-08-31 13:04:39 +01:00
snipe
821c3085f0 Merge remote-tracking branch 'origin/develop' 2023-08-31 12:01:58 +01:00
snipe
9a0f691f05 Merge pull request #13546 from snipe/fixes/make_boolean_user_fields_more_consistant
Don’t cast as boolean, do validate as boolean for User validation
2023-08-31 12:01:20 +01:00
Marcus Moore
a799659610 Scaffold tests and add context 2023-08-30 17:33:23 -07:00
Marcus Moore
999605f832 Add failing test 2023-08-30 17:10:50 -07:00
Marcus Moore
5828d29952 Remove Dusk 2023-08-30 16:43:18 -07:00
Marcus Moore
417b2c8331 Update testing documentation 2023-08-30 11:27:26 -07:00
snipe
663faffcc1 Un-cast byod, validate as boolean
Signed-off-by: snipe <snipe@snipe.net>
2023-08-30 19:13:55 +01:00
snipe
fb455be406 Added tests
Signed-off-by: snipe <snipe@snipe.net>
2023-08-30 19:13:38 +01:00
Ivan Nieto Vivanco
3cf9c1fea5 Adds a null coalescing operator to the license seat checkin notification 2023-08-30 11:57:29 -06:00
Ivan Nieto Vivanco
085a993340 Early return if no asset is found 2023-08-30 11:05:58 -06:00
Marcus Moore
07c3fe1fce Update assertions to account for type change 2023-08-30 09:42:53 -07:00
snipe
2a93c38830 Don’t cast as boolean, validate as boolean
Signed-off-by: snipe <snipe@snipe.net>
2023-08-30 16:40:28 +01:00
snipe
587a787b5d Fixed bug introduced in #13528
Signed-off-by: snipe <snipe@snipe.net>
2023-08-30 15:50:28 +01:00
snipe
305804f260 Updated assets
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
#	package-lock.json
#	public/css/dist/all.css
#	public/js/dist/all-defer.js
#	public/mix-manifest.json
2023-08-30 15:50:09 +01:00
snipe
c0cbdb1fc4 Fixed bug introduced in #13528
Signed-off-by: snipe <snipe@snipe.net>
2023-08-30 15:48:35 +01:00
snipe
5cf8c36698 Updated assets
Signed-off-by: snipe <snipe@snipe.net>
2023-08-30 15:43:06 +01:00
snipe
1bcc74f156 Upgrade @fortawesome/fontawesome-free from 6.4.0 to 6.4.2 #13527
Signed-off-by: snipe <snipe@snipe.net>
2023-08-30 15:41:11 +01:00
snipe
9ebcde4472 Upgrade less from 4.1.2 to 4.2.0 #13534
Signed-off-by: snipe <snipe@snipe.net>
2023-08-30 15:40:56 +01:00
snipe
fbc04cfd47 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-08-30 15:07:38 +01:00
snipe
319cb2305d Merge remote-tracking branch 'origin/develop' 2023-08-30 15:05:46 +01:00
snipe
b109ee281a Merge pull request #13544 from marcusmoore/bug/sc-23675
Fixed user search not adhering to company scoping
2023-08-30 08:54:41 +01:00
Marcus Moore
806ab2cb9d Ensure users are scoped by company in index method 2023-08-29 16:17:29 -07:00
Marcus Moore
aafa1ab70e Add failing test 2023-08-29 16:15:13 -07:00
snipe
22d136df46 Merge pull request #13528 from inietov/fixes/cloning_model_blanks_fieldset
Fixed #12548 Cloning a model blanks fieldset of new one
2023-08-29 19:14:38 +01:00
Godfrey Martinez
0ac5d4d582 Merge pull request #8 from Godmartinz/fix-companyable
Fix companyable
2023-08-28 19:38:27 -07:00
Godfrey Martinez
d86c63cf23 Merge branch 'ignore_encrypt_and_other_changes' into fix-companyable 2023-08-28 19:38:16 -07:00
Godfrey M
74f45a4473 reworks company queries for asset history 2023-08-28 19:35:46 -07:00
Ivan Nieto Vivanco
4e4ba38038 Pass the model_id variable in the controller and get it only if we are cloning the asset model 2023-08-28 16:23:26 -06:00
snipe
18ff810d7e Reverse orderof parent
Signed-off-by: snipe <snipe@snipe.net>
2023-08-28 20:51:52 +01:00
snipe
baffcbad71 Set password property properly
Signed-off-by: snipe <snipe@snipe.net>
2023-08-28 20:47:56 +01:00
snipe
611db4c0d2 Removed stray line
Signed-off-by: snipe <snipe@snipe.net>
2023-08-28 20:46:45 +01:00
snipe
367484a766 Merge pull request #13537 from snipe/fixes/13500_prevent_autocomplete_on_ldap_password
Fixed #13500 - Try to prevent the browser from pre-filling the LDAP password
2023-08-28 20:42:58 +01:00
snipe
0f43388a2b Merge remote-tracking branch 'origin/develop' 2023-08-28 20:40:12 +01:00
snipe
81365ef911 Merge pull request #13518 from marcusmoore/chore/tests-via-github-actions
Run tests for PHP 7.4, 8.0, and 8.1.1 via GitHub Actions
2023-08-28 20:28:42 +01:00
snipe
6020927e24 Merge pull request #13538 from snipe/fixes/13516_use_int_not_string_for_port_default
Fixed #13516 - Use int not string if no DB_PORT specified
2023-08-28 19:38:41 +01:00
snipe
82981290d4 Use int not string if no DB_PORT specified
Signed-off-by: snipe <snipe@snipe.net>
2023-08-28 19:34:08 +01:00
snipe
7787ca328c Try to prevent the browser from pre-filling the LDAP password
Signed-off-by: snipe <snipe@snipe.net>
2023-08-28 18:36:06 +01:00
Godfrey Martinez
92e88a0ae2 Merge branch 'develop' into ignore_encrypt_and_other_changes 2023-08-28 10:14:41 -07:00
snipe
b93adf44c8 Merge remote-tracking branch 'origin/develop' 2023-08-28 12:41:45 +01:00
snipe
535ca0e3c0 Merge pull request #13535 from snipe/fixes/13521_make_modal_upload_button_wider
Fixed #13521 - make modal “select files” button wider
2023-08-28 12:41:27 +01:00
snipe
582cad2dc5 Fixed #13521 - make modal “select files” button wider
Signed-off-by: snipe <snipe@snipe.net>
2023-08-28 12:37:42 +01:00
snipe
a1897298dc Merge remote-tracking branch 'origin/develop' 2023-08-27 13:56:54 +01:00
snipe
e3a9c34818 Merge pull request #13533 from snipe/improvements/labels_clearer_barcode_text
Clearer labels barcode text
2023-08-26 18:08:10 +01:00
snipe
20e9f05a64 Tighter layout
Signed-off-by: snipe <snipe@snipe.net>
2023-08-26 17:43:02 +01:00
snipe
844fe0938c Added link to the help docs
Signed-off-by: snipe <snipe@snipe.net>
2023-08-26 17:42:56 +01:00
snipe
0a47706e46 Merge remote-tracking branch 'origin/develop' 2023-08-25 15:47:47 +01:00
Ivan Nieto Vivanco
a12a68e4e9 Add a variable so I dont ended rewriting the original model 2023-08-24 15:28:12 -06:00
Ivan Nieto Vivanco
950536f59f Added a condition to send correct model id when cloning one 2023-08-24 15:18:51 -06:00
Godfrey M
e56628499c fixed lost changes 2023-08-24 11:45:23 -07:00
Godfrey M
2b7a899ef8 removed unnecessary code 2023-08-24 11:43:44 -07:00
Godfrey M
0b956b2a46 revert changes of composer.lock 2023-08-24 10:45:59 -07:00
Godfrey M
18cb514a53 revert unwanted changes 2023-08-24 10:40:44 -07:00
Godfrey M
a3b6e0fbe6 adds some spacing 2023-08-24 10:36:09 -07:00
Godfrey M
34ba0c4440 adds id to history info 2023-08-24 10:36:08 -07:00
Godfrey M
739fc152c2 Adds readable asset history in the action log transformer 2023-08-24 10:36:08 -07:00
Godfrey M
011c09a3dd working on getting notifications 2023-08-24 10:35:40 -07:00
Godfrey M
38d5691b88 fix conflicts 2023-08-24 10:35:40 -07:00
Godfrey M
c26ef224f4 fixing my mess 2023-08-24 10:31:01 -07:00
Godfrey M
8ebb9afedd adds min_amt to asset model edit, index, and table 2023-08-24 10:30:07 -07:00
snipe
26dd992d3c Merge pull request #13525 from marcusmoore/bug/sc-23660
Fixed undeclared variable in ActionlogsTransformer
2023-08-24 17:09:30 +01:00
Marcus Moore
e32c07be02 Clear commented log statements 2023-08-24 08:15:40 -07:00
Marcus Moore
5a0b0522b0 Explicitly declare $clean_meta variable 2023-08-24 08:15:07 -07:00
Marcus Moore
20457bd89e Run tests for PHP 7.4, 8.0, and 8.1.1 2023-08-23 15:53:34 -07:00
Ivan Nieto Vivanco
7bfb5a0667 Disable the Checkin All Seats button if License is not reassignable 2023-08-23 16:36:06 -06:00
Ivan Nieto Vivanco
6161a0d76d Add condition in LicenseCheckinController:bulkCheckin method to evaluate if the license is reassignable 2023-08-23 16:22:40 -06:00
Godfrey Martinez
28cf533d19 Merge branch 'develop' into ignore_encrypt_and_other_changes 2023-08-23 00:42:59 -07:00
Godfrey M
0fc79ec936 fixes conflicts 2023-08-23 00:40:59 -07:00
Godfrey M
ffe1b11419 merged develop 2023-08-23 00:38:58 -07:00
Godfrey M
27488c1009 adds soft deletes to eager loading 2023-08-23 00:34:09 -07:00
Godfrey M
ce60db009c adds soft deletes to eager loading 2023-08-23 00:32:43 -07:00
snipe
9f291d7e4b Merge remote-tracking branch 'origin/develop' 2023-08-23 08:21:53 +01:00
snipe
d393bd5c97 Merge pull request #13511 from snipe/fixes/13510_no_translations_in_migrations
Fixed #13510 - do not use translations in migrations
2023-08-23 08:21:18 +01:00
snipe
ea37325806 Remove trans() from default values
Signed-off-by: snipe <snipe@snipe.net>
2023-08-23 08:19:05 +01:00
snipe
31a7758ab1 Merge pull request #13509 from marcusmoore/bug/sc-23636
Fixed asset model query in action log transformer
2023-08-23 06:58:41 +01:00
Marcus Moore
bee680683d Add withTrashed to asset model query 2023-08-22 17:05:06 -07:00
Godfrey M
92ddf8fc67 removed dead space 2023-08-22 12:38:50 -07:00
Godfrey M
1019287c76 retarget key 2023-08-22 12:36:43 -07:00
Godfrey M
9e438c3ed0 eager loaded changedInfo queries, reworked encrypted data change log changes 2023-08-22 12:34:45 -07:00
Godfrey M
c7f2acf2c6 removes encrypted info from change log, renames asset_eol_date in the change log 2023-08-22 11:39:38 -07:00
snipe
79b330f492 Merge pull request #13400 from inietov/fixes/asset_acceptance_user_error
Fixed Asset acceptance error when user company and asset company don't match
2023-08-22 15:49:56 +01:00
snipe
3da21e73e2 Merge pull request #13501 from snipe/fixes/checkbox_layout_in_settings
Small fixes to checkbox layout in general settings blade
2023-08-22 14:12:15 +01:00
snipe
da38945a53 Small fixes to checkbox layout in general settings blade
Signed-off-by: snipe <snipe@snipe.net>
2023-08-22 14:10:39 +01:00
snipe
a48762c64d Merge pull request #13496 from snipe/features/setting_for_name_order
Fixed #13495 added setting for name order
2023-08-22 12:50:58 +01:00
snipe
23237e5cd3 Removed unused translation
Signed-off-by: snipe <snipe@snipe.net>
2023-08-22 12:50:32 +01:00
snipe
aafb7668f5 Merge pull request #13453 from inietov/fixes/accessories_declined_issue
Fixed #13317 Accessories declined by user remain assigned
2023-08-22 12:42:55 +01:00
snipe
bb61134dd5 Merge remote-tracking branch 'origin/develop' 2023-08-22 12:41:27 +01:00
snipe
fea11ec7f1 Merge pull request #12761 from spencerrlongg/bulk_edit_custom_fields
Bulk Editing Custom Fields
2023-08-22 12:40:18 +01:00
snipe
303b45c9e9 Merge pull request #13485 from Godmartinz/history_info_clean_up
Added better handling of information of asset history
2023-08-22 12:25:17 +01:00
snipe
8c7925e703 Merge pull request #13436 from marcusmoore/chore/dependency-updates
Bumped dependencies
2023-08-21 22:58:52 +01:00
Marcus Moore
191c4f959f Bump guzzlehttp/psr7 to 2.4.5 2023-08-21 14:46:08 -07:00
Marcus Moore
1e10a7ee23 Bump nyholm/psr7 to 1.6.1 2023-08-21 14:45:21 -07:00
Marcus Moore
4e8537a1c7 Merge branch 'develop' into chore/dependency-updates
# Conflicts:
#	composer.lock
2023-08-21 14:44:15 -07:00
snipe
24a9deb735 Merge remote-tracking branch 'origin/develop' 2023-08-21 22:35:45 +01:00
Marcus Moore
4e2ef4f056 Default to using the current date if last check in end date is not provided 2023-08-21 14:35:15 -07:00
snipe
79a4d915db Merge pull request #13456 from marcusmoore/fixes/auto-incrementing-on-74
Fixed passing invalid argument to `strpos()`
2023-08-21 22:25:52 +01:00
Marcus Moore
c332b98456 Add last checkin options to report front end 2023-08-21 13:44:49 -07:00
Godfrey M
b54aaefefb adds some spacing 2023-08-21 13:43:06 -07:00
Godfrey M
5076b45a0d adds id to history info 2023-08-21 13:40:39 -07:00
Marcus Moore
6fc06f2ee1 Add simple tests around asset check in 2023-08-21 12:31:51 -07:00
snipe
36a343365e Switched from fullName() to getFullNameAttribute()
Signed-off-by: snipe <snipe@snipe.net>
2023-08-21 20:14:07 +01:00
snipe
c617bf89b6 Tweak layout
Signed-off-by: snipe <snipe@snipe.net>
2023-08-21 20:13:45 +01:00
snipe
ba0643f6a4 Added name display format, tweaked some
Signed-off-by: snipe <snipe@snipe.net>
2023-08-21 20:13:28 +01:00
snipe
bfd674b622 Switched to getFullNameAttribute() from fullName() in User Presenter
Signed-off-by: snipe <snipe@snipe.net>
2023-08-21 20:12:25 +01:00
snipe
d73d15b8a2 Added form macro for name format
Signed-off-by: snipe <snipe@snipe.net>
2023-08-21 20:11:59 +01:00
snipe
8660d41aa3 Changed width of locale field
Signed-off-by: snipe <snipe@snipe.net>
2023-08-21 20:11:45 +01:00
snipe
c39579b170 New strings
Signed-off-by: snipe <snipe@snipe.net>
2023-08-21 20:11:25 +01:00
snipe
354550b52e Removed getCompleteNameAttribute(), modified getFullNameAttribute()
Signed-off-by: snipe <snipe@snipe.net>
2023-08-21 20:11:17 +01:00
snipe
f3460b5a4f Switch to getFullNameAttribute() in user transformer
Signed-off-by: snipe <snipe@snipe.net>
2023-08-21 20:10:48 +01:00
snipe
474c03e3fc Added name order to settings save controller method
Signed-off-by: snipe <snipe@snipe.net>
2023-08-21 20:10:03 +01:00
snipe
749002b768 Added migration to add name order to settings
Signed-off-by: snipe <snipe@snipe.net>
2023-08-21 20:09:48 +01:00
Marcus Moore
489d30c685 Set last_checkin in ui and api controllers 2023-08-21 11:57:33 -07:00
snipe
2346bab8ed Merge pull request #13492 from snipe/features/add_dymo_labelwriter
Added Dymo labelwriter
2023-08-18 23:27:37 +01:00
snipe
45898deb1a Don’t 500 if the 1D barcode doesn’t match the format requested - log an error instead
Signed-off-by: snipe <snipe@snipe.net>
2023-08-18 22:18:38 +01:00
snipe
ffc7c4e99a use number format to constrain large number displays
Signed-off-by: snipe <snipe@snipe.net>
2023-08-18 22:18:09 +01:00
snipe
1e82c2bfad Changed example asset name
Signed-off-by: snipe <snipe@snipe.net>
2023-08-18 22:17:54 +01:00
snipe
d12f4564e1 Added Dymo Labelwriter template
Signed-off-by: snipe <snipe@snipe.net>
2023-08-18 21:44:12 +01:00
snipe
1dcca14c37 Values are not sortable, so don’t show them as sortable
Signed-off-by: snipe <snipe@snipe.net>
2023-08-18 21:21:54 +01:00
snipe
cb3db51fe0 Merge remote-tracking branch 'origin/develop' 2023-08-18 18:42:11 +01:00
snipe
63f847f125 Merge pull request #13491 from snipe/fixes/remove_border_from_default_label
Removed the black label from around the default labels
2023-08-18 18:40:45 +01:00
snipe
d56c671410 Removed the black label from around the default labels
Signed-off-by: snipe <snipe@snipe.net>
2023-08-18 18:39:00 +01:00
snipe
8e9fa613e3 Merge remote-tracking branch 'origin/develop' 2023-08-18 18:14:40 +01:00
snipe
802651a1b4 Merge pull request #13489 from snipe/fixes/override_0_cols_rows_in_default_for_new_engine
Make sure the columns and rows can never be 0
2023-08-18 18:14:01 +01:00
snipe
0cb76a049a Make sure the columns and rows can never be 0
Signed-off-by: snipe <snipe@snipe.net>
2023-08-18 18:13:16 +01:00
snipe
384428148b Merge remote-tracking branch 'origin/develop' 2023-08-18 15:32:33 +01:00
snipe
5645141f93 Merge pull request #13488 from snipe/fixes/13487_supplier_url_in_listing
Fixed #13487 - include supplier url in listing
2023-08-18 15:32:14 +01:00
snipe
da2f22d504 Fixed #13487 - include supplier url in listing
Signed-off-by: snipe <snipe@snipe.net>
2023-08-18 15:31:15 +01:00
Marcus Moore
8b2716d2b7 Fix update statement 2023-08-17 18:33:01 -07:00
Marcus Moore
56fb45f1ea WIP: Add last_checkin to assets table 2023-08-17 18:01:26 -07:00
Godfrey M
a62876d4bc Adds readable asset history in the action log transformer 2023-08-17 16:14:01 -07:00
snipe
0ee032a10d Merge pull request #13391 from Godmartinz/ldap_sync_field_clear_bug
Fixed Ldap sync field clear bug
2023-08-17 17:45:03 +01:00
snipe
03a01c02c4 Merge pull request #13483 from inietov/fixes/default_locations_advanced_search
Fixed #13359 Advanced search by Default Location does not work
2023-08-17 15:15:21 +01:00
Ivan Nieto Vivanco
b607a59875 Add query to search default locations in advanced search 2023-08-16 15:04:17 -06:00
snipe
34f2221b02 Merge pull request #13471 from inietov/fixes/components_search
Fixed #13409 Search in component detail view not working
2023-08-16 21:59:40 +01:00
snipe
b81c6825cf Merge pull request #13476 from uberbrady/accessry_checkin_fix_develop
Accessory checkin via API reported wrong target user
2023-08-16 13:05:54 +01:00
Brady Wetherington
852e9ff311 Accessory checkin via API reported wrong target user 2023-08-16 13:03:37 +01:00
Ivan Nieto Vivanco
92df32dfaa Move a couple assignation of variables inside an else to only execute once 2023-08-15 21:10:48 -06:00
snipe
8810059427 Merge remote-tracking branch 'origin/develop' 2023-08-16 01:40:06 +01:00
snipe
eacbde37e2 Merge pull request #13473 from snipe/fixes/check_for_company_on_labels
Check that there is a company before trying to get name property
2023-08-16 01:27:48 +01:00
snipe
74384f14e4 Use clearer translation (from original PR)
Signed-off-by: snipe <snipe@snipe.net>
2023-08-16 01:25:13 +01:00
snipe
027afa71f1 Check that there is a company before trying to get name property
Signed-off-by: snipe <snipe@snipe.net>
2023-08-16 01:09:22 +01:00
Ivan Nieto Vivanco
993918f47c Add query to search into the per-component view 2023-08-15 15:31:36 -06:00
Ivan Nieto Vivanco
25c58a8486 Fix typo in language variable name 2023-08-15 14:17:39 -06:00
snipe
7eaf3174ab Merge pull request #13457 from snipe/fixes/remove_autocomplete_off_on_login
Fixed #13365 - Added LOGIN_AUTOCOMPLETE as env var
2023-08-15 20:55:05 +01:00
snipe
2848465dd2 Merge remote-tracking branch 'origin/develop' 2023-08-15 20:42:36 +01:00
snipe
297390ae63 Merge pull request #13470 from snipe/fixes/13464_typo_in_accessories_clone
Fixed #13464 typo in accessories clone
2023-08-15 20:41:54 +01:00
snipe
01ab360ef3 Fixed accessory clone typo
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 20:39:09 +01:00
snipe
1c2f3cd552 Fixed translation typo
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 20:39:00 +01:00
snipe
06ed8b2f2d Merge remote-tracking branch 'origin/develop' 2023-08-15 20:31:00 +01:00
snipe
bc4a47421a Merge pull request #13469 from snipe/fixes/missed_one_checkbox_in_label
Fixed checkboxes for accessibility
2023-08-15 20:30:39 +01:00
snipe
0763b5135d Fixed checkboxes
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 20:28:16 +01:00
snipe
253975ce72 Updated translation
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 20:27:55 +01:00
snipe
9af850dbaa Re-apply a change that was dropped
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 20:27:47 +01:00
snipe
96b616be89 Downgraded TCPDF
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 20:11:56 +01:00
snipe
2b9f8ce4a6 Merge pull request #13467 from snipe/fixes/more_label_html_tweaks
Fixes more label html tweaks
2023-08-15 20:05:03 +01:00
snipe
fa6c8d864e Restore label engine checkbox
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 20:04:19 +01:00
snipe
c957f136aa More label tweaks
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 20:03:40 +01:00
snipe
697dc10d76 More label tweaks
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 20:03:32 +01:00
snipe
2ddf5c9a0b Merge pull request #13463 from uberbrady/fix_api_accessory_checkin
Accessory checkin via API reported wrong target user
2023-08-15 19:24:45 +01:00
snipe
949a88e560 Merge remote-tracking branch 'origin/develop' 2023-08-15 18:55:39 +01:00
snipe
d47b502d86 Merge pull request #13466 from snipe/fixes/weird_label_engine_layout
Fixes weird label engine layout
2023-08-15 18:52:54 +01:00
snipe
6b02184e99 Fixed weird layout with checkbox
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 18:48:20 +01:00
snipe
64342838fd Return the user to the labels page on save
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 18:48:12 +01:00
snipe
28b1461cb4 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/mix-manifest.json
2023-08-15 18:21:51 +01:00
snipe
346f243bc0 Merge pull request #13465 from snipe/fixes/parse_error_in_helper
Fixed unclosed brace
2023-08-15 18:14:55 +01:00
snipe
443adc50da Fixed unclosed brace
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 18:12:25 +01:00
snipe
cebf0e0de1 Add @cram42 as a contributor 2023-08-15 18:07:56 +01:00
snipe
e41368daac Merge pull request #12050 from cram42/develop
New Label Engine
2023-08-15 17:58:57 +01:00
Godfrey M
d1efca2ae1 fixes conflicts 2023-08-15 09:28:42 -07:00
Brady Wetherington
7504c0df13 Accessory checkin via API reported wrong target user 2023-08-15 14:19:36 +01:00
snipe
1c02a7d590 Merge remote-tracking branch 'origin/develop' 2023-08-15 13:26:40 +01:00
snipe
c56f664811 Merge pull request #13442 from Robert-Azelis/Robert-Azelis-patch-add_email_to_companies
Add email to companies
2023-08-15 13:26:20 +01:00
snipe
8e0b7bee41 Merge remote-tracking branch 'origin/develop' 2023-08-15 13:23:23 +01:00
snipe
6f373aed33 Merge pull request #13461 from snipe/localization/new_translations
Updated language strings from CrowdIn
2023-08-15 13:22:14 +01:00
snipe
d1ce1b6f18 Updated language strings from CrowdIn
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 13:21:35 +01:00
Ivan Nieto Vivanco
71cb16118d Change error string for a better (?) one 2023-08-14 20:52:00 -06:00
Ivan Nieto Vivanco
d365565b6d Add message in the acceptance assets view to indicate when the user can\'t accept nor deny the asset 2023-08-14 20:51:04 -06:00
snipe
24a3e0ee83 Added LOGIN_AUTOCOMPLETE as env var
Signed-off-by: snipe <snipe@snipe.net>
2023-08-15 01:56:01 +01:00
Marcus Moore
dc1a8840f1 Ensure empty string is not passed to strpos() 2023-08-14 16:40:34 -07:00
Ivan Nieto Vivanco
96440834bd Move the declinedCheckout function so it don/'t separate the class properties 2023-08-14 16:16:28 -06:00
snipe
642a09f139 Merge remote-tracking branch 'origin/develop' 2023-08-14 23:12:07 +01:00
snipe
d3fbbec92c Merge pull request #13455 from snipe/fixes/confusion_around_localization_date
Fixed #13382 - confusion around localization date
2023-08-14 22:50:30 +01:00
snipe
9820ab34d7 Use today’s date for date format selectlist
Signed-off-by: snipe <snipe@snipe.net>
2023-08-14 22:44:29 +01:00
snipe
aa333bcf0b Merge pull request #13448 from Godmartinz/status-label-translations_fix
Fixed #13446 - added translations to status label type column
2023-08-14 22:25:46 +01:00
snipe
ba56746f57 Merge pull request #13437 from marcusmoore/feature/improve-user-factory
Allowed permissions in the user factory to be chained
2023-08-14 22:23:55 +01:00
snipe
716e13e5b1 Merge remote-tracking branch 'origin/develop' 2023-08-14 22:23:06 +01:00
snipe
dcec4ba5e2 Merge pull request #13454 from snipe/fixes/13450_removed_escaping_custom_fieldsets
Fixed #13450 - remove escaping on saveing new custom fields
2023-08-14 22:22:35 +01:00
snipe
12e9d2adeb Fixed #13450 - remove escaping on saveing new custom fields
Signed-off-by: snipe <snipe@snipe.net>
2023-08-14 22:21:41 +01:00
Ivan Nieto Vivanco
8da2a8a79c Allows to save signature for declined items 2023-08-14 14:58:10 -06:00
Ivan Nieto Vivanco
4796598bb6 Add declinedCheckout method to Accessory model 2023-08-14 14:35:31 -06:00
Godfrey M
c3356ab765 fixed translation choice and color choice 2023-08-14 12:20:46 -07:00
Godfrey M
4446b2311d remove unnecessary changes 2023-08-14 12:14:15 -07:00
Godfrey M
6b94ef6adc fixes the statuslabeltypeforatter instead of the model 2023-08-14 12:13:01 -07:00
Godfrey M
a0d5774635 adds translations to status label type column 2023-08-14 10:42:17 -07:00
snipe
ec2556f991 Merge remote-tracking branch 'origin/develop' 2023-08-14 13:02:45 +01:00
snipe
291fa1cd29 Merge pull request #13445 from snipe/fixes/typo_in_formatter_for_asset_maintenances
Fixed case in BS table formatter for boolean
2023-08-14 13:02:27 +01:00
snipe
58286c9cab Fixed case in BS table formatter for boolean
Signed-off-by: snipe <snipe@snipe.net>
2023-08-14 13:01:32 +01:00
Robert-Azelis
1e43d88e06 Create 2023_08_13_172600_add_email_to_companies.php 2023-08-13 17:25:33 +02:00
Robert-Azelis
da701677c7 Update edit.blade.php 2023-08-13 17:24:17 +02:00
Robert-Azelis
30d33310ae Update CompanyPresenter.php 2023-08-13 17:23:33 +02:00
Robert-Azelis
bbb8ecfee4 Update Company.php 2023-08-13 17:21:55 +02:00
Robert-Azelis
8988a5dfc3 Update CompaniesTransformer.php 2023-08-13 17:20:15 +02:00
Robert-Azelis
ed5b4ca0a2 Update CompaniesController.php 2023-08-13 17:18:25 +02:00
Robert-Azelis
07bafa9508 Update CompaniesController.php 2023-08-13 17:15:20 +02:00
snipe
6134dfa8f2 Merge remote-tracking branch 'origin/develop' 2023-08-11 09:42:30 +01:00
snipe
a1cfa45344 Merge pull request #13439 from snipe/fixes/500_error_when_cloning_invalid_accessory
Fixed route for accessory index
2023-08-11 09:42:00 +01:00
snipe
df8f6a8d2b Correctly call the route for accessory index
Signed-off-by: snipe <snipe@snipe.net>
2023-08-11 09:40:49 +01:00
Marcus Moore
5b86c02366 Set permissions to empty object in user factory 2023-08-10 16:55:44 -07:00
Marcus Moore
41479b1ec7 Allow permissions in the user factory to be chained 2023-08-10 16:35:10 -07:00
Marcus Moore
3a2b15313c Bump guzzlehttp/psr7 to 2.4.5 2023-08-10 11:53:20 -07:00
Marcus Moore
6b6bb61400 Bump nyholm/psr7 to 1.6.1 2023-08-10 11:52:42 -07:00
snipe
6adaa32286 Merge pull request #13431 from marcusmoore/feature/custom-report-scoping
Removed unneeded `Company::scopeCompanyables` from `ReportsController`
2023-08-10 09:57:53 +01:00
snipe
a599f0c923 Merge pull request #13434 from marcusmoore/chore/improve-test-stability
Improved test stability and messaging
2023-08-10 09:57:26 +01:00
snipe
4db4bf7be4 Merge pull request #13432 from marcusmoore/chore/remove-old-testing-code
Removed unused Codeception test code
2023-08-10 09:57:11 +01:00
Marcus Moore
04661d5441 Add help text to response assertion helpers 2023-08-09 17:09:31 -07:00
Marcus Moore
3a5ed031bf Escape values in response assertion helpers 2023-08-09 17:08:49 -07:00
Marcus Moore
60baaae192 Remove unused test bootstrap file 2023-08-09 16:22:58 -07:00
Marcus Moore
8508594a2f Remove old and unused Codeception test code 2023-08-09 13:32:15 -07:00
Marcus Moore
e0b464dcec Merge branch 'develop' into feature/custom-report-scoping 2023-08-09 13:03:05 -07:00
snipe
7df3be3a54 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/all.css
#	public/css/dist/bootstrap-table.css
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
2023-08-09 10:54:49 +01:00
snipe
bd3ba9a5f7 Merge pull request #13428 from snipe/security/update_autotable
Updated autotable
2023-08-09 10:49:01 +01:00
snipe
a65ac1ccdf Updated autotable
Signed-off-by: snipe <snipe@snipe.net>
2023-08-09 10:47:45 +01:00
snipe
ffabc9c331 Merge pull request #13414 from marcusmoore/fixes/chipperci-config
Fixes ChipperCi Pipeline
2023-08-09 10:37:21 +01:00
snipe
a6a742d8d8 Merge pull request #13407 from marcusmoore/feature/sc-23465
Added messaging to category edit page to improve clarity around when users will be emailed
2023-08-09 10:36:19 +01:00
Marcus Moore
2e632a3d2d Improve test readability 2023-08-08 17:40:02 -07:00
Marcus Moore
c32f099053 Remove unneeded call to Company::scopeCompanyables 2023-08-08 17:22:15 -07:00
Marcus Moore
c752e1670c Add test around company scoping in custom report 2023-08-08 17:21:39 -07:00
Marcus Moore
1405e17251 Add simple test around custom asset report response 2023-08-08 17:10:36 -07:00
snipe
15122bbb55 Merge pull request #13425 from snipe/security/upgrade_webpack_snyk_13416
Updated webpack
2023-08-08 22:24:59 +01:00
snipe
c18349d75f Updated webpack
Signed-off-by: snipe <snipe@snipe.net>
2023-08-08 22:07:49 +01:00
snipe
70903f068c Merge remote-tracking branch 'origin/develop' 2023-08-08 19:01:40 +01:00
snipe
521961457d Merge pull request #13424 from snipe/bug/sc-23552
Fixed tooltip not loading on encrypted field lock icon on asset detail view
2023-08-08 19:00:56 +01:00
snipe
6a3a38b6f6 Call tooltip again on custom fields jquery
Signed-off-by: snipe <snipe@snipe.net>
2023-08-08 18:53:57 +01:00
snipe
40aca9709a Added container to the tooltip invocation
Signed-off-by: snipe <snipe@snipe.net>
2023-08-08 18:52:26 +01:00
snipe
5a43c5906f Merge remote-tracking branch 'origin/develop' 2023-08-08 17:54:17 +01:00
snipe
9e6f23c8c7 Merge pull request #13421 from uberbrady/re_add_asset_eol_date
Re-add the option for asset_eol_date as an import field
2023-08-08 17:52:05 +01:00
Brady Wetherington
6afbf1b152 Re-add the option for asset_eol_date as an import field 2023-08-08 17:45:33 +01:00
snipe
4b2bf057c7 Merge remote-tracking branch 'origin/develop' 2023-08-08 12:57:27 +01:00
snipe
af91ffb2da Merge pull request #13418 from snipe/fixes/add_mailgun_endpoint
Added mailgun endpoint option, defaulting to the US
2023-08-08 12:56:37 +01:00
snipe
94bef046b8 Added mailgun endpoint option, defaulting to the US
Signed-off-by: snipe <snipe@snipe.net>
2023-08-08 12:50:38 +01:00
snipe
3091d2cdf0 Merge remote-tracking branch 'origin/develop' 2023-08-08 08:19:15 +01:00
snipe
bd4061e023 Change text on dropdown
Signed-off-by: snipe <snipe@snipe.net>
2023-08-08 08:18:56 +01:00
snipe
5bda73f151 Ugh - messing with the blade layout
Signed-off-by: snipe <snipe@snipe.net>
2023-08-08 08:18:40 +01:00
Marcus Moore
42055bb69d Add authentication and authorization tests for department index method 2023-08-07 17:42:28 -07:00
Marcus Moore
7c5a1b376e Remove redundant Company::scopeCompanyables wrapper 2023-08-07 16:54:23 -07:00
Marcus Moore
f7b2075e9e Add CompanyableTrait to Department 2023-08-07 16:54:02 -07:00
Marcus Moore
cdfe8e459d Add simple test cases for api department index 2023-08-07 16:36:01 -07:00
Marcus Moore
b56bcd3596 Troubleshooting pipeline: create both .env and .env.testing 2023-08-07 11:59:58 -07:00
Marcus Moore
999605b591 Troubleshooting pipeline: create .env.testing in place of .env 2023-08-07 11:57:34 -07:00
Marcus Moore
d3a45f73cf Troubleshooting pipeline: re-add creating .env.testing 2023-08-07 11:48:09 -07:00
Marcus Moore
0d40979724 Troubleshooting pipeline: Remove commented commands 2023-08-07 11:36:51 -07:00
Marcus Moore
81efa7d84e Revert "Troubleshooting pipeline: use phpunit in place of artisan test"
This reverts commit a7d1657111.
2023-08-07 11:35:18 -07:00
Marcus Moore
a7d1657111 Troubleshooting pipeline: use phpunit in place of artisan test 2023-08-07 11:31:00 -07:00
Marcus Moore
8ea8ff05e5 Troubleshooting pipeline: fix filename 2023-08-07 11:26:04 -07:00
Marcus Moore
6398805fc3 Troubleshooting pipeline: use .env.testing in place of .env.example 2023-08-07 11:24:38 -07:00
Marcus Moore
119ed9c882 Troubleshooting pipeline: remove comment to trigger build 2023-08-07 11:09:10 -07:00
snipe
32d8d8c50e Merge pull request #13397 from uberbrady/fix_locationless_ldap_sync
Fixed #13372: Put guard around assigning location via LDAP
2023-08-07 17:06:58 +01:00
Marcus Moore
ae9cf1e5b6 Formatting 2023-08-02 18:24:32 -07:00
Ivan Nieto Vivanco
053d3fc9ed Prevent asset to be checked out if full company support is enabled and companies not match 2023-08-02 19:23:28 -06:00
Marcus Moore
d019e62d39 Remove lazy from eula field to avoid race condition 2023-08-02 18:22:40 -07:00
Ivan Nieto Vivanco
9ca163e8cf Stop asset acceptances from shown to user if full company support is enabled and companies not match 2023-08-02 19:22:35 -06:00
Marcus Moore
b70a5280f9 Remove unneed jquery 2023-08-02 18:04:21 -07:00
Marcus Moore
cbe5a9bc8a Persist eula text even when field is disabled 2023-08-02 18:03:09 -07:00
Marcus Moore
3fd0853fd0 Ensure eula field enabled when not using default eula 2023-08-02 18:02:56 -07:00
Marcus Moore
2e7aa01abe Pass checkin_email value to backend even when unchecked 2023-08-02 17:45:39 -07:00
Marcus Moore
896f038054 Set send email back to original value when eulas cleared 2023-08-02 17:03:56 -07:00
Marcus Moore
48979ce177 Disable send email when it should not be modified 2023-08-02 16:52:56 -07:00
Marcus Moore
e12935f7fa Disable eula textarea when using global eula 2023-08-02 16:18:57 -07:00
Marcus Moore
6400034435 Improve variable name 2023-08-02 16:06:59 -07:00
Marcus Moore
269414e4f2 Automatically check the send email to user checkbox in certain conditions 2023-08-02 16:04:01 -07:00
Marcus Moore
dee6ebf8e0 Scaffold component test 2023-08-02 12:58:07 -07:00
Marcus Moore
105c94aea9 Implement toggling message when email will be sent 2023-08-02 11:36:20 -07:00
snipe
c52a1f94dc Merge remote-tracking branch 'origin/develop' 2023-08-02 15:19:23 +01:00
Brady Wetherington
0af205dade Put guard around assigning location via LDAP 2023-08-02 15:01:14 +01:00
Marcus Moore
6349d52803 WIP: migrate to livewire 2023-08-01 17:29:23 -07:00
Marcus Moore
65de9c5e07 Extract translation strings 2023-08-01 15:21:49 -07:00
Marcus Moore
ebfc395e78 Improve messaging 2023-08-01 14:39:30 -07:00
Marcus Moore
5c8c2ca027 Improve variable names 2023-08-01 14:26:21 -07:00
snipe
924f5287f7 Merge pull request #13392 from Godmartinz/change_webhook_variable_type
Fixed `webhook_endpoint` data type from varchar to a text
2023-08-01 20:28:39 +01:00
Godfrey M
7560afb8c4 changes webhook_endpoint var to a text 2023-08-01 10:45:39 -07:00
Godfrey M
8a24a47475 removed unnecessary code 2023-08-01 09:45:48 -07:00
Godfrey M
fb52038e7c applies a check if a sync field is designated 2023-08-01 09:39:58 -07:00
snipe
ffb605a37c Merge pull request #13309 from inietov/fixes/checkout_range_doesnt_include_today
Fixed #13300 Custom Asset Report, Checkout date range never includes current day
2023-07-31 15:04:22 +01:00
snipe
343aacab85 Merge pull request #13386 from snipe/security/dep_updates
Updated BS table and table export plugins
2023-07-31 13:46:41 +01:00
snipe
96d69b654d Updated BS table and table export plugins
Signed-off-by: snipe <snipe@snipe.net>
2023-07-31 13:45:15 +01:00
snipe
2e1c3fb51b Merge pull request #13295 from inietov/fixes/admins_cannot_view_encrypted_fields
Fixed #11794 Admins Cannot View Encrypted Field
2023-07-31 13:08:28 +01:00
snipe
3e4b371bf4 Merge pull request #13379 from inietov/fixes/component_checkout_via_api_returns_error
Fixed #13376 Component checkout via API returns error
2023-07-31 13:07:38 +01:00
Grant Le Roux
b1464e028c Merge branch 'develop' into develop 2023-07-31 07:57:29 +08:00
Ivan Nieto Vivanco
0a841ddbb8 Change component validator to the correct asset id we're passing in the API call 2023-07-27 20:22:13 -06:00
snipe
af86c6138d Merge pull request #13361 from Godmartinz/bug/sc-19126
Fixed custom fieldset order
2023-07-26 08:55:18 +01:00
snipe
f6545be410 Merge pull request #13363 from inietov/fixes/no_records_found_multipage_license_seats
Fixed #13298 "No records Found" when Switching between Single and Multi-Page Licenses
2023-07-26 08:48:44 +01:00
Ivan Nieto Vivanco
c015264181 Adjust the license offset if it exceeds the total of license seats 2023-07-25 16:23:33 -06:00
Godfrey M
9c6e8d57aa removes typos 2023-07-25 11:44:16 -07:00
Godfrey M
11e3487263 custom field set order starts at 1 now 2023-07-25 11:41:08 -07:00
snipe
a01cb26aac Merge pull request #12940 from akemidx/delete_asset_from_view_page
Delete button on asset view page
2023-07-25 12:11:35 +01:00
akemidx
e289e95721 no ? needed 2023-07-24 17:22:10 -04:00
akemidx
b082d27c42 removing :item 2023-07-24 17:12:12 -04:00
snipe
ff3bdebb9a Merge remote-tracking branch 'origin/develop' 2023-07-24 13:27:35 +01:00
snipe
39ea15a27a Merge pull request #13347 from snipe/fixes/custom_report_error_on_bad_model
Possible alternative to fixing #13296 - custom report failing when th…
2023-07-21 15:18:16 +01:00
snipe
f699d9680b Merge remote-tracking branch 'origin/develop' 2023-07-21 15:00:23 +01:00
snipe
4fe6632167 Merge pull request #13349 from snipe/fixes/check_for_valid_model
Fixed: tighter check for valid model
2023-07-21 14:52:00 +01:00
snipe
1a771e6ab9 Check that the model is valid before trying to chain the relationship
Signed-off-by: snipe <snipe@snipe.net>
2023-07-21 14:46:58 +01:00
snipe
7f761000b4 Use slightly less terrifying and more accurate language
Signed-off-by: snipe <snipe@snipe.net>
2023-07-21 14:46:39 +01:00
Ivan Nieto Vivanco
cb4ed92639 Use Carbon date objects instead of casting using DB::raw() 2023-07-20 16:17:06 -06:00
snipe
540b09c506 Possible alternative to fixing #13296 - custom report failing when the model is busted
Related: https://github.com/snipe/snipe-it/pull/13297
Signed-off-by: snipe <snipe@snipe.net>
2023-07-20 17:45:45 +01:00
snipe
d26bc19e3f Merge remote-tracking branch 'origin/develop' 2023-07-20 16:34:16 +01:00
snipe
0b8a3ee9a5 Merge pull request #13346 from snipe/fixes/depreciable
Check that $this->get_depreciation() returns
2023-07-20 16:33:15 +01:00
snipe
1e09320ebe Check that $this->get_depreciation() returns
Signed-off-by: snipe <snipe@snipe.net>
2023-07-20 16:30:07 +01:00
snipe
19df0b82b1 Merge remote-tracking branch 'origin/develop' 2023-07-20 14:06:45 +01:00
snipe
ee36497acf Merge pull request #13344 from snipe/fixes/added_manufacturer_to_licenses
Fixes bug/sc-23509: Added manufacturer back into license importer
2023-07-20 14:05:19 +01:00
snipe
d7ac8ef618 Added manufacturer to licenses
Signed-off-by: snipe <snipe@snipe.net>
2023-07-20 14:02:54 +01:00
snipe
244e4ec11f Added manufacturer back into license importer
Signed-off-by: snipe <snipe@snipe.net>
2023-07-20 13:48:51 +01:00
snipe
917005ceb4 Merge pull request #13342 from Loemnk/develop
Fixes #13341: Clean up correct seats on license delete
2023-07-20 13:05:31 +01:00
Tobias Franzius
90a344af0b Fixes #13341 Clean up correct seats on license delete
Before this, we checked for the `id` collumn in the `license_seats` table, insteasd of
using `license_id` for this.

This way, we ensure that we only alter seats belonging to the correct license.
2023-07-20 13:48:57 +02:00
Ivan Nieto Vivanco
ecf522243b Add the new rule to proper views and also in the Asset Transformer 2023-07-19 19:52:03 -06:00
Ivan Nieto Vivanco
705411eb4d Create the Gate that goes with the permission 2023-07-19 19:44:59 -06:00
Ivan Nieto Vivanco
3b4a2b0f5b Add permission to view and modify encrypted custom fields 2023-07-19 14:57:57 -06:00
snipe
a19a508a80 Merge pull request #13197 from akemidx/current_value_for_assets
Current value added to asset index page
2023-07-19 19:06:15 +01:00
akemidx
9e2987e680 changing book value to be NOT searchable or sortable 2023-07-19 13:44:31 -04:00
snipe
b54e7dc3ee Fixed #13336 - Save unhashed password if no password provided
Signed-off-by: snipe <snipe@snipe.net>
2023-07-19 17:44:40 +01:00
snipe
1e1aea2eb0 Merge pull request #13299 from ubc-cpsc/bugfix/CVE-2023-37260
Update league/oauth2-server for CVE-2023-3726
2023-07-19 13:14:35 +01:00
snipe
33fd904c18 Merge pull request #13330 from akemidx/merge_users_typo
merge users page typo fix
2023-07-19 10:26:57 +01:00
snipe
74a5bcd490 Merge remote-tracking branch 'origin/develop' 2023-07-19 09:01:19 +01:00
snipe
dc20305db6 Merge pull request #13333 from snipe/fixes/strtolower_on_catgories
Added strtolower for category type
2023-07-19 09:00:55 +01:00
snipe
a0a5ca1f40 Added strtolower for category type
Signed-off-by: snipe <snipe@snipe.net>
2023-07-19 08:56:17 +01:00
akemidx
064e696521 merge users page typo fix 2023-07-18 15:33:33 -04:00
snipe
c1949ffb0d Merge pull request #13319 from marcusmoore/chore/user-search-test-cases
Added test cases around user search
2023-07-18 13:27:22 +01:00
snipe
bc91181917 Merge remote-tracking branch 'origin/develop' 2023-07-18 13:27:05 +01:00
snipe
18e2ec4dad Merge pull request #13310 from marcusmoore/bug/sc-23478
Fixed the inability to load location select when editing profile
2023-07-18 13:26:30 +01:00
snipe
92e7e79faf Merge remote-tracking branch 'origin/develop' 2023-07-18 13:25:34 +01:00
snipe
6f8c3ca167 Merge pull request #13322 from uberbrady/fix_ldap_location_3
Fix to ldap_location attribute
2023-07-18 13:24:59 +01:00
snipe
1fa703387a Merge remote-tracking branch 'origin/develop' 2023-07-18 11:30:53 +01:00
snipe
cbdce994b8 Merge pull request #13318 from inietov/fixes/employee_id_not_importing
Fixed Employee Number no longer importing [sc-23497]
2023-07-18 11:08:43 +01:00
Brady Wetherington
051830dff4 Fix to ldap_location attribute 2023-07-17 20:42:02 +01:00
Marcus Moore
2eaab6d9fb Change message to a callout 2023-07-17 12:23:31 -07:00
Marcus Moore
fa0a88289a Add tests around user search
Follow up to #13311
2023-07-17 11:29:22 -07:00
Ivan Nieto Vivanco
88c40c9c14 Change the field name to the same the model uses 2023-07-17 12:08:10 -06:00
snipe
3203f8f97c Merge remote-tracking branch 'origin/develop' 2023-07-15 10:48:09 +01:00
snipe
f15e14f905 Merge pull request #13315 from snipe/features/add_warranty_link_even_if_no_warranty_set
Moved warranty into manufactuer’s section
2023-07-15 10:47:44 +01:00
snipe
c21a7db3c1 Moved warranty into manufactuer’s section
Signed-off-by: snipe <snipe@snipe.net>
2023-07-15 10:45:36 +01:00
snipe
8bc8ecfc67 Merge remote-tracking branch 'origin/develop' 2023-07-14 09:39:26 +01:00
snipe
bb0eaf8b8d Merge pull request #13312 from snipe/features/add_show_hide_option_on_custom_fields
Added ability to show/hide custom fields in list views by default
2023-07-14 09:38:35 +01:00
snipe
3078cab7ee Added ability to show/hide custom fields in list views by default
Signed-off-by: snipe <snipe@snipe.net>
2023-07-14 09:09:43 +01:00
snipe
db8c37cd5b Merge remote-tracking branch 'origin/develop' 2023-07-14 08:26:12 +01:00
snipe
15bb943210 Merge pull request #13311 from snipe/fixes/deleted_users_showing_in_current_users
Fixed: deleted users showing in current users
2023-07-14 07:47:36 +01:00
snipe
f51dd15893 Moved deleted scope down
Signed-off-by: snipe <snipe@snipe.net>
2023-07-14 07:44:19 +01:00
Marcus Moore
346ace9444 Allow users that have permission to edit their own location to see locations in select list 2023-07-13 17:37:46 -07:00
Ivan Nieto Vivanco
ecac4718fe Add date casting to the SQL query, so the BETWEEN range doesn't care about time of day in custom report datetimes 2023-07-13 16:02:47 -06:00
snipe
4027acee46 Merge pull request #13184 from akemidx/department_in_side_bar
User department now visible in side pane of asset view page
2023-07-13 21:01:48 +01:00
snipe
43d419f051 Merge remote-tracking branch 'origin/develop' 2023-07-13 13:18:52 +01:00
snipe
5aa99a15d8 Merge pull request #13288 from snipe/fixes/line_based_markdown
Added Inline markdown method
2023-07-13 13:16:50 +01:00
snipe
016502f637 Added notesFormatter
Signed-off-by: snipe <snipe@snipe.net>
2023-07-13 13:14:10 +01:00
snipe
66875ff0dc Merge remote-tracking branch 'origin/develop' 2023-07-13 12:59:30 +01:00
snipe
5d1f294f0e Added parseEscapedMarkedownInline to accessories API
Signed-off-by: snipe <snipe@snipe.net>
2023-07-13 12:03:01 +01:00
snipe
981c3a430d Merge pull request #13301 from uberbrady/better_auto_increment_tags
Better auto increment asset-tags [FD-32892]
2023-07-13 09:49:44 +01:00
Joël Pittet
24adcdb586 Revert lock file changes for PHP 7 support 2023-07-12 17:58:52 -07:00
akemidx
1163af3c10 change to make sure department actually exists 2023-07-12 15:57:44 -04:00
snipe
232e84acf7 Merge pull request #13302 from snipe/features/env_setting_for_bs_tables
Fixed #13256 - Added option to switch to localStorage instead of cookies
2023-07-12 20:10:33 +01:00
snipe
5d60a38a0e Added comment with link
Signed-off-by: snipe <snipe@snipe.net>
2023-07-12 20:08:20 +01:00
snipe
c1c2c38995 Fixed #13256 - Added option to switch to localStorage instead of cookies
Signed-off-by: snipe <snipe@snipe.net>
2023-07-12 20:06:17 +01:00
snipe
8c74e906ef Merge remote-tracking branch 'origin/develop' 2023-07-12 19:22:49 +01:00
snipe
3a6d8ef684 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/all.css
#	public/css/dist/bootstrap-table.css
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
2023-07-12 19:22:34 +01:00
snipe
44231fa52c Merge pull request #13225 from inietov/fixes/change_default_location_at_checkin
Fixed #13167 Default location not being set/updated upon check-in
2023-07-12 19:14:53 +01:00
snipe
44b8558e38 Merge pull request #13233 from Godmartinz/barcode_adjusts_if_qr_code_
fixed margin if qr_code present
2023-07-12 17:11:58 +01:00
snipe
d3c44a462e Merge pull request #13268 from inietov/fixes/license_importer_missing_dropdown_items
Fixed License importer missing Checkout to: Username and Checkout to: Email in dropdown [sc-23456]
2023-07-12 17:11:27 +01:00
snipe
a569a99e61 Used inline markdown in views
Signed-off-by: snipe <snipe@snipe.net>
2023-07-12 16:57:04 +01:00
Brady Wetherington
e648da9dc5 Also do a sanity-check that the normal asset autoincrementing works 2023-07-12 16:51:23 +01:00
Brady Wetherington
76191a09ed Improvements to asset_tag auto-incrementing, with auto-fixups for gaps 2023-07-12 16:39:45 +01:00
snipe
1b8b117f4e Merge pull request #13292 from marcusmoore/guard-against-wiping-local-db
Avoid accidentally wiping local database when running tests
2023-07-12 15:23:11 +01:00
Marcus Moore
3df175fb3e Improve variable name 2023-07-11 16:36:38 -07:00
Marcus Moore
44d8b2fd5e Handle default eula checkbox 2023-07-11 16:36:03 -07:00
Ivan Nieto Vivanco
e0df8cc4aa Add admin role to show encrypted customfield values 2023-07-11 17:21:32 -06:00
Marcus Moore
af681d8190 Display message and update checkbox depending on EULA status 2023-07-11 16:12:43 -07:00
snipe
2bc4235368 Merge pull request #13293 from marcusmoore/run-chipper-on-all-prs
Run ChipperCI on all PRs (take three)
2023-07-11 20:36:49 +01:00
Marcus Moore
5b33c00e9f Run ChipperCI on all PRs 2023-07-11 12:34:39 -07:00
Marcus Moore
48e4ec8cf5 Guard against wiping database when running tests and test specific envs are not created 2023-07-11 12:16:37 -07:00
snipe
b5695c9ab7 Test parsedown in notes
Signed-off-by: snipe <snipe@snipe.net>
2023-07-11 12:20:47 +01:00
snipe
6d3bf1e5f5 Added additional method for inline
Signed-off-by: snipe <snipe@snipe.net>
2023-07-11 11:41:58 +01:00
snipe
9b5a67e31f Use $Parsedown->line instead of $Parsedown->text
Signed-off-by: snipe <snipe@snipe.net>
2023-07-11 11:33:29 +01:00
snipe
ba37a9db8c Merge pull request #13277 from snipe/features/added_phone_fax_to_locations
Added phone, fax to departments, locations, companies
2023-07-11 11:15:13 +01:00
snipe
9dc7fc93fb Small fixes
Signed-off-by: snipe <snipe@snipe.net>
2023-07-11 11:14:19 +01:00
snipe
a5555a1c67 Merge pull request #13281 from inietov/fixes/error_showing_requested_assets
Fixed #13276 Error Showing Requested Assets
2023-07-11 11:11:33 +01:00
snipe
d76f420f4e Merge pull request #13282 from marcusmoore/fixes/allow-installing-on-74-v2
Fixes dev dependency on PHP 7.4
2023-07-11 11:10:52 +01:00
Marcus Moore
d8f22880d6 Allow installing on PHP 7.4 2023-07-10 17:35:21 -07:00
Ivan Nieto Vivanco
ec8cb1b09e Add the withTrashed() method to requestingUser() method in CheckoutRequest model, so the view of requestable assets doesn't crash 2023-07-10 16:34:00 -06:00
snipe
4845a88c68 Merge pull request #13280 from snipe/security/webpack-upgade
[Snyk] Upgrade webpack from 5.86.0 to 5.87.0 #13267
2023-07-10 20:17:44 +01:00
snipe
73c2202d94 [Snyk] Upgrade webpack from 5.86.0 to 5.87.0 #13267
Signed-off-by: snipe <snipe@snipe.net>
2023-07-10 20:16:09 +01:00
snipe
0d37d1a905 Merge pull request #13279 from snipe/security/acorn-upgrade
Upgraded acorn
2023-07-10 20:08:46 +01:00
snipe
83cf106ce5 Upgraded acorn
Signed-off-by: snipe <snipe@snipe.net>
2023-07-10 20:06:57 +01:00
snipe
7debf126d6 Dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-07-10 20:03:12 +01:00
snipe
c5c87ea0ca Merge pull request #13278 from snipe/security/bs-tables-update
Applied Snyk #13272
2023-07-10 20:01:41 +01:00
snipe
8169206943 Applied Snyk #13272
Signed-off-by: snipe <snipe@snipe.net>
2023-07-10 19:59:08 +01:00
snipe
22d9df304b Merge pull request #13265 from marcusmoore/chore/chipperci-on-prs
Have ChipperCi run on each PR
2023-07-10 19:48:40 +01:00
snipe
14c61e4c17 Added phone, fax to departments, locations, companies
Signed-off-by: snipe <snipe@snipe.net>
2023-07-10 19:44:21 +01:00
Joël Pittet
a4a676ef0b Update league/oauth2-server for CVE-2023-3726 and lcobucci/clock to semver to allow dependencies to update 2023-07-10 11:19:54 -07:00
Ivan Nieto Vivanco
299e546021 Adds the Username and Email to License Importer dropdown 2023-07-06 18:36:13 -06:00
snipe
5a9c2925c3 Merge pull request #13264 from marcusmoore/bug/sc-23451
Fix label wrapping on category edit page
2023-07-06 19:01:36 +01:00
Marcus Moore
149184dc3c Have ChipperCI on on each PR
Following up on #13218
2023-07-06 11:00:03 -07:00
Marcus Moore
ef160b0e15 Add span tag so label is displayed properly 2023-07-06 10:49:57 -07:00
Ivan Nieto Vivanco
f4ca29b4a8 Only show radio inputs for location in checkin view 2023-07-06 11:36:55 -06:00
Ivan Nieto Vivanco
9591442f1e Evaluate the radio input to update location only or default location too 2023-07-06 10:46:21 -06:00
Ivan Nieto Vivanco
743e852998 Add radio buttons to alter asset checkin location behavior 2023-07-06 10:38:48 -06:00
snipe
2faa73f983 Merge pull request #13169 from akemidx/license_sn_check1
Making Serial Number the logic checked against for new imports
2023-07-06 16:40:27 +01:00
snipe
d37aaee4c8 Merge pull request #13257 from snipe/fixes/check_for_ceiling_in_upgrader
Check for max PHP version in upgrader
2023-07-06 16:07:10 +01:00
snipe
a9d175a396 Check for max PHP version
Signed-off-by: snipe <snipe@snipe.net>
2023-07-05 18:47:48 +01:00
snipe
a56b040143 Merge remote-tracking branch 'origin/develop' 2023-07-05 17:30:19 +01:00
snipe
35039cd590 Merge pull request #13255 from snipe/fixes/larger_field_for_idp_meta
Change settings table `saml_idp_metadata` to MEDIUMTEXT
2023-07-05 17:30:02 +01:00
snipe
c85a33be6a Change settings table saml_idp_metadata to MEDIUMTEXT
Signed-off-by: snipe <snipe@snipe.net>
2023-07-05 17:28:08 +01:00
snipe
61fd427678 Bumped version
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-07-05 14:41:34 +01:00
snipe
d890d923ff Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2023-07-05 14:40:54 +01:00
snipe
32747cafde Merge remote-tracking branch 'origin/develop' 2023-07-05 14:37:53 +01:00
snipe
4b4983e550 Merge pull request #13253 from uberbrady/improve_scim_404s
Properly return SCIM Exceptions
2023-07-05 14:37:32 +01:00
Brady Wetherington
a6a89ddd6c Also log(debug) the error - could be useful for troubleshooting 2023-07-05 14:31:08 +01:00
Brady Wetherington
1f4d2f1e4a Properly return SCIM Exceptions 2023-07-05 14:27:10 +01:00
Godfrey M
d44e667697 fixed margin if qr_code present 2023-06-29 13:37:38 -07:00
snipe
e18c3e08be Merge remote-tracking branch 'origin/develop' 2023-06-29 21:23:53 +01:00
snipe
bbbeaaee2b Merge pull request #13232 from Godmartinz/labels_overlapping_issue
fixed barcode and info from overlapping
2023-06-29 21:23:31 +01:00
snipe
33b1a31ed3 Merge remote-tracking branch 'origin/develop' 2023-06-29 21:19:25 +01:00
Godfrey M
df90e924b4 prevent labels from overlapping 2023-06-29 13:18:17 -07:00
snipe
630b6496ec Merge pull request #13231 from snipe/fixes/small_fix_for_error_during_seeding
Redirect if the license can’t be found
2023-06-29 21:18:02 +01:00
snipe
7937542dcb Redirect if the license can’t be found
Signed-off-by: snipe <snipe@snipe.net>
2023-06-29 21:15:50 +01:00
snipe
1b71ab6d86 Updated prod assets
Signed-off-by: snipe <snipe@snipe.net>
2023-06-29 20:41:16 +01:00
snipe
af26ec471f Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/skins/skin-yellow-dark.css
#	public/css/dist/skins/skin-yellow-dark.min.css
#	public/mix-manifest.json
2023-06-29 20:41:05 +01:00
akemidx
d0212d4bda formatting fix 2023-06-29 15:39:19 -04:00
snipe
e236bf412c Merge pull request #13230 from snipe/fixes/windows_backup_filename_colon_wtf_issue
Fixed windows backup filename - swapped colon in timestamp to hyphen to handle windows filesystems
2023-06-29 20:37:09 +01:00
snipe
fb9b3a5453 Switched from a colon to a hyphen to handle windows filesystems
Signed-off-by: snipe <snipe@snipe.net>
2023-06-29 20:32:20 +01:00
snipe
faf2a235fb Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-06-29 20:31:13 +01:00
snipe
9f99f8275c Merge pull request #13229 from Godmartinz/status_label_color
fixed custom fields labels being unreadable
2023-06-29 20:21:46 +01:00
slong753
8cee3a8218 ok, @marcusmoore was right all along
i just didn't get it
2023-06-29 14:06:52 -05:00
Godfrey M
f83effbb85 removed unnecessary css rule 2023-06-29 11:25:40 -07:00
Godfrey M
d4cddebba5 fixes custom fields labels being unreadable 2023-06-29 11:21:21 -07:00
snipe
4dd71e0332 Merge remote-tracking branch 'origin/develop' 2023-06-29 17:14:15 +01:00
snipe
825e988dfa Merge pull request #13228 from snipe/bug/sc-23434
Use proper alias for table scope
2023-06-29 17:11:50 +01:00
snipe
bcefe73c9c Use proper alias for table scope
Signed-off-by: snipe <snipe@snipe.net>
2023-06-29 16:52:09 +01:00
slong753
826ea0ded8 move colon to blade based on a comment 2023-06-29 10:40:04 -05:00
snipe
4908082240 Merge remote-tracking branch 'origin/develop' 2023-06-29 16:23:35 +01:00
snipe
a3096e1b47 Merge pull request #13219 from inietov/features/cancel_request_asset
Cancel requested assets without checkin/out [ch-17606]
2023-06-29 16:18:13 +01:00
snipe
16ce06a3cc Merge pull request #13222 from snipe/feature/sc-23427
Fixed #13213 - Use the Helper::parseEscapedMarkedown in notes
2023-06-29 16:16:25 +01:00
snipe
8be3a6985b Merge pull request #13227 from snipe/bug/sc-23433
More reshuffling of scopes in assets API
2023-06-29 16:10:26 +01:00
snipe
ead5f039b4 Merge remote-tracking branch 'origin/develop' 2023-06-29 15:33:12 +01:00
snipe
4c3a306a6e More shuffling of scopes
Signed-off-by: snipe <snipe@snipe.net>
2023-06-29 13:35:41 +01:00
Ivan Nieto Vivanco
011726154c Set rtd_location if a location is given at checkin 2023-06-29 03:16:59 -06:00
slong753
ea61f634fb get rid of nice nullsafe 2023-06-28 16:48:52 -05:00
slong753
afe6fe207a resolved, missed adding errors in a case 2023-06-28 16:45:18 -05:00
akemidx
af03b9f140 user department clarification & translation for that phrase. will be used in a later PR 2023-06-28 17:45:13 -04:00
snipe
f7f2d799f2 Merge pull request #13223 from inietov/fixes/delete_notes_map_from_asset_importer
Delete notes column map from assets importer
2023-06-28 20:06:33 +01:00
slong753
8923206ac8 translation string 2023-06-28 13:08:34 -05:00
slong753
3b8ab2d682 clean formatting a little 2023-06-28 13:00:59 -05:00
slong753
2d27941105 added to textarea too 2023-06-28 12:59:54 -05:00
slong753
50a518e5f3 disable input when field is unique 2023-06-28 12:57:23 -05:00
Ivan Nieto Vivanco
a4b8723dcb Delete notes column map from assets importer 2023-06-28 11:38:51 -06:00
Ivan Nieto Vivanco
e2c2736a9c Delete (gulp) Form for bulk edit since is not used in this view 2023-06-28 11:23:37 -06:00
Ivan Nieto Vivanco
85e717bc4e Fix cancel button style and translate title 2023-06-28 10:38:44 -06:00
snipe
2c23c71823 Merge remote-tracking branch 'origin/develop' 2023-06-28 16:41:49 +01:00
snipe
161f4c8d83 Merge pull request #13045 from akemidx/feature/sc-23261
Checkin/out info on side bar
2023-06-28 16:41:21 +01:00
slong753
8b8e7cb5ee couple translation strings 2023-06-28 10:17:28 -05:00
snipe
e1fdfd01f6 Merge pull request #13211 from marcusmoore/company-scoping
Improve testing around company scoping
2023-06-28 16:17:07 +01:00
snipe
4278471d81 Merge pull request #13207 from Godmartinz/half_year_dep_fix
adds half_year fix from jdickerson71388
2023-06-28 15:12:30 +01:00
snipe
e3f381a1e1 Merge pull request #13212 from marcusmoore/feature/sc-23419
Allow running tests in parallel
2023-06-28 15:12:13 +01:00
snipe
8d8adc1639 Use the Helper::parseEscapedMarkedown in notes
Signed-off-by: snipe <snipe@snipe.net>
2023-06-28 15:02:32 +01:00
snipe
a455f67d62 Merge pull request #13216 from marcusmoore/bug/sc-23420
Fix translation string in user importer
2023-06-28 07:03:11 +01:00
snipe
b6a11cde65 Merge pull request #13218 from marcusmoore/chore/sc-23424
Have ChipperCI run on each PR
2023-06-28 07:01:14 +01:00
snipe
a8d4494e68 Merge pull request #13220 from marcusmoore/bug/sc-23425
Add missing relationship check in Asset Transformer
2023-06-28 06:59:33 +01:00
Marcus Moore
ab51857854 Check to see if model relationship exists before using it 2023-06-27 19:35:55 -07:00
Ivan Nieto Vivanco
8496e64e16 Adds ternary to set a quantity when needed 2023-06-27 18:37:22 -06:00
Ivan Nieto Vivanco
b4b84f91d0 Redirect to correct page after cancel action 2023-06-27 18:25:38 -06:00
Ivan Nieto Vivanco
1c29bd37a6 Added feature to cancel requests from the Requested Assets view 2023-06-27 18:11:10 -06:00
Marcus Moore
6df7be8c13 Have ChipperCI run on each PR 2023-06-27 16:55:20 -07:00
Ivan Nieto Vivanco
eb4d764601 Refactor Requestable@cancelRequest() firm to admit a user_id so we can cancel a request of whatever user we want 2023-06-27 17:13:11 -06:00
Ivan Nieto Vivanco
b647a8fcd2 Change the inline form HTML label to the Form:: facade 2023-06-27 17:02:25 -06:00
Ivan Nieto Vivanco
62347a56ba Add button with cancel action in requested assets view 2023-06-27 16:41:30 -06:00
Marcus Moore
b0177d513a Fix translation 2023-06-27 12:37:19 -07:00
slong753
e8988bf51e add list 2023-06-26 20:22:27 -05:00
Marcus Moore
3f09e6017b Install paratest to allow for parallel test running 2023-06-26 16:22:28 -07:00
slong753
2736161909 oops, fixed translation 2023-06-26 16:37:06 -05:00
slong753
8cbff0179c translation strings 2023-06-26 16:35:53 -05:00
slong753
2a352619f7 clean up 2023-06-26 16:25:48 -05:00
Marcus Moore
2abdb8a5fd Revert unneeded changes 2023-06-26 14:01:09 -07:00
Marcus Moore
7cb22d3d49 Remove incomplete tests 2023-06-26 14:00:53 -07:00
slong753
691faf6340 ok, this kind of works - pr needs some clean up 2023-06-26 14:56:07 -05:00
Marcus Moore
3cb0920411 Merge branch 'develop' into company-scoping 2023-06-26 12:32:10 -07:00
Godfrey M
114d946437 adds half_year fix from jdickerson71388 2023-06-26 11:26:46 -07:00
snipe
4cb9c25e83 Merge remote-tracking branch 'origin/develop' 2023-06-26 08:30:35 +01:00
snipe
49b50d81ee Merge pull request #13200 from snipe/bug/sc-23417
Set table alias for model number sort scope
2023-06-26 08:29:16 +01:00
snipe
4f7b2836b5 Set table alias for model number sort scope
Signed-off-by: snipe <snipe@snipe.net>
2023-06-26 08:27:17 +01:00
Marcus Moore
acd06927ac Add helper method for authenticating with passport 2023-06-22 17:37:30 -07:00
Spencer Long
f646623a5e Merge branch 'develop' into bulk_edit_custom_fields 2023-06-22 18:00:31 -05:00
Marcus Moore
a35d83d14a Migrate to response macros for readability 2023-06-22 14:41:56 -07:00
akemidx
8df9db76bc column ordering fix 2023-06-22 17:12:40 -04:00
akemidx
8725d40f8d current value added to asset index page. translations for this in reports 2023-06-22 17:00:42 -04:00
snipe
8c6bde335e Merge pull request #13196 from inietov/fixes/default_status_labels_when_import
Fixed issue when importing Assets and no status labels exists [sc-23359]
2023-06-22 21:34:25 +01:00
snipe
b2d74f7e95 Merge pull request #13186 from snipe/bug/sc-23386
Moved logic for tighter constraints when ids are passed
2023-06-22 21:32:36 +01:00
snipe
78d8e32a22 Fixed weird order number thing
Signed-off-by: snipe <snipe@snipe.net>
2023-06-22 21:16:24 +01:00
snipe
4029efebfd Merge pull request #13159 from Godmartinz/audit_image_bug
fixed audit log image not appearing
2023-06-22 21:11:39 +01:00
Marcus Moore
8aae5beaba Add explicit select back to query 2023-06-22 13:09:08 -07:00
Marcus Moore
a8133f62e8 Add explicit select back to query 2023-06-22 13:07:49 -07:00
Ivan Nieto Vivanco
67e47a7d8b Add guard clause to obtain the default ID of imported asset's status label 2023-06-22 13:53:58 -06:00
Marcus Moore
a333d7b72f Add context to incomplete tests 2023-06-22 12:48:09 -07:00
Marcus Moore
ab5fed09db Remove scopeCompanyables call from AssetsController@requestable 2023-06-22 12:36:43 -07:00
Marcus Moore
74b072f1b5 Improve messaging in testing helper 2023-06-22 12:36:30 -07:00
Marcus Moore
0a5e1e3190 Remove scopeCompanyables call from AssetsController@selectlist 2023-06-21 17:21:36 -07:00
Marcus Moore
effd969284 Scaffold test before removing scopeCompanyables call from AssetsController@selectlist 2023-06-21 17:15:02 -07:00
Marcus Moore
fd55c99b87 Remove scopeCompanyables call from AssetsController@index 2023-06-21 16:29:44 -07:00
Marcus Moore
af77fefc61 Scaffold test before removing scopeCompanyables call from AssetsController 2023-06-21 16:19:56 -07:00
Marcus Moore
65e8e4e163 Guard against attempting to use invalid property 2023-06-21 16:18:09 -07:00
snipe
c377e0617c Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-06-21 19:07:07 +01:00
snipe
17a10a4342 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-06-21 19:06:21 +01:00
snipe
5d4e704fac Added a comment
Signed-off-by: snipe <snipe@snipe.net>
2023-06-21 09:26:54 +01:00
snipe
2d9ddab3f0 Moved logic for tighter constraints when ids are passed
Signed-off-by: snipe <snipe@snipe.net>
2023-06-21 09:24:17 +01:00
akemidx
4b8a08edc1 typo 2023-06-20 19:32:16 -04:00
akemidx
1a407dc05b user department now in side view of asset view page 2023-06-20 19:17:14 -04:00
snipe
2ac4449ea3 Merge remote-tracking branch 'origin/develop' 2023-06-15 20:30:07 +01:00
akemidx
00fd541963 improve logging clarity 2023-06-15 15:09:14 -04:00
snipe
f890e1f8b1 Merge pull request #13171 from snipe/features/importer/allow_update_by_user_id
Accept user ID as authoratative field for updates
2023-06-15 20:08:20 +01:00
akemidx
eda5bbf305 fix to allow empty SN 2023-06-15 14:42:34 -04:00
snipe
7a425f8a49 Merge pull request #13093 from NojoudAlshehri/features/added_asset_tag_colum_in_requestable_assets
feature: Added asset_tag column in requestable assets page
2023-06-15 19:37:18 +01:00
snipe
21a27f43a9 Merge pull request #13158 from Godmartinz/asset_maint_warranty_bug
Added warranty confirmation to asset maintenance table
2023-06-15 19:34:16 +01:00
snipe
09d65f810e Merge pull request #13124 from m4us1ne/fix_dompdf_chroot
Fixed #12434: Include Docker Specific Paths for dompdf chroot
2023-06-15 19:32:34 +01:00
snipe
004992086e Merge pull request #13098 from ak-piracha/feature/snipe-13049-status-label-chart-color
Fixed #13098: Status Label Chart Color, resets to default when editing a Status Label
2023-06-15 16:55:32 +01:00
snipe
6c684bccd0 Accept user ID as authoratative field for updates
Signed-off-by: snipe <snipe@snipe.net>
2023-06-15 10:02:05 +01:00
akemidx
df6b4ff349 tagging code 2023-06-14 15:51:14 -04:00
akemidx
efaed3d02c making serial number logic checked against for new imports 2023-06-14 15:32:47 -04:00
Godfrey M
ee50906e44 attempt to add warranty to api controller 2023-06-13 11:20:55 -07:00
snipe
83708e1be9 Merge remote-tracking branch 'origin/develop' 2023-06-13 18:36:22 +01:00
snipe
157a4341ea Merge pull request #13041 from snipe/features/refactor_importer_for_localization
Refactor importer for localization
2023-06-13 18:12:07 +01:00
snipe
f1bf7267f7 Merge pull request #13164 from snipe/localizations/updated_strings
Updated translation strings
2023-06-13 17:24:01 +01:00
snipe
0bb8cc63c5 Updated translation strings
Signed-off-by: snipe <snipe@snipe.net>
2023-06-13 17:12:01 +01:00
Godfrey M
fc86530c94 uses the trueFalseFormatter now 2023-06-13 09:10:42 -07:00
Godfrey M
6dd7181d09 fixed audit log image not appearing 2023-06-12 12:10:19 -07:00
Godfrey M
69325beddb adds warranty confirmation to asset maintenance table 2023-06-12 11:03:32 -07:00
snipe
d1ab139b0f Add @qay21 as a contributor 2023-06-12 14:05:43 +01:00
snipe
dc43985884 Applied #13143 to develop
Signed-off-by: snipe <snipe@snipe.net>
2023-06-12 14:05:26 +01:00
snipe
f552bcef78 Merge pull request #13143 from qay21/patch-1
Fixed #13129: Add missing LDAP lib required for LDAPS support
2023-06-12 14:04:05 +01:00
Quentin Aymard
fc6c5eadd7 Fix missing ldap packages
This should provide LDAPS support out of the box, and fix #13129
2023-06-09 11:14:41 +02:00
Lukas Jung
9fca8c2438 Fixed #12434: Include Docker Specific Paths for dompdf chroot 2023-06-09 11:00:46 +02:00
snipe
924d0b25e8 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
#	public/css/dist/all.css
#	public/js/build/app.js
#	public/js/build/vendor.js
#	public/js/dist/all.js
#	public/mix-manifest.json
2023-06-08 08:53:22 +01:00
snipe
c78c69700f Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-06-08 08:49:55 +01:00
snipe
4775eef392 Merge pull request #13140 from snipe/security/misc_libraries
Updated libraries and dev assets
2023-06-08 08:48:55 +01:00
snipe
14727700ab Updated libraries and dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-06-08 08:48:18 +01:00
snipe
a6b1320b39 Add @stefanstidlffg as a contributor 2023-06-08 08:11:34 +01:00
snipe
4672f6a699 Merge pull request #13139 from snipe/security/updated_webpack
Updated webpack, added new dev assets
2023-06-08 08:11:07 +01:00
snipe
03233465c7 Updated webpack, added new dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-06-08 08:10:12 +01:00
snipe
8a72056bfd Merge pull request #13123 from osterr-forschungsforderungsges-mbh/fix-slack-notifications
fix slack channel notifications
2023-06-08 05:51:08 +01:00
Marcus Moore
7672861b96 Scaffold test before removing scopeCompanyables call from DashboardController 2023-06-07 17:38:23 -07:00
Marcus Moore
6f5252449e Scaffold test before removing scopeCompanyables call from UsersController 2023-06-07 16:25:18 -07:00
Marcus Moore
0f6051bbe5 Inline method call 2023-06-07 16:18:02 -07:00
Marcus Moore
abaf59c990 Extract and use helper methods 2023-06-07 16:16:30 -07:00
Marcus Moore
27d4d107bb Scaffold test before removing scopeCompanyables call from DepartmentsController 2023-06-07 16:10:29 -07:00
Marcus Moore
8e6e525b47 Remove scopeCompanyables call from LicensesController 2023-06-07 16:09:45 -07:00
Marcus Moore
a18f5e7fc0 Remove scopeCompanyables call from ConsumablesController 2023-06-07 14:22:22 -07:00
snipe
adb2757532 Add @NojoudAlshehri as a contributor 2023-06-07 16:52:22 +01:00
snipe
b57730ee9d Added missing assets_fields declaration
Signed-off-by: snipe <snipe@snipe.net>
2023-06-07 15:52:18 +01:00
snipe
9335bf7033 Merge pull request #13122 from marcusmoore/fixes/increase-consumable-factory-name-length
Fixes potentially invalid name in consumable factory
2023-06-07 11:43:13 +01:00
snipe
45b76c4c75 Merge pull request #13127 from NojoudAlshehri/fixes/typo-in-a-html-tag
Fix of typo in an HTML tag
2023-06-07 09:21:51 +01:00
NojoudAlshehri
d06bdc2db4 Fix of typo in an HTML tag 2023-06-07 13:46:17 +07:00
Marcus Moore
48850f3597 Remove scopeCompanyables call from ComponentsController 2023-06-06 18:02:18 -07:00
Marcus Moore
4fb86ad2fb Get name as a string and not an array 2023-06-06 16:31:26 -07:00
Marcus Moore
42a4941ad2 Ensure consumable name is valid in factory 2023-06-06 16:31:26 -07:00
Marcus Moore
6585aa0cf0 Add unit tests for company scoping 2023-06-06 16:31:14 -07:00
Stefan Stidl
ad8c36a51a fix: slack channel 2023-06-06 10:30:01 +02:00
Marcus Moore
d3a0bacb98 Get name as a string and not an array 2023-06-05 12:57:09 -07:00
Marcus Moore
371d11305b Ensure consumable name is valid in factory 2023-06-05 12:17:44 -07:00
snipe
fc5b02e392 Merge remote-tracking branch 'origin/develop' 2023-06-01 19:51:49 +01:00
snipe
7ae260b489 More license translations
Signed-off-by: snipe <snipe@snipe.net>
2023-06-01 19:51:06 +01:00
snipe
ff480a7247 Merge pull request #13114 from inietov/fixes/broken_sorting_manufacturers
Fixed Broken order by manufacturer in Assets table [sc-23313]
2023-06-01 19:40:16 +01:00
Ivan Nieto Vivanco
f9a20bc917 Replace join with left join in pertinent eloquent query 2023-06-01 12:08:51 -06:00
ak-piracha
daf6bcb6d5 follow best practices when working with blade and javascript 2023-06-01 11:07:21 +09:30
snipe
18eda15ec1 Merge remote-tracking branch 'origin/develop' 2023-05-31 16:19:34 +01:00
snipe
e431cd5146 Merge pull request #13085 from inietov/fixes/checkboxes_not_holding_value
Fixed #12978 Custom Field Checkboxes not holding assigned values
2023-05-31 10:55:37 -04:00
snipe
35942361b6 Add @ak-piracha as a contributor 2023-05-31 15:51:39 +01:00
snipe
596b510a25 Merge pull request #13108 from ak-piracha/fixes/component_delete_showing_in_assest
Fixes: issue #13073: deleted component addearing in asset component t…
2023-05-31 10:50:34 -04:00
ak-piracha
1cdf089306 Fixes: issue #13073: deleted component addearing in asset component tab fixed 2023-05-31 00:11:11 +09:30
snipe
c05a4452bc Merge + update assets
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/mix-manifest.json
2023-05-29 18:20:12 -04:00
snipe
13e8f91a59 Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2023-05-29 18:18:46 -04:00
ak-piracha
825a9a384d Fixed 2023-05-29 14:07:53 +09:30
NojoudAlshehri
980cb53efa Added asset_tag column in requestable assets page 2023-05-27 07:05:59 +07:00
snipe
60d2046b6d Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-24 16:13:33 -07:00
snipe
67e0eb3193 Merge pull request #13046 from Godmartinz/asset_info_overflow
Added Asset info overflow-wrap
2023-05-24 16:13:01 -07:00
snipe
44cbb0c2e9 Merge branch 'develop' into asset_info_overflow 2023-05-24 16:11:34 -07:00
snipe
a3a64be19b Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/mix-manifest.json
2023-05-24 16:06:26 -07:00
snipe
fb5e33c50f Updated hash
Signed-off-by: snipe <snipe@snipe.net>
2023-05-24 16:03:15 -07:00
snipe
d7f4fa146b Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-24 16:02:28 -07:00
snipe
064dbdd3d4 Fixed missing brace from conflict
Signed-off-by: snipe <snipe@snipe.net>
2023-05-24 16:02:23 -07:00
snipe
cc07921608 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-24 15:59:52 -07:00
snipe
267a0ffc59 Merge pull request #13077 from Godmartinz/fix_unclickable_nav_bar_and_notifcation_block
fixes mobile nav bar and notification position
2023-05-24 15:58:27 -07:00
snipe
9086cb5310 Merge branch 'develop' into fix_unclickable_nav_bar_and_notifcation_block 2023-05-24 15:56:01 -07:00
Ivan Nieto Vivanco
f4947bfa93 Use trim() function when format the custom field values as array 2023-05-24 04:06:31 -06:00
snipe
5e96fd200f Refactor to remove general_fields
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 20:31:53 -07:00
snipe
d020825a17 Renamed import samples
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:31:42 -07:00
snipe
3ef081e739 Indenting
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:28:42 -07:00
snipe
47fa490e8a More translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:28:23 -07:00
snipe
01768bf649 Renamed sample csv
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:23:29 -07:00
snipe
52cf54d211 New assets CSV
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:22:08 -07:00
snipe
55683c29dc Removed method that does the same return
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:22:00 -07:00
snipe
f355a6e9e1 Added first name and last name
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:21:31 -07:00
snipe
3e4426c68c Clearer comments
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:20:52 -07:00
snipe
2e5486a62e Merge pull request #13076 from marcusmoore/fixes/allow-multi-column-search-in-sqlite
Dynamically adapt concatenation searches for MySQL and sqlite
2023-05-23 16:27:12 -07:00
Marcus Moore
0a3d46824e Automatically add table prefixes when building multi-column search string 2023-05-23 15:58:58 -07:00
snipe
f69caf77e5 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 14:57:57 -07:00
snipe
61d5bd8567 Removed comment
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 14:57:15 -07:00
snipe
80e8022c76 Merge pull request #13044 from Godmartinz/bug/sc-23260_multi_select_example_text
Bug/sc 23260 multi select example text
2023-05-23 14:45:55 -07:00
Marcus Moore
6300909fee Add test for searching for user's first and last name 2023-05-23 13:39:01 -07:00
Marcus Moore
b2b6f0cf96 Use new dynamic scope where possible 2023-05-23 13:38:50 -07:00
Marcus Moore
054d71aedc Add docblock 2023-05-23 13:37:04 -07:00
Marcus Moore
9078d4c71c Add dynamic scope for prettier multiple column search 2023-05-23 13:35:19 -07:00
snipe
d4c5a4eb2e More aliases
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 13:18:32 -07:00
snipe
35794c8ba2 More translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 12:57:48 -07:00
snipe
62384260bc Clarifying comment
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 12:57:40 -07:00
snipe
f2e9b41199 More user fields in asset importer
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 12:57:34 -07:00
snipe
479350ed7b Removed unneeded mapping file
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 12:57:24 -07:00
Godfrey M
68a43cb590 fixes mobile nav bar and notification position 2023-05-23 12:43:32 -07:00
snipe
809dcdc50c Updated CSVs
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 12:13:17 -07:00
snipe
d0f5a044ba More refactoring
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 12:13:06 -07:00
Marcus Moore
05a2e568d7 Add comment 2023-05-23 11:37:09 -07:00
snipe
fbed18a984 Merge pull request #13075 from inietov/fixes/api_incorrect_remaining_accessories
Fixed #13074 [API] Remaining accessories quantity not correct
2023-05-23 11:08:37 -07:00
Ivan Nieto Vivanco
086265455d Pass user count to the eloquent query 2023-05-23 11:53:09 -06:00
Marcus Moore
f40e722397 Add docblock 2023-05-22 17:44:17 -07:00
Marcus Moore
50234bc9a5 Formatting 2023-05-22 17:40:06 -07:00
Marcus Moore
9b512648a3 Update searchRelations in Searchable trait 2023-05-22 17:33:19 -07:00
Marcus Moore
64e83ed9f5 Update scopeAssignedSearch in Asset 2023-05-22 16:54:54 -07:00
snipe
0c7acd6a3b Merge pull request #13070 from inietov/fixes/accessory_image_shown_when_disabled
Fixed #12947 Accessory image in checkin email when Show images in emails is disabled
2023-05-22 15:30:14 -07:00
Ivan Nieto Vivanco
6df9a33eab Add a condition to check if images should be shown in notification 2023-05-22 16:24:16 -06:00
snipe
f9449aa81f Merge pull request #13069 from marcusmoore/fixes/add-eager-load-to-asset-model-endpoint
Add eager loading to Asset Models controller
2023-05-22 14:39:32 -07:00
Marcus Moore
a6eeae6541 Eager load fieldset default values in asset model endpoint 2023-05-22 14:19:03 -07:00
snipe
b2d922f127 New user import sample CSV
Signed-off-by: snipe <snipe@snipe.net>
2023-05-22 13:20:20 -07:00
snipe
96e86501ad Additional alias fields
Signed-off-by: snipe <snipe@snipe.net>
2023-05-22 13:20:08 -07:00
snipe
4dfe6f0a28 Added gravatar, avatar, start_date and end_date to user importer
Signed-off-by: snipe <snipe@snipe.net>
2023-05-22 13:19:57 -07:00
snipe
511d83cc47 Added/fixed a few more translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:52:42 -07:00
snipe
2171d8c83c Removed requestable field in sample consumable CSV
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:52:28 -07:00
snipe
0ea29a0224 Updated translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:21:36 -07:00
snipe
18bedb736e Removed item number, since not everything will have it
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:21:29 -07:00
snipe
1396e314c4 Updated arrays with translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:21:13 -07:00
snipe
b75109dcac Added component mapping switch
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:20:49 -07:00
snipe
b7149d8339 Added translation
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:20:38 -07:00
Marcus Moore
2d86c8f030 Update advancedTextSearch methods in Asset and User models 2023-05-18 17:06:41 -07:00
Marcus Moore
3a9670930d Define required fields in Custom Field seeder so sqlite can be seeded 2023-05-18 13:17:35 -07:00
Marcus Moore
85974c7f65 Apply formatting 2023-05-18 13:16:52 -07:00
Marcus Moore
ffbde46180 Simplify sqlite query 2023-05-18 13:06:50 -07:00
Marcus Moore
d8d672c4c1 Move multiple column search function to Searchable trait 2023-05-18 13:05:40 -07:00
Marcus Moore
9cb0decf35 Adapt multiple column search based on database driver 2023-05-18 12:54:00 -07:00
Godfrey M
608d07d03c adds overflow-wrap to asset info table 2023-05-17 13:08:53 -07:00
Godfrey M
addd806653 testing overflow solutions 2023-05-17 10:47:50 -07:00
Godfrey M
fe60309dfd adds padding to multi select2 inputs 2023-05-17 10:19:25 -07:00
akemidx
deca80ba71 checkin/out info on side bar 2023-05-17 13:17:48 -04:00
Godfrey M
448472b6d3 testing input paddings 2023-05-17 09:45:45 -07:00
snipe
f1b4bba3ae Merge remote-tracking branch 'origin/develop' 2023-05-16 23:12:41 -07:00
snipe
2c4c9a16c9 Refactored the static arrays into mount arrays for translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 22:31:58 -07:00
snipe
d228b7f347 Remove 99% of the defaultMap stuff (might pull all of this later)
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 22:31:01 -07:00
snipe
7012018e22 Removed todo
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 22:30:17 -07:00
snipe
13c6a7f89b Merge pull request #13039 from snipe/features/add_eol_date_to_importer
Added EOL date to importer
2023-05-16 20:12:10 -07:00
snipe
3296716dfa Added EOL date to importer
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 19:06:35 -07:00
snipe
dbae01f545 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/skins/skin-red-dark.css
#	public/css/dist/skins/skin-red-dark.min.css
#	public/mix-manifest.json
2023-05-16 17:41:39 -07:00
snipe
c4876865cf Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 17:36:58 -07:00
snipe
3cbb4620c3 Merge pull request #13008 from Godmartinz/importer_happy_changes
Added standardized colors to the importer
2023-05-16 17:26:32 -07:00
snipe
5a1e6c8e29 Merge pull request #13003 from marcusmoore/chipper-config-updates
Disable browser tests in ChipperCI
2023-05-16 17:26:09 -07:00
snipe
f1575d2020 Merge pull request #13024 from Godmartinz/adds_localization_to_checkout_notif
adds translation to checkout notification
2023-05-16 17:25:50 -07:00
snipe
71234228b4 Merge pull request #13025 from Godmartinz/archived_clears_assigned_to
removes assigned_to if archived
2023-05-16 17:25:24 -07:00
snipe
5be993df8d Merge remote-tracking branch 'origin/develop' 2023-05-16 16:42:17 -07:00
snipe
4ca914d773 Merge pull request #13038 from uberbrady/fix_asset_checkout_on_update
Importer fix for non-Location imports
2023-05-16 16:41:27 -07:00
Brady Wetherington
2eb34d423f Importer fix for non-Location imports 2023-05-16 16:33:07 -07:00
snipe
37f75c5001 Merge remote-tracking branch 'origin/develop' 2023-05-16 16:29:36 -07:00
snipe
b9b9eb86d9 Merge pull request #13036 from snipe/features/multiselect_locations_custom_report
Added multi-select option for location, more to custom report
2023-05-16 16:29:13 -07:00
snipe
9e4e9cc708 Merge pull request #13037 from snipe/fixes/actions_text
Uses actions text in backups table
2023-05-16 16:06:05 -07:00
snipe
fe92667812 Use actions text in backups table
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 16:02:48 -07:00
snipe
02cacf76c6 Additional multi-select options for custom report
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 13:58:21 -07:00
Godfrey M
8e3cbdad90 removes assigned_to if archived 2023-05-15 11:52:57 -07:00
Godfrey M
46d6783fc5 adds translation to checkout notification 2023-05-15 09:01:30 -07:00
akemidx
ba4fc146e2 Merge branch 'delete_asset_from_view_page' of https://github.com/akemidx/snipe-it into delete_asset_from_view_page 2023-05-10 19:30:11 -04:00
akemidx
1916594d27 fixing translation 2023-05-10 19:16:11 -04:00
Godfrey M
763176c86b standardizes the importer colors no matter the theme 2023-05-10 14:52:08 -07:00
snipe
0f3b77ee2d Added multi-select option to custom report
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 14:45:31 -07:00
snipe
869d195b35 Merge pull request #13007 from snipe/fixes/multiselect_company
Fixed multiselect for companies
2023-05-10 13:17:36 -07:00
snipe
a49257ad4b Wrong eval
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 13:16:59 -07:00
snipe
c6eef86661 Fixed multiselect for companies
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 13:15:22 -07:00
snipe
71c7c82398 Merge pull request #13006 from snipe/fixes/12831_array_for_company_id
Fixes PR #12831 use array bracket for multi select company
2023-05-10 12:36:59 -07:00
snipe
23e3d18931 Used brackets for multiselect company
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 12:35:30 -07:00
slong753
5e34ffa2b0 wip 2023-05-10 14:08:12 -05:00
snipe
5f6e528560 Merge branch 'develop' of https://github.com/snipe/snipe-it into develop 2023-05-10 11:36:28 -07:00
snipe
9f39d71f16 Merge pull request #12831 from Godmartinz/adds_multi_select_to_custom_report
Added Multiselect of companies for custom reports
2023-05-10 11:36:21 -07:00
snipe
4c78b49b97 Add @vikaas-cyper as a contributor 2023-05-10 11:31:26 -07:00
snipe
b1fda46e11 Production assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 11:25:28 -07:00
snipe
6b7a7b8aee Merge remote-tracking branch 'origin/develop' 2023-05-10 11:23:29 -07:00
snipe
aca287d28c Merge pull request #13004 from snipe/security/upgrade_webpack
Updated webpack, new asset files
2023-05-10 11:23:02 -07:00
snipe
1f5e4309fa Updated webpack, new asset files
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 11:20:06 -07:00
Marcus Moore
a1a11d788f Disable browser tests in ChipperCI 2023-05-10 11:06:05 -07:00
snipe
63c660f306 Merge pull request #12999 from snipe/develop
Google Oauth Recap
2023-05-10 10:01:23 -07:00
snipe
b8a59cc2d8 Merge branch 'master' into develop 2023-05-10 09:32:26 -07:00
snipe
04aedce47e Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 09:29:42 -07:00
snipe
d648e9a01c Added Google test user
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 09:13:34 -07:00
snipe
7c77f4a697 Extra debugging
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 09:10:53 -07:00
akemidx
537aa04c9a Merge branch 'develop' into delete_asset_from_view_page 2023-05-10 09:30:54 -04:00
snipe
27e0484072 I lied. Missed one
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 03:12:22 -07:00
snipe
ec76de607b Final google login tweaks
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 03:08:29 -07:00
snipe
14da8934c5 Few more login page tweaks
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:53:11 -07:00
snipe
ed370a0104 Added translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:47:28 -07:00
snipe
b99640ecb2 Added ends_with validation message
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:40:55 -07:00
snipe
8bad72a80f Added validation on google client ID
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:40:45 -07:00
snipe
f3c977aa9d Nicer button
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:37:01 -07:00
snipe
788c03ef57 Hide client secret if app is locked
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:22:49 -07:00
snipe
3c00f68bda Added translation string for google auth failure
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:18:50 -07:00
snipe
7062583710 Check for http or https in avatar value
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:18:38 -07:00
snipe
2dd32d8785 Re-add the image update
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:18:27 -07:00
snipe
ff66a938c1 Clearer comments
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:18:15 -07:00
snipe
7f0e677908 Use normal translation style
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:18:05 -07:00
snipe
e8a0c7f2ce Remove avatar update, since we don’t take URLs for that
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:59:33 -07:00
snipe
e950cf4279 Switch to using username as match for google login
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:58:36 -07:00
snipe
567a800c51 Added debugging
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:47:52 -07:00
snipe
e5eb5932ca Create constructor to override expected config variables
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:37:03 -07:00
snipe
a90fc1ab59 Merge pull request #12994 from snipe/features/google_socialite
Google OAuth login
2023-05-10 01:23:37 -07:00
snipe
3612526632 Disallow saving data if app is locked
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:14:54 -07:00
snipe
1ef4ea6381 Very ugly login shim just to test functionality
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:14:31 -07:00
snipe
37bc47290c Disabled fields in demo mode
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:12:55 -07:00
snipe
4da40792ea Use google logo
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:08:28 -07:00
snipe
63bf93b786 Pulled redirect from settings
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:56:04 -07:00
snipe
f57e39191d Added google settings blade
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:55:16 -07:00
snipe
6ab214d3a6 Added google option to settings index
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:55:04 -07:00
snipe
3fb5188037 Removed redirect option
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:54:46 -07:00
snipe
aefd330e4e Added methods for google settings
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:54:28 -07:00
snipe
b7e8ce3064 Changed redirect
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:54:14 -07:00
snipe
b183e53c45 Added settings routes for google auth
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:34:48 -07:00
snipe
054a2ab9d4 Add validation and fillable fields
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:34:31 -07:00
snipe
bc9b47c46d Removed env dependency, switched to DB
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:27:47 -07:00
snipe
72d1c08fbc Added migration
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:21:17 -07:00
snipe
c52b48c383 Google oauth login
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:14:28 -07:00
snipe
11cd875c6d Merge remote-tracking branch 'origin/develop' 2023-05-09 22:42:45 -07:00
snipe
a1ec8cf490 Merge pull request #12993 from snipe/fixes/checkbox_layout_in_ldap
Tightened up some layout issues, checkbox issues in LDAP settings
2023-05-09 22:37:49 -07:00
snipe
0680405f4d Tightened up some layout issues, checkbox issues in LDAP settings
Signed-off-by: snipe <snipe@snipe.net>
2023-05-09 22:34:46 -07:00
slong753
9a4ba78c19 oops, pattern 2023-05-09 23:41:21 -05:00
slong753
491f670215 I think this is what they're looking for 2023-05-09 22:52:00 -05:00
snipe
cbe70c9cc1 Merge remote-tracking branch 'origin/develop' 2023-05-09 20:14:44 -07:00
snipe
6a7bab453f Made spacing more compact
Signed-off-by: snipe <snipe@snipe.net>
2023-05-09 20:14:00 -07:00
snipe
7412bc32e2 Merge pull request #12991 from snipe/fixes/accessories_view
Fixed width of columns in details
2023-05-09 20:11:36 -07:00
snipe
ec4697fd3e Merge remote-tracking branch 'origin/develop' 2023-05-09 19:45:10 -07:00
snipe
5a461d62bc Merge pull request #12990 from snipe/fixes/12881_missing_icon
Added icon field back into assets page
2023-05-09 19:44:30 -07:00
snipe
999dc3c358 Added icon field back into assets page
Signed-off-by: snipe <snipe@snipe.net>
2023-05-09 19:43:37 -07:00
snipe
a10652797f Fixed width of columns in details
Signed-off-by: snipe <snipe@snipe.net>
2023-05-09 19:42:32 -07:00
snipe
090cbab60e Merge pull request #12989 from marcusmoore/chipper-ci
Add ChipperCI configuration
2023-05-09 18:09:23 -07:00
Marcus Moore
1e7986d75b Limit ChipperCI to running on push to master or develop 2023-05-09 16:39:56 -07:00
snipe
a43dea3c04 Merge remote-tracking branch 'origin/develop' 2023-05-09 16:29:53 -07:00
Marcus Moore
1f11a8a2c1 Configure Dusk for ChipperCI 2023-05-09 14:45:18 -07:00
Marcus Moore
8d205e80e5 Add ejected pipeline configuration for ChipperCI 2023-05-09 14:44:43 -07:00
snipe
2d5da67b1e Merge pull request #12982 from akemidx/feature/sc-23214
Buttons on the Accessory View Page
2023-05-09 14:26:28 -07:00
slong753
1d2596fc54 wip 2023-05-09 14:58:59 -05:00
snipe
7dd41aa574 Removed whitespace
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 15:49:12 -07:00
snipe
c4d40cdbd4 Merge remote-tracking branch 'origin/develop' 2023-05-08 15:11:25 -07:00
snipe
b76c5206ff Merge pull request #12986 from snipe/features/import_backup_filename
Pass filename to pre-import backup
2023-05-08 15:08:59 -07:00
snipe
17efc78816 Merge pull request #12985 from snipe/fixes/increase_state_from_3_chars
Increase state from 3 chars
2023-05-08 15:08:44 -07:00
snipe
332b017dcc Pass filename for manual backups
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 15:00:02 -07:00
snipe
5960a5425d Pass filename to pre-import backup
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 14:48:26 -07:00
snipe
277618bf16 Added maxlenth to form fields
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 14:13:24 -07:00
snipe
f84f4ffe99 Migration to embiggen state fields
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 14:13:06 -07:00
snipe
f1d85c67f1 Make validation match database fields
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 14:12:54 -07:00
snipe
6cb6beb6c7 Merge remote-tracking branch 'origin/develop' 2023-05-08 13:21:43 -07:00
snipe
6486ea4fb7 Merge pull request #12976 from inietov/fixes/validate_soft-deleted_models_in_asset_model
Refactor of #12955
2023-05-08 13:14:02 -07:00
snipe
d685335aea Merge pull request #12975 from inietov/fixes/import_asset_notes
Fixed Notes field doesn't get populate when creating/updating assets via Importer [sc-23222]
2023-05-08 13:11:50 -07:00
snipe
d70e14de61 Merge pull request #12972 from marcusmoore/bug/sc-23177
Fixes user name missing in accessory acceptance notifications
2023-05-08 13:04:37 -07:00
snipe
480ef23505 Merge remote-tracking branch 'origin/develop' 2023-05-08 12:44:01 -07:00
snipe
4503815ad7 Merge pull request #12984 from snipe/features/check_for_zip_in_backup_filename
Check that the filename we pass ends in zip, add it if not
2023-05-08 12:43:34 -07:00
snipe
ba462d1e93 Check that the filename we pass ends in zip, add it if not
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 12:41:32 -07:00
snipe
3429d1f4b4 Merge remote-tracking branch 'origin/develop' 2023-05-08 12:22:22 -07:00
snipe
0f76eda4af Merge pull request #12983 from snipe/features/add_optional_filename_to_backup_artisan
Add optional filename to backup
2023-05-08 12:21:55 -07:00
snipe
85243423cf Add optional filename to backup
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 12:20:43 -07:00
snipe
a73205f228 Merge remote-tracking branch 'origin/develop' 2023-05-08 11:24:03 -07:00
snipe
06ffe64f62 Merge pull request #12981 from snipe/fixes/wonky_div_when_saml_disabled
Fixed misplaced div when saml is disabled
2023-05-08 11:22:54 -07:00
snipe
223ff5e97e Fixed misplaced div when saml is disabled
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 11:20:26 -07:00
snipe
fe40902765 Merge remote-tracking branch 'origin/develop' 2023-05-06 06:37:29 -07:00
snipe
689ef433b3 Merge pull request #12979 from snipe/fixes/added_use_for_fieldsets_controller
Added missing use statement
2023-05-06 06:37:01 -07:00
snipe
8b73fa0053 Added missing use statement
Signed-off-by: snipe <snipe@snipe.net>
2023-05-06 06:36:09 -07:00
snipe
3d345d15ac Merge remote-tracking branch 'origin/develop' 2023-05-04 11:01:15 -07:00
snipe
4efa84270a Merge pull request #12974 from snipe/fixes/show_sig_column_regardless_of_sig_status
Show signature column in asset history regardless of “require sig” state
2023-05-04 11:00:51 -07:00
snipe
60515f1262 Show signature column regardless of “require sig” state
Signed-off-by: snipe <snipe@snipe.net>
2023-05-04 10:56:35 -07:00
Ivan Nieto Vivanco
fbb7c55450 Tweak 'exist' rule in Asset->model_id field so it ignores soft-deleted models 2023-05-04 03:12:36 -06:00
Ivan Nieto Vivanco
89fbd60d97 Restore the 'Asset Notes' and 'Model Notes' in the Map Asset Import Fields form 2023-05-04 02:00:04 -06:00
Marcus Moore
96c6d8896f Add additional information to acceptance notifications for assets, accessories, and consumables 2023-05-03 17:04:01 -07:00
Marcus Moore
9efe13bb5e Capitalize "declined" in acceptance in notification 2023-05-03 17:03:22 -07:00
Marcus Moore
4a0b3efd1f Include user's name in Acceptance result notifications for accessories 2023-05-03 14:22:05 -07:00
Marcus Moore
f96d8fe674 Add CheckoutAcceptance factory 2023-05-03 14:21:13 -07:00
snipe
5950ec27ab Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/css/dist/skins/skin-black-dark.css
#	public/css/dist/skins/skin-black-dark.min.css
#	public/css/dist/skins/skin-blue-dark.css
#	public/css/dist/skins/skin-blue-dark.min.css
#	public/css/dist/skins/skin-green-dark.css
#	public/css/dist/skins/skin-green-dark.min.css
#	public/css/dist/skins/skin-orange-dark.css
#	public/css/dist/skins/skin-orange-dark.min.css
#	public/css/dist/skins/skin-red-dark.css
#	public/css/dist/skins/skin-red-dark.min.css
#	public/css/dist/skins/skin-yellow-dark.css
#	public/css/dist/skins/skin-yellow-dark.min.css
#	public/mix-manifest.json
2023-05-03 13:49:36 -07:00
snipe
cd6f6ee8ff Bumped version to 6.1.1-pre
Signed-off-by: snipe <snipe@snipe.net>
2023-05-03 13:47:46 -07:00
akemidx
526c089424 Buttons on the accessory view page 2023-05-03 16:40:06 -04:00
akemidx
67105528d1 Buttons on the accessory view page 2023-05-03 16:31:56 -04:00
akemidx
12f0c42545 buttons added 2023-05-03 16:31:56 -04:00
slong753
815c77f943 wip 2023-05-03 14:49:31 -05:00
snipe
fe710efb40 Merge pull request #12874 from Godmartinz/feature/sc-23130
Adds a checkout range for custom asset reports
2023-05-03 11:43:44 -07:00
snipe
fc53b56481 Merge pull request #12955 from inietov/fixes/error_500_after_sign_and_accept_asset
Fixed Error 500 after sign and accept asset
2023-05-03 11:43:14 -07:00
akemidx
889be83762 replacing route. sorry! 2023-05-03 14:14:18 -04:00
snipe
b716f9f55e Merge pull request #12916 from snipe/features/auto_add_to_fieldset
Added ability to auto-add fields to new fieldsets
2023-05-03 11:04:33 -07:00
snipe
ea17fdeba5 Merge pull request #12846 from snipe/features/livewire_location_import
Location importer via Livewire Importer
2023-05-03 11:02:06 -07:00
snipe
f5cd58e9b7 Unmix return type variables
Signed-off-by: snipe <snipe@snipe.net>
2023-05-03 10:57:02 -07:00
snipe
da4841987e Use translation string
Signed-off-by: snipe <snipe@snipe.net>
2023-05-03 10:55:30 -07:00
snipe
4a643c1252 Merge pull request #12880 from Godmartinz/asset_total_cost
Added component costs to asset view
2023-05-03 10:49:03 -07:00
snipe
cdbd68012f Merge pull request #12878 from joelpittet/patch-2
Use environment variable and default to PHP's sendmail_path
2023-05-03 10:48:39 -07:00
snipe
577fff7d65 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-03 10:45:36 -07:00
snipe
79a27085c9 Merge branch 'develop' of https://github.com/snipe/snipe-it into develop 2023-05-03 10:43:45 -07:00
snipe
27600e1553 Snyk webpack upgrade
Signed-off-by: snipe <snipe@snipe.net>
2023-05-03 10:43:05 -07:00
snipe
914b2658cc Merge pull request #12943 from marcusmoore/fixes/avoid-loading-unused-models-for-report
Remove the loading of asset maintenances that are not used by view
2023-05-03 10:41:52 -07:00
snipe
6a12d5d9a0 Merge pull request #12964 from marcusmoore/fixes/restrict-php-version
Restrict PHP version to <8.2
2023-05-03 10:40:52 -07:00
snipe
466c2fd47c Merge pull request #12966 from Godmartinz/bug/sc-23161
fixed color differences in dark themes
2023-05-03 10:38:54 -07:00
slong753
cdda4a56d8 aha, ok thisd kind of works 2023-05-02 19:11:43 -05:00
slong753
b2c2097e8b just more troubleshooting stuff, still no solution 2023-05-02 18:54:20 -05:00
Godfrey M
87d1a82e35 moar changes to red 2023-05-02 15:15:02 -07:00
Godfrey M
1d494252ef corrections for dark red 2023-05-02 14:05:29 -07:00
Godfrey M
786e8deb91 removed dead space 2023-05-02 13:54:14 -07:00
Godfrey M
0a3cb5286d fixes dark red 2023-05-02 12:37:05 -07:00
Godfrey M
f91e76e0f2 fixes dark blue and btn-warning bg 2023-05-02 12:33:40 -07:00
Godfrey M
af2f288286 fixes dark orange theme 2023-05-02 12:17:22 -07:00
Godfrey M
5de30db0a9 fixes dark green theme 2023-05-02 12:10:55 -07:00
Marcus Moore
48ef8443f5 Restrict PHP to >=7.4.3 <8.2 2023-05-02 12:01:09 -07:00
Godfrey M
47370da924 adds fixes to dark black theme 2023-05-02 11:08:37 -07:00
akemidx
2cb1545b83 removing route 2023-05-01 19:51:52 -04:00
snipe
63af17da74 Merge pull request #12954 from marcusmoore/fixes/test-suite-fixes
Clear the settings cache on app destruction
2023-05-01 16:28:47 -07:00
Godfrey M
7711938f4b fixes dark yellow 2023-05-01 16:27:21 -07:00
Marcus Moore
f7d2b62d87 Improve method name 2023-05-01 16:06:28 -07:00
Marcus Moore
da08f6ef8c Add InteractsWithSettings trait to required tests 2023-05-01 16:05:26 -07:00
Marcus Moore
6d594faae7 Clear the settings cache on app destruction 2023-05-01 16:04:43 -07:00
Ivan Nieto Vivanco
6936d76661 Prevent hard fail when retrieving acceptance data 2023-05-01 16:50:18 -06:00
Ivan Nieto Vivanco
1b2d830380 Check if model exists before create asset via API 2023-05-01 16:05:03 -06:00
akemidx
ad7a1d6c3b edits from Github comments 2023-05-01 15:50:48 -04:00
snipe
609b1646e9 Merge remote-tracking branch 'origin/develop' 2023-04-30 18:40:52 -07:00
snipe
031c9c1204 Added nobr tag to prevent external link icon and link from breaking
Signed-off-by: snipe <snipe@snipe.net>
2023-04-30 18:40:40 -07:00
snipe
77b51136cf Merge remote-tracking branch 'origin/develop' 2023-04-30 18:38:19 -07:00
snipe
0222a922a1 Added tooltip
Signed-off-by: snipe <snipe@snipe.net>
2023-04-30 18:20:23 -07:00
snipe
8ad600085a Moved external link icon into link
Signed-off-by: snipe <snipe@snipe.net>
2023-04-30 18:17:56 -07:00
snipe
7fdbc10122 Merge remote-tracking branch 'origin/develop' 2023-04-29 13:49:14 -07:00
snipe
4c27b65d45 Merge pull request #12950 from snipe/fixes/warranty_lookup_validation
Fixed  #12946 - warranty lookup url was not nullable
2023-04-29 13:48:54 -07:00
snipe
aa814cf761 Fixed #12946 - warranty lookup url was not nullable
Signed-off-by: snipe <snipe@snipe.net>
2023-04-29 13:47:52 -07:00
Marcus Moore
3cae32b236 Eager load default locations 2023-04-27 17:13:09 -07:00
Marcus Moore
429c4cb99f Remove the loading of asset maintenances that are not used by view 2023-04-27 17:12:53 -07:00
snipe
e250d4c884 Merge remote-tracking branch 'origin/develop' 2023-04-27 17:00:29 -07:00
snipe
8b476e55b6 Merge pull request #12941 from akemidx/feature/sc-23153
Created At and Updated At fields on License table view
2023-04-27 16:59:30 -07:00
snipe
b76d2973f7 Merge pull request #12928 from snipe/features/make_hashing_work_rounds_an_env
Env-ify hashing variables, setting the normal defaults
2023-04-27 16:57:45 -07:00
snipe
b001f6771d Merge remote-tracking branch 'origin/develop' 2023-04-27 16:28:42 -07:00
snipe
956bc41e48 Merge pull request #12942 from snipe/bug/sc-23197
Added missing case for licenses for item_count
2023-04-27 16:28:12 -07:00
snipe
567e19bcc0 Added missing case for licenses for item_count
Signed-off-by: snipe <snipe@snipe.net>
2023-04-27 16:26:50 -07:00
akemidx
67a2b796a4 requested edits 2023-04-27 19:19:53 -04:00
akemidx
1c60d686bd Merge remote-tracking branch 'origin/delete_asset_from_view_page' into delete_asset_from_view_page
# Conflicts:
#	resources/views/hardware/view.blade.php
2023-04-27 19:08:51 -04:00
akemidx
cd389368f7 adding in script 2023-04-27 19:00:17 -04:00
akemidx
d3675831bb snippet rewrite 2023-04-27 18:58:59 -04:00
akemidx
84134b45e6 form work 2023-04-27 18:58:59 -04:00
akemidx
b1e68be545 delete button progress 2023-04-27 18:58:59 -04:00
akemidx
d94bed3f57 push for testing 2023-04-27 18:58:59 -04:00
akemidx
aabcf22b40 commiting 2023-04-27 18:58:59 -04:00
akemidx
af549a0be9 Mock Up of the Buttons 2023-04-27 18:58:59 -04:00
snipe
1384ca658a Merge remote-tracking branch 'origin/develop' 2023-04-26 18:42:58 -07:00
snipe
e25dc42121 Switch to externalLinkFormatter
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 18:42:34 -07:00
snipe
dcb7eadfc7 Merge pull request #12933 from snipe/features/unlink_dynamic_urls_if_variables_used
Remove auto-link from from manufacturer warranty
2023-04-26 18:40:33 -07:00
snipe
99ef435d40 Fixed translation
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 18:32:38 -07:00
snipe
e853f8b7fd Removed SR text for exporting
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 18:23:21 -07:00
snipe
deff312381 Remove auto-link from from manufacturer warranty
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 18:16:23 -07:00
snipe
7bffe30fae Merge remote-tracking branch 'origin/develop' 2023-04-26 17:55:48 -07:00
snipe
73d45bb587 Merge pull request #12932 from snipe/features/add_warranty_url_to_mfgs
Added dynamic warranty URL to manufacturers
2023-04-26 17:55:03 -07:00
snipe
7974c172fd Switch back to “normal” url for support
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 16:48:38 -07:00
snipe
54a766c4f9 Added dynamic warranty URL to manufacturers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 16:39:15 -07:00
snipe
27de5c62c5 Merge remote-tracking branch 'origin/develop' 2023-04-26 15:15:43 -07:00
snipe
ef69df2cdf Merge pull request #12930 from snipe/fixes/added_help_text_to_support_url
Added help text to the now-dynamic manufacturer URLS
2023-04-26 15:15:19 -07:00
snipe
7c0ef581c5 Added help text to the now-dynamic manufacturer URLS
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 15:12:36 -07:00
snipe
0c5837e4a0 Merge pull request #12929 from snipe/fixes/use_asset_tag_if_no_asset_name_given
Use the asset tag instead of asset name if no name is given
2023-04-26 14:49:38 -07:00
snipe
5eac314f4d Merge pull request #12906 from akemidx/feature/sc-20622
Dynamic warranty link for manufacturers' support urls
2023-04-26 14:49:22 -07:00
snipe
b5b335a2ca Use the asset tag instead of asset name if no name is given
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 14:41:19 -07:00
akemidx
497d17835f requested edits 2023-04-26 17:06:08 -04:00
slong753
52c9fefbe0 ok, this works except error display 2023-04-26 15:06:50 -05:00
snipe
68417a4c15 Env-ify hashing variables, setting the normal defaults
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 13:01:42 -07:00
akemidx
aab53cf683 remove regex, add in starts_with 2023-04-26 15:18:13 -04:00
snipe
75fdd0ac96 Merge remote-tracking branch 'origin/develop' 2023-04-26 09:54:44 -07:00
snipe
4c16dcf5d0 Merge pull request #12922 from snipe/fixes/12918_route_name_for_clone_locations
Fixed #12918 - wrong route for clone location
2023-04-26 09:54:18 -07:00
snipe
b6889ff399 Fixed #12918 - wrong toite for clone location
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 09:52:13 -07:00
snipe
12cc576b52 Merge remote-tracking branch 'origin/develop' 2023-04-25 23:41:45 -07:00
snipe
19554a7dc2 Merge pull request #12917 from snipe/fixes/applies_pr_12868
Applies #12868 - fixes EOL date on asset creation
2023-04-25 23:40:43 -07:00
snipe
8f0b823fb3 Applies #12868
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 23:39:32 -07:00
snipe
2299771e10 Add @zacharyfleck as a contributor 2023-04-25 22:37:17 -07:00
snipe
37b881b906 Add @dboth as a contributor 2023-04-25 22:32:45 -07:00
snipe
22d73f503a Merge pull request #12756 from dboth/develop
Fixed #8208, #8896, #8985 and #9789:  Currency issues when using non-english locales (resubmission)
2023-04-25 22:32:13 -07:00
snipe
970b5e556c Merge pull request #12903 from marcusmoore/bug/sc-15034
Fixes sending webhook notifications for checkout and checkin
2023-04-25 22:22:58 -07:00
snipe
17275cbeb8 Merge pull request #12905 from marcusmoore/fixes/checkout-via-artisan
Fixes where clause operator in artisan checkout command
2023-04-25 22:21:59 -07:00
snipe
d6ea5de5b8 Merge remote-tracking branch 'origin/develop' into features/auto_add_to_fieldset 2023-04-25 22:20:50 -07:00
snipe
42f0975414 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/all.css
#	public/css/dist/bootstrap-table.css
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
2023-04-25 22:19:27 -07:00
snipe
470a36a7c9 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 22:12:56 -07:00
snipe
b7632cdbb7 Updated js packages
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 22:12:47 -07:00
snipe
9529cd8235 Merge pull request #12891 from snipe/snyk-upgrade-38ca074c3dd0aada16ad8b85f20ebaa8
[Snyk] Upgrade bootstrap-table from 1.21.3 to 1.21.4
2023-04-25 22:04:40 -07:00
snipe
fcddd0827c Merge pull request #12888 from snipe/snyk-upgrade-4c8ffc584b299eb1e71d6be555624f4e
[Snyk] Upgrade webpack from 5.76.2 to 5.77.0
2023-04-25 22:03:49 -07:00
snipe
c8c6f879d4 Merge pull request #12912 from Godmartinz/ldap_location_sync
added ldap_location to settings
2023-04-25 21:54:28 -07:00
snipe
31a3be4c6a Small refactor of HTML, added top submit button
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 21:51:59 -07:00
snipe
27477085fe Merge branch 'develop' into features/auto_add_to_fieldset 2023-04-25 21:31:50 -07:00
snipe
45f22e7561 Updated the sync to disassociate if all boxed are unchecked
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 21:31:23 -07:00
snipe
5759d2c948 Added a check to fail validation if the associated fieldsets are not value
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 21:30:47 -07:00
snipe
15dc4e4779 Added fieldset sync
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 21:29:57 -07:00
slong753
6bec9cf880 fix a couple things 2023-04-25 23:26:16 -05:00
snipe
5eeca937cb Added logic for syncing fieldset info
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 21:08:26 -07:00
snipe
662b7787a1 Updated redirect return
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 21:07:50 -07:00
snipe
28d9cec1e3 Added auto_add_to_fieldsets to API response
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 20:59:48 -07:00
snipe
67212f9d57 Changed layout, added fieldsets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 20:59:29 -07:00
snipe
6cd3cfe1ea Added new field to factory
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 20:57:03 -07:00
snipe
4a063d23b9 We don’t actually use this test?
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 19:36:52 -07:00
snipe
705bb7375a Merge pull request #12914 from marcusmoore/fixes/fix-test-cases
Fixes state leak between tests
2023-04-25 17:22:56 -07:00
snipe
4e3ccb74bc Fixed slightly weird padding
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 15:59:19 -07:00
snipe
4954b50280 Added new strings
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 15:57:46 -07:00
snipe
07336bbc6a Added auto_add_to_fieldsets field
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 15:51:36 -07:00
snipe
0e73923c24 Merge pull request #12913 from uberbrady/fix_scim_id_string
Change from a standard Eloquent mapping for ID to a custom setRead
2023-04-25 12:02:36 -07:00
Marcus Moore
a528ebeab0 Use superuser instead of admin state 2023-04-25 11:53:47 -07:00
Brady Wetherington
3da5df0127 Change from a standard Eloquent mapping for ID to a custom setRead 2023-04-25 11:50:55 -07:00
Godfrey M
20d8ff2a4f removed a typo 2023-04-25 11:49:33 -07:00
snipe
a7e2182ec9 Merge pull request #12904 from zacharyfleck/develop
Fixed #8342: Add ARM64 architecture to Docker Builds
2023-04-25 11:45:27 -07:00
Godfrey M
cb68f41d9c added ldap_location to settings 2023-04-25 11:44:04 -07:00
Zachary Fleck
af0a0276e0 Merge branch 'snipe:develop' into develop 2023-04-25 14:43:41 -04:00
Zachary Fleck
ef07f39ccf remove space 2023-04-25 14:43:34 -04:00
Zachary Fleck
aa223359d4 remove space 2023-04-25 14:42:09 -04:00
Godfrey M
c9eb1410d7 swaps version and open source text in the footer 2023-04-25 11:03:05 -07:00
snipe
b0e342508f Merge remote-tracking branch 'origin/develop' 2023-04-25 08:09:59 -07:00
snipe
efc0929bbc Merge pull request #12910 from snipe/fixes/finer_permissions_for_bulk_assets
Added more granular permissions on bulk actions for assets
2023-04-25 08:09:30 -07:00
snipe
66ce02fc48 Added permission on restore
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 08:09:16 -07:00
snipe
6e7f0728fd Added more granular permissions on bulk actions for assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 08:06:45 -07:00
Marcus Moore
b4f162f316 Fix operator in where clause 2023-04-24 17:26:06 -07:00
akemidx
9cd2783185 Regex added for link instead 2023-04-24 20:07:21 -04:00
zacharyfleck
63ade327a5 add ARM64 architecture 2023-04-24 16:24:44 -04:00
Godfrey M
b8c424fca0 adds users total cost to user profile 2023-04-24 09:17:42 -07:00
snyk-bot
056790e9cd fix: upgrade bootstrap-table from 1.21.3 to 1.21.4
Snyk has created this PR to upgrade bootstrap-table from 1.21.3 to 1.21.4.

See this package in npm:
https://www.npmjs.com/package/bootstrap-table

See this project in Snyk:
https://app.snyk.io/org/snipe/project/3d53e1dd-b8bf-46b5-ba61-18ce26933166?utm_source=github&utm_medium=referral&page=upgrade-pr
2023-04-22 14:47:28 +00:00
snipe
0c425ed0e7 Merge remote-tracking branch 'origin/develop' 2023-04-21 05:19:19 -07:00
snipe
7d9062c065 Merge pull request #12877 from joelpittet/patch-1
Allow an environment variable to set the session cookie path
2023-04-21 04:45:17 -07:00
snipe
fc721a9388 Merge pull request #12887 from marcusmoore/bug/sc-23158
Fix: Ensure users editing themselves do not deactivate their account
2023-04-21 04:42:04 -07:00
snyk-bot
6af3ab8954 fix: upgrade webpack from 5.76.2 to 5.77.0
Snyk has created this PR to upgrade webpack from 5.76.2 to 5.77.0.

See this package in npm:
https://www.npmjs.com/package/webpack

See this project in Snyk:
https://app.snyk.io/org/snipe/project/3d53e1dd-b8bf-46b5-ba61-18ce26933166?utm_source=github&utm_medium=referral&page=upgrade-pr
2023-04-21 06:57:42 +00:00
Marcus Moore
2aba8252f3 Ensure users editing themselves do not deactivate their account 2023-04-20 21:59:55 -07:00
akemidx
16a5a883e5 new request, preparing support_url for validation 2023-04-20 16:34:25 -04:00
snipe
c3c22fae3c Merge pull request #12885 from inietov/fixes/error_call_member_function_totalSeatsByLicenseID
Fixed Call to a member function totalSeatsByLicenseID() on null
2023-04-20 10:43:28 -07:00
Ivan Nieto Vivanco
747d6cfdb4 Change the flow of the condition using an early return 2023-04-20 10:37:26 -06:00
Ivan Nieto Vivanco
ae53609b1b Declare variables only if license is found 2023-04-20 10:16:11 -06:00
Marcus Moore
c357d9f01e Update data provider name 2023-04-19 18:10:23 -07:00
Marcus Moore
645f6ed692 Remove unneeded doc block 2023-04-19 17:52:44 -07:00
Godfrey M
97df39001d adds optional breakdowns for total cost 2023-04-19 17:51:37 -07:00
Marcus Moore
dd40798c43 Remove unneeded comments 2023-04-19 17:49:31 -07:00
Godfrey M
6872f8da7b adding total cost to user view 2023-04-19 17:31:09 -07:00
Marcus Moore
e92c1e7bea Minor docblock update 2023-04-19 17:22:56 -07:00
Godfrey M
bd212b3108 adds component costs to asset view 2023-04-19 16:35:06 -07:00
Joel Pittet
608c5d037f Use environment variable and default to PHP's sendmail_path
Use sendmail_path in PHP instead of hardcoded path and options
2023-04-19 15:25:48 -07:00
Joel Pittet
351928adff Allow an environment variable to set the session cookie path 2023-04-19 15:18:50 -07:00
Marcus Moore
144382e57a Update docblock types 2023-04-19 12:31:12 -07:00
Marcus Moore
835f8876c4 Move notification sending into try catch block 2023-04-19 12:26:48 -07:00
snipe
4a5426f959 Merge pull request #12875 from Godmartinz/sidebar_undeployable_runaway_parenthesis
Fixed space from un deployable total in sidebar
2023-04-19 11:49:42 -07:00
Marcus Moore
15280c435e Merge branch 'develop' into bug/sc-15034 2023-04-19 11:45:16 -07:00
Godfrey M
0e1f50c226 adds checkout-range to jquery 2023-04-19 10:11:26 -07:00
Godfrey M
d2118ba230 removed space from un deployable total in sidebar 2023-04-19 09:46:15 -07:00
Godfrey M
8a5612d1c9 fixes comment 2023-04-19 09:13:43 -07:00
Godfrey M
bdd1045272 adds a checkout range for custom asset reports 2023-04-19 09:11:44 -07:00
snipe
fd5cb32dd9 Honor the “update” flag
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 16:34:47 -07:00
snipe
345662c5c2 Rearrange some of the user creation logic
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 16:34:10 -07:00
snipe
003cd372dd New location same CSV
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 16:23:07 -07:00
Godfrey M
0ab400f5bc removed deadspace and pull 2023-04-18 15:23:11 -07:00
Godfrey M
f15b0d8591 fix for footer 2023-04-18 15:20:38 -07:00
snipe
aedfef78d3 Update app/Importer/LocationImporter.php
Co-authored-by: Marcus Moore <contact@marcusmoore.io>
2023-04-18 13:26:23 -07:00
Marcus Moore
bad2eead4c Remove test method 2023-04-18 13:13:57 -07:00
Marcus Moore
508660b1df Skip notifications for component checkouts and checkins 2023-04-18 13:07:55 -07:00
snipe
c68563ae08 Merge remote-tracking branch 'origin/develop' 2023-04-18 13:01:37 -07:00
snipe
a84a9a8dec Merge pull request #12867 from snipe/fixes/clearer_tooltip_text_for_non_assets_undeployable
Small tooltip improvements for undeployable items in table view
2023-04-18 13:00:11 -07:00
snipe
d3bdaf7cd3 Fixed destination name
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 12:59:46 -07:00
snipe
92f516484e Small tooltip improvements for undeployable items
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 12:54:06 -07:00
snipe
b626e5a3bf Merge remote-tracking branch 'origin/develop' 2023-04-18 12:33:32 -07:00
snipe
bfda46276a Merge pull request #12849 from snipe/features/adds_license_checkin_checkout_to_all_in_gui
Added license checkin/checkout to all in license GUI
2023-04-18 12:32:30 -07:00
snipe
031586495a Small cosmetic tweaks to 2FA reset class, fixed weird layout on 2FA reset button
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 12:09:41 -07:00
snipe
d871a14687 Added fa-fw for nicer display
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 11:49:40 -07:00
snipe
00a9591c4c Added autoassign_licenses in view, added fa-fw
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 11:49:29 -07:00
snipe
4d9d75379f Improved translation string
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 11:39:16 -07:00
snipe
41358eba85 Updated label
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 11:29:28 -07:00
snipe
59f4fe67d6 Removed duplicate tooltip
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 11:28:35 -07:00
snipe
2c5c4ab974 Nicer layout
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 04:40:06 -07:00
snipe
95767c46ac Fixed delete modal
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 04:37:13 -07:00
snipe
0eadc00f4d Removed unneeded css class
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 04:37:04 -07:00
snipe
df7b19bc1e Removed unused validations
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 04:35:06 -07:00
snipe
7aab4290c7 Updated tooltips with data-tooltip=true from old method
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:44:50 -07:00
snipe
3a808aa806 Updated method for available seat count
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:44:33 -07:00
snipe
4d09021e9c Compact tooltip for un-deletable
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:44:19 -07:00
snipe
beba31afbf Added tooltip for disabled delete buttons
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:44:09 -07:00
snipe
41490f1e3a Use “name” instead of “license” for consistency
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:43:59 -07:00
snipe
9da36833be Removed unused method
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:43:44 -07:00
snipe
dc6eb6f104 Throw a warning if there were no users affected
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:07:17 -07:00
snipe
a8a3ca3624 Use count on availSeats
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:06:42 -07:00
snipe
e84ba0c7a0 Revert back to old method name
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:06:32 -07:00
snipe
3e53870b37 Updated language
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:00:13 -07:00
snipe
8a41f37054 Persists buttons through tabs
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:00:06 -07:00
snipe
9f7058a128 Revert "Renamed/refactorered licenses method"
This reverts commit de78f8d41f.

Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:36:34 -07:00
snipe
ec0413254e Removed action menu
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:09:40 -07:00
snipe
f21d9c27e6 Use new translations for logs
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:07:26 -07:00
snipe
725adebffe Translate log message
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:07:12 -07:00
snipe
bfcbd9628a Refactored license controller with new counts
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:02:58 -07:00
snipe
220e20d208 Changed tooltip invocation
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:02:36 -07:00
snipe
d3b087b5da Clearer padding between buttons, added tooltips
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:02:19 -07:00
snipe
25a83c2915 Removed moved translations
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:02:01 -07:00
snipe
3f4159f058 Added translations
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:01:52 -07:00
snipe
de78f8d41f Renamed/refactorered licenses method
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:01:44 -07:00
snipe
6ab4314221 Removed unused method
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:01:13 -07:00
snipe
087f0e596a Fixed has to where
Signed-off-by: snipe <snipe@snipe.net>
2023-04-17 22:44:05 -07:00
snipe
0dd967cf2b Merge remote-tracking branch 'origin/develop' 2023-04-17 21:05:09 -07:00
snipe
912f6c45ee Reverted #12832
Signed-off-by: snipe <snipe@snipe.net>
2023-04-17 21:04:47 -07:00
snipe
9a73f5eca3 Updated production assets
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/css/dist/skins/skin-black-dark.css
#	public/css/dist/skins/skin-black-dark.min.css
#	public/css/dist/skins/skin-blue-dark.css
#	public/css/dist/skins/skin-blue-dark.min.css
#	public/css/dist/skins/skin-green-dark.css
#	public/css/dist/skins/skin-green-dark.min.css
#	public/css/dist/skins/skin-orange-dark.css
#	public/css/dist/skins/skin-orange-dark.min.css
#	public/css/dist/skins/skin-purple-dark.css
#	public/css/dist/skins/skin-purple-dark.min.css
#	public/css/dist/skins/skin-red-dark.css
#	public/css/dist/skins/skin-red-dark.min.css
#	public/css/dist/skins/skin-yellow-dark.css
#	public/css/dist/skins/skin-yellow-dark.min.css
#	public/mix-manifest.json
2023-04-17 20:27:49 -07:00
snipe
9698c3b07b Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-17 20:14:50 -07:00
snipe
3153013715 Fixed semicolon parse error from #12832
Signed-off-by: snipe <snipe@snipe.net>
2023-04-17 20:14:45 -07:00
snipe
c12ac9912c Merge pull request #12832 from Godmartinz/fix_footer_space
Fixed footer space when customized
2023-04-17 20:11:15 -07:00
snipe
2b10357c4e Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-17 19:06:27 -07:00
Marcus Moore
f6cff90829 Migrate to new test settings interface 2023-04-17 17:31:12 -07:00
Marcus Moore
2d56675ade Merge branch 'develop' into bug/sc-15034
# Conflicts:
#	database/factories/SettingFactory.php
2023-04-17 17:22:55 -07:00
snipe
c70cb36c80 Merge pull request #12828 from Godmartinz/bug/sc-20783
Fixed dark themes pagination and notification drop menu
2023-04-17 16:26:36 -07:00
Godfrey M
247f47ce69 adjusts button color 2023-04-17 15:29:53 -07:00
snipe
99cecee4b5 Merge branch 'develop' into features/adds_license_checkin_checkout_to_all_in_gui 2023-04-17 14:54:30 -07:00
Godfrey M
aabd5e92a8 surrounding text aligns correctly 2023-04-17 12:44:06 -07:00
Godfrey M
247c881d87 add back casts 2023-04-17 12:10:54 -07:00
Godfrey M
1001b52c4f removes unncessary files 2023-04-17 12:01:09 -07:00
slong753
52dc99588e pushing for now, needs validation work 2023-04-17 13:57:48 -05:00
Godfrey M
0cca45d858 footer now uses flex 2023-04-17 11:57:35 -07:00
snipe
b22cad9ced Merge pull request #12855 from koelle25/fixes/last_component_checkout
Allow checkout of available components down to zero stock (fixes #12854)
2023-04-17 09:49:14 -07:00
snipe
071a620144 Merge remote-tracking branch 'origin/develop' 2023-04-17 09:36:07 -07:00
snipe
920711dd16 Merge pull request #12857 from snipe/fixes/wtf_datetime_stuff
Remove start/end dates form casts array
2023-04-17 09:35:03 -07:00
snipe
e0c53d8d09 Remove start/end dates form casts array
Signed-off-by: snipe <snipe@snipe.net>
2023-04-17 09:33:31 -07:00
Kevin Köllmann
04f3c4bf69 Fixed #12854: Allow checkout of available components down to zero stock 2023-04-17 11:45:11 +02:00
snipe
a83991041a Better placement for errors
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 16:08:06 -07:00
snipe
0afaaa4a6b Added autoassign_licenses option to create admin
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:28:08 -07:00
snipe
16ab2bec06 Added sorting and searching on autoassign_licenses via user API
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:27:39 -07:00
snipe
4b66ca6ac5 Added method to bulk checkin (much simpler than checking out)
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:27:15 -07:00
snipe
844ad83431 Added method to bulk checkout license seats
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:26:59 -07:00
snipe
9833d861d4 Added autoassign_licenses tp bulk users conditional
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:26:33 -07:00
snipe
03cc55cb6a Set autoassign_licenses to false if unchecked
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:25:52 -07:00
snipe
6a94a2f515 Return true/false for autoassign_licenses in the API
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:25:26 -07:00
snipe
f40bef8f9b Added autoassign_licenses to user importer
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:25:08 -07:00
snipe
6acce098c9 Added autoassign_licenses on user model
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:24:56 -07:00
snipe
73cf62e060 Added autoassign_licenses to presenter
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:24:00 -07:00
snipe
dd78d2fc66 Added language strings
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:23:51 -07:00
snipe
add9e561f9 Added buttons on license page, greyed out where appriate
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:23:42 -07:00
snipe
ff9af7ea74 Added genetic modal partial
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:23:15 -07:00
snipe
bc7c0aa80d Fixed clone tooltip
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:23:00 -07:00
snipe
73188df090 Added autoassign_licenses to bulk user edit
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:22:37 -07:00
snipe
cf7f244942 Added (clarified?) edit autoassign_licenses in user edit
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:19:37 -07:00
snipe
06d46a4523 Indenting change for clarity
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:17:55 -07:00
snipe
8e5042418a Added buttons
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 12:30:32 -07:00
snipe
79ff6a8fc2 Disallow deleting in the API view if there are things checked out
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 12:30:23 -07:00
snipe
8183b8deba Added stub method
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 12:30:02 -07:00
snipe
0210ecde88 Include confirm modal
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 12:29:55 -07:00
snipe
b2940f9915 Added confirm modal
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 12:29:48 -07:00
snipe
b093e428b3 Merge remote-tracking branch 'origin/develop' 2023-04-16 08:54:38 -07:00
snipe
144a6f28ec Added intval
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 08:54:23 -07:00
snipe
65ac877918 Merge remote-tracking branch 'origin/develop' 2023-04-16 08:50:20 -07:00
snipe
f50b958b63 Merge pull request #12848 from snipe/fixes/make_limit_into_singletons
Used a singleton to filter API limit value
2023-04-16 08:48:28 -07:00
snipe
64256351d8 Used a singleton to filter API limit value
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 08:46:39 -07:00
snipe
62edc0ab7d Merge remote-tracking branch 'origin/develop' 2023-04-16 08:02:44 -07:00
snipe
2c6d4d6b7f Merge pull request #12847 from snipe/features/moar_labels
Adds a few more auto-labels
2023-04-16 08:01:06 -07:00
snipe
2b11c96ce0 Adds a few more auto-labels
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 08:00:25 -07:00
snipe
78ec21acc4 Added location case
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:47:49 -07:00
snipe
5a1d03c1dc Added alias maps
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:47:42 -07:00
snipe
a831a34594 New field mapping
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:47:26 -07:00
snipe
bcf9188dcd Made default password longer
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:47:19 -07:00
snipe
c149885ceb Skip the magical user creation if it’s a location
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:47:04 -07:00
snipe
1509672463 Added location importer
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:46:36 -07:00
snipe
bceb0b8a47 Allowed slightly longer zip codes
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:46:29 -07:00
snipe
7534d27a03 Added CSV sample
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:46:18 -07:00
snipe
46cce0115e Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/all.css
#	public/css/dist/bootstrap-table.css
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
2023-04-16 05:46:26 -07:00
snipe
485f5f3a45 Merge pull request #12845 from snipe/security/update_bs_tables
Upgrade bootstrap-table from 1.20.2 to 1.21.3 (Formerly #12733)
2023-04-16 05:44:52 -07:00
snipe
21f5d39fa1 Upgrade bootstrap-table from 1.20.2 to 1.21.3 (Formerly #12733)
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 05:43:42 -07:00
snipe
21e78bee71 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	package-lock.json
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
2023-04-15 21:05:18 -07:00
snipe
2eeb7ddf58 Merge pull request #12844 from snipe/fixes/small_blade_parial_fixes
Small blade parial fixes
2023-04-15 21:04:35 -07:00
snipe
589f7fa183 Larger qty box
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 21:03:09 -07:00
snipe
9ff62c966e Check for $item (matters mostly in custom report blade)
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 21:03:00 -07:00
snipe
86b04c7294 Updated prod assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 20:50:36 -07:00
snipe
2d03ea943b Applied webpack change from master to develop
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 20:49:34 -07:00
snipe
20ab412e1e Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 20:45:35 -07:00
snipe
513b95e8d7 Merge pull request #12768 from snipe/snyk-upgrade-291b556667d6ffe966495405775b3255
[Snyk] Upgrade tableexport.jquery.plugin from 1.26.0 to 1.27.0
2023-04-15 20:44:57 -07:00
snipe
50153717f6 Merge pull request #12798 from snipe/snyk-upgrade-cec198178187b64d2348f74ddc10c797
[Snyk] Upgrade webpack from 5.76.1 to 5.76.2
2023-04-15 20:36:48 -07:00
snipe
32030c4f71 Merge remote-tracking branch 'origin/develop' 2023-04-15 18:44:25 -07:00
snipe
955539807c Merge pull request #12830 from snipe/features/adds_supplier_id_to_components
Added supplier to components and consumables
2023-04-15 18:42:23 -07:00
snipe
8c09226b76 Merge pull request #12834 from marcusmoore/mxm/improve-test-setup
Introduced improved way to interact with settings in tests
2023-04-15 18:37:34 -07:00
snipe
b73aed2b69 Merge remote-tracking branch 'origin/develop' 2023-04-15 18:30:21 -07:00
snipe
b9a5a8a500 Merge pull request #12843 from snipe/fixes/temp_fix_seeder
Temp fix for the seeders
2023-04-15 18:30:00 -07:00
snipe
8ae14c43f3 This is a temp fix for the seeders
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 18:27:53 -07:00
snipe
fc7f1f907d Fixed variable name
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 17:37:25 -07:00
snipe
f6cfec1e49 Merge pull request #12842 from snipe/fixes/take_two_better_handling_limits
Use abs() instead of max
2023-04-15 17:33:12 -07:00
snipe
4cbb9c2409 Use abs() instead of max
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 17:28:25 -07:00
snipe
a97b2d141d Merge pull request #12827 from snipe/fixes/tighter_handling_of_offset_and_limit
Better handling for weird data passed to the API via limit and offset
2023-04-15 16:52:33 -07:00
snipe
f407a551da Merge branch 'develop' of https://github.com/snipe/snipe-it into develop 2023-04-15 16:48:07 -07:00
snipe
36665fde31 Merge pull request #12833 from svpernova09/bump-dockerfile-22-04-php81
Update Dockerfile to Ubuntu 22.04 and PHP 8.1
2023-04-14 17:16:42 -07:00
Joe Ferguson
785d2f3558 Update alpine Dockerfiles to PHP 8.1 and Snipe-IT v6.1.0 2023-04-14 13:35:36 -05:00
Joe Ferguson
1d8a4ca090 Update Dockerfile to Ubuntu 22.04 and PHP 8.1 2023-04-14 07:59:16 -05:00
Marcus Moore
473241edca Move initialization of settings to trait 2023-04-13 16:52:20 -07:00
Godfrey M
42f198ffed fixes footer space when customized 2023-04-13 12:24:59 -07:00
Godfrey M
b16c062485 fixes partial 2023-04-13 12:05:59 -07:00
snipe
b690ed97d5 Fixed unclosed parens in translation file
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 12:05:06 -07:00
Godfrey M
ab67d903b5 adds multi select to custom report for companies 2023-04-13 12:02:11 -07:00
snipe
2fe7fcecdb Added case switch for sorting on suppliers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:13:45 -07:00
snipe
d2b3e251ad Added counters to API controllers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:12:16 -07:00
snipe
07c0a1927b Added supplier id to controllers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:12:01 -07:00
snipe
ab7c75232b Added supplier to transformers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:10:51 -07:00
snipe
6e183f2ced Added counters for consumables and components
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:10:32 -07:00
snipe
6097d534e9 Added eloquent model relationships
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:10:16 -07:00
snipe
3aac8bccd2 Added presenters for suppliers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:09:59 -07:00
snipe
e7c6771e73 Added supplier to components and consumables factories for seeding
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:07:22 -07:00
snipe
45142c6888 Migration to add supplier ID to components and consumables
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:06:49 -07:00
snipe
607ab3988a Added supplier to edit/creatre blade
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:06:07 -07:00
snipe
b6d3f2827b Switched to standardized require check
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:05:52 -07:00
snipe
65bb0486d4 Changed blade to use standard required check
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:04:29 -07:00
snipe
a40bad0972 Added consumables and components columns to supplier list
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:04:13 -07:00
snipe
6eed89df91 Added components and consumables tab to suppliers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:03:26 -07:00
Godfrey M
d476f0de3a forgot dark blue 2023-04-13 10:34:17 -07:00
Godfrey M
bbb4032050 fixes rest of dark mode themes 2023-04-13 10:32:42 -07:00
Godfrey M
b83daea265 fixes dark orange 2023-04-13 10:27:38 -07:00
Marcus Moore
7c95e45178 Introduce trait to conditionally interact with settings 2023-04-12 17:28:47 -07:00
Godfrey M
46ff738494 fixes the notification dropdown menu 2023-04-12 16:12:48 -07:00
akemidx
0a993b2aa1 added external link icon to warranty link 2023-04-12 18:52:21 -04:00
Godfrey M
cbb25025d5 fixes pagination for rest of skins 2023-04-12 15:41:04 -07:00
Godfrey M
f3d12351a6 fixes paginiation for black-dark 2023-04-12 15:23:56 -07:00
Godfrey M
2d27f0155a targeting paginiation 2023-04-12 15:06:06 -07:00
slong753
8b9aea8874 very much WIP, but dupe queries reduced
but i think this can be cleaned up a bit more
2023-04-12 14:46:48 -05:00
snipe
112a04b108 Better handle weird data passed to the API via limit and offset
Signed-off-by: snipe <snipe@snipe.net>
2023-04-12 11:28:46 -07:00
snipe
9a37273750 Merge remote-tracking branch 'origin/develop' 2023-04-12 08:28:50 -07:00
snipe
1a7201d3d9 Merge pull request #12826 from snipe/fixes/added_invalid_parse_to_dont_report
Added invalid parse to dontReport
2023-04-12 08:28:26 -07:00
snipe
74babfa081 Added maxlength="10"
Signed-off-by: snipe <snipe@snipe.net>
2023-04-12 08:26:36 -07:00
snipe
04f83d34ff Added withInput to carry over older fields
Signed-off-by: snipe <snipe@snipe.net>
2023-04-12 08:25:03 -07:00
snipe
aac76d40fe Merge remote-tracking branch 'origin/develop' 2023-04-12 06:37:01 -07:00
snipe
14ec96cf45 Merge pull request #12825 from snipe/fixes/wrong_button_string_on_bulk_user_edit
Fixed #12822 - Missing translation on bulk edit user submit button
2023-04-12 06:36:39 -07:00
snipe
0f3702b0fc Fixed incorrect translation string for bulk user edit
Signed-off-by: snipe <snipe@snipe.net>
2023-04-12 06:35:28 -07:00
snipe
0e93a9229d Merge remote-tracking branch 'origin/develop' 2023-04-12 06:32:06 -07:00
snipe
a119484277 Merge pull request #12824 from snipe/fixes/radio_button_submit_on_merge_users
Removed iCheck code from merge users script
2023-04-12 06:31:43 -07:00
snipe
89b031d64d Removed iCheck code from merge users script
Signed-off-by: snipe <snipe@snipe.net>
2023-04-12 06:30:52 -07:00
snipe
9ae9ea7f68 Merge remote-tracking branch 'origin/develop' 2023-04-12 04:36:30 -07:00
snipe
d3d464e179 Improved commenting
Signed-off-by: snipe <snipe@snipe.net>
2023-04-12 04:36:05 -07:00
snipe
28e0891645 Merge remote-tracking branch 'origin/develop' 2023-04-11 23:36:59 -07:00
snipe
c02bd54826 Merge pull request #12818 from snipe/fixes/better_error_handling_on_dates
Check for Carbon exception
2023-04-11 23:36:42 -07:00
snipe
afd01869a5 Check for Carbon exception
Signed-off-by: snipe <snipe@snipe.net>
2023-04-11 23:35:41 -07:00
akemidx
2453913080 dynamic link w/ dynamic image 2023-04-11 14:53:44 -04:00
akemidx
71ff987e3c dynamic link w/ dynamic image 2023-04-11 14:32:11 -04:00
akemidx
a65b8025b6 push for testing 2023-04-11 13:53:56 -04:00
akemidx
968701b971 starting to implant the str lower solution 2023-04-10 17:28:19 -04:00
snipe
22336da362 Merge remote-tracking branch 'origin/develop' 2023-04-09 14:08:03 -07:00
snipe
79a8effa25 Merge pull request #12810 from snipe/fixes/maintain_checkbox_state_on_user
Maintain activated state on editing a user
2023-04-09 14:07:41 -07:00
snipe
70ce0d9ee6 Maintain activated state on editing a user
Signed-off-by: snipe <snipe@snipe.net>
2023-04-09 14:06:29 -07:00
snipe
b3fab6d47d Merge remote-tracking branch 'origin/develop' 2023-04-07 10:47:48 -07:00
snipe
b886f57d92 Merge pull request #12807 from snipe/fixes/handle_arrays_on_validation_failure
Echo out the array values in withInput()
2023-04-07 10:47:15 -07:00
snipe
19d5d34ffb Echo out the array values in withInput()
Signed-off-by: snipe <snipe@snipe.net>
2023-04-07 10:16:35 -07:00
snipe
b09b562f3a Merge remote-tracking branch 'origin/develop' 2023-04-07 09:46:02 -07:00
snipe
42eef7eb3f Merge pull request #12803 from snipe/fixes/small_component_fixes
Small component UI/validation/API fixes
2023-04-07 09:45:36 -07:00
snipe
baf267e2e9 Small cleanups
Signed-off-by: snipe <snipe@snipe.net>
2023-04-07 09:45:16 -07:00
snipe
cb76815e8b Removed if check on assets, since that’s already handled via validation
Signed-off-by: snipe <snipe@snipe.net>
2023-04-07 09:42:31 -07:00
snipe
42a60a9ccb Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-04-07 08:22:24 -07:00
snipe
734b888de4 Merge pull request #12804 from insert-waffle/remove-unnecessary-vulgar-text
Remove "FARTS" from bpay.blade.php
2023-04-07 08:19:40 -07:00
Jens Maes
c42078ea4a Update bpay.blade.php
Removed FARTS from the file. This was shown in production on the master branch.
2023-04-07 10:15:34 +02:00
snipe
4c88c751ef Code cleanup, better validation
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 22:03:40 -07:00
snipe
358b0548fa Added string for translations
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 22:03:26 -07:00
snipe
43ad0f58b5 SLightly cleaner layout - still needs work
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 22:03:15 -07:00
snipe
0abb993600 General cleanup and standardization for component API
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 22:02:57 -07:00
snipe
87c7d1aaca Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 20:43:42 -07:00
snipe
1ee1cf1d78 Merge pull request #12802 from snipe/fixes/consumables_checkout_when_0_qty
Check for available quantity on consumables before checkout
2023-04-06 20:39:57 -07:00
snipe
4840046f44 Check for available quantity on consumables before checkout
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 20:38:02 -07:00
snipe
0414954d3e Merge pull request #12801 from snipe/translations/updated_for_v6.1.0
Translations/updated for v6.1.0
2023-04-06 19:58:41 -07:00
snipe
574b0184fc Updated Zulu
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:57:35 -07:00
snipe
9db5e328c9 Updated Chinese Traditional
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:57:28 -07:00
snipe
0a77216b6f Updated Chinese Traditional, Hong Kong
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:57:03 -07:00
snipe
44b4274a49 Updated Chinese Simplified
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:56:43 -07:00
snipe
7711540514 Updated Vietnamese
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:55:47 -07:00
snipe
4d7b2b5747 Updated Urdu (Pakistan)
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:55:06 -07:00
snipe
6f92144b96 Updated Ukrainian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:54:41 -07:00
snipe
8446f456ab Updated Turkish
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:54:06 -07:00
snipe
d5b4971371 Updated Tagalog
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:53:35 -07:00
snipe
0686e1e7c4 Updated Thai
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:52:36 -07:00
snipe
6143f28bb9 Updated Tamil
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:52:03 -07:00
snipe
0e2dd5d76c Updated Swedish
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:51:37 -07:00
snipe
eae5e7b35d Updated Serbian (Latin)
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:51:15 -07:00
snipe
4f8dc54872 Updated Slovenian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:50:34 -07:00
snipe
81129ed91f Updated Slovak
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:49:54 -07:00
snipe
48dff4681b Updated Sinhala
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:48:25 -07:00
snipe
40bb5bb4f0 Updated Russian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:47:56 -07:00
snipe
51f1ad6693 Updated Romanian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:46:22 -07:00
snipe
ca49923371 Updated Portuguese, European
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:45:54 -07:00
snipe
d9d3d11cc6 Updated Portuguese, Brazilan
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:45:42 -07:00
snipe
b7537a73b2 Updated Polish
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:45:10 -07:00
snipe
98aa8623d3 Updated Norwegian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:44:48 -07:00
snipe
aa9420cbad Updated Dutch
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:44:15 -07:00
snipe
9b7ab63277 Updated Malay
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:43:38 -07:00
snipe
d588b2905d Updated Mongolian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:43:12 -07:00
snipe
c176f3d030 Updated Malayalam
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:42:40 -07:00
snipe
173e2add88 Updated Macedonian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:42:14 -07:00
snipe
359d8d0e08 Updated Maori
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:41:36 -07:00
snipe
2ea03f66a2 Updated Latvian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:40:55 -07:00
snipe
d2301dae63 Updated Lithuanian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:40:21 -07:00
snipe
e24a9ccf1c Updated Korean
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:39:35 -07:00
snipe
227d7e75a3 Updated Japanese
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:38:59 -07:00
snipe
8befc23178 Updated Inuktitut
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:38:17 -07:00
snipe
9eac3c2e64 Updated Italian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:37:42 -07:00
snipe
4c220df181 Updated Icelandic
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:36:58 -07:00
snipe
0703d037d6 Updated Indonesian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:35:48 -07:00
snipe
28498857c2 Updated Hungarian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:35:12 -07:00
snipe
7c4e73d660 Updated Croatian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:34:31 -07:00
snipe
c42c9cc832 Updated Hebrew
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:33:41 -07:00
snipe
7cebbf48ee Updated Irish
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:32:55 -07:00
snipe
70745952b9 Updated French
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:32:12 -07:00
snipe
807509030c Updated Filipino
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:27:32 -07:00
snipe
0a673f4ffe Updated Finnish
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:27:01 -07:00
snipe
f1caf69f05 Updated Persian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:26:15 -07:00
snipe
86532746b1 Updated Estonian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:25:35 -07:00
snipe
94035e5e4b Updated Spanish, Venezuela
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:24:19 -07:00
snipe
5a84a1d15c Updated Spanish, Mexico
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:23:41 -07:00
snipe
48c924e0b2 Updated Spanish, Spain
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:23:16 -07:00
snipe
54deaf18d1 Updated Spanish, Colombia
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:22:57 -07:00
snipe
4f3617d271 Updated Indonesian English
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:21:43 -07:00
snipe
096be6e095 Updated British English
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:21:33 -07:00
snipe
02601a95e0 Updated Greek
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:20:09 -07:00
snipe
70653419cd Updated German Informal
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:19:24 -07:00
snipe
8f258d8454 Updated German
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:18:50 -07:00
snipe
9f26a30256 Updated Danish
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:18:16 -07:00
snipe
0b392286ce Updated Welsh
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:17:33 -07:00
snipe
5f56b30d19 Updated Czech
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:16:42 -07:00
snipe
ba7d8f1c07 Updated Catalan
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:15:38 -07:00
snipe
e391c1322c Updated Bulgarian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:14:50 -07:00
snipe
f634640425 Updated Arabic
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:13:56 -07:00
snipe
4bcc1c6aa9 Updated Amharic
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:12:55 -07:00
snipe
88b98e6cf7 Updated Afrikaans
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:11:43 -07:00
snipe
a9bb2f78cc Fixed borked English string
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:11:35 -07:00
snipe
a8ca3ad2a9 Merge remote-tracking branch 'origin/develop' 2023-04-06 18:49:51 -07:00
Marcus Moore
cd0796ddda Allow Settings to be chainable 2023-04-06 18:46:29 -07:00
snipe
38a2f535ad Merge pull request #12799 from snipe/features/bm_script
Added BM JS
2023-04-06 18:46:16 -07:00
snipe
d120fd2a16 Merge remote-tracking branch 'origin/develop' 2023-04-06 18:42:22 -07:00
snipe
6b319bffff Merge pull request #12800 from snipe/fixes/accessories_checkout
Fixed accessories verifying that enough remain to be checked out
2023-04-06 18:42:01 -07:00
snipe
ffdc0d76f7 Fixed accessories verifying that enough remain to be checked out
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 18:40:29 -07:00
Marcus Moore
9561b66613 Add return types and docblock 2023-04-06 17:58:53 -07:00
Marcus Moore
95f195046d Move cache flush to testing helper 2023-04-06 17:50:24 -07:00
Marcus Moore
52c733b31d Add ability to set provided settings 2023-04-06 17:48:23 -07:00
Marcus Moore
8ac4d3aeea Move to a static constructor 2023-04-06 17:42:15 -07:00
Marcus Moore
bbfb6c338a Remove unused method 2023-04-06 17:28:16 -07:00
Marcus Moore
f767cc082f Introduce improved way to interact with settings in tests 2023-04-06 17:27:18 -07:00
snipe
74b471bbad Check for more specifics in env vars
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 16:24:46 -07:00
snipe
6ff3745adf Added BM JS
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 16:19:33 -07:00
snipe
3d26fbd82f Merge remote-tracking branch 'origin/develop' 2023-04-06 15:13:13 -07:00
snipe
383d48fd9c Merge pull request #12787 from Godmartinz/accessory_unavailable_message
Added unavailable message to prevent over-checkout of Accessories
2023-04-06 15:05:18 -07:00
snipe
c683233aa3 Updated production assets
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/js/build/app.js
#	public/js/build/vendor.js
#	public/js/dist/all.js
#	public/mix-manifest.json
2023-04-06 15:00:38 -07:00
snipe
bd4757ad7a Merge pull request #12779 from snipe/features/replace_icheck_with_only_css
Move from iCheck to pure CSS for radio and checkboxes
2023-04-06 14:58:33 -07:00
snipe
3d29748f7d Merge remote-tracking branch 'origin/develop' 2023-04-06 13:11:45 -07:00
Godfrey M
3d7c55deb3 removed an unncessary query 2023-04-06 13:06:05 -07:00
akemidx
cc88a361ca commiting 2023-04-06 15:01:01 -04:00
Godfrey M
55943d8897 uses numRemaining now 2023-04-06 10:05:17 -07:00
snipe
c1daac153b Updated string
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 09:17:47 -07:00
snipe
2a9f816bfe Prevent wrapping on buttons
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 09:04:56 -07:00
snipe
506021dbe3 Remove iCheck calls, fixed some bootstrap HTML
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 09:03:41 -07:00
snipe
f90a6fed91 Downgraded error logging to debug
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 09:02:15 -07:00
snyk-bot
4c05da37c1 fix: upgrade webpack from 5.76.1 to 5.76.2
Snyk has created this PR to upgrade webpack from 5.76.1 to 5.76.2.

See this package in npm:
https://www.npmjs.com/package/webpack

See this project in Snyk:
https://app.snyk.io/org/snipe/project/3d53e1dd-b8bf-46b5-ba61-18ce26933166?utm_source=github&utm_medium=referral&page=upgrade-pr
2023-04-06 14:48:49 +00:00
snipe
39e6ca82bb Merge pull request #12793 from snipe/fixes/use_app_url_more_consistently
Fixed #12772 - use the APP_URL config more consistently
2023-04-05 16:48:45 -07:00
snipe
161999fbca Fixed #12772 - use the APP_URL config more consistently
Signed-off-by: snipe <snipe@snipe.net>
2023-04-05 16:05:40 -07:00
snipe
6aec73c720 Merge pull request #12792 from snipe/fixes/eol_size
Fixed  #12776 - larger EOL field
2023-04-05 16:00:49 -07:00
snipe
5e6a6a81d5 Fixed #12776 - larger EOL text
Signed-off-by: snipe <snipe@snipe.net>
2023-04-05 16:00:02 -07:00
snipe
c24b398b6f Merge pull request #12790 from snipe/fixes/support_url
Updated support URL
2023-04-05 14:55:41 -07:00
snipe
752365aa85 Updated support URL
Signed-off-by: snipe <snipe@snipe.net>
2023-04-05 14:54:40 -07:00
snipe
4b4d4e98b6 Use enclosing span for HTML text in grid
Signed-off-by: snipe <snipe@snipe.net>
2023-04-05 14:10:57 -07:00
slong753
830e3e5594 cleanup 2023-04-05 15:27:28 -05:00
slong753
d56a4e7173 cleanup+formatting 2023-04-05 15:16:46 -05:00
snipe
9af2d0a6de Merge branch 'develop' into features/replace_icheck_with_only_css 2023-04-05 13:04:12 -07:00
snipe
2e45c4370c Merge pull request #12782 from marcusmoore/chore/update-crowdin-config
Update CrowdIn configuration to allow nested translations
2023-04-05 12:59:20 -07:00
Marcus Moore
5b4d5cadf4 Add tests for sending webhooks on asset and license seat checkin 2023-04-05 12:57:53 -07:00
Marcus Moore
3054d633b0 Improve comments and remove unused imports 2023-04-05 12:39:41 -07:00
Marcus Moore
3cc3662992 Send webhook notifications for accessory checkins when enabled 2023-04-05 12:36:24 -07:00
Marcus Moore
2187310abb Simplify test case names 2023-04-05 12:27:18 -07:00
Marcus Moore
b41902976b Improve test class names 2023-04-05 12:23:11 -07:00
Marcus Moore
6df8f0f35c Merge branch 'develop' into bug/sc-15034 2023-04-05 11:49:53 -07:00
Godfrey M
b038fe8f2e adds unavailable message to overcheckout 2023-04-05 10:00:39 -07:00
slong753
3929526a57 ok, this works but needs to be tested more 2023-04-04 18:57:51 -05:00
Marcus Moore
32351d0e48 Allow downloading nested CrowdIn translations 2023-04-04 15:35:31 -07:00
akemidx
f5122b01b1 Mock Up of the Buttons 2023-04-04 15:51:04 -04:00
snipe
ead5293ee0 Merge pull request #12765 from spencerrlongg/chore/sc-20230
Change protected $dates to casts
2023-04-04 01:29:24 -07:00
snipe
b376181cef Merge pull request #12769 from marcusmoore/chore/publish-test-stubs
Publishes test stubs
2023-04-04 01:28:47 -07:00
snipe
723ef36608 Merge pull request #12781 from snipe/fixes/color-picker-fix
Color picker UI fix
2023-04-04 00:34:07 -07:00
snipe
55857c910a Color picker UI fix
Signed-off-by: snipe <snipe@snipe.net>
2023-04-04 00:33:05 -07:00
snipe
5919f3843d Small fixes to the color picker (sorry)
Signed-off-by: snipe <snipe@snipe.net>
2023-04-04 00:27:05 -07:00
snipe
6164e8b3fa Changed colors for disabled, removed dupe checkmark
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 23:53:57 -07:00
snipe
0e68b8e9f2 Small fixes for profile edits
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 23:06:09 -07:00
snipe
3bd87a2785 Removed iCheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 22:52:54 -07:00
snipe
5df34d0058 Diable SAML submit if in demo mode
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 22:40:25 -07:00
snipe
9a3e727390 Updated other form fields to use new label class, fixed HTML for accessibility
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 22:38:56 -07:00
snipe
aca64dc088 Updated check groups for permissions to skip iCheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 22:38:24 -07:00
snipe
3473e24de5 Updated assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 22:36:23 -07:00
snipe
1af7cdb715 Wrapped the image delete into the existing image upload partial
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 22:35:55 -07:00
snipe
2c47b63e91 Small tweaks to overrides
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 19:37:07 -07:00
snipe
a7787a6cdc Fixed string
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 19:20:58 -07:00
snipe
62c99d4e2e Added check all to user delete
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 19:19:28 -07:00
snipe
858f1c2d12 Updated audit with icheck, removed popover text - need a better solution with layout
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 19:19:12 -07:00
snipe
76b9608de3 Typo fix
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 19:18:40 -07:00
snipe
8b315a6502 Updated contrller to use trans_choice
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 18:55:09 -07:00
snipe
1ea813a1c5 Updated strings to trans_choice
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 18:54:59 -07:00
snipe
a861672146 Standardized model bulk blades a little more
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 18:54:46 -07:00
snipe
146976975c Removed <wire:ignore> in model edit for default custom fields
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:38:34 -07:00
snipe
58b3369234 Requestable partial - removing icheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:38:12 -07:00
snipe
21448f6adf Model edit - removing icheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:38:02 -07:00
snipe
899b936152 Models bulk edit - removing icheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:37:49 -07:00
snipe
866ba36090 Hardware editing un-icheckification
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:37:34 -07:00
snipe
60d60be0ac Small style specification for notes partial field
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:37:16 -07:00
snipe
5ed9385685 Clearer tab name for user info
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:09:25 -07:00
snipe
c05ee5db0e Built assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:08:54 -07:00
snipe
c5d74ac27f Additional form CSS tweaks for disabled and unchecked
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:08:47 -07:00
snipe
9146850ffe Added string for emailing user credentials
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:08:31 -07:00
snipe
2c5ddca695 More jquery and form fixes for users
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:08:21 -07:00
slong753
29e3d202fe checking something, quick push 2023-04-03 17:54:31 -05:00
snipe
790f9c2fc4 Updated 2FA to non-icheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 15:38:52 -07:00
snipe
b4df9eb586 More checkbox tweaks
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 15:33:21 -07:00
snipe
0d050e4016 Updated user edit page with with non-icheck toggles
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 14:55:12 -07:00
snipe
4035cd118e Handle the column selector in bs table styling
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 14:35:47 -07:00
snipe
5c89439ba3 Updated login page to use non-icheck
TODO: override that style for the labels
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 12:18:18 -07:00
snipe
85c0ddf475 Tweaked the col-md to use offset
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 12:17:49 -07:00
snipe
868615d5e7 Removed iCheck from snipeit.js and webpack
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 12:17:31 -07:00
snipe
5078b51d4d Removed temp disabled attributes
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 11:39:02 -07:00
snipe
e066f033c8 First attempt at moving us away from iCheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 10:54:01 -07:00
snipe
2d9ff795e3 Add @mezzle as a contributor 2023-04-02 09:00:03 -07:00
Marcus Moore
524249d4d7 Implement tests for webhook notifications on accessory checkout 2023-03-30 16:58:16 -07:00
Marcus Moore
44e05eecbf Publish test stubs 2023-03-30 16:42:59 -07:00
Marcus Moore
b2292db3c8 Implement tests for webhook notifications on consumable checkout 2023-03-30 16:40:53 -07:00
Marcus Moore
aefc53cfcf Explicitly disable webhook settings in tests 2023-03-30 16:40:21 -07:00
Marcus Moore
621d8500eb Merge branch 'develop' into bug/sc-15034 2023-03-30 16:17:42 -07:00
snyk-bot
91c67c3116 fix: upgrade tableexport.jquery.plugin from 1.26.0 to 1.27.0
Snyk has created this PR to upgrade tableexport.jquery.plugin from 1.26.0 to 1.27.0.

See this package in npm:
https://www.npmjs.com/package/tableexport.jquery.plugin

See this project in Snyk:
https://app.snyk.io/org/snipe/project/3d53e1dd-b8bf-46b5-ba61-18ce26933166?utm_source=github&utm_medium=referral&page=upgrade-pr
2023-03-30 22:55:38 +00:00
Marcus Moore
134ab631d4 Add test to ensure notification is not sent for license checkouts if not enabled 2023-03-30 15:38:22 -07:00
Marcus Moore
158e1544cd Test the event instead of the checkout 2023-03-30 15:38:00 -07:00
snipe
fcda478712 Merge remote-tracking branch 'origin/develop' 2023-03-30 14:51:23 -07:00
snipe
986c73982e Check if status is set
Signed-off-by: snipe <snipe@snipe.net>
2023-03-30 14:50:56 -07:00
snipe
080a4c823b Merge remote-tracking branch 'origin/develop' 2023-03-30 14:49:19 -07:00
snipe
ed8535a197 Merge pull request #12767 from snipe/fixes/bulk_restore
Quick fix for bulk restore menu
2023-03-30 14:48:43 -07:00
snipe
1fc0a0f94d Quick fix for bulk restore menu
Signed-off-by: snipe <snipe@snipe.net>
2023-03-30 14:44:38 -07:00
snipe
048be49c14 Merge remote-tracking branch 'origin/develop' 2023-03-30 14:37:47 -07:00
snipe
cfef9d8cca Merge pull request #12763 from inietov/fixes/call_to_member_function_licenses_on_null
Fixed Call to a Member Function Licenses() on null [sc-20606]
2023-03-30 14:20:13 -07:00
snipe
dfa9c07217 Merge pull request #12760 from akemidx/apple_warranty_link_fix2
Updating Apple warranty link to match current Apple webpage
2023-03-30 12:47:09 -07:00
akemidx
0c38257f80 fixing one liner 2023-03-30 15:40:23 -04:00
snipe
9ca5285781 Merge pull request #12762 from spencerrlongg/feature/sc-20304
Bulk Restore from Deleted
2023-03-30 12:37:50 -07:00
slong753
0f72554a9f translations for messages 2023-03-30 13:57:18 -05:00
slong753
382d849ee1 added catch for no assets selected 2023-03-30 13:52:29 -05:00
slong753
b84eaaf61a translations done 2023-03-30 13:48:05 -05:00
slong753
8c1c0e81b6 rm deplicates 2023-03-30 13:31:58 -05:00
snipe
b7c09042b0 Merge pull request #12758 from inietov/fixes/call_to_member_function_present_null
Fixed Call to a member function present() on null [sc-20594]
2023-03-30 11:01:38 -07:00
snipe
10c1e923dc Merge pull request #12764 from marcusmoore/fixes/importer-fix
Fixes potential unwanted overwrites in asset imports
2023-03-30 09:40:58 -07:00
slong753
e126a75f7a pretty sure this was it 2023-03-29 21:37:26 -05:00
Ivan Nieto Vivanco
d10b7fd6af Use firstorfail on eloquent query to return error if asset is not found 2023-03-29 19:11:28 -06:00
slong753
d5d50264c3 fix permissions stuff + optional parameter 2023-03-29 19:53:04 -05:00
Ivan Nieto Vivanco
d622dbb943 Revert the php codeblock and replace it with a ternary 2023-03-29 18:37:47 -06:00
snipe
da940a6bcc Merge remote-tracking branch 'origin/develop' 2023-03-29 17:19:50 -07:00
Marcus Moore
6beb3b551a Fix typo 2023-03-29 17:01:24 -07:00
Marcus Moore
0998c70a92 Remove unneeded import 2023-03-29 16:59:26 -07:00
Marcus Moore
9f8b8f6cc1 Remove unneeded variable 2023-03-29 16:58:55 -07:00
slong753
d033733fc0 oops, remove a couple things 2023-03-29 18:30:39 -05:00
slong753
e4c76f454c this is good, just needs translations done in view 2023-03-29 18:24:56 -05:00
slong753
162b70d5a9 wireframed, needs a view and should work 2023-03-29 17:34:36 -05:00
Marcus Moore
863a346d6e Translate strings 2023-03-29 13:37:14 -07:00
Marcus Moore
e05546d1fa Display helpful messages when importing assets 2023-03-29 13:23:45 -07:00
slong753
b0fa298d8f delete a couple things 2023-03-29 15:14:48 -05:00
slong753
65bbecd145 this all works - could use some eyes 2023-03-29 14:46:31 -05:00
akemidx
6bee4c1a75 Updating Apple warranty link to match current Apple webpage 2023-03-29 15:09:14 -04:00
Marcus Moore
4cbe683a1a Explicitly cast asset tag to string when querying 2023-03-29 11:28:04 -07:00
Marcus Moore
9cc74caa9e Add wire:model to import form checkboxes 2023-03-29 10:58:25 -07:00
Ivan Nieto Vivanco
d7c531e1c7 Checks if user variable exist before using its properties 2023-03-29 10:33:15 -06:00
Dominik Both
3271c9dc9f Fix #8208, #8896, #8985, #9789 2023-03-29 09:56:34 +02:00
slong753
032ae4348e custom fields display, need to get saving
+some clean up
2023-03-28 21:45:31 -05:00
slong753
804a788a27 initial fetch working 2023-03-28 20:31:24 -05:00
snipe
c9d1274edc Merge pull request #12753 from snipe/fixes/lang_for_group_not_found
Fixes/lang for group not found
2023-03-28 16:45:22 -07:00
snipe
32922e6461 Use corrected language string
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 16:39:52 -07:00
snipe
527c812d04 Use icon for group users header
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 16:39:41 -07:00
snipe
b57b5e23d9 Merge pull request #12752 from inietov/fixes/attempt_to_read_property_on_null
Fixed ErrorException: Attempt to read property "rtd_location_id" on null [sc-20562]
2023-03-28 16:32:34 -07:00
snipe
94de9edce7 Merge pull request #12751 from snipe/features/added_snipeagent_link
Added link to SnipeAgent
2023-03-28 16:27:03 -07:00
snipe
88826c1115 Added link to SnipeAgent
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 16:26:27 -07:00
Ivan Nieto Vivanco
77d513f80b Assign target variable as the other checkout types 2023-03-28 17:25:57 -06:00
Ivan Nieto Vivanco
d70b7dbf41 Checks if exist on API checkout 2023-03-28 16:12:48 -06:00
snipe
70764cc783 Merge remote-tracking branch 'origin/develop' 2023-03-28 14:27:14 -07:00
snipe
2306f30158 Updated author link to @Karpadiem
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 14:26:59 -07:00
snipe
99a05c6401 Merge remote-tracking branch 'origin/develop' 2023-03-28 13:43:24 -07:00
snipe
667a5a9274 Merge pull request #12750 from snipe/features/added_kandji_and_unifi_links
Added links to kandji2snipe and UnifiSnipeSync
2023-03-28 13:42:40 -07:00
snipe
a0eb9dc735 Added links to kandji2snipe and UnifiSnipeSync
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 13:41:58 -07:00
snipe
e03a961bcc Merge pull request #12747 from svpernova09/preflight-strings
Pre-Flight String fixes for step 2
2023-03-28 08:37:43 -07:00
Joe Ferguson
47e18db172 Fix next button string for Step 2 preflight 2023-03-28 10:30:56 -05:00
Joe Ferguson
d667ae53ed Add missing strings to Step 2 preflight 2023-03-28 10:30:35 -05:00
snipe
03aadc4abf Merge remote-tracking branch 'origin/develop' 2023-03-28 07:20:22 -07:00
snipe
099173fb94 Merge pull request #12744 from snipe/fixes/12742_wrong_url_on_requestable_models
Use named route with params
2023-03-28 07:19:49 -07:00
snipe
09674c012c Use named route with params
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 07:18:45 -07:00
snipe
c680274a92 Merge remote-tracking branch 'origin/develop' 2023-03-28 06:56:35 -07:00
snipe
52fd334745 Merge pull request #12743 from snipe/fixes/quieter_logging
Changed log level to debug vs info/error
2023-03-28 06:56:06 -07:00
snipe
feef06e7bf Changed log level to debug vs info/error
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 06:54:41 -07:00
snipe
d2daaf30eb Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-03-28 03:32:04 -07:00
snipe
6800098469 Bumped version for 6.1.0-pre
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 03:31:02 -07:00
Marcus Moore
2cbc6276f7 Implement test for license checkout notification 2023-03-27 14:09:31 -07:00
Marcus Moore
362d5b9fd4 Merge branch 'develop' into bug/sc-15034 2023-03-27 11:46:30 -07:00
snipe
468805bab5 Merge pull request #12732 from svpernova09/preflight-translation-string-fixes
User preflight fix translation strings w/ bad path
2023-03-27 10:43:13 -07:00
Joe Ferguson
cd49f65c0b User preflight fix translation strings w/ bad path 2023-03-24 15:27:08 -05:00
snipe
dcbd216e2c Merge remote-tracking branch 'origin/develop' 2023-03-24 08:29:22 -07:00
snipe
008ba83128 Merge pull request #12729 from snipe/fixes/file_importer_string
Fixed translation string for importer
2023-03-24 08:28:51 -07:00
snipe
697cb4fe6d Fixed translation string for importer
Signed-off-by: snipe <snipe@snipe.net>
2023-03-24 08:27:53 -07:00
snipe
8a395d63a1 Merge remote-tracking branch 'origin/develop' 2023-03-24 07:23:06 -07:00
snipe
4d1e28ad03 Merge pull request #12727 from snipe/fixes/add_json_to_mimes
Fixed #12641 - added JSON to mimes
2023-03-24 07:22:30 -07:00
snipe
47eccb665e Merge pull request #12728 from snipe/fixes/fixes_typo_in_category_list
Use single “accessory” translation
2023-03-24 07:19:59 -07:00
snipe
150a2b572e Use single “accessory” translation
Signed-off-by: snipe <snipe@snipe.net>
2023-03-24 07:14:02 -07:00
snipe
6bc0df73e8 Merge pull request #12661 from Godmartinz/gh12655_missing_translations
Adds translations for category types to index and edit of categories
2023-03-24 07:09:40 -07:00
snipe
16dcc2d3ed Fixed #12641 - add JSON to mimes
Signed-off-by: snipe <snipe@snipe.net>
2023-03-24 06:57:43 -07:00
snipe
43c286c61f Merge remote-tracking branch 'origin/develop' 2023-03-24 06:18:10 -07:00
snipe
aa4bdd4eb3 Merge pull request #12726 from snipe/fixes/12724_custom_fields
Fixed #12724 - fieldset not saving on model
2023-03-24 06:17:42 -07:00
snipe
e869b1fd53 Fixed #12724 - fieldset not saving on model
Signed-off-by: snipe <snipe@snipe.net>
2023-03-24 06:11:24 -07:00
snipe
13ad69ee75 Merge pull request #12713 from inietov/fixes/trying_access_array_offset_null
Fixed Trying to access array offset on value of type null [sc-20528]
2023-03-24 04:52:56 -07:00
snipe
642d1e9f36 Merge pull request #12720 from inietov/fixes/undefined_array_key_266
Fixed Undefined array key 266 rollbar 17086
2023-03-24 04:50:47 -07:00
snipe
3792d3fdd2 Merge pull request #12721 from marcusmoore/fixes/allow-migrating-sqlite
Fixes the migration of sqlite databases
2023-03-24 04:50:15 -07:00
Marcus Moore
317335e79f Allow the migration of sqlite databases 2023-03-23 17:40:03 -07:00
Marcus Moore
fa69a580ab Start to scaffold license checkout notification test 2023-03-23 17:18:33 -07:00
Marcus Moore
fc043a35d9 Fix checkouts for licenses 2023-03-23 17:03:48 -07:00
Marcus Moore
25e859c866 Simplify test case 2023-03-23 16:42:21 -07:00
Marcus Moore
2dcf4e3d16 Standardize on sending anonymous notifications for asset checkouts 2023-03-23 16:31:40 -07:00
Marcus Moore
1f664709ba Merge branch 'develop' into bug/sc-15034
# Conflicts:
#	app/Notifications/CheckoutAssetNotification.php
2023-03-23 13:04:40 -07:00
Ivan Nieto Vivanco
fbb3684022 Add a condition to 'restart' the color index for the status pie chart 2023-03-23 12:43:02 -06:00
snipe
b91e914a61 Merge remote-tracking branch 'origin/develop' 2023-03-23 10:55:58 -07:00
snipe
fc3672c119 Merge pull request #12717 from marcusmoore/fixes/update-slack-property-names
Fixes calls to changed webhook properties names
2023-03-23 10:55:02 -07:00
Marcus Moore
9d2c4a4dee Update webhook message 2023-03-23 10:38:35 -07:00
Marcus Moore
fe6295a5e4 Update slack_* properties to webhook_* 2023-03-22 14:43:00 -07:00
Ivan Nieto Vivanco
aa8dfcf89f Added a ternary to avoid null offset in array 2023-03-22 13:48:23 -06:00
Marcus Moore
b396f2bed3 Update test case names 2023-03-22 12:41:30 -07:00
Marcus Moore
28ced46b9d Clean up test code 2023-03-22 12:38:14 -07:00
Marcus Moore
66224765ea Use factory state for webhook settings 2023-03-22 12:31:47 -07:00
Marcus Moore
9c4a3ce56a Update slack_endpoint to webhook_endpoint in test and notification 2023-03-22 12:27:36 -07:00
Marcus Moore
f6d0dd0f93 Merge branch 'develop' into bug/sc-15034 2023-03-22 11:58:47 -07:00
Marcus Moore
e303aeadd1 Fix test name 2023-03-22 11:56:54 -07:00
snipe
e8e1ada776 Merge pull request #12669 from akemidx/feature/sc-20178
#20178: Added Dell and Lenovo to warranty link function
2023-03-22 00:54:40 -07:00
snipe
58ea1592bb Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/js/build/app.js
#	public/js/dist/all.js
#	public/mix-manifest.json
#	resources/views/livewire/slack-settings-form.blade.php
2023-03-22 00:26:15 -07:00
snipe
f3785acf4d Merge pull request #12710 from snipe/localization/fixing_a_few_more_hardcoded_strings
Handled a few more hard-coded strings
2023-03-22 00:22:06 -07:00
snipe
545d023a18 Handled a few more hard-coded strings
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 23:56:07 -07:00
snipe
473211397f Merge pull request #12708 from uberbrady/livewire_importer_no_subcomponent
Livewire importer without subcomponent
2023-03-21 23:07:04 -07:00
snipe
e28d4fa588 Merge pull request #12709 from snipe/fixes/null_location_in_bulk_users
Ability to remove user location from users
2023-03-21 23:04:31 -07:00
snipe
e08327be95 Ability to remove user location from users
Rework of #9677 - sorry @godmartinez - I suck :(

Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 23:03:57 -07:00
snipe
418ce75a9f Merge pull request #11431 from ntbutler-nbcs/develop
[Fix / Minor Change] Asset checkinbytag now consistent with existingAPI
2023-03-21 22:40:21 -07:00
Brady Wetherington
6fe520a55d Hooked various the contents of the components together 2023-03-21 22:26:32 -07:00
snipe
0418d390f0 Corrected width to 100%
I should not be allowed to touch computers

Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 22:25:15 -07:00
snipe
b3d5bb75a3 Apply master patch to develop because I am an idiot on the wrong branch
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 22:23:09 -07:00
snipe
5346ebba94 Make select2 list in slack settings not searchable
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 22:21:21 -07:00
snipe
6c2c36469a Merge remote-tracking branch 'origin/develop' 2023-03-21 22:18:53 -07:00
snipe
1fa9f80c03 Correctly disable the select2 in demo mode
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 22:18:42 -07:00
snipe
4efac7827b Trying other save method, I guess?
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 22:10:30 -07:00
snipe
b45dc09f57 Merge pull request #12707 from snipe/fixes/fixed_migration_for_demo
Fixes back-in-time Slack v slack migration
2023-03-21 22:01:17 -07:00
snipe
76425ca2a5 Fixes back-in-time Slack v slack migration
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 21:59:17 -07:00
snipe
e609130291 Merge pull request #12706 from snipe/fixes/static_helper
Forgot the static method declaration - derp
2023-03-21 21:21:56 -07:00
snipe
41eb2464e2 Forgot the static method declaration - derp
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 21:21:01 -07:00
snipe
8aec28fad6 Merge remote-tracking branch 'origin/develop' 2023-03-21 21:14:06 -07:00
snipe
e55fc4d047 Merge pull request #12705 from snipe/fixes/webhook_ui
Slack webhook UI tweaks, added select2
2023-03-21 21:11:14 -07:00
snipe
e40762cf7f Small anal-retentive spacing/indenting tweaks
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 21:00:43 -07:00
snipe
2d3ddd1c7a Fixed default value for webhook_selected
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 20:56:08 -07:00
snipe
637438ccf6 Added select2 to slack settings
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 20:00:11 -07:00
snipe
647f47cdfe Check for demo mode in the clear method for the controller
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 19:27:05 -07:00
snipe
a14d1b981d Switched singleton to static helper method
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 19:22:18 -07:00
snipe
5217141dfb Yuck, but added helper function to return the demo mode form warning
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 18:59:34 -07:00
snipe
b28a25f544 Normalize the flash session to the way we do it elsewhere
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 18:59:18 -07:00
snipe
d55ae44638 Helper method to make it easier (shorter) to determine if the app is in demo mode
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 18:59:03 -07:00
snipe
f29e813332 Translated “Clear & Save”
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 18:58:35 -07:00
snipe
d883084830 Fixed some funky HTML tags
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 18:58:26 -07:00
snipe
658252125e Added new partial for the form inline “demo mode”
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 18:57:27 -07:00
Marcus Moore
315f5231cd Send slack notification for check outs to assets and locations 2023-03-21 17:03:51 -07:00
snipe
35bef6625a Merge pull request #12703 from Godmartinz/webhook_clean_up
adds clear and save button, save button updates accordingly
2023-03-21 17:02:33 -07:00
snipe
342b399191 Merge pull request #12700 from marcusmoore/fixes/purify-factories
Purifies model factories
2023-03-21 16:52:30 -07:00
Godfrey M
2754277068 adds csrf token and missing divs 2023-03-21 16:12:46 -07:00
snipe
4cc29b76f0 Merge remote-tracking branch 'origin/develop' 2023-03-21 16:07:03 -07:00
snipe
7059a57be1 Merge pull request #12704 from snipe/features/next_audit_date
Added next audit date override in bulk asset edit
2023-03-21 16:02:37 -07:00
snipe
c229d69cec Added next audit date override in bulk asset edit
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 16:01:41 -07:00
Godfrey M
3c28242a2e save button updates accordingly 2023-03-21 15:53:09 -07:00
snipe
c41aa8ac7f Merge pull request #12701 from snipe/features/add_default_location_to_maintenance_report
Fixed #12682 - add default location to maintenance report
2023-03-21 13:55:09 -07:00
snipe
ecb11c3a12 Fixed #12682 - add default location to maintenance report
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 13:52:21 -07:00
snipe
4f8542b71b Merge pull request #12680 from akemidx/clone_accessories
Clone accessories
2023-03-21 13:37:04 -07:00
akemidx
bb7b655fd2 translating screen reader lines 2023-03-21 16:02:34 -04:00
akemidx
3134279a95 small edits 2023-03-21 15:48:53 -04:00
Marcus Moore
751abe1438 Re-add asset factory states 2023-03-21 09:54:55 -07:00
Marcus Moore
d214bd0b06 Remove temporary command 2023-03-20 16:41:33 -07:00
Marcus Moore
3b16a65988 Merge branch 'develop' into fixes/purify-factories 2023-03-20 16:24:35 -07:00
Marcus Moore
918239961a Add simple test case for assets 2023-03-20 15:47:57 -07:00
Marcus Moore
272cc1adac Skip creating user when creating a setting since it isn't needed 2023-03-20 15:33:40 -07:00
Marcus Moore
16e3416225 Update test case 2023-03-20 14:27:45 -07:00
snipe
8012c966b0 Merge pull request #12696 from snipe/dependabot/github_actions/docker/build-push-action-4
Bump docker/build-push-action from 3 to 4
2023-03-20 14:19:44 -07:00
Marcus Moore
a0e547c7fb Remove some unused imports 2023-03-20 14:18:59 -07:00
Marcus Moore
44a91f0a2b Seed license checkouts 2023-03-20 14:18:54 -07:00
dependabot[bot]
4537ab3d54 Bump docker/build-push-action from 3 to 4
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 21:18:50 +00:00
snipe
05b4170116 Merge pull request #12694 from uberbrady/config_cachable_if_no_rollbar
Fixed #12671: Re-enable config:cache when there's no Rollbar
2023-03-20 14:17:53 -07:00
Marcus Moore
92e0c59f89 Fix typo in Keyboard accessory name 2023-03-20 12:01:39 -07:00
Marcus Moore
1bad8e1fc2 Remove outdated comments 2023-03-20 11:42:15 -07:00
Marcus Moore
1fd574779b Remove unneeded or outdated comments and update imports 2023-03-20 11:39:27 -07:00
Marcus Moore
a37d69fcf1 Replace remaining user_ids in factories 2023-03-20 11:19:34 -07:00
Brady Wetherington
3a4ca5acad Re-enable config:cache *only* if there's no Rollbar 2023-03-18 21:07:00 -07:00
Brady Wetherington
704a2ad858 WIP: trying to merge two LW components into one, not working yet 2023-03-18 20:31:56 -07:00
snipe
3a30f04b51 Merge remote-tracking branch 'origin/develop' 2023-03-18 12:00:42 -07:00
snipe
f2a3c2a349 Merge pull request #12693 from snipe/fixes/use_statements
Updates the Gate “use” statement to be more specific
2023-03-18 12:00:23 -07:00
snipe
f9e190eb32 Updates the Gate “use” statement to be more specific
Signed-off-by: snipe <snipe@snipe.net>
2023-03-18 11:58:09 -07:00
snipe
de6b663833 Merge pull request #12692 from snipe/fixes/small_group_api_fixes
Corrected gates, added fillable
2023-03-18 11:56:15 -07:00
snipe
8dd3ae8a37 Corrected gates, added fillable
Signed-off-by: snipe <snipe@snipe.net>
2023-03-18 11:53:20 -07:00
snipe
03b4a87a65 Merge remote-tracking branch 'origin/develop' 2023-03-18 00:16:34 -07:00
snipe
c7f4a93c17 Merge pull request #12691 from snipe/fixes/small_cleanup_for_bulk_delete_checkin
Small cleanup for bulk delete checkin
2023-03-18 00:16:15 -07:00
snipe
071a642509 Changed phrasing in translatons
Signed-off-by: snipe <snipe@snipe.net>
2023-03-18 00:15:28 -07:00
snipe
e39a75f2cc Fixed min width on select2 bulk menus
Signed-off-by: snipe <snipe@snipe.net>
2023-03-18 00:14:57 -07:00
snipe
ea4a37d8ef Fixed cancel button alignment
Signed-off-by: snipe <snipe@snipe.net>
2023-03-18 00:14:09 -07:00
snipe
d7363a41c8 Merge remote-tracking branch 'origin/develop' 2023-03-17 17:30:32 -07:00
snipe
789c4b4df8 Merge pull request #12690 from snipe/features/more_merge_user_olish
More merge-user polishing
2023-03-17 17:29:12 -07:00
snipe
12a2d8ad49 Fixed admin ID
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 17:03:10 -07:00
snipe
e47fc9527b Updated language
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:50:02 -07:00
snipe
820ae09a6f Reworked the layout of the confirm merge form a little
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:42:41 -07:00
snipe
fb54a21e12 Added strings
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:42:22 -07:00
snipe
b39fa1d987 Added merge icon
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:42:17 -07:00
snipe
28cc8f9d69 Nicer user history display
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:41:43 -07:00
snipe
a54e50961e Added event and listener
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:41:33 -07:00
snipe
82dc57aa18 Renamed some variables, invoked the event listener
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:24:58 -07:00
snipe
9ac4efb912 Better commenting
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:24:38 -07:00
snipe
a4e6b3c022 Merge remote-tracking branch 'origin/develop' 2023-03-17 02:48:51 -07:00
snipe
c752e3bb86 Fixed divs
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 02:48:41 -07:00
snipe
934f43e104 Merge remote-tracking branch 'origin/develop' 2023-03-17 02:45:04 -07:00
snipe
1a8622dc3b Merge pull request #12689 from snipe/features/add_password_lock_and_use_new_strings
Features/add password lock and use new strings
2023-03-17 02:44:37 -07:00
snipe
e557f03cc2 Disable submit if app is locked
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 02:43:33 -07:00
snipe
30cf7eb750 Disallow action in demo mode
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 02:42:50 -07:00
snipe
ccdd6ef5e0 Merge remote-tracking branch 'origin/develop' 2023-03-16 23:14:47 -07:00
snipe
13a02ff241 Merge pull request #12687 from snipe/features/nicer_ui_for_merge
Made the table wider, used icons to compact space
2023-03-16 23:14:25 -07:00
snipe
c93096b767 Made the table wider, used icons to compact space
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 23:13:05 -07:00
snipe
94a275f239 Merge remote-tracking branch 'origin/develop' 2023-03-16 22:50:11 -07:00
snipe
d8d7ed4465 Merge pull request #12686 from snipe/features/added_email_and_username_to_merge_confirm
Added email and username to merge user confirmation screen
2023-03-16 22:49:54 -07:00
snipe
736777e1e6 Added email and username to merge user confirmation screen
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 22:48:20 -07:00
Marcus Moore
3849bb838d Make a few more factories a bit more pure 2023-03-16 18:29:51 -07:00
snipe
0ef8aba36f Merge remote-tracking branch 'origin/develop' 2023-03-16 18:20:57 -07:00
snipe
f566a71658 Merge pull request #12685 from snipe/features/merge_users
Added user merge
2023-03-16 18:20:24 -07:00
snipe
0dd11575c5 Added merge controller
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 18:19:16 -07:00
snipe
d3d26cb988 Added translations
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 18:19:03 -07:00
snipe
07fbbf5f7f Added merge to user menu
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 18:18:54 -07:00
snipe
0dfb51f642 User merge blade
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 18:18:32 -07:00
snipe
853e809ff8 Added route
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 18:18:26 -07:00
Marcus Moore
605f214597 Add properties necessary for factories to be called in isolation 2023-03-16 17:08:18 -07:00
Marcus Moore
d9c1a548f1 Update deprecated faker calls 2023-03-16 17:07:46 -07:00
Marcus Moore
582c3b987b Update some faker calls 2023-03-16 16:38:21 -07:00
snipe
ffd9bbd7c6 Merge remote-tracking branch 'origin/develop' 2023-03-16 16:27:41 -07:00
snipe
ffb87a0a87 Merge pull request #12684 from snipe/features/added_console_command_to_normalize_names
Added console command to normalize capitalization on names
2023-03-16 16:24:33 -07:00
snipe
8f04342fc2 Added console command to normalize capitalization on names
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 16:23:52 -07:00
snipe
d6434fa55a Merge pull request #12683 from snipe/fixes/additional_sort
Fixes/additional sort
2023-03-16 16:08:51 -07:00
snipe
b374834999 Added extra order by switch for first_name and last_name
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 16:07:51 -07:00
snipe
5e4455f042 Deleted duplicate statement
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 16:07:36 -07:00
Marcus Moore
f47a28f790 Actually remove unused methods 2023-03-16 15:40:16 -07:00
Marcus Moore
ca677038b0 Remove unused methods 2023-03-16 15:39:02 -07:00
Marcus Moore
a50ddb4a5d Improve actionlog factory and seeder 2023-03-16 15:25:23 -07:00
Marcus Moore
daf6e9fa4b Seed assets with randomized locations 2023-03-16 14:23:40 -07:00
Marcus Moore
31630e3677 Seed licenses with categories 2023-03-16 13:47:02 -07:00
Marcus Moore
2f0f9586b1 Remove default category relationship from license factory 2023-03-16 13:46:30 -07:00
Marcus Moore
a98cc01766 Seed users with departments 2023-03-16 13:25:35 -07:00
Marcus Moore
345946d6d4 Remove default department relationship from user factory 2023-03-16 13:25:02 -07:00
Marcus Moore
76861c0c30 Remove hard-coded manager_id in factory 2023-03-16 12:46:47 -07:00
Marcus Moore
7062b0acaa Remove hard-coded supplier_id in factories 2023-03-16 12:41:34 -07:00
Marcus Moore
0ec885bf18 Remove hard-coded fieldset_id in factories 2023-03-15 18:49:21 -07:00
Marcus Moore
dfd6cf0d29 Improve factories for location relationships 2023-03-15 18:31:08 -07:00
snipe
b64d7e38f2 Merge pull request #12679 from snipe/bug/sc-20451
Handle already-deleted license files more gracefully
2023-03-15 16:26:15 -07:00
Godfrey M
371e142bae removes unnecessary function 2023-03-15 15:57:45 -07:00
Marcus Moore
b944945377 Remove hard-coded company_id in factories and update seeders 2023-03-15 14:12:34 -07:00
akemidx
a8e2f72e25 accessory cloning, WITHOUT copying over the image. 2023-03-15 16:55:24 -04:00
snipe
e9601bcf13 Handle already-deleted license files more gracefully
Signed-off-by: snipe <snipe@snipe.net>
2023-03-15 13:05:51 -07:00
snipe
b89dcfbb8e Merge remote-tracking branch 'origin/develop' 2023-03-15 12:55:55 -07:00
akemidx
0909d94c8f actually added the icons haha 2023-03-15 15:07:07 -04:00
akemidx
68094b23b9 moved dell and levono icons to local machine 2023-03-15 15:02:33 -04:00
snipe
fdacd5d5b5 Merge pull request #12636 from akemidx/feature/sc-20330/date-on-all-assigned-pdf
Datestamp on "Print All Assigned" generated form
2023-03-15 11:31:52 -07:00
akemidx
f38f6f57ae fixed localization and formatting. simplified code to remove php snippet 2023-03-15 14:00:29 -04:00
akemidx
a3353b8496 committing 2023-03-15 13:48:22 -04:00
snipe
f463c02783 Merge remote-tracking branch 'origin/develop' 2023-03-14 19:56:26 -07:00
snipe
08e09a3215 Merge pull request #12675 from snipe/security/webpack_upgrade
Updated webpack
2023-03-14 19:55:42 -07:00
snipe
039a5dde7d Updated webpack
Signed-off-by: snipe <snipe@snipe.net>
2023-03-14 19:54:58 -07:00
snipe
3b3bdb6535 Merge remote-tracking branch 'origin/develop' 2023-03-14 19:03:59 -07:00
snipe
1968aebf78 Merge pull request #12674 from snipe/fixes/translation_variable_for_slack
Fixed missing variable in Slack hook test
2023-03-14 19:03:42 -07:00
snipe
a0617edaf0 Fixed missing variable in Slack hook test
Signed-off-by: snipe <snipe@snipe.net>
2023-03-14 19:02:38 -07:00
snipe
723e4ebd15 Merge remote-tracking branch 'origin/develop' 2023-03-14 18:55:07 -07:00
Marcus Moore
fb789eb048 Remove hard-coded depreciation_id in factories 2023-03-14 17:51:20 -07:00
snipe
4c66267f3b Merge pull request #12668 from inietov/fixes/undefined_array_key_0
Fixed ErrorException: Undefined array key 0 [sc-20424]
2023-03-14 17:10:04 -07:00
Marcus Moore
f7577bff52 Merge branch 'develop' into fixes/purify-factories 2023-03-14 17:09:30 -07:00
snipe
322fd76353 Merge pull request #12664 from Godmartinz/The_final_lowercase
The final lowercase in webhooks
2023-03-14 17:09:20 -07:00
snipe
c12d261fc8 Merge pull request #12673 from marcusmoore/fixes/fix-component-factory
Fixed Component factory
2023-03-14 17:05:38 -07:00
snipe
a991bdd136 Merge pull request #12672 from inietov/fixes/consumable_factory_seeder
Fixed Consumable Factory Seeder
2023-03-14 17:04:33 -07:00
Marcus Moore
9cd8460e1e Add proper date format to purchase date in the component factory 2023-03-14 17:02:45 -07:00
Marcus Moore
72a61783a3 Inline two relationships in asset maintenance factory 2023-03-14 14:59:34 -07:00
snipe
f0d05a7461 Merge branch 'develop' of https://github.com/snipe/snipe-it into develop 2023-03-14 14:34:11 -07:00
snipe
88624ff2c0 Add @marcusmoore as a contributor 2023-03-14 14:34:03 -07:00
snipe
f71ee699f4 Add @spencerrlongg as a contributor 2023-03-14 14:33:31 -07:00
snipe
ce83d3aec1 Merge pull request #12670 from spencerrlongg/bug/sc-20437
Catch Duplicate Headers in Asset History Import
2023-03-14 14:32:34 -07:00
slong753
60b70a4074 catch and redirect back with error 2023-03-14 16:07:09 -05:00
Marcus Moore
1ff094dd47 Remove hard-coded model_id in asset factory 2023-03-14 13:56:25 -07:00
Marcus Moore
ef8007a890 Remove hard-coded status_id in asset factory 2023-03-14 13:24:50 -07:00
akemidx
d50a5d1880 dell and lenovo icons/links added 2023-03-14 16:04:03 -04:00
Marcus Moore
a2efe3fa67 Remove hard-coded category_id in factories 2023-03-14 12:50:02 -07:00
akemidx
a9782b7e00 testing links 2023-03-14 15:26:44 -04:00
Marcus Moore
4c4101fe64 Fix key name 2023-03-14 12:04:31 -07:00
akemidx
9c5ee060d3 WIP string/int error 2023-03-14 15:01:56 -04:00
Marcus Moore
7cf424b914 Remove hard-coded manufacturer_id in factories 2023-03-14 12:01:23 -07:00
Marcus Moore
e8ff7cc09c Remove hard-coded user_id in factories 2023-03-14 11:34:58 -07:00
snipe
dfd9fcc5e0 Merge pull request #12599 from inietov/fixes/unknown_column_0_in_field_list
Fixed Column not found: 1054 Unknown column '0' in 'field list' [sc-20004]
2023-03-14 09:51:42 -07:00
snipe
b83980299a Merge pull request #12667 from snipe/fixes/small_livewire_ui_fixed
Small UI tweaks
2023-03-14 09:47:45 -07:00
snipe
5a709a83e7 Small UI tweaks
Signed-off-by: snipe <snipe@snipe.net>
2023-03-14 09:38:30 -07:00
Ivan Nieto Vivanco
66bb897ac4 Fix format to purchase date 2023-03-14 02:55:20 -06:00
Ivan Nieto Vivanco
67471a3a77 Evaluate if the collection is empty before access the array index 2023-03-13 21:44:06 -06:00
Marcus Moore
adba450b40 Remove some hard-coded ids in factories 2023-03-13 17:27:06 -07:00
snipe
7acf449ed3 Merge pull request #12665 from snipe/fixes/fixed_migration_for_smaller_chunking
Removed loading and reduced chunking to 10
2023-03-13 17:23:19 -07:00
Godfrey M
955d8313b2 the final lowercase 2023-03-13 17:14:02 -07:00
snipe
1b9c3c93ad Removed loading and reduced chunking to 10
Signed-off-by: snipe <snipe@snipe.net>
2023-03-13 17:12:51 -07:00
snipe
a2667a7520 Merge pull request #12663 from Godmartinz/webhook_tweaks
fixes webhook variables to lowercase
2023-03-13 16:55:32 -07:00
Marcus Moore
099ec3f550 Remove creation of category within category factory state 2023-03-13 16:45:43 -07:00
Marcus Moore
6e6a021928 Add temporary command to display model counts 2023-03-13 16:44:47 -07:00
Godfrey M
1bd37b49e9 adds translations for webhook names 2023-03-13 16:13:02 -07:00
Marcus Moore
2813b7ea58 Scaffold tests for slack notification on checkout 2023-03-13 15:47:50 -07:00
Ivan Nieto Vivanco
d224f3177e Delete a rule that was breaking validation 2023-03-13 16:43:10 -06:00
Godfrey M
6474249ea8 uppercased names 2023-03-13 15:29:53 -07:00
Godfrey M
7612c5d852 lowercases variables 2023-03-13 15:26:51 -07:00
Ivan Nieto Vivanco
e7b3daa80c Adjust validator to only receive valid groups id's 2023-03-13 16:10:08 -06:00
snipe
477bd27cba Merge pull request #12570 from Godmartinz/generalize_webhooks
Adds General option to the webhooks settings
2023-03-13 14:54:51 -07:00
Ivan Nieto Vivanco
e4204a6dd1 Adds validator to PATCH request in the API UsersController 2023-03-13 15:49:05 -06:00
Godfrey M
11bf3f5285 aligned inputs 2023-03-13 14:06:05 -07:00
Godfrey M
576b8f8c48 adds translations to edit and index of categories 2023-03-13 13:33:03 -07:00
snipe
cacb000693 Merge pull request #12660 from snipe/upgrades/bump_codacy
Bumped codacy workflow
2023-03-13 11:13:46 -07:00
snipe
4f772468e6 Bumped codacy workflow
Relates to #12657 but for develop

Signed-off-by: snipe <snipe@snipe.net>
2023-03-13 11:10:41 -07:00
Godfrey M
542332ea0c removes discord from rules 2023-03-13 10:54:18 -07:00
Godfrey M
b6d105c4f4 removes help text from general integrations 2023-03-13 10:49:41 -07:00
Godfrey M
27a2ed5c79 Merge branch 'develop' into generalize_webhooks 2023-03-13 10:41:08 -07:00
snipe
8a977c66f0 Merge pull request #12659 from Godmartinz/update_notification_name
fixes alerts to notifications in notification settings
2023-03-13 09:57:43 -07:00
Godfrey M
82504c9764 updates alerts to notifications in notification settings 2023-03-13 09:51:25 -07:00
snipe
1e6a3b8c45 Add @floschoepfer as a contributor 2023-03-10 14:24:56 -08:00
snipe
785ba3b5ed Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
#	public/js/build/app.js
#	public/js/dist/all.js
#	public/mix-manifest.json
2023-03-10 14:23:45 -08:00
snipe
d1d89f872a Merge pull request #12638 from snipe/fixes/dashboard_category_count_with_show_archived
Fixed #12635 - dashboard category should not show archived
2023-03-10 14:19:40 -08:00
snipe
58d2e658d2 Merge pull request #12648 from floschoepfer/patch-1
Fixed #12647: fix translation and adds icon on property reassignable
2023-03-10 14:13:48 -08:00
Florian
86205bc996 fix translation and adds icon on property reassignable
Fixing #12647
2023-03-10 10:36:42 +01:00
akemidx
4533982345 added time of day 2023-03-09 15:11:07 -05:00
snipe
65c2f27644 Merge pull request #12640 from marcusmoore/fix/test-suite
Fixes unit and feature test suite
2023-03-09 11:57:39 -08:00
snipe
88eb73d160 Use Carbon’s diffForHumans() method instead of our own home-grown stuff
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:47:54 -08:00
snipe
f4bd307421 Added comments, removed gthe AgeFormat() helper method
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:47:27 -08:00
snipe
059ead5af5 Added comments (not related to this, sorry)
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:47:08 -08:00
snipe
02dd0669dc Added comments
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:36:08 -08:00
snipe
b3b9efbaff New helper method to return icon type
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:34:04 -08:00
snipe
a6f4e53e2b Added translation strings
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:33:49 -08:00
snipe
fe470b32fc Added icon and import type to header, more translations
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:33:40 -08:00
snipe
474e32ea2a Added translations and formatting
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:33:02 -08:00
snipe
b9e4b2a0ba Added some translations, date formatting, and filesize human reporting
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:32:45 -08:00
Brady Wetherington
087fe19ae7 Merge branch 'livewire_importer_2_squashed_and_rebased' of github.com:uberbrady/snipe-it into livewire_importer_2_squashed_and_rebased 2023-03-08 13:57:21 -08:00
Brady Wetherington
22d7d2a04e Aliases could get selected when they weren't for an import_type 2023-03-08 13:56:29 -08:00
snipe
b8887bd3e3 Translated strings
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 13:47:56 -08:00
snipe
65c2d75c04 Added aliases
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 13:47:38 -08:00
snipe
dccd6fd4b1 Duplicate withCount
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 13:06:14 -08:00
snipe
7f8bdbd252 Added showableAssets() relationship to Category model
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 13:01:38 -08:00
snipe
00896a8615 Updated comment
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 12:51:53 -08:00
Marcus Moore
44b48a954a Remove unneed section of testing docs 2023-03-08 12:15:37 -08:00
Marcus Moore
0be882dc35 Merge branch 'develop' into fix/test-suite 2023-03-08 12:13:53 -08:00
akemidx
2a4d30a748 forgot to add datestamp to title of page 2023-03-08 15:09:33 -05:00
Marcus Moore
5fb18af245 Update testing documentation 2023-03-08 11:58:36 -08:00
Marcus Moore
697824007a Move DB_CONNECTION back to .env.testing.example 2023-03-08 11:58:29 -08:00
akemidx
cd9f2f7fb7 datestamp for print all assigned form generation 2023-03-08 14:56:14 -05:00
Godfrey M
15c19a7ab7 silenced Discord option and validation, more translations 2023-03-08 10:35:45 -08:00
snipe
ac0b22d696 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 00:33:04 -08:00
snipe
1ed7cd27b4 Lots of HTML/CSS tweaks for better UI
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 00:32:30 -08:00
snipe
e143e0c5ee Make the <tr> reflect that it’s active
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 00:32:16 -08:00
snipe
42601fecbf Merge branch 'livewire_importer_2_squashed_and_rebased' of https://github.com/uberbrady/snipe-it into uberbrady-livewire_importer_2_squashed_and_rebased 2023-03-07 21:42:32 -08:00
Brady Wetherington
7c09de3ea8 Re-introduce the 'placeholder' option for our form-helper 2023-03-07 21:38:55 -08:00
snipe
094859cfe8 Merge branch 'livewire_importer_2_squashed_and_rebased' of https://github.com/uberbrady/snipe-it into uberbrady-livewire_importer_2_squashed_and_rebased 2023-03-07 21:38:04 -08:00
Brady Wetherington
037489a6c0 If fields were already mapped, they would cause a 500 on re-mapping on import 2023-03-07 21:33:20 -08:00
snipe
5defd5ec0a Merge develop into master
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 19:59:17 -08:00
snipe
e66b19aca0 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 19:44:06 -08:00
snipe
fd96ff0160 Add @kenchan0130 as a contributor 2023-03-07 19:42:52 -08:00
snipe
1ccedf6426 Merge pull request #12617 from kenchan0130/patch-12249
Fixed #12249: fix csv importer for serial_number field
2023-03-07 19:42:23 -08:00
snipe
8adeee41e6 Merge pull request #12633 from snipe/bug/sc-20332
Fixed 500 when admin erroneously tries to upload a tiff as logo, cleaned up logo upload layout
2023-03-07 19:41:10 -08:00
snipe
19d19a4c42 Updated language string
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 19:18:32 -08:00
snipe
383b5b43bb Added a few more jquery options for prevoew flexibility
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 18:54:38 -08:00
snipe
379c5f6790 Reworked the layout for logo upoloads
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 18:54:09 -08:00
snipe
e55d02fd59 Added new string
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 18:53:53 -08:00
Brady Wetherington
942bedaf06 Re-add VIP and BYOD to importer, but in Livewire 2023-03-07 18:53:32 -08:00
Brady Wetherington
09c1298e03 Merge branch 'develop' into livewire_importer_2_squashed_and_rebased
I'll be taking in the changes to the importer front-end elsewhere
2023-03-07 18:51:05 -08:00
Brady Wetherington
fe699737eb Add improved field-guessing logic; make sure 'do not map' fields work 2023-03-07 18:26:59 -08:00
Marcus Moore
dd9c00195b Remove old $tester variable and usused imports 2023-03-07 17:04:46 -08:00
snipe
e60fa15414 Nicer layout, but it kinda dosn’t work :(
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 17:02:52 -08:00
Marcus Moore
43ff7261b2 Remove redundant base test case 2023-03-07 16:57:55 -08:00
Marcus Moore
8c13a4c5c9 Use LazilyRefreshDatabase instead of RefreshDatabase 2023-03-07 16:43:18 -08:00
Godfrey M
69944853f9 more translations 2023-03-07 15:57:58 -08:00
snipe
45b5a8b6ab Catch exception if the file can’t be handled via Intervention
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 15:56:36 -08:00
Godfrey M
35dd0d8def adds generalized webhooks, updates settings page, translations, validation 2023-03-07 15:48:21 -08:00
snipe
8b70a7f216 Merge remote-tracking branch 'origin/develop' 2023-03-07 14:00:37 -08:00
snipe
182a5ea5fc Merge pull request #12631 from snipe/bug/sc-20297/expected-checkin-email-report-link-back-error
Dynamically determine target route for expected checkin emails
2023-03-07 13:57:26 -08:00
snipe
ea54f540de Dynamically determine target route for expected checkin emails
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 13:42:51 -08:00
akemidx
ec5836dab4 cloning accessories first bit 2023-03-07 16:41:48 -05:00
snipe
e399015427 Merge pull request #12628 from marcusmoore/fixes/keep-asset-name-on-import
Maintain asset name during import with checkout
2023-03-07 11:22:53 -08:00
Marcus Moore
c80595e05c Ensure asset name is maintained when importing assets that are checked out 2023-03-07 11:09:25 -08:00
Marcus Moore
8fad377114 Remove helper methods by inlining where needed 2023-03-07 10:28:33 -08:00
Tadayuki Onishi
f4675927a0 fix csv importer for serial_number filed
Signed-off-by: Tadayuki Onishi <tt.tanishi100@gmail.com>
2023-03-07 22:53:02 +09:00
Marcus Moore
a3c8c3757a Remove unused method 2023-03-06 17:50:44 -08:00
Marcus Moore
ddcb8d8dd9 Remove commited .env.testing file 2023-03-06 17:37:08 -08:00
Marcus Moore
245f0aff72 Ignore the correct env file 2023-03-06 17:35:49 -08:00
Marcus Moore
ba92501670 Add .env.testing.example file 2023-03-06 17:34:43 -08:00
Marcus Moore
9aad981895 Update phpunit schema location and remove unneeded environment variable 2023-03-06 17:25:03 -08:00
Marcus Moore
a24d734ee9 Alphabetize keys in phpunit.xml 2023-03-06 17:24:09 -08:00
snipe
c7fb542dc3 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/js/build/app.js
#	public/js/dist/all.js
#	public/mix-manifest.json
2023-03-06 17:13:29 -08:00
snipe
1ebbc767f1 Merge pull request #12624 from snipe/features/added_vip_and_byod_to_importer
Added `vip` and `byod` to importer
2023-03-06 17:11:28 -08:00
snipe
a34cb8b862 Check for boolean on requestable
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 17:11:08 -08:00
snipe
d36b4c1bd3 Merge remote-tracking branch 'origin/develop' 2023-03-06 17:04:15 -08:00
Marcus Moore
d27fe7d4b9 Merge branch 'develop' into fix/test-suite 2023-03-06 17:04:00 -08:00
snipe
d55393a3d9 Merge pull request #12626 from marcusmoore/fixes/checkouts-in-seeders
Fix seeder so assets are checked out to users
2023-03-06 17:01:47 -08:00
Marcus Moore
ef27c35d1d Update array keys to set asset location properly 2023-03-06 16:33:40 -08:00
snipe
0d3388b3ae Merge pull request #12623 from snipe/bug/sc-20254/errorexception-filesize-stat-failed-for-snipe
Check that the file exists before trying to stat it for filesize
2023-03-06 15:43:17 -08:00
snipe
fffe5da2e0 Merge pull request #12625 from uberbrady/quiet_down_scim_exceptions
Suppress SCIMExceptions from cluttering up Rollbar
2023-03-06 15:42:58 -08:00
Brady Wetherington
dd3c3a1428 Suppress SCIMExceptions from cluttering up Rollbar 2023-03-06 15:24:16 -08:00
snipe
16bd2cde0f Updated string for file not found
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 15:09:45 -08:00
snipe
e1069ac234 Return a file not found error if it doesn’t appear on disk
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 15:09:37 -08:00
snipe
8b6e8898c1 Fixed hardcoded string
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 15:09:12 -08:00
snipe
2cb06165c4 Added missing vip field to transformer and request
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 15:00:04 -08:00
snipe
b46c455e0a Updated mappings.md with byod and vip fields
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 14:28:34 -08:00
snipe
304ccaa30e Added byod to asset importer
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 14:28:24 -08:00
snipe
f672bdd3b7 Added vip to user importer
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 14:28:14 -08:00
snipe
eec5163e7f Updated vue assets
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 14:28:04 -08:00
snipe
f460d881da Updated vue
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 14:27:53 -08:00
snipe
27a495223d Updated sample CSVs
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 14:27:45 -08:00
Marcus Moore
bc54144284 Fix test by passing proper user 2023-03-06 12:40:47 -08:00
snipe
cc7325074e Check that the file exists before trying to stat it for filesize
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 10:47:28 -08:00
snipe
04ff472428 Merge remote-tracking branch 'origin/develop' 2023-03-06 10:29:07 -08:00
snipe
3a1cf26e98 Merge pull request #12621 from Godmartinz/bug/sc-20259/divisionbyzeroerror-division-by-zero-in-snipe
Fixes depreciation model rule for months
2023-03-06 10:28:39 -08:00
Godfrey M
e5deb4b413 doesn't allow months to be zero 2023-03-06 09:41:14 -08:00
snipe
f54d83ed59 Merge pull request #12612 from manuteleco/add_path_in_preflight_url_message
Fixed #11800: Include path in the expected URL during Pre-Flight
2023-03-06 09:36:15 -08:00
snipe
39193a71b7 Merge pull request #12611 from manuteleco/add_reverse_proxy_support_in_preflight
Fixed #10779: Add Reverse Proxy support to Pre-Flight URL check
2023-03-06 09:35:34 -08:00
snipe
83b906b153 Merge remote-tracking branch 'origin/develop' 2023-03-06 09:27:43 -08:00
snipe
191f955333 Merge pull request #12610 from veenone/feat/sortable_group_id
enable sortable for ID column
2023-03-06 09:26:52 -08:00
Manuel Rodríguez Guimeráns
548ae7ad22 Add Reverse Proxy support to Pre-Flight URL check
Before this change, the Pre-Flight URL check would inevitably fail
whenever Snipe-IT was running behind a reverse proxy or load balancer.

The URL check tries to ensure that the configured application URL
matches the URL that is actually used to reach the application. However,
when running behind an HTTP intermediary (like a reverse proxy or a load
balancer) the HTTP connection that Snipe-IT receives is not the _real_
connection from the user anymore, but a connection from the HTTP
intermediary. The scheme, host and port that Snipe-IT would obtain from
that incoming intermediary connection wouldn't match what is configured
as application URL and, therefore, the URL check would fail.

This commit solves the situation by making Snipe-IT's Pre-Flight URL
check aware of the `X-Forwarded-Proto` and `X-Forwarded-Host` HTTP
headers. These headers represent the _de-facto_ standard used by reverse
proxies and other HTTP intermediary components to convey information
about the incoming HTTP connection to the upstream application. Being
the upstream application, Snipe-IT can then make use of this information
to correctly evaluate the validity of the configured application URL.
2023-03-05 18:15:16 +01:00
Manuel Rodríguez Guimeráns
1d4f4b92de Include path in the expected URL during Pre-Flight
So that the message displayed to the user when the URL Pre-Flight check
fails is:

> Snipe-IT thinks your URL is SCHEME://DOMAIN, but your real
  URL is SCHEME://DOMAIN/setup

instead of:

> Snipe-IT thinks your URL is SCHEME://DOMAIN/setup, but your real
  URL is SCHEME://DOMAIN/setup

Having a missing "/setup" in the expected URL might confuse the user
into thinking that it is an additional configuration problem they need
to fix.

With this change, the comparison between the expected and actual URL
will not contain any accidental difference anymore. Only those that the
user really needs to be aware of and fix in their setup.
2023-03-05 17:52:45 +01:00
Achmad Fienan Rahardianto
0b3becee7a enable sortable for ID column 2023-03-04 11:27:00 +07:00
Ivan Nieto Vivanco
95f568b934 Remove unnecessary try/catch 2023-03-02 19:50:47 -06:00
snipe
95bd58487a Merge pull request #12602 from inietov/fixes/error_checkin_license_seat
Fixed #12601 Error checkin license seats
2023-03-02 17:48:22 -08:00
Ivan Nieto Vivanco
8a5d426ccd Use correct LicenseSeat property 2023-03-02 19:33:32 -06:00
Marcus Moore
e8da6d8bac Set purchase date in correct format 2023-03-02 13:47:58 -08:00
Marcus Moore
ad9eef6393 Update deprecated faker calls in Asset and Supplier factories 2023-03-02 13:41:52 -08:00
Marcus Moore
c3cc20fe0c Merge branch 'develop' into fix/test-suite 2023-03-02 13:23:00 -08:00
snipe
f817027fc2 Merge pull request #12593 from snipe/features/add_clone_to_locations
Added ability to clone location
2023-03-02 13:15:38 -08:00
Marcus Moore
45d7e9b134 Switch to using LazilyRefreshDatabase in unit test suite 2023-03-02 13:13:30 -08:00
Marcus Moore
75fc624ec6 Globally disable SecurityHeaders in tests 2023-03-02 13:12:25 -08:00
Ivan Nieto Vivanco
e0b2dc043a Adds try/catch to users API 2023-03-02 11:13:56 -06:00
Brady Wetherington
7edec26e73 Fixes to layout, improvements to import types, better icons for processing. 2023-03-01 17:18:36 -08:00
Godfrey M
aae178a606 gets select working, placeholders update dynamically 2023-03-01 17:10:10 -08:00
snipe
778787db3c Rip out jquery for location parent
Signed-off-by: snipe <snipe@snipe.net>
2023-03-01 15:36:01 -08:00
snipe
b8231f420b Remove name from blanking paroperties
Signed-off-by: snipe <snipe@snipe.net>
2023-03-01 14:12:33 -08:00
snipe
9b522006f3 Usew route group for locations
Signed-off-by: snipe <snipe@snipe.net>
2023-03-01 14:05:53 -08:00
snipe
84a14918bb Updated comments
Signed-off-by: snipe <snipe@snipe.net>
2023-03-01 14:03:33 -08:00
snipe
473553c464 Moved gate
Signed-off-by: snipe <snipe@snipe.net>
2023-03-01 14:01:40 -08:00
snipe
dac877f184 Added location clone
Signed-off-by: snipe <snipe@snipe.net>
2023-03-01 13:51:35 -08:00
Godfrey M
354f04534e add multi array, migration, still having issues 2023-03-01 12:30:32 -08:00
snipe
ca2619ca12 Merge remote-tracking branch 'origin/develop' 2023-03-01 12:28:34 -08:00
snipe
78b36c7886 Merge pull request #12592 from uberbrady/fix_accessories_report
The 'download activity report' displayed the wrong value for 'admin' (fixes FD-33368)
2023-03-01 12:28:03 -08:00
Brady Wetherington
ca849db316 The 'download activity report' displayed the wrong value for 'admin' 2023-03-01 12:23:13 -08:00
snipe
816d2f99cc Merge remote-tracking branch 'origin/develop' 2023-03-01 11:52:29 -08:00
snipe
c1b57064d4 Merge pull request #12591 from uberbrady/accessories_report_companies
Actually display name of company in Accessories Report
2023-03-01 11:52:10 -08:00
Brady Wetherington
9b80e86306 Actually display name of company in Accessories Report 2023-03-01 11:34:30 -08:00
snipe
d954c841e6 Merge pull request #12590 from snipe/fixes/check_for_array_in_linux_setup
Fixes/check for array in linux setup
2023-03-01 11:06:31 -08:00
snipe
562546a853 Updated comment
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 23:37:30 -08:00
snipe
4860440306 Check that it’s an array (versus checking that it’s not a bool)
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 23:32:10 -08:00
snipe
b72a9cc6fd Check if the $owner is boolean
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 23:31:26 -08:00
snipe
823203641d Updated assets with new font awesome
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 23:18:58 -08:00
snipe
b2fe3c36e9 Merge pull request #12589 from snipe/security/update_font_awesome_to_6_3_0
Updated font-awesome to ^6.3.0
2023-02-28 23:16:54 -08:00
snipe
1911480d3a Updated font-awesome to ^6.3.0
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 23:15:50 -08:00
Brady Wetherington
c48e19d236 Whoops, went a little overboard there. Whoopsie! 2023-02-28 22:51:48 -08:00
Brady Wetherington
863b30a07a Remove extraneous change to composer.json 2023-02-28 22:49:48 -08:00
Brady Wetherington
f3c500014c Another file I didn't really need to commit 2023-02-28 22:37:16 -08:00
Brady Wetherington
4f8710db63 Whoops, mis-committed something here that doesn't belong 2023-02-28 22:36:26 -08:00
Brady Wetherington
54cb38603b Cleaned up the last of the FIXME's (or downgraded them to TODO's) 2023-02-28 22:34:44 -08:00
Brady Wetherington
5cf66851f7 Finalizing the Livewire Importer! Just going to do some testing now 2023-02-28 21:58:02 -08:00
snipe
a6816c5e15 Merge remote-tracking branch 'origin/develop' 2023-02-28 20:53:32 -08:00
snipe
463ef02fae Merge pull request #12578 from inietov/fixes/undefined_variable_total
Fixed Undefined variable `$total`
2023-02-28 20:50:00 -08:00
snipe
b29276579f Updated prod assets
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 20:34:31 -08:00
snipe
dbe0a3352b Updated prod assets
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/mix-manifest.json
2023-02-28 20:34:20 -08:00
snipe
6fec3f4303 Merge pull request #12586 from snipe/assets/compiled_dev_assets
Compiled dev assets
2023-02-28 20:32:41 -08:00
snipe
f9b5a67dc2 Compiled dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 20:32:08 -08:00
snipe
2189a74d6a Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 20:32:00 -08:00
snipe
44e2796645 Merge pull request #12579 from Godmartinz/gh12571_sidebar_adjustment
Fixes the sidebar margin top
2023-02-28 20:30:07 -08:00
snipe
70d0347fe9 Merge pull request #12580 from marcusmoore/feature/crowdin-source-upload
Add GitHub Action to push translation sources to Crowdin
2023-02-28 20:28:04 -08:00
Brady Wetherington
2f94bf96ff Everything's all wired up; just need to clean up all the FIXME's and stuff 2023-02-28 18:36:52 -08:00
snipe
417a1e624a Merge remote-tracking branch 'origin/develop' 2023-02-28 18:22:24 -08:00
snipe
34f13eaa8a Merge pull request #12393 from snipe/features/make_eol_sortable
Added EOL as de-normed and sortable on assets
2023-02-28 18:22:00 -08:00
snipe
1f7ae08d76 Merge branch 'develop' into features/make_eol_sortable 2023-02-28 18:05:09 -08:00
snipe
3a4e20ae82 Merge remote-tracking branch 'origin/develop' 2023-02-28 16:57:59 -08:00
snipe
2ab0abc8a1 Merge pull request #12575 from inietov/fixes/typeError_get_class_argument_must_be_object_null_given
Fixed: TypeError: get_class(): Argument #1 ($object) must be of type object, null given
2023-02-28 16:45:53 -08:00
snipe
373aeb26da Merge remote-tracking branch 'origin/develop' 2023-02-28 16:14:42 -08:00
snipe
d838662f48 Merge pull request #12585 from marcusmoore/fixes/fix-license-seeder
Fix license seeder
2023-02-28 16:03:15 -08:00
snipe
ff122bd07c Merge remote-tracking branch 'origin/develop' 2023-02-28 15:56:35 -08:00
snipe
5e626e75ad Merge pull request #12584 from snipe/fixes/error_on_datepicker
Convert string to date object for formatting
2023-02-28 15:55:59 -08:00
Marcus Moore
a7a26bb154 Fix License Factory 2023-02-28 15:55:28 -08:00
snipe
af9f9d2523 Convert string to date object for formatting
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 15:48:45 -08:00
snipe
d13e1b32e7 Merge pull request #12583 from inietov/fixes/user_start_and_end_date_error
Fixed User start and end date throws error [sc-20228]
2023-02-28 15:30:46 -08:00
Ivan Nieto Vivanco
ad598425ef Adds format to the dates cast 2023-02-28 17:24:14 -06:00
snipe
ec2ce1dff8 Merge remote-tracking branch 'origin/develop' 2023-02-28 15:13:22 -08:00
snipe
5194711a6a Merge pull request #12582 from akemidx/bug/sc-20065/license-export-does-not-show-info-of-boolean 2023-02-28 15:13:04 -08:00
Marcus Moore
4197e613b2 Fix License Factory 2023-02-28 14:50:48 -08:00
akemidx
25f3e4d41a Adding ability to see boolean values when using normal export 2023-02-28 16:01:23 -05:00
Marcus Moore
589a5d0d8b Merge branch 'develop' into fix/test-suite 2023-02-28 09:48:48 -08:00
Godfrey M
e8fbb0608f adjusts the sidebar margin top 2023-02-28 09:30:02 -08:00
Marcus Moore
d707f2d391 Add GitHub Action to push translation sources to Crowdin 2023-02-28 09:07:34 -08:00
Ivan Nieto Vivanco
1be0a8d911 Declare variable as an empty array 2023-02-28 10:22:49 -06:00
Ivan Nieto Vivanco
0d860c0b72 Check if target is not null to retrieve the proper data 2023-02-27 19:01:37 -06:00
Ivan Nieto Vivanco
9d94bd6567 Validate if the license seat is not checked out, it can't be checked in 2023-02-27 18:57:38 -06:00
snipe
ae35af55d1 Merge remote-tracking branch 'origin/develop' 2023-02-27 15:55:58 -08:00
snipe
23fe11c71e Merge pull request #12574 from inietov/fixes/address_in_mailbox_not_comply_rfc
Fixed Address in mailbox given does not comply with RFC 2822, 3.6.2. [sc-202022]
2023-02-27 15:55:31 -08:00
Ivan Nieto Vivanco
b4e578c95e Convert the alert_email setting from string to array 2023-02-27 17:34:29 -06:00
Brady Wetherington
53db266b69 WIP: cleaning up extraneous gunk and trying to standardize on one single Livewire Select2 implementation 2023-02-27 14:29:02 -08:00
Brady Wetherington
fb201e61f3 More wiring up Livewire to the back-end. 2023-02-27 14:29:02 -08:00
Brady Wetherington
e1c8f155bb Wiring up more bits to Livewire 2023-02-27 14:29:02 -08:00
Brady Wetherington
5c97e45d00 WIP - trying to get select2 wired up for importer 2023-02-27 14:29:02 -08:00
Brady Wetherington
8009ee79db I think I have, now, full parity on the base Importer level
Meaning that you can upload new files, delete old files, have error
messages, have status updates - and all of them seem to work.
2023-02-27 14:29:02 -08:00
Brady Wetherington
0a085af0a0 Getting the basic wiring of the importer over into Livewire
WIP: Wiring up more and more of the actions on the importer

Files now upload okay, a little glitchy on the display-side though

add to readmes so i dont forget
2023-02-27 14:28:59 -08:00
snipe
c2cdf5dae1 Merge remote-tracking branch 'origin/develop' 2023-02-27 13:34:16 -08:00
snipe
23ca124e94 Merge pull request #12573 from snipe/fixes/ambiguous_model_clause
Added table aliases to fix ambiguous SQL clause
2023-02-27 13:33:52 -08:00
snipe
c7106a1df2 Added table aliases to fix ambiguous SQL clause
Signed-off-by: snipe <snipe@snipe.net>
2023-02-27 13:24:09 -08:00
snipe
3f4a4e72a7 Merge remote-tracking branch 'origin/develop' 2023-02-27 12:17:33 -08:00
snipe
b78aba787f Merge pull request #12572 from snipe/fixes/add_max_results_limit_to_acitivity_report
Added max results limit to report index
2023-02-27 12:16:57 -08:00
snipe
96c851468c Added max results limit to report index
Signed-off-by: snipe <snipe@snipe.net>
2023-02-27 12:04:46 -08:00
Godfrey M
e8fc895e51 "adds variables, but still not working" 2023-02-27 09:19:59 -08:00
snipe
a5ccef5e96 Merge pull request #12564 from uberbrady/upgrade_acorn
Upgrade Acorn
2023-02-26 12:12:21 -08:00
Brady Wetherington
059190f002 Upgrade Acorn 2023-02-26 11:29:10 -08:00
snipe
6428cc259f Merge remote-tracking branch 'origin/develop' 2023-02-24 10:02:43 -08:00
snipe
cb0b234b80 Merge pull request #12561 from inietov/fixes/unable_to_import_purchase_date
Fixed #12559 Unable to import Purchase Date field
2023-02-24 10:02:25 -08:00
snipe
8caf29975f Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-02-24 09:58:19 -08:00
snipe
95501bf57c Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-02-24 09:57:25 -08:00
snipe
75a73d095f Merge pull request #12560 from snipe/fixes/bulk_checkout_nulles_asset_name
Pass the existing asset name to the bulk checkout form
2023-02-24 09:56:13 -08:00
snipe
3e47d9e689 Pass the existing asset name to the bulk checkout form
Signed-off-by: snipe <snipe@snipe.net>
2023-02-24 09:54:46 -08:00
Ivan Nieto Vivanco
51efd9b413 Adjust the date format for purchase_date field 2023-02-24 10:59:31 -06:00
snipe
bd0b00e361 Merge pull request #12558 from inietov/fixes/non_numeric_value_in_license_seat
Fixed ErrorException: A non-numeric value encountered in app/Models/License [sc-20187]
2023-02-24 00:29:26 -08:00
Ivan Nieto Vivanco
6bd72125bd Deletes problematic cast 2023-02-23 22:31:41 -06:00
snipe
1415c8c6e2 Merge remote-tracking branch 'origin/develop' 2023-02-23 15:00:03 -08:00
snipe
41253b2680 Merge pull request #12556 from marcusmoore/fixes/asset-seeder
Fix purchase date field in asset seeder
2023-02-23 14:05:45 -08:00
Marcus Moore
bdac0f16ce Set purchase date field to the correct format in asset factory 2023-02-23 13:39:05 -08:00
snipe
dde2b946da Merge pull request #12555 from snipe/security/upgrade_dompdf
Update dompdf
2023-02-23 13:00:46 -08:00
snipe
0b408218b0 Update dompdf
Signed-off-by: snipe <snipe@snipe.net>
2023-02-23 12:59:04 -08:00
snipe
5e6ebb9a65 Merge pull request #12410 from uberbrady/paginate_accessories_report
Paginate accessories report
2023-02-23 12:26:17 -08:00
snipe
8e72da42e8 Merge pull request #12406 from akemidx/vip_tag
Added a checkbox to notate VIP status
2023-02-23 12:23:29 -08:00
snipe
309c0ff66f Merge remote-tracking branch 'origin/develop' 2023-02-23 11:41:36 -08:00
snipe
eb6357636a Merge pull request #12467 from marcusmoore/fix/scope-people-with-full-multiple-companies
Fix full company scoping in user selects
2023-02-23 10:36:33 -08:00
snipe
adb166fb8d Merge remote-tracking branch 'origin/develop' 2023-02-22 18:01:06 -08:00
snipe
4a9ced192b Merge pull request #12550 from marcusmoore/fixes/closing-tag-in-mail-template
Properly close tag in mail template
2023-02-22 17:59:20 -08:00
Marcus Moore
6c8de181cf Properly close tag in mail template 2023-02-22 17:52:47 -08:00
snipe
5a1e5f740d Merge pull request #12537 from inietov/fixes/expected_checkin_date_validation
Fixed #12531 Expected Checkin Date on Asset Checkout throws an error
2023-02-22 16:03:51 -08:00
akemidx
690970b4aa fixing ff error 2023-02-22 18:18:20 -05:00
Marcus Moore
f63710fb5c Remove unused import 2023-02-22 12:34:56 -08:00
Marcus Moore
7667b0a216 Remove extra line 2023-02-22 12:34:35 -08:00
Marcus Moore
931ca98c02 Remove middleware bypass 2023-02-22 12:33:55 -08:00
snipe
225b6ef310 Merge remote-tracking branch 'origin/develop' 2023-02-22 12:24:52 -08:00
snipe
13ed2a05a3 Add @AndrewSav as a contributor 2023-02-22 12:24:13 -08:00
Marcus Moore
aae2106658 Use existing language translation string 2023-02-22 12:02:14 -08:00
snipe
81cb29db5e Merge pull request #12509 from inietov/fixes/add_images_to_user_inventory_mail_report
Added images to emailed user inventory report [sc-19801]
2023-02-22 10:38:07 -08:00
snipe
05f6d0bd5e Merge pull request #11984 from nh314/Correct-assignedusers-relation
Correct assignedusers relation setting
2023-02-21 20:15:20 -08:00
snipe
4bf1566d2a Merge pull request #12124 from Godmartinz/feature/sc-16946/add-checkbox-to-allow-skipping-a-user-during
Adds Boolean to Users Table for Auto Assigning Licenses
2023-02-21 20:10:46 -08:00
snipe
0c3115553e Merge branch 'develop' into vip_tag 2023-02-21 20:03:49 -08:00
snipe
942fee4d43 Merge pull request #12447 from akemidx/user_setup_translation
FIXED: Translations on the User Creation setup page
2023-02-21 19:53:00 -08:00
snipe
ba461d0114 Merge pull request #12538 from AndrewSav/develop
Added #12532: add version endpoint
2023-02-21 19:50:07 -08:00
snipe
3ae783a9c7 Merge pull request #12525 from uberbrady/add_sodium_php_shim
Add libsodium shim, and mark the sodium extension as 'optional'
2023-02-21 19:38:14 -08:00
Ivan Nieto Vivanco
d494afcf01 Add order by clause, to ensure assets and accessories are in order in the report 2023-02-21 21:24:19 -06:00
snipe
57065b8936 Merge remote-tracking branch 'origin/develop' 2023-02-21 09:20:59 -08:00
snipe
40a38486b9 Merge pull request #12545 from snipe/localizations/more_new_translations
Two more translations
2023-02-21 09:20:38 -08:00
snipe
29158dece5 Two more translations
Signed-off-by: snipe <snipe@snipe.net>
2023-02-21 09:19:34 -08:00
snipe
f6e4e17e5c Merge remote-tracking branch 'origin/develop' 2023-02-21 09:05:50 -08:00
snipe
8185f264a4 Merge pull request #12544 from snipe/localizations/updated_general
Updated the general translation file with new strings
2023-02-21 09:05:24 -08:00
snipe
04d3938f0c Updated the general translation file with new strings
Signed-off-by: snipe <snipe@snipe.net>
2023-02-21 09:04:13 -08:00
snipe
f109218e16 Re-added dropped translations from CrowdIn
Signed-off-by: snipe <snipe@snipe.net>
2023-02-21 09:00:10 -08:00
snipe
049213c3da Merge remote-tracking branch 'origin/develop' 2023-02-21 04:02:08 -08:00
snipe
9c1a71e04a Merge pull request #12541 from snipe/localizations/new_strings
Updated translations with new strings and new translations
2023-02-21 03:58:25 -08:00
snipe
a0b05bac8d Updated translations with new strings and new translations
Signed-off-by: snipe <snipe@snipe.net>
2023-02-21 03:54:55 -08:00
Andrew Savinykh
d2ede75de8 fixes #12532 adds version endpoint 2023-02-20 22:19:18 +13:00
Ivan Nieto Vivanco
6e994c209f Adds setter to model Asset class for expected checkin 2023-02-19 12:31:10 -06:00
akemidx
f33b6a3e26 Update user.blade.php 2023-02-17 12:52:54 -05:00
akemidx
dfc2aa35f4 Update general.php 2023-02-17 12:51:58 -05:00
snipe
f71d8b2f07 Merge remote-tracking branch 'origin/develop' 2023-02-16 17:05:48 -08:00
snipe
248eb0885c Merge pull request #12533 from snipe/fixes/expected_checkin_wtf
FML - this is a hotfix and I don’t know why this is causing problems
2023-02-16 17:01:54 -08:00
snipe
754842f620 FML - this is a hotfix and I don’t know why this is causing problems
Signed-off-by: snipe <snipe@snipe.net>
2023-02-16 16:58:00 -08:00
snipe
43eacff265 Merge remote-tracking branch 'origin/develop' 2023-02-16 12:11:26 -08:00
snipe
fdffe76b9f Merge pull request #12529 from Godmartinz/bug/sc-20046/allow-user-to-submit-the-slack-livewire-form
allows users to clear their slack settings
2023-02-16 11:47:58 -08:00
Godfrey M
58801dbb0b allows users to clear their slack settings 2023-02-16 08:43:12 -08:00
snipe
e9ab90eafc Merge pull request #12422 from marcusmoore/fix/adhere-to-email-alerts-setting
Have acceptance result notifications adhere to alerts enabled setting
2023-02-15 18:46:08 -08:00
snipe
495d7e057d Merge remote-tracking branch 'origin/develop' 2023-02-15 18:37:39 -08:00
snipe
9f8ea9a243 Merge pull request #12524 from snipe/fixes/small_UI_tweaks
Cleanup some small UI bugaboos (padding, etc)
2023-02-15 18:20:08 -08:00
Brady Wetherington
3a2b54fd47 Add libsodium shim, and mark the sodium extension as 'optional'
Trying to handle some composer.lock conflicts, as savely as possible.
2023-02-15 18:16:39 -08:00
snipe
71334b5eae More tweaking for top button alignment
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 18:13:38 -08:00
snipe
f124249e1c More padding twiddles
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 18:08:11 -08:00
snipe
e451ca1a5c Stray semicolon
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 17:37:53 -08:00
snipe
3e111fca6e Cleanup some small UI bugaboos (padding, etc)
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 17:13:40 -08:00
snipe
df64e0e291 Merge pull request #12523 from Godmartinz/bug/sc-20041/slack-ui-livewire-tweaks
Fixes slack settings submit button availability
2023-02-15 16:28:57 -08:00
snipe
51c9a7d4f8 Merge pull request #12521 from akemidx/weird_checkout_text
Fixed awkward checkout text in checkedout side panel
2023-02-15 16:28:05 -08:00
akemidx
d8d713426d indent? 2023-02-15 19:24:20 -05:00
akemidx
7dd789d5c0 translate no assets at checkout 2023-02-15 19:22:13 -05:00
Godfrey M
2d8c8e8f48 removes lazy loading 2023-02-15 16:16:14 -08:00
Godfrey M
7b510d5f2b greys out submit button conditionally 2023-02-15 15:46:05 -08:00
snipe
221f5f5ca7 Merge pull request #12522 from snipe/fixes/slack_livewire_translations
Fixes slack livewire translations, UI
2023-02-15 14:45:46 -08:00
snipe
d4634e83c9 Nicer padding, removed unused ids
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 14:45:18 -08:00
snipe
6c3ffa7918 Removed unused CSS
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 14:39:24 -08:00
snipe
27e5832a28 Use existing slack translations
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 14:06:52 -08:00
snipe
2d0bd2b292 Make spinner actually spin
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 14:06:40 -08:00
akemidx
b96f2f738d fixed weird phrasing in asset checkout screen 2023-02-15 16:47:48 -05:00
snipe
ff895739f4 Merge pull request #12446 from Godmartinz/livewire_slack_inputs
Adds Livewire slack inputs
2023-02-15 13:27:07 -08:00
snipe
de4f7bd274 Merge pull request #12408 from snipe/fixes/stricter_date_rectrictions_on_validation
Enforce Y-m-d as date format for date fields
2023-02-15 12:54:22 -08:00
snipe
25461caa2c Removed date validation rule
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 12:53:55 -08:00
snipe
bfac0fc811 Merge pull request #12470 from inietov/fixes/rollbar_16883_attempt_assign_on_null
Fixed Rollbar 16883 Error: Attempt to assign property "assigned_to" on null
2023-02-15 12:33:32 -08:00
snipe
057f0be20a Merge pull request #12473 from inietov/fixes/rollbar_attempt_to_read_property_on_null
Fixed ErrorException:  Attempt to read property "id" on null [sc-19855]
2023-02-15 12:32:53 -08:00
snipe
7980e2ab2e Merge pull request #12517 from uberbrady/silence_ldap_exceptions
Silence E_WARNING "exceptions"
2023-02-15 11:56:37 -08:00
Marcus Moore
f99f6d32fa Make phpstan configuration more flexible 2023-02-15 11:33:08 -08:00
Marcus Moore
d088b39fb2 Remove ignore errors section covered by larastan config 2023-02-15 11:33:08 -08:00
Marcus Moore
6bfd2fd5ad Sort paths 2023-02-15 11:33:08 -08:00
Marcus Moore
6778cf79a0 Include Larastan configuration file 2023-02-15 11:33:08 -08:00
snipe
ac4103281c Still throwing errors, but trying to fix the docblock
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
03af417e89 We shouldn’t need this because aliases??
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
77362b3b41 Added larastan and psalm to composer dev
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
db8c29b901 Psalm and phpstan configs
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
3d219f578e The sea, Brady.
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
8c3511a00b Fixed wonky switch statement indenting
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
c1ae406049 Fixed visibility for constants and methods
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
1ef3112628 FIxed yoda operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
0325cbad64 Removed unused else condition
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
6dc89fc2b0 Use null coalescing operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
b25676c96b Fixed Implicit array creation is disallowed.
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
14e95c47e1 Made constant DATA_SESSION_KEY public
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
dc43c4f68a Removed unneeded concat
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
0e7ac5c95e Added phpinsights
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
c7f90f304d Added insights config
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
78a0b06a61 Fixed array bracket indenting
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
40f487beae Added parens
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
2992ca1fa2 Fixed yoda operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
15f9c6af67 Removed unused variable
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe
7a19da4f64 Removed unused variable
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
Ivan Nieto Vivanco
07f501408f Add migration to fix already escaped formats in the database 2023-02-15 11:33:08 -08:00
Ivan Nieto Vivanco
53e449899b Remove e() function from customfield format input 2023-02-15 11:33:08 -08:00
Godfrey M
b2f1ca95df missing things like mr magoo 2023-02-15 11:33:08 -08:00
Godfrey M
f3ab384e70 simplified to an else instead of elseif 2023-02-15 11:33:08 -08:00
Godfrey M
61bf1e91e7 adds the red x icon to a false deployable status 2023-02-15 11:33:08 -08:00
Godfrey M
1c54feea5b adds a red icon next to broken- not fixable status label 2023-02-15 11:33:08 -08:00
Marcus Moore
7423570e6b Add comment 2023-02-15 11:33:08 -08:00
Marcus Moore
b946a6066d Use name if provided by asset checkout request 2023-02-15 11:33:07 -08:00
Marcus Moore
9c25dd4eb6 Improve error message wording 2023-02-15 11:33:07 -08:00
Marcus Moore
e69fcf10b7 Use translation strings for importer exceptions 2023-02-15 11:33:07 -08:00
akemidx
937e2813e9 fixing external if statement 2023-02-15 11:33:07 -08:00
akemidx
a84081068d functionality to Apple Warranty link 2023-02-15 11:33:07 -08:00
akemidx
d9857d955b translations for the layout setup 2023-02-15 11:33:07 -08:00
akemidx
66251bfd8a sweedish chef fixes up your typos 2023-02-15 11:33:07 -08:00
akemidx
677f7a446e manufacturer marker removal 2023-02-15 11:33:07 -08:00
Marcus Moore
fdce6f98ff Return 422 instead of 500 when import is invalid 2023-02-15 11:33:07 -08:00
Marcus Moore
5a00685c81 Fix return type 2023-02-15 11:33:07 -08:00
Marcus Moore
18f0b1cc3d Formatting 2023-02-15 11:33:07 -08:00
Marcus Moore
6da43bc940 Catch json encoding exceptions and display them to the user 2023-02-15 11:33:07 -08:00
Ivan Nieto Vivanco
98187773f7 Adds translation strings to theinventory report sent to users 2023-02-15 11:33:07 -08:00
Brady Wetherington
3757c7e353 Make early-boot errors (syntax, others) be more easy-to-read 2023-02-15 11:31:13 -08:00
snipe
3800cdd0da Merge pull request #12466 from snipe/fixes/style_fixes
Style fixes
2023-02-15 11:07:59 -08:00
Brady Wetherington
a1b0eaf128 Got working E_WARNING-in-production going. YAY! 2023-02-14 20:00:06 -08:00
Marcus Moore
8b183490ba Use "testing" environment for tests 2023-02-13 18:56:22 -08:00
Marcus Moore
228c59e6ed Bring phpunit.xml closer to default 2023-02-13 18:55:50 -08:00
snipe
2dd7690d2d Merge pull request #12464 from snipe/dependabot/github_actions/docker/build-push-action-4
Bump docker/build-push-action from 3 to 4
2023-02-13 14:45:21 -08:00
Ivan Nieto Vivanco
f0bf16d784 Fix more uneven tags 2023-02-12 12:01:40 -06:00
Ivan Nieto Vivanco
9a68a747a0 Fix uneven tags 2023-02-12 11:59:56 -06:00
Ivan Nieto Vivanco
81cc9f3700 Adds images to emailed user inventory report 2023-02-12 08:23:50 -06:00
snipe
201728989f Merge pull request #12486 from svpernova09/patch-1
Don't auto assign feature requests to Snipe
2023-02-08 07:59:58 -08:00
Joe Ferguson
dea175bd40 Don't auto assign feature requests to Snipe 2023-02-08 09:57:54 -06:00
snipe
23b1e8da27 Merge remote-tracking branch 'origin/develop' 2023-02-07 18:46:30 -08:00
Marcus Moore
4f9ebf6cde Fix array key 2023-02-07 16:40:27 -08:00
Marcus Moore
787f619a6b Standardize test method syntax 2023-02-07 16:28:40 -08:00
Marcus Moore
505ca48da2 Remove test method without assertions 2023-02-07 16:17:36 -08:00
Marcus Moore
6b8c0f9e88 Make BaseTest abstract 2023-02-07 16:17:16 -08:00
Marcus Moore
3fdf4dea1b Use factories for relationships in asset factory 2023-02-07 16:17:05 -08:00
Marcus Moore
6dbcec2310 Exclude Dusk tests from phpunit test suite 2023-02-07 16:16:39 -08:00
snipe
4f9587da57 Merge remote-tracking branch 'origin/develop' 2023-02-07 13:34:57 -08:00
Marcus Moore
321a34a9d3 Make phpstan configuration more flexible 2023-02-07 13:32:32 -08:00
Marcus Moore
fd524c5f14 Remove ignore errors section covered by larastan config 2023-02-07 12:48:41 -08:00
Marcus Moore
e4cf59c034 Sort paths 2023-02-07 12:46:13 -08:00
Marcus Moore
efac2259db Include Larastan configuration file 2023-02-07 12:25:13 -08:00
snipe
ea644f8d47 Still throwing errors, but trying to fix the docblock
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 11:02:20 -08:00
snipe
dd5f256450 We shouldn’t need this because aliases??
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 11:02:02 -08:00
snipe
f4617d8d5b Added larastan and psalm to composer dev
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 11:01:21 -08:00
snipe
32be88d796 Psalm and phpstan configs
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 11:00:59 -08:00
snipe
219d92dcfb The sea, Brady.
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 11:00:30 -08:00
Ivan Nieto Vivanco
d4c838a979 Add condition in activity report to only access assigned item id if it exist 2023-02-07 11:26:49 -06:00
Ivan Nieto Vivanco
ddabe7cc9f Added Guard Clause to License Importer to return if no empty seat is found 2023-02-07 01:36:55 -06:00
Marcus Moore
c03079944a Be more explicit in test case 2023-02-06 16:06:13 -08:00
snipe
cd5546e4a1 Fixed wonky switch statement indenting
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:44:17 -08:00
snipe
d52d32fed9 Fixed visibility for constants and methods
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:44:02 -08:00
snipe
7363d4e223 FIxed yoda operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:43:35 -08:00
snipe
c8c5dddcc1 Removed unused else condition
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:43:19 -08:00
snipe
1651dbb68d Use null coalescing operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:43:00 -08:00
snipe
d95adcae37 Fixed Implicit array creation is disallowed.
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:41:54 -08:00
snipe
8a8575bf2d Made constant DATA_SESSION_KEY public
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:40:32 -08:00
snipe
590cb6a15b Removed unneeded concat
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:40:09 -08:00
snipe
aeb8dfb07d Added phpinsights
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:39:55 -08:00
snipe
a60510c063 Added insights config
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:39:48 -08:00
snipe
8841f04333 Fixed array bracket indenting
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:39:38 -08:00
snipe
ab6ca0e066 Added parens
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:39:22 -08:00
snipe
ec2afee57d Fixed yoda operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:39:12 -08:00
snipe
b10ea0c25c Removed unused variable
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:38:56 -08:00
snipe
686d1aaae7 Removed unused variable
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:38:29 -08:00
Marcus Moore
0e57e4836e Add translation for Company 2023-02-06 12:21:23 -08:00
Marcus Moore
45e8e9bbed Move company name to better location 2023-02-06 12:21:09 -08:00
Marcus Moore
38cdcdf064 Eager load company 2023-02-06 10:59:51 -08:00
Marcus Moore
78343ddb7c Add asset's company name to checkout page 2023-02-06 10:58:10 -08:00
Godfrey M
74c64c1fc5 adds validation to the update hook, removes typos and deadlines 2023-02-06 09:40:57 -08:00
dependabot[bot]
ea0f505db7 Bump docker/build-push-action from 3 to 4
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 08:07:13 +00:00
snipe
b37c4553ef Merge remote-tracking branch 'origin/develop' 2023-02-02 23:41:05 -08:00
Marcus Moore
0cefc7de15 Skip security headers middleware when testing 2023-02-02 18:37:35 -08:00
Marcus Moore
9a0c66bd30 Clear some extra lines 2023-02-02 18:30:18 -08:00
Marcus Moore
d8e92d29c0 Improve readability 2023-02-02 18:25:54 -08:00
Marcus Moore
93a62c87c2 Implement test for searching users 2023-02-02 17:57:24 -08:00
Marcus Moore
89eff23e44 Continue implementing tests 2023-02-02 17:41:32 -08:00
snipe
41b0756286 Merge remote-tracking branch 'origin/develop' 2023-02-02 15:35:41 -08:00
Marcus Moore
a2e47d19fc Scaffold tests for user select list api and begin to implemenet 2023-02-02 13:47:00 -08:00
akemidx
b8951e2b54 fixing name from vipuser to vip 2023-02-02 15:58:05 -05:00
akemidx
29851c626f Merge branch 'develop' into user_setup_translation 2023-02-02 14:34:09 -05:00
snipe
1f60afa8e3 Merge remote-tracking branch 'origin/develop' 2023-02-02 11:28:41 -08:00
snipe
782abe1cf3 Merge remote-tracking branch 'origin/develop' 2023-02-02 11:09:18 -08:00
akemidx
69c38bf686 translations on the User Creation page 2023-02-01 20:32:16 -05:00
Brady Wetherington
039d159cbd WIP: working on better Rollbar filtering in prod 2023-02-01 17:15:22 -08:00
Godfrey M
17f1772143 removes postslack from settings controller 2023-02-01 16:58:08 -08:00
Godfrey M
3a86547ef5 fixes messages for integration test, removes slack request file, rehouses ajax method 2023-02-01 16:51:05 -08:00
snipe
4bc804e876 Merge remote-tracking branch 'origin/develop' 2023-02-01 16:50:19 -08:00
snipe
c706759b5c Merge remote-tracking branch 'origin/develop' 2023-02-01 16:42:11 -08:00
snipe
d9cdb92014 Merge branch 'develop' into vip_tag 2023-02-01 16:03:23 -08:00
Godfrey M
f95a904d90 adds integration button, working on its functionality 2023-02-01 12:08:13 -08:00
Marcus Moore
a45ce468cc Update return type for routing mail notifications 2023-02-01 11:44:56 -08:00
Marcus Moore
3580bdae86 Use object accessor instead of array accessor 2023-02-01 11:44:35 -08:00
cram42
0f3c5d10ba Merge branch 'feature-label2' into develop 2023-02-01 18:01:46 +11:00
cram42
73fd0a24ca Clarify example asset variable 2023-02-01 17:58:58 +11:00
cram42
4b4c228f1a Correct parameter order 2023-02-01 17:56:23 +11:00
cram42
b72c6b7afc Fix 2D barcode defaults 2023-02-01 17:48:39 +11:00
snipe
6fbd20a11b Merge remote-tracking branch 'origin/develop' 2023-01-31 19:50:18 -08:00
Godfrey M
1e0c58c3cf saves data correctly now 2023-01-31 11:32:05 -08:00
Godfrey M
fc044528b8 validation is working, success message appears, database is not updating 2023-01-30 16:10:02 -08:00
Godfrey M
a63ea560ae adds submit button, getting setAttribute error 2023-01-26 15:17:08 -08:00
Marcus Moore
39289dd18e Use user provided alert email for checkout acceptances 2023-01-26 13:18:18 -08:00
snipe
8b94b208e3 Merge remote-tracking branch 'origin/develop' 2023-01-26 13:17:28 -08:00
Marcus Moore
6fc8982478 Have acceptance result notifications adhere to alerts enabled setting 2023-01-26 12:59:33 -08:00
akemidx
df31a76906 fixed apostraphe 2023-01-26 15:02:39 -05:00
Brady Wetherington
4a54586690 Add to Accessories#index an additional gate-check against reports.view 2023-01-26 11:56:06 -08:00
Godfrey M
62b4c79150 adds a couple error messages 2023-01-25 16:38:08 -08:00
Godfrey M
a69cb6204a adds rest of inputs, and corrects Data binding 2023-01-25 16:22:34 -08:00
Godfrey M
2e22eeade5 adds one input 2023-01-25 14:29:20 -08:00
akemidx
53d8008a5f Merge branch 'vip_tag' of github.com:akemidx/snipe-it into vip_tag 2023-01-25 17:14:29 -05:00
akemidx
b363524305 vipuser label updated to vip 2023-01-25 15:58:44 -05:00
snipe
4c3354b778 Merge branch 'develop' into vip_tag 2023-01-24 20:29:43 -08:00
snipe
e7917d1f93 Rebuild prod assets
Signed-off-by: snipe <snipe@snipe.net>
2023-01-24 19:16:03 -08:00
snipe
be6f367565 Merge remote-tracking branch 'origin/develop' 2023-01-24 19:12:50 -08:00
snipe
9c79fc19cb Tightened up and removed some validation that wasn’t needed
Signed-off-by: snipe <snipe@snipe.net>
2023-01-24 17:37:15 -08:00
snipe
fd2a057d38 Make audit dates fillable
Signed-off-by: snipe <snipe@snipe.net>
2023-01-24 17:36:58 -08:00
Brady Wetherington
b00333c9f5 Merge remote-tracking branch 'upstream/develop' into develop 2023-01-24 17:36:39 -08:00
Brady Wetherington
c9f0f5fe8b Change Accessories report to use server-side pagination from URL 2023-01-24 17:35:44 -08:00
snipe
a61ccbb965 Added very clunky but better error messages on that validation for date_format
Signed-off-by: snipe <snipe@snipe.net>
2023-01-24 17:33:49 -08:00
snipe
91394f7262 Removed duplicate comment section
Signed-off-by: snipe <snipe@snipe.net>
2023-01-24 17:23:06 -08:00
snipe
3c4f254583 Enforce Y-m-d as date format for date fields
Signed-off-by: snipe <snipe@snipe.net>
2023-01-24 13:38:53 -08:00
Marcus Moore
b92d1d3ec7 Logically group query when searching users to scope to company 2023-01-24 11:54:56 -08:00
Godfrey M
0f8ee22053 Creates Slack Setting Form 2023-01-24 09:25:05 -08:00
snipe
86812b024d Merge remote-tracking branch 'origin/develop' 2023-01-23 22:03:12 -08:00
cram42
c2c009a018 Merge branch 'develop' into develop 2023-01-24 09:53:42 +08:00
snipe
4c7b731acc Merge remote-tracking branch 'origin/develop' 2023-01-23 15:36:05 -08:00
snipe
41537a2449 Added field to the API controller endpoints
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:56:44 -08:00
snipe
5f9af7d509 Updated API response
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:56:28 -08:00
snipe
febfcd4803 Updated model with new field
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:56:19 -08:00
snipe
cad76f671a Added asset_eol_date to blade
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:55:42 -08:00
snipe
4104d7260f Include new eol date picker blade
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:55:31 -08:00
snipe
3587017591 Updated EOL date in view blade
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:55:19 -08:00
snipe
8040d08e8c Removed formatter from EOL date
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:54:37 -08:00
snipe
2f7ca37666 Migration to normalize eol date for assets
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:54:24 -08:00
snipe
abad579306 Added eol date picker
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:45:33 -08:00
snipe
2564da648b Merge remote-tracking branch 'origin/develop' 2023-01-19 16:22:09 -08:00
snipe
d020ab455d Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-01-19 15:56:53 -08:00
snipe
05a3f20d51 Updated production assets
Signed-off-by: snipe <snipe@snipe.net>
2023-01-19 15:55:59 -08:00
Godfrey M
7ce230fadc missed a few renames 2023-01-18 08:57:59 -08:00
Godfrey M
6fbb484dfd renames db column for auto_assign boolean, rewords trans string, default value of 1 now 2023-01-18 08:43:03 -08:00
Godfrey M
8a0517fb5d removes data dump 2022-11-15 15:59:47 -08:00
Godfrey M
90828e3a87 fixes variable name 2022-11-15 15:51:52 -08:00
Godfrey M
45636b8114 adds should_autoassign boolean to users table 2022-11-15 15:42:57 -08:00
Cram42
17e81af4cd Add more Avery label sheets 2022-11-12 20:29:50 +08:00
Cram42
ffce6ec327 Need uppercase 2022-11-12 20:29:34 +08:00
Cram42
60ef5686ab Add "Pop Out" button for preview 2022-11-12 19:02:38 +08:00
Cram42
af0872dc23 Fix form refresh after bootstrap-table 2022-11-11 14:23:38 +08:00
Cram42
30a7a31724 Move label preview to alpine component 2022-11-11 14:23:02 +08:00
Cram42
67d021e457 Add alpinejs to deferred scripts 2022-11-11 11:25:41 +08:00
Cram42
7108156072 Fix button disabling 2022-11-10 19:24:02 +08:00
Cram42
a4b93d4bbd Create Field Definitions helper control 2022-11-10 19:20:18 +08:00
Cram42
f849fcca89 Change the way fields are passed 2022-11-10 18:54:02 +08:00
Cram42
fd9616683c Label preview auto-refresh 2022-11-03 10:20:12 +08:00
Cram42
3d470d6f2f Drop asset tag from default field def. 2022-11-02 22:39:08 +08:00
Cram42
53513d93fa Rework TZe labels for Asset Tag support 2022-11-02 22:38:00 +08:00
Cram42
f5fac50e91 Add preview pane 2022-11-02 19:31:34 +08:00
Cram42
36210f1c6a Allow settings to be overridden in request 2022-11-02 19:30:45 +08:00
Cram42
48fb4f2439 Add labels route for testing layouts 2022-11-02 17:23:52 +08:00
Cram42
fb467d9078 Include Asset for advanced users 2022-11-02 17:20:01 +08:00
Cram42
4fee5ece43 Support Avery L7163 2022-11-02 16:08:10 +08:00
Cram42
4bb40adfce Add Asset Tag as separate supported feature 2022-11-02 16:07:50 +08:00
Cram42
06ce40ac08 Don't add data if it's not there 2022-11-02 16:05:52 +08:00
Cram42
a8b6a4a259 Allow passing "template" param 2022-11-02 16:04:40 +08:00
Cram42
a60ee7736b Add P-touch TZe 12mm Tape Example 2022-11-02 12:22:55 +08:00
Cram42
d0eb3cfc9b Merge branch 'feature-label2' into develop 2022-11-02 10:09:46 +08:00
Cram42
19150aeb44 Add P-touch TZe 24mm Tape Example 2022-11-02 10:09:11 +08:00
Cram42
cde2ba7720 Fix: Oops 2022-11-02 09:51:02 +08:00
Cram42
6b2fe582ca Merge branch 'feature-label2' into develop 2022-11-01 20:12:28 +08:00
cram42
7e2546b31f Merge branch 'snipe:develop' into develop 2022-11-01 20:04:59 +08:00
Cram42
7b29ddd283 Tie into tag generation 2022-11-01 20:02:12 +08:00
Cram42
d37605ff18 Add localization strings 2022-11-01 20:01:18 +08:00
Cram42
6de48b4dc8 Implement settings for labels 2022-11-01 20:00:53 +08:00
Cram42
5558a005b9 Implement API for labels 2022-11-01 19:57:51 +08:00
Cram42
bb09f0168f Create Label View/Generator 2022-11-01 19:56:53 +08:00
Cram42
4ed728d954 Add template to simulate legacy label 2022-11-01 19:54:00 +08:00
Cram42
bbecdb6768 Add QR example 2022-11-01 19:53:11 +08:00
Cram42
df89406987 Create Label model and example 2022-11-01 19:52:34 +08:00
Cram42
7c355cef2d Add helper to convert between units of measurement 2022-11-01 19:49:57 +08:00
Cram42
35536b5dbd Require tecnickcom/tcpdf 2022-11-01 19:47:59 +08:00
Cram42
0e69e4248c Fix: Multiple outputs at hardware/{id}/label 2022-10-27 08:12:42 +08:00
Phan Nguyen
e457b2e98d Correct assignedusers relation setting 2022-10-17 13:10:09 +07:00
Nathan Butler
0617480f73 Asset checkinbytag now consistent with existingAPI
This is a non-breaking change to the checkinbytag endpoint to bring it
inline with the usage/formatting of the other bytag endpoints that
currently exist - using the URL path to define the asset_tag instead of
passing it through as a url query.

Both methods will work, but the URL Path method will take precidence if
it is used (the query will be ignored if included)
2022-06-30 09:23:52 +10:00
3100 changed files with 55476 additions and 308727 deletions

View File

@@ -2837,6 +2837,139 @@
"contributions": [
"code"
]
},
{
"login": "AndrewSav",
"name": "Andrew Savinykh",
"avatar_url": "https://avatars.githubusercontent.com/u/658865?v=4",
"profile": "https://github.com/AndrewSav",
"contributions": [
"code"
]
},
{
"login": "kenchan0130",
"name": "Tadayuki Onishi",
"avatar_url": "https://avatars.githubusercontent.com/u/1155067?v=4",
"profile": "https://kenchan0130.github.io",
"contributions": [
"code"
]
},
{
"login": "floschoepfer",
"name": "Florian",
"avatar_url": "https://avatars.githubusercontent.com/u/112496896?v=4",
"profile": "https://github.com/floschoepfer",
"contributions": [
"code"
]
},
{
"login": "spencerrlongg",
"name": "Spencer Long",
"avatar_url": "https://avatars.githubusercontent.com/u/7305753?v=4",
"profile": "http://spencerlong.com",
"contributions": [
"code"
]
},
{
"login": "marcusmoore",
"name": "Marcus Moore",
"avatar_url": "https://avatars.githubusercontent.com/u/1141514?v=4",
"profile": "https://github.com/marcusmoore",
"contributions": [
"code"
]
},
{
"login": "Mezzle",
"name": "Martin Meredith",
"avatar_url": "https://avatars.githubusercontent.com/u/570639?v=4",
"profile": "https://github.com/Mezzle",
"contributions": []
},
{
"login": "dboth",
"name": "dboth",
"avatar_url": "https://avatars.githubusercontent.com/u/5731963?v=4",
"profile": "http://dboth.de",
"contributions": [
"code"
]
},
{
"login": "zacharyfleck",
"name": "Zachary Fleck",
"avatar_url": "https://avatars.githubusercontent.com/u/87536651?v=4",
"profile": "https://github.com/zacharyfleck",
"contributions": [
"code"
]
},
{
"login": "vikaas-cyper",
"name": "VIKAAS-A",
"avatar_url": "https://avatars.githubusercontent.com/u/74609912?v=4",
"profile": "https://github.com/vikaas-cyper",
"contributions": [
"code"
]
},
{
"login": "ak-piracha",
"name": "Abdul Kareem",
"avatar_url": "https://avatars.githubusercontent.com/u/88882041?v=4",
"profile": "https://github.com/ak-piracha",
"contributions": [
"code"
]
},
{
"login": "NojoudAlshehri",
"name": "NojoudAlshehri",
"avatar_url": "https://avatars.githubusercontent.com/u/111287779?v=4",
"profile": "https://github.com/NojoudAlshehri",
"contributions": [
"code"
]
},
{
"login": "stefanstidlffg",
"name": "Stefan Stidl",
"avatar_url": "https://avatars.githubusercontent.com/u/54367449?v=4",
"profile": "https://github.com/stefanstidlffg",
"contributions": [
"code"
]
},
{
"login": "qay21",
"name": "Quentin Aymard",
"avatar_url": "https://avatars.githubusercontent.com/u/87803479?v=4",
"profile": "https://github.com/qay21",
"contributions": [
"code"
]
},
{
"login": "cram42",
"name": "Grant Le Roux",
"avatar_url": "https://avatars.githubusercontent.com/u/5396871?v=4",
"profile": "https://github.com/cram42",
"contributions": [
"code"
]
},
{
"login": "Singrity",
"name": "Bogdan",
"avatar_url": "https://avatars.githubusercontent.com/u/58479551?v=4",
"profile": "http://@singrity",
"contributions": [
"code"
]
}
]
}

View File

@@ -85,6 +85,7 @@ COOKIE_NAME=snipeit_session
COOKIE_DOMAIN=null
SECURE_COOKIES=false
API_TOKEN_EXPIRATION_YEARS=15
BS_TABLE_STORAGE=cookieStorage
# --------------------------------------------
# OPTIONAL: SECURITY HEADER SETTINGS
@@ -148,6 +149,7 @@ AWS_DEFAULT_REGION=null
# --------------------------------------------
LOGIN_MAX_ATTEMPTS=5
LOGIN_LOCKOUT_DURATION=60
LOGIN_AUTOCOMPLETE=false
# --------------------------------------------
# OPTIONAL: FORGOTTEN PASSWORD SETTINGS
@@ -175,6 +177,15 @@ REQUIRE_SAML=false
API_THROTTLE_PER_MINUTE=120
CSV_ESCAPE_FORMULAS=true
# --------------------------------------------
# OPTIONAL: HASHING
# --------------------------------------------
HASHING_DRIVER='bcrypt'
BCRYPT_ROUNDS=10
ARGON_MEMORY=1024
ARGON_THREADS=2
ARGON_TIME=2
# --------------------------------------------
# OPTIONAL: SCIM
# --------------------------------------------

View File

@@ -1,75 +0,0 @@
# --------------------------------------------
# REQUIRED: BASIC APP SETTINGS
# --------------------------------------------
APP_ENV=testing
APP_DEBUG=true
APP_KEY=base64:glJpcM7BYwWiBggp3SQ/+NlRkqsBQMaGEOjemXqJzOU=
APP_URL=http://localhost:8000
APP_TIMEZONE='US/Pacific'
APP_LOCALE=en
FILESYSTEM_DISK=local
# --------------------------------------------
# REQUIRED: DATABASE SETTINGS
# --------------------------------------------
DB_CONNECTION=sqlite_testing
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=testing.sqlite
DB_USERNAME=null
DB_PASSWORD=null
# --------------------------------------------
# REQUIRED: OUTGOING MAIL SERVER SETTINGS
# --------------------------------------------
MAIL_DRIVER=log
MAIL_HOST=email-smtp.us-west-2.amazonaws.com
MAIL_PORT=587
MAIL_USERNAME=YOURUSERNAME
MAIL_PASSWORD=YOURPASSWORD
MAIL_ENCRYPTION=null
MAIL_FROM_ADDR=you@example.com
MAIL_FROM_NAME=Snipe-IT
# --------------------------------------------
# REQUIRED: IMAGE LIBRARY
# This should be gd or imagick
# --------------------------------------------
IMAGE_LIB=gd
# --------------------------------------------
# OPTIONAL: AWS SETTINGS
# --------------------------------------------
AWS_SECRET_ACCESS_KEY=null
AWS_ACCESS_KEY_ID=null
AWS_DEFAULT_REGION=null
AWS_BUCKET=null
AWS_BUCKET_ROOT=null
AWS_URL=null
# --------------------------------------------
# OPTIONAL: CACHE SETTINGS
# --------------------------------------------
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
# --------------------------------------------
# OPTIONAL: SESSION SETTINGS
# --------------------------------------------
SESSION_LIFETIME=12000
EXPIRE_ON_CLOSE=false
ENCRYPT=false
COOKIE_NAME=snipeittest_session
COOKIE_DOMAIN=null
SECURE_COOKIES=false
# --------------------------------------------
# OPTIONAL: APP LOG FORMAT
# --------------------------------------------
LOG_CHANNEL=single
LOG_LEVEL=debug

19
.env.testing.example Normal file
View File

@@ -0,0 +1,19 @@
# --------------------------------------------
# REQUIRED: BASIC APP SETTINGS
# --------------------------------------------
APP_ENV=testing
APP_DEBUG=true
APP_KEY=base64:glJpcM7BYwWiBggp3SQ/+NlRkqsBQMaGEOjemXqJzOU=
APP_URL=http://localhost:8000
APP_TIMEZONE='UTC'
APP_LOCALE=en
# --------------------------------------------
# REQUIRED: DATABASE SETTINGS
# --------------------------------------------
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=null
DB_USERNAME=null
DB_PASSWORD=null

View File

@@ -2,8 +2,6 @@ name: Feature Request
description: Suggest an idea for this project
title: "[Feature Request]: "
labels: ["feature request"]
assignees:
- snipe
body:
- type: textarea
attributes:

View File

@@ -1,18 +1,22 @@
frontend: ["*.js", "*.css", "*.vue", "*.scss", "*.less", "*.blade.*", "*livewire*"]
frontend: ["*.js", "*.css", "*.vue", "*.scss", "*.less", "*.blade.*", "resources/views/livewire/*"]
skins: ["*.js", "*.css", "*.scss", "*.less"]
css: ["*.css","*.scss", "*.less"]
backend: ["/app/*", "*.php"]
javascript: ["*.js", "package.json", "package.lock"]
backend: ["/app/*", "composer.json", "composer.lock"]
translations: ["/resources/lang"]
livewire: ["/app/Http/Livewire/*", "resources/views/livewire/*"]
backups: ["*backup*"]
restore: ["*restore*"]
saml: ["*saml*"]
scim: ["*scim*"]
custom fields: ["*fields*", "*fieldsets*"]
dependencies: ["composer.json"]
dependencies: ["composer.json", "composer.lock", "package.json", "package.lock"]
consumables: ["*consumables*"]
api: ["/app/Http/Controllers/api/*"]
api: ["/app/Http/Controllers/Api/*"]
notifications: ["/app/Notifications/*"]
importer: ["/app/Importer/*"]
importer: ["/app/Importer/*","/app/Http/Livewire/Importer.php", "resources/views/livewire/importer.php"]
cli / artisan: ["/app/Console/*"]
LDAP: ["*LDAP*", "/app/Console/Commands/Ldap*","/app/Models/Ldap.php"]
LDAP: ["*Ldap*", "/app/Console/Commands/Ldap*","/app/Models/Ldap.php"]
docker: ["*docker/*", "Dockerfile", "Dockerfile.alpine", "Dockerfile.fpm-alpine", ".dockerignore", ".env.docker"]
tests: ["/tests/*", "/database/factories/*", "/stubs"]
config: .github

View File

@@ -2,5 +2,6 @@ version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "develop"
schedule:
interval: "weekly"

View File

@@ -26,7 +26,7 @@ jobs:
language: [ 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3.3.0
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

View File

@@ -32,11 +32,11 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v3.3.0
uses: actions/checkout@v4
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@v4.2.0
uses: codacy/codacy-analysis-cli-action@v4.3.0
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations

21
.github/workflows/crowdin-upload.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: Crowdin Action
on:
push:
branches: [ develop ]
jobs:
upload-sources-to-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Crowdin push
uses: crowdin/github-action@v1
with:
upload_sources: true
upload_translations: false
download_translations: false
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

View File

@@ -32,6 +32,7 @@ jobs:
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }},suffix=-alpine
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }},suffix=-alpine
type=ref,event=tag,suffix=-alpine
type=semver,pattern=v{{major}}-latest-alpine
# Define default tag "flavor" for docker/metadata-action per
# https://github.com/docker/metadata-action#flavor-input
# We turn off 'latest' tag by default.
@@ -41,17 +42,17 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v3.3.0
uses: actions/checkout@v4
# https://github.com/docker/setup-buildx-action
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
# https://github.com/docker/login-action
- name: Login to DockerHub
# Only login if not a PR, as PRs only trigger a Docker build and not a push
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
@@ -63,7 +64,7 @@ jobs:
# Get Metadata for docker_build step below
- name: Sync metadata (tags, labels) from GitHub to Docker for 'snipe-it' image
id: meta_build
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: snipe/snipe-it
tags: ${{ env.IMAGE_TAGS }}
@@ -72,11 +73,11 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push 'snipe-it' image
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.alpine
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}

View File

@@ -32,6 +32,7 @@ jobs:
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=tag
type=semver,pattern=v{{major}}-latest
# Define default tag "flavor" for docker/metadata-action per
# https://github.com/docker/metadata-action#flavor-input
# We turn off 'latest' tag by default.
@@ -41,17 +42,17 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v3.3.0
uses: actions/checkout@v4
# https://github.com/docker/setup-buildx-action
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
# https://github.com/docker/login-action
- name: Login to DockerHub
# Only login if not a PR, as PRs only trigger a Docker build and not a push
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
@@ -63,7 +64,7 @@ jobs:
# Get Metadata for docker_build step below
- name: Sync metadata (tags, labels) from GitHub to Docker for 'snipe-it' image
id: meta_build
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: snipe/snipe-it
tags: ${{ env.IMAGE_TAGS }}
@@ -72,11 +73,11 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push 'snipe-it' image
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}

73
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,73 @@
name: Tests
on:
push:
branches:
- master
- develop
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: snipeit
ports:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1.1"
name: PHP ${{ matrix.php-version }}
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
- uses: actions/checkout@v4
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Copy .env
run: |
cp -v .env.testing.example .env
cp -v .env.testing.example .env.testing
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: mysql
DB_DATABASE: snipeit
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_USERNAME: root
run: php artisan test --parallel

4
.gitignore vendored
View File

@@ -1,8 +1,8 @@
.couscous
.DS_Store
.env
.env.dusk.*
!.env.dusk.example
.env.testing
phpstan.neon
.idea
/bin/
/bootstrap/compiled.php

View File

@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
LABEL maintainer="Brady Wetherington <bwetherington@grokability.com>"
# No need to add `apt-get clean` here, reference:
@@ -14,16 +14,16 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
apt-utils \
apache2 \
apache2-bin \
libapache2-mod-php7.4 \
php7.4-curl \
php7.4-ldap \
php7.4-mysql \
php7.4-gd \
php7.4-xml \
php7.4-mbstring \
php7.4-zip \
php7.4-bcmath \
php7.4-redis \
libapache2-mod-php8.1 \
php8.1-curl \
php8.1-ldap \
php8.1-mysql \
php8.1-gd \
php8.1-xml \
php8.1-mbstring \
php8.1-zip \
php8.1-bcmath \
php8.1-redis \
php-memcached \
patch \
curl \
@@ -38,9 +38,10 @@ gcc \
make \
autoconf \
libc-dev \
libldap-common \
pkg-config \
libmcrypt-dev \
php7.4-dev \
php8.1-dev \
ca-certificates \
unzip \
dnsutils \
@@ -50,16 +51,16 @@ dnsutils \
RUN curl -L -O https://github.com/pear/pearweb_phars/raw/master/go-pear.phar
RUN php go-pear.phar
RUN pecl install mcrypt-1.0.3
RUN pecl install mcrypt
RUN bash -c "echo extension=/usr/lib/php/20190902/mcrypt.so > /etc/php/7.4/mods-available/mcrypt.ini"
RUN bash -c "echo extension=/usr/lib/php/20210902/mcrypt.so > /etc/php/8.1/mods-available/mcrypt.ini"
RUN phpenmod mcrypt
RUN phpenmod gd
RUN phpenmod bcmath
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.4/apache2/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.4/cli/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/8.1/apache2/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/8.1/cli/php.ini
RUN useradd -m --uid 1000 --gid 50 docker

View File

@@ -1,34 +1,34 @@
FROM alpine:3.14.2
FROM alpine:3.17.3
# Apache + PHP
RUN apk add --no-cache \
apache2 \
php7 \
php7-common \
php7-apache2 \
php7-curl \
php7-ldap \
php7-mysqli \
php7-gd \
php7-xml \
php7-mbstring \
php7-zip \
php7-ctype \
php7-tokenizer \
php7-pdo_mysql \
php7-openssl \
php7-bcmath \
php7-phar \
php7-json \
php7-iconv \
php7-fileinfo \
php7-simplexml \
php7-session \
php7-dom \
php7-xmlwriter \
php7-xmlreader \
php7-sodium \
php7-redis \
php7-pecl-memcached \
php81 \
php81-common \
php81-apache2 \
php81-curl \
php81-ldap \
php81-mysqli \
php81-gd \
php81-xml \
php81-mbstring \
php81-zip \
php81-ctype \
php81-tokenizer \
php81-pdo_mysql \
php81-openssl \
php81-bcmath \
php81-phar \
php81-json \
php81-iconv \
php81-fileinfo \
php81-simplexml \
php81-session \
php81-dom \
php81-xmlwriter \
php81-xmlreader \
php81-sodium \
php81-redis \
php81-pecl-memcached \
curl \
wget \
vim \
@@ -41,7 +41,7 @@ COPY docker/column-statistics.cnf /etc/mysql/conf.d/column-statistics.cnf
# Where apache's PID lives
RUN mkdir -p /run/apache2 && chown apache:apache /run/apache2
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php7/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php81/php.ini
COPY docker/000-default-2.4.conf /etc/apache2/conf.d/default.conf
# Enable mod_rewrite

View File

@@ -1,8 +1,8 @@
ARG ENVIRONMENT=production
ARG SNIPEIT_RELEASE=5.1.3
ARG PHP_VERSION=7.4.16
ARG PHP_ALPINE_VERSION=3.13
ARG COMPOSER_VERSION=2.0.11
ARG SNIPEIT_RELEASE=6.1.0
ARG PHP_VERSION=8.2
ARG PHP_ALPINE_VERSION=3.17
ARG COMPOSER_VERSION=2
# Cannot use arguments with 'COPY --from' workaround
# https://github.com/moby/moby/issues/34482#issuecomment-454716952
@@ -52,7 +52,7 @@ RUN { \
# Install php extensions inside docker containers easily
# https://github.com/mlocati/docker-php-extension-installer
COPY --from=mlocati/php-extension-installer:1.2.19 /usr/bin/install-php-extensions /usr/local/bin/
COPY --from=mlocati/php-extension-installer:2.1.15 /usr/bin/install-php-extensions /usr/local/bin/
RUN set -eux; \
install-php-extensions \
bcmath \

View File

@@ -1,5 +1,5 @@
![Build Status](https://app.chipperci.com/projects/0e5f8979-31eb-4ee6-9abf-050b76ab0383/status/master) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.svg)](https://crowdin.com/project/snipe-it) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Twitter Follow](https://img.shields.io/twitter/follow/snipeitapp.svg?style=social)](https://twitter.com/snipeitapp) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=snipe/snipe-it&amp;utm_campaign=Badge_Grade)
[![All Contributors](https://img.shields.io/badge/all_contributors-312-orange.svg?style=flat-square)](#contributors) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/yZFtShAcKk) [![huntr](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.svg)](https://crowdin.com/project/snipe-it) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Twitter Follow](https://img.shields.io/twitter/follow/snipeitapp.svg?style=social)](https://twitter.com/snipeitapp) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=snipe/snipe-it&amp;utm_campaign=Badge_Grade)
[![All Contributors](https://img.shields.io/badge/all_contributors-327-orange.svg?style=flat-square)](#contributors) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/yZFtShAcKk) [![huntr](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev)
## Snipe-IT - Open Source Asset Management System
@@ -66,8 +66,11 @@ Since the release of the JSON REST API, several third-party developers have been
- [Python 3 CSV importer](https://github.com/gastamper/snipeit-csvimporter) - allows importing assets into Snipe-IT based on Item Name rather than Asset Tag.
- [Snipe-IT Kubernetes Helm Chart](https://github.com/t3n/helm-charts/tree/master/snipeit) - For more information, [click here](https://hub.helm.sh/charts/t3n/snipeit).
- [Snipe-IT Bulk Edit](https://github.com/bricelabelle/snipe-it-bulkedit) - Google Script files to use Google Sheets as a bulk checkout/checkin/edit tool for Snipe-it.
- [MosyleSnipeSync](https://github.com/RodneyLeeBrands/MosyleSnipeSync) by [@RodneyLeeBrands](https://github.com/RodneyLeeBrands) - Python script to synchronize information between Mosyle and Snipe-IT
- [MosyleSnipeSync](https://github.com/RodneyLeeBrands/MosyleSnipeSync) by [@Karpadiem](https://github.com/Karpadiem) - Python script to synchronize information between Mosyle and Snipe-IT
- [WWW::SnipeIT](https://github.com/SEDC/perl-www-snipeit) by [@SEDC](https://github.com/SEDC) - perl module for accessing the API
- [UniFi to Snipe-IT](https://github.com/RodneyLeeBrands/UnifiSnipeSync) by [@karpadiem](https://github.com/karpadiem) - Python script that synchronizes UniFi devices with Snipe-IT.
- [Kandji2Snipe](https://github.com/grokability/kandji2snipe) by [@briangoldstein](https://github.com/briangoldstein) - Python script that synchronizes Kandji with Snipe-IT.
- [SnipeAgent](https://github.com/ReticentRobot/SnipeAgent) by @ReticentRobot - Windows agent for Snipe-IT
As these were created by third-parties, Snipe-IT cannot provide support for these project, and you should contact the developers directly if you need assistance. Additionally, Snipe-IT makes no guarantees as to the reliability, accuracy or maintainability of these libraries. Use at your own risk. :)
@@ -140,7 +143,9 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [<img src="https://avatars.githubusercontent.com/u/97299851?v=4" width="110px;"/><br /><sub>Christian Weirich</sub>](https://github.com/chrisweirich)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chrisweirich "Code") | [<img src="https://avatars.githubusercontent.com/u/1294403?v=4" width="110px;"/><br /><sub>denzfarid</sub>](https://github.com/denzfarid)<br /> | [<img src="https://avatars.githubusercontent.com/u/94018771?v=4" width="110px;"/><br /><sub>ntbutler-nbcs</sub>](https://github.com/ntbutler-nbcs)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ntbutler-nbcs "Code") | [<img src="https://avatars.githubusercontent.com/u/172697?v=4" width="110px;"/><br /><sub>Naveen</sub>](https://naveensrinivasan.dev)<br />[💻](https://github.com/snipe/snipe-it/commits?author=naveensrinivasan "Code") | [<img src="https://avatars.githubusercontent.com/u/55674383?v=4" width="110px;"/><br /><sub>Mike Roquemore</sub>](https://github.com/mikeroq)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mikeroq "Code") | [<img src="https://avatars.githubusercontent.com/u/7991086?v=4" width="110px;"/><br /><sub>Daniel Reeder</sub>](https://github.com/reederda)<br />[🌍](#translation-reederda "Translation") [🌍](#translation-reederda "Translation") [💻](https://github.com/snipe/snipe-it/commits?author=reederda "Code") | [<img src="https://avatars.githubusercontent.com/u/109422491?v=4" width="110px;"/><br /><sub>vickyjaura183</sub>](https://github.com/vickyjaura183)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vickyjaura183 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/32363424?v=4" width="110px;"/><br /><sub>Peace</sub>](https://github.com/julian-piehl)<br />[💻](https://github.com/snipe/snipe-it/commits?author=julian-piehl "Code") | [<img src="https://avatars.githubusercontent.com/u/231528?v=4" width="110px;"/><br /><sub>Kyle Gordon</sub>](https://github.com/kylegordon)<br />[💻](https://github.com/snipe/snipe-it/commits?author=kylegordon "Code") | [<img src="https://avatars.githubusercontent.com/u/53009155?v=4" width="110px;"/><br /><sub>Katharina Drexel</sub>](http://www.bfh.ch)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sunflowerbofh "Code") | [<img src="https://avatars.githubusercontent.com/u/1931963?v=4" width="110px;"/><br /><sub>David Sferruzza</sub>](https://david.sferruzza.fr/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dsferruzza "Code") | [<img src="https://avatars.githubusercontent.com/u/19511639?v=4" width="110px;"/><br /><sub>Rick Nelson</sub>](https://github.com/rnelsonee)<br />[💻](https://github.com/snipe/snipe-it/commits?author=rnelsonee "Code") | [<img src="https://avatars.githubusercontent.com/u/94169344?v=4" width="110px;"/><br /><sub>BasO12</sub>](https://github.com/BasO12)<br />[💻](https://github.com/snipe/snipe-it/commits?author=BasO12 "Code") | [<img src="https://avatars.githubusercontent.com/u/111710123?v=4" width="110px;"/><br /><sub>Vautia</sub>](https://github.com/Vautia)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Vautia "Code") |
| [<img src="https://avatars.githubusercontent.com/u/28321?v=4" width="110px;"/><br /><sub>Chris Hartjes</sub>](http://www.littlehart.net/atthekeyboard)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chartjes "Code") | [<img src="https://avatars.githubusercontent.com/u/2404584?v=4" width="110px;"/><br /><sub>geo-chen</sub>](https://github.com/geo-chen)<br />[💻](https://github.com/snipe/snipe-it/commits?author=geo-chen "Code") | [<img src="https://avatars.githubusercontent.com/u/6006620?v=4" width="110px;"/><br /><sub>Phan Nguyen</sub>](https://github.com/nh314)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nh314 "Code") | [<img src="https://avatars.githubusercontent.com/u/115993812?v=4" width="110px;"/><br /><sub>Iisakki Jaakkola</sub>](https://github.com/StarlessNights)<br />[💻](https://github.com/snipe/snipe-it/commits?author=StarlessNights "Code") | [<img src="https://avatars.githubusercontent.com/u/22633385?v=4" width="110px;"/><br /><sub>Ikko Ashimine</sub>](https://bandism.net/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=eltociear "Code") | [<img src="https://avatars.githubusercontent.com/u/56871540?v=4" width="110px;"/><br /><sub>Lukas Fehling</sub>](https://github.com/lukasfehling)<br />[💻](https://github.com/snipe/snipe-it/commits?author=lukasfehling "Code") | [<img src="https://avatars.githubusercontent.com/u/1975990?v=4" width="110px;"/><br /><sub>Fernando Almeida</sub>](https://github.com/fernando-almeida)<br />[💻](https://github.com/snipe/snipe-it/commits?author=fernando-almeida "Code") |
| [<img src="https://avatars.githubusercontent.com/u/116301219?v=4" width="110px;"/><br /><sub>akemidx</sub>](https://github.com/akemidx)<br />[💻](https://github.com/snipe/snipe-it/commits?author=akemidx "Code") | [<img src="https://avatars.githubusercontent.com/u/144778?v=4" width="110px;"/><br /><sub>Oguz Bilgic</sub>](http://oguz.site)<br />[💻](https://github.com/snipe/snipe-it/commits?author=oguzbilgic "Code") | [<img src="https://avatars.githubusercontent.com/u/9262438?v=4" width="110px;"/><br /><sub>Scooter Crawford</sub>](https://github.com/scoo73r)<br />[💻](https://github.com/snipe/snipe-it/commits?author=scoo73r "Code") | [<img src="https://avatars.githubusercontent.com/u/5957345?v=4" width="110px;"/><br /><sub>subdriven</sub>](https://github.com/subdriven)<br />[💻](https://github.com/snipe/snipe-it/commits?author=subdriven "Code") |
| [<img src="https://avatars.githubusercontent.com/u/116301219?v=4" width="110px;"/><br /><sub>akemidx</sub>](https://github.com/akemidx)<br />[💻](https://github.com/snipe/snipe-it/commits?author=akemidx "Code") | [<img src="https://avatars.githubusercontent.com/u/144778?v=4" width="110px;"/><br /><sub>Oguz Bilgic</sub>](http://oguz.site)<br />[💻](https://github.com/snipe/snipe-it/commits?author=oguzbilgic "Code") | [<img src="https://avatars.githubusercontent.com/u/9262438?v=4" width="110px;"/><br /><sub>Scooter Crawford</sub>](https://github.com/scoo73r)<br />[💻](https://github.com/snipe/snipe-it/commits?author=scoo73r "Code") | [<img src="https://avatars.githubusercontent.com/u/5957345?v=4" width="110px;"/><br /><sub>subdriven</sub>](https://github.com/subdriven)<br />[💻](https://github.com/snipe/snipe-it/commits?author=subdriven "Code") | [<img src="https://avatars.githubusercontent.com/u/658865?v=4" width="110px;"/><br /><sub>Andrew Savinykh</sub>](https://github.com/AndrewSav)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AndrewSav "Code") | [<img src="https://avatars.githubusercontent.com/u/1155067?v=4" width="110px;"/><br /><sub>Tadayuki Onishi</sub>](https://kenchan0130.github.io)<br />[💻](https://github.com/snipe/snipe-it/commits?author=kenchan0130 "Code") | [<img src="https://avatars.githubusercontent.com/u/112496896?v=4" width="110px;"/><br /><sub>Florian</sub>](https://github.com/floschoepfer)<br />[💻](https://github.com/snipe/snipe-it/commits?author=floschoepfer "Code") |
| [<img src="https://avatars.githubusercontent.com/u/7305753?v=4" width="110px;"/><br /><sub>Spencer Long</sub>](http://spencerlong.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=spencerrlongg "Code") | [<img src="https://avatars.githubusercontent.com/u/1141514?v=4" width="110px;"/><br /><sub>Marcus Moore</sub>](https://github.com/marcusmoore)<br />[💻](https://github.com/snipe/snipe-it/commits?author=marcusmoore "Code") | [<img src="https://avatars.githubusercontent.com/u/570639?v=4" width="110px;"/><br /><sub>Martin Meredith</sub>](https://github.com/Mezzle)<br /> | [<img src="https://avatars.githubusercontent.com/u/5731963?v=4" width="110px;"/><br /><sub>dboth</sub>](http://dboth.de)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dboth "Code") | [<img src="https://avatars.githubusercontent.com/u/87536651?v=4" width="110px;"/><br /><sub>Zachary Fleck</sub>](https://github.com/zacharyfleck)<br />[💻](https://github.com/snipe/snipe-it/commits?author=zacharyfleck "Code") | [<img src="https://avatars.githubusercontent.com/u/74609912?v=4" width="110px;"/><br /><sub>VIKAAS-A</sub>](https://github.com/vikaas-cyper)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vikaas-cyper "Code") | [<img src="https://avatars.githubusercontent.com/u/88882041?v=4" width="110px;"/><br /><sub>Abdul Kareem</sub>](https://github.com/ak-piracha)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ak-piracha "Code") |
| [<img src="https://avatars.githubusercontent.com/u/111287779?v=4" width="110px;"/><br /><sub>NojoudAlshehri</sub>](https://github.com/NojoudAlshehri)<br />[💻](https://github.com/snipe/snipe-it/commits?author=NojoudAlshehri "Code") | [<img src="https://avatars.githubusercontent.com/u/54367449?v=4" width="110px;"/><br /><sub>Stefan Stidl</sub>](https://github.com/stefanstidlffg)<br />[💻](https://github.com/snipe/snipe-it/commits?author=stefanstidlffg "Code") | [<img src="https://avatars.githubusercontent.com/u/87803479?v=4" width="110px;"/><br /><sub>Quentin Aymard</sub>](https://github.com/qay21)<br />[💻](https://github.com/snipe/snipe-it/commits?author=qay21 "Code") | [<img src="https://avatars.githubusercontent.com/u/5396871?v=4" width="110px;"/><br /><sub>Grant Le Roux</sub>](https://github.com/cram42)<br />[💻](https://github.com/snipe/snipe-it/commits?author=cram42 "Code") | [<img src="https://avatars.githubusercontent.com/u/58479551?v=4" width="110px;"/><br /><sub>Bogdan</sub>](http://@singrity)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Singrity "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!

View File

@@ -1,75 +1,52 @@
# Using the Test Suite
# Running the Test Suite
This document is targeted at developers looking to make modifications to
this application's code base and want to run the existing test suite.
This document is targeted at developers looking to make modifications to this application's code base and want to run the existing test suite.
Before starting, follow the [instructions](README.md#installation) for installing the application locally and ensure you can load it in a browser properly.
## Setup
## Unit and Feature Tests
Follow the instructions for installing the application locally,
making sure to have also run the [database migrations](link to db migrations).
Before attempting to run the test suite copy the example environment file for tests and update the values to match your environment:
`cp .env.testing.example .env.testing`
## Unit Tests
The following should work for running tests in memory with sqlite:
```
# --------------------------------------------
# REQUIRED: BASIC APP SETTINGS
# --------------------------------------------
APP_ENV=testing
APP_DEBUG=true
APP_KEY=base64:glJpcM7BYwWiBggp3SQ/+NlRkqsBQMaGEOjemXqJzOU=
APP_URL=http://localhost:8000
APP_TIMEZONE='UTC'
APP_LOCALE=en
The application will use values in the `.env.testing` file located
in the root directory to override the
default settings and/or other values that exist in your `.env` files.
Make sure to modify the section in `.env.testing` that has the
database settings. In the example below, it is connecting to the
[MariaDB](link-to-maria-db) server that is used if you install the
application using [Docker](https://docker.com).
```dotenv
# --------------------------------------------
# REQUIRED: DATABASE SETTINGS
# --------------------------------------------
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_DATABASE=snipeit
DB_USERNAME=root
DB_PASSWORD=changeme1234
DB_CONNECTION=sqlite_testing
#DB_HOST=127.0.0.1
#DB_PORT=3306
#DB_DATABASE=null
#DB_USERNAME=null
#DB_PASSWORD=null
```
To run the entire unit test suite, use the following command from your terminal:
To use MySQL you should update the `DB_` variables to match your local test database:
```
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE={}
DB_USERNAME={}
DB_PASSWORD={}
```
`php artisan test --env=testing`
Now you are ready to run the entire test suite from your terminal:
To run individual test files, you can pass the path to the test that
you want to run.
`php artisan test --env=testing tests/Unit/AccessoryTest.php`
## Browser Tests
Browser tests are run via [Laravel Dusk](https://laravel.com/docs/8.x/dusk) and require Google Chrome to be installed.
Before attempting to run Dusk tests copy the example environment file for Dusk and update the values to match your environment:
`cp .env.dusk.example .env.dusk.local`
> `local` refers to the value of `APP_ENV` in your `.env` so if you have it set to `dev` then the file should be named `.env.dusk.dev`.
**Important**: Dusk tests cannot be run using an in-memory SQLite database. Additionally, the Dusk test suite uses the `DatabaseMigrations` trait which will leave the database in a fresh state after running. Therefore, it is recommended that you create a test database and point `DB_DATABASE` in `.env.dusk.local` to it.
### Test Setup
Your application needs to be configured and up and running in order for the browser
tests to actually run. When running the tests locally, you can start the application
using the following command:
`php artisan serve`
Now you are ready to run the test suite. Use the following command from another terminal tab or window:
`php artisan dusk`
`php artisan test`
To run individual test files, you can pass the path to the test that you want to run:
`php artisan dusk tests/Browser/LoginTest.php`
If you get an error when attempting to run Dusk tests that says `Couldn't connect to server` run:
`php artisan dusk:chrome-driver --detect`
This command will install the specific ChromeDriver Dusk needs for your operating system and Chrome version.
`php artisan test tests/Unit/AccessoryTest.php`

View File

@@ -56,7 +56,7 @@ class CheckoutLicenseToAllUsers extends Command
return false;
}
$users = User::whereNull('deleted_at')->with('licenses')->get();
$users = User::whereNull('deleted_at')->where('autoassign_licenses', '=', 1)->with('licenses')->get();
if ($users->count() > $license->getAvailSeatsCountAttribute()) {
$this->info('You do not have enough free seats to complete this task, so we will check out as many as we can. ');

View File

@@ -3,15 +3,31 @@
namespace App\Console\Commands;
use Illuminate\Console\Command;
use \App\Models\User;
class CreateAdmin extends Command
{
/** @mixin User **/
/**
* The name and signature of the console command.
*
* @var string
* App\Console\CreateAdmin
* @property mixed $first_name
* @property string $last_name
* @property string $username
* @property string $email
* @property string $permissions
* @property string $password
* @property boolean $activated
* @property boolean $show_in_list
* @property boolean $autoassign_licenses
* @property \Illuminate\Support\Carbon|null $created_at
* @property mixed $created_by
*/
protected $signature = 'snipeit:create-admin {--first_name=} {--last_name=} {--email=} {--username=} {--password=} {show_in_list?}';
protected $signature = 'snipeit:create-admin {--first_name=} {--last_name=} {--email=} {--username=} {--password=} {show_in_list?} {autoassign_licenses?}';
/**
* The console command description.
@@ -30,11 +46,7 @@ class CreateAdmin extends Command
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$first_name = $this->option('first_name');
@@ -43,11 +55,14 @@ class CreateAdmin extends Command
$email = $this->option('email');
$password = $this->option('password');
$show_in_list = $this->argument('show_in_list');
$autoassign_licenses = $this->argument('autoassign_licenses');
if (($first_name == '') || ($last_name == '') || ($username == '') || ($email == '') || ($password == '')) {
$this->info('ERROR: All fields are required.');
} else {
$user = new \App\Models\User;
$user = new User;
$user->first_name = $first_name;
$user->last_name = $last_name;
$user->username = $username;
@@ -59,6 +74,11 @@ class CreateAdmin extends Command
if ($show_in_list == 'false') {
$user->show_in_list = 0;
}
if ($autoassign_licenses == 'false') {
$user->autoassign_licenses = 0;
}
if ($user->save()) {
$this->info('New user created');
$user->groups()->attach(1);

View File

@@ -62,6 +62,7 @@ class LdapSync extends Command
$ldap_result_phone = Setting::getSettings()->ldap_phone_field;
$ldap_result_jobtitle = Setting::getSettings()->ldap_jobtitle;
$ldap_result_country = Setting::getSettings()->ldap_country;
$ldap_result_location = Setting::getSettings()->ldap_location;
$ldap_result_dept = Setting::getSettings()->ldap_dept;
$ldap_result_manager = Setting::getSettings()->ldap_manager;
$ldap_default_group = Setting::getSettings()->ldap_default_group;
@@ -74,7 +75,7 @@ class LdapSync extends Command
$json_summary = ['error' => true, 'error_message' => $e->getMessage(), 'summary' => []];
$this->info(json_encode($json_summary));
}
LOG::info($e);
Log::info($e);
return [];
}
@@ -84,7 +85,7 @@ class LdapSync extends Command
try {
if ($this->option('base_dn') != '') {
$search_base = $this->option('base_dn');
LOG::debug('Importing users from specified base DN: \"'.$search_base.'\".');
Log::debug('Importing users from specified base DN: \"'.$search_base.'\".');
} else {
$search_base = null;
}
@@ -98,7 +99,7 @@ class LdapSync extends Command
$json_summary = ['error' => true, 'error_message' => $e->getMessage(), 'summary' => []];
$this->info(json_encode($json_summary));
}
LOG::info($e);
Log::info($e);
return [];
}
@@ -108,16 +109,16 @@ class LdapSync extends Command
if ($this->option('location') != '') {
$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('Location name '.$this->option('location').' passed');
Log::debug('Importing to '.$location->name.' ('.$location->id.')');
} elseif ($this->option('location_id') != '') {
$location = Location::where('id', '=', $this->option('location_id'))->first();
LOG::debug('Location ID '.$this->option('location_id').' passed');
LOG::debug('Importing to '.$location->name.' ('.$location->id.')');
Log::debug('Location ID '.$this->option('location_id').' passed');
Log::debug('Importing to '.$location->name.' ('.$location->id.')');
}
if (! isset($location)) {
LOG::debug('That location is invalid or a location was not provided, so no location will be assigned by default.');
Log::debug('That location is invalid or a location was not provided, so no location will be assigned by default.');
}
/* Process locations with explicitly defined OUs, if doing a full import. */
@@ -133,7 +134,7 @@ class LdapSync extends Command
array_multisort($ldap_ou_lengths, SORT_ASC, $ldap_ou_locations);
if (count($ldap_ou_locations) > 0) {
LOG::debug('Some locations have special OUs set. Locations will be automatically set for users in those OUs.');
Log::debug('Some locations have special OUs set. Locations will be automatically set for users in those OUs.');
}
// Inject location information fields
@@ -151,7 +152,7 @@ class LdapSync extends Command
$json_summary = ['error' => true, 'error_message' => trans('admin/users/message.error.ldap_could_not_search').' Location: '.$ldap_loc['name'].' (ID: '.$ldap_loc['id'].') cannot connect to "'.$ldap_loc['ldap_ou'].'" - '.$e->getMessage(), 'summary' => []];
$this->info(json_encode($json_summary));
}
LOG::info($e);
Log::info($e);
return [];
}
@@ -179,10 +180,6 @@ class LdapSync extends Command
}
}
/* Create user account entries in Snipe-IT */
$tmp_pass = substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, 20);
$pass = bcrypt($tmp_pass);
$manager_cache = [];
if($ldap_default_group != null) {
@@ -197,20 +194,26 @@ class LdapSync extends Command
for ($i = 0; $i < $results['count']; $i++) {
$item = [];
$item['username'] = isset($results[$i][$ldap_result_username][0]) ? $results[$i][$ldap_result_username][0] : '';
$item['employee_number'] = isset($results[$i][$ldap_result_emp_num][0]) ? $results[$i][$ldap_result_emp_num][0] : '';
$item['lastname'] = isset($results[$i][$ldap_result_last_name][0]) ? $results[$i][$ldap_result_last_name][0] : '';
$item['firstname'] = isset($results[$i][$ldap_result_first_name][0]) ? $results[$i][$ldap_result_first_name][0] : '';
$item['email'] = isset($results[$i][$ldap_result_email][0]) ? $results[$i][$ldap_result_email][0] : '';
$item['ldap_location_override'] = isset($results[$i]['ldap_location_override']) ? $results[$i]['ldap_location_override'] : '';
$item['location_id'] = isset($results[$i]['location_id']) ? $results[$i]['location_id'] : '';
$item['telephone'] = isset($results[$i][$ldap_result_phone][0]) ? $results[$i][$ldap_result_phone][0] : '';
$item['jobtitle'] = isset($results[$i][$ldap_result_jobtitle][0]) ? $results[$i][$ldap_result_jobtitle][0] : '';
$item['country'] = isset($results[$i][$ldap_result_country][0]) ? $results[$i][$ldap_result_country][0] : '';
$item['department'] = isset($results[$i][$ldap_result_dept][0]) ? $results[$i][$ldap_result_dept][0] : '';
$item['manager'] = isset($results[$i][$ldap_result_manager][0]) ? $results[$i][$ldap_result_manager][0] : '';
$item['username'] = $results[$i][$ldap_result_username][0] ?? '';
$item['employee_number'] = $results[$i][$ldap_result_emp_num][0] ?? '';
$item['lastname'] = $results[$i][$ldap_result_last_name][0] ?? '';
$item['firstname'] = $results[$i][$ldap_result_first_name][0] ?? '';
$item['email'] = $results[$i][$ldap_result_email][0] ?? '';
$item['ldap_location_override'] = $results[$i]['ldap_location_override'] ?? '';
$item['location_id'] = $results[$i]['location_id'] ?? '';
$item['telephone'] = $results[$i][$ldap_result_phone][0] ?? '';
$item['jobtitle'] = $results[$i][$ldap_result_jobtitle][0] ?? '';
$item['country'] = $results[$i][$ldap_result_country][0] ?? '';
$item['department'] = $results[$i][$ldap_result_dept][0] ?? '';
$item['manager'] = $results[$i][$ldap_result_manager][0] ?? '';
$item['location'] = $results[$i][$ldap_result_location][0] ?? '';
// ONLY if you are using the "ldap_location" option *AND* you have an actual result
if ($ldap_result_location && $item['location']) {
$location = Location::firstOrCreate([
'name' => $item['location'],
]);
}
$department = Department::firstOrCreate([
'name' => $item['department'],
]);
@@ -222,21 +225,44 @@ class LdapSync extends Command
} else {
// Creating a new user.
$user = new User;
$user->password = $pass;
$user->password = $user->noPassword();
$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->first_name = $item['firstname'];
$user->last_name = $item['lastname'];
//If a sync option is not filled in on the LDAP settings don't populate the user field
if($ldap_result_username != null){
$user->username = $item['username'];
$user->email = $item['email'];
}
if($ldap_result_last_name != null){
$user->last_name = $item['lastname'];
}
if($ldap_result_first_name != null){
$user->first_name = $item['firstname'];
}
if($ldap_result_emp_num != null){
$user->employee_num = e($item['employee_number']);
}
if($ldap_result_email != null){
$user->email = $item['email'];
}
if($ldap_result_phone != null){
$user->phone = $item['telephone'];
}
if($ldap_result_jobtitle != null){
$user->jobtitle = $item['jobtitle'];
}
if($ldap_result_country != null){
$user->country = $item['country'];
}
if($ldap_result_dept != null){
$user->department_id = $department->id;
}
if($ldap_result_location != null){
$user->location_id = $location ? $location->id : null;
}
if($ldap_result_manager != null){
if($item['manager'] != null) {
// Check Cache first
if (isset($manager_cache[$item['manager']])) {
@@ -276,6 +302,7 @@ class LdapSync extends Command
}
}
}
// Sync activated state for Active Directory.
if ( !empty($ldap_result_active_flag)) { // IF we have an 'active' flag set....

View File

@@ -0,0 +1,52 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\User;
class NormalizeUserNames extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:normalize-names';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Normalizes weirdly formatted names as first-letter upercased';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$users = User::get();
$this->info($users->count() . ' users');
foreach ($users as $user) {
$user->first_name = ucwords(strtolower($user->first_name));
$user->last_name = ucwords(strtolower($user->last_name));
$user->email = strtolower($user->email);
$user->save();
}
}
}

View File

@@ -11,7 +11,7 @@ class SystemBackup extends Command
*
* @var string
*/
protected $name = 'snipeit:backup';
protected $signature = 'snipeit:backup {--filename=}';
/**
* The console command description.
@@ -37,7 +37,18 @@ class SystemBackup extends Command
*/
public function handle()
{
//
if ($this->option('filename')) {
$filename = $this->option('filename');
// Make sure the filename ends in .zip
if (!ends_with($filename, '.zip')) {
$filename = $filename.'.zip';
}
$this->call('backup:run', ['--filename' => $filename]);
} else {
$this->call('backup:run');
}
}
}

View File

@@ -15,18 +15,20 @@ class CheckoutableCheckedIn
public $checkedInBy;
public $note;
public $action_date; // Date setted in the hardware.checkin view at the checkin_at input, for the action log
public $originalValues;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($checkoutable, $checkedOutTo, User $checkedInBy, $note, $action_date = null)
public function __construct($checkoutable, $checkedOutTo, User $checkedInBy, $note, $action_date = null, $originalValues = [])
{
$this->checkoutable = $checkoutable;
$this->checkedOutTo = $checkedOutTo;
$this->checkedInBy = $checkedInBy;
$this->note = $note;
$this->action_date = $action_date ?? date('Y-m-d');
$this->originalValues = $originalValues;
}
}

View File

@@ -14,17 +14,19 @@ class CheckoutableCheckedOut
public $checkedOutTo;
public $checkedOutBy;
public $note;
public $originalValues;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($checkoutable, $checkedOutTo, User $checkedOutBy, $note)
public function __construct($checkoutable, $checkedOutTo, User $checkedOutBy, $note, $originalValues = [])
{
$this->checkoutable = $checkoutable;
$this->checkedOutTo = $checkedOutTo;
$this->checkedOutBy = $checkedOutBy;
$this->note = $note;
$this->originalValues = $originalValues;
}
}

24
app/Events/UserMerged.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
namespace App\Events;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use App\Models\User;
class UserMerged
{
use Dispatchable, SerializesModels;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct(User $from_user, User $to_user, User $admin)
{
$this->merged_from = $from_user;
$this->merged_to = $to_user;
$this->admin = $admin;
}
}

View File

@@ -6,10 +6,11 @@ use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use App\Helpers\Helper;
use Illuminate\Validation\ValidationException;
use Illuminate\Auth\AuthenticationException;
use ArieTimmerman\Laravel\SCIMServer\Exceptions\SCIMException;
use Log;
use Throwable;
use JsonException;
use Carbon\Exceptions\InvalidFormatException;
class Handler extends ExceptionHandler
{
@@ -28,6 +29,8 @@ class Handler extends ExceptionHandler
\Intervention\Image\Exception\NotSupportedException::class,
\League\OAuth2\Server\Exception\OAuthServerException::class,
JsonException::class,
SCIMException::class, //these generally don't need to be reported
InvalidFormatException::class,
];
/**
@@ -41,7 +44,9 @@ class Handler extends ExceptionHandler
public function report(Throwable $exception)
{
if ($this->shouldReport($exception)) {
if (class_exists(\Log::class)) {
\Log::error($exception);
}
return parent::report($exception);
}
}
@@ -51,7 +56,7 @@ class Handler extends ExceptionHandler
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Illuminate\Http\Response
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse|\Illuminate\Http\Response
*/
public function render($request, Throwable $e)
{
@@ -65,18 +70,39 @@ class Handler extends ExceptionHandler
// Invalid JSON exception
// TODO: don't understand why we have to do this when we have the invalidJson() method, below, but, well, whatever
if ($e instanceof JsonException) {
return response()->json(Helper::formatStandardApiResponse('error', null, 'invalid JSON'), 422);
return response()->json(Helper::formatStandardApiResponse('error', null, 'Invalid JSON'), 422);
}
// Handle SCIM exceptions
if ($e instanceof SCIMException) {
try {
$e->report(); // logs as 'debug', so shouldn't get too noisy
} catch(\Exception $reportException) {
//do nothing
}
return $e->render($request); // ALL SCIMExceptions have the 'render()' method
}
// Handle Ajax requests that fail because the model doesn't exist
// Handle standard requests that fail because Carbon cannot parse the date on validation (when a submitted date value is definitely not a date)
if ($e instanceof InvalidFormatException) {
return redirect()->back()->withInput()->with('error', trans('validation.date', ['attribute' => 'date']));
}
// Handle API requests that fail
if ($request->ajax() || $request->wantsJson()) {
// Handle API requests that fail because Carbon cannot parse the date on validation (when a submitted date value is definitely not a date)
if ($e instanceof InvalidFormatException) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('validation.date', ['attribute' => 'date'])), 200);
}
// Handle API requests that fail because the model doesn't exist
if ($e instanceof \Illuminate\Database\Eloquent\ModelNotFoundException) {
$className = last(explode('\\', $e->getModel()));
return response()->json(Helper::formatStandardApiResponse('error', null, $className . ' not found'), 200);
}
// Handle API requests that fail because of an HTTP status code and return a useful error message
if ($this->isHttpException($e)) {
$statusCode = $e->getStatusCode();
@@ -96,6 +122,8 @@ class Handler extends ExceptionHandler
}
if ($this->isHttpException($e) && (isset($statusCode)) && ($statusCode == '404' )) {
return response()->view('layouts/basic', [
'content' => view('errors/404')
@@ -111,7 +139,7 @@ class Handler extends ExceptionHandler
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
*/
protected function unauthenticated($request, AuthenticationException $exception)
{

View File

@@ -2,6 +2,8 @@
namespace App\Helpers;
use App\Models\Accessory;
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\Component;
use App\Models\Consumable;
use App\Models\CustomField;
@@ -33,6 +35,16 @@ class Helper
}
}
public static function parseEscapedMarkedownInline($str = null)
{
$Parsedown = new \Parsedown();
$Parsedown->setSafeMode(true);
if ($str) {
return $Parsedown->line($str);
}
}
/**
* The importer has formatted number strings since v3,
* so the value might be a string, or an integer.
@@ -334,7 +346,11 @@ class Helper
'#92896B',
];
$total_colors = count($colors);
if ($index >= $total_colors) {
$index = $index - $total_colors;
}
return $colors[$index];
}
@@ -528,20 +544,23 @@ class Helper
* @since [v2.5]
* @return array
*/
public static function categoryTypeList()
public static function categoryTypeList($selection=null)
{
$category_types = [
'' => '',
'accessory' => 'Accessory',
'asset' => 'Asset',
'consumable' => 'Consumable',
'component' => 'Component',
'license' => 'License',
'accessory' => trans('general.accessory'),
'asset' => trans('general.asset'),
'consumable' => trans('general.consumable'),
'component' => trans('general.component'),
'license' => trans('general.license'),
];
if ($selection != null){
return $category_types[strtolower($selection)];
}
else
return $category_types;
}
/**
* Get the list of custom fields in an array to make a dropdown menu
*
@@ -626,6 +645,7 @@ class Helper
$consumables = Consumable::withCount('consumableAssignments as consumable_assignments_count')->whereNotNull('min_amt')->get();
$accessories = Accessory::withCount('users as users_count')->whereNotNull('min_amt')->get();
$components = Component::whereNotNull('min_amt')->get();
$asset_models = AssetModel::where('min_amt', '>', 0)->get();
$avail_consumables = 0;
$items_array = [];
@@ -688,6 +708,28 @@ class Helper
}
}
foreach ($asset_models as $asset_model){
$asset = new Asset();
$total_owned = $asset->where('model_id', '=', $asset_model->id)->count();
$avail = $asset->where('model_id', '=', $asset_model->id)->whereNull('assigned_to')->count();
if ($avail < ($asset_model->min_amt)+ \App\Models\Setting::getSettings()->alert_threshold) {
if ($avail > 0) {
$percent = number_format((($avail / $total_owned) * 100), 0);
} else {
$percent = 100;
}
$items_array[$all_count]['id'] = $asset_model->id;
$items_array[$all_count]['name'] = $asset_model->name;
$items_array[$all_count]['type'] = 'models';
$items_array[$all_count]['percent'] = $percent;
$items_array[$all_count]['remaining'] = $avail;
$items_array[$all_count]['min_amt'] = $asset_model->min_amt;
$all_count++;
}
}
return $items_array;
}
@@ -1092,6 +1134,15 @@ class Helper
return $file_name;
}
/**
* Universal helper to show file size in human-readable formats
*
* @author A. Gianotto <snipe@snipe.net>
* @since 5.0
*
* @return string[]
*/
public static function formatFilesizeUnits($bytes)
{
if ($bytes >= 1073741824)
@@ -1121,30 +1172,141 @@ class Helper
return $bytes;
}
/**
* This is weird but used by the side nav to determine which URL to point the user to
*
* @author A. Gianotto <snipe@snipe.net>
* @since 5.0
*
* @return string[]
*/
public static function SettingUrls(){
$settings=['#','fields.index', 'statuslabels.index', 'models.index', 'categories.index', 'manufacturers.index', 'suppliers.index', 'departments.index', 'locations.index', 'companies.index', 'depreciations.index'];
return $settings;
}
public static function AgeFormat($date) {
$year = Carbon::parse($date)
->diff(now())->y;
$month = Carbon::parse($date)
->diff(now())->m;
$days = Carbon::parse($date)
->diff(now())->d;
$age='';
if ($year) {
$age .= $year.'y ';
}
if ($month) {
$age .= $month.'m ';
}
if ($days) {
$age .= $days.'d';
/**
* Generic helper (largely used by livewire right now) that returns the font-awesome icon
* for the object type.
*
* @author A. Gianotto <snipe@snipe.net>
* @since 6.1.0
*
* @return string
*/
public static function iconTypeByItem($item) {
switch ($item) {
case 'asset':
return 'fas fa-barcode';
break;
case 'accessory':
return 'fas fa-keyboard';
break;
case 'component':
return 'fas fa-hdd';
break;
case 'consumable':
return 'fas fa-tint';
break;
case 'license':
return 'far fa-save';
break;
case 'location':
return 'fas fa-map-marker-alt';
break;
case 'user':
return 'fas fa-user';
break;
}
return $age;
}
/*
* This is a shorter way to see if the app is in demo mode.
*
* This makes it cleanly available in blades and in controllers, e.g.
*
* Blade:
* {{ Helper::isDemoMode() ? ' disabled' : ''}} for form blades where we need to disable a form
*
* Controller:
* if (Helper::isDemoMode()) {
* // don't allow the thing
* }
* @todo - use this everywhere else in the app where we have very long if/else config('app.lock_passwords') stuff
*/
public static function isDemoMode() {
if (config('app.lock_passwords') === true) {
return true;
\Log::debug('app locked!');
}
return false;
}
/**
* Conversion between units of measurement
*
* @author Grant Le Roux <grant.leroux+snipe-it@gmail.com>
* @since 5.0
* @param float $value Measurement value to convert
* @param string $srcUnit Source unit of measurement
* @param string $dstUnit Destination unit of measurement
* @param int $round Round the result to decimals (Default false - No rounding)
* @return float
*/
public static function convertUnit($value, $srcUnit, $dstUnit, $round=false) {
$srcFactor = static::getUnitConversionFactor($srcUnit);
$dstFactor = static::getUnitConversionFactor($dstUnit);
$output = $value * $srcFactor / $dstFactor;
return ($round !== false) ? round($output, $round) : $output;
}
/**
* Get conversion factor from unit of measurement to mm
*
* @author Grant Le Roux <grant.leroux+snipe-it@gmail.com>
* @since 5.0
* @param string $unit Unit of measurement
* @return float
*/
public static function getUnitConversionFactor($unit) {
switch (strtolower($unit)) {
case 'mm':
return 1.0;
case 'cm':
return 10.0;
case 'm':
return 1000.0;
case 'in':
return 25.4;
case 'ft':
return 12 * static::getUnitConversionFactor('in');
case 'yd':
return 3 * static::getUnitConversionFactor('ft');
case 'pt':
return (1 / 72) * static::getUnitConversionFactor('in');
default:
throw new \InvalidArgumentException('Unit: \'' . $unit . '\' is not supported');
return false;
}
}
/*
* I know it's gauche to return a shitty HTML string, but this is just a helper and since it will be the same every single time,
* it seemed pretty safe to do here. Don't you judge me.
*/
public static function showDemoModeFieldWarning() {
if (Helper::isDemoMode()) {
return "<p class=\"text-warning\"><i class=\"fas fa-lock\"></i>" . trans('general.feature_disabled') . "</p>";
}
}
}

View File

@@ -77,7 +77,7 @@ class AccessoriesController extends Controller
$accessory->manufacturer_id = request('manufacturer_id');
$accessory->model_number = request('model_number');
$accessory->purchase_date = request('purchase_date');
$accessory->purchase_cost = Helper::ParseCurrency(request('purchase_cost'));
$accessory->purchase_cost = request('purchase_cost');
$accessory->qty = request('qty');
$accessory->user_id = Auth::user()->id;
$accessory->supplier_id = request('supplier_id');
@@ -115,6 +115,34 @@ class AccessoriesController extends Controller
}
/**
* Returns a view that presents a form to clone an accessory.
*
* @author [J. Vinsmoke]
* @param int $accessoryId
* @since [v6.0]
* @return View
*/
public function getClone($accessoryId = null)
{
$this->authorize('create', Accessory::class);
// Check if the asset exists
if (is_null($accessory_to_clone = Accessory::find($accessoryId))) {
// Redirect to the asset management page
return redirect()->route('accessories.index')
->with('error', trans('admin/accessories/message.does_not_exist', ['id' => $accessoryId]));
}
$accessory = clone $accessory_to_clone;
$accessory->id = null;
$accessory->location_id = null;
return view('accessories/edit')
->with('item', $accessory);
}
/**
* Save edited Accessory from form post
@@ -153,7 +181,7 @@ class AccessoriesController extends Controller
$accessory->order_number = request('order_number');
$accessory->model_number = request('model_number');
$accessory->purchase_date = request('purchase_date');
$accessory->purchase_cost = Helper::ParseCurrency(request('purchase_cost'));
$accessory->purchase_cost = request('purchase_cost');
$accessory->qty = request('qty');
$accessory->supplier_id = request('supplier_id');
$accessory->notes = request('notes');

View File

@@ -146,9 +146,8 @@ class AccessoriesFilesController extends Controller
$this->authorize('view', $accessory);
$this->authorize('accessories.files', $accessory);
if (! $log = Actionlog::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', $accessory->id)->find($fileId)) {
return redirect()->route('accessories.index')->with('error', trans('admin/users/message.log_record_not_found'));
}
$file = 'private_uploads/accessories/'.$log->filename;
@@ -161,22 +160,19 @@ class AccessoriesFilesController extends Controller
->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);
} else {
if ($download != 'true') {
\Log::debug('display the file');
if ($contents = file_get_contents(Storage::url($file))) { // TODO - this will fail on private S3 files or large public ones
return Response::make(Storage::url($file)->header('Content-Type', mime_content_type($file)));
}
return JsonResponse::create(['error' => 'Failed validation: '], 500);
}
return StorageHelper::downloader($file);
}
}
}

View File

@@ -25,11 +25,16 @@ class AccessoryCheckoutController extends Controller
public function create($accessoryId)
{
// Check if the accessory exists
if (is_null($accessory = Accessory::find($accessoryId))) {
if (is_null($accessory = Accessory::withCount('users as users_count')->find($accessoryId))) {
// Redirect to the accessory management page with error
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.not_found'));
}
// Make sure there is at least one available to checkout
if ($accessory->numRemaining() <= 0){
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.checkout.unavailable'));
}
if ($accessory->category) {
$this->authorize('checkout', $accessory);
@@ -55,7 +60,7 @@ class AccessoryCheckoutController extends Controller
public function store(Request $request, $accessoryId)
{
// Check if the accessory exists
if (is_null($accessory = Accessory::find($accessoryId))) {
if (is_null($accessory = Accessory::withCount('users as users_count')->find($accessoryId))) {
// Redirect to the accessory management page with error
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.user_not_found'));
}
@@ -66,6 +71,12 @@ class AccessoryCheckoutController extends Controller
return redirect()->route('accessories.checkout.show', $accessory->id)->with('error', trans('admin/accessories/message.checkout.user_does_not_exist'));
}
// Make sure there is at least one available to checkout
if ($accessory->numRemaining() <= 0){
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.checkout.unavailable'));
}
// Update the accessory data
$accessory->assigned_to = e($request->input('assigned_to'));

View File

@@ -69,7 +69,7 @@ class AcceptanceController extends Controller
}
if (! Company::isCurrentUserHasAccess($acceptance->checkoutable)) {
return redirect()->route('account.accept')->with('error', trans('general.insufficient_permissions'));
return redirect()->route('account.accept')->with('error', trans('general.error_user_company'));
}
return view('account/accept.create', compact('acceptance'));
@@ -121,7 +121,6 @@ class AcceptanceController extends Controller
$pdf_filename = 'accepted-eula-'.date('Y-m-d-h-i-s').'.pdf';
$sig_filename='';
if ($request->input('asset_acceptance') == 'accepted') {
/**
@@ -153,12 +152,14 @@ class AcceptanceController extends Controller
}
}
// this is horrible
switch($acceptance->checkoutable_type){
case 'App\Models\Asset':
$pdf_view_route ='account.accept.accept-asset-eula';
$asset_model = AssetModel::find($item->model_id);
if (!$asset_model) {
return redirect()->back()->with('error', trans('admin/models/message.does_not_exist'));
}
$display_model = $asset_model->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
@@ -167,7 +168,7 @@ class AcceptanceController extends Controller
$pdf_view_route ='account.accept.accept-accessory-eula';
$accessory = Accessory::find($item->id);
$display_model = $accessory->name;
$assigned_to = User::find($item->assignedTo);
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\LicenseSeat':
@@ -244,17 +245,51 @@ class AcceptanceController extends Controller
$return_msg = trans('admin/users/message.accepted');
} else {
/**
* Check for the eula-pdfs directory
*/
if (! Storage::exists('private_uploads/eula-pdfs')) {
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
}
if (Setting::getSettings()->require_accept_signature == '1') {
// Check if the signature directory exists, if not create it
if (!Storage::exists('private_uploads/signatures')) {
Storage::makeDirectory('private_uploads/signatures', 775);
}
// The item was accepted, check for a signature
if ($request->filled('signature_output')) {
$sig_filename = 'siglog-' . Str::uuid() . '-' . date('Y-m-d-his') . '.png';
$data_uri = $request->input('signature_output');
$encoded_image = explode(',', $data_uri);
$decoded_image = base64_decode($encoded_image[1]);
Storage::put('private_uploads/signatures/' . $sig_filename, (string)$decoded_image);
// No image data is present, kick them back.
// This mostly only applies to users on super-duper crapola browsers *cough* IE *cough*
} else {
return redirect()->back()->with('error', trans('general.shitty_browser'));
}
}
// Format the data to send the declined notification
$branding_settings = SettingsController::getPDFBranding();
// This is the most horriblest
switch($acceptance->checkoutable_type){
case 'App\Models\Asset':
$asset_model = AssetModel::find($item->model_id);
$display_model = $asset_model->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\Accessory':
$assigned_to = User::find($item->assignedTo);
$accessory = Accessory::find($item->id);
$display_model = $accessory->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\LicenseSeat':
@@ -266,6 +301,8 @@ class AcceptanceController extends Controller
break;
case 'App\Models\Consumable':
$consumable = Consumable::find($item->id);
$display_model = $consumable->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
}
@@ -274,11 +311,18 @@ class AcceptanceController extends Controller
'item_model' => $display_model,
'item_serial' => $item->serial,
'declined_date' => Carbon::parse($acceptance->declined_at)->format('Y-m-d'),
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
'assigned_to' => $assigned_to,
'company_name' => $branding_settings->site_name,
'date_settings' => $branding_settings->date_display_format,
];
if ($pdf_view_route!='') {
\Log::debug($pdf_filename.' is the filename, and the route was specified.');
$pdf = Pdf::loadView($pdf_view_route, $data);
Storage::put('private_uploads/eula-pdfs/' .$pdf_filename, $pdf->output());
}
$acceptance->decline($sig_filename);
$acceptance->notify(new AcceptanceAssetDeclinedNotification($data));
event(new CheckoutDeclined($acceptance));

View File

@@ -26,7 +26,10 @@ class AccessoriesController extends Controller
*/
public function index(Request $request)
{
if ($request->user()->cannot('reports.view')) {
$this->authorize('view', Accessory::class);
}
// This array is what determines which fields should be allowed to be sorted on ON the table itself, no relations
// Relations will be handled in query scopes a little further down.
@@ -77,12 +80,9 @@ class AccessoriesController extends Controller
$accessories->where('notes','=',$request->input('notes'));
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($accessories) && ($request->get('offset') > $accessories->count())) ? $accessories->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $accessories->count()) ? $accessories->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort_override = $request->input('sort');
@@ -150,7 +150,7 @@ class AccessoriesController extends Controller
public function show($id)
{
$this->authorize('view', Accessory::class);
$accessory = Accessory::findOrFail($id);
$accessory = Accessory::withCount('users as users_count')->findOrFail($id);
return (new AccessoriesTransformer)->transformAccessory($accessory);
}
@@ -331,7 +331,7 @@ class AccessoriesController extends Controller
$accessory = Accessory::find($accessory_user->accessory_id);
$this->authorize('checkin', $accessory);
$logaction = $accessory->logCheckin(User::find($accessory_user->user_id), $request->input('note'));
$logaction = $accessory->logCheckin(User::find($accessory_user->assigned_to), $request->input('note'));
// Was the accessory updated?
if (DB::table('accessories_users')->where('id', '=', $accessory_user->id)->delete()) {

View File

@@ -36,7 +36,7 @@ class AssetMaintenancesController extends Controller
{
$this->authorize('view', Asset::class);
$maintenances = AssetMaintenance::select('asset_maintenances.*')->with('asset', 'asset.model', 'asset.location', 'supplier', 'asset.company', 'admin');
$maintenances = AssetMaintenance::select('asset_maintenances.*')->with('asset', 'asset.model', 'asset.location', 'asset.defaultLoc', 'supplier', 'asset.company', 'admin');
if ($request->filled('search')) {
$maintenances = $maintenances->TextSearch($request->input('search'));
@@ -55,12 +55,9 @@ class AssetMaintenancesController extends Controller
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($maintenances) && ($request->get('offset') > $maintenances->count())) ? $maintenances->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $maintenances->count()) ? $maintenances->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$allowed_columns = [
'id',
@@ -74,7 +71,8 @@ class AssetMaintenancesController extends Controller
'asset_tag',
'asset_name',
'user_id',
'supplier'
'supplier',
'is_warranty',
];
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? e($request->input('sort')) : 'created_at';
@@ -121,7 +119,7 @@ class AssetMaintenancesController extends Controller
$assetMaintenance = new AssetMaintenance();
$assetMaintenance->supplier_id = $request->input('supplier_id');
$assetMaintenance->is_warranty = $request->input('is_warranty');
$assetMaintenance->cost = Helper::ParseCurrency($request->input('cost'));
$assetMaintenance->cost = $request->input('cost');
$assetMaintenance->notes = e($request->input('notes'));
$asset = Asset::find(e($request->input('asset_id')));
@@ -178,7 +176,7 @@ class AssetMaintenancesController extends Controller
$assetMaintenance->supplier_id = e($request->input('supplier_id'));
$assetMaintenance->is_warranty = e($request->input('is_warranty'));
$assetMaintenance->cost = Helper::ParseCurrency($request->input('cost'));
$assetMaintenance->cost = $request->input('cost');
$assetMaintenance->notes = e($request->input('notes'));
$asset = Asset::find(request('asset_id'));

View File

@@ -38,6 +38,7 @@ class AssetModelsController extends Controller
'image',
'name',
'model_number',
'min_amt',
'eol',
'notes',
'created_at',
@@ -45,6 +46,7 @@ class AssetModelsController extends Controller
'requestable',
'assets_count',
'category',
'fieldset',
];
$assetmodels = AssetModel::select([
@@ -52,6 +54,7 @@ class AssetModelsController extends Controller
'models.image',
'models.name',
'model_number',
'min_amt',
'eol',
'requestable',
'models.notes',
@@ -63,7 +66,7 @@ class AssetModelsController extends Controller
'models.deleted_at',
'models.updated_at',
])
->with('category', 'depreciation', 'manufacturer', 'fieldset')
->with('category', 'depreciation', 'manufacturer', 'fieldset.fields.defaultValues')
->withCount('assets as assets_count');
if ($request->input('status')=='deleted') {
@@ -78,12 +81,9 @@ class AssetModelsController extends Controller
$assetmodels->TextSearch($request->input('search'));
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($assetmodels) && ($request->get('offset') > $assetmodels->count())) ? $assetmodels->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $assetmodels->count()) ? $assetmodels->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'models.created_at';
@@ -95,6 +95,9 @@ class AssetModelsController extends Controller
case 'category':
$assetmodels->OrderCategory($order);
break;
case 'fieldset':
$assetmodels->OrderFieldset($order);
break;
default:
$assetmodels->orderBy($sort, $order);
break;

View File

@@ -101,6 +101,7 @@ class AssetsController extends Controller
'checkin_counter',
'requests_counter',
'byod',
'asset_eol_date',
];
$filter = [];
@@ -114,7 +115,7 @@ class AssetsController extends Controller
$allowed_columns[] = $field->db_column_name();
}
$assets = Company::scopeCompanyables(Asset::select('assets.*'), 'company_id', 'assets')
$assets = Asset::select('assets.*')
->with('location', 'assetstatus', 'company', 'defaultLoc','assignedTo',
'model.category', 'model.manufacturer', 'model.fieldset','supplier'); //it might be tempting to add 'assetlog' here, but don't. It blows up update-heavy users.
@@ -124,11 +125,12 @@ class AssetsController extends Controller
$assets->InModelList($non_deprecable_models->toArray());
}
// These are used by the API to query against specific ID numbers.
// They are also used by the individual searches on detail pages like
// locations, etc.
// Search custom fields by column name
foreach ($all_custom_fields as $field) {
if ($request->filled($field->db_column_name())) {
@@ -136,76 +138,12 @@ class AssetsController extends Controller
}
}
if ($request->filled('status_id')) {
$assets->where('assets.status_id', '=', $request->input('status_id'));
if ((! is_null($filter)) && (count($filter)) > 0) {
$assets->ByFilter($filter);
} elseif ($request->filled('search')) {
$assets->TextSearch($request->input('search'));
}
if ($request->filled('asset_tag')) {
$assets->where('assets.asset_tag', '=', $request->input('asset_tag'));
}
if ($request->filled('serial')) {
$assets->where('assets.serial', '=', $request->input('serial'));
}
if ($request->input('requestable') == 'true') {
$assets->where('assets.requestable', '=', '1');
}
if ($request->filled('model_id')) {
$assets->InModelList([$request->input('model_id')]);
}
if ($request->filled('category_id')) {
$assets->InCategory($request->input('category_id'));
}
if ($request->filled('location_id')) {
$assets->where('assets.location_id', '=', $request->input('location_id'));
}
if ($request->filled('rtd_location_id')) {
$assets->where('assets.rtd_location_id', '=', $request->input('rtd_location_id'));
}
if ($request->filled('supplier_id')) {
$assets->where('assets.supplier_id', '=', $request->input('supplier_id'));
}
if (($request->filled('assigned_to')) && ($request->filled('assigned_type'))) {
$assets->where('assets.assigned_to', '=', $request->input('assigned_to'))
->where('assets.assigned_type', '=', $request->input('assigned_type'));
}
if ($request->filled('company_id')) {
$assets->where('assets.company_id', '=', $request->input('company_id'));
}
if ($request->filled('manufacturer_id')) {
$assets->ByManufacturer($request->input('manufacturer_id'));
}
if ($request->filled('depreciation_id')) {
$assets->ByDepreciationId($request->input('depreciation_id'));
}
if ($request->filled('byod')) {
$assets->where('assets.byod', '=', $request->input('byod'));
}
$request->filled('order_number') ? $assets = $assets->where('assets.order_number', '=', e($request->get('order_number'))) : '';
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($assets) && ($request->get('offset') > $assets->count())) ? $assets->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
// This is used by the audit reporting routes
if (Gate::allows('audit', Asset::class)) {
switch ($audit) {
@@ -219,7 +157,6 @@ class AssetsController extends Controller
}
// This is used by the sidenav, mostly
// We switched from using query scopes here because of a Laravel bug
@@ -269,7 +206,7 @@ class AssetsController extends Controller
break;
case 'Deployed':
// more sad, horrible workarounds for laravel bugs when doing full text searches
$assets->where('assets.assigned_to', '>', '0');
$assets->whereNotNull('assets.assigned_to');
break;
case 'byod':
// This is kind of redundant, since we already check for byod=1 above, but this keeps the
@@ -295,12 +232,71 @@ class AssetsController extends Controller
}
if ((! is_null($filter)) && (count($filter)) > 0) {
$assets->ByFilter($filter);
} elseif ($request->filled('search')) {
$assets->TextSearch($request->input('search'));
// Leave these under the TextSearch scope, else the fuzziness will override the specific ID (status ID, etc) requested
if ($request->filled('status_id')) {
$assets->where('assets.status_id', '=', $request->input('status_id'));
}
if ($request->filled('asset_tag')) {
$assets->where('assets.asset_tag', '=', $request->input('asset_tag'));
}
if ($request->filled('serial')) {
$assets->where('assets.serial', '=', $request->input('serial'));
}
if ($request->input('requestable') == 'true') {
$assets->where('assets.requestable', '=', '1');
}
if ($request->filled('model_id')) {
$assets->InModelList([$request->input('model_id')]);
}
if ($request->filled('category_id')) {
$assets->InCategory($request->input('category_id'));
}
if ($request->filled('location_id')) {
$assets->where('assets.location_id', '=', $request->input('location_id'));
}
if ($request->filled('rtd_location_id')) {
$assets->where('assets.rtd_location_id', '=', $request->input('rtd_location_id'));
}
if ($request->filled('supplier_id')) {
$assets->where('assets.supplier_id', '=', $request->input('supplier_id'));
}
if ($request->filled('asset_eol_date')) {
$assets->where('assets.asset_eol_date', '=', $request->input('asset_eol_date'));
}
if (($request->filled('assigned_to')) && ($request->filled('assigned_type'))) {
$assets->where('assets.assigned_to', '=', $request->input('assigned_to'))
->where('assets.assigned_type', '=', $request->input('assigned_type'));
}
if ($request->filled('company_id')) {
$assets->where('assets.company_id', '=', $request->input('company_id'));
}
if ($request->filled('manufacturer_id')) {
$assets->ByManufacturer($request->input('manufacturer_id'));
}
if ($request->filled('depreciation_id')) {
$assets->ByDepreciationId($request->input('depreciation_id'));
}
if ($request->filled('byod')) {
$assets->where('assets.byod', '=', $request->input('byod'));
}
if ($request->filled('order_number')) {
$assets->where('assets.order_number', '=', $request->get('order_number'));
}
// This is kinda gross, but we need to do this because the Bootstrap Tables
// API passes custom field ordering as custom_fields.fieldname, and we have to strip
@@ -311,6 +307,7 @@ class AssetsController extends Controller
// in the allowed_columns array)
$column_sort = in_array($sort_override, $allowed_columns) ? $sort_override : 'assets.created_at';
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
switch ($sort_override) {
case 'model':
@@ -348,6 +345,10 @@ class AssetsController extends Controller
}
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $assets->count()) ? $assets->count() : app('api_offset_value');
$limit = app('api_limit_value');
$total = $assets->count();
$assets = $assets->skip($offset)->take($limit)->get();
@@ -460,7 +461,7 @@ class AssetsController extends Controller
{
$this->authorize('view', Asset::class);
$this->authorize('view', License::class);
$asset = Asset::where('id', $id)->withTrashed()->first();
$asset = Asset::where('id', $id)->withTrashed()->firstorfail();
$licenses = $asset->licenses()->get();
return (new LicensesTransformer())->transformLicenses($licenses, $licenses->count());
@@ -478,7 +479,7 @@ class AssetsController extends Controller
public function selectlist(Request $request)
{
$assets = Company::scopeCompanyables(Asset::select([
$assets = Asset::select([
'assets.id',
'assets.name',
'assets.asset_tag',
@@ -486,7 +487,7 @@ class AssetsController extends Controller
'assets.assigned_to',
'assets.assigned_type',
'assets.status_id',
])->with('model', 'assetstatus', 'assignedTo')->NotArchived(), 'company_id', 'assets');
])->with('model', 'assetstatus', 'assignedTo')->NotArchived();
if ($request->filled('assetStatusType') && $request->input('assetStatusType') === 'RTD') {
$assets = $assets->RTD();
@@ -544,14 +545,16 @@ class AssetsController extends Controller
$asset->model_id = $request->get('model_id');
$asset->order_number = $request->get('order_number');
$asset->notes = $request->get('notes');
$asset->asset_tag = $request->get('asset_tag', Asset::autoincrement_asset());
$asset->asset_tag = $request->get('asset_tag', Asset::autoincrement_asset()); //yup, problem :/
// NO IT IS NOT!!! This is never firing; we SHOW the asset_tag you're going to get, so it *will* be filled in!
$asset->user_id = Auth::id();
$asset->archived = '0';
$asset->physical = '1';
$asset->depreciate = '0';
$asset->status_id = $request->get('status_id', 0);
$asset->warranty_months = $request->get('warranty_months', null);
$asset->purchase_cost = Helper::ParseCurrency($request->get('purchase_cost')); // this is the API's store method, so I don't know that I want to do this? Confusing. FIXME (or not?!)
$asset->purchase_cost = $request->get('purchase_cost');
$asset->asset_eol_date = $request->get('asset_eol_date', $asset->present()->eol_date());
$asset->purchase_date = $request->get('purchase_date', null);
$asset->assigned_to = $request->get('assigned_to', null);
$asset->supplier_id = $request->get('supplier_id');
@@ -559,6 +562,7 @@ class AssetsController extends Controller
$asset->rtd_location_id = $request->get('rtd_location_id', null);
$asset->location_id = $request->get('rtd_location_id', null);
/**
* this is here just legacy reasons. Api\AssetController
* used image_source once to allow encoded image uploads.
@@ -572,6 +576,7 @@ class AssetsController extends Controller
// Update custom fields in the database.
// Validation for these fields is handled through the AssetRequest form request
$model = AssetModel::find($request->get('model_id'));
if (($model) && ($model->fieldset)) {
foreach ($model->fieldset->fields as $field) {
@@ -829,7 +834,6 @@ class AssetsController extends Controller
} elseif (request('checkout_to_type') == 'asset') {
$target = Asset::where('id', '!=', $asset_id)->find(request('assigned_asset'));
$asset->location_id = $target->rtd_location_id;
// Override with the asset's location_id if it has one
$asset->location_id = (($target) && (isset($target->location_id))) ? $target->location_id : '';
$error_payload['target_id'] = $request->input('assigned_asset');
@@ -901,6 +905,7 @@ class AssetsController extends Controller
$asset->expected_checkin = null;
$asset->last_checkout = null;
$asset->last_checkin = now();
$asset->assigned_to = null;
$asset->assignedTo()->disassociate($asset);
$asset->accepted = null;
@@ -920,10 +925,14 @@ class AssetsController extends Controller
}
$checkin_at = $request->filled('checkin_at') ? $request->input('checkin_at').' '. date('H:i:s') : date('Y-m-d H:i:s');
$originalValues = $asset->getRawOriginal();
if (($request->filled('checkin_at')) && ($request->get('checkin_at') != date('Y-m-d'))) {
$originalValues['action_date'] = $checkin_at;
}
if ($asset->save()) {
event(new CheckoutableCheckedIn($asset, $target, Auth::user(), $request->input('note'), $checkin_at));
event(new CheckoutableCheckedIn($asset, $target, Auth::user(), $request->input('note'), $checkin_at, $originalValues));
return response()->json(Helper::formatStandardApiResponse('success', ['asset'=> e($asset->asset_tag)], trans('admin/hardware/message.checkin.success')));
}
@@ -938,18 +947,21 @@ class AssetsController extends Controller
* @since [v6.0]
* @return JsonResponse
*/
public function checkinByTag(Request $request)
public function checkinByTag(Request $request, $tag = null)
{
$this->authorize('checkin', Asset::class);
$asset = Asset::where('asset_tag', $request->input('asset_tag'))->first();
if(null == $tag && null !== ($request->input('asset_tag'))) {
$tag = $request->input('asset_tag');
}
$asset = Asset::where('asset_tag', $tag)->first();
if ($asset) {
return $this->checkin($request, $asset->id);
}
return response()->json(Helper::formatStandardApiResponse('error', [
'asset'=> e($request->input('asset_tag'))
], 'Asset with tag '.e($request->input('asset_tag')).' not found'));
'asset'=> e($tag)
], 'Asset with tag '.e($tag).' not found'));
}
@@ -1026,9 +1038,10 @@ class AssetsController extends Controller
{
$this->authorize('viewRequestable', Asset::class);
$assets = Company::scopeCompanyables(Asset::select('assets.*'), 'company_id', 'assets')
$assets = Asset::select('assets.*')
->with('location', 'assetstatus', 'assetlog', 'company', 'defaultLoc','assignedTo',
'model.category', 'model.manufacturer', 'model.fieldset', 'supplier')->requestableAssets();
'model.category', 'model.manufacturer', 'model.fieldset', 'supplier')
->requestableAssets();
$offset = request('offset', 0);
$limit = $request->input('limit', 50);

View File

@@ -24,10 +24,48 @@ class CategoriesController extends Controller
public function index(Request $request)
{
$this->authorize('view', Category::class);
$allowed_columns = ['id', 'name', 'category_type', 'category_type', 'use_default_eula', 'eula_text', 'require_acceptance', 'checkin_email', 'assets_count', 'accessories_count', 'consumables_count', 'components_count', 'licenses_count', 'image'];
$allowed_columns = [
'id',
'name',
'category_type',
'category_type',
'use_default_eula',
'eula_text',
'require_acceptance',
'checkin_email',
'assets_count',
'accessories_count',
'consumables_count',
'components_count',
'licenses_count',
'image',
];
$categories = Category::select(['id', 'created_at', 'updated_at', 'name', 'category_type', 'use_default_eula', 'eula_text', 'require_acceptance', 'checkin_email', 'image'])
->withCount('assets as assets_count', 'accessories as accessories_count', 'consumables as consumables_count', 'components as components_count', 'licenses as licenses_count');
$categories = Category::select([
'id',
'created_at',
'updated_at',
'name', 'category_type',
'use_default_eula',
'eula_text',
'require_acceptance',
'checkin_email',
'image'
])->withCount('accessories as accessories_count', 'consumables as consumables_count', 'components as components_count', 'licenses as licenses_count');
/*
* This checks to see if we should override the Admin Setting to show archived assets in list.
* We don't currently use it within the Snipe-IT GUI, but will be useful for API integrations where they
* may actually need to fetch assets that are archived.
*
* @see \App\Models\Category::showableAssets()
*/
if ($request->input('archived')=='true') {
$categories = $categories->withCount('assets as assets_count');
} else {
$categories = $categories->withCount('showableAssets as assets_count');
}
if ($request->filled('search')) {
$categories = $categories->TextSearch($request->input('search'));
@@ -53,14 +91,9 @@ class CategoriesController extends Controller
$categories->where('checkin_email', '=', $request->input('checkin_email'));
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($categories) && ($request->get('offset') > $categories->count())) ? $categories->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $categories->count()) ? $categories->count() : app('api_offset_value');
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'assets_count';

View File

@@ -27,6 +27,9 @@ class CompaniesController extends Controller
$allowed_columns = [
'id',
'name',
'phone',
'fax',
'email',
'created_at',
'updated_at',
'users_count',
@@ -47,13 +50,15 @@ class CompaniesController extends Controller
$companies->where('name', '=', $request->input('name'));
}
if ($request->filled('email')) {
$companies->where('email', '=', $request->input('email'));
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($companies) && ($request->get('offset') > $companies->count())) ? $companies->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $companies->count()) ? $companies->count() : app('api_offset_value');
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
@@ -168,6 +173,7 @@ class CompaniesController extends Controller
$companies = Company::select([
'companies.id',
'companies.name',
'companies.email',
'companies.image',
]);

View File

@@ -12,6 +12,8 @@ use App\Http\Requests\ImageUploadRequest;
use App\Events\CheckoutableCheckedIn;
use App\Events\ComponentCheckedIn;
use App\Models\Asset;
use Illuminate\Support\Facades\Validator;
use Illuminate\Database\Query\Builder;
class ComponentsController extends Controller
{
@@ -43,9 +45,8 @@ class ComponentsController extends Controller
'notes',
];
$components = Company::scopeCompanyables(Component::select('components.*')
->with('company', 'location', 'category', 'assets'));
$components = Component::select('components.*')
->with('company', 'location', 'category', 'assets', 'supplier');
if ($request->filled('search')) {
$components = $components->TextSearch($request->input('search'));
@@ -63,6 +64,10 @@ class ComponentsController extends Controller
$components->where('category_id', '=', $request->input('category_id'));
}
if ($request->filled('supplier_id')) {
$components->where('supplier_id', '=', $request->input('supplier_id'));
}
if ($request->filled('location_id')) {
$components->where('location_id', '=', $request->input('location_id'));
}
@@ -71,13 +76,9 @@ class ComponentsController extends Controller
$components->where('notes','=',$request->input('notes'));
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($components) && ($request->get('offset') > $components->count())) ? $components->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $components->count()) ? $components->count() : app('api_offset_value');
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort_override = $request->input('sort');
@@ -93,6 +94,9 @@ class ComponentsController extends Controller
case 'company':
$components = $components->OrderCompany($order);
break;
case 'supplier':
$components = $components->OrderSupplier($order);
break;
default:
$components = $components->orderBy($column_sort, $order);
break;
@@ -200,12 +204,29 @@ class ComponentsController extends Controller
$this->authorize('view', \App\Models\Asset::class);
$component = Component::findOrFail($id);
$assets = $component->assets();
$offset = request('offset', 0);
$limit = $request->input('limit', 50);
if ($request->filled('search')) {
$assets = $component->assets()
->where(function ($query) use ($request) {
$search_str = '%' . $request->input('search') . '%';
$query->where('name', 'like', $search_str)
->orWhereIn('model_id', function (Builder $query) use ($request) {
$search_str = '%' . $request->input('search') . '%';
$query->selectRaw('id')->from('models')->where('name', 'like', $search_str);
})
->orWhere('asset_tag', 'like', $search_str);
})
->get();
$total = $assets->count();
} else {
$assets = $component->assets();
$total = $assets->count();
$assets = $assets->skip($offset)->take($limit)->get();
}
return (new ComponentsTransformer)->transformCheckedoutComponents($assets, $total);
}
@@ -225,20 +246,30 @@ class ComponentsController extends Controller
public function checkout(Request $request, $componentId)
{
// Check if the component exists
if (is_null($component = Component::find($componentId))) {
if (!$component = Component::find($componentId)) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/components/message.does_not_exist')));
}
$this->authorize('checkout', $component);
$validator = Validator::make($request->all(), [
'assigned_to' => 'required|exists:assets,id',
'assigned_qty' => "required|numeric|min:1|digits_between:1,".$component->numRemaining(),
]);
if ($validator->fails()) {
return response()->json(Helper::formatStandardApiResponse('error', $validator->errors()));
}
// Make sure there is at least one available to checkout
if ($component->numRemaining() < $request->get('assigned_qty')) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/components/message.checkout.unavailable', ['remaining' => $component->numRemaining(), 'requested' => $request->get('assigned_qty')])));
}
if ($component->numRemaining() >= $request->get('assigned_qty')) {
if (!$asset = Asset::find($request->input('assigned_to'))) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')));
}
// Update the accessory data
$asset = Asset::find($request->input('assigned_to'));
$component->assigned_to = $request->input('assigned_to');
$component->assets()->attach($component->id, [
@@ -255,7 +286,7 @@ class ComponentsController extends Controller
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/components/message.checkout.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, 'Not enough components remaining: '.$component->numRemaining().' remaining, '.$request->get('assigned_qty').' requested.'));
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/components/message.checkout.unavailable', ['remaining' => $component->numRemaining(), 'requested' => $request->get('assigned_qty')])));
}
/**

View File

@@ -45,11 +45,8 @@ class ConsumablesController extends Controller
'notes',
];
$consumables = Company::scopeCompanyables(
Consumable::select('consumables.*')
->with('company', 'location', 'category', 'users', 'manufacturer')
);
$consumables = Consumable::select('consumables.*')
->with('company', 'location', 'category', 'users', 'manufacturer');
if ($request->filled('search')) {
$consumables = $consumables->TextSearch(e($request->input('search')));
@@ -75,6 +72,10 @@ class ConsumablesController extends Controller
$consumables->where('manufacturer_id', '=', $request->input('manufacturer_id'));
}
if ($request->filled('supplier_id')) {
$consumables->where('supplier_id', '=', $request->input('supplier_id'));
}
if ($request->filled('location_id')) {
$consumables->where('location_id','=',$request->input('location_id'));
}
@@ -84,12 +85,9 @@ class ConsumablesController extends Controller
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($consumables) && ($request->get('offset') > $consumables->count())) ? $consumables->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $consumables->count()) ? $consumables->count() : app('api_offset_value');
$limit = app('api_limit_value');
$allowed_columns = ['id', 'name', 'order_number', 'min_amt', 'purchase_date', 'purchase_cost', 'company', 'category', 'model_number', 'item_no', 'manufacturer', 'location', 'qty', 'image'];
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
@@ -111,6 +109,9 @@ class ConsumablesController extends Controller
case 'company':
$consumables = $consumables->OrderCompany($order);
break;
case 'supplier':
$components = $consumables->OrderSupplier($order);
break;
default:
$consumables = $consumables->orderBy($column_sort, $order);
break;
@@ -154,7 +155,7 @@ class ConsumablesController extends Controller
public function show($id)
{
$this->authorize('view', Consumable::class);
$consumable = Consumable::findOrFail($id);
$consumable = Consumable::with('users')->findOrFail($id);
return (new ConsumablesTransformer)->transformConsumable($consumable);
}
@@ -253,33 +254,39 @@ class ConsumablesController extends Controller
public function checkout(Request $request, $id)
{
// Check if the consumable exists
if (is_null($consumable = Consumable::find($id))) {
if (!$consumable = Consumable::with('users')->find($id)) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/consumables/message.does_not_exist')));
}
$this->authorize('checkout', $consumable);
if ($consumable->qty > 0) {
// 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')));
\Log::debug('No enough remaining');
}
// Check if the user exists
$assigned_to = $request->input('assigned_to');
if (is_null($user = User::find($assigned_to))) {
// Check if the user exists - @TODO: this should probably be handled via validation, not here??
if (!$user = User::find($request->input('assigned_to'))) {
// Return error message
return response()->json(Helper::formatStandardApiResponse('error', null, 'No user found'));
\Log::debug('No valid user');
}
// Update the consumable data
$consumable->assigned_to = e($assigned_to);
$consumable->assigned_to = $request->input('assigned_to');
$consumable->users()->attach($consumable->id, [
$consumable->users()->attach($consumable->id,
[
'consumable_id' => $consumable->id,
'user_id' => $user->id,
'assigned_to' => $assigned_to,
'assigned_to' => $request->input('assigned_to'),
'note' => $request->input('note'),
]);
]
);
// Log checkout event
$logaction = $consumable->logCheckout(e($request->input('note')), $user);
$logaction = $consumable->logCheckout($request->input('note'), $user);
$data['log_id'] = $logaction->id;
$data['eula'] = $consumable->getEula();
$data['first_name'] = $user->first_name;
@@ -289,9 +296,7 @@ class ConsumablesController extends Controller
$data['require_acceptance'] = $consumable->requireAcceptance();
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/consumables/message.checkout.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, 'No consumables remaining'));
}
/**

View File

@@ -7,6 +7,7 @@ use App\Http\Controllers\Controller;
use App\Http\Transformers\CustomFieldsetsTransformer;
use App\Http\Transformers\CustomFieldsTransformer;
use App\Models\CustomFieldset;
use App\Models\CustomField;
use Illuminate\Http\Request;
use Redirect;
use View;
@@ -94,6 +95,18 @@ class CustomFieldsetsController extends Controller
$fieldset->fill($request->all());
if ($fieldset->save()) {
// Sync fieldset with auto_add_to_fieldsets
$fields = CustomField::select('id')->where('auto_add_to_fieldsets', '=', '1')->get();
if ($fields->count() > 0) {
foreach ($fields as $field) {
$field_ids[] = $field->id;
}
$fieldset->fields()->sync($field_ids);
}
return response()->json(Helper::formatStandardApiResponse('success', $fieldset, trans('admin/custom_fields/message.fieldset.create.success')));
}

View File

@@ -27,16 +27,18 @@ class DepartmentsController extends Controller
$this->authorize('view', Department::class);
$allowed_columns = ['id', 'name', 'image', 'users_count'];
$departments = Company::scopeCompanyables(Department::select(
$departments = Department::select(
'departments.id',
'departments.name',
'departments.phone',
'departments.fax',
'departments.location_id',
'departments.company_id',
'departments.manager_id',
'departments.created_at',
'departments.updated_at',
'departments.image'),
"company_id", "departments")->with('users')->with('location')->with('manager')->with('company')->withCount('users as users_count');
'departments.image'
)->with('users')->with('location')->with('manager')->with('company')->withCount('users as users_count');
if ($request->filled('search')) {
$departments = $departments->TextSearch($request->input('search'));
@@ -58,12 +60,9 @@ class DepartmentsController extends Controller
$departments->where('location_id', '=', $request->input('location_id'));
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($departments) && ($request->get('offset') > $departments->count())) ? $departments->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $departments->count()) ? $departments->count() : app('api_offset_value');
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';

View File

@@ -28,12 +28,9 @@ class DepreciationsController extends Controller
$depreciations = $depreciations->TextSearch($request->input('search'));
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($depreciations) && ($request->get('offset') > $depreciations->count())) ? $depreciations->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $depreciations->count()) ? $depreciations->count() : app('api_offset_value');
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';

View File

@@ -8,6 +8,7 @@ use App\Http\Transformers\GroupsTransformer;
use App\Models\Group;
use Illuminate\Http\Request;
class GroupsController extends Controller
{
/**
@@ -19,6 +20,8 @@ class GroupsController extends Controller
*/
public function index(Request $request)
{
$this->authorize('superadmin');
$this->authorize('view', Group::class);
$allowed_columns = ['id', 'name', 'created_at', 'users_count'];
@@ -32,12 +35,9 @@ class GroupsController extends Controller
$groups->where('name', '=', $request->input('name'));
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($groups) && ($request->get('offset') > $groups->count())) ? $groups->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $groups->count()) ? $groups->count() : app('api_offset_value');
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
@@ -59,9 +59,11 @@ class GroupsController extends Controller
*/
public function store(Request $request)
{
$this->authorize('create', Group::class);
$this->authorize('superadmin');
$group = new Group;
$group->fill($request->all());
$group->name = $request->input('name');
$group->permissions = json_encode($request->input('permissions')); // Todo - some JSON validation stuff here
if ($group->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $group, trans('admin/groups/message.create.success')));
@@ -80,7 +82,7 @@ class GroupsController extends Controller
*/
public function show($id)
{
$this->authorize('view', Group::class);
$this->authorize('superadmin');
$group = Group::findOrFail($id);
return (new GroupsTransformer)->transformGroup($group);
@@ -97,9 +99,11 @@ class GroupsController extends Controller
*/
public function update(Request $request, $id)
{
$this->authorize('update', Group::class);
$this->authorize('superadmin');
$group = Group::findOrFail($id);
$group->fill($request->all());
$group->name = $request->input('name');
$group->permissions = $request->input('permissions'); // Todo - some JSON validation stuff here
if ($group->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $group, trans('admin/groups/message.update.success')));
@@ -118,9 +122,8 @@ class GroupsController extends Controller
*/
public function destroy($id)
{
$this->authorize('delete', Group::class);
$this->authorize('superadmin');
$group = Group::findOrFail($id);
$this->authorize('delete', $group);
$group->delete();
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/groups/message.delete.success')));

View File

@@ -126,7 +126,14 @@ class ImportController extends Controller
}
$file_name = date('Y-m-d-his').'-'.$fixed_filename;
$import->file_path = $file_name;
$import->filesize = null;
if (!file_exists($path.'/'.$file_name)) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.file_not_found')), 500);
}
$import->filesize = filesize($path.'/'.$file_name);
$import->save();
$results[] = $import;
}
@@ -153,7 +160,7 @@ class ImportController extends Controller
// Run a backup immediately before processing
if ($request->get('run-backup')) {
\Log::debug('Backup manually requested via importer');
Artisan::call('backup:run');
Artisan::call('snipeit:backup', ['--filename' => 'pre-import-backup-'.date('Y-m-d-H:i:s')]);
} else {
\Log::debug('NO BACKUP requested via importer');
}
@@ -186,6 +193,9 @@ class ImportController extends Controller
case 'user':
$redirectTo = 'users.index';
break;
case 'location':
$redirectTo = 'locations.index';
break;
}
if ($errors) { //Failure

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Http\Controllers\Api;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Http\Transformers\LabelsTransformer;
use App\Models\Labels\Label;
use Illuminate\Http\Request;
use Illuminate\Support\ItemNotFoundException;
use Auth;
class LabelsController extends Controller
{
/**
* Returns JSON listing of all labels.
*
* @author Grant Le Roux <grant.leroux+snipe-it@gmail.com>
* @return JsonResponse
*/
public function index(Request $request)
{
$this->authorize('view', Label::class);
$labels = Label::find();
if ($request->filled('search')) {
$search = $request->get('search');
$labels = $labels->filter(function ($label, $index) use ($search) {
return stripos($label->getName(), $search) !== false;
});
}
$total = $labels->count();
$offset = $request->get('offset', 0);
$offset = ($offset > $total) ? $total : $offset;
$maxLimit = config('app.max_results');
$limit = $request->get('limit', $maxLimit);
$limit = ($limit > $maxLimit) ? $maxLimit : $limit;
$labels = $labels->skip($offset)->take($limit);
return (new LabelsTransformer)->transformLabels($labels, $total, $request);
}
/**
* Returns JSON with information about a label for detail view.
*
* @author Grant Le Roux <grant.leroux+snipe-it@gmail.com>
* @param string $labelName
* @return JsonResponse
*/
public function show(string $labelName)
{
$labelName = str_replace('/', '\\', $labelName);
try {
$label = Label::find($labelName);
} catch(ItemNotFoundException $e) {
return response()
->json(
Helper::formatStandardApiResponse('error', null, trans('admin/labels/message.does_not_exist')),
404
);
}
$this->authorize('view', $label);
return (new LabelsTransformer)->transformLabel($label);
}
}

View File

@@ -39,8 +39,15 @@ class LicenseSeatsController extends Controller
}
$total = $seats->count();
$offset = (($seats) && (request('offset') >= $total)) ? 0 : request('offset', 0);
$limit = request('limit', 50);
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $seats->count()) ? $seats->count() : app('api_offset_value');
if ($offset >= $total ){
$offset = 0;
}
$limit = app('api_limit_value');
$seats = $seats->skip($offset)->take($limit)->get();

View File

@@ -26,8 +26,8 @@ class LicensesController extends Controller
public function index(Request $request)
{
$this->authorize('view', License::class);
$licenses = Company::scopeCompanyables(License::with('company', 'manufacturer', 'supplier','category')->withCount('freeSeats as free_seats_count'));
$licenses = License::with('company', 'manufacturer', 'supplier','category')->withCount('freeSeats as free_seats_count');
if ($request->filled('company_id')) {
$licenses->where('company_id', '=', $request->input('company_id'));
@@ -94,12 +94,9 @@ class LicensesController extends Controller
$licenses->onlyTrashed();
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($licenses) && ($request->get('offset') > $licenses->count())) ? $licenses->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $licenses->count()) ? $licenses->count() : app('api_offset_value');
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';

View File

@@ -37,6 +37,8 @@ class LocationsController extends Controller
'locations.city',
'locations.state',
'locations.zip',
'locations.phone',
'locations.fax',
'locations.country',
'locations.parent_id',
'locations.manager_id',
@@ -78,14 +80,15 @@ class LocationsController extends Controller
$locations->where('locations.country', '=', $request->input('country'));
}
$offset = (($locations) && (request('offset') > $locations->count())) ? $locations->count() : request('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $locations->count()) ? $locations->count() : app('api_offset_value');
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
switch ($request->input('sort')) {
case 'parent':
$locations->OrderParent($order);
@@ -250,8 +253,12 @@ class LocationsController extends Controller
*/
public function selectlist(Request $request)
{
$this->authorize('view.selectlists');
// If a user is in the process of editing their profile, as determined by the referrer,
// then we check that they have permission to edit their own location.
// Otherwise, we do our normal check that they can view select lists.
$request->headers->get('referer') === route('profile')
? $this->authorize('self.edit_location')
: $this->authorize('view.selectlists');
$locations = Location::select([
'locations.id',

View File

@@ -23,10 +23,10 @@ class ManufacturersController extends Controller
public function index(Request $request)
{
$this->authorize('view', Manufacturer::class);
$allowed_columns = ['id', 'name', 'url', 'support_url', 'support_email', 'support_phone', 'created_at', 'updated_at', 'image', 'assets_count', 'consumables_count', 'components_count', 'licenses_count'];
$allowed_columns = ['id', 'name', 'url', 'support_url', 'support_email', 'warranty_lookup_url', 'support_phone', 'created_at', 'updated_at', 'image', 'assets_count', 'consumables_count', 'components_count', 'licenses_count'];
$manufacturers = Manufacturer::select(
['id', 'name', 'url', 'support_url', 'support_email', 'support_phone', 'created_at', 'updated_at', 'image', 'deleted_at']
['id', 'name', 'url', 'support_url', 'warranty_lookup_url', 'support_email', 'support_phone', 'created_at', 'updated_at', 'image', 'deleted_at']
)->withCount('assets as assets_count')->withCount('licenses as licenses_count')->withCount('consumables as consumables_count')->withCount('accessories as accessories_count');
if ($request->input('deleted') == 'true') {
@@ -49,6 +49,10 @@ class ManufacturersController extends Controller
$manufacturers->where('support_url', '=', $request->input('support_url'));
}
if ($request->filled('warranty_lookup_url')) {
$manufacturers->where('warranty_lookup_url', '=', $request->input('warranty_lookup_url'));
}
if ($request->filled('support_phone')) {
$manufacturers->where('support_phone', '=', $request->input('support_phone'));
}
@@ -57,12 +61,9 @@ class ManufacturersController extends Controller
$manufacturers->where('support_email', '=', $request->input('support_email'));
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($manufacturers) && ($request->get('offset') > $manufacturers->count())) ? $manufacturers->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $manufacturers->count()) ? $manufacturers->count() : app('api_offset_value');
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';

View File

@@ -29,8 +29,10 @@ class PredefinedKitsController extends Controller
$kits = $kits->TextSearch($request->input('search'));
}
$offset = $request->input('offset', 0);
$limit = $request->input('limit', 50);
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $kits->count()) ? $kits->count() : app('api_offset_value');
$limit = app('api_limit_value');
$order = $request->input('order') === 'desc' ? 'desc' : 'asc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'name';
$kits->orderBy($sort, $order);

View File

@@ -10,7 +10,7 @@ use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Laravel\Passport\TokenRepository;
use Illuminate\Contracts\Validation\Factory as ValidationFactory;
use Gate;
use Illuminate\Support\Facades\Gate;
use DB;
class ProfileController extends Controller

View File

@@ -54,11 +54,15 @@ class ReportsController extends Controller
'note',
];
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $actionlogs->count()) ? $actionlogs->count() : app('api_offset_value');
$limit = app('api_limit_value');
$sort = in_array($request->input('sort'), $allowed_columns) ? e($request->input('sort')) : 'created_at';
$order = ($request->input('order') == 'asc') ? 'asc' : 'desc';
$offset = request('offset', 0);
$limit = request('limit', 50);
$total = $actionlogs->count();
$actionlogs = $actionlogs->orderBy($sort, $order)->skip($offset)->take($limit)->get();
return response()->json((new ActionlogsTransformer)->transformActionlogs($actionlogs, $total), 200, ['Content-Type' => 'application/json;charset=utf8'], JSON_UNESCAPED_UNICODE);

View File

@@ -143,47 +143,6 @@ class SettingsController extends Controller
}
public function slacktest(SlackSettingsRequest $request)
{
$validator = Validator::make($request->all(), [
'slack_endpoint' => 'url|required_with:slack_channel|starts_with:https://hooks.slack.com/|nullable',
'slack_channel' => 'required_with:slack_endpoint|starts_with:#|nullable',
]);
if ($validator->fails()) {
return response()->json(['message' => 'Validation failed', 'errors' => $validator->errors()], 422);
}
// If validation passes, continue to the curl request
$slack = new Client([
'base_url' => e($request->input('slack_endpoint')),
'defaults' => [
'exceptions' => false,
],
]);
$payload = json_encode(
[
'channel' => e($request->input('slack_channel')),
'text' => trans('general.slack_test_msg'),
'username' => e($request->input('slack_botname')),
'icon_emoji' => ':heart:',
]);
try {
$slack->post($request->input('slack_endpoint'), ['body' => $payload]);
return response()->json(['message' => 'Success'], 200);
} catch (\Exception $e) {
return response()->json(['message' => 'Please check the channel name and webhook endpoint URL ('.e($request->input('slack_endpoint')).'). Slack responded with: '.$e->getMessage()], 400);
}
//}
return response()->json(['message' => 'Something went wrong :( '], 400);
}
/**
* Test the email configuration
*
@@ -312,7 +271,7 @@ class SettingsController extends Controller
$headers = ['ContentType' => 'application/zip'];
return Storage::download($path.'/'.$file, $file, $headers);
} else {
return response()->json(Helper::formatStandardApiResponse('error', null, 'File not found'));
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.file_not_found')));
}
}

View File

@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Api;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Http\Transformers\AssetsTransformer;
use App\Http\Transformers\SelectlistTransformer;
use App\Http\Transformers\StatuslabelsTransformer;
use App\Models\Asset;
use App\Models\Statuslabel;
@@ -50,12 +51,9 @@ class StatuslabelsController extends Controller
}
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($statuslabels) && ($request->get('offset') > $statuslabels->count())) ? $statuslabels->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $statuslabels->count()) ? $statuslabels->count() : app('api_offset_value');
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
@@ -196,6 +194,7 @@ class StatuslabelsController extends Controller
{
$this->authorize('view', Statuslabel::class);
$statuslabels = Statuslabel::withCount('assets')->get();
$total = Array();
foreach ($statuslabels as $statuslabel) {
@@ -293,4 +292,45 @@ class StatuslabelsController extends Controller
return '0';
}
/**
* Gets a paginated collection for the select2 menus
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.1.1]
* @see \App\Http\Transformers\SelectlistTransformer
*/
public function selectlist(Request $request)
{
$this->authorize('view.selectlists');
$statuslabels = Statuslabel::orderBy('default_label', 'desc')->orderBy('name', 'asc')->orderBy('deployable', 'desc');
if ($request->filled('search')) {
$statuslabels = $statuslabels->where('name', 'LIKE', '%'.$request->get('search').'%');
}
if ($request->filled('deployable')) {
$statuslabels = $statuslabels->where('deployable', '=', '1');
}
if ($request->filled('pending')) {
$statuslabels = $statuslabels->where('pending', '=', '1');
}
if ($request->filled('archived')) {
$statuslabels = $statuslabels->where('archived', '=', '1');
}
$statuslabels = $statuslabels->orderBy('name', 'ASC')->paginate(50);
// Loop through and set some custom properties for the transformer to use.
// This lets us have more flexibility in special cases like assets, where
// they may not have a ->name value but we want to display something anyway
foreach ($statuslabels as $statuslabel) {
$statuslabels->use_text = $statuslabel->name;
}
return (new SelectlistTransformer)->transformSelectlist($statuslabels);
}
}

View File

@@ -23,11 +23,30 @@ class SuppliersController extends Controller
public function index(Request $request)
{
$this->authorize('view', Supplier::class);
$allowed_columns = ['id', 'name', 'address', 'phone', 'contact', 'fax', 'email', 'image', 'assets_count', 'licenses_count', 'accessories_count', 'url'];
$allowed_columns = ['
id',
'name',
'address',
'phone',
'contact',
'fax',
'email',
'image',
'assets_count',
'licenses_count',
'accessories_count',
'components_count',
'consumables_count',
'url',
];
$suppliers = Supplier::select(
['id', 'name', 'address', 'address2', 'city', 'state', 'country', 'fax', 'phone', 'email', 'contact', 'created_at', 'updated_at', 'deleted_at', 'image', 'notes']
)->withCount('assets as assets_count')->withCount('licenses as licenses_count')->withCount('accessories as accessories_count');
['id', 'name', 'address', 'address2', 'city', 'state', 'country', 'fax', 'phone', 'email', 'contact', 'created_at', 'updated_at', 'deleted_at', 'image', 'notes', 'url'])
->withCount('assets as assets_count')
->withCount('licenses as licenses_count')
->withCount('accessories as accessories_count')
->withCount('components as components_count')
->withCount('consumables as consumables_count');
if ($request->filled('search')) {
@@ -74,12 +93,9 @@ class SuppliersController extends Controller
$suppliers->where('notes', '=', $request->input('notes'));
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($suppliers) && ($request->get('offset') > $suppliers->count())) ? $suppliers->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $suppliers->count()) ? $suppliers->count() : app('api_offset_value');
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';

View File

@@ -20,6 +20,7 @@ use Auth;
use Illuminate\Http\Request;
use App\Http\Requests\ImageUploadRequest;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
class UsersController extends Controller
{
@@ -69,18 +70,13 @@ class UsersController extends Controller
'users.ldap_import',
'users.start_date',
'users.end_date',
'users.vip',
'users.autoassign_licenses',
])->with('manager', 'groups', 'userloc', 'company', 'department', 'assets', 'licenses', 'accessories', 'consumables', 'createdBy',)
->withCount('assets as assets_count', 'licenses as licenses_count', 'accessories as accessories_count', 'consumables as consumables_count');
$users = Company::scopeCompanyables($users);
if (($request->filled('deleted')) && ($request->input('deleted') == 'true')) {
$users = $users->onlyTrashed();
} elseif (($request->filled('all')) && ($request->input('all') == 'true')) {
$users = $users->withTrashed();
}
if ($request->filled('activated')) {
$users = $users->where('users.activated', '=', $request->input('activated'));
}
@@ -149,6 +145,10 @@ class UsersController extends Controller
$users = $users->where('remote', '=', $request->input('remote'));
}
if ($request->filled('vip')) {
$users = $users->where('vip', '=', $request->input('vip'));
}
if ($request->filled('two_factor_enrolled')) {
$users = $users->where('two_factor_enrolled', '=', $request->input('two_factor_enrolled'));
}
@@ -181,19 +181,19 @@ class UsersController extends Controller
$users->has('accessories', '=', $request->input('accessories_count'));
}
if ($request->filled('autoassign_licenses')) {
$users->where('autoassign_licenses', '=', $request->input('autoassign_licenses'));
}
if ($request->filled('search')) {
$users = $users->TextSearch($request->input('search'));
}
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$offset = (($users) && (request('offset') > $users->count())) ? 0 : request('offset', 0);
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($users) && ($request->get('offset') > $users->count())) ? $users->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $users->count()) ? $users->count() : app('api_offset_value');
$limit = app('api_limit_value');
switch ($request->input('sort')) {
@@ -212,6 +212,14 @@ class UsersController extends Controller
case 'company':
$users = $users->OrderCompany($order);
break;
case 'first_name':
$users->orderBy('first_name', $order);
$users->orderBy('last_name', $order);
break;
case 'last_name':
$users->orderBy('last_name', $order);
$users->orderBy('first_name', $order);
break;
default:
$allowed_columns =
[
@@ -246,8 +254,10 @@ class UsersController extends Controller
'two_factor_optin',
'two_factor_enrolled',
'remote',
'vip',
'start_date',
'end_date',
'autoassign_licenses',
];
$sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name';
@@ -255,6 +265,14 @@ class UsersController extends Controller
break;
}
if (($request->filled('deleted')) && ($request->input('deleted') == 'true')) {
$users = $users->onlyTrashed();
} elseif (($request->filled('all')) && ($request->input('all') == 'true')) {
$users = $users->withTrashed();
}
$users = Company::scopeCompanyables($users);
$total = $users->count();
$users = $users->skip($offset)->take($limit)->get();
@@ -286,9 +304,11 @@ class UsersController extends Controller
$users = Company::scopeCompanyables($users);
if ($request->filled('search')) {
$users = $users->SimpleNameSearch($request->get('search'))
$users = $users->where(function ($query) use ($request) {
$query->SimpleNameSearch($request->get('search'))
->orWhere('username', 'LIKE', '%'.$request->get('search').'%')
->orWhere('employee_num', 'LIKE', '%'.$request->get('search').'%');
});
}
$users = $users->orderBy('last_name', 'asc')->orderBy('first_name', 'asc');
@@ -343,8 +363,12 @@ class UsersController extends Controller
$user->permissions = $permissions_array;
}
$tmp_pass = substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, 20);
$user->password = bcrypt($request->get('password', $tmp_pass));
//
if ($request->filled('password')) {
$user->password = bcrypt($request->get('password'));
} else {
$user->password = $user->noPassword();
}
app('App\Http\Requests\ImageUploadRequest')->handleImages($user, 600, 'image', 'avatars', 'avatar');
@@ -449,6 +473,13 @@ class UsersController extends Controller
// Check if the request has groups passed and has a value
if ($request->filled('groups')) {
$validator = Validator::make($request->all(), [
'groups.*' => 'integer|exists:permission_groups,id',
]);
if ($validator->fails()){
return response()->json(Helper::formatStandardApiResponse('error', null, $user->getErrors()));
}
$user->groups()->sync($request->input('groups'));
// The groups field has been passed but it is null, so we should blank it out
} elseif ($request->has('groups')) {

View File

@@ -101,7 +101,7 @@ class AssetMaintenancesController extends Controller
$assetMaintenance = new AssetMaintenance();
$assetMaintenance->supplier_id = $request->input('supplier_id');
$assetMaintenance->is_warranty = $request->input('is_warranty');
$assetMaintenance->cost = Helper::ParseCurrency($request->input('cost'));
$assetMaintenance->cost = $request->input('cost');
$assetMaintenance->notes = $request->input('notes');
$asset = Asset::find($request->input('asset_id'));
@@ -211,7 +211,7 @@ class AssetMaintenancesController extends Controller
$assetMaintenance->supplier_id = $request->input('supplier_id');
$assetMaintenance->is_warranty = $request->input('is_warranty');
$assetMaintenance->cost = Helper::ParseCurrency($request->input('cost'));
$assetMaintenance->cost = $request->input('cost');
$assetMaintenance->notes = $request->input('notes');
$asset = Asset::find(request('asset_id'));

View File

@@ -6,6 +6,7 @@ use App\Helpers\Helper;
use App\Http\Requests\ImageUploadRequest;
use App\Models\AssetModel;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Facades\Validator;
@@ -76,14 +77,15 @@ class AssetModelsController extends Controller
$model->depreciation_id = $request->input('depreciation_id');
$model->name = $request->input('name');
$model->model_number = $request->input('model_number');
$model->min_amt = $request->input('min_amt');
$model->manufacturer_id = $request->input('manufacturer_id');
$model->category_id = $request->input('category_id');
$model->notes = $request->input('notes');
$model->user_id = Auth::id();
$model->requestable = Request::has('requestable');
if ($request->input('custom_fieldset') != '') {
$model->fieldset_id = e($request->input('custom_fieldset'));
if ($request->input('fieldset_id') != '') {
$model->fieldset_id = e($request->input('fieldset_id'));
}
$model = $request->handleImages($model);
@@ -153,6 +155,7 @@ class AssetModelsController extends Controller
$model->eol = $request->input('eol');
$model->name = $request->input('name');
$model->model_number = $request->input('model_number');
$model->min_amt = $request->input('min_amt');
$model->manufacturer_id = $request->input('manufacturer_id');
$model->category_id = $request->input('category_id');
$model->notes = $request->input('notes');
@@ -160,10 +163,10 @@ class AssetModelsController extends Controller
$this->removeCustomFieldsDefaultValues($model);
if ($request->input('custom_fieldset') == '') {
if ($request->input('fieldset_id') == '') {
$model->fieldset_id = null;
} else {
$model->fieldset_id = $request->input('custom_fieldset');
$model->fieldset_id = $request->input('fieldset_id');
if ($this->shouldAddDefaultValues($request->input())) {
if (!$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'))){
@@ -172,7 +175,14 @@ class AssetModelsController extends Controller
}
}
if ($model->save()) {
if ($model->wasChanged('eol')) {
$newEol = $model->eol;
$model->assets()->whereNotNull('purchase_date')->where('eol_explicit', false)
->update(['asset_eol_date' => DB::raw('DATE_ADD(purchase_date, INTERVAL ' . $newEol . ' MONTH)')]);
}
return redirect()->route('models.index')->with('success', trans('admin/models/message.update.success'));
}
@@ -286,6 +296,7 @@ class AssetModelsController extends Controller
return view('models/edit')
->with('depreciation_list', Helper::depreciationList())
->with('item', $model)
->with('model_id', $model_to_clone->id)
->with('clone_model', $model_to_clone);
}
@@ -444,7 +455,7 @@ class AssetModelsController extends Controller
{
return ! empty($input['add_default_values'])
&& ! empty($input['default_values'])
&& ! empty($input['custom_fieldset']);
&& ! empty($input['fieldset_id']);
}
/**

View File

@@ -78,7 +78,7 @@ class AssetModelsFilesController extends Controller
* @return View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($modelId = null, $fileId = null, $download = true)
public function show($modelId = null, $fileId = null)
{
$model = AssetModel::find($modelId);
// the asset is valid
@@ -99,12 +99,13 @@ class AssetModelsFilesController extends Controller
->header('Content-Type', 'text/plain');
}
if ($download != 'true') {
if ($contents = file_get_contents(Storage::url($file))) {
return Response::make(Storage::url($file)->header('Content-Type', mime_content_type($file)));
}
if (request('inline') == 'true') {
return JsonResponse::create(['error' => 'Failed validation: '], 500);
$headers = [
'Content-Disposition' => 'inline',
];
return Storage::download($file, $log->filename, $headers);
}
return StorageHelper::downloader($file);

View File

@@ -68,6 +68,7 @@ class AssetCheckinController extends Controller
$asset->expected_checkin = null;
$asset->last_checkout = null;
$asset->last_checkin = now();
$asset->assigned_to = null;
$asset->assignedTo()->disassociate($asset);
$asset->assigned_type = null;
@@ -94,18 +95,25 @@ class AssetCheckinController extends Controller
\Log::debug('Manually override the location IDs');
\Log::debug('Original Location ID: '.$asset->location_id);
$asset->location_id = '';
\Log::debug('New RTD Location ID: '.$asset->location_id);
\Log::debug('New Location ID: '.$asset->location_id);
}
$asset->location_id = $asset->rtd_location_id;
if ($request->filled('location_id')) {
\Log::debug('NEW Location ID: '.$request->get('location_id'));
$asset->location_id = e($request->get('location_id'));
$asset->location_id = $request->get('location_id');
if ($request->get('update_default_location') == 0){
$asset->rtd_location_id = $request->get('location_id');
}
}
$originalValues = $asset->getRawOriginal();
$checkin_at = date('Y-m-d H:i:s');
if (($request->filled('checkin_at')) && ($request->get('checkin_at') != date('Y-m-d'))) {
$originalValues['action_date'] = $checkin_at;
$checkin_at = $request->get('checkin_at');
}
@@ -128,7 +136,7 @@ class AssetCheckinController extends Controller
// Was the asset updated?
if ($asset->save()) {
event(new CheckoutableCheckedIn($asset, $target, Auth::user(), $request->input('note'), $checkin_at));
event(new CheckoutableCheckedIn($asset, $target, Auth::user(), $request->input('note'), $checkin_at, $originalValues));
if ((isset($user)) && ($backto == 'user')) {
return redirect()->route('users.show', $user->id)->with('success', trans('admin/hardware/message.checkin.success'));

View File

@@ -27,7 +27,7 @@ class AssetCheckoutController extends Controller
public function create($assetId)
{
// Check if the asset exists
if (is_null($asset = Asset::find(e($assetId)))) {
if (is_null($asset = Asset::with('company')->find(e($assetId)))) {
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
}
@@ -89,6 +89,15 @@ class AssetCheckoutController extends Controller
}
}
$settings = \App\Models\Setting::getSettings();
// We have to check whether $target->company_id is null here since locations don't have a company yet
if (($settings->full_multiple_companies_support) && ((!is_null($target->company_id)) && (!is_null($asset->company_id)))) {
if ($target->company_id != $asset->company_id){
return redirect()->to("hardware/$assetId/checkout")->with('error', trans('general.error_user_company'));
}
}
if ($asset->checkOut($target, $admin, $checkout_at, $expected_checkin, e($request->get('note')), $request->get('name'))) {
return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.checkout.success'));
}

View File

@@ -79,14 +79,14 @@ class AssetFilesController extends Controller
* @return View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($assetId = null, $fileId = null, $download = true)
public function show($assetId = null, $fileId = null)
{
$asset = Asset::find($assetId);
// the asset is valid
if (isset($asset->id)) {
$this->authorize('view', $asset);
if (! $log = Actionlog::find($fileId)) {
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');
}
@@ -103,12 +103,13 @@ class AssetFilesController extends Controller
->header('Content-Type', 'text/plain');
}
if ($download != 'true') {
if ($contents = file_get_contents(Storage::url($file))) {
return Response::make(Storage::url($file)->header('Content-Type', mime_content_type($file)));
}
if (request('inline') == 'true') {
return JsonResponse::create(['error' => 'Failed validation: '], 500);
$headers = [
'Content-Disposition' => 'inline',
];
return Storage::download($file, $log->filename, $headers);
}
return StorageHelper::downloader($file);

View File

@@ -6,32 +6,27 @@ use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Http\Requests\ImageUploadRequest;
use App\Models\Actionlog;
use Illuminate\Support\Facades\Log;
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\CheckoutRequest;
use App\Models\Company;
use App\Models\Location;
use App\Models\Setting;
use App\Models\Statuslabel;
use App\Models\User;
use Auth;
use Illuminate\Support\Facades\Auth;
use App\View\Label;
use Carbon\Carbon;
use DB;
use Gate;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Facades\Gate;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Cookie;
use Input;
use Intervention\Image\Facades\Image;
use Illuminate\Support\Facades\Validator;
use League\Csv\Reader;
use League\Csv\Statement;
use Paginator;
use Redirect;
use Response;
use Slack;
use Str;
use TCPDF;
use View;
use Illuminate\Support\Facades\Redirect;
/**
* This class controls all actions related to assets for
@@ -140,8 +135,9 @@ class AssetsController extends Controller
$asset->depreciate = '0';
$asset->status_id = request('status_id');
$asset->warranty_months = request('warranty_months', null);
$asset->purchase_cost = Helper::ParseCurrency($request->get('purchase_cost'));
$asset->purchase_cost = request('purchase_cost');
$asset->purchase_date = request('purchase_date', null);
$asset->asset_eol_date = request('asset_eol_date', $asset->present()->eol_date());
$asset->assigned_to = request('assigned_to', null);
$asset->supplier_id = request('supplier_id', null);
$asset->requestable = request('requestable', 0);
@@ -170,9 +166,9 @@ class AssetsController extends Controller
if ($field->field_encrypted == '1') {
if (Gate::allows('admin')) {
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = \Crypt::encrypt(implode(', ', $request->input($field->db_column)));
$asset->{$field->db_column} = Crypt::encrypt(implode(', ', $request->input($field->db_column)));
} else {
$asset->{$field->db_column} = \Crypt::encrypt($request->input($field->db_column));
$asset->{$field->db_column} = Crypt::encrypt($request->input($field->db_column));
}
}
} else {
@@ -295,10 +291,10 @@ class AssetsController extends Controller
/**
* Validate and process asset edit form.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
* @return \Illuminate\Http\RedirectResponse|Redirect
*@since [v1.0]
* @return Redirect
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function update(ImageUploadRequest $request, $assetId = null)
{
@@ -311,8 +307,24 @@ class AssetsController extends Controller
$asset->status_id = $request->input('status_id', null);
$asset->warranty_months = $request->input('warranty_months', null);
$asset->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost', null));
$asset->purchase_cost = $request->input('purchase_cost', null);
$asset->purchase_date = $request->input('purchase_date', null);
if ($request->filled('purchase_date') && !$request->filled('asset_eol_date') && $asset->model->eol) {
$asset->purchase_date = $request->input('purchase_date', null);
$asset->asset_eol_date = Carbon::parse($request->input('purchase_date'))->addMonths($asset->model->eol)->format('Y-m-d');
} elseif ($request->filled('asset_eol_date')) {
$asset->asset_eol_date = $request->input('asset_eol_date', null);
$months = Carbon::parse($asset->asset_eol_date)->diffInMonths($asset->purchase_date);
if($asset->model->eol) {
if($months != $asset->model->eol) {
$asset->eol_explicit = true;
} else {
$asset->eol_explicit = false;
}
} else {
$asset->eol_explicit = true;
}
}
$asset->supplier_id = $request->input('supplier_id', null);
$asset->expected_checkin = $request->input('expected_checkin', null);
@@ -321,6 +333,12 @@ class AssetsController extends Controller
$asset->rtd_location_id = $request->input('rtd_location_id', null);
$asset->byod = $request->input('byod', 0);
$status = Statuslabel::find($asset->status_id);
if($status->archived){
$asset->assigned_to = null;
}
if ($asset->assigned_to == '') {
$asset->location_id = $request->input('rtd_location_id', null);
}
@@ -331,7 +349,7 @@ class AssetsController extends Controller
unlink(public_path().'/uploads/assets/'.$asset->image);
$asset->image = '';
} catch (\Exception $e) {
\Log::info($e);
Log::info($e);
}
}
@@ -359,9 +377,9 @@ class AssetsController extends Controller
if ($field->field_encrypted == '1') {
if (Gate::allows('admin')) {
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = \Crypt::encrypt(implode(', ', $request->input($field->db_column)));
$asset->{$field->db_column} = Crypt::encrypt(implode(', ', $request->input($field->db_column)));
} else {
$asset->{$field->db_column} = \Crypt::encrypt($request->input($field->db_column));
$asset->{$field->db_column} = Crypt::encrypt($request->input($field->db_column));
}
}
} else {
@@ -409,7 +427,7 @@ class AssetsController extends Controller
try {
Storage::disk('public')->delete('assets'.'/'.$asset->image);
} catch (\Exception $e) {
\Log::debug($e);
Log::debug($e);
}
}
@@ -443,11 +461,12 @@ class AssetsController extends Controller
* @since [v3.0]
* @return Redirect
*/
public function getAssetByTag(Request $request)
public function getAssetByTag(Request $request, $tag=null)
{
$tag = $tag ? $tag : $request->get('assetTag');
$topsearch = ($request->get('topsearch') == 'true');
if (! $asset = Asset::where('asset_tag', '=', $request->get('assetTag'))->first()) {
if (! $asset = Asset::where('asset_tag', '=', $tag)->first()) {
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
}
$this->authorize('view', $asset);
@@ -523,7 +542,7 @@ class AssetsController extends Controller
return response($barcode_obj->getPngData())->header('Content-type', 'image/png');
} catch (\Exception $e) {
\Log::debug('The barcode format is invalid.');
Log::debug('The barcode format is invalid.');
return response(file_get_contents(public_path('uploads/barcodes/invalid_barcode.gif')))->header('Content-type', 'image/gif');
}
@@ -544,9 +563,11 @@ class AssetsController extends Controller
$asset = Asset::find($assetId);
$this->authorize('view', $asset);
return view('hardware/labels')
->with('assets', Asset::find($asset))
return (new Label())
->with('assets', collect([ $asset ]))
->with('settings', Setting::getSettings())
->with('template', request()->get('template'))
->with('offset', request()->get('offset'))
->with('bulkedit', false)
->with('count', 0);
}
@@ -624,7 +645,11 @@ class AssetsController extends Controller
$csv->setHeaderOffset(0);
$header = $csv->getHeader();
$isCheckinHeaderExplicit = in_array('checkin date', (array_map('strtolower', $header)));
try {
$results = $csv->getRecords();
} catch (\Exception $e) {
return back()->with('error', trans('general.error_in_import_file', ['error' => $e->getMessage()]));
}
$item = [];
$status = [];
$status['error'] = [];
@@ -760,7 +785,7 @@ class AssetsController extends Controller
}
/**
* Retore a deleted asset.
* Restore a deleted asset.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
@@ -838,7 +863,7 @@ class AssetsController extends Controller
'next_audit_date' => 'date|nullable',
];
$validator = \Validator::make($request->all(), $rules);
$validator = Validator::make($request->all(), $rules);
if ($validator->fails()) {
return response()->json(Helper::formatStandardApiResponse('error', null, $validator->errors()->all()));
@@ -855,7 +880,7 @@ class AssetsController extends Controller
// Check to see if they checked the box to update the physical location,
// not just note it in the audit notes
if ($request->input('update_location') == '1') {
\Log::debug('update location in audit');
Log::debug('update location in audit');
$asset->location_id = $request->input('location_id');
}

View File

@@ -8,11 +8,13 @@ use App\Http\Controllers\CheckInOutRequest;
use App\Http\Controllers\Controller;
use App\Models\Asset;
use App\Models\Setting;
use App\View\Label;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Session;
use App\Http\Requests\AssetCheckoutRequest;
use App\Models\CustomField;
class BulkAssetsController extends Controller
{
@@ -29,7 +31,7 @@ class BulkAssetsController extends Controller
*/
public function edit(Request $request)
{
$this->authorize('update', Asset::class);
$this->authorize('view', Asset::class);
if (! $request->filled('ids')) {
return redirect()->back()->with('error', trans('admin/hardware/message.update.no_assets_selected'));
@@ -41,25 +43,58 @@ class BulkAssetsController extends Controller
$asset_ids = array_values(array_unique($request->input('ids')));
//custom fields logic
$asset_custom_field = Asset::with(['model.fieldset.fields', 'model'])->whereIn('id', $asset_ids)->whereHas('model', function ($query) {
return $query->where('fieldset_id', '!=', null);
})->get();
$models = $asset_custom_field->unique('model_id');
$modelNames = [];
foreach($models as $model) {
$modelNames[] = $model->model->name;
}
if ($request->filled('bulk_actions')) {
switch ($request->input('bulk_actions')) {
case 'labels':
return view('hardware/labels')
->with('assets', Asset::find($asset_ids))
$this->authorize('view', Asset::class);
$assets_found = Asset::find($asset_ids);
if ($assets_found->isEmpty()){
return redirect()->back();
}
return (new Label)
->with('assets', $assets_found)
->with('settings', Setting::getSettings())
->with('bulkedit', true)
->with('count', 0);
case 'delete':
$this->authorize('delete', Asset::class);
$assets = Asset::with('assignedTo', 'location')->find($asset_ids);
$assets->each(function ($asset) {
$this->authorize('delete', $asset);
});
return view('hardware/bulk-delete')->with('assets', $assets);
case 'restore':
$this->authorize('update', Asset::class);
$assets = Asset::withTrashed()->find($asset_ids);
$assets->each(function ($asset) {
$this->authorize('delete', $asset);
});
return view('hardware/bulk-restore')->with('assets', $assets);
case 'edit':
$this->authorize('update', Asset::class);
return view('hardware/bulk')
->with('assets', $asset_ids)
->with('statuslabel_list', Helper::statusLabelList());
->with('statuslabel_list', Helper::statusLabelList())
->with('models', $models->pluck(['model']))
->with('modelNames', $modelNames);
}
}
@@ -77,6 +112,7 @@ class BulkAssetsController extends Controller
public function update(Request $request)
{
$this->authorize('update', Asset::class);
$error_bag = [];
// Get the back url from the session and then destroy the session
$bulk_back_url = route('hardware.index');
@@ -85,12 +121,21 @@ class BulkAssetsController extends Controller
}
if (! $request->filled('ids') || count($request->input('ids')) <= 0) {
$custom_field_columns = CustomField::all()->pluck('db_column')->toArray();
if(Session::exists('ids')) {
$assets = Session::get('ids');
} elseif (! $request->filled('ids') || count($request->input('ids')) <= 0) {
return redirect($bulk_back_url)->with('error', trans('admin/hardware/message.update.no_assets_selected'));
}
$assets = array_keys($request->input('ids'));
if ($request->anyFilled($custom_field_columns)) {
$custom_fields_present = true;
} else {
$custom_fields_present = false;
}
if (($request->filled('purchase_date'))
|| ($request->filled('expected_checkin'))
|| ($request->filled('purchase_cost'))
@@ -102,8 +147,12 @@ class BulkAssetsController extends Controller
|| ($request->filled('company_id'))
|| ($request->filled('status_id'))
|| ($request->filled('model_id'))
|| ($request->filled('next_audit_date'))
|| ($request->filled('null_purchase_date'))
|| ($request->filled('null_expected_checkin_date'))
|| ($request->filled('null_next_audit_date'))
|| ($request->anyFilled($custom_field_columns))
) {
foreach ($assets as $assetId) {
@@ -116,7 +165,11 @@ class BulkAssetsController extends Controller
->conditionallyAddItem('requestable')
->conditionallyAddItem('status_id')
->conditionallyAddItem('supplier_id')
->conditionallyAddItem('warranty_months');
->conditionallyAddItem('warranty_months')
->conditionallyAddItem('next_audit_date');
foreach ($custom_field_columns as $key => $custom_field_column) {
$this->conditionallyAddItem($custom_field_column);
}
if ($request->input('null_purchase_date')=='1') {
$this->update_array['purchase_date'] = null;
@@ -126,8 +179,12 @@ class BulkAssetsController extends Controller
$this->update_array['expected_checkin'] = null;
}
if ($request->input('null_next_audit_date')=='1') {
$this->update_array['next_audit_date'] = null;
}
if ($request->filled('purchase_cost')) {
$this->update_array['purchase_cost'] = Helper::ParseCurrency($request->input('purchase_cost'));
$this->update_array['purchase_cost'] = $request->input('purchase_cost');
}
if ($request->filled('company_id')) {
@@ -145,11 +202,11 @@ class BulkAssetsController extends Controller
}
$changed = [];
$asset = Asset::where('id' ,$assetId)->get();
$assetCollection = Asset::where('id' ,$assetId)->get();
foreach ($this->update_array as $key => $value) {
if ($this->update_array[$key] != $asset->toArray()[0][$key]) {
$changed[$key]['old'] = $asset->toArray()[0][$key];
if ($this->update_array[$key] != $assetCollection->toArray()[0][$key]) {
$changed[$key]['old'] = $assetCollection->toArray()[0][$key];
$changed[$key]['new'] = $this->update_array[$key];
}
}
@@ -162,16 +219,46 @@ class BulkAssetsController extends Controller
$logAction->log_meta = json_encode($changed);
$logAction->logaction('update');
DB::table('assets')
->where('id', $assetId)
->update($this->update_array);
} // endforeach
return redirect($bulk_back_url)->with('success', trans('admin/hardware/message.update.success'));
if($custom_fields_present) {
$asset = Asset::find($assetId);
$assetCustomFields = $asset->model()->first()->fieldset;
if($assetCustomFields && $assetCustomFields->fields) {
foreach ($assetCustomFields->fields as $field) {
if (array_key_exists($field->db_column, $this->update_array)) {
$asset->{$field->db_column} = $this->update_array[$field->db_column];
$saved = $asset->save();
if(!$saved) {
$error_bag[] = $asset->getErrors();
}
continue;
} else {
$array = $this->update_array;
array_except($array, $field->db_column);
$asset->save($array);
}
if (!$asset->save()) {
$error_bag[] = $asset->getErrors();
}
}
}
} else {
Asset::find($assetId)->update($this->update_array);
}
}
if(!empty($error_bag)) {
$errors = [];
//find the customfield name from the name of the messagebag items
foreach ($error_bag as $key => $bag) {
foreach($bag->keys() as $key => $value) {
CustomField::where('db_column', $value)->get()->map(function($item) use (&$errors) {
$errors[] = $item->name;
});
}
}
return redirect($bulk_back_url)->with('bulk_errors', array_unique($errors));
}
return redirect($bulk_back_url)->with('success', trans('admin/hardware/message.update.success'));
}
// no values given, nothing to update
return redirect($bulk_back_url)->with('warning', trans('admin/hardware/message.update.nothing_updated'));
}
@@ -288,7 +375,8 @@ class BulkAssetsController extends Controller
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')), null);
$error = $asset->checkOut($target, $admin, $checkout_at, $expected_checkin, e($request->get('note')), $asset->name, null);
if ($target->location_id != '') {
$asset->location_id = $target->location_id;
@@ -311,5 +399,19 @@ class BulkAssetsController extends Controller
} catch (ModelNotFoundException $e) {
return redirect()->route('hardware.bulkcheckout.show')->with('error', $e->getErrors());
}
}
public function restore(Request $request) {
$this->authorize('update', Asset::class);
$assetIds = $request->get('ids');
if (empty($assetIds)) {
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.restore.nothing_updated'));
} else {
foreach ($assetIds as $key => $assetId) {
$asset = Asset::withTrashed()->find($assetId);
$asset->restore();
}
return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.restore.success'));
}
}
}

View File

@@ -191,9 +191,11 @@ class LoginController extends Controller
$ldap_attr = Ldap::parseAndMapLdapAttributes($ldap_user);
$user->password = $user->noPassword();
if (Setting::getSettings()->ldap_pw_sync=='1') {
$user->password = bcrypt($request->input('password'));
}
$user->email = $ldap_attr['email'];
$user->first_name = $ldap_attr['firstname'];
$user->last_name = $ldap_attr['lastname']; //FIXME (or TODO?) - do we need to map additional fields that we now support? E.g. country, phone, etc.

View File

@@ -92,7 +92,7 @@ class BulkAssetModelsController extends Controller
AssetModel::whereIn('id', $models_raw_array)->update($update_array);
return redirect()->route('models.index')
->with('success', trans('admin/models/message.bulkedit.success'));
->with('success', trans_choice('admin/models/message.bulkedit.success', count($models_raw_array), ['model_count' => count($models_raw_array)]));
}
return redirect()->route('models.index')

View File

@@ -60,6 +60,9 @@ final class CompaniesController extends Controller
$company = new Company;
$company->name = $request->input('name');
$company->phone = $request->input('phone');
$company->fax = $request->input('fax');
$company->email = $request->input('email');
$company = $request->handleImages($company);
@@ -111,6 +114,9 @@ final class CompaniesController extends Controller
$this->authorize('update', $company);
$company->name = $request->input('name');
$company->phone = $request->input('phone');
$company->fax = $request->input('fax');
$company->email = $request->input('email');
$company = $request->handleImages($company);
@@ -119,8 +125,7 @@ final class CompaniesController extends Controller
->with('success', trans('admin/companies/message.update.success'));
}
return redirect()->route('companies.edit', ['company' => $companyId])
->with('error', trans('admin/companies/message.update.error'));
return redirect()->back()->withInput()->withErrors($company->getErrors());
}
/**

View File

@@ -56,10 +56,11 @@ class ComponentCheckinController extends Controller
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function store(Request $request, $component_asset_id)
public function store(Request $request, $component_asset_id, $backto = null)
{
if ($component_assets = DB::table('components_assets')->find($component_asset_id)) {
if (is_null($component = Component::find($component_assets->component_id))) {
return redirect()->route('components.index')->with('error',
trans('admin/components/message.not_found'));
}
@@ -95,6 +96,10 @@ class ComponentCheckinController extends Controller
$asset = Asset::find($component_assets->asset_id);
event(new CheckoutableCheckedIn($component, $asset, Auth::user(), $request->input('note'), Carbon::now()));
if($backto == 'asset'){
return redirect()->route('hardware.view', $asset->id)->with('success',
trans('admin/components/message.checkin.success'));
}
return redirect()->route('components.index')->with('success',
trans('admin/components/message.checkin.success'));

View File

@@ -33,6 +33,11 @@ class ComponentCheckoutController extends Controller
}
$this->authorize('checkout', $component);
// Make sure there is at least one available to checkout
if ($component->numRemaining() <= 0){
return redirect()->route('components.index')->with('error', trans('admin/components/message.checkout.unavailable'));
}
return view('components/checkout', compact('component'));
}
@@ -50,7 +55,7 @@ class ComponentCheckoutController extends Controller
public function store(Request $request, $componentId)
{
// Check if the component exists
if (is_null($component = Component::find($componentId))) {
if (!$component = Component::find($componentId)) {
// Redirect to the component management page with error
return redirect()->route('components.index')->with('error', trans('admin/components/message.not_found'));
}
@@ -58,9 +63,15 @@ class ComponentCheckoutController extends Controller
$this->authorize('checkout', $component);
$max_to_checkout = $component->numRemaining();
// Make sure there are at least the requested number of components available to checkout
if ($max_to_checkout < $request->get('assigned_qty')) {
return redirect()->back()->withInput()->with('error', trans('admin/components/message.checkout.unavailable', ['remaining' => $max_to_checkout, 'requested' => $request->get('assigned_qty')]));
}
$validator = Validator::make($request->all(), [
'asset_id' => 'required',
'assigned_qty' => "required|numeric|between:1,$max_to_checkout",
'asset_id' => 'required|exists:assets,id',
'assigned_qty' => "required|numeric|min:1|digits_between:1,$max_to_checkout",
]);
if ($validator->fails()) {
@@ -69,24 +80,17 @@ class ComponentCheckoutController extends Controller
->withInput();
}
$admin_user = Auth::user();
$asset_id = e($request->input('asset_id'));
// Check if the user exists
if (is_null($asset = Asset::find($asset_id))) {
// Redirect to the component management page with error
return redirect()->route('components.index')->with('error', trans('admin/components/message.asset_does_not_exist'));
}
$asset = Asset::find($request->input('asset_id'));
// Update the component data
$component->asset_id = $asset_id;
$component->asset_id = $request->input('asset_id');
$component->assets()->attach($component->id, [
'component_id' => $component->id,
'user_id' => $admin_user->id,
'user_id' => Auth::user(),
'created_at' => date('Y-m-d H:i:s'),
'assigned_qty' => $request->input('assigned_qty'),
'asset_id' => $asset_id,
'asset_id' => $request->input('asset_id'),
'note' => $request->input('note'),
]);

View File

@@ -71,13 +71,14 @@ class ComponentsController extends Controller
$component = new Component();
$component->name = $request->input('name');
$component->category_id = $request->input('category_id');
$component->supplier_id = $request->input('supplier_id');
$component->location_id = $request->input('location_id');
$component->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$component->order_number = $request->input('order_number', null);
$component->min_amt = $request->input('min_amt', null);
$component->serial = $request->input('serial', null);
$component->purchase_date = $request->input('purchase_date', null);
$component->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost', null));
$component->purchase_cost = $request->input('purchase_cost', null);
$component->qty = $request->input('qty');
$component->user_id = Auth::id();
$component->notes = $request->input('notes');
@@ -145,13 +146,14 @@ class ComponentsController extends Controller
// Update the component data
$component->name = $request->input('name');
$component->category_id = $request->input('category_id');
$component->supplier_id = $request->input('supplier_id');
$component->location_id = $request->input('location_id');
$component->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$component->order_number = $request->input('order_number');
$component->min_amt = $request->input('min_amt');
$component->serial = $request->input('serial');
$component->purchase_date = $request->input('purchase_date');
$component->purchase_cost = Helper::ParseCurrency(request('purchase_cost'));
$component->purchase_cost = request('purchase_cost');
$component->qty = $request->input('qty');
$component->notes = $request->input('notes');

View File

@@ -132,7 +132,7 @@ class ComponentsFilesController extends Controller
* @return \Symfony\Component\HttpFoundation\Response
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($componentId = null, $fileId = null, $download = true)
public function show($componentId = null, $fileId = null)
{
\Log::debug('Private filesystem is: '.config('filesystems.default'));
$component = Component::find($componentId);
@@ -142,7 +142,7 @@ class ComponentsFilesController extends Controller
$this->authorize('view', $component);
$this->authorize('components.files', $component);
if (! $log = Actionlog::find($fileId)) {
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');
}
@@ -157,20 +157,16 @@ class ComponentsFilesController extends Controller
->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);
}
if (config('filesystems.default') == 'local') { // TODO - is there any way to fix this at the StorageHelper layer?
return StorageHelper::downloader($file);
} else {
if ($download != 'true') {
\Log::debug('display the file');
if ($contents = file_get_contents(Storage::url($file))) { // TODO - this will fail on private S3 files or large public ones
return Response::make(Storage::url($file)->header('Content-Type', mime_content_type($file)));
}
return JsonResponse::create(['error' => 'Failed validation: '], 500);
}
return StorageHelper::downloader($file);
}
}
}

View File

@@ -24,9 +24,16 @@ class ConsumableCheckoutController extends Controller
*/
public function create($consumableId)
{
if (is_null($consumable = Consumable::find($consumableId))) {
if (is_null($consumable = Consumable::with('users')->find($consumableId))) {
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.does_not_exist'));
}
// Make sure there is at least one available to checkout
if ($consumable->numRemaining() <= 0){
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.checkout.unavailable'));
}
$this->authorize('checkout', $consumable);
return view('consumables/checkout', compact('consumable'));
@@ -44,12 +51,18 @@ class ConsumableCheckoutController extends Controller
*/
public function store(Request $request, $consumableId)
{
if (is_null($consumable = Consumable::find($consumableId))) {
if (is_null($consumable = Consumable::with('users')->find($consumableId))) {
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.not_found'));
}
$this->authorize('checkout', $consumable);
// Make sure there is at least one available to checkout
if ($consumable->numRemaining() <= 0) {
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.checkout.unavailable'));
}
$admin_user = Auth::user();
$assigned_to = e($request->input('assigned_to'));

View File

@@ -68,6 +68,7 @@ class ConsumablesController extends Controller
$consumable = new Consumable();
$consumable->name = $request->input('name');
$consumable->category_id = $request->input('category_id');
$consumable->supplier_id = $request->input('supplier_id');
$consumable->location_id = $request->input('location_id');
$consumable->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$consumable->order_number = $request->input('order_number');
@@ -76,7 +77,7 @@ class ConsumablesController extends Controller
$consumable->model_number = $request->input('model_number');
$consumable->item_no = $request->input('item_no');
$consumable->purchase_date = $request->input('purchase_date');
$consumable->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost'));
$consumable->purchase_cost = $request->input('purchase_cost');
$consumable->qty = $request->input('qty');
$consumable->user_id = Auth::id();
$consumable->notes = $request->input('notes');
@@ -144,6 +145,7 @@ class ConsumablesController extends Controller
$consumable->name = $request->input('name');
$consumable->category_id = $request->input('category_id');
$consumable->supplier_id = $request->input('supplier_id');
$consumable->location_id = $request->input('location_id');
$consumable->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$consumable->order_number = $request->input('order_number');
@@ -152,7 +154,7 @@ class ConsumablesController extends Controller
$consumable->model_number = $request->input('model_number');
$consumable->item_no = $request->input('item_no');
$consumable->purchase_date = $request->input('purchase_date');
$consumable->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost'));
$consumable->purchase_cost = $request->input('purchase_cost');
$consumable->qty = Helper::ParseFloat($request->input('qty'));
$consumable->notes = $request->input('notes');

View File

@@ -131,7 +131,7 @@ class ConsumablesFilesController extends Controller
* @return \Symfony\Consumable\HttpFoundation\Response
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($consumableId = null, $fileId = null, $download = true)
public function show($consumableId = null, $fileId = null)
{
$consumable = Consumable::find($consumableId);
@@ -140,7 +140,7 @@ class ConsumablesFilesController extends Controller
$this->authorize('view', $consumable);
$this->authorize('consumables.files', $consumable);
if (! $log = Actionlog::find($fileId)) {
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');
}
@@ -155,22 +155,19 @@ class ConsumablesFilesController extends Controller
->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);
} else {
if ($download != 'true') {
\Log::debug('display the file');
if ($contents = file_get_contents(Storage::url($file))) { // TODO - this will fail on private S3 files or large public ones
return Response::make(Storage::url($file)->header('Content-Type', mime_content_type($file)));
}
return JsonResponse::create(['error' => 'Failed validation: '], 500);
}
return StorageHelper::downloader($file);
}
}
}

View File

@@ -9,11 +9,11 @@
*
* **THIS DOCUMENTATION DOES NOT COVER INSTALLATION.** If you're here and you're not a
* developer, you're probably in the wrong place. Please see the
* [Installation documentation](http://docs.snipeitapp.com) for
* [Installation documentation](https://snipe-it.readme.io) for
* information on how to install Snipe-IT.
*
* To learn how to set up a development environment and get started developing for Snipe-IT,
* please see the [contributing documentation](http://docs.snipeitapp.com/contributing.html).
* please see the [contributing documentation](https://snipe-it.readme.io/docs/contributing-overview).
*
* Only the Snipe-IT specific controllers, models, helpers, service providers,
* etc have been included in this documentation (excluding vendors, Laravel core, etc)

View File

@@ -7,6 +7,7 @@ use App\Http\Requests\CustomFieldRequest;
use App\Models\CustomField;
use App\Models\CustomFieldset;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Redirect;
/**
@@ -45,7 +46,7 @@ class CustomFieldsController extends Controller
* @see CustomFieldsController::storeField()
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v5.1.5]
* @return Redirect
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show()
@@ -63,14 +64,17 @@ class CustomFieldsController extends Controller
* @return \Illuminate\Support\Facades\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function create()
public function create(Request $request)
{
$this->authorize('create', CustomField::class);
$fieldsets = CustomFieldset::get();
return view('custom_fields.fields.edit', [
'predefinedFormats' => Helper::predefined_formats(),
'customFormat' => '',
])->with('field', new CustomField());
'fieldsets' => $fieldsets,
'field' => new CustomField(),
]);
}
/**
@@ -79,7 +83,7 @@ class CustomFieldsController extends Controller
* @see CustomFieldsController::createField()
* @author [Brady Wetherington] [<uberbrady@gmail.com>]
* @since [v1.8]
* @return Redirect
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function store(CustomFieldRequest $request)
@@ -104,6 +108,8 @@ class CustomFieldsController extends Controller
"show_in_email" => $show_in_email,
"is_unique" => $request->get("is_unique", 0),
"display_in_user_view" => $display_in_user_view,
"auto_add_to_fieldsets" => $request->get("auto_add_to_fieldsets", 0),
"show_in_listview" => $request->get("show_in_listview", 0),
"user_id" => Auth::id()
]);
@@ -115,10 +121,20 @@ class CustomFieldsController extends Controller
}
if ($field->save()) {
// Sync fields with fieldsets
$fieldset_array = $request->input('associate_fieldsets');
if ($request->has('associate_fieldsets') && (is_array($fieldset_array))) {
$field->fieldset()->sync(array_keys($fieldset_array));
} else {
$field->fieldset()->sync([]);
}
return redirect()->route('fields.index')->with('success', trans('admin/custom_fields/message.field.create.success'));
}
return redirect()->back()->withInput()
return redirect()->back()->with('selected_fieldsets', $request->input('associate_fieldsets'))->withInput()
->with('error', trans('admin/custom_fields/message.field.create.error'));
}
@@ -128,7 +144,7 @@ class CustomFieldsController extends Controller
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v3.0]
* @return Redirect
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function deleteFieldFromFieldset($field_id, $fieldset_id)
@@ -148,7 +164,6 @@ class CustomFieldsController extends Controller
} else {
return redirect()->back()->withErrors(['message' => "Field is in use and cannot be deleted."]);
}
}
return redirect()->back()->withErrors(['message' => "Error deleting field from fieldset"]);
@@ -161,7 +176,7 @@ class CustomFieldsController extends Controller
*
* @author [Brady Wetherington] [<uberbrady@gmail.com>]
* @since [v1.8]
* @return Redirect
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function destroy($field_id)
@@ -190,12 +205,12 @@ class CustomFieldsController extends Controller
* @return \Illuminate\Support\Facades\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function edit($id)
public function edit(Request $request, $id)
{
if ($field = CustomField::find($id)) {
$this->authorize('update', $field);
$fieldsets = CustomFieldset::get();
$customFormat = '';
if ((stripos($field->format, 'regex') === 0) && ($field->format !== CustomField::PREDEFINED_FORMATS['MAC'])) {
$customFormat = $field->format;
@@ -204,6 +219,7 @@ class CustomFieldsController extends Controller
return view('custom_fields.fields.edit', [
'field' => $field,
'customFormat' => $customFormat,
'fieldsets' => $fieldsets,
'predefinedFormats' => Helper::predefined_formats(),
]);
}
@@ -222,7 +238,7 @@ class CustomFieldsController extends Controller
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
* @since [v4.0]
* @return Redirect
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function update(CustomFieldRequest $request, $id)
@@ -249,6 +265,8 @@ class CustomFieldsController extends Controller
$field->show_in_email = $show_in_email;
$field->is_unique = $request->get("is_unique", 0);
$field->display_in_user_view = $display_in_user_view;
$field->auto_add_to_fieldsets = $request->get("auto_add_to_fieldsets", 0);
$field->show_in_listview = $request->get("show_in_listview", 0);
if ($request->get('format') == 'CUSTOM REGEX') {
$field->format = e($request->get('custom_format'));
@@ -261,6 +279,16 @@ class CustomFieldsController extends Controller
}
if ($field->save()) {
// Sync fields with fieldsets
$fieldset_array = $request->input('associate_fieldsets');
if ($request->has('associate_fieldsets') && (is_array($fieldset_array))) {
$field->fieldset()->sync(array_keys($fieldset_array));
} else {
$field->fieldset()->sync([]);
}
return redirect()->route('fields.index')->with('success', trans('admin/custom_fields/message.field.update.success'));
}

View File

@@ -93,16 +93,27 @@ class CustomFieldsetsController extends Controller
{
$this->authorize('create', CustomField::class);
$cfset = new CustomFieldset([
'name' => e($request->get('name')),
$fieldset = new CustomFieldset([
'name' => $request->get('name'),
'user_id' => Auth::user()->id,
]);
$validator = Validator::make($request->all(), $cfset->rules);
if ($validator->passes()) {
$cfset->save();
$validator = Validator::make($request->all(), $fieldset->rules);
return redirect()->route('fieldsets.show', [$cfset->id])
if ($validator->passes()) {
$fieldset->save();
// Sync fieldset with auto_add_to_fieldsets
$fields = CustomField::select('id')->where('auto_add_to_fieldsets', '=', '1')->get();
if ($fields->count() > 0) {
foreach ($fields as $field) {
$field_ids[] = $field->id;
}
$fieldset->fields()->sync($field_ids);
}
return redirect()->route('fieldsets.show', [$fieldset->id])
->with('success', trans('admin/custom_fields/message.fieldset.create.success'));
}

View File

@@ -170,6 +170,8 @@ class DepartmentsController extends Controller
$department->manager_id = ($request->filled('manager_id') ? $request->input('manager_id') : null);
$department->location_id = ($request->filled('location_id') ? $request->input('location_id') : null);
$department->company_id = ($request->filled('company_id') ? $request->input('company_id') : null);
$department->phone = $request->input('phone');
$department->fax = $request->input('fax');
$department = $request->handleImages($department);

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
use Laravel\Socialite\Facades\Socialite;
use Laravel\Socialite\Two\InvalidStateException;
use App\Models\Setting;
class GoogleAuthController extends Controller
{
/**
* We need this constructor so that we override the socialite expected config variables,
* since we want to allow this to be changed via database fields
*/
public function __construct()
{
parent::__construct();
$setting = Setting::getSettings();
config(['services.google.redirect' => config('app.url').'/google/callback']);
config(['services.google.client_id' => $setting->google_client_id]);
config(['services.google.client_secret' => $setting->google_client_secret]);
}
public function redirectToGoogle()
{
return Socialite::driver('google')->redirect();
}
public function handleGoogleCallback()
{
try {
$socialUser = Socialite::driver('google')->user();
\Log::debug('Google user found in Google Workspace');
} catch (InvalidStateException $exception) {
\Log::debug('Google user NOT found in Google Workspace');
return redirect()->route('login')
->withErrors(
[
'username' => [
trans('auth/general.google_login_failed')
],
]
);
}
$user = User::where('username', $socialUser->getEmail())->first();
if ($user) {
\Log::debug('Google user '.$socialUser->getEmail().' found in Snipe-IT');
$user->update([
'avatar' => $socialUser->avatar,
]);
Auth::login($user, true);
return redirect()->route('home');
}
\Log::debug('Google user '.$socialUser->getEmail().' NOT found in Snipe-IT');
return redirect()->route('login')
->withErrors(
[
'username' => [
trans('auth/general.google_login_failed'),
],
]
);
}
}

View File

@@ -92,7 +92,7 @@ class GroupsController extends Controller
return view('groups.edit', compact('group', 'permissions', 'selected_array', 'groupPermissions'));
}
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found'));
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', ['id' => $id]));
}
/**
@@ -107,7 +107,7 @@ class GroupsController extends Controller
public function update(Request $request, $id = null)
{
if (! $group = Group::find($id)) {
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', ['id' => $id]));
}
$group->name = $request->input('name');
$group->permissions = json_encode($request->input('permission'));
@@ -133,14 +133,13 @@ class GroupsController extends Controller
* @return \Illuminate\Http\RedirectResponse
* @throws \Exception
*/
public function destroy($id = null)
public function destroy($id)
{
if (! config('app.lock_passwords')) {
if (! $group = Group::find($id)) {
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', ['id' => $id]));
}
$group->delete();
// Redirect to the group management page
return redirect()->route('groups.index')->with('success', trans('admin/groups/message.success.delete'));
}
@@ -164,6 +163,6 @@ class GroupsController extends Controller
return view('groups/view', compact('group'));
}
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', ['id' => $id]));
}
}

View File

@@ -1,22 +0,0 @@
<?php
namespace App\Http\Controllers;
use App\Http\Transformers\ImportsTransformer;
use App\Models\Asset;
use App\Models\Import;
class ImportsController extends Controller
{
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function index()
{
$this->authorize('import');
$imports = (new ImportsTransformer)->transformImports(Import::latest()->get());
return view('importer/import')->with('imports', $imports);
}
}

View File

@@ -0,0 +1,77 @@
<?php
namespace App\Http\Controllers;
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\Category;
use App\Models\Company;
use App\Models\Labels\Label;
use App\Models\Manufacturer;
use App\Models\Setting;
use App\Models\User;
use App\View\Label as LabelView;
use Illuminate\Support\Facades\Storage;
class LabelsController extends Controller
{
/**
* Returns the Label view with test data
*
* @author Grant Le Roux <grant.leroux+snipe-it@gmail.com>
* @param string $labelName
* @return \Illuminate\Contracts\View\View
*/
public function show(string $labelName)
{
$labelName = str_replace('/', '\\', $labelName);
$template = Label::find($labelName);
$exampleAsset = new Asset();
$exampleAsset->id = 999999;
$exampleAsset->name = 'JEN-867-5309';
$exampleAsset->asset_tag = '100001';
$exampleAsset->serial = 'SN9876543210';
$exampleAsset->company = new Company();
$exampleAsset->company->id = 999999;
$exampleAsset->company->name = 'Test Company Limited';
$exampleAsset->company->image = 'company-image-test.png';
$exampleAsset->assignedto = new User();
$exampleAsset->assignedto->id = 999999;
$exampleAsset->assignedto->first_name = 'Test';
$exampleAsset->assignedto->last_name = 'Person';
$exampleAsset->assignedto->username = 'Test.Person';
$exampleAsset->assignedto->employee_num = '0123456789';
$exampleAsset->model = new AssetModel();
$exampleAsset->model->id = 999999;
$exampleAsset->model->name = 'Test Model';
$exampleAsset->model->model_number = 'MDL5678';
$exampleAsset->model->manufacturer = new Manufacturer();
$exampleAsset->model->manufacturer->id = 999999;
$exampleAsset->model->manufacturer->name = 'Test Manufacturing Inc.';
$exampleAsset->model->category = new Category();
$exampleAsset->model->category->id = 999999;
$exampleAsset->model->category->name = 'Test Category';
$settings = Setting::getSettings();
if (request()->has('settings')) {
$overrides = request()->get('settings');
foreach ($overrides as $key => $value) {
$settings->$key = $value;
}
}
return (new LabelView())
->with('assets', collect([$exampleAsset]))
->with('settings', $settings)
->with('template', $template)
->with('bulkedit', false)
->with('count', 0);
return redirect()->route('home')->with('error', trans('admin/labels/message.does_not_exist'));
}
}

View File

@@ -59,6 +59,12 @@ class LicenseCheckinController extends Controller
}
$license = License::find($licenseSeat->license_id);
// LicenseSeat is not assigned, it can't be checked in
if (is_null($licenseSeat->assigned_to) && is_null($licenseSeat->asset_id)) {
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkin.error'));
}
$this->authorize('checkout', $license);
if (! $license->reassignable) {
@@ -70,7 +76,7 @@ class LicenseCheckinController extends Controller
// Declare the rules for the form validation
$rules = [
'note' => 'string|nullable',
'notes' => 'string|nullable',
];
// Create a new validator instance from our validation rules
@@ -91,6 +97,7 @@ class LicenseCheckinController extends Controller
// Update the asset data
$licenseSeat->assigned_to = null;
$licenseSeat->asset_id = null;
$licenseSeat->notes = $request->input('notes');
// Was the asset updated?
if ($licenseSeat->save()) {
@@ -106,4 +113,61 @@ class LicenseCheckinController extends Controller
// Redirect to the license page with error
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkin.error'));
}
/**
* Bulk checkin all license seats
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @see LicenseCheckinController::create() method that provides the form view
* @since [v6.1.1]
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function bulkCheckin(Request $request, $licenseId) {
$license = License::findOrFail($licenseId);
$this->authorize('checkin', $license);
if (! $license->reassignable) {
// Not allowed to checkin
Session::flash('error', 'License not reassignable.');
return redirect()->back()->withInput();
}
$licenseSeatsByUser = LicenseSeat::where('license_id', '=', $licenseId)
->whereNotNull('assigned_to')
->with('user')
->get();
foreach ($licenseSeatsByUser as $user_seat) {
$user_seat->assigned_to = null;
if ($user_seat->save()) {
\Log::debug('Checking in '.$license->name.' from user '.$user_seat->username);
$user_seat->logCheckin($user_seat->user, trans('admin/licenses/general.bulk.checkin_all.log_msg'));
}
}
$licenseSeatsByAsset = LicenseSeat::where('license_id', '=', $licenseId)
->whereNotNull('asset_id')
->with('asset')
->get();
$count = 0;
foreach ($licenseSeatsByAsset as $asset_seat) {
$asset_seat->asset_id = null;
if ($asset_seat->save()) {
\Log::debug('Checking in '.$license->name.' from asset '.$asset_seat->asset_tag);
$asset_seat->logCheckin($asset_seat->asset, trans('admin/licenses/general.bulk.checkin_all.log_msg'));
$count++;
}
}
return redirect()->back()->with('success', trans_choice('admin/licenses/general.bulk.checkin_all.success', 2, ['count' => $count] ));
}
}

View File

@@ -30,15 +30,17 @@ class LicenseCheckoutController extends Controller
// Check that the license is valid
if ($license = License::find($licenseId)) {
$this->authorize('checkout', $license);
// If the license is valid, check that there is an available seat
if ($license->avail_seats_count < 1) {
return redirect()->route('licenses.index')->with('error', 'There are no available seats for this license');
}
return view('licenses/checkout', compact('license'));
}
$this->authorize('checkout', $license);
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.not_found'));
return view('licenses/checkout', compact('license'));
}
/**
@@ -61,6 +63,7 @@ class LicenseCheckoutController extends Controller
$licenseSeat = $this->findLicenseSeatToCheckout($license, $seatId);
$licenseSeat->user_id = Auth::id();
$licenseSeat->notes = $request->input('notes');
$checkoutMethod = 'checkoutTo'.ucwords(request('checkout_to_type'));
@@ -126,4 +129,70 @@ class LicenseCheckoutController extends Controller
return false;
}
/**
* Bulk checkin all license seats
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @see LicenseCheckinController::create() method that provides the form view
* @since [v6.1.1]
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function bulkCheckout($licenseId) {
\Log::debug('Checking out '.$licenseId.' via bulk');
$license = License::findOrFail($licenseId);
$this->authorize('checkin', $license);
$avail_count = $license->getAvailSeatsCountAttribute();
$users = User::whereNull('deleted_at')->where('autoassign_licenses', '=', 1)->with('licenses')->get();
\Log::debug($avail_count.' will be assigned');
if ($users->count() > $avail_count) {
\Log::debug('You do not have enough free seats to complete this task, so we will check out as many as we can. ');
}
// If the license is valid, check that there is an available seat
if ($license->availCount()->count() < 1) {
return redirect()->back()->with('error', trans('admin/licenses/general.bulk.checkout_all.error_no_seats'));
}
$assigned_count = 0;
foreach ($users as $user) {
// Check to make sure this user doesn't already have this license checked out to them
if ($user->licenses->where('id', '=', $licenseId)->count()) {
\Log::debug($user->username.' already has this license checked out to them. Skipping... ');
continue;
}
$licenseSeat = $license->freeSeat();
// Update the seat with checkout info
$licenseSeat->assigned_to = $user->id;
if ($licenseSeat->save()) {
$avail_count--;
$assigned_count++;
$licenseSeat->logCheckout(trans('admin/licenses/general.bulk.checkout_all.log_msg'), $user);
\Log::debug('License '.$license->name.' seat '.$licenseSeat->id.' checked out to '.$user->username);
}
if ($avail_count == 0) {
return redirect()->back()->with('warning', trans('admin/licenses/general.bulk.checkout_all.warn_not_enough_seats', ['count' => $assigned_count]));
}
}
if ($assigned_count == 0) {
return redirect()->back()->with('warning', trans('admin/licenses/general.bulk.checkout_all.warn_no_avail_users', ['count' => $assigned_count]));
}
return redirect()->back()->with('success', trans_choice('admin/licenses/general.bulk.checkout_all.success', 2, ['count' => $assigned_count] ));
}
}

View File

@@ -91,12 +91,11 @@ class LicenseFilesController extends Controller
*/
public function destroy($licenseId = null, $fileId = null)
{
$license = License::find($licenseId);
if ($license = License::find($licenseId)) {
// the asset is valid
if (isset($license->id)) {
$this->authorize('update', $license);
$log = Actionlog::find($fileId);
if ($log = Actionlog::find($fileId)) {
// Remove the file if one exists
if (Storage::exists('licenses/'.$log->filename)) {
@@ -113,7 +112,9 @@ class LicenseFilesController extends Controller
->with('success', trans('admin/hardware/message.deletefile.success'));
}
// Redirect to the licence management page
return redirect()->route('licenses.index')->with('error', trans('general.log_does_not_exist'));
}
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.does_not_exist'));
}
@@ -129,7 +130,6 @@ class LicenseFilesController extends Controller
*/
public function show($licenseId = null, $fileId = null, $download = true)
{
\Log::info('Private filesystem is: '.config('filesystems.default'));
$license = License::find($licenseId);
// the license is valid
@@ -137,7 +137,7 @@ class LicenseFilesController extends Controller
$this->authorize('view', $license);
$this->authorize('licenses.files', $license);
if (! $log = Actionlog::find($fileId)) {
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');
}
@@ -152,21 +152,19 @@ class LicenseFilesController extends Controller
->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);
} else {
if ($download != 'true') {
\Log::debug('display the file');
if ($contents = file_get_contents(Storage::url($file))) { // TODO - this will fail on private S3 files or large public ones
return Response::make(Storage::url($file)->header('Content-Type', mime_content_type($file)));
}
return JsonResponse::create(['error' => 'Failed validation: '], 500);
}
return StorageHelper::downloader($file);
}
}

View File

@@ -6,6 +6,8 @@ use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Models\Company;
use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
@@ -86,7 +88,7 @@ class LicensesController extends Controller
$license->name = $request->input('name');
$license->notes = $request->input('notes');
$license->order_number = $request->input('order_number');
$license->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost'));
$license->purchase_cost = $request->input('purchase_cost');
$license->purchase_date = $request->input('purchase_date');
$license->purchase_order = $request->input('purchase_order');
$license->purchase_order = $request->input('purchase_order');
@@ -164,7 +166,7 @@ class LicensesController extends Controller
$license->name = $request->input('name');
$license->notes = $request->input('notes');
$license->order_number = $request->input('order_number');
$license->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost'));
$license->purchase_cost = $request->input('purchase_cost');
$license->purchase_date = $request->input('purchase_date');
$license->purchase_order = $request->input('purchase_order');
$license->reassignable = $request->input('reassignable', 0);
@@ -205,7 +207,7 @@ class LicensesController extends Controller
if ($license->assigned_seats_count == 0) {
// Delete the license and the associated license seats
DB::table('license_seats')
->where('id', $license->id)
->where('license_id', $license->id)
->update(['assigned_to' => null, 'asset_id' => null]);
$licenseSeats = $license->licenseseats();
@@ -233,16 +235,40 @@ class LicensesController extends Controller
{
$license = License::with('assignedusers')->find($licenseId);
if ($license) {
$this->authorize('view', $license);
return view('licenses/view', compact('license'));
}
if (!$license) {
return redirect()->route('licenses.index')
->with('error', trans('admin/licenses/message.does_not_exist'));
}
$users_count = User::where('autoassign_licenses', '1')->count();
$total_seats_count = $license->totalSeatsByLicenseID();
$available_seats_count = $license->availCount()->count();
$checkedout_seats_count = ($total_seats_count - $available_seats_count);
\Log::debug('Total: '.$total_seats_count);
\Log::debug('Users: '.$users_count);
\Log::debug('Available: '.$available_seats_count);
\Log::debug('Checkedout: '.$checkedout_seats_count);
$this->authorize('view', $license);
return view('licenses.view', compact('license'))
->with('users_count', $users_count)
->with('total_seats_count', $total_seats_count)
->with('available_seats_count', $available_seats_count)
->with('checkedout_seats_count', $checkedout_seats_count);
}
/**
* Returns a view with prepopulated data for clone
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $licenseId
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function getClone($licenseId = null)
{
if (is_null($license_to_clone = License::find($licenseId))) {

View File

@@ -79,6 +79,8 @@ class LocationsController extends Controller
$location->ldap_ou = $request->input('ldap_ou');
$location->manager_id = $request->input('manager_id');
$location->user_id = Auth::id();
$location->phone = request('phone');
$location->fax = request('fax');
$location = $request->handleImages($location);
@@ -139,6 +141,8 @@ class LocationsController extends Controller
$location->state = $request->input('state');
$location->country = $request->input('country');
$location->zip = $request->input('zip');
$location->phone = request('phone');
$location->fax = request('fax');
$location->ldap_ou = $request->input('ldap_ou');
$location->manager_id = $request->input('manager_id');
@@ -227,6 +231,36 @@ class LocationsController extends Controller
}
/**
* Returns a view that presents a form to clone a location.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $locationId
* @since [v6.0.14]
* @return View
*/
public function getClone($locationId = null)
{
$this->authorize('create', Location::class);
// Check if the asset exists
if (is_null($location_to_clone = Location::find($locationId))) {
// Redirect to the asset management page
return redirect()->route('licenses.index')->with('error', trans('admin/locations/message.does_not_exist'));
}
$location = clone $location_to_clone;
// unset these values
$location->id = null;
$location->image = null;
return view('locations/edit')
->with('item', $location);
}
public function print_all_assigned($id)
{
if ($location = Location::where('id', $id)->first()) {

View File

@@ -68,6 +68,7 @@ class ManufacturersController extends Controller
$manufacturer->user_id = Auth::id();
$manufacturer->url = $request->input('url');
$manufacturer->support_url = $request->input('support_url');
$manufacturer->warranty_lookup_url = $request->input('warranty_lookup_url');
$manufacturer->support_phone = $request->input('support_phone');
$manufacturer->support_email = $request->input('support_email');
$manufacturer = $request->handleImages($manufacturer);
@@ -127,6 +128,7 @@ class ManufacturersController extends Controller
$manufacturer->name = $request->input('name');
$manufacturer->url = $request->input('url');
$manufacturer->support_url = $request->input('support_url');
$manufacturer->warranty_lookup_url = $request->input('warranty_lookup_url');
$manufacturer->support_phone = $request->input('support_phone');
$manufacturer->support_email = $request->input('support_email');

View File

@@ -17,7 +17,7 @@ class ModalController extends Controller
* @author [A. Gianotto] [<snipe@snipe.net]
* @return View
*/
function show ($type, $itemId = null) {
public function show ($type, $itemId = null) {
// These values should correspond to a file in resources/views/modals/
$allowed_types = [

View File

@@ -8,7 +8,7 @@ use App\Models\Setting;
use App\Models\User;
use App\Notifications\CurrentInventory;
use Illuminate\Support\Facades\Auth;
use Gate;
use Illuminate\Support\Facades\Gate;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Storage;

View File

@@ -51,9 +51,8 @@ class ReportsController extends Controller
public function getAccessoryReport()
{
$this->authorize('reports.view');
$accessories = Accessory::orderBy('created_at', 'DESC')->with('company')->get();
return view('reports/accessories', compact('accessories'));
return view('reports/accessories');
}
/**
@@ -285,7 +284,7 @@ class ReportsController extends Controller
$row = [
$actionlog->created_at,
($actionlog->user) ? e($actionlog->user->getFullNameAttribute()) : '',
($actionlog->admin) ? e($actionlog->admin->getFullNameAttribute()) : '',
$actionlog->present()->actionType(),
e($actionlog->itemType()),
($actionlog->itemType() == 'user') ? $actionlog->filename : $item_name,
@@ -502,7 +501,6 @@ class ReportsController extends Controller
$header[] = trans('general.zip');
}
if ($request->filled('assigned_to')) {
$header[] = trans('admin/hardware/table.checkoutto');
$header[] = trans('general.type');
@@ -533,19 +531,24 @@ class ReportsController extends Controller
}
if ($request->filled('warranty')) {
$header[] = 'Warranty';
$header[] = 'Warranty Expires';
$header[] = trans('admin/hardware/form.warranty');
$header[] = trans('admin/hardware/form.warranty_expires');
}
if ($request->filled('depreciation')) {
$header[] = 'Value';
$header[] = 'Diff';
$header[] = 'Fully Depreciated';
$header[] = trans('admin/hardware/table.book_value');
$header[] = trans('admin/hardware/table.diff');
$header[] = trans('admin/hardware/form.fully_depreciated');
}
if ($request->filled('checkout_date')) {
$header[] = trans('admin/hardware/table.checkout_date');
}
if ($request->filled('checkin_date')) {
$header[] = trans('admin/hardware/table.last_checkin_date');
}
if ($request->filled('expected_checkin')) {
$header[] = trans('admin/hardware/form.expected_checkin');
}
@@ -591,28 +594,28 @@ class ReportsController extends Controller
$executionTime = microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'];
\Log::debug('Added headers: '.$executionTime);
$assets = \App\Models\Company::scopeCompanyables(Asset::select('assets.*'))->with(
$assets = Asset::select('assets.*')->with(
'location', 'assetstatus', 'company', 'defaultLoc', 'assignedTo',
'model.category', 'model.manufacturer', 'supplier');
if ($request->filled('by_location_id')) {
$assets->where('assets.location_id', $request->input('by_location_id'));
$assets->whereIn('assets.location_id', $request->input('by_location_id'));
}
if ($request->filled('by_rtd_location_id')) {
$assets->where('assets.rtd_location_id', $request->input('by_rtd_location_id'));
$assets->whereIn('assets.rtd_location_id', $request->input('by_rtd_location_id'));
}
if ($request->filled('by_supplier_id')) {
$assets->where('assets.supplier_id', $request->input('by_supplier_id'));
$assets->whereIn('assets.supplier_id', $request->input('by_supplier_id'));
}
if ($request->filled('by_company_id')) {
$assets->where('assets.company_id', $request->input('by_company_id'));
$assets->whereIn('assets.company_id', $request->input('by_company_id'));
}
if ($request->filled('by_model_id')) {
$assets->where('assets.model_id', $request->input('by_model_id'));
$assets->whereIn('assets.model_id', $request->input('by_model_id'));
}
if ($request->filled('by_category_id')) {
@@ -632,7 +635,7 @@ class ReportsController extends Controller
}
if ($request->filled('by_status_id')) {
$assets->where('assets.status_id', $request->input('by_status_id'));
$assets->whereIn('assets.status_id', $request->input('by_status_id'));
}
if (($request->filled('purchase_start')) && ($request->filled('purchase_end'))) {
@@ -640,7 +643,24 @@ class ReportsController extends Controller
}
if (($request->filled('created_start')) && ($request->filled('created_end'))) {
$assets->whereBetween('assets.created_at', [$request->input('created_start'), $request->input('created_end')]);
$created_start = \Carbon::parse($request->input('created_start'))->startOfDay();
$created_end = \Carbon::parse($request->input('created_end'))->endOfDay();
$assets->whereBetween('assets.created_at', [$created_start, $created_end]);
}
if (($request->filled('checkout_date_start')) && ($request->filled('checkout_date_end'))) {
$checkout_start = \Carbon::parse($request->input('checkout_date_start'))->startOfDay();
$checkout_end = \Carbon::parse($request->input('checkout_date_end'))->endOfDay();
$assets->whereBetween('assets.last_checkout', [$checkout_start, $checkout_end]);
}
if (($request->filled('checkin_date_start'))) {
$assets->whereBetween('last_checkin', [
Carbon::parse($request->input('checkin_date_start'))->startOfDay(),
// use today's date is `checkin_date_end` is not provided
Carbon::parse($request->input('checkin_date_end', now()))->endOfDay(),
]);
}
if (($request->filled('expected_checkin_start')) && ($request->filled('expected_checkin_end'))) {
@@ -648,7 +668,10 @@ class ReportsController extends Controller
}
if (($request->filled('last_audit_start')) && ($request->filled('last_audit_end'))) {
$assets->whereBetween('assets.last_audit_date', [$request->input('last_audit_start'), $request->input('last_audit_end')]);
$last_audit_start = \Carbon::parse($request->input('last_audit_start'))->startOfDay();
$last_audit_end = \Carbon::parse($request->input('last_audit_end'))->endOfDay();
$assets->whereBetween('assets.last_audit_date', [$last_audit_start, $last_audit_end]);
}
if (($request->filled('next_audit_start')) && ($request->filled('next_audit_end'))) {
@@ -664,6 +687,7 @@ class ReportsController extends Controller
$assets->onlyTrashed();
}
\Log::debug($assets->toSql());
$assets->orderBy('assets.id', 'ASC')->chunk(20, function ($assets) use ($handle, $customfields, $request) {
$executionTime = microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'];
@@ -823,6 +847,12 @@ class ReportsController extends Controller
$row[] = ($asset->last_checkout) ? $asset->last_checkout : '';
}
if ($request->filled('checkin_date')) {
$row[] = ($asset->last_checkin)
? Carbon::parse($asset->last_checkin)->format('Y-m-d')
: '';
}
if ($request->filled('expected_checkin')) {
$row[] = ($asset->expected_checkin) ? $asset->expected_checkin : '';
}
@@ -899,12 +929,8 @@ class ReportsController extends Controller
public function getAssetMaintenancesReport()
{
$this->authorize('reports.view');
// Grab all the improvements
$assetMaintenances = AssetMaintenance::with('asset', 'supplier', 'asset.company')
->orderBy('created_at', 'DESC')
->get();
return view('reports/asset_maintenances', compact('assetMaintenances'));
return view('reports.asset_maintenances');
}
/**
@@ -995,7 +1021,12 @@ class ReportsController extends Controller
$assetsForReport = $acceptances
->filter(function ($acceptance) {
return $acceptance->checkoutable_type == 'App\Models\Asset';
$acceptance_checkoutable_flag = false;
if ($acceptance->checkoutable){
$acceptance_checkoutable_flag = $acceptance->checkoutable->checkedOutToUser();
}
return $acceptance->checkoutable_type == 'App\Models\Asset' && $acceptance_checkoutable_flag;
})
->map(function($acceptance) {
return ['assetItem' => $acceptance->checkoutable, 'acceptance' => $acceptance];
@@ -1012,20 +1043,31 @@ class ReportsController extends Controller
* @throws \Illuminate\Auth\Access\AuthorizationException
* @version v1.0
*/
public function sentAssetAcceptanceReminder($acceptanceId = null)
public function sentAssetAcceptanceReminder(Request $request)
{
$this->authorize('reports.view');
if (!$acceptance = CheckoutAcceptance::pending()->find($acceptanceId)) {
if (!$acceptance = CheckoutAcceptance::pending()->find($request->input('acceptance_id'))) {
\Log::debug('No pending acceptances');
// Redirect to the unaccepted assets report page with error
return redirect()->route('reports/unaccepted_assets')->with('error', trans('general.bad_data'));
}
$assetItem = $acceptance->checkoutable;
\Log::debug(print_r($assetItem, true));
if (is_null($acceptance->created_at)){
\Log::debug('No acceptance created_at');
return redirect()->route('reports/unaccepted_assets')->with('error', trans('general.bad_data'));
} else {
$logItem = $assetItem->checkouts()->where('created_at', '=', $acceptance->created_at)->get()[0];
$logItem_res = $assetItem->checkouts()->where('created_at', '=', $acceptance->created_at)->get();
if ($logItem_res->isEmpty()){
\Log::debug('Acceptance date mismatch');
return redirect()->route('reports/unaccepted_assets')->with('error', trans('general.bad_data'));
}
$logItem = $logItem_res[0];
}
if (!$assetItem->assignedTo->locale){
@@ -1120,8 +1162,6 @@ class ReportsController extends Controller
$row[] = str_replace(',', '', e($item['assetItem']->asset_tag));
$row[] = str_replace(',', '', e(($item['acceptance']->assignedTo) ? $item['acceptance']->assignedTo->present()->name() : trans('admin/reports/general.deleted_user')));
$rows[] = implode(',', $row);
} else {
// Log the error maybe?
}
}

View File

@@ -65,18 +65,27 @@ class SettingsController extends Controller
$start_settings['db_error'] = $e->getMessage();
}
$protocol = array_key_exists('HTTPS', $_SERVER) && ('on' == $_SERVER['HTTPS']) ? 'https://' : 'http://';
if (array_key_exists("HTTP_X_FORWARDED_PROTO", $_SERVER)) {
$protocol = $_SERVER["HTTP_X_FORWARDED_PROTO"] . "://";
} elseif (array_key_exists('HTTPS', $_SERVER) && ('on' == $_SERVER['HTTPS'])) {
$protocol = "https://";
} else {
$protocol = "http://";
}
if (array_key_exists("HTTP_X_FORWARDED_HOST", $_SERVER)) {
$host = $_SERVER["HTTP_X_FORWARDED_HOST"];
} else {
$host = array_key_exists('SERVER_NAME', $_SERVER) ? $_SERVER['SERVER_NAME'] : null;
$port = array_key_exists('SERVER_PORT', $_SERVER) ? $_SERVER['SERVER_PORT'] : null;
if (('http://' === $protocol && '80' != $port) || ('https://' === $protocol && '443' != $port)) {
$host .= ':'.$port;
}
}
$pageURL = $protocol.$host.$_SERVER['REQUEST_URI'];
$start_settings['url_valid'] = (url('/').'/setup' === $pageURL);
$start_settings['url_config'] = url('/');
$start_settings['url_config'] = config('app.url').'/setup';
$start_settings['url_valid'] = ($start_settings['url_config'] === $pageURL);
$start_settings['real_url'] = $pageURL;
$start_settings['php_version_min'] = true;
@@ -111,17 +120,17 @@ class SettingsController extends Controller
$start_settings['prod'] = true;
}
$start_settings['owner'] = '';
if (function_exists('posix_getpwuid')) { // Probably Linux
$owner = posix_getpwuid(fileowner($_SERVER['SCRIPT_FILENAME']));
// This *should* be an array, but we've seen this return a bool in some chrooted environments
if (is_array($owner)) {
$start_settings['owner'] = $owner['name'];
} else { // Windows
// TODO: Is there a way of knowing if a windows user has elevated permissions
// This just gets the user name, which likely isn't 'root'
// $start_settings['owner'] = getenv('USERNAME');
$start_settings['owner'] = '';
}
}
if (('root' === $start_settings['owner']) || ('0' === $start_settings['owner'])) {
if (($start_settings['owner'] === 'root') || ($start_settings['owner'] === '0')) {
$start_settings['owner_is_admin'] = true;
} else {
$start_settings['owner_is_admin'] = false;
@@ -581,6 +590,7 @@ class SettingsController extends Controller
$setting->date_display_format = $request->input('date_display_format');
$setting->time_display_format = $request->input('time_display_format');
$setting->digit_separator = $request->input('digit_separator');
$setting->name_display_format = $request->input('name_display_format');
if ($setting->save()) {
return redirect()->route('settings.index')
@@ -679,33 +689,6 @@ class SettingsController extends Controller
return view('settings.slack', compact('setting'));
}
/**
* Return a form to allow a super admin to update settings.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v1.0]
*
* @return View
*/
public function postSlack(SlackSettingsRequest $request)
{
if (is_null($setting = Setting::getSettings())) {
return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error'));
}
$setting->slack_endpoint = $request->input('slack_endpoint');
$setting->slack_channel = $request->input('slack_channel');
$setting->slack_botname = $request->input('slack_botname');
if ($setting->save()) {
return redirect()->route('settings.index')
->with('success', trans('admin/settings/message.update.success'));
}
return redirect()->back()->withInput()->withErrors($setting->getErrors());
}
/**
* Return a form to allow a super admin to update settings.
*
@@ -807,7 +790,7 @@ class SettingsController extends Controller
*/
public function getPhpInfo()
{
if (true === config('app.debug')) {
if (config('app.debug') === true) {
return view('settings.phpinfo');
}
@@ -845,6 +828,14 @@ class SettingsController extends Controller
if (is_null($setting = Setting::getSettings())) {
return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error'));
}
$setting->label2_enable = $request->input('label2_enable');
$setting->label2_template = $request->input('label2_template');
$setting->label2_title = $request->input('label2_title');
$setting->label2_asset_logo = $request->input('label2_asset_logo');
$setting->label2_1d_type = $request->input('label2_1d_type');
$setting->label2_2d_type = $request->input('label2_2d_type');
$setting->label2_2d_target = $request->input('label2_2d_target');
$setting->label2_fields = $request->input('label2_fields');
$setting->labels_per_page = $request->input('labels_per_page');
$setting->labels_width = $request->input('labels_width');
$setting->labels_height = $request->input('labels_height');
@@ -893,7 +884,7 @@ class SettingsController extends Controller
}
if ($setting->save()) {
return redirect()->route('settings.index')
return redirect()->route('settings.labels.index')
->with('success', trans('admin/settings/message.update.success'));
}
@@ -979,6 +970,7 @@ class SettingsController extends Controller
$setting->ldap_phone_field = $request->input('ldap_phone');
$setting->ldap_jobtitle = $request->input('ldap_jobtitle');
$setting->ldap_country = $request->input('ldap_country');
$setting->ldap_location = $request->input('ldap_location');
$setting->ldap_dept = $request->input('ldap_dept');
$setting->ldap_client_tls_cert = $request->input('ldap_client_tls_cert');
$setting->ldap_client_tls_key = $request->input('ldap_client_tls_key');
@@ -1056,6 +1048,48 @@ class SettingsController extends Controller
return $pdf_branding;
}
/**
* Show Google login settings form
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.1.1]
* @return View
*/
public function getGoogleLoginSettings()
{
$setting = Setting::getSettings();
return view('settings.google', compact('setting'));
}
/**
* ShSaveow Google login settings form
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.1.1]
* @return View
*/
public function postGoogleLoginSettings(Request $request)
{
if (!config('app.lock_passwords')) {
$setting = Setting::getSettings();
$setting->google_login = $request->input('google_login', 0);
$setting->google_client_id = $request->input('google_client_id');
$setting->google_client_secret = $request->input('google_client_secret');
if ($setting->save()) {
return redirect()->route('settings.index')
->with('success', trans('admin/settings/message.update.success'));
}
return redirect()->back()->withInput()->withErrors($setting->getErrors());
}
return redirect()->back()->with('error', trans('general.feature_disabled'));
}
/**
* Show the listing of backups.
*
@@ -1111,7 +1145,7 @@ class SettingsController extends Controller
public function postBackups()
{
if (! config('app.lock_passwords')) {
Artisan::call('backup:run');
Artisan::call('snipeit:backup', ['--filename' => 'manual-backup-'.date('Y-m-d-H-i-s')]);
$output = Artisan::output();
// Backup completed

View File

@@ -2,6 +2,7 @@
namespace App\Http\Controllers\Users;
use App\Events\UserMerged;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Models\Accessory;
@@ -13,6 +14,7 @@ use App\Models\LicenseSeat;
use App\Models\ConsumableAssignment;
use App\Models\Consumable;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
@@ -21,7 +23,7 @@ use Illuminate\Support\Facades\Password;
class BulkUsersController extends Controller
{
/**
* Returns a view that confirms the user's a bulk delete will be applied to.
* Returns a view that confirms the user's a bulk action will be applied to.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.7]
@@ -35,16 +37,32 @@ class BulkUsersController extends Controller
// Make sure there were users selected
if (($request->filled('ids')) && (count($request->input('ids')) > 0)) {
// Get the list of affected users
$user_raw_array = request('ids');
$users = User::whereIn('id', $user_raw_array)
->with('groups', 'assets', 'licenses', 'accessories')->get();
// bulk edit, display the bulk edit form
if ($request->input('bulk_actions') == 'edit') {
return view('users/bulk-edit', compact('users'))
->with('groups', Group::pluck('name', 'id'));
// bulk delete, display the bulk delete confirmation form
} elseif ($request->input('bulk_actions') == 'delete') {
return view('users/confirm-bulk-delete')->with('users', $users)->with('statuslabel_list', Helper::statusLabelList());
// merge, confirm they have at least 2 users selected and display the merge screen
} elseif ($request->input('bulk_actions') == 'merge') {
if (($request->filled('ids')) && (count($request->input('ids')) > 1)) {
return view('users/confirm-merge')->with('users', $users);
// Not enough users selected, send them back
} else {
return redirect()->back()->with('error', trans('general.not_enough_users_selected', ['count' => 2]));
}
// bulk password reset, just do the thing
} elseif ($request->input('bulk_actions') == 'bulkpasswordreset') {
foreach ($users as $user) {
if (($user->activated == '1') && ($user->email != '')) {
@@ -59,7 +77,7 @@ class BulkUsersController extends Controller
}
}
return redirect()->back()->with('error', 'No users selected');
return redirect()->back()->with('error', trans('general.no_users_selected'));
}
/**
@@ -76,7 +94,7 @@ class BulkUsersController extends Controller
$this->authorize('update', User::class);
if ((! $request->filled('ids')) || $request->input('ids') <= 0) {
return redirect()->back()->with('error', 'No users selected');
return redirect()->back()->with('error', trans('general.no_users_selected'));
}
$user_raw_array = $request->input('ids');
@@ -95,7 +113,8 @@ class BulkUsersController extends Controller
->conditionallyAddItem('locale')
->conditionallyAddItem('remote')
->conditionallyAddItem('ldap_import')
->conditionallyAddItem('activated');
->conditionallyAddItem('activated')
->conditionallyAddItem('autoassign_licenses');
// If the manager_id is one of the users being updated, generate a warning.
@@ -105,6 +124,11 @@ class BulkUsersController extends Controller
'warning' => trans('admin/users/message.bulk_manager_warn'),
];
}
if ($request->input('null_location_id')=='1') {
$this->update_array['location_id'] = null;
}
if (! $manager_conflict) {
$this->conditionallyAddItem('manager_id');
}
@@ -163,11 +187,11 @@ class BulkUsersController extends Controller
$this->authorize('update', User::class);
if ((! $request->filled('ids')) || (count($request->input('ids')) == 0)) {
return redirect()->back()->with('error', 'No users selected');
return redirect()->back()->with('error', trans('general.no_users_selected'));
}
if (config('app.lock_passwords')) {
return redirect()->route('users.index')->with('error', 'Bulk delete is not enabled in this installation');
return redirect()->route('users.index')->with('error', trans('general.feature_disabled'));
}
$user_raw_array = request('ids');
@@ -249,4 +273,80 @@ class BulkUsersController extends Controller
$logAction->logaction('checkin from');
}
}
/**
* Save bulk-edited users
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.0]
* @param Request $request
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function merge(Request $request)
{
$this->authorize('update', User::class);
if (config('app.lock_passwords')) {
return redirect()->route('users.index')->with('error', trans('general.feature_disabled'));
}
$user_ids_to_merge = $request->input('ids_to_merge');
$user_ids_to_merge = array_diff($user_ids_to_merge, array($request->input('merge_into_id')));
if ((!$request->filled('merge_into_id')) || (count($user_ids_to_merge) < 1)) {
return redirect()->back()->with('error', trans('general.no_users_selected'));
}
// Get the users
$merge_into_user = User::find($request->input('merge_into_id'));
$users_to_merge = User::whereIn('id', $user_ids_to_merge)->with('assets', 'licenses', 'consumables','accessories')->get();
$admin = User::find(Auth::user()->id);
// Walk users
foreach ($users_to_merge as $user_to_merge) {
foreach ($user_to_merge->assets as $asset) {
\Log::debug('Updating asset: '.$asset->asset_tag . ' to '.$merge_into_user->id);
$asset->assigned_to = $request->input('merge_into_id');
$asset->save();
}
foreach ($user_to_merge->licenses as $license) {
\Log::debug('Updating license pivot: '.$license->id . ' to '.$merge_into_user->id);
$user_to_merge->licenses()->updateExistingPivot($license->id, ['assigned_to' => $merge_into_user->id]);
}
foreach ($user_to_merge->consumables as $consumable) {
\Log::debug('Updating consumable pivot: '.$consumable->id . ' to '.$merge_into_user->id);
$user_to_merge->consumables()->updateExistingPivot($consumable->id, ['assigned_to' => $merge_into_user->id]);
}
foreach ($user_to_merge->accessories as $accessory) {
$user_to_merge->accessories()->updateExistingPivot($accessory->id, ['assigned_to' => $merge_into_user->id]);
}
foreach ($user_to_merge->userlog as $log) {
$log->target_id = $user_to_merge->id;
$log->save();
}
User::where('manager_id', '=', $user_to_merge->id)->update(['manager_id' => $merge_into_user->id]);
foreach ($user_to_merge->managedLocations as $managedLocation) {
$managedLocation->manager_id = $merge_into_user->id;
$managedLocation->save();
}
$user_to_merge->delete();
//$user_to_merge->save();
event(new UserMerged($user_to_merge, $merge_into_user, $admin));
}
return redirect()->route('users.index')->with('success', trans('general.merge_success', ['count' => $users_to_merge->count(), 'into_username' => $merge_into_user->username]));
}
}

View File

@@ -2,6 +2,7 @@
namespace App\Http\Controllers\Users;
use App\Helpers\StorageHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\AssetFileRequest;
use App\Models\Actionlog;
@@ -135,22 +136,36 @@ 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)) {
$this->authorize('view', $user);
$log = Actionlog::find($fileId);
$file = $log->get_src('users');
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $user->id)->find($fileId)) {
return Response::download($file); //FIXME this doesn't use the new StorageHelper yet, but it's complicated...
// Display the file inline
if (request('inline') == 'true') {
$headers = [
'Content-Disposition' => 'inline',
];
return Storage::download('private_uploads/users/'.$log->filename, $log->filename, $headers);
}
// Prepare the error message
$error = trans('admin/users/message.user_not_found', ['id' => $userId]);
// Redirect to the licence management page
return redirect()->route('users.index')->with('error', $error);
return Storage::download('private_uploads/users/'.$log->filename);
}
return redirect()->route('users.index')->with('error', trans('admin/users/message.log_record_not_found'));
}
// Redirect to the user management page if the user doesn't exist
return redirect()->route('users.index')->with('error', trans('admin/users/message.user_not_found', ['id' => $userId]));
}
}

View File

@@ -74,7 +74,6 @@ class UsersController extends Controller
$permissions = $this->filterDisplayable($permissions);
$user = new User;
$user->activated = 1;
return view('users/edit', compact('groups', 'userGroups', 'permissions', 'userPermissions'))
->with('user', $user);
@@ -121,6 +120,7 @@ class UsersController extends Controller
$user->created_by = Auth::user()->id;
$user->start_date = $request->input('start_date', null);
$user->end_date = $request->input('end_date', null);
$user->autoassign_licenses = $request->input('autoassign_licenses', 0);
// Strip out the superuser permission if the user isn't a superadmin
$permissions_array = $request->input('permission');
@@ -210,7 +210,6 @@ class UsersController extends Controller
*/
public function update(SaveUserRequest $request, $id = null)
{
// We need to reverse the UI specific logic for our
// permissions here before we update the user.
$permissions = $request->input('permissions', []);
@@ -268,12 +267,15 @@ class UsersController extends Controller
$user->city = $request->input('city', null);
$user->state = $request->input('state', null);
$user->country = $request->input('country', null);
$user->activated = $request->input('activated', 0);
// if a user is editing themselves we should always keep activated true
$user->activated = $request->input('activated', $request->user()->is($user) ? 1 : 0);
$user->zip = $request->input('zip', null);
$user->remote = $request->input('remote', 0);
$user->vip = $request->input('vip', 0);
$user->website = $request->input('website', null);
$user->start_date = $request->input('start_date', null);
$user->end_date = $request->input('end_date', null);
$user->autoassign_licenses = $request->input('autoassign_licenses', 0);
// Update the location of any assets checked out to this user
Asset::where('assigned_type', User::class)

View File

@@ -82,7 +82,7 @@ class ViewAssetsController extends Controller
return view('account/requestable-assets', compact('assets', 'models'));
}
public function getRequestItem(Request $request, $itemType, $itemId = null)
public function getRequestItem(Request $request, $itemType, $itemId = null, $cancel_by_admin = false, $requestingUser = null)
{
$item = null;
$fullItemType = 'App\\Models\\'.studly_case($itemType);
@@ -119,16 +119,16 @@ class ViewAssetsController extends Controller
$settings = Setting::getSettings();
if ($item_request = $item->isRequestedBy($user)) {
$item->cancelRequest();
$data['item_quantity'] = $item_request->qty;
if (($item_request = $item->isRequestedBy($user)) || $cancel_by_admin) {
$item->cancelRequest($requestingUser);
$data['item_quantity'] = ($item_request) ? $item_request->qty : 1;
$logaction->logaction('request_canceled');
if (($settings->alert_email != '') && ($settings->alerts_enabled == '1') && (! config('app.lock_passwords'))) {
$settings->notify(new RequestAssetCancelation($data));
}
return redirect()->route('requestable-assets')->with('success')->with('success', trans('admin/hardware/message.requests.canceled'));
return redirect()->back()->with('success')->with('success', trans('admin/hardware/message.requests.canceled'));
} else {
$item->request();
if (($settings->alert_email != '') && ($settings->alerts_enabled == '1') && (! config('app.lock_passwords'))) {

View File

@@ -0,0 +1,67 @@
<?php
namespace App\Http\Livewire;
use Livewire\Component;
class CategoryEditForm extends Component
{
public $defaultEulaText;
public $eulaText;
public $originalSendCheckInEmailValue;
public $requireAcceptance;
public $sendCheckInEmail;
public $useDefaultEula;
public function mount()
{
$this->originalSendCheckInEmailValue = $this->sendCheckInEmail;
if ($this->eulaText || $this->useDefaultEula) {
$this->sendCheckInEmail = 1;
}
}
public function render()
{
return view('livewire.category-edit-form');
}
public function updated($property, $value)
{
if (! in_array($property, ['eulaText', 'useDefaultEula'])) {
return;
}
$this->sendCheckInEmail = $this->eulaText || $this->useDefaultEula ? 1 : $this->originalSendCheckInEmailValue;
}
public function getShouldDisplayEmailMessageProperty(): bool
{
return $this->eulaText || $this->useDefaultEula;
}
public function getEmailMessageProperty(): string
{
if ($this->useDefaultEula) {
return trans('admin/categories/general.email_will_be_sent_due_to_global_eula');
}
return trans('admin/categories/general.email_will_be_sent_due_to_category_eula');
}
public function getEulaTextDisabledProperty()
{
return (bool)$this->useDefaultEula;
}
public function getSendCheckInEmailDisabledProperty()
{
return $this->eulaText || $this->useDefaultEula;
}
}

View File

@@ -0,0 +1,546 @@
<?php
namespace App\Http\Livewire;
use App\Models\CustomField;
use Livewire\Component;
use App\Models\Import;
use Storage;
use Log;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
class Importer extends Component
{
use AuthorizesRequests;
public $files;
public $progress; //upload progress - '-1' means don't show
public $progress_message;
public $progress_bar_class;
public $message; //status/error message?
public $message_type; //success/error?
//originally from ImporterFile
public $import_errors; //
public ?Import $activeFile = null;
public $importTypes;
public $columnOptions;
public $statusType;
public $statusText;
public $update;
public $send_welcome;
public $run_backup;
public $field_map; // we need a separate variable for the field-mapping, because the keys in the normal array are too complicated for Livewire to understand
public $file_id; // TODO: I can't figure out *why* we need this, but it really seems like we do. I can't seem to pull the id from the activeFile for some reason?
// Make these variables public - we set the properties in the constructor so we can localize them (versus the old static arrays)
public $accessories_fields;
public $assets_fields;
public $users_fields;
public $licenses_fields;
public $locations_fields;
public $consumables_fields;
public $components_fields;
public $aliases_fields;
protected $rules = [
'files.*.file_path' => 'required|string',
'files.*.created_at' => 'required|string',
'files.*.filesize' => 'required|integer',
'activeFile' => 'Import',
'activeFile.import_type' => 'string',
'activeFile.field_map' => 'array',
'activeFile.header_row' => 'array',
'field_map' => 'array'
];
public function generate_field_map()
{
\Log::debug("header row is: ".print_r($this->activeFile->header_row,true));
\Log::debug("Field map is: ".print_r($this->field_map,true));
$tmp = array_combine($this->activeFile->header_row, $this->field_map);
return json_encode(array_filter($tmp));
}
private function getColumns($type)
{
switch ($type) {
case 'asset':
$results = $this->assets_fields;
break;
case 'accessory':
$results = $this->accessories_fields;
break;
case 'consumable':
$results = $this->consumables_fields;
break;
case 'component':
$results = $this->components_fields;
break;
case 'license':
$results = $this->licenses_fields;
break;
case 'user':
$results = $this->users_fields;
break;
case 'location':
$results = $this->locations_fields;
break;
default:
$results = [];
}
asort($results, SORT_FLAG_CASE | SORT_STRING);
if ($type == "asset") {
// add Custom Fields after a horizontal line
$results['-'] = "———" . trans('admin/custom_fields/general.custom_fields') . "———’";
foreach (CustomField::orderBy('name')->get() as $field) {
$results[$field->db_column_name()] = $field->name;
}
}
return $results;
}
public function updating($name, $new_import_type)
{
if ($name == "activeFile.import_type") {
\Log::debug("WE ARE CHANGING THE import_type!!!!! TO: " . $new_import_type);
\Log::debug("so, what's \$this->>field_map at?: " . print_r($this->field_map, true));
// go through each header, find a matching field to try and map it to.
foreach ($this->activeFile->header_row as $i => $header) {
// do we have something mapped already?
if (array_key_exists($i, $this->field_map)) {
// yes, we do. Is it valid for this type of import?
// (e.g. the import type might have been changed...?)
if (array_key_exists($this->field_map[$i], $this->columnOptions[$new_import_type])) {
//yes, this key *is* valid. Continue on to the next field.
continue;
} else {
//no, this key is *INVALID* for this import type. Better set it to null
// and we'll hope that the $aliases_fields or something else picks it up.
$this->field_map[$i] = null; // fingers crossed! But it's not likely, tbh.
} // TODO - strictly speaking, this isn't necessary here I don't think.
}
// first, check for exact matches
foreach ($this->columnOptions[$new_import_type] as $value => $text) {
if (strcasecmp($text, $header) === 0) { // case-INSENSITIVe on purpose!
$this->field_map[$i] = $value;
continue 2; //don't bother with the alias check, go to the next header
}
}
// if you got here, we didn't find a match. Try the $aliases_fields
foreach ($this->aliases_fields as $key => $alias_values) {
foreach ($alias_values as $alias_value) {
if (strcasecmp($alias_value, $header) === 0) { // aLsO CaSe-INSENSitiVE!
// Make *absolutely* sure that this key actually _exists_ in this import type -
// you can trigger this by importing accessories with a 'Warranty' column (which don't exist
// in "Accessories"!)
if (array_key_exists($key, $this->columnOptions[$new_import_type])) {
$this->field_map[$i] = $key;
continue 3; // bust out of both of these loops; as well as the surrounding one - e.g. move on to the next header
}
}
}
}
// and if you got here, we got nothing. Let's recommend 'null'
$this->field_map[$i] = null; // Booooo :(
}
}
}
public function boot() { // FIXME - delete or undelete.
///////$this->activeFile = null; // I do *not* understand why I have to do this, but, well, whatever.
}
public function mount()
{
$this->authorize('import');
$this->progress = -1; // '-1' means 'don't show the progressbar'
$this->progress_bar_class = 'progress-bar-warning';
$this->importTypes = [
'asset' => trans('general.assets'),
'accessory' => trans('general.accessories'),
'consumable' => trans('general.consumables'),
'component' => trans('general.components'),
'license' => trans('general.licenses'),
'user' => trans('general.users'),
'location' => trans('general.locations'),
];
/**
* These are the item-type specific columns
*/
$this->accessories_fields = [
'company' => trans('general.company'),
'location' => trans('general.location'),
'quantity' => trans('general.qty'),
'item_name' => trans('general.item_name_var', ['item' => trans('general.accessory')]),
'model_number' => trans('general.model_no'),
'notes' => trans('general.notes'),
'category' => trans('general.category'),
'supplier' => trans('general.supplier'),
'min_amt' => trans('mail.min_QTY'),
'purchase_cost' => trans('general.purchase_cost'),
'purchase_date' => trans('general.purchase_date'),
'manufacturer' => trans('general.manufacturer'),
'order_number' => trans('general.order_number'),
];
$this->assets_fields = [
'company' => trans('general.company'),
'location' => trans('general.location'),
'item_name' => trans('general.item_name_var', ['item' => trans('general.asset')]),
'asset_tag' => trans('general.asset_tag'),
'asset_model' => trans('general.model_name'),
'byod' => trans('general.byod'),
'model_number' => trans('general.model_no'),
'status' => trans('general.status'),
'warranty_months' => trans('admin/hardware/form.warranty'),
'category' => trans('general.category'),
'requestable' => trans('admin/hardware/general.requestable'),
'serial' => trans('general.serial_number'),
'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'),
'order_number' => trans('general.order_number'),
'image' => trans('general.importer.image_filename'),
'asset_eol_date' => trans('admin/hardware/form.eol_date'),
/**
* Checkout fields:
* Assets can be checked out to other assets, people, or locations, but we currently
* only support checkout to people and locations in the importer
**/
'checkout_class' => trans('general.importer.checkout_type'),
'first_name' => trans('general.importer.checked_out_to_first_name'),
'last_name' => trans('general.importer.checked_out_to_last_name'),
'full_name' => trans('general.importer.checked_out_to_fullname'),
'email' => trans('general.importer.checked_out_to_email'),
'username' => trans('general.importer.checked_out_to_username'),
'checkout_location' => trans('general.importer.checkout_location'),
];
$this->consumables_fields = [
'company' => trans('general.company'),
'location' => trans('general.location'),
'quantity' => trans('general.qty'),
'item_name' => trans('general.item_name_var', ['item' => trans('general.consumable')]),
'model_number' => trans('general.model_no'),
'notes' => trans('general.notes'),
'min_amt' => trans('mail.min_QTY'),
'category' => trans('general.category'),
'purchase_cost' => trans('general.purchase_cost'),
'purchase_date' => trans('general.purchase_date'),
'checkout_class' => trans('general.importer.checkout_type'),
'supplier' => trans('general.supplier'),
'manufacturer' => trans('general.manufacturer'),
'order_number' => trans('general.order_number'),
'item_no' => trans('admin/consumables/general.item_no'),
];
$this->components_fields = [
'company' => trans('general.company'),
'location' => trans('general.location'),
'quantity' => trans('general.qty'),
'item_name' => trans('general.item_name_var', ['item' => trans('general.component')]),
'model_number' => trans('general.model_no'),
'notes' => trans('general.notes'),
'category' => trans('general.category'),
'supplier' => trans('general.supplier'),
'min_amt' => trans('mail.min_QTY'),
'purchase_cost' => trans('general.purchase_cost'),
'purchase_date' => trans('general.purchase_date'),
'manufacturer' => trans('general.manufacturer'),
'order_number' => trans('general.order_number'),
'serial' => trans('general.serial_number'),
];
$this->licenses_fields = [
'company' => trans('general.company'),
'location' => trans('general.location'),
'item_name' => trans('general.item_name_var', ['item' => trans('general.license')]),
'asset_tag' => trans('general.importer.checked_out_to_tag'),
'expiration_date' => trans('admin/licenses/form.expiration'),
'full_name' => trans('general.importer.checked_out_to_fullname'),
'license_email' => trans('admin/licenses/form.to_email'),
'license_name' => trans('admin/licenses/form.to_name'),
'purchase_order' => trans('admin/licenses/form.purchase_order'),
'order_number' => trans('general.order_number'),
'reassignable' => trans('admin/licenses/form.reassignable'),
'seats' => trans('admin/licenses/form.seats'),
'notes' => trans('general.notes'),
'category' => trans('general.category'),
'supplier' => trans('general.supplier'),
'purchase_cost' => trans('general.purchase_cost'),
'purchase_date' => trans('general.purchase_date'),
'maintained' => trans('admin/licenses/form.maintained'),
'checkout_class' => trans('general.importer.checkout_type'),
'serial' => trans('general.license_serial'),
'email' => trans('general.importer.checked_out_to_email'),
'username' => trans('general.importer.checked_out_to_username'),
'manufacturer' => trans('general.manufacturer'),
];
$this->users_fields = [
'id' => trans('general.id'),
'company' => trans('general.company'),
'location' => trans('general.location'),
'department' => trans('general.department'),
'first_name' => trans('general.first_name'),
'last_name' => trans('general.last_name'),
'notes' => trans('general.notes'),
'username' => trans('admin/users/table.username'),
'jobtitle' => trans('admin/users/table.title'),
'phone_number' => trans('admin/users/table.phone'),
'manager_first_name' => trans('general.importer.manager_first_name'),
'manager_last_name' => trans('general.importer.manager_last_name'),
'activated' => trans('general.activated'),
'address' => trans('general.address'),
'city' => trans('general.city'),
'state' => trans('general.state'),
'country' => trans('general.country'),
'zip' => trans('general.zip'),
'vip' => trans('general.importer.vip'),
'remote' => trans('admin/users/general.remote'),
'email' => trans('admin/users/table.email'),
'website' => trans('general.website'),
'avatar' => trans('general.image'),
'gravatar' => trans('general.importer.gravatar'),
'start_date' => trans('general.start_date'),
'end_date' => trans('general.end_date'),
'employee_num' => trans('general.employee_number'),
];
$this->locations_fields = [
'name' => trans('general.item_name_var', ['item' => trans('general.location')]),
'address' => trans('general.address'),
'address2' => trans('general.importer.address2'),
'city' => trans('general.city'),
'state' => trans('general.state'),
'country' => trans('general.country'),
'zip' => trans('general.zip'),
'currency' => trans('general.importer.currency'),
'ldap_ou' => trans('admin/locations/table.ldap_ou'),
'manager_username' => trans('general.importer.manager_username'),
'manager' => trans('general.importer.manager_full_name'),
'parent_location' => trans('admin/locations/table.parent'),
];
// "real fieldnames" to a list of aliases for that field
$this->aliases_fields = [
'item_name' =>
[
'item name',
'asset name',
'accessory name',
'user name',
'consumable name',
'component name',
'name',
],
'item_no' => [
'item number',
'item no.',
'item #',
],
'asset_model' =>
[
'model name',
'model',
],
'gravatar' =>
[
'gravatar',
],
'currency' =>
[
'$',
],
'jobtitle' =>
[
'job title for user',
'job title',
],
'username' =>
[
'user name',
'username',
trans('general.importer.checked_out_to_username'),
],
'first_name' =>
[
'first name',
trans('general.importer.checked_out_to_first_name'),
],
'last_name' =>
[
'last name',
'lastname',
trans('general.importer.checked_out_to_last_name'),
],
'email' =>
[
'email',
'e-mail',
trans('general.importer.checked_out_to_email'),
],
'phone_number' =>
[
'phone',
'phone number',
'phone num',
'telephone number',
'telephone',
'tel.',
],
'serial' =>
[
'serial number',
'serial no.',
'serial no',
'product key',
'key',
],
'model_number' =>
[
'model',
'model no',
'model no.',
'model number',
'model num',
'model num.'
],
'warranty_months' =>
[
'Warranty',
'Warranty Months'
],
'qty' =>
[
'QTY',
'Quantity'
],
'zip' =>
[
'Postal Code',
'Post Code',
'Zip Code'
],
'min_amt' =>
[
'Min Amount',
'Minimum Amount',
'Min Quantity',
'Minimum Quantity',
],
'next_audit_date' =>
[
'Next Audit',
],
'address2' =>
[
'Address 2',
'Address2',
],
'ldap_ou' =>
[
'LDAP OU',
'OU',
],
'parent_location' =>
[
'Parent',
'Parent Location',
],
'manager' =>
[
'Managed By',
'Manager Name',
'Manager Full Name',
],
'manager_username' =>
[
'Manager Username',
],
];
$this->columnOptions[''] = $this->getColumns(''); //blank mode? I don't know what this is supposed to mean
foreach($this->importTypes AS $type => $name) {
$this->columnOptions[$type] = $this->getColumns($type);
}
if ($this->activeFile) {
$this->field_map = $this->activeFile->field_map ? array_values($this->activeFile->field_map) : [];
}
}
public function selectFile($id)
{
$this->clearMessage();
$this->activeFile = Import::find($id);
if (!$this->activeFile) {
$this->message = trans('admin/hardware/message.import.file_missing');
$this->message_type = 'danger';
return;
}
$this->field_map = null;
foreach($this->activeFile->header_row as $element) {
if(isset($this->activeFile->field_map[$element])) {
$this->field_map[] = $this->activeFile->field_map[$element];
} else {
$this->field_map[] = null; // re-inject the 'nulls' if a file was imported with some 'Do Not Import' settings
}
}
$this->file_id = $id;
$this->import_errors = null;
$this->statusText = null;
}
public function destroy($id)
{
// TODO: why don't we just do File::find($id)? This seems dumb.
foreach($this->files as $file) {
\Log::debug("File id is: ".$file->id);
if($id == $file->id) {
if(Storage::delete('private_uploads/imports/'.$file->file_path)) {
$file->delete();
$this->message = trans('admin/hardware/message.import.file_delete_success');
$this->message_type = 'success';
return;
} else {
$this->message = trans('admin/hardware/message.import.file_delete_error');
$this->message_type = 'danger';
}
}
}
}
public function clearMessage()
{
$this->message = null;
$this->message_type = null;
}
public function render()
{
$this->files = Import::orderBy('id','desc')->get(); //HACK - slows down renders.
return view('livewire.importer')
->extends('layouts.default')
->section('content');
}
}

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