mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-23 11:16:07 +02:00
set start date to now, use display for State
This commit is contained in:
parent
2b6f2e977e
commit
49324fcf66
3 changed files with 15 additions and 11 deletions
|
@ -284,6 +284,10 @@ function enableRelatedWidgetButtons(changeLink, deleteLink, viewLink, elementPk,
|
||||||
|
|
||||||
// Get the current date in the format YYYY-MM-DD
|
// Get the current date in the format YYYY-MM-DD
|
||||||
var currentDate = new Date().toISOString().split('T')[0];
|
var currentDate = new Date().toISOString().split('T')[0];
|
||||||
|
|
||||||
|
// Default the value of the start date input field to the current date
|
||||||
|
let startDateInput =document.getElementById('start');
|
||||||
|
startDateInput.value = currentDate;
|
||||||
|
|
||||||
// Default the value of the end date input field to the current date
|
// Default the value of the end date input field to the current date
|
||||||
let endDateInput =document.getElementById('end');
|
let endDateInput =document.getElementById('end');
|
||||||
|
@ -294,7 +298,7 @@ function enableRelatedWidgetButtons(changeLink, deleteLink, viewLink, elementPk,
|
||||||
if (exportGrowthReportButton) {
|
if (exportGrowthReportButton) {
|
||||||
exportGrowthReportButton.addEventListener('click', function() {
|
exportGrowthReportButton.addEventListener('click', function() {
|
||||||
// Get the selected start and end dates
|
// Get the selected start and end dates
|
||||||
let startDate = document.getElementById('start').value;
|
let startDate = startDateInput.value;
|
||||||
let endDate = endDateInput.value;
|
let endDate = endDateInput.value;
|
||||||
let exportUrl = document.getElementById('exportLink').dataset.exportUrl;
|
let exportUrl = document.getElementById('exportLink').dataset.exportUrl;
|
||||||
|
|
||||||
|
|
|
@ -382,10 +382,10 @@ class ExportDataTest(TestCase):
|
||||||
"Domain name,Domain type,Agency,Organization name,City,State,AO,"
|
"Domain name,Domain type,Agency,Organization name,City,State,AO,"
|
||||||
"AO email,Submitter,Submitter title,Submitter email,Submitter phone,"
|
"AO email,Submitter,Submitter title,Submitter email,Submitter phone,"
|
||||||
"Security contact email,Status\n"
|
"Security contact email,Status\n"
|
||||||
"adomain10.gov,Federal,Armed Forces Retirement Home,ready\n"
|
"adomain10.gov,Federal,Armed Forces Retirement Home,Ready\n"
|
||||||
"adomain2.gov,Interstate,dnsneeded\n"
|
"adomain2.gov,Interstate,Dns needed\n"
|
||||||
"cdomain1.gov,Federal - Executive,World War I Centennial Commission,ready\n"
|
"cdomain1.gov,Federal - Executive,World War I Centennial Commission,Ready\n"
|
||||||
"ddomain3.gov,Federal,Armed Forces Retirement Home,onhold\n"
|
"ddomain3.gov,Federal,Armed Forces Retirement Home,On hold\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Normalize line endings and remove commas,
|
# Normalize line endings and remove commas,
|
||||||
|
@ -524,11 +524,11 @@ class ExportDataTest(TestCase):
|
||||||
expected_content = (
|
expected_content = (
|
||||||
"Domain name,Domain type,Agency,Organization name,City,"
|
"Domain name,Domain type,Agency,Organization name,City,"
|
||||||
"State,Status,Expiration date\n"
|
"State,Status,Expiration date\n"
|
||||||
"cdomain1.gov,Federal-Executive,World War I Centennial Commission,,,,ready,\n"
|
"cdomain1.gov,Federal-Executive,World War I Centennial Commission,,,,Ready,\n"
|
||||||
"adomain10.gov,Federal,Armed Forces Retirement Home,,,,ready,\n"
|
"adomain10.gov,Federal,Armed Forces Retirement Home,,,,Ready,\n"
|
||||||
"zdomain9.gov,Federal,Armed Forces Retirement Home,,,,deleted,\n"
|
"zdomain9.gov,Federal,Armed Forces Retirement Home,,,,Deleted,\n"
|
||||||
"sdomain8.gov,Federal,Armed Forces Retirement Home,,,,deleted,\n"
|
"sdomain8.gov,Federal,Armed Forces Retirement Home,,,,Deleted,\n"
|
||||||
"xdomain7.gov,Federal,Armed Forces Retirement Home,,,,deleted,\n"
|
"xdomain7.gov,Federal,Armed Forces Retirement Home,,,,Deleted,\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Normalize line endings and remove commas,
|
# Normalize line endings and remove commas,
|
||||||
|
|
|
@ -38,7 +38,7 @@ def write_row(writer, columns, domain_info):
|
||||||
"AO": ao,
|
"AO": ao,
|
||||||
"AO email": domain_info.authorizing_official.email if domain_info.authorizing_official else " ",
|
"AO email": domain_info.authorizing_official.email if domain_info.authorizing_official else " ",
|
||||||
"Security contact email": security_contacts[0].email if security_contacts else " ",
|
"Security contact email": security_contacts[0].email if security_contacts else " ",
|
||||||
"Status": domain_info.domain.state,
|
"Status": domain_info.domain.get_state_display(),
|
||||||
"Expiration date": domain_info.domain.expiration_date,
|
"Expiration date": domain_info.domain.expiration_date,
|
||||||
"Created at": domain_info.domain.created_at,
|
"Created at": domain_info.domain.created_at,
|
||||||
"First ready at": domain_info.domain.first_ready_at,
|
"First ready at": domain_info.domain.first_ready_at,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue