Skip to content

Commit

Permalink
feat: rename agency status fields (#734) (#794)
Browse files Browse the repository at this point in the history
* feat: rename agency status fields

* feat: rename agency status fields

* feat: update non-award agency status
  • Loading branch information
albertlieyingadrian authored Feb 15, 2023
1 parent 1607f02 commit bd0ab6f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/client/src/components/Modals/GrantDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
<b-form-select-option v-for="code in interestedCodes.interested" :key="code.id" :value="code.id">
{{ code.name }}</b-form-select-option>
</b-form-select-option-group>
<b-form-select-option-group label="Result">
<b-form-select-option-group label="Applied">
<b-form-select-option v-for="code in interestedCodes.result" :key="code.id" :value="code.id">
{{ code.name }}</b-form-select-option>
</b-form-select-option-group>
<b-form-select-option-group label="Rejections">
<b-form-select-option-group label="Not Applying">
<b-form-select-option v-for="code in interestedCodes.rejections" :key="code.id" :value="code.id">
{{ code.name }}</b-form-select-option>
</b-form-select-option-group>
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/views/MyGrants.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<b-tab title="Assigned">
<GrantsTable :showAssignedToAgency="selectedAgencyId"/>
</b-tab>
<b-tab title="Rejected">
<b-tab title="Not Applying">
<GrantsTable :showRejected="true"/>
</b-tab>
<b-tab title="Result">
<b-tab title="Applied">
<GrantsTable :showResult="true"/>
</b-tab>
</b-tabs>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.up = async function (knex) {
await knex('interested_codes').where({ name: 'Applied' }).update({ name: 'Pending' });
await knex('interested_codes').where({ name: 'Awarded' }).update({ name: 'Award' });
await knex('interested_codes').where({ name: 'Rejected' }).update({ name: 'Non-award' });
};

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.down = async function (knex) {
await knex('interested_codes').where({ name: 'Pending' }).update({ name: 'Applied' });
await knex('interested_codes').where({ name: 'Award' }).update({ name: 'Awarded' });
await knex('interested_codes').where({ name: 'Non-award' }).update({ name: 'Rejected' });
};
6 changes: 3 additions & 3 deletions packages/server/seeds/dev/ref/interestedCodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ module.exports = [
id: 11, name: 'Will Support', status_code: 'Interested',
},
{
id: 12, name: 'Applied', status_code: 'Result',
id: 12, name: 'Pending', status_code: 'Result',
},
{
id: 13, name: 'Awarded', status_code: 'Result',
id: 13, name: 'Award', status_code: 'Result',
},
{
id: 14, name: 'Rejected', status_code: 'Result',
id: 14, name: 'Non-award', status_code: 'Result',
},
];

0 comments on commit bd0ab6f

Please sign in to comment.