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

Feature branch/training #6316

Merged
merged 115 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
e5a0a30
added and populated new trainingCategoryGroup column
Jonopono123 Jul 12, 2024
36ffb46
Merge pull request #6295 from NMDSdevopsServiceAdm/feat/1460-training…
Jonopono123 Jul 12, 2024
4bd394f
ensure training group data is in correct format for page
Jonopono123 Jul 16, 2024
b8fc0aa
implemented radio buttons in radio button accordion
Jonopono123 Jul 18, 2024
3b338b1
added accordion functionality to new accordion
Jonopono123 Jul 18, 2024
bce7c24
Started adding group accordion component
Jonopono123 Jul 19, 2024
59b8b0e
Resolved toggle on accordion group
Jonopono123 Jul 22, 2024
5b903b7
removed unnecessary logging
Jonopono123 Jul 22, 2024
8eb5a01
Undoing changes to main add-edit page, moving new functionality out t…
Jonopono123 Jul 22, 2024
756d29d
Fixed issue with retreiving values from radio button controls
Jonopono123 Jul 22, 2024
ac11d5e
Fix broken tests
ssrome Jul 23, 2024
1406fa6
Added function in training service to pass the selected category id f…
ssrome Jul 23, 2024
501a9e3
added rudimentary navigation to training category page
Jonopono123 Jul 24, 2024
c5829c9
Merge pull request #6301 from NMDSdevopsServiceAdm/feat/1459-addTrain…
Jonopono123 Jul 24, 2024
f7255ba
Added accordion open/close all functionality
Jonopono123 Jul 24, 2024
aab3c85
Added checkbox, still need to fix styling
Jonopono123 Jul 24, 2024
b9afb1e
Add change link to add training record details
ssrome Jul 25, 2024
835220c
Update radio btn accordion to also pass label
ssrome Jul 25, 2024
456c1f1
Merge pull request #6302 from NMDSdevopsServiceAdm/change-value-sent-…
ssrome Jul 25, 2024
966d3cd
Merge branch 'featureBranch/training' into 1471-training-changes-to-t…
ssrome Jul 25, 2024
5919ec7
Remove unused code in training service
ssrome Jul 25, 2024
f94f5ce
Add clear function for trainingCategorySelectedForTrainingRecord
ssrome Jul 26, 2024
5e21cc2
Add check to training service for category id
ssrome Jul 26, 2024
d105101
Update styling on change link
ssrome Jul 29, 2024
00e7f04
resolved styling on checkbox radio
Jonopono123 Jul 29, 2024
143b780
Add interface to training service
ssrome Jul 29, 2024
3e465c8
Remove repetitive test actions
ssrome Jul 29, 2024
1ba85df
Merge pull request #6304 from NMDSdevopsServiceAdm/1471-training-chan…
ssrome Jul 29, 2024
a0268af
Added accordion arrow icon
Jonopono123 Jul 29, 2024
9f4e07c
Added styling for accordion button
Jonopono123 Jul 29, 2024
b96c726
removed unnecessary styling
Jonopono123 Jul 29, 2024
fed511b
added description to training category accordions
Jonopono123 Jul 30, 2024
3209992
Add select training category page for multiple records
ssrome Jul 30, 2024
9a7e44f
Merge pull request #6308 from NMDSdevopsServiceAdm/feat/1459-addTrain…
Jonopono123 Jul 31, 2024
c2e0412
added tests around radio burron accordion
Jonopono123 Jul 31, 2024
af3f895
Change next route for multiple training records
ssrome Jul 31, 2024
4e4090d
Merge branch 'featureBranch/training' into 1464-training-add-multiple…
ssrome Jul 31, 2024
b7671f2
renamed css class
Jonopono123 Jul 31, 2024
d0bd21b
remove unnecessary references
Jonopono123 Jul 31, 2024
c596fd3
fixed failing tests
Jonopono123 Jul 31, 2024
ad20f1a
removed buttons
Jonopono123 Aug 2, 2024
c4c0dee
updated govuk-frontend package to v4.8.0
Jonopono123 Aug 2, 2024
5668b67
Add directive for select training category
ssrome Aug 2, 2024
bbc2a55
Re-added buttons using new styling
Jonopono123 Aug 5, 2024
ba91509
Fixed arrow funtionality on show/hide all button
Jonopono123 Aug 5, 2024
f3430cd
Add prefill to select training category
ssrome Aug 7, 2024
189de9c
Refactored getCategories function and fixed styling
Jonopono123 Aug 7, 2024
a30ff48
removed unnecessary svg
Jonopono123 Aug 7, 2024
39a72fe
Change styling for add multiple training record details
ssrome Aug 7, 2024
cd70fae
Update how training category selected is set in training service
ssrome Aug 7, 2024
da7df59
Merge branch '1464-training-add-multiple-selection' into 1463-trainin…
ssrome Aug 7, 2024
1906872
Added training categories resolver. Refactored training category service
Jonopono123 Aug 7, 2024
645cfd2
removed empty test
Jonopono123 Aug 7, 2024
bd33cdb
refactored toggle show/hide all functionality
Jonopono123 Aug 8, 2024
12e4901
Merge pull request #6311 from NMDSdevopsServiceAdm/feat/1459-addTrain…
Jonopono123 Aug 8, 2024
be7b75e
Merge branch 'featureBranch/training' into 1464-training-add-multiple…
ssrome Aug 8, 2024
37e70f9
applied new styling to benefits accordion
Jonopono123 Aug 8, 2024
c18986b
Remove log
ssrome Aug 9, 2024
129ed7c
Fix failed tests
ssrome Aug 9, 2024
129fce1
Move select training category code into directive
ssrome Aug 9, 2024
fb04cbe
Add clear training category selected in resetState
ssrome Aug 9, 2024
0aa4f5d
Merge branch '1464-training-add-multiple-selection' into 1463-trainin…
ssrome Aug 9, 2024
26e1c91
Remove unused code
ssrome Aug 9, 2024
87f2b32
Merge branch 'featureBranch/training' into 1463-training-add-multiple…
ssrome Aug 9, 2024
c242413
Merge branch 'featureBranch/training' into 1464-training-add-multiple…
ssrome Aug 9, 2024
51621d4
Open accordian of prefilled training category on return to page
ssrome Aug 13, 2024
83b0842
Merge branch '1464-training-add-multiple-selection' into 1463-trainin…
ssrome Aug 13, 2024
70ab990
Add clear training category on cancel
ssrome Aug 13, 2024
fe973f2
Fix failing tests
ssrome Aug 13, 2024
9cfec98
Merge branch '1464-training-add-multiple-selection' into 1463-trainin…
ssrome Aug 13, 2024
c077cd8
Add logic for change to select staff in multiple training records
ssrome Aug 13, 2024
ad4a4f3
Add additional tests
ssrome Aug 14, 2024
184bf41
Merge branch '1464-training-add-multiple-selection' into 1463-trainin…
ssrome Aug 14, 2024
72bbf08
Merge pull request #6310 from NMDSdevopsServiceAdm/1464-training-add-…
ssrome Aug 14, 2024
26d170e
Rename functions and variable in training service
ssrome Aug 14, 2024
5e150fc
Remove used code
ssrome Aug 14, 2024
75e1b86
Merge pull request #6312 from NMDSdevopsServiceAdm/1463-training-add-…
ssrome Aug 14, 2024
8bbd3e7
Merge branch 'main' into featureBranch/training
Jonopono123 Aug 14, 2024
502fd2c
Add change link for select training category, update the submit butto…
kapppa-joe Aug 14, 2024
c16c41d
Hide person count and category in training detail when accessed from …
kapppa-joe Aug 15, 2024
8026ff7
add unit tests to cover changes in select training category component
kapppa-joe Aug 15, 2024
fdbbde6
Add unit test about new change link at summary page
kapppa-joe Aug 15, 2024
727f700
Add unit test about detail page not displaying number of staff and ca…
kapppa-joe Aug 15, 2024
42fe504
Amend logic of button text to avoid breaking test in other child comp…
kapppa-joe Aug 15, 2024
472a850
amend variable name
kapppa-joe Aug 15, 2024
149784d
Add a border line at Training category row to match appearance in sketch
kapppa-joe Aug 15, 2024
c9a084c
fix an unsafe use of in operator
kapppa-joe Aug 15, 2024
1f91131
refactor trainingService, add getter and setter to .selectTraining
kapppa-joe Aug 16, 2024
131f390
minor fix in unit test
kapppa-joe Aug 16, 2024
978a58e
Merge pull request #6314 from NMDSdevopsServiceAdm/1481-training-add-…
kapppa-joe Aug 19, 2024
3aa8b08
Show the mandatory training category in select training category
ssrome Aug 20, 2024
ed1bd15
Show training category on edit training record
ssrome Aug 20, 2024
8125111
Merge pull request #6318 from NMDSdevopsServiceAdm/fix/edit-training-…
ssrome Aug 20, 2024
299c6d6
Add check to clear selected category at beginning of add training record
ssrome Aug 20, 2024
9084183
Merge pull request #6320 from NMDSdevopsServiceAdm/fix/clear-selected…
ssrome Aug 20, 2024
9cf622d
Merge branch 'main' into featureBranch/training
ssrome Aug 20, 2024
304a2ab
Add styling change to only show header menu button on small screens
ssrome Aug 21, 2024
d0700b3
Merge pull request #6322 from NMDSdevopsServiceAdm/fix/menu-in-header
ssrome Aug 21, 2024
9943080
Add parseInt for string category ids in queryParam
ssrome Aug 21, 2024
a3bd9f9
Remove detectChanges from test
ssrome Aug 21, 2024
81e8d2f
Add spacing above cta on select staff
ssrome Aug 21, 2024
d54994b
Merge pull request #6326 from NMDSdevopsServiceAdm/fix/populate-categ…
ssrome Aug 22, 2024
c5d48a7
Add second error message to the select training category
ssrome Aug 22, 2024
3ab8562
Merge pull request #6327 from NMDSdevopsServiceAdm/fix/cta-spacing-mu…
ssrome Aug 22, 2024
9a59596
Merge branch 'main' into featureBranch/training
ssrome Aug 22, 2024
882a0e0
Merge branch 'featureBranch/training' into fix/validation-on-select-t…
ssrome Aug 22, 2024
5d28f90
Change accordion component appearance when error happens, also auto …
ssrome Aug 22, 2024
68ee283
Fixed issues with show/hide all text
Jonopono123 Aug 22, 2024
0a60061
fixed failing tests, removed unnecessary log, made setter public
Jonopono123 Aug 22, 2024
5648aff
Merge pull request #6329 from NMDSdevopsServiceAdm/fix/validation-on-…
ssrome Aug 22, 2024
fc342f5
Added tests to grouped accordion show/hide all functionality
Jonopono123 Aug 23, 2024
3fc23b6
refactored accordion component
Jonopono123 Aug 23, 2024
eba08d1
Merge branch 'featureBranch/training' into bug/1494-show-hide-accordi…
Jonopono123 Aug 23, 2024
c311950
Merge pull request #6330 from NMDSdevopsServiceAdm/bug/1494-show-hide…
Jonopono123 Aug 27, 2024
9d430e7
Merge branch 'main' into featureBranch/training
kapppa-joe Aug 28, 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
28 changes: 28 additions & 0 deletions backend/migrations/20240711142204-addTrainingGroupsEnum.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
'use strict';

