From 9b62c36127d50a722d6c26835b20cd5b79b516ca Mon Sep 17 00:00:00 2001 From: Grady Berry Ward Date: Sun, 21 Jan 2024 22:04:58 -0700 Subject: [PATCH 1/2] Fixes Minor Holdings Date Bugs (#155) --- cmd/server/pactasrv/portfolio.go | 7 +++++++ frontend/components/form/FieldHeader.vue | 2 +- .../inputs/{HoldingDate.vue => HoldingsDate.vue} | 0 frontend/components/portfolio/Editor.vue | 8 ++++++++ frontend/lang/en.json | 4 +++- frontend/pages/upload.vue | 2 +- 6 files changed, 20 insertions(+), 3 deletions(-) rename frontend/components/inputs/{HoldingDate.vue => HoldingsDate.vue} (100%) diff --git a/cmd/server/pactasrv/portfolio.go b/cmd/server/pactasrv/portfolio.go index b93f5a2..41adde6 100644 --- a/cmd/server/pactasrv/portfolio.go +++ b/cmd/server/pactasrv/portfolio.go @@ -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))) } diff --git a/frontend/components/form/FieldHeader.vue b/frontend/components/form/FieldHeader.vue index d7a2d18..5289171 100644 --- a/frontend/components/form/FieldHeader.vue +++ b/frontend/components/form/FieldHeader.vue @@ -66,7 +66,7 @@ const helpTextTextClass = computed(() => helpTextExpanded.value ? 'mb-2' : 'h-0'
{{ props.helpText }} diff --git a/frontend/components/inputs/HoldingDate.vue b/frontend/components/inputs/HoldingsDate.vue similarity index 100% rename from frontend/components/inputs/HoldingDate.vue rename to frontend/components/inputs/HoldingsDate.vue diff --git a/frontend/components/portfolio/Editor.vue b/frontend/components/portfolio/Editor.vue index 05bb713..db5b55e 100644 --- a/frontend/components/portfolio/Editor.vue +++ b/frontend/components/portfolio/Editor.vue @@ -40,6 +40,14 @@ const evs = computed({ auto-resize /> + + + { label="Holdings Date" help-text="The holdings date for the portfolio" > - From 8b1a5afdbc48e60032fb2d974e9126b9f20be2a3 Mon Sep 17 00:00:00 2001 From: Grady Berry Ward Date: Mon, 22 Jan 2024 08:37:22 -0700 Subject: [PATCH 2/2] Improves Nav Organization (#154) --- frontend/components/standard/Avatar.vue | 20 ++++ frontend/components/standard/Nav.vue | 129 +++++++++++++++++++++--- frontend/lang/en.json | 5 +- frontend/plugins/primevue.ts | 2 + 4 files changed, 141 insertions(+), 15 deletions(-) create mode 100644 frontend/components/standard/Avatar.vue diff --git a/frontend/components/standard/Avatar.vue b/frontend/components/standard/Avatar.vue new file mode 100644 index 0000000..b5f8623 --- /dev/null +++ b/frontend/components/standard/Avatar.vue @@ -0,0 +1,20 @@ + + + diff --git a/frontend/components/standard/Nav.vue b/frontend/components/standard/Nav.vue index cb2d0e8..7ac8b7c 100644 --- a/frontend/components/standard/Nav.vue +++ b/frontend/components/standard/Nav.vue @@ -1,5 +1,6 @@ + + diff --git a/frontend/lang/en.json b/frontend/lang/en.json index 53ae04a..4805e5f 100644 --- a/frontend/lang/en.json +++ b/frontend/lang/en.json @@ -267,7 +267,10 @@ "Home": "Portfolio Analysis Tool", "My Data": "My Data", "Sign In": "Sign In", - "Sign Out": "Sign Out" + "Sign Out": "Sign Out", + "Account": "Account", + "Audit Logs": "Audit Logs", + "Settings": "Settings" }, "components/user/Editor": { "The name that will be associated with": "The name that will be associated with ", diff --git a/frontend/plugins/primevue.ts b/frontend/plugins/primevue.ts index 6353731..bb77250 100644 --- a/frontend/plugins/primevue.ts +++ b/frontend/plugins/primevue.ts @@ -22,6 +22,7 @@ import Textarea from 'primevue/textarea' import Tooltip from 'primevue/tooltip' import TriStateCheckbox from 'primevue/tristatecheckbox' import Message from 'primevue/message' +import Menu from 'primevue/menu' import MultiSelect from 'primevue/multiselect' import OverlayPanel from 'primevue/overlaypanel' import ProgressSpinner from 'primevue/progressspinner' @@ -48,6 +49,7 @@ export default defineNuxtPlugin(({ vueApp }) => { vueApp.component('PVInputText', InputText) vueApp.component('PVInputSwitch', InputSwitch) vueApp.component('PVMessage', Message) + vueApp.component('PVMenu', Menu) vueApp.component('PVMultiSelect', MultiSelect) vueApp.component('PVOverlayPanel', OverlayPanel) vueApp.component('PVProgressSpinner', ProgressSpinner)