summaryrefslogtreecommitdiff
path: root/NEWS.md
blob: 205c63706be2ed4c34697669c6893f79ee18a687 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# NEWS

## New in version 0.2 (git)

NOTE: Version 0.2 updates the database schema, make sure to run:

$ `python manage.py migrate`

or manually specify the newest migration for the procurement system with:

$ `python manage.py migrate procurement 0002_add_representative`

To update the database.

### Admin Interface

You may now create multiple representatives for each supplier either in the
Suppliers admin panel for each Supplier or in the new Representatives
admin panel, currently only name and email are stored for each representative
but more information can be added in future commits.

### User Interface

The Component Search results now display multiple representatives for each
supplier as additional lines below the supplier's first representative.

An extra View Suppliers page has been added that allows you to view the
details for a given Supplier, which currently just lists the representatives'
contact information and a list of parts the supplier provides.

### API

`supplier.representative_name` and `supplier.representative_email` have been
removed from the API and replaced by a list of objects 
`supplier.representatives` which each contain name and email attributes.

3 new endpoints have been added:

* `api/supplier`: returns a list of all supplier objects in the system
* `api/supplier/<id>`: returns just the supplier with the given id
* `api/supplier/<id>/components`: returns a slightly different supplier
    object that contains a list of components they supply (the returned
    component objects don't contain recursive objects to all of the
    suppliers that provide them, just contains a list of their ids)

### Database

A Representative model has been added to allow for suppliers to have multiple
representatives, it just uses a ForeignKey relationship with a Supplier to
associate them. Currently it just contains name and email fields but more can
be added.

### Bug Fixes/Internal

* `class="active"` is now set on the active page in the navigation menu,
    previously it wasn't due to the case of the page_name