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,448 @@
|
|
|
1
|
+
{% extends 'bom/bom-base.html' %}
|
|
2
|
+
|
|
3
|
+
{% load static %}
|
|
4
|
+
{% load djmoney %}
|
|
5
|
+
|
|
6
|
+
{% block head-title %}{{ part.full_part_number }}{% if part_revision %} {{ part_revision.synopsis }}{% endif %}{% endblock %}
|
|
7
|
+
|
|
8
|
+
{% block head %}
|
|
9
|
+
<link rel="stylesheet" type="text/css" href="{% static 'bom/css/part-info.css' %}"/>
|
|
10
|
+
{% endblock %}
|
|
11
|
+
|
|
12
|
+
{% block content %}
|
|
13
|
+
{% include 'bom/bom-action-btn.html' with profile=profile %}
|
|
14
|
+
<div class="container-app">
|
|
15
|
+
<div class="part-info">
|
|
16
|
+
<div class="row" style="margin-bottom: 5px;">
|
|
17
|
+
<div class="col m8 hide-on-small-and-down">
|
|
18
|
+
<h3 class="light">{{ part.full_part_number }}</h3>
|
|
19
|
+
{% if part_revision %}
|
|
20
|
+
{% if profile.role == 'A' %}
|
|
21
|
+
<p class="printer-hide">Select latest revision to edit, add a new revision, etc., or select an earlier revision for viewing only</p>
|
|
22
|
+
{% else %}
|
|
23
|
+
<p class="printer-hide">Select a revision for viewing</p>
|
|
24
|
+
{% endif %}
|
|
25
|
+
{% endif %}
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="row printer-hide">
|
|
30
|
+
{% if part_revision %}
|
|
31
|
+
<div class="col l2 m3 s5">
|
|
32
|
+
<div class="input-field">
|
|
33
|
+
<select id="select-revision">
|
|
34
|
+
{% for r in revisions.all %}
|
|
35
|
+
<option {% if part_revision.id == r.id %}selected{% endif %}
|
|
36
|
+
value="{% if r == part.latest %}{% url 'bom:part-info' part_id=part.id %}
|
|
37
|
+
{% else %}{% url 'bom:part-info-history' part_id=part.id part_revision_id=r.id %}
|
|
38
|
+
{% endif %}">Rev {{ r.revision }}{% if r.configuration == 'W' %} (working){% endif %}</option>
|
|
39
|
+
{% endfor %}
|
|
40
|
+
</select>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
{% endif %}
|
|
44
|
+
<div class="col {% if part_revision %}m3 s1{% else %}m3 s12{% endif %}">
|
|
45
|
+
{% if profile.role == 'A' and part_revision %}
|
|
46
|
+
<div style="margin-top: 1.5rem;">
|
|
47
|
+
<!-- Dropdown Trigger -->
|
|
48
|
+
<button class='dropdown-trigger hide-on-small-and-down waves-effect waves-light btn-flat'
|
|
49
|
+
href='#' data-target='dropdown-revision'><i class="material-icons right">arrow_drop_down</i>Manage
|
|
50
|
+
</button>
|
|
51
|
+
<a class='dropdown-trigger hide-on-med-and-up' href='#' data-target='dropdown-revision'><i
|
|
52
|
+
class="material-icons green-text text-lighten-1">more_vert</i></a>
|
|
53
|
+
<!-- Dropdown Structure -->
|
|
54
|
+
<ul id='dropdown-revision' class='dropdown-content'>
|
|
55
|
+
{% if part_revision.configuration == 'W' %}
|
|
56
|
+
<li>
|
|
57
|
+
<a class="green-text text-lighten-1"
|
|
58
|
+
href="{% url 'bom:part-revision-edit' part_id=part.id part_revision_id=part_revision.id %}">
|
|
59
|
+
<i class="material-icons green-text text-lighten-1">edit</i>Edit</a>
|
|
60
|
+
</li>
|
|
61
|
+
<li>
|
|
62
|
+
<a class="green-text text-lighten-1" href="{% url 'bom:part-revision-release' part_id=part.id part_revision_id=part_revision.id %}">
|
|
63
|
+
<i class="material-icons green-text text-lighten-1">check</i>Release</a>
|
|
64
|
+
</li>
|
|
65
|
+
{% endif %}
|
|
66
|
+
<li>
|
|
67
|
+
<a class="green-text text-lighten-1" href="{% url 'bom:part-revision-new' part_id=part.id %}">
|
|
68
|
+
<i class="material-icons green-text text-lighten-1">add</i>New revision</a>
|
|
69
|
+
</li>
|
|
70
|
+
{% if part_revision.configuration == 'R' %}
|
|
71
|
+
<li>
|
|
72
|
+
<a class="green-text text-lighten-1 disabled" onclick="revertPartRevision()">
|
|
73
|
+
<i class="material-icons green-text text-lighten-1">undo</i>Revert to working</a>
|
|
74
|
+
</li>
|
|
75
|
+
{% endif %}
|
|
76
|
+
<li class="divider" tabindex="-1"></li>
|
|
77
|
+
<li>
|
|
78
|
+
<a class="red-text text-lighten-1" onclick="deletePartRevision()">
|
|
79
|
+
<i class="material-icons red-text text-lighten-1">delete</i>Delete</a>
|
|
80
|
+
</li>
|
|
81
|
+
</ul>
|
|
82
|
+
</div>
|
|
83
|
+
{% elif profile.role == 'A' and not part_revision %}
|
|
84
|
+
<a class='waves-effect waves-light btn-flat'
|
|
85
|
+
href='{% url 'bom:part-revision-new' part_id=part.id %}'><i class="material-icons left">add</i>Create Revision</a>
|
|
86
|
+
{% endif %}
|
|
87
|
+
</div>
|
|
88
|
+
{% if part_revision %}
|
|
89
|
+
<div class="col m2 push-l5 push-m4 s6 right-align part-info-form">
|
|
90
|
+
<form action="{% url 'bom:part-info' part_id=part.id %}" method="post">
|
|
91
|
+
{% csrf_token %}
|
|
92
|
+
<div class="row">
|
|
93
|
+
<div class="col s9" style="padding-right: 0;">
|
|
94
|
+
{{ part_info_form }}
|
|
95
|
+
</div>
|
|
96
|
+
<div class="col s3">
|
|
97
|
+
<button type="submit" class="waves-effect waves-green btn-flat input-field btn-icon-round"><i class="material-icons green-text">send</i></button>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</form>
|
|
101
|
+
</div>
|
|
102
|
+
{% endif %}
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<div class="row">
|
|
106
|
+
<div class="col s12 printer-hide">
|
|
107
|
+
<ul id="tabs" class="tabs tabs-fixed-width">
|
|
108
|
+
<li class="tab"><a id="specs-tab" href="#specs">Specifications</a></li>
|
|
109
|
+
<li class="tab"><a id="bom-tab" href="#bom">Bill of Materials</a></li>
|
|
110
|
+
<li class="tab"><a id="used-tab" href="#used">Where Used</a></li>
|
|
111
|
+
<li class="tab"><a id="sourcing-tab" href="#sourcing">Sourcing</a></li>
|
|
112
|
+
</ul>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<div id="specs" class="col s12">
|
|
116
|
+
<h4 class="printer-show">Specifications</h4>
|
|
117
|
+
<br>
|
|
118
|
+
<ul class="collection with-header">
|
|
119
|
+
<li class="collection-header"><h5>Item Details</h5></li>
|
|
120
|
+
<li class="collection-item">
|
|
121
|
+
{% if organization.number_scheme == 'S' %}
|
|
122
|
+
<div class="row">
|
|
123
|
+
<div class="col s4 l2 text-right" style="padding-left: 0px;">Item Class:</div>
|
|
124
|
+
<div class="col s8 l10">{{ part.number_class }}</div>
|
|
125
|
+
</div>
|
|
126
|
+
{% endif %}
|
|
127
|
+
<div class="row">
|
|
128
|
+
<div class="col s4 l2 text-right" style="padding-left: 0px;">Number:</div>
|
|
129
|
+
<div class="col s8 l10">{{ part.full_part_number }}
|
|
130
|
+
{% if profile.role == 'A' %}
|
|
131
|
+
<a href="{% url 'bom:part-edit' part_id=part.id %}"> [edit]</a>
|
|
132
|
+
{% endif %}
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
<div class="row">
|
|
136
|
+
<div class="col s4 l2 text-right" style="padding-left: 0px;">Synopsis:</div>
|
|
137
|
+
<div class="col s8 l10">{{ part_revision.synopsis }}</div>
|
|
138
|
+
</div>
|
|
139
|
+
<div class="row">
|
|
140
|
+
<div class="col s4 l2 text-right" style="padding-left: 0px;">Configuration:</div>
|
|
141
|
+
<div class="col s8 l10">{{ part_revision.get_configuration_display|default:'n/a' }} <i>{% if part_revision %}(as of <span id="specs-revision-timestamp"></span>
|
|
142
|
+
){% endif %}
|
|
143
|
+
</i></div>
|
|
144
|
+
</div>
|
|
145
|
+
{% for property in part_revision.properties.all %}
|
|
146
|
+
<div class="row">
|
|
147
|
+
<div class="col s4 l2 text-right"
|
|
148
|
+
style="padding-left: 0px;">{{ property.property_definition.name }}:
|
|
149
|
+
</div>
|
|
150
|
+
<div class="col s8 l10">{{ property.value_raw }}{% if property.unit_definition %}
|
|
151
|
+
{{ property.unit_definition.symbol }}{% endif %}</div>
|
|
152
|
+
</div>
|
|
153
|
+
{% endfor %}
|
|
154
|
+
<div class="row">
|
|
155
|
+
<div class="col s4 l2 text-right" style="padding-left: 0;">
|
|
156
|
+
<img title="Via Google Drive" style="width: 16px;" src="{% static 'bom/img/google_drive_logo.svg' %}"> Files:
|
|
157
|
+
</div>
|
|
158
|
+
<div class="col s8 l10"><a href="{% url 'google-drive:add-folder' part_id=part.id %}" target="_blank">Open Folder</a></div>
|
|
159
|
+
</div>
|
|
160
|
+
<div class="row">
|
|
161
|
+
<div id="mouser-data-sheet-wrapper" style="display: none; min-height: 22px;">
|
|
162
|
+
<div class="col s4 l2 text-right" style="padding-left: 0;">
|
|
163
|
+
<img title="Via Mouser.com" style="width: 16px;" src="{% static 'bom/img/mouser.png' %}"> Datasheets
|
|
164
|
+
</div>
|
|
165
|
+
<div class="col s8 l10"><a id="mouser-data-sheet" target="_blank">View datasheet</a></div>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
</li>
|
|
169
|
+
<li class="collection-header">
|
|
170
|
+
<h5><h5 class="title">Manufacturer & Sourcing</h5></h5>
|
|
171
|
+
</li>
|
|
172
|
+
<li class="collection-item">
|
|
173
|
+
<div class="row">
|
|
174
|
+
<div class="col s4 l2 text-right" style="padding-left: 0px;">Primary Manufacturer Part:</div>
|
|
175
|
+
<div class="col s8 l10">{% if part.primary_manufacturer_part.link %}<a href="{{ part.primary_manufacturer_part.link }}" target="_blank">{% endif %}{{ part.primary_manufacturer_part.manufacturer.name }} - {{ part.primary_manufacturer_part.manufacturer_part_number }}{% if part.primary_manufacturer_part.link %} <i class="material-icons" style="font-size: 14px;">open_in_new</i></a>{% endif %}
|
|
176
|
+
{% if profile.role == 'A' %}
|
|
177
|
+
<a href="{% url 'bom:part-edit' part_id=part.id %}"> [change]</a>
|
|
178
|
+
{% endif %}
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
<div class="row">
|
|
182
|
+
<div class="col s4 l2 text-right" style="padding-left: 0px;">Est. Cost:</div>
|
|
183
|
+
<div id="specs-unit-cost" class="col s8 l10"><span id="mouser-est-cost"></span><span>{{ indented_bom.unit_cost|default_if_none:'-' }}</span></div>
|
|
184
|
+
</div>
|
|
185
|
+
<div class="row">
|
|
186
|
+
<div class="col s4 l2 text-right" style="padding-left: 0px;">Subparts without costs:</div>
|
|
187
|
+
<div class="col s8 l10"><span id="mouser-missing-item-costs"></span><span>{{ indented_bom.missing_item_costs }}</span></div>
|
|
188
|
+
</div>
|
|
189
|
+
<div class="row">
|
|
190
|
+
<div class="col s4 l2 text-right" style="padding-left: 0px;">Est. Total NRE:</div>
|
|
191
|
+
<div class="col s8 l10"><span id="mouser-est-nre"></span><span>{{ indented_bom.nre|default_if_none:'-' }}</span></div>
|
|
192
|
+
</div>
|
|
193
|
+
<div class="row">
|
|
194
|
+
<div class="col s4 l2 text-right" style="padding-left: 0px;">Est. Cost per {{ qty }} Unit Order (Including MOQs):</div>
|
|
195
|
+
<div class="col s8 l10"><span id="mouser-est-cost-per-order"></span><span>{{ indented_bom.out_of_pocket_cost|default_if_none:'-' }}</span></div>
|
|
196
|
+
</div>
|
|
197
|
+
<div class="row" id="mouser-stock-wrapper" style="display: none;">
|
|
198
|
+
<div class="col s4 l2 text-right" style="padding-left: 0px;">Mouser stock:</div>
|
|
199
|
+
<div class="col s8 l10"><span id="mouser-stock"></span></div>
|
|
200
|
+
</div>
|
|
201
|
+
</li>
|
|
202
|
+
</ul>
|
|
203
|
+
</div>
|
|
204
|
+
|
|
205
|
+
<div id="bom" class="col s12">
|
|
206
|
+
<h4 class="printer-show">Bill of Materials</h4>
|
|
207
|
+
<div id="bom-indented">
|
|
208
|
+
<div class="text-center" style="padding-top: 8px;">
|
|
209
|
+
<span>Indented</span> | <a onclick="showFlatBOM()" href="#">Flat</a>
|
|
210
|
+
</div>
|
|
211
|
+
{% include 'bom/components/bom-indented.html' with order_by=order_by bom_items=indented_bom.parts part=part part_revision=part_revision profile=profile %}
|
|
212
|
+
</div>
|
|
213
|
+
<div id="bom-flat" style="display: none;">
|
|
214
|
+
<div class="text-center" style="padding-top: 8px;">
|
|
215
|
+
<a onclick="showIndentedBOM()" href="#">Indented</a> | <span>Flat</span>
|
|
216
|
+
</div>
|
|
217
|
+
{% include 'bom/components/bom-flat.html' with order_by=order_by bom_items=flat_bom.parts part=part part_revision=part_revision profile=profile %}
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
|
|
221
|
+
<div id="used" class="col s12">
|
|
222
|
+
<h4 class="printer-show">Where Used</h4>
|
|
223
|
+
<br>
|
|
224
|
+
<div class="responsive-table-wrapper">
|
|
225
|
+
<ul class="collapsible" data-collapsible="expandable" style="overflow: scroll;">
|
|
226
|
+
<li class="active">
|
|
227
|
+
<div class="collapsible-header"><i class="material-icons">my_location</i>Where this revision is used</div>
|
|
228
|
+
<div class="collapsible-body">
|
|
229
|
+
<table class="highlight tight">
|
|
230
|
+
<thead>
|
|
231
|
+
<tr>
|
|
232
|
+
<th>Part Number</th>
|
|
233
|
+
<th>Synopsis</th>
|
|
234
|
+
<th>Rev</th>
|
|
235
|
+
<th>Manufacturer</th>
|
|
236
|
+
<th>MPN</th>
|
|
237
|
+
</tr>
|
|
238
|
+
</thead>
|
|
239
|
+
|
|
240
|
+
<tbody>
|
|
241
|
+
{% for used_part in where_used %}
|
|
242
|
+
<tr>
|
|
243
|
+
<td>
|
|
244
|
+
<a href="{% url 'bom:part-info-history' part_id=used_part.part.id part_revision_id=used_part.id %}">{{ used_part.part.full_part_number }}</a>
|
|
245
|
+
</td>
|
|
246
|
+
<td>{{ used_part.synopsis }}</td>
|
|
247
|
+
<td>{{ used_part.revision }}</td>
|
|
248
|
+
<td>{{ used_part.part.primary_manufacturer_part.manufacturer.name }}</td>
|
|
249
|
+
<td>{{ used_part.part.primary_manufacturer_part.manufacturer_part_number }}</td>
|
|
250
|
+
</tr>
|
|
251
|
+
{% empty %}
|
|
252
|
+
<tr>
|
|
253
|
+
<td colspan="99" style="text-align: left; height: 20vh;"><i>This part is not currently
|
|
254
|
+
used in any of your other parts. To add a part to a subassembly or assembly, go to the
|
|
255
|
+
parent part's Bill of Materials, and click "Manage", then "Edit".</i></td>
|
|
256
|
+
</tr>
|
|
257
|
+
{% endfor %}
|
|
258
|
+
</tbody>
|
|
259
|
+
</table>
|
|
260
|
+
</div>
|
|
261
|
+
</li>
|
|
262
|
+
<li>
|
|
263
|
+
<div class="collapsible-header"><i class="material-icons">location_searching</i>All part usages</div>
|
|
264
|
+
<div class="collapsible-body">
|
|
265
|
+
<table class="highlight tight">
|
|
266
|
+
<thead>
|
|
267
|
+
<tr>
|
|
268
|
+
<th>Part Number</th>
|
|
269
|
+
<th>Synopsis</th>
|
|
270
|
+
<th>Rev</th>
|
|
271
|
+
<th>Manufacturer</th>
|
|
272
|
+
<th>MPN</th>
|
|
273
|
+
</tr>
|
|
274
|
+
</thead>
|
|
275
|
+
|
|
276
|
+
<tbody>
|
|
277
|
+
{% for used_part in where_used_part %}
|
|
278
|
+
<tr>
|
|
279
|
+
<td>
|
|
280
|
+
<a href="{% url 'bom:part-info-history' part_id=used_part.part.id part_revision_id=used_part.id %}">{{ used_part.part.full_part_number }}</a>
|
|
281
|
+
</td>
|
|
282
|
+
<td>{{ used_part.synopsis }}</td>
|
|
283
|
+
<td>{{ used_part.revision }}</td>
|
|
284
|
+
<td>{{ used_part.part.primary_manufacturer_part.manufacturer.name }}</td>
|
|
285
|
+
<td>{{ used_part.part.primary_manufacturer_part.manufacturer_part_number }}</td>
|
|
286
|
+
</tr>
|
|
287
|
+
{% empty %}
|
|
288
|
+
<tr>
|
|
289
|
+
<td colspan="99" style="text-align: center; height: 20vh;"><i>This part is not currently
|
|
290
|
+
used in any of your other parts.
|
|
291
|
+
{% if profile.role == 'A' %}
|
|
292
|
+
To add a part to a subassembly or assembly, go to the
|
|
293
|
+
parent part's Bill of Materials, and click "Manage", then "Edit".
|
|
294
|
+
{% endif %}
|
|
295
|
+
</i></td>
|
|
296
|
+
</tr>
|
|
297
|
+
{% endfor %}
|
|
298
|
+
</tbody>
|
|
299
|
+
</table>
|
|
300
|
+
</div>
|
|
301
|
+
</li>
|
|
302
|
+
</ul>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
|
|
306
|
+
<div id="sourcing" class="col s12">
|
|
307
|
+
<h4 class="printer-show">Sourcing</h4>
|
|
308
|
+
{% include 'bom/components/manufacturer-part-list.html' with manufacturer_parts=part.manufacturer_parts part_revision=part_revision profile=profile %}
|
|
309
|
+
{% if profile.role == 'A' %}
|
|
310
|
+
<div class="row" style="padding-top: 16px;">
|
|
311
|
+
<div class="col s12 center-align">
|
|
312
|
+
<a class="waves-effect waves-green btn-flat"
|
|
313
|
+
href="{% url 'bom:part-add-manufacturer-part' part_id=part.id %}" style="margin: 10px;">Add Manufacturer Part</a>
|
|
314
|
+
</div>
|
|
315
|
+
</div>
|
|
316
|
+
{% endif %}
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
{% endblock %}
|
|
322
|
+
{% block bom-script %}
|
|
323
|
+
<!-- Materialize initializer -->
|
|
324
|
+
<script>
|
|
325
|
+
$(document).ready(function () {
|
|
326
|
+
$('.collapsible').collapsible({
|
|
327
|
+
accordion: false
|
|
328
|
+
});
|
|
329
|
+
});
|
|
330
|
+
var elem = document.querySelector('.collapsible.expandable');
|
|
331
|
+
var instance = M.Collapsible.init(elem, {
|
|
332
|
+
accordion: false
|
|
333
|
+
});
|
|
334
|
+
</script>
|
|
335
|
+
|
|
336
|
+
<!-- Handle if there's an anchor, select tab -->
|
|
337
|
+
<script type='text/javascript'>
|
|
338
|
+
var tabsElem = document.querySelector('.tabs');
|
|
339
|
+
|
|
340
|
+
{% if tab_anchor %}
|
|
341
|
+
$('#{{ tab_anchor }}-tab').addClass('active');
|
|
342
|
+
{% endif %}
|
|
343
|
+
|
|
344
|
+
var tabs = M.Tabs.init(tabsElem);
|
|
345
|
+
|
|
346
|
+
// For dropdown menu
|
|
347
|
+
$(document).ready(function () {
|
|
348
|
+
$('.dropdown-trigger').dropdown({
|
|
349
|
+
inDuration: 300,
|
|
350
|
+
outDuration: 225,
|
|
351
|
+
constrainWidth: false, // Does not change width of dropdown to that of the activator
|
|
352
|
+
hover: false, // Activate on hover
|
|
353
|
+
gutter: 0, // Spacing from edge
|
|
354
|
+
alignment: 'left', // Displays dropdown with edge aligned to the left of button
|
|
355
|
+
stopPropagation: false, // Stops event propagation
|
|
356
|
+
coverTrigger: false
|
|
357
|
+
}
|
|
358
|
+
);
|
|
359
|
+
|
|
360
|
+
{% if not tab_anchor %}
|
|
361
|
+
if (window.localStorage['part-info-last-anchor']) {
|
|
362
|
+
{#tabs.select(window.localStorage['part-info-last-anchor']);#}
|
|
363
|
+
}
|
|
364
|
+
{% endif %}
|
|
365
|
+
});
|
|
366
|
+
</script>
|
|
367
|
+
|
|
368
|
+
<script src="{% static 'bom/js/jquery.treetable.js' %}"></script>
|
|
369
|
+
<script>
|
|
370
|
+
$("#manufacturer-parts").treetable({
|
|
371
|
+
expandable: true,
|
|
372
|
+
indent: 2,
|
|
373
|
+
initialState: 'collapsed',
|
|
374
|
+
});
|
|
375
|
+
</script>
|
|
376
|
+
|
|
377
|
+
<!-- Floating Horizontal Scrollbar -->
|
|
378
|
+
<script type="text/javascript" src="{% static 'bom/js/jquery.ba-floatingscrollbar.min.js' %}"></script>
|
|
379
|
+
<script>
|
|
380
|
+
$(function () {
|
|
381
|
+
$('.responsive-table-wrapper').floatingScrollbar();
|
|
382
|
+
});
|
|
383
|
+
</script>
|
|
384
|
+
|
|
385
|
+
<!-- For revision selector logic -->
|
|
386
|
+
<script>
|
|
387
|
+
var selectRevisionSelectedIndex = 1;
|
|
388
|
+
$(document).ready(function () {
|
|
389
|
+
selectRevisionSelectedIndex = $("#select-revision")[0].selectedIndex;
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
$("#select-revision").on('change', function () {
|
|
393
|
+
var url = $(this)[0].value;
|
|
394
|
+
var selectedIndex = $(this)[0].selectedIndex;
|
|
395
|
+
if (selectedIndex === 0) {
|
|
396
|
+
var value = "{% if revision == part.latest %}{% url 'bom:part-info' part_id=part.id %}{% else %}{% url 'bom:part-info-history' part_id=part.id part_revision_id=part_revision.id %}{% endif %}";
|
|
397
|
+
$("#select-revision")[0].selectedIndex = selectRevisionSelectedIndex;
|
|
398
|
+
$("#select-revision").formSelect();
|
|
399
|
+
}
|
|
400
|
+
window.location.href = url;
|
|
401
|
+
});
|
|
402
|
+
</script>
|
|
403
|
+
|
|
404
|
+
<!-- Revision timestamp to local time -->
|
|
405
|
+
<script>
|
|
406
|
+
$(document).ready(function () {
|
|
407
|
+
let revision_configuration_date = new Date("{{ part_revision.timestamp.isoformat }}")
|
|
408
|
+
$("#specs-revision-timestamp").text(revision_configuration_date.toLocaleString());
|
|
409
|
+
})
|
|
410
|
+
</script>
|
|
411
|
+
|
|
412
|
+
<!-- Confirmation popups? -->
|
|
413
|
+
<script>
|
|
414
|
+
function deletePartRevision() {
|
|
415
|
+
{% if part_revision is not None %}
|
|
416
|
+
let url = "{% url 'bom:part-revision-delete' part_id=part.id part_revision_id=part_revision.id %}";
|
|
417
|
+
if (confirm("Are you sure you want to delete this revision?\n\nIt will be deleted permanently.")) {
|
|
418
|
+
window.location.href = url;
|
|
419
|
+
}
|
|
420
|
+
{% else %}
|
|
421
|
+
confirm("No part revisions to delete!");
|
|
422
|
+
{% endif %}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
function revertPartRevision() {
|
|
426
|
+
{% if part_revision is not None %}
|
|
427
|
+
let url = "{% url 'bom:part-revision-revert' part_id=part.id part_revision_id=part_revision.id %}";
|
|
428
|
+
if (confirm("Are you sure you want to revert this revision?\n\n")) {
|
|
429
|
+
window.location.href = url;
|
|
430
|
+
}
|
|
431
|
+
{% else %}
|
|
432
|
+
confirm("No part revisions to revert!");
|
|
433
|
+
{% endif %}
|
|
434
|
+
}
|
|
435
|
+
</script>
|
|
436
|
+
|
|
437
|
+
<script>
|
|
438
|
+
function showFlatBOM() {
|
|
439
|
+
$('#bom-indented').hide();
|
|
440
|
+
$('#bom-flat').show();
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
function showIndentedBOM() {
|
|
444
|
+
$('#bom-flat').hide();
|
|
445
|
+
$('#bom-indented').show();
|
|
446
|
+
}
|
|
447
|
+
</script>
|
|
448
|
+
{% endblock bom-script %}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{% load static %}
|
|
2
|
+
{% load materializecss %}
|
|
3
|
+
|
|
4
|
+
{% comment %}
|
|
5
|
+
|
|
6
|
+
This file is intended to be used as a Django include file for the purpose of displaying
|
|
7
|
+
all of the properties of a part revision, as follows:
|
|
8
|
+
|
|
9
|
+
{% include 'bom/part-revision-display.html' with part_revision_form=XXX %}
|
|
10
|
+
|
|
11
|
+
where XXX should be the name of the includee's object that represent its PartRevisionForm.
|
|
12
|
+
|
|
13
|
+
{% endcomment %}
|
|
14
|
+
<div class="row">
|
|
15
|
+
<div class="fieldWrapper">
|
|
16
|
+
{{ part_revision_form.revision|materializecss:'m2 s12' }}
|
|
17
|
+
</div>
|
|
18
|
+
<div class="fieldWrapper">
|
|
19
|
+
{{ part_revision_form.description|materializecss:'m8 s12' }}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="row">
|
|
24
|
+
<div class="col s12">
|
|
25
|
+
{% if part_revision_form.property_definitions %}
|
|
26
|
+
<h4>Properties</h4>
|
|
27
|
+
{% elif not part_revision_form.instance.pk %}
|
|
28
|
+
<p><i>You can add part class specific properties (e.g. voltage, width, sheen, etc) after creating the
|
|
29
|
+
part.</i></p>
|
|
30
|
+
{% else %}
|
|
31
|
+
<p><i>This part has no properties assigned. The organization admin can assign properties to this part class
|
|
32
|
+
in settings.</i></p>
|
|
33
|
+
{% endif %}
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div class="row">
|
|
38
|
+
{% for group in part_revision_form.property_fields %}
|
|
39
|
+
<div class="row">
|
|
40
|
+
<div class="fieldWrapper">
|
|
41
|
+
{{ group.property|materializecss:'m3 s6' }}
|
|
42
|
+
</div>
|
|
43
|
+
{% if group.unit %}
|
|
44
|
+
<div class="fieldWrapper">
|
|
45
|
+
{{ group.unit|materializecss:'m3 s6' }}
|
|
46
|
+
</div>
|
|
47
|
+
{% endif %}
|
|
48
|
+
</div>
|
|
49
|
+
{% endfor %}
|
|
50
|
+
</div>
|
|
@@ -0,0 +1,39 @@
|
|
|
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=part.id %}">Cancel</a></li>
|
|
10
|
+
{% endblock %}
|
|
11
|
+
|
|
12
|
+
{% if profile.role == 'A' %}
|
|
13
|
+
{% block content %}
|
|
14
|
+
<div class="row container-app">
|
|
15
|
+
<form action="{% url 'bom:part-revision-edit' part_id=part.id part_revision_id=part_revision.id %}" method="post" class="col s12">
|
|
16
|
+
{% csrf_token %}
|
|
17
|
+
{{ part_form.non_field_errors }}
|
|
18
|
+
<div class="row">
|
|
19
|
+
<div class="col s12">
|
|
20
|
+
<i>Edit this revision's properties below, or click <a href="{% url 'bom:part-manage-bom' part_id=part.id part_revision_id=part_revision.id %}">here</a>
|
|
21
|
+
if you want to manage this revision's bill of materials.</i>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
{% include 'bom/part-revision-display.html' with part_revision_form=form %}
|
|
26
|
+
|
|
27
|
+
<div class="row">
|
|
28
|
+
<div class="col s6">
|
|
29
|
+
<a href="javascript:history.back()" class="waves-effect waves-light btn-flat grey-text lighten-1" style="margin-left: -16px;">Cancel</a>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="col s6 right-align">
|
|
32
|
+
<button class="waves-effect waves-light btn btn-primary" type="submit" name="action">Save
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</form>
|
|
37
|
+
</div>
|
|
38
|
+
{% endblock %}
|
|
39
|
+
{% endif %}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{% extends 'bom/bom-base.html' %}
|
|
2
|
+
|
|
3
|
+
{% load static %}
|
|
4
|
+
{% load materializecss %}
|
|
5
|
+
|
|
6
|
+
{% block head-title %}{{ title }}{% endblock %}
|
|
7
|
+
|
|
8
|
+
{% block main %}
|
|
9
|
+
{{ add_subpart_form.media }}
|
|
10
|
+
{% endblock %}
|
|
11
|
+
|
|
12
|
+
{% block bom-menu %}
|
|
13
|
+
{% endblock %}
|
|
14
|
+
|
|
15
|
+
{% block content %}
|
|
16
|
+
<div class="part-info container-app">
|
|
17
|
+
<a href="{% url 'bom:part-info' part_id=part.id %}">Return to {{ part.full_part_number }}</a>
|
|
18
|
+
<!-- <h5>{{ part.description }}</h5> -->
|
|
19
|
+
<div id="bom" class="col s12">
|
|
20
|
+
<br><h5>Modify Subparts</h5>
|
|
21
|
+
|
|
22
|
+
{% include 'bom/components/bom-indented.html' with order_by='indented' manage=1 bom_items=indented_bom.parts part=part part_revision=part_revision profile=profile %}
|
|
23
|
+
|
|
24
|
+
<br><h5>Add Subpart</h5>
|
|
25
|
+
<div class="row">
|
|
26
|
+
<form action="{% url 'bom:part-add-subpart' part_id=part.id part_revision_id=part_revision.id %}"
|
|
27
|
+
method="post" class="col s12">
|
|
28
|
+
{% csrf_token %}
|
|
29
|
+
{{ add_subpart_form.subpart_part_number|materializecss:'m4 s12' }}
|
|
30
|
+
{{ add_subpart_form.count|materializecss:'m1 s12' }}
|
|
31
|
+
{{ add_subpart_form.do_not_load|materializecss:'m2 s12 input-field materialize-checkbox-padding' }}
|
|
32
|
+
{{ add_subpart_form.reference|materializecss:'m4 s12' }}
|
|
33
|
+
<div class="fieldWrapper">
|
|
34
|
+
<button class="waves-effect waves-light btn btn-primary" type="submit" name="action">add
|
|
35
|
+
</button>
|
|
36
|
+
</div>
|
|
37
|
+
</form>
|
|
38
|
+
</div>
|
|
39
|
+
<br><h5>Batch Add Subparts</h5>
|
|
40
|
+
<p>To add batch subparts, upload a csv that contains at least two columns with the headers:
|
|
41
|
+
<b>part_number</b> <i>or</i> <b>manufacturer_part_number</b> and <b>quantity</b>; the 'part_number' or
|
|
42
|
+
'manufacturer_part_number' column must contain part numbers that have already been created in this
|
|
43
|
+
system.</p>
|
|
44
|
+
<p>Additional fields include 'reference' or 'designator' to add a reference field to the subpart;
|
|
45
|
+
'do_not_load' if you don't want the part loaded into the assembly that contains it; 'dnp' if
|
|
46
|
+
you don't want to upload the part to IndaBOM.</p>
|
|
47
|
+
<form action="{% url 'bom:part-upload-bom' part_id=part.id %}" method="post" enctype="multipart/form-data">
|
|
48
|
+
{% csrf_token %}
|
|
49
|
+
<div class="row">
|
|
50
|
+
<div class="col s9 file-field input-field">
|
|
51
|
+
<div class="green lighten-1 btn">
|
|
52
|
+
<span>File</span>
|
|
53
|
+
{{ upload_subparts_csv_form.file }}
|
|
54
|
+
</div>
|
|
55
|
+
<div class="file-path-wrapper">
|
|
56
|
+
<input class="file-path validate" type="text" placeholder="Upload a file.">
|
|
57
|
+
{{ upload_subparts_csv_form.file.errors }}
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="col s1 input-field">
|
|
61
|
+
<input class="green lighten-1 btn" type="submit" value="Upload"/>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</form>
|
|
65
|
+
<div class="row">
|
|
66
|
+
<div class="col s6">
|
|
67
|
+
<a href="{% url 'bom:part-info' part_id=part.id %}" class="waves-effect waves-light btn-flat grey-text lighten-1" style="margin-left: -16px;">Cancel</a>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
<br>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
{% endblock %}
|
|
74
|
+
|
|
75
|
+
{% block bom-script %}
|
|
76
|
+
<!-- Tree Table -->
|
|
77
|
+
<script src="{% static 'bom/js/jquery.treetable.js' %}"></script>
|
|
78
|
+
<script>
|
|
79
|
+
$("#indented-bom").treetable({
|
|
80
|
+
expandable: true,
|
|
81
|
+
indent: 2,
|
|
82
|
+
initialState: 'collapsed',
|
|
83
|
+
onInitialized: function () {
|
|
84
|
+
$("#indented-bom").treetable("reveal", {{ part_revision.id }});
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
</script>
|
|
88
|
+
|
|
89
|
+
<!-- Floating Horizontal Scrollbar -->
|
|
90
|
+
<script type="text/javascript" src="{% static 'bom/js/jquery.ba-floatingscrollbar.min.js' %}"></script>
|
|
91
|
+
<script>
|
|
92
|
+
$(function () {
|
|
93
|
+
$('.responsive-table-wrapper').floatingScrollbar();
|
|
94
|
+
});
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<!-- Handle if there's an anchor, select tab -->
|
|
98
|
+
<script type='text/javascript'>
|
|
99
|
+
// For dropdown menu
|
|
100
|
+
$(document).ready(function () {
|
|
101
|
+
$('.dropdown-trigger').dropdown({
|
|
102
|
+
inDuration: 300,
|
|
103
|
+
outDuration: 225,
|
|
104
|
+
constrainWidth: false, // Does not change width of dropdown to that of the activator
|
|
105
|
+
hover: false, // Activate on hover
|
|
106
|
+
gutter: 0, // Spacing from edge
|
|
107
|
+
alignment: 'left', // Displays dropdown with edge aligned to the left of button
|
|
108
|
+
stopPropagation: false, // Stops event propagation
|
|
109
|
+
coverTrigger: false
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
});
|
|
114
|
+
</script>
|
|
115
|
+
{% endblock bom-script %}
|