3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-05 12:15:43 +00:00
Commit Graph

61 Commits

Author SHA1 Message Date
5e9e0b70db Fixes #18377 - make min value for names consistent 2026-01-05 12:51:49 +00:00
bed6b04c3d Unset the 'sum_unconstrained_assets' attribute before saving 2025-12-09 13:00:41 +00:00
416b32cbc8 Optimize queries for Components listing 2025-11-26 12:36:44 +00:00
1258eb6533 Merge pull request #17913 from Godmartinz/add_types_to_unaccepted_asset_report
Fixed #15664 - Adds Accessories, Components, Consumables, and Licenses to Unaccepted Assets report
2025-11-10 12:24:13 +00:00
9e68497b63 Moved Traits into directory and modify the users to point to them 2025-10-21 16:45:58 +01:00
b7193a06fd Normalize advanced search 2025-10-08 20:51:35 +01:00
fea0189479 Merge branch 'fix-factory-auto-gen-action-logs' into add_types_to_unaccepted_asset_report 2025-09-24 15:43:27 -07:00
0ce20c1edd fix send reminder method to handle other types 2025-09-23 18:40:03 -07:00
14b829aa30 add total cost to components and consumables 2025-09-16 10:37:32 -07:00
74b98083e2 Override the getEula() method at the SnipeModel level 2025-09-15 20:05:35 +01:00
b06c58fe7b Switch to older style rules for consistency
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 15:06:27 +01:00
f5c8b3eb04 Fixed #17791 - increase size of purchase cost field
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 15:03:49 +01:00
7b5d90dd81 Moved model traits into proper directory
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 18:23:26 +01:00
9dd4bc5fa8 Merge pull request #17391 from Godmartinz/add-components-notifications
FIXED: #13844 Adds Webhook and Mail Notifications for Components
2025-07-21 11:51:30 +01:00
f130186b37 add Component Checkin Mail 2025-07-15 11:56:34 -07:00
95f867b267 Code formatting fixes
Signed-off-by: snipe <snipe@snipe.net>
2025-07-09 21:48:53 +01:00
500cbf5d92 add component checkout notification, update checkout blade, update listener 2025-07-09 11:12:18 -07:00
cd989768d4 Added HasUploads trait and remove uploads method for models
Signed-off-by: snipe <snipe@snipe.net>
2025-06-27 19:32:22 +01:00
43c15ef134 Merge branch 'develop' into feature/locations_with_companies 2025-04-08 09:18:48 +01:00
dd2b570db5 Added tighter constraints on deleting components
Signed-off-by: snipe <snipe@snipe.net>
2025-02-23 14:11:39 +00:00
4e0bcac1a1 Furhter validation for scoped locations
There is a new validator introduced that checks on object update (assets, users, etc.) if the company matches the locations company.
In case of the creation of a new location it must be checked that the parent matches the own company.
On updating a location a check for every related object must be made to see if the company matches the location.

Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
2025-01-24 11:12:11 +01:00
3ee76be7e3 Added manufacturer and model_number to components
Signed-off-by: snipe <snipe@snipe.net>
2024-10-23 17:50:22 +01:00
cae8aa7840 Added maxlengths to additional fields
Signed-off-by: snipe <snipe@snipe.net>
2024-10-01 14:02:54 +01:00
6699995972 Added created_by to components
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 17:01:36 +01:00
1582d81e5b Change user_id to created_by
Signed-off-by: snipe <snipe@snipe.net>
2024-09-17 22:16:41 +01:00
bee80fcf8a Remove global scope when counting check outs 2024-08-06 12:16:06 -07:00
2353c8199c Set qty mutators
Signed-off-by: snipe <snipe@snipe.net>
2023-11-22 15:25:22 +00:00
6097d534e9 Added eloquent model relationships
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:10:16 -07:00
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
3d3a4b02fc Added helper method for uploads
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 19:09:34 -07:00
c1e5d03340 Added pivot for note
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 15:03:41 -07:00
2c1f368828 adds validation for all purchase costs variables 2022-05-10 16:26:06 -07:00
b876d0abb0 Merge remote-tracking branch 'origin/master' into develop
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	.env.example
#	app/Http/Controllers/Auth/LoginController.php
#	app/Http/Kernel.php
#	app/Http/Transformers/ActionlogsTransformer.php
#	app/Importer/AssetImporter.php
#	app/Models/Accessory.php
#	app/Models/Consumable.php
#	app/Presenters/AccessoryPresenter.php
#	app/Presenters/ComponentPresenter.php
#	app/Presenters/ConsumablePresenter.php
#	app/Providers/AuthServiceProvider.php
#	composer.json
#	composer.lock
#	config/app.php
#	config/cors.php
#	config/version.php
#	package-lock.json
#	public/js/build/app.js
#	public/js/build/app.js.LICENSE.txt
#	public/js/dist/all.js
#	public/mix-manifest.json
#	resources/views/accessories/view.blade.php
#	resources/views/consumables/view.blade.php
#	resources/views/settings/saml.blade.php
#	routes/api.php
2022-03-03 21:59:38 -08:00
ac8a7d0bc9 Made notes field fillable and searchable
Signed-off-by: snipe <snipe@snipe.net>
2022-03-03 20:29:48 -08:00
b62d1f49e4 Shift cleanup 2021-06-10 20:19:27 +00:00
104b441e0d Shift to class based factories 2021-06-10 20:17:44 +00:00
9f43ce97e9 Convert deprecated $dates property to $casts 2021-06-10 20:17:18 +00:00
802dc9240d Shift bindings
PHP 5.5.9+ adds the new static `class` property which provides the fully qualified class name. This is preferred over using class name strings as these references are checked by the parser.
2021-06-10 20:16:56 +00:00
934afa036f Adopt Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions.

