diff --git a/src/features/persons/assignment_group/index.tsx b/src/features/persons/assignment_group/index.tsx index 8f969657d02..3921fb9c095 100644 --- a/src/features/persons/assignment_group/index.tsx +++ b/src/features/persons/assignment_group/index.tsx @@ -1,9 +1,8 @@ -import AssignmentsCheckList from '@components/assignments_checklist'; -import Checkbox from '@components/checkbox'; import { AssignmentGroupType } from './index.types'; import useAssignmentGroup from './useAssignmentGroup'; +import AssignmentsCheckList from '@components/assignments_checklist'; +import Checkbox from '@components/checkbox'; import Tooltip from '@components/tooltip'; -import { useBreakpoints } from '@hooks/index'; const AssignmentGroup = ({ header, @@ -26,16 +25,11 @@ const AssignmentGroup = ({ getTooltipsForAssignmentTitles, } = useAssignmentGroup(male); - const { tablet600Down } = useBreakpoints(); - return ( { > {t('tr_assignments')} - + {assignments.map((assignment) => ( - + + + ))} - + ); }; diff --git a/src/features/persons/button_actions/useButtonActions.tsx b/src/features/persons/button_actions/useButtonActions.tsx index cd648693ab6..daa8af07e1c 100644 --- a/src/features/persons/button_actions/useButtonActions.tsx +++ b/src/features/persons/button_actions/useButtonActions.tsx @@ -71,13 +71,17 @@ const useButtonActions = () => { const handleDisqualifyConfirm = async () => { try { const newPerson = structuredClone(person); + newPerson.person_data.disqualified = { value: true, updatedAt: new Date().toISOString(), }; + personAssignmentsRemove(newPerson); await dbPersonsSave(newPerson); + + setIsDisqualify(false); } catch (error) { await displaySnackNotification({ header: getMessageByCode('error_app_generic-title'), diff --git a/src/locales/en/congregation.json b/src/locales/en/congregation.json index 211546d6a7e..62abea7933e 100644 --- a/src/locales/en/congregation.json +++ b/src/locales/en/congregation.json @@ -453,5 +453,6 @@ "tr_importDataConfirm": "Confirm importing new data", "tr_importDataConfirmDesc": "Select the data you want to import to replace your records in Organized", "tr_importDataCompleted": "Import completed", - "tr_importDataCompletedDesc": "Your data has been imported successfully. Organized app will now reload." + "tr_importDataCompletedDesc": "Your data has been imported successfully. Organized app will now reload.", + "tr_markDisqualifiedTitle": "Mark as disqualified" } diff --git a/src/services/app/persons.ts b/src/services/app/persons.ts index 6729288694c..455e5d7e2e5 100644 --- a/src/services/app/persons.ts +++ b/src/services/app/persons.ts @@ -186,7 +186,7 @@ const personEndActivePrivileges = (person: PersonType) => { export const personAssignmentsRemove = (person: PersonType) => { for (const assignment of person.person_data.assignments) { - if (assignment._deleted === false) { + if (!assignment._deleted) { assignment._deleted = true; assignment.updatedAt = new Date().toISOString(); }