Skip to content

Commit bccc758

Browse files
committed
πŸ‘©πŸ»β€πŸ’» WORKING IN PROGRESS
1 parent bdbf759 commit bccc758

File tree

17 files changed

+1414
-5
lines changed

17 files changed

+1414
-5
lines changed

β€Žpackage.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"query-string": "^6.12.1",
4242
"react": "^16.8.3",
4343
"react-app-rewire-postcss": "^3.0.2",
44+
"react-charts": "^2.0.0-beta.7",
4445
"react-copy-to-clipboard": "^5.0.1",
4546
"react-datasheet": "^1.4.1",
4647
"react-dom": "^16.8.3",

β€Žsrc/App.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ body {
4444
margin-top: 0px !important;
4545
}
4646

47+
.mt--10 {
48+
margin-top: -10px !important;
49+
}
50+
4751
.mr-0 {
4852
margin-right: 0px !important;
4953
}
@@ -338,6 +342,10 @@ body {
338342
color: #676767 !important;
339343
}
340344

345+
.text-dark-grey {
346+
color: #5e5e5e !important;
347+
}
348+
341349
.text-black {
342350
color: #000000 !important;
343351
}
@@ -538,6 +546,14 @@ body {
538546
height: 38px !important;
539547
}
540548

549+
.h-24 {
550+
height: 24px !important;
551+
}
552+
553+
.h-220 {
554+
height: 220px !important;
555+
}
556+
541557
.small-inline {
542558
display: inline-block;
543559
padding-top: 10px;

β€Žsrc/assets/s3.png

38.3 KB
Loading

β€Žsrc/common/dateUtils.js

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Reformat time to the "DD MMM YYYY" format like "12 Aug 2019"
2-
export const longDate = (date) => {
2+
export const longDate = date => {
33
var mydate = new Date(date);
44
var month = [
55
'Jan',
@@ -19,7 +19,7 @@ export const longDate = (date) => {
1919
return str;
2020
};
2121

22-
export const toYearMonthDay = (isoDate) => {
22+
export const toYearMonthDay = isoDate => {
2323
/*
2424
* Convert ISO8601 UTC datetime string to local datetime and format as
2525
* yyyy-mm-dd date string.
@@ -39,3 +39,34 @@ export const toYearMonthDay = (isoDate) => {
3939
}
4040
return date;
4141
};
42+
43+
// Reformat time to the date and time format
44+
export const dateTime = date => {
45+
var mydate = new Date(date);
46+
var month = [
47+
'Jan',
48+
'Feb',
49+
'Mar',
50+
'Apr',
51+
'May',
52+
'Jun',
53+
'Jul',
54+
'Aug',
55+
'Sept',
56+
'Oct',
57+
'Nov',
58+
'Dec',
59+
][mydate.getMonth()];
60+
const weekday = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
61+
var str =
62+
weekday[mydate.getDay()] +
63+
', ' +
64+
month +
65+
' ' +
66+
mydate.getUTCDate() +
67+
', ' +
68+
mydate.getFullYear() +
69+
', ' +
70+
mydate.toLocaleTimeString([], {hour: '2-digit', minute: '2-digit'});
71+
return str;
72+
};

β€Žsrc/components/Header/Header.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ const Header = ({location}) => {
277277
<Label content="beta" color="blue" attached="bottom right" />
278278
</Menu.Item>
279279
)}
280+
{hasPermission(profile, 'view_settings') && (
281+
<Menu.Item as={Nav} to="/s3-accounting">
282+
S3 Accounting
283+
<Label content="beta" color="blue" attached="bottom right" />
284+
</Menu.Item>
285+
)}
280286
<Menu.Menu position="right">
281287
{hasPermission(profile, 'add_referraltoken') && (
282288
<AddUserButton profile={profile} />

β€Žsrc/routes/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import {
5151
TemplatesView,
5252
} from '../admin/views';
5353
import ReleaseRoutes from '../releases/routes';
54+
import S3AccountingRoutes from '../s3Accounting/routes';
5455
import TrackedRoute from './TrackedRoute';
5556

5657
const Routes = () => (
@@ -74,6 +75,7 @@ const Routes = () => (
7475
<PrivateRoute exact path="/" component={StudyListView} />
7576
<PrivateRoute exact path="/study" component={StudyListView} />
7677
<ReleaseRoutes path="/releases" />
78+
<S3AccountingRoutes path="/s3-accounting" />
7779
<TrackedRoute
7880
path="/welcome"
7981
component={WelcomeView}

0 commit comments

Comments
Β (0)