-
Notifications
You must be signed in to change notification settings - Fork 0
Feature item routing #66
Merged
+2,489
−1,518
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
b050e70
Downgrade history for compatibility with react-router
8429c9e
Merge branch 'feature-ItemRouting' of github.itap.purdue.edu:ECN/webq…
91b3100
npm
84bc19a
added Router component
a91daff
Added routes for items
ec0cdc5
added row click handler to include updating history
17a9860
refactored api data fetching to App, configured route to set active i…
4d7c3f4
updated style guide documentation
499108d
Formatting check
campb303 673076d
Formatting checks
f0f0874
Fix position of ItemViewAppBar
3f4a16c
Update ItemTable docs
ce3b844
Update ItemTable docs
d715315
Revert "Update ItemTable docs"
08e669f
Revert "Update ItemTable docs"
2ef841e
Revert "Fix position of ItemViewAppBar"
8d1bd3a
Revert "Formatting checks"
fc12499
Revert "Formatting check"
4e3715e
updated to utilize useHistory hook, and removed unneccesary documenta…
3299840
Updated documentation, fixed styling bug, and update to use useTheme …
7a5df3f
updated to no longer use props, and updated to use useTheme() hook
af479df
removed extraneous property
2359520
fixed imports
c4a28a3
updated component calls to match new properties, renamed data hooks, …
a021813
Updated dark mode
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,25 @@ | ||
| The ItemTable is the primary view for webqueue2. It displays item metadata for items of selected queues and allows for filtering by field and opening an item by clicking. By default, it is pre-configured to fetch data from the webqueue2 API. It is to be used with the [ItemTableAppBar](/#/Components/ItemTableAppBar). | ||
| The ItemTable is the primary view for webqueue2. It displays item metadata for items of selected queues and allows for filtering by field and opening an item by clicking. Items are passed in as a required parameter. It is to be used with the [ItemTableAppBar](/#/Components/ItemTableAppBar). | ||
|
|
||
| It is based on [material-table](https://material-table.com/). | ||
celfreic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ```jsx | ||
| import React, { useState } from "react"; | ||
| import React, { useState, useEffect } from "react"; | ||
|
|
||
| const [activeItem, setActiveItem] = useState({}); | ||
| const [sidebarOpen, setSidebarOpen] = useState({}); | ||
| const [itemQueue, setItemQueue] = useState([]); | ||
|
|
||
| <ItemTable setActiveItem={activeItem} setSidebarOpen={setSidebarOpen} /> | ||
| const testItems = [{"queue": "ce", "number": 9, "lastUpdated": "09-11-20 12:14 PM", "isLocked": false, "userEmail": "lslusher@purdue.edu", "userName": "Slusher, Laura M", "userAlias": "lslusher", "assignedTo": "bekuma", "subject": "RE: New laptop", "status": "waiting on reply/time to call", "priority": "deploy", "department": "che", "building": "frny", "dateReceived": "2020-03-12T18:07:27+0000"}, {"queue": "ce", "number": 42, "lastUpdated": "09-11-20 12:14 PM", "isLocked": false, "userEmail": "feng293@purdue.edu", "userName": "", "userAlias": "feng293", "assignedTo": "schmid22", "subject": "Upgrade system and Abaqus", "status": "", "priority": "", "department": "", "building": "", "dateReceived": "2020-05-14T10:21:32-0400"}, {"queue": "ce", "number": 51, "lastUpdated": "09-11-20 12:14 PM", "isLocked": false, "userEmail": "jclauso@purdue.edu", "userName": "", "userAlias": "jclauso", "assignedTo": "schmid22", "subject": "ECN privileges for future grad student", "status": "Waiting for reply", "priority": "", "department": "", "building": "", "dateReceived": "2020-05-14T15:03:07-0400"}]; | ||
|
|
||
|
|
||
| useEffect(() => { | ||
|
|
||
| setItemQueue(testItems) | ||
|
|
||
| }, []); | ||
|
|
||
| <ItemTable items={itemQueue} /> | ||
| ``` | ||
|
|
||
| ```jsx static | ||
| <ItemTable setActiveItem={{}} setSidebarOpen={{}} /> | ||
| <ItemTable items={someArray} /> | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.