Commit Graph

53 Commits

Author SHA1 Message Date
d255e1f89f First pass at clearer display of asset list filters 2020-10-12 23:03:33 +01:00
5a5bb4328d Minor typo fixes 2020-10-10 10:24:21 +01:00
3602da9203 Fixes fixes fixes 2020-10-09 09:42:15 +01:00
565e757758 And now the same for generic forms 2020-10-09 01:26:42 +01:00
5d56f4f7b0 Also apply better approach to generic detail pages 2020-10-08 23:15:55 +01:00
3903481b3d Better approach to generic list templates + other deduplication 2020-10-08 22:54:30 +01:00
0117002b01 Initial work on BS4 button templatetag
Newfeatureitis strikes again
2020-09-29 17:41:40 +01:00
a78bb19015 Asset detail template improvements 2020-09-28 10:38:59 +01:00
70cc554094 Begin to change add buttons success -> primary
Also change search primary -> info to avoid clash
2020-09-28 10:32:45 +01:00
1dad8d2ba5 Tweak asset list markup 2020-09-28 10:32:00 +01:00
2a1bb57c74 More fixes 2020-09-19 18:03:24 +01:00
6d836ee4dd Fix cable table template 2020-09-12 10:07:31 +01:00
6ee9efa39e Audit template fixes 2020-09-01 13:13:44 +01:00
d708207ab9 Versioning module now does magic
Automatic creation of views/urls for anything registered with reversion, with a small amount of hackage to preserve legacy stuff. (and the DAMNED asset IDs!) I would never get distracted...
2020-08-29 16:24:11 +01:00
b88554a57f Style fixes to asset list 2020-08-04 19:09:47 +01:00
1138cfcde5 Make supplier detail use the generic template 2020-06-25 19:31:51 +01:00
141e1c94d7 Fix tests for search improvements 2020-06-19 11:22:06 +01:00
84618deac0 FEAT: Improve 'omni'search
- Partialised template
- Added to assets header
- Added ability to search assets/suppliers
- Improved selection logic
- Have it display current query
2020-06-19 11:07:25 +01:00
e4e8823a1a Fix navbar alignment 2020-06-19 10:38:13 +01:00
4081918598 Fix some asset template things 2020-05-27 17:06:50 +02:00
06f67f4f32 Very initial work at togglable darktheme.
Dammit @alexdaniel654 just when I had my scope creep kinda under control. It'll be v. nice to have though...!
2020-05-27 04:24:58 +02:00
fd6aee83cf Fix the remaining tests 2020-05-25 22:49:07 +01:00
18fde7c16a FIX: Don't show asset buttons/history for basic users 2020-05-25 13:36:42 +01:00
544b6df35c Fix some tests
And some things that were actually borked
2020-05-24 22:16:50 +01:00
e3c1da9d13 Start on new tests 2020-05-11 23:04:13 +01:00
70995a0d0b Merge branch 'master' into bs4
# Conflicts:
#	assets/models.py
#	assets/templates/asset_update.html
#	assets/templates/partials/asset_buttons.html
#	assets/templates/partials/asset_list_table_body.html
#	assets/views.py
#	templates/base_assets.html
2020-04-15 16:28:44 +01:00
3be06a7b25 Create initial asset audit framework (#403)
* WIP: Basic work on audit

* WIP: Audit modal works

Need to get the ID search working.

* WIP: Javascript shenanigans for asset audit search

It's not clean but it works..

* Improve audit search bar

Optimise for APM!

* Filter asset audit list by never-audited

* Added cable functionality to audit form

Also improved styling

* FIX: Revert partialising of asset search

* Various UX Improvements

Also rearranged asset detail/edit to be more space efficient

* FIX: Remove assets from to-be-audited table when audited

Previously required a page reload

* Improve sample data generator

Does reversion properly and sets colours for asset statuses

* FIX: Gracefully handle 404s in audit search

* FEAT: Add buttons for some common defaults on audit form

TODO: Partialise those fragments and add them to the edit/create forms too.

* FIX: Fix asset sample data command when run alone

* FEAT: More handy buttons

* FIX: Stop quickbuttons being tab-selected

If someone's tabbing through, they won't be needing the buttons...

* FIX: Hide asset detail buttons for basic users

* FIX: Migrations

* Start tests for audit

* Some deduplication for testing code

* Improve asset audit testing

* Remember to test the tests Arona

* Potentially make modal tests more consistent

* FIX?: Up WebDriverWait timeout for modal tests

* FIX?: What about this way...

* Remake migrations

* Fix README badges to point to right branch

While I'm here eh :P

* Use aware time in audit

* Fix migrations again

* Fix for my fix...

* Modify audit exclusions to properly prevent data loss

* pep eiiiiiight
2020-04-14 21:11:09 +01:00
a0491891e9 Add 'CableTypes' (#406)
* Move relevant fields and create migration to autogen cable types

* CRUD and ordering

* FIX: Prevent creating duplicate cable types

* FIX: pep8/remove debug print

* FIX: Meta migrations... :>

* FIX: Update tests to match new UX

* Move cabletype menu links into 'Assets' dropdown

* Fix migration

* Specify version of reportlab

Should fix CI - looks like I went a bit too ham-handed in my requirements.txt purge last time...
2020-04-13 15:54:43 +01:00
2bf643cd7a Use the right autocompleter.js... 2020-04-12 18:47:09 +01:00
c8d0c0d5d0 Asset form fixes 2020-04-06 15:17:14 +01:00
176324ed79 Tweak versioning templates to allow ID overrides
Asset specific templates begone. Still need to bring back the ID formatting for the Rigboard.
2020-04-06 14:59:10 +01:00
d216dd4c74 Versioning template improvements
//TODO Rather than have seperate asset templates, convert 'id' into a template variable
2020-04-06 03:15:43 +01:00
55e37d8c69 Tweak asset list to be more in line with other lists 2020-04-06 02:50:36 +01:00
7aa19cc7ab Asset list table improvements 2020-04-06 02:43:20 +01:00
ee7ba3ea19 Improvements to generic lists 2020-03-22 12:47:32 +00:00
41b0387e49 Reduced overall font size a touch 2020-03-22 12:15:55 +00:00
0144bd37fc Start to seperate versioning into its own app 2020-03-18 17:36:09 +00:00
264b306b2f Add a skip link for keyboard users
Someone might use it...
2020-03-18 15:07:29 +00:00
36556dea33 Add the usual set of fields to supplier and update form accordingly 2020-03-17 20:07:14 +00:00
7de778a57e Work on event creation form 2020-03-16 22:35:59 +00:00
88b34740f6 Asset list/CRUD template updates 2020-03-16 21:45:04 +00:00
4a71dd0d95 AssetList template update 2020-03-15 21:33:05 +00:00
2bfecb9c0f Improvements to generic list + use for supplier 2020-03-15 18:38:51 +00:00
3814f5abfc Generic list template 2020-03-15 18:25:05 +00:00
8568c591a9 Update Python Dependencies (#404)
* [requires.io] dependency update

* Server starts...

Various things are broken, but it runs!

* [requires.io] dependency update

* [requires.io] dependency update

* [requires.io] dependency update

* FIX: Broken migrations

* FIX: Update auth framework

* FIX: Correct static use in templates

* FIX: Fix supplier sort

* FIX: Remaining tests

* Revert "Disable password reset as temporary fix to vulnerability (#396)"

This reverts commit e0c6a56263.

# Conflicts:
#	RIGS/urls.py

* FIX: Fix broken newlining in PDFs

Introduced by a change in Django 2.1 'HTML rendered by form widgets no longer includes a closing slash on void elements, e.g. <br>. This is incompatible within XHTML, although some widgets already used aspects of HTML5 such as boolean attributes.'

* FIX: Fix some Django4 deprecation warnings

Why not...

* Refactor dependency file

Should now only include dependencies we actually use, not dependencies of dependencies and unused things

* Add newlines to the paperwork print test event

This will catch the error encountered in 79ec9214f9

* Swap to pycodestyle rather than pep8 in Travis

And eliminate W605 errors

* Bit too heavy handed with the dep purge there...

* Whoops, helps if one installs pycodestyle...

* FIX: Re-add overridden login view

* Better fix for previous commit

* FIX: Bloody smartquotes

Co-authored-by: requires.io <support@requires.io>
2020-03-07 16:21:48 +00:00
ae151ed45e Add assets test suite (#400)
* Started POM and assets test

* FEAT: Adapt unit tests from RIGS to assets

* CHORE: pep8...

* Added Asset Create and Edit forms

* Add non-cable asset creation test

* CHORE: Frickin pep8...

* Add cable asset creation test

* Basic asset create validation testing

* Asset edit tests are here

A bit dodgy in places but par for the course for me :P

* Add access level tests

* Delete unused code

Much less effort way to increase coverage stats :D

* Add delete sample data test for completeness

Chasing that sweet 100% coverage...

* Add supplier list page + tests

Also fix the supplier page not being ordered alphabetically

* Helps if I add the migration...

* Add supplier create/edit tests

* Asset duplicate tests

Also fixed some random bugs

* Asset search tests

* 404 tests and test that everything requires authentication

* Test visibility of form errors

And fix supplier form not displaying errors correctly!

* Fix broken search test


Co-authored-by: Matthew Smith <mattysmith22@googlemail.com>
2020-02-08 13:52:07 +00:00
6ba87b0a5a CHANGE: Restructure the asset embed a bit
Should fix the forum mangling
2020-01-21 01:45:59 +00:00
630011aff7 FEAT: Add oembed for assets (#393)
* FEAT: Add oembed for assets

Don't see the worth in doing supplier currently...we don't OEmbed Org/Venue etc after all...

* FIX Copy paste error ;D

* Fix embeds not actually working for unauthenticated users

This is why I should have written tests...
2020-01-17 15:28:29 +00:00
4ad12ab40a FIX: Prevent basic users seeing individual asset version history
I prevented them from seeing the change stream, didn't prevent them seeing individual histories. This has to be done as otherwise it leaks financial information. If I can be arsed I'll come back to this and allow basic users to see a filtered version.
2020-01-11 21:13:50 +00:00
82a30ca77d Miscellaneous changes to the Asset DB (#390)
* FIX #388: Prevent assets losing supplier data on edit

* FEAT: Add associated assets to supplier detail view

* FIX: Tweak supplier list to make detail view accessible

* Potential fix for #380

No idea if it works because I can't reproduce locally. S/O Reckons it should... :P

* FEAT #386: Asset search searches serial number.

Pending addition of advanced search.

* FIX: Order asset categories/statuses alphabetically

Instead of by pk because that's silly.

* FEAT: Statuses can have a CSS class defined in the admin panel

This replaces the hardcoding of colours in the asset list.

* FIX: Squash migrations

* Fixed supplier not working on all the create asset template

* Refactored away "assets" property on "Supplier" by using "related_name" instead

Co-authored-by: Matthew Smith <mattysmith22@googlemail.com>
2020-01-03 21:46:39 +00:00