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

feat: [DHIS2-12615][DHIS2-12616][DHIS2-15906] Add new Relationship (Feature-parity) #3401

Merged
merged 133 commits into from
Oct 24, 2023
Merged
Changes from 1 commit
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
ac4b6fe
feat: [DHIS2-12362] add widget relationship component
jasminenguyennn Jan 21, 2022
7d9f3de
feat: first draft to New TEI relationship
eirikhaugstulen Jan 21, 2022
07b42fa
feat: [DHIS2-12362] add relationship widget
jasminenguyennn Jan 25, 2022
c85b9d0
feat: [DHIS2-12362] compute tei data
jasminenguyennn Jan 26, 2022
11a2bf7
feat: [DHIS2-12362] add relationship in redux
jasminenguyennn Jan 27, 2022
9362c1a
feat: [DHIS2-12362] minor change
jasminenguyennn Jan 27, 2022
f15bf33
Merge remote-tracking branch 'origin/master' into eh/feat/new-tei-rel…
eirikhaugstulen Jan 30, 2022
addbe06
feat: first draft to new TEI relationshiphandler
eirikhaugstulen Jan 31, 2022
98445b7
fix: add constraint to state
eirikhaugstulen Feb 3, 2022
e944f77
Merge branch 'master' into DHIS2-12362
jasminenguyennn Feb 4, 2022
748fecc
fix: [DHIS2-12362] minor update
jasminenguyennn Feb 4, 2022
56c568b
fix: [DHIS2-12362] minor update
jasminenguyennn Feb 4, 2022
6b6d0dd
fix: [DHIS2-12362] add event relationshio
jasminenguyennn Feb 4, 2022
2fb5620
fix: [DHIS2-12362] update tet
jasminenguyennn Feb 7, 2022
279f639
chore: [DHIS2-12362] cleanup fromconstraint
jasminenguyennn Feb 8, 2022
d8a1e89
fix: [DHIS2-12362] fix flow
jasminenguyennn Feb 8, 2022
6ff4edb
fix: [DHIS2-12362] fix flow
jasminenguyennn Feb 8, 2022
fd5c535
fix: [DHIS2-12362] fix flow
jasminenguyennn Feb 8, 2022
5faa3e1
fix: [DHIS2-12362] fix flow
jasminenguyennn Feb 8, 2022
65b9ecc
fix: [DHIS2-12362] minor fix
jasminenguyennn Feb 8, 2022
a9492bd
fix: [DHIS2-12362] minor fix
jasminenguyennn Feb 8, 2022
6650036
fix: [DHIS2-12362] minor fix
jasminenguyennn Feb 8, 2022
8f3a652
Merge branch 'master' into DHIS2-12362
jasminenguyennn Feb 14, 2022
02a2802
chore: [DHIS2-12362] update relationships
jasminenguyennn Feb 14, 2022
e9b4a70
chore: [DHIS2-12362] update relationships
jasminenguyennn Feb 14, 2022
eb7239d
fix: [DHIS2-12362] fix flow
jasminenguyennn Feb 14, 2022
ffb7b2f
feat: [DHIS2-12362] add relationship to view enrollment event
jasminenguyennn Feb 15, 2022
4abf6ef
Merge remote-tracking branch 'origin/master' into eh/feat/new-tei-rel…
eirikhaugstulen Feb 17, 2022
d0b115d
fix: changed object for displaying relationships & breadcrumbs
eirikhaugstulen Feb 18, 2022
d88383a
feat: initial layout for linking relationship to existing TEI
eirikhaugstulen Feb 25, 2022
f9dd6e1
fix: close modal on link complete
eirikhaugstulen Feb 25, 2022
7d8b4b7
fix: LGTM
eirikhaugstulen Feb 25, 2022
7c76be0
Merge branch 'master' into DHIS2-12362
jasminenguyennn Mar 2, 2022
88cf85a
Merge branch 'master' into DHIS2-12362
jasminenguyennn Mar 9, 2022
09fa106
Merge branch 'master' into DHIS2-12362
jasminenguyennn Mar 14, 2022
5c66bcd
Merge branch 'master' into DHIS2-12362
jasminenguyennn Mar 20, 2022
363d214
chore: [DHIS2-12362] refactor
jasminenguyennn Mar 23, 2022
6ebc99d
chore: [DHIS2-12362] rename funcs
jasminenguyennn Mar 24, 2022
bdb5562
chore: [DHIS2-12362] use new API
jasminenguyennn Mar 24, 2022
7dd0f93
chore: [DHI2-12362] change type
jasminenguyennn Mar 24, 2022
038ce39
chore: [DHI2-12362] change type
jasminenguyennn Mar 24, 2022
0e43a26
chore: [DHIS2-12362] fix edit event
jasminenguyennn Mar 25, 2022
3b2f70a
Merge branch 'master' into DHIS2-12362
jasminenguyennn Mar 25, 2022
42e6032
Merge branch 'master' into DHIS2-12362
jasminenguyennn Apr 6, 2022
72b7df5
chore: [DHIS2-12362] minor change
jasminenguyennn Apr 6, 2022
7f97c0f
fix: [DHIS2-12362] fix combinations
jasminenguyennn Apr 8, 2022
a788cd1
Merge branch 'master' into DHIS2-12362
jasminenguyennn Apr 21, 2022
f309105
chore: [DHIS2-12362] restructure the components
jasminenguyennn Apr 30, 2022
5183509
Merge branch 'master' into DHIS2-12362
jasminenguyennn May 1, 2022
9682ffe
chore: [DHIS2-12362] change await/async loop
jasminenguyennn May 2, 2022
4e55df3
feat: [DHIS2-12377] Event relationship (#2726)
jasminenguyennn May 2, 2022
ab89592
chore: [DHIS2-12362] address review comments
jasminenguyennn May 4, 2022
dbfe1fb
chore: [DHIS2-12362] rename files
jasminenguyennn May 4, 2022
5a7eec4
chore: [DHIS2-12362] minor change
jasminenguyennn May 5, 2022
e92c9b2
feat: [DHIS2-12362] add display fields
jasminenguyennn May 5, 2022
594ca2a
feat: [DHIS2-12362] add display fields
jasminenguyennn May 5, 2022
81672fc
feat: [DHIS2-12362] add display fields
jasminenguyennn May 5, 2022
015c4b3
chore: [DHIS2-12362] minor change
jasminenguyennn May 5, 2022
2d1af84
chore:[DHIS2-12362] update user storage
jasminenguyennn May 10, 2022
6f09736
chore: [DHIS2-12362] minor change
jasminenguyennn May 10, 2022
7efe0ef
chore: [DHIS2-12362] add creation date
jasminenguyennn May 19, 2022
4e21fc4
chore: [DHIS2-12362] update event
jasminenguyennn May 23, 2022
9ae1f0e
Merge branch 'master' into DHIS2-12362
jasminenguyennn May 23, 2022
ef24bc2
chore: [DHIS2-12362] move type def
jasminenguyennn May 23, 2022
3bce665
chore: [DHIS2-12362] move type def
jasminenguyennn May 23, 2022
59e1026
chore: [DHIS2-12362] minor fix
jasminenguyennn May 23, 2022
f3d5d2d
chore: [DHIS2-12362] return all types
jasminenguyennn May 24, 2022
587180c
Merge branch 'master' into DHIS2-12362
jasminenguyennn May 24, 2022
0607b79
chore: [DHIS2-12362] add created relationship date
jasminenguyennn Jun 4, 2022
c68a666
chore: [DHIS2-12362] use display name
jasminenguyennn Jun 9, 2022
a638306
Merge branch 'master' into DHIS2-12362
jasminenguyennn Jun 27, 2022
419ae84
fix: [DHIS2-13202] fix occurred at label in stages
jasminenguyennn Jul 15, 2022
9202d4d
Merge branch 'master' into DHIS2-12362
jasminenguyennn Jul 20, 2022
8c1fd1e
fix: [DHIS2-12362] cypress
jasminenguyennn Jul 20, 2022
6d2e029
Merge branch 'master' into DHIS2-12362
jasminenguyennn Jul 22, 2022
17836e2
Merge branch 'master' into DHIS2-12362
jasminenguyennn Jul 26, 2022
9886119
Merge branch 'master' into DHIS2-12362
jasminenguyennn Jul 28, 2022
5fd15f8
fix: [DHIS2-12362] convert date
jasminenguyennn Aug 2, 2022
c689e4d
chore: [DHIS2-12362] UI improvements
jasminenguyennn Aug 29, 2022
63bc722
chore: [DHIS2-12362] minor
jasminenguyennn Aug 29, 2022
83cbc52
fix: [DHIS2-12362] fix flow
jasminenguyennn Aug 29, 2022
8d099c0
Merge branch 'master' into DHIS2-12362
jasminenguyennn Aug 29, 2022
d184468
chore: [DHIS2-12362] sort most recent event
jasminenguyennn Aug 30, 2022
bd912e1
Merge branch 'master' into DHIS2-12362
jasminenguyennn Aug 30, 2022
320259c
feat: [DHIS2-12372] view linked record (#2780)
jasminenguyennn Aug 30, 2022
067e1a5
Merge branch 'master' into DHIS2-12362
jasminenguyennn Sep 2, 2022
b60af3f
Merge branch 'DHIS2-12362' of work:dhis2/capture-app into DHIS2-12362
jasminenguyennn Sep 2, 2022
ee5b02f
Merge branch 'master' into DHIS2-12362
jasminenguyennn Sep 12, 2022
2c91cc6
chore: useMetadataQuery utility method
JoakimSM Dec 8, 2022
a87bb76
chore: useIndexedDB utility method
JoakimSM Dec 8, 2022
0f8ece0
feat: changed a hook to implement the custom hooks
eirikhaugstulen Dec 13, 2022
7fa38a2
fix: added error handling to the useIndexedDBQuery
eirikhaugstulen Dec 21, 2022
25cec6e
feat: init relationships
JoakimSM Jun 16, 2022
a36e9f7
Merge remote-tracking branch 'origin/eh/TECH/TECH-1486_UtilityHookFor…
JoakimSM Jan 5, 2023
67b827a
feat: continue relationships
JoakimSM Jan 5, 2023
bc15dc4
Merge branch 'master' into DHIS2-12615
JoakimSM Apr 18, 2023
1e76f2f
fix: postmerge
JoakimSM Apr 18, 2023
7a5cf96
Merge remote-tracking branch 'origin/DHIS2-12362' into DHIS2-12615
eirikhaugstulen Apr 24, 2023
dc5b88d
chore: temp
eirikhaugstulen Apr 27, 2023
43a9c57
feat: first iteration of Relationships Widget
eirikhaugstulen May 2, 2023
7685ec3
fix: code cleanup
eirikhaugstulen May 3, 2023
c3331c8
chore: review comments
eirikhaugstulen May 23, 2023
518456a
chore: review comments
eirikhaugstulen May 26, 2023
4ad1bea
Merge remote-tracking branch 'origin/master' into eh/feat/DHIS2-12362…
eirikhaugstulen May 26, 2023
5c49e06
feat: [DHIS2-12362] display relationships
JoakimSM Jun 5, 2023
7ebdb59
Merge remote-tracking branch 'origin/master' into eh/feat/DHIS2-12615…
eirikhaugstulen Jul 21, 2023
c14d0eb
feat: add search functionality
eirikhaugstulen Jul 22, 2023
cb5aa6c
Merge remote-tracking branch 'origin/eh/epics/DHIS2-12361_TeiRelation…
eirikhaugstulen Jul 28, 2023
350d2ac
chore: flow
eirikhaugstulen Jul 28, 2023
438d2cd
feat: [DHIS2-12362][DHIS2-12455] View and filter relationships (#3241)
eirikhaugstulen Jul 28, 2023
4b88893
Merge remote-tracking branch 'origin/eh/epics/DHIS2-12361_TeiRelation…
eirikhaugstulen Jul 28, 2023
30c77c4
chore: flow
eirikhaugstulen Jul 28, 2023
14a2530
chore: temp
eirikhaugstulen Aug 4, 2023
72ac535
feat: create new tei from relationship
eirikhaugstulen Aug 14, 2023
261d312
fix: change program in search
eirikhaugstulen Aug 14, 2023
cb84cf4
chore: upgrade cacheVersion
eirikhaugstulen Aug 15, 2023
c7eafe7
fix: chore remove success snackbar
eirikhaugstulen Aug 24, 2023
abdf53c
Merge remote-tracking branch 'origin/master' into eh/feat/DHIS2-12616…
eirikhaugstulen Sep 11, 2023
f943323
fix: pr-review
eirikhaugstulen Sep 11, 2023
04e93ed
fix: pr-review
eirikhaugstulen Sep 12, 2023
ebe355d
Merge remote-tracking branch 'origin/master' into eh/epics/DHIS2-1236…
eirikhaugstulen Sep 12, 2023
bc933b6
Merge remote-tracking branch 'origin/eh/epics/DHIS2-12361_TeiRelation…
eirikhaugstulen Sep 12, 2023
07766e1
chore: typo
eirikhaugstulen Sep 12, 2023
d978ed8
chore: loading spinner
eirikhaugstulen Sep 12, 2023
f880324
chore: pr-reviews
eirikhaugstulen Sep 28, 2023
a93bef9
Merge remote-tracking branch 'origin/master' into eh/feat/DHIS2-12616…
eirikhaugstulen Oct 3, 2023
6016b85
feat: [DHIS2-15906] Add form features for relationship
eirikhaugstulen Oct 17, 2023
afb28dc
docs: [DHIS2-12361] Relationships widget (#3430)
eirikhaugstulen Oct 20, 2023
3ab905d
Merge remote-tracking branch 'origin/master' into eh/feat/DHIS2-12616…
eirikhaugstulen Oct 20, 2023
c9f297b
chore: bump cache version
eirikhaugstulen Oct 22, 2023
d677101
Merge remote-tracking branch 'origin/master' into eh/feat/DHIS2-12616…
eirikhaugstulen Oct 23, 2023
b0b54e5
Merge remote-tracking branch 'origin/master' into eh/feat/DHIS2-12616…
eirikhaugstulen Oct 24, 2023
7bb1032
chore: change tests
eirikhaugstulen Oct 24, 2023
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
Prev Previous commit
Next Next commit
chore: [DHIS2-12362] rename funcs
jasminenguyennn committed Mar 24, 2022
commit 6ebc99dc9ce3483f6cbc6374bcf493bc8f38d76a
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ import {
useProgramStages,
useOrganisationUnit,
useRuleEffects,
useRelationships,
useTeiRelationships,
} from './hooks';
import { buildUrlQueryString, useLocationQuery } from '../../../../utils/routing';
import { deleteEnrollment, updateTeiDisplayName } from '../EnrollmentPage.actions';
@@ -35,7 +35,7 @@ export const EnrollmentPageDefault = () => {
} = useCommonEnrollmentDomainData(teiId, enrollmentId, programId);
const { error: programMetaDataError, programMetadata } = useProgramMetadata(programId);
const stages = useProgramStages(program, programMetadata?.programStages);
const { relationships: teiRelationships } = useRelationships(teiId, relationships);
const { relationships: teiRelationships } = useTeiRelationships(teiId, relationships);

if (programMetaDataError || enrollmentsError) {
log.error(errorCreator('Enrollment page could not be loaded')(
Original file line number Diff line number Diff line change
@@ -5,5 +5,5 @@ export { useHideWidgetByRuleLocations } from './useHideWidgetByRuleLocations';
export { useProgramStages } from './useProgramStages';
export { useOrganisationUnit } from './useOrganisationUnit';
export { useRuleEffects } from './useRuleEffects';
export { useRelationships } from './useRelationships';
export { useTeiRelationships } from './useTeiRelationships';
export type { UseRuleEffectsInput } from './useRuleEffects.types';
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@ import type {
InputRelationship, RelationshipData,
} from '../../../common/EnrollmentOverviewDomain/useCommonEnrollmentDomainData';
import { getDisplayFieldsFromAPI, getBaseConfigHeaders } from './constants';
import { TrueOnlyField } from '../../../../FormFields/New';

const convertAttributes = (attributes, displayFields, options) => displayFields.map((item) => {
if (item.convertValue) {
@@ -111,7 +110,7 @@ const getRelationshipAttributes = (
};


export const useRelationships = (teiId: string, relationships?: Array<InputRelationship>) => {
export const useTeiRelationships = (teiId: string, relationships?: Array<InputRelationship>) => {
const [relationshipsByType, setRelationshipByType] = useState([]);

const computeData = useCallback(async () => {
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ import { useProgramInfo } from '../../../hooks/useProgramInfo';
import { pageMode, pageStatuses } from './EnrollmentEditEventPage.constants';
import { EnrollmentEditEventPageComponent } from './EnrollmentEditEventPage.component';
import { useWidgetDataFromStore } from '../EnrollmentAddEvent/hooks';
import { useHideWidgetByRuleLocations, useRelationships } from '../Enrollment/EnrollmentPageDefault/hooks';
import { useHideWidgetByRuleLocations, useTeiRelationships } from '../Enrollment/EnrollmentPageDefault/hooks';
import { buildUrlQueryString, useLocationQuery } from '../../../utils/routing';
import { deleteEnrollment } from '../Enrollment/EnrollmentPage.actions';
import { buildEnrollmentsAsOptions } from '../../ScopeSelector';
@@ -52,7 +52,7 @@ export const EnrollmentEditEventPage = () => {
? (pageStatus = pageStatuses.DEFAULT)
: (pageStatus = pageStatuses.MISSING_DATA);
} else pageStatus = pageStatuses.WITHOUT_ORG_UNIT_SELECTED;
const { relationships: teiRelationships } = useRelationships(teiId, relationships);
const { relationships: teiRelationships } = useTeiRelationships(teiId, relationships);

return (
<EnrollmentEditEventPageComponent