Storing data before committing to data base, wait for approval of admin

8 views
Skip to first unread message

Mark

unread,
May 4, 2016, 5:49:38 PM5/4/16
to AngularJS

I'm building a mobile app using Ionic framework, so the front end is essentially a single page AngularJS app. I'm using Django Rest framework as the backend.

In the application, an employee should be able to suggest updates, deletes, or additions to database models. In my schema, there is a "Contact person" model (which has fields like first_name, last_name, phone_number, etc.), a "GPS Address model" (which has fields like street_name, street_num, city, etc.) and an overarching "Delivery stop" model to which virtually all of the other models relate.


What I need to implement is a system whereby an employee can suggest an edit to an existing object, say a Contact (id: 45, first_name: 'John', phone_number: "435-0000") which has a FK relationship to a Delivery Stop (id: 20, title: "Stop and Shop", notes: "closes at 0600"). The employee wants to update the phone number to "435-0001". But the update shouldn't be committed to the database until a manager has reviewed the update and approved, or edited the update then approved.


I have a few ideas about how I might do this, but none of them seem as easy as I think it could be. Does anyone have any suggestions about best practices in this situation?

The application will also include a special manager interface where they can few all suggested updates/edits and approve/reject them. The client side essentially functions with the Delivery Stop as the primary object, which shows all related items in a tabbed interface (Contacts, Gps addresses, etc.) And each time an edit is suggested by an employee, the appropriate manager will receive an email notification.


Any suggestions are much appreciated.

Reply all
Reply to author
Forward
0 new messages