Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iTasks-SDK
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
74
Issues
74
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
iTasks-SDK
Commits
12167933
Commit
12167933
authored
Oct 16, 2019
by
Mart Lubbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
guard the new button so that one cannot open multiple newtask dialogs
parent
1a87c628
Pipeline
#31398
passed with stage
in 6 minutes and 54 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
Libraries/iTasks/Extensions/Admin/WorkflowAdmin.icl
Libraries/iTasks/Extensions/Admin/WorkflowAdmin.icl
+12
-6
No files found.
Libraries/iTasks/Extensions/Admin/WorkflowAdmin.icl
View file @
12167933
...
...
@@ -191,16 +191,22 @@ where
=
get
currentUser
@
userRoles
>>-
\
roles
->
forever
(
enterChoiceWithSharedAs
[
ChooseFromGrid
snd
]
(
worklist
roles
)
(
appSnd
(\{
WorklistRow
|
parentTask
}
->
isNothing
parentTask
))
>>*
(
continuations
roles
taskList
)
(
(
enterChoiceWithSharedAs
[
ChooseFromGrid
snd
]
(
worklist
roles
)
(
appSnd
(\{
WorklistRow
|
parentTask
}
->
isNothing
parentTask
))
@?
tvToMaybe
)
-&&-
watch
(
sdsFocus
{
gDefault
{|*|}
&
includeAttributes
=
True
}
taskList
)
>>*
continuations
roles
taskList
)
worklist
roles
=
if
(
isMember
"admin"
roles
)
allWork
myWork
continuations
roles
taskList
=
if
(
isMember
"manager"
roles
)
[
new
,
open
,
delete
]
[
open
]
where
new
=
OnAction
(
Action
"New"
)
(
always
(
appendTask
Embedded
(
removeWhenStable
(
addNewTask
taskList
<<@
InWindow
<<@
AddCSSClass
"new-work-window"
))
taskList
@!
()
))
open
=
OnAction
(
Action
"Open"
)
(
hasValue
(\(
taskId
,_)
->
openTask
taskList
taskId
@!
()))
delete
=
OnAction
(
Action
"Delete"
)
(
ifValue
(\
x
->
snd
x
||
isMember
"admin"
roles
)
(\(
taskId
,_)
->
removeTask
taskId
topLevelTasks
@!
()))
new
=
OnAction
(
Action
"New"
)
$
ifValue
(\(_,
(_,
tlitems
))->
isEmpty
[()\\
tli
<-
tlitems
|
isJust
$
'
DM
'.
get
"manageWork:open"
tli
.
TaskListItem
.
attributes
])
\_->
appendTask
Embedded
(
removeWhenStable
$
addNewTask
taskList
<<@
InWindow
<<@
AddCSSClass
"new-work-window"
<<@
(
"manageWork:open"
,
JSONNull
))
taskList
@!
()
open
=
OnAction
(
Action
"Open"
)
$
ifValue
(
isJust
o
fst
)
\(
Just
(
taskId
,
_),
_)->
openTask
taskList
taskId
@!
()
delete
=
OnAction
(
Action
"Delete"
)
$
ifValue
(\(
x
,
_)
->
isJust
x
&&
snd
(
fromJust
x
)
||
isMember
"admin"
roles
)
\(
Just
(
taskId
,
_),
_)
->
removeTask
taskId
topLevelTasks
@!
()
userRoles
(
AuthenticatedUser
_
roles
_)
=
roles
userRoles
_
=
[]
...
...
@@ -289,7 +295,7 @@ unwrapWorkflowTask (ParamWorkflowTask tf) = (Hint "Enter parameters" @>> enterIn
openTask
::
!(
SharedTaskList
())
!
TaskId
->
Task
()
openTask
taskList
taskId
=
appendOnce
taskId
(
workOnTask
taskId
)
taskList
@!
()
=
appendOnce
taskId
(
workOnTask
taskId
)
taskList
@!
()
workOnTask
::
!
TaskId
->
Task
()
workOnTask
taskId
...
...
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