Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Romain Courteaud
slapos.core
Commits
49c80882
Commit
49c80882
authored
Mar 22, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Fixup add related ticket
It relies on Person_requestSupport now
parent
3ccd0906
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
76 deletions
+25
-76
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_add_related_ticket_js.js
...module/rjs_gadget_erp5_page_slap_add_related_ticket_js.js
+23
-74
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_add_related_ticket_js.xml
...odule/rjs_gadget_erp5_page_slap_add_related_ticket_js.xml
+2
-2
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_add_related_ticket_js.js
View file @
49c80882
...
...
@@ -10,7 +10,9 @@
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
updatePanel
"
,
"
updatePanel
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
jio_putAttachment
"
,
"
jio_putAttachment
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
getSettingList
"
,
"
getSettingList
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_post
"
,
"
jio_post
"
)
...
...
@@ -33,28 +35,32 @@
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
getContent
();
return
RSVP
.
all
([
form_gadget
.
getContent
(),
gadget
.
getSettingList
([
'
me
'
,
'
hateoas_url
'
])]);
})
.
push
(
function
(
content
)
{
var
property
,
doc
=
{};
for
(
property
in
content
)
{
if
((
content
.
hasOwnProperty
(
property
))
&&
// Remove undefined keys added by Gadget fields
(
property
!==
"
undefined
"
)
&&
// Remove default_*:int keys added by ListField
!
(
property
.
endsWith
(
"
:int
"
)
&&
property
.
startsWith
(
"
default_
"
)))
{
doc
[
property
]
=
content
[
property
];
}
}
return
gadget
.
jio_post
(
doc
);
.
push
(
function
(
result
)
{
var
doc
=
result
[
0
],
me
=
result
[
1
][
0
],
url
=
result
[
1
][
1
];
return
gadget
.
jio_putAttachment
(
me
,
url
+
me
+
"
/Person_requestSupport
"
,
{
title
:
doc
.
title
,
description
:
doc
.
description
,
aggregate
:
gadget
.
state
.
jio_key
,
resource
:
doc
.
resource
});
})
.
push
(
function
(
attachment
)
{
return
jIO
.
util
.
readBlobAsText
(
attachment
.
target
.
response
);
})
.
push
(
function
(
response
)
{
return
JSON
.
parse
(
response
.
target
.
result
);
})
.
push
(
function
(
key
)
{
.
push
(
function
(
result
)
{
return
gadget
.
notifySubmitted
({
message
:
gadget
.
message_translation
,
status
:
'
success
'
})
.
push
(
function
()
{
// Workaround, find a way to open document without break gadget.
return
gadget
.
redirect
({
"
command
"
:
"
change
"
,
"
options
"
:
{
"
jio_key
"
:
key
,
"
page
"
:
"
slap_controller
"
}});
"
options
"
:
{
"
jio_key
"
:
result
.
relative_url
,
"
page
"
:
"
slap_controller
"
}});
});
});
})
...
...
@@ -133,63 +139,6 @@
"
key
"
:
"
resource
"
,
"
hidden
"
:
0
,
"
type
"
:
"
ListField
"
},
"
my_destination_decision
"
:
{
"
description
"
:
result
[
3
][
1
],
"
title
"
:
result
[
3
][
5
],
"
default
"
:
result
[
2
],
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
destination_decision
"
,
"
hidden
"
:
1
,
"
type
"
:
"
StringField
"
},
"
my_specialise
"
:
{
"
description
"
:
""
,
"
title
"
:
result
[
3
][
6
],
// Auto Set a hardcoded trade Condition
// Please replace it by a getSetting.
"
default
"
:
"
sale_trade_condition_module/slapos_ticket_trade_condition
"
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
specialise
"
,
"
hidden
"
:
1
,
"
type
"
:
"
StringField
"
},
"
my_aggregate
"
:
{
"
description
"
:
""
,
"
title
"
:
result
[
3
][
7
],
"
default
"
:
gadget
.
state
.
jio_key
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
aggregate
"
,
"
hidden
"
:
1
,
"
type
"
:
"
StringField
"
},
"
my_portal_type
"
:
{
"
description
"
:
result
[
3
][
1
],
"
title
"
:
result
[
3
][
8
],
"
default
"
:
"
Support Request
"
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
portal_type
"
,
"
hidden
"
:
1
,
"
type
"
:
"
StringField
"
},
"
my_parent_relative_url
"
:
{
"
description
"
:
""
,
"
title
"
:
result
[
3
][
10
],
"
default
"
:
"
support_request_module
"
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
parent_relative_url
"
,
"
hidden
"
:
1
,
"
type
"
:
"
StringField
"
}
}},
"
_links
"
:
{
...
...
@@ -205,7 +154,7 @@
[[
"
my_resource
"
]]
],
[
"
center
"
,
[[
"
my_title
"
],
[
"
my_description
"
]
,
[
"
my_specialise
"
],
[
"
my_destination_decision
"
],
[
"
my_aggregate
"
],
[
"
my_portal_type
"
],
[
"
my_parent_relative_url
"
]
]
[[
"
my_title
"
],
[
"
my_description
"
]]
]]
}
})
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_add_related_ticket_js.xml
View file @
49c80882
...
...
@@ -279,7 +279,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
87.11836.53106.28979
</string>
</value>
<value>
<string>
9
99.2879.31654.18568
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -297,7 +297,7 @@
</tuple>
<state>
<tuple>
<float>
16
02260953.4
4
</float>
<float>
16
47959180.0
4
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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