diff --git a/README.md b/README.md index 8ad5bbc..254933a 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,21 @@ Para cada materia, es posible elegir tanto los _estados_ como la _modalidad de c ### Modalidades de cursada - **Anual**: Cursada anual. El nodo asociado posee la forma de un rectángulo. -- **Cuatrimestral**: Cursada cuatrimestral. El nodo asociado posee la forma de un óvalo. +- **Cuatrimestral**: Cursada cuatrimestral. El nodo asociado posee la forma de una elipse.

+### Correlativas de materias + +- **Cursada**: La materia origen debe estar **firmada, "regularizada" o bien con final pendiente** para poder cursar la materia destino. La arista asociada es de trazo discontinuo. +- **Aprobada**: La materia origen debe estar **aprobada** para poder cursar la materia destino. La arista asociada es de trazo continuo. + +

+ +

+ ### Generación del digrafo [Viz.js](https://github.com/mdaines/viz-js) es una herramienta que permite generar grafos en el browser mediante [Graphviz](https://graphviz.org/) a partir de la especificación de una gramática abstracta en [DOT](https://graphviz.org/doc/info/lang.html), siendo en este caso empleado para generar el digrafo del plan de estudios seleccionado. @@ -41,7 +50,7 @@ Es posible exportar el digrafo en formato SVG haciendo click en "Exportar". Es posible levantar la aplicación localmente mediante Docker. La imagen del contenedor es obtenible de las siguientes formas estipuladas. -### Obtener la imagen a partir del repositorio: +### Obtener la imagen a partir del repositorio Luego de clonar el repositorio, posicionarse en el directorio raíz del proyecto y ejecutar: @@ -49,7 +58,7 @@ Luego de clonar el repositorio, posicionarse en el directorio raíz del proyecto docker build -t utn-flowchart . ``` -### Obtener la imagen de Docker Hub: +### Obtener la imagen de Docker Hub La misma es obtenible mediante: diff --git a/package.json b/package.json index 6a8a13f..9c48b27 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,8 @@ "@testing-library/react": "^14.1.2", "@types/react-dom": "^18.2.17", "@types/react": "^18.2.46", - "@typescript-eslint/eslint-plugin": "^6.16.0", - "@typescript-eslint/parser": "^6.16.0", + "@typescript-eslint/eslint-plugin": "^6.17.0", + "@typescript-eslint/parser": "^6.17.0", "@vitejs/plugin-react-swc": "^3.5.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", @@ -49,6 +49,6 @@ "react-test-renderer": "^18.2.0", "typescript": "^5.2.2", "vite": "^5.0.8", - "vitest": "^1.1.0" + "vitest": "^1.1.1" } } diff --git a/src/AppRouter.tsx b/src/AppRouter.tsx index 22ee164..916b4dd 100644 --- a/src/AppRouter.tsx +++ b/src/AppRouter.tsx @@ -3,7 +3,7 @@ import { Navigate, Route, Routes } from "react-router-dom"; import { PlanContext } from "./context"; import { plans } from "./data"; import { PlanPage } from "./pages"; -import { Plan, PlanContextProps } from "./types/types"; +import { PlanContextProps } from "./types/types"; export default function AppRouter() { const { contextPlan } = useContext(PlanContext); @@ -12,11 +12,7 @@ export default function AppRouter() { return ( {plans.map((plan) => ( - } - /> + } /> ))} } /> } /> diff --git a/src/components/__tests__/fixture.ts b/src/components/__tests__/fixture.ts index 7992782..ba1e669 100644 --- a/src/components/__tests__/fixture.ts +++ b/src/components/__tests__/fixture.ts @@ -71,7 +71,6 @@ const plan2 = { }; const contextPlanValue: PlanContextProps = { contextPlan, - setContextPlan: () => {}, updateMode: () => {}, updateStatuses: () => {}, }; diff --git a/src/context/PlanContext.tsx b/src/context/PlanContext.tsx index c75b08c..6d28da8 100644 --- a/src/context/PlanContext.tsx +++ b/src/context/PlanContext.tsx @@ -3,7 +3,6 @@ import { Plan, PlanContextProps } from "../types/types"; export const PlanContext = createContext({ contextPlan: {} as Plan, - setContextPlan: () => {}, updateMode: () => {}, updateStatuses: () => {}, }); diff --git a/src/context/PlanProvider.tsx b/src/context/PlanProvider.tsx index 50be108..74cdae8 100644 --- a/src/context/PlanProvider.tsx +++ b/src/context/PlanProvider.tsx @@ -102,7 +102,6 @@ export const PlanProvider = ({ children }: { children: ReactNode }) => { { - const { contextPlan, setContextPlan } = - useContext(PlanContext); - - useEffect(() => { - if (contextPlan.id !== plan.id) setContextPlan(plan); - }, [contextPlan.id, plan, setContextPlan]); - +export const PlanPage = () => { return ( diff --git a/src/types/types.ts b/src/types/types.ts index 8fbd2db..1d185e8 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -20,7 +20,6 @@ export interface Plan { export interface PlanContextProps { contextPlan: Plan; - setContextPlan: (plan: Plan) => void; updateMode: (subjectId: string, newMode: string) => void; updateStatuses: (subjects: Subject[], newStatus: Status) => void; } diff --git a/yarn.lock b/yarn.lock index 5485ca4..bd850d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -743,16 +743,16 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== -"@typescript-eslint/eslint-plugin@^6.16.0": - version "6.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.16.0.tgz#cc29fbd208ea976de3db7feb07755bba0ce8d8bc" - integrity sha512-O5f7Kv5o4dLWQtPX4ywPPa+v9G+1q1x8mz0Kr0pXUtKsevo+gIJHLkGc8RxaZWtP8RrhwhSNIWThnW42K9/0rQ== +"@typescript-eslint/eslint-plugin@^6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.17.0.tgz#dfc38f790704ba8a54a1277c51efdb489f6ecf9f" + integrity sha512-Vih/4xLXmY7V490dGwBQJTpIZxH4ZFH6eCVmQ4RFkB+wmaCTDAx4dtgoWwMNGKLkqRY1L6rPqzEbjorRnDo4rQ== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.16.0" - "@typescript-eslint/type-utils" "6.16.0" - "@typescript-eslint/utils" "6.16.0" - "@typescript-eslint/visitor-keys" "6.16.0" + "@typescript-eslint/scope-manager" "6.17.0" + "@typescript-eslint/type-utils" "6.17.0" + "@typescript-eslint/utils" "6.17.0" + "@typescript-eslint/visitor-keys" "6.17.0" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -760,47 +760,47 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^6.16.0": - version "6.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.16.0.tgz#36f39f63b126aa25af2ad2df13d9891e9fd5b40c" - integrity sha512-H2GM3eUo12HpKZU9njig3DF5zJ58ja6ahj1GoHEHOgQvYxzoFJJEvC1MQ7T2l9Ha+69ZSOn7RTxOdpC/y3ikMw== +"@typescript-eslint/parser@^6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.17.0.tgz#8cd7a0599888ca6056082225b2fdf9a635bf32a1" + integrity sha512-C4bBaX2orvhK+LlwrY8oWGmSl4WolCfYm513gEccdWZj0CwGadbIADb0FtVEcI+WzUyjyoBj2JRP8g25E6IB8A== dependencies: - "@typescript-eslint/scope-manager" "6.16.0" - "@typescript-eslint/types" "6.16.0" - "@typescript-eslint/typescript-estree" "6.16.0" - "@typescript-eslint/visitor-keys" "6.16.0" + "@typescript-eslint/scope-manager" "6.17.0" + "@typescript-eslint/types" "6.17.0" + "@typescript-eslint/typescript-estree" "6.17.0" + "@typescript-eslint/visitor-keys" "6.17.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@6.16.0": - version "6.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.16.0.tgz#f3e9a00fbc1d0701356359cd56489c54d9e37168" - integrity sha512-0N7Y9DSPdaBQ3sqSCwlrm9zJwkpOuc6HYm7LpzLAPqBL7dmzAUimr4M29dMkOP/tEwvOCC/Cxo//yOfJD3HUiw== +"@typescript-eslint/scope-manager@6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.17.0.tgz#70e6c1334d0d76562dfa61aed9009c140a7601b4" + integrity sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA== dependencies: - "@typescript-eslint/types" "6.16.0" - "@typescript-eslint/visitor-keys" "6.16.0" + "@typescript-eslint/types" "6.17.0" + "@typescript-eslint/visitor-keys" "6.17.0" -"@typescript-eslint/type-utils@6.16.0": - version "6.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.16.0.tgz#5f21c3e49e540ad132dc87fc99af463c184d5ed1" - integrity sha512-ThmrEOcARmOnoyQfYkHw/DX2SEYBalVECmoldVuH6qagKROp/jMnfXpAU/pAIWub9c4YTxga+XwgAkoA0pxfmg== +"@typescript-eslint/type-utils@6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.17.0.tgz#5febad3f523e393006614cbda28b826925b728d5" + integrity sha512-hDXcWmnbtn4P2B37ka3nil3yi3VCQO2QEB9gBiHJmQp5wmyQWqnjA85+ZcE8c4FqnaB6lBwMrPkgd4aBYz3iNg== dependencies: - "@typescript-eslint/typescript-estree" "6.16.0" - "@typescript-eslint/utils" "6.16.0" + "@typescript-eslint/typescript-estree" "6.17.0" + "@typescript-eslint/utils" "6.17.0" debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/types@6.16.0": - version "6.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.16.0.tgz#a3abe0045737d44d8234708d5ed8fef5d59dc91e" - integrity sha512-hvDFpLEvTJoHutVl87+MG/c5C8I6LOgEx05zExTSJDEVU7hhR3jhV8M5zuggbdFCw98+HhZWPHZeKS97kS3JoQ== +"@typescript-eslint/types@6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.17.0.tgz#844a92eb7c527110bf9a7d177e3f22bd5a2f40cb" + integrity sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A== -"@typescript-eslint/typescript-estree@6.16.0": - version "6.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.16.0.tgz#d6e0578e4f593045f0df06c4b3a22bd6f13f2d03" - integrity sha512-VTWZuixh/vr7nih6CfrdpmFNLEnoVBF1skfjdyGnNwXOH1SLeHItGdZDHhhAIzd3ACazyY2Fg76zuzOVTaknGA== +"@typescript-eslint/typescript-estree@6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.17.0.tgz#b913d19886c52d8dc3db856903a36c6c64fd62aa" + integrity sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg== dependencies: - "@typescript-eslint/types" "6.16.0" - "@typescript-eslint/visitor-keys" "6.16.0" + "@typescript-eslint/types" "6.17.0" + "@typescript-eslint/visitor-keys" "6.17.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -808,25 +808,25 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.16.0": - version "6.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.16.0.tgz#1c291492d34670f9210d2b7fcf6b402bea3134ae" - integrity sha512-T83QPKrBm6n//q9mv7oiSvy/Xq/7Hyw9SzSEhMHJwznEmQayfBM87+oAlkNAMEO7/MjIwKyOHgBJbxB0s7gx2A== +"@typescript-eslint/utils@6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.17.0.tgz#f2b16d4c9984474656c420438cdede7eccd4079e" + integrity sha512-LofsSPjN/ITNkzV47hxas2JCsNCEnGhVvocfyOcLzT9c/tSZE7SfhS/iWtzP1lKNOEfLhRTZz6xqI8N2RzweSQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.16.0" - "@typescript-eslint/types" "6.16.0" - "@typescript-eslint/typescript-estree" "6.16.0" + "@typescript-eslint/scope-manager" "6.17.0" + "@typescript-eslint/types" "6.17.0" + "@typescript-eslint/typescript-estree" "6.17.0" semver "^7.5.4" -"@typescript-eslint/visitor-keys@6.16.0": - version "6.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.16.0.tgz#d50da18a05d91318ed3e7e8889bda0edc35f3a10" - integrity sha512-QSFQLruk7fhs91a/Ep/LqRdbJCZ1Rq03rqBdKT5Ky17Sz8zRLUksqIe9DW0pKtg/Z35/ztbLQ6qpOCN6rOC11A== +"@typescript-eslint/visitor-keys@6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.17.0.tgz#3ed043709c39b43ec1e58694f329e0b0430c26b6" + integrity sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg== dependencies: - "@typescript-eslint/types" "6.16.0" + "@typescript-eslint/types" "6.17.0" eslint-visitor-keys "^3.4.1" "@ungap/structured-clone@^1.2.0": @@ -841,44 +841,44 @@ dependencies: "@swc/core" "^1.3.96" -"@vitest/expect@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-1.1.0.tgz#f58eef7de090ad65f30bb93ec54fa9f94c9d1d5d" - integrity sha512-9IE2WWkcJo2BR9eqtY5MIo3TPmS50Pnwpm66A6neb2hvk/QSLfPXBz2qdiwUOQkwyFuuXEUj5380CbwfzW4+/w== +"@vitest/expect@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-1.1.1.tgz#6b00a5e9ecccdc9da112e89214693a857564e39c" + integrity sha512-Qpw01C2Hyb3085jBkOJLQ7HRX0Ncnh2qV4p+xWmmhcIUlMykUF69zsnZ1vPmAjZpomw9+5tWEGOQ0GTfR8U+kA== dependencies: - "@vitest/spy" "1.1.0" - "@vitest/utils" "1.1.0" + "@vitest/spy" "1.1.1" + "@vitest/utils" "1.1.1" chai "^4.3.10" -"@vitest/runner@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-1.1.0.tgz#b3bf60f4a78f4324ca09811dd0f87b721a96b534" - integrity sha512-zdNLJ00pm5z/uhbWF6aeIJCGMSyTyWImy3Fcp9piRGvueERFlQFbUwCpzVce79OLm2UHk9iwaMSOaU9jVHgNVw== +"@vitest/runner@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-1.1.1.tgz#c2c2a6baa25f3964c3434e94628b324bc0f19587" + integrity sha512-8HokyJo1SnSi3uPFKfWm/Oq1qDwLC4QDcVsqpXIXwsRPAg3gIDh8EbZ1ri8cmQkBxdOu62aOF9B4xcqJhvt4xQ== dependencies: - "@vitest/utils" "1.1.0" + "@vitest/utils" "1.1.1" p-limit "^5.0.0" pathe "^1.1.1" -"@vitest/snapshot@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-1.1.0.tgz#b9924e4303382b43bb2c31061b173e69a6fb3437" - integrity sha512-5O/wyZg09V5qmNmAlUgCBqflvn2ylgsWJRRuPrnHEfDNT6tQpQ8O1isNGgo+VxofISHqz961SG3iVvt3SPK/QQ== +"@vitest/snapshot@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-1.1.1.tgz#40261901102e131cb09f23034884ad2c1c5af317" + integrity sha512-WnMHjv4VdHLbFGgCdVVvyRkRPnOKN75JJg+LLTdr6ah7YnL75W+7CTIMdzPEPzaDxA8r5yvSVlc1d8lH3yE28w== dependencies: magic-string "^0.30.5" pathe "^1.1.1" pretty-format "^29.7.0" -"@vitest/spy@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-1.1.0.tgz#7f40697e4fc217ac8c3cc89a865d1751b263f561" - integrity sha512-sNOVSU/GE+7+P76qYo+VXdXhXffzWZcYIPQfmkiRxaNCSPiLANvQx5Mx6ZURJ/ndtEkUJEpvKLXqAYTKEY+lTg== +"@vitest/spy@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-1.1.1.tgz#49a9c3f9b86f07b86333fc14d1667691b9a77a5c" + integrity sha512-hDU2KkOTfFp4WFFPWwHFauddwcKuGQ7gF6Un/ZZkCogoAiTMN7/7YKvUDbywPZZ754iCQGjdUmXN3t4k0jm1IQ== dependencies: tinyspy "^2.2.0" -"@vitest/utils@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-1.1.0.tgz#d177a5f41bdb484bbb43c8d73a77ca782df068b5" - integrity sha512-z+s510fKmYz4Y41XhNs3vcuFTFhcij2YF7F8VQfMEYAAUfqQh0Zfg7+w9xdgFGhPf3tX3TicAe+8BDITk6ampQ== +"@vitest/utils@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-1.1.1.tgz#493d1963d917a3ac29fbd4c36c1c31cfd17a7b41" + integrity sha512-E9LedH093vST/JuBSyHLFMpxJKW3dLhe/flUSPFedoyj4wKiFX7Jm8gYLtOIiin59dgrssfmFv0BJ1u8P/LC/A== dependencies: diff-sequences "^29.6.3" loupe "^2.3.7" @@ -3215,10 +3215,10 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" -vite-node@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-1.1.0.tgz#0ebcb7398692e378954786dfba28e905e28a76b4" - integrity sha512-jV48DDUxGLEBdHCQvxL1mEh7+naVy+nhUUUaPAZLd3FJgXuxQiewHcfeZebbJ6onDqNGkP4r3MhQ342PRlG81Q== +vite-node@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-1.1.1.tgz#8cf16d5f841898de919653462c56dc99bb7d2b94" + integrity sha512-2bGE5w4jvym5v8llF6Gu1oBrmImoNSs4WmRVcavnG2me6+8UQntTqLiAMFyiAobp+ZXhj5ZFhI7SmLiFr/jrow== dependencies: cac "^6.7.14" debug "^4.3.4" @@ -3237,16 +3237,16 @@ vite@^5.0.0, vite@^5.0.8: optionalDependencies: fsevents "~2.3.3" -vitest@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vitest/-/vitest-1.1.0.tgz#47ba67c564aa137b53b0197d2a992908e7f5b04d" - integrity sha512-oDFiCrw7dd3Jf06HoMtSRARivvyjHJaTxikFxuqJjO76U436PqlVw1uLn7a8OSPrhSfMGVaRakKpA2lePdw79A== - dependencies: - "@vitest/expect" "1.1.0" - "@vitest/runner" "1.1.0" - "@vitest/snapshot" "1.1.0" - "@vitest/spy" "1.1.0" - "@vitest/utils" "1.1.0" +vitest@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-1.1.1.tgz#8ebd1a3cdca05da6e589b7d1f504ae952fecbeef" + integrity sha512-Ry2qs4UOu/KjpXVfOCfQkTnwSXYGrqTbBZxw6reIYEFjSy1QUARRg5pxiI5BEXy+kBVntxUYNMlq4Co+2vD3fQ== + dependencies: + "@vitest/expect" "1.1.1" + "@vitest/runner" "1.1.1" + "@vitest/snapshot" "1.1.1" + "@vitest/spy" "1.1.1" + "@vitest/utils" "1.1.1" acorn-walk "^8.3.0" cac "^6.7.14" chai "^4.3.10" @@ -3261,7 +3261,7 @@ vitest@^1.1.0: tinybench "^2.5.1" tinypool "^0.8.1" vite "^5.0.0" - vite-node "1.1.0" + vite-node "1.1.1" why-is-node-running "^2.2.2" w3c-xmlserializer@^5.0.0: