mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-07 19:01:17 +00:00
Calendar view for purchase orders
This commit is contained in:
1 parent
38b6367453
commit
76c86e7b2f
7 files changed
+193
-22
No files matched your search
@@ -123,6 +123,7 @@ InvenTree
|
||||
<script type='text/javascript' src="{% url 'stock.js' %}"></script>
|
||||
<script type='text/javascript' src="{% url 'build.js' %}"></script>
|
||||
<script type='text/javascript' src="{% url 'order.js' %}"></script>
|
||||
<script type='text/javascript' src="{% url 'calendar.js' %}"></script>
|
||||
<script type='text/javascript' src="{% url 'table_filters.js' %}"></script>
|
||||
|
||||
<script type='text/javascript' src="{% static 'fontawesome/js/solid.js' %}"></script>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
{% load i18n %}
|
||||
|
||||
/**
|
||||
* Helper functions for calendar display
|
||||
*/
|
||||
|
||||
function startDate(calendar) {
|
||||
// Extract the first displayed date on the calendar
|
||||
return calendar.currentData.dateProfile.activeRange.start.toISOString().split("T")[0];
|
||||
}
|
||||
|
||||
function endDate(calendar) {
|
||||
// Extract the last display date on the calendar
|
||||
return calendar.currentData.dateProfile.activeRange.end.toISOString().split("T")[0];
|
||||
}
|
||||
|
||||
function clearEvents(calendar) {
|
||||
// Remove all events from the calendar
|
||||
|
||||
var events = calendar.getEvents();
|
||||
|
||||
events.forEach(function(event) {
|
||||
event.remove();
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user