Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature-conversational-ui' into …
Browse files Browse the repository at this point in the history
…enhancement-responsive-itemtable
  • Loading branch information
Tyler Jordan Wright committed Sep 23, 2020
2 parents 9bd5dbc + c538754 commit 674cf0f
Show file tree
Hide file tree
Showing 30 changed files with 1,125 additions and 103 deletions.
436 changes: 434 additions & 2 deletions api/ECNQueue.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions api/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ lazy-object-proxy==1.4.3
MarkupSafe==1.1.1
mccabe==0.6.1
pylint==2.5.3
python-dateutil==2.8.1
pytz==2020.1
six==1.15.0
toml==0.10.1
Expand Down
217 changes: 217 additions & 0 deletions docs/parseSectionsFormat.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
[
{
"type": "directoryInformation",

// An array of lines with non-printable characters.
// Example from aae 1
"content": [
"\n",
"\tName: Jerry L Guerrero\n",
" Login: jerry\n",
" Computer: x-ee27å0bpc1 (128.46.164.29)\n",
" Location: EE 270B\n",
" Email: jerry@purdue.edu\n",
" Phone: \n",
" Office: \n",
" UNIX Dir: /home/pier/c/jerry\n",
" Zero Dir: U=\\\\pier.ecn.purdue.edu\\jerry\n",
" User ECNDB: http://eng.purdue.edu/jump/bcafa8\n",
" Host ECNDB: http://eng.purdue.edu/jump/2dbd461 \n",
" Subject: Win7 to Win10 Migration List - kevin\n"
]
},

{
"type": "initialMessage",

// RFC 8061 formatted date string
// Maps to Item.dateReceived
"date": "2020-09-11",

// RFC 8061 formatted time string
// Maps to Item.dateReceived
"time": "01:26:45+00:00",

// String of user's real name. Could be blank
// Maps to Item.userName
"userName": "Justin Campbell",

// String of user's email
// Maps to Item.userEmail
"userEmail": "campb303@purdue.edu",

// Array of dictionaries of names and emails for cc'd recipients. Could be blank, could have multiple addresses, names could be blank
// Comes from headers
// See: https://docs.python.org/3/library/email.utils.html#email.utils.parseaddr for parsing this field
"ccRecipients": [
{
"name": "John Doe",
"email": "johndoe@example.com"
},
{
"name": "",
"email": "janesmith@example.com"
}
],

// An array of lines with non-printable characters.
"content": [
"I need some help with something.\n"
]
},

{
"type": "edit",

// Career account alias for ECN user who added edit
// Appears after the first colon followed by a space `: ` in the delimiter string
// Ends just before the next space
// Ex: *** Edited by: knewell at: 04/22/20 16:39:51 ***
// (Start) ^ ^ (End)
"by": "knewell",

// RFC 8061 formatted date string
// Appears after the second colon followed by a space `: ` in the delimiter string
// Ends just before the next space
// Ex: *** Edited by: knewell at: 04/22/20 16:39:51 ***
// (Start) ^ ^ (End)
"date": "2020-04-22T16:39:51",

// RFC 8061 formatted time string
// Appears after the first space following the second colon followed by a space `: ` in the delimiter string
// Ends just before the next space
// Ex: *** Edited by: knewell at: 04/22/20 16:39:51 ***
// (Start) ^ ^ (End)
"time": "16:39:51",

// An array of lines with non-printable characters.
"content": [
"This is related to another item. I need to do X next.\n"
]
},

{
"type": "status",

// Career account alias for ECN user who added edit
// Appears after the first colon followed by a space `: ` in the delimiter string
// Ends just before the next space
// Ex: *** Status updated by: knewell at: 4/23/2020 10:35:47 ***
// (Start) ^ ^ (End)
"by": "knewell",

// RFC 8061 formatted date string
// Appears after the second colon followed by a space `: ` in the delimiter string
// Ends just before the next space
// Ex: *** Status updated by: knewell at: 4/23/2020 10:35:47 ***
// (Start) ^ ^ (End)
"date": "2020-04-23T10:35:47",

// RFC 8061 formatted time string
// Appears after the first space following the second colon followed by a space `: ` in the delimiter string
// Ends just before the next space
// Ex: *** Status updated by: knewell at: 4/23/2020 10:35:47 ***
// (Start) ^ ^ (End)
"time": "10:35:47",

// An array of lines with non-printable characters.
"content": [
"Doing X thing."
]
},

{
"type": "assign",

// Career account alias for ECN user changed the assignment
// Appears in the item headers and the most recent entry can be accessed by:
// >>> self.__getMostRecentHeaderByType("Assigned-To-Updated-By")
"by": "campb303",

// RFC 8061 formatted date string
// Appears in the item headers and the most recent entry can be accessed by:
// >>> self.__getMostRecentHeaderByType("Assigned-To-Updated-Time")
"date": "2020-06-23T13:27:00",

// RFC 8061 formatted time string
// Appears in the item headers and the most recent entry can be accessed by:
// >>> self.__getMostRecentHeaderByType("Assigned-To-Updated-Time")
"time": "13:27:00",

// Career account alias for ECN user the item was assigned to
// Appears in the item headers and the most recent entry can be accessed by:
// >>> self.__getMostRecentHeaderByType("Assigned-To")
"to": "campb303",
},

{
"type": "replyFromECN",

// Career account alias for ECN user who added edit
// Appears after the first colon followed by a space `: ` in the delimiter string
// Ends just before the next space
// Ex: *** Replied by: ewhile at: 05/08/20 09:21:43 ***
// (Start) ^ ^ (End)
"by": "ewhile",

// RFC 8061 formatted date string
// Appears after the second colon followed by a space `: ` in the delimiter string
// Ends just before the next space
// Ex: *** Replied by: ewhile at: 05/08/20 09:21:43 ***
// (Start) ^ ^ (End)
"date": "2020-05-08",

// RFC 8061 formatted time string
// Appears after the first space following the second colon followed by a space `: ` in the delimiter string
// Ends just before the next space
// Ex: *** Replied by: ewhile at: 05/08/20 09:21:43 ***
// (Start) ^ ^ (End)
"time": "09:21:43",

// An array of lines with non-printable characters.
"content": [
"Sascha,\n",
"\n",
"Chicken kevin biltong, flank jowl prosciutto shoulder meatball meatloaf sirloin.\n",
"\n",
"Ethan White\n",
"ECN\n"
]
},

{
"type": "replyFromUser",

// RFC 8061 formatted date string
// Appears in the headers of a merged message
// Might be possible to create submessage and parse the headers using the email library
"date": "2020-05-08",

// RFC 8061 formatted date string
// Appears in the headers of a merged message
// Might be possible to create submessage and parse the headers using the email library
"time": "13:57:18+00:00",

// String of user's real name. Could be blank
// Maps to Item.userName
"userName": "Reckowsky, Michael J.",

// String of user's email
// Maps to Item.userEmail
"userEmail": "mreckowsky@purdue.edu",

// Array of dictionaries of names and emails for cc'd recipients. Could be blank, could have multiple addresses, names could be blank
// Comes from headers
// See: https://docs.python.org/3/library/email.utils.html#email.utils.parseaddr for parsing this field
"ccRecipients": [],

// An array of lines with non-printable characters.
"content": [
"Ethan,\n",
"\n",
"Biltong beef ribs doner chuck, pork chop jowl salami cow filet mignon pork.\n",
"\n",
"Mike\n",
]
},
]
34 changes: 17 additions & 17 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import React, { useState } from "react";
import { ThemeProvider } from "@material-ui/core/styles";
import webqueueTheme from "./theme";
import { Box, makeStyles } from "@material-ui/core";
import CustomAppBar from "./CustomAppBar";
import { Box, makeStyles, Paper } from "@material-ui/core";
import ItemTableAppBar from "./components/ItemTableAppBar/";
import ItemTable from "./components/ItemTable/";
import ItemViewAppBar from "./ItemViewAppBar";
import ItemView from "./ItemView";
import ItemViewAppBar from "./components/ItemViewAppBar/";
import ItemView from "./components/ItemView/";
import clsx from "clsx";

