Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-gantt-editor
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-gantt-editor
Commits
d0859b5c
Commit
d0859b5c
authored
Sep 08, 2020
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added hard-coded resource calendar absence for the weekend
parent
02c86c6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
GanttSchedulingController.js
www/controller/GanttSchedulingController.js
+5
-3
No files found.
www/controller/GanttSchedulingController.js
View file @
d0859b5c
...
...
@@ -341,7 +341,9 @@ Ext.define('GanttEditor.controller.GanttSchedulingController', {
var
startMidnightTime
=
timeMoment
-
startHour
;
// 9:00-17:00 - 100%, rest - 0%
if
(
startHour
<
9.0
*
3600.0
*
1000.0
||
startHour
>=
17.0
*
3600.0
*
1000.0
)
assignedPercent
=
0.0
if
(
startHour
<
9.0
*
3600.0
*
1000.0
||
startHour
>=
17.0
*
3600.0
*
1000.0
)
assignedPercent
=
0.0
;
var
dayOfWeek
=
startDate
.
getDay
();
if
(
0
==
dayOfWeek
||
6
==
dayOfWeek
)
assignedPercent
=
0.0
;
if
(
me
.
debug
)
console
.
log
(
'PO.controller.gantt_editor.GanttSchedulingController.taskResourcesWorking: Finished: resources='
+
assignedPercent
/
100.0
);
return
assignedPercent
/
100.0
;
...
...
@@ -372,7 +374,7 @@ Ext.define('GanttEditor.controller.GanttSchedulingController', {
assignees
.
forEach
(
function
(
assig
)
{
assignedPercent
=
assignedPercent
+
assig
.
percent
});
if
(
0
==
assignedPercent
)
{
return
previousEndTime
;
}
// No assignments - "manually scheduled" task
// -------------------------------------------------------
// -------------------------------------------------------
// Get the first moment a resource is available.
// This may be the actual moment, or some time later.
var
workStillToDo
=
plannedUnits
*
3600.0
*
1000.0
;
// Work still to do in milli-seconds
...
...
@@ -422,7 +424,7 @@ Ext.define('GanttEditor.controller.GanttSchedulingController', {
var
previousEndDate
=
PO
.
Utilities
.
pgToDate
(
model
.
get
(
'end_date'
));
if
(
!
previousEndDate
)
{
return
false
;
}
var
previousEndTime
=
previousEndDate
.
getTime
();
var
newEndTime
=
me
.
taskForwardDuration
(
treeStore
,
model
);
var
newEndTime
=
me
.
taskForwardDuration
(
treeStore
,
model
);
if
(
newEndTime
==
previousEndTime
)
return
false
;
// skip if no change
// Write the newEndDate into model
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment