Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(signage): custom switch page and enhanced admin dashboard
- Loading branch information
Showing
12 changed files
with
330 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from django import forms | ||
|
||
|
||
class SetSignCustomSwitchTimeForm(forms.Form): | ||
_selected_action = forms.CharField(widget=forms.MultipleHiddenInput) | ||
action = forms.CharField(widget=forms.HiddenInput, initial="set_custom_switch_time_for_all_signs") | ||
time = forms.TimeField( | ||
widget=forms.TimeInput(format="%H:%M"), | ||
input_formats=("%H:%M",), | ||
help_text="Time at which to switch to the custom page for the Sign. Leave blank to clear. Example: 16:30", | ||
required=False, | ||
) |
38 changes: 38 additions & 0 deletions
38
intranet/apps/signage/migrations/0018_auto_20230422_2219.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Generated by Django 3.2.17 on 2023-04-23 02:19 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('signage', '0017_sign_latest_heartbeat_time'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='page', | ||
options={'ordering': ['order', 'name']}, | ||
), | ||
migrations.AddField( | ||
model_name='sign', | ||
name='custom_switch_page', | ||
field=models.ForeignKey(blank=True, help_text='Switch to this page at the custom switch time', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='custom_page_signs', to='signage.page'), | ||
), | ||
migrations.AddField( | ||
model_name='sign', | ||
name='custom_switch_time', | ||
field=models.DateTimeField(blank=True, help_text='Switch to a custom page at this time', null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='sign', | ||
name='default_page', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='default_signs', to='signage.page'), | ||
), | ||
migrations.AlterField( | ||
model_name='sign', | ||
name='lock_page', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='locked_signs', to='signage.page'), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
intranet/apps/signage/migrations/0019_alter_sign_custom_switch_time.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2.17 on 2023-04-23 02:44 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('signage', '0018_auto_20230422_2219'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='sign', | ||
name='custom_switch_time', | ||
field=models.TimeField(blank=True, help_text='Switch to the custom page at this time', null=True), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
intranet/apps/signage/migrations/0020_sign_custom_switch_page_lock.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2.17 on 2023-04-23 18:12 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('signage', '0019_alter_sign_custom_switch_time'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='sign', | ||
name='custom_switch_page_lock', | ||
field=models.BooleanField(default=False, help_text='Lock the custom page when switching to it'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.