From a1a11d788f4f4e2898e50a3e069fec9e60390956 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Wed, 10 May 2023 11:06:05 -0700 Subject: [PATCH 1/5] Disable browser tests in ChipperCI --- .chipperci.yml | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.chipperci.yml b/.chipperci.yml index fa3b3fd920..663a06350a 100644 --- a/.chipperci.yml +++ b/.chipperci.yml @@ -41,19 +41,18 @@ pipeline: cmd: | # php artisan test --testsuite Feature - - name: Browser Tests - cmd: | - cp -v .env.dusk.example .env.dusk.ci - sed -i "s@APP_ENV=.*@APP_ENV=ci@g" .env.dusk.ci - sed -i "s@APP_URL=.*@APP_URL=http://$BUILD_HOST:8000@g" .env.dusk.ci - #sed -i "s@DB_HOST=.*@DB_HOST=mysql@g" .env.dusk.ci - sed -i "s@DB_HOST=.*@DB_HOST=$DB_HOST@g" .env.dusk.ci - sed -i "s@DB_USERNAME=.*@DB_USERNAME=chipperci@g" .env.dusk.ci - sed -i "s@DB_DATABASE=.*@DB_DATABASE=chipperci@g" .env.dusk.ci - sed -i "s@DB_PASSWORD=.*@DB_PASSWORD=secret@g" .env.dusk.ci - - php -S [::0]:8000 -t public 2>server.log & - sleep 2 - php artisan dusk:chrome-driver $CHROME_DRIVER - php artisan dusk --env=ci - +# - name: Browser Tests +# cmd: | +# cp -v .env.dusk.example .env.dusk.ci +# sed -i "s@APP_ENV=.*@APP_ENV=ci@g" .env.dusk.ci +# sed -i "s@APP_URL=.*@APP_URL=http://$BUILD_HOST:8000@g" .env.dusk.ci +# #sed -i "s@DB_HOST=.*@DB_HOST=mysql@g" .env.dusk.ci +# sed -i "s@DB_HOST=.*@DB_HOST=$DB_HOST@g" .env.dusk.ci +# sed -i "s@DB_USERNAME=.*@DB_USERNAME=chipperci@g" .env.dusk.ci +# sed -i "s@DB_DATABASE=.*@DB_DATABASE=chipperci@g" .env.dusk.ci +# sed -i "s@DB_PASSWORD=.*@DB_PASSWORD=secret@g" .env.dusk.ci +# +# php -S [::0]:8000 -t public 2>server.log & +# sleep 2 +# php artisan dusk:chrome-driver $CHROME_DRIVER +# php artisan dusk --env=ci From 763176c86bb0cd429c7997257361275a819b77da Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 10 May 2023 14:52:08 -0700 Subject: [PATCH 2/5] standardizes the importer colors no matter the theme --- resources/assets/less/skins/skin-red-dark.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/assets/less/skins/skin-red-dark.less b/resources/assets/less/skins/skin-red-dark.less index 8d75bbc792..3fded5f067 100644 --- a/resources/assets/less/skins/skin-red-dark.less +++ b/resources/assets/less/skins/skin-red-dark.less @@ -385,6 +385,10 @@ input[type=text], input[type=search] { .box-header.with-border { border-bottom: #000; } +#upload-table tbody > tr.warning > td,#upload-table h3,#upload-table p{ + background-color:#fcf8e3; + color:#000; +} a { color: var(--link); From 46d6783fc5d4216147f0210c1fa36b9de7a9ac8e Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Mon, 15 May 2023 09:01:30 -0700 Subject: [PATCH 3/5] adds translation to checkout notification --- app/Notifications/CheckoutAssetNotification.php | 2 +- resources/lang/en/mail.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Notifications/CheckoutAssetNotification.php b/app/Notifications/CheckoutAssetNotification.php index 303fc08f18..6119c5824b 100644 --- a/app/Notifications/CheckoutAssetNotification.php +++ b/app/Notifications/CheckoutAssetNotification.php @@ -107,7 +107,7 @@ class CheckoutAssetNotification extends Notification } return (new SlackMessage) - ->content(':arrow_up: :computer: Asset Checked Out') + ->content(':arrow_up: :computer: '.trans('mail.Asset_Checkout_Notification')) ->from($botname) ->attachment(function ($attachment) use ($item, $note, $admin, $fields) { $attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl()) diff --git a/resources/lang/en/mail.php b/resources/lang/en/mail.php index 6bf36b4ebf..7dd8d6181c 100644 --- a/resources/lang/en/mail.php +++ b/resources/lang/en/mail.php @@ -75,6 +75,7 @@ return [ 'your_credentials' => 'Your Snipe-IT credentials', 'Accessory_Checkin_Notification' => 'Accessory checked in', 'Asset_Checkin_Notification' => 'Asset checked in', + 'Asset_Checkout_Notification' => 'Asset checked out', 'License_Checkin_Notification' => 'License checked in', 'Expected_Checkin_Report' => 'Expected asset checkin report', 'Expected_Checkin_Notification' => 'Reminder: :name checkin deadline approaching', From 8e3cbdad9041345114ee4fdd5976b5cb73998c06 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Mon, 15 May 2023 11:52:57 -0700 Subject: [PATCH 4/5] removes assigned_to if archived --- app/Http/Controllers/Assets/AssetsController.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index 2a93845507..76c12d3cf9 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -12,6 +12,7 @@ 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 Carbon\Carbon; @@ -324,6 +325,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); } From c4876865cff1afc46a6ebe97e3cc3d7f9c67b380 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 16 May 2023 17:36:58 -0700 Subject: [PATCH 5/5] Updated dev assets Signed-off-by: snipe --- public/css/dist/skins/skin-red-dark.css | Bin 12558 -> 12679 bytes public/css/dist/skins/skin-red-dark.min.css | Bin 12558 -> 12679 bytes public/mix-manifest.json | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/css/dist/skins/skin-red-dark.css b/public/css/dist/skins/skin-red-dark.css index 5ae17e15da6b25bd9b11fb2d94c7102fd3ac66bc..17d495cbbb2db14643addb7e1a9e3d67b8395077 100644 GIT binary patch delta 124 zcmeB6YERy9UdKbZv>+!xF-5l|F)1fip(H6krBcC8p`=K!Jh3P*GcO&)Nzvg#RhD6l zE>bXAP+D9{IW0NOBGuTMOF+!xF-5l|F)1fip(H6krBcC8p`=K!Jh3P*GcO&)Nzvg#RhD6l zE>bXAP+D9{IW0NOBGuTMOF