-
- {accordionComponent}
-
-
-
-
}
@@ -361,13 +365,17 @@ const mapStateToProps = state => ({
})
const mapDispatchToProps = dispatch => ({
+ // selectFirstTimeline: timelines => dispatch(selectFirstTimeline(timelines)),
+ selectFirstTimeline: (timelines) => (dispatch) => {
+ return dispatch(selectFirstTimeline(timelines)) },
+
onSaveSuccess: timeline => dispatch(saveTimelineSuccess(timeline)),
showAlertBanner: alert => dispatch(showAlertBanner(alert)),
hideAlertBanner: () => dispatch(hideAlertBanner()),
showAlertModal: alert => dispatch(showAlertModal(alert)),
hideAlertModal: () => dispatch(hideAlertModal()),
+ hideLoading: () => dispatch(hideLoading()),
selectTimeline: timeline => dispatch(selectTimeline(timeline)),
- selectFirstTimeline: timelines => dispatch(selectFirstTimeline(timelines)),
showConfirm: confirm => dispatch(showConfirm(confirm)),
hideConfirm: confirm => dispatch(hideConfirm(confirm)),
cleanTimeline: timeline => dispatch(setTimelineClean(timeline)),
diff --git a/snprc_scheduler/src/org/labkey/snprc_scheduler/domains/Timeline.java b/snprc_scheduler/src/org/labkey/snprc_scheduler/domains/Timeline.java
index 7a98e28c3..e1efeb60d 100644
--- a/snprc_scheduler/src/org/labkey/snprc_scheduler/domains/Timeline.java
+++ b/snprc_scheduler/src/org/labkey/snprc_scheduler/domains/Timeline.java
@@ -139,6 +139,11 @@ public Timeline(Container c, User u, JSONObject json) throws RuntimeException
String createdDateString = json.optString(TIMELINE_DATE_CREATED, null);
String modifiedDateString = json.optString(TIMELINE_DATE_MODIFIED, null);
+ startDateString = "".equals(startDateString) ? null : startDateString;
+ endDateString = "".equals(endDateString) ? null : endDateString;
+ createdDateString = "".equals(createdDateString) ? null : createdDateString;
+ modifiedDateString = "".equals(modifiedDateString) ? null : modifiedDateString;
+
try
{
this.setStartDate(startDateString == null ? new Date() : DateUtil.parseDateTime(startDateString, TIMELINE_DATE_FORMAT));
diff --git a/snprc_scheduler/tsconfig.json b/snprc_scheduler/tsconfig.json
new file mode 100644
index 000000000..51a3abbe1
--- /dev/null
+++ b/snprc_scheduler/tsconfig.json
@@ -0,0 +1,5 @@
+{
+ "extends": "./node_modules/@labkey/build/webpack/tsconfig.json",
+ "include": ["src/client/**/*"],
+ "exclude": ["node_modules"]
+}
diff --git a/snprc_scheduler/webpack/prod.config.js b/snprc_scheduler/webpack/prod.config.js
deleted file mode 100644
index 526e57b6c..000000000
--- a/snprc_scheduler/webpack/prod.config.js
+++ /dev/null
@@ -1,50 +0,0 @@
-const path = require('path');
-const webpack = require('webpack');
-const MiniCssExtractPlugin = require('mini-css-extract-plugin');
-
-module.exports = {
- context: path.resolve(__dirname, '..'),
-
- mode: 'production',
-
- devtool: 'source-map',
-
- entry: {
- app: [
- './src/client/app.js',
- './src/client/styles/style.js'
- ]
- },
-
- output: {
- path: path.resolve(__dirname, '../resources/web/snprc_scheduler/gen/app/'),
- publicPath: './', // allows context path to resolve in both js/css
- filename: "[name].js"
- },
- module: {
- rules: [{
- test: /\.jsx?$/,
- use: [{
- loader: 'babel-loader',
- options: {
- cacheDirectory: true,
- }
- }]
- },
- {
- test: /\.css$/,
- use: [MiniCssExtractPlugin.loader, 'css-loader']
- }]
- },
- resolve: {
- extensions: [ '.jsx', '.js' ]
- },
- plugins: [
- new webpack.DefinePlugin({
- 'process.env.NODE_ENV': '"production"'
- }),
- new MiniCssExtractPlugin({
- filename: '[name].css'
- })
- ]
-};
diff --git a/snprc_scheduler/webpack/watch.config.js b/snprc_scheduler/webpack/watch.config.js
deleted file mode 100644
index d97c97f40..000000000
--- a/snprc_scheduler/webpack/watch.config.js
+++ /dev/null
@@ -1,66 +0,0 @@
-const MiniCssExtractPlugin = require('mini-css-extract-plugin');
-const path = require('path');
-
-const devServer = {
- client: {
- overlay: true,
- },
- host: 'localhost',
- port: 3000,
- hot: 'only',
- headers: {
- "Access-Control-Allow-Origin": "*",
- "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
- "Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
- },
-};
-
-const devServerURL = 'http://' + devServer.host + ':' + devServer.port;
-
-module.exports = {
- context: path.resolve(__dirname, '..'),
-
- mode: 'development',
-
- devServer: devServer,
-
- entry: {
- app: [
- 'react-hot-loader/patch',
- './src/client/app.js',
- './src/client/styles/style.js',
- ]
- },
-
- output: {
- path: path.resolve(__dirname, '../resources/web/snprc_scheduler/gen/app/'),
- publicPath: devServerURL + '/',
- filename: "[name].js"
- },
- module: {
- rules: [{
- test: /\.jsx?$/,
- use: [{
- loader: 'babel-loader',
- options: {
- cacheDirectory: true,
- }
- }]
- },{
- test: /\.css$/,
- use: [MiniCssExtractPlugin.loader, 'css-loader']
- }]
- },
- optimization: {
- // do not emit compiled assets that include errors
- emitOnErrors: false,
- },
- resolve: {
- extensions: [ '.jsx', '.js' ]
- },
- plugins: [
- new MiniCssExtractPlugin({
- filename: '[name].css'
- })
- ]
-};