jollopre / mps Goto Github PK
View Code? Open in Web Editor NEWMarshall Packaging System
License: MIT License
Marshall Packaging System
License: MIT License
When a new oder is created, currently is returned 204 status with no content. In order to reduce the number of calls to the server, it is best if is returned the object created, so that the interface is updated when a successful response call is received.
For that we have to change at the server:
and update OrderContainer.add at the client-side.
It is needed to include ESlinter for JavaScript in order to follow best practices and code conventions.
The template should include at least:
It is important to stick with the terminology that MP uses for creating enquiries for a quotation package. Therefore, we have to rename every place in code accordingly:
An order has many order items. The order_item resource has to be nested within order resource (e.g. http://guides.rubyonrails.org/routing.html#nested-resources). Initially, is is needed the following actions:
This controller has to provide test.
The UI should provide an action to delete an enquiry which eventually sends a DELETE request for an enquiry id.
Note, if an enquiry has multiple quantities introduced, all the enquiry copies inserted in the db should be destroyed too.
The list of Orders for a given customer it is expected to be long so that filters by date for created_at and updated_at will help to select the right record when the user interacts with the interface. At least filter by year is required.
The time estimated to complete this task is 2 hours.
Initially Read operations will be supported, therefore two actions are needed:
This issue has to provide test.
There are several gems or packages that are marked as vulnerable from github.
In order to conform to REST principles, there is a need to implement a stateless server solution to authenticate the clients.
Interesting article to extract ideas: http://www.mccartie.com/2016/11/03/token-based-api-authentication.html
In order to export order items to be sent to suppliers, an output .pdf formatted need to be included for each order item in the system.
Currently the live site is under http protocol. This means that the data between client and server is non-encrypted and "man in the middle" attacks may occur. In our last meeting discussion, we agreed to generate a "Self Signed SSL certificate" for now since the site is meant to be accessible only for employees.
@marshallpack1974 is aware that "warning" messages will appear on any browser when someone try to access to the site since the certificate is not issued and verified by a trusted authority.
This task will involve:
The time estimated to complete this task is 5 hours.
In order to select what attributes from a model will be json exported, we override as_json method in each model. However, when a model include associations (i.e. references to other models), the respective as_json is not called for the association.
By doing some research, we have figure out that overriding serializable_hash instead of as_json will automatically include the filtered attributes in associated models. (see at https://github.com/rails/rails/blob/master/activemodel/lib/active_model/serialization.rb#L139)
The OrderItem container component is in charge of communicating with the server. This component will render different presentational components:
This model will have (at least):
Once any of the enquiries part of a quotation are ready, i.e. an EnquiryCost record includes costing price and sale price, the system should allow the user to send an email with the detailed quotation attached. The pdf should include:
Since a customer typically asks in an enquiry different quantities for the same product, the system has to provide a way to permit it.
The creation of a presentational component for displaying any HTTP error raised through client-server communication is required.
The UI that presents a quotation, should include a functionality to send an email to a supplier. This action requires from the user:
In order to have more predictable changes that happen into UI state, it is desired to include a state management library such as Redux. This will benefit the interface in many ways (e.g. single source of state changes, reducing the need of cascading down methods as properties to trigger state changes, simplifying the authentication logic, making easy to display feedback messages when network requests are made, etc.)
The time estimated to complete this task is 10 hours.
The enquiry form has different fields to be applied for the following products:
We have identified two types of field:
This library will help to use the URL as the mechanism that governs what component it is displayed.
In order to provide a better UX, it is desired to introduce any kind of UI component (e.g. spinning wheel) that is shown while waiting for a server's response.
It is important to stick with the terminology that MP uses for creating offer packages for its customers. Therefore, we have to rename every place in code accordingly:
An edit customers functionality will permit to modify customer details through the UI
A set of bash scripts to automatise the process of build/deploy the system will help to reduce the need of manual intervention.
In order to filter the long list of customers at Customers page, it is required to add a search box that only displays a list of customers matching the criteria typed.
The text entered will be executed against the following customer fields:
and it is expected to be case insensitive.
The time estimated to complete this task is 4 hours.
When trying to download a PDF for a given order item through Firefox, the PDF appears to be generated by the server, however in Firefox the dialog to download/cancel the file attachment is not prompted.
The time estimated to complete this task is 3 hours.
Configure Rails to be a JSON API for REST
The following actions are needed:
This issue has to provide test for every action provided.
The following view lists must be paginated:
otherwise, this will not scale when the db has a considerable amount of results. NOTE, this will not be delivered as part of the MVP.
A more comprehensive review has to be made into the database queries that are generated into the API.
Currently, when a new deploy is performed. If there are server side changes at the db level, we have to manually run rake db:migrate
in order to bring the database to the latest migration reflected in code.
A before deploy hook to determine whether or not that command has to be triggered will automatise this manual behaviour
It is required to create the following models:
It will be needed to create seeds that populate the database for development.
Every reducer within the client implements the same function arrayToMap to convert a collection of objects into a map of objects by id.
It is desired to refactor into one function (e.g. Key_by from lodash) which receives an array and the object key candidate to be the key into the returning map.
A read-only component to display the customer attributes.
Review Gemfile and remove any dependencies not needed for running Rails API only.
After presenting to Steven the seeds data file, some amendments have been suggested.
Currently, before performing any deploy, it is needed to manually build all the JS assets and place them within another directory for being server in apache.
A better approach to automatise this flow will reduce the time to deploy
This view has to show the different orders for a given client.
Any time an email is sent to a supplier regarding an enquiry, a new EnquiryCost record is saved in the db. The EnquiryCost should have at least:
A functionality to send a given orderItem, i.e. its PDF, to a one or more suppliers will help to speed up the manual process of sending different emails with the same content to different suppliers.
At our last meeting, it was agreed to auto-generate the email content together with the PDF attached for a given order item and automatically invoke Outlook passing that data. It has to be explored if that workflow is possible to implement.
Ideally a mockup may help to understand this workflow.
The time estimated to complete this task is 10 hours.
In order to make the system more reliable, a set of unit test for each model provided will help.
Since RSpec provides a better organisation for tests thanks to its expressiveness, we would like to move all the server related test towards that approach.
Investigate http://getbootstrap.com/customize/ in order to produce a minimal bootstrap version with the components needed.
This controller holds the value associated for an order_item and a feature (according to the product that the order_item belongs to). Currently, it is only needed the following action:
This issues also requires unit tests.
Steven is going to pass me the list of customers so that we have to create a script that populates the table customers in the database.
The format for an enquiry pdf should be formatted as follows:
Product | Plastic Carrier Bag |
Quantities | 2000, 5000, 10000 |
Handles | Black twisted paper handles |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.