Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing the "Upcoming Closing Dates" Section in Dashboard #3211

Merged
merged 9 commits into from
Jul 17, 2024
Merged
27 changes: 0 additions & 27 deletions packages/client/src/components/ClosingDatesTable.spec.js

This file was deleted.

106 changes: 0 additions & 106 deletions packages/client/src/components/ClosingDatesTable.vue

This file was deleted.

8 changes: 0 additions & 8 deletions packages/client/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ export const routes = [
requiresAuth: true,
},
},
{
path: '/UpcomingClosingDates',
name: 'UpcomingClosingDates',
component: () => import('@/views/UpcomingClosingDatesView.vue'),
meta: {
requiresAuth: true,
},
},
{
path: '/grants',
name: 'grants',
Expand Down
4 changes: 0 additions & 4 deletions packages/client/src/views/DashboardView.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,5 @@ describe('DashboardView.vue', () => {
const noRecentActivityMessage = wrapper.find('#noRecentActivityMessage');
expect(noRecentActivityMessage.text()).toContain('Your team has no recent activity.');
});
it('should show the no recent activity message', () => {
const noRecentActivityMessage = wrapper.find('#noUpcomingCloseDates');
expect(noRecentActivityMessage.text()).toContain('Your team has no upcoming close dates.');
});
});
});
51 changes: 1 addition & 50 deletions packages/client/src/views/DashboardView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<div class="px-5">
<b-container fluid>
<div class="row">
<b-col cols="1" />
<b-col>
<b-card>
<div class="card-block text-left">
Expand Down Expand Up @@ -40,43 +39,6 @@
</div>
</b-card>
</b-col>
<b-col>
<b-card>
<div class="card-block text-left">
<h2 class="card-title gutter-title2 row h4">
Upcoming Closing Dates
</h2>
<span
v-if="!closestGrants?.length"
id="noUpcomingCloseDates"
class="gutter-title2 row"
>Your {{ newTerminologyEnabled ? 'team' : 'agency' }} has no upcoming close dates.</span>
</div>
<ClosingDatesTable
:closest-grants="closestGrants"
:on-row-clicked="onRowClicked"
:on-row-selected="onRowSelected"
:danger-threshold="selectedTeam?.danger_threshold"
:warning-threshold="selectedTeam?.warning_threshold"
/>
<div v-if="totalUpcomingGrants > 3">
<b-row align-v="center">
<b-navbar
toggleable="sm py-0"
bg-transparent
class="gutter-upcoming row"
>
<b-link
class="nav-link active"
to="UpcomingClosingDates"
>
See All Upcoming
</b-link>
</b-navbar>
</b-row>
</div>
</b-card>
</b-col>
<b-col cols="1" />
</div>
</b-container>
Expand All @@ -95,11 +57,10 @@ import { mapActions, mapGetters } from 'vuex';
import resizableTableMixin from '@/mixin/resizableTable';
import GrantDetailsLegacy from '@/components/Modals/GrantDetailsLegacy.vue';
import ActivityTable from '@/components/ActivityTable.vue';
import ClosingDatesTable from '@/components/ClosingDatesTable.vue';
import { newTerminologyEnabled, newGrantsDetailPageEnabled } from '@/helpers/featureFlags';

export default {
components: { ClosingDatesTable, ActivityTable, GrantDetailsLegacy },
components: { ActivityTable, GrantDetailsLegacy },
mixins: [resizableTableMixin],
data() {
return {
Expand All @@ -112,9 +73,7 @@ export default {
computed: {
...mapGetters({
totalInterestedGrants: 'grants/totalInterestedGrants',
totalUpcomingGrants: 'grants/totalUpcomingGrants',
selectedTeam: 'users/selectedAgency',
closestGrants: 'grants/closestGrants',
grantsInterested: 'grants/grantsInterested',
currentGrant: 'grants/currentGrant',
}),
Expand All @@ -132,7 +91,6 @@ export default {
async selectedGrant() {
if (!this.selectedGrant) {
await this.fetchGrantsInterested();
await this.fetchClosestGrants();
}
},
currentGrant() {
Expand All @@ -148,11 +106,9 @@ export default {
...mapActions({
fetchGrantsInterested: 'grants/fetchGrantsInterested',
fetchGrantDetails: 'grants/fetchGrantDetails',
fetchClosestGrants: 'grants/fetchClosestGrants',
}),
async setup() {
this.fetchGrantsInterested({ perPage: this.perPage, currentPage: this.currentPage });
this.fetchClosestGrants({ perPage: this.perPageClosest, currentPage: this.currentPage });
},
async onRowSelected(items) {
const [row] = items;
Expand All @@ -178,11 +134,6 @@ export default {
margin-top: -8px;
margin-bottom: -6px;
}
.gutter-upcoming.row {
margin-left: -2px;
margin-top: -8px;
margin-bottom: -6px;
}
.gutter-title1.row {
margin-left: +4px;
}
Expand Down
45 changes: 0 additions & 45 deletions packages/client/src/views/UpcomingClosingDatesView.spec.js

This file was deleted.

Loading
Loading