Skip to content

Commit

Permalink
Merge pull request #782 from odisha-muktasoft/UCEM-765-4
Browse files Browse the repository at this point in the history
Ucem 765 4
  • Loading branch information
Tulika-eGov authored Nov 6, 2024
2 parents 8d6693e + 64b9a4b commit f08f60e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@egovernments/digit-ui-module-contracts": "0.4.15",
"@egovernments/digit-ui-module-measurement":"0.2.18",
"@egovernments/digit-ui-module-estimate": "0.4.22",
"@egovernments/digit-ui-module-masters": "0.4.22",
"@egovernments/digit-ui-module-masters": "0.4.23",
"@egovernments/digit-ui-module-project": "0.4.17",
"@egovernments/digit-ui-module-expenditure": "0.4.27",
"@egovernments/digit-ui-customisation-mukta": "0.2.14",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-module-masters",
"version": "0.4.22",
"version": "0.4.23",
"description": "Masters Module UI",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const requestCriteria = {
let validateCheckPass = true
const countSkillsInCategory = {}
formData.skillDetails_skill.map(skill => {
countSkillsInCategory[skill.code.split('.')[1]] = countSkillsInCategory[skill.code.split('.')[1]] ? countSkillsInCategory[skill.code.split('.')[1]] + 1 : 1
countSkillsInCategory[skill.code.split('.')[1]?skill.code.split('.')[1]:skill.code.split('.')[0]] = countSkillsInCategory[skill.code.split('.')[1]?skill.code.split('.')[1]:skill.code.split('.')[0]] ? countSkillsInCategory[skill.code.split('.')[1]?skill.code.split('.')[1]:skill.code.split('.')[0]] + 1 : 1
});

if(Object.keys(countSkillsInCategory)?.length <= 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const updateWageSeekerFormDefaultValues = async ({configs, isModify, sess
const getSkillsToUpdate = (formData, wageSeekerDataFromAPI) => {
let updatedSkills = formData?.skillDetails_skill
//added code field in existing skills to find difference
let existingSkills = wageSeekerDataFromAPI?.individual?.skills?.map(item => ({ ...item, code : `${item?.level}.${item?.type}`}))
let existingSkills = wageSeekerDataFromAPI?.individual?.skills?.map(item => ({ ...item, code : `${item?.level}`}))

let set1 = new Set(updatedSkills.map(({ code }) => code))
let set2 = new Set(existingSkills.map(({ code }) => code))
Expand All @@ -85,8 +85,10 @@ const getSkillsToUpdate = (formData, wageSeekerDataFromAPI) => {
})

let skillsTobeAdded = extraSkillsTobeAdded?.map(item => {
const separator = item?.code.includes('.') ? '.' : '_';
const [level, type] = item?.code.split(separator);
//const separator = item?.code.includes('.') ? '.' : '_';
//const [level, type] = item?.code.split(separator);
const level = item?.code;
const type = item?.code;
return { level, type };
});
let skillsTobeRemoved = extraSkillsTobeRemoved?.map(item => ({ ...item, isDeleted: true }))
Expand Down Expand Up @@ -180,14 +182,15 @@ export const getWageSeekerUpdatePayload = ({formData, wageSeekerDataFromAPI, ten
}

export const getWageSeekerSkillDeletePayload = ({wageSeekerDataFromAPI, tenantId, skillsTobeRemoved}) => {
let Individual = {}
let Individual = {...wageSeekerDataFromAPI?.Individual}
Individual.id = wageSeekerDataFromAPI?.Individual?.id
Individual.tenantId = tenantId
Individual.name = wageSeekerDataFromAPI?.Individual?.name
Individual.rowVersion = parseInt(wageSeekerDataFromAPI?.Individual?.rowVersion)
Individual.skills = skillsTobeRemoved
Individual.additionalFields = wageSeekerDataFromAPI?.Individual?.additionalFields
return {
Individual
Individual
}
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/micro-ui/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@egovernments/digit-ui-module-contracts": "0.4.15",
"@egovernments/digit-ui-module-measurement":"0.2.18",
"@egovernments/digit-ui-module-estimate": "0.4.22",
"@egovernments/digit-ui-module-masters": "0.4.22",
"@egovernments/digit-ui-module-masters": "0.4.23",
"@egovernments/digit-ui-module-project": "0.4.17",
"@egovernments/digit-ui-module-expenditure": "0.4.27",
"@egovernments/digit-ui-customisation-mukta": "0.2.14",
Expand Down

0 comments on commit f08f60e

Please sign in to comment.