Skip to content

Commit

Permalink
Merge pull request #62 from TC4Y-777/dev
Browse files Browse the repository at this point in the history
Basic functionalities of Person Page
  • Loading branch information
getwithashish authored Sep 9, 2023
2 parents 57a5a40 + b8b0d67 commit 49aff91
Show file tree
Hide file tree
Showing 4 changed files with 313 additions and 161 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public PersonEntity createOnePerson(PersonMutationInput personMutationInput) {

List<TitheMutationInput> titheInputs = personMutationInput.getTithes();
List<TitheEntity> tithes = new ArrayList<>();
if (titheInputs.size()!=0) {
if (titheInputs!=null && titheInputs.size()!=0) {
tithes = titheQueryService.buildTitheEntities(person, titheInputs);
}
person.setTithes(tithes);
Expand Down
33 changes: 33 additions & 0 deletions Tithe-Vue/src/externalized-data/graphqlMutations.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,39 @@ export const activateFamilyMutation = `mutation activateFamily ($familyId: ID!){
}
`;

// Person Mutations

export const createPersonMutation = `mutation createPerson ($person: PersonMutationInput!){
createOnePerson (person: $person){
personId
personName
}
}
`;

export const deactivatePersonMutation = `mutation removePerson ($personId: ID!){
deactivateOnePerson (personId: $personId){
personId
personName
}
}
`;

export const activatePersonMutation = `mutation activatePerson ($personId: ID!){
activateOnePerson (personId: $personId){
personId
personName
}
}
`;

export const createRelationMutation = `mutation createRelation ($relation: String!){
createOneRelation(relation: $relation){
relationId
relationName
}
}`;

// Address Mutations

export const createStreetMutation = `mutation createNewStreet ($streetName: String!){
Expand Down
9 changes: 9 additions & 0 deletions Tithe-Vue/src/externalized-data/graphqlQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,15 @@ export const personAllPersonListQuery = `query personPageActivePerson ($parishId
}
}`;

export const personAllFamilyListQuery = familyAllFamilyListQuery;

export const personAllRelationListQuery = `query personPageRelations{
getAllRelations{
relationId
relationName
}
}`;

// Address Queries

export const similarStreetListQuery = `query similarStreetList ($streetName: String!){
Expand Down
Loading

0 comments on commit 49aff91

Please sign in to comment.