diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 923b44a96a..11b0610529 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -14,8 +14,9 @@ "ms-azuretools.vscode-docker", "shd101wyy.markdown-preview-enhanced", "esbenp.prettier-vscode", - "sonarsource.sonarlint-vscode" + "sonarsource.sonarlint-vscode", + "ms-python.vscode-pylance" ], // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [] -} +} \ No newline at end of file diff --git a/README.md b/README.md index 92bf64836f..0ec2087cdc 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # Mines Digital Services -The technologies that support mine oversight for British Columbians need to be reimagined. This project will replace the legacy Mine Management System (MMS) with a scalable, open source, data driven system using modern and flexible technologies. +Mines Digital Services (MDS) upholds the BC Public Service’s commitment to modernization, transparency, and efficiency, enabling better governance and service delivery when it comes to mining in British Columbia. -The Mines Digital Services (MDS) will have a number of interconnections and relationships to systems across the Natural Resource Ministries and will be important not only to the Ministry of Energy, Mines and Low Carbon Innovation but also to inter-agency collaborations across ministries. The future state must be intuitive, and capable of providing meaningful data to relevant stakeholders. +This project replaced the legacy Mine Management System (MMS) with a scalable, open source, data driven system using modern and flexible technologies. + +The MDS have a number of interconnections and relationships to systems across the Natural Resource Ministries and is important not only to the Ministry of Mining and Critical Minerals but also to inter-agency collaborations across ministries, industry stakeholders and the public. [![Lifecycle:Maturing](https://img.shields.io/badge/Lifecycle-Maturing-007EC6)](Redirect-URL) [![CORE WEB - Unit Tests](https://github.com/bcgov/mds/actions/workflows/core-web.unit.yaml/badge.svg)](https://github.com/bcgov/mds/actions/workflows/core-web.unit.yaml) @@ -14,12 +16,14 @@ The Mines Digital Services (MDS) will have a number of interconnections and rela ## Features -The product is anticipated to include: +Key products that are maintained by MDS include Core, MineSpace and the public-facing [BC Mine Information website](https://mines.nrs.gov.bc.ca) [(github repository)](https://github.com/bcgov/NR-BCMI) + +Mines Digital Services build features with these principles in mind: -1. Support for integrated analysis and decision making across the process of mine oversight -2. Support for the creation of a complex data model that can connect various components of mines. Some examples include consultation information, risk management modeling, spatial data, financial tracking and collecting and physical attributes -3. Enhancements to the public-facing [BC Mine Information website](http://mines.nrs.gov.bc.ca/) ([github repository](https://github.com/bcgov/mem-mmti-public)) to broaden the available data and create new or improved functionality to increase usability -4. Enhancements to the [BC Mine Information website's administrative console](https://mines.empr.gov.bc.ca/) ([github repository](https://github.com/bcgov/mem-admin)) , including work required to connect with other systems (e.g., the Natural Resource Inspection System, aka NRIS) +1. MDS develops tools and platforms that prioritize ease of use for mining companies, regulators, and the public. +2. MDS supports access to high-quality geoscientific data and regulatory information, empowering government bodies and mining companies to make informed decisions. +3. MDS collaborates across government agencies and industries to create cohesive solutions that integrate regulatory processes, permitting, and compliance systems. +4. Digital tools from MDS help monitor and ensure mining activities adhere to environmental and social governance standards. ## Services diff --git a/services/common/src/components/common/ActionMenu.tsx b/services/common/src/components/common/ActionMenu.tsx index d0eff8ceae..66c0a9d914 100644 --- a/services/common/src/components/common/ActionMenu.tsx +++ b/services/common/src/components/common/ActionMenu.tsx @@ -1,5 +1,5 @@ import React, { FC, ReactNode } from "react"; -import { Button, Dropdown, Modal } from "antd"; +import { Button, ButtonProps, Dropdown, Modal } from "antd"; import CaretDownOutlined from "@ant-design/icons/CaretDownOutlined"; import DownOutlined from "@ant-design/icons/DownOutlined"; import { ITableAction } from "@mds/common/components/common/CoreTableCommonColumns"; @@ -25,7 +25,7 @@ export const generateActionMenuItems = (actionItems: ITableAction[], record) => diff --git a/services/common/src/components/documents/DocumentTable.tsx b/services/common/src/components/documents/DocumentTable.tsx index 7645c4de88..cc72fed5de 100644 --- a/services/common/src/components/documents/DocumentTable.tsx +++ b/services/common/src/components/documents/DocumentTable.tsx @@ -36,6 +36,7 @@ import ArchiveDocumentModal from "./ArchiveDocumentModal"; import DeleteDocumentModal from "./DeleteDocumentModal"; import ReplaceDocumentModal from "./ReplaceDocumentModal"; import { downloadFileFromDocumentManager } from "@mds/common/redux/utils/actionlessNetworkCalls"; +import { ActionMenuButton } from "../common/ActionMenu"; export const DocumentTable: FC = ({ isViewOnly = false, @@ -82,18 +83,13 @@ export const DocumentTable: FC = ({ const isMinimalView: boolean = view === "minimal"; const parseDocuments = (docs: any[]): MineDocument[] => { - let parsedDocs: MineDocument[]; if (docs.length && docs[0] instanceof MineDocument) { - parsedDocs = docs; + return docs; } else { - parsedDocs = docs.map((doc) => new MineDocument(doc)); + return docs.map((doc) => new MineDocument(doc)); } - return parsedDocs.map((doc) => { - doc.setAllowedActions(userRoles); - return doc; - }); }; - + const [documents, setDocuments] = useState(parseDocuments(props.documents ?? [])); useEffect(() => { @@ -108,9 +104,8 @@ export const DocumentTable: FC = ({ setDocuments(parseDocuments(props.documents ?? [])); }, [props.documents]); - const openArchiveModal = (event, docs: MineDocument[]) => { + const openArchiveModal = (docs: MineDocument[]) => { const mineGuid = docs[0].mine_guid; - event.preventDefault(); dispatch( openModal({ props: { @@ -197,7 +192,7 @@ export const DocumentTable: FC = ({ key: "archive", label: FileOperations.Archive, icon: , - clickFunction: (event, record: MineDocument) => openArchiveModal(event, [record]), + clickFunction: (_event, record: MineDocument) => openArchiveModal([record]), }, { key: "delete", @@ -275,43 +270,25 @@ export const DocumentTable: FC = ({ ? { size: "small" as SizeType, rowClassName: "ant-table-row-minimal" } : null; - const bulkItems: MenuProps["items"] = [ + const bulkItems = [ { key: FileOperations.Download, icon: , - label: ( - - ), + label: "Download File(s)", + clickFunction: () => setIsCompressionModal(true) }, { key: FileOperations.Archive, icon: , - label: ( - - ), - }, + label: "Archive File(s)", + clickFunction: () => openArchiveModal(rowSelection) + } ].filter((a) => allowedTableActions[a.key]); const renderBulkActions = () => { let element = ( - + buttonProps={{ type: "primary", }} + /> ); } @@ -350,22 +321,22 @@ export const DocumentTable: FC = ({ const bulkActionsProps = enableBulkActions ? { - rowSelection: { - type: "checkbox", - ...rowSelectionObject, - }, - } + rowSelection: { + type: "checkbox", + ...rowSelectionObject, + }, + } : {}; const versionProps = showVersionHistory ? { - expandProps: { - childrenColumnName: "versions", - matchChildColumnsToParent: true, - recordDescription: "version history", - rowExpandable: (record) => record.number_prev_versions > 0, - }, - } + expandProps: { + childrenColumnName: "versions", + matchChildColumnsToParent: true, + recordDescription: "version history", + rowExpandable: (record) => record.number_prev_versions > 0, + }, + } : {}; const coreTableProps = { diff --git a/services/common/src/components/documents/__snapshots__/ArchiveDocumentModal.spec.tsx.snap b/services/common/src/components/documents/__snapshots__/ArchiveDocumentModal.spec.tsx.snap index 55fcb08c9e..85f7a8a292 100644 --- a/services/common/src/components/documents/__snapshots__/ArchiveDocumentModal.spec.tsx.snap +++ b/services/common/src/components/documents/__snapshots__/ArchiveDocumentModal.spec.tsx.snap @@ -147,6 +147,7 @@ exports[`ArchiveDocumentModal renders correctly and matches the snapshot 1`] = ` class="ant-modal-footer" > )} diff --git a/services/common/src/components/forms/__snapshots__/RenderCancelButton.spec.tsx.snap b/services/common/src/components/forms/__snapshots__/RenderCancelButton.spec.tsx.snap index a5c0633f38..4ce73394a5 100644 --- a/services/common/src/components/forms/__snapshots__/RenderCancelButton.spec.tsx.snap +++ b/services/common/src/components/forms/__snapshots__/RenderCancelButton.spec.tsx.snap @@ -8,6 +8,7 @@ exports[`RenderCancelButton component renders properly, does not show confirm on > + +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+ + + File Name + + + + + + + + + + + + +
+
+ Category + +
+ + File Type + + + + + + + + + + + +
+
+
+ + Last Modified + + + + + + + + + + + +
+
+
+ + Created By + + + + + + + + + + + +
+
+
+ + + + + +
+ N/A +
+
+
+ .png +
+
+
+ Dec 12 2024 +
+
+
+ idir\\username +
+
+
+ +
+
+ + + + + +
+ N/A +
+
+
+ .pdf +
+
+
+ Dec 12 2024 +
+
+
+ idir\\username +
+
+
+ +
+
+
+
+
+
+
+
@@ -781,7 +1428,7 @@ exports[`ProjectDocumentsTab renders properly 1`] = ` style="float: right;" > + + {/* + + */} + + + + + , + }} + iconButton + + /> + + + , + }} + iconButton + /> + + + + + + + - - - - - - - - -