Skip to content

Commit

Permalink
Merge pull request #60 from IntersectMBO/qa
Browse files Browse the repository at this point in the history
From QA To PreProd
  • Loading branch information
nebojsact authored Dec 25, 2024
2 parents 0303db3 + 40d1911 commit 16bec6a
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 13 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish-to-npm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and publish new version of @intersect.mbo/pdf-ui package
run-name: Publish by @${{ github.actor }}

on:
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: pdf-ui

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
scope: "@intersect.mbo"

- name: Install dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
6 changes: 2 additions & 4 deletions backend/src/api/poll-vote/controllers/poll-vote.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ module.exports = createCoreController(
async create(ctx) {
const { data } = ctx?.request?.body;
const { vote_result: voteResult, poll_id: pollId } = data;

const user = ctx?.state?.user;

if (!user) {
return ctx.badRequest(null, 'User is required');
}
Expand Down Expand Up @@ -51,7 +49,7 @@ module.exports = createCoreController(
user_id: user?.id
},
{
poll_Id: pollId
poll_id: pollId
}
]}
})
Expand Down Expand Up @@ -261,4 +259,4 @@ module.exports = createCoreController(
}
},
})
);
);
6 changes: 5 additions & 1 deletion backend/src/api/poll/controllers/poll.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ module.exports = createCoreController('api::poll.poll', ({ strapi }) => ({
{
return ctx.badRequest(null, 'User is not owner of this proposal');
}

const currentActivePool = await strapi.entityService.findMany("api::poll.poll",{filters:{$and:[{proposal_id:data.proposal_id},{is_poll_active:true}]},limit:1});
if(currentActivePool.length > 0)
{
return ctx.badRequest(null, 'There is already an active pool for this proposal');
}
const newPool = await strapi.entityService.create("api::poll.poll",{data:data});
return this.transformResponse(newPool);
}
Expand Down
9 changes: 9 additions & 0 deletions pdf-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
As a minor extension, we also keep a semantic version for the `UNRELEASED`
changes.

## [v0.5.6](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.5.6) 2024-12-28
### Added -
### Fixed
= Changed copy on landing page [Issue #2438](https://github.com/IntersectMBO/govtool/issues/2544)

### Changed -
### Removed -


## [v0.5.5](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.5.5) 2024-12-06

### Added -
Expand Down
4 changes: 2 additions & 2 deletions pdf-ui/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 pdf-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@intersect.mbo/pdf-ui",
"version": "0.5.5",
"version": "0.5.6",
"description": "Proposal discussion ui",
"main": "./src/index.js",
"exports": {
Expand Down
5 changes: 0 additions & 5 deletions pdf-ui/src/pages/IdentificationPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ const IdentificationPage = ({ handleLogin }) => {
alignItems={'center'}
>
<Box textAlign={'center'} width={'100%'}>
<Typography variant='body1'>
This is a pre-release of the Proposal Discussion section of
Govtool.
</Typography>

<Typography
variant='body1'
sx={{
Expand Down

0 comments on commit 16bec6a

Please sign in to comment.