Skip to content

Commit

Permalink
Holdings Date Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gbdubs committed Jan 21, 2024
1 parent 400d11e commit 3d6a0a4
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 3 deletions.
7 changes: 7 additions & 0 deletions cmd/server/pactasrv/portfolio.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ func (s *Server) UpdatePortfolio(ctx context.Context, request api.UpdatePortfoli
if request.Body.Description != nil {
mutations = append(mutations, db.SetPortfolioDescription(*request.Body.Description))
}
if request.Body.PropertyHoldingsDate != nil {
hd, err := conv.HoldingsDateFromOAPI(request.Body.PropertyHoldingsDate)
if err != nil {
return nil, err
}
mutations = append(mutations, db.SetPortfolioPropertyHoldingsDate(hd))
}
if request.Body.PropertyESG != nil {
mutations = append(mutations, db.SetPortfolioPropertyESG(conv.OptionalBoolFromOAPI(*request.Body.PropertyESG)))
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/form/FieldHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const helpTextTextClass = computed(() => helpTextExpanded.value ? 'mb-2' : 'h-0'
<div
v-if="helpTextExists"
:class="helpTextTextClass"
class="overflow-hidden ml-1 text-sm help-text-animate"
class="overflow-hidden text-sm help-text-animate"
>
<slot name="help-text" />
{{ props.helpText }}
Expand Down
File renamed without changes.
8 changes: 8 additions & 0 deletions frontend/components/portfolio/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ const evs = computed({
auto-resize
/>
</FormEditorField>
<FormEditorField
:editor-field="efs.propertyHoldingsDate"
:editor-value="evs.propertyHoldingsDate"
>
<InputsHoldingsDate
v-model:value="evs.propertyHoldingsDate.currentValue"
/>
</FormEditorField>
<FormEditorField
:editor-field="efs.propertyESG"
:editor-value="evs.propertyESG"
Expand Down
4 changes: 3 additions & 1 deletion frontend/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@
"External": "External",
"ExternalHelpText": "If enabled, this portfolio represents external data. If disabled, this portfolio represents internal data.",
"Engagement Strategy": "Engagement Strategy",
"EngagementStrategyHelpText": "If enabled, this portfolio represents engagement strategy data. If disabled, this portfolio represents non-engagement strategy data."
"EngagementStrategyHelpText": "If enabled, this portfolio represents engagement strategy data. If disabled, this portfolio represents non-engagement strategy data.",
"Holdings Date": "Holdings Date",
"HoldingsDateHelpText": "The date that the holdings in this portfolio are being evaluated at."
},
"lib/editor/portfolio_group": {
"Created At": "Created At",
Expand Down
2 changes: 1 addition & 1 deletion frontend/pages/upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ const cleanUpIncompleteUploads = async () => {
label="Holdings Date"
help-text="The holdings date for the portfolio"
>
<InputsHoldingDate
<InputsHoldingsDate
v-model:value="holdingsDate"
:disabled="isProcessing"
/>
Expand Down

0 comments on commit 3d6a0a4

Please sign in to comment.