From 1a581420fa8842ac7d4317bf287448aebecfeea9 Mon Sep 17 00:00:00 2001 From: Joshua Rubingh Date: Mon, 8 Jun 2020 12:01:53 +0200 Subject: [PATCH] Add option to save a form in draft state for further continuation --- .../locale/en/LC_MESSAGES/django.po | 4 +- .../locale/nl/LC_MESSAGES/django.po | 4 +- .../employee/locale/en/LC_MESSAGES/django.po | 2 +- .../employee/locale/nl/LC_MESSAGES/django.po | 2 +- .../hospital/locale/en/LC_MESSAGES/django.po | 2 +- .../hospital/locale/nl/LC_MESSAGES/django.po | 2 +- .../locale/en/LC_MESSAGES/django.po | 2 +- .../locale/nl/LC_MESSAGES/django.po | 2 +- polyclinic_scheduling/apps/schedule/forms.py | 7 +- .../schedule/locale/en/LC_MESSAGES/django.po | 167 +++++++++------- .../schedule/locale/nl/LC_MESSAGES/django.po | 184 ++++++++++-------- .../migrations/0007_auto_20200608_1053.py | 18 ++ polyclinic_scheduling/apps/schedule/models.py | 5 + .../templates/schedule/schedule_list.html | 8 +- .../templates/schedule/schedule_new.html | 43 +++- polyclinic_scheduling/apps/schedule/urls.py | 1 + polyclinic_scheduling/apps/schedule/views.py | 47 +++-- .../locale/en/LC_MESSAGES/django.po | 2 +- .../locale/nl/LC_MESSAGES/django.po | 6 +- .../locale/en/LC_MESSAGES/django.po | 8 +- .../locale/nl/LC_MESSAGES/django.po | 11 +- 21 files changed, 332 insertions(+), 195 deletions(-) create mode 100644 polyclinic_scheduling/apps/schedule/migrations/0007_auto_20200608_1053.py diff --git a/polyclinic_scheduling/apps/RUG_template/locale/en/LC_MESSAGES/django.po b/polyclinic_scheduling/apps/RUG_template/locale/en/LC_MESSAGES/django.po index fedf463..1cc410a 100644 --- a/polyclinic_scheduling/apps/RUG_template/locale/en/LC_MESSAGES/django.po +++ b/polyclinic_scheduling/apps/RUG_template/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 14:11+0000\n" +"POT-Creation-Date: 2020-06-08 11:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -42,7 +42,7 @@ msgstr "" msgid "Welcome at RUG" msgstr "" -#: apps/RUG_template/templates/base.html:85 +#: apps/RUG_template/templates/base.html:83 msgid "Language selection" msgstr "" diff --git a/polyclinic_scheduling/apps/RUG_template/locale/nl/LC_MESSAGES/django.po b/polyclinic_scheduling/apps/RUG_template/locale/nl/LC_MESSAGES/django.po index 1c3f962..7433830 100644 --- a/polyclinic_scheduling/apps/RUG_template/locale/nl/LC_MESSAGES/django.po +++ b/polyclinic_scheduling/apps/RUG_template/locale/nl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 14:11+0000\n" +"POT-Creation-Date: 2020-06-08 11:58+0200\n" "PO-Revision-Date: 2020-05-19 12:05+0200\n" "Last-Translator: Joshua Rubingh \n" "Language-Team: \n" @@ -42,7 +42,7 @@ msgstr "Logouit" msgid "Welcome at RUG" msgstr "Welkom bij de RUG" -#: apps/RUG_template/templates/base.html:85 +#: apps/RUG_template/templates/base.html:83 msgid "Language selection" msgstr "Taal keuze" diff --git a/polyclinic_scheduling/apps/employee/locale/en/LC_MESSAGES/django.po b/polyclinic_scheduling/apps/employee/locale/en/LC_MESSAGES/django.po index 3d7dfe1..5303d1c 100644 --- a/polyclinic_scheduling/apps/employee/locale/en/LC_MESSAGES/django.po +++ b/polyclinic_scheduling/apps/employee/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 14:11+0000\n" +"POT-Creation-Date: 2020-06-08 11:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/polyclinic_scheduling/apps/employee/locale/nl/LC_MESSAGES/django.po b/polyclinic_scheduling/apps/employee/locale/nl/LC_MESSAGES/django.po index 9b2c607..0955064 100644 --- a/polyclinic_scheduling/apps/employee/locale/nl/LC_MESSAGES/django.po +++ b/polyclinic_scheduling/apps/employee/locale/nl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 14:11+0000\n" +"POT-Creation-Date: 2020-06-08 11:58+0200\n" "PO-Revision-Date: 2020-05-15 12:46+0200\n" "Last-Translator: Joshua Rubingh \n" "Language-Team: \n" diff --git a/polyclinic_scheduling/apps/hospital/locale/en/LC_MESSAGES/django.po b/polyclinic_scheduling/apps/hospital/locale/en/LC_MESSAGES/django.po index 55450c5..f94cc0e 100644 --- a/polyclinic_scheduling/apps/hospital/locale/en/LC_MESSAGES/django.po +++ b/polyclinic_scheduling/apps/hospital/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 14:11+0000\n" +"POT-Creation-Date: 2020-06-08 11:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/polyclinic_scheduling/apps/hospital/locale/nl/LC_MESSAGES/django.po b/polyclinic_scheduling/apps/hospital/locale/nl/LC_MESSAGES/django.po index d579638..c9506af 100644 --- a/polyclinic_scheduling/apps/hospital/locale/nl/LC_MESSAGES/django.po +++ b/polyclinic_scheduling/apps/hospital/locale/nl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 14:11+0000\n" +"POT-Creation-Date: 2020-06-08 11:58+0200\n" "PO-Revision-Date: 2020-05-15 12:43+0200\n" "Last-Translator: Joshua Rubingh \n" "Language-Team: \n" diff --git a/polyclinic_scheduling/apps/polyclinic/locale/en/LC_MESSAGES/django.po b/polyclinic_scheduling/apps/polyclinic/locale/en/LC_MESSAGES/django.po index 434b7d6..3a4d7e6 100644 --- a/polyclinic_scheduling/apps/polyclinic/locale/en/LC_MESSAGES/django.po +++ b/polyclinic_scheduling/apps/polyclinic/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 14:11+0000\n" +"POT-Creation-Date: 2020-06-08 11:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/polyclinic_scheduling/apps/polyclinic/locale/nl/LC_MESSAGES/django.po b/polyclinic_scheduling/apps/polyclinic/locale/nl/LC_MESSAGES/django.po index c8f0605..c488206 100644 --- a/polyclinic_scheduling/apps/polyclinic/locale/nl/LC_MESSAGES/django.po +++ b/polyclinic_scheduling/apps/polyclinic/locale/nl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 14:11+0000\n" +"POT-Creation-Date: 2020-06-08 11:58+0200\n" "PO-Revision-Date: 2020-05-15 12:47+0200\n" "Last-Translator: Joshua Rubingh \n" "Language-Team: \n" diff --git a/polyclinic_scheduling/apps/schedule/forms.py b/polyclinic_scheduling/apps/schedule/forms.py index 6c630e2..42f03b9 100644 --- a/polyclinic_scheduling/apps/schedule/forms.py +++ b/polyclinic_scheduling/apps/schedule/forms.py @@ -4,6 +4,7 @@ from django.utils.translation import gettext_lazy as _ from .models import Schedule class ScheduleForm(forms.Form): - name = forms.CharField(label=_('Department name'), help_text=_('Enter a descriptive name for this schedule'), max_length=100) - email = forms.CharField(label=_('Email address for results'), help_text=_('When the job is done, the results will be sent to this email address'), max_length=100) - json = forms.CharField(label=_('Email address for results'), help_text=_('When the job is done, the results will be sent to this email address'), widget=forms.HiddenInput(), strip=True) \ No newline at end of file + name = forms.CharField(label=_('Department name'), help_text=_('Enter a descriptive name for this schedule'), max_length=100) + email = forms.CharField(label=_('Email address for results'), help_text=_('When the job is done, the results will be sent to this email address'), max_length=100) + json = forms.CharField(label=_('JSON form data'), help_text=_('The RAW JSON data of the saved form'), widget=forms.HiddenInput(), strip=True) + status = forms.CharField(label=_('Status'), help_text=_('The status of this schedule.'), max_length=10, widget=forms.HiddenInput() ) \ No newline at end of file diff --git a/polyclinic_scheduling/apps/schedule/locale/en/LC_MESSAGES/django.po b/polyclinic_scheduling/apps/schedule/locale/en/LC_MESSAGES/django.po index 9b82456..f74436f 100644 --- a/polyclinic_scheduling/apps/schedule/locale/en/LC_MESSAGES/django.po +++ b/polyclinic_scheduling/apps/schedule/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 14:11+0000\n" +"POT-Creation-Date: 2020-06-08 11:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,7 +18,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: apps/schedule/admin.py:18 apps/schedule/models.py:68 +#: apps/schedule/admin.py:18 apps/schedule/models.py:75 msgid "Done" msgstr "" @@ -38,113 +38,125 @@ msgstr "" msgid "Enter a descriptive name for this schedule" msgstr "" -#: apps/schedule/forms.py:8 apps/schedule/forms.py:9 +#: apps/schedule/forms.py:8 msgid "Email address for results" msgstr "" -#: apps/schedule/forms.py:8 apps/schedule/forms.py:9 +#: apps/schedule/forms.py:8 msgid "When the job is done, the results will be sent to this email address" msgstr "" -#: apps/schedule/models.py:29 -msgid "schedule" +#: apps/schedule/forms.py:9 +msgid "JSON form data" msgstr "" -#: apps/schedule/models.py:30 -msgid "schedules" +#: apps/schedule/forms.py:9 +msgid "The RAW JSON data of the saved form" msgstr "" -#: apps/schedule/models.py:64 -msgid "New" -msgstr "" - -#: apps/schedule/models.py:65 -msgid "Accepted" -msgstr "" - -#: apps/schedule/models.py:66 -msgid "Processing" -msgstr "" - -#: apps/schedule/models.py:67 -msgid "Processed" -msgstr "" - -#: apps/schedule/models.py:69 -msgid "Invalid" -msgstr "" - -#: apps/schedule/models.py:70 -msgid "Failure" -msgstr "" - -#: apps/schedule/models.py:72 -msgid "Select the employee that is responsible for this schedule request" -msgstr "" - -#: apps/schedule/models.py:74 -#: apps/schedule/templates/schedule/schedule_list.html:13 -msgid "Name" -msgstr "" - -#: apps/schedule/models.py:74 -msgid "Name of the schedule" -msgstr "" - -#: apps/schedule/models.py:75 -msgid "Email address" -msgstr "" - -#: apps/schedule/models.py:75 -msgid "Email address where the results will be sent to." -msgstr "" - -#: apps/schedule/models.py:77 +#: apps/schedule/forms.py:10 apps/schedule/models.py:84 #: apps/schedule/templates/schedule/schedule_list.html:16 msgid "Status" msgstr "" -#: apps/schedule/models.py:77 +#: apps/schedule/forms.py:10 apps/schedule/models.py:84 msgid "The status of this schedule." msgstr "" +#: apps/schedule/models.py:31 +msgid "schedule" +msgstr "" + +#: apps/schedule/models.py:32 +msgid "schedules" +msgstr "" + +#: apps/schedule/models.py:70 +msgid "Draft" +msgstr "" + +#: apps/schedule/models.py:71 +msgid "New" +msgstr "" + +#: apps/schedule/models.py:72 +msgid "Accepted" +msgstr "" + +#: apps/schedule/models.py:73 +msgid "Processing" +msgstr "" + +#: apps/schedule/models.py:74 +msgid "Processed" +msgstr "" + +#: apps/schedule/models.py:76 +msgid "Invalid" +msgstr "" + +#: apps/schedule/models.py:77 +msgid "Failure" +msgstr "" + #: apps/schedule/models.py:79 +msgid "Select the employee that is responsible for this schedule request" +msgstr "" + +#: apps/schedule/models.py:81 +#: apps/schedule/templates/schedule/schedule_list.html:13 +msgid "Name" +msgstr "" + +#: apps/schedule/models.py:81 +msgid "Name of the schedule" +msgstr "" + +#: apps/schedule/models.py:82 +msgid "Email address" +msgstr "" + +#: apps/schedule/models.py:82 +msgid "Email address where the results will be sent to." +msgstr "" + +#: apps/schedule/models.py:86 msgid "Schedule input" msgstr "" -#: apps/schedule/models.py:79 +#: apps/schedule/models.py:86 msgid "The schedule input in JSON format based on the form data" msgstr "" -#: apps/schedule/models.py:81 +#: apps/schedule/models.py:88 msgid "Peregrine JSON output" msgstr "" -#: apps/schedule/models.py:81 +#: apps/schedule/models.py:88 msgid "The results from the Peregrine job in JSON" msgstr "" -#: apps/schedule/models.py:83 +#: apps/schedule/models.py:90 msgid "Peregrine binary output" msgstr "" -#: apps/schedule/models.py:83 +#: apps/schedule/models.py:90 msgid "This is the output in binary format from the Peregrine cluster" msgstr "" -#: apps/schedule/models.py:85 +#: apps/schedule/models.py:92 msgid "Report is send to user" msgstr "" -#: apps/schedule/models.py:85 +#: apps/schedule/models.py:92 msgid "The date and time when the report has sended to the user." msgstr "" -#: apps/schedule/models.py:87 +#: apps/schedule/models.py:94 msgid "Peregrine logging" msgstr "" -#: apps/schedule/models.py:87 +#: apps/schedule/models.py:94 msgid "Here you can see the logging of the Peregrine job." msgstr "" @@ -170,16 +182,33 @@ msgstr "" msgid "Actions" msgstr "" -#: apps/schedule/templates/schedule/schedule_list.html:35 +#: apps/schedule/templates/schedule/schedule_list.html:41 msgid "No schedules available" msgstr "" -#: apps/schedule/templates/schedule/schedule_new.html:5 -#: apps/schedule/templates/schedule/schedule_new.html:6 +#: apps/schedule/templates/schedule/schedule_new.html:7 +#: apps/schedule/templates/schedule/schedule_new.html:16 +msgid "Resume schedule" +msgstr "" + +#: apps/schedule/templates/schedule/schedule_new.html:9 +#: apps/schedule/templates/schedule/schedule_new.html:18 msgid "Clone schedule" msgstr "" -#: apps/schedule/templates/schedule/schedule_new.html:5 -#: apps/schedule/templates/schedule/schedule_new.html:6 +#: apps/schedule/templates/schedule/schedule_new.html:11 +#: apps/schedule/templates/schedule/schedule_new.html:20 msgid "New schedule" msgstr "" + +#: apps/schedule/templates/schedule/schedule_new.html:432 +msgid "Save as draft" +msgstr "" + +#: apps/schedule/templates/schedule/schedule_new.html:434 +msgid "Submit" +msgstr "" + +#: apps/schedule/templates/schedule/schedule_new.html:821 +msgid "and" +msgstr "" diff --git a/polyclinic_scheduling/apps/schedule/locale/nl/LC_MESSAGES/django.po b/polyclinic_scheduling/apps/schedule/locale/nl/LC_MESSAGES/django.po index 126566c..7814230 100644 --- a/polyclinic_scheduling/apps/schedule/locale/nl/LC_MESSAGES/django.po +++ b/polyclinic_scheduling/apps/schedule/locale/nl/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 14:11+0000\n" -"PO-Revision-Date: 2020-05-19 12:07+0200\n" +"POT-Creation-Date: 2020-06-08 11:58+0200\n" +"PO-Revision-Date: 2020-06-08 12:00+0200\n" "Last-Translator: Joshua Rubingh \n" "Language-Team: \n" "Language: nl\n" @@ -18,7 +18,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 2.0.6\n" -#: apps/schedule/admin.py:18 apps/schedule/models.py:68 +#: apps/schedule/admin.py:18 apps/schedule/models.py:75 msgid "Done" msgstr "Klaar" @@ -38,115 +38,125 @@ msgstr "Afdelingsnaam" msgid "Enter a descriptive name for this schedule" msgstr "Voer een beschrijvende naam in voor dit schema" -#: apps/schedule/forms.py:8 apps/schedule/forms.py:9 +#: apps/schedule/forms.py:8 msgid "Email address for results" msgstr "E-mailadres voor resultaten" -#: apps/schedule/forms.py:8 apps/schedule/forms.py:9 +#: apps/schedule/forms.py:8 msgid "When the job is done, the results will be sent to this email address" -msgstr "" -"Als de klus geklaard is, worden de resultaten naar dit e-mailadres gestuurd" +msgstr "Als de klus geklaard is, worden de resultaten naar dit e-mailadres gestuurd" -#: apps/schedule/models.py:29 -msgid "schedule" -msgstr "rooster" +#: apps/schedule/forms.py:9 +msgid "JSON form data" +msgstr "JSON formulier data" -#: apps/schedule/models.py:30 -msgid "schedules" -msgstr "roosters" +#: apps/schedule/forms.py:9 +msgid "The RAW JSON data of the saved form" +msgstr "De rauwe JSON data van het opgeslagen formulier" -#: apps/schedule/models.py:64 -msgid "New" -msgstr "Nieuw" - -#: apps/schedule/models.py:65 -msgid "Accepted" -msgstr "Geaccepteerd" - -#: apps/schedule/models.py:66 -msgid "Processing" -msgstr "Verwerken" - -#: apps/schedule/models.py:67 -msgid "Processed" -msgstr "Verwerkt" - -#: apps/schedule/models.py:69 -msgid "Invalid" -msgstr "Ongeldig" - -#: apps/schedule/models.py:70 -msgid "Failure" -msgstr "Error" - -#: apps/schedule/models.py:72 -msgid "Select the employee that is responsible for this schedule request" -msgstr "" -"Selecteer de medewerker die verantwoordelijk is voor dit roosterverzoek" - -#: apps/schedule/models.py:74 -#: apps/schedule/templates/schedule/schedule_list.html:13 -msgid "Name" -msgstr "Naam" - -#: apps/schedule/models.py:74 -msgid "Name of the schedule" -msgstr "Naam van de rooster" - -#: apps/schedule/models.py:75 -msgid "Email address" -msgstr "E-mailadres" - -#: apps/schedule/models.py:75 -msgid "Email address where the results will be sent to." -msgstr "E-mailadres waar de resultaten naartoe worden gestuurd." - -#: apps/schedule/models.py:77 +#: apps/schedule/forms.py:10 apps/schedule/models.py:84 #: apps/schedule/templates/schedule/schedule_list.html:16 msgid "Status" msgstr "Status" -#: apps/schedule/models.py:77 +#: apps/schedule/forms.py:10 apps/schedule/models.py:84 msgid "The status of this schedule." msgstr "De status van dit rooster." +#: apps/schedule/models.py:31 +msgid "schedule" +msgstr "rooster" + +#: apps/schedule/models.py:32 +msgid "schedules" +msgstr "roosters" + +#: apps/schedule/models.py:70 +msgid "Draft" +msgstr "Concept" + +#: apps/schedule/models.py:71 +msgid "New" +msgstr "Nieuw" + +#: apps/schedule/models.py:72 +msgid "Accepted" +msgstr "Geaccepteerd" + +#: apps/schedule/models.py:73 +msgid "Processing" +msgstr "Verwerken" + +#: apps/schedule/models.py:74 +msgid "Processed" +msgstr "Verwerkt" + +#: apps/schedule/models.py:76 +msgid "Invalid" +msgstr "Ongeldig" + +#: apps/schedule/models.py:77 +msgid "Failure" +msgstr "Error" + #: apps/schedule/models.py:79 +msgid "Select the employee that is responsible for this schedule request" +msgstr "Selecteer de medewerker die verantwoordelijk is voor dit roosterverzoek" + +#: apps/schedule/models.py:81 +#: apps/schedule/templates/schedule/schedule_list.html:13 +msgid "Name" +msgstr "Naam" + +#: apps/schedule/models.py:81 +msgid "Name of the schedule" +msgstr "Naam van de rooster" + +#: apps/schedule/models.py:82 +msgid "Email address" +msgstr "E-mailadres" + +#: apps/schedule/models.py:82 +msgid "Email address where the results will be sent to." +msgstr "E-mailadres waar de resultaten naartoe worden gestuurd." + +#: apps/schedule/models.py:86 msgid "Schedule input" msgstr "Rooster invoer" -#: apps/schedule/models.py:79 +#: apps/schedule/models.py:86 msgid "The schedule input in JSON format based on the form data" msgstr "De rooster invoer in JSON-indeling op basis van de formuliergegevens" -#: apps/schedule/models.py:81 +#: apps/schedule/models.py:88 msgid "Peregrine JSON output" msgstr "Peregrine JSON uitvoer" -#: apps/schedule/models.py:81 +#: apps/schedule/models.py:88 msgid "The results from the Peregrine job in JSON" msgstr "De resultaten van de Peregrine-taak in JSON" -#: apps/schedule/models.py:83 +#: apps/schedule/models.py:90 msgid "Peregrine binary output" msgstr "Peregrine binaire uitvoer" -#: apps/schedule/models.py:83 +#: apps/schedule/models.py:90 msgid "This is the output in binary format from the Peregrine cluster" msgstr "Dit is de uitvoer in binair formaat van het Peregrine-cluster" -#: apps/schedule/models.py:85 +#: apps/schedule/models.py:92 msgid "Report is send to user" msgstr "Rapport is naar gebruiker gestuurd" -#: apps/schedule/models.py:85 +#: apps/schedule/models.py:92 msgid "The date and time when the report has sended to the user." msgstr "De datum en tijd waarop het rapport naar de gebruiker is verzonden." -#: apps/schedule/models.py:87 +#: apps/schedule/models.py:94 msgid "Peregrine logging" msgstr "Peregrine log" -#: apps/schedule/models.py:87 +#: apps/schedule/models.py:94 msgid "Here you can see the logging of the Peregrine job." msgstr "Hier kunt u de logfile van de Peregrine opdracht zien." @@ -172,31 +182,45 @@ msgstr "Rapport" msgid "Actions" msgstr "Acties" -#: apps/schedule/templates/schedule/schedule_list.html:35 +#: apps/schedule/templates/schedule/schedule_list.html:41 msgid "No schedules available" msgstr "Geen roosters beschikbaar" -#: apps/schedule/templates/schedule/schedule_new.html:5 -#: apps/schedule/templates/schedule/schedule_new.html:6 +#: apps/schedule/templates/schedule/schedule_new.html:7 +#: apps/schedule/templates/schedule/schedule_new.html:16 +msgid "Resume schedule" +msgstr "Hervat rooster" + +#: apps/schedule/templates/schedule/schedule_new.html:9 +#: apps/schedule/templates/schedule/schedule_new.html:18 msgid "Clone schedule" msgstr "Dupliceer rooster" -#: apps/schedule/templates/schedule/schedule_new.html:5 -#: apps/schedule/templates/schedule/schedule_new.html:6 +#: apps/schedule/templates/schedule/schedule_new.html:11 +#: apps/schedule/templates/schedule/schedule_new.html:20 msgid "New schedule" msgstr "Nieuwe rooster" +#: apps/schedule/templates/schedule/schedule_new.html:432 +msgid "Save as draft" +msgstr "Sla op als concept" + +#: apps/schedule/templates/schedule/schedule_new.html:434 +msgid "Submit" +msgstr "Verstuur" + +#: apps/schedule/templates/schedule/schedule_new.html:821 +msgid "and" +msgstr "en" + #~ msgid "Running" #~ msgstr "Bezig" #~ msgid "Peregrine input" #~ msgstr "Peregrine invoer" -#~ msgid "" -#~ "This is the translated content from the source for use with Peregrine " -#~ "cluster" -#~ msgstr "" -#~ "Dit is de vertaalde inhoud van de bron voor gebruik met Peregrine-cluster" +#~ msgid "This is the translated content from the source for use with Peregrine cluster" +#~ msgstr "Dit is de vertaalde inhoud van de bron voor gebruik met Peregrine-cluster" #~ msgid "Peregrine accepted" #~ msgstr "Peregrine geaccepteerd" diff --git a/polyclinic_scheduling/apps/schedule/migrations/0007_auto_20200608_1053.py b/polyclinic_scheduling/apps/schedule/migrations/0007_auto_20200608_1053.py new file mode 100644 index 0000000..c7202f6 --- /dev/null +++ b/polyclinic_scheduling/apps/schedule/migrations/0007_auto_20200608_1053.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.6 on 2020-06-08 08:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('schedule', '0006_auto_20200519_1351'), + ] + + operations = [ + migrations.AlterField( + model_name='schedule', + name='status', + field=models.CharField(choices=[('draft', 'Draft'), ('new', 'New'), ('accepted', 'Accepted'), ('processing', 'Processing'), ('processed', 'Processed'), ('done', 'Done'), ('invalid', 'Invalid'), ('failure', 'Failure')], db_index=True, default='new', help_text='The status of this schedule.', max_length=10, verbose_name='Status'), + ), + ] diff --git a/polyclinic_scheduling/apps/schedule/models.py b/polyclinic_scheduling/apps/schedule/models.py index 1a45627..eee822f 100644 --- a/polyclinic_scheduling/apps/schedule/models.py +++ b/polyclinic_scheduling/apps/schedule/models.py @@ -34,6 +34,10 @@ class Schedule(MetaDataModel): class ScheduleStatus(models.TextChoices): """This is a sub class of Schedule which holds all the possible schedule statuses + .. data:: DRAFT + + The schedule is just created but not finished. Schedules in this state can be updated later on. + .. data:: NEW The schedule is just created and waiting to be picked up by the Peregrine scripts. @@ -63,6 +67,7 @@ class Schedule(MetaDataModel): Something when wrong on Peregrine. Look at the logging output of the Peregrine job """ + DRAFT = 'draft', _('Draft') NEW = 'new', _('New') ACCEPTED = 'accepted', _('Accepted') PROCESSING = 'processing', _('Processing') diff --git a/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_list.html b/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_list.html index c6ee250..6bd1e55 100644 --- a/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_list.html +++ b/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_list.html @@ -24,7 +24,13 @@ {{ schedule.updated_at|date:"SHORT_DATETIME_FORMAT" }} {{ schedule.get_status_display }} None - Clone + + {% if schedule.status == 'draft' %} + Resume + {% else %} + Clone + {% endif %} + {% empty %} diff --git a/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_new.html b/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_new.html index 9a41e09..0a49a79 100644 --- a/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_new.html +++ b/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_new.html @@ -2,12 +2,36 @@ {% load i18n %} {% load static %} -{% block title %}{% if form.json.value %}{% trans "Clone schedule" %}{% else %}{% trans "New schedule" %}{% endif %}{% endblock %} -{% block pagetitle %}{% if form.json.value %}{% trans "Clone schedule" %}{% else %}{% trans "New schedule" %}{% endif %}{% endblock %} +{% block title %} + {% if form.status.value == 'draft' %} + {% trans "Resume schedule" %} + {% elif form.json.value %} + {% trans "Clone schedule" %} + {% else %} + {% trans "New schedule" %} + {% endif %} +{% endblock %} +{% block pagetitle %} + {% if form.status.value == 'draft' %} + {% trans "Resume schedule" %} + {% elif form.json.value %} + {% trans "Clone schedule" %} + {% else %} + {% trans "New schedule" %} + {% endif %} +{% endblock %} {% block content %} -
+ +{% if form.status.value == 'draft' %} + +{% else %} + +{% endif %} + + {% csrf_token %} {{ form.json }} + {{ form.status }}

Algemene informatie

Als een afdeling meerdere wachtkamers heeft, vul dan dit formulier meerdere keren in; een keer voor elke groep van behandelkamers die een wachtkamer delen.

@@ -405,7 +429,9 @@


- + + - +