1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 13:19:43 +02:00

Provide UI for managing integration config

Closes #110
This commit is contained in:
HarveyKandola 2018-08-08 14:57:56 +01:00
parent 4d1eb952b2
commit 7206f721f4
8 changed files with 783 additions and 697 deletions

View file

@ -19,6 +19,8 @@ export default Component.extend(Notifier, {
didReceiveAttrs() {
this._super(...arguments);
// Jira specific.
let jira = this.get('jira');
if (is.not.object(jira)) {
@ -30,6 +32,19 @@ export default Component.extend(Notifier, {
}
this.set('jiraCreds', jira);
if (this.get('session.isGlobalAdmin')) {
// Trello specific.
let trello = this.get('trello');
if (is.not.object(trello)) {
trello = {
appKey: ''
};
}
this.set('trelloCreds', trello);
}
},
actions: {
@ -42,8 +57,11 @@ export default Component.extend(Notifier, {
}
this.showWait();
this.get('orgSvc').saveOrgSetting(orgId, 'jira', this.get('jiraCreds')).then(() => {
if (this.get('session.isGlobalAdmin')) {
this.get('orgSvc').saveGlobalSetting('SECTION-TRELLO', this.get('trelloCreds'));
}
this.get('orgSvc').saveOrgSetting(orgId, 'jira', this.get('jiraCreds')).then(() =>{
this.showDone();
});
}