Skip to content

Commit

Permalink
feat: add feature flag for category of funding activity search field
Browse files Browse the repository at this point in the history
  • Loading branch information
sanason committed Dec 15, 2023
1 parent 2fefe6c commit b8c63a0
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 7 deletions.
1 change: 1 addition & 0 deletions packages/client/public/deploy-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ window.APP_CONFIG.featureFlags = {
myProfileEnabled: true,
newTerminologyEnabled: true,
newGrantsDetailPageEnabled: false,
categoryOfFundingActivitySearchFieldEnabled: true,
};
7 changes: 5 additions & 2 deletions packages/client/src/components/Modals/GrantDetailsLegacy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div v-for="field in dialogFields" :key="field">
<p><span class="data-label">{{ titleize(field) }}:</span> {{ selectedGrant[field] }}</p>
</div>
<p>
<p v-if="categoryOfFundingActivitySearchFieldEnabled">
<span class="data-label">Category of Funding Activity:</span>
{{ selectedGrant['funding_activity_categories']?.join(', ') }}
</p>
Expand Down Expand Up @@ -95,7 +95,7 @@
<script>
import { mapActions, mapGetters } from 'vuex';
import { debounce } from 'lodash';
import { newTerminologyEnabled } from '@/helpers/featureFlags';
import { newTerminologyEnabled, categoryOfFundingActivitySearchFieldEnabled } from '@/helpers/featureFlags';
import { titleize } from '../../helpers/form-helpers';

export default {
Expand Down Expand Up @@ -191,6 +191,9 @@ export default {
newTerminologyEnabled() {
return newTerminologyEnabled();
},
categoryOfFundingActivitySearchFieldEnabled() {
return categoryOfFundingActivitySearchFieldEnabled();
},
},
watch: {
async selectedGrant() {
Expand Down
8 changes: 6 additions & 2 deletions packages/client/src/components/Modals/SearchPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
:clearable="false"
/>
</b-form-group>
<b-form-group
<b-form-group v-if="categoryOfFundingActivitySearchFieldEnabled"
id="category-of-funding-activity-group"
label="Category of Funding Activity"
label-for="category-of-funding-activity"
Expand Down Expand Up @@ -235,8 +235,9 @@
import { mapActions, mapGetters } from 'vuex';
import { VBToggle } from 'bootstrap-vue';
import { billOptions } from '@/helpers/constants';
import { DateTime } from 'luxon';
import { billOptions } from '@/helpers/constants';
import { categoryOfFundingActivitySearchFieldEnabled } from '@/helpers/featureFlags';
const defaultCriteria = {
includeKeywords: null,
Expand Down Expand Up @@ -329,6 +330,9 @@ export default {
invalidTitleFeedback() {
return 'Search Title is required';
},
categoryOfFundingActivitySearchFieldEnabled() {
return categoryOfFundingActivitySearchFieldEnabled();
},
},
methods: {
...mapActions({
Expand Down
4 changes: 4 additions & 0 deletions packages/client/src/helpers/featureFlags/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ export function newTerminologyEnabled() {
export function newGrantsDetailPageEnabled() {
return getFeatureFlags().newGrantsDetailPageEnabled === true;
}

export function categoryOfFundingActivitySearchFieldEnabled() {
return getFeatureFlags().categoryOfFundingActivitySearchFieldEnabled === true;
}
3 changes: 2 additions & 1 deletion terraform/prod.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ website_datadog_rum_options = {
website_feature_flags = {
myProfileEnabled = false,
newTerminologyEnabled = false,
newGrantsDetailPageEnabled = false
newGrantsDetailPageEnabled = false,
categoryOfFundingActivitySearchFieldEnabled = false
}

// ECS Cluster
Expand Down
3 changes: 2 additions & 1 deletion terraform/sandbox.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ website_managed_waf_rules = {}
website_feature_flags = {
myProfileEnabled = true,
newTerminologyEnabled = false,
newGrantsDetailPageEnabled = false
newGrantsDetailPageEnabled = false,
categoryOfFundingActivitySearchFieldEnabled = false
}

// ECS Cluster
Expand Down
3 changes: 2 additions & 1 deletion terraform/staging.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ website_datadog_rum_options = {
website_feature_flags = {
myProfileEnabled = true,
newTerminologyEnabled = true,
newGrantsDetailPageEnabled = false
newGrantsDetailPageEnabled = false,
categoryOfFundingActivitySearchFieldEnabled = false
}

// ECS Cluster
Expand Down

0 comments on commit b8c63a0

Please sign in to comment.