Skip to content

Commit

Permalink
Merge pull request #4641 from bcgov/dev-MD-4368
Browse files Browse the repository at this point in the history
4368 - fixes - Change tab header to fixed width and remove Applicant Contact tab
  • Loading branch information
milosdes authored Oct 30, 2023
2 parents 6f099e7 + 94d2545 commit b2ee331
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ const BottomButtonGroup = React.memo(
case StateEnum.readytoscan.name:
case StateEnum.peerreview.name:
case StateEnum.section5pending.name:
case StateEnum.onholdapplicationfee.name:
case StateEnum.appfeeowing.name:
const status = Object.values(StateEnum).find(
(statusValue) => statusValue.name === currentSelectedStatus
);
Expand Down
1 change: 1 addition & 0 deletions forms-flow-web/src/components/FOI/FOIRequest/FOIRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,7 @@ const FOIRequest = React.memo(({ userDetail }) => {
return (requestState !== StateEnum.intakeinprogress.name &&
requestState !== StateEnum.unopened.name &&
requestState !== StateEnum.open.name &&
requestState !== StateEnum.appfeeowing.name &&
requestDetails?.requestType === FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_GENERAL)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
}

.foitabheadercollection {
width: fit-content;
width: 200px;
// height: calc(100% - 96px - 67px);
// height: 100%;
border-radius: 0px 30px 30px 0px!important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}

.foitabheadercollection {
width: fit-content;
width: 200px;
// height: calc(100% - 96px - 67px);
// height: 100%;
border-radius: 0px 30px 30px 0px!important;
Expand All @@ -69,7 +69,7 @@
background-color: #C45303;
}

.foitabheaderIntakeInProgressBG, .foitabheaderOnHoldApplicationFeeBG, .foitabheaderSection5Pending {
.foitabheaderIntakeInProgressBG, .foitabheaderAppFeeOwingBG, .foitabheaderSection5Pending {
background-color: #8C3601;
}

Expand Down
4 changes: 2 additions & 2 deletions forms-flow-web/src/components/FOI/FOIRequest/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ export const getTabBG = (_tabStatus, _requestState) => {
return "foitabheadercollection foitabheaderReadytoScanBG";
case StateEnum.section5pending.name:
return "foitabheadercollection foitabheaderSection5Pending";
case StateEnum.onholdapplicationfee.name:
return "foitabheadercollection foitabheaderOnHoldApplicationFeeBG";
case StateEnum.appfeeowing.name:
return "foitabheadercollection foitabheaderAppFeeOwingBG";

default:
return "foitabheadercollection foitabheaderdefaultBG";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ import { getFullnameList } from "../../../../helper/FOI/helper";
return {title: "Ministry Sign Off", body: `Upload eApproval Logs, and enter in required approval fields to verify Ministry Approval and then change the state.`};
else
return {title: "Changing the state", body: `Are you sure you want to change Request #${_requestNumber} to ${StateEnum.response.name}?`};
case StateEnum.onholdapplicationfee.name.toLowerCase():
return {title: "Changing the state", body: `Are you sure you want to change Request #${_requestNumber} to ${StateEnum.onholdapplicationfee.name}?`};
case StateEnum.appfeeowing.name.toLowerCase():
return {title: "Changing the state", body: `Are you sure you want to change Request #${_requestNumber} to ${StateEnum.appfeeowing.name}?`};
default:
return {title: "", body: ""};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ const StateDropDown = ({
return _stateList.section5pending;
}
break
case StateEnum.onholdapplicationfee.name.toLowerCase():
return _stateList.onholdapplicationfee;
case StateEnum.appfeeowing.name.toLowerCase():
return _stateList.appfeeowing;

default:
return [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
background-color: #595959;
}

.on-hold-applicationfee {
.appfeeowing {
background-color: #8C3601;
}

Expand Down
6 changes: 3 additions & 3 deletions forms-flow-web/src/constants/FOI/statusEnum.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const StateList = Object.freeze({
unopened: [{status: "Unopened", isSelected: false}, {status:"Intake in Progress", isSelected: false}],
intakeinprogress: [{status:"Intake in Progress", isSelected: false}, {status: "Open", isSelected: false}, {status:"Peer Review", isSelected: false}, {status: "Redirect", isSelected: false}, {status: "On-Hold - Application Fee", isSelected: false}, {status: "Closed", isSelected: false}],
intakeinprogress: [{status:"Intake in Progress", isSelected: false}, {status: "Open", isSelected: false}, {status:"Peer Review", isSelected: false}, {status: "Redirect", isSelected: false}, {status: "App Fee Owing", isSelected: false}, {status: "Closed", isSelected: false}],
intakeinprogressforpersonals: [{status:"Intake in Progress", isSelected: false}, {status: "Open", isSelected: false}, {status:"Peer Review", isSelected: false}, {status: "Redirect", isSelected: false}, {status: "Section 5 Pending", isSelected: false}, {status: "Closed", isSelected: false}],
redirect: [{status: "Redirect", isSelected: false}, {status:"Intake in Progress", isSelected: false}, {status: "Closed", isSelected: false}],
open: [{status: "Open", isSelected: false}, {status: "Call For Records", isSelected: false}, {status:"Peer Review", isSelected: false},{status: "Closed", isSelected: false}],
Expand All @@ -22,7 +22,7 @@ const StateList = Object.freeze({
//peerreview: [{status:"Peer Review", isSelected: false},{status:"Intake in Progress", isSelected: false}, {status: "Open", isSelected: false},{status: "Records Review", isSelected: false},{status: "Consult", isSelected: false},{status: "Response", isSelected: false}],
peerreview: [{status:"Peer Review", isSelected: false}],
section5pending: [{status: "Section 5 Pending", isSelected: false}, {status: "Open", isSelected: false}, {status:"Peer Review", isSelected: false}, {status: "Redirect", isSelected: false}, {status: "Closed", isSelected: false}],
onholdapplicationfee: [{status: "On-Hold - Application Fee", isSelected: false}, {status: "Open", isSelected: false}, {status:"Peer Review", isSelected: false}, {status: "Redirect", isSelected: false}, {status: "Closed", isSelected: false}]
appfeeowing: [{status: "App Fee Owing", isSelected: false}, {status: "Open", isSelected: false}, {status:"Peer Review", isSelected: false}, {status: "Redirect", isSelected: false}, {status: "Closed", isSelected: false}]
});

const MinistryStateList = Object.freeze({
Expand Down Expand Up @@ -67,7 +67,7 @@ const StateEnum = Object.freeze({
peerreview: {name: "Peer Review", id: 16},
tagging: {name: "Tagging", id: 17},
readytoscan: {name: "Ready to Scan", id: 18},
onholdapplicationfee: {name: "On-Hold - Application Fee", id: 19},
appfeeowing: {name: "App Fee Owing", id: 19},
section5pending: {name: "Section 5 Pending", id: 20},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
sql = '''INSERT INTO "FOIRequestStatuses" (name, description, isactive) VALUES ('On-Hold - Application Fee', 'On Hold for Application Fee', true)'''
sql = '''INSERT INTO "FOIRequestStatuses" (name, description, isactive) VALUES ('App Fee Owing', 'On Hold for Application Fee', true)'''
op.execute(sql)


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
sql = '''DELETE FROM "FOIRequestStatuses" WHERE name = 'On-Hold - Application Fee';'''
sql = '''DELETE FROM "FOIRequestStatuses" WHERE name = 'App Fee Owing';'''
op.execute(sql)
10 changes: 5 additions & 5 deletions request-management-api/request_api/models/FOIRawRequests.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,23 +362,23 @@ def getassignmenttransition(cls,requestid):
return assignments

@classmethod
def getonholdapplicationfeerequests(cls): # with the reminder date
onholdapplicationfeerequests = []
def getappfeeowingrequests(cls): # with the reminder date
appfeeowingrequests = []
try:
sql = '''
SELECT * FROM (SELECT DISTINCT ON (requestid) requestid, updated_at, status FROM public."FOIRawRequests"
ORDER BY requestid ASC, version DESC) r
WHERE r.status = 'On-Hold - Application Fee'
WHERE r.status = 'App Fee Owing'
order by r.updated_at asc
'''
rs = db.session.execute(text(sql))
onholdapplicationfeerequests = rs
appfeeowingrequests = rs
except Exception as ex:
logging.error(ex)
raise ex
finally:
db.session.close()
return onholdapplicationfeerequests
return appfeeowingrequests

@classmethod
def getversionforrequest(cls,requestid):
Expand Down
2 changes: 1 addition & 1 deletion request-management-api/request_api/resources/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def post(requestid=None, actiontype=None):

if int(requestid) and str(requestid) != "-1" :
status = rawrequestservice().getstatus(updaterequest)
if status not in ['Intake in Progress', 'Closed', 'Redirect', 'Peer Review', 'Section 5 Pending', 'On-Hold - Application Fee']:
if status not in ['Intake in Progress', 'Closed', 'Redirect', 'Peer Review', 'Section 5 Pending', 'App Fee Owing']:
raise ValueError('Invalid request state.')
result = rawrequestservice().saverawrequestversion(updaterequest,requestid,assigneegroup,assignee,status,AuthHelper.getuserid(),assigneefirstname,assigneemiddlename,assigneelastname, actiontype)
assignee = ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def createpaymentreminderevent(self):

notificationservice().dismissremindernotification("rawrequest", self.__notificationtype())
eventtype = PaymentEventType.reminder.value
_onholdrequests = FOIRawRequest.getonholdapplicationfeerequests()
_onholdrequests = FOIRawRequest.getappfeeowingrequests()
for entry in _onholdrequests:
_dateofstatechange = datetimehandler().formatdate(entry['updated_at'])
businessdayselapsed = duecalculator().getbusinessdaysbetween(_dateofstatechange)
Expand Down

0 comments on commit b2ee331

Please sign in to comment.