Skip to content

Commit c647fd2

Browse files
committed
- Include BenevolenceType option to show or hide Financial Info to BenevolenceRequestDetail
1 parent f7555b5 commit c647fd2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Rock.JavaScript.Obsidian.Blocks/src/Finance/BenevolenceRequestDetail/viewPanel.partial.obs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@
8787
</div>
8888
</div>
8989

90-
<BenevolenceResultsList @update:requestResults="onResultsListUpdate"
90+
<BenevolenceResultsList v-if="isShowingFinancialInfo"
91+
@update:requestResults="onResultsListUpdate"
9192
:modelValue="entity"
9293
:isEditable="props.isEditable"
9394
:options="props.options" />
@@ -450,13 +451,19 @@
450451
return !hasEmail.value && !hasPhone.value && !hasAddress.value;
451452
});
452453

453-
const benevolenceRequestTypeLavaDetails = props.options.benevolenceRequestTypes?.find(requestType => requestType.id === entity.benevolenceTypeId)?.lavaDetails ?? "";
454+
const requestType = props.options.benevolenceRequestTypes?.find(requestType => requestType.id === entity.benevolenceTypeId);
455+
456+
const benevolenceRequestTypeLavaDetails = requestType?.lavaDetails ?? "";
454457
const hasRequestLavaTemplateDetails = computed((): boolean => {
455458
return benevolenceRequestTypeLavaDetails !== null
456459
&& benevolenceRequestTypeLavaDetails !== undefined
457460
&& benevolenceRequestTypeLavaDetails !== "";
458461
});
459462

463+
const isShowingFinancialInfo = computed((): boolean => {
464+
return requestType?.options?.isShowingFinancialResults ?? false;
465+
});
466+
460467
/** Whether or not there are any attributes to display. */
461468
const hasAttributes = computed((): boolean => {
462469
return Object.keys(attributes.value).length > 0;

0 commit comments

Comments
 (0)