Code Monkey home page Code Monkey logo

centennialaircraftmaintenance's People

Contributors

perustaja avatar

Watchers

 avatar

centennialaircraftmaintenance's Issues

Setup Testing

  • Research asp.net core testing
  • Research EF Core testing (decide on using repository pattern)
  • Create testing library
  • Create a template functional test for HomeController and AircraftController

Revamp entities to move onto the next section

Game plan

Our main goal for the pages of WorkOrder and Discrepancy is to keep things disconnected and fast. Load the minimum that is required and have removal/addition handled by directly accessing the table, even if it is a join table, by a command handler or service. This limits the amount of simple unit testing via entity methods, however it should increase efficiency of queries by quite a bit. Includes will be used for WorkOrder but the writes will still be done by directly accessing the table, not by navigation properties. The WorkOrder page will not be done by partials with view components or anything, and won't use ajax calls for deletion and editing, it just won't be necessary. Discrepancy however, will use ajax and have partials and viewcomponents so that the page is responsive and has minimal reloads, it will count here. The template pages will be similar as well, and creating a template will be very similar to creation an actual one.

As for infrastructure, this means more repositories, services(potentially, we could simply add these join table manipulations to their parent services) and controllers. However, it allows for more ajax calls and partial loading for a better and faster user experience.

WorkOrderTemplate

  • Ctor
  • ChangeTitle
    List of DiscrepancyTemplates to be handled by join table

DiscrepancyTemplate

  • Ctor
  • ChangeTitle
  • ChangeDescription
  • ChangeResolution
    List of Parts to be handled by join table
    Creation from WorkOrderTemplate to be handled by service that directly creates it through ctor and directly creates the join table records for it.

DiscrepancyTemplatePart

  • Ctor
  • Add/UpdateQty

WorkOrderTemplateDiscrepancyTemplate (I know....but normalization and user experience)

  • Ctor

WorkOrder

  • Ctor
  • ChangeTitle
  • Submit/Approve

Discrepancy

  • Ctor
  • ChangeStuff

Part

  • Add new Id to allow for softdeletes (having a part number be a key wasn't very smart, as we need soft deletes and this now means that part number slot is taken..)
  • Add MfrPartNumber (the old string id)
    Updating of all the stuff that needs updating is in another issue

Final

  • Add OnModelCreation handling for the 2 new join tables
  • Update ApplicationContext with new entities and create db

Add pagination to Inventory Index page

  • Setup controller to take params of page and ipp (items per page) using asp-route
  • Create custom PaginatedList structure that inherits from List
  • Create custom mapper to go from a PaginatedList To PaginatedList for model -> viewmodel
  • Return viewdata with current page, ipp for remembering
  • Setup page numbers to be active or not based on ipp and current page
  • Style control panel arrows and ipp dropdown
  • Write tests for paginatedlist - TBD in another issue

Create Receiving form

  • Setup API DTOs, viewmodels and stuff
  • Setup API for parts search autcomplete, make sure it works
  • Setup client-side API validation for part and qty
    Back-End:
  • Make quantity fill from viemodel
  • Encapsulate BeginCollectionItem list with a form that will submit
  • Figure out what sort of response ajax requires to get success/failure
  • Make sure duplicates and handled in some way, probably front-end
  • Add service to handle changing db quantities and log
    Front-end:
  • Add delete functionality
  • Add quantity validation
  • Clear input on ajax submit (scrapped, causes validation error, not pretty)
  • Add loading gif while submitting final ajax next to its button
  • Add modal AddPart
  • Don't allow quantity to go under 0, because it could mess with merging quantities on duplicate
    Styling:
  • Finish styling

FINAL

  • Make sure hidden input isn't submitted after div is deleted. If it still submits or throws any errors, try to delete the accompanying hidden input generated by BeginCollectionItemCore() with Jquery on delete

Implement Part soft deleting and update entire application handling of Part

Research

I think there is some query filter you can use so you don't have to constantly check some IsDeleted property.

Updates

  • Create IsDeleted column and add QueryFilter to Part. Ignore the filter when loading in a discrepancy later on.
  • Go through everything and handle the fact that now there is an independent int key, with 2 part number fields
  • Implement a check so that you cannot add a part with an equivalent MfrPartNumber unless the current one is soft deleted.
  • Update ActionLinks and display templates to show MfrsPartNumber, but still link to routes using Id.

Setup Workorder and Discrepancy controllers

Main

WorkOrder

  • wos?regnum=string&ws=int&page/ipp
  • wos/history
  • wos/id
  • Add pagination
  • Have history tab

Discrepancy

  • discreps/id?ws=int
  • discreps/history

Actions

WorkOrder

Discrepancy

Create frontend and backend for inventory

  • Add images to part
  • Add filtering/sorting
  • Add tally for current below-minimum items
  • Add parts details/new/delete/edit
  • Add dynamic quantity color
  • Add pagination
  • Add Receiving form(separate issue)
  • Move on to testing

Production: Image storage via Azure, address security concerns

Read https://docs.microsoft.com/en-us/aspnet/core/mvc/models/file-uploads?view=aspnetcore-3.1
Currently, only jpg and pngs are allowed and must be under 5MB in size. However, address storage concerns and virus scan images (I think Azure has some way to do this via blob storage).

For now, images are saved to wwwroot

  • Change FileHandler to save to blob storage
  • Add further tests. Currently tests only ensure that invalid files do not cause harm if they somehow bypass model validation.

Replace PartCategory with a pre-defined enum

No real point in having user-created categories for this, the benefit of having simple, pre-defined categories means less setup work for the end user as they likely don't care that much about them anyway.

  • Remove relational table, replace with enum
  • Replace dropdown list with enum list
  • Replace all editing methods to handle enum
  • Update part creation and edit with new dropdown

Add EF Core attributes to new entities

  • Just once over everything as far as entities go, make sure the old and new are setup properly. No, they aren't really directly hit because of viewmodels, but they serve as a hub for the core restrictions for me to copy/paste over into vms so I don't have to remember.

Setup inventory reports

  • Monthly? Or quarterly report that reports sales so far, does not reset the current sales tally, and updates all minimum stock levels based on some algorithm
  • Yearly report that resets the current sales tally and provides a piecewise. This may require a new entity for tracking a salesmonth but this can be added later, not necessary right now

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.