@@ -36,7 +36,6 @@ import TimeLogConfirmationModal from './TimeLogConfirmationModal';
3636import { ENDPOINTS } from '../../../utils/URL' ;
3737import '../../Header/DarkMode.css' ;
3838import { updateIndividualTaskTime } from '../../TeamMemberTasks/actions' ;
39- import '../Timelog.css' ;
4039
4140// Images are not allowed in timelog
4241const customImageUploadHandler = ( ) =>
@@ -45,36 +44,6 @@ const customImageUploadHandler = () =>
4544 reject ( { message : 'Pictures are not allowed here!' , remove : true } ) ;
4645 } ) ;
4746
48- /*
49- const TINY_MCE_INIT_OPTIONS = {
50- license_key: 'gpl',
51- menubar: false,
52- placeholder: 'Description (10-word minimum) and reference link',
53- plugins: 'advlist autolink autoresize lists link charmap table paste help wordcount',
54- toolbar:
55- // eslint-disable-next-line no-multi-str
56- 'bold italic underline link removeformat bullist numlist outdent indent |\
57- styleselect fontsizeselect | table| strikethrough forecolor backcolor |\
58- subscript superscript charmap | help',
59- branding: false,
60- toolbar_mode: 'sliding',
61- min_height: 180,
62- max_height: 300,
63- autoresize_bottom_margin: 1,
64- content_style: 'body { cursor: text !important; }',
65- images_upload_handler: customImageUploadHandler,
66- };
67- */
68-
69- /* Soft Refresh */
70- const softRefresh = ( ) => {
71- document . body . classList . add ( 'refreshing' ) ;
72- // console.log(document.body.classList);
73- setTimeout ( ( ) => {
74- window . location . reload ( ) ;
75- } , 300 ) ;
76- } ;
77-
7847/**
7948 * Modal used to submit and edit tangible and intangible time entries.
8049 * There are several use cases:
@@ -156,8 +125,8 @@ function TimeEntryForm(props) {
156125
157126 const timeEntryInitialProjectOrTaskId = edit
158127 ? initialProjectId +
159- ( initialwbsId ? `/${ initialwbsId } ` : '' ) +
160- ( initialTaskId ? `/${ initialTaskId } ` : '' )
128+ ( initialwbsId ? `/${ initialwbsId } ` : '' ) +
129+ ( initialTaskId ? `/${ initialTaskId } ` : '' )
161130 : 'defaultProject' ;
162131
163132 const initialReminder = {
@@ -384,17 +353,13 @@ function TimeEntryForm(props) {
384353 const today = moment ( ) . tz ( 'America/Los_Angeles' ) ;
385354 const offset = today . week ( ) - date . week ( ) ;
386355 props . getTimeEntriesForWeek ( timeEntryUserId , Math . min ( offset , 3 ) ) ;
387- // Use GET_TIME_ENTRIES_WEEK, and fix offset to 0 (this week)
388- // await props.getTimeEntriesForWeek(timeEntryUserId, 0);
389- // dispatch(fetchTeamMembersTask(timeEntryUserId));
390356 clearForm ( ) ;
391357 break ;
392358 }
393359 case 'WeeklyTab' :
394360 await Promise . all ( [
395361 props . getUserProfile ( timeEntryUserId ) ,
396362 props . getTimeEntriesForWeek ( timeEntryUserId , tab ) ,
397- // props.getTimeEntriesForPeriod(timeEntryUserId, today, today),
398363 ] ) ;
399364 break ;
400365 default :
@@ -407,8 +372,6 @@ function TimeEntryForm(props) {
407372 editLimitNotification : ! r . editLimitNotification ,
408373 } ) ) ;
409374 }
410- // Soft Refresh
411- softRefresh ( ) ;
412375 } ;
413376
414377 try {
@@ -736,7 +699,7 @@ function TimeEntryForm(props) {
736699
737700 { 'notes' in errors && (
738701 < div className = "text-danger" >
739- < small > { errors . notes } </ small > handlePostSubmitActions
702+ < small > { errors . notes } </ small >
740703 </ div >
741704 ) }
742705 </ FormGroup >
@@ -828,7 +791,6 @@ TimeEntryForm.propTypes = {
828791const mapStateToProps = state => ( {
829792 authUser : state . auth . user ,
830793 darkMode : state . theme . darkMode ,
831- timeEntriesPeriod : state . timeEntries . period ,
832794} ) ;
833795
834796export default connect ( mapStateToProps , {
0 commit comments