diff --git a/Keas.Mvc/ClientApp/package-lock.json b/Keas.Mvc/ClientApp/package-lock.json index 6f5b5aaf2..5ea4b97a3 100644 --- a/Keas.Mvc/ClientApp/package-lock.json +++ b/Keas.Mvc/ClientApp/package-lock.json @@ -12,8 +12,6 @@ "@tanstack/react-table": "9.3.1", "date-fns": "2.14.0", "isomorphic-fetch": "2.2.1", - "jquery": "3.5.1", - "log4javascript": "1.4.15", "react": "18.3.1", "react-calendar": "6.0.1", "react-date-picker": "12.1.0", @@ -22,7 +20,6 @@ "react-router-dom": "5.3.4", "react-toastify": "11.1.0", "reactstrap": "9.2.3", - "stacktrace-js": "2.0.2", "yup": "0.29.1" }, "devDependencies": { @@ -3547,15 +3544,6 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/error-stack-parser": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz", - "integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==", - "license": "MIT", - "dependencies": { - "stackframe": "^1.3.4" - } - }, "node_modules/es-abstract": { "version": "1.24.2", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.2.tgz", @@ -5351,12 +5339,6 @@ "jiti": "lib/jiti-cli.mjs" } }, - "node_modules/jquery": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", - "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==", - "license": "MIT" - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -5815,11 +5797,6 @@ "dev": true, "license": "MIT" }, - "node_modules/log4javascript": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/log4javascript/-/log4javascript-1.4.15.tgz", - "integrity": "sha512-kj6TEf3qkUSvrTW7frJZjBUKTAKF6bBFqAxtvPKcbviBnkzbCuXQr9++aSvc4eYtGyrejcBU3bcIZGY3BgqsLA==" - }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -7222,15 +7199,6 @@ "dev": true, "license": "ISC" }, - "node_modules/source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/source-map-js": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", @@ -7241,15 +7209,6 @@ "node": ">=0.10.0" } }, - "node_modules/stack-generator": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/stack-generator/-/stack-generator-2.0.10.tgz", - "integrity": "sha512-mwnua/hkqM6pF4k8SnmZ2zfETsRUpWXREfA/goT8SLCV4iOFa4bzOX2nDipWAZFPTjLvQB82f5yaodMVhK0yJQ==", - "license": "MIT", - "dependencies": { - "stackframe": "^1.3.4" - } - }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -7257,33 +7216,6 @@ "dev": true, "license": "MIT" }, - "node_modules/stackframe": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz", - "integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==", - "license": "MIT" - }, - "node_modules/stacktrace-gps": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/stacktrace-gps/-/stacktrace-gps-3.1.2.tgz", - "integrity": "sha512-GcUgbO4Jsqqg6RxfyTHFiPxdPqF+3LFmQhm7MgCuYQOYuWyqxo5pwRPz5d/u6/WYJdEnWfK4r+jGbyD8TSggXQ==", - "license": "MIT", - "dependencies": { - "source-map": "0.5.6", - "stackframe": "^1.3.4" - } - }, - "node_modules/stacktrace-js": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stacktrace-js/-/stacktrace-js-2.0.2.tgz", - "integrity": "sha512-Je5vBeY4S1r/RnLydLl0TBTi3F2qdfWmYsGvtfZgEI+SCprPppaIhQf5nGcal4gI4cGpCV/duLcAzT1np6sQqg==", - "license": "MIT", - "dependencies": { - "error-stack-parser": "^2.0.6", - "stack-generator": "^2.0.5", - "stacktrace-gps": "^3.0.4" - } - }, "node_modules/std-env": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.3.0.tgz", diff --git a/Keas.Mvc/ClientApp/package.json b/Keas.Mvc/ClientApp/package.json index 2d1c2b6e3..523dc20df 100644 --- a/Keas.Mvc/ClientApp/package.json +++ b/Keas.Mvc/ClientApp/package.json @@ -19,8 +19,6 @@ "@tanstack/react-table": "9.3.1", "date-fns": "2.14.0", "isomorphic-fetch": "2.2.1", - "jquery": "3.5.1", - "log4javascript": "1.4.15", "react": "18.3.1", "react-calendar": "6.0.1", "react-date-picker": "12.1.0", @@ -29,7 +27,6 @@ "react-router-dom": "5.3.4", "react-toastify": "11.1.0", "reactstrap": "9.2.3", - "stacktrace-js": "2.0.2", "yup": "0.29.1" }, "devDependencies": { diff --git a/Keas.Mvc/ClientApp/src/components/Access/AccessAssignmentContainer.tsx b/Keas.Mvc/ClientApp/src/components/Access/AccessAssignmentContainer.tsx index fa524f9ec..f6eb689e4 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/AccessAssignmentContainer.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/AccessAssignmentContainer.tsx @@ -1,6 +1,5 @@ import { IdentificationIcon } from '@heroicons/react/24/solid'; import { PlusIcon } from '@heroicons/react/24/outline'; -import * as React from 'react'; import { useContext, useEffect, useState } from 'react'; import { useHistory, useParams } from 'react-router'; import { toast } from 'react-toastify'; diff --git a/Keas.Mvc/ClientApp/src/components/Access/AccessAssignmentDetails.tsx b/Keas.Mvc/ClientApp/src/components/Access/AccessAssignmentDetails.tsx index 3a295206c..bbf7a8fc7 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/AccessAssignmentDetails.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/AccessAssignmentDetails.tsx @@ -1,6 +1,4 @@ import { Modal, ModalBody, ModalHeading } from '../Shared/AppModal'; -import * as React from 'react'; -import { Button } from 'reactstrap'; import { IAccess, IAccessAssignment } from '../../models/Access'; import AccessEditValues from './AccessEditValues'; import AccessAssignmentValues from './AccessAssignmentValues'; diff --git a/Keas.Mvc/ClientApp/src/components/Access/AccessAssignmentValues.tsx b/Keas.Mvc/ClientApp/src/components/Access/AccessAssignmentValues.tsx index ae25734a2..97089f863 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/AccessAssignmentValues.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/AccessAssignmentValues.tsx @@ -1,6 +1,5 @@ import { AssetActions, AssetSummary } from '../Shared/AssetSummary'; import { PencilSquareIcon } from '@heroicons/react/24/outline'; -import * as React from 'react'; import { Button } from 'reactstrap'; import { IAccessAssignment } from '../../models/Access'; import { DateUtil } from '../../util/dates'; diff --git a/Keas.Mvc/ClientApp/src/components/Access/AccessContainer.test.tsx b/Keas.Mvc/ClientApp/src/components/Access/AccessContainer.test.tsx index 8b676a2a3..b7b1ea1e5 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/AccessContainer.test.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/AccessContainer.test.tsx @@ -1,5 +1,4 @@ import { within } from '@testing-library/react'; -import * as React from 'react'; import { render, cleanup, act } from '@testing-library/react'; import { MemoryRouter } from 'react-router'; import { Context } from '../../Context'; @@ -37,7 +36,7 @@ afterEach(() => { describe('Access Container', () => { const contextObject = { - fetch: (url: any, index: any) => {}, + fetch: (_url: any, _index: any) => {}, permissions: ['DepartmentalAdmin', 'Admin'], team: { id: 1, name: 'Team', slug: 'team' }, tags: [] diff --git a/Keas.Mvc/ClientApp/src/components/Access/AccessContainer.tsx b/Keas.Mvc/ClientApp/src/components/Access/AccessContainer.tsx index 648f2f8c3..5e9c5e35a 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/AccessContainer.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/AccessContainer.tsx @@ -1,6 +1,5 @@ import { IdentificationIcon } from '@heroicons/react/24/solid'; import { PlusIcon } from '@heroicons/react/24/outline'; -import * as React from 'react'; import { useContext, useEffect, useState } from 'react'; import { useHistory, useParams } from 'react-router'; import { toast } from 'react-toastify'; diff --git a/Keas.Mvc/ClientApp/src/components/Access/AccessDetailContainer.tsx b/Keas.Mvc/ClientApp/src/components/Access/AccessDetailContainer.tsx index 65226477b..1e35ab986 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/AccessDetailContainer.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/AccessDetailContainer.tsx @@ -3,7 +3,6 @@ import { PencilSquareIcon, TrashIcon } from '@heroicons/react/24/outline'; -import * as React from 'react'; import { useContext, useEffect, useState } from 'react'; import { useHistory } from 'react-router-dom'; import { toast } from 'react-toastify'; diff --git a/Keas.Mvc/ClientApp/src/components/Access/AccessEditValues.tsx b/Keas.Mvc/ClientApp/src/components/Access/AccessEditValues.tsx index ae6b22938..512414911 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/AccessEditValues.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/AccessEditValues.tsx @@ -1,6 +1,5 @@ import { AssetSummary } from '../Shared/AssetSummary'; import { LinkIcon } from '@heroicons/react/24/outline'; -import * as React from 'react'; import { Button, FormFeedback, FormGroup, Input, Label } from 'reactstrap'; import { IAccess } from '../../models/Access'; import { IValidationError } from '../../models/Shared'; diff --git a/Keas.Mvc/ClientApp/src/components/Access/AccessList.tsx b/Keas.Mvc/ClientApp/src/components/Access/AccessList.tsx index 30df3fa97..aae00726d 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/AccessList.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/AccessList.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { IAccess, IAccessAssignment } from '../../models/Access'; import AccessAssignmentListItem from './AccessListItem'; diff --git a/Keas.Mvc/ClientApp/src/components/Access/AccessListItem.tsx b/Keas.Mvc/ClientApp/src/components/Access/AccessListItem.tsx index 77c801090..36e8deae3 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/AccessListItem.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/AccessListItem.tsx @@ -1,5 +1,4 @@ import { AssetDetailsLink } from '../Shared/AssetDetailsLink'; -import * as React from 'react'; import { IAccess, IAccessAssignment } from '../../models/Access'; import { DateUtil } from '../../util/dates'; import ListActionsDropdown, { IAction } from '../ListActionsDropdown'; diff --git a/Keas.Mvc/ClientApp/src/components/Access/AssignAccess.tsx b/Keas.Mvc/ClientApp/src/components/Access/AssignAccess.tsx index 1ba7fb5e8..f38e9a1d0 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/AssignAccess.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/AssignAccess.tsx @@ -2,7 +2,6 @@ import { AssetActions } from '../Shared/AssetSummary'; import { Modal, ModalBody, ModalFooter, ModalHeading } from '../Shared/AppModal'; import { ArrowPathIcon, XMarkIcon } from '@heroicons/react/24/outline'; import { addYears, format, startOfDay } from 'date-fns'; -import * as React from 'react'; import { useEffect, useState } from 'react'; import { Button } from 'reactstrap'; import { accessSchema, IAccess, IAccessAssignment } from '../../models/Access'; @@ -219,7 +218,7 @@ const AssignAccess = (props: IProps) => { onClick={assignSelected} disabled={!validState || submitting} > - Assign {submitting && } + {access?.id ? 'Assign' : 'Save'} {submitting && } {' '} diff --git a/Keas.Mvc/ClientApp/src/components/Access/DeleteAccess.tsx b/Keas.Mvc/ClientApp/src/components/Access/DeleteAccess.tsx index b6e4844ba..0cd095f46 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/DeleteAccess.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/DeleteAccess.tsx @@ -1,6 +1,5 @@ import { Modal, ModalBody, ModalFooter, ModalHeading } from '../Shared/AppModal'; import { ArrowPathIcon } from '@heroicons/react/24/outline'; -import * as React from 'react'; import { useState } from 'react'; import { Button } from 'reactstrap'; import { IAccess } from '../../models/Access'; diff --git a/Keas.Mvc/ClientApp/src/components/Access/EditAccess.tsx b/Keas.Mvc/ClientApp/src/components/Access/EditAccess.tsx index db3716c86..bda35d73a 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/EditAccess.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/EditAccess.tsx @@ -1,6 +1,5 @@ import { Modal, ModalBody, ModalFooter, ModalHeading } from '../Shared/AppModal'; import { ArrowPathIcon } from '@heroicons/react/24/outline'; -import * as React from 'react'; import { useEffect, useState } from 'react'; import { Button } from 'reactstrap'; import { accessSchema, IAccess } from '../../models/Access'; diff --git a/Keas.Mvc/ClientApp/src/components/Access/RevokeAccess.tsx b/Keas.Mvc/ClientApp/src/components/Access/RevokeAccess.tsx index 628a7bc7e..dc2d9fd49 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/RevokeAccess.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/RevokeAccess.tsx @@ -1,6 +1,5 @@ import { Modal, ModalBody, ModalFooter, ModalHeading } from '../Shared/AppModal'; import { ArrowPathIcon } from '@heroicons/react/24/outline'; -import * as React from 'react'; import { useState } from 'react'; import { Button } from 'reactstrap'; import { IAccess, IAccessAssignment } from '../../models/Access'; diff --git a/Keas.Mvc/ClientApp/src/components/Access/SearchAccess.tsx b/Keas.Mvc/ClientApp/src/components/Access/SearchAccess.tsx index dd9575d4c..8d6faa8cd 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/SearchAccess.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/SearchAccess.tsx @@ -1,5 +1,4 @@ import { PlusIcon } from '@heroicons/react/24/outline'; -import * as React from 'react'; import { useContext, useState } from 'react'; import { Highlighter } from '../Shared/SearchCombobox'; import { toast } from 'react-toastify'; @@ -32,7 +31,7 @@ const SearchAccess = (props: IProps) => { placeholder='Search for access by name or by serial number' labelKey='name' allowNew={false} - renderMenuItemChildren={(option: any, propsData, index) => ( + renderMenuItemChildren={(option: any, propsData) => (
{option.name} diff --git a/Keas.Mvc/ClientApp/src/components/Access/UpdateAccessAssignment.tsx b/Keas.Mvc/ClientApp/src/components/Access/UpdateAccessAssignment.tsx index 8fa244bc3..932f73adf 100644 --- a/Keas.Mvc/ClientApp/src/components/Access/UpdateAccessAssignment.tsx +++ b/Keas.Mvc/ClientApp/src/components/Access/UpdateAccessAssignment.tsx @@ -1,7 +1,6 @@ import { AssetSummary } from '../Shared/AssetSummary'; import { Modal, ModalBody, ModalFooter, ModalHeading } from '../Shared/AppModal'; import { ArrowPathIcon } from '@heroicons/react/24/outline'; -import * as React from 'react'; import { useEffect, useState } from 'react'; import { Button } from 'reactstrap'; import { IAccess, IAccessAssignment, accessSchema } from '../../models/Access'; diff --git a/Keas.Mvc/ClientApp/src/components/Documents/AssignDocument.test.tsx b/Keas.Mvc/ClientApp/src/components/Documents/AssignDocument.test.tsx index 6e702a63d..f861367cb 100644 --- a/Keas.Mvc/ClientApp/src/components/Documents/AssignDocument.test.tsx +++ b/Keas.Mvc/ClientApp/src/components/Documents/AssignDocument.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { fireEvent, render, screen, waitFor } from '@testing-library/react'; import { Context } from '../../Context'; import { AppContext } from '../../models/Shared'; diff --git a/Keas.Mvc/ClientApp/src/components/Documents/AssignDocument.tsx b/Keas.Mvc/ClientApp/src/components/Documents/AssignDocument.tsx index 69f2fe0ee..415386ed1 100644 --- a/Keas.Mvc/ClientApp/src/components/Documents/AssignDocument.tsx +++ b/Keas.Mvc/ClientApp/src/components/Documents/AssignDocument.tsx @@ -1,5 +1,4 @@ import { ModalBody, Modal, ModalFooter, ModalHeading } from '../Shared/AppModal'; -import * as React from 'react'; import { useEffect, useContext, useState, useId } from 'react'; import { AppContext } from '../../models/Shared'; import { Context } from '../../Context'; diff --git a/Keas.Mvc/ClientApp/src/components/Documents/DocumentsContainer.tsx b/Keas.Mvc/ClientApp/src/components/Documents/DocumentsContainer.tsx index e0fc8f41c..139295aa4 100644 --- a/Keas.Mvc/ClientApp/src/components/Documents/DocumentsContainer.tsx +++ b/Keas.Mvc/ClientApp/src/components/Documents/DocumentsContainer.tsx @@ -1,6 +1,5 @@ import { DocumentTextIcon } from '@heroicons/react/24/solid'; import { PlusIcon } from '@heroicons/react/24/outline'; -import * as React from 'react'; import { IPerson } from '../../models/People'; import { PermissionsUtil } from '../../util/permissions'; import { Context } from '../../Context'; diff --git a/Keas.Mvc/ClientApp/src/components/Documents/DocumentsList.tsx b/Keas.Mvc/ClientApp/src/components/Documents/DocumentsList.tsx index ccc8a13e5..c3a9b775f 100644 --- a/Keas.Mvc/ClientApp/src/components/Documents/DocumentsList.tsx +++ b/Keas.Mvc/ClientApp/src/components/Documents/DocumentsList.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { IDocument } from '../../models/Document'; import { DateUtil } from '../../util/dates'; diff --git a/Keas.Mvc/ClientApp/src/components/Equipment/AssignEquipment.tsx b/Keas.Mvc/ClientApp/src/components/Equipment/AssignEquipment.tsx index dd1e4392a..16b8abc8d 100644 --- a/Keas.Mvc/ClientApp/src/components/Equipment/AssignEquipment.tsx +++ b/Keas.Mvc/ClientApp/src/components/Equipment/AssignEquipment.tsx @@ -2,7 +2,6 @@ import { AssetActions } from '../Shared/AssetSummary'; import { Modal, ModalBody, ModalFooter, ModalHeading } from '../Shared/AppModal'; import { ArrowPathIcon, XMarkIcon } from '@heroicons/react/24/outline'; import { addYears, format, startOfDay } from 'date-fns'; -import * as React from 'react'; import { useEffect, useState } from 'react'; import { Button, Form } from 'reactstrap'; import { @@ -254,7 +253,7 @@ const AssignEquipment = (props: IProps) => { onClick={assignSelected} disabled={!validState || submitting} > - {equipment?.assignment ? 'Save changes' : 'Assign'} {submitting && } + {!equipment?.id ? 'Save' : equipment.assignment ? 'Save changes' : 'Assign'} {submitting && } {' '} diff --git a/Keas.Mvc/ClientApp/src/components/Equipment/DeleteEquipment.tsx b/Keas.Mvc/ClientApp/src/components/Equipment/DeleteEquipment.tsx index a42f159d1..5eb33ebca 100644 --- a/Keas.Mvc/ClientApp/src/components/Equipment/DeleteEquipment.tsx +++ b/Keas.Mvc/ClientApp/src/components/Equipment/DeleteEquipment.tsx @@ -1,6 +1,5 @@ import { Modal, ModalBody, ModalFooter, ModalHeading } from '../Shared/AppModal'; import { ArrowPathIcon } from '@heroicons/react/24/outline'; -import * as React from 'react'; import { useState } from 'react'; import { Button } from 'reactstrap'; import { IEquipment } from '../../models/Equipment'; diff --git a/Keas.Mvc/ClientApp/src/components/Equipment/DuplicateEquipment.tsx b/Keas.Mvc/ClientApp/src/components/Equipment/DuplicateEquipment.tsx index add3390c7..aab379e3c 100644 --- a/Keas.Mvc/ClientApp/src/components/Equipment/DuplicateEquipment.tsx +++ b/Keas.Mvc/ClientApp/src/components/Equipment/DuplicateEquipment.tsx @@ -231,7 +231,7 @@ const DuplicateEquipment = (props: IProps) => { {submitting ?