-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 698 - extend rebate expiry (#716)
* feat: 698 - extend rebate expiry * update migration
- Loading branch information
Showing
9 changed files
with
206 additions
and
9 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
25 changes: 25 additions & 0 deletions
25
django/api/migrations/0021_expiredgoelectricrebateapplication.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,25 @@ | ||
# Generated by Django 4.0.9 on 2024-06-03 17:31 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api', '0020_alter_goelectricrebateapplication_drivers_licence'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='ExpiredGoElectricRebateApplication', | ||
fields=[ | ||
], | ||
options={ | ||
'ordering': ['-modified'], | ||
'proxy': True, | ||
'indexes': [], | ||
'constraints': [], | ||
}, | ||
bases=('api.goelectricrebateapplication',), | ||
), | ||
] |
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,17 @@ | ||
from django import forms | ||
from api.models.go_electric_rebate_application import ExpiredGoElectricRebateApplication | ||
from api.constants import ONE_THOUSAND_REBATE, TWO_THOUSAND_REBATE, FOUR_THOUSAND_REBATE | ||
|
||
|
||
class ExtendExpiryForm(forms.ModelForm): | ||
rebate_amount = forms.ChoiceField( | ||
choices=[ | ||
(ONE_THOUSAND_REBATE.ZEV_MAX.value, ONE_THOUSAND_REBATE.ZEV_MAX.value), | ||
(TWO_THOUSAND_REBATE.ZEV_MAX.value, TWO_THOUSAND_REBATE.ZEV_MAX.value), | ||
(FOUR_THOUSAND_REBATE.ZEV_MAX.value, FOUR_THOUSAND_REBATE.ZEV_MAX.value), | ||
] | ||
) | ||
|
||
class Meta: | ||
model = ExpiredGoElectricRebateApplication | ||
fields = "__all__" |
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
4 changes: 4 additions & 0 deletions
4
django/api/templates/admin/api/expiredgoelectricrebateapplication/change_form.html
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,4 @@ | ||
{% extends "admin/api/change_form.html" %} {% load i18n admin_urls jazzmin %} {% | ||
get_jazzmin_ui_tweaks as jazzmin_ui %} | ||
|
||
{% block itvr_subheader %}{% endblock %} |
5 changes: 5 additions & 0 deletions
5
django/api/templates/admin/api/expiredgoelectricrebateapplication/change_list.html
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,5 @@ | ||
{% extends "admin/api/change_list.html" %} | ||
{% load i18n admin_urls static admin_list jazzmin %} {% | ||
|
||
{% block content_title %} Extend Expiry Dates {% endblock %} | ||
{% block itvr_subtitle %} Extend Expiry Dates {% endblock %} |
26 changes: 26 additions & 0 deletions
26
django/api/templates/admin/api/expiredgoelectricrebateapplication/submit_line.html
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,26 @@ | ||
{% extends "admin/submit_line.html" %} | ||
{% load i18n admin_urls jazzmin %} | ||
{% get_jazzmin_ui_tweaks as jazzmin_ui %} | ||
{% load static %} | ||
{% block submit-row %} | ||
<!-- <script src="{% static 'edit_dl_handler.js' %}"></script> --> | ||
<div class="card card-primary card-outline"> | ||
<div class="card-header"> | ||
<h3 class="card-title"> | ||
<em class="fas fa-edit"></em> | ||
{% trans 'Actions' %} | ||
</h3> | ||
</div> | ||
<div class="card-body"> | ||
<div class="form-group"> | ||
<input | ||
type="submit" | ||
class="btn {{ jazzmin_ui.button_classes.danger }} form-control" | ||
value="Extend Expiry Date By 30 Days From Today" | ||
name="extend_expiry_date" | ||
id="extend_expiry_date" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |