2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-05-02 15:54:29 +00:00

Merge pull request #1208 from SchrodingersGat/calendar

Add fullcalendar javascript library
This commit is contained in:
Oliver
2021-01-08 00:04:16 +11:00
committed by GitHub
90 changed files with 20450 additions and 676 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var af = {
code: 'af',
week: {
dow: 1, // Maandag is die eerste dag van die week.
doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
},
buttonText: {
prev: 'Vorige',
next: 'Volgende',
today: 'Vandag',
year: 'Jaar',
month: 'Maand',
week: 'Week',
day: 'Dag',
list: 'Agenda',
},
allDayText: 'Heeldag',
moreLinkText: 'Addisionele',
noEventsText: 'Daar is geen gebeurtenisse nie',
};
return af;
}());
@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var arDz = {
code: 'ar-dz',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 4, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return arDz;
}());
@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var arKw = {
code: 'ar-kw',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 12, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return arKw;
}());
@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var arLy = {
code: 'ar-ly',
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return arLy;
}());
@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var arMa = {
code: 'ar-ma',
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return arMa;
}());
@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var arSa = {
code: 'ar-sa',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return arSa;
}());
@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var arTn = {
code: 'ar-tn',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return arTn;
}());
@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ar = {
code: 'ar',
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return ar;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var az = {
code: 'az',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Əvvəl',
next: 'Sonra',
today: 'Bu Gün',
month: 'Ay',
week: 'Həftə',
day: 'Gün',
list: 'Gündəm',
},
weekText: 'Həftə',
allDayText: 'Bütün Gün',
moreLinkText: function(n) {
return '+ daha çox ' + n
},
noEventsText: 'Göstərmək üçün hadisə yoxdur',
};
return az;
}());
@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var bg = {
code: 'bg',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'назад',
next: 'напред',
today: 'днес',
month: 'Месец',
week: 'Седмица',
day: 'Ден',
list: 'График',
},
allDayText: 'Цял ден',
moreLinkText: function(n) {
return '+още ' + n
},
noEventsText: 'Няма събития за показване',
};
return bg;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var bs = {
code: 'bs',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Prošli',
next: 'Sljedeći',
today: 'Danas',
month: 'Mjesec',
week: 'Sedmica',
day: 'Dan',
list: 'Raspored',
},
weekText: 'Sed',
allDayText: 'Cijeli dan',
moreLinkText: function(n) {
return '+ još ' + n
},
noEventsText: 'Nema događaja za prikazivanje',
};
return bs;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ca = {
code: 'ca',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Anterior',
next: 'Següent',
today: 'Avui',
month: 'Mes',
week: 'Setmana',
day: 'Dia',
list: 'Agenda',
},
weekText: 'Set',
allDayText: 'Tot el dia',
moreLinkText: 'més',
noEventsText: 'No hi ha esdeveniments per mostrar',
};
return ca;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var cs = {
code: 'cs',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Dříve',
next: 'Později',
today: 'Nyní',
month: 'Měsíc',
week: 'Týden',
day: 'Den',
list: 'Agenda',
},
weekText: 'Týd',
allDayText: 'Celý den',
moreLinkText: function(n) {
return '+další: ' + n
},
noEventsText: 'Žádné akce k zobrazení',
};
return cs;
}());
@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var cy = {
code: 'cy',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Blaenorol',
next: 'Nesaf',
today: 'Heddiw',
year: 'Blwyddyn',
month: 'Mis',
week: 'Wythnos',
day: 'Dydd',
list: 'Rhestr',
},
weekText: 'Wythnos',
allDayText: 'Trwy\'r dydd',
moreLinkText: 'Mwy',
noEventsText: 'Dim digwyddiadau',
};
return cy;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var da = {
code: 'da',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Forrige',
next: 'Næste',
today: 'I dag',
month: 'Måned',
week: 'Uge',
day: 'Dag',
list: 'Agenda',
},
weekText: 'Uge',
allDayText: 'Hele dagen',
moreLinkText: 'flere',
noEventsText: 'Ingen arrangementer at vise',
};
return da;
}());
@@ -0,0 +1,30 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var deAt = {
code: 'de-at',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Zurück',
next: 'Vor',
today: 'Heute',
year: 'Jahr',
month: 'Monat',
week: 'Woche',
day: 'Tag',
list: 'Terminübersicht',
},
weekText: 'KW',
allDayText: 'Ganztägig',
moreLinkText: function(n) {
return '+ weitere ' + n
},
noEventsText: 'Keine Ereignisse anzuzeigen',
};
return deAt;
}());
@@ -0,0 +1,30 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var de = {
code: 'de',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Zurück',
next: 'Vor',
today: 'Heute',
year: 'Jahr',
month: 'Monat',
week: 'Woche',
day: 'Tag',
list: 'Terminübersicht',
},
weekText: 'KW',
allDayText: 'Ganztägig',
moreLinkText: function(n) {
return '+ weitere ' + n
},
noEventsText: 'Keine Ereignisse anzuzeigen',
};
return de;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var el = {
code: 'el',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4st is the first week of the year.
},
buttonText: {
prev: 'Προηγούμενος',
next: 'Επόμενος',
today: 'Σήμερα',
month: 'Μήνας',
week: 'Εβδομάδα',
day: 'Ημέρα',
list: 'Ατζέντα',
},
weekText: 'Εβδ',
allDayText: 'Ολοήμερο',
moreLinkText: 'περισσότερα',
noEventsText: 'Δεν υπάρχουν γεγονότα προς εμφάνιση',
};
return el;
}());
@@ -0,0 +1,14 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var enAu = {
code: 'en-au',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
};
return enAu;
}());
@@ -0,0 +1,14 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var enGb = {
code: 'en-gb',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
};
return enGb;
}());
@@ -0,0 +1,14 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var enNz = {
code: 'en-nz',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
};
return enNz;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var eo = {
code: 'eo',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Antaŭa',
next: 'Sekva',
today: 'Hodiaŭ',
month: 'Monato',
week: 'Semajno',
day: 'Tago',
list: 'Tagordo',
},
weekText: 'Sm',
allDayText: 'Tuta tago',
moreLinkText: 'pli',
noEventsText: 'Neniuj eventoj por montri',
};
return eo;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var esUs = {
code: 'es',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Ant',
next: 'Sig',
today: 'Hoy',
month: 'Mes',
week: 'Semana',
day: 'Día',
list: 'Agenda',
},
weekText: 'Sm',
allDayText: 'Todo el día',
moreLinkText: 'más',
noEventsText: 'No hay eventos para mostrar',
};
return esUs;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var es = {
code: 'es',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Ant',
next: 'Sig',
today: 'Hoy',
month: 'Mes',
week: 'Semana',
day: 'Día',
list: 'Agenda',
},
weekText: 'Sm',
allDayText: 'Todo el día',
moreLinkText: 'más',
noEventsText: 'No hay eventos para mostrar',
};
return es;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var et = {
code: 'et',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Eelnev',
next: 'Järgnev',
today: 'Täna',
month: 'Kuu',
week: 'Nädal',
day: 'Päev',
list: 'Päevakord',
},
weekText: 'näd',
allDayText: 'Kogu päev',
moreLinkText: function(n) {
return '+ veel ' + n
},
noEventsText: 'Kuvamiseks puuduvad sündmused',
};
return et;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var eu = {
code: 'eu',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Aur',
next: 'Hur',
today: 'Gaur',
month: 'Hilabetea',
week: 'Astea',
day: 'Eguna',
list: 'Agenda',
},
weekText: 'As',
allDayText: 'Egun osoa',
moreLinkText: 'gehiago',
noEventsText: 'Ez dago ekitaldirik erakusteko',
};
return eu;
}());
@@ -0,0 +1,30 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var fa = {
code: 'fa',
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'قبلی',
next: 'بعدی',
today: 'امروز',
month: 'ماه',
week: 'هفته',
day: 'روز',
list: 'برنامه',
},
weekText: 'هف',
allDayText: 'تمام روز',
moreLinkText: function(n) {
return 'بیش از ' + n
},
noEventsText: 'هیچ رویدادی به نمایش',
};
return fa;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var fi = {
code: 'fi',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Edellinen',
next: 'Seuraava',
today: 'Tänään',
month: 'Kuukausi',
week: 'Viikko',
day: 'Päivä',
list: 'Tapahtumat',
},
weekText: 'Vk',
allDayText: 'Koko päivä',
moreLinkText: 'lisää',
noEventsText: 'Ei näytettäviä tapahtumia',
};
return fi;
}());
@@ -0,0 +1,24 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var frCa = {
code: 'fr',
buttonText: {
prev: 'Précédent',
next: 'Suivant',
today: "Aujourd'hui",
year: 'Année',
month: 'Mois',
week: 'Semaine',
day: 'Jour',
list: 'Mon planning',
},
weekText: 'Sem.',
allDayText: 'Toute la journée',
moreLinkText: 'en plus',
noEventsText: 'Aucun événement à afficher',
};
return frCa;
}());
@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var frCh = {
code: 'fr-ch',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Précédent',
next: 'Suivant',
today: 'Courant',
year: 'Année',
month: 'Mois',
week: 'Semaine',
day: 'Jour',
list: 'Mon planning',
},
weekText: 'Sm',
allDayText: 'Toute la journée',
moreLinkText: 'en plus',
noEventsText: 'Aucun événement à afficher',
};
return frCh;
}());
@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var fr = {
code: 'fr',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Précédent',
next: 'Suivant',
today: "Aujourd'hui",
year: 'Année',
month: 'Mois',
week: 'Semaine',
day: 'Jour',
list: 'Planning',
},
weekText: 'Sem.',
allDayText: 'Toute la journée',
moreLinkText: 'en plus',
noEventsText: 'Aucun événement à afficher',
};
return fr;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var gl = {
code: 'gl',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Ant',
next: 'Seg',
today: 'Hoxe',
month: 'Mes',
week: 'Semana',
day: 'Día',
list: 'Axenda',
},
weekText: 'Sm',
allDayText: 'Todo o día',
moreLinkText: 'máis',
noEventsText: 'Non hai eventos para amosar',
};
return gl;
}());
@@ -0,0 +1,24 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var he = {
code: 'he',
direction: 'rtl',
buttonText: {
prev: 'הקודם',
next: 'הבא',
today: 'היום',
month: 'חודש',
week: 'שבוע',
day: 'יום',
list: 'סדר יום',
},
allDayText: 'כל היום',
moreLinkText: 'אחר',
noEventsText: 'אין אירועים להצגה',
weekText: 'שבוע',
};
return he;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var hi = {
code: 'hi',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'पिछला',
next: 'अगला',
today: 'आज',
month: 'महीना',
week: 'सप्ताह',
day: 'दिन',
list: 'कार्यसूची',
},
weekText: 'हफ्ता',
allDayText: 'सभी दिन',
moreLinkText: function(n) {
return '+अधिक ' + n
},
noEventsText: 'कोई घटनाओं को प्रदर्शित करने के लिए',
};
return hi;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var hr = {
code: 'hr',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Prijašnji',
next: 'Sljedeći',
today: 'Danas',
month: 'Mjesec',
week: 'Tjedan',
day: 'Dan',
list: 'Raspored',
},
weekText: 'Tje',
allDayText: 'Cijeli dan',
moreLinkText: function(n) {
return '+ još ' + n
},
noEventsText: 'Nema događaja za prikaz',
};
return hr;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var hu = {
code: 'hu',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'vissza',
next: 'előre',
today: 'ma',
month: 'Hónap',
week: 'Hét',
day: 'Nap',
list: 'Napló',
},
weekText: 'Hét',
allDayText: 'Egész nap',
moreLinkText: 'további',
noEventsText: 'Nincs megjeleníthető esemény',
};
return hu;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var hyAm = {
code: 'hy-am',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Նախորդ',
next: 'Հաջորդ',
today: 'Այսօր',
month: 'Ամիս',
week: 'Շաբաթ',
day: 'Օր',
list: 'Օրվա ցուցակ',
},
weekText: 'Շաբ',
allDayText: 'Ամբողջ օր',
moreLinkText: function(n) {
return '+ ևս ' + n
},
noEventsText: 'Բացակայում է իրադարձությունը ցուցադրելու',
};
return hyAm;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var id = {
code: 'id',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'mundur',
next: 'maju',
today: 'hari ini',
month: 'Bulan',
week: 'Minggu',
day: 'Hari',
list: 'Agenda',
},
weekText: 'Mg',
allDayText: 'Sehari penuh',
moreLinkText: 'lebih',
noEventsText: 'Tidak ada acara untuk ditampilkan',
};
return id;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var is = {
code: 'is',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Fyrri',
next: 'Næsti',
today: 'Í dag',
month: 'Mánuður',
week: 'Vika',
day: 'Dagur',
list: 'Dagskrá',
},
weekText: 'Vika',
allDayText: 'Allan daginn',
moreLinkText: 'meira',
noEventsText: 'Engir viðburðir til að sýna',
};
return is;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var it = {
code: 'it',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Prec',
next: 'Succ',
today: 'Oggi',
month: 'Mese',
week: 'Settimana',
day: 'Giorno',
list: 'Agenda',
},
weekText: 'Sm',
allDayText: 'Tutto il giorno',
moreLinkText: function(n) {
return '+altri ' + n
},
noEventsText: 'Non ci sono eventi da visualizzare',
};
return it;
}());
@@ -0,0 +1,25 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ja = {
code: 'ja',
buttonText: {
prev: '前',
next: '次',
today: '今日',
month: '月',
week: '週',
day: '日',
list: '予定リスト',
},
weekText: '週',
allDayText: '終日',
moreLinkText: function(n) {
return '他 ' + n + ' 件'
},
noEventsText: '表示する予定はありません',
};
return ja;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ka = {
code: 'ka',
week: {
dow: 1,
doy: 7,
},
buttonText: {
prev: 'წინა',
next: 'შემდეგი',
today: 'დღეს',
month: 'თვე',
week: 'კვირა',
day: 'დღე',
list: 'დღის წესრიგი',
},
weekText: 'კვ',
allDayText: 'მთელი დღე',
moreLinkText: function(n) {
return '+ კიდევ ' + n
},
noEventsText: 'ღონისძიებები არ არის',
};
return ka;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var kk = {
code: 'kk',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Алдыңғы',
next: 'Келесі',
today: 'Бүгін',
month: 'Ай',
week: 'Апта',
day: 'Күн',
list: 'Күн тәртібі',
},
weekText: 'Не',
allDayText: 'Күні бойы',
moreLinkText: function(n) {
return '+ тағы ' + n
},
noEventsText: 'Көрсету үшін оқиғалар жоқ',
};
return kk;
}());
@@ -0,0 +1,23 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ko = {
code: 'ko',
buttonText: {
prev: '이전달',
next: '다음달',
today: '오늘',
month: '월',
week: '주',
day: '일',
list: '일정목록',
},
weekText: '주',
allDayText: '종일',
moreLinkText: '개',
noEventsText: '일정이 없습니다',
};
return ko;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var lb = {
code: 'lb',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Zréck',
next: 'Weider',
today: 'Haut',
month: 'Mount',
week: 'Woch',
day: 'Dag',
list: 'Terminiwwersiicht',
},
weekText: 'W',
allDayText: 'Ganzen Dag',
moreLinkText: 'méi',
noEventsText: 'Nee Evenementer ze affichéieren',
};
return lb;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var lt = {
code: 'lt',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Atgal',
next: 'Pirmyn',
today: 'Šiandien',
month: 'Mėnuo',
week: 'Savaitė',
day: 'Diena',
list: 'Darbotvarkė',
},
weekText: 'SAV',
allDayText: 'Visą dieną',
moreLinkText: 'daugiau',
noEventsText: 'Nėra įvykių rodyti',
};
return lt;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var lv = {
code: 'lv',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Iepr.',
next: 'Nāk.',
today: 'Šodien',
month: 'Mēnesis',
week: 'Nedēļa',
day: 'Diena',
list: 'Dienas kārtība',
},
weekText: 'Ned.',
allDayText: 'Visu dienu',
moreLinkText: function(n) {
return '+vēl ' + n
},
noEventsText: 'Nav notikumu',
};
return lv;
}());
@@ -0,0 +1,25 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var mk = {
code: 'mk',
buttonText: {
prev: 'претходно',
next: 'следно',
today: 'Денес',
month: 'Месец',
week: 'Недела',
day: 'Ден',
list: 'График',
},
weekText: 'Сед',
allDayText: 'Цел ден',
moreLinkText: function(n) {
return '+повеќе ' + n
},
noEventsText: 'Нема настани за прикажување',
};
return mk;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ms = {
code: 'ms',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Sebelum',
next: 'Selepas',
today: 'hari ini',
month: 'Bulan',
week: 'Minggu',
day: 'Hari',
list: 'Agenda',
},
weekText: 'Mg',
allDayText: 'Sepanjang hari',
moreLinkText: function(n) {
return 'masih ada ' + n + ' acara'
},
noEventsText: 'Tiada peristiwa untuk dipaparkan',
};
return ms;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var nb = {
code: 'nb',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Forrige',
next: 'Neste',
today: 'I dag',
month: 'Måned',
week: 'Uke',
day: 'Dag',
list: 'Agenda',
},
weekText: 'Uke',
allDayText: 'Hele dagen',
moreLinkText: 'til',
noEventsText: 'Ingen hendelser å vise',
};
return nb;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ne = {
code: 'ne', // code for nepal
week: {
dow: 7, // Sunday is the first day of the week.
doy: 1, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'अघिल्लो',
next: 'अर्को',
today: 'आज',
month: 'महिना',
week: 'हप्ता',
day: 'दिन',
list: 'सूची',
},
weekText: 'हप्ता',
allDayText: 'दिनभरि',
moreLinkText: 'थप लिंक',
noEventsText: 'देखाउनको लागि कुनै घटनाहरू छैनन्',
};
return ne;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var nl = {
code: 'nl',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Vorige',
next: 'Volgende',
today: 'Vandaag',
year: 'Jaar',
month: 'Maand',
week: 'Week',
day: 'Dag',
list: 'Agenda',
},
allDayText: 'Hele dag',
moreLinkText: 'extra',
noEventsText: 'Geen evenementen om te laten zien',
};
return nl;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var nn = {
code: 'nn',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Førre',
next: 'Neste',
today: 'I dag',
month: 'Månad',
week: 'Veke',
day: 'Dag',
list: 'Agenda',
},
weekText: 'Veke',
allDayText: 'Heile dagen',
moreLinkText: 'til',
noEventsText: 'Ingen hendelser å vise',
};
return nn;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var pl = {
code: 'pl',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Poprzedni',
next: 'Następny',
today: 'Dziś',
month: 'Miesiąc',
week: 'Tydzień',
day: 'Dzień',
list: 'Plan dnia',
},
weekText: 'Tydz',
allDayText: 'Cały dzień',
moreLinkText: 'więcej',
noEventsText: 'Brak wydarzeń do wyświetlenia',
};
return pl;
}());
@@ -0,0 +1,25 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ptBr = {
code: 'pt-br',
buttonText: {
prev: 'Anterior',
next: 'Próximo',
today: 'Hoje',
month: 'Mês',
week: 'Semana',
day: 'Dia',
list: 'Lista',
},
weekText: 'Sm',
allDayText: 'dia inteiro',
moreLinkText: function(n) {
return 'mais +' + n
},
noEventsText: 'Não há eventos para mostrar',
};
return ptBr;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var pt = {
code: 'pt',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Anterior',
next: 'Seguinte',
today: 'Hoje',
month: 'Mês',
week: 'Semana',
day: 'Dia',
list: 'Agenda',
},
weekText: 'Sem',
allDayText: 'Todo o dia',
moreLinkText: 'mais',
noEventsText: 'Não há eventos para mostrar',
};
return pt;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ro = {
code: 'ro',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'precedentă',
next: 'următoare',
today: 'Azi',
month: 'Lună',
week: 'Săptămână',
day: 'Zi',
list: 'Agendă',
},
weekText: 'Săpt',
allDayText: 'Toată ziua',
moreLinkText: function(n) {
return '+alte ' + n
},
noEventsText: 'Nu există evenimente de afișat',
};
return ro;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ru = {
code: 'ru',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Пред',
next: 'След',
today: 'Сегодня',
month: 'Месяц',
week: 'Неделя',
day: 'День',
list: 'Повестка дня',
},
weekText: 'Нед',
allDayText: 'Весь день',
moreLinkText: function(n) {
return '+ ещё ' + n
},
noEventsText: 'Нет событий для отображения',
};
return ru;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var sk = {
code: 'sk',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Predchádzajúci',
next: 'Nasledujúci',
today: 'Dnes',
month: 'Mesiac',
week: 'Týždeň',
day: 'Deň',
list: 'Rozvrh',
},
weekText: 'Ty',
allDayText: 'Celý deň',
moreLinkText: function(n) {
return '+ďalšie: ' + n
},
noEventsText: 'Žiadne akcie na zobrazenie',
};
return sk;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var sl = {
code: 'sl',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Prejšnji',
next: 'Naslednji',
today: 'Trenutni',
month: 'Mesec',
week: 'Teden',
day: 'Dan',
list: 'Dnevni red',
},
weekText: 'Teden',
allDayText: 'Ves dan',
moreLinkText: 'več',
noEventsText: 'Ni dogodkov za prikaz',
};
return sl;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var sq = {
code: 'sq',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'mbrapa',
next: 'Përpara',
today: 'sot',
month: 'Muaj',
week: 'Javë',
day: 'Ditë',
list: 'Listë',
},
weekText: 'Ja',
allDayText: 'Gjithë ditën',
moreLinkText: function(n) {
return '+më tepër ' + n
},
noEventsText: 'Nuk ka evente për të shfaqur',
};
return sq;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var srCyrl = {
code: 'sr-cyrl',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Претходна',
next: 'следећи',
today: 'Данас',
month: 'Месец',
week: 'Недеља',
day: 'Дан',
list: 'Планер',
},
weekText: 'Сед',
allDayText: 'Цео дан',
moreLinkText: function(n) {
return '+ још ' + n
},
noEventsText: 'Нема догађаја за приказ',
};
return srCyrl;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var sr = {
code: 'sr',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Prethodna',
next: 'Sledeći',
today: 'Danas',
month: 'Mеsеc',
week: 'Nеdеlja',
day: 'Dan',
list: 'Planеr',
},
weekText: 'Sed',
allDayText: 'Cеo dan',
moreLinkText: function(n) {
return '+ još ' + n
},
noEventsText: 'Nеma događaja za prikaz',
};
return sr;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var sv = {
code: 'sv',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Förra',
next: 'Nästa',
today: 'Idag',
month: 'Månad',
week: 'Vecka',
day: 'Dag',
list: 'Program',
},
weekText: 'v.',
allDayText: 'Heldag',
moreLinkText: 'till',
noEventsText: 'Inga händelser att visa',
};
return sv;
}());
@@ -0,0 +1,30 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var th = {
code: 'th',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'ก่อนหน้า',
next: 'ถัดไป',
prevYear: 'ปีก่อนหน้า',
nextYear: 'ปีถัดไป',
year: 'ปี',
today: 'วันนี้',
month: 'เดือน',
week: 'สัปดาห์',
day: 'วัน',
list: 'กำหนดการ',
},
weekText: 'สัปดาห์',
allDayText: 'ตลอดวัน',
moreLinkText: 'เพิ่มเติม',
noEventsText: 'ไม่มีกิจกรรมที่จะแสดง',
};
return th;
}());
@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var tr = {
code: 'tr',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'geri',
next: 'ileri',
today: 'bugün',
month: 'Ay',
week: 'Hafta',
day: 'Gün',
list: 'Ajanda',
},
weekText: 'Hf',
allDayText: 'Tüm gün',
moreLinkText: 'daha fazla',
noEventsText: 'Gösterilecek etkinlik yok',
};
return tr;
}());
@@ -0,0 +1,17 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ug = {
code: 'ug',
buttonText: {
month: 'ئاي',
week: 'ھەپتە',
day: 'كۈن',
list: 'كۈنتەرتىپ',
},
allDayText: 'پۈتۈن كۈن',
};
return ug;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var uk = {
code: 'uk',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Попередній',
next: 'далі',
today: 'Сьогодні',
month: 'Місяць',
week: 'Тиждень',
day: 'День',
list: 'Порядок денний',
},
weekText: 'Тиж',
allDayText: 'Увесь день',
moreLinkText: function(n) {
return '+ще ' + n + '...'
},
noEventsText: 'Немає подій для відображення',
};
return uk;
}());
@@ -0,0 +1,21 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var uz = {
code: 'uz',
buttonText: {
month: 'Oy',
week: 'Xafta',
day: 'Kun',
list: 'Kun tartibi',
},
allDayText: "Kun bo'yi",
moreLinkText: function(n) {
return '+ yana ' + n
},
noEventsText: "Ko'rsatish uchun voqealar yo'q",
};
return uz;
}());
@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var vi = {
code: 'vi',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Trước',
next: 'Tiếp',
today: 'Hôm nay',
month: 'Tháng',
week: 'Tuần',
day: 'Ngày',
list: 'Lịch biểu',
},
weekText: 'Tu',
allDayText: 'Cả ngày',
moreLinkText: function(n) {
return '+ thêm ' + n
},
noEventsText: 'Không có sự kiện để hiển thị',
};
return vi;
}());
@@ -0,0 +1,30 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var zhCn = {
code: 'zh-cn',
week: {
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: '上月',
next: '下月',
today: '今天',
month: '月',
week: '周',
day: '日',
list: '日程',
},
weekText: '周',
allDayText: '全天',
moreLinkText: function(n) {
return '另外 ' + n + ' 个'
},
noEventsText: '没有事件显示',
};
return zhCn;
}());
@@ -0,0 +1,23 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var zhTw = {
code: 'zh-tw',
buttonText: {
prev: '上月',
next: '下月',
today: '今天',
month: '月',
week: '週',
day: '天',
list: '活動列表',
},
weekText: '周',
allDayText: '整天',
moreLinkText: '顯示更多',
noEventsText: '没有任何活動',
};
return zhTw;
}());
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+5
View File
@@ -152,6 +152,11 @@ class SalesOrderStatus(StatusCode):
PENDING,
]
# Completed orders
COMPLETE = [
SHIPPED,
]
class StockStatus(StatusCode):
+1
View File
@@ -93,6 +93,7 @@ dynamic_javascript_urls = [
url(r'^barcode.js', DynamicJsView.as_view(template_name='js/barcode.js'), name='barcode.js'),
url(r'^bom.js', DynamicJsView.as_view(template_name='js/bom.js'), name='bom.js'),
url(r'^build.js', DynamicJsView.as_view(template_name='js/build.js'), name='build.js'),
url(r'^calendar.js', DynamicJsView.as_view(template_name='js/calendar.js'), name='calendar.js'),
url(r'^company.js', DynamicJsView.as_view(template_name='js/company.js'), name='company.js'),
url(r'^order.js', DynamicJsView.as_view(template_name='js/order.js'), name='order.js'),
url(r'^part.js', DynamicJsView.as_view(template_name='js/part.js'), name='part.js'),
+7
View File
@@ -90,6 +90,13 @@ class BuildList(generics.ListCreateAPIView):
if part is not None:
queryset = queryset.filter(part=part)
# Filter by 'date range'
min_date = params.get('min_date', None)
max_date = params.get('max_date', None)
if min_date is not None and max_date is not None:
queryset = Build.filterByDate(queryset, min_date, max_date)
return queryset
def get_serializer(self, *args, **kwargs):
+31
View File
@@ -61,6 +61,37 @@ class Build(MPTTModel):
verbose_name = _("Build Order")
verbose_name_plural = _("Build Orders")
@staticmethod
def filterByDate(queryset, min_date, max_date):
"""
Filter by 'minimum and maximum date range'
- Specified as min_date, max_date
- Both must be specified for filter to be applied
"""
date_fmt = '%Y-%m-%d' # ISO format date string
# Ensure that both dates are valid
try:
min_date = datetime.strptime(str(min_date), date_fmt).date()
max_date = datetime.strptime(str(max_date), date_fmt).date()
except (ValueError, TypeError):
# Date processing error, return queryset unchanged
return queryset
# Order was completed within the specified range
completed = Q(status=BuildStatus.COMPLETE) & Q(completion_date__gte=min_date) & Q(completion_date__lte=max_date)
# Order target date falls witin specified range
pending = Q(status__in=BuildStatus.ACTIVE_CODES) & ~Q(target_date=None) & Q(target_date__gte=min_date) & Q(target_date__lte=max_date)
# TODO - Construct a queryset for "overdue" orders
queryset = queryset.filter(completed | pending)
return queryset
def __str__(self):
prefix = getSetting("BUILDORDER_REFERENCE_PREFIX")
@@ -88,11 +88,20 @@ src="{% static 'img/blank_image.png' %}"
<td>{% trans "Status" %}</td>
<td>
{% build_status_label build.status %}
</td>
</tr>
{% if build.target_date %}
<tr>
<td><span class='fas fa-calendar-alt'></span></td>
<td>{% trans "Target Date" %}</td>
<td>
{{ build.target_date }}
{% if build.is_overdue %}
<span title='{% trans "This build was due on" %} {{ build.target_date }}' class='label label-red'>{% trans "Overdue" %}</span>
{% endif %}
</td>
</tr>
{% endif %}
<tr>
<td><span class='fas fa-spinner'></span></td>
<td>{% trans "Progress" %}</td>
+121 -2
View File
@@ -1,4 +1,6 @@
{% extends "base.html" %}
{% load inventree_extras %}
{% load static %}
{% load i18n %}
@@ -8,7 +10,6 @@ InvenTree | {% trans "Build Orders" %}
{% block content %}
<div class='row'>
<div class='col-sm-6'>
<h3>{% trans "Build Orders" %}</h3>
@@ -21,8 +22,17 @@ InvenTree | {% trans "Build Orders" %}
<div id='button-toolbar'>
<div class='button-toolbar container-fluid' style='float: right;'>
{% if roles.build.add %}
<button type='button' class="btn btn-success" id='new-build'>
<span class='fas fa-tools'></span> {% trans "New Build Order" %}</button>
<span class='fas fa-tools'></span> {% trans "New Build Order" %}
</button>
{% endif %}
<button class='btn btn-default' type='button' id='view-calendar' title='{% trans "Display calendar view" %}'>
<span class='fas fa-calendar-alt'></span>
</button>
<button class='btn btn-default' type='button' id='view-list' title='{% trans "Display list view" %}'>
<span class='fas fa-th-list'></span>
</button>
<div class='filter-list' id='filter-list-build'>
<!-- An empty div in which the filter list will be constructed -->
</div>
@@ -33,11 +43,120 @@ InvenTree | {% trans "Build Orders" %}
<table class='table table-striped table-condensed' id='build-table' data-toolbar='#button-toolbar'>
</table>
<div id='build-order-calendar'></div>
{% endblock %}
{% block js_load %}
{{ block.super }}
<script type='text/javascript'>
function loadOrderEvents(calendar) {
var start = startDate(calendar);
var end = endDate(calendar);
clearEvents(calendar);
// Request build orders from the server within specified date range
inventreeGet(
'{% url "api-build-list" %}',
{
min_date: start,
max_date: end,
part_detail: true,
},
{
success: function(response) {
var prefix = '{% settings_value "BUILDORDER_REFERENCE_PREFIX" %}';
for (var idx = 0; idx < response.length; idx++) {
var order = response[idx];
var date = order.creation_date;
if (order.completion_date) {
date = order.completion_date;
} else if (order.target_date) {
date = order.target_date;
}
var title = `${prefix}${order.reference}`; //- ${order.quantity} x ${order.part_detail.name}`;
var color = '#4c68f5';
if (order.completed) {
color = '#25c234';
} else if (order.overdue) {
color = '#c22525';
}
var event = {
title: title,
start: date,
end: date,
url: `/build/${order.pk}/`,
backgroundColor: color,
};
calendar.addEvent(event);
}
}
}
);
}
var calendar = null;
document.addEventListener('DOMContentLoaded', function() {
var el = document.getElementById('build-order-calendar');
calendar = new FullCalendar.Calendar(el, {
initialView: 'dayGridMonth',
nowIndicator: true,
aspectRatio: 2.5,
datesSet: function() {
loadOrderEvents(calendar);
}
});
calendar.render();
});
</script>
{% endblock %}
{% block js_ready %}
{{ block.super }}
$('#build-order-calendar').hide();
$('#view-list').hide();
$('#view-calendar').click(function() {
// Hide the list view, show the calendar view
$("#build-table").hide();
$("#view-calendar").hide();
$(".fixed-table-pagination").hide();
$(".columns-right").hide();
$(".search").hide();
$("#build-order-calendar").show();
$("#view-list").show();
});
$("#view-list").click(function() {
// Hide the calendar view, show the list view
$("#build-order-calendar").hide();
$("#view-list").hide();
$(".fixed-table-pagination").show();
$(".columns-right").show();
$(".search").show();
$("#build-table").show();
$("#view-calendar").show();
});
$("#collapse-item-active").collapse().show();
$("#new-build").click(function() {
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+14
View File
@@ -107,6 +107,13 @@ class POList(generics.ListCreateAPIView):
except (ValueError, SupplierPart.DoesNotExist):
pass
# Filter by 'date range'
min_date = params.get('min_date', None)
max_date = params.get('max_date', None)
if min_date is not None and max_date is not None:
queryset = PurchaseOrder.filterByDate(queryset, min_date, max_date)
return queryset
filter_backends = [
@@ -293,6 +300,13 @@ class SOList(generics.ListCreateAPIView):
except (Part.DoesNotExist, ValueError):
pass
# Filter by 'date range'
min_date = params.get('min_date', None)
max_date = params.get('max_date', None)
if min_date is not None and max_date is not None:
queryset = SalesOrder.filterByDate(queryset, min_date, max_date)
return queryset
filter_backends = [
+75
View File
@@ -121,6 +121,44 @@ class PurchaseOrder(Order):
received_by: User that received the goods
"""
@staticmethod
def filterByDate(queryset, min_date, max_date):
"""
Filter by 'minimum and maximum date range'
- Specified as min_date, max_date
- Both must be specified for filter to be applied
- Determine which "interesting" orders exist bewteen these dates
To be "interesting":
- A "received" order where the received date lies within the date range
- TODO: A "pending" order where the target date lies within the date range
- TODO: An "overdue" order where the target date is in the past
"""
date_fmt = '%Y-%m-%d' # ISO format date string
# Ensure that both dates are valid
try:
min_date = datetime.strptime(str(min_date), date_fmt).date()
max_date = datetime.strptime(str(max_date), date_fmt).date()
except (ValueError, TypeError):
# Date processing error, return queryset unchanged
return queryset
# Construct a queryset for "received" orders within the range
received = Q(status=PurchaseOrderStatus.COMPLETE) & Q(complete_date__gte=min_date) & Q(complete_date__lte=max_date)
# TODO - Construct a queryset for "pending" orders within the range
# TODO - Construct a queryset for "overdue" orders within the range
flt = received
queryset = queryset.filter(flt)
return queryset
def __str__(self):
prefix = getSetting('PURCHASEORDER_REFERENCE_PREFIX')
@@ -301,6 +339,43 @@ class SalesOrder(Order):
OVERDUE_FILTER = Q(status__in=SalesOrderStatus.OPEN) & ~Q(target_date=None) & Q(target_date__lte=datetime.now().date())
@staticmethod
def filterByDate(queryset, min_date, max_date):
"""
Filter by "minimum and maximum date range"
- Specified as min_date, max_date
- Both must be specified for filter to be applied
- Determine which "interesting" orders exist between these dates
To be "interesting":
- A "completed" order where the completion date lies within the date range
- A "pending" order where the target date lies within the date range
- TODO: An "overdue" order where the target date is in the past
"""
date_fmt = '%Y-%m-%d' # ISO format date string
# Ensure that both dates are valid
try:
min_date = datetime.strptime(str(min_date), date_fmt).date()
max_date = datetime.strptime(str(max_date), date_fmt).date()
except (ValueError, TypeError):
# Date processing error, return queryset unchanged
return queryset
# Construct a queryset for "completed" orders within the range
completed = Q(status__in=SalesOrderStatus.COMPLETE) & Q(shipment_date__gte=min_date) & Q(shipment_date__lte=max_date)
# Construct a queryset for "pending" orders within the range
pending = Q(status__in=SalesOrderStatus.OPEN) & ~Q(target_date=None) & Q(target_date__gte=min_date) & Q(target_date__lte=max_date)
# TODO: Construct a queryset for "overdue" orders within the range
queryset = queryset.filter(completed | pending)
return queryset
def __str__(self):
prefix = getSetting('SALESORDER_REFERENCE_PREFIX')
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load inventree_extras %}
{% load static %}
{% load i18n %}
@@ -18,6 +19,12 @@ InvenTree | {% trans "Purchase Orders" %}
<button class='btn btn-primary' type='button' id='po-create' title='{% trans "Create new purchase order" %}'>
<span class='fas fa-plus-circle'></span> {% trans "New Purchase Order" %}</button>
{% endif %}
<button class='btn btn-default' type='button' id='view-calendar' title='{% trans "Display calendar view" %}'>
<span class='fas fa-calendar-alt'></span>
</button>
<button class='btn btn-default' type='button' id='view-list' title='{% trans "Display list view" %}'>
<span class='fas fa-th-list'></span>
</button>
<div class='filter-list' id='filter-list-purchaseorder'>
<!-- An empty div in which the filter list will be constructed -->
</div>
@@ -27,11 +34,124 @@ InvenTree | {% trans "Purchase Orders" %}
<table class='table table-striped table-condensed po-table' data-toolbar='#table-buttons' id='purchase-order-table'>
</table>
<div id='purchase-order-calendar'></div>
{% endblock %}
{% block js_load %}
{{ block.super }}
<script type='text/javascript'>
function loadOrderEvents(calendar) {
var start = startDate(calendar);
var end = endDate(calendar);
clearEvents(calendar);
// Request purchase orders from the server within specified date range
inventreeGet(
'{% url "api-po-list" %}',
{
supplier_detail: true,
min_date: start,
max_date: end,
},
{
success: function(response) {
var prefix = '{% settings_value "PURCHASEORDER_REFERENCE_PREFIX" %}';
for (var idx = 0; idx < response.length; idx++) {
var order = response[idx];
var date = order.creation_date;
if (order.complete_date) {
date = order.complete_date;
}
var title = `${prefix}${order.reference} - ${order.supplier_detail.name}`;
var color = '#4c68f5';
if (order.complete_date) {
color = '#25c235';
} else if (order.overdue) {
color = '#c22525';
} else {
color = '#4c68f5';
}
var event = {
title: title,
start: date,
end: date,
url: `/order/purchase-order/${order.pk}/`,
backgroundColor: color,
};
calendar.addEvent(event);
}
}
}
);
}
var calendar = null;
document.addEventListener('DOMContentLoaded', function() {
var el = document.getElementById('purchase-order-calendar');
calendar = new FullCalendar.Calendar(el, {
initialView: 'dayGridMonth',
nowIndicator: true,
aspectRatio: 2.5,
datesSet: function() {
loadOrderEvents(calendar);
}
});
calendar.render();
});
</script>
{% endblock %}
{% block js_ready %}
{{ block.super }}
$('#purchase-order-calendar').hide();
$('#view-list').hide();
$('#view-calendar').click(function() {
// Hide the list view, show the calendar view
$("#purchase-order-table").hide();
$("#view-calendar").hide();
$(".fixed-table-pagination").hide();
$(".columns-right").hide();
$(".search").hide();
$('#filter-list-salesorder').hide();
$("#purchase-order-calendar").show();
$("#view-list").show();
});
$("#view-list").click(function() {
// Hide the calendar view, show the list view
$("#purchase-order-calendar").hide();
$("#view-list").hide();
$(".fixed-table-pagination").show();
$(".columns-right").show();
$(".search").show();
$("#purchase-order-table").show();
$('#filter-list-salesorder').show();
$("#view-calendar").show();
});
$("#po-create").click(function() {
launchModalForm("{% url 'po-create' %}",
{
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load inventree_extras %}
{% load static %}
{% load i18n %}
@@ -18,6 +19,12 @@ InvenTree | {% trans "Sales Orders" %}
<button class='btn btn-primary' type='button' id='so-create' title='{% trans "Create new sales order" %}'>
<span class='fas fa-plus-circle'></span> {% trans "New Sales Order" %}</button>
{% endif %}
<button class='btn btn-default' type='button' id='view-calendar' title='{% trans "Display calendar view" %}'>
<span class='fas fa-calendar-alt'></span>
</button>
<button class='btn btn-default' type='button' id='view-list' title='{% trans "Display list view" %}'>
<span class='fas fa-th-list'></span>
</button>
<div class='filter-list' id='filter-list-salesorder'>
<!-- An empty div in which the filter list will be constructed -->
</div>
@@ -27,11 +34,124 @@ InvenTree | {% trans "Sales Orders" %}
<table class='table table-striped table-condensed po-table' data-toolbar='#table-buttons' id='sales-order-table'>
</table>
<div id='sales-order-calendar'></div>
{% endblock %}
{% block js_load %}
{{ block.super }}
<script type='text/javascript'>
function loadOrderEvents(calendar) {
var start = startDate(calendar);
var end = endDate(calendar);
clearEvents(calendar);
// Request orders from the server within specified date range
inventreeGet(
'{% url "api-so-list" %}',
{
customer_detail: true,
min_date: start,
max_date: end,
},
{
success: function(response) {
var prefix = '{% settings_value "SALESORDER_REFERENCE_PREFIX" %}';
for (var idx = 0; idx < response.length; idx++) {
var order = response[idx];
var date = order.creation_date;
if (order.shipment_date) {
date = order.shipment_date;
} else if (order.target_date) {
date = order.target_date;
}
var title = `${prefix}${order.reference} - ${order.customer_detail.name}`;
// Default color is blue
var color = '#4c68f5';
// Overdue orders are red
if (order.overdue) {
color = '#c22525';
} else if (order.status == {{ SalesOrderStatus.SHIPPED }}) {
color = '#25c235';
}
var event = {
title: title,
start: date,
end: date,
url: `/order/sales-order/${order.pk}/`,
backgroundColor: color,
};
calendar.addEvent(event);
}
}
}
);
}
var calendar = null;
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('sales-order-calendar');
calendar = new FullCalendar.Calendar(calendarEl, {
initialView: 'dayGridMonth',
nowIndicator: true,
aspectRatio: 2.5,
datesSet: function() {
loadOrderEvents(calendar);
},
});
calendar.render();
});
</script>
{% endblock %}
{% block js_ready %}
{{ block.super }}
$("#sales-order-calendar").hide();
$("#view-list").hide();
$('#view-calendar').click(function() {
// Hide the list view, show the calendar view
$("#sales-order-table").hide();
$("#view-calendar").hide();
$(".fixed-table-pagination").hide();
$(".columns-right").hide();
$(".search").hide();
$('#filter-list-salesorder').hide();
$("#sales-order-calendar").show();
$("#view-list").show();
});
$("#view-list").click(function() {
// Hide the calendar view, show the list view
$("#sales-order-calendar").hide();
$("#view-list").hide();
$(".fixed-table-pagination").show();
$(".columns-right").show();
$(".search").show();
$("#sales-order-table").show();
$('#filter-list-salesorder').show();
$("#view-calendar").show();
});
loadSalesOrderTable("#sales-order-table", {
url: "{% url 'api-so-list' %}",
});
+3
View File
@@ -40,6 +40,7 @@
<link rel="stylesheet" href="{% static 'css/select2-bootstrap.css' %}">
<link rel="stylesheet" href="{% static 'css/bootstrap-toggle.css' %}">
<link rel="stylesheet" href="{% static 'css/bootstrap-table-filter-control.css' %}">
<link rel="stylesheet" href="{% static 'fullcalendar/main.css' %}">
<link rel="stylesheet" href="{% static 'css/inventree.css' %}">
<link rel="stylesheet" href="{% get_color_theme_css user.get_username %}">
@@ -103,6 +104,7 @@ InvenTree
<script type='text/javascript' src="{% static 'script/bootstrap/bootstrap-table-filter-control.js' %}"></script>
<!-- <script type='text/javascript' src="{% static 'script/bootstrap/filter-control-utils.js' %}"></script> -->
<script type="text/javascript" src="{% static 'fullcalendar/main.js' %}"></script>
<script type="text/javascript" src="{% static 'script/select2/select2.js' %}"></script>
<script type='text/javascript' src="{% static 'script/moment.js' %}"></script>
@@ -121,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>
+25
View File
@@ -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();
})
}