Objectif: You will build a small tool to manage orders of a delivery company.

This time you will develop in a development environment with multiple files and tools to assist the development process: web server with auto reload, linting and more.

First you will setup this environment, (some parts are already done for you). Then we will get into the requirements for the small application.

You need to have the following tools installed:

Check that it works from the shell:

$ git --version
git version X.Y.Z

$ node --version
vX.Y.Z

$ code --version
X.Y.Z
...
x64

Vue Devtools will allow you to debug Vue variables and computed easily.

To get you started the senior developer of the project has already created the initial development environment. Create your own copy:

Create my classroom assignment

Accept the assignment

Refresh the page until you see a link

Clone your project

Change directory to your cloned folder vuejs-exercises-level2-

Use the node package manager to Install the required dependencies (from the project's package.json file)

npm install

Run the development server (which has auto-reload)

npm run dev

Hint: Ctrl-C to exit

This project is setup with two linter to help use follow best practice in code formatting and quality:

Run the following command to auto fix formatting and see errors.

npm run lint
npm run format

This project has been created with the create-vue application and uses Vue Single-File Components (sfc, the *.vue files). It allows to have javascript, html and css in a single file while style separating concerns.

Additionally, this project setup uses vue-router to have multiple client side virtual pages without using a server.

The two files you will need to edit are:

Path

View

/

src/view/OrdersView.vue

/add

src/view/OrderAdd.vue

The starting code of view has been further split into multiple files

File

Description

index.html

The html outside of the vue app (should not be edited, except for icon and title)

main.js

The main entry point where the vue app is created and configured with plugins like vue-router

src/App.vue

The main Vue View, think of it as the layout of your site.

Start coding!

The application manages the delivery of parcels.

A Delivery has following attributes:

Name

Type

Date

String (yyyy/mm/dd/) (might depend on your system locals)

Sender

String

Destination

String

Weight

Number in Kg

Status

"Confirmed", "In delivery", "Delivered"

Getting started

Create a table to display all orders in OrderView.vue. The "initial" orders data are hard-coded in order to implement filtering and sorting.

Functionalities:

Filtering

Sorting:

Implement persistence by saving and reading the order list to localStorage.

Functionalities:

Clicking on the "Add new order" button, switches to a new view (page).

This page displays a form allowing to add a new order:

Functionalities:

Congratulations, you covered all the basics for today!

If you want you can continue with the following suggestions:

Learn more about components in the tutorial and try to transform a table row into a component.

This will be useful for bigger projects as well as understand how third party components libraries work.