-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into mds-5456-now-doc-delete-bug
- Loading branch information
Showing
36 changed files
with
1,708 additions
and
478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
...s/explosives_permit_amendment/resources/test_explosives_permit_amendment_list_resource.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
from tests.factories import ExplosivesPermitAmendmentFactory, create_mine_and_permit, MinePartyAppointmentFactory, \ | ||
ExplosivesPermitFactory | ||
import json | ||
|
||
def test_post_explosives_permit_amendment_application(test_client, db_session, auth_headers): | ||
mine, permit = create_mine_and_permit() | ||
mine_manager = MinePartyAppointmentFactory(mine=mine) | ||
permittee = MinePartyAppointmentFactory(mine=mine) | ||
explosives_permit = ExplosivesPermitFactory() | ||
data = { | ||
'explosives_permit_id': explosives_permit.explosives_permit_id, | ||
'originating_system': | ||
'Core', | ||
'permit_guid': | ||
str(permit.permit_guid), | ||
'mine_manager_mine_party_appt_id': | ||
mine_manager.mine_party_appt_id, | ||
'permittee_mine_party_appt_id': | ||
permittee.mine_party_appt_id, | ||
'application_date': | ||
'2021-07-12', | ||
'description': | ||
'Other Information.', | ||
'latitude': | ||
'54', | ||
'longitude': | ||
'40', | ||
'explosive_magazines': [{ | ||
'type_no': '1', | ||
'tag_no': '1', | ||
'construction': '1', | ||
'quantity': '1', | ||
'latitude': '1', | ||
'longitude': '1', | ||
'distance_road': '1', | ||
'distance_dwelling': '1', | ||
'length': '1', | ||
'width': '1', | ||
'height': '1' | ||
}], | ||
'detonator_magazines': [{ | ||
'type_no': '1', | ||
'tag_no': '1', | ||
'construction': '1', | ||
'quantity': '1', | ||
'longitude': '1', | ||
'latitude': '1', | ||
'detonator_type': '1', | ||
'distance_road': '1', | ||
'distance_dwelling': '1', | ||
'width': '1', | ||
'height': '1', | ||
'length': '1' | ||
}] | ||
} | ||
|
||
post_resp = test_client.post( | ||
f'/mines/{mine.mine_guid}/explosives-permits-amendment', | ||
json=data, | ||
headers=auth_headers['full_auth_header']) | ||
|
||
assert post_resp.status_code == 201 | ||
assert len(mine.explosives_permits_amendments) == 1 | ||
|
||
post_data = json.loads(post_resp.data.decode()) | ||
assert post_data['explosives_permit_id'] != None | ||
assert post_data['mine_guid'] == str(mine.mine_guid) | ||
assert post_data['permit_guid'] == data['permit_guid'] | ||
assert post_data['application_status'] == 'REC' | ||
assert post_data['application_number'] != None | ||
assert post_data['received_timestamp'] != None | ||
assert post_data['is_closed'] == False | ||
assert post_data['permit_number'] == None | ||
assert post_data['issue_date'] == None | ||
assert post_data['expiry_date'] == None | ||
assert len(post_data['explosive_magazines']) == len(data['explosive_magazines']) | ||
assert len(post_data['detonator_magazines']) == len(data['detonator_magazines']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from "react"; | ||
import Icon from "@ant-design/icons"; | ||
|
||
const EditSvg = () => ( | ||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M21.1784 8.88387L8.55161 21.5079L4.20485 21.9886C2.94506 22.1281 1.8728 21.0656 2.01224 19.7965L2.49307 15.4507L15.1198 2.82664C16.2209 1.72576 18 1.72576 19.0963 2.82664L21.1736 4.9034C22.2747 6.00428 22.2747 7.7878 21.1784 8.88387ZM16.4277 10.3693L13.634 7.57628L4.70011 16.5131L4.3491 19.6523L7.48896 19.3013L16.4277 10.3693ZM19.5435 6.53789L17.4663 4.46113C17.2692 4.26403 16.947 4.26403 16.7547 4.46113L15.2689 5.94659L18.0626 8.73965L19.5483 7.25418C19.7407 7.05228 19.7407 6.73499 19.5435 6.53789Z" | ||
fill="#5e46a1" | ||
/> | ||
</svg> | ||
); | ||
|
||
const VioletEditIcon = (props) => <Icon component={EditSvg} {...props} />; | ||
|
||
export default VioletEditIcon; |
Oops, something went wrong.