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.

Files changed (191) hide show
  1. bom/__init__.py +1 -0
  2. bom/admin.py +207 -0
  3. bom/apps.py +8 -0
  4. bom/auth_backends.py +47 -0
  5. bom/base_classes.py +31 -0
  6. bom/constants.py +217 -0
  7. bom/context_processors.py +9 -0
  8. bom/csv_headers.py +252 -0
  9. bom/decorators.py +32 -0
  10. bom/form_fields.py +59 -0
  11. bom/forms.py +1328 -0
  12. bom/helpers.py +367 -0
  13. bom/local_settings.py +35 -0
  14. bom/migrations/0001_initial.py +135 -0
  15. bom/migrations/0002_auto_20180908_2151.py +24 -0
  16. bom/migrations/0003_sellerpart_data_source.py +18 -0
  17. bom/migrations/0004_auto_20180911_0011.py +18 -0
  18. bom/migrations/0005_auto_20181007_1934.py +56 -0
  19. bom/migrations/0006_auto_20181007_1949.py +41 -0
  20. bom/migrations/0007_auto_20181009_0256.py +19 -0
  21. bom/migrations/0008_auto_20181030_0427.py +19 -0
  22. bom/migrations/0009_subpart_reference.py +18 -0
  23. bom/migrations/0010_auto_20181202_0733.py +23 -0
  24. bom/migrations/0011_auto_20181202_2113.py +22 -0
  25. bom/migrations/0012_partchangehistory.py +30 -0
  26. bom/migrations/0013_auto_20190222_1631.py +19 -0
  27. bom/migrations/0014_auto_20190223_2353.py +18 -0
  28. bom/migrations/0015_auto_20190303_1915.py +136 -0
  29. bom/migrations/0016_auto_20190405_2308.py +58 -0
  30. bom/migrations/0017_auto_20190616_1912.py +19 -0
  31. bom/migrations/0018_auto_20190616_2143.py +24 -0
  32. bom/migrations/0019_auto_20190624_1246.py +45 -0
  33. bom/migrations/0020_auto_20190627_0207.py +38 -0
  34. bom/migrations/0021_auto_20190627_0428.py +23 -0
  35. bom/migrations/0022_auto_20190811_2140.py +35 -0
  36. bom/migrations/0023_auto_20191205_2351.py +255 -0
  37. bom/migrations/0024_auto_20191214_1342.py +89 -0
  38. bom/migrations/0025_auto_20191221_1907.py +38 -0
  39. bom/migrations/0026_auto_20191222_2258.py +22 -0
  40. bom/migrations/0027_auto_20191222_2347.py +17 -0
  41. bom/migrations/0028_partrevision_displayable_synopsis.py +74 -0
  42. bom/migrations/0029_auto_20191231_1630.py +23 -0
  43. bom/migrations/0030_auto_20200101_2253.py +22 -0
  44. bom/migrations/0031_auto_20200104_1352.py +38 -0
  45. bom/migrations/0032_auto_20200126_1806.py +27 -0
  46. bom/migrations/0033_auto_20200203_0618.py +29 -0
  47. bom/migrations/0034_auto_20200222_0359.py +30 -0
  48. bom/migrations/0035_auto_20200303_0111.py +34 -0
  49. bom/migrations/0036_auto_20200303_0538.py +17 -0
  50. bom/migrations/0037_auto_20200405_1642.py +44 -0
  51. bom/migrations/0038_auto_20200422_0504.py +19 -0
  52. bom/migrations/0039_auto_20200929_2315.py +41 -0
  53. bom/migrations/0040_alter_organization_currency.py +19 -0
  54. bom/migrations/0041_organization_subscription_quantity.py +18 -0
  55. bom/migrations/0042_auto_20210720_2137.py +23 -0
  56. bom/migrations/0043_auto_20211123_0157.py +24 -0
  57. bom/migrations/0044_auto_20220831_1241.py +23 -0
  58. bom/migrations/0045_sellerpart_link.py +18 -0
  59. bom/migrations/0046_alter_sellerpart_unique_together.py +17 -0
  60. bom/migrations/0047_sellerpart_seller_part_number.py +18 -0
  61. bom/migrations/0048_rename_part_organization_number_class_bom_part_organiz_b333d6_idx_and_more.py +1017 -0
  62. bom/migrations/0049_alter_assembly_id_alter_assemblysubparts_id_and_more.py +99 -0
  63. bom/migrations/0050_alter_organization_options.py +17 -0
  64. bom/migrations/0051_alter_manufacturer_organization_and_more.py +41 -0
  65. bom/migrations/0052_remove_partrevision_attribute_and_more.py +584 -0
  66. bom/migrations/__init__.py +0 -0
  67. bom/models.py +886 -0
  68. bom/part_bom.py +192 -0
  69. bom/settings.py +262 -0
  70. bom/static/bom/css/dashboard.css +17 -0
  71. bom/static/bom/css/jquery.treetable.css +28 -0
  72. bom/static/bom/css/materialize.min.css +13 -0
  73. bom/static/bom/css/part-info.css +15 -0
  74. bom/static/bom/css/style.css +482 -0
  75. bom/static/bom/css/tablesorter-theme.materialize.css +176 -0
  76. bom/static/bom/css/treetable-theme.css +42 -0
  77. bom/static/bom/doc/sample_part_classes.csv +38 -0
  78. bom/static/bom/doc/test_bom.csv +6 -0
  79. bom/static/bom/doc/test_bom_5_intelligent.csv +4 -0
  80. bom/static/bom/doc/test_full_bom.csv +37 -0
  81. bom/static/bom/doc/test_new_parts.csv +5 -0
  82. bom/static/bom/doc/test_new_parts_5_intelligent.csv +5 -0
  83. bom/static/bom/img/_ionicons_svg_md-arrow-dropdown.svg +1 -0
  84. bom/static/bom/img/_ionicons_svg_md-arrow-dropright.svg +1 -0
  85. bom/static/bom/img/favicon.ico +0 -0
  86. bom/static/bom/img/google/web/1x/btn_google_signin_dark_disabled_web.png +0 -0
  87. bom/static/bom/img/google/web/1x/btn_google_signin_dark_focus_web.png +0 -0
  88. bom/static/bom/img/google/web/1x/btn_google_signin_dark_normal_web.png +0 -0
  89. bom/static/bom/img/google/web/1x/btn_google_signin_dark_pressed_web.png +0 -0
  90. bom/static/bom/img/google/web/1x/btn_google_signin_light_disabled_web.png +0 -0
  91. bom/static/bom/img/google/web/1x/btn_google_signin_light_focus_web.png +0 -0
  92. bom/static/bom/img/google/web/1x/btn_google_signin_light_normal_web.png +0 -0
  93. bom/static/bom/img/google/web/1x/btn_google_signin_light_pressed_web.png +0 -0
  94. bom/static/bom/img/google/web/2x/btn_google_signin_dark_disabled_web@2x.png +0 -0
  95. bom/static/bom/img/google/web/2x/btn_google_signin_dark_focus_web@2x.png +0 -0
  96. bom/static/bom/img/google/web/2x/btn_google_signin_dark_normal_web@2x.png +0 -0
  97. bom/static/bom/img/google/web/2x/btn_google_signin_dark_pressed_web@2x.png +0 -0
  98. bom/static/bom/img/google/web/2x/btn_google_signin_light_disabled_web@2x.png +0 -0
  99. bom/static/bom/img/google/web/2x/btn_google_signin_light_focus_web@2x.png +0 -0
  100. bom/static/bom/img/google/web/2x/btn_google_signin_light_normal_web@2x.png +0 -0
  101. bom/static/bom/img/google/web/2x/btn_google_signin_light_pressed_web@2x.png +0 -0
  102. bom/static/bom/img/google/web/vector/btn_google_dark_disabled_ios.eps +814 -0
  103. bom/static/bom/img/google/web/vector/btn_google_dark_disabled_ios.svg +24 -0
  104. bom/static/bom/img/google/web/vector/btn_google_dark_focus_ios.eps +1866 -0
  105. bom/static/bom/img/google/web/vector/btn_google_dark_focus_ios.svg +51 -0
  106. bom/static/bom/img/google/web/vector/btn_google_dark_normal_ios.eps +1031 -0
  107. bom/static/bom/img/google/web/vector/btn_google_dark_normal_ios.svg +50 -0
  108. bom/static/bom/img/google/web/vector/btn_google_dark_pressed_ios.eps +1031 -0
  109. bom/static/bom/img/google/web/vector/btn_google_dark_pressed_ios.svg +50 -0
  110. bom/static/bom/img/google/web/vector/btn_google_light_disabled_ios.eps +814 -0
  111. bom/static/bom/img/google/web/vector/btn_google_light_disabled_ios.svg +24 -0
  112. bom/static/bom/img/google/web/vector/btn_google_light_focus_ios.eps +1837 -0
  113. bom/static/bom/img/google/web/vector/btn_google_light_focus_ios.svg +44 -0
  114. bom/static/bom/img/google/web/vector/btn_google_light_normal_ios.eps +1002 -0
  115. bom/static/bom/img/google/web/vector/btn_google_light_normal_ios.svg +43 -0
  116. bom/static/bom/img/google/web/vector/btn_google_light_pressed_ios.eps +1002 -0
  117. bom/static/bom/img/google/web/vector/btn_google_light_pressed_ios.svg +43 -0
  118. bom/static/bom/img/google_drive_logo.svg +1 -0
  119. bom/static/bom/img/indabom.png +0 -0
  120. bom/static/bom/img/mouser.png +0 -0
  121. bom/static/bom/img/octopart_blue.svg +19 -0
  122. bom/static/bom/js/formset-handler.js +65 -0
  123. bom/static/bom/js/jquery-3.4.1.min.js +2 -0
  124. bom/static/bom/js/jquery.ba-floatingscrollbar.min.js +10 -0
  125. bom/static/bom/js/jquery.treetable.js +629 -0
  126. bom/static/bom/js/materialize.min.js +6 -0
  127. bom/templates/bom/account-delete.html +23 -0
  128. bom/templates/bom/add-manufacturer-part.html +66 -0
  129. bom/templates/bom/add-sellerpart.html +93 -0
  130. bom/templates/bom/base-menu.html +16 -0
  131. bom/templates/bom/base.html +129 -0
  132. bom/templates/bom/bom-action-btn.html +23 -0
  133. bom/templates/bom/bom-action-table.html +57 -0
  134. bom/templates/bom/bom-base-menu.html +6 -0
  135. bom/templates/bom/bom-base.html +24 -0
  136. bom/templates/bom/bom-form-modal.html +36 -0
  137. bom/templates/bom/bom-form.html +30 -0
  138. bom/templates/bom/bom-modal-add-users.html +49 -0
  139. bom/templates/bom/bom-signup.html +12 -0
  140. bom/templates/bom/components/bom-flat.html +131 -0
  141. bom/templates/bom/components/bom-indented.html +237 -0
  142. bom/templates/bom/components/manufacturer-part-list.html +270 -0
  143. bom/templates/bom/components/seller-part-list.html +62 -0
  144. bom/templates/bom/create-part.html +65 -0
  145. bom/templates/bom/dashboard-menu.html +15 -0
  146. bom/templates/bom/dashboard.html +303 -0
  147. bom/templates/bom/edit-manufacturer-part.html +72 -0
  148. bom/templates/bom/edit-part-class.html +120 -0
  149. bom/templates/bom/edit-part.html +67 -0
  150. bom/templates/bom/edit-quantity-of-measure.html +119 -0
  151. bom/templates/bom/edit-user-meta.html +70 -0
  152. bom/templates/bom/help.html +1356 -0
  153. bom/templates/bom/manufacturer-info.html +82 -0
  154. bom/templates/bom/manufacturers.html +97 -0
  155. bom/templates/bom/nothing-to-see.html +15 -0
  156. bom/templates/bom/organization-create.html +135 -0
  157. bom/templates/bom/part-info.html +448 -0
  158. bom/templates/bom/part-revision-display.html +50 -0
  159. bom/templates/bom/part-revision-edit.html +39 -0
  160. bom/templates/bom/part-revision-manage-bom.html +115 -0
  161. bom/templates/bom/part-revision-new.html +57 -0
  162. bom/templates/bom/part-revision-release.html +41 -0
  163. bom/templates/bom/search-help.html +101 -0
  164. bom/templates/bom/seller-info.html +82 -0
  165. bom/templates/bom/sellers.html +97 -0
  166. bom/templates/bom/settings.html +734 -0
  167. bom/templates/bom/signup.html +28 -0
  168. bom/templates/bom/subscription_panel.html +16 -0
  169. bom/templates/bom/table_of_contents.html +47 -0
  170. bom/templates/bom/upload-bom.html +111 -0
  171. bom/templates/bom/upload-parts-help.html +103 -0
  172. bom/templates/bom/upload-parts.html +50 -0
  173. bom/templates/registration/login.html +39 -0
  174. bom/tests.py +1592 -0
  175. bom/third_party_apis/__init__.py +0 -0
  176. bom/third_party_apis/base_api.py +51 -0
  177. bom/third_party_apis/google_drive.py +166 -0
  178. bom/third_party_apis/mouser.py +132 -0
  179. bom/third_party_apis/test_apis.py +24 -0
  180. bom/urls.py +100 -0
  181. bom/utils.py +228 -0
  182. bom/validators.py +23 -0
  183. bom/views/__init__.py +0 -0
  184. bom/views/json_views.py +55 -0
  185. bom/views/views.py +1773 -0
  186. bom/wsgi.py +16 -0
  187. django_bom-1.262.dist-info/METADATA +206 -0
  188. django_bom-1.262.dist-info/RECORD +191 -0
  189. django_bom-1.262.dist-info/WHEEL +5 -0
  190. django_bom-1.262.dist-info/licenses/LICENSE +674 -0
  191. django_bom-1.262.dist-info/top_level.txt +1 -0