const table = { tableName: 'TrainingCategories', schema: 'cqc' };

/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up (queryInterface, Sequelize) {
return queryInterface.sequelize.transaction((transaction) => {
queryInterface.addColumn(table, 'TrainingCategoryGroup', {
type: Sequelize.DataTypes.ENUM,
values: [
'Care skills and knowledge',
'Health and safety in the workplace',
'IT, digital and data in the workplace',
'Specific conditions and disabilities',
'Staff development',
],
transaction
});
})
},

async down (queryInterface) {
return queryInterface.sequelize.transaction((transaction) => {
queryInterface.removeColumn(table, 'TrainingCategoryGroup', {transaction});
})
}
};
94 changes: 94 additions & 0 deletions backend/migrations/20240711151423-setTrainingGroupCategories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
'use strict';
const models = require('../server/models/index');

const careSkills = [8,21,24,25,27,28,29,32,33,12,16,7,13,30,1,41];
const healthAndSafety = [14,17,18,19,20,9,42];
const digitalAndData = [6,43,44,45,46,47,48];
const specificConditions = [10,23,31,15,11,26,2,35,34,38,39,40];
const staffDevelopment = [22,3,4,36,5];


/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up (queryInterface, Sequelize) {
return queryInterface.sequelize.transaction(async (transaction) => {
await models.workerTrainingCategories.update(
{
trainingCategoryGroup: 'Care skills and knowledge',
},
{
where: {
id: { [Sequelize.Op.in]: careSkills }
}
},
{ transaction }
);

await models.workerTrainingCategories.update(
{
trainingCategoryGroup: 'Health and safety in the workplace',
},
{
where: {
id: { [Sequelize.Op.in]: healthAndSafety }
}
},
{ transaction }
);

await models.workerTrainingCategories.update(
{
trainingCategoryGroup: 'IT, digital and data in the workplace',
},
{
where: {
id: { [Sequelize.Op.in]: digitalAndData }
}
},
{ transaction }
);

await models.workerTrainingCategories.update(
{
trainingCategoryGroup: 'Specific conditions and disabilities',
},
{
where: {
id: { [Sequelize.Op.in]: specificConditions }
}
},
{ transaction }
);

await models.workerTrainingCategories.update(
{
trainingCategoryGroup: 'Staff development',
},
{
where: {
id: { [Sequelize.Op.in]: staffDevelopment }
}
},
{ transaction }
);
})
},

async down (queryInterface, Sequelize) {
return queryInterface.sequelize.transaction(async (transaction) => {
await models.workerTrainingCategories.update(
{
trainingCategoryGroup: null,
},
{
where: {
trainingCategoryGroup: {
[Sequelize.Op.ne]: null
}
}
},
{ transaction }
);
});
}
};
Loading
Loading