Skip to content

Commit

Permalink
[MDS-6139] project stages application button (#3273)
Browse files Browse the repository at this point in the history
* shush the key errors and sonarlint warnings

* fix routing on MS

* refactored to TS

* make things TS-y on CORE, shush a key warning about the project contact, and remove some unused params

* testing & solarlint issues on CORE

* flesh out data mocks a bit, use common one where we weren't already

* try fix date in test
  • Loading branch information
taraepp authored Oct 22, 2024
1 parent 8a85e34 commit 8952af4
Show file tree
Hide file tree
Showing 22 changed files with 1,480 additions and 590 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import * as MOCK from "@mds/common/tests/mocks/dataMocks";
import { USER_ACCESS_DATA } from "@mds/common/tests/mocks/dataMocks";
import { ReduxWrapper } from "@mds/common/tests/utils/ReduxWrapper";
import { subDays } from "date-fns";
import { UTCDate } from "@date-fns/utc";

const initialState = {
form: {
Expand All @@ -25,8 +24,8 @@ const initialState = {
projectSummaryMinistryComments: MOCK.PROJECT_SUMMARY_MINISTRY_COMMENTS.map((comment) => {
return {
...comment,
update_timestamp: subDays(new UTCDate(), 10).toISOString(),
create_timestamp: subDays(new UTCDate(), 10).toISOString(),
update_timestamp: subDays(new Date(), 10).toISOString(),
create_timestamp: subDays(new Date(), 10).toISOString(),
};
}),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ exports[`Project Management renders properly 1`] = `
<span
class="ant-comment-content-author-time comment-time"
>
9
10
days ago
</span>
</div>
Expand Down Expand Up @@ -546,7 +546,7 @@ exports[`Project Management renders properly 1`] = `
<span
class="ant-comment-content-author-time comment-time"
>
9
10
days ago
</span>
</div>
Expand Down Expand Up @@ -612,7 +612,7 @@ exports[`Project Management renders properly 1`] = `
<span
class="ant-comment-content-author-time comment-time"
>
9
10
days ago
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ export interface IProjectStage {
title: string;
key: string;
status: string;
payload: IProjectSummary;
statusHash: any;
required: boolean;
navigateForward: (source: string, status: string) => void;
payload?: IProjectSummary;
statusHash?: any;
required?: boolean;
isOptional?: boolean;
navigateForward?: (source: string, status: string) => void;
}
67 changes: 67 additions & 0 deletions services/common/src/tests/mocks/dataMocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7350,6 +7350,73 @@ export const EXPLOSIVES_PERMITS = {
},
};

export const EMLI_CONTACTS_BY_REGION = [
{
contact_guid: "7f107cdd-974c-4505-b076-9a88438a2fce",
contact_id: 1,
emli_contact_type_code: "MMO",
mine_region_code: null,
is_major_mine: true,
is_general_contact: false,
email: "[email protected]",
phone_number: null,
first_name: null,
last_name: null,
fax_number: null,
mailing_address_line_1: null,
mailing_address_line_2: null,
deleted_ind: false,
},
{
contact_guid: "f9c42bc7-6d02-4830-b1e0-51a64e8b28cb",
contact_id: 2,
emli_contact_type_code: "CHI",
mine_region_code: null,
is_major_mine: true,
is_general_contact: true,
email: "[email protected]",
phone_number: "123-234-3456",
first_name: "Anna",
last_name: "Albright",
fax_number: null,
mailing_address_line_1: null,
mailing_address_line_2: null,
deleted_ind: false,
},
{
contact_guid: "eee5bb02-e92d-43b9-baf0-b7ee07dedbaf",
contact_id: 3,
emli_contact_type_code: "CHP",
mine_region_code: null,
is_major_mine: true,
is_general_contact: true,
email: "[email protected]",
phone_number: "111-222-3333",
first_name: "Blaine",
last_name: "Blainesworth",
fax_number: null,
mailing_address_line_1: null,
mailing_address_line_2: null,
deleted_ind: false,
},
{
contact_guid: "402fd5a0-de84-4ff4-adec-d69f73f6f106",
contact_id: 18,
emli_contact_type_code: "HSI",
mine_region_code: "SC",
is_major_mine: true,
is_general_contact: false,
email: "[email protected]",
phone_number: "000-111-2222",
first_name: "Carla",
last_name: "Carlsdottir",
fax_number: null,
mailing_address_line_1: null,
mailing_address_line_2: null,
deleted_ind: false,
},
];

export const PROJECTS = {
records: [
{
Expand Down
Loading

0 comments on commit 8952af4

Please sign in to comment.