const testItem = {"queue": "ce", "number": 100, "lastUpdated": "07-23-20 10:11 PM", "headers": [{"type": "Merged-Time", "content": "Tue, 23 Jun 2020 13:31:53 -0400"}, {"type": "Merged-By", "content": "campb303"}, {"type": "QTime", "content": "1"}, {"type": "QTime-Updated-Time", "content": "Tue, 23 Jun 2020 13:28:50 EDT"}, {"type": "QTime-Updated-By", "content": "campb303"}, {"type": "Time", "content": "1"}, {"type": "Time-Updated-Time", "content": "Tue, 23 Jun 2020 13:28:50 EDT"}, {"type": "Time-Updated-By", "content": "campb303"}, {"type": "Replied-Time", "content": "Tue, 23 Jun 2020 13:28:48 -0400"}, {"type": "Replied-By", "content": "campb303"}, {"type": "Edited-Time", "content": "Tue, 23 Jun 2020 13:27:56 -0400"}, {"type": "Edited-By", "content": "campb303"}, {"type": "QAssigned-To", "content": "campb303"}, {"type": "QAssigned-To-Updated-Time", "content": "Tue, 23 Jun 2020 13:27:00 EDT"}, {"type": "QAssigned-To-Updated-By", "content": "campb303"}, {"type": "Assigned-To", "content": "campb303"}, {"type": "Assigned-To-Updated-Time", "content": "Tue, 23 Jun 2020 13:27:00 EDT"}, {"type": "Assigned-To-Updated-By", "content": "campb303"}, {"type": "QStatus", "content": "Dont Delete"}, {"type": "QStatus-Updated-Time", "content": "Tue, 23 Jun 2020 13:26:55 EDT"}, {"type": "QStatus-Updated-By", "content": "campb303"}, {"type": "Status", "content": "Dont Delete"}, {"type": "Status-Updated-Time", "content": "Tue, 23 Jun 2020 13:26:55 EDT"}, {"type": "Status-Updated-By", "content": "campb303"}, {"type": "Date", "content": "Tue, 23 Jun 2020 13:25:51 -0400"}, {"type": "From", "content": "Justin Campbell <campb303@purdue.edu>"}, {"type": "Message-ID", "content": "<911CE050-3240-4980-91DD-9C3EBB8DBCF8@purdue.edu>"}, {"type": "Subject", "content": "Beepboop"}, {"type": "To", "content": "cesite@ecn.purdue.edu"}, {"type": "Content-Type", "content": "text/plain; charset=\"utf-8\""}, {"type": "X-ECN-Queue-Original-Path", "content": "/home/pier/e/queue/Attachments/inbox/2020-06-23/208-original.txt"}], "content": ["Testtest\n", "\n", "*** Status updated by: campb303 at: 6/23/2020 13:26:55 ***\n", "Dont Delete\n", "*** Edited by: campb303 at: 06/23/20 13:27:56 ***\n", "\n", "This be an edit my boy\n", "\n", "\n", "\n", "*** Replied by: campb303 at: 06/23/20 13:28:18 ***\n", "\n", "This be a reply my son\n", "\n", "Justin\n", "ECN\n", "\n", "=== Additional information supplied by user ===\n", "\n", "Subject: Re: Beepboop\n", "From: Justin Campbell <campb303@purdue.edu>\n", "Date: Tue, 23 Jun 2020 13:30:45 -0400\n", "X-ECN-Queue-Original-Path: /home/pier/e/queue/Attachments/inbox/2020-06-23/212-original.txt\n", "X-ECN-Queue-Original-URL: https://engineering.purdue.edu/webqueue/Attachments/inbox/2020-06-23/212-original.txt\n", "\n", "Huzzah!\n", "\n", "===============================================\n"], "isLocked": "ce 100 is locked by knewell using qvi", "userEmail": "campb303@purdue.edu", "userName": "Justin Campbell", "userAlias": "campb303", "assignedTo": "campb303", "subject": "Beepboop", "status": "Dont Delete", "priority": "", "department": "", "building": "", "dateReceived": "Tue, 23 Jun 2020 13:25:51 -0400"}

