yeatmanlab / roar-dashboard

A dashboard to administer ROAR assessments
https://roar.education
Other
4 stars 4 forks source link

Migrate Manage Tasks and Manage Variants pages to composable TanStack queries #776

Closed maximilianoertel closed 1 month ago

maximilianoertel commented 1 month ago

Proposed changes

This PR migrates the Manage Tasks and Manage Variants pages to use new composable TanStack queries and mutations.

Additionally, this PR improve the error handling for failed task creations by adding a toast notification. Up until now, errors would only be logged to the console but not displayed to the user.

Types of changes

Checklist

Justification of missing checklist items

n/a

Further comments

n/a

Ref https://github.com/yeatmanlab/roar/issues/318

github-actions[bot] commented 1 month ago

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 1.76% 134 / 7581
🔵 Statements 1.67% 140 / 8338
🔵 Functions 1.72% 32 / 1853
🔵 Branches 0.83% 38 / 4528
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/components/CreateAdministration.vue 0% 0% 0% 0% 196-202, 204, 206, 210-216, 211-213, 212, 215, 218-223, 219-221, 220, 222, 225-231, 226-228, 227, 230, 236-243, 238-242, 239-241, 245-247, 253-261, 263-265, 264, 267-269, 268, 272-281, 273-280, 275-279, 283-285, 284, 288-297, 289-296, 291-295, 299-301, 300, 304-313, 305-312, 307-311, 315-317, 316, 320-329, 321-328, 323-327, 331-333, 332, 336-345, 337-344, 339-343, 347-349, 348, 351-355, 352-354, 353, 357-361, 358-360, 359, 363-369, 365, 371-377, 373, 379-385, 381, 387-393, 389, 395-401, 397, 403-409, 405, 414, 416-419, 421-437, 439-447, 449, 451-456, 452-454, 453, 455, 458-463, 459-461, 460, 462, 468-476, 469-475, 478-482, 479-481, 480, 487-489, 491-493, 492, 495-497, 496, 499-512, 500-511, 501-505, 508-510, 514-518, 515, 515-516, 516-517, 520-525, 521, 521-523, 523-524, 524, 527-530, 528, 528-529, 535-538, 537, 537, 540-543, 542, 542, 545-626, 546-625, 550-559, 551-558, 561-622, 563-569, 564-568, 571-612, 573-591, 591, 593-608, 596-603, 606-607, 610-611, 614-621, 624, 632-635, 633, 633-634, 637-639, 638, 638, 641-645, 642, 642, 644, 647-652, 648-651, 650, 654-679, 655-678, 656-669, 662-664, 664-668, 667, 670-673, 675-677, 676, 682-691, 683-690, 685-688, 687, 689, 693-702, 694-701, 696-699, 698, 700, 704-713, 705-712, 707-710, 709, 711, 715-722, 716-721, 718-719, 719-720, 724-733, 725-732, 727-730, 729, 731, 2-6, 8, 11, 15-18, 25, 34-35, 42, 51-53, 65, 71-72, 84, 96, 99-101, 1, 104, 121-125, 133, 142, 148, 153-154, 1-21, 1-38, 1-55, 1-74, 92, 1-127, 1-135, 1-149
src/components/tasks/ManageTasks.vue 0% 0% 0% 0% 436-441, 443-444, 446, 446, 446-447, 449-452, 450, 450-451, 451, 455, 458, 461, 463-466, 468, 470-475, 471, 471-474, 473, 477-479, 478, 482, 484, 486-489, 491-492, 495-498, 496, 496-497, 500-502, 501, 501, 504-506, 505, 505, 508-510, 512-520, 513, 513-519, 515-518, 523-532, 535-539, 541, 545-551, 554-560, 564-568, 573, 577-579, 578, 582-585, 583, 583-584, 588-593, 589-591, 590, 592, 596-598, 597, 602-612, 603, 603, 605-610, 607-609, 608, 611, 616-648, 617-620, 618-619, 622-633, 623-632, 625-631, 635-646, 636-645, 638-644, 647, 650-684, 652, 652, 654-655, 657-667, 669-683, 671-672, 675-681, 686-732, 687-688, 688-689, 689-690, 690-691, 691, 693-695, 694, 697-698, 700-710, 712-714, 713, 716-731, 718, 723-729, 737, 739-744, 740-742, 741, 743, 748, 750, 752-760, 753-759, 754-758, 755, 757, 762, 764, 767-771, 768-770, 773-776, 774-775, 11, 15-17, 1, 31, 39-40, 54, 62, 71-72, 80, 94, 108, 110, 132-135, 137, 158, 178-179, 183, 187, 191, 196, 208-212, 222, 224, 239, 328, 1-4, 7, 13, 1-23, 1-46, 1-67, 1-76, 1-87, 1-111, 1-113, 1-115, 1-117, 1-119, 125, 1-138, 1-140, 1-142, 1-144, 1-146, 152, 165, 174, 1-180, 1-184, 1-188, 1-192, 216, 223, 1-230, 1-256, 1-262, 1-267, 278, 1-287, 1-288, 1-292, 1-298, 1-304, 316, 1-343, 1-349, 1-354, 365, 1-375, 1-376, 1-379, 1-385, 1-391, 403
src/components/tasks/ManageVariants.vue 0% 0% 0% 0% 450-455, 457-458, 460-461, 463, 466, 474, 476-477, 479-484, 480, 480-483, 482, 487, 489-492, 494-496, 495, 499-502, 500, 500-501, 504-506, 505, 505, 508-510, 509, 509, 512-514, 516-518, 520-528, 521, 521-527, 523-526, 531-537, 532-534, 533, 536, 536, 540-545, 548-555, 559-571, 560, 562-564, 563, 566-568, 567, 570, 575-586, 577-579, 578, 581-585, 581-585, 589, 594-604, 595-602, 596-601, 597-600, 603, 607-612, 608-610, 609, 611, 615-617, 616, 620-623, 621, 621-622, 631-633, 632, 637-643, 638-641, 640, 642, 648-658, 649, 649, 651-656, 653-655, 654, 657, 661-672, 662-670, 663-669, 671, 677-703, 678-689, 679-688, 681-687, 691-702, 692-701, 694-700, 705-752, 707, 707, 711-714, 712-713, 716-719, 717-718, 721, 724-735, 737-751, 739-740, 743-749, 754-803, 755, 755, 757, 757, 759-760, 760-761, 761, 763, 763, 765-767, 766, 769, 771-774, 776-785, 787-802, 789-791, 794-800, 806-810, 812-818, 820-821, 824-829, 825-828, 831-835, 832, 834, 10, 12, 14-15, 1, 41, 52-53, 67, 79, 83, 86, 102, 107-108, 112-113, 200-201, 210, 219-220, 231, 244, 246, 274, 1-4, 7, 11, 1-30, 37, 1-59, 1-104, 1-109, 1-117, 1-124, 1-134, 146, 1-153, 1-155, 1-163, 1-169, 1-175, 187, 1-203, 1-212, 1-222, 245, 1-252, 257, 1-264, 266, 269, 1-290, 1-296, 1-301, 312, 1-320, 1-321, 1-325, 1-331, 1-337, 348
src/composables/mutations/useAddTaskMutation.js 100% 100% 100% 100%
src/composables/mutations/useAddTaskVariantMutation.js 0% 100% 0% 0% 17-31, 18-19, 21-30, 24, 27-28
src/composables/mutations/useUpdateTaskMutation.js 100% 100% 100% 100%
src/composables/mutations/useUpdateTaskVariantMutation.js 0% 100% 0% 0% 17-31, 18-19, 21-30, 24, 27-28
src/composables/queries/useTaskVariantsQuery.js 100% 75% 100% 100%
src/composables/queries/useTasksQuery.js 100% 75% 100% 100%
src/constants/mutationKeys.js 100% 100% 100% 100%
src/constants/queryKeys.js 100% 100% 100% 100%
Generated in workflow #254
github-actions[bot] commented 1 month ago

Visit the preview URL for this PR (updated for commit c3ee6d2):

https://roar-staging--pr776-ref-318-query-compos-bw8qp508.web.app

(expires Tue, 17 Sep 2024 06:51:18 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 2631e9c58fd0104ecbfddd72a62245ddac467460

cypress[bot] commented 1 month ago

roar-dashboard-e2e    Run #6042

Run Properties:  status check passed Passed #6042  •  git commit c3ee6d2fed: Component Tests for PR 776 "Migrate Manage Tasks and Manage Variants pages to co...
Project roar-dashboard-e2e
Branch Review ref/318/query-composables-manage-tasks
Run status status check passed Passed #6042
Run duration 01m 23s
Commit git commit c3ee6d2fed: Component Tests for PR 776 "Migrate Manage Tasks and Manage Variants pages to co...
Committer Maximilian Oertel
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 2
View all changes introduced in this branch ↗︎