You may customize the adopted coding style by adding your own [PHP CS Fixer][1] `.php_cs` config file to your project root. Feel free to use [Shift's Laravel ruleset][2] to help you get started.

[1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
[2]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
2021-06-10 20:15:52 +00:00
b28a4f3108 Add component unit test and unify some validation. 2020-04-30 09:50:12 -04:00
68224757f4 Validate when editing the quantity of a component that the new quantity is > the amount checked out 2020-04-29 13:25:04 -04:00
775e46288e Cleanup of model attributes 2018-08-06 14:46:10 +02:00
2c38036123 Improvement: Better documentation, small refactors (#6017)
* Better documentation, small refactors

* Small comment fixes
2018-08-01 00:06:41 -07:00
baa3be728d Refactoring: A nicer and easier syntax for searching models (#5841)
* Adds the ability to search by dates

Adding extra „where“-conditions to the „TextSearch“ queries, allowing the users to search by dates

* Adds missing dates to $dates in models

* Removes duplicated „where“ conditions

* Adds the Searchable trait to models, defining the searchable attributes and relations

* Removes the old text search methods

* Adds back additional conditions to the search

These conditions could not be modeled in the „attributes“ or „relations“, so we include them here

* Removes unnecessary check for the deleted_at attribute

* Fixes typo in comments

* suppresses errors from Codacy

We can safely ignore the error codacy is throwing here, since this method is a standin/noop for models who need to implement more advanced searches
2018-07-16 14:13:07 -07:00
983786c29f Fixed component checkout bug 2018-03-28 18:53:18 -07:00
7de8f71f58 Api tests (#5096)
* Use the formated date helper to clean up verifications.

* Add Checkin/Checkout api tests.

* Accessories api test

* Add Companies API Test.

* Return ModelNotFound as a 404.

* Cleanups/simplficiations/updates.

* Locations api test.

* currency and image should be fillable on location.

* Update components api test.

* Use findOrFail so we return a 404 instead of a 200.  Matches other item types.

* order_number should be fillable in component.

* Add updated_at and permissions to information returned from api for a user.

* Add users test and flesh out factory and fillable fields.

* Add test for assets method

* API status label test.

* Disable php7.2 for now on travis until the count(null) issues are remedied

* Add serial to update.

* API model not found should return a 200
2018-02-24 19:01:34 -08:00
86c0194e9a Fixed #4628 and #4590 - Illegal mix of collations for operation error when searching on some languages 2018-01-20 03:08:27 -08:00
f16ce09a7a Importer again (#4702)
* If a user id is provided in the name column of an import, we should assume that it is a user id and check out to it.

* Fix build of vue files.  The location is public/js/build, not public/build

* Ensure a status type is set before allowing submission of an import.

Also expand the status text label to change color based on success/failure.

Fixes #4658

* Use right key to lookup emails when importing users.  Fixes 4619.

* Import serial for components, and make unique matches based on the serial as well as the name.  Fixes #4569

* Set the location_id when importing an item properly.

This moves as well to using the Asset::checkout() method, which should consolidate the logic into a useful spot.
Fixes #4563 (I think)

* Production assets.

* Case insensitive field map guessing and repopulate when changingin import type.
2017-12-28 20:08:45 -08:00
bb4d49690f Add purchase date to dates array so it’s treated as a Carbon date 2017-11-09 18:59:05 -08:00
5d18937e94 Standardized component API output 2017-10-07 06:56:18 -07:00