Skip to content

Commit 16bec6a

Browse files
authored
Merge pull request #60 from IntersectMBO/qa
From QA To PreProd
2 parents 0303db3 + 40d1911 commit 16bec6a

File tree

7 files changed

+52
-13
lines changed

7 files changed

+52
-13
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build and publish new version of @intersect.mbo/pdf-ui package
2+
run-name: Publish by @${{ github.actor }}
3+
4+
on:
5+
workflow_dispatch:
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
defaults:
11+
run:
12+
working-directory: pdf-ui
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: "20"
22+
registry-url: "https://registry.npmjs.org"
23+
scope: "@intersect.mbo"
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
env:
28+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
29+
30+
- name: Publish to npm
31+
run: npm publish
32+
env:
33+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

backend/src/api/poll-vote/controllers/poll-vote.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ module.exports = createCoreController(
1313
async create(ctx) {
1414
const { data } = ctx?.request?.body;
1515
const { vote_result: voteResult, poll_id: pollId } = data;
16-
1716
const user = ctx?.state?.user;
18-
1917
if (!user) {
2018
return ctx.badRequest(null, 'User is required');
2119
}
@@ -51,7 +49,7 @@ module.exports = createCoreController(
5149
user_id: user?.id
5250
},
5351
{
54-
poll_Id: pollId
52+
poll_id: pollId
5553
}
5654
]}
5755
})
@@ -261,4 +259,4 @@ module.exports = createCoreController(
261259
}
262260
},
263261
})
264-
);
262+
);

backend/src/api/poll/controllers/poll.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ module.exports = createCoreController('api::poll.poll', ({ strapi }) => ({
1717
{
1818
return ctx.badRequest(null, 'User is not owner of this proposal');
1919
}
20-
20+
const currentActivePool = await strapi.entityService.findMany("api::poll.poll",{filters:{$and:[{proposal_id:data.proposal_id},{is_poll_active:true}]},limit:1});
21+
if(currentActivePool.length > 0)
22+
{
23+
return ctx.badRequest(null, 'There is already an active pool for this proposal');
24+
}
2125
const newPool = await strapi.entityService.create("api::poll.poll",{data:data});
2226
return this.transformResponse(newPool);
2327
}

pdf-ui/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
As a minor extension, we also keep a semantic version for the `UNRELEASED`
99
changes.
1010

11+
## [v0.5.6](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.5.6) 2024-12-28
12+
### Added -
13+
### Fixed
14+
= Changed copy on landing page [Issue #2438](https://github.com/IntersectMBO/govtool/issues/2544)
15+
16+
### Changed -
17+
### Removed -
18+
19+
1120
## [v0.5.5](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.5.5) 2024-12-06
1221

1322
### Added -

pdf-ui/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pdf-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@intersect.mbo/pdf-ui",
3-
"version": "0.5.5",
3+
"version": "0.5.6",
44
"description": "Proposal discussion ui",
55
"main": "./src/index.js",
66
"exports": {

pdf-ui/src/pages/IdentificationPage/index.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ const IdentificationPage = ({ handleLogin }) => {
1212
alignItems={'center'}
1313
>
1414
<Box textAlign={'center'} width={'100%'}>
15-
<Typography variant='body1'>
16-
This is a pre-release of the Proposal Discussion section of
17-
Govtool.
18-
</Typography>
19-
2015
<Typography
2116
variant='body1'
2217
sx={{

0 commit comments

Comments
 (0)