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

Asl/4495 keeping animal alive #926

Merged
merged 52 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
86da5c8
Content updates for NTS fate of animals question (ref 1 in copy deck)…
edemirbag Jun 14, 2024
98ee741
conditional render and hyperlink done.
farrukhishaq Jun 25, 2024
79311de
conditional render on protocols and mapped nts - protocols correctly.
farrukhishaq Jun 25, 2024
8609ecf
reverting change made in error.
farrukhishaq Jun 26, 2024
182eda4
applied eslint.
farrukhishaq Jun 26, 2024
6181fcf
existing modal using it has no CSS.
farrukhishaq Jul 12, 2024
2002b47
dynaic checkbox text in the modal.
farrukhishaq Jul 12, 2024
7562e13
css styling applied, cancel button is dif from design. Clear function…
farrukhishaq Jul 15, 2024
445ad7d
Content updates for NTS fate of animals question (ref 1 in copy deck)…
edemirbag Jun 14, 2024
e7496ea
conditional render and hyperlink done.
farrukhishaq Jun 25, 2024
1debdf3
conditional render on protocols and mapped nts - protocols correctly.
farrukhishaq Jun 25, 2024
4852e55
reverting change made in error.
farrukhishaq Jun 26, 2024
3cb9f37
applied eslint.
farrukhishaq Jun 26, 2024
e664e17
existing modal using it has no CSS.
farrukhishaq Jul 12, 2024
13e4538
dynaic checkbox text in the modal.
farrukhishaq Jul 12, 2024
c029042
css styling applied, cancel button is dif from design. Clear function…
farrukhishaq Jul 15, 2024
7670c53
apply css from stylesheet.
farrukhishaq Jul 17, 2024
ffed63e
Merge branch 'refs/heads/master' into nts-modal
farrukhishaq Jul 17, 2024
9aadda6
Merge remote-tracking branch 'origin/nts-modal' into nts-modal
farrukhishaq Jul 17, 2024
e5474a8
match design.
farrukhishaq Jul 17, 2024
27d19f5
nts-modal work: successfully wrapped Checkbox component.
farrukhishaq Jul 18, 2024
ec7e4cc
complete refactor of checkbox and modal to appear in NTS with CSS. Re…
farrukhishaq Jul 18, 2024
a4cad5e
eslint fix, existing test passing.
farrukhishaq Jul 19, 2024
65bea53
ASL-4495 complete.
farrukhishaq Jul 19, 2024
38f4e61
ASL-4495 complete
farrukhishaq Jul 19, 2024
129ef65
Content updates for NTS fate of animals question (ref 1 in copy deck)…
edemirbag Jun 14, 2024
a209326
conditional render and hyperlink done.
farrukhishaq Jun 25, 2024
7d76a22
conditional render on protocols and mapped nts - protocols correctly.
farrukhishaq Jun 25, 2024
d215a56
reverting change made in error.
farrukhishaq Jun 26, 2024
c227432
applied eslint.
farrukhishaq Jun 26, 2024
f76362f
Merge remote-tracking branch 'origin/ASL/4495-keeping-animal-alive' i…
farrukhishaq Jul 19, 2024
24035f7
Merge branch 'refs/heads/nts-modal' into ASL/4495-keeping-animal-alive
farrukhishaq Jul 19, 2024
0e6dd9d
killing & use-in-other-project clearing nodes successfully.
farrukhishaq Jul 19, 2024
b705279
test stub data fixed as redux state shows.
farrukhishaq Jul 19, 2024
1c64adc
package-lock commit
farrukhishaq Jul 19, 2024
e3aea78
cancel button CSS matched.
farrukhishaq Jul 22, 2024
60d0e8a
Merge remote-tracking branch 'refs/remotes/origin/master' into ASL/44…
farrukhishaq Jul 22, 2024
cd467a5
adding href to elimate WAG2.2 issue.
farrukhishaq Jul 22, 2024
9718341
crawl over all avilable protocols and handle changes based on checkbo…
farrukhishaq Jul 23, 2024
092a945
Merge branch 'refs/heads/master' into ASL/4495-keeping-animal-alive
farrukhishaq Jul 23, 2024
9f5a380
nts checkboxes to use special field set.
farrukhishaq Jul 23, 2024
3022fa2
nts checkboxes to use special field set.
farrukhishaq Jul 23, 2024
9266e88
refactor method to be less expressive.
farrukhishaq Jul 23, 2024
5cf645a
lint applied
farrukhishaq Jul 23, 2024
31c3854
use map over foreach as it safer approach.
farrukhishaq Jul 23, 2024
5196d86
version update in package.json
farrukhishaq Jul 25, 2024
be23e45
lock file commited so the pipleline reads the changes.
farrukhishaq Jul 25, 2024
179f79b
Merge remote-tracking branch 'refs/remotes/origin/master' into ASL/44…
farrukhishaq Jul 25, 2024
bddf404
merge master
farrukhishaq Jul 25, 2024
d185df7
Merge remote-tracking branch 'origin' into ASL/4495-keeping-animal-alive
farrukhishaq Jul 25, 2024
8d9748c
kept alive use not covered in checks.
farrukhishaq Jul 25, 2024
b7dfa17
fixed issue with protocol
farrukhishaq Jul 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions client/helpers/render-fields-in-protocol.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
export const renderFieldsInProtocol = (fateOfAnimals) => {
if (!fateOfAnimals) {
return [];
return [
{'continued-use': {
label: 'Continued use on another protocol in this project',
value: 'continued-use',
reveal: {
name: 'continued-use-relevant-project',
label: 'Please state the relevant protocol.',
type: 'texteditor'
}
}}];
}

const predefinedFields = {
Expand Down Expand Up @@ -66,7 +75,9 @@ export const renderFieldsInProtocol = (fateOfAnimals) => {
fateOfAnimals.includes('used-in-other-projects') ? predefinedFields['continued-use-2'] : null,
fateOfAnimals.includes('set-free') ? predefinedFields['set-free'] : null,
fateOfAnimals.includes('rehomed') ? predefinedFields['rehomed'] : null,
(fateOfAnimals.includes('set-free') || fateOfAnimals.includes('rehomed')) ? predefinedFields['kept-alive'] : null
(fateOfAnimals.includes('set-free') || fateOfAnimals.includes('rehomed')) ||
fateOfAnimals.includes('kept-alive')
? predefinedFields['kept-alive'] : null
];

// Filter out null values
Expand Down
2 changes: 1 addition & 1 deletion client/pages/sections/protocols/protocols.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Protocol extends PureComponent {
const protocolState = this.getProtocolState();
const isActive = this.isActive(protocolState);

const conditionalFateOfAnimalFields = renderFieldsInProtocol(this.props.project['fate-of-animals']);
const conditionalFateOfAnimalFields = renderFieldsInProtocol(this.props.project['fate-of-animals'] ?? 'default');

// Ensure options array exists, and is initialised properly
if (!this.props.sections.fate.fields[0].options) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@asl/projects",
"version": "15.4.5",
"version": "15.5.5",
"description": "ASL PPL prototype",
"main": "client/external.js",
"styles": "assets/scss/projects.scss",
"scripts": {
"test": "npm run test:lint && npm run test:unit",
"test:lint": "eslint . --fix",
"test:lint": "eslint .",
"test:unit": "mocha ./test --recursive --require @babel/register"
},
"repository": {
Expand Down