-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add user messaging modal to user's tab on institutional dashboard
- Loading branch information
John Tordoff
committed
Dec 6, 2024
1 parent
951bcb2
commit 8375eb7
Showing
6 changed files
with
133 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// app/adapters/user-message.js | ||
import { inject as service } from '@ember/service'; | ||
import config from 'ember-osf-web/config/environment'; | ||
const { OSF: { apiUrl } } = config; | ||
import OsfAdapter from './osf-adapter'; | ||
|
||
export default class UserMessageAdapter extends OsfAdapter { | ||
@service session; | ||
urlForCreateRecord(modelName, snapshot) { | ||
const userId = snapshot.record.user; | ||
return `${apiUrl}/v2/users/${userId}/messages/`; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// app/models/user-message.js | ||
import Model, { attr, belongsTo } from '@ember-data/model'; | ||
|
||
export default class UserMessageModel extends Model { | ||
@attr('string') messageText; | ||
@attr('string') messageType; | ||
@belongsTo('institution') institution; | ||
} |
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