Commit 0834711e authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Don't display action if user has no contract

    ... else it leads to nowhere.
parent 9d89f640
......@@ -180,20 +180,27 @@
url_list[0] + url_list[1] + "/Person_getCloudContractRelated?return_json=True");
})
.push(function (contract_relative_url) {
return RSVP.all([
gadget.getUrlFor({command: "change", options: {"page": "slapos"}}),
gadget.getUrlFor({command: "change", options: {"jio_key": contract_relative_url,
var promise_list = [
gadget.getUrlFor({command: "change", options: {"page": "slapos"}})
];
if (contract_relative_url) {
promise_list.push(
gadget.getUrlFor({command: "change", options: {"jio_key": contract_relative_url,
"page": "slap_controller"}})
]);
);
}
return RSVP.all(promise_list);
})
.push(function (result) {
return gadget.updateHeader({
var header_dict = {
page_title: invoices_translation,
selection_url: result[0],
contract_url: result[1],
filter_action: true
});
};
if (result[1]) {
header_dict.contract_url = result[1];
}
return gadget.updateHeader(header_dict);
});
});
}(window, rJS, RSVP));
\ No newline at end of file
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>986.30539.17853.40038</string> </value>
<value> <string>986.54956.15848.43639</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1599538229.52</float>
<float>1602092381.9</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment