NikolaGolubovic / invoices-app

Home Page:invoices-app-sooty.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invoice app

The challenge

Your challenge is to build out this invoicing application using React and get it looking as close to the design as possible.

We provide the data in a local data.json file, so use that to populate the content on first load. If you want to take it up a notch, feel free to build this as a full-stack application!

Your users should be able to:

  • View the optimal layout for the app depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Create, read, update, and delete invoices
  • Receive form validations when trying to create/edit an invoice
  • Save draft invoices, and mark pending invoices as paid
  • Filter invoices by status (draft/pending/paid)
  • Toggle light and dark mode
  • Bonus: Keep track of any changes, even after refreshing the browser (localStorage could be used for this if you're not building out a full-stack app)

Expected Behaviour

  • Creating an invoice
    • When creating a new invoice, an ID needs to be created. Each ID should be 2 random uppercased letters followed by 4 random numbers.
    • Invoices can be created either as drafts or as pending. Clicking "Save as Draft" should allow the user to leave any form field blank, but should create an ID if one doesn't exist and set the status to "draft". Clicking "Save & Send" should require all forms fields to be filled in, and should set the status to "pending".
    • Changing the Payments Terms field should set the paymentDue property based on the createdAt date plus the numbers of days set for the payment terms.
    • The total should be the sum of all items on the invoice.
  • Editing an invoice
    • When saving changes to an invoice, all fields are required when the "Save Changes" button is clicked. If the user clicks "Cancel", any unsaved changes should be reset.
    • If the invoice being edited is a "draft", the status needs to be updated to "pending" when the "Save Changes" button is clicked. All fields are required at this stage.
  • Users should be able to mark invoices as paid by clicking the "Mark as Paid" button. This should change the invoice's status to "paid".
  • Users should receive a confirmation modal when trying to delete invoices.
  • Feel free not to add custom styling for the date and dropdown form fields. The designs for those fields are optional extras and are mostly for illustration purposes.

All the required assets for this project are in the /assets folder. The assets are already exported for the correct screen size and optimized. Some images are reusable at multiple screen sizes. So if you don't see an image in a specific folder, it will typically be in another folder for that page.

The design system in the design file will give you more information about the various colors, fonts, and styles used in this project.

Have fun building! 🚀

About

invoices-app-sooty.vercel.app


Languages

Language:JavaScript 60.2%Language:CSS 37.4%Language:HTML 2.5%