From e126a75f7ad853ba9411d5fd2e48eeb08252b9b0 Mon Sep 17 00:00:00 2001 From: slong753 Date: Wed, 29 Mar 2023 21:37:26 -0500 Subject: [PATCH 1/5] pretty sure this was it --- app/Models/Asset.php | 21 ++++++++------------- app/Models/User.php | 15 +++++---------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/app/Models/Asset.php b/app/Models/Asset.php index e992298d86..bb9916d86d 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -70,19 +70,6 @@ class Asset extends Depreciable */ protected $injectUniqueIdentifier = true; - // We set these as protected dates so that they will be easily accessible via Carbon - protected $dates = [ - 'created_at', - 'updated_at', - 'deleted_at', - 'purchase_date', - 'last_checkout', - 'expected_checkin', - 'last_audit_date', - 'next_audit_date' - ]; - - protected $casts = [ 'purchase_date' => 'date', 'last_checkout' => 'datetime', @@ -96,6 +83,14 @@ class Asset extends Depreciable 'rtd_company_id' => 'integer', 'supplier_id' => 'integer', 'byod' => 'boolean', + 'created_at' => 'datetime', + 'updated_at' => 'datetime', + 'deleted_at' => 'datetime', + 'purchase_date' => 'datetime', + 'last_checkout' => 'datetime', + 'expected_checkin' => 'datetime', + 'last_audit_date' => 'datetime', + 'next_audit_date' => 'datetime', ]; protected $rules = [ diff --git a/app/Models/User.php b/app/Models/User.php index bf40982db3..c716da074b 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -73,18 +73,13 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo 'location_id' => 'integer', 'company_id' => 'integer', 'vip' => 'boolean', + 'created_at' => 'datetime', + 'updated_at' => 'datetime', + 'deleted_at' => 'datetime', + 'start_date' => 'datetime:Y-m-d', + 'end_date' => 'datetime:Y-m-d', ]; - - protected $dates = [ - 'created_at', - 'updated_at', - 'deleted_at', - 'start_date' => 'date_format:Y-m-d', - 'end_date' => 'date_format:Y-m-d', - ]; - - /** * Model validation rules * From 8c1c0e81b61289fa942cac20bb0c6704e3c710e1 Mon Sep 17 00:00:00 2001 From: slong753 Date: Thu, 30 Mar 2023 13:31:58 -0500 Subject: [PATCH 2/5] rm deplicates --- app/Models/Asset.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/Models/Asset.php b/app/Models/Asset.php index bb9916d86d..a5211e8001 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -86,11 +86,6 @@ class Asset extends Depreciable 'created_at' => 'datetime', 'updated_at' => 'datetime', 'deleted_at' => 'datetime', - 'purchase_date' => 'datetime', - 'last_checkout' => 'datetime', - 'expected_checkin' => 'datetime', - 'last_audit_date' => 'datetime', - 'next_audit_date' => 'datetime', ]; protected $rules = [ From 44e05eecbfccee9b10499eabc950c5fc1ce18c8b Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Thu, 30 Mar 2023 16:42:59 -0700 Subject: [PATCH 3/5] Publish test stubs --- stubs/test.stub | 13 +++++++++++++ stubs/test.unit.stub | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 stubs/test.stub create mode 100644 stubs/test.unit.stub diff --git a/stubs/test.stub b/stubs/test.stub new file mode 100644 index 0000000000..06b35d3e19 --- /dev/null +++ b/stubs/test.stub @@ -0,0 +1,13 @@ + Date: Sun, 2 Apr 2023 09:00:03 -0700 Subject: [PATCH 4/5] Add @mezzle as a contributor --- .all-contributorsrc | 7 +++++++ README.md | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 42a34dab5f..dd090262eb 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -2882,6 +2882,13 @@ "contributions": [ "code" ] + }, + { + "login": "Mezzle", + "name": "Martin Meredith", + "avatar_url": "https://avatars.githubusercontent.com/u/570639?v=4", + "profile": "https://github.com/Mezzle", + "contributions": [] } ] } diff --git a/README.md b/README.md index 4c569520c4..3a0d37998f 100644 --- a/README.md +++ b/README.md @@ -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&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade) -[![All Contributors](https://img.shields.io/badge/all_contributors-317-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) +[![All Contributors](https://img.shields.io/badge/all_contributors-318-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 @@ -144,7 +144,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken | [
Peace](https://github.com/julian-piehl)
[💻](https://github.com/snipe/snipe-it/commits?author=julian-piehl "Code") | [
Kyle Gordon](https://github.com/kylegordon)
[💻](https://github.com/snipe/snipe-it/commits?author=kylegordon "Code") | [
Katharina Drexel](http://www.bfh.ch)
[💻](https://github.com/snipe/snipe-it/commits?author=sunflowerbofh "Code") | [
David Sferruzza](https://david.sferruzza.fr/)
[💻](https://github.com/snipe/snipe-it/commits?author=dsferruzza "Code") | [
Rick Nelson](https://github.com/rnelsonee)
[💻](https://github.com/snipe/snipe-it/commits?author=rnelsonee "Code") | [
BasO12](https://github.com/BasO12)
[💻](https://github.com/snipe/snipe-it/commits?author=BasO12 "Code") | [
Vautia](https://github.com/Vautia)
[💻](https://github.com/snipe/snipe-it/commits?author=Vautia "Code") | | [
Chris Hartjes](http://www.littlehart.net/atthekeyboard)
[💻](https://github.com/snipe/snipe-it/commits?author=chartjes "Code") | [
geo-chen](https://github.com/geo-chen)
[💻](https://github.com/snipe/snipe-it/commits?author=geo-chen "Code") | [
Phan Nguyen](https://github.com/nh314)
[💻](https://github.com/snipe/snipe-it/commits?author=nh314 "Code") | [
Iisakki Jaakkola](https://github.com/StarlessNights)
[💻](https://github.com/snipe/snipe-it/commits?author=StarlessNights "Code") | [
Ikko Ashimine](https://bandism.net/)
[💻](https://github.com/snipe/snipe-it/commits?author=eltociear "Code") | [
Lukas Fehling](https://github.com/lukasfehling)
[💻](https://github.com/snipe/snipe-it/commits?author=lukasfehling "Code") | [
Fernando Almeida](https://github.com/fernando-almeida)
[💻](https://github.com/snipe/snipe-it/commits?author=fernando-almeida "Code") | | [
akemidx](https://github.com/akemidx)
[💻](https://github.com/snipe/snipe-it/commits?author=akemidx "Code") | [
Oguz Bilgic](http://oguz.site)
[💻](https://github.com/snipe/snipe-it/commits?author=oguzbilgic "Code") | [
Scooter Crawford](https://github.com/scoo73r)
[💻](https://github.com/snipe/snipe-it/commits?author=scoo73r "Code") | [
subdriven](https://github.com/subdriven)
[💻](https://github.com/snipe/snipe-it/commits?author=subdriven "Code") | [
Andrew Savinykh](https://github.com/AndrewSav)
[💻](https://github.com/snipe/snipe-it/commits?author=AndrewSav "Code") | [
Tadayuki Onishi](https://kenchan0130.github.io)
[💻](https://github.com/snipe/snipe-it/commits?author=kenchan0130 "Code") | [
Florian](https://github.com/floschoepfer)
[💻](https://github.com/snipe/snipe-it/commits?author=floschoepfer "Code") | -| [
Spencer Long](http://spencerlong.com)
[💻](https://github.com/snipe/snipe-it/commits?author=spencerrlongg "Code") | [
Marcus Moore](https://github.com/marcusmoore)
[💻](https://github.com/snipe/snipe-it/commits?author=marcusmoore "Code") | +| [
Spencer Long](http://spencerlong.com)
[💻](https://github.com/snipe/snipe-it/commits?author=spencerrlongg "Code") | [
Marcus Moore](https://github.com/marcusmoore)
[💻](https://github.com/snipe/snipe-it/commits?author=marcusmoore "Code") | [
Martin Meredith](https://github.com/Mezzle)
| This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome! From 55857c910ac40d88b508303c9e082378c1f70183 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 4 Apr 2023 00:33:05 -0700 Subject: [PATCH 5/5] Color picker UI fix Signed-off-by: snipe --- resources/views/statuslabels/edit.blade.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/views/statuslabels/edit.blade.php b/resources/views/statuslabels/edit.blade.php index 37f15a98b9..31c999491f 100755 --- a/resources/views/statuslabels/edit.blade.php +++ b/resources/views/statuslabels/edit.blade.php @@ -66,8 +66,13 @@ @section('moar_scripts') @stop