Skip to content

Commit

Permalink
Merge pull request #1774 from bcgov/1692-tooltips
Browse files Browse the repository at this point in the history
Feat: 1692 tooltips
  • Loading branch information
sam-warren authored Jul 18, 2023
2 parents 1e784f3 + c33261d commit 2ba4145
Show file tree
Hide file tree
Showing 20 changed files with 4,122 additions and 18 deletions.
16 changes: 14 additions & 2 deletions app/data/jsonSchemaForm/emissionIntensityUiSchema.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { emissionsIntentityTooltips } from "./tooltipText";

export const emissionIntensityReportingRequirementUiSchema = {
"ui:order": [
"reportDueDate",
Expand Down Expand Up @@ -54,8 +56,10 @@ export const emissionIntensityReportingRequirementUiSchema = {
isPercentage: true,
numberOfDecimalPlaces: 2,
hideOptional: true,
"ui:tooltip": {
text: emissionsIntentityTooltips.adjustedEmissionsIntensityPerformance,
},
},

calculatedEiPerformance: {
isPercentage: true,
numberOfDecimalPlaces: 2,
Expand All @@ -68,20 +72,28 @@ export const emissionIntensityReportingRequirementUiSchema = {
hideOptional: true,
calculatedValueFormContextProperty:
"paymentPercentageOfPerformanceMilestoneAmount",
"ui:tooltip": {
text: emissionsIntentityTooltips.paymentPercentage,
},
},

actualPerformanceMilestoneAmount: {
"ui:widget": "CalculatedValueWidget",
calculatedValueFormContextProperty: "actualPerformanceMilestoneAmount",
isMoney: true,
hideOptional: true,
"ui:tooltip": {
text: emissionsIntentityTooltips.actualPerformanceMilestoneAmount,
},
},
holdbackAmountToDate: {
"ui:widget": "CalculatedValueWidget",
calculatedValueFormContextProperty: "holdbackAmountToDate",
isMoney: true,
hideOptional: true,
renamedId: "maximumPerformanceMilestoneAmount",
"ui:tooltip": {
text: emissionsIntentityTooltips.holdbackAmountToDate,
},
},
dateSentToCsnr: {
"ui:widget": "DateWidget",
Expand Down
34 changes: 34 additions & 0 deletions app/data/jsonSchemaForm/fundingParameterEPUiSchema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AdditionalFundingSourcesArrayFieldTemplate from "components/Form/AdditionalFundingSourcesArrayFieldTemplate";
import AnticipatedFundingAmountPerFiscalYearArrayFieldTemplate from "components/Form/AnticipatedFundingAmountByFiscalYearArrayFieldTemplate";
import { fundingTooltips } from "./tooltipText";

export const fundingParameterEPUiSchema = {
"ui:order": [
Expand All @@ -21,26 +22,41 @@ export const fundingParameterEPUiSchema = {
],
totalProjectValue: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.totalProjectValue,
},
isMoney: true,
hideOptional: true,
calculatedValueFormContextProperty: "calculatedTotalProjectValue",
},
maxFundingAmount: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.maxFundingAmount,
},
isMoney: true,
},
provinceSharePercentage: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.provinceSharePercentage,
},
isPercentage: true,
numberOfDecimalPlaces: 2,
},
holdbackPercentage: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.holdbackPercentage,
},
isPercentage: true,
numberOfDecimalPlaces: 2,
},
proponentsSharePercentage: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.proponentsSharePercentage,
},
numberOfDecimalPlaces: 2,
isPercentage: true,
calculatedValueFormContextProperty: "calculatedProponentsSharePercentage",
Expand Down Expand Up @@ -68,6 +84,9 @@ export const fundingParameterEPUiSchema = {
},
proponentCost: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.proponentCost,
},
isMoney: true,
},
contractStartDate: {
Expand All @@ -78,24 +97,36 @@ export const fundingParameterEPUiSchema = {
},
eligibleExpensesToDate: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.eligibleExpensesToDate,
},
calculatedValueFormContextProperty: "calculatedEligibleExpensesToDate",
hideOptional: true,
isMoney: true,
},
grossPaymentsToDate: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.grossPaymentsToDate,
},
calculatedValueFormContextProperty: "calculatedGrossPaymentsToDate",
hideOptional: true,
isMoney: true,
},
holdbackAmountToDate: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.holdbackAmountToDate,
},
calculatedValueFormContextProperty: "calculatedHoldbackAmountToDate",
hideOptional: true,
isMoney: true,
},
netPaymentsToDate: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.netPaymentsToDate,
},
calculatedValueFormContextProperty: "calculatedNetPaymentsToDate",
hideOptional: true,
isMoney: true,
Expand All @@ -111,6 +142,9 @@ export const fundingParameterEPUiSchema = {
amount: {
"ui:title": `Additional Funding Amount`,
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.additionalFundingSourcesAmount,
},
isMoney: true,
},
status: {
Expand Down
19 changes: 19 additions & 0 deletions app/data/jsonSchemaForm/fundingParameterIAUiSchema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AdditionalFundingSourcesArrayFieldTemplate from "components/Form/AdditionalFundingSourcesArrayFieldTemplate";
import AnticipatedFundingAmountPerFiscalYearArrayFieldTemplate from "components/Form/AnticipatedFundingAmountByFiscalYearArrayFieldTemplate";
import { fundingTooltips } from "./tooltipText";

export const fundingParameterIAUiSchema = {
"ui:order": [
Expand All @@ -17,21 +18,33 @@ export const fundingParameterIAUiSchema = {
],
totalProjectValue: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.totalProjectValue,
},
isMoney: true,
hideOptional: true,
calculatedValueFormContextProperty: "calculatedTotalProjectValue",
},
maxFundingAmount: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.maxFundingAmount,
},
isMoney: true,
},
provinceSharePercentage: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.provinceSharePercentage,
},
isPercentage: true,
numberOfDecimalPlaces: 2,
},
proponentsSharePercentage: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.proponentsSharePercentage,
},
numberOfDecimalPlaces: 2,
isPercentage: true,
calculatedValueFormContextProperty: "calculatedProponentsSharePercentage",
Expand Down Expand Up @@ -59,6 +72,9 @@ export const fundingParameterIAUiSchema = {
},
proponentCost: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.proponentCost,
},
isMoney: true,
},
contractStartDate: {
Expand All @@ -85,6 +101,9 @@ export const fundingParameterIAUiSchema = {
amount: {
"ui:title": `Additional Funding Amount`,
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.additionalFundingSourcesAmount,
},
isMoney: true,
},
status: {
Expand Down
Loading

0 comments on commit 2ba4145

Please sign in to comment.