Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
seeker25 committed Nov 29, 2024
1 parent c9202a8 commit d5644e1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
4 changes: 2 additions & 2 deletions auth-web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auth-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth-web",
"version": "2.6.116",
"version": "2.6.117",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
filled
hide-details
:placeholder="'Date'"
:value="dateRangeSelected ? 'Custom' : '1 Year'"
:value="datePickerValue"
@click:clear="dateRangeReset++"
/>
</div>
Expand Down Expand Up @@ -183,7 +183,7 @@ export default defineComponent({
}
// date picker stuff
const dateRangeReset = ref(0)
const dateRangeReset = ref(1)
const dateRangeSelected = ref(false)
const showDatePicker = ref(false)
const scrollToDatePicker = async () => {
Expand Down Expand Up @@ -259,6 +259,16 @@ export default defineComponent({
return CommonUtils.formatDisplayDate(date, 'MMMM DD, YYYY')
}
const datePickerValue = computed(() => {
if (dateRangeSelected.value) {
return 'Custom'
}
if (transactions.filters.filterPayload.dateFilter.isDefault) {
return '1 Year'
}
return ''
})
return {
InvoiceStatus,
clearFilters,
Expand All @@ -278,7 +288,8 @@ export default defineComponent({
scrollToDatePicker,
updateDateRange,
loadTransactionList,
getInvoiceStatus
getInvoiceStatus,
datePickerValue
}
}
})
Expand Down
4 changes: 3 additions & 1 deletion auth-web/src/composables/transactions-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ export const useTransactions = () => {
transactions.filters.filterPayload = {
dateFilter: {
startDate: moment().subtract(1, 'year').format('YYYY-MM-DD'),
endDate: moment().add(1, 'day').format('YYYY-MM-DD')
endDate: moment().add(1, 'day').format('YYYY-MM-DD'),
isDefault: true
}
}
transactions.filters.isActive = true
}

return {
Expand Down
1 change: 1 addition & 0 deletions auth-web/src/models/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface TransactionFilter {
dateFilter?: {
startDate: string
endDate: string
isDefault: boolean
},
details?: string,
folioNumber?: string,
Expand Down

0 comments on commit d5644e1

Please sign in to comment.