function App(){
const [darkMode, setDarkMode] = useState(false);
const [activeItem, setActiveItem] = useState(testItem);
const [sidebarOpen, setSidebarOpen] = useState(true);
const [activeItem, setActiveItem] = useState({});
const [sidebarOpen, setSidebarOpen] = useState(false);

const theme = webqueueTheme(darkMode);

Expand Down Expand Up @@ -53,16 +51,18 @@ function App(){

return (
<ThemeProvider theme={theme}>
<Box display="flex">
<Box className={classes.leftCol}>
<CustomAppBar title="webqueue2" darkMode={darkMode} setDarkMode={setDarkMode} theme={theme}/>
<ItemTable setActiveItem={setActiveItem} setSidebarOpen={setSidebarOpen}/>
</Box>
<Box className={clsx(classes.rightCol, sidebarOpen && classes.rightColShift)}>
<ItemViewAppBar title={activeItem["queue"] + " " + activeItem["number"]} setSidebarOpen={setSidebarOpen} />
<ItemView activeItem={activeItem} setActiveItem={setActiveItem} setSidebarOpen={setSidebarOpen}/>
<Paper>
<Box display="flex">
<Box className={classes.leftCol}>
<ItemTableAppBar title="webqueue2" darkMode={darkMode} setDarkMode={setDarkMode} theme={theme}/>
<ItemTable setActiveItem={setActiveItem} setSidebarOpen={setSidebarOpen}/>
</Box>
<Box className={clsx(classes.rightCol, sidebarOpen && classes.rightColShift)}>
<ItemViewAppBar title={activeItem["queue"] + " " + activeItem["number"]} setSidebarOpen={setSidebarOpen} />
<ItemView activeItem={activeItem} setActiveItem={setActiveItem} setSidebarOpen={setSidebarOpen}/>
</Box>
</Box>
</Box>
</Paper>
</ThemeProvider>
);
}
Expand Down
43 changes: 0 additions & 43 deletions src/ItemMetadataView.js

This file was deleted.

29 changes: 0 additions & 29 deletions src/ItemView.js

This file was deleted.

Loading

0 comments on commit 674cf0f

Please sign in to comment.