diff --git a/strr-base-web/app/utils/date.ts b/strr-base-web/app/utils/date.ts index ab595133b..62bae8518 100644 --- a/strr-base-web/app/utils/date.ts +++ b/strr-base-web/app/utils/date.ts @@ -55,16 +55,19 @@ export function dateToStringPacific (date: Date | string, format = 'y-MM-dd') { /** * Calculates the number of full days remaining until a given end date. + * If isElapsed is true, it calculates the number of full days since the end date. * * @param end - The ISO datestring for the end value. * @returns The number of full days remaining until the end date. */ -export function dayCountdown (end: string): number { +export function dayCountdown (end: string, isElapsed: boolean = false): number { const startDate = DateTime.utc() // get current utc date const endDate = DateTime.fromISO(end, { setZone: true }).toUTC() // get given end date and convert to utc // get difference in days https://moment.github.io/luxon/#/math?id=diffs - const diff = endDate.diff(startDate, 'days').toObject().days + const diff = isElapsed + ? startDate.diff(endDate, 'days').toObject().days ?? 0 + : endDate.diff(startDate, 'days').toObject().days // round difference down return Math.floor(diff) diff --git a/strr-examiner-web/app/components/ApplicationDetails.vue b/strr-examiner-web/app/components/ApplicationDetails.vue deleted file mode 100644 index 8f936047a..000000000 --- a/strr-examiner-web/app/components/ApplicationDetails.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - diff --git a/strr-examiner-web/app/components/ApplicationDetailsSection.vue b/strr-examiner-web/app/components/ApplicationDetailsSection.vue index e1c184ef9..cedec798e 100644 --- a/strr-examiner-web/app/components/ApplicationDetailsSection.vue +++ b/strr-examiner-web/app/components/ApplicationDetailsSection.vue @@ -1,34 +1,17 @@ diff --git a/strr-examiner-web/app/components/ApplicationInfoHeader.vue b/strr-examiner-web/app/components/ApplicationInfoHeader.vue new file mode 100644 index 000000000..9ab456582 --- /dev/null +++ b/strr-examiner-web/app/components/ApplicationInfoHeader.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/strr-examiner-web/app/components/HostDetailsView.vue b/strr-examiner-web/app/components/HostDetailsView.vue index 470e62fd0..7f616e26c 100644 --- a/strr-examiner-web/app/components/HostDetailsView.vue +++ b/strr-examiner-web/app/components/HostDetailsView.vue @@ -1,116 +1,149 @@