Skip to content

Commit

Permalink
Tracking pull request to merge release-1.56.0 to master (#2088)
Browse files Browse the repository at this point in the history
* update for 1.56.0

* update pr number

* Feat: Credit Agreement Internal Commenting #2063 (#2092)

* Allowing comments to appear if a credit agreement is issued without the option to add more comments

* Cleaning up conditional around displaying comments

* Removing unnecessary check

* Feat: zeva 2061: MY report history wording refinement (#2089)

* feat: adds more information to return message in history

* fix: adds back check for government in history for draft

* fix: adds new 'returned to the supplier' status to condition for displaying create user

* Added logic to capture VINs not issued credits when they are manually unselected by an analyst for the error download. (#2095)

---------

Co-authored-by: JulianForeman <[email protected]>
Co-authored-by: Emily <[email protected]>
  • Loading branch information
3 people authored Jan 4, 2024
1 parent be98e2f commit a248150
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 23 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/dev-build.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## For each release, please update the value of workflow name, branches and PR_NUMBER
## Also update frontend/package.json version

name: Dev Build 1.55.0
name: Dev Build 1.56.0

on:
push:
branches: [ release-1.55.0 ]
branches: [ release-1.56.0 ]
paths:
- frontend/**
- backend/**
Expand All @@ -14,8 +14,8 @@ on:

env:
## The pull request number of the Tracking pull request to merge the release branch to main
PR_NUMBER: 2053
VERSION: 1.55.0
PR_NUMBER: 2088
VERSION: 1.56.0
GIT_URL: https://github.com/bcgov/zeva.git
TOOLS_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools
DEV_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev
Expand All @@ -32,7 +32,7 @@ jobs:
call-unit-test:
uses: ./.github/workflows/unit-test-template.yaml
with:
pr-number: 2053
pr-number: 2088

build:

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-build.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
## For each release, please update the value of workflow name, branches and PR_NUMBER
## Also update frontend/package.json version

name: Release Build 1.55.0
name: Release Build 1.56.0

on:
workflow_dispatch:
workflow_call:

env:
## The pull request number of the Tracking pull request to merge the release branch to main
PR_NUMBER: 2053
VERSION: 1.55.0
PR_NUMBER: 2088
VERSION: 1.56.0
GIT_URL: https://github.com/bcgov/zeva.git
TOOLS_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools
DEV_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev
Expand All @@ -27,7 +27,7 @@ jobs:
call-unit-test:
uses: ./.github/workflows/unit-test-template.yaml
with:
pr-number: 2053
pr-number: 2088

build:

Expand Down
6 changes: 5 additions & 1 deletion backend/api/services/sales_spreadsheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,10 @@ def get_error(content):

if 'WRONG_MODEL_YEAR' in warnings:
error += 'Wrong model year to be issued with compliance report; '

if content.reason is not None:
error += content.reason
error += '; '
return error


Expand Down Expand Up @@ -508,7 +512,7 @@ def create_errors_spreadsheet(submission_id, organization_id, stream):
current_vehicle_col_width = 13

for content in submission_content:
if content.warnings_list is None:
if content.warnings_list is None and content.reason is None:
continue

row += 1
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zeva-frontend",
"version": "1.55.0",
"version": "1.56.0",
"private": true,
"dependencies": {
"@babel/eslint-parser": "^7.19.1",
Expand Down
28 changes: 21 additions & 7 deletions frontend/src/compliance/components/ComplianceHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,30 @@ const ComplianceHistory = (props) => {
if (itemHistory) {
itemHistory.forEach((obj, i) => {
if (['DRAFT'].indexOf(obj.status) >= 0) {
if ((itemHistory[i + 1]?.status === 'SUBMITTED' || itemHistory[i + 1]?.status === 'RETURNED') && (!item.isSupplementary || (itemHistory.supplementalReportId === itemHistory[i + 1].supplementalReportId))) {
if ((itemHistory[i + 1]?.status === 'SUBMITTED' || itemHistory[i + 1]?.status === 'RETURNED')
&& (!item.isSupplementary || (itemHistory.supplementalReportId === itemHistory[i + 1].supplementalReportId))) {
// if the status is draft and the previous status was submitted or returned,
// it was returned to the supplier by the analyst
const actuallyReturned = { ...obj }
actuallyReturned.status = 'RETURNED'
actuallyReturned.status = 'RETURNED TO THE SUPPLIER'
tempHistory.push(actuallyReturned)
} else if ((itemHistory[i + 1]?.status !== 'SUBMITTED' && itemHistory[i + 1]?.status !== 'RETURNED') || user.isGovernment) {
} else if ((itemHistory[i + 1]?.status !== 'SUBMITTED'
&& itemHistory[i + 1]?.status !== 'RETURNED') || user.isGovernment) {
// if the current status is draft but the previous status wasn't submitted or returned
// or if the user is government, it is just a regular draft so pass the obj
tempHistory.push(obj)
}
} else {
tempHistory.push(obj)
}
} else if (['RETURNED'].indexOf(obj.status) >= 0 && itemHistory[i + 1]?.status === 'RECOMMENDED' && user.isGovernment){
const actuallyReturned = { ...obj }
// if the most recent status was recommended, but now it is returned
// that means the director has returned it to the analyst
actuallyReturned.status = 'RETURNED TO THE ANALYST'
tempHistory.push(actuallyReturned)
}
else {
tempHistory.push(obj)
}

})
}
let result = tempHistory
Expand Down Expand Up @@ -121,7 +135,7 @@ const ComplianceHistory = (props) => {
byUser = ` by ${each.createUser.displayName} `
}

if (status === 'returned' && !user.isGovernment) {
if (status === 'returned to the supplier' && !user.isGovernment) {
byUser = ' by Government of B.C. '
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,24 @@ const CreditAgreementsDetailsPage = (props) => {
/>
</div>
</div>
{user && user.isGovernment && details && details.status !== 'ISSUED' && (
{user && user.isGovernment && details && (
<div className="row mt-3 mb-2">
<div className="col-sm-12">
<div
className="grey-border-area p-3 comment-box mt-2"
id="comment-input"
>
{details &&
details.filteredIdirComments &&
details.filteredIdirComments.length > 0 && (
{ details?.filteredIdirComments &&
details?.filteredIdirComments.length > 0 && (
<EditableCommentList
comments={details.filteredIdirComments}
user={user}
handleCommentEdit={handleInternalCommentEdit}
handleCommentDelete={handleInternalCommentDelete}
/>
)}
<div>
{details?.status !== 'ISSUED' && (
<div>
<CommentInput
handleAddComment={handleAddComment}
handleCommentChange={handleCommentChangeIdir}
Expand All @@ -110,6 +110,7 @@ const CreditAgreementsDetailsPage = (props) => {
buttonText="Add Comment"
/>
</div>
)}
</div>
</div>
</div>
Expand Down

0 comments on commit a248150

Please sign in to comment.