Skip to content

Commit

Permalink
Include Draft Type in Update Draft (bcgov#2105)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron-eyds authored Feb 12, 2025
1 parent d294325 commit d251da7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ppr-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ppr-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ppr-ui",
"version": "3.3.13",
"version": "3.3.14",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
6 changes: 5 additions & 1 deletion ppr-ui/src/utils/mhr-api-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,11 @@ export async function createMhrDraft (type: APIMhrTypes|ApiTransferTypes, draft:
}

// Update an existing draft.
export async function updateMhrDraft (draftId: string, type: APIMhrTypes, draft: any): Promise<MhrDraftIF> {
export async function updateMhrDraft (
draftId: string,
type: APIMhrTypes|ApiTransferTypes,
draft: any
): Promise<MhrDraftIF> {
if (!draftId) {
draft.error = {
category: ErrorCategories.REGISTRATION_SAVE,
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/views/mhrInformation/MhrInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ export default defineComponent({
: getMhrTransferType.value?.transferType
const mhrTransferDraft = getMhrInformation.value.draftNumber
? await updateMhrDraft(getMhrInformation.value.draftNumber, getMhrTransferType.value?.transferType, apiData)
? await updateMhrDraft(getMhrInformation.value.draftNumber, draftType, apiData)
: await createMhrDraft(draftType, apiData)
const newItem: RegTableNewItemI = {
Expand Down

0 comments on commit d251da7

Please sign in to comment.