From 12d1f9fd979c11b9e3a3a89b1595b07569b88f79 Mon Sep 17 00:00:00 2001 From: workmai Date: Thu, 4 Oct 2018 12:14:39 -0600 Subject: Initial commit of the coding assignment base project --- .../admin_templates/source_components.html | 45 +++++++++++++ .../templates/procurement/documentation.html | 76 ++++++++++++++++++++++ .../procurement/includes/supplier_list.html | 37 +++++++++++ .../templates/procurement/source_components.html | 61 +++++++++++++++++ 4 files changed, 219 insertions(+) create mode 100644 procurement/templates/procurement/admin_templates/source_components.html create mode 100644 procurement/templates/procurement/documentation.html create mode 100644 procurement/templates/procurement/includes/supplier_list.html create mode 100644 procurement/templates/procurement/source_components.html (limited to 'procurement/templates') diff --git a/procurement/templates/procurement/admin_templates/source_components.html b/procurement/templates/procurement/admin_templates/source_components.html new file mode 100644 index 0000000..2deae1e --- /dev/null +++ b/procurement/templates/procurement/admin_templates/source_components.html @@ -0,0 +1,45 @@ +{% extends "admin/base_site.html" %} +{% load i18n admin_modify %} +{% block extrahead %}{{ block.super }} + + + + + {% for stylesheet in module_stylesheets %} + + {% endfor %} +{% url 'admin:jsi18n' as jsi18nurl %} +{% endblock %} +{% block extrastyle %}{{ block.super }} +{% endblock %} +{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %} +{% block breadcrumbs %}{% if not is_popup %} + +{% endif %}{% endblock %} + +{% block content %} +
+ + + {% if supplier_results != None %} + {% include "suppliers/includes/supplier_list.html" %} + {% endif %} +
+ + + + + + + + + + + + {% for script in module_javascripts %} + + {% endfor %} +{% endblock %} \ No newline at end of file diff --git a/procurement/templates/procurement/documentation.html b/procurement/templates/procurement/documentation.html new file mode 100644 index 0000000..4775890 --- /dev/null +++ b/procurement/templates/procurement/documentation.html @@ -0,0 +1,76 @@ +{% extends 'base.html' %} + +{% block main_content_area %} +
+ + +
+ +
+
+
+

Introduction

+

+ This is a very simple component and supplier management system. The intention function of the system + is to maintain a list of components, and the suppliers who are authorised to supply them. Administrative + staff maintain the list of suppliers, components and their associations, while general staff simply + use the from page to look up a component, and see its list of suppliers. +

+

+ The system is written in Python (v3.6), using the Django framework (v2.1.2). Documentation for Django + is available here. +

+ + +

Adding Data

+

+ You can manage the components and suppliers using the + django admin panel. +

+ +

Supplier List

+

+ Components and their approved Suppliers can be located under + source components. From this page you may search for a + component, and then click the Find Suppliers button to display its Suppliers +

+ +

API

+

+ A simple REST api is integrated into the system, using the Django Rest Framework. + It provides a means of querying all components or, by providing an id + in the url, a specific component. +

+
+ +
+ +
+ + + + +{% endblock %} \ No newline at end of file diff --git a/procurement/templates/procurement/includes/supplier_list.html b/procurement/templates/procurement/includes/supplier_list.html new file mode 100644 index 0000000..028e62c --- /dev/null +++ b/procurement/templates/procurement/includes/supplier_list.html @@ -0,0 +1,37 @@ + + +
+
+ Approved Suppliers for {{ component }} +
+ +
+
+ + + + + + + + + + {% for supplier in supplier_results %} + + + + + + {% empty %} + + + + {% endfor %} + +
CompanyRepresentativeEmail
{{ supplier.name }}{{ supplier.representative_name }}{{ supplier.representative_email }}
No authorized suppliers found.
+
+ +
+ +
+ \ No newline at end of file diff --git a/procurement/templates/procurement/source_components.html b/procurement/templates/procurement/source_components.html new file mode 100644 index 0000000..3eebf84 --- /dev/null +++ b/procurement/templates/procurement/source_components.html @@ -0,0 +1,61 @@ +{% extends 'base.html' %} +{% load static %} + +{% block additional_css %} + + +{% endblock %} + +{% block main_content_area %} +
+
+
+
+
+ {% csrf_token %} + {{ form }} +
+
+ +
+
+
+ +
+ + {% if supplier_results != None %} + {% include 'procurement/includes/supplier_list.html' %} + {% endif %} +
+ + +
+
+
+ Searching Procurement Records +
+ +
+
+ + {{ supplier_count }} Suppliers + {{ suppliers_last_updated }} + + + {{ component_count }} Components + {{ components_last_updated }} + +
+ +
+ +
+ +
+ +{% endblock %} + +{% block additional_js %} + + +{% endblock %} \ No newline at end of file -- cgit v1.1