@@ -0,0 +1,82 @@
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="row" style="margin-bottom: 5px;">
16
+ <div class="col m8 hide-on-small-and-down">
17
+ <h3 class="light">Manufacturer / {{ manufacturer.name }}</h3>
18
+ <a href="{% url 'bom:manufacturers' %}">Back to manufacturers</a>
19
+ </div>
20
+ </div>
21
+ <div class="col {% if manufacturer %}m3 s1{% else %}m3 s12{% endif %}">
22
+ {% if profile.role == 'A' and manufacturer %}
23
+ <div style="margin-top: 1.5rem;">
24
+ <!-- Dropdown Trigger -->
25
+ <button class='dropdown-trigger hide-on-small-and-down waves-effect waves-light btn-flat'
26
+ href='#' data-target='dropdown-revision'><i class="material-icons right">arrow_drop_down</i>Manage
27
+ </button>
28
+ <a class='dropdown-trigger hide-on-med-and-up' href='#' data-target='dropdown-revision'><i
29
+ class="material-icons green-text text-lighten-1">more_vert</i></a>
30
+ <!-- Dropdown Structure -->
31
+ <ul id='dropdown-revision' class='dropdown-content'>
32
+ <li>
33
+ <a class="green-text text-lighten-1"
34
+ href="{% url 'bom:manufacturer-edit' manufacturer_id=manufacturer.id %}">
35
+ <i class="material-icons green-text text-lighten-1">edit</i>Edit</a>
36
+ </li>
37
+ <li class="divider" tabindex="-1"></li>
38
+ <li>
39
+ <a class="red-text text-lighten-1" onclick="deleteManufacturer()">
40
+ <i class="material-icons red-text text-lighten-1">delete</i>Delete</a>
41
+ </li>
42
+ </ul>
43
+ </div>
44
+ {% endif %}
45
+ </div>
46
+
47
+ {% include 'bom/components/manufacturer-part-list.html' with manufacturer_parts=manufacturer_parts profile=profile show_part=True %}
48
+ </div>
49
+ {% endblock %}
50
+
51
+ {% block bom-script %}
52
+ <script>
53
+ function deleteManufacturer() {
54
+ {% if manufacturer is not None %}
55
+ let url = "{% url 'bom:manufacturer-delete' manufacturer_id=manufacturer.id %}";
56
+ if (confirm("Warning! Are you sure you want to delete this manufacturer?\n\n{{ manufacturer_parts.count }} of its manufacturer parts will also be permanently deleted.")) {
57
+ window.location.href = url;
58
+ }
59
+ {% else %}
60
+ confirm("No manufacturer to delete!");
61
+ {% endif %}
62
+ }
63
+ </script>
64
+
65
+ <!-- Handle if there's an anchor, select tab -->
66
+ <script type='text/javascript'>
67
+ // For dropdown menu
68
+ $(document).ready(function () {
69
+ $('.dropdown-trigger').dropdown({
70
+ inDuration: 300,
71
+ outDuration: 225,
72
+ constrainWidth: false, // Does not change width of dropdown to that of the activator
73
+ hover: false, // Activate on hover
74
+ gutter: 0, // Spacing from edge
75
+ alignment: 'left', // Displays dropdown with edge aligned to the left of button
76
+ stopPropagation: false, // Stops event propagation
77
+ coverTrigger: false
78
+ }
79
+ );
80
+ });
81
+ </script>
82
+ {% endblock %}
@@ -0,0 +1,97 @@
1
+ {% extends 'bom/bom-base.html' %}
2
+
3
+ {% load static %}
4
+ {% load materializecss %}
5
+
6
+ {% block head-title %}{{ title }}{% if query %} Search Results{% endif %}{% endblock %}
7
+
8
+ {% block main %}
9
+ <link rel="stylesheet" type="text/css" href="{% static 'bom/css/dashboard.css' %}"/>
10
+ {% endblock %}
11
+
12
+ {% block content %}
13
+ <div class="container-app">
14
+ <form id="searchForm" name="search-form" action="{% url 'bom:manufacturers' %}" method="get" enctype="multipart/form-data">
15
+ {% csrf_token %}
16
+ <div class="row">
17
+ <div class="input-field col s12 m10">
18
+ <i class="material-icons prefix">search</i>
19
+ <input type="search" id="autocomplete-input" autocomplete="off" class="text autocomplete" name="q" value="{% if query %}{{ query }}{% endif %}">
20
+ <label for="autocomplete-input">Search for manufacturers:</label>
21
+ </div>
22
+ <div class="col s12 m2 text-center">
23
+ <button type="submit" class="waves-effect waves-green btn btn-primary input-field" name="action">
24
+ Submit
25
+ </button>
26
+ {% if query %}
27
+ <a class="waves-effect waves-green btn-flat input-field btn-icon-round" onclick="clearSearchExpression()"><i class="material-icons">clear</i></a>
28
+ {% endif %}
29
+ </div>
30
+ </div>
31
+ </form>
32
+ <div class="part-list push-footer">
33
+ <div class="responsive-table-wrapper">
34
+ <table class="highlight part-list tight single-line" style="margin-bottom: 14px;">
35
+ <thead>
36
+ <tr>
37
+ {% if profile.role == 'A' %}
38
+ <th class="text-normal td-small action-checkbox-column" style="display: none;"><label><input type="checkbox" id="action-select-all"><span></span></label></th>
39
+ {% endif %}
40
+ <th class="text-normal td-med">Manufacturer</th>
41
+ <th class="text-normal td-med">Manufacturer Parts</th>
42
+ </tr>
43
+ </thead>
44
+ <tbody>
45
+ {% for manufacturer in manufacturers %}
46
+ <tr>
47
+ {% if profile.role == 'A' %}
48
+ <td class="action-checkbox-column" style="display: none;"><label>{% if part_rev.part.id %}
49
+ <input type="checkbox" class="checkbox-array" name="actions" value="{{ part_rev.part.id }}">{% endif %}<span></span></label></td>
50
+ {% endif %}
51
+ <td class="text-normal td-med"><a href="{% url 'bom:manufacturer-info' manufacturer_id=manufacturer.id %}">{{ manufacturer.name|default:"<i>No name</i>" }}</a></td>
52
+ <td class="text-normal td-med">{{ manufacturer.manufacturerpart_count }}</td>
53
+ </tr>
54
+ {% empty %}
55
+ <tr>
56
+ <td colspan="99" style="text-align: center; padding: 5%;"><i>No manufacturers found. To add your first manufacturer, first create a part on the <a
57
+ href="{% url 'bom:home' %}">home</a> page, then go to the sourcing tab to create a manufacturer and manufacturer part.</i></td>
58
+ </tr>
59
+ {% endfor %}
60
+ </tbody>
61
+ </table>
62
+ </div>
63
+ {% if manufacturers.has_other_pages %}
64
+ <ul class="pagination center" style="padding-top: 24px;">
65
+ {% if manufacturers.has_previous %}
66
+ <li><a href="?page={{ manufacturers.previous_page_number }}{% if query %}&q={{ query }}{% endif %}"><i class="material-icons">chevron_left</i></a></li>
67
+ {% else %}
68
+ <li class="disabled"><i class="material-icons">chevron_left</i></li>
69
+ {% endif %}
70
+ {% for i in manufacturers.paginator.page_range %}
71
+ {% if manufacturers.number == i %}
72
+ <li class="active green lighten-2"><a>{{ i }}</a></li>
73
+ {% else %}
74
+ <li class="waves-effect waves-green"><a href="?page={{ i }}{% if query %}&q={{ query }}{% endif %}">{{ i }}</a></li>
75
+ {% endif %}
76
+ {% endfor %}
77
+ {% if manufacturers.has_next %}
78
+ <li><a href="?page={{ manufacturers.next_page_number }}{% if query %}&q={{ query }}{% endif %}"><i class="material-icons">chevron_right</i></a></li>
79
+ {% else %}
80
+ <li class="disabled"><i class="material-icons">chevron_right</i></li>
81
+ {% endif %}
82
+ </ul>
83
+ {% endif %}
84
+ </div>
85
+ </form>
86
+ </div>
87
+ {% endblock %}
88
+
89
+ {% block bom-script %}
90
+ <!-- Floating Horizontal Scrollbar -->
91
+ <script type="text/javascript" src="{% static 'bom/js/jquery.ba-floatingscrollbar.min.js' %}"></script>
92
+ <script>
93
+ $(function () {
94
+ $('.responsive-table-wrapper').floatingScrollbar();
95
+ });
96
+ </script>
97
+ {% endblock bom-script %}
@@ -0,0 +1,15 @@
1
+ {% comment %}
2
+
3
+ This file is intended to be used as a Django include file for the purpose of displaying
4
+ the nothing-to-see-here message:
5
+
6
+ {% include 'bom/nothing-to-see.html' required_privilege=PPP %}
7
+
8
+ where UUU is the includee's user profile variable for the currently logged-in user and PPP
9
+ is a string that denotes the role that user must have in order to gain access.
10
+
11
+ {% endcomment %}
12
+
13
+
14
+ <p>Nothing to see here 🙈 because you do not have {{ required_privilege }} privileges. Please contact {{ organization }}'s IndaBOM owner
15
+ <a href="mailto:{{ profile.organization.owner.email }}">{{ profile.organization.owner.email }}</a> for assistance</p>
@@ -0,0 +1,135 @@
1
+ {% extends 'bom/bom-base.html' %}
2
+
3
+ {% load materializecss %}
4
+ {% load static %}
5
+
6
+ {% block head-title %}Create Your Organization{% endblock %}
7
+
8
+ {% block content %}
9
+ <div class="container">
10
+ <h1 class="light header center">Welcome to IndaBOM!</h1>
11
+ <div id="create-or-join">
12
+ <h3 class="center">Create or join an Organization?</h3>
13
+ <p class="center">In IndaBOM, everything happens in an Organization. This is where your team collaborates on parts, BOMs, and assemblies.</p>
14
+
15
+ <div class="row" style="display: flex; flex-wrap: wrap;">
16
+ <div class="col s12 m6" style="display: flex;">
17
+ <div class="card green lighten-2 waves-effect waves-block waves-light" style="width: 100%;" onclick="selectNewOrganization()">
18
+ <div class="card-image">
19
+ <i class="material-icons" style="margin-top: 20px; color: white; text-align: center; font-size: 7rem; display: block;">group</i>
20
+ </div>
21
+ <div class="card-content text-center">
22
+ <span class="card-title white-text">Create a new organization</span>
23
+ <p class="white-text">Create a new workspace for your team or company to collaborate.</p>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ <div class="col s12 m6" style="display: flex;">
28
+ <a class="card green lighten-2 waves-effect waves-block waves-light modal-trigger" style="width: 100%;" onclick="selectJoinOrganization()">
29
+ <div class="card-image">
30
+ <i class="material-icons" style="margin-top: 20px; color: white; text-align: center; font-size: 7rem; display: block;">group_add</i>
31
+ </div>
32
+ <div class="card-content text-center">
33
+ <span class="card-title white-text">Join an existing organization</span>
34
+ <p class="white-text">Join a workspace already created by your team member.</p>
35
+ </div>
36
+ </a>
37
+ </div>
38
+ </div>
39
+ </div>
40
+
41
+ <div id="join-organization" style="display: none;">
42
+ <h3 class="center">Join an existing Organization</h3>
43
+ <h5 class="center" style="padding-top: 36px;">To join an existing organization, you must provide your
44
+ username (not e-mail) to your IndaBOM organization owner. <br><br>Your username is
45
+ <b>{{ user.username }}</b>
46
+ click
47
+ <a href="mailto:?subject=Add me to your IndaBOM Organization&body=Hi,%0D%0A%0D%0APlease add me to your IndaBOM organization. To do so, log in, go to Settings > Organization and add me via my username {{ user.username }}">here</a>
48
+ to send an e-mail to your organization owner with instructions.</h5>
49
+ <br><br>
50
+ <p class="center">Oops! I meant to <a class="modal-trigger" onclick="resetView()">create a new organization</a>.</p>
51
+ </div>
52
+
53
+ <div id="create-organization" style="display: none;">
54
+ <h3 class="center">Create a new Organization</h3>
55
+ <p class="center">Oops! I meant to <a class="modal-trigger" onclick="resetView()">join an existing organization</a>.</p>
56
+ <form name="seller" action="{% url 'bom:organization-create' %}" method="post" class="col s12">
57
+ <div class="row">
58
+ {% csrf_token %}
59
+ <div class="col s12" style="padding: 16px;">
60
+ <h4>1) Type a name for your organization.</h4>
61
+ <p>You can always change this later.</p>
62
+ {{ form.name|materializecss }}
63
+ </div>
64
+ <div class="col s12" style="padding: 16px;">
65
+ <h4>2) What type of numbering scheme do you want your organization to use?</h4>
66
+ <p><i>We recommend using "Semi-intelligent" numbering systems</i> to take advantage of all of the IndaBOM features.</p>
67
+ <ul class="browser-default">
68
+ <li style="padding-bottom: 16px;"><b>Semi-intelligent</b> e.g. CCC-NNNN-YY<br>Consists of 3 components: a 3-digit part class, a N-digit part number, and a 2-digit
69
+ variation. IndaBOM part numbers are designed to be simple to assign and simple to subsequently write, type, or speak. You define the part classes in your organization,
70
+ and how long your N-digit part number is below.
71
+ </li>
72
+ <li><b>Intelligent</b> You control your numbers.<br>Intelligent part numbering on IndaBOM allows the user to assign any part number to a part. The part number contains
73
+ descriptive details embedded within that provides
74
+ noteworthy information about the part. For example, a capacitor may be named C0402X5R33PF to indicate that it is a capacitor of size "0402", using a X5R dialectric, and
75
+ is 33pF.
76
+ </li>
77
+ </ul>
78
+ <p style="font-size: 15px;">You can read more about the options <a href="{% url 'bom:help' %}#part-numbering" target="_blank">here</a>. Some times the "intelligent" way isn't
79
+ the best way 😉.</p>
80
+ <p><b>Important!</b> Once you've created parts, you cannot change your organization type without having to delete your parts (export is available).</p>
81
+ {{ form.number_scheme|materializecss }}
82
+ </div>
83
+ <div id="item-number-length" class="col s12" style="padding: 16px;">
84
+ <h4>3) How long do you want your item numbers to be?</h4>
85
+ <p>Your part numbers will have a part class (C), <b>item number (N)</b> and a variation (V) in the format CCC-NNNN-VV. You can always <i>increase</i> these numbers, but you
86
+ can't decrease them. The recommended values are below (C = 3, N = 4, V = 2).</p>
87
+ {{ form.number_class_code_len|materializecss:'s4' }} {{ form.number_item_len|materializecss:'s4' }} {{ form.number_variation_len|materializecss:'s4' }}
88
+ </div>
89
+ </div>
90
+ <div class="row">
91
+ <div class="col s12 center-align">
92
+ <button class="waves-effect waves-light btn btn-primary" type="submit" name="action">Let's Go!
93
+ </button>
94
+ </div>
95
+ </div>
96
+ </form>
97
+ </div>
98
+ </div>
99
+
100
+ <script>
101
+ $(document).ready(function () {
102
+ $('.modal').modal();
103
+ });
104
+ </script>
105
+ <script type='text/javascript'>
106
+ function selectNewOrganization() {
107
+ $('#create-or-join').hide();
108
+ $('#join-organization').hide();
109
+ $('#create-organization').show();
110
+ }
111
+
112
+ function selectJoinOrganization() {
113
+ $('#create-or-join').hide();
114
+ $('#create-organization').hide();
115
+ $('#join-organization').show();
116
+ }
117
+
118
+ function resetView() {
119
+ $('#create-organization').hide();
120
+ $('#join-organization').hide();
121
+ $('#create-or-join').show();
122
+ }
123
+
124
+ $(function () {
125
+ $('select[name="number_scheme"]').change(function () {
126
+ var numberScheme = $('select[name="number_scheme"]').val();
127
+ if (numberScheme === 'S') {
128
+ $('#item-number-length').show();
129
+ } else {
130
+ $('#item-number-length').hide();
131
+ }
132
+ });
133
+ });
134
+ </script>
135
+ {% endblock %}