Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Ad-Hoc Notes on Assets #15525

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

akemidx
Copy link
Collaborator

@akemidx akemidx commented Sep 19, 2024

The ability to add a note to an asset uncoupled from an action (such as Checkin)

A pop-up window will open, and the note will save to the Asset History (as well as the activity log)

This replaces #14987

Screenshot 2024-09-18 at 10 46 41 PM Screenshot 2024-06-27 at 5 38 05 PM Screenshot 2024-06-27 at 5 38 59 PM

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Ran snipe-it test suite through command line

Test Configuration:

  • PHP version: 8.1

Checklist:

Copy link

what-the-diff bot commented Sep 19, 2024

PR Summary

  • Introduction of Note Handling Functionality
    The system now has a capability to handle notes. A dedicated NoteAdded event is created which triggers upon the addition of notes.

  • Creation of NotesController
    A new controller is added to manage tasks related to notes. In its functionality, it includes the store method which is used for saving notes.

  • Update in Icon Representer
    An update for 'note' and 'notes' icons is added in the IconHelper. This implies a visual representation for notes can now be observed.

  • LogListener for noting actions
    A listener keeps the log whenever a note is added, ensuring traceability and accountability of note additions.

  • Development of Note Model
    Creation of a new model, Note, allows the system to maintain a morph relation for the commentable entity.

  • Localization Strings for Notes
    To support extended reach, localized strings for "Note Added" and "Add Note" are introduced.

  • Update in Modal Interface
    Update in the ModalController includes the 'add-note' entry, offering a more seamless interface for note addition.

  • New Modal View for Adding Notes
    A new modal view add-note.blade.php is created for adding notes, increasing usability and user experience.

  • JavaScript File Modification for Modal Note Addition
    The JavaScript file has been reconfigured to handle the modal interface for note additions, enhancing the fluidity in the operations.

  • API Routes for Note Handling
    New API routes for more efficient note handling are added under the 'notes' prefix, improving connectivity and response.

  • Update on Hardware View
    The hardware view is updated to include an option for adding notes, offered only to the ones with appropriate permissions, enhancing security and better organization of notes.

@akemidx
Copy link
Collaborator Author

akemidx commented Sep 19, 2024

note: assets need to be rebuilt for note modal to close on save

@marcusmoore
Copy link
Collaborator

Taking a look at this now 👍🏾

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple minor notes but otherwise this is solid 💪🏾

app/Models/Note.php Outdated Show resolved Hide resolved
resources/lang/en-US/general.php Show resolved Hide resolved
app/Http/Controllers/Api/NotesController.php Show resolved Hide resolved
app/Http/Controllers/Api/NotesController.php Outdated Show resolved Hide resolved
@akemidx akemidx mentioned this pull request Sep 25, 2024
10 tasks
@marcusmoore marcusmoore self-requested a review September 26, 2024 16:37
Copy link
Collaborator Author

@akemidx akemidx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes made

app/Http/Controllers/Api/NotesController.php Show resolved Hide resolved
app/Http/Controllers/Api/NotesController.php Outdated Show resolved Hide resolved
resources/lang/en-US/general.php Show resolved Hide resolved
Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍🏾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants