-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from solocommand/updates
Updates
- Loading branch information
Showing
10 changed files
with
68 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,8 +32,8 @@ const filterModel = (model = {}) => { | |
export default Component.extend(ComponentQueryManager, ActionMixin, { | ||
model: null, | ||
|
||
name: 'j', // null, | ||
email: '[email protected]', // null, | ||
name: null, | ||
email: null, | ||
|
||
isOpen: false, | ||
isInvalid: computed('name', 'email', function() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,31 @@ | ||
import Controller from 'cuf/controllers/display/company'; | ||
import { computed } from '@ember/object'; | ||
import { inject } from '@ember/service'; | ||
|
||
import mutation from 'cuf/gql/mutations/complete'; | ||
|
||
export default Controller.extend({ | ||
options: { toolbarButtons: [] }, | ||
apollo: inject(), | ||
body: computed('model.submission.payload.body', function() { | ||
return `<div contenteditable=false>${this.get('model.submission.payload.body')}</div>`; | ||
}), | ||
|
||
oldIds: computed('model.company.scheduledWebsiteSections.edges', function() { | ||
return this.get('model.company.scheduledWebsiteSections.edges').map(({ node }) => node.id); | ||
}), | ||
|
||
init() { | ||
this._super(...arguments); | ||
this.set('options', { | ||
toolbarButtons: [] | ||
}); | ||
}, | ||
actions: { | ||
async done() { | ||
try { | ||
const id = this.get('model.submission.id'); | ||
await this.get('apollo').mutate({ mutation, variables: { id } }); | ||
this.get('notify').info('Marked as done!'); | ||
this.set('model.submission.reviewed', true); | ||
} catch (e) { | ||
console.error(e); // eslint-disable-line no-console | ||
this.get('notify').alert('Something went wrong -- please try again!', { closeAfter: null }); | ||
} | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
mutation Complete($id: String!) { | ||
complete(id: $id) { | ||
result { | ||
ok | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters