Skip to content

Commit

Permalink
Merge pull request #18 from openimis/develop
Browse files Browse the repository at this point in the history
MERGING RELEASE branches
  • Loading branch information
delcroip authored May 16, 2023
2 parents a0c8dab + 9f98d32 commit 405c80b
Show file tree
Hide file tree
Showing 8 changed files with 471 additions and 293 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# openIMIS Frontend Template module

**This module will be deprecated and should not be further developed.**

This repository holds the files of the openIMIS Frontend Template module.
It is dedicated to be bootstrap development of [openimis-fe_js](https://github.com/openimis/openimis-fe_js) modules, providing an empty (yet deployable) module.

Expand Down
21 changes: 20 additions & 1 deletion src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const CONTRIBUTION_FULL_PROJECTION = (mm) => [
"payType",
"receipt",
"isPhotoFee",
"validityTo",
"clientMutationId",
`payer${mm.getProjection("payer.PayerPicker.projection")}`,
`policy${mm.getProjection("policy.PolicyPicker.projection")}`,
Expand All @@ -36,6 +37,24 @@ export function fetchPoliciesPremiums(mm, filters) {
return graphql(payload, "CONTRIBUTION_POLICES_PREMIUMS");
}

export function fetchPoliciesPremiums2(mm, policyUuid) {
let filters = [];
if (!!policyUuid) {
filters.push(`uuid: "${policyUuid}"`);
}
let payload = formatPageQueryWithCount("premiumsByPolicies", filters, [
"id",
"uuid",
"payDate",
`payer${mm.getProjection("payer.PayerPicker.projection")}`,
"amount",
"payType",
"receipt",
"isPhotoFee",
]);
return graphql(payload, "CONTRIBUTION_POLICES_PREMIUMS");
}

export function fetchContributionsSummaries(mm, filters) {
let projections = [
"id",
Expand Down Expand Up @@ -99,7 +118,7 @@ export function fetchPolicySummary(mm, policyUuid) {
"id",
"uuid",
"startDate",
"product{name, code}",
"product{name, code, maxInstallments}",
"expiryDate",
"value",
"sumPremiums",
Expand Down
Loading

0 comments on commit 405c80b

Please sign in to comment.