django-bom 1.262__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of django-bom might be problematic. Click here for more details.
- bom/__init__.py +1 -0
- bom/admin.py +207 -0
- bom/apps.py +8 -0
- bom/auth_backends.py +47 -0
- bom/base_classes.py +31 -0
- bom/constants.py +217 -0
- bom/context_processors.py +9 -0
- bom/csv_headers.py +252 -0
- bom/decorators.py +32 -0
- bom/form_fields.py +59 -0
- bom/forms.py +1328 -0
- bom/helpers.py +367 -0
- bom/local_settings.py +35 -0
- bom/migrations/0001_initial.py +135 -0
- bom/migrations/0002_auto_20180908_2151.py +24 -0
- bom/migrations/0003_sellerpart_data_source.py +18 -0
- bom/migrations/0004_auto_20180911_0011.py +18 -0
- bom/migrations/0005_auto_20181007_1934.py +56 -0
- bom/migrations/0006_auto_20181007_1949.py +41 -0
- bom/migrations/0007_auto_20181009_0256.py +19 -0
- bom/migrations/0008_auto_20181030_0427.py +19 -0
- bom/migrations/0009_subpart_reference.py +18 -0
- bom/migrations/0010_auto_20181202_0733.py +23 -0
- bom/migrations/0011_auto_20181202_2113.py +22 -0
- bom/migrations/0012_partchangehistory.py +30 -0
- bom/migrations/0013_auto_20190222_1631.py +19 -0
- bom/migrations/0014_auto_20190223_2353.py +18 -0
- bom/migrations/0015_auto_20190303_1915.py +136 -0
- bom/migrations/0016_auto_20190405_2308.py +58 -0
- bom/migrations/0017_auto_20190616_1912.py +19 -0
- bom/migrations/0018_auto_20190616_2143.py +24 -0
- bom/migrations/0019_auto_20190624_1246.py +45 -0
- bom/migrations/0020_auto_20190627_0207.py +38 -0
- bom/migrations/0021_auto_20190627_0428.py +23 -0
- bom/migrations/0022_auto_20190811_2140.py +35 -0
- bom/migrations/0023_auto_20191205_2351.py +255 -0
- bom/migrations/0024_auto_20191214_1342.py +89 -0
- bom/migrations/0025_auto_20191221_1907.py +38 -0
- bom/migrations/0026_auto_20191222_2258.py +22 -0
- bom/migrations/0027_auto_20191222_2347.py +17 -0
- bom/migrations/0028_partrevision_displayable_synopsis.py +74 -0
- bom/migrations/0029_auto_20191231_1630.py +23 -0
- bom/migrations/0030_auto_20200101_2253.py +22 -0
- bom/migrations/0031_auto_20200104_1352.py +38 -0
- bom/migrations/0032_auto_20200126_1806.py +27 -0
- bom/migrations/0033_auto_20200203_0618.py +29 -0
- bom/migrations/0034_auto_20200222_0359.py +30 -0
- bom/migrations/0035_auto_20200303_0111.py +34 -0
- bom/migrations/0036_auto_20200303_0538.py +17 -0
- bom/migrations/0037_auto_20200405_1642.py +44 -0
- bom/migrations/0038_auto_20200422_0504.py +19 -0
- bom/migrations/0039_auto_20200929_2315.py +41 -0
- bom/migrations/0040_alter_organization_currency.py +19 -0
- bom/migrations/0041_organization_subscription_quantity.py +18 -0
- bom/migrations/0042_auto_20210720_2137.py +23 -0
- bom/migrations/0043_auto_20211123_0157.py +24 -0
- bom/migrations/0044_auto_20220831_1241.py +23 -0
- bom/migrations/0045_sellerpart_link.py +18 -0
- bom/migrations/0046_alter_sellerpart_unique_together.py +17 -0
- bom/migrations/0047_sellerpart_seller_part_number.py +18 -0
- bom/migrations/0048_rename_part_organization_number_class_bom_part_organiz_b333d6_idx_and_more.py +1017 -0
- bom/migrations/0049_alter_assembly_id_alter_assemblysubparts_id_and_more.py +99 -0
- bom/migrations/0050_alter_organization_options.py +17 -0
- bom/migrations/0051_alter_manufacturer_organization_and_more.py +41 -0
- bom/migrations/0052_remove_partrevision_attribute_and_more.py +584 -0
- bom/migrations/__init__.py +0 -0
- bom/models.py +886 -0
- bom/part_bom.py +192 -0
- bom/settings.py +262 -0
- bom/static/bom/css/dashboard.css +17 -0
- bom/static/bom/css/jquery.treetable.css +28 -0
- bom/static/bom/css/materialize.min.css +13 -0
- bom/static/bom/css/part-info.css +15 -0
- bom/static/bom/css/style.css +482 -0
- bom/static/bom/css/tablesorter-theme.materialize.css +176 -0
- bom/static/bom/css/treetable-theme.css +42 -0
- bom/static/bom/doc/sample_part_classes.csv +38 -0
- bom/static/bom/doc/test_bom.csv +6 -0
- bom/static/bom/doc/test_bom_5_intelligent.csv +4 -0
- bom/static/bom/doc/test_full_bom.csv +37 -0
- bom/static/bom/doc/test_new_parts.csv +5 -0
- bom/static/bom/doc/test_new_parts_5_intelligent.csv +5 -0
- bom/static/bom/img/_ionicons_svg_md-arrow-dropdown.svg +1 -0
- bom/static/bom/img/_ionicons_svg_md-arrow-dropright.svg +1 -0
- bom/static/bom/img/favicon.ico +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_dark_disabled_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_dark_focus_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_dark_normal_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_dark_pressed_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_light_disabled_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_light_focus_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_light_normal_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_light_pressed_web.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_dark_disabled_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_dark_focus_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_dark_normal_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_dark_pressed_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_light_disabled_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_light_focus_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_light_normal_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_light_pressed_web@2x.png +0 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_disabled_ios.eps +814 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_disabled_ios.svg +24 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_focus_ios.eps +1866 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_focus_ios.svg +51 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_normal_ios.eps +1031 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_normal_ios.svg +50 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_pressed_ios.eps +1031 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_pressed_ios.svg +50 -0
- bom/static/bom/img/google/web/vector/btn_google_light_disabled_ios.eps +814 -0
- bom/static/bom/img/google/web/vector/btn_google_light_disabled_ios.svg +24 -0
- bom/static/bom/img/google/web/vector/btn_google_light_focus_ios.eps +1837 -0
- bom/static/bom/img/google/web/vector/btn_google_light_focus_ios.svg +44 -0
- bom/static/bom/img/google/web/vector/btn_google_light_normal_ios.eps +1002 -0
- bom/static/bom/img/google/web/vector/btn_google_light_normal_ios.svg +43 -0
- bom/static/bom/img/google/web/vector/btn_google_light_pressed_ios.eps +1002 -0
- bom/static/bom/img/google/web/vector/btn_google_light_pressed_ios.svg +43 -0
- bom/static/bom/img/google_drive_logo.svg +1 -0
- bom/static/bom/img/indabom.png +0 -0
- bom/static/bom/img/mouser.png +0 -0
- bom/static/bom/img/octopart_blue.svg +19 -0
- bom/static/bom/js/formset-handler.js +65 -0
- bom/static/bom/js/jquery-3.4.1.min.js +2 -0
- bom/static/bom/js/jquery.ba-floatingscrollbar.min.js +10 -0
- bom/static/bom/js/jquery.treetable.js +629 -0
- bom/static/bom/js/materialize.min.js +6 -0
- bom/templates/bom/account-delete.html +23 -0
- bom/templates/bom/add-manufacturer-part.html +66 -0
- bom/templates/bom/add-sellerpart.html +93 -0
- bom/templates/bom/base-menu.html +16 -0
- bom/templates/bom/base.html +129 -0
- bom/templates/bom/bom-action-btn.html +23 -0
- bom/templates/bom/bom-action-table.html +57 -0
- bom/templates/bom/bom-base-menu.html +6 -0
- bom/templates/bom/bom-base.html +24 -0
- bom/templates/bom/bom-form-modal.html +36 -0
- bom/templates/bom/bom-form.html +30 -0
- bom/templates/bom/bom-modal-add-users.html +49 -0
- bom/templates/bom/bom-signup.html +12 -0
- bom/templates/bom/components/bom-flat.html +131 -0
- bom/templates/bom/components/bom-indented.html +237 -0
- bom/templates/bom/components/manufacturer-part-list.html +270 -0
- bom/templates/bom/components/seller-part-list.html +62 -0
- bom/templates/bom/create-part.html +65 -0
- bom/templates/bom/dashboard-menu.html +15 -0
- bom/templates/bom/dashboard.html +303 -0
- bom/templates/bom/edit-manufacturer-part.html +72 -0
- bom/templates/bom/edit-part-class.html +120 -0
- bom/templates/bom/edit-part.html +67 -0
- bom/templates/bom/edit-quantity-of-measure.html +119 -0
- bom/templates/bom/edit-user-meta.html +70 -0
- bom/templates/bom/help.html +1356 -0
- bom/templates/bom/manufacturer-info.html +82 -0
- bom/templates/bom/manufacturers.html +97 -0
- bom/templates/bom/nothing-to-see.html +15 -0
- bom/templates/bom/organization-create.html +135 -0
- bom/templates/bom/part-info.html +448 -0
- bom/templates/bom/part-revision-display.html +50 -0
- bom/templates/bom/part-revision-edit.html +39 -0
- bom/templates/bom/part-revision-manage-bom.html +115 -0
- bom/templates/bom/part-revision-new.html +57 -0
- bom/templates/bom/part-revision-release.html +41 -0
- bom/templates/bom/search-help.html +101 -0
- bom/templates/bom/seller-info.html +82 -0
- bom/templates/bom/sellers.html +97 -0
- bom/templates/bom/settings.html +734 -0
- bom/templates/bom/signup.html +28 -0
- bom/templates/bom/subscription_panel.html +16 -0
- bom/templates/bom/table_of_contents.html +47 -0
- bom/templates/bom/upload-bom.html +111 -0
- bom/templates/bom/upload-parts-help.html +103 -0
- bom/templates/bom/upload-parts.html +50 -0
- bom/templates/registration/login.html +39 -0
- bom/tests.py +1592 -0
- bom/third_party_apis/__init__.py +0 -0
- bom/third_party_apis/base_api.py +51 -0
- bom/third_party_apis/google_drive.py +166 -0
- bom/third_party_apis/mouser.py +132 -0
- bom/third_party_apis/test_apis.py +24 -0
- bom/urls.py +100 -0
- bom/utils.py +228 -0
- bom/validators.py +23 -0
- bom/views/__init__.py +0 -0
- bom/views/json_views.py +55 -0
- bom/views/views.py +1773 -0
- bom/wsgi.py +16 -0
- django_bom-1.262.dist-info/METADATA +206 -0
- django_bom-1.262.dist-info/RECORD +191 -0
- django_bom-1.262.dist-info/WHEEL +5 -0
- django_bom-1.262.dist-info/licenses/LICENSE +674 -0
- django_bom-1.262.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{% extends 'bom/bom-base.html' %}
|
|
2
|
+
|
|
3
|
+
{% load static %}
|
|
4
|
+
{% load materializecss %}
|
|
5
|
+
|
|
6
|
+
{% block head-title %}{{ title }}{% endblock %}
|
|
7
|
+
|
|
8
|
+
{% block bom-menu %}
|
|
9
|
+
<li><a href="{% url 'bom:part-info' part_id=manufacturer_part.part.id %}">Cancel</a></li>
|
|
10
|
+
{% endblock %}
|
|
11
|
+
|
|
12
|
+
{% block content %}
|
|
13
|
+
<div class="container-app">
|
|
14
|
+
{% if profile.role == 'A' %}
|
|
15
|
+
<h5>{{ manufacturer_part.part.full_part_number }} {{ manufacturer_part.part.description }}</h5>
|
|
16
|
+
|
|
17
|
+
<div class="row">
|
|
18
|
+
<form name="seller" action="{% url 'bom:manufacturer-part-add-sellerpart' manufacturer_part_id=manufacturer_part.id %}" method="post" class="col s12">
|
|
19
|
+
{% csrf_token %}
|
|
20
|
+
{{ form.non_field_errors }}
|
|
21
|
+
|
|
22
|
+
<div class="row">
|
|
23
|
+
<div class="fieldWrapper col m6 s12">
|
|
24
|
+
<label for="{{ form.seller.id_for_label }}"><b>Seller:</b></label>
|
|
25
|
+
{{ form.seller.errors }}
|
|
26
|
+
{{ form.seller }}
|
|
27
|
+
</div>
|
|
28
|
+
<div class="fieldWrapper col m6 s12">
|
|
29
|
+
<label for="{{ form.new_seller.id_for_label }}"><b>-or- New Seller:</b></label>
|
|
30
|
+
{{ form.new_seller.errors }}
|
|
31
|
+
{{ form.new_seller }}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="row">
|
|
35
|
+
<div class="fieldWrapper col m3 s12">
|
|
36
|
+
<label for="{{ form.seller_part_number.id_for_label }}">Seller Part Number:</label>
|
|
37
|
+
{{ form.seller_part_number.errors }}
|
|
38
|
+
{{ form.seller_part_number }}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="row">
|
|
42
|
+
<div class="fieldWrapper col m3 s12">
|
|
43
|
+
<label for="{{ form.unit_cost.id_for_label }}"><b>Unit Cost:</b></label>
|
|
44
|
+
{{ form.unit_cost.errors }}
|
|
45
|
+
{{ form.unit_cost }}
|
|
46
|
+
</div>
|
|
47
|
+
<div class="fieldWrapper col m3 s12">
|
|
48
|
+
<label for="{{ form.nre_cost.id_for_label }}">NRE Cost:</label>
|
|
49
|
+
{{ form.nre_cost.errors }}
|
|
50
|
+
{{ form.nre_cost }}
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="row">
|
|
54
|
+
<div class="fieldWrapper col m3 s12">
|
|
55
|
+
<label for="{{ form.minimum_order_quantity.id_for_label }}">Minimum Order Quantity:</label>
|
|
56
|
+
{{ form.minimum_order_quantity.errors }}
|
|
57
|
+
{{ form.minimum_order_quantity }}
|
|
58
|
+
</div>
|
|
59
|
+
<div class="fieldWrapper col m3 s12">
|
|
60
|
+
<label for="{{ form.minimum_pack_quantity.id_for_label }}">Minimum Pack Quantity:</label>
|
|
61
|
+
{{ form.minimum_pack_quantity.errors }}
|
|
62
|
+
{{ form.minimum_pack_quantity }}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="row">
|
|
66
|
+
<div class="fieldWrapper col m3 s12">
|
|
67
|
+
<label for="{{ form.lead_time_days.id_for_label }}">Lead Time (Days):</label>
|
|
68
|
+
{{ form.lead_time_days.errors }}
|
|
69
|
+
{{ form.lead_time_days }}
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="row">
|
|
73
|
+
<div class="fieldWrapper col m3 s12">
|
|
74
|
+
{{ form.ncnr.errors }}
|
|
75
|
+
{{ form.ncnr|materializecss }}
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="row">
|
|
79
|
+
<div class="col s6">
|
|
80
|
+
<a href="javascript:history.back()" class="waves-effect waves-light btn-flat grey-text lighten-1" style="margin-left: -16px;">Cancel</a>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="col s6 right-align">
|
|
83
|
+
<button class="waves-effect waves-light btn btn-primary" type="submit" name="action">Save
|
|
84
|
+
</button>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</form>
|
|
88
|
+
</div>
|
|
89
|
+
{% else %}
|
|
90
|
+
{% include 'bom/nothing-to-see.html' with required_privilege='Admin' %}
|
|
91
|
+
{% endif %}
|
|
92
|
+
</div>
|
|
93
|
+
{% endblock %}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<li><a title="IndaBOM | Feedback" href="https://forms.gle/4CUQuBcfBJ4eGXDW8" target="_blank">Feedback</a></li>
|
|
2
|
+
{% if user.is_superuser and user.is_authenticated %}<li><a title="IndaBOM | Admin" href="/admin/" target="_blank">Admin</a></li>{% endif %}
|
|
3
|
+
{% if user.is_authenticated %}
|
|
4
|
+
<li>
|
|
5
|
+
<form method="post" action="{% url 'logout' %}" style="display:inline;">
|
|
6
|
+
{% csrf_token %}
|
|
7
|
+
<button type="submit" title="IndaBOM | Log Out" style="background:none;border:none;padding:0;margin:0;color:inherit;cursor:pointer;">
|
|
8
|
+
Logout [{{ user.username }}]
|
|
9
|
+
</button>
|
|
10
|
+
</form>
|
|
11
|
+
</li>
|
|
12
|
+
{% endif %}
|
|
13
|
+
{% if not user.is_authenticated %}
|
|
14
|
+
<li><a title="IndaBOM | Log In" href="{% url 'login' %}">Login</a></li>
|
|
15
|
+
<li><a title="IndaBOM | Sign Up" href="{% url 'signup' %}">Sign Up</a></li>
|
|
16
|
+
{% endif %}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{# THIS FILE WILL NOT BE USED IF THE BASE TEMPLATE IS OVERRIDDEN #}
|
|
2
|
+
|
|
3
|
+
<!DOCTYPE html>
|
|
4
|
+
<html lang="en">
|
|
5
|
+
{% load static %}
|
|
6
|
+
<head>
|
|
7
|
+
<meta charset="utf-8">
|
|
8
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
10
|
+
<meta name="author" content="Mike Kasparian">
|
|
11
|
+
|
|
12
|
+
<title>{% block head-title %} - BOM{% endblock %}</title>
|
|
13
|
+
|
|
14
|
+
<!-- Materialize, eventually pull this into the project -->
|
|
15
|
+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
16
|
+
<link type="text/css" rel="stylesheet" href="{% static 'bom/css/materialize.min.css' %}" media="screen,projection"/>
|
|
17
|
+
|
|
18
|
+
<!--Let browser know website is optimized for mobile-->
|
|
19
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
20
|
+
|
|
21
|
+
<!-- Custom -->
|
|
22
|
+
<link rel="stylesheet" href="{% static 'bom/css/style.css' %}">
|
|
23
|
+
{% block head %}
|
|
24
|
+
{% endblock head %}
|
|
25
|
+
<link rel="shortcut icon" type="image/png" href="{% static 'bom/img/favicon.ico' %}"/>
|
|
26
|
+
</head>
|
|
27
|
+
|
|
28
|
+
<body>
|
|
29
|
+
<!--Import jQuery before materialize.js-->
|
|
30
|
+
{#<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>#}
|
|
31
|
+
<script type="text/javascript" src="{% static 'bom/js/jquery-3.4.1.min.js' %}"></script>
|
|
32
|
+
|
|
33
|
+
<div class="navbar-fixed">
|
|
34
|
+
<nav class="green lighten-1">
|
|
35
|
+
<div class="nav-wrapper">
|
|
36
|
+
|
|
37
|
+
{% if user.is_authenticated %}
|
|
38
|
+
<a href="{% url 'bom:home' %}" title="IndaBOM | Home" class="brand-logo left hide-on-med-and-down">
|
|
39
|
+
<img style="margin-top: 2px; margin-right: 6px;" width="52" alt="IndaBOM Logo" src="{% static 'bom/img/indabom.png' %}"/><span style="position: absolute;">BOM</span>
|
|
40
|
+
</a>
|
|
41
|
+
<a href="{% url 'bom:home' %}" title="IndaBOM | Home" class="brand-logo left hide-on-large-only" style="left: 2.5rem;">
|
|
42
|
+
<img style="margin-top: 2px; margin-right: 6px;" width="52" alt="IndaBOM Logo" src="{% static 'bom/img/indabom.png' %}"/><span style="position: absolute;">BOM</span>
|
|
43
|
+
</a>
|
|
44
|
+
{% else %}
|
|
45
|
+
<a href="{% url 'login' %}" title="IndaBOM | Home" class="brand-logo left hide-on-med-and-down">
|
|
46
|
+
<img style="margin-top: 2px; margin-right: 6px;" width="52" alt="IndaBOM Logo" src="{% static 'bom/img/indabom.png' %}"/><span style="position: absolute;">BOM</span>
|
|
47
|
+
</a>
|
|
48
|
+
<a href="{% url 'login' %}" title="IndaBOM | Home" class="brand-logo left hide-on-large-only" style="left: 2.5rem;">
|
|
49
|
+
<img style="margin-top: 2px; margin-right: 6px;" width="52" alt="IndaBOM Logo" src="{% static 'bom/img/indabom.png' %}"/><span style="position: absolute;">BOM</span>
|
|
50
|
+
</a>
|
|
51
|
+
{% endif %}
|
|
52
|
+
|
|
53
|
+
<a href="#" data-target="mobile-menu" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
|
54
|
+
|
|
55
|
+
<ul class="right hide-on-med-and-down">
|
|
56
|
+
{% block menu %}{% endblock %}
|
|
57
|
+
{% include 'bom/base-menu.html' %}
|
|
58
|
+
</ul>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
</nav>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="printer-show"><p>IndaBOM | www.indabom.com | {{ title|safe }}</p></div>
|
|
64
|
+
|
|
65
|
+
<!-- Make sure this is not in navbar-fixed or it will be disabled -->
|
|
66
|
+
<ul class="sidenav" id="mobile-menu">
|
|
67
|
+
{% block menu-mobile %}{% endblock %}
|
|
68
|
+
{% include 'bom/base-menu.html' %}
|
|
69
|
+
</ul>
|
|
70
|
+
|
|
71
|
+
<main>
|
|
72
|
+
{% block main %}
|
|
73
|
+
{% endblock main %}
|
|
74
|
+
{% if title %}
|
|
75
|
+
<div class="container">
|
|
76
|
+
<h1 class="col s12 light header center">{{ title|safe }}</h1>
|
|
77
|
+
</div>
|
|
78
|
+
{% endif %}
|
|
79
|
+
{% if messages %}
|
|
80
|
+
<div id="content" class="container">
|
|
81
|
+
<ul class="messages">
|
|
82
|
+
{% for message in messages %}
|
|
83
|
+
<li{% if message.tags %} class="card alert alert-{{ message.tags }} alert-dismissible"{% endif %} role="alert">
|
|
84
|
+
{{ message.message|safe }}
|
|
85
|
+
</li>
|
|
86
|
+
{% endfor %}
|
|
87
|
+
</ul>
|
|
88
|
+
</div>
|
|
89
|
+
{% endif %}
|
|
90
|
+
{% block content %}{% endblock %}
|
|
91
|
+
{% block action-btn %}{% endblock %}
|
|
92
|
+
</main>
|
|
93
|
+
|
|
94
|
+
<footer class="page-footer green lighten-1">
|
|
95
|
+
<div class="container">
|
|
96
|
+
<div class="row">
|
|
97
|
+
<div class="col l6 s12">
|
|
98
|
+
<h5 class="white-text">Help django-bom Grow</h5>
|
|
99
|
+
<p class="grey-text text-lighten-4">We hope you are as excited about django-bom as we are! Please reach out if you'd like to learn more at <a href="mailto:info@indabom.com">info@indabom.com</a>,
|
|
100
|
+
and check out the hosted version, <a href="https://www.indabom.com">IndaBOM</a>!</p>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="col l4 offset-l2 s12">
|
|
103
|
+
<h5 class="white-text">Links</h5>
|
|
104
|
+
<ul>
|
|
105
|
+
<li><a class="grey-text text-lighten-3" title="IndaBOM | Feedback" href="https://forms.gle/4CUQuBcfBJ4eGXDW8" target="_blank">Feedback</a></li>
|
|
106
|
+
</ul>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="row center">
|
|
110
|
+
<!-- Place this tag where you want the button to render. -->
|
|
111
|
+
<a class="github-button" href="https://github.com/mpkasp/django-bom" data-size="large" data-show-count="true" aria-label="Star mpkasp/django-bom on GitHub">Star</a>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="footer-copyright">
|
|
115
|
+
<div class="container">
|
|
116
|
+
django-bom is a django open source project.
|
|
117
|
+
<!-- <a class="grey-text text-lighten-4 right" href="#!">More Links</a> -->
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</footer>
|
|
121
|
+
|
|
122
|
+
<script type="text/javascript" src="{% static 'bom/js/materialize.min.js' %}"></script>
|
|
123
|
+
|
|
124
|
+
<!-- Github star link -->
|
|
125
|
+
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
|
126
|
+
|
|
127
|
+
{% block script %}{% endblock script %}
|
|
128
|
+
</body>
|
|
129
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{% if profile.role == 'A' %}
|
|
2
|
+
{# <div class="container-app">#}
|
|
3
|
+
<div class="fixed-action-btn">
|
|
4
|
+
<a class="btn-floating btn-large red" href="{% url 'bom:create-part' %}">
|
|
5
|
+
<i class="large material-icons">add</i>
|
|
6
|
+
</a>
|
|
7
|
+
<ul>
|
|
8
|
+
<!-- <li><a class="btn-floating red lighten-1 tooltipped" data-position="left" data-delay="50" data-tooltip="Test"><i class="material-icons">insert_chart</i></a></li> -->
|
|
9
|
+
<li><a class="btn-floating yellow lighten-1 tooltipped" data-position="left" data-delay="50" data-tooltip="Upload Parts" href="{% url 'bom:upload-parts' %}"><i
|
|
10
|
+
class="material-icons">cloud_upload</i></a></li>
|
|
11
|
+
<li><a class="btn-floating blue lighten-1 tooltipped" data-position="left" data-delay="50" data-tooltip="Create Part" href="{% url 'bom:create-part' %}"><i class="material-icons">library_add</i></a>
|
|
12
|
+
</li>
|
|
13
|
+
</ul>
|
|
14
|
+
</div>
|
|
15
|
+
{# </div>#}
|
|
16
|
+
<script>
|
|
17
|
+
$(document).ready(function () {
|
|
18
|
+
$('.fixed-action-btn').floatingActionButton();
|
|
19
|
+
$('.tooltipped').tooltip();
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
22
|
+
{% endif %}
|
|
23
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{# If you're using a form / want actions: form_name, form_action, form_select_name, form_select_actions (dict: {select_value: title}), #}
|
|
2
|
+
<form name="{{ form_name }}" action="{{ form_action }}" method="post" enctype="multipart/form-data">
|
|
3
|
+
{% csrf_token %}
|
|
4
|
+
<div class="row" style="margin-bottom: 0;">
|
|
5
|
+
<div class="input-field col s10 m4">
|
|
6
|
+
<select name="{{form_select_name}}">
|
|
7
|
+
<option value="" disabled selected>Choose your action</option>
|
|
8
|
+
{% for val, title in form_select_actions.items %}
|
|
9
|
+
<option value="{{ val }}">{{title}}</option>
|
|
10
|
+
{% endfor %}
|
|
11
|
+
</select>
|
|
12
|
+
<label>Action</label>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="col s2 m2">
|
|
15
|
+
<div class="input-field">
|
|
16
|
+
<button class="waves-effect waves-light btn btn-primary" type="submit">Go</button>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<table class="striped tight">
|
|
21
|
+
<thead>
|
|
22
|
+
<tr>
|
|
23
|
+
<th class="text-normal"><label><input type="checkbox" id="{{ form_select_name }}-select-all"><span></span></label></th>
|
|
24
|
+
|
|
25
|
+
{# CAN YOU HAVE BLOCKS ON INCLUDES? #}
|
|
26
|
+
{% block bom-table-headers %}{% endblock %}
|
|
27
|
+
{# <th class="text-normal">Code</th>#}
|
|
28
|
+
{# <th class="text-normal">Name</th>#}
|
|
29
|
+
{# <th class="text-normal">Description</th>#}
|
|
30
|
+
{# <th class="text-normal"><img height="18" style="padding: 4px 4px 0 4px;" alt="Mouser" title="Via Mouser.com" src="{% static 'bom/img/mouser.png' %}">Mouser Sourcing</th>#}
|
|
31
|
+
{# <th class="text-normal">Options</th>#}
|
|
32
|
+
</tr>
|
|
33
|
+
</thead>
|
|
34
|
+
<tbody>
|
|
35
|
+
{% block bom-table-items %}{% endblock %}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
{# {% for item in items %}#}
|
|
39
|
+
{# <tr>#}
|
|
40
|
+
{# {% if form_name %}#}
|
|
41
|
+
{# <td><label><input type="checkbox" class="filled-in checkbox-array" name="actions" value="{{ part_class.id }}"><span></span></label></td>#}
|
|
42
|
+
{# {% endif %}#}
|
|
43
|
+
{##}
|
|
44
|
+
{# <td class="text-normal">{{ part_class.code }}</td>#}
|
|
45
|
+
{# <td class="text-normal">{{ part_class.name }}</td>#}
|
|
46
|
+
{# <td class="text-normal">{{ part_class.comment }}</td>#}
|
|
47
|
+
{# <td class="text-normal">{% if part_class.mouser_enabled %}#}
|
|
48
|
+
{# <img height="24" style="padding: 4px 4px 0 4px;" alt="Mouser" title="Via Mouser.com" src="{% static 'bom/img/mouser.png' %}">{% endif %}</td>#}
|
|
49
|
+
{# <td>#}
|
|
50
|
+
{# <a class="waves-effect waves-green btn-flat" href="{% url 'bom:part-class-edit' part_class_id=part_class.id %}"><i#}
|
|
51
|
+
{# class="material-icons left green-text text-lighten-1">edit</i>Edit</a>#}
|
|
52
|
+
{# </td>#}
|
|
53
|
+
{# </tr>#}
|
|
54
|
+
{# {% endfor %}#}
|
|
55
|
+
</tbody>
|
|
56
|
+
</table>
|
|
57
|
+
</form>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{% if user.is_authenticated and user.bom_profile.organization %}
|
|
2
|
+
<li {% if name == "manufacturers" %}class="active"{% endif %}><a title="IndaBOM | Manufacturers" href="{% url 'bom:manufacturers' %}">Manufacturers</a></li>
|
|
3
|
+
<li {% if name == "sellers" %}class="active"{% endif %}><a title="IndaBOM | Sellers" href="{% url 'bom:sellers' %}">Sellers</a></li>
|
|
4
|
+
<li {% if name == "settings" %}class="active"{% endif %}><a title="IndaBOM | Settings" href="{% url 'bom:settings' tab_anchor='user' %}">Settings</a></li>
|
|
5
|
+
{% endif %}
|
|
6
|
+
<li {% if name == "help" %}class="active"{% endif %}><a title="IndaBOM | Help" href="{% url 'bom:help' %}">Help</a></li>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{% extends BASE_TEMPLATE %}
|
|
2
|
+
|
|
3
|
+
{# This template is for anything we want in the BOM app and should not be overridden. Anything that can be overriden should be in BASE_TEMPLATE, or base.html #}
|
|
4
|
+
|
|
5
|
+
{% block menu %}
|
|
6
|
+
{% block bom-menu %}{% endblock %}
|
|
7
|
+
{% include 'bom/bom-base-menu.html' %}
|
|
8
|
+
{% endblock %}
|
|
9
|
+
|
|
10
|
+
{% block menu-mobile %}
|
|
11
|
+
{% block bom-menu-mobile %}{% endblock %}
|
|
12
|
+
{% include 'bom/bom-base-menu.html' %}
|
|
13
|
+
{% endblock %}
|
|
14
|
+
|
|
15
|
+
{% block script %}
|
|
16
|
+
<!-- materialize form select -->
|
|
17
|
+
<script>
|
|
18
|
+
$(document).ready(function () {
|
|
19
|
+
$('select').formSelect();
|
|
20
|
+
$('.sidenav').sidenav();
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
23
|
+
{% block bom-script %}{% endblock %}
|
|
24
|
+
{% endblock script %}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{% load materializecss %}
|
|
2
|
+
{% load static %}
|
|
3
|
+
|
|
4
|
+
<a class="waves-effect waves-light btn btn-primary modal-trigger modal-{{ name }}"
|
|
5
|
+
href="#modal-{{ name }}">{{ modal_title }}</a>
|
|
6
|
+
|
|
7
|
+
<div id="modal-{{ name }}" class="modal left-align">
|
|
8
|
+
<form name="seller" action="{{ action }}" method="post" class="col s12" enctype="multipart/form-data">
|
|
9
|
+
<div class="modal-content">
|
|
10
|
+
<div class="row">
|
|
11
|
+
{% if modal_title %}<h2 class="light" style="margin-top: 0;">{{ modal_title }}</h2>{% endif %}
|
|
12
|
+
{% if modal_description %}<p>{{ modal_description }}</p>{% endif %}
|
|
13
|
+
{% if form %}
|
|
14
|
+
{% csrf_token %}
|
|
15
|
+
{{ form|materializecss:'m6 s12' }}
|
|
16
|
+
{% endif %}
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="modal-footer">
|
|
20
|
+
<a href="#!" class="modal-close waves-effect waves-green btn-flat">Cancel</a>
|
|
21
|
+
{% if form %}
|
|
22
|
+
<button class="waves-effect waves-light btn btn-primary" type="submit" name="{{ name }}">Submit</button>
|
|
23
|
+
{% else %}
|
|
24
|
+
<a href="#!" class="modal-close waves-effect green lighten-1 waves-green btn-flat">Ok</a>
|
|
25
|
+
{% endif %}
|
|
26
|
+
</div>
|
|
27
|
+
</form>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
{% block script %}
|
|
31
|
+
<script>
|
|
32
|
+
$(document).ready(function () {
|
|
33
|
+
$('.modal').modal();
|
|
34
|
+
});
|
|
35
|
+
</script>
|
|
36
|
+
{% endblock %}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{% extends 'bom/bom-base.html' %}
|
|
2
|
+
|
|
3
|
+
{% load materializecss %}
|
|
4
|
+
{% load static %}
|
|
5
|
+
|
|
6
|
+
{% block head-title %}{{ title }}{% endblock %}
|
|
7
|
+
|
|
8
|
+
{% block bom-menu %}
|
|
9
|
+
<li><a href="javascript:history.back()">Cancel</a></li>
|
|
10
|
+
{% endblock %}
|
|
11
|
+
|
|
12
|
+
{% block content %}
|
|
13
|
+
<div class="container-app">
|
|
14
|
+
{% if h1 %}<h2 class="light" style="margin-top: 0px;">{{ h1 }}</h2>{% endif %}
|
|
15
|
+
<form name="seller" action="{{ action }}" method="post" class="col s12">
|
|
16
|
+
<div class="row">
|
|
17
|
+
{% csrf_token %}
|
|
18
|
+
{{ form|materializecss:'m6 s12' }}
|
|
19
|
+
</div>
|
|
20
|
+
<div class="row">
|
|
21
|
+
<div class="col s6">
|
|
22
|
+
<a href="javascript:history.back()" class="waves-effect waves-light btn-flat grey-text lighten-1" style="margin-left: -16px;">Cancel</a>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="col s6 right-align">
|
|
25
|
+
<button class="waves-effect waves-light btn btn-primary" type="submit" name="action">Save</button>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</form>
|
|
29
|
+
</div>
|
|
30
|
+
{% endblock %}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{% load materializecss %}
|
|
2
|
+
{% load static %}
|
|
3
|
+
|
|
4
|
+
<a class="waves-effect waves-light btn btn-primary modal-trigger modal-{{ name }}"
|
|
5
|
+
href="#modal-{{ name }}">{{ modal_title }}</a>
|
|
6
|
+
|
|
7
|
+
<div id="modal-{{ name }}" class="modal left-align">
|
|
8
|
+
<form name="seller" action="{{ action }}" method="post" class="col s12" enctype="multipart/form-data">
|
|
9
|
+
<div class="modal-content">
|
|
10
|
+
<div class="row">
|
|
11
|
+
{% if modal_title %}<h2 class="light" style="margin-top: 0;">{{ modal_title }}</h2>{% endif %}
|
|
12
|
+
<div class="col s12">
|
|
13
|
+
{% if is_pro and user_can_manage_members %}
|
|
14
|
+
{% csrf_token %}
|
|
15
|
+
<p class="flow-text-small grey-text text-darken-2">To add a user, ensure they have already
|
|
16
|
+
created an IndaBOM account and are not currently part of another organization.
|
|
17
|
+
Then, enter their <b>username</b> (not email) and select their role below.</p>
|
|
18
|
+
{{ form|materializecss:'m6 s12' }}
|
|
19
|
+
{% elif is_pro and not user_can_manage_members %}
|
|
20
|
+
<p class="flow-text-small red-text text-darken-1">
|
|
21
|
+
<b>Access Restricted:</b> Please contact an organization administrator to add new members to
|
|
22
|
+
your team.
|
|
23
|
+
</p>
|
|
24
|
+
{% else %}
|
|
25
|
+
<p>Upgrade your organization subscription to professional to manage members.</p>
|
|
26
|
+
{% endif %}
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="modal-footer">
|
|
31
|
+
<a href="#!" class="modal-close waves-effect waves-green btn-flat">Cancel</a>
|
|
32
|
+
{% if is_pro and user_can_manage_members %}
|
|
33
|
+
<button class="waves-effect waves-light btn btn-primary" type="submit" name="{{ name }}">Submit</button>
|
|
34
|
+
{% elif is_pro and not user_can_manage_members %}
|
|
35
|
+
<a href="#!" class="modal-close waves-effect green lighten-1 waves-green btn-flat">Ok</a>
|
|
36
|
+
{% else %}
|
|
37
|
+
<a href="#!" class="modal-close waves-effect green lighten-1 waves-green btn-flat">Ok</a>
|
|
38
|
+
{% endif %}
|
|
39
|
+
</div>
|
|
40
|
+
</form>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
{% block script %}
|
|
44
|
+
<script>
|
|
45
|
+
$(document).ready(function () {
|
|
46
|
+
$('.modal').modal();
|
|
47
|
+
});
|
|
48
|
+
</script>
|
|
49
|
+
{% endblock %}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{# To include this widget, make sure to pass: `parts`, `order_by`, `part`, `part_revision`, `profile` variables - TODO Could remove part if we pass part revision #}
|
|
2
|
+
{% load static %}
|
|
3
|
+
|
|
4
|
+
<div class="row printer-hide" style="padding-top: 16px;">
|
|
5
|
+
<div class="col s6">
|
|
6
|
+
<a class="waves-effect waves-green btn-flat btn-icon-round button-reset-filter-flat tooltipped" data-position="bottom" data-tooltip="Reset filter" onclick="refreshTableSorterFlat()"><i
|
|
7
|
+
class="material-icons">refresh</i></a>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="col s6 right-align">
|
|
10
|
+
{% if manage and profile.role == 'A' %}
|
|
11
|
+
<a class="waves-effect waves-green btn-flat red-text"
|
|
12
|
+
href="{% url 'bom:part-remove-all-subparts' part_id=part.id part_revision_id=part_revision_id %}"
|
|
13
|
+
onclick="return confirm('Are you sure you want to remove ALL subparts from {{ part.full_part_number }}?')">Remove All Subparts
|
|
14
|
+
</a>
|
|
15
|
+
{% else %}
|
|
16
|
+
<!-- Dropdown Trigger -->
|
|
17
|
+
<button class="dropdown-trigger-flat waves-effect waves-green btn-flat" href='#' data-target='manage-bom-{{ part.id }}-flat'>
|
|
18
|
+
<i class="material-icons right">arrow_drop_down</i>Manage
|
|
19
|
+
</button>
|
|
20
|
+
<!-- Dropdown Structure -->
|
|
21
|
+
<ul id='manage-bom-{{ part.id }}-flat' class='dropdown-content'>
|
|
22
|
+
{% if profile.role == 'A' %}
|
|
23
|
+
<li>{% if part_revision.configuration == 'W' %}
|
|
24
|
+
<a class="green-text text-lighten-1" href="{% url 'bom:part-manage-bom' part_id=part.id part_revision_id=part_revision.id %}">
|
|
25
|
+
<i class="material-icons green-text text-lighten-1">edit</i>Edit BOM</a>
|
|
26
|
+
{% else %}
|
|
27
|
+
<a class="grey-text text-lighten-1" onclick="alert('Can\'t edit a released part!')"><i class="material-icons grey-text text-lighten-1">edit</i>Edit BOM</a>
|
|
28
|
+
{% endif %}
|
|
29
|
+
</li>
|
|
30
|
+
{% endif %}
|
|
31
|
+
{% if part_revision %}
|
|
32
|
+
<li><a class="green-text text-lighten-1" href="{% url 'bom:part-revision-export-bom-flat' part_revision_id=part_revision.id %}">
|
|
33
|
+
<i class="material-icons green-text text-lighten-1">cloud_download</i>Download CSV</a>
|
|
34
|
+
</li>
|
|
35
|
+
<li><a class="green-text text-lighten-1" href="{% url 'bom:part-revision-export-bom-flat-sourcing' part_revision_id=part_revision.id %}">
|
|
36
|
+
<i class="material-icons green-text text-lighten-1">cloud_download</i>Download CSV (sourcing)</a>
|
|
37
|
+
</li>
|
|
38
|
+
<li><a class="green-text text-lighten-1" href="{% url 'bom:part-revision-export-bom-flat-sourcing-detailed' part_revision_id=part_revision.id %}">
|
|
39
|
+
<i class="material-icons green-text text-lighten-1">cloud_download</i>Download CSV (sourcing detailed)</a>
|
|
40
|
+
</li>
|
|
41
|
+
{% else %}
|
|
42
|
+
<li><a class="green-text text-lighten-1 disabled" href=""><i class="material-icons green-text text-lighten-1">cloud_download</i>Download CSV</a></li>
|
|
43
|
+
{% endif %}
|
|
44
|
+
</ul>
|
|
45
|
+
{% endif %}
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="responsive-table-wrapper" style="padding-bottom: 25px;">
|
|
49
|
+
<table id="flat-bom" class="highlight part-list tight single-line">
|
|
50
|
+
<thead>
|
|
51
|
+
<tr>
|
|
52
|
+
<th class="text-normal">Part No.</th>
|
|
53
|
+
<th class="text-normal">Qty</th>
|
|
54
|
+
<th class="text-normal">Refs</th>
|
|
55
|
+
<th class="text-normal">DNL</th>
|
|
56
|
+
<th class="text-normal">Synopsis</th>
|
|
57
|
+
<th class="text-normal">Rev</th>
|
|
58
|
+
<th class="text-normal">Manufacturer</th>
|
|
59
|
+
<th class="text-normal">MPN</th>
|
|
60
|
+
<!-- <th class="text-normal"><i>Ext. Qty</i></th> -->
|
|
61
|
+
<!-- <th class="text-normal"><i>Order Qty</i></th> -->
|
|
62
|
+
<th class="text-normal">Seller</th>
|
|
63
|
+
<th class="text-normal">Price</th>
|
|
64
|
+
<!-- <th class="text-normal"><i>Ext Cost</i></th> -->
|
|
65
|
+
<th class="text-normal">NRE</th>
|
|
66
|
+
</tr>
|
|
67
|
+
</thead>
|
|
68
|
+
{% for bom_id, subpart in bom_items.items %}
|
|
69
|
+
<tr>
|
|
70
|
+
<td class="text-normal"><a href="{% url 'bom:part-info' part_id=subpart.part.id %}">{{ subpart.part.full_part_number }}</a></td>
|
|
71
|
+
<td class="text-normal">{{ subpart.extended_quantity | floatformat }}</td>
|
|
72
|
+
<td class="text-normal">{{ subpart.references | default:"-" }}</td>
|
|
73
|
+
<td class="text-normal">{{ subpart.do_not_load | default:"-" }}</td>
|
|
74
|
+
<td class="text-normal">{{ subpart.part_revision.synopsis }}</td>
|
|
75
|
+
<td class="text-normal">{{ subpart.part_revision.revision }}</td>
|
|
76
|
+
<td class="text-normal">{{ subpart.part.primary_manufacturer_part.manufacturer.name }}
|
|
77
|
+
{% if subpart.part.manufacturer_parts.count > 1 %}<i>(+{{ subpart.part.manufacturer_parts.count }})</i>{% endif %}</td>
|
|
78
|
+
<td class="text-normal">{% if subpart.part.primary_manufacturer_part.link %}<a href="{{ subpart.part.primary_manufacturer_part.link }}" target="_blank">{% endif %}{{ subpart.part.primary_manufacturer_part.manufacturer_part_number }}{% if subpart.part.primary_manufacturer_part.link %} <i class="material-icons" style="font-size: 14px;">open_in_new</i></a>{% endif %}</td>
|
|
79
|
+
<td class="text-normal" id="bom-flat-seller-name-{{ subpart.part_revision.id }}">{{ subpart.seller_part.seller.name | default:"-" }}</td>
|
|
80
|
+
<td class="text-normal" id="bom-flat-unit-cost-{{ subpart.part_revision.id }}">{{ subpart.seller_part.unit_cost | default:"-" }}</td>
|
|
81
|
+
<td class="text-normal">{{ subpart.seller_part.nre_cost | default:"-" }}</td>
|
|
82
|
+
</tr>
|
|
83
|
+
{% empty %}
|
|
84
|
+
<tr>
|
|
85
|
+
<td colspan="99" style="text-align: center; height: 20vh;"><i>This part does not contain any other parts.</i></td>
|
|
86
|
+
</tr>
|
|
87
|
+
{% endfor %}
|
|
88
|
+
</table>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<!-- Table Sorter -->
|
|
92
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.2/js/jquery.tablesorter.min.js"></script>
|
|
93
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.2/js/jquery.tablesorter.widgets.min.js"></script>
|
|
94
|
+
<script>
|
|
95
|
+
$(function () {
|
|
96
|
+
$("#flat-bom").on('update', initTableSorterFlat);
|
|
97
|
+
initTableSorterFlat();
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
function initTableSorterFlat() {
|
|
101
|
+
$('.button-reset-filter-flat').hide();
|
|
102
|
+
$("#flat-bom").tablesorter({theme: "materialize"})
|
|
103
|
+
.bind("sortEnd", function (e, t) {
|
|
104
|
+
$('.button-reset-filter-flat').show();
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function refreshTableSorterFlat() {
|
|
109
|
+
$('#flat-bom').trigger('sortReset');
|
|
110
|
+
$('.button-reset-filter-flat').hide();
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
</script>
|
|
114
|
+
|
|
115
|
+
<script>
|
|
116
|
+
$(document).ready(function () {
|
|
117
|
+
$('.dropdown-trigger-flat').dropdown({
|
|
118
|
+
inDuration: 200,
|
|
119
|
+
outDuration: 225,
|
|
120
|
+
constrainWidth: false, // Does not change width of dropdown to that of the activator
|
|
121
|
+
hover: false, // Activate on hover
|
|
122
|
+
gutter: 0, // Spacing from edge
|
|
123
|
+
belowOrigin: true, // Displays dropdown below the button
|
|
124
|
+
alignment: 'left', // Displays dropdown with edge aligned to the left of button
|
|
125
|
+
stopPropagation: false // Stops event propagation
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
$('.tooltipped').tooltip();
|
|
129
|
+
});
|
|
130
|
+
</script>
|
|
131
|